forked from qt-creator/qt-creator
More Utils::toSet/toList
... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -210,7 +210,7 @@ void DocSettingsPage::addDocumentation()
|
||||
// file with the same namespace but a different path, we need to unregister the namespace before
|
||||
// we can register the new one. Help engine allows just one registered namespace.
|
||||
if (m_filesToUnregister.contains(nameSpace)) {
|
||||
QSet<QString> values = m_filesToUnregister.values(nameSpace).toSet();
|
||||
QSet<QString> values = Utils::toSet(m_filesToUnregister.values(nameSpace));
|
||||
values.remove(filePath);
|
||||
m_filesToUnregister.remove(nameSpace);
|
||||
foreach (const QString &value, values)
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <coreplugin/helpmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
@@ -99,7 +101,7 @@ void FilterSettingsPage::updateFilterPage()
|
||||
QSet<QString> attributes;
|
||||
filters = HelpManager::filters();
|
||||
for (it = filters.constBegin(); it != filters.constEnd(); ++it)
|
||||
attributes += it.value().toSet();
|
||||
attributes += Utils::toSet(it.value());
|
||||
|
||||
foreach (const QString &attribute, attributes)
|
||||
new QTreeWidgetItem(m_ui.attributeWidget, QStringList(attribute));
|
||||
|
||||
@@ -372,12 +372,12 @@ void HelpManager::setupHelpManager()
|
||||
d->cleanUpDocumentation();
|
||||
|
||||
if (!d->m_nameSpacesToUnregister.isEmpty()) {
|
||||
m_instance->unregisterDocumentation(d->m_nameSpacesToUnregister.toList());
|
||||
m_instance->unregisterDocumentation(Utils::toList(d->m_nameSpacesToUnregister));
|
||||
d->m_nameSpacesToUnregister.clear();
|
||||
}
|
||||
|
||||
if (!d->m_filesToRegister.isEmpty()) {
|
||||
m_instance->registerDocumentation(d->m_filesToRegister.toList());
|
||||
m_instance->registerDocumentation(Utils::toList(d->m_filesToRegister));
|
||||
d->m_filesToRegister.clear();
|
||||
}
|
||||
|
||||
@@ -432,13 +432,13 @@ const QStringList HelpManagerPrivate::documentationFromInstaller()
|
||||
|
||||
void HelpManagerPrivate::readSettings()
|
||||
{
|
||||
m_userRegisteredFiles = ICore::settings()->value(QLatin1String(kUserDocumentationKey))
|
||||
.toStringList().toSet();
|
||||
m_userRegisteredFiles = Utils::toSet(ICore::settings()->value(QLatin1String(kUserDocumentationKey))
|
||||
.toStringList());
|
||||
}
|
||||
|
||||
void HelpManagerPrivate::writeSettings()
|
||||
{
|
||||
const QStringList list = m_userRegisteredFiles.toList();
|
||||
const QStringList list = Utils::toList(m_userRegisteredFiles);
|
||||
ICore::settings()->setValue(QLatin1String(kUserDocumentationKey), list);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user