Introduced a single convenient function for updating additional contexts

While before you had to call add, then remove for each context id and
then call update, now you call updateAdditionalContexts with a list of
contexts to remove and add. It has the update step built in.

Reviewed-by: con
This commit is contained in:
Thorbjørn Lindeijer
2010-03-22 18:05:22 +01:00
parent a3b7290f37
commit 510971d216
12 changed files with 54 additions and 106 deletions

View File

@@ -114,11 +114,9 @@ public:
virtual QPrinter *printer() const;
IContext * currentContextObject() const;
QStatusBar *statusBar() const;
void addAdditionalContext(int context);
void removeAdditionalContext(int context);
bool hasContext(int context) const;
void updateContext();
void updateAdditionalContexts(const QList<int> &remove, const QList<int> &add);
bool hasContext(int context) const;
void setSuppressNavigationWidget(bool suppress);
@@ -168,6 +166,8 @@ private slots:
private:
void updateContextObject(IContext *context);
void updateContext();
void registerDefaultContainers();
void registerDefaultActions();
@@ -199,7 +199,7 @@ private:
Core::StatusBarWidget *m_outputView;
VersionDialog *m_versionDialog;
IContext * m_activeContext;
IContext *m_activeContext;
QMap<QWidget *, IContext *> m_contextWidgets;