diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-04-25 23:28:42 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-04-27 16:12:55 +0000 |
commit | 6dfc3541e67f7c9297310c898d928caabde4e1f4 (patch) | |
tree | a2a7f1adda622ebe464f227206d3672a08b733ec /src/corelib/global/qlibraryinfo.cpp | |
parent | f05d5dfa85a5863dbcab42e8d5e06eda8754a73d (diff) |
Add QLibraryInfo::version() returning the Qt version as QVersionNumber
[ChangeLog][QtCore][QLibraryInfo] Added QLibraryInfo::version(), which
returns the current version of the Qt library as a QVersionNumber
object.
Change-Id: Ifea6e497f11a461db432ffff1448d4dc84ef57b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 458200180e..70e19d1f86 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -366,6 +366,19 @@ QLibraryInfo::isDebugBuild() #endif } +#ifndef QT_BOOTSTRAPPED +/*! + \since 5.8 + Returns the version of the Qt library. + + \sa qVersion() +*/ +QVersionNumber QLibraryInfo::version() Q_DECL_NOTHROW +{ + return QVersionNumber(QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH); +} +#endif // QT_BOOTSTRAPPED + #endif // QT_BUILD_QMAKE /* |