forked from qt-creator/qt-creator
Allow nested IContexts and use it to give extra editor windows a context
The extra editor windows need to have editor manager context, otherwise shortcuts (like ctrl+tab) do not work in them if e.g. projects mode is active. Doing this via add/removeAdditionalContexts would be non-trivial and error prone, so adding a context to the extra window is more convenient. Since editors themselves already define a context, we need to allow nesting of contexts. Change-Id: I244eca53ebd665fd4d8fe7531e8ff701ed0b40b2 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -94,7 +94,6 @@ public:
|
||||
IContext *contextObject(QWidget *widget);
|
||||
void addContextObject(IContext *contex);
|
||||
void removeContextObject(IContext *contex);
|
||||
void resetContext();
|
||||
|
||||
Core::IDocument *openFiles(const QStringList &fileNames, ICore::OpenFilesFlags flags);
|
||||
|
||||
@@ -164,7 +163,7 @@ private slots:
|
||||
void openDelayedFiles();
|
||||
|
||||
private:
|
||||
void updateContextObject(IContext *context);
|
||||
void updateContextObject(const QList<IContext *> &context);
|
||||
void updateContext();
|
||||
|
||||
void registerDefaultContainers();
|
||||
@@ -197,7 +196,7 @@ private:
|
||||
Core::StatusBarWidget *m_outputView;
|
||||
VersionDialog *m_versionDialog;
|
||||
|
||||
IContext *m_activeContext;
|
||||
QList<IContext *> m_activeContext;
|
||||
|
||||
QMap<QWidget *, IContext *> m_contextWidgets;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user