forked from qt-creator/qt-creator
Fix lupdate issues
- missing Q_DECLARE_TR_FUNCTIONS - some full qualifications needed for confused lupdate - avoid breaking some translations from former TaskListPlugin, VcsCommand and highlighter settings refactoring Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QToolButton>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -44,6 +45,7 @@ public:
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT DetailsButton : public ExpandButton
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Utils::DetailsButton);
|
||||
public:
|
||||
DetailsButton(QWidget *parent = nullptr);
|
||||
QSize sizeHint() const override;
|
||||
|
||||
@@ -161,7 +161,8 @@ private:
|
||||
QAction *m_clear = nullptr;
|
||||
QAction *m_expandCollapse = nullptr;
|
||||
|
||||
Utils::Perspective m_perspective{ClangTidyClazyPerspectiveId, tr("Clang-Tidy and Clazy")};
|
||||
Utils::Perspective m_perspective{ClangTidyClazyPerspectiveId,
|
||||
::ClangTools::Internal::ClangTool::tr("Clang-Tidy and Clazy")};
|
||||
|
||||
private:
|
||||
const QString m_name;
|
||||
|
||||
@@ -39,7 +39,8 @@ public:
|
||||
CppcheckOptionsPage options;
|
||||
DiagnosticsModel manualRunModel;
|
||||
CppcheckTool manualRunTool;
|
||||
Utils::Perspective perspective{Constants::PERSPECTIVE_ID, CppcheckPlugin::tr("Cppcheck")};
|
||||
Utils::Perspective perspective{Constants::PERSPECTIVE_ID,
|
||||
::Cppcheck::Internal::CppcheckPlugin::tr("Cppcheck")};
|
||||
QAction *manualRunAction;
|
||||
|
||||
void startManualRun();
|
||||
|
||||
@@ -46,7 +46,7 @@ private:
|
||||
void toggleThreadRestriction(QAction *action);
|
||||
|
||||
Utils::Perspective m_perspective{Constants::CtfVisualizerPerspectiveId,
|
||||
Tr::tr("Chrome Trace Format Visualizer")};
|
||||
::CtfVisualizer::Tr::tr("Chrome Trace Format Visualizer")};
|
||||
|
||||
bool m_isLoading;
|
||||
QScopedPointer<QAction> m_loadJson;
|
||||
|
||||
@@ -14,7 +14,8 @@ class MesonActionsManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Utils::ParameterAction buildTargetContextAction{
|
||||
Tr::tr("Build"), Tr::tr("Build \"%1\""),
|
||||
::MesonProjectManager::Tr::tr("Build"),
|
||||
::MesonProjectManager::Tr::tr("Build \"%1\""),
|
||||
Utils::ParameterAction::AlwaysEnabled /*handled manually*/
|
||||
};
|
||||
QAction configureActionMenu;
|
||||
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
void finalize();
|
||||
|
||||
Utils::Perspective m_perspective{Constants::PerfProfilerPerspectiveId,
|
||||
Tr::tr("Performance Analyzer")};
|
||||
::PerfProfiler::Tr::tr("Performance Analyzer")};
|
||||
|
||||
QAction *m_startAction = nullptr;
|
||||
QAction *m_stopAction = nullptr;
|
||||
|
||||
@@ -2239,7 +2239,7 @@ void ProjectExplorerPlugin::extensionsInitialized()
|
||||
BuildManager::extensionsInitialized();
|
||||
TaskHub::addCategory(Constants::TASK_CATEGORY_SANITIZER,
|
||||
tr("Sanitizer", "Category for sanitizer issues listed under 'Issues'"));
|
||||
TaskHub::addCategory(Constants::TASK_CATEGORY_TASKLIST_ID, tr("My Tasks"));
|
||||
TaskHub::addCategory(Constants::TASK_CATEGORY_TASKLIST_ID, TaskFile::tr("My Tasks"));
|
||||
|
||||
SshSettings::loadSettings(Core::ICore::settings());
|
||||
const auto searchPathRetriever = [] {
|
||||
|
||||
@@ -104,8 +104,8 @@ static bool parseTaskFile(QString *errorString, const FilePath &name)
|
||||
{
|
||||
QFile tf(name.toString());
|
||||
if (!tf.open(QIODevice::ReadOnly)) {
|
||||
*errorString = ProjectExplorerPlugin::tr("Cannot open task file %1: %2").arg(
|
||||
name.toUserOutput(), tf.errorString());
|
||||
*errorString = TaskFile::tr("Cannot open task file %1: %2")
|
||||
.arg(name.toUserOutput(), tf.errorString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
|
||||
class TaskFile : public Core::IDocument
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(TaskList::Internal::TaskListPlugin)
|
||||
public:
|
||||
TaskFile(QObject *parent);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace Internal {
|
||||
|
||||
class HighlighterSettingsPageWidget : public QWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(TextEditor::Internal::HighlighterSettingsPage)
|
||||
public:
|
||||
QLabel *definitionsInfolabel;
|
||||
QPushButton *downloadDefinitions;
|
||||
|
||||
@@ -94,13 +94,13 @@ QString VcsCommandPrivate::displayName() const
|
||||
if (!m_displayName.isEmpty())
|
||||
return m_displayName;
|
||||
if (m_jobs.isEmpty())
|
||||
return tr("Unknown");
|
||||
return VcsCommand::tr("UNKNOWN");
|
||||
const Job &job = m_jobs.at(0);
|
||||
QString result = job.command.executable().baseName();
|
||||
if (!result.isEmpty())
|
||||
result[0] = result.at(0).toTitleCase();
|
||||
else
|
||||
result = tr("UNKNOWN");
|
||||
result = VcsCommand::tr("UNKNOWN");
|
||||
if (!job.command.arguments().isEmpty())
|
||||
result += ' ' + job.command.splitArguments().at(0);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user