Age | Commit message (Collapse) | Author |
|
Windows and CodeQL snippets picked from Quaternion
|
|
Room::memberJoinState() was only used to check if the user has joined
the room (it couldn't be used for anything else), meaning that its best
replacement is actually not memberState() but isMember() introduced
hereby. It's also better to pass user ids instead of User objects to
memberState() and isMember() since that is enough to check membership.
# Conflicts:
# lib/room.cpp
# lib/room.h
|
|
|
|
|
|
|
|
Use originTimestamp(); the corresponding Q_PROPERTY was not renamed
(in error) so it is now.
|
|
Access tokens should be stored with Qt Keychain that's about to come;
and these methods were deprecated since before 0.5.
|
|
This still works with older moc yet produces actual warnings when
compiling C++ code.
|
|
BaseJob: StatusCode::JsonParseError
Connection: resolved() and reconnected() signals; roomMap(); postReceipt()
User: bridged() and rawName()
ConnectionData: setHost() and setPort()
StateEventBase: prev_content()
|
|
|
|
The grand plan is to get rid of `BaseJob` and turn job invocations
to function calls returning `QFuture`. `RequestData` will stay though,
feeding data into those calls.
|
|
|
|
It's about to be deprecated in the next commits.
|
|
|
|
|
|
This wrapper only exists for an enum inside of it and dates back to
times when Qt meta-object system did not support free-standing enums.
|
|
Move Room::sync/historyEdge() implementation to Room::Private, so that
internal logic could use the same readable shortcuts without q->
prefixes, instead of timeline.crend() and timeline.cend() that are much
less readable.
|
|
Use QUrl in CS API backend
|
|
|
|
This uses API definition files from
https://github.com/matrix-org/matrix-doc/pull/3236, and additionally
makes uploadFile>content_uri to have 'format: uri' (as suggested in
the PR review). Only use this commit with the next one; alone it breaks
the build.
|
|
|
|
|
|
QUrl can now be converted even with QT_NO_URL_CAST_FROM_STRING; and it
can also be put to queries. QByteArray did not really need conversion
in JSON context; and QJsonObject is/was never used in queries.
|
|
BaseJob::loadFromJson() does just fine without QStringViews.
[skip ci]
|
|
See 000b5730.
|
|
|
|
Users with slashes in their ids do it at their own peril of course but
to encode the id in the URL is a good thing in any case. Too bad it's
pretty invisible and has to be dealt with case by case, instead of GTAD
magically sticking QUrl::toPercentEncoding() where appropriate in
the generated code.
|
|
|
|
hasUnreadMessages is derived from unreadCount; isFavourite/isLowPriority
effectively depend on tagNames.
|
|
RoomAliasesEvent is no more even registered (meaning that the library
will load m.room.aliases as unknown state events); quotest code updated
to use historyEdge() instead of timelineEdge().
|
|
|
|
Namely memberCount(), localAliases(), remoteAliases(), timelineEdge().
|
|
|
|
|
|
It triggers a bug in libformat that prevents
AllowShortFunctionsOnASingleLine to do its job:
https://bugs.llvm.org/show_bug.cgi?id=47936
|
|
|
|
Also: introduce a merge(T1&, const Omittable<T2>&) that does pretty much
the same as Omittable<T1>::merge(const Omittable<T2>&) except it works
on non-omittables as the left/first operand.
The change removes the need for a clumsy -2 fallback in unreadCount,
and makes the logic loading those counters cleaner along the way.
|
|
|
|
|
|
Without this, it compiles on Linux but on macOS and Windows.
|
|
|
|
A previous incarnation, make_array, existed in basejob.cpp before.
The new direction taken by C++20 is to either deduce the array (but
the used Apple standard library doesn't have deduction guides yet) or
to use to_array() that converts a C array to std::array. This latter
option is taken here, with to_array() defined in quotient_common.h
until we move over to C++20.
|
|
|
|
Instead of being defined independently, JoinState now uses values from
the Membership enumeration (former MemberEventContent::MembershipType)
that was moved to quotient_common.h for that purpose. Both enumerations
gained a Q_FLAG_NS decoration and operator<< overrides that strip
"Quotient::" prefix when dumping member/join state values to the log -
obviating toCString(JoinState) along the way. Quotient::MembershipType
alias is deprecated from now.
|
|
Ok, it was stupid to delete #include <QtCore/QMetaType> in 004ebf8d and
then to expect that Qt macros would still work, given that I don't use
QObject. In my defense I can only say that with Qt 6 it still compiled.
|
|
Q_DECLARE_METATYPE is really unhappy about types without
a public default constructor.
|
|
TypedBase is an abstract class; constructing it doesn't make sense. But
even if it were not abstract, it's not supposed to be instantiated.
|
|
9a5fa623 dropped one of RoomMessageEvent constructors for Qt 6 in order
to address #483 - breaking the build with Qt 6 along the way, as
Room::postFile() relied on that constructor. This commit changes
Room::postFile() in turn, deprecating the current signature and adding
a new one that accepts an EventContent object rather than a path to
a file. In order to achieve that, FileInfo and ImageInfo classes have
gained new constructors that accept QFileInfo instead of the legacy
series of parameters, streamlining usage of EventContent structures.
|
|
quotient_common.h has Q_NAMESPACE but no own compilation unit, and moc
was not called on it either - using metaobject data on an enumeration
defined in that file leads to a linking error due to sharedMetaObject
not being defined. The fix makes so that the file is detected by automoc
with the respective definition being generated.
Cherry-picked from a83ec900 (0.6.x branch).
|
|
Closes #481.
|