diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2025-09-26 09:42:45 +0200 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2025-09-26 13:37:54 +0000 |
| commit | fbaba694110356c2e683122598496e6adb4382f6 (patch) | |
| tree | 17eb1ce245d44161f9e99ca3655a555b6a3c16a2 /src/plugins/python/pythoneditor.cpp | |
| parent | d2b0b07e9d0f83cfbd686ffe3385eb09539dec80 (diff) | |
Avoid including multiple Tr classes
lupdate has issues finding the right translation context if there are
both Tr::tr calls that should be resolved via a `namespace <name> {`
scope, and another `using namespace <other>` with a namespace that has
another Tr class.
Many of the cases of this that we have were editor display names that
were defined in the Core plugin for reasons unknown, and which would
better be defined in the corresponding plugin anyway.
For the other cases do not use Tr::tr from a different plugin, but
instead introduce "msg<Something>" functions that do the Tr call plugin-
internally. That is the "correct" way to do it anyway, since shared
strings should be changeable centrally.
Task-number: QTBUG-140548
Change-Id: Idacf62b400f50789b5e5957b690e16aa1ebe5a56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/python/pythoneditor.cpp')
| -rw-r--r-- | src/plugins/python/pythoneditor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/python/pythoneditor.cpp b/src/plugins/python/pythoneditor.cpp index 1e176ebff0e..6b00bfb6541 100644 --- a/src/plugins/python/pythoneditor.cpp +++ b/src/plugins/python/pythoneditor.cpp @@ -15,7 +15,6 @@ #include "pythonutils.h" #include <coreplugin/actionmanager/actionmanager.h> -#include <coreplugin/coreplugintr.h> #include <coreplugin/icore.h> #include <projectexplorer/buildconfiguration.h> @@ -306,7 +305,7 @@ public: PythonEditorFactory() { setId(Constants::C_PYTHONEDITOR_ID); - setDisplayName(::Core::Tr::tr(Constants::C_EDITOR_DISPLAY_NAME)); + setDisplayName(Tr::tr("Python Editor")); addMimeType(Constants::C_PY_MIMETYPE); setOptionalActionMask(OptionalActions::Format |
