diff options
author | Pekka Vuorela <pvuorela@iki.fi> | 2023-12-08 13:48:12 +0200 |
---|---|---|
committer | Pekka Vuorela <pvuorela@iki.fi> | 2023-12-14 09:27:17 +0200 |
commit | 63df6b95be9ce0056009f547e5194ec0dcaca3b3 (patch) | |
tree | 641a8e4f162a334b4a7863b99d5808d17af968ac /src/libraries/qmfclient/qmailmessage.cpp | |
parent | d0ad741b2d0710fd3fb83ade47c506eb576a2222 (diff) |
Fix build on Qt6
Regression on the D-Bus ipc which introduced
e.g. Q_DECLARE_USER_METATYPE(QMailMessagePart) on qmailmessage.h.
On Qt6 the qRegisterMetaType() ends up instantiating
template<QDebug> QMailMessagePartPrivate::serialize(type)
which then fails to build due to not having << operator for
combination of QDebug and QMailMessagePartContainer::Location.
Compiler ends up spewing pages and pages of errors and warnings.
Not entirely following what's causing the difference to Qt5, and
how QDebug serialize() works with one class but not on other, but
suppose this explicit operator should be clean enough and avoiding
side-effects on the actually running code.
Change-Id: I4939e89d625ac06c682adbb5e31803e1ef019fd1
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Diffstat (limited to 'src/libraries/qmfclient/qmailmessage.cpp')
-rw-r--r-- | src/libraries/qmfclient/qmailmessage.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libraries/qmfclient/qmailmessage.cpp b/src/libraries/qmfclient/qmailmessage.cpp index 748a128e..fd09753f 100644 --- a/src/libraries/qmfclient/qmailmessage.cpp +++ b/src/libraries/qmfclient/qmailmessage.cpp @@ -8978,3 +8978,9 @@ void QMailMessage::deserialize(Stream &stream) template void QMailMessage::deserialize(QDataStream &); template void QMailMessage::deserialize(const QDBusArgument &); + +QDebug operator<<(QDebug dbg, const QMailMessagePart &part) +{ + dbg << "QMailMessagePart" << part.contentID() << "location:" << part.contentLocation(); + return dbg; +} |