diff --git a/qt/main.cpp b/qt/main.cpp --- a/qt/main.cpp +++ b/qt/main.cpp @@ -37,7 +37,9 @@ #include #include #include +#if QT_VERSION >= 0x050000 #include +#endif #include #include @@ -132,6 +134,7 @@ static void setup_foreground_window(QWidget *widget, WId parentWid) { +#if QT_VERSION >= 0x050000 /* For windows set the desktop window as the transient parent */ QWindow *parentWindow = nullptr; if (parentWid) { @@ -154,6 +157,7 @@ wndHandle->setTransientParent(parentWindow); } } +#endif widget->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | diff --git a/qt/pinentrydialog.cpp b/qt/pinentrydialog.cpp --- a/qt/pinentrydialog.cpp +++ b/qt/pinentrydialog.cpp @@ -225,9 +225,7 @@ this, SLOT(focusChanged(QWidget *, QWidget *))); setWindowState(Qt::WindowMinimized); - QTimer::singleShot(0, this, [this] () { - raiseWindow (this); - }); + QTimer::singleShot(0, this, SLOT(raiseWindow)); } void PinEntryDialog::showEvent(QShowEvent *event)