forked from qt-creator/qt-creator
Core: Add a static IContext::attach() function
... to simplify the user code. Some, but not all, potential beneficiaries are adapted. Change-Id: Ia7d514a0114a4f99f8ee745523435f5b990bd095 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -52,15 +52,13 @@ using namespace Utils::Terminal;
|
||||
using namespace Core;
|
||||
|
||||
namespace Terminal {
|
||||
|
||||
TerminalWidget::TerminalWidget(QWidget *parent, const OpenTerminalParameters &openParameters)
|
||||
: Core::SearchableTerminal(parent)
|
||||
, m_context(Utils::Id("TerminalWidget_").withSuffix(QString::number((uintptr_t) this)))
|
||||
, m_openParameters(openParameters)
|
||||
{
|
||||
auto contextObj = new IContext(this);
|
||||
contextObj->setWidget(this);
|
||||
contextObj->setContext(m_context);
|
||||
ICore::addContextObject(contextObj);
|
||||
IContext::attach(this, m_context);
|
||||
|
||||
setupFont();
|
||||
setupColors();
|
||||
|
||||
Reference in New Issue
Block a user