summaryrefslogtreecommitdiff
path: root/src/nexusinterface.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-07-19 02:47:13 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-07-22 07:36:38 -0400
commite071dfdfaa369a475a2d93df623c1696feee56ba (patch)
tree4e3f1714558f6ac46f010b1cae561a96c1195c03 /src/nexusinterface.cpp
parentaae6d6a5aa8d6b101fcc38388222a8a6e7ee2ec6 (diff)
changed qCritical() to log::error()
removed now unused vlog()
Diffstat (limited to 'src/nexusinterface.cpp')
-rw-r--r--src/nexusinterface.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 008f3c0d..c797aed6 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -41,12 +41,11 @@ using namespace MOShared;
void throttledWarning(const APIUserAccount& user)
{
- qCritical() <<
- QString(
- "You have fewer than %1 requests remaining (%2). Only downloads and "
- "login validation are being allowed.")
- .arg(APIUserAccount::ThrottleThreshold)
- .arg(user.remainingRequests());
+ log::error(
+ "You have fewer than {} requests remaining ({}). Only downloads and "
+ "login validation are being allowed.",
+ APIUserAccount::ThrottleThreshold,
+ user.remainingRequests());
}
@@ -344,7 +343,7 @@ QString NexusInterface::getGameURL(QString gameName) const
if (game != nullptr) {
return "https://www.nexusmods.com/" + game->gameNexusName().toLower();
} else {
- qCritical("getGameURL can't find plugin for %s", qUtf8Printable(gameName));
+ log::error("getGameURL can't find plugin for {}", gameName);
return "";
}
}
@@ -355,7 +354,7 @@ QString NexusInterface::getOldModsURL(QString gameName) const
if (game != nullptr) {
return "https://" + game->gameNexusName().toLower() + ".nexusmods.com/mods";
} else {
- qCritical("getOldModsURL can't find plugin for %s", qUtf8Printable(gameName));
+ log::error("getOldModsURL can't find plugin for {}", gameName);
return "";
}
}
@@ -464,7 +463,7 @@ int NexusInterface::requestUpdates(const int &modID, QObject *receiver, QVariant
IPluginGame *game = getGame(gameName);
if (game == nullptr) {
- qCritical("requestUpdates can't find plugin for %s", qUtf8Printable(gameName));
+ log::error("requestUpdates can't find plugin for {}", gameName);
return -1;
}
@@ -521,7 +520,7 @@ int NexusInterface::requestFileInfo(QString gameName, int modID, int fileID, QOb
{
IPluginGame *gamePlugin = getGame(gameName);
if (gamePlugin == nullptr) {
- qCritical("requestFileInfo can't find plugin for %s", qUtf8Printable(gameName));
+ log::error("requestFileInfo can't find plugin for {}", gameName);
return -1;
}
@@ -687,7 +686,7 @@ void NexusInterface::nextRequest()
} else if (getAccessManager()->validateWaiting()) {
return;
} else {
- qCritical() << tr("You must authorize MO2 in Settings -> Nexus to use the Nexus API.");
+ log::error("{}", tr("You must authorize MO2 in Settings -> Nexus to use the Nexus API."));
}
}
@@ -949,10 +948,9 @@ void NexusInterface::requestError(QNetworkReply::NetworkError)
return;
}
- qCritical("request (%s) error: %s (%d)",
- qUtf8Printable(reply->url().toString()),
- qUtf8Printable(reply->errorString()),
- reply->error());
+ log::error(
+ "request ({}) error: {} ({})",
+ reply->url().toString(), reply->errorString(), reply->error());
}