forked from qt-creator/qt-creator
BareMetal: Remove QLatin1Char and QLatin1String macros
... where it is possible, because it is unnecessary to use in QtC code. Besides, it simplifies a code bit. Change-Id: I8f547c952f3e2bfe046462957f175da7fc780171 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -112,7 +112,7 @@ void BareMetalDevice::setChannelByServerProvider(IDebugServerProvider *provider)
|
|||||||
|
|
||||||
const auto gdbProvider = static_cast<GdbServerProvider *>(provider);
|
const auto gdbProvider = static_cast<GdbServerProvider *>(provider);
|
||||||
const QString channel = gdbProvider->channelString();
|
const QString channel = gdbProvider->channelString();
|
||||||
const int colon = channel.indexOf(QLatin1Char(':'));
|
const int colon = channel.indexOf(':');
|
||||||
if (colon < 0)
|
if (colon < 0)
|
||||||
return;
|
return;
|
||||||
QSsh::SshConnectionParameters sshParams = sshParameters();
|
QSsh::SshConnectionParameters sshParams = sshParameters();
|
||||||
@@ -124,7 +124,7 @@ void BareMetalDevice::setChannelByServerProvider(IDebugServerProvider *provider)
|
|||||||
void BareMetalDevice::fromMap(const QVariantMap &map)
|
void BareMetalDevice::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
IDevice::fromMap(map);
|
IDevice::fromMap(map);
|
||||||
QString providerId = map.value(QLatin1String(debugServerProviderIdKeyC)).toString();
|
QString providerId = map.value(debugServerProviderIdKeyC).toString();
|
||||||
if (providerId.isEmpty()) {
|
if (providerId.isEmpty()) {
|
||||||
const QString name = displayName();
|
const QString name = displayName();
|
||||||
if (IDebugServerProvider *provider =
|
if (IDebugServerProvider *provider =
|
||||||
@@ -147,7 +147,7 @@ void BareMetalDevice::fromMap(const QVariantMap &map)
|
|||||||
QVariantMap BareMetalDevice::toMap() const
|
QVariantMap BareMetalDevice::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map = IDevice::toMap();
|
QVariantMap map = IDevice::toMap();
|
||||||
map.insert(QLatin1String(debugServerProviderIdKeyC), debugServerProviderId());
|
map.insert(debugServerProviderIdKeyC, debugServerProviderId());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ DebugServerProviderManager::DebugServerProviderManager()
|
|||||||
{
|
{
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
m_writer = new Utils::PersistentSettingsWriter(
|
m_writer = new Utils::PersistentSettingsWriter(
|
||||||
m_configFile, QLatin1String("QtCreatorDebugServerProviders"));
|
m_configFile, "QtCreatorDebugServerProviders");
|
||||||
|
|
||||||
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested,
|
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested,
|
||||||
this, &DebugServerProviderManager::saveProviders);
|
this, &DebugServerProviderManager::saveProviders);
|
||||||
@@ -95,11 +95,11 @@ void DebugServerProviderManager::restoreProviders()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const QVariantMap data = reader.restoreValues();
|
const QVariantMap data = reader.restoreValues();
|
||||||
const int version = data.value(QLatin1String(fileVersionKeyC), 0).toInt();
|
const int version = data.value(fileVersionKeyC, 0).toInt();
|
||||||
if (version < 1)
|
if (version < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int count = data.value(QLatin1String(countKeyC), 0).toInt();
|
const int count = data.value(countKeyC, 0).toInt();
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
const QString key = QString::fromLatin1(dataKeyC) + QString::number(i);
|
const QString key = QString::fromLatin1(dataKeyC) + QString::number(i);
|
||||||
if (!data.contains(key))
|
if (!data.contains(key))
|
||||||
@@ -128,7 +128,7 @@ void DebugServerProviderManager::restoreProviders()
|
|||||||
void DebugServerProviderManager::saveProviders()
|
void DebugServerProviderManager::saveProviders()
|
||||||
{
|
{
|
||||||
QVariantMap data;
|
QVariantMap data;
|
||||||
data.insert(QLatin1String(fileVersionKeyC), 1);
|
data.insert(fileVersionKeyC, 1);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (const IDebugServerProvider *p : qAsConst(m_providers)) {
|
for (const IDebugServerProvider *p : qAsConst(m_providers)) {
|
||||||
@@ -141,7 +141,7 @@ void DebugServerProviderManager::saveProviders()
|
|||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.insert(QLatin1String(countKeyC), count);
|
data.insert(countKeyC, count);
|
||||||
m_writer->save(data, Core::ICore::mainWindow());
|
m_writer->save(data, Core::ICore::mainWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ void DebugServerProviderModel::apply()
|
|||||||
tr("The following providers were already configured:<br>"
|
tr("The following providers were already configured:<br>"
|
||||||
" %1<br>"
|
" %1<br>"
|
||||||
"They were not configured again.")
|
"They were not configured again.")
|
||||||
.arg(skippedProviders.join(QLatin1String(",<br> "))));
|
.arg(skippedProviders.join(",<br> ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace Internal {
|
|||||||
// DefaultGdbServerProvider
|
// DefaultGdbServerProvider
|
||||||
|
|
||||||
DefaultGdbServerProvider::DefaultGdbServerProvider()
|
DefaultGdbServerProvider::DefaultGdbServerProvider()
|
||||||
: GdbServerProvider(QLatin1String(Constants::DEFAULT_PROVIDER_ID))
|
: GdbServerProvider(Constants::DEFAULT_PROVIDER_ID)
|
||||||
{
|
{
|
||||||
setDefaultChannel("localhost", 3333);
|
setDefaultChannel("localhost", 3333);
|
||||||
setSettingsKeyBase("BareMetal.DefaultGdbServerProvider");
|
setSettingsKeyBase("BareMetal.DefaultGdbServerProvider");
|
||||||
@@ -63,7 +63,7 @@ GdbServerProviderConfigWidget *DefaultGdbServerProvider::configurationWidget()
|
|||||||
|
|
||||||
DefaultGdbServerProviderFactory::DefaultGdbServerProviderFactory()
|
DefaultGdbServerProviderFactory::DefaultGdbServerProviderFactory()
|
||||||
{
|
{
|
||||||
setId(QLatin1String(Constants::DEFAULT_PROVIDER_ID));
|
setId(Constants::DEFAULT_PROVIDER_ID);
|
||||||
setDisplayName(tr("Default"));
|
setDisplayName(tr("Default"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,8 +75,7 @@ GdbServerProvider *DefaultGdbServerProviderFactory::create()
|
|||||||
bool DefaultGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
bool DefaultGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
||||||
{
|
{
|
||||||
const auto id = idFromMap(data);
|
const auto id = idFromMap(data);
|
||||||
return id.startsWith(QLatin1String(Constants::DEFAULT_PROVIDER_ID)
|
return id.startsWith(Constants::DEFAULT_PROVIDER_ID + QLatin1Char(':'));
|
||||||
+ QLatin1Char(':'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GdbServerProvider *DefaultGdbServerProviderFactory::restore(const QVariantMap &data)
|
GdbServerProvider *DefaultGdbServerProviderFactory::restore(const QVariantMap &data)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const char additionalArgumentsKeyC[] = "BareMetal.OpenOcdGdbServerProvider.Addit
|
|||||||
// OpenOcdGdbServerProvider
|
// OpenOcdGdbServerProvider
|
||||||
|
|
||||||
OpenOcdGdbServerProvider::OpenOcdGdbServerProvider()
|
OpenOcdGdbServerProvider::OpenOcdGdbServerProvider()
|
||||||
: GdbServerProvider(QLatin1String(Constants::OPENOCD_PROVIDER_ID))
|
: GdbServerProvider(Constants::OPENOCD_PROVIDER_ID)
|
||||||
{
|
{
|
||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
@@ -64,16 +64,16 @@ OpenOcdGdbServerProvider::OpenOcdGdbServerProvider()
|
|||||||
|
|
||||||
QString OpenOcdGdbServerProvider::defaultInitCommands()
|
QString OpenOcdGdbServerProvider::defaultInitCommands()
|
||||||
{
|
{
|
||||||
return QLatin1String("set remote hardware-breakpoint-limit 6\n"
|
return "set remote hardware-breakpoint-limit 6\n"
|
||||||
"set remote hardware-watchpoint-limit 4\n"
|
"set remote hardware-watchpoint-limit 4\n"
|
||||||
"monitor reset halt\n"
|
"monitor reset halt\n"
|
||||||
"load\n"
|
"load\n"
|
||||||
"monitor reset halt\n");
|
"monitor reset halt\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OpenOcdGdbServerProvider::defaultResetCommands()
|
QString OpenOcdGdbServerProvider::defaultResetCommands()
|
||||||
{
|
{
|
||||||
return QLatin1String("monitor reset halt\n");
|
return "monitor reset halt\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OpenOcdGdbServerProvider::channelString() const
|
QString OpenOcdGdbServerProvider::channelString() const
|
||||||
@@ -197,7 +197,7 @@ GdbServerProviderConfigWidget *OpenOcdGdbServerProvider::configurationWidget()
|
|||||||
|
|
||||||
OpenOcdGdbServerProviderFactory::OpenOcdGdbServerProviderFactory()
|
OpenOcdGdbServerProviderFactory::OpenOcdGdbServerProviderFactory()
|
||||||
{
|
{
|
||||||
setId(QLatin1String(Constants::OPENOCD_PROVIDER_ID));
|
setId(Constants::OPENOCD_PROVIDER_ID);
|
||||||
setDisplayName(tr("OpenOCD"));
|
setDisplayName(tr("OpenOCD"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,8 +209,7 @@ GdbServerProvider *OpenOcdGdbServerProviderFactory::create()
|
|||||||
bool OpenOcdGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
bool OpenOcdGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
||||||
{
|
{
|
||||||
const QString id = idFromMap(data);
|
const QString id = idFromMap(data);
|
||||||
return id.startsWith(QLatin1String(Constants::OPENOCD_PROVIDER_ID)
|
return id.startsWith(Constants::OPENOCD_PROVIDER_ID + QLatin1Char(':'));
|
||||||
+ QLatin1Char(':'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GdbServerProvider *OpenOcdGdbServerProviderFactory::restore(const QVariantMap &data)
|
GdbServerProvider *OpenOcdGdbServerProviderFactory::restore(const QVariantMap &data)
|
||||||
@@ -236,7 +235,7 @@ OpenOcdGdbServerProviderConfigWidget::OpenOcdGdbServerProviderConfigWidget(
|
|||||||
|
|
||||||
m_executableFileChooser = new Utils::PathChooser;
|
m_executableFileChooser = new Utils::PathChooser;
|
||||||
m_executableFileChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
m_executableFileChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||||
m_executableFileChooser->setCommandVersionArguments(QStringList(QLatin1String("--version")));
|
m_executableFileChooser->setCommandVersionArguments({"--version"});
|
||||||
m_mainLayout->addRow(tr("Executable file:"), m_executableFileChooser);
|
m_mainLayout->addRow(tr("Executable file:"), m_executableFileChooser);
|
||||||
|
|
||||||
m_rootScriptsDirChooser = new Utils::PathChooser;
|
m_rootScriptsDirChooser = new Utils::PathChooser;
|
||||||
@@ -245,7 +244,7 @@ OpenOcdGdbServerProviderConfigWidget::OpenOcdGdbServerProviderConfigWidget(
|
|||||||
|
|
||||||
m_configurationFileChooser = new Utils::PathChooser;
|
m_configurationFileChooser = new Utils::PathChooser;
|
||||||
m_configurationFileChooser->setExpectedKind(Utils::PathChooser::File);
|
m_configurationFileChooser->setExpectedKind(Utils::PathChooser::File);
|
||||||
m_configurationFileChooser->setPromptDialogFilter(QLatin1String("*.cfg"));
|
m_configurationFileChooser->setPromptDialogFilter("*.cfg");
|
||||||
m_mainLayout->addRow(tr("Configuration file:"), m_configurationFileChooser);
|
m_mainLayout->addRow(tr("Configuration file:"), m_configurationFileChooser);
|
||||||
|
|
||||||
m_additionalArgumentsLineEdit = new QLineEdit(this);
|
m_additionalArgumentsLineEdit = new QLineEdit(this);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const char transportLayerKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.Transpo
|
|||||||
// StLinkUtilGdbServerProvider
|
// StLinkUtilGdbServerProvider
|
||||||
|
|
||||||
StLinkUtilGdbServerProvider::StLinkUtilGdbServerProvider()
|
StLinkUtilGdbServerProvider::StLinkUtilGdbServerProvider()
|
||||||
: GdbServerProvider(QLatin1String(Constants::STLINK_UTIL_PROVIDER_ID))
|
: GdbServerProvider(Constants::STLINK_UTIL_PROVIDER_ID)
|
||||||
{
|
{
|
||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
@@ -76,7 +76,7 @@ StLinkUtilGdbServerProvider::StLinkUtilGdbServerProvider(
|
|||||||
|
|
||||||
QString StLinkUtilGdbServerProvider::defaultInitCommands()
|
QString StLinkUtilGdbServerProvider::defaultInitCommands()
|
||||||
{
|
{
|
||||||
return QLatin1String("load\n");
|
return "load\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString StLinkUtilGdbServerProvider::defaultResetCommands()
|
QString StLinkUtilGdbServerProvider::defaultResetCommands()
|
||||||
@@ -194,7 +194,7 @@ GdbServerProviderConfigWidget *StLinkUtilGdbServerProvider::configurationWidget(
|
|||||||
|
|
||||||
StLinkUtilGdbServerProviderFactory::StLinkUtilGdbServerProviderFactory()
|
StLinkUtilGdbServerProviderFactory::StLinkUtilGdbServerProviderFactory()
|
||||||
{
|
{
|
||||||
setId(QLatin1String(Constants::STLINK_UTIL_PROVIDER_ID));
|
setId(Constants::STLINK_UTIL_PROVIDER_ID);
|
||||||
setDisplayName(tr("ST-LINK Utility"));
|
setDisplayName(tr("ST-LINK Utility"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,8 +206,7 @@ GdbServerProvider *StLinkUtilGdbServerProviderFactory::create()
|
|||||||
bool StLinkUtilGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
bool StLinkUtilGdbServerProviderFactory::canRestore(const QVariantMap &data) const
|
||||||
{
|
{
|
||||||
const QString id = idFromMap(data);
|
const QString id = idFromMap(data);
|
||||||
return id.startsWith(QLatin1String(Constants::STLINK_UTIL_PROVIDER_ID)
|
return id.startsWith(Constants::STLINK_UTIL_PROVIDER_ID + QLatin1Char(':'));
|
||||||
+ QLatin1Char(':'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GdbServerProvider *StLinkUtilGdbServerProviderFactory::restore(const QVariantMap &data)
|
GdbServerProvider *StLinkUtilGdbServerProviderFactory::restore(const QVariantMap &data)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ void IarParser::amendDescription()
|
|||||||
while (!m_snippets.isEmpty()) {
|
while (!m_snippets.isEmpty()) {
|
||||||
const QString snippet = m_snippets.takeFirst();
|
const QString snippet = m_snippets.takeFirst();
|
||||||
const int start = m_lastTask.description.count() + 1;
|
const int start = m_lastTask.description.count() + 1;
|
||||||
m_lastTask.description.append(QLatin1Char('\n'));
|
m_lastTask.description.append('\n');
|
||||||
m_lastTask.description.append(snippet);
|
m_lastTask.description.append(snippet);
|
||||||
|
|
||||||
QTextLayout::FormatRange fr;
|
QTextLayout::FormatRange fr;
|
||||||
@@ -210,10 +210,10 @@ void IarParser::stdError(const QString &line)
|
|||||||
|
|
||||||
if (lne.isEmpty()) {
|
if (lne.isEmpty()) {
|
||||||
//
|
//
|
||||||
} else if (!lne.startsWith(QLatin1Char(' '))) {
|
} else if (!lne.startsWith(' ')) {
|
||||||
return;
|
return;
|
||||||
} else if (m_expectFilePath) {
|
} else if (m_expectFilePath) {
|
||||||
if (lne.endsWith(QLatin1Char(']'))) {
|
if (lne.endsWith(']')) {
|
||||||
const QString lastPart = lne.left(lne.size() - 1);
|
const QString lastPart = lne.left(lne.size() - 1);
|
||||||
m_filePathParts.push_back(lastPart);
|
m_filePathParts.push_back(lastPart);
|
||||||
} else {
|
} else {
|
||||||
@@ -310,10 +310,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
<< QString::fromLatin1("Error in command line: Some error\n")
|
<< QString::fromLatin1("Error in command line: Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Error in command line: Some error"),
|
"Error in command line: Some error",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Linker error")
|
QTest::newRow("Linker error")
|
||||||
@@ -322,10 +322,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
<< QString::fromLatin1("Error[e46]: Some error\n")
|
<< QString::fromLatin1("Error[e46]: Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[e46]: Some error"),
|
"[e46]: Some error",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
// For std error.
|
// For std error.
|
||||||
@@ -337,10 +337,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
<< QString::fromLatin1("\"c:\\foo\\main.c\",63 Warning[Pe223]:\n"
|
<< QString::fromLatin1("\"c:\\foo\\main.c\",63 Warning[Pe223]:\n"
|
||||||
" Some warning \"foo\" bar\n")
|
" Some warning \"foo\" bar\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("[Pe223]: Some warning \"foo\" bar"),
|
"[Pe223]: Some warning \"foo\" bar",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Details warning")
|
QTest::newRow("Details warning")
|
||||||
@@ -355,12 +355,12 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
"\"c:\\foo\\main.c\",63 Warning[Pe223]:\n"
|
"\"c:\\foo\\main.c\",63 Warning[Pe223]:\n"
|
||||||
" Some warning\n")
|
" Some warning\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("[Pe223]: Some warning\n"
|
"[Pe223]: Some warning\n"
|
||||||
" some_detail;\n"
|
" some_detail;\n"
|
||||||
" ^"),
|
" ^",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("No details split-description warning")
|
QTest::newRow("No details split-description warning")
|
||||||
@@ -373,10 +373,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
" Some warning\n"
|
" Some warning\n"
|
||||||
" , split\n")
|
" , split\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("[Pe223]: Some warning, split"),
|
"[Pe223]: Some warning, split",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("No details error")
|
QTest::newRow("No details error")
|
||||||
@@ -387,10 +387,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
<< QString::fromLatin1("\"c:\\foo\\main.c\",63 Error[Pe223]:\n"
|
<< QString::fromLatin1("\"c:\\foo\\main.c\",63 Error[Pe223]:\n"
|
||||||
" Some error\n")
|
" Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Pe223]: Some error"),
|
"[Pe223]: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Details error")
|
QTest::newRow("Details error")
|
||||||
@@ -405,12 +405,12 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
"\"c:\\foo\\main.c\",63 Error[Pe223]:\n"
|
"\"c:\\foo\\main.c\",63 Error[Pe223]:\n"
|
||||||
" Some error\n")
|
" Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Pe223]: Some error\n"
|
"[Pe223]: Some error\n"
|
||||||
" some_detail;\n"
|
" some_detail;\n"
|
||||||
" ^"),
|
" ^",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("No details split-description error")
|
QTest::newRow("No details split-description error")
|
||||||
@@ -423,10 +423,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
" Some error\n"
|
" Some error\n"
|
||||||
" , split\n")
|
" , split\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Pe223]: Some error, split"),
|
"[Pe223]: Some error, split",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("No definition for")
|
QTest::newRow("No definition for")
|
||||||
@@ -441,10 +441,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
" n.c.o\n"
|
" n.c.o\n"
|
||||||
"]\n")
|
"]\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Li005]: Some error \"foo\""),
|
"[Li005]: Some error \"foo\"",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\bar\\main.c.o")),
|
Utils::FilePath::fromUserInput("c:\\foo\\bar\\main.c.o"),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("More than one source file specified")
|
QTest::newRow("More than one source file specified")
|
||||||
@@ -459,12 +459,12 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
" c:\\bar.c\n"
|
" c:\\bar.c\n"
|
||||||
"Fatal error detected, aborting.\n")
|
"Fatal error detected, aborting.\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Su011]: Some error:\n"
|
"[Su011]: Some error:\n"
|
||||||
" c:\\foo.c\n"
|
" c:\\foo.c\n"
|
||||||
" c:\\bar.c"),
|
" c:\\bar.c",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("At end of source")
|
QTest::newRow("At end of source")
|
||||||
@@ -473,10 +473,10 @@ void BareMetalPlugin::testIarOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("At end of source Error[Pe040]: Some error \";\"\n")
|
<< QString::fromLatin1("At end of source Error[Pe040]: Some error \";\"\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("[Pe040]: Some error \";\""),
|
"[Pe040]: Some error \";\"",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ const char displayNameKeyC[] = "BareMetal.IDebugServerProvider.DisplayName";
|
|||||||
|
|
||||||
static QString createId(const QString &id)
|
static QString createId(const QString &id)
|
||||||
{
|
{
|
||||||
QString newId = id.left(id.indexOf(QLatin1Char(':')));
|
QString newId = id.left(id.indexOf(':'));
|
||||||
newId.append(QLatin1Char(':') + QUuid::createUuid().toString());
|
newId.append(':' + QUuid::createUuid().toString());
|
||||||
return newId;
|
return newId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,8 +102,8 @@ bool IDebugServerProvider::operator==(const IDebugServerProvider &other) const
|
|||||||
if (this == &other)
|
if (this == &other)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
const QString thisId = id().left(id().indexOf(QLatin1Char(':')));
|
const QString thisId = id().left(id().indexOf(':'));
|
||||||
const QString otherId = other.id().left(other.id().indexOf(QLatin1Char(':')));
|
const QString otherId = other.id().left(other.id().indexOf(':'));
|
||||||
|
|
||||||
// We ignore displayname
|
// We ignore displayname
|
||||||
return thisId == otherId;
|
return thisId == otherId;
|
||||||
@@ -112,8 +112,8 @@ bool IDebugServerProvider::operator==(const IDebugServerProvider &other) const
|
|||||||
QVariantMap IDebugServerProvider::toMap() const
|
QVariantMap IDebugServerProvider::toMap() const
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
{QLatin1String(idKeyC), m_id},
|
{idKeyC, m_id},
|
||||||
{QLatin1String(displayNameKeyC), m_displayName},
|
{displayNameKeyC, m_displayName},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,8 +136,8 @@ void IDebugServerProvider::providerUpdated()
|
|||||||
|
|
||||||
bool IDebugServerProvider::fromMap(const QVariantMap &data)
|
bool IDebugServerProvider::fromMap(const QVariantMap &data)
|
||||||
{
|
{
|
||||||
m_id = data.value(QLatin1String(idKeyC)).toString();
|
m_id = data.value(idKeyC).toString();
|
||||||
m_displayName = data.value(QLatin1String(displayNameKeyC)).toString();
|
m_displayName = data.value(displayNameKeyC).toString();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,12 +170,12 @@ void IDebugServerProviderFactory::setDisplayName(const QString &name)
|
|||||||
|
|
||||||
QString IDebugServerProviderFactory::idFromMap(const QVariantMap &data)
|
QString IDebugServerProviderFactory::idFromMap(const QVariantMap &data)
|
||||||
{
|
{
|
||||||
return data.value(QLatin1String(idKeyC)).toString();
|
return data.value(idKeyC).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDebugServerProviderFactory::idToMap(QVariantMap &data, const QString &id)
|
void IDebugServerProviderFactory::idToMap(QVariantMap &data, const QString &id)
|
||||||
{
|
{
|
||||||
data.insert(QLatin1String(idKeyC), id);
|
data.insert(idKeyC, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IDebugServerProviderConfigWidget
|
// IDebugServerProviderConfigWidget
|
||||||
@@ -225,7 +225,7 @@ void IDebugServerProviderConfigWidget::setErrorMessage(const QString &m)
|
|||||||
clearErrorMessage();
|
clearErrorMessage();
|
||||||
} else {
|
} else {
|
||||||
m_errorLabel->setText(m);
|
m_errorLabel->setText(m);
|
||||||
m_errorLabel->setStyleSheet(QLatin1String("background-color: \"red\""));
|
m_errorLabel->setStyleSheet("background-color: \"red\"");
|
||||||
m_errorLabel->setVisible(true);
|
m_errorLabel->setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,9 +186,9 @@ bool KeilParser::parseMcs51FatalErrorMessage2(const QString &lne)
|
|||||||
return false;
|
return false;
|
||||||
const QString key = match.captured(1);
|
const QString key = match.captured(1);
|
||||||
QString descr;
|
QString descr;
|
||||||
if (key == QLatin1Char('A'))
|
if (key == 'A')
|
||||||
descr = "Assembler fatal error";
|
descr = "Assembler fatal error";
|
||||||
else if (key == QLatin1Char('C'))
|
else if (key == 'C')
|
||||||
descr = "Compiler fatal error";
|
descr = "Compiler fatal error";
|
||||||
const Task task(Task::TaskType::Error, descr, {}, -1,
|
const Task task(Task::TaskType::Error, descr, {}, -1,
|
||||||
Constants::TASK_CATEGORY_COMPILE);
|
Constants::TASK_CATEGORY_COMPILE);
|
||||||
@@ -208,7 +208,7 @@ void KeilParser::stdError(const QString &line)
|
|||||||
if (parseArmErrorOrFatalErorrMessage(lne))
|
if (parseArmErrorOrFatalErorrMessage(lne))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (lne.startsWith(QLatin1Char(' '))) {
|
if (lne.startsWith(' ')) {
|
||||||
m_snippets.push_back(lne);
|
m_snippets.push_back(lne);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -330,10 +330,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Warning: #1234: Some warning\n")
|
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Warning: #1234: Some warning\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("#1234: Some warning"),
|
"#1234: Some warning",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: Details warning")
|
QTest::newRow("ARM: Details warning")
|
||||||
@@ -346,12 +346,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" int f;\n"
|
" int f;\n"
|
||||||
" ^\n")
|
" ^\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("#1234: Some warning\n"
|
"#1234: Some warning\n"
|
||||||
" int f;\n"
|
" int f;\n"
|
||||||
" ^"),
|
" ^",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: No details error")
|
QTest::newRow("ARM: No details error")
|
||||||
@@ -360,10 +360,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Error: #1234: Some error\n")
|
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Error: #1234: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("#1234: Some error"),
|
"#1234: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: No details error with column")
|
QTest::newRow("ARM: No details error with column")
|
||||||
@@ -372,10 +372,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("\"flash.sct\", line 51 (column 20): Error: L1234: Some error\n")
|
<< QString::fromLatin1("\"flash.sct\", line 51 (column 20): Error: L1234: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("L1234: Some error"),
|
"L1234: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("flash.sct")),
|
Utils::FilePath::fromUserInput("flash.sct"),
|
||||||
51,
|
51,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: Details error")
|
QTest::newRow("ARM: Details error")
|
||||||
@@ -388,12 +388,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" int f;\n"
|
" int f;\n"
|
||||||
" ^\n")
|
" ^\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("#1234: Some error\n"
|
"#1234: Some error\n"
|
||||||
" int f;\n"
|
" int f;\n"
|
||||||
" ^"),
|
" ^",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: At end of source")
|
QTest::newRow("ARM: At end of source")
|
||||||
@@ -402,10 +402,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 71: Error: At end of source: #40: Some error\n")
|
<< QString::fromLatin1("\"c:\\foo\\main.c\", line 71: Error: At end of source: #40: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("#40: Some error"),
|
"#40: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
71,
|
71,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("ARM: Starts with error")
|
QTest::newRow("ARM: Starts with error")
|
||||||
@@ -414,10 +414,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("Error: L6226E: Some error.\n")
|
<< QString::fromLatin1("Error: L6226E: Some error.\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("L6226E: Some error."),
|
"L6226E: Some error.",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
// MCS51 compiler specific patterns.
|
// MCS51 compiler specific patterns.
|
||||||
@@ -429,10 +429,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** WARNING #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some warning\n")
|
<< QString::fromLatin1("*** WARNING #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some warning\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("#A9: Some warning"),
|
"#A9: Some warning",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\dscr.a51")),
|
Utils::FilePath::fromUserInput("c:\\foo\\dscr.a51"),
|
||||||
15,
|
15,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Assembler simple error")
|
QTest::newRow("MCS51: Assembler simple error")
|
||||||
@@ -441,10 +441,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** ERROR #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some error\n")
|
<< QString::fromLatin1("*** ERROR #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("#A9: Some error"),
|
"#A9: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\dscr.a51")),
|
Utils::FilePath::fromUserInput("c:\\foo\\dscr.a51"),
|
||||||
15,
|
15,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Assembler fatal error")
|
QTest::newRow("MCS51: Assembler fatal error")
|
||||||
@@ -457,12 +457,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" Some detail N\n")
|
" Some detail N\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Assembler fatal error\n"
|
"Assembler fatal error\n"
|
||||||
" Some detail 1\n"
|
" Some detail 1\n"
|
||||||
" Some detail N"),
|
" Some detail N",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Assembler details error")
|
QTest::newRow("MCS51: Assembler details error")
|
||||||
@@ -475,12 +475,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
"*** ERROR #A45 IN 28 (d:\\foo.a51, LINE 28): Some error\n")
|
"*** ERROR #A45 IN 28 (d:\\foo.a51, LINE 28): Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("#A45: Some error\n"
|
"#A45: Some error\n"
|
||||||
" Some detail\n"
|
" Some detail\n"
|
||||||
" ___^"),
|
" ___^",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("d:\\foo.a51")),
|
Utils::FilePath::fromUserInput("d:\\foo.a51"),
|
||||||
28,
|
28,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
// Compiler messages.
|
// Compiler messages.
|
||||||
@@ -490,10 +490,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning\n")
|
<< QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("C123: Some warning"),
|
"C123: Some warning",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo.c")),
|
Utils::FilePath::fromUserInput("c:\\foo.c"),
|
||||||
13,
|
13,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Compiler extended warning")
|
QTest::newRow("MCS51: Compiler extended warning")
|
||||||
@@ -502,10 +502,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning : 'extended text'\n")
|
<< QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning : 'extended text'\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("C123: Some warning : 'extended text'"),
|
"C123: Some warning : 'extended text'",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo.c")),
|
Utils::FilePath::fromUserInput("c:\\foo.c"),
|
||||||
13,
|
13,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Compiler simple error")
|
QTest::newRow("MCS51: Compiler simple error")
|
||||||
@@ -514,10 +514,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error\n")
|
<< QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("C123: Some error"),
|
"C123: Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo.c")),
|
Utils::FilePath::fromUserInput("c:\\foo.c"),
|
||||||
13,
|
13,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Compiler extended error")
|
QTest::newRow("MCS51: Compiler extended error")
|
||||||
@@ -526,10 +526,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error : 'extended text'\n")
|
<< QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error : 'extended text'\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("C123: Some error : 'extended text'"),
|
"C123: Some error : 'extended text'",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo.c")),
|
Utils::FilePath::fromUserInput("c:\\foo.c"),
|
||||||
13,
|
13,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Compiler fatal error")
|
QTest::newRow("MCS51: Compiler fatal error")
|
||||||
@@ -542,12 +542,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" Some detail N\n")
|
" Some detail N\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Compiler fatal error\n"
|
"Compiler fatal error\n"
|
||||||
" Some detail 1\n"
|
" Some detail 1\n"
|
||||||
" Some detail N"),
|
" Some detail N",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
// Linker messages.
|
// Linker messages.
|
||||||
@@ -559,8 +559,8 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" Some detail 1\n")
|
" Some detail 1\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("L16: Some warning\n"
|
"L16: Some warning\n"
|
||||||
" Some detail 1"),
|
" Some detail 1",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
@@ -572,10 +572,10 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
<< QString::fromLatin1("*** FATAL ERROR L456: Some error\n")
|
<< QString::fromLatin1("*** FATAL ERROR L456: Some error\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("L456: Some error"),
|
"L456: Some error",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("MCS51: Linker extended fatal error")
|
QTest::newRow("MCS51: Linker extended fatal error")
|
||||||
@@ -588,12 +588,12 @@ void BareMetalPlugin::testKeilOutputParsers_data()
|
|||||||
" Some detail N\n")
|
" Some detail N\n")
|
||||||
<< QString()
|
<< QString()
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("L456: Some error\n"
|
"L456: Some error\n"
|
||||||
" Some detail 1\n"
|
" Some detail 1\n"
|
||||||
" Some detail N"),
|
" Some detail N",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void SdccParser::newTask(const Task &task)
|
|||||||
void SdccParser::amendDescription(const QString &desc)
|
void SdccParser::amendDescription(const QString &desc)
|
||||||
{
|
{
|
||||||
const int start = m_lastTask.description.count() + 1;
|
const int start = m_lastTask.description.count() + 1;
|
||||||
m_lastTask.description.append(QLatin1Char('\n'));
|
m_lastTask.description.append('\n');
|
||||||
m_lastTask.description.append(desc);
|
m_lastTask.description.append(desc);
|
||||||
|
|
||||||
QTextLayout::FormatRange fr;
|
QTextLayout::FormatRange fr;
|
||||||
@@ -214,10 +214,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("c:\\foo\\main.c:63: Error: Some error\n")
|
<< QString::fromLatin1("c:\\foo\\main.c:63: Error: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error"),
|
"Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler single line warning")
|
QTest::newRow("Compiler single line warning")
|
||||||
@@ -226,10 +226,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("c:\\foo\\main.c:63: warning 123: Some warning\n")
|
<< QString::fromLatin1("c:\\foo\\main.c:63: warning 123: Some warning\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("Some warning"),
|
"Some warning",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler multi line warning")
|
QTest::newRow("Compiler multi line warning")
|
||||||
@@ -242,12 +242,12 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
"details #1\n"
|
"details #1\n"
|
||||||
" details #2\n")
|
" details #2\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("Some warning\n"
|
"Some warning\n"
|
||||||
"details #1\n"
|
"details #1\n"
|
||||||
" details #2"),
|
" details #2",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler simple single line error")
|
QTest::newRow("Compiler simple single line error")
|
||||||
@@ -256,10 +256,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("c:\\foo\\main.c:63: error: Some error\n")
|
<< QString::fromLatin1("c:\\foo\\main.c:63: error: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error"),
|
"Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler single line error")
|
QTest::newRow("Compiler single line error")
|
||||||
@@ -268,10 +268,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("c:\\foo\\main.c:63: error 123: Some error\n")
|
<< QString::fromLatin1("c:\\foo\\main.c:63: error 123: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error"),
|
"Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler multi line error")
|
QTest::newRow("Compiler multi line error")
|
||||||
@@ -284,12 +284,12 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
"details #1\n"
|
"details #1\n"
|
||||||
" details #2\n")
|
" details #2\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error\n"
|
"Some error\n"
|
||||||
"details #1\n"
|
"details #1\n"
|
||||||
" details #2"),
|
" details #2",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler syntax error")
|
QTest::newRow("Compiler syntax error")
|
||||||
@@ -298,10 +298,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("c:\\foo\\main.c:63: syntax error: Some error\n")
|
<< QString::fromLatin1("c:\\foo\\main.c:63: syntax error: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error"),
|
"Some error",
|
||||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
Utils::FilePath::fromUserInput("c:\\foo\\main.c"),
|
||||||
63,
|
63,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler bad option error")
|
QTest::newRow("Compiler bad option error")
|
||||||
@@ -310,10 +310,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("at 1: error 123: Some error\n")
|
<< QString::fromLatin1("at 1: error 123: Some error\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("Some error"),
|
"Some error",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Compiler bad option warning")
|
QTest::newRow("Compiler bad option warning")
|
||||||
@@ -322,10 +322,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("at 1: warning 123: Some warning\n")
|
<< QString::fromLatin1("at 1: warning 123: Some warning\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("Some warning"),
|
"Some warning",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Linker warning")
|
QTest::newRow("Linker warning")
|
||||||
@@ -334,10 +334,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'\n")
|
<< QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'\n")
|
||||||
<< (Tasks() << Task(Task::Warning,
|
<< (Tasks() << Task(Task::Warning,
|
||||||
QLatin1String("Couldn't find library 'foo.lib'"),
|
"Couldn't find library 'foo.lib'",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
QTest::newRow("Linker error")
|
QTest::newRow("Linker error")
|
||||||
@@ -346,10 +346,10 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
<< QString()
|
<< QString()
|
||||||
<< QString::fromLatin1("?ASlink-Error-<cannot open> : \"foo.rel\"\n")
|
<< QString::fromLatin1("?ASlink-Error-<cannot open> : \"foo.rel\"\n")
|
||||||
<< (Tasks() << Task(Task::Error,
|
<< (Tasks() << Task(Task::Error,
|
||||||
QLatin1String("<cannot open> : \"foo.rel\""),
|
"<cannot open> : \"foo.rel\"",
|
||||||
Utils::FilePath(),
|
Utils::FilePath(),
|
||||||
-1,
|
-1,
|
||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user