1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Merge pull request #8881 from thalieht/qt5signalslot

Use qt5 syntax for a few remaining SLOT()
This commit is contained in:
sledgehammer999 2018-05-11 22:41:46 +03:00 committed by GitHub
commit 0d35527035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -660,7 +660,7 @@ void Application::shutdownCleanup(QSessionManager &manager)
// According to the qt docs we shouldn't call quit() inside a slot.
// aboutToQuit() is never emitted if the user hits "Cancel" in
// the above dialog.
QTimer::singleShot(0, qApp, SLOT(quit()));
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
#endif

View File

@ -329,7 +329,7 @@ void showSplashScreen()
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
QSplashScreen *splash = new QSplashScreen(splash_img);
splash->show();
QTimer::singleShot(1500, splash, SLOT(deleteLater()));
QTimer::singleShot(1500, splash, &QObject::deleteLater);
qApp->processEvents();
}

View File

@ -65,7 +65,11 @@ void ReverseResolution::resolve(const QString &ip)
}
else {
// Actually resolve the ip
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
m_lookups.insert(QHostInfo::lookupHost(ip, this, &ReverseResolution::hostResolved), ip);
#else
m_lookups.insert(QHostInfo::lookupHost(ip, this, SLOT(hostResolved(QHostInfo))), ip);
#endif
}
}

View File

@ -375,7 +375,7 @@ MainWindow::MainWindow(QWidget *parent)
on_actionWarningMessages_triggered(m_ui->actionWarningMessages->isChecked());
on_actionCriticalMessages_triggered(m_ui->actionCriticalMessages->isChecked());
if (m_ui->actionSearchWidget->isChecked())
QTimer::singleShot(0, this, SLOT(on_actionSearchWidget_triggered()));
QTimer::singleShot(0, this, &MainWindow::on_actionSearchWidget_triggered);
// Auto shutdown actions
QActionGroup *autoShutdownGroup = new QActionGroup(this);
@ -1213,7 +1213,7 @@ bool MainWindow::event(QEvent *e)
if (!hasModalWindow) {
qDebug("Minimize to Tray enabled, hiding!");
e->ignore();
QTimer::singleShot(0, this, SLOT(hide()));
QTimer::singleShot(0, this, &QWidget::hide);
return true;
}
}