Skip to content

Commit

Permalink
Merge pull request #190 from n7space/plugin-update-5.0.3-6.0.2
Browse files Browse the repository at this point in the history
plugin-update-5.0.3-6.0.2
  • Loading branch information
hcorg authored Mar 2, 2022
2 parents 1a1dca2 + 2f59d57 commit f9219bc
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 93 deletions.
4 changes: 2 additions & 2 deletions Asn1Acn.json.in
Original file line number Diff line number Diff line change
@@ -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\",
Expand Down
4 changes: 2 additions & 2 deletions src/3rdparty/tests/modeltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QColor>() );
}

colorVariant = model->data ( model->index ( 0, 0 ), Qt::TextColorRole );
colorVariant = model->data ( model->index ( 0, 0 ), Qt::ForegroundRole );
if ( colorVariant.isValid() ) {
QVERIFY( colorVariant.canConvert<QColor>() );
}
Expand Down
5 changes: 3 additions & 2 deletions src/asn1acnbuildstep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
8 changes: 4 additions & 4 deletions src/asn1sccparseddocumentbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ std::vector<std::unique_ptr<Data::File>> 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);
Expand All @@ -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();
}
4 changes: 2 additions & 2 deletions src/astxmlparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ std::unique_ptr<Data::Types::Type> AstXmlParser::readTypeDetails(const Data::Sou
return type;
}

void AstXmlParser::readTypeContents(const QStringRef &name)
void AstXmlParser::readTypeContents(const QStringView &name)
{
if (name == QStringLiteral("SEQUENCE"))
readSequence();
Expand All @@ -287,7 +287,7 @@ void AstXmlParser::readTypeContents(const QStringRef &name)
}

std::unique_ptr<Data::Types::Type> AstXmlParser::buildTypeFromName(
const Data::SourceLocation &location, const QStringRef &name)
const Data::SourceLocation &location, const QStringView &name)
{
if (name == QStringLiteral("REFERENCE_TYPE"))
return readReferenceType(location);
Expand Down
4 changes: 2 additions & 2 deletions src/astxmlparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class AstXmlParser
std::unique_ptr<Data::Types::Type> readTypeDetails(const Data::SourceLocation &location);
std::unique_ptr<Data::Types::Type> readReferenceType(const Data::SourceLocation &location);
std::unique_ptr<Data::Types::Type> 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();
Expand Down
3 changes: 2 additions & 1 deletion src/completion/acncompletionassist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ std::unique_ptr<ProposalsBuilder> AcnCompletionAssistProcessor::createKeywordsPr
return provider;
}

TextEditor::IAssistProcessor *AcnCompletionAssistProvider::createProcessor() const
TextEditor::IAssistProcessor *AcnCompletionAssistProvider::createProcessor(const TextEditor::AssistInterface *assistInterface) const
{
Q_UNUSED(assistInterface);
return new AcnCompletionAssistProcessor;
}
2 changes: 1 addition & 1 deletion src/completion/acncompletionassist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/completion/asncompletionassist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ std::unique_ptr<ProposalsBuilder> AsnCompletionAssistProcessor::createKeywordsPr
return provider;
}

TextEditor::IAssistProcessor *AsnCompletionAssistProvider::createProcessor() const
TextEditor::IAssistProcessor *AsnCompletionAssistProvider::createProcessor(const TextEditor::AssistInterface *assistInterface) const
{
Q_UNUSED(assistInterface);
return new AsnCompletionAssistProcessor;
}
2 changes: 1 addition & 1 deletion src/completion/asncompletionassist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/completion/keywordproposalsbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
48 changes: 24 additions & 24 deletions src/data/types/builtintypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand All @@ -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";
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/data/types/labeltype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
}
2 changes: 1 addition & 1 deletion src/data/types/labeltype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/data/types/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <QIcon>
#include <QString>
#include <utils/filepath.h>

#include <utils/theme/theme.h>

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/data/types/userdefinedtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
2 changes: 1 addition & 1 deletion src/data/types/userdefinedtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/componentlibraryprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit f9219bc

Please sign in to comment.