diff options
Diffstat (limited to 'src/libs/utils/macroexpander.cpp')
-rw-r--r-- | src/libs/utils/macroexpander.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/utils/macroexpander.cpp b/src/libs/utils/macroexpander.cpp index 50861f5a97..5e20376213 100644 --- a/src/libs/utils/macroexpander.cpp +++ b/src/libs/utils/macroexpander.cpp @@ -395,22 +395,22 @@ void MacroExpander::registerIntVariable(const QByteArray &variable, * \sa registerVariable(), registerIntVariable(), registerPrefix() */ void MacroExpander::registerFileVariables(const QByteArray &prefix, - const QString &heading, const StringFunction &base, bool visibleInChooser) + const QString &heading, const FileFunction &base, bool visibleInChooser) { registerVariable(prefix + kFilePathPostfix, tr("%1: Full path including file name.").arg(heading), - [base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).filePath(); }, + [base]() -> QString { QString tmp = base().toString(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).filePath(); }, visibleInChooser); registerVariable(prefix + kPathPostfix, tr("%1: Full path excluding file name.").arg(heading), - [base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).path(); }, + [base]() -> QString { QString tmp = base().toString(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).path(); }, visibleInChooser); registerVariable(prefix + kNativeFilePathPostfix, tr("%1: Full path including file name, with native path separator (backslash on Windows).").arg(heading), [base]() -> QString { - QString tmp = base(); + QString tmp = base().toString(); return tmp.isEmpty() ? QString() : QDir::toNativeSeparators(QFileInfo(tmp).filePath()); }, visibleInChooser); @@ -418,19 +418,19 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix, registerVariable(prefix + kNativePathPostfix, tr("%1: Full path excluding file name, with native path separator (backslash on Windows).").arg(heading), [base]() -> QString { - QString tmp = base(); + QString tmp = base().toString(); return tmp.isEmpty() ? QString() : QDir::toNativeSeparators(QFileInfo(tmp).path()); }, visibleInChooser); registerVariable(prefix + kFileNamePostfix, tr("%1: File name without path.").arg(heading), - [base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : FilePath::fromString(tmp).fileName(); }, + [base]() -> QString { QString tmp = base().toString(); return tmp.isEmpty() ? QString() : FilePath::fromString(tmp).fileName(); }, visibleInChooser); registerVariable(prefix + kFileBaseNamePostfix, tr("%1: File base name without path and suffix.").arg(heading), - [base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).baseName(); }, + [base]() -> QString { QString tmp = base().toString(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).baseName(); }, visibleInChooser); } |