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