summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-02-11 17:51:59 +0100
committerhjk <hjk@qt.io>2020-02-13 12:38:35 +0000
commitafd8bc2c9e81ff437e47726f2be49692ef38bf29 (patch)
tree2ef6a8e8cc8a2973f501bad34c3a2b51f0d096f8
parentff7047edb0001eb1536cd54a0c3a9f1d4153a794 (diff)
downloadqt-creator-afd8bc2c9e81ff437e47726f2be49692ef38bf29.tar.gz
De-Q_OBJECT-ify various IEditorFactory derived classes
Change-Id: I1470b06d4e10073bb6e4f7ae735f9829fab3bb7b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/android/javaeditor.cpp2
-rw-r--r--src/plugins/android/javaeditor.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditor.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditor.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectconstants.h1
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp2
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h2
-rw-r--r--src/plugins/glsleditor/glsleditor.h2
-rw-r--r--src/plugins/nim/editor/nimeditorfactory.cpp2
-rw-r--r--src/plugins/nim/editor/nimeditorfactory.h6
-rw-r--r--src/plugins/nim/nimconstants.h1
-rw-r--r--src/plugins/qmakeprojectmanager/profileeditor.h2
-rw-r--r--src/plugins/qmljseditor/qmljseditor.h2
-rw-r--r--src/plugins/texteditor/plaintexteditorfactory.h2
-rw-r--r--src/plugins/texteditor/texteditor.h1
15 files changed, 6 insertions, 25 deletions
diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp
index 85ea22442b..b280977c89 100644
--- a/src/plugins/android/javaeditor.cpp
+++ b/src/plugins/android/javaeditor.cpp
@@ -68,7 +68,7 @@ JavaEditorFactory::JavaEditorFactory()
"transient", "try", "void", "volatile", "while"
};
setId(Constants::JAVA_EDITOR_ID);
- setDisplayName(tr("Java Editor"));
+ setDisplayName(QCoreApplication::translate("OpenWith::Editors", "Java Editor"));
addMimeType(Constants::JAVA_MIMETYPE);
setDocumentCreator(createJavaDocument);
diff --git a/src/plugins/android/javaeditor.h b/src/plugins/android/javaeditor.h
index c442484daf..23a3e00b7c 100644
--- a/src/plugins/android/javaeditor.h
+++ b/src/plugins/android/javaeditor.h
@@ -32,8 +32,6 @@ namespace Internal {
class JavaEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
JavaEditorFactory();
};
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
index b4d7fdc432..7ec99a5254 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
@@ -223,7 +223,7 @@ static TextDocument *createCMakeDocument()
CMakeEditorFactory::CMakeEditorFactory()
{
setId(Constants::CMAKE_EDITOR_ID);
- setDisplayName(tr(Constants::CMAKE_EDITOR_DISPLAY_NAME));
+ setDisplayName(QCoreApplication::translate("OpenWith::Editors", "CMake Editor"));
addMimeType(Constants::CMAKEMIMETYPE);
addMimeType(Constants::CMAKEPROJECTMIMETYPE);
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.h b/src/plugins/cmakeprojectmanager/cmakeeditor.h
index 91123792a5..2eab78ed83 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.h
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.h
@@ -45,8 +45,6 @@ public:
class CMakeEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
CMakeEditorFactory();
};
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h
index 8714f04111..acd66a7bac 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h
@@ -33,7 +33,6 @@ namespace Constants {
const char CMAKEMIMETYPE[] = "text/x-cmake";
const char CMAKEPROJECTMIMETYPE[] = "text/x-cmake-project";
const char CMAKE_EDITOR_ID[] = "CMakeProject.CMakeEditor";
-const char CMAKE_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("CMakeProjectManager::Internal::CMakeEditorFactory", "CMake Editor");
const char RUNCMAKE[] = "CMakeProject.RunCMake";
const char CLEARCMAKECACHE[] = "CMakeProject.ClearCache";
const char RESCANPROJECT[] = "CMakeProject.RescanProject";
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
index 41bd6c4c24..1f60fd0fe3 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
@@ -510,7 +510,7 @@ static TextEditor::TextDocument *createCompilationDatabaseDocument()
CompilationDatabaseEditorFactory::CompilationDatabaseEditorFactory()
{
setId(Constants::COMPILATIONDATABASEPROJECT_ID);
- setDisplayName("Compilation Database");
+ setDisplayName(QCoreApplication::translate("OpenWith::Editors", "Compilation Database"));
addMimeType(Constants::COMPILATIONDATABASEMIMETYPE);
setEditorCreator([]() { return new TextEditor::BaseTextEditor; });
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
index f2aa9e6dbd..40ed930366 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
@@ -88,8 +88,6 @@ public:
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
CompilationDatabaseEditorFactory();
};
diff --git a/src/plugins/glsleditor/glsleditor.h b/src/plugins/glsleditor/glsleditor.h
index 99411bfe8b..95bf9a1a91 100644
--- a/src/plugins/glsleditor/glsleditor.h
+++ b/src/plugins/glsleditor/glsleditor.h
@@ -34,8 +34,6 @@ int languageVariant(const QString &mimeType);
class GlslEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
GlslEditorFactory();
};
diff --git a/src/plugins/nim/editor/nimeditorfactory.cpp b/src/plugins/nim/editor/nimeditorfactory.cpp
index 51d6c22f4b..513a5d7969 100644
--- a/src/plugins/nim/editor/nimeditorfactory.cpp
+++ b/src/plugins/nim/editor/nimeditorfactory.cpp
@@ -45,7 +45,7 @@ namespace Nim {
NimEditorFactory::NimEditorFactory()
{
setId(Constants::C_NIMEDITOR_ID);
- setDisplayName(tr(Nim::Constants::C_EDITOR_DISPLAY_NAME));
+ setDisplayName(QCoreApplication::translate("OpenWith::Editors", "Nim Editor"));
addMimeType(QLatin1String(Nim::Constants::C_NIM_MIMETYPE));
addMimeType(QLatin1String(Nim::Constants::C_NIM_SCRIPT_MIMETYPE));
diff --git a/src/plugins/nim/editor/nimeditorfactory.h b/src/plugins/nim/editor/nimeditorfactory.h
index ac60a3593d..30ccbc1542 100644
--- a/src/plugins/nim/editor/nimeditorfactory.h
+++ b/src/plugins/nim/editor/nimeditorfactory.h
@@ -29,14 +29,12 @@
namespace Nim {
-class NimEditorFactory : public TextEditor::TextEditorFactory
+class NimEditorFactory final : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
NimEditorFactory();
static void decorateEditor(TextEditor::TextEditorWidget *editor);
};
-}
+} // Nim
diff --git a/src/plugins/nim/nimconstants.h b/src/plugins/nim/nimconstants.h
index a8c3863ca8..c6b6dbe023 100644
--- a/src/plugins/nim/nimconstants.h
+++ b/src/plugins/nim/nimconstants.h
@@ -34,7 +34,6 @@ namespace Constants {
const char C_NIMPROJECT_ID[] = "Nim.NimProject";
const char C_NIMBLEPROJECT_ID[] = "Nim.NimbleProject";
const char C_NIMEDITOR_ID[] = "Nim.NimEditor";
-const char C_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "Nim Editor");
// NimToolChain
const char C_NIMTOOLCHAIN_TYPEID[] = "Nim.NimToolChain";
diff --git a/src/plugins/qmakeprojectmanager/profileeditor.h b/src/plugins/qmakeprojectmanager/profileeditor.h
index 048a0f0b13..e469c70756 100644
--- a/src/plugins/qmakeprojectmanager/profileeditor.h
+++ b/src/plugins/qmakeprojectmanager/profileeditor.h
@@ -32,8 +32,6 @@ namespace Internal {
class ProFileEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
ProFileEditorFactory();
};
diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h
index e0a68b9a02..2e160527f0 100644
--- a/src/plugins/qmljseditor/qmljseditor.h
+++ b/src/plugins/qmljseditor/qmljseditor.h
@@ -142,8 +142,6 @@ public:
class QMLJSEDITOR_EXPORT QmlJSEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
QmlJSEditorFactory();
QmlJSEditorFactory(Core::Id id);
diff --git a/src/plugins/texteditor/plaintexteditorfactory.h b/src/plugins/texteditor/plaintexteditorfactory.h
index 38b0194895..40f637b856 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.h
+++ b/src/plugins/texteditor/plaintexteditorfactory.h
@@ -31,8 +31,6 @@ namespace TextEditor {
class TEXTEDITOR_EXPORT PlainTextEditorFactory : public TextEditor::TextEditorFactory
{
- Q_OBJECT
-
public:
PlainTextEditorFactory();
static PlainTextEditorFactory *instance();
diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h
index 403d2f2b6f..9421fc2cf5 100644
--- a/src/plugins/texteditor/texteditor.h
+++ b/src/plugins/texteditor/texteditor.h
@@ -634,7 +634,6 @@ private:
class TEXTEDITOR_EXPORT TextEditorFactory : public Core::IEditorFactory
{
- Q_OBJECT
public:
TextEditorFactory();