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:
@@ -67,6 +67,8 @@
|
||||
#include <tokencommand.h>
|
||||
#include <removesharedmemorycommand.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlApplicationEngine>
|
||||
@@ -88,7 +90,10 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
bool testImportStatements(const QStringList &importStatementList, const QUrl &url, QString *errorMessage = 0) {
|
||||
|
||||
bool testImportStatements(const QStringList &importStatementList,
|
||||
const QUrl &url, QString *errorMessage = nullptr)
|
||||
{
|
||||
if (importStatementList.isEmpty())
|
||||
return false;
|
||||
// ToDo: move engine outside of this function, this makes it expensive
|
||||
@@ -455,7 +460,7 @@ void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &contain
|
||||
|
||||
delete m_importComponent.data();
|
||||
delete m_importComponentObject.data();
|
||||
const QStringList importStatementList(importStatementSet.toList());
|
||||
const QStringList importStatementList = Utils::toList(importStatementSet);
|
||||
const QStringList fullImportStatementList(QStringList(qtQuickImport) + importStatementList);
|
||||
|
||||
// check possible import statements combinations
|
||||
|
@@ -60,6 +60,8 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
||||
@@ -166,13 +168,14 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
sendTokenBack();
|
||||
|
||||
if (!informationChangedInstanceSet.isEmpty())
|
||||
nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(informationChangedInstanceSet.toList()));
|
||||
nodeInstanceClient()->informationChanged(
|
||||
createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet)));
|
||||
|
||||
if (!propertyChangedList.isEmpty())
|
||||
nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
|
||||
|
||||
if (!m_parentChangedSet.isEmpty()) {
|
||||
sendChildrenChangedCommand(m_parentChangedSet.toList());
|
||||
sendChildrenChangedCommand(Utils::toList(m_parentChangedSet));
|
||||
m_parentChangedSet.clear();
|
||||
}
|
||||
|
||||
|
@@ -60,6 +60,8 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5RenderNodeInstanceServer::Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
||||
@@ -94,7 +96,7 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
clearChangedPropertyList();
|
||||
|
||||
if (!m_dirtyInstanceSet.isEmpty()) {
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(m_dirtyInstanceSet.toList()));
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(Utils::toList(m_dirtyInstanceSet)));
|
||||
m_dirtyInstanceSet.clear();
|
||||
}
|
||||
|
||||
|
@@ -62,6 +62,8 @@
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Qt5TestNodeInstanceServer::Qt5TestNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient)
|
||||
@@ -288,7 +290,8 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm
|
||||
clearChangedPropertyList();
|
||||
|
||||
if (!informationChangedInstanceSet.isEmpty()) {
|
||||
InformationChangedCommand command = createAllInformationChangedCommand(informationChangedInstanceSet.toList());
|
||||
InformationChangedCommand command
|
||||
= createAllInformationChangedCommand(Utils::toList(informationChangedInstanceSet));
|
||||
command.sort();
|
||||
nodeInstanceClient()->informationChanged(command);
|
||||
}
|
||||
@@ -299,7 +302,7 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm
|
||||
}
|
||||
|
||||
if (!parentChangedSet.isEmpty())
|
||||
sendChildrenChangedCommand(parentChangedSet.toList());
|
||||
sendChildrenChangedCommand(Utils::toList(parentChangedSet));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,8 @@
|
||||
#include <cplusplus/Scope.h>
|
||||
#include <cplusplus/Control.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QStack>
|
||||
#include <QHash>
|
||||
#include <QVarLengthArray>
|
||||
@@ -1175,7 +1177,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name,
|
||||
if (!name->isTemplateNameId())
|
||||
_alreadyConsideredClasses.insert(referenceClass);
|
||||
|
||||
QSet<ClassOrNamespace *> knownUsings = reference->usings().toSet();
|
||||
QSet<ClassOrNamespace *> knownUsings = Utils::toSet(reference->usings());
|
||||
|
||||
// If we are dealling with a template type, more work is required, since we need to
|
||||
// construct all instantiation data.
|
||||
|
@@ -50,6 +50,8 @@
|
||||
#include "qmt/tasks/diagramscenecontroller.h"
|
||||
#include "qmt/tasks/ielementtasks.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QSet>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
@@ -514,8 +516,8 @@ bool DiagramSceneModel::exportSvg(const QString &fileName, bool selectedElements
|
||||
|
||||
return true;
|
||||
#else // QT_NO_SVG
|
||||
Q_UNUSED(fileName);
|
||||
Q_UNUSED(selectedElements);
|
||||
Q_UNUSED(fileName)
|
||||
Q_UNUSED(selectedElements)
|
||||
return false;
|
||||
#endif // QT_NO_SVG
|
||||
}
|
||||
@@ -639,7 +641,7 @@ void DiagramSceneModel::keyReleaseEvent(QKeyEvent *event)
|
||||
|
||||
void DiagramSceneModel::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
updateFocusItem(QSet<QGraphicsItem *>::fromList(m_graphicsScene->selectedItems()));
|
||||
updateFocusItem(Utils::toSet(m_graphicsScene->selectedItems()));
|
||||
m_latchController->mousePressEventLatching(event);
|
||||
mousePressEventReparenting(event);
|
||||
}
|
||||
@@ -681,7 +683,7 @@ void DiagramSceneModel::mouseReleaseEventReparenting(QGraphicsSceneMouseEvent *e
|
||||
if (event->modifiers() & Qt::AltModifier) {
|
||||
ModelController *modelController = diagramController()->modelController();
|
||||
MPackage *newOwner = nullptr;
|
||||
QSet<QGraphicsItem *> selectedItemSet = m_graphicsScene->selectedItems().toSet();
|
||||
QSet<QGraphicsItem *> selectedItemSet = Utils::toSet(m_graphicsScene->selectedItems());
|
||||
QList<QGraphicsItem *> itemsUnderMouse = m_graphicsScene->items(event->scenePos());
|
||||
foreach (QGraphicsItem *item, itemsUnderMouse) {
|
||||
if (!selectedItemSet.contains(item)) {
|
||||
@@ -840,7 +842,7 @@ void DiagramSceneModel::onSelectionChanged()
|
||||
bool selectionChanged = false;
|
||||
|
||||
// collect and update all primary selected items (selected by user)
|
||||
QSet<QGraphicsItem *> newSelectedItems = QSet<QGraphicsItem *>::fromList(m_graphicsScene->selectedItems());
|
||||
QSet<QGraphicsItem *> newSelectedItems = Utils::toSet(m_graphicsScene->selectedItems());
|
||||
updateFocusItem(newSelectedItems);
|
||||
foreach (QGraphicsItem *item, m_selectedItems) {
|
||||
if (!newSelectedItems.contains(item)) {
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "qmljsutils.h"
|
||||
#include "parser/qmljsast_p.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QColor>
|
||||
@@ -666,7 +667,7 @@ Check::Check(Document::Ptr doc, const ContextPtr &context)
|
||||
_isQtQuick2 = isQtQuick2();
|
||||
}
|
||||
|
||||
_enabledMessages = Message::allMessageTypes().toSet();
|
||||
_enabledMessages = Utils::toSet(Message::allMessageTypes());
|
||||
disableMessage(HintAnonymousFunctionSpacing);
|
||||
disableMessage(HintDeclareVarsInOneLine);
|
||||
disableMessage(HintDeclarationsShouldBeAtStartOfFunction);
|
||||
@@ -1539,7 +1540,7 @@ void Check::scanCommentsForAnnotations()
|
||||
|
||||
// enable all checks annotation
|
||||
if (comment.contains("@enable-all-checks"))
|
||||
_enabledMessages = Message::allMessageTypes().toSet();
|
||||
_enabledMessages = Utils::toSet(Message::allMessageTypes());
|
||||
|
||||
// find all disable annotations
|
||||
int lastOffset = -1;
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "qmljsinterpreter.h"
|
||||
#include "qmljsviewercontext.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qrcparser.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -521,7 +522,7 @@ QByteArray DependencyInfo::calculateFingerprint(const ImportDependencies &deps)
|
||||
{
|
||||
QCryptographicHash hash(QCryptographicHash::Sha1);
|
||||
rootImport.addToHash(hash);
|
||||
QStringList coreImports = allCoreImports.toList();
|
||||
QStringList coreImports = Utils::toList(allCoreImports);
|
||||
coreImports.sort();
|
||||
foreach (const QString importId, coreImports) {
|
||||
hash.addData(reinterpret_cast<const char*>(importId.constData()), importId.size() * sizeof(QChar));
|
||||
@@ -529,9 +530,9 @@ QByteArray DependencyInfo::calculateFingerprint(const ImportDependencies &deps)
|
||||
hash.addData(coreImportFingerprint);
|
||||
}
|
||||
hash.addData("/", 1);
|
||||
QList<ImportKey> imports(allImports.toList());
|
||||
QList<ImportKey> imports = Utils::toList(allImports);
|
||||
std::sort(imports.begin(), imports.end());
|
||||
foreach (const ImportKey &k, imports)
|
||||
for (const ImportKey &k : qAsConst(imports))
|
||||
k.addToHash(hash);
|
||||
return hash.result();
|
||||
}
|
||||
|
@@ -82,15 +82,15 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion)
|
||||
paths.insert(it.fileInfo().absolutePath());
|
||||
}
|
||||
}
|
||||
return paths.toList();
|
||||
return Utils::toList(paths);
|
||||
}
|
||||
|
||||
static QStringList uniquePaths(const QStringList &files)
|
||||
{
|
||||
QSet<QString> paths;
|
||||
foreach (const QString &file, files)
|
||||
paths<<QFileInfo(file).absolutePath();
|
||||
return paths.toList();
|
||||
for (const QString &file : files)
|
||||
paths << QFileInfo(file).absolutePath();
|
||||
return Utils::toList(paths);
|
||||
}
|
||||
|
||||
static QStringList getSoLibSearchPath(const ProjectNode *node)
|
||||
|
@@ -306,7 +306,7 @@ void AndroidSdkModel::selectMissingEssentials()
|
||||
|
||||
QList<const AndroidSdkPackage *> AndroidSdkModel::userSelection() const
|
||||
{
|
||||
return m_changeState.toList();
|
||||
return Utils::toList(m_changeState);
|
||||
}
|
||||
|
||||
void AndroidSdkModel::resetSelection()
|
||||
|
@@ -239,7 +239,7 @@ static void fetchAndMergeBaseTestFunctions(const QSet<QString> &baseClasses,
|
||||
const CPlusPlus::Document::Ptr &doc,
|
||||
const CPlusPlus::Snapshot &snapshot)
|
||||
{
|
||||
QList<QString> bases = baseClasses.toList();
|
||||
QList<QString> bases = Utils::toList(baseClasses);
|
||||
while (!bases.empty()) {
|
||||
const QString base = bases.takeFirst();
|
||||
TestVisitor baseVisitor(base, snapshot);
|
||||
@@ -250,7 +250,7 @@ static void fetchAndMergeBaseTestFunctions(const QSet<QString> &baseClasses,
|
||||
baseVisitor.accept(declaringDoc->globalNamespace());
|
||||
if (!baseVisitor.resultValid())
|
||||
continue;
|
||||
bases.append(baseVisitor.baseClasses().toList());
|
||||
bases.append(Utils::toList(baseVisitor.baseClasses()));
|
||||
mergeTestFunctions(testFunctions, baseVisitor.privateSlots());
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,8 @@ void QtCreatorClangQueryFindFilter::prepareFind()
|
||||
|
||||
const CppTools::ProjectInfo projectInfo = CppTools::CppModelManager::instance()->projectInfo(currentProject);
|
||||
|
||||
setProjectParts(projectInfo.projectParts().toStdVector());
|
||||
const QVector<CppTools::ProjectPart::Ptr> parts = projectInfo.projectParts();
|
||||
setProjectParts({parts.begin(), parts.end()});
|
||||
|
||||
setUnsavedContent(createUnsavedContents());
|
||||
}
|
||||
|
@@ -128,10 +128,10 @@ void ClangToolsProjectSettings::store()
|
||||
m_project->setNamedSettings(SETTINGS_KEY_DIAGNOSTIC_CONFIG, m_diagnosticConfig.toSetting());
|
||||
m_project->setNamedSettings(SETTINGS_KEY_BUILD_BEFORE_ANALYSIS, m_buildBeforeAnalysis);
|
||||
|
||||
const QStringList dirs = Utils::transform(m_selectedDirs.toList(), &Utils::FilePath::toString);
|
||||
const QStringList dirs = Utils::transform<QList>(m_selectedDirs, &Utils::FilePath::toString);
|
||||
m_project->setNamedSettings(SETTINGS_KEY_SELECTED_DIRS, dirs);
|
||||
|
||||
const QStringList files = Utils::transform(m_selectedFiles.toList(), &Utils::FilePath::toString);
|
||||
const QStringList files = Utils::transform<QList>(m_selectedFiles, &Utils::FilePath::toString);
|
||||
m_project->setNamedSettings(SETTINGS_KEY_SELECTED_FILES, files);
|
||||
|
||||
QVariantList list;
|
||||
|
@@ -587,8 +587,7 @@ void Parser::clearCache()
|
||||
|
||||
void Parser::setFileList(const QStringList &fileList)
|
||||
{
|
||||
d->fileList.clear();
|
||||
d->fileList = QSet<QString>::fromList(fileList);
|
||||
d->fileList = ::Utils::toSet(fileList);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@@ -294,7 +294,7 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc)
|
||||
{
|
||||
CMakeConfigItem paths;
|
||||
paths.key = "ANDROID_SO_LIBS_PATHS";
|
||||
paths.values = res.toList();
|
||||
paths.values = Utils::toList(res);
|
||||
patchedConfig.append(paths);
|
||||
}
|
||||
|
||||
|
@@ -297,7 +297,7 @@ void TeaLeafReader::generateProjectTree(CMakeProjectNode *root, const QList<cons
|
||||
= Utils::filtered(bt.includeFiles, [this](const Utils::FilePath &fn) {
|
||||
return fn.isChildOf(m_parameters.sourceDirectory);
|
||||
});
|
||||
allIncludePathSet.unite(QSet<FilePath>::fromList(targetIncludePaths));
|
||||
allIncludePathSet.unite(Utils::toSet(targetIncludePaths));
|
||||
}
|
||||
const QList<FilePath> allIncludePaths = allIncludePathSet.toList();
|
||||
|
||||
|
@@ -382,7 +382,7 @@ static void onReplaceUsagesClicked(const QString &text,
|
||||
|
||||
const QStringList fileNames = TextEditor::BaseFileFind::replaceAll(text, items, preserveCase);
|
||||
if (!fileNames.isEmpty()) {
|
||||
modelManager->updateSourceFiles(fileNames.toSet());
|
||||
modelManager->updateSourceFiles(Utils::toSet(fileNames));
|
||||
SearchResultWindow::instance()->hide();
|
||||
}
|
||||
}
|
||||
|
@@ -36,6 +36,8 @@
|
||||
|
||||
#include <cplusplus/CppRewriter.h>
|
||||
#include <cplusplus/Overview.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/changeset.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
@@ -1086,11 +1088,11 @@ void InsertVirtualMethodsDialog::saveSettings()
|
||||
m_settings->overrideReplacementIndex = m_overrideReplacementComboBox->currentIndex();
|
||||
if (m_overrideReplacementComboBox && m_overrideReplacementComboBox->isEnabled())
|
||||
m_settings->overrideReplacement = m_overrideReplacementComboBox->currentText().trimmed();
|
||||
QSet<QString> addedReplacements = m_availableOverrideReplacements.toSet();
|
||||
QSet<QString> addedReplacements = Utils::toSet(m_availableOverrideReplacements);
|
||||
addedReplacements.insert(m_settings->overrideReplacement);
|
||||
addedReplacements.subtract(defaultOverrideReplacements().toSet());
|
||||
addedReplacements.subtract(Utils::toSet(defaultOverrideReplacements()));
|
||||
m_settings->userAddedOverrideReplacements =
|
||||
sortedAndTrimmedStringListWithoutEmptyElements(addedReplacements.toList());
|
||||
sortedAndTrimmedStringListWithoutEmptyElements(Utils::toList(addedReplacements));
|
||||
m_settings->write();
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <projectexplorer/projectmacro.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace CPlusPlus;
|
||||
@@ -269,7 +270,7 @@ void BuiltinEditorDocumentParser::addFileAndDependencies(Snapshot *snapshot,
|
||||
toRemove->insert(fileName);
|
||||
if (fileName != Utils::FilePath::fromString(filePath())) {
|
||||
Utils::FilePathList deps = snapshot->filesDependingOn(fileName);
|
||||
toRemove->unite(QSet<Utils::FilePath>::fromList(deps));
|
||||
toRemove->unite(Utils::toSet(deps));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -197,7 +197,7 @@ void index(QFutureInterface<void> &indexingFuture,
|
||||
const int sourceCount = sources.size();
|
||||
QStringList files = sources + headers;
|
||||
|
||||
sourceProcessor->setTodo(files.toSet());
|
||||
sourceProcessor->setTodo(Utils::toSet(files));
|
||||
|
||||
const QString conf = CppModelManager::configurationFileName();
|
||||
bool processingHeaders = false;
|
||||
|
@@ -381,7 +381,7 @@ private:
|
||||
|
||||
levelNode->childDirectories.append(checkNode);
|
||||
|
||||
m_topics.unite(check.topics.toSet());
|
||||
m_topics.unite(Utils::toSet(check.topics));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1003,7 +1003,7 @@ void ClangDiagnosticConfigsWidget::setupTabs()
|
||||
setupTreeView(m_clazyChecks->checksView, m_clazySortFilterProxyModel, 2);
|
||||
m_clazyChecks->checksView->setSortingEnabled(true);
|
||||
m_clazyChecks->checksView->sortByColumn(0, Qt::AscendingOrder);
|
||||
auto topicsModel = new QStringListModel(m_clazyTreeModel->topics().toList(), this);
|
||||
auto topicsModel = new QStringListModel(Utils::toList(m_clazyTreeModel->topics()), this);
|
||||
topicsModel->sort(0);
|
||||
m_clazyChecks->topicsView->setModel(topicsModel);
|
||||
connect(m_clazyChecks->topicsResetButton, &QPushButton::clicked, [this](){
|
||||
|
@@ -388,7 +388,7 @@ void CppToolsPlugin::test_global_completion()
|
||||
QVERIFY(test.succeededSoFar());
|
||||
const QStringList completions = test.getCompletions();
|
||||
QVERIFY(isProbablyGlobalCompletion(completions));
|
||||
QVERIFY(completions.toSet().contains(requiredCompletionItems.toSet()));
|
||||
QVERIFY(Utils::toSet(completions).contains(Utils::toSet(requiredCompletionItems)));
|
||||
}
|
||||
|
||||
void CppToolsPlugin::test_doxygen_tag_completion_data()
|
||||
|
@@ -402,7 +402,7 @@ void CppFindReferences::onReplaceButtonClicked(const QString &text,
|
||||
{
|
||||
const QStringList fileNames = TextEditor::BaseFileFind::replaceAll(text, items, preserveCase);
|
||||
if (!fileNames.isEmpty()) {
|
||||
m_modelManager->updateSourceFiles(fileNames.toSet());
|
||||
m_modelManager->updateSourceFiles(Utils::toSet(fileNames));
|
||||
SearchResultWindow::instance()->hide();
|
||||
}
|
||||
|
||||
|
@@ -479,7 +479,7 @@ void CppModelManager::initCppTools()
|
||||
this, &CppModelManager::updateModifiedSourceFiles);
|
||||
connect(Core::DocumentManager::instance(), &Core::DocumentManager::filesChangedInternally,
|
||||
[this](const QStringList &files) {
|
||||
updateSourceFiles(files.toSet());
|
||||
updateSourceFiles(Utils::toSet(files));
|
||||
});
|
||||
|
||||
connect(this, &CppModelManager::documentUpdated,
|
||||
@@ -925,7 +925,7 @@ public:
|
||||
{
|
||||
QSet<QString> removed = projectPartIds(m_old.projectParts());
|
||||
removed.subtract(projectPartIds(m_new.projectParts()));
|
||||
return removed.toList();
|
||||
return Utils::toList(removed);
|
||||
}
|
||||
|
||||
/// Returns a list of common files that have a changed timestamp.
|
||||
@@ -1020,7 +1020,7 @@ void CppModelManager::updateCppEditorDocuments(bool projectsUpdated) const
|
||||
|
||||
// Mark invisible documents dirty
|
||||
QSet<Core::IDocument *> invisibleCppEditorDocuments
|
||||
= Core::DocumentModel::openedDocuments().toSet();
|
||||
= Utils::toSet(Core::DocumentModel::openedDocuments());
|
||||
invisibleCppEditorDocuments.subtract(visibleCppEditorDocuments);
|
||||
foreach (Core::IDocument *document, invisibleCppEditorDocuments) {
|
||||
const QString filePath = document->filePath().toString();
|
||||
@@ -1085,7 +1085,7 @@ QFuture<void> CppModelManager::updateProjectInfo(QFutureInterface<void> &futureI
|
||||
const QSet<QString> removedFiles = comparer.removedFiles();
|
||||
if (!removedFiles.isEmpty()) {
|
||||
filesRemoved = true;
|
||||
emit aboutToRemoveFiles(removedFiles.toList());
|
||||
emit aboutToRemoveFiles(Utils::toList(removedFiles));
|
||||
removeFilesFromSnapshot(removedFiles);
|
||||
}
|
||||
}
|
||||
@@ -1150,9 +1150,8 @@ QList<ProjectPart::Ptr> CppModelManager::projectPartFromDependencies(
|
||||
const Utils::FilePathList deps = snapshot().filesDependingOn(fileName);
|
||||
|
||||
QMutexLocker locker(&d->m_projectMutex);
|
||||
foreach (const Utils::FilePath &dep, deps) {
|
||||
parts.unite(QSet<ProjectPart::Ptr>::fromList(d->m_fileToProjectParts.value(dep)));
|
||||
}
|
||||
for (const Utils::FilePath &dep : deps)
|
||||
parts.unite(Utils::toSet(d->m_fileToProjectParts.value(dep)));
|
||||
|
||||
return parts.values();
|
||||
}
|
||||
@@ -1218,10 +1217,10 @@ void CppModelManager::delayedGC()
|
||||
|
||||
static QStringList removedProjectParts(const QStringList &before, const QStringList &after)
|
||||
{
|
||||
QSet<QString> b = before.toSet();
|
||||
b.subtract(after.toSet());
|
||||
QSet<QString> b = Utils::toSet(before);
|
||||
b.subtract(Utils::toSet(after));
|
||||
|
||||
return b.toList();
|
||||
return Utils::toList(b);
|
||||
}
|
||||
|
||||
void CppModelManager::onAboutToRemoveProject(ProjectExplorer::Project *project)
|
||||
|
@@ -568,7 +568,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
|
||||
{"foo.h", "foo.cpp", "main.cpp"});
|
||||
|
||||
refreshedFiles = helper.updateProjectInfo(project1.projectInfo);
|
||||
QCOMPARE(refreshedFiles, project1.projectFiles.toSet());
|
||||
QCOMPARE(refreshedFiles, Utils::toSet(project1.projectFiles));
|
||||
const int snapshotSizeAfterProject1 = mm->snapshot().size();
|
||||
|
||||
foreach (const QString &file, project1.projectFiles)
|
||||
@@ -580,7 +580,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
|
||||
{"bar.h", "bar.cpp", "main.cpp"});
|
||||
|
||||
refreshedFiles = helper.updateProjectInfo(project2.projectInfo);
|
||||
QCOMPARE(refreshedFiles, project2.projectFiles.toSet());
|
||||
QCOMPARE(refreshedFiles, Utils::toSet(project2.projectFiles));
|
||||
|
||||
const int snapshotSizeAfterProject2 = mm->snapshot().size();
|
||||
QVERIFY(snapshotSizeAfterProject2 > snapshotSizeAfterProject1);
|
||||
|
@@ -129,7 +129,7 @@ void SymbolsFindFilter::startSearch(SearchResult *search)
|
||||
QSet<QString> projectFileNames;
|
||||
if (parameters.scope == SymbolSearcher::SearchProjectsOnly) {
|
||||
for (ProjectExplorer::Project *project : ProjectExplorer::SessionManager::projects())
|
||||
projectFileNames += Utils::transform(project->files(ProjectExplorer::Project::AllFiles), &Utils::FilePath::toString).toSet();
|
||||
projectFileNames += Utils::transform<QSet>(project->files(ProjectExplorer::Project::AllFiles), &Utils::FilePath::toString);
|
||||
}
|
||||
|
||||
auto watcher = new QFutureWatcher<SearchResultItem>;
|
||||
|
@@ -2439,7 +2439,7 @@ GlobalBreakpoints BreakpointManager::findBreakpointsByIndex(const QList<QModelIn
|
||||
if (GlobalBreakpoint gbp = findBreakpointByIndex(index))
|
||||
items.insert(gbp);
|
||||
}
|
||||
return items.toList();
|
||||
return Utils::toList(items);
|
||||
}
|
||||
|
||||
GlobalBreakpoint BreakpointManager::createBreakpoint(const BreakpointParameters ¶ms)
|
||||
|
@@ -506,7 +506,7 @@ void DebuggerMainWindow::savePersistentSettings()
|
||||
|
||||
QSettings *settings = ICore::settings();
|
||||
settings->beginGroup(MAINWINDOW_KEY);
|
||||
settings->setValue(CHANGED_DOCK_KEY, QStringList(changedDocks.toList()));
|
||||
settings->setValue(CHANGED_DOCK_KEY, QStringList(Utils::toList(changedDocks)));
|
||||
settings->setValue(STATE_KEY, states);
|
||||
settings->setValue(AUTOHIDE_TITLEBARS_KEY, theMainWindow->autoHideTitleBars());
|
||||
settings->setValue(SHOW_CENTRALWIDGET_KEY, theMainWindow->isCentralWidgetShown());
|
||||
|
@@ -2805,9 +2805,9 @@ GitClient::RevertResult GitClient::revertI(QStringList files,
|
||||
QStringList stagedFiles = allStagedFiles;
|
||||
QStringList unstagedFiles = allUnstagedFiles;
|
||||
if (!isDirectory) {
|
||||
const QSet<QString> filesSet = files.toSet();
|
||||
stagedFiles = allStagedFiles.toSet().intersect(filesSet).toList();
|
||||
unstagedFiles = allUnstagedFiles.toSet().intersect(filesSet).toList();
|
||||
const QSet<QString> filesSet = Utils::toSet(files);
|
||||
stagedFiles = Utils::toList(Utils::toSet(allStagedFiles).intersect(filesSet));
|
||||
unstagedFiles = Utils::toList(Utils::toSet(allUnstagedFiles).intersect(filesSet));
|
||||
}
|
||||
if ((!revertStaging || stagedFiles.empty()) && unstagedFiles.empty())
|
||||
return RevertUnchanged;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "iosprobe.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -118,7 +119,7 @@ void XcodeProbe::setupDefaultToolchains(const QString &devPath)
|
||||
const QFileInfo sdkPathInfo(sdk.path.toString());
|
||||
if (sdkPathInfo.exists() && sdkPathInfo.isDir()) {
|
||||
clangProfile.sdks.push_back(sdk);
|
||||
allArchitectures += sdk.architectures.toSet();
|
||||
allArchitectures += Utils::toSet(sdk.architectures);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,8 @@
|
||||
#include "qmt/tasks/diagramscenecontroller.h"
|
||||
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QAction>
|
||||
@@ -154,7 +156,7 @@ void PxNodeController::addFileSystemEntry(const QString &filePath, int line, int
|
||||
auto menu = new QMenu;
|
||||
menu->addAction(new MenuAction(tr("Add Component %1").arg(elementName), elementName,
|
||||
MenuAction::TYPE_ADD_COMPONENT, menu));
|
||||
QStringList classNames = d->classViewController->findClassDeclarations(filePath, line, column).toList();
|
||||
QStringList classNames = Utils::toList(d->classViewController->findClassDeclarations(filePath, line, column));
|
||||
if (!classNames.empty()) {
|
||||
menu->addSeparator();
|
||||
int index = 0;
|
||||
|
@@ -64,7 +64,7 @@ DeployableFile DeploymentData::deployableForLocalFile(const QString &localFilePa
|
||||
|
||||
bool DeploymentData::operator==(const DeploymentData &other) const
|
||||
{
|
||||
return m_files.toSet() == other.m_files.toSet()
|
||||
return Utils::toSet(m_files) == Utils::toSet(other.m_files)
|
||||
&& m_localInstallRoot == other.m_localInstallRoot;
|
||||
}
|
||||
|
||||
|
@@ -215,7 +215,7 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
|
||||
if (overwriteDialog.exec() != QDialog::Accepted)
|
||||
return OverwriteCanceled;
|
||||
|
||||
const QSet<QString> existingFilesToKeep = QSet<QString>::fromList(overwriteDialog.uncheckedFiles());
|
||||
const QSet<QString> existingFilesToKeep = Utils::toSet(overwriteDialog.uncheckedFiles());
|
||||
if (existingFilesToKeep.size() == files->size()) // All exist & all unchecked->Cancel.
|
||||
return OverwriteCanceled;
|
||||
|
||||
|
@@ -226,14 +226,14 @@ public:
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setColumnStretch(1, 2);
|
||||
|
||||
QList<Core::Id> languageList = ToolChainManager::allLanguages().toList();
|
||||
QList<Core::Id> languageList = Utils::toList(ToolChainManager::allLanguages());
|
||||
Utils::sort(languageList, [](Core::Id l1, Core::Id l2) {
|
||||
return ToolChainManager::displayNameOfLanguageId(l1)
|
||||
< ToolChainManager::displayNameOfLanguageId(l2);
|
||||
});
|
||||
QTC_ASSERT(!languageList.isEmpty(), return);
|
||||
int row = 0;
|
||||
foreach (Core::Id l, languageList) {
|
||||
for (Core::Id l : qAsConst(languageList)) {
|
||||
layout->addWidget(new QLabel(ToolChainManager::displayNameOfLanguageId(l) + ':'), row, 0);
|
||||
auto cb = new QComboBox;
|
||||
cb->setSizePolicy(QSizePolicy::Ignored, cb->sizePolicy().verticalPolicy());
|
||||
@@ -385,7 +385,7 @@ Tasks ToolChainKitAspect::validate(const Kit *k) const
|
||||
}
|
||||
if (targetAbis.count() != 1) {
|
||||
result << Task(Task::Error, tr("Compilers produce code for different ABIs: %1")
|
||||
.arg(Utils::transform(targetAbis, &Abi::toString).toList().join(", ")),
|
||||
.arg(Utils::transform<QList>(targetAbis, &Abi::toString).join(", ")),
|
||||
Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
}
|
||||
@@ -606,7 +606,7 @@ QList<ToolChain *> ToolChainKitAspect::toolChains(const Kit *k)
|
||||
|
||||
const QVariantMap value = k->value(ToolChainKitAspect::id()).toMap();
|
||||
const QList<ToolChain *> tcList
|
||||
= Utils::transform(ToolChainManager::allLanguages().toList(),
|
||||
= Utils::transform<QList>(ToolChainManager::allLanguages(),
|
||||
[&value](Core::Id l) -> ToolChain * {
|
||||
return ToolChainManager::findToolChain(value.value(l.toString()).toByteArray());
|
||||
});
|
||||
|
@@ -55,7 +55,7 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
|
||||
|
||||
void SelectableFilesModel::setInitialMarkedFiles(const Utils::FilePathList &files)
|
||||
{
|
||||
m_files = files.toSet();
|
||||
m_files = Utils::toSet(files);
|
||||
m_allFiles = files.isEmpty();
|
||||
}
|
||||
|
||||
@@ -320,14 +320,14 @@ void SelectableFilesModel::collectPaths(Tree *root, Utils::FilePathList *result)
|
||||
|
||||
Utils::FilePathList SelectableFilesModel::selectedFiles() const
|
||||
{
|
||||
Utils::FilePathList result = m_outOfBaseDirFiles.toList();
|
||||
Utils::FilePathList result = Utils::toList(m_outOfBaseDirFiles);
|
||||
collectFiles(m_root, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesModel::preservedFiles() const
|
||||
{
|
||||
return m_outOfBaseDirFiles.toList();
|
||||
return Utils::toList(m_outOfBaseDirFiles);
|
||||
}
|
||||
|
||||
bool SelectableFilesModel::hasCheckedFiles() const
|
||||
|
@@ -347,7 +347,7 @@ DeploymentData Target::deploymentData() const
|
||||
|
||||
void Target::setApplicationTargets(const QList<BuildTargetInfo> &appTargets)
|
||||
{
|
||||
if (appTargets.toSet() != d->m_appTargets.toSet()) {
|
||||
if (Utils::toSet(appTargets) != Utils::toSet(d->m_appTargets)) {
|
||||
d->m_appTargets = appTargets;
|
||||
emit applicationTargetsChanged();
|
||||
}
|
||||
|
@@ -190,7 +190,7 @@ public:
|
||||
m_addButton = new QPushButton(ToolChainOptionsPage::tr("Add"), this);
|
||||
auto addMenu = new QMenu;
|
||||
foreach (ToolChainFactory *factory, m_factories) {
|
||||
QList<Core::Id> languages = factory->supportedLanguages().toList();
|
||||
QList<Core::Id> languages = Utils::toList(factory->supportedLanguages());
|
||||
if (languages.isEmpty())
|
||||
continue;
|
||||
|
||||
|
@@ -89,7 +89,7 @@ static QList<ToolChain *> makeUniqueByEqual(const QList<ToolChain *> &a)
|
||||
|
||||
static QList<ToolChain *> makeUniqueByPointerEqual(const QList<ToolChain *> &a)
|
||||
{
|
||||
return QSet<ToolChain *>::fromList(a).toList();
|
||||
return Utils::toList(Utils::toSet(a));
|
||||
}
|
||||
|
||||
static QList<ToolChain *> subtractById(const QList<ToolChain *> &a, const QList<ToolChain *> &b)
|
||||
@@ -480,12 +480,12 @@ void ProjectExplorerPlugin::testToolChainMerging()
|
||||
|
||||
Internal::ToolChainOperations ops = Internal::mergeToolChainLists(system, user, autodetect);
|
||||
|
||||
QSet<ToolChain *> expToRegister = QSet<ToolChain *>::fromList(toRegister);
|
||||
QSet<ToolChain *> expToDemote = QSet<ToolChain *>::fromList(toDemote);
|
||||
QSet<ToolChain *> expToRegister = Utils::toSet(toRegister);
|
||||
QSet<ToolChain *> expToDemote = Utils::toSet(toDemote);
|
||||
|
||||
QSet<ToolChain *> actToRegister = QSet<ToolChain *>::fromList(ops.toRegister);
|
||||
QSet<ToolChain *> actToDemote = QSet<ToolChain *>::fromList(ops.toDemote);
|
||||
QSet<ToolChain *> actToDelete = QSet<ToolChain *>::fromList(ops.toDelete);
|
||||
QSet<ToolChain *> actToRegister = Utils::toSet(ops.toRegister);
|
||||
QSet<ToolChain *> actToDemote = Utils::toSet(ops.toDemote);
|
||||
QSet<ToolChain *> actToDelete = Utils::toSet(ops.toDelete);
|
||||
|
||||
QCOMPARE(actToRegister.count(), ops.toRegister.count()); // no dups!
|
||||
QCOMPARE(actToDemote.count(), ops.toDemote.count()); // no dups!
|
||||
@@ -501,12 +501,12 @@ void ProjectExplorerPlugin::testToolChainMerging()
|
||||
|
||||
tmp = actToRegister;
|
||||
tmp.unite(actToDelete);
|
||||
QCOMPARE(tmp, QSet<ToolChain *>::fromList(system + user + autodetect)); // All input is accounted for
|
||||
QCOMPARE(tmp, Utils::toSet(system + user + autodetect)); // All input is accounted for
|
||||
|
||||
QCOMPARE(expToRegister, actToRegister);
|
||||
QCOMPARE(expToDemote, actToDemote);
|
||||
QCOMPARE(QSet<ToolChain *>::fromList(system + user + autodetect),
|
||||
QSet<ToolChain *>::fromList(ops.toRegister + ops.toDemote + ops.toDelete));
|
||||
QCOMPARE(Utils::toSet(system + user + autodetect),
|
||||
Utils::toSet(ops.toRegister + ops.toDemote + ops.toDelete));
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
@@ -392,7 +392,7 @@ static QStringList readLinesJson(const Utils::FilePath &projectFile,
|
||||
for (const auto &file : files_array)
|
||||
visited.insert(file.toString());
|
||||
|
||||
lines.append(visited.toList());
|
||||
lines.append(Utils::toList(visited));
|
||||
}
|
||||
|
||||
return lines;
|
||||
|
@@ -925,7 +925,7 @@ void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder)
|
||||
QSet<QString> alreadyAdded = m_watcher.directories().toSet();
|
||||
tmp.subtract(alreadyAdded);
|
||||
if (!tmp.isEmpty())
|
||||
m_watcher.addPaths(tmp.toList());
|
||||
m_watcher.addPaths(Utils::toList(tmp));
|
||||
m_recursiveWatchedFolders += tmp;
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "filefilteritems.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/filesystemwatcher.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -160,7 +161,7 @@ void FileFilterBaseItem::setPathsProperty(const QStringList &path)
|
||||
|
||||
QStringList FileFilterBaseItem::files() const
|
||||
{
|
||||
return m_files.toList();
|
||||
return Utils::toList(m_files);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,16 +244,16 @@ void FileFilterBaseItem::updateFileListNow()
|
||||
}
|
||||
|
||||
// update watched directories
|
||||
const QSet<QString> oldDirs = watchedDirectories().toSet();
|
||||
const QSet<QString> oldDirs = Utils::toSet(watchedDirectories());
|
||||
const QSet<QString> unwatchDirs = oldDirs - dirsToBeWatched;
|
||||
const QSet<QString> watchDirs = dirsToBeWatched - oldDirs;
|
||||
|
||||
if (!unwatchDirs.isEmpty()) {
|
||||
QTC_ASSERT(m_dirWatcher, return);
|
||||
m_dirWatcher->removeDirectories(unwatchDirs.toList());
|
||||
m_dirWatcher->removeDirectories(Utils::toList(unwatchDirs));
|
||||
}
|
||||
if (!watchDirs.isEmpty())
|
||||
dirWatcher()->addDirectories(watchDirs.toList(), Utils::FileSystemWatcher::WatchAllChanges);
|
||||
dirWatcher()->addDirectories(Utils::toList(watchDirs), Utils::FileSystemWatcher::WatchAllChanges);
|
||||
}
|
||||
|
||||
bool FileFilterBaseItem::fileMatches(const QString &fileName) const
|
||||
|
@@ -275,7 +275,7 @@ void QmlProject::refreshFiles(const QSet<QString> &/*added*/, const QSet<QString
|
||||
refresh(Files);
|
||||
if (!removed.isEmpty()) {
|
||||
if (auto modelManager = QmlJS::ModelManagerInterface::instance())
|
||||
modelManager->removeFiles(removed.toList());
|
||||
modelManager->removeFiles(Utils::toList(removed));
|
||||
}
|
||||
refreshTargetDirectory();
|
||||
}
|
||||
|
@@ -422,7 +422,7 @@ static FilePathList gatherQmakePathsFromQtChooser()
|
||||
if (!possibleQMake.isEmpty())
|
||||
foundQMakes << possibleQMake;
|
||||
}
|
||||
return foundQMakes.toList();
|
||||
return Utils::toList(foundQMakes);
|
||||
}
|
||||
|
||||
static void findSystemQt()
|
||||
|
@@ -123,7 +123,7 @@ void TodoItemsProvider::createScanners()
|
||||
void TodoItemsProvider::setItemsListWithinStartupProject()
|
||||
{
|
||||
QHashIterator<FilePath, QList<TodoItem> > it(m_itemsHash);
|
||||
const auto filePaths = QSet<FilePath>::fromList(m_startupProject->files(Project::SourceFiles));
|
||||
const auto filePaths = Utils::toSet(m_startupProject->files(Project::SourceFiles));
|
||||
|
||||
QVariantMap settings = m_startupProject->namedSettings(Constants::SETTINGS_NAME_KEY).toMap();
|
||||
|
||||
@@ -159,8 +159,7 @@ void TodoItemsProvider::setItemsListWithinSubproject()
|
||||
});
|
||||
|
||||
// files must be both in the current subproject and the startup-project.
|
||||
const auto fileNames
|
||||
= QSet<FilePath>::fromList(m_startupProject->files(Project::SourceFiles));
|
||||
const auto fileNames = Utils::toSet(m_startupProject->files(Project::SourceFiles));
|
||||
QHashIterator<FilePath, QList<TodoItem> > it(m_itemsHash);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
|
@@ -24,9 +24,12 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "baseannotationhighlighter.h"
|
||||
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QColor>
|
||||
#include <QTextDocument>
|
||||
@@ -68,7 +71,7 @@ void BaseAnnotationHighlighterPrivate::updateOtherFormats()
|
||||
.toTextCharFormat(TextEditor::C_TEXT)
|
||||
.brushProperty(QTextFormat::BackgroundBrush)
|
||||
.color();
|
||||
q->setChangeNumbers(m_changeNumberMap.keys().toSet());
|
||||
q->setChangeNumbers(Utils::toSet(m_changeNumberMap.keys()));
|
||||
}
|
||||
|
||||
BaseAnnotationHighlighter::BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
|
||||
|
@@ -37,17 +37,21 @@
|
||||
|
||||
#include <aggregation/aggregate.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
|
||||
#include <coreplugin/find/basetextfind.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/completingtextedit.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/icon.h>
|
||||
#include <utils/theme/theme.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/temporarydirectory.h>
|
||||
#include <coreplugin/find/basetextfind.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
@@ -459,7 +463,7 @@ void VcsBaseSubmitEditor::setFileModel(SubmitFileModel *model)
|
||||
// Populate completer with symbols
|
||||
if (!uniqueSymbols.isEmpty()) {
|
||||
QCompleter *completer = d->m_widget->descriptionEdit()->completer();
|
||||
QStringList symbolsList = uniqueSymbols.toList();
|
||||
QStringList symbolsList = Utils::toList(uniqueSymbols);
|
||||
symbolsList.sort();
|
||||
completer->setModel(new QStringListModel(symbolsList, completer));
|
||||
}
|
||||
|
Reference in New Issue
Block a user