forked from qt-creator/qt-creator
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: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -40,6 +40,8 @@
|
|||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
// Qt version file stuff:
|
// Qt version file stuff:
|
||||||
@@ -298,6 +300,15 @@ bool AddKitOperation::test() const
|
|||||||
KeyValuePairList() << KeyValuePair(QLatin1String("PE.Profile.Data/extraData"), QVariant(QLatin1String("extraValue"))));
|
KeyValuePairList() << KeyValuePair(QLatin1String("PE.Profile.Data/extraData"), QVariant(QLatin1String("extraValue"))));
|
||||||
if (!empty.isEmpty())
|
if (!empty.isEmpty())
|
||||||
return false;
|
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:
|
// Fail if Qt is not there:
|
||||||
empty = addKit(map, tcMap, qtMap, devMap,
|
empty = addKit(map, tcMap, qtMap, devMap,
|
||||||
QLatin1String("testId"), QLatin1String("Test Kit"), QLatin1String("/tmp/icon.png"),
|
QLatin1String("testId"), QLatin1String("Test Kit"), QLatin1String("/tmp/icon.png"),
|
||||||
@@ -498,6 +509,14 @@ QVariantMap AddKitOperation::addKit(const QVariantMap &map, const QVariantMap &t
|
|||||||
return QVariantMap();
|
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;
|
QString qtId = qt;
|
||||||
if (!qtId.isEmpty() && !qtId.startsWith(QLatin1String("SDK.")))
|
if (!qtId.isEmpty() && !qtId.startsWith(QLatin1String("SDK.")))
|
||||||
qtId = QString::fromLatin1("SDK.") + qt;
|
qtId = QString::fromLatin1("SDK.") + qt;
|
||||||
|
|||||||
Reference in New Issue
Block a user