Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
As pointed out by one of users, thumbnail requests produce quite a bit
of logging traffic, so it's better to manage them separately.
|
|
|
|
Closes #483.
|
|
(cherry picked from commit 7b65051e959968fe538f40c975d85757cfcc7df7)
(cherry picked from commit 9edfefe9b209583d18ce92e7ffd73e8aa1f3ef1e)
|
|
It was a tiny wrapper around QUrlQuery to facilitate creation from
an initializer list - however, Mustache templates long changed to
not actually used that additional constructor.
|
|
|
|
|
|
|
|
|
|
|