Help: Clean up automatically registered documentation

It would keep documentation registered as long as the files are still
there, but that is actually not what is wanted. If you remove a Qt
version from Qt Creator, or switch between different Qt Creator
installations with different auto-detected Qt versions, the registered
documentation should be updated.
This also reduces the number of open files in these cases.

We keep a list of manually added documentation in the settings and treat
all other documentation as automatically managed.

Change-Id: I542f9aee0e62cab70db5afc5c6d6764d84cb253d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
This commit is contained in:
Eike Ziller
2014-12-02 17:51:14 +01:00
parent a1f8be4471
commit 877d482c85
6 changed files with 89 additions and 43 deletions

View File

@@ -57,7 +57,7 @@ private slots:
private:
bool eventFilter(QObject *object, QEvent *event);
void removeDocumentation(const QList<QListWidgetItem *> &items);
void addItem(const QString &nameSpace, const QString &fileName);
void addItem(const QString &nameSpace, const QString &fileName, bool userManaged);
private:
Ui::DocSettingsPage m_ui;
@@ -67,6 +67,7 @@ private:
typedef QHash<QString, QString> NameSpaceToPathHash;
NameSpaceToPathHash m_filesToRegister;
QHash<QString, bool> m_filesToRegisterUserManaged;
NameSpaceToPathHash m_filesToUnregister;
};