From 9c9b38e92a08e2f6f15199157b7d60cf3dbc75fc Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Tue, 12 May 2009 13:47:49 +0200
Subject: [PATCH] Export FormWindowEditor from the designer plugin.

The Qt4ProjectManagerPlugin needs that for the dynamic ui completion.

Reviewed-By: Friedemann Kleint <Friedemann.Kleint@nokia.com>
---
 src/plugins/designer/designer.pro         | 4 +++-
 src/plugins/designer/formwindoweditor.cpp | 7 +++++++
 src/plugins/designer/formwindoweditor.h   | 6 +++++-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/plugins/designer/designer.pro b/src/plugins/designer/designer.pro
index 7fd97f35b2a..c7e5936b386 100644
--- a/src/plugins/designer/designer.pro
+++ b/src/plugins/designer/designer.pro
@@ -1,5 +1,6 @@
 TEMPLATE = lib
 TARGET = Designer
+DEFINES += DESIGNER_LIBRARY
 
 include(../../qtcreatorplugin.pri)
 include(../../shared/designerintegrationv2/designerintegration.pri)
@@ -33,7 +34,8 @@ HEADERS += formeditorplugin.h \
         formeditorw.h \
         settingsmanager.h \
         formtemplatewizardpage.h \
-        formwizarddialog.h
+        formwizarddialog.h \
+        designer_export.h
 
 SOURCES += formeditorplugin.cpp \
         formeditorfactory.cpp \
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index 513513361c2..e3d623c2660 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -356,3 +356,10 @@ QString FormWindowEditor::contextHelpId() const
     return className;
 #endif
 }
+
+QString FormWindowEditor::contents() const
+{
+    if (m_host && m_host->formWindow())
+        return m_host->formWindow()->contents();
+    return QString::null;
+}
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index b2b64d584cf..d5727c9f8de 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -35,6 +35,8 @@
 #include <QtCore/QByteArray>
 #include <QtCore/QStringList>
 
+#include "designer_export.h"
+
 QT_BEGIN_NAMESPACE
 class QDesignerFormWindowInterface;
 class QDesignerFormWindowManagerInterface;
@@ -56,7 +58,7 @@ class EditorWidget;
 // Master class maintaining a form window editor,
 // containing file and widget host
 
-class FormWindowEditor : public Core::IEditor
+class DESIGNER_EXPORT FormWindowEditor : public Core::IEditor
 {
     Q_OBJECT
 public:
@@ -88,6 +90,8 @@ public:
     void updateFormWindowSelectionHandles(bool state);
     void setSuggestedFileName(const QString &fileName);
 
+    QString contents() const;
+
 signals:
     // Internal
     void opened(const QString &fileName);
-- 
GitLab