Refactoring. Don't use old slot style in QTimer::singleShot.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-04-18 11:15:53 +03:00
parent be2a706cc0
commit 2d5f84b4bf
5 changed files with 17 additions and 1 deletions

View File

@ -54,7 +54,11 @@ int main(int argc, char *argv[])
MApplication app(argc, argv);
app.InitOptions();
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(0, &app, &MApplication::ProcessCMD);
#else
QTimer::singleShot(0, &app, SLOT(ProcessCMD()));
#endif
return app.exec();
}

View File

@ -90,7 +90,11 @@ int main(int argc, char *argv[])
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()));
#endif
return app.exec();
}

View File

@ -62,7 +62,7 @@ public:
explicit QmuParserTester(QObject *parent = nullptr);
private slots:
public slots:
void Run();
private:

View File

@ -135,6 +135,10 @@ void VWidgetPopup::Show(QPoint coord)
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()));
#endif
}
}

View File

@ -60,6 +60,10 @@ int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
qInstallMessageHandler(testMessageOutput);
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()));
#endif
return a.exec();
}