From a7566d90923a93e2c8d963c42576c82db5e11383 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Wed, 11 Mar 2009 15:44:58 +0100
Subject: [PATCH] Fixes: Add a "About Qt Designer Plugin" option to the tools
 menu showing the Qt Designer plugin dialog (4.5.1).

---
 src/plugins/designer/formeditorw.cpp | 18 +++++++++++++++++-
 src/plugins/designer/formeditorw.h   |  1 +
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index b3f6ffc70e6..103d635168a 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -173,7 +173,10 @@ FormEditorW::FormEditorW() :
     m_core(Core::ICore::instance()),
     m_initStage(RegisterPlugins),
     m_actionGroupEditMode(0),
-    m_actionPrint(0)
+    m_actionPrint(0),
+    m_actionPreview(0),
+    m_actionGroupPreviewInStyle(0),
+    m_actionAboutPlugins(0)
 {
     if (Designer::Constants::Internal::debug)
         qDebug() << Q_FUNC_INFO;
@@ -250,10 +253,14 @@ void FormEditorW::fullInit()
         }
     }
 
+    if (m_actionAboutPlugins)
+        m_actionAboutPlugins->setEnabled(true);
+
     if (Designer::Constants::Internal::debug) {
         qDebug() << Q_FUNC_INFO << initTime->elapsed() << "ms";
         delete initTime;
     }
+
     m_initStage = FullyInitialized;
 }
 
@@ -439,6 +446,15 @@ void FormEditorW::setupActions()
     QAction *actionFormSettings = m_fwm->actionShowFormWindowSettingsDialog();
     addToolAction(actionFormSettings, am, globalcontext, QLatin1String("FormEditor.FormSettings"), mformtools);
 
+#if QT_VERSION > 0x040500
+    createSeparator(this, am, globalcontext, mformtools, QLatin1String("FormEditor.Menu.Tools.Separator4"));
+    m_actionAboutPlugins = new QAction(tr("About Qt Designer plugins...."), this);
+    addToolAction(m_actionAboutPlugins,  am,  globalcontext,
+                   QLatin1String("FormEditor.AboutPlugins"), mformtools);
+    connect(m_actionAboutPlugins,  SIGNAL(triggered()), m_fwm, SLOT(aboutPlugins()));
+    m_actionAboutPlugins->setEnabled(false);
+#endif
+
     // FWM
     connect(m_fwm, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface *)), this, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface *)));
 }
diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h
index bdddf3ae373..d4a94794eef 100644
--- a/src/plugins/designer/formeditorw.h
+++ b/src/plugins/designer/formeditorw.h
@@ -157,6 +157,7 @@ private:
     QAction *m_actionPrint;
     QAction *m_actionPreview;
     QActionGroup *m_actionGroupPreviewInStyle;
+    QAction *m_actionAboutPlugins;
 
     QList<int> m_context;
 
-- 
GitLab