forked from qt-creator/qt-creator
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:
@@ -80,14 +80,9 @@ QSettings *CorePrototype::settings() const
|
||||
return callee()->settings();
|
||||
}
|
||||
|
||||
void CorePrototype::addAdditionalContext(int context)
|
||||
void CorePrototype::updateAdditionalContexts(const QList<int> &remove, const QList<int> &add)
|
||||
{
|
||||
callee()->addAdditionalContext(context);
|
||||
}
|
||||
|
||||
void CorePrototype::removeAdditionalContext(int context)
|
||||
{
|
||||
callee()->removeAdditionalContext(context);
|
||||
callee()->updateAdditionalContexts(remove, add);
|
||||
}
|
||||
|
||||
QString CorePrototype::toString() const
|
||||
|
||||
@@ -66,8 +66,7 @@ public:
|
||||
QSettings *settings() const;
|
||||
|
||||
public slots:
|
||||
void addAdditionalContext(int context);
|
||||
void removeAdditionalContext(int context);
|
||||
void updateAdditionalContexts(const QList<int> &remove, const QList<int> &add);
|
||||
QString toString() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user