summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/coreplugin.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-05-29 11:32:52 +0200
committerTobias Hunger <tobias.hunger@qt.io>2018-05-29 12:14:54 +0000
commit7ad738d2363cb354306b4f5f68105ee8415912b8 (patch)
tree3833c4900c6c2386de9a1e45c15fa68a3ad225f6 /src/plugins/coreplugin/coreplugin.cpp
parent449a749dd7d9ba58cfb588665e2d424a9e14c0d4 (diff)
downloadqt-creator-7ad738d2363cb354306b4f5f68105ee8415912b8.tar.gz
Core: Add more HostOS related information to MacroExpander
* Add HostOS:PathListSeparator * Add HostOS:ExecutableSuffix Both should be useful e.g. for External Tools. Change-Id: I2a807b189eb2ace5ac093e50ff406ebcd3e497a1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/coreplugin.cpp')
-rw-r--r--src/plugins/coreplugin/coreplugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp
index 53a3cba228..3f4b13390d 100644
--- a/src/plugins/coreplugin/coreplugin.cpp
+++ b/src/plugins/coreplugin/coreplugin.cpp
@@ -187,6 +187,12 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
tr("Is %1 running on any unix-based platform?")
.arg(Constants::IDE_DISPLAY_NAME),
[]() { return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString(); });
+ expander->registerVariable("HostOs:PathListSeparator",
+ tr("Return the path list separator for the platform."),
+ []() { return QString(Utils::HostOsInfo::pathListSeparator()); });
+ expander->registerVariable("HostOs:ExecutableSuffix",
+ tr("Return the platform executable suffix."),
+ []() { return QString(Utils::HostOsInfo::withExecutableSuffix("")); });
expander->registerVariable("IDE:ResourcePath",
tr("The directory where %1 finds its pre-installed resources.")
.arg(Constants::IDE_DISPLAY_NAME),