forked from qt-creator/qt-creator
Utils: Remove one ProcessArgs::expandMacros overload
Only used once. Also allow logging of expansion failures. Change-Id: I357ed6ed28fe379d482358c46b495bc727f86902 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -35,11 +35,14 @@
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
static Q_LOGGING_CATEGORY(expanderLog, "qtc.utils.macroexpander", QtWarningMsg)
|
||||
|
||||
const char kFilePathPostfix[] = ":FilePath";
|
||||
const char kPathPostfix[] = ":Path";
|
||||
const char kNativeFilePathPostfix[] = ":NativeFilePath";
|
||||
@@ -327,7 +330,10 @@ QVariant MacroExpander::expandVariant(const QVariant &v) const
|
||||
|
||||
QString MacroExpander::expandProcessArgs(const QString &argsWithVariables) const
|
||||
{
|
||||
return ProcessArgs::expandMacros(argsWithVariables, d);
|
||||
QString result = argsWithVariables;
|
||||
const bool ok = ProcessArgs::expandMacros(&result, d);
|
||||
QTC_ASSERT(ok, qCDebug(expanderLog) << "Expanding failed: " << argsWithVariables);
|
||||
return result;
|
||||
}
|
||||
|
||||
static QByteArray fullPrefix(const QByteArray &prefix)
|
||||
|
||||
Reference in New Issue
Block a user