Commit 62e9d51c authored by Eike Ziller's avatar Eike Ziller
Browse files

Macros: Add JS:Util.relativeFilePath(path, base)

Task-number: QTCREATORBUG-14562
Change-Id: Ib0c3ea442d7b2c92cedda7a5933ce73c64acc7e2
Reviewed-by: default avatarTobias Hunger <>
parent 7225f300
......@@ -87,6 +87,11 @@ QString UtilsJsExtension::absoluteFilePath(const QString &in) const
return fi.absoluteFilePath();
QString UtilsJsExtension::relativeFilePath(const QString &path, const QString &base) const
return QDir(base).relativeFilePath(path);
bool UtilsJsExtension::exists(const QString &in) const
return QFileInfo::exists(in);
......@@ -58,6 +58,8 @@ public:
Q_INVOKABLE QString path(const QString &in) const;
Q_INVOKABLE QString absoluteFilePath(const QString &in) const;
Q_INVOKABLE QString relativeFilePath(const QString &path, const QString &base) const;
// File checks:
Q_INVOKABLE bool exists(const QString &in) const;
Q_INVOKABLE bool isDirectory(const QString &in) const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment