Fix Qt 5.7 build

This commit is contained in:
Syping 2018-08-31 05:29:49 +02:00
parent 6801690c28
commit 3aa716a1c1

View file

@ -173,7 +173,11 @@ int LuaEngineGui::showFileDialog(lua_State *L_p)
}
}
QFileDialog fileDialog(parent);
#if QT_VERSION >= 0x050900
fileDialog.setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
#endif
fileDialog.setWindowTitle(dialogTitle);
fileDialog.setAcceptMode(fileAcceptMode);
fileDialog.setNameFilter(fileFormats);
@ -531,7 +535,11 @@ int LuaEngineGui::createDialog(lua_State *L_p)
}
}
QDialog *dialog = new QDialog(parent);
#if QT_VERSION >= 0x050900
dialog->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
dialog->setWindowFlags(dialog->windowFlags()^Qt::WindowContextHelpButtonHint);
#endif
dialog->setObjectName(nameForPointer(dialog));
dialog->setWindowTitle(windowTitle);
pushPointer(L_p, dialog);