diff options
author | Christian Stenger <christian.stenger@qt.io> | 2022-10-20 10:21:14 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2023-06-06 15:55:52 +0300 |
commit | a11fb3ca2d3521d11b37b8754df1bac6ca16a90e (patch) | |
tree | 2f3faca35574432494d6cdd25bd817f29edb39b0 /src/libs/installer/remoteobject.h | |
parent | 9f06f9f34cef3b4db51c03806b1f3b0f06cf7889 (diff) |
Adapt to QTextCodec changes
Task-number: QTIFW-1829
Change-Id: Iad99b41ec67b0d4c64623da04fff65a737f46ff2
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/remoteobject.h')
-rw-r--r-- | src/libs/installer/remoteobject.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libs/installer/remoteobject.h b/src/libs/installer/remoteobject.h index 5e4d14325..ddd512588 100644 --- a/src/libs/installer/remoteobject.h +++ b/src/libs/installer/remoteobject.h @@ -85,7 +85,15 @@ private: template <class T> int writeObject(QDataStream& out, const T& t) const { static_assert(!std::is_pointer<T>::value, "Pointer passed to remote server"); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out << t; +#else + if constexpr (std::is_same<T, QAnyStringView>::value) + out << t.toString(); + else + out << t; +#endif + return 0; } |