From 874683a15eb01e12e0f51001a31fe4a1c1fbf294 Mon Sep 17 00:00:00 2001 From: Sergey Belyashov Date: Thu, 10 Nov 2016 17:57:53 +0300 Subject: [PATCH] Fix lacks of Q_OBJECT macro Change-Id: I0de19ed983c45260c957ea88422093bf7faca6a1 Reviewed-by: Eike Ziller Reviewed-by: Ulf Hermann --- src/plugins/projectexplorer/projectwindow.cpp | 4 +- .../plugin_interface/actionhandler.cpp | 46 +++++++++---------- .../plugin_interface/initialwarningitem.h | 1 + .../plugin_interface/scattributeitemmodel.h | 1 + .../plugin_interface/scshapeprovider.h | 1 + .../scxmleditor/plugin_interface/scxmltag.h | 1 + src/plugins/scxmleditor/scxmleditordata.h | 1 + 7 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 5efa9686ff3..328f2591904 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -467,9 +467,9 @@ public: if (!menu.actions().isEmpty()) menu.addSeparator(); - QAction *importBuild = menu.addAction(tr("Import Existing Build...")); + QAction *importBuild = menu.addAction(ProjectWindow::tr("Import Existing Build...")); importBuild->setEnabled(projectImporter != 0); - QAction *manageKits = menu.addAction(tr("Manage Kits...")); + QAction *manageKits = menu.addAction(ProjectWindow::tr("Manage Kits...")); QAction *act = menu.exec(m_selectorTree->mapToGlobal(pos)); diff --git a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp index e8067fd0165..85265cbabea 100644 --- a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp +++ b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp @@ -35,8 +35,6 @@ using namespace ScxmlEditor::PluginInterface; ActionHandler::ActionHandler(QObject *parent) : QObject(parent) { - using AH = ActionHandler; - const struct { const Utils::Icon icon; QString name; @@ -44,32 +42,32 @@ ActionHandler::ActionHandler(QObject *parent) const char *keyseq; bool checkable; } actionInfos[] = { - { Utils::Icons::ZOOMIN_TOOLBAR, AH::tr("Zoom In"), AH::tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false }, - { Utils::Icons::ZOOMOUT_TOOLBAR, AH::tr("Zoom Out"), AH::tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false }, - { Utils::Icons::FITTOVIEW_TOOLBAR, AH::tr("Fit to View"), AH::tr("Fit to View (F11)"), "F11", false }, - { Utils::Icon({{":/scxmleditor/images/icon-pan.png", Utils::Theme::IconsBaseColor}}), AH::tr("Panning"), AH::tr("Panning (Shift)"), "Shift", true }, + { Utils::Icons::ZOOMIN_TOOLBAR, tr("Zoom In"), tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false }, + { Utils::Icons::ZOOMOUT_TOOLBAR, tr("Zoom Out"), tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false }, + { Utils::Icons::FITTOVIEW_TOOLBAR, tr("Fit to View"), tr("Fit to View (F11)"), "F11", false }, + { Utils::Icon({{":/scxmleditor/images/icon-pan.png", Utils::Theme::IconsBaseColor}}), tr("Panning"), tr("Panning (Shift)"), "Shift", true }, - { Utils::Icons::ZOOM_TOOLBAR, AH::tr("Magnifier"), AH::tr("Magnifier Tool (Alt)"), "Alt", true }, - { Utils::Icon(":/scxmleditor/images/navigator.png"), AH::tr("Navigator"), AH::tr("Navigator (Ctrl+E)"), "Ctrl+E", true }, + { Utils::Icons::ZOOM_TOOLBAR, tr("Magnifier"), tr("Magnifier Tool (Alt)"), "Alt", true }, + { Utils::Icon(":/scxmleditor/images/navigator.png"), tr("Navigator"), tr("Navigator (Ctrl+E)"), "Ctrl+E", true }, - { Utils::Icon({{":/utils/images/editcopy.png", Utils::Theme::IconsBaseColor}}), AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false }, - { Utils::Icon({{":/utils/images/editcut.png", Utils::Theme::IconsBaseColor}}), AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false }, - { Utils::Icon({{":/utils/images/editpaste.png", Utils::Theme::IconsBaseColor}}), AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false }, - { Utils::Icons::SNAPSHOT_TOOLBAR, AH::tr("Screenshot"), AH::tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false }, - { Utils::Icon({{":/scxmleditor/images/icon-export-canvas.png", Utils::Theme::IconsBaseColor}}), AH::tr("Export to Image"), AH::tr("Export to Image"), "Ctrl+Shift+E", false }, - { Utils::Icon({{":/utils/images/namespace.png", Utils::Theme::IconsBaseColor}}), AH::tr("Toggle Full Namespace"), AH::tr("Toggle Full Namespace"), "Ctrl+Shift+N", true }, + { Utils::Icon({{":/utils/images/editcopy.png", Utils::Theme::IconsBaseColor}}), tr("Copy"), tr("Copy (Ctrl + C)"), "Ctrl+C", false }, + { Utils::Icon({{":/utils/images/editcut.png", Utils::Theme::IconsBaseColor}}), tr("Cut"), tr("Cut (Ctrl + X)"), "Ctrl+X", false }, + { Utils::Icon({{":/utils/images/editpaste.png", Utils::Theme::IconsBaseColor}}), tr("Paste"), tr("Paste (Ctrl + V)"), "Ctrl+V", false }, + { Utils::Icons::SNAPSHOT_TOOLBAR, tr("Screenshot"), tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false }, + { Utils::Icon({{":/scxmleditor/images/icon-export-canvas.png", Utils::Theme::IconsBaseColor}}), tr("Export to Image"), tr("Export to Image"), "Ctrl+Shift+E", false }, + { Utils::Icon({{":/utils/images/namespace.png", Utils::Theme::IconsBaseColor}}), tr("Toggle Full Namespace"), tr("Toggle Full Namespace"), "Ctrl+Shift+N", true }, - { Utils::Icon({{":/scxmleditor/images/align_left.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Left"), AH::tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false }, - { Utils::Icon({{":/scxmleditor/images/align_right.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Right"), AH::tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false }, - { Utils::Icon({{":/scxmleditor/images/align_top.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Top"), AH::tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false }, - { Utils::Icon({{":/scxmleditor/images/align_bottom.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Bottom"), AH::tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false }, - { Utils::Icon({{":/scxmleditor/images/align_horizontal.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Horizontal"), AH::tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false }, - { Utils::Icon({{":/scxmleditor/images/align_vertical.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Align Vertical"), AH::tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false }, - { Utils::Icon({{":/scxmleditor/images/adjust_width.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Adjust Width"), AH::tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false }, - { Utils::Icon({{":/scxmleditor/images/adjust_height.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Adjust Height"), AH::tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false }, - { Utils::Icon({{":/scxmleditor/images/adjust_size.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), AH::tr("Adjust Size"), AH::tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false }, + { Utils::Icon({{":/scxmleditor/images/align_left.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Left"), tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false }, + { Utils::Icon({{":/scxmleditor/images/align_right.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Right"), tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false }, + { Utils::Icon({{":/scxmleditor/images/align_top.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Top"), tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false }, + { Utils::Icon({{":/scxmleditor/images/align_bottom.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Bottom"), tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false }, + { Utils::Icon({{":/scxmleditor/images/align_horizontal.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Horizontal"), tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false }, + { Utils::Icon({{":/scxmleditor/images/align_vertical.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Align Vertical"), tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false }, + { Utils::Icon({{":/scxmleditor/images/adjust_width.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Adjust Width"), tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false }, + { Utils::Icon({{":/scxmleditor/images/adjust_height.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Adjust Height"), tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false }, + { Utils::Icon({{":/scxmleditor/images/adjust_size.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint), tr("Adjust Size"), tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false }, - { Utils::Icon(":/scxmleditor/images/statistics.png"), AH::tr("Show Statistics..."), AH::tr("Show Statistics"), "", false } + { Utils::Icon(":/scxmleditor/images/statistics.png"), tr("Show Statistics..."), tr("Show Statistics"), "", false } }; // Init actions diff --git a/src/plugins/scxmleditor/plugin_interface/initialwarningitem.h b/src/plugins/scxmleditor/plugin_interface/initialwarningitem.h index 762bb477028..b3f12aa6645 100644 --- a/src/plugins/scxmleditor/plugin_interface/initialwarningitem.h +++ b/src/plugins/scxmleditor/plugin_interface/initialwarningitem.h @@ -35,6 +35,7 @@ class InitialStateItem; class InitialWarningItem : public WarningItem { + Q_OBJECT public: InitialWarningItem(InitialStateItem *parent = nullptr); diff --git a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.h b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.h index 8fbfdf6637d..6a177495208 100644 --- a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.h +++ b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.h @@ -33,6 +33,7 @@ namespace PluginInterface { class SCAttributeItemModel : public AttributeItemModel { + Q_OBJECT public: SCAttributeItemModel(QObject *parent = nullptr); diff --git a/src/plugins/scxmleditor/plugin_interface/scshapeprovider.h b/src/plugins/scxmleditor/plugin_interface/scshapeprovider.h index f4093b5a762..f3a97842687 100644 --- a/src/plugins/scxmleditor/plugin_interface/scshapeprovider.h +++ b/src/plugins/scxmleditor/plugin_interface/scshapeprovider.h @@ -37,6 +37,7 @@ class ScxmlTag; class SCShapeProvider : public ShapeProvider { + Q_OBJECT public: SCShapeProvider(QObject *parent = nullptr); ~SCShapeProvider() override; diff --git a/src/plugins/scxmleditor/plugin_interface/scxmltag.h b/src/plugins/scxmleditor/plugin_interface/scxmltag.h index 7228357fb2a..3031c9b4658 100644 --- a/src/plugins/scxmleditor/plugin_interface/scxmltag.h +++ b/src/plugins/scxmleditor/plugin_interface/scxmltag.h @@ -50,6 +50,7 @@ class ScxmlDocument; */ class ScxmlTag : public QObject { + Q_OBJECT public: ScxmlTag(TagType type, ScxmlDocument *document = nullptr); ScxmlTag(const QString &prefix, const QString &name, ScxmlDocument *document = nullptr); diff --git a/src/plugins/scxmleditor/scxmleditordata.h b/src/plugins/scxmleditor/scxmleditordata.h index 527659fbbb2..785e927531d 100644 --- a/src/plugins/scxmleditor/scxmleditordata.h +++ b/src/plugins/scxmleditor/scxmleditordata.h @@ -44,6 +44,7 @@ class ScxmlContext; class ScxmlEditorData : public QObject { + Q_OBJECT public: ScxmlEditorData(QObject *parent = nullptr); ~ScxmlEditorData();