diff options
author | Sune Vuorela <sune@vuorela.dk> | 2015-02-05 07:37:13 +0100 |
---|---|---|
committer | Sune Vuorela <sune@vuorela.dk> | 2015-02-12 18:34:23 +0000 |
commit | db631a88a030d4d1263d7ae009086f3dd8637982 (patch) | |
tree | c4b75eee680dd806500ae464313b95d620b627c7 /src/corelib/global | |
parent | c030540f37084effca4aa7e8d94ceeda95d60487 (diff) |
Avoid hardcoding build date in qtcore and tools
To ensure QtCore can be rebuilt and get the exact same results,
it is undesirable to hardcode the build date into the library
Also deprecate QLibrayInfo::buildDate since it is relies on the build
date. QLibraryInfo::buildDate was originally meant for evaluation
licenses and such, but isn't used for that any longer.
Change-Id: I98e91ca3e55f877e6ac0e02de289dc29422fc9da
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 6 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index f591c68bae..9211ce17e8 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -229,15 +229,17 @@ QLibraryInfo::licensedProducts() /*! \since 4.6 - Returns the installation date for this build of Qt. The install date will - usually be the last time that Qt sources were configured. + \deprecated + This function used to return the the installation date for this build of Qt, but now returns an a constant date. */ #ifndef QT_NO_DATESTRING +#if QT_DEPRECATED_SINCE(5, 5) QDate QLibraryInfo::buildDate() { return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate); } +#endif #endif //QT_NO_DATESTRING #if defined(Q_CC_INTEL) // must be before GNU, Clang and MSVC because ICC/ICL claim to be them diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h index 632c2ed1ce..1ad7637fd8 100644 --- a/src/corelib/global/qlibraryinfo.h +++ b/src/corelib/global/qlibraryinfo.h @@ -48,7 +48,9 @@ public: static QString licensedProducts(); #ifndef QT_NO_DATESTRING - static QDate buildDate(); +#if QT_DEPRECATED_SINCE(5, 5) + static QT_DEPRECATED QDate buildDate(); +#endif // QT_DEPRECATED_SINCE(5, 5) #endif //QT_NO_DATESTRING static const char * build() Q_DECL_NOTHROW; |