diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 0115c232c..1207591b3 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -4220,8 +4220,8 @@ void Session::startUpTorrents() } if (numOfRemappedFiles > 0) { - LogMsg(QString(tr("Queue positions were corrected in %1 resume files")) - .arg(numOfRemappedFiles), Log::CRITICAL); + LogMsg(tr("Queue positions were corrected in %1 resume files").arg(numOfRemappedFiles) + , Log::CRITICAL); } // starting up downloading torrents (queue position > 0) diff --git a/src/base/rss/rss_session.cpp b/src/base/rss/rss_session.cpp index ed8d64959..fb7d52dcc 100644 --- a/src/base/rss/rss_session.cpp +++ b/src/base/rss/rss_session.cpp @@ -296,7 +296,7 @@ void Session::loadFolder(const QJsonObject &jsonObj, Folder *folder) const QJsonObject valObj {val.toObject()}; if (valObj.contains("url")) { if (!valObj["url"].isString()) { - LogMsg(QString("Couldn't load RSS Feed '%1'. URL is required.") + LogMsg(tr("Couldn't load RSS Feed '%1'. URL is required.") .arg(QString("%1\\%2").arg(folder->path(), key)), Log::WARNING); continue; } @@ -305,13 +305,13 @@ void Session::loadFolder(const QJsonObject &jsonObj, Folder *folder) if (valObj.contains("uid")) { uid = QUuid {valObj["uid"].toString()}; if (uid.isNull()) { - LogMsg(QString("Couldn't load RSS Feed '%1'. UID is invalid.") + LogMsg(tr("Couldn't load RSS Feed '%1'. UID is invalid.") .arg(QString("%1\\%2").arg(folder->path(), key)), Log::WARNING); continue; } if (m_feedsByUID.contains(uid)) { - LogMsg(QString("Duplicate RSS Feed UID: %1. Configuration seems to be corrupted.") + LogMsg(tr("Duplicate RSS Feed UID: %1. Configuration seems to be corrupted.") .arg(uid.toString()), Log::WARNING); continue; } @@ -329,7 +329,7 @@ void Session::loadFolder(const QJsonObject &jsonObj, Folder *folder) } } else { - LogMsg(QString("Couldn't load RSS Item '%1'. Invalid data format.") + LogMsg(tr("Couldn't load RSS Item '%1'. Invalid data format.") .arg(QString("%1\\%2").arg(folder->path(), key)), Log::WARNING); } } diff --git a/src/webui/api/apierror.h b/src/webui/api/apierror.h index 2ce43a3ae..e9181ca07 100644 --- a/src/webui/api/apierror.h +++ b/src/webui/api/apierror.h @@ -42,7 +42,7 @@ enum class APIErrorType class APIError : public RuntimeError { public: - explicit APIError(APIErrorType type, const QString &message = ""); + explicit APIError(APIErrorType type, const QString &message = {}); APIErrorType type() const; diff --git a/src/webui/api/searchcontroller.cpp b/src/webui/api/searchcontroller.cpp index 8b9b125df..b157e6f35 100644 --- a/src/webui/api/searchcontroller.cpp +++ b/src/webui/api/searchcontroller.cpp @@ -66,7 +66,7 @@ void SearchController::startAction() requireParams({"pattern", "category", "plugins"}); if (!Utils::ForeignApps::pythonInfo().isValid()) - throw APIError(APIErrorType::Conflict, "Python must be installed to use the Search Engine."); + throw APIError(APIErrorType::Conflict, tr("Python must be installed to use the Search Engine.")); const QString pattern = params()["pattern"].trimmed(); const QString category = params()["category"].trimmed(); @@ -89,7 +89,7 @@ void SearchController::startAction() ISession *const session = sessionManager()->session(); auto activeSearches = session->getData>(ACTIVE_SEARCHES); if (activeSearches.size() >= MAX_CONCURRENT_SEARCHES) - throw APIError(APIErrorType::Conflict, QString("Unable to create more than %1 concurrent searches.").arg(MAX_CONCURRENT_SEARCHES)); + throw APIError(APIErrorType::Conflict, tr("Unable to create more than %1 concurrent searches.").arg(MAX_CONCURRENT_SEARCHES)); const auto id = generateSearchId(); const SearchHandlerPtr searchHandler {SearchPluginManager::instance()->startSearch(pattern, category, pluginsToUse)};