diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2020-09-09 13:21:56 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2020-09-09 13:33:36 -0500 |
| commit | d30d966500525cfe3137044c97db024230aac802 (patch) | |
| tree | 2816c977ecb2a4e992c69d250060753900b47383 /src | |
| parent | 10234e436ad28596fb36dc77440422cd49366b56 (diff) | |
Standardizing
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 18 | ||||
| -rw-r--r-- | src/modinfo.cpp | 2 |
2 files changed, 10 insertions, 10 deletions
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<QString, int> 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<QPair<QString, std::set<QSharedPointer<ModInfo>>>> *watcher = new QFutureWatcher<QPair<QString, std::set<QSharedPointer<ModInfo>>>>(); - QObject::connect(watcher, &QFutureWatcher<QPair<QString, std::set<QSharedPointer<ModInfo>>>>::finished, this, &MainWindow::finishUpdateInfo); - QFuture<QPair<QString, std::set<QSharedPointer<ModInfo>>>> future = QtConcurrent::run([=]() -> QPair<QString, std::set<QSharedPointer<ModInfo>>> { - return qMakePair(gameNameReal, ModInfo::filteredMods(gameNameReal, resultList, userData.toBool(), true)); + QFutureWatcher<std::pair<QString, std::set<QSharedPointer<ModInfo>>>> *watcher = new QFutureWatcher<std::pair<QString, std::set<QSharedPointer<ModInfo>>>>(); + QObject::connect(watcher, &QFutureWatcher<std::set<QSharedPointer<ModInfo>>>::finished, this, &MainWindow::finishUpdateInfo); + QFuture<std::pair<QString, std::set<QSharedPointer<ModInfo>>>> future = QtConcurrent::run([=]() -> std::pair<QString, std::set<QSharedPointer<ModInfo>>> { + 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<QPair<QString, std::set<QSharedPointer<ModInfo>>>> *watcher = static_cast<QFutureWatcher<QPair<QString, std::set<QSharedPointer<ModInfo>>>> *>(sender()); + QFutureWatcher<std::pair<QString, std::set<QSharedPointer<ModInfo>>>> *watcher = static_cast<QFutureWatcher<std::pair<QString, std::set<QSharedPointer<ModInfo>>>> *>(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<std::pair<QString, int>> 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()); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 37ac0827..b79ed657 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -323,7 +323,7 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei } } if (gamePlugin != nullptr && gamePlugin->gameNexusName().isEmpty()) { - log::warn(tr("The update check has found a mod with a Nexus ID and source game of {}, but this game is not a valid Nexus source.").toStdString(), gamePlugin->gameName()); + log::warn("{}", tr("The update check has found a mod with a Nexus ID and source game of %1, but this game is not a valid Nexus source.").arg(gamePlugin->gameName())); itr = games.erase(itr); } } |
