Commit 4dbfd288 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

SDKtool: Fix test case and compiler warning



Do check for toolchains not defined in the toolchains.xml file again,
but also allow for toolchain IDs to be ABIs.

This partially reverts a commit from Kai made earlier.

Change-Id: Idad004f0bff655bc136bc43de5837d61a045e311
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 92239b67
......@@ -40,6 +40,8 @@
#include "settings.h"
#include <QRegExp>
#include <iostream>
// Qt version file stuff:
......@@ -298,6 +300,15 @@ bool AddKitOperation::test() const
KeyValuePairList() << KeyValuePair(QLatin1String("PE.Profile.Data/extraData"), QVariant(QLatin1String("extraValue"))));
if (!empty.isEmpty())
return false;
// Do not fail if TC is an ABI:
empty = addKit(map, tcMap, qtMap, devMap,
QLatin1String("testId"), QLatin1String("Test Kit"), QLatin1String("/tmp/icon.png"),
QString(), 1, QLatin1String("/usr/bin/gdb-test"),
QByteArray("Desktop"), QLatin1String("{dev-id}"), QString(),
QLatin1String("x86-linux-generic-elf-64bit"), QLatin1String("{qt-id}"), QLatin1String("unsupported/mkspec"),
KeyValuePairList() << KeyValuePair(QLatin1String("PE.Profile.Data/extraData"), QVariant(QLatin1String("extraValue"))));
if (empty.isEmpty())
return false;
// Fail if Qt is not there:
empty = addKit(map, tcMap, qtMap, devMap,
QLatin1String("testId"), QLatin1String("Test Kit"), QLatin1String("/tmp/icon.png"),
......@@ -498,6 +509,14 @@ QVariantMap AddKitOperation::addKit(const QVariantMap &map, const QVariantMap &t
return QVariantMap();
}
if (!tc.isEmpty() && !AddToolChainOperation::exists(tcMap, tc)) {
QRegExp abiRegExp = QRegExp(QLatin1String("[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-(8|16|32|64|128)bit"));
if (!abiRegExp.exactMatch(tc)) {
std::cerr << "Error: Toolchain " << qPrintable(tc) << " does not exist." << std::endl;
return QVariantMap();
}
}
QString qtId = qt;
if (!qtId.isEmpty() && !qtId.startsWith(QLatin1String("SDK.")))
qtId = QString::fromLatin1("SDK.") + qt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment