Prevent post-compilation Qt downgrades (#2576)

* Abort the app if a Qt downgrade is detected

The app will now exit immediately if it was compiled with a Qt version
higher than the one present on the machine.

* Add function for checking the Qt version at runtime

* Re-register global D-Bus menu only if DE is Unity
This commit is contained in:
Gianluca Recchia 2019-01-25 04:45:05 +01:00 committed by Jonathan White
parent b21936f94d
commit 395a88a5ef
3 changed files with 29 additions and 7 deletions

View file

@ -46,6 +46,8 @@ Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
int main(int argc, char** argv)
{
QT_REQUIRE_VERSION(argc, argv, QT_VERSION_STR)
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif