diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2014-03-31 18:36:10 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-01 12:44:40 +0200 |
commit | de59f74282e1e5bbb89cb9d11becf5c1af575146 (patch) | |
tree | ec3af472d90b281ffa3100970b1782123201337d /src/corelib/io/qdatastream.h | |
parent | a6f8aa0ae1d5a1d1099df1891ea60b14b6eb6065 (diff) |
Add Qt_DefaultCompiledVersion to the QDataStream::Version enum.
This allows code to, amongst other things, use the latest compiled
QDataStream version in static const variables, where previously the
only alternative was to hard-code the version (and update it with every
Qt version bump) or use QDataStream().version(), which is not allowed
because it increases Qt's startup time.
Change-Id: If1f29fc9cd83c9d7fe619a4ca197152aa9c77a04
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/io/qdatastream.h')
-rw-r--r-- | src/corelib/io/qdatastream.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 3bf90b39a3..808fbe73f6 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -89,10 +89,11 @@ public: Qt_5_1 = 14, Qt_5_2 = 15, Qt_5_3 = Qt_5_2, - Qt_5_4 = 16 + Qt_5_4 = 16, #if QT_VERSION >= 0x050500 -#error Add the datastream version for this Qt version +#error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion #endif + Qt_DefaultCompiledVersion = Qt_5_4 }; enum ByteOrder { |