diff --git a/cockatrice/src/client/game_logic/abstract_client.cpp b/cockatrice/src/client/game_logic/abstract_client.cpp index c186ae323..bc227bf68 100644 --- a/cockatrice/src/client/game_logic/abstract_client.cpp +++ b/cockatrice/src/client/game_logic/abstract_client.cpp @@ -52,7 +52,7 @@ AbstractClient::AbstractClient(QObject *parent) FeatureSet features; features.initalizeFeatureList(clientFeatures); - connect(this, SIGNAL(sigQueuePendingCommand(PendingCommand *)), this, SLOT(queuePendingCommand(PendingCommand *))); + connect(this, &AbstractClient::sigQueuePendingCommand, this, &AbstractClient::queuePendingCommand); } AbstractClient::~AbstractClient() diff --git a/cockatrice/src/client/network/release_channel.cpp b/cockatrice/src/client/network/release_channel.cpp index b467aa4a4..d5cd672dc 100644 --- a/cockatrice/src/client/network/release_channel.cpp +++ b/cockatrice/src/client/network/release_channel.cpp @@ -38,7 +38,7 @@ void ReleaseChannel::checkForUpdates() QString releaseChannelUrl = getReleaseChannelUrl(); qDebug() << "Searching for updates on the channel: " << releaseChannelUrl; response = netMan->get(QNetworkRequest(releaseChannelUrl)); - connect(response, SIGNAL(finished()), this, SLOT(releaseListFinished())); + connect(response, &QNetworkReply::finished, this, &ReleaseChannel::releaseListFinished); } // Different release channel checking functions for different operating systems @@ -158,7 +158,7 @@ void StableReleaseChannel::releaseListFinished() QString url = QString(STABLETAG_URL) + tagName; qDebug() << "Searching for commit hash corresponding to stable channel tag: " << tagName; response = netMan->get(QNetworkRequest(url)); - connect(response, SIGNAL(finished()), this, SLOT(tagListFinished())); + connect(response, &QNetworkReply::finished, this, &StableReleaseChannel::tagListFinished); } void StableReleaseChannel::tagListFinished() @@ -260,7 +260,7 @@ void BetaReleaseChannel::releaseListFinished() qDebug() << "Searching for a corresponding file on the beta channel: " << betaBuildDownloadUrl; response = netMan->get(QNetworkRequest(betaBuildDownloadUrl)); - connect(response, SIGNAL(finished()), this, SLOT(fileListFinished())); + connect(response, &QNetworkReply::finished, this, &BetaReleaseChannel::fileListFinished); } void BetaReleaseChannel::fileListFinished() diff --git a/cockatrice/src/client/network/replay_timeline_widget.cpp b/cockatrice/src/client/network/replay_timeline_widget.cpp index 83b1abda0..e92b4133e 100644 --- a/cockatrice/src/client/network/replay_timeline_widget.cpp +++ b/cockatrice/src/client/network/replay_timeline_widget.cpp @@ -9,7 +9,7 @@ ReplayTimelineWidget::ReplayTimelineWidget(QWidget *parent) : QWidget(parent), maxBinValue(1), maxTime(1), timeScaleFactor(1.0), currentTime(0), currentEvent(0) { replayTimer = new QTimer(this); - connect(replayTimer, SIGNAL(timeout()), this, SLOT(replayTimerTimeout())); + connect(replayTimer, &QTimer::timeout, this, &ReplayTimelineWidget::replayTimerTimeout); rewindBufferingTimer = new QTimer(this); rewindBufferingTimer->setSingleShot(true); diff --git a/cockatrice/src/client/network/spoiler_background_updater.cpp b/cockatrice/src/client/network/spoiler_background_updater.cpp index e60eeb96a..642c48d3e 100644 --- a/cockatrice/src/client/network/spoiler_background_updater.cpp +++ b/cockatrice/src/client/network/spoiler_background_updater.cpp @@ -45,10 +45,10 @@ void SpoilerBackgroundUpdater::downloadFromURL(QUrl url, bool saveResults) if (saveResults) { // This will write out to the file (used for spoiler.xml) - connect(reply, SIGNAL(finished()), this, SLOT(actDownloadFinishedSpoilersFile())); + connect(reply, &QNetworkReply::finished, this, &SpoilerBackgroundUpdater::actDownloadFinishedSpoilersFile); } else { // This will check the status (used to see if we're in spoiler season or not) - connect(reply, SIGNAL(finished()), this, SLOT(actCheckIfSpoilerSeasonEnabled())); + connect(reply, &QNetworkReply::finished, this, &SpoilerBackgroundUpdater::actCheckIfSpoilerSeasonEnabled); } } diff --git a/cockatrice/src/client/sound_engine.cpp b/cockatrice/src/client/sound_engine.cpp index 35cc6d5c7..5ffb39817 100644 --- a/cockatrice/src/client/sound_engine.cpp +++ b/cockatrice/src/client/sound_engine.cpp @@ -15,8 +15,8 @@ SoundEngine::SoundEngine(QObject *parent) : QObject(parent), player(nullptr) { ensureThemeDirectoryExists(); - connect(&SettingsCache::instance(), SIGNAL(soundThemeChanged()), this, SLOT(themeChangedSlot())); - connect(&SettingsCache::instance(), SIGNAL(soundEnabledChanged()), this, SLOT(soundEnabledChanged())); + connect(&SettingsCache::instance(), &SettingsCache::soundThemeChanged, this, &SoundEngine::themeChangedSlot); + connect(&SettingsCache::instance(), &SettingsCache::soundEnabledChanged, this, &SoundEngine::soundEnabledChanged); soundEnabledChanged(); themeChangedSlot(); diff --git a/cockatrice/src/client/tapped_out_interface.cpp b/cockatrice/src/client/tapped_out_interface.cpp index c0cbab095..796b9ddc7 100644 --- a/cockatrice/src/client/tapped_out_interface.cpp +++ b/cockatrice/src/client/tapped_out_interface.cpp @@ -14,7 +14,7 @@ TappedOutInterface::TappedOutInterface(CardDatabase &_cardDatabase, QObject *par : QObject(parent), cardDatabase(_cardDatabase) { manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(queryFinished(QNetworkReply *))); + connect(manager, &QNetworkAccessManager::finished, this, &TappedOutInterface::queryFinished); } void TappedOutInterface::queryFinished(QNetworkReply *reply) diff --git a/cockatrice/src/client/update_downloader.cpp b/cockatrice/src/client/update_downloader.cpp index 161137cbe..29bb9a7d2 100644 --- a/cockatrice/src/client/update_downloader.cpp +++ b/cockatrice/src/client/update_downloader.cpp @@ -15,9 +15,9 @@ void UpdateDownloader::beginDownload(QUrl downloadUrl) originalUrl = downloadUrl; response = netMan->get(QNetworkRequest(downloadUrl)); - connect(response, SIGNAL(finished()), this, SLOT(fileFinished())); - connect(response, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadProgress(qint64, qint64))); - connect(this, SIGNAL(stopDownload()), response, SLOT(abort())); + connect(response, QNetworkReply::finished, this, fileFinished); + connect(response, QNetworkReply::downloadProgress, this, downloadProgress); + connect(this, &UpdateDownloader::stopDownload, response, &QNetworkReply::abort); } void UpdateDownloader::downloadError(QNetworkReply::NetworkError) diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index 96d521d23..ba4408c67 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); + QObject::connect(&app, QApplication::lastWindowClosed, &app, QApplication::quit); qInstallMessageHandler(CockatriceLogger); #ifdef Q_OS_WIN