forked from qt-creator/qt-creator
		
	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:
		
				
					committed by
					
						
						Kai Koehne
					
				
			
			
				
	
			
			
			
						parent
						
							0d3d38ecc1
						
					
				
				
					commit
					b0d093b0d7
				
			@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user