From d30d966500525cfe3137044c97db024230aac802 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 9 Sep 2020 13:21:56 -0500 Subject: Standardizing --- src/mainwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 08eac98c..b3682297 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4199,7 +4199,7 @@ void MainWindow::checkModsForUpdates() m_OrganizerCore.doAfterLogin([this] () { this->checkModsForUpdates(); }); NexusInterface::instance(&m_PluginContainer)->getAccessManager()->apiCheck(apiKey); } else { - log::warn(tr("You are not currently authenticated with Nexus. Please do so under Settings -> Nexus.").toStdString()); + log::warn("{}", tr("You are not currently authenticated with Nexus. Please do so under Settings -> Nexus.")); } } @@ -5406,7 +5406,7 @@ void MainWindow::modUpdateCheck(std::multimap IDs) m_OrganizerCore.doAfterLogin([=]() { this->modUpdateCheck(IDs); }); NexusInterface::instance(&m_PluginContainer)->getAccessManager()->apiCheck(apiKey); } else - log::warn(tr("You are not currently authenticated with Nexus. Please do so under Settings -> Nexus.").toStdString()); + log::warn("{}", tr("You are not currently authenticated with Nexus. Please do so under Settings -> Nexus.")); } } @@ -5524,10 +5524,10 @@ void MainWindow::nxmUpdateInfoAvailable(QString gameName, QVariant userData, QVa } QVariantList resultList = resultData.toList(); - QFutureWatcher>>> *watcher = new QFutureWatcher>>>(); - QObject::connect(watcher, &QFutureWatcher>>>::finished, this, &MainWindow::finishUpdateInfo); - QFuture>>> future = QtConcurrent::run([=]() -> QPair>> { - return qMakePair(gameNameReal, ModInfo::filteredMods(gameNameReal, resultList, userData.toBool(), true)); + QFutureWatcher>>> *watcher = new QFutureWatcher>>>(); + QObject::connect(watcher, &QFutureWatcher>>::finished, this, &MainWindow::finishUpdateInfo); + QFuture>>> future = QtConcurrent::run([=]() -> std::pair>> { + return std::make_pair(gameNameReal, ModInfo::filteredMods(gameNameReal, resultList, userData.toBool(), true)); }); watcher->setFuture(future); if (m_ModListSortProxy != nullptr) @@ -5536,13 +5536,13 @@ void MainWindow::nxmUpdateInfoAvailable(QString gameName, QVariant userData, QVa void MainWindow::finishUpdateInfo() { - QFutureWatcher>>> *watcher = static_cast>>> *>(sender()); + QFutureWatcher>>> *watcher = static_cast>>> *>(sender()); QString game = watcher->result().first; auto finalMods = watcher->result().second; if (finalMods.empty()) { - log::info(tr("None of your {} mods appear to have had recent file updates.").toStdString(), game); + log::info("{}", tr("None of your %1 mods appear to have had recent file updates.").arg(game)); } std::set> organizedGames; @@ -5553,7 +5553,7 @@ void MainWindow::finishUpdateInfo() } if (!finalMods.empty() && organizedGames.empty()) - log::warn(tr("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests.").toStdString()); + log::warn("{}", tr("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests.")); for (auto game : organizedGames) NexusInterface::instance(&m_PluginContainer)->requestUpdates(game.second, this, QVariant(), game.first, QString()); -- cgit v1.3.1