Commit b606469a authored by Friedemann Kleint's avatar Friedemann Kleint

Project managers: Remove dependency to Qt Designer.

(Cmake/Qt4). Use PluginManager invocation facility
for the form class code generation. Do the rest
(testing for form editor, retrieving the editor
contents).

Acked-By: hjk
parent bda60114
......@@ -43,7 +43,7 @@
namespace ExtensionSystem {
class InvokerBase
class EXTENSIONSYSTEM_EXPORT InvokerBase
{
public:
InvokerBase();
......
......@@ -49,7 +49,6 @@
#include <projectexplorer/toolchain.h>
#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <designer/formwindoweditor.h>
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
......@@ -76,6 +75,20 @@ using namespace ProjectExplorer;
// Open Questions
// Who sets up the environment for cl.exe ? INCLUDEPATH and so on
// Test for form editor (loosely coupled)
static inline bool isFormWindowEditor(const QObject *o)
{
return o && !qstrcmp(o->metaObject()->className(), "Designer::FormWindowEditor");
}
// Return contents of form editor (loosely coupled)
static inline QString formWindowEditorContents(const QObject *editor)
{
const QVariant contentV = editor->property("contents");
QTC_ASSERT(contentV.isValid(), return QString(); )
return contentV.toString();
}
/*!
\class CMakeProject
*/
......@@ -659,13 +672,11 @@ void CMakeProject::updateCodeModelSupportFromEditor(const QString &uiFileName,
void CMakeProject::editorChanged(Core::IEditor *editor)
{
// Handle old editor
Designer::FormWindowEditor *lastFormEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastFormEditor) {
disconnect(lastFormEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(m_lastEditor)) {
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirtyUic) {
const QString contents = lastFormEditor->contents();
updateCodeModelSupportFromEditor(lastFormEditor->file()->fileName(), contents);
const QString contents = formWindowEditorContents(m_lastEditor);
updateCodeModelSupportFromEditor(m_lastEditor->file()->fileName(), contents);
m_dirtyUic = false;
}
}
......@@ -673,8 +684,8 @@ void CMakeProject::editorChanged(Core::IEditor *editor)
m_lastEditor = editor;
// Handle new editor
if (Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(editor))
connect(fw, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(editor))
connect(editor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
}
void CMakeProject::editorAboutToClose(Core::IEditor *editor)
......@@ -682,12 +693,11 @@ void CMakeProject::editorAboutToClose(Core::IEditor *editor)
if (m_lastEditor == editor) {
// Oh no our editor is going to be closed
// get the content first
Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastEditor) {
disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(m_lastEditor)) {
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirtyUic) {
const QString contents = lastEditor->contents();
updateCodeModelSupportFromEditor(lastEditor->file()->fileName(), contents);
const QString contents = formWindowEditorContents(m_lastEditor);
updateCodeModelSupportFromEditor(m_lastEditor->file()->fileName(), contents);
m_dirtyUic = false;
}
}
......@@ -698,12 +708,8 @@ void CMakeProject::editorAboutToClose(Core::IEditor *editor)
void CMakeProject::uiEditorContentsChanged()
{
// cast sender, get filename
if (m_dirtyUic)
return;
Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(sender());
if (!fw)
return;
m_dirtyUic = true;
if (!m_dirtyUic && isFormWindowEditor(sender()))
m_dirtyUic = true;
}
void CMakeProject::buildStateChanged(ProjectExplorer::Project *project)
......
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/cpptools/cpptools.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../plugins/designer/designer.pri)
......@@ -52,38 +52,38 @@ CppSettingsPageWidget::CppSettingsPageWidget(QWidget *parent) :
FormClassWizardGenerationParameters CppSettingsPageWidget::parameters() const
{
FormClassWizardGenerationParameters rc;
rc.setEmbedding(static_cast<FormClassWizardGenerationParameters::UiClassEmbedding>(uiEmbedding()));
rc.setRetranslationSupport(m_ui.retranslateCheckBox->isChecked());
rc.setIncludeQtModule(m_ui.includeQtModuleCheckBox->isChecked());
rc.embedding = static_cast<UiClassEmbedding>(uiEmbedding());
rc.retranslationSupport =m_ui.retranslateCheckBox->isChecked();
rc.includeQtModule = m_ui.includeQtModuleCheckBox->isChecked();
return rc;
}
void CppSettingsPageWidget::setParameters(const FormClassWizardGenerationParameters &p)
{
m_ui.retranslateCheckBox->setChecked(p.retranslationSupport());
m_ui.includeQtModuleCheckBox->setChecked(p.includeQtModule());
setUiEmbedding(p.embedding());
m_ui.retranslateCheckBox->setChecked(p.retranslationSupport);
m_ui.includeQtModuleCheckBox->setChecked(p.includeQtModule);
setUiEmbedding(p.embedding);
}
int CppSettingsPageWidget::uiEmbedding() const
{
if (m_ui.ptrAggregationRadioButton->isChecked())
return FormClassWizardGenerationParameters::PointerAggregatedUiClass;
return PointerAggregatedUiClass;
if (m_ui.aggregationButton->isChecked())
return FormClassWizardGenerationParameters::AggregatedUiClass;
return FormClassWizardGenerationParameters::InheritedUiClass;
return AggregatedUiClass;
return InheritedUiClass;
}
void CppSettingsPageWidget::setUiEmbedding(int v)
{
switch (v) {
case FormClassWizardGenerationParameters::PointerAggregatedUiClass:
case PointerAggregatedUiClass:
m_ui.ptrAggregationRadioButton->setChecked(true);
break;
case FormClassWizardGenerationParameters::AggregatedUiClass:
case AggregatedUiClass:
m_ui.aggregationButton->setChecked(true);
break;
case FormClassWizardGenerationParameters::InheritedUiClass:
case InheritedUiClass:
m_ui.multipleInheritanceButton->setChecked(true);
break;
}
......
......@@ -34,8 +34,8 @@
#ifndef CPPSETTINGSPAGE_H
#define CPPSETTINGSPAGE_H
#include "formclasswizardparameters.h"
#include "ui_cppsettingspagewidget.h"
#include "qtdesignerformclasscodegenerator.h"
#include <coreplugin/dialogs/ioptionspage.h>
......
......@@ -35,6 +35,7 @@
#include "formclasswizarddialog.h"
#include "designerconstants.h"
#include "formwindoweditor.h"
#include "qtdesignerformclasscodegenerator.h"
#include <coreplugin/icore.h>
#include <cppeditor/cppeditorconstants.h>
......@@ -80,15 +81,15 @@ Core::GeneratedFiles FormClassWizard::generateFiles(const QWizard *w, QString *e
const FormClassWizardDialog *wizardDialog = qobject_cast<const FormClassWizardDialog *>(w);
const Designer::FormClassWizardParameters params = wizardDialog->parameters();
if (params.uiTemplate().isEmpty()) {
if (params.uiTemplate.isEmpty()) {
*errorMessage = QLatin1String("Internal error: FormClassWizard::generateFiles: empty template contents");
return Core::GeneratedFiles();
}
// header
const QString formFileName = buildFileName(params.path(), params.uiFile(), formSuffix());
const QString headerFileName = buildFileName(params.path(), params.headerFile(), headerSuffix());
const QString sourceFileName = buildFileName(params.path(), params.sourceFile(), sourceSuffix());
const QString formFileName = buildFileName(params.path, params.uiFile, formSuffix());
const QString headerFileName = buildFileName(params.path, params.headerFile, headerSuffix());
const QString sourceFileName = buildFileName(params.path, params.sourceFile, sourceSuffix());
Core::GeneratedFile headerFile(headerFileName);
headerFile.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
......@@ -99,13 +100,12 @@ Core::GeneratedFiles FormClassWizard::generateFiles(const QWizard *w, QString *e
// UI
Core::GeneratedFile uiFile(formFileName);
uiFile.setContents(params.uiTemplate());
uiFile.setContents(params.uiTemplate);
uiFile.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
QString source, header;
Designer::FormClassWizardGenerationParameters generationParameters;
generationParameters.fromSettings(Core::ICore::instance()->settings());
params.generateCpp(generationParameters, &header, &source);
QtDesignerFormClassCodeGenerator::generateCpp(params, &header, &source);
sourceFile.setContents(source);
headerFile.setContents(header);
......
......@@ -103,7 +103,7 @@ FormClassWizardParameters FormClassWizardDialog::parameters() const
FormClassWizardParameters rc;
m_classPage->getParameters(&rc);
// Name the ui class in the Ui namespace after the class specified
rc.setUiTemplate(FormTemplateWizardPage::changeUiClassName(m_rawFormTemplate, rc.className()));
rc.uiTemplate = FormTemplateWizardPage::changeUiClassName(m_rawFormTemplate, rc.className);
return rc;
}
......
......@@ -112,11 +112,11 @@ void FormClassWizardPage::setPath(const QString &p)
void FormClassWizardPage::getParameters(FormClassWizardParameters *p) const
{
p->setClassName(m_ui->newClassWidget->className());
p->setPath(path());
p->setSourceFile(m_ui->newClassWidget->sourceFileName());
p->setHeaderFile(m_ui->newClassWidget->headerFileName());
p->setUiFile(m_ui->newClassWidget-> formFileName());
p->className = m_ui->newClassWidget->className();
p->path = path();
p->sourceFile = m_ui->newClassWidget->sourceFileName();
p->headerFile = m_ui->newClassWidget->headerFileName();
p->uiFile = m_ui->newClassWidget-> formFileName();
}
void FormClassWizardPage::slotValidChanged()
......
......@@ -34,99 +34,27 @@
#ifndef FORMCLASSWIZARDPARAMETERS_H
#define FORMCLASSWIZARDPARAMETERS_H
#include "../designer_export.h"
#include <QtCore/QString>
#include <QtCore/QSharedDataPointer>
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
#include <QtCore/QMetaType>
namespace Designer {
/* Parameters passed to generate the code part of a form class.
* Code generation using the parameters is provided as an invokable
* service by QtDesignerFormClassCodeGenerator.
* Thus, the parameters class must not have linkage. */
class FormClassWizardGenerationParametersPrivate;
class FormClassWizardParametersPrivate;
// Parameters influencing the code generation.
class DESIGNER_EXPORT FormClassWizardGenerationParameters {
class FormClassWizardParameters
{
public:
// How to embed the Ui::Form class.
enum UiClassEmbedding {
PointerAggregatedUiClass, // "Ui::Form *m_ui";
AggregatedUiClass, // "Ui::Form m_ui";
InheritedUiClass // "...private Ui::Form..."
};
FormClassWizardGenerationParameters();
~FormClassWizardGenerationParameters();
FormClassWizardGenerationParameters(const FormClassWizardGenerationParameters&);
FormClassWizardGenerationParameters &operator=(const FormClassWizardGenerationParameters &);
void fromSettings(const QSettings *);
void toSettings(QSettings *) const;
UiClassEmbedding embedding() const;
void setEmbedding(UiClassEmbedding e);
bool retranslationSupport() const; // Add handling for language change events
void setRetranslationSupport(bool v);
bool includeQtModule() const; // Include "<QtGui/[Class]>" or just "<[Class]>"
void setIncludeQtModule(bool v);
bool indentNamespace() const;
void setIndentNamespace(bool v);
bool equals(const FormClassWizardGenerationParameters &rhs) const;
private:
QSharedDataPointer<FormClassWizardGenerationParametersPrivate> m_d;
QString uiTemplate;
QString className;
QString path;
QString sourceFile;
QString headerFile;
QString uiFile;
};
inline bool operator==(const FormClassWizardGenerationParameters &p1, const FormClassWizardGenerationParameters &p2) { return p1.equals(p2); }
inline bool operator!=(const FormClassWizardGenerationParameters &p1, const FormClassWizardGenerationParameters &p2) { return !p1.equals(p2); }
// Parameters required to generate the code part of a form class with
// helpers for XML-processing ui templates.
class DESIGNER_EXPORT FormClassWizardParameters {
public:
FormClassWizardParameters();
~FormClassWizardParameters();
FormClassWizardParameters(const FormClassWizardParameters &);
FormClassWizardParameters &operator=(const FormClassWizardParameters &);
bool generateCpp(const FormClassWizardGenerationParameters &fgp,
QString *header, QString *source, int indentation = 4) const;
// Helper to parse UI XML forms to determine:
// 1) The ui class name from "<class>Designer::Internal::FormClassWizardPage</class>"
// 2) the base class from: widget class="QWizardPage"...
static bool getUIXmlData(const QString &uiXml, QString *formBaseClass, QString *uiClassName);
// Helper to change the class name in a UI XML form
static QString changeUiClassName(const QString &uiXml, const QString &newUiClassName);
QString uiTemplate() const;
void setUiTemplate(const QString &);
QString className() const;
void setClassName(const QString &);
QString path() const;
void setPath(const QString &);
QString sourceFile() const;
void setSourceFile(const QString &);
QString headerFile() const;
void setHeaderFile(const QString &);
QString uiFile() const;
void setUiFile(const QString &);
private:
QSharedDataPointer<FormClassWizardParametersPrivate> m_d;
};
} // namespace Designer
Q_DECLARE_METATYPE(Designer::FormClassWizardParameters)
#endif // FORMCLASSWIZARDPARAMETERS_H
......@@ -40,7 +40,8 @@ HEADERS += formeditorplugin.h \
designercontext.h \
formeditorstack.h \
editordata.h \
resourcehandler.h
resourcehandler.h \
qtdesignerformclasscodegenerator.h
SOURCES += formeditorplugin.cpp \
formeditorfactory.cpp \
......@@ -58,7 +59,8 @@ SOURCES += formeditorplugin.cpp \
designerxmleditor.cpp \
designercontext.cpp \
formeditorstack.cpp \
resourcehandler.cpp
resourcehandler.cpp \
qtdesignerformclasscodegenerator.cpp
RESOURCES += designer.qrc
......
......@@ -43,6 +43,7 @@
#include "settingspage.h"
#include "designerconstants.h"
#include "qtdesignerformclasscodegenerator.h"
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
......@@ -90,7 +91,7 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new FormEditorFactory);
addAutoReleasedObject(new SettingsPageProvider);
addAutoReleasedObject(new QtDesignerFormClassCodeGenerator);
// Ensure that loading designer translations is done before FormEditorW is instantiated
const QString locale = Core::ICore::instance()->userInterfaceLanguage();
if (!locale.isEmpty()) {
......
......@@ -35,19 +35,9 @@
#define FORMEDITORPLUGIN_H
#include <extensionsystem/iplugin.h>
#include <QtCore/QPointer>
namespace Core {
class DesignMode;
class IMode;
class IEditor;
}
namespace Designer {
class FormWindowEditor;
namespace Internal {
class FormEditorStack;
class FormEditorPlugin : public ExtensionSystem::IPlugin
{
......@@ -62,10 +52,7 @@ public:
void extensionsInitialized();
private:
void initializeTemplates();
//Core::IMode *m_prevMode;
};
} // namespace Internal
......
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** No Commercial Usage
**
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef QTDESIGNERFORMCLASSCODEGENERATOR_H
#define QTDESIGNERFORMCLASSCODEGENERATOR_H
#include <QtCore/QString>
#include <QtCore/QVariant>
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace Designer {
class FormClassWizardParameters;
namespace Internal {
// How to embed the Ui::Form class.
enum UiClassEmbedding
{
PointerAggregatedUiClass, // "Ui::Form *m_ui";
AggregatedUiClass, // "Ui::Form m_ui";
InheritedUiClass // "...private Ui::Form..."
};
// Parameters influencing the code generation to be used in settings page.
struct FormClassWizardGenerationParameters
{
FormClassWizardGenerationParameters();
bool equals(const FormClassWizardGenerationParameters &rhs) const;
void fromSettings(const QSettings *);
void toSettings(QSettings *) const;
UiClassEmbedding embedding;
bool retranslationSupport; // Add handling for language change events
bool includeQtModule; // Include "<QtGui/[Class]>" or just "<[Class]>"
bool indentNamespace;
};
inline bool operator==(const FormClassWizardGenerationParameters &p1, const FormClassWizardGenerationParameters &p2) { return p1.equals(p2); }
inline bool operator!=(const FormClassWizardGenerationParameters &p1, const FormClassWizardGenerationParameters &p2) { return !p1.equals(p2); }
} // namespace Internal
// Publicly registered service to generate the code for a form class
// (See PluginManager::Invoke) to be accessed by Qt4ProjectManager.
class QtDesignerFormClassCodeGenerator : public QObject
{
Q_OBJECT
public:
explicit QtDesignerFormClassCodeGenerator(QObject *parent = 0);
static bool generateCpp(const FormClassWizardParameters &parameters,
QString *header, QString *source, int indentation = 4);
// Generate form class code according to settings.
Q_INVOKABLE QVariant generateFormClassCode(const Designer::FormClassWizardParameters &parameters);
};
} // namespace Designer
#endif // QTDESIGNERFORMCLASSCODEGENERATOR_H
......@@ -131,7 +131,6 @@ plugin_qt4projectmanager.subdir = qt4projectmanager
plugin_qt4projectmanager.depends = plugin_texteditor
plugin_qt4projectmanager.depends += plugin_projectexplorer
plugin_qt4projectmanager.depends += plugin_cpptools
plugin_qt4projectmanager.depends += plugin_designer
plugin_qt4projectmanager.depends += plugin_debugger
plugin_qt4projectmanager.depends += plugin_qmljseditor
......@@ -183,7 +182,6 @@ plugin_cmakeprojectmanager.subdir = cmakeprojectmanager
plugin_cmakeprojectmanager.depends = plugin_texteditor
plugin_cmakeprojectmanager.depends += plugin_projectexplorer
plugin_cmakeprojectmanager.depends += plugin_cpptools
plugin_cmakeprojectmanager.depends += plugin_designer
plugin_genericprojectmanager.subdir = genericprojectmanager
plugin_genericprojectmanager.depends = plugin_texteditor
......
......@@ -48,13 +48,13 @@
#include <coreplugin/messagemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/session.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
#include <designer/formwindoweditor.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
......@@ -82,6 +82,20 @@ static const char* qt4FileTypes[] = {
"Qt4ResourceFiles"
};
// Test for form editor (loosely coupled)
static inline bool isFormWindowEditor(const QObject *o)
{
return o && !qstrcmp(o->metaObject()->className(), "Designer::FormWindowEditor");
}
// Return contents of form editor (loosely coupled)
static inline QString formWindowEditorContents(const QObject *editor)
{
const QVariant contentV = editor->property("contents");
QTC_ASSERT(contentV.isValid(), return QString(); )
return contentV.toString();
}
Qt4Manager::Qt4Manager(Qt4ProjectManagerPlugin *plugin)
: m_plugin(plugin),
m_contextProject(0),
......@@ -122,14 +136,13 @@ void Qt4Manager::init()
void Qt4Manager::editorChanged(Core::IEditor *editor)
{
// Handle old editor
Designer::FormWindowEditor *lastFormEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastFormEditor) {
disconnect(lastFormEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(m_lastEditor)) {
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirty) {
const QString contents = lastFormEditor->contents();
const QString contents = formWindowEditorContents(m_lastEditor);
foreach(Qt4Project *project, m_projects)
project->rootProjectNode()->updateCodeModelSupportFromEditor(lastFormEditor->file()->fileName(), contents);
project->rootProjectNode()->updateCodeModelSupportFromEditor(m_lastEditor->file()->fileName(), contents);
m_dirty = false;
}
}
......@@ -137,8 +150,8 @@ void Qt4Manager::editorChanged(Core::IEditor *editor)
m_lastEditor = editor;
// Handle new editor
if (Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(editor))
connect(fw, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(m_lastEditor))
connect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
}
void Qt4Manager::editorAboutToClose(Core::IEditor *editor)
......@@ -146,13 +159,12 @@ void Qt4Manager::editorAboutToClose(Core::IEditor *editor)
if (m_lastEditor == editor) {
// Oh no our editor is going to be closed
// get the content first
Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastEditor) {
disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (isFormWindowEditor(m_lastEditor)) {
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirty) {
const QString contents = lastEditor->contents();
const QString contents = formWindowEditorContents(m_lastEditor);
foreach(Qt4Project *project, m_projects)
project->rootProjectNode()->updateCodeModelSupportFromEditor(lastEditor->file()->fileName(), contents);
project->rootProjectNode()->updateCodeModelSupportFromEditor(m_lastEditor->file()->fileName(), contents);
m_dirty = false;
}
}
......@@ -163,12 +175,8 @@ void Qt4Manager::editorAboutToClose(Core::IEditor *editor)
void Qt4Manager::uiEditorContentsChanged()