forked from qt-creator/qt-creator
Minor preparation for Qt6
Change-Id: Id47e7a7ed28dffd12403f2fec72370a8068ad0c0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -86,15 +86,14 @@ public:
|
|||||||
ProfileTreeItem * const newRoot = new ProfileTreeItem(QString(), QString());
|
ProfileTreeItem * const newRoot = new ProfileTreeItem(QString(), QString());
|
||||||
QHash<QStringList, ProfileTreeItem *> itemMap;
|
QHash<QStringList, ProfileTreeItem *> itemMap;
|
||||||
const QStringList output = QbsProfileManager::runQbsConfig(
|
const QStringList output = QbsProfileManager::runQbsConfig(
|
||||||
QbsProfileManager::QbsConfigOp::Get, "profiles").split('\n', QString::SkipEmptyParts);
|
QbsProfileManager::QbsConfigOp::Get, "profiles").split('\n', Qt::SkipEmptyParts);
|
||||||
for (QString line : output) {
|
for (QString line : output) {
|
||||||
line = line.trimmed();
|
line = line.trimmed();
|
||||||
line = line.mid(QString("profiles.").length());
|
line = line.mid(QString("profiles.").length());
|
||||||
const int colonIndex = line.indexOf(':');
|
const int colonIndex = line.indexOf(':');
|
||||||
if (colonIndex == -1)
|
if (colonIndex == -1)
|
||||||
continue;
|
continue;
|
||||||
const QStringList key = line.left(colonIndex).trimmed()
|
const QStringList key = line.left(colonIndex).trimmed().split('.', Qt::SkipEmptyParts);
|
||||||
.split('.', QString::SkipEmptyParts);
|
|
||||||
const QString value = line.mid(colonIndex + 1).trimmed();
|
const QString value = line.mid(colonIndex + 1).trimmed();
|
||||||
QStringList partialKey;
|
QStringList partialKey;
|
||||||
ProfileTreeItem *parent = newRoot;
|
ProfileTreeItem *parent = newRoot;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ SystemPreprocessor::SystemPreprocessor(bool verbose)
|
|||||||
= Utils::Environment::systemEnvironment().searchInPath(key);
|
= Utils::Environment::systemEnvironment().searchInPath(key);
|
||||||
if (!executablePath.isEmpty()) {
|
if (!executablePath.isEmpty()) {
|
||||||
m_compiler = key;
|
m_compiler = key;
|
||||||
m_compilerArguments = m_knownCompilers[key].split(QLatin1Char(' '), QString::SkipEmptyParts);
|
m_compilerArguments = m_knownCompilers[key].split(QLatin1Char(' '), Qt::SkipEmptyParts);
|
||||||
m_compilerArguments
|
m_compilerArguments
|
||||||
<< QDir::toNativeSeparators(QLatin1String(PATH_PREPROCESSOR_CONFIG));
|
<< QDir::toNativeSeparators(QLatin1String(PATH_PREPROCESSOR_CONFIG));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user