diff --git a/Asn1Acn.json.in b/Asn1Acn.json.in index 1785b950..a365a9e7 100644 --- a/Asn1Acn.json.in +++ b/Asn1Acn.json.in @@ -1,7 +1,7 @@ { \"Name\" : \"ASN.1/ACN\", - \"Version\" : \"5.0.3\", - \"CompatVersion\" : \"5.0.0\", + \"Version\" : \"6.0.2\", + \"CompatVersion\" : \"6.0.0\", \"Vendor\" : \"N7 Space sp. z o.o.\", \"Copyright\" : \"(C) 2017-2022 N7 Space sp. z o.o.\", \"License\" : \"GPL v3.0\", diff --git a/src/3rdparty/tests/modeltest.cpp b/src/3rdparty/tests/modeltest.cpp index 36a72709..11fc62d6 100644 --- a/src/3rdparty/tests/modeltest.cpp +++ b/src/3rdparty/tests/modeltest.cpp @@ -443,12 +443,12 @@ void ModelTest::data() } // General Purpose roles that should return a QColor - QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundColorRole ); + QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundRole ); if ( colorVariant.isValid() ) { QVERIFY( colorVariant.canConvert() ); } - colorVariant = model->data ( model->index ( 0, 0 ), Qt::TextColorRole ); + colorVariant = model->data ( model->index ( 0, 0 ), Qt::ForegroundRole ); if ( colorVariant.isValid() ) { QVERIFY( colorVariant.canConvert() ); } diff --git a/src/asn1acnbuildstep.cpp b/src/asn1acnbuildstep.cpp index 9c7218df..34e36de4 100644 --- a/src/asn1acnbuildstep.cpp +++ b/src/asn1acnbuildstep.cpp @@ -71,7 +71,8 @@ void Asn1AcnBuildStep::updateEnvironment(const ProjectExplorer::BuildConfigurati void Asn1AcnBuildStep::updateProcess(const QString &command, const QString &arg) { auto *pp = processParameters(); - Utils::CommandLine commandLine(command); - commandLine.addArgs(arg, Utils::CommandLine::Raw); + Utils::CommandLine commandLine(Utils::FilePath::fromUserInput(command), + arg, + Utils::CommandLine::Raw); pp->setCommandLine(commandLine); } diff --git a/src/asn1sccparseddocumentbuilder.cpp b/src/asn1sccparseddocumentbuilder.cpp index 8d3ea0ae..a5ad7cdc 100644 --- a/src/asn1sccparseddocumentbuilder.cpp +++ b/src/asn1sccparseddocumentbuilder.cpp @@ -112,13 +112,13 @@ std::vector> Asn1SccParsedDocumentBuilder::takeDocum bool Asn1SccParsedDocumentBuilder::responseContainsAst(const QJsonObject &json) { - return json[QLatin1Literal("ErrorCode")].toInt(-1) == 0; + return json[QLatin1String("ErrorCode")].toInt(-1) == 0; } void Asn1SccParsedDocumentBuilder::storeErrorMessages(const QJsonObject &json) { const auto parser = ErrorMessageParser(); - for (const auto message : json[QLatin1Literal("Messages")].toArray()) { + for (const auto message : json[QLatin1String("Messages")].toArray()) { const auto msg = parser.parse(message.toString()); if (msg.isValid()) m_errorMessages.push_back(msg); @@ -127,8 +127,8 @@ void Asn1SccParsedDocumentBuilder::storeErrorMessages(const QJsonObject &json) QString Asn1SccParsedDocumentBuilder::getAstXml(const QJsonObject &json) { - const auto files = json[QLatin1Literal("Files")].toArray(); + const auto files = json[QLatin1String("Files")].toArray(); if (files.size() != 1) return QString(); - return files[0].toObject()[QLatin1Literal("Contents")].toString(); + return files[0].toObject()[QLatin1String("Contents")].toString(); } diff --git a/src/astxmlparser.cpp b/src/astxmlparser.cpp index de95c18e..00d5a3ca 100644 --- a/src/astxmlparser.cpp +++ b/src/astxmlparser.cpp @@ -274,7 +274,7 @@ std::unique_ptr AstXmlParser::readTypeDetails(const Data::Sou return type; } -void AstXmlParser::readTypeContents(const QStringRef &name) +void AstXmlParser::readTypeContents(const QStringView &name) { if (name == QStringLiteral("SEQUENCE")) readSequence(); @@ -287,7 +287,7 @@ void AstXmlParser::readTypeContents(const QStringRef &name) } std::unique_ptr AstXmlParser::buildTypeFromName( - const Data::SourceLocation &location, const QStringRef &name) + const Data::SourceLocation &location, const QStringView &name) { if (name == QStringLiteral("REFERENCE_TYPE")) return readReferenceType(location); diff --git a/src/astxmlparser.h b/src/astxmlparser.h index a76eae3b..df212ebb 100644 --- a/src/astxmlparser.h +++ b/src/astxmlparser.h @@ -78,9 +78,9 @@ class AstXmlParser std::unique_ptr readTypeDetails(const Data::SourceLocation &location); std::unique_ptr readReferenceType(const Data::SourceLocation &location); std::unique_ptr buildTypeFromName(const Data::SourceLocation &location, - const QStringRef &name); + const QStringView &name); - void readTypeContents(const QStringRef &name); + void readTypeContents(const QStringView &name); void readSequence(); void readSequenceOf(); void readChoice(); diff --git a/src/completion/acncompletionassist.cpp b/src/completion/acncompletionassist.cpp index 3824eaab..b441663d 100644 --- a/src/completion/acncompletionassist.cpp +++ b/src/completion/acncompletionassist.cpp @@ -41,7 +41,8 @@ std::unique_ptr AcnCompletionAssistProcessor::createKeywordsPr return provider; } -TextEditor::IAssistProcessor *AcnCompletionAssistProvider::createProcessor() const +TextEditor::IAssistProcessor *AcnCompletionAssistProvider::createProcessor(const TextEditor::AssistInterface *assistInterface) const { + Q_UNUSED(assistInterface); return new AcnCompletionAssistProcessor; } diff --git a/src/completion/acncompletionassist.h b/src/completion/acncompletionassist.h index 150e3034..ffe123dd 100644 --- a/src/completion/acncompletionassist.h +++ b/src/completion/acncompletionassist.h @@ -46,7 +46,7 @@ class AcnCompletionAssistProvider : public CompletionAssistProvider Q_OBJECT public: - TextEditor::IAssistProcessor *createProcessor() const override; + TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *assistInterface) const override; }; } /* nameapsce Completion */ diff --git a/src/completion/asncompletionassist.cpp b/src/completion/asncompletionassist.cpp index d8eb7cba..a3d052b2 100644 --- a/src/completion/asncompletionassist.cpp +++ b/src/completion/asncompletionassist.cpp @@ -40,7 +40,8 @@ std::unique_ptr AsnCompletionAssistProcessor::createKeywordsPr return provider; } -TextEditor::IAssistProcessor *AsnCompletionAssistProvider::createProcessor() const +TextEditor::IAssistProcessor *AsnCompletionAssistProvider::createProcessor(const TextEditor::AssistInterface *assistInterface) const { + Q_UNUSED(assistInterface); return new AsnCompletionAssistProcessor; } diff --git a/src/completion/asncompletionassist.h b/src/completion/asncompletionassist.h index 7120ccc6..d9941144 100644 --- a/src/completion/asncompletionassist.h +++ b/src/completion/asncompletionassist.h @@ -44,7 +44,7 @@ class AsnCompletionAssistProvider : public CompletionAssistProvider Q_OBJECT public: - TextEditor::IAssistProcessor *createProcessor() const override; + TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *assistInterface) const override; }; } /* nameapsce Completion */ diff --git a/src/completion/keywordproposalsbuilder.cpp b/src/completion/keywordproposalsbuilder.cpp index 83c4c4e2..0d08611c 100644 --- a/src/completion/keywordproposalsbuilder.cpp +++ b/src/completion/keywordproposalsbuilder.cpp @@ -43,7 +43,7 @@ KeywordProposalsBuilder::KeywordProposalsBuilder(const QStringList &keywords, static QIcon buildIcon(Utils::Theme::Color theme) { - return Utils::Icon({{QLatin1String(":/codemodel/images/keyword.png"), theme}}, Utils::Icon::Tint) + return Utils::Icon({{":/codemodel/images/keyword.png", theme}}, Utils::Icon::Tint) .icon(); } diff --git a/src/data/types/builtintypes.h b/src/data/types/builtintypes.h index 98485067..511df3a4 100644 --- a/src/data/types/builtintypes.h +++ b/src/data/types/builtintypes.h @@ -49,9 +49,9 @@ class Boolean : public BuiltinType QString name() const override { return QLatin1String("BOOLEAN"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/boolean.png"); + return ":/asn1acn/images/outline/boolean.png"; } }; @@ -61,9 +61,9 @@ class Null : public BuiltinType QString name() const override { return QLatin1String("NULL"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/null.png"); + return ":/asn1acn/images/outline/null.png"; } }; @@ -73,9 +73,9 @@ class Integer : public BuiltinType QString name() const override { return QLatin1String("INTEGER"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/integer.png"); + return ":/asn1acn/images/outline/integer.png"; } }; @@ -85,9 +85,9 @@ class Real : public BuiltinType QString name() const override { return QLatin1String("REAL"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/real.png"); + return ":/asn1acn/images/outline/real.png"; } }; @@ -97,9 +97,9 @@ class BitString : public BuiltinType QString name() const override { return QLatin1String("BIT STRING"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/bitstring.png"); + return ":/asn1acn/images/outline/bitstring.png"; } }; @@ -109,9 +109,9 @@ class OctetString : public BuiltinType QString name() const override { return QLatin1String("OCTET STRING"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/octetstring.png"); + return ":/asn1acn/images/outline/octetstring.png"; } }; @@ -121,9 +121,9 @@ class IA5String : public BuiltinType QString name() const override { return QLatin1String("IA5String"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/ia5string.png"); + return ":/asn1acn/images/outline/ia5string.png"; } }; @@ -133,9 +133,9 @@ class NumericString : public BuiltinType QString name() const override { return QLatin1String("NumericString"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/numericstring.png"); + return ":/asn1acn/images/outline/numericstring.png"; } }; @@ -145,9 +145,9 @@ class Enumerated : public BuiltinType QString name() const override { return QLatin1String("ENUMERATED"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/enumerated.png"); + return ":/asn1acn/images/outline/enumerated.png"; } }; @@ -157,9 +157,9 @@ class Choice : public BuiltinType QString name() const override { return QLatin1String("CHOICE"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/choice.png"); + return ":/asn1acn/images/outline/choice.png"; } }; @@ -169,9 +169,9 @@ class Sequence : public BuiltinType QString name() const override { return QLatin1String("SEQUENCE"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/sequence.png"); + return ":/asn1acn/images/outline/sequence.png"; } }; @@ -181,9 +181,9 @@ class SequenceOf : public BuiltinType QString name() const override { return QLatin1String("SEQUENCE OF"); } private: - QString baseIconFile() const override + Utils::FilePath baseIconFile() const override { - return QStringLiteral(":/asn1acn/images/outline/sequenceof.png"); + return ":/asn1acn/images/outline/sequenceof.png"; } }; diff --git a/src/data/types/labeltype.cpp b/src/data/types/labeltype.cpp index 5c0bc38b..6b331239 100644 --- a/src/data/types/labeltype.cpp +++ b/src/data/types/labeltype.cpp @@ -38,16 +38,16 @@ QString LabelType::name() const QString LabelType::label() const { - return QString(); + return {}; } -QString LabelType::baseIconFile() const +Utils::FilePath LabelType::baseIconFile() const { - return QString(); + return {}; } QIcon LabelType::createIcon(Utils::Theme::Color color) const { Q_UNUSED(color); - return QIcon(); + return {}; } diff --git a/src/data/types/labeltype.h b/src/data/types/labeltype.h index 3b77a517..6ed39e32 100644 --- a/src/data/types/labeltype.h +++ b/src/data/types/labeltype.h @@ -43,7 +43,7 @@ class LabelType : public Type QString label() const override; private: - QString baseIconFile() const override; + Utils::FilePath baseIconFile() const override; QIcon createIcon(Utils::Theme::Color color) const override; QString m_name; diff --git a/src/data/types/type.h b/src/data/types/type.h index e5c0077d..285b5b24 100644 --- a/src/data/types/type.h +++ b/src/data/types/type.h @@ -26,6 +26,7 @@ #include #include +#include #include @@ -47,7 +48,7 @@ class Type private: virtual QIcon createIcon(Utils::Theme::Color color) const; - virtual QString baseIconFile() const = 0; + virtual Utils::FilePath baseIconFile() const = 0; }; } // namespace Types diff --git a/src/data/types/userdefinedtype.cpp b/src/data/types/userdefinedtype.cpp index 53cc0ea4..353b7d6c 100644 --- a/src/data/types/userdefinedtype.cpp +++ b/src/data/types/userdefinedtype.cpp @@ -42,7 +42,7 @@ QString UserdefinedType::label() const return ": " + m_module + "." + name(); } -QString UserdefinedType::baseIconFile() const +Utils::FilePath UserdefinedType::baseIconFile() const { - return QStringLiteral(":/asn1acn/images/outline/userdefined.png"); + return ":/asn1acn/images/outline/userdefined.png"; } diff --git a/src/data/types/userdefinedtype.h b/src/data/types/userdefinedtype.h index 8469a523..56ced090 100644 --- a/src/data/types/userdefinedtype.h +++ b/src/data/types/userdefinedtype.h @@ -43,7 +43,7 @@ class UserdefinedType : public Type QString label() const override; private: - QString baseIconFile() const override; + Utils::FilePath baseIconFile() const override; QString m_name; QString m_module; diff --git a/src/libraries/componentlibraryprocessor.cpp b/src/libraries/componentlibraryprocessor.cpp index 8f356ca0..60de2d82 100644 --- a/src/libraries/componentlibraryprocessor.cpp +++ b/src/libraries/componentlibraryprocessor.cpp @@ -62,7 +62,7 @@ void ComponentLibraryProcessor::process() library->addModule(std::move(module)); } catch (const ModuleMetadataParser::Error &err) { using Messages::MessageManager; - MessageManager::write(QLatin1Literal("Parsing failed - ") + err.what(), + MessageManager::write(QLatin1String("Parsing failed - ") + err.what(), MessageManager::Type::Metadata); continue; } diff --git a/src/libraries/tests/generalmetadataparser_tests.cpp b/src/libraries/tests/generalmetadataparser_tests.cpp index 70a7b226..23edbc0d 100644 --- a/src/libraries/tests/generalmetadataparser_tests.cpp +++ b/src/libraries/tests/generalmetadataparser_tests.cpp @@ -37,8 +37,8 @@ void GeneralMetadataParserTests::test_empty() { parse("", "/some/path/with/LibName"); - QCOMPARE(m_parsedData.name(), QLatin1Literal("LibName")); - QCOMPARE(m_parsedData.path(), QLatin1Literal("/some/path/with/LibName")); + QCOMPARE(m_parsedData.name(), QLatin1String("LibName")); + QCOMPARE(m_parsedData.path(), QLatin1String("/some/path/with/LibName")); QVERIFY(m_parsedData.license().isEmpty()); QVERIFY(m_parsedData.version().isEmpty()); QVERIFY(m_parsedData.description().isEmpty()); @@ -48,9 +48,9 @@ void GeneralMetadataParserTests::test_partiallyFilled() { parse(R"({"name": "InnerName", "license": "GPL"})", "/some/path/with/LibName"); - QCOMPARE(m_parsedData.name(), QLatin1Literal("InnerName")); - QCOMPARE(m_parsedData.path(), QLatin1Literal("/some/path/with/LibName")); - QCOMPARE(m_parsedData.license(), QLatin1Literal("GPL")); + QCOMPARE(m_parsedData.name(), QLatin1String("InnerName")); + QCOMPARE(m_parsedData.path(), QLatin1String("/some/path/with/LibName")); + QCOMPARE(m_parsedData.license(), QLatin1String("GPL")); QVERIFY(m_parsedData.version().isEmpty()); QVERIFY(m_parsedData.description().isEmpty()); } @@ -65,12 +65,12 @@ void GeneralMetadataParserTests::test_complete() R"("license": "GPL"})", "/some/path/with/LibName"); - QCOMPARE(m_parsedData.name(), QLatin1Literal("InnerName")); - QCOMPARE(m_parsedData.path(), QLatin1Literal("/some/path/with/LibName")); - QCOMPARE(m_parsedData.license(), QLatin1Literal("GPL")); - QCOMPARE(m_parsedData.version(), QLatin1Literal("SomeVersion")); - QCOMPARE(m_parsedData.description(), QLatin1Literal("SomeDescription")); - QCOMPARE(m_parsedData.vendor(), QLatin1Literal("MyVendor")); + QCOMPARE(m_parsedData.name(), QLatin1String("InnerName")); + QCOMPARE(m_parsedData.path(), QLatin1String("/some/path/with/LibName")); + QCOMPARE(m_parsedData.license(), QLatin1String("GPL")); + QCOMPARE(m_parsedData.version(), QLatin1String("SomeVersion")); + QCOMPARE(m_parsedData.description(), QLatin1String("SomeDescription")); + QCOMPARE(m_parsedData.vendor(), QLatin1String("MyVendor")); } void GeneralMetadataParserTests::parse(const QString &jsonData, const QString &path) diff --git a/src/libraries/tests/modulemetadataparser_tests.cpp b/src/libraries/tests/modulemetadataparser_tests.cpp index a69cebb9..91f02bd6 100644 --- a/src/libraries/tests/modulemetadataparser_tests.cpp +++ b/src/libraries/tests/modulemetadataparser_tests.cpp @@ -57,8 +57,8 @@ void ModuleMetadataParserTests::test_emptyModule() { parse(R"({"name": "SomeName", "description": "SomeDesc"})"); - QCOMPARE(m_parsedData->name(), QLatin1Literal("SomeName")); - QCOMPARE(m_parsedData->description(), QLatin1Literal("SomeDesc")); + QCOMPARE(m_parsedData->name(), QLatin1String("SomeName")); + QCOMPARE(m_parsedData->description(), QLatin1String("SomeDesc")); QCOMPARE(static_cast(m_parsedData->submodules().size()), 0); } @@ -76,8 +76,8 @@ void ModuleMetadataParserTests::test_emptySubmodule() QCOMPARE(static_cast(m_parsedData->submodules().size()), 1); const auto submodule = m_parsedData->submodules().at(0).get(); - QCOMPARE(submodule->name(), QLatin1Literal("SubmoduleName")); - QCOMPARE(submodule->description(), QLatin1Literal("SubmoduleDesc")); + QCOMPARE(submodule->name(), QLatin1String("SubmoduleName")); + QCOMPARE(submodule->description(), QLatin1String("SubmoduleDesc")); QCOMPARE(static_cast(submodule->elements().size()), 0); } @@ -102,8 +102,8 @@ void ModuleMetadataParserTests::test_emptyElement() const auto submodule = m_parsedData->submodules().at(0).get(); QCOMPARE(static_cast(submodule->elements().size()), 1); const auto element = submodule->elements().at(0).get(); - QCOMPARE(element->name(), QLatin1Literal("ElementName")); - QCOMPARE(element->description(), QLatin1Literal("ElementDesc")); + QCOMPARE(element->name(), QLatin1String("ElementName")); + QCOMPARE(element->description(), QLatin1String("ElementDesc")); QCOMPARE(element->asn1Files().size(), 0); QCOMPARE(element->additionalFiles().size(), 0); QCOMPARE(element->conflicts().size(), 0); diff --git a/src/libraries/wizard/importcomponentwizard.cpp b/src/libraries/wizard/importcomponentwizard.cpp index cc90b605..1df95ac8 100644 --- a/src/libraries/wizard/importcomponentwizard.cpp +++ b/src/libraries/wizard/importcomponentwizard.cpp @@ -72,7 +72,7 @@ void ImportComponentWizard::accept() void ImportComponentWizard::raiseErrorWindow(const QString &message) { QMessageBox msgBox; - msgBox.setWindowTitle(QLatin1Literal("Operation failed")); + msgBox.setWindowTitle(QLatin1String("Operation failed")); msgBox.setText(message); msgBox.exec(); } diff --git a/src/libraries/wizard/relationslabelscontroller.cpp b/src/libraries/wizard/relationslabelscontroller.cpp index ac03688e..1912d43f 100644 --- a/src/libraries/wizard/relationslabelscontroller.cpp +++ b/src/libraries/wizard/relationslabelscontroller.cpp @@ -50,7 +50,7 @@ RelationsLabelsController::~RelationsLabelsController() namespace { void appendElementItems(const QList &references, - QHash &parents) + QMultiHash &parents) { QHash elements; for (const auto &ref : references) { @@ -77,7 +77,7 @@ void appendElementItems(const QList &references, void appendSubmoduleItems(const QList &references, QHash &parents) { - QHash submoduleItems; + QMultiHash submoduleItems; for (const auto &ref : references) { const auto name = ref.submodule(); diff --git a/src/libraries/wizard/vcshandler.cpp b/src/libraries/wizard/vcshandler.cpp index ba33a613..520194f0 100644 --- a/src/libraries/wizard/vcshandler.cpp +++ b/src/libraries/wizard/vcshandler.cpp @@ -73,17 +73,16 @@ void VcsHandler::addToVcs(const Utils::FilePaths &files) return ); const auto projectPath - = ProjectExplorer::SessionManager::startupProject()->projectDirectory().toString(); + = ProjectExplorer::SessionManager::startupProject()->projectDirectory(); if (!vcs->vcsCreateRepository(projectPath)) - throw std::runtime_error("Could not create repository in \'" + projectPath.toStdString() + throw std::runtime_error("Could not create repository in \'" + projectPath.toString().toStdString() + "\'"); } QTC_ASSERT(vcs->supportsOperation(Core::IVersionControl::AddOperation), return ); for (const auto &file : files) { - const auto filePath = file.path(); - if (!vcs->vcsAdd(filePath)) - throw std::runtime_error("Failed to add \'" + filePath.toStdString() + if (!vcs->vcsAdd(file)) + throw std::runtime_error("Failed to add \'" + file.toString().toStdString() + "\' to version control system"); } @@ -99,7 +98,7 @@ namespace { Core::IVersionControl *vcsForCurrentProject() { const auto projectDir - = ProjectExplorer::SessionManager::startupProject()->projectDirectory().toString(); + = ProjectExplorer::SessionManager::startupProject()->projectDirectory(); return Core::VcsManager::findVersionControlForDirectory(projectDir); } } // namespace diff --git a/src/projectcontenthandler.cpp b/src/projectcontenthandler.cpp index 45f8c39a..4aefa85b 100644 --- a/src/projectcontenthandler.cpp +++ b/src/projectcontenthandler.cpp @@ -117,8 +117,11 @@ void ProjectContentHandler::processFiles(const QString &projectName, Utils::FilePaths ProjectContentHandler::getStaleFilesPaths(const QString &projectName, const Utils::FilePaths &filePaths) const { + const auto filePathsSet = QSet(filePaths.begin(), filePaths.end()); const auto staleFileList = m_storage->getFilesPathsFromProject(projectName); - const auto pathsToRemove = staleFileList.toSet().subtract(filePaths.toSet()); + auto staleFileSet = QSet(staleFileList.begin(), staleFileList.end()); + const auto pathsToRemove = staleFileSet.subtract(filePathsSet); + return pathsToRemove.values(); } diff --git a/src/tree-views/decorationrolevisitor.cpp b/src/tree-views/decorationrolevisitor.cpp index dda8f526..1a4232d5 100644 --- a/src/tree-views/decorationrolevisitor.cpp +++ b/src/tree-views/decorationrolevisitor.cpp @@ -44,7 +44,7 @@ DecorationRoleVisitor::~DecorationRoleVisitor() {} QIcon DecorationRoleVisitor::valueFor(const Definitions &defs) const { Q_UNUSED(defs); - const static QIcon icon(Utils::Icon({{QLatin1String(":/utils/images/namespace.png"), + const static QIcon icon(Utils::Icon({{":/utils/images/namespace.png", Utils::Theme::IconsCodeModelKeywordColor}}, Utils::Icon::Tint) .icon()); diff --git a/src/tree-views/treeviewwidget.cpp b/src/tree-views/treeviewwidget.cpp index b0cdc41e..4ed99c60 100644 --- a/src/tree-views/treeviewwidget.cpp +++ b/src/tree-views/treeviewwidget.cpp @@ -98,7 +98,7 @@ void TreeViewWidget::setCursorSynchronization(bool syncWithCursor) QLayout *TreeViewWidget::createLayout() { QVBoxLayout *layout = new QVBoxLayout; - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); layout->addWidget(Core::ItemViewFind::createSearchableWrapper(m_treeView)); diff --git a/templates/wizards/projects/asn1acn/CMakeLists.txt b/templates/wizards/projects/asn1acn/CMakeLists.txt index 033b7982..ea9af31c 100644 --- a/templates/wizards/projects/asn1acn/CMakeLists.txt +++ b/templates/wizards/projects/asn1acn/CMakeLists.txt @@ -1,16 +1,16 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.13) project(%{JS: '%{ProjectName}'}) -set(ASN1ACNSOURCES DISTFILES += \\ - @if %{AddAsnFile} && %{AddAcnFile} - %{AsnRelativePath}/%{AsnFile} \\ - %{AcnRelativePath}/%{AcnFile} - @elsif %{AddAsnFile} - %{AsnRelativePath}/%{AsnFile} - @elsif %{AddAcnFile} - %{AcnRelativePath}/%{AcnFile} - @endif) +set( + ASN1ACNSOURCES + %{JS: if (%{AddAsnFile} && %{AddAcnFile}) + '%{AsnRelativePath}/%{AsnFile}\\\n %{AcnRelativePath}/%{AcnFile}' + else if (%{AddAsnFile}) + '%{AsnRelativePath}/%{AsnFile}' + else if (%{AddAcnFile}) + '%{AcnRelativePath}/%{AcnFile}' + }) include(asn1sccSettings.cmake) include(createFilesList.cmake) diff --git a/templates/wizards/projects/asn1acn/createFilesList.cmake b/templates/wizards/projects/asn1acn/createFilesList.cmake index 858808f3..fb52cf1a 100644 --- a/templates/wizards/projects/asn1acn/createFilesList.cmake +++ b/templates/wizards/projects/asn1acn/createFilesList.cmake @@ -70,7 +70,7 @@ endfunction() function(appendVolatileList outDir targetExtension result) foreach(fileName ${ASN1ACNSOURCES}) get_filename_component(extension ${fileName} EXT) - if (${extension} STREQUAL ".asn" OR ${extension} STREQUAL ".asn1") + if ("${extension}" STREQUAL ".asn" OR "${extension}" STREQUAL ".asn1") get_filename_component(fileName ${fileName} NAME_WE) tryCreateFile(${outDir}/${fileName}.${targetExtension}) set(result ${result} "${outDir}/${fileName}.${targetExtension}")