forked from qt-creator/qt-creator
Wizards: Use filename, not baseName for license headers
Task-number: QTCREATORBUG-17343 Change-Id: I23ae4b510bb2dc81bd34253e8129ba148ae92021 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
"source": "file.h",
|
"source": "file.h",
|
||||||
"target": "%{FileName}",
|
"target": "%{FileName}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.completeBaseName('%{FileName}')}" }
|
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"source": "file.cpp",
|
"source": "file.cpp",
|
||||||
"target": "%{FileName}",
|
"target": "%{FileName}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.completeBaseName('%{FileName}')}" }
|
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ QString UtilsJsExtension::baseName(const QString &in) const
|
|||||||
return fi.baseName();
|
return fi.baseName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString UtilsJsExtension::fileName(const QString &in) const
|
||||||
|
{
|
||||||
|
QFileInfo fi(in);
|
||||||
|
return fi.fileName();
|
||||||
|
}
|
||||||
|
|
||||||
QString UtilsJsExtension::completeBaseName(const QString &in) const
|
QString UtilsJsExtension::completeBaseName(const QString &in) const
|
||||||
{
|
{
|
||||||
QFileInfo fi(in);
|
QFileInfo fi(in);
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public:
|
|||||||
Q_INVOKABLE QString fromNativeSeparators(const QString &in) const;
|
Q_INVOKABLE QString fromNativeSeparators(const QString &in) const;
|
||||||
|
|
||||||
Q_INVOKABLE QString baseName(const QString &in) const;
|
Q_INVOKABLE QString baseName(const QString &in) const;
|
||||||
|
Q_INVOKABLE QString fileName(const QString &in) const;
|
||||||
Q_INVOKABLE QString completeBaseName(const QString &in) const;
|
Q_INVOKABLE QString completeBaseName(const QString &in) const;
|
||||||
Q_INVOKABLE QString suffix(const QString &in) const;
|
Q_INVOKABLE QString suffix(const QString &in) const;
|
||||||
Q_INVOKABLE QString completeSuffix(const QString &in) const;
|
Q_INVOKABLE QString completeSuffix(const QString &in) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user