diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2011-11-23 15:15:01 +0000 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-11-24 10:49:41 +0100 |
commit | 0ce9fa2c16073f85ed17890088f6e40f523ce928 (patch) | |
tree | b9baa3db68e42a3edb545b20fd003bbc49a321ba /src/plugins/texteditor | |
parent | 88fd98fbc4dc15afa4f42f84045dcdff38b9b301 (diff) | |
download | qt-creator-0ce9fa2c16073f85ed17890088f6e40f523ce928.tar.gz |
UI files: Do not polute the global Ui namespace
Make sure all ui-files are in the plugin's internal namespace.
Change-Id: Ifb2c3093441e8feb89e46f52fbb386fc316cfd13
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/texteditor')
15 files changed, 50 insertions, 36 deletions
diff --git a/src/plugins/texteditor/behaviorsettingspage.cpp b/src/plugins/texteditor/behaviorsettingspage.cpp index 657c9f1497..c6714f813c 100644 --- a/src/plugins/texteditor/behaviorsettingspage.cpp +++ b/src/plugins/texteditor/behaviorsettingspage.cpp @@ -56,7 +56,7 @@ struct BehaviorSettingsPage::BehaviorSettingsPagePrivate explicit BehaviorSettingsPagePrivate(const BehaviorSettingsPageParameters &p); const BehaviorSettingsPageParameters m_parameters; - Ui::BehaviorSettingsPage *m_page; + Internal::Ui::BehaviorSettingsPage *m_page; void init(); @@ -122,7 +122,7 @@ QString BehaviorSettingsPage::displayName() const QWidget *BehaviorSettingsPage::createPage(QWidget *parent) { QWidget *w = new QWidget(parent); - d->m_page = new Ui::BehaviorSettingsPage; + d->m_page = new Internal::Ui::BehaviorSettingsPage; d->m_page->setupUi(w); d->m_pageCodeStyle = new SimpleCodeStylePreferences(w); d->m_pageCodeStyle->setDelegatingPool(d->m_codeStyle->delegatingPool()); diff --git a/src/plugins/texteditor/behaviorsettingspage.ui b/src/plugins/texteditor/behaviorsettingspage.ui index b5b3316bde..d2773135e5 100644 --- a/src/plugins/texteditor/behaviorsettingspage.ui +++ b/src/plugins/texteditor/behaviorsettingspage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>BehaviorSettingsPage</class> - <widget class="QWidget" name="BehaviorSettingsPage"> + <class>TextEditor::Internal::BehaviorSettingsPage</class> + <widget class="QWidget" name="TextEditor::Internal::BehaviorSettingsPage"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/texteditor/behaviorsettingswidget.cpp b/src/plugins/texteditor/behaviorsettingswidget.cpp index e01acbd499..cf07d15b09 100644 --- a/src/plugins/texteditor/behaviorsettingswidget.cpp +++ b/src/plugins/texteditor/behaviorsettingswidget.cpp @@ -52,7 +52,7 @@ namespace TextEditor { struct BehaviorSettingsWidgetPrivate { - ::Ui::BehaviorSettingsWidget m_ui; + Internal::Ui::BehaviorSettingsWidget m_ui; QList<QTextCodec *> m_codecs; }; diff --git a/src/plugins/texteditor/behaviorsettingswidget.ui b/src/plugins/texteditor/behaviorsettingswidget.ui index 6eefc5aaa7..faf07fd5e9 100644 --- a/src/plugins/texteditor/behaviorsettingswidget.ui +++ b/src/plugins/texteditor/behaviorsettingswidget.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>BehaviorSettingsWidget</class> - <widget class="QWidget" name="BehaviorSettingsWidget"> + <class>TextEditor::Internal::BehaviorSettingsWidget</class> + <widget class="QWidget" name="TextEditor::Internal::BehaviorSettingsWidget"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/texteditor/codestyleselectorwidget.cpp b/src/plugins/texteditor/codestyleselectorwidget.cpp index eaf75a9a24..cc46913c2d 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.cpp +++ b/src/plugins/texteditor/codestyleselectorwidget.cpp @@ -171,7 +171,7 @@ CodeStyleSelectorWidget::CodeStyleSelectorWidget(ICodeStylePreferencesFactory *f QWidget(parent), m_factory(factory), m_codeStyle(0), - m_ui(new Ui::CodeStyleSelectorWidget), + m_ui(new Internal::Ui::CodeStyleSelectorWidget), m_ignoreGuiSignals(false) { m_ui->setupUi(this); diff --git a/src/plugins/texteditor/codestyleselectorwidget.h b/src/plugins/texteditor/codestyleselectorwidget.h index 261a6dbec7..37bb33ea24 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.h +++ b/src/plugins/texteditor/codestyleselectorwidget.h @@ -38,11 +38,21 @@ #include <QtGui/QWidget> QT_BEGIN_NAMESPACE + class QHBoxLayout; class QComboBox; class QLabel; class QCheckBox; class QPushButton; + +namespace TextEditor { +namespace Internal { +namespace Ui { +class CodeStyleSelectorWidget; +} // namespace Ui +} // namespace Internal +} // namespace TextEditor + QT_END_NAMESPACE namespace TextEditor { @@ -50,10 +60,6 @@ namespace TextEditor { class ICodeStylePreferences; class ICodeStylePreferencesFactory; -namespace Ui { -class CodeStyleSelectorWidget; -} - class TEXTEDITOR_EXPORT CodeStyleSelectorWidget : public QWidget { Q_OBJECT @@ -85,7 +91,7 @@ private: QString displayName(ICodeStylePreferences *codeStyle) const; - Ui::CodeStyleSelectorWidget *m_ui; + Internal::Ui::CodeStyleSelectorWidget *m_ui; bool m_ignoreGuiSignals; }; diff --git a/src/plugins/texteditor/codestyleselectorwidget.ui b/src/plugins/texteditor/codestyleselectorwidget.ui index 462062cd94..582b4ca917 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.ui +++ b/src/plugins/texteditor/codestyleselectorwidget.ui @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>TextEditor::CodeStyleSelectorWidget</class> - <widget class="QWidget" name="TextEditor::CodeStyleSelectorWidget"> + <class>TextEditor::Internal::CodeStyleSelectorWidget</class> + <widget class="QWidget" name="TextEditor::Internal::CodeStyleSelectorWidget"> <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>523</width> - <height>58</height> + <width>536</width> + <height>59</height> </rect> </property> <property name="windowTitle"> diff --git a/src/plugins/texteditor/displaysettingspage.cpp b/src/plugins/texteditor/displaysettingspage.cpp index 41a72bdd33..f5e201f8be 100644 --- a/src/plugins/texteditor/displaysettingspage.cpp +++ b/src/plugins/texteditor/displaysettingspage.cpp @@ -46,7 +46,7 @@ struct DisplaySettingsPage::DisplaySettingsPagePrivate explicit DisplaySettingsPagePrivate(const DisplaySettingsPageParameters &p); const DisplaySettingsPageParameters m_parameters; - Ui::DisplaySettingsPage *m_page; + Internal::Ui::DisplaySettingsPage *m_page; DisplaySettings m_displaySettings; QString m_searchKeywords; }; @@ -85,7 +85,7 @@ QString DisplaySettingsPage::displayName() const QWidget *DisplaySettingsPage::createPage(QWidget *parent) { QWidget *w = new QWidget(parent); - d->m_page = new Ui::DisplaySettingsPage; + d->m_page = new Internal::Ui::DisplaySettingsPage; d->m_page->setupUi(w); settingsToUI(); if (d->m_searchKeywords.isEmpty()) { diff --git a/src/plugins/texteditor/displaysettingspage.ui b/src/plugins/texteditor/displaysettingspage.ui index c402d98a64..c136ebaece 100644 --- a/src/plugins/texteditor/displaysettingspage.ui +++ b/src/plugins/texteditor/displaysettingspage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>TextEditor::DisplaySettingsPage</class> - <widget class="QWidget" name="TextEditor::DisplaySettingsPage"> + <class>TextEditor::Internal::DisplaySettingsPage</class> + <widget class="QWidget" name="TextEditor::Internal::DisplaySettingsPage"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/texteditor/generichighlighter/highlightersettingspage.ui b/src/plugins/texteditor/generichighlighter/highlightersettingspage.ui index 5ee668f2de..4e270c068d 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettingspage.ui +++ b/src/plugins/texteditor/generichighlighter/highlightersettingspage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>HighlighterSettingsPage</class> - <widget class="QWidget" name="HighlighterSettingsPage"> + <class>TextEditor::Internal::HighlighterSettingsPage</class> + <widget class="QWidget" name="TextEditor::Internal::HighlighterSettingsPage"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.ui b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.ui index 351d38c275..b24e751002 100644 --- a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.ui +++ b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>ManageDefinitionsDialog</class> - <widget class="QDialog" name="ManageDefinitionsDialog"> + <class>TextEditor::Internal::ManageDefinitionsDialog</class> + <widget class="QDialog" name="TextEditor::Internal::ManageDefinitionsDialog"> <property name="geometry"> <rect> <x>0</x> @@ -135,7 +135,7 @@ <connection> <sender>buttonBox</sender> <signal>rejected()</signal> - <receiver>ManageDefinitionsDialog</receiver> + <receiver>TextEditor::Internal::ManageDefinitionsDialog</receiver> <slot>close()</slot> <hints> <hint type="sourcelabel"> diff --git a/src/plugins/texteditor/snippets/snippetssettingspage.ui b/src/plugins/texteditor/snippets/snippetssettingspage.ui index 320810dbc9..f8faf09c1c 100644 --- a/src/plugins/texteditor/snippets/snippetssettingspage.ui +++ b/src/plugins/texteditor/snippets/snippetssettingspage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>SnippetsSettingsPage</class> - <widget class="QWidget" name="SnippetsSettingsPage"> + <class>TextEditor::Internal::SnippetsSettingsPage</class> + <widget class="QWidget" name="TextEditor::Internal::SnippetsSettingsPage"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/texteditor/tabsettingswidget.cpp b/src/plugins/texteditor/tabsettingswidget.cpp index 54c4d4f050..02e3a91c88 100644 --- a/src/plugins/texteditor/tabsettingswidget.cpp +++ b/src/plugins/texteditor/tabsettingswidget.cpp @@ -40,7 +40,7 @@ namespace TextEditor { TabSettingsWidget::TabSettingsWidget(QWidget *parent) : QWidget(parent), - ui(new Ui::TabSettingsWidget) + ui(new Internal::Ui::TabSettingsWidget) { ui->setupUi(this); diff --git a/src/plugins/texteditor/tabsettingswidget.h b/src/plugins/texteditor/tabsettingswidget.h index 4e0ae84b90..4194cfd052 100644 --- a/src/plugins/texteditor/tabsettingswidget.h +++ b/src/plugins/texteditor/tabsettingswidget.h @@ -35,16 +35,24 @@ #include "texteditor_global.h" +QT_BEGIN_NAMESPACE + +namespace TextEditor { +namespace Internal { +namespace Ui { +class TabSettingsWidget; +} // namespace Ui +} // namespace Internal +} // namespace TextEditor + +QT_END_NAMESPACE + #include <QtGui/QWidget> namespace TextEditor { class TabSettings; -namespace Ui { - class TabSettingsWidget; -} - class TEXTEDITOR_EXPORT TabSettingsWidget : public QWidget { Q_OBJECT @@ -71,7 +79,7 @@ private slots: void slotSettingsChanged(); private: - Ui::TabSettingsWidget *ui; + Internal::Ui::TabSettingsWidget *ui; }; } // namespace TextEditor diff --git a/src/plugins/texteditor/tabsettingswidget.ui b/src/plugins/texteditor/tabsettingswidget.ui index 901cf57199..ef3e32d9f7 100644 --- a/src/plugins/texteditor/tabsettingswidget.ui +++ b/src/plugins/texteditor/tabsettingswidget.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>TextEditor::TabSettingsWidget</class> - <widget class="QWidget" name="TextEditor::TabSettingsWidget"> + <class>TextEditor::Internal::TabSettingsWidget</class> + <widget class="QWidget" name="TextEditor::Internal::TabSettingsWidget"> <property name="geometry"> <rect> <x>0</x> |