forked from qt-creator/qt-creator
Utils: Remove unnecessary code
Change-Id: I3844d71d3f77d49f7e84c4feae910679391fa91a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -140,7 +140,7 @@ using namespace Internal;
|
|||||||
MacroExpander::registerVariable(
|
MacroExpander::registerVariable(
|
||||||
"MyVariable",
|
"MyVariable",
|
||||||
Tr::tr("The current value of whatever I want."));
|
Tr::tr("The current value of whatever I want."));
|
||||||
[]() -> QString {
|
[] {
|
||||||
QString value;
|
QString value;
|
||||||
// do whatever is necessary to retrieve the value
|
// do whatever is necessary to retrieve the value
|
||||||
[...]
|
[...]
|
||||||
@@ -380,13 +380,13 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix,
|
|||||||
registerVariable(
|
registerVariable(
|
||||||
prefix + kFilePathPostfix,
|
prefix + kFilePathPostfix,
|
||||||
Tr::tr("%1: Full path including file name.").arg(heading),
|
Tr::tr("%1: Full path including file name.").arg(heading),
|
||||||
[base]() -> QString { return base().toUserOutput(); },
|
[base] { return base().toUserOutput(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
|
|
||||||
registerVariable(
|
registerVariable(
|
||||||
prefix + kPathPostfix,
|
prefix + kPathPostfix,
|
||||||
Tr::tr("%1: Full path excluding file name.").arg(heading),
|
Tr::tr("%1: Full path excluding file name.").arg(heading),
|
||||||
[base]() -> QString { return base().parentDir().toUserOutput(); },
|
[base] { return base().parentDir().toUserOutput(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
|
|
||||||
registerVariable(
|
registerVariable(
|
||||||
@@ -394,7 +394,7 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix,
|
|||||||
Tr::tr(
|
Tr::tr(
|
||||||
"%1: Full path including file name, with native path separator (backslash on Windows).")
|
"%1: Full path including file name, with native path separator (backslash on Windows).")
|
||||||
.arg(heading),
|
.arg(heading),
|
||||||
[base]() -> QString { return base().nativePath(); },
|
[base] { return base().nativePath(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
|
|
||||||
registerVariable(
|
registerVariable(
|
||||||
@@ -402,19 +402,19 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix,
|
|||||||
Tr::tr(
|
Tr::tr(
|
||||||
"%1: Full path excluding file name, with native path separator (backslash on Windows).")
|
"%1: Full path excluding file name, with native path separator (backslash on Windows).")
|
||||||
.arg(heading),
|
.arg(heading),
|
||||||
[base]() -> QString { return base().parentDir().nativePath(); },
|
[base] { return base().parentDir().nativePath(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
|
|
||||||
registerVariable(
|
registerVariable(
|
||||||
prefix + kFileNamePostfix,
|
prefix + kFileNamePostfix,
|
||||||
Tr::tr("%1: File name without path.").arg(heading),
|
Tr::tr("%1: File name without path.").arg(heading),
|
||||||
[base]() -> QString { return base().fileName(); },
|
[base] { return base().fileName(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
|
|
||||||
registerVariable(
|
registerVariable(
|
||||||
prefix + kFileBaseNamePostfix,
|
prefix + kFileBaseNamePostfix,
|
||||||
Tr::tr("%1: File base name without path and suffix.").arg(heading),
|
Tr::tr("%1: File base name without path and suffix.").arg(heading),
|
||||||
[base]() -> QString { return base().baseName(); },
|
[base] { return base().baseName(); },
|
||||||
visibleInChooser);
|
visibleInChooser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user