Designer: Compilation with Qt 5.

Test the new Qt Designer integration interfaces.

Change-Id: I8364167d5be3e7c361b192318b0bba7fb70d0f2f
Reviewed-on: http://codereview.qt.nokia.com/9
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-05-19 11:30:38 +02:00
committed by Kai Koehne
parent 0d3d38ecc1
commit b0d093b0d7
13 changed files with 203 additions and 42 deletions

View File

@@ -89,12 +89,24 @@ static QString msgClassNotFound(const QString &uiClassName, const QList<Document
}
QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, FormEditorW *parent) :
qdesigner_internal::QDesignerIntegration(core, ::qobject_cast<QObject*>(parent)),
#if QT_VERSION >= 0x050000
QDesignerIntegration(core, parent),
#else
qdesigner_internal::QDesignerIntegration(core, parent),
#endif
m_few(parent)
{
#if QT_VERSION >= 0x050000
setResourceFileWatcherBehaviour(ReloadResourceFileSilently);
Feature f = features();
f |= SlotNavigationFeature;
f &= ~ResourceEditorFeature;
setFeatures(f);
#else
setResourceFileWatcherBehaviour(QDesignerIntegration::ReloadSilently);
setResourceEditingEnabled(false);
setSlotNavigationEnabled(true);
#endif
connect(this, SIGNAL(navigateToSlot(QString, QString, QStringList)),
this, SLOT(slotNavigateToSlot(QString, QString, QStringList)));
connect(this, SIGNAL(helpRequested(QString,QString)),
@@ -115,7 +127,11 @@ void QtCreatorIntegration::updateSelection()
{
if (const EditorData ed = m_few->activeEditor())
ed.widgetHost->updateFormWindowSelectionHandles(true);
#if QT_VERSION >= 0x050000
QDesignerIntegration::updateSelection();
#else
qdesigner_internal::QDesignerIntegration::updateSelection();
#endif
}
QWidget *QtCreatorIntegration::containerWindow(QWidget * /*widget*/) const