forked from qt-creator/qt-creator
icontext: remove BaseContext class
This commit is contained in:
@@ -91,17 +91,6 @@ protected:
|
|||||||
QPointer<QWidget> m_widget;
|
QPointer<QWidget> m_widget;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseContext : public Core::IContext
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BaseContext(QWidget *widget, const Context &context, QObject *parent = 0)
|
|
||||||
: Core::IContext(parent)
|
|
||||||
{
|
|
||||||
setWidget(widget);
|
|
||||||
setContext(context);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
#endif //ICONTEXT_H
|
#endif //ICONTEXT_H
|
||||||
|
@@ -579,9 +579,10 @@ void HelpPlugin::createRightPaneContextViewer()
|
|||||||
agg->add(m_helpViewerForSideBar);
|
agg->add(m_helpViewerForSideBar);
|
||||||
agg->add(new HelpViewerFindSupport(m_helpViewerForSideBar));
|
agg->add(new HelpViewerFindSupport(m_helpViewerForSideBar));
|
||||||
|
|
||||||
Core::Context context(Constants::C_HELP_SIDEBAR);
|
Core::IContext *context = new Core::IContext(this);
|
||||||
m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar,
|
context->setContext(Core::Context(Constants::C_HELP_SIDEBAR));
|
||||||
context, this));
|
context->setWidget(m_helpViewerForSideBar);
|
||||||
|
m_core->addContextObject(context);
|
||||||
|
|
||||||
QAction *copy = new QAction(this);
|
QAction *copy = new QAction(this);
|
||||||
Core::Command *cmd = m_core->actionManager()->registerAction(copy,
|
Core::Command *cmd = m_core->actionManager()->registerAction(copy,
|
||||||
|
@@ -485,9 +485,12 @@ OutputWindow::OutputWindow(QWidget *parent)
|
|||||||
setWordWrapMode(QTextOption::NoWrap);
|
setWordWrapMode(QTextOption::NoWrap);
|
||||||
|
|
||||||
static uint usedIds = 0;
|
static uint usedIds = 0;
|
||||||
Core::ICore *core = Core::ICore::instance();
|
|
||||||
Core::Context context(Constants::C_APP_OUTPUT, usedIds++);
|
Core::Context context(Constants::C_APP_OUTPUT, usedIds++);
|
||||||
m_outputWindowContext = new Core::BaseContext(this, context);
|
Core::ICore *core = Core::ICore::instance();
|
||||||
|
|
||||||
|
m_outputWindowContext = new Core::IContext;
|
||||||
|
m_outputWindowContext->setContext(context);
|
||||||
|
m_outputWindowContext->setWidget(this);
|
||||||
core->addContextObject(m_outputWindowContext);
|
core->addContextObject(m_outputWindowContext);
|
||||||
|
|
||||||
QAction *undoAction = new QAction(this);
|
QAction *undoAction = new QAction(this);
|
||||||
|
@@ -47,7 +47,7 @@ class QAction;
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class BaseContext;
|
class IContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -189,7 +189,7 @@ private:
|
|||||||
void enableUndoRedo();
|
void enableUndoRedo();
|
||||||
QString doNewlineEnfocement(const QString &out);
|
QString doNewlineEnfocement(const QString &out);
|
||||||
|
|
||||||
Core::BaseContext *m_outputWindowContext;
|
Core::IContext *m_outputWindowContext;
|
||||||
OutputFormatter *m_formatter;
|
OutputFormatter *m_formatter;
|
||||||
|
|
||||||
bool m_enforceNewline;
|
bool m_enforceNewline;
|
||||||
|
Reference in New Issue
Block a user