Refactoring. Don't use old slot style in QTimer::singleShot.
--HG-- branch : develop
This commit is contained in:
parent
be2a706cc0
commit
2d5f84b4bf
|
@ -54,7 +54,11 @@ int main(int argc, char *argv[])
|
||||||
MApplication app(argc, argv);
|
MApplication app(argc, argv);
|
||||||
app.InitOptions();
|
app.InitOptions();
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
|
QTimer::singleShot(0, &app, &MApplication::ProcessCMD);
|
||||||
|
#else
|
||||||
QTimer::singleShot(0, &app, SLOT(ProcessCMD()));
|
QTimer::singleShot(0, &app, SLOT(ProcessCMD()));
|
||||||
|
#endif
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,11 @@ int main(int argc, char *argv[])
|
||||||
msec = 15; // set delay for correct the first fitbest zoom
|
msec = 15; // set delay for correct the first fitbest zoom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
|
QTimer::singleShot(msec, &w, &MainWindow::ProcessCMD);
|
||||||
|
#else
|
||||||
QTimer::singleShot(msec, &w, SLOT(ProcessCMD()));
|
QTimer::singleShot(msec, &w, SLOT(ProcessCMD()));
|
||||||
|
#endif
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
|
|
||||||
explicit QmuParserTester(QObject *parent = nullptr);
|
explicit QmuParserTester(QObject *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void Run();
|
void Run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -135,6 +135,10 @@ void VWidgetPopup::Show(QPoint coord)
|
||||||
|
|
||||||
if (lifeTime > 0)
|
if (lifeTime > 0)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
|
QTimer::singleShot(lifeTime, this, &QWidget::close);
|
||||||
|
#else
|
||||||
QTimer::singleShot(lifeTime, this, SLOT(close()));
|
QTimer::singleShot(lifeTime, this, SLOT(close()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,10 @@ int main(int argc, char *argv[])
|
||||||
QCoreApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
qInstallMessageHandler(testMessageOutput);
|
qInstallMessageHandler(testMessageOutput);
|
||||||
qmu::Test::QmuParserTester pt;
|
qmu::Test::QmuParserTester pt;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
|
QTimer::singleShot(0, &pt, &qmu::Test::QmuParserTester::Run);
|
||||||
|
#else
|
||||||
QTimer::singleShot(0, &pt, SLOT(Run()));
|
QTimer::singleShot(0, &pt, SLOT(Run()));
|
||||||
|
#endif
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user