diff --git a/src/pmquery/main.cpp b/src/pmquery/main.cpp index 2998460b6f..117a174db0 100644 --- a/src/pmquery/main.cpp +++ b/src/pmquery/main.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "pmquery.h" static char usage[] = @@ -108,7 +108,7 @@ int main(int argc, char ** argv) int usesliderflag = 0; int exclusiveflag = 0; - QGuiApplication a(argc, argv); + QApplication a(argc, argv); while ((option = getoption(argc, argv)) != NULL) { if (strcmp(option, "-c") == 0 || strcmp(option, "-center") == 0) { @@ -276,7 +276,7 @@ int main(int argc, char ** argv) if (!PmQuery::buttonCount()) PmQuery::addButton("Continue", true, 0); - PmQuery q(inputflag, printflag, noframeflag, + PmQuery q(a, inputflag, printflag, noframeflag, nosliderflag, usesliderflag, exclusiveflag); if (nearmouseflag) diff --git a/src/pmquery/pmquery.cpp b/src/pmquery/pmquery.cpp index 4c82fa8d7a..80d0a6d439 100644 --- a/src/pmquery/pmquery.cpp +++ b/src/pmquery/pmquery.cpp @@ -148,9 +148,10 @@ void PmQuery::timerEvent(QTimerEvent *) // Note: the +4 pixels for height ensure the auto-scroll does not // kick in, seems to be required. -PmQuery::PmQuery(bool inputflag, bool printflag, bool noframeflag, +PmQuery::PmQuery(QApplication &application, + bool inputflag, bool printflag, bool noframeflag, bool nosliderflag, bool usesliderflag, bool exclusiveflag) - : QDialog() + : QDialog(application.activeWindow()) { QHBoxLayout *hboxLayout; QVBoxLayout *vboxLayout; diff --git a/src/pmquery/pmquery.h b/src/pmquery/pmquery.h index c38f2f4923..fae4fc1bd4 100644 --- a/src/pmquery/pmquery.h +++ b/src/pmquery/pmquery.h @@ -37,7 +37,7 @@ class PmQuery : public QDialog { Q_OBJECT public: - PmQuery(bool inputflag, bool printflag, bool noframeflag, + PmQuery(QApplication&, bool inputflag, bool printflag, bool noframeflag, bool nosliderflag, bool usesliderflag, bool exclusiveflag); void setStatus(int status) { my.status = status; }