Commit d2e8819f authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Set some object names for easier debugging.

parent 35b69d96
...@@ -114,6 +114,7 @@ DesignModePrivate::DesignModePrivate(DesignMode *q, EditorManager *editorManager ...@@ -114,6 +114,7 @@ DesignModePrivate::DesignModePrivate(DesignMode *q, EditorManager *editorManager
DesignMode::DesignMode(EditorManager *editorManager) : DesignMode::DesignMode(EditorManager *editorManager) :
IMode(), d(new DesignModePrivate(this, editorManager)) IMode(), d(new DesignModePrivate(this, editorManager))
{ {
setObjectName(QLatin1String("DesignMode"));
setEnabled(false); setEnabled(false);
ExtensionSystem::PluginManager::instance()->addObject(d->m_coreListener); ExtensionSystem::PluginManager::instance()->addObject(d->m_coreListener);
......
...@@ -53,6 +53,7 @@ EditMode::EditMode(EditorManager *editorManager) : ...@@ -53,6 +53,7 @@ EditMode::EditMode(EditorManager *editorManager) :
m_splitter(new MiniSplitter), m_splitter(new MiniSplitter),
m_rightSplitWidgetLayout(new QVBoxLayout) m_rightSplitWidgetLayout(new QVBoxLayout)
{ {
setObjectName(QLatin1String("EditMode"));
m_rightSplitWidgetLayout->setSpacing(0); m_rightSplitWidgetLayout->setSpacing(0);
m_rightSplitWidgetLayout->setMargin(0); m_rightSplitWidgetLayout->setMargin(0);
QWidget *rightSplitWidget = new QWidget; QWidget *rightSplitWidget = new QWidget;
...@@ -68,7 +69,9 @@ EditMode::EditMode(EditorManager *editorManager) : ...@@ -68,7 +69,9 @@ EditMode::EditMode(EditorManager *editorManager) :
MiniSplitter *splitter = new MiniSplitter; MiniSplitter *splitter = new MiniSplitter;
splitter->setOrientation(Qt::Vertical); splitter->setOrientation(Qt::Vertical);
splitter->insertWidget(0, rightPaneSplitter); splitter->insertWidget(0, rightPaneSplitter);
splitter->insertWidget(1, new Core::OutputPanePlaceHolder(this, splitter)); QWidget *outputPane = new Core::OutputPanePlaceHolder(this, splitter);
outputPane->setObjectName(QLatin1String("EditModeOutputPanePlaceHolder"));
splitter->insertWidget(1, outputPane);
splitter->setStretchFactor(0, 3); splitter->setStretchFactor(0, 3);
splitter->setStretchFactor(1, 0); splitter->setStretchFactor(1, 0);
......
...@@ -529,7 +529,9 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode) ...@@ -529,7 +529,9 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
// Right-side window with editor, output etc. // Right-side window with editor, output etc.
MiniSplitter *mainWindowSplitter = new MiniSplitter; MiniSplitter *mainWindowSplitter = new MiniSplitter;
mainWindowSplitter->addWidget(this); mainWindowSplitter->addWidget(this);
mainWindowSplitter->addWidget(new OutputPanePlaceHolder(mode, mainWindowSplitter)); QWidget *outputPane = new OutputPanePlaceHolder(mode, mainWindowSplitter);
outputPane->setObjectName(QLatin1String("DebuggerOutputPanePlaceHolder"));
mainWindowSplitter->addWidget(outputPane);
mainWindowSplitter->setStretchFactor(0, 10); mainWindowSplitter->setStretchFactor(0, 10);
mainWindowSplitter->setStretchFactor(1, 0); mainWindowSplitter->setStretchFactor(1, 0);
mainWindowSplitter->setOrientation(Qt::Vertical); mainWindowSplitter->setOrientation(Qt::Vertical);
......
...@@ -507,7 +507,7 @@ static DebuggerEngine *dummyEngine() ...@@ -507,7 +507,7 @@ static DebuggerEngine *dummyEngine()
class DebugMode : public IMode class DebugMode : public IMode
{ {
public: public:
DebugMode() : m_widget(0) {} DebugMode() : m_widget(0) { setObjectName(QLatin1String("DebugMode")); }
// Make sure the editor manager does not get deleted. // Make sure the editor manager does not get deleted.
~DebugMode() { EditorManager::instance()->setParent(0); } ~DebugMode() { EditorManager::instance()->setParent(0); }
......
...@@ -337,7 +337,9 @@ void FormEditorW::fullInit() ...@@ -337,7 +337,9 @@ void FormEditorW::fullInit()
// 'Run' in 'Design' mode emits output. // 'Run' in 'Design' mode emits output.
Core::MiniSplitter *splitter = new Core::MiniSplitter(Qt::Vertical); Core::MiniSplitter *splitter = new Core::MiniSplitter(Qt::Vertical);
splitter->addWidget(m_editorWidget); splitter->addWidget(m_editorWidget);
splitter->addWidget(new Core::OutputPanePlaceHolder(m_designMode, splitter)); QWidget *outputPane = new Core::OutputPanePlaceHolder(m_designMode, splitter);
outputPane->setObjectName(QLatin1String("DesignerOutputPanePlaceHolder"));
splitter->addWidget(outputPane);
layout->addWidget(splitter); layout->addWidget(splitter);
m_modeWidget->setLayout(layout); m_modeWidget->setLayout(layout);
......
...@@ -38,6 +38,7 @@ using namespace Help::Internal; ...@@ -38,6 +38,7 @@ using namespace Help::Internal;
HelpMode::HelpMode(QWidget *widget, QObject *parent) HelpMode::HelpMode(QWidget *widget, QObject *parent)
: BaseMode(parent) : BaseMode(parent)
{ {
setObjectName(QLatin1String("HelpMode"));
setDisplayName(tr("Help")); setDisplayName(tr("Help"));
setId(QLatin1String(Constants::ID_MODE_HELP)); setId(QLatin1String(Constants::ID_MODE_HELP));
setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Reference.png"))); setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Reference.png")));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment