diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-12 11:10:30 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-12 11:10:30 +0100 |
commit | fb30d455e2dbeed8c242cfbeb153f834b0358f11 (patch) | |
tree | b795457591c71e9604227e58dd810f1a41bd68c7 | |
parent | a4f34202b47f91f7fdfbe2006b2eae10b9b8eeac (diff) | |
download | libquotient-fb30d455e2dbeed8c242cfbeb153f834b0358f11.tar.gz libquotient-fb30d455e2dbeed8c242cfbeb153f834b0358f11.zip |
Fix building with GCC
It didn't like using QT_IGNORE_DEPRECATIONS inside a statement.
-rw-r--r-- | lib/room.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 6bccc405..c11f7990 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -633,9 +633,12 @@ Room::Changes Room::Private::setLastReadEvent(User* u, QString eventId) connection->callApi<SetReadMarkerJob>(BackgroundRequest, id, storedId); emit q->readMarkerMoved(eventId, storedId); - // TODO: Drop ReadMarkerChange in 0.8 - return QT_IGNORE_DEPRECATIONS(Change::ReadMarkerChange) - | Change::OtherChange; + + // NB: GCC (at least 10) only accepts QT_IGNORE_DEPRECATIONS around + // a statement, not within a statement + QT_IGNORE_DEPRECATIONS( // TODO: Drop ReadMarkerChange in 0.8 + return Change::ReadMarkerChange | Change::OtherChange; + ) } return Change::NoChange; } @@ -2816,7 +2819,9 @@ Room::Changes Room::processAccountDataEvent(EventPtr&& event) << currentData->matrixType(); emit accountDataChanged(currentData->matrixType()); // TODO: Drop AccountDataChange in 0.8 - QT_IGNORE_DEPRECATIONS(changes |= AccountDataChange|OtherChange); + // NB: GCC (at least 10) only accepts QT_IGNORE_DEPRECATIONS around + // a statement, not within a statement + QT_IGNORE_DEPRECATIONS(changes |= AccountDataChange | OtherChange;) } return changes; } |