Commit d2e8819f authored by Friedemann Kleint's avatar Friedemann Kleint

Set some object names for easier debugging.

parent 35b69d96
......@@ -114,6 +114,7 @@ DesignModePrivate::DesignModePrivate(DesignMode *q, EditorManager *editorManager
DesignMode::DesignMode(EditorManager *editorManager) :
IMode(), d(new DesignModePrivate(this, editorManager))
{
setObjectName(QLatin1String("DesignMode"));
setEnabled(false);
ExtensionSystem::PluginManager::instance()->addObject(d->m_coreListener);
......
......@@ -53,6 +53,7 @@ EditMode::EditMode(EditorManager *editorManager) :
m_splitter(new MiniSplitter),
m_rightSplitWidgetLayout(new QVBoxLayout)
{
setObjectName(QLatin1String("EditMode"));
m_rightSplitWidgetLayout->setSpacing(0);
m_rightSplitWidgetLayout->setMargin(0);
QWidget *rightSplitWidget = new QWidget;
......@@ -68,7 +69,9 @@ EditMode::EditMode(EditorManager *editorManager) :
MiniSplitter *splitter = new MiniSplitter;
splitter->setOrientation(Qt::Vertical);
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(1, 0);
......
......@@ -529,7 +529,9 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
// Right-side window with editor, output etc.
MiniSplitter *mainWindowSplitter = new MiniSplitter;
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(1, 0);
mainWindowSplitter->setOrientation(Qt::Vertical);
......
......@@ -507,7 +507,7 @@ static DebuggerEngine *dummyEngine()
class DebugMode : public IMode
{
public:
DebugMode() : m_widget(0) {}
DebugMode() : m_widget(0) { setObjectName(QLatin1String("DebugMode")); }
// Make sure the editor manager does not get deleted.
~DebugMode() { EditorManager::instance()->setParent(0); }
......
......@@ -337,7 +337,9 @@ void FormEditorW::fullInit()
// 'Run' in 'Design' mode emits output.
Core::MiniSplitter *splitter = new Core::MiniSplitter(Qt::Vertical);
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);
m_modeWidget->setLayout(layout);
......
......@@ -38,6 +38,7 @@ using namespace Help::Internal;
HelpMode::HelpMode(QWidget *widget, QObject *parent)
: BaseMode(parent)
{
setObjectName(QLatin1String("HelpMode"));
setDisplayName(tr("Help"));
setId(QLatin1String(Constants::ID_MODE_HELP));
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