mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 11:55:29 +01:00
Fix Qt 5.7 build
This commit is contained in:
parent
6801690c28
commit
3aa716a1c1
1 changed files with 8 additions and 0 deletions
|
@ -173,7 +173,11 @@ int LuaEngineGui::showFileDialog(lua_State *L_p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QFileDialog fileDialog(parent);
|
QFileDialog fileDialog(parent);
|
||||||
|
#if QT_VERSION >= 0x050900
|
||||||
fileDialog.setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
fileDialog.setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
fileDialog.setWindowTitle(dialogTitle);
|
fileDialog.setWindowTitle(dialogTitle);
|
||||||
fileDialog.setAcceptMode(fileAcceptMode);
|
fileDialog.setAcceptMode(fileAcceptMode);
|
||||||
fileDialog.setNameFilter(fileFormats);
|
fileDialog.setNameFilter(fileFormats);
|
||||||
|
@ -531,7 +535,11 @@ int LuaEngineGui::createDialog(lua_State *L_p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QDialog *dialog = new QDialog(parent);
|
QDialog *dialog = new QDialog(parent);
|
||||||
|
#if QT_VERSION >= 0x050900
|
||||||
dialog->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
dialog->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
dialog->setWindowFlags(dialog->windowFlags()^Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
dialog->setObjectName(nameForPointer(dialog));
|
dialog->setObjectName(nameForPointer(dialog));
|
||||||
dialog->setWindowTitle(windowTitle);
|
dialog->setWindowTitle(windowTitle);
|
||||||
pushPointer(L_p, dialog);
|
pushPointer(L_p, dialog);
|
||||||
|
|
Loading…
Reference in a new issue