forked from qt-creator/qt-creator
Outline: Redo save/restore of settings
The OutlineStackWidget stored its position in the outline to be able to save/restore settings specific to the sub-widget (IOutlineWidget). However, the index can get out sync if another NavigationWidget with a lower index number is split, and the relative position changes. The change therefore avoids saving an index, and rather keeps the sum of all sub-widget settings in a QVariantMap, only reading and writing to the global settings object if necessary. The settings are also not stored in the [General] section anymore, but in a subgroup [Sidebar.Outline.X], where X is the index of the outline in the view. This avoids having to always iterate over all keys. No effort has been made to take over the old settings. I doubt anyone will notice, though. Change-Id: I85017cbb3e32b0a16da43ce6339deb7a053d6b09 Task-number: QTCREATORBUG-13614 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -74,8 +74,8 @@ public:
|
||||
// IOutlineWidget
|
||||
virtual QList<QAction*> filterMenuActions() const;
|
||||
virtual void setCursorSynchronization(bool syncWithCursor);
|
||||
virtual void restoreSettings(int position);
|
||||
virtual void saveSettings(int position);
|
||||
virtual void restoreSettings(const QVariantMap &map);
|
||||
virtual QVariantMap settings() const;
|
||||
|
||||
private slots:
|
||||
void modelUpdated();
|
||||
|
||||
Reference in New Issue
Block a user