diff options
author | hjk <hjk@qt.io> | 2023-01-09 18:08:30 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-01-10 10:20:03 +0000 |
commit | 0a0dd9ea31d03fcc57f51de724c32e8ca3fe3d3f (patch) | |
tree | 0638e4eac110678c2d134d4e78aef5974e4f87bc /src/plugins/cppcheck/cppchecktool.cpp | |
parent | 677fd6ba9a91add241447a067c65f46c61b2af94 (diff) | |
download | qt-creator-0a0dd9ea31d03fcc57f51de724c32e8ca3fe3d3f.tar.gz |
CppCheck: Tr::tr and code cosmetics
Change-Id: I5e6583984f7dc94e998df3c20840f2ba2e801ab8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/cppcheck/cppchecktool.cpp')
-rw-r--r-- | src/plugins/cppcheck/cppchecktool.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp index 252fbb30e1..0fb628b7ad 100644 --- a/src/plugins/cppcheck/cppchecktool.cpp +++ b/src/plugins/cppcheck/cppchecktool.cpp @@ -1,11 +1,13 @@ // Copyright (C) 2018 Sergey Morozov // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +#include "cppchecktool.h" + #include "cppcheckdiagnostic.h" #include "cppcheckoptions.h" #include "cppcheckrunner.h" #include "cppchecktextmarkmanager.h" -#include "cppchecktool.h" +#include "cppchecktr.h" #include <coreplugin/messagemanager.h> #include <coreplugin/progressmanager/futureprogress.h> @@ -20,8 +22,7 @@ #include <QThread> -namespace Cppcheck { -namespace Internal { +namespace Cppcheck::Internal { CppcheckTool::CppcheckTool(CppcheckDiagnosticManager &manager, const Utils::Id &progressId) : @@ -226,13 +227,13 @@ void CppcheckTool::stop(const Utils::FilePaths &files) void CppcheckTool::startParsing() { if (m_options.showOutput) { - const QString message = tr("Cppcheck started: \"%1\".").arg(m_runner->currentCommand()); + const QString message = Tr::tr("Cppcheck started: \"%1\".").arg(m_runner->currentCommand()); Core::MessageManager::writeSilently(message); } m_progress = std::make_unique<QFutureInterface<void>>(); const Core::FutureProgress *progress = Core::ProgressManager::addTask( - m_progress->future(), QObject::tr("Cppcheck"), m_progressId); + m_progress->future(), Tr::tr("Cppcheck"), m_progressId); QObject::connect(progress, &Core::FutureProgress::canceled, this, [this]{stop({});}); m_progress->setProgressRange(0, 100); @@ -301,11 +302,10 @@ void CppcheckTool::parseErrorLine(const QString &line) void CppcheckTool::finishParsing() { if (m_options.showOutput) - Core::MessageManager::writeSilently(tr("Cppcheck finished.")); + Core::MessageManager::writeSilently(Tr::tr("Cppcheck finished.")); QTC_ASSERT(m_progress, return); m_progress->reportFinished(); } -} // namespace Internal -} // namespace Cppcheck +} // Cppcheck::Internal |