GODT-1797: copyright notice shows a date range with the build year.

This commit is contained in:
Xavier Michelon
2023-01-11 16:59:05 +01:00
parent 777ad369a2
commit c3eb6b2dbf
3 changed files with 11 additions and 1 deletions

View File

@ -102,6 +102,14 @@ bool QMLBackend::waitForEventStreamReaderToFinish(qint32 timeoutMs) {
}
//****************************************************************************************************************************************************
/// \return The build year as a string (e.g. 2023)
//****************************************************************************************************************************************************
QString QMLBackend::buildYear() {
return QString(__DATE__).right(4);
}
//****************************************************************************************************************************************************
/// \return The position of the cursor.
//****************************************************************************************************************************************************

View File

@ -45,6 +45,7 @@ public: // member functions.
bool waitForEventStreamReaderToFinish(qint32 timeoutMs); ///< Wait for the event stream reader to finish.
// invokable methods can be called from QML. They generally return a value, which slots cannot do.
Q_INVOKABLE static QString buildYear(); ///< Return the application build year.
Q_INVOKABLE QPoint getCursorPos() const; ///< Retrieve the cursor position.
Q_INVOKABLE bool isPortFree(int port) const; ///< Check if a given network port is available.
Q_INVOKABLE QString nativePath(QUrl const &url) const; ///< Retrieve the native path of a local URL.

View File

@ -108,9 +108,10 @@ SettingsView {
horizontalAlignment: Text.AlignHCenter
text: qsTr("%1 v%2<br>© 2021 %3<br>%4 %5<br>%6").
text: qsTr("%1 v%2<br>© 2017-%3 %4<br>%5 %6<br>%7").
arg(Backend.appname).
arg(Backend.version).
arg(Backend.buildYear()).
arg(Backend.vendor).
arg(link(Backend.licensePath, qsTr("License"))).
arg(link(Backend.dependencyLicensesLink, qsTr("Dependencies"))).