summaryrefslogtreecommitdiff
path: root/src/plugins/designer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/designer')
-rw-r--r--src/plugins/designer/codemodelhelpers.h5
-rw-r--r--src/plugins/designer/cpp/formclasswizard.h5
-rw-r--r--src/plugins/designer/cpp/formclasswizarddialog.h5
-rw-r--r--src/plugins/designer/cpp/formclasswizardpage.h5
-rw-r--r--src/plugins/designer/cpp/formclasswizardparameters.h5
-rw-r--r--src/plugins/designer/designer_export.h5
-rw-r--r--src/plugins/designer/designerconstants.h5
-rw-r--r--src/plugins/designer/designercontext.h5
-rw-r--r--src/plugins/designer/editordata.h5
-rw-r--r--src/plugins/designer/editorwidget.h5
-rw-r--r--src/plugins/designer/formeditorfactory.h5
-rw-r--r--src/plugins/designer/formeditorplugin.h5
-rw-r--r--src/plugins/designer/formeditorstack.cpp8
-rw-r--r--src/plugins/designer/formeditorstack.h14
-rw-r--r--src/plugins/designer/formeditorw.cpp2
-rw-r--r--src/plugins/designer/formeditorw.h5
-rw-r--r--src/plugins/designer/formtemplatewizardpage.h5
-rw-r--r--src/plugins/designer/formwindoweditor.h5
-rw-r--r--src/plugins/designer/formwindowfile.h5
-rw-r--r--src/plugins/designer/qtcreatorintegration.h5
-rw-r--r--src/plugins/designer/qtdesignerformclasscodegenerator.h5
-rw-r--r--src/plugins/designer/resourcehandler.h5
-rw-r--r--src/plugins/designer/settingsmanager.h5
-rw-r--r--src/plugins/designer/settingspage.h5
24 files changed, 31 insertions, 98 deletions
diff --git a/src/plugins/designer/codemodelhelpers.h b/src/plugins/designer/codemodelhelpers.h
index 9c5385ea9b..9e3e845d74 100644
--- a/src/plugins/designer/codemodelhelpers.h
+++ b/src/plugins/designer/codemodelhelpers.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CODEMODELHELPERS_H
-#define CODEMODELHELPERS_H
+#pragma once
#include <QtGlobal>
@@ -46,5 +45,3 @@ bool navigateToSlot(const QString &uiFileName,
} // namespace Internal
} // namespace Designer
-
-#endif // CODEMODELHELPERS_H
diff --git a/src/plugins/designer/cpp/formclasswizard.h b/src/plugins/designer/cpp/formclasswizard.h
index 520c3575d4..8dc4868a5e 100644
--- a/src/plugins/designer/cpp/formclasswizard.h
+++ b/src/plugins/designer/cpp/formclasswizard.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMCLASSWIZARD_H
-#define FORMCLASSWIZARD_H
+#pragma once
#include "formclasswizardparameters.h"
@@ -52,5 +51,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMCLASSWIZARD_H
diff --git a/src/plugins/designer/cpp/formclasswizarddialog.h b/src/plugins/designer/cpp/formclasswizarddialog.h
index 41ddd60345..18c96e0f0f 100644
--- a/src/plugins/designer/cpp/formclasswizarddialog.h
+++ b/src/plugins/designer/cpp/formclasswizarddialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMCLASSWIZARDDIALOG_H
-#define FORMCLASSWIZARDDIALOG_H
+#pragma once
#include <coreplugin/basefilewizard.h>
@@ -66,5 +65,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMCLASSWIZARDDIALOG_H
diff --git a/src/plugins/designer/cpp/formclasswizardpage.h b/src/plugins/designer/cpp/formclasswizardpage.h
index 37e2b30703..1f442610a5 100644
--- a/src/plugins/designer/cpp/formclasswizardpage.h
+++ b/src/plugins/designer/cpp/formclasswizardpage.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMCLASSWIZARDPAGE_H
-#define FORMCLASSWIZARDPAGE_H
+#pragma once
#include <QWizardPage>
@@ -75,5 +74,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif //FORMCLASSWIZARDPAGE_H
diff --git a/src/plugins/designer/cpp/formclasswizardparameters.h b/src/plugins/designer/cpp/formclasswizardparameters.h
index 043c045750..7aa25f5cb3 100644
--- a/src/plugins/designer/cpp/formclasswizardparameters.h
+++ b/src/plugins/designer/cpp/formclasswizardparameters.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMCLASSWIZARDPARAMETERS_H
-#define FORMCLASSWIZARDPARAMETERS_H
+#pragma once
#include <QString>
#include <QMetaType>
@@ -48,5 +47,3 @@ public:
} // namespace Designer
Q_DECLARE_METATYPE(Designer::FormClassWizardParameters)
-
-#endif // FORMCLASSWIZARDPARAMETERS_H
diff --git a/src/plugins/designer/designer_export.h b/src/plugins/designer/designer_export.h
index c6c1c25593..000e6c6130 100644
--- a/src/plugins/designer/designer_export.h
+++ b/src/plugins/designer/designer_export.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNER_EXPORT_H
-#define DESIGNER_EXPORT_H
+#pragma once
#include <qglobal.h>
@@ -33,5 +32,3 @@
#else
# define DESIGNER_EXPORT Q_DECL_IMPORT
#endif
-
-#endif // DESIGNER_EXPORT_H
diff --git a/src/plugins/designer/designerconstants.h b/src/plugins/designer/designerconstants.h
index 1704211df9..a097a991d0 100644
--- a/src/plugins/designer/designerconstants.h
+++ b/src/plugins/designer/designerconstants.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERCONSTANTS_H
-#define DESIGNERCONSTANTS_H
+#pragma once
#include <QtGlobal>
@@ -73,5 +72,3 @@ namespace Internal {
}
} // Constants
} // Designer
-
-#endif //DESIGNERCONSTANTS_H
diff --git a/src/plugins/designer/designercontext.h b/src/plugins/designer/designercontext.h
index 20cb7f1210..11bd0afd8e 100644
--- a/src/plugins/designer/designercontext.h
+++ b/src/plugins/designer/designercontext.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERCONTEXT_H
-#define DESIGNERCONTEXT_H
+#pragma once
#include <coreplugin/icontext.h>
@@ -43,5 +42,3 @@ public:
} // namespace Internal
} // namespace Designer
-
-#endif // DESIGNERCONTEXT_H
diff --git a/src/plugins/designer/editordata.h b/src/plugins/designer/editordata.h
index a2fd63bfbf..c4d92f9a41 100644
--- a/src/plugins/designer/editordata.h
+++ b/src/plugins/designer/editordata.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef EDITORDATA_H
-#define EDITORDATA_H
+#pragma once
namespace SharedTools { class WidgetHost; }
@@ -45,5 +44,3 @@ public:
} // namespace Internal
} // namespace Designer
-
-#endif // EDITORDATA_H
diff --git a/src/plugins/designer/editorwidget.h b/src/plugins/designer/editorwidget.h
index 374157cff2..76e77665f3 100644
--- a/src/plugins/designer/editorwidget.h
+++ b/src/plugins/designer/editorwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNER_EDITORWIDGET_H
-#define DESIGNER_EDITORWIDGET_H
+#pragma once
#include "designerconstants.h"
@@ -75,5 +74,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // DESIGNER_EDITORWIDGET_H
diff --git a/src/plugins/designer/formeditorfactory.h b/src/plugins/designer/formeditorfactory.h
index f81b657317..8c8b898a7e 100644
--- a/src/plugins/designer/formeditorfactory.h
+++ b/src/plugins/designer/formeditorfactory.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMEDITORFACTORY_H
-#define FORMEDITORFACTORY_H
+#pragma once
#include <coreplugin/editormanager/ieditorfactory.h>
@@ -43,5 +42,3 @@ public:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMEDITORFACTORY_H
diff --git a/src/plugins/designer/formeditorplugin.h b/src/plugins/designer/formeditorplugin.h
index 8fa68e3f14..47ecdeda28 100644
--- a/src/plugins/designer/formeditorplugin.h
+++ b/src/plugins/designer/formeditorplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMEDITORPLUGIN_H
-#define FORMEDITORPLUGIN_H
+#pragma once
#include <extensionsystem/iplugin.h>
@@ -63,5 +62,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMEDITORPLUGIN_H
diff --git a/src/plugins/designer/formeditorstack.cpp b/src/plugins/designer/formeditorstack.cpp
index 6de9360b11..085a641409 100644
--- a/src/plugins/designer/formeditorstack.cpp
+++ b/src/plugins/designer/formeditorstack.cpp
@@ -177,13 +177,13 @@ SharedTools::WidgetHost *FormEditorStack::formWindowEditorForXmlEditor(const Cor
return i != -1 ? m_formEditors.at(i).widgetHost : static_cast<SharedTools::WidgetHost *>(0);
}
-void FormEditorStack::modeAboutToChange(Core::IMode *m)
+void FormEditorStack::modeAboutToChange(Core::Id mode)
{
- if (Designer::Constants::Internal::debug && m)
- qDebug() << "FormEditorStack::modeAboutToChange" << m->id().toString();
+ if (Designer::Constants::Internal::debug)
+ qDebug() << "FormEditorStack::modeAboutToChange" << mode.toString();
// Sync the editor when entering edit mode
- if (m && m->id() == Core::Constants::MODE_EDIT)
+ if (mode == Core::Constants::MODE_EDIT)
foreach (const EditorData &data, m_formEditors)
data.formWindowEditor->formWindowFile()->syncXmlFromFormWindow();
}
diff --git a/src/plugins/designer/formeditorstack.h b/src/plugins/designer/formeditorstack.h
index d8f84c2cde..05258e2aed 100644
--- a/src/plugins/designer/formeditorstack.h
+++ b/src/plugins/designer/formeditorstack.h
@@ -23,11 +23,12 @@
**
****************************************************************************/
-#ifndef FORMEDITORSTACK_H
-#define FORMEDITORSTACK_H
+#pragma once
#include "editordata.h"
+#include <coreplugin/id.h>
+
#include <QStackedWidget>
#include <QList>
@@ -36,10 +37,7 @@ class QDesignerFormWindowInterface;
class QDesignerFormEditorInterface;
QT_END_NAMESPACE
-namespace Core {
- class IEditor;
- class IMode;
-}
+namespace Core { class IEditor; }
namespace Designer {
namespace Internal {
@@ -69,7 +67,7 @@ public slots:
private slots:
void updateFormWindowSelectionHandles();
- void modeAboutToChange(Core::IMode *);
+ void modeAboutToChange(Core::Id mode);
void formSizeChanged(int w, int h);
private:
@@ -82,5 +80,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMEDITORSTACK_H
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index a911e5ad35..b00d0849dd 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -434,7 +434,7 @@ void FormEditorData::fullInit()
// 'Run' in 'Design' mode emits output.
MiniSplitter *splitter = new MiniSplitter(Qt::Vertical);
splitter->addWidget(m_editorWidget);
- QWidget *outputPane = new OutputPanePlaceHolder(m_designMode, splitter);
+ QWidget *outputPane = new OutputPanePlaceHolder(m_designMode->id(), splitter);
outputPane->setObjectName(QLatin1String("DesignerOutputPanePlaceHolder"));
splitter->addWidget(outputPane);
layout->addWidget(splitter);
diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h
index 51eaaf6a13..7dbc96d94f 100644
--- a/src/plugins/designer/formeditorw.h
+++ b/src/plugins/designer/formeditorw.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMEDITORW_H
-#define FORMEDITORW_H
+#pragma once
#include "designerconstants.h"
@@ -90,5 +89,3 @@ public:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMEDITORW_H
diff --git a/src/plugins/designer/formtemplatewizardpage.h b/src/plugins/designer/formtemplatewizardpage.h
index 471837e360..047ca4667e 100644
--- a/src/plugins/designer/formtemplatewizardpage.h
+++ b/src/plugins/designer/formtemplatewizardpage.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMTEMPLATEWIZARDPAGE_H
-#define FORMTEMPLATEWIZARDPAGE_H
+#pragma once
#include <projectexplorer/jsonwizard/jsonwizardpagefactory.h>
@@ -80,5 +79,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMTEMPLATEWIZARDPAGE_H
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index 146f528316..80eaeabf24 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMWINDOWEDITOR_H
-#define FORMWINDOWEDITOR_H
+#pragma once
#include "designer_export.h"
#include <texteditor/texteditor.h>
@@ -60,5 +59,3 @@ public:
};
} // namespace Designer
-
-#endif // FORMWINDOWEDITOR_H
diff --git a/src/plugins/designer/formwindowfile.h b/src/plugins/designer/formwindowfile.h
index 648460b7e1..7ee62bb951 100644
--- a/src/plugins/designer/formwindowfile.h
+++ b/src/plugins/designer/formwindowfile.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORMWINDOWFILE_H
-#define FORMWINDOWFILE_H
+#pragma once
#include <texteditor/textdocument.h>
@@ -89,5 +88,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // FORMWINDOWFILE_H
diff --git a/src/plugins/designer/qtcreatorintegration.h b/src/plugins/designer/qtcreatorintegration.h
index 00baa16bb6..a00540ba8d 100644
--- a/src/plugins/designer/qtcreatorintegration.h
+++ b/src/plugins/designer/qtcreatorintegration.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QTCREATORINTEGRATION_H
-#define QTCREATORINTEGRATION_H
+#pragma once
#include <QtGlobal>
#include <QDesignerIntegration>
@@ -65,5 +64,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // QTCREATORINTEGRATION_H
diff --git a/src/plugins/designer/qtdesignerformclasscodegenerator.h b/src/plugins/designer/qtdesignerformclasscodegenerator.h
index 6f67e052ab..96eb76e07f 100644
--- a/src/plugins/designer/qtdesignerformclasscodegenerator.h
+++ b/src/plugins/designer/qtdesignerformclasscodegenerator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QTDESIGNERFORMCLASSCODEGENERATOR_H
-#define QTDESIGNERFORMCLASSCODEGENERATOR_H
+#pragma once
#include <QString>
#include <QVariant>
@@ -52,5 +51,3 @@ public:
Q_INVOKABLE QVariant generateFormClassCode(const Designer::FormClassWizardParameters &parameters);
};
} // namespace Designer
-
-#endif // QTDESIGNERFORMCLASSCODEGENERATOR_H
diff --git a/src/plugins/designer/resourcehandler.h b/src/plugins/designer/resourcehandler.h
index d714a04c1b..4fa3630d7e 100644
--- a/src/plugins/designer/resourcehandler.h
+++ b/src/plugins/designer/resourcehandler.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef RESOURCEHANDLER_H
-#define RESOURCEHANDLER_H
+#pragma once
#include <QObject>
#include <QStringList>
@@ -71,5 +70,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // RESOURCEHANDLER_H
diff --git a/src/plugins/designer/settingsmanager.h b/src/plugins/designer/settingsmanager.h
index 164f35e11d..2d64d95048 100644
--- a/src/plugins/designer/settingsmanager.h
+++ b/src/plugins/designer/settingsmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef SETTINGSMANAGER_H
-#define SETTINGSMANAGER_H
+#pragma once
#include <QDesignerSettingsInterface>
@@ -51,5 +50,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // SETTINGSMANAGER_H
diff --git a/src/plugins/designer/settingspage.h b/src/plugins/designer/settingspage.h
index 98360b822f..7e0a6b1836 100644
--- a/src/plugins/designer/settingspage.h
+++ b/src/plugins/designer/settingspage.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNER_SETTINGSPAGE_H
-#define DESIGNER_SETTINGSPAGE_H
+#pragma once
#include <coreplugin/dialogs/ioptionspage.h>
@@ -73,5 +72,3 @@ private:
} // namespace Internal
} // namespace Designer
-
-#endif // DESIGNER_SETTINGSPAGE_H