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:
Eike Ziller
2022-10-14 14:52:54 +02:00
parent ec430787e5
commit 8db0d3b0ff
11 changed files with 17 additions and 10 deletions

View File

@@ -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 = [] {

View File

@@ -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;
}

View File

@@ -20,6 +20,7 @@ public:
class TaskFile : public Core::IDocument
{
Q_DECLARE_TR_FUNCTIONS(TaskList::Internal::TaskListPlugin)
public:
TaskFile(QObject *parent);