Commit 0ce9fa2c authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk

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: default avatarhjk <qthjk@ovi.com>
parent 88fd98fb
......@@ -43,7 +43,7 @@ namespace Analyzer {
StartRemoteDialog::StartRemoteDialog(QWidget *parent)
: QDialog(parent)
, m_ui(new Ui::StartRemoteDialog)
, m_ui(new Internal::Ui::StartRemoteDialog)
{
m_ui->setupUi(this);
......
......@@ -37,16 +37,24 @@
#include <QtGui/QDialog>
namespace Utils {
class SshConnectionParameters;
}
QT_BEGIN_NAMESPACE
namespace Analyzer {
namespace Internal {
namespace Ui {
class StartRemoteDialog;
} // namespace Ui
} // namespace Internal
} // namespace Analyzer
QT_END_NAMESPACE
namespace Utils {
class SshConnectionParameters;
}
namespace Analyzer {
class ANALYZER_EXPORT StartRemoteDialog : public QDialog
{
Q_OBJECT
......@@ -65,7 +73,7 @@ private slots:
virtual void accept();
private:
Ui::StartRemoteDialog *m_ui;
Internal::Ui::StartRemoteDialog *m_ui;
};
} // namespace Analyzer
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Analyzer::StartRemoteDialog</class>
<widget class="QDialog" name="Analyzer::StartRemoteDialog">
<class>Analyzer::Internal::StartRemoteDialog</class>
<widget class="QDialog" name="Analyzer::Internal::StartRemoteDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>446</width>
<height>329</height>
<height>363</height>
</rect>
</property>
<property name="windowTitle">
......@@ -165,6 +165,10 @@
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -69,7 +69,7 @@ CommandMappings::~CommandMappings()
QWidget *CommandMappings::createPage(QWidget *parent)
{
m_page = new Ui_CommandMappings();
m_page = new Ui::CommandMappings();
QWidget *w = new QWidget(parent);
m_page->setupUi(w);
m_page->targetEdit->setAutoHideButton(Utils::FancyLineEdit::Right, true);
......
......@@ -41,7 +41,13 @@ QT_BEGIN_NAMESPACE
class QLineEdit;
class QTreeWidget;
class QTreeWidgetItem;
class Ui_CommandMappings;
namespace Core {
namespace Internal {
namespace Ui {
class CommandMappings;
} // namespace Ui
} // namespace Internal
} // namespace Core
QT_END_NAMESPACE
namespace Core {
......@@ -92,7 +98,7 @@ protected:
virtual void markPossibleCollisions(QTreeWidgetItem *) {}
virtual void resetCollisionMarkers() {}
private:
Ui_CommandMappings *m_page;
Internal::Ui::CommandMappings *m_page;
};
} // namespace Core
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CommandMappings</class>
<widget class="QWidget" name="CommandMappings">
<class>Core::Internal::CommandMappings</class>
<widget class="QWidget" name="Core::Internal::CommandMappings">
<property name="geometry">
<rect>
<x>0</x>
......@@ -155,8 +155,13 @@
</widget>
<customwidgets>
<customwidget>
<class>Utils::FilterLineEdit</class>
<class>Utils::FancyLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/fancylineedit.h</header>
</customwidget>
<customwidget>
<class>Utils::FilterLineEdit</class>
<extends>Utils::FancyLineEdit</extends>
<header location="global">utils/filterlineedit.h</header>
</customwidget>
</customwidgets>
......
<ui version="4.0" >
<class>OpenWithDialog</class>
<widget class="QWidget" name="OpenWithDialog" >
<property name="geometry" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::Internal::OpenWithDialog</class>
<widget class="QWidget" name="Core::Internal::OpenWithDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
......@@ -9,33 +10,33 @@
<height>199</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Open File With...</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<widget class="QLabel" name="label">
<property name="text">
<string>Open file extension with:</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="editorListWidget" />
<widget class="QListWidget" name="editorListWidget"/>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="orientation" >
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SaveItemsDialog</class>
<widget class="QDialog" name="SaveItemsDialog">
<class>Core::Internal::SaveItemsDialog</class>
<widget class="QDialog" name="Core::Internal::SaveItemsDialog">
<property name="geometry">
<rect>
<x>0</x>
......@@ -83,7 +83,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>SaveItemsDialog</receiver>
<receiver>Core::Internal::SaveItemsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OpenEditorsView</class>
<widget class="QWidget" name="OpenEditorsView">
<class>Core::Internal::OpenEditorsView</class>
<widget class="QWidget" name="Core::Internal::OpenEditorsView">
<property name="geometry">
<rect>
<x>0</x>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MimeTypeMagicDialog</class>
<widget class="QDialog" name="MimeTypeMagicDialog">
<class>Core::Internal::MimeTypeMagicDialog</class>
<widget class="QDialog" name="Core::Internal::MimeTypeMagicDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>286</height>
<width>556</width>
<height>334</height>
</rect>
</property>
<property name="windowTitle">
......@@ -189,7 +189,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>MimeTypeMagicDialog</receiver>
<receiver>Core::Internal::MimeTypeMagicDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MimeTypeSettingsPage</class>
<widget class="QWidget" name="MimeTypeSettingsPage">
<class>Core::Internal::MimeTypeSettingsPage</class>
<widget class="QWidget" name="Core::Internal::MimeTypeSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
......
......@@ -47,7 +47,7 @@ using namespace Core;
VariableChooser::VariableChooser(QWidget *parent) :
QWidget(parent),
ui(new Ui::VariableChooser),
ui(new Internal::Ui::VariableChooser),
m_lineEdit(0),
m_textEdit(0),
m_plainTextEdit(0)
......
......@@ -43,6 +43,15 @@ class QLineEdit;
class QTextEdit;
class QPlainTextEdit;
class QListWidgetItem;
namespace Core {
namespace Internal {
namespace Ui {
class VariableChooser;
} // namespace Ui
} // namespace Internal
} // namespace Core
QT_END_NAMESPACE
namespace Utils {
......@@ -51,10 +60,6 @@ class IconButton;
namespace Core {
namespace Ui {
class VariableChooser;
}
class CORE_EXPORT VariableChooser : public QWidget
{
Q_OBJECT
......@@ -76,7 +81,7 @@ private slots:
private:
void createIconButton();
Ui::VariableChooser *ui;
Internal::Ui::VariableChooser *ui;
QString m_defaultDescription;
QPointer<QLineEdit> m_lineEdit;
QPointer<QTextEdit> m_textEdit;
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::VariableChooser</class>
<widget class="QWidget" name="Core::VariableChooser">
<class>Core::Internal::VariableChooser</class>
<widget class="QWidget" name="Core::Internal::VariableChooser">
<property name="geometry">
<rect>
<x>0</x>
......
......@@ -70,7 +70,7 @@ public:
FileShareProtocolSettings settings() const;
private:
Ui::FileShareProtocolSettingsWidget m_ui;
Internal::Ui::FileShareProtocolSettingsWidget m_ui;
};
class FileShareProtocolSettingsPage : public Core::IOptionsPage
{
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CodePaster::FileShareProtocolSettingsWidget</class>
<widget class="QWidget" name="CodePaster::FileShareProtocolSettingsWidget">
<class>CodePaster::Internal::FileShareProtocolSettingsWidget</class>
<widget class="QWidget" name="CodePaster::Internal::FileShareProtocolSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
......
......@@ -78,7 +78,7 @@ QIcon PasteBinDotComSettings::categoryIcon() const
QWidget *PasteBinDotComSettings::createPage(QWidget *parent)
{
Ui_PasteBinComSettingsWidget ui;
Internal::Ui::PasteBinComSettingsWidget ui;
QWidget *w = new QWidget(parent);
ui.setupUi(w);
ui.lineEdit->setText(hostPrefix());
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PasteBinComSettingsWidget</class>
<widget class="QWidget" name="PasteBinComSettingsWidget">
<class>CodePaster::Internal::PasteBinComSettingsWidget</class>
<widget class="QWidget" name="CodePaster::Internal::PasteBinComSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CodePaster::PasteSelectDialog</class>
<widget class="QDialog" name="CodePaster::PasteSelectDialog">
<class>CodePaster::Internal::PasteSelectDialog</class>
<widget class="QDialog" name="CodePaster::Internal::PasteSelectDialog">
<property name="geometry">
<rect>
<x>0</x>
......@@ -78,7 +78,7 @@
<connection>
<sender>buttons</sender>
<signal>accepted()</signal>
<receiver>CodePaster::PasteSelectDialog</receiver>
<receiver>CodePaster::Internal::PasteSelectDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -94,7 +94,7 @@
<connection>
<sender>buttons</sender>
<signal>rejected()</signal>
<receiver>CodePaster::PasteSelectDialog</receiver>
<receiver>CodePaster::Internal::PasteSelectDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......@@ -126,7 +126,7 @@
<connection>
<sender>listWidget</sender>
<signal>doubleClicked(QModelIndex)</signal>
<receiver>CodePaster::PasteSelectDialog</receiver>
<receiver>CodePaster::Internal::PasteSelectDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -67,7 +67,7 @@ private slots:
private:
const QList<Protocol*> m_protocols;
Ui_PasteSelectDialog m_ui;
Internal::Ui::PasteSelectDialog m_ui;
QPushButton *m_refreshButton;
};
......
......@@ -86,7 +86,7 @@ private:
const QString m_commentPlaceHolder;
const QString m_mimeType;
Ui::ViewDialog m_ui;
Internal::Ui::ViewDialog m_ui;
FileDataList m_parts;
Mode m_mode;
};
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ViewDialog</class>
<widget class="QDialog" name="ViewDialog">
<class>CodePaster::Internal::ViewDialog</class>
<widget class="QDialog" name="CodePaster::Internal::ViewDialog">
<property name="geometry">
<rect>
<x>0</x>
......@@ -83,8 +83,8 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&amp;lt;Comment&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&amp;lt;Comment&amp;gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
......@@ -200,7 +200,7 @@ p, li { white-space: pre-wrap; }
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ViewDialog</receiver>
<receiver>CodePaster::Internal::ViewDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -216,7 +216,7 @@ p, li { white-space: pre-wrap; }
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ViewDialog</receiver>
<receiver>CodePaster::Internal::ViewDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -58,7 +58,7 @@ public:
QString searchKeywords() const;
private:
Ui_SettingsPage m_ui;
Internal::Ui::SettingsPage m_ui;
};
class SettingsPage : public Core::IOptionsPage
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CodePaster::SettingsPage</class>
<widget class="QWidget" name="CodePaster::SettingsPage">
<class>CodePaster::Internal::SettingsPage</class>
<widget class="QWidget" name="CodePaster::Internal::SettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>281</width>
<width>291</width>
<height>229</height>
</rect>
</property>
......
......@@ -65,7 +65,7 @@ QString CompletionSettingsPage::displayName() const
QWidget *CompletionSettingsPage::createPage(QWidget *parent)
{
QWidget *w = new QWidget(parent);
m_page = new Ui_CompletionSettingsPage;
m_page = new Ui::CompletionSettingsPage;
m_page->setupUi(w);
const TextEditor::CompletionSettings &settings =
......
......@@ -37,7 +37,13 @@
#include <texteditor/texteditoroptionspage.h>
QT_BEGIN_NAMESPACE
class Ui_CompletionSettingsPage;
namespace CppTools {
namespace Internal {
namespace Ui {
class CompletionSettingsPage;
} // namespace Ui
} // namespace Internal
} // namespace CppTools
QT_END_NAMESPACE
namespace CppTools {
......@@ -65,7 +71,7 @@ private:
TextEditor::CaseSensitivity caseSensitivity() const;
TextEditor::CompletionTrigger completionTrigger() const;
Ui_CompletionSettingsPage *m_page;
Ui::CompletionSettingsPage *m_page;
QString m_searchKeywords;
};
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CompletionSettingsPage</class>
<widget class="QWidget" name="CompletionSettingsPage">
<class>CppTools::Internal::CompletionSettingsPage</class>
<widget class="QWidget" name="CppTools::Internal::CompletionSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>363</width>
<width>393</width>
<height>241</height>
</rect>
</property>
......
......@@ -234,7 +234,7 @@ QString CppFileSettings::licenseTemplate(const QString &fileName, const QString
CppFileSettingsWidget::CppFileSettingsWidget(QWidget *parent) :
QWidget(parent),
m_ui(new Ui::CppFileSettingsPage)
m_ui(new Internal::Ui::CppFileSettingsPage)
{
m_ui->setupUi(this);
const Core::MimeDatabase *mdb = Core::ICore::instance()->mimeDatabase();
......
......@@ -39,10 +39,17 @@
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
namespace CppTools {
namespace Internal {
namespace Ui {
class CppFileSettingsPage;
}
class CppFileSettingsPage;
} // namespace Ui
} // namespace Internal
} // namespace CppTools
class QSettings;
QT_END_NAMESPACE
namespace CppTools {
......@@ -91,7 +98,7 @@ private:
inline QString licenseTemplatePath() const;
inline void setLicenseTemplatePath(const QString &);
Ui::CppFileSettingsPage *m_ui;
Internal::Ui::CppFileSettingsPage *m_ui;
};
class CppFileSettingsPage : public Core::IOptionsPage
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CppFileSettingsPage</class>
<widget class="QWidget" name="CppFileSettingsPage">
<class>CppTools::Internal::CppFileSettingsPage</class>
<widget class="QWidget" name="CppTools::Internal::CppFileSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>283</width>
<width>291</width>
<height>142</height>
</rect>
</property>
......@@ -79,6 +79,10 @@
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AttachCoreDialog</class>
<widget class="QDialog" name="AttachCoreDialog">
<class>Debugger::Internal::AttachCoreDialog</class>
<widget class="QDialog" name="Debugger::Internal::AttachCoreDialog">
<property name="geometry">
<rect>
<x>0</x>
......@@ -42,7 +42,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="execFileName"/>
<widget class="Utils::PathChooser" name="execFileName" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="coreLabel">
......@@ -55,7 +55,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="coreFileName"/>
<widget class="Utils::PathChooser" name="coreFileName" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="toolchainLabel">
......@@ -81,7 +81,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="sysrootPathChooser"/>
<widget class="Utils::PathChooser" name="sysrootPathChooser" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="overrideStartScriptLabel">
......@@ -94,7 +94,7 @@
</widget>
</item>
<item row="4" column="1">
<widget class="Utils::PathChooser" name="overrideStartScriptFileName"/>
<widget class="Utils::PathChooser" name="overrideStartScriptFileName" native="true"/>
</item>
</layout>
</item>
......@@ -136,6 +136,10 @@
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget>
<customwidget>
<class>Debugger::Internal::DebuggerToolChainComboBox</class>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AttachExternalDialog</class>
<widget class="QDialog" name="AttachExternalDialog">
<class>Debugger::Internal::AttachExternalDialog</class>