Age | Commit message (Collapse) | Author |
|
|
|
|
|
EncryptionEvent constructor
|
|
To provide more room for internal changes in BaseJob.
|
|
- QNetworkReply::isSequential() already returns `true`, there's no need
to overload it again.
- Use `Q_SLOTS` instead of `slots` because it's an external library
interface and clients may use other libraries using `slots` identifier;
- Use `emit` instead of `Q_EMIT` because this is a part of internal
implementation and if we ever use a library that has an `emit`
identifier, a massive search-replace will be in order anyway.
- Use `QMetaObject::invokeMethod()` with a queued connection as
a clearer way to achieve the same goal as `QTimer::singleShot(0, ...)`.
|
|
QThreadStorage accepts ownership over stored objects.
|
|
The query is easier to manipulate; and the original mxc URL is not used
for the real network request anyway.
|
|
|
|
|
|
|
|
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
|
|
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
|
|
There was a mess with fileTransferCancelled(); it was only emitted when
a download (but not an upload) was cancelled; besides, in case of
downloads a file transfer info structure was getting deleted whereas
uploads left a file transfer in Cancelled status. This all now converges
on:
- fileTransferFailed() for both failures and cancellations (to simplify
slot connection, and also to follow the practice in, e.g., Qt Network).
- the file transfer info structure is kept around in Cancelled status,
following the logic used for failures. There's no particular cleanup
which may become a problem if one uploads and cancels many times
(download file transfers are keyed to event ids, mitigating
the problem); this will be fixed in another commit.
Closes #503. Closes #504.
|
|
|
|
|
|
Allows images to be loaded using the NetworkAccessManager instead of an
ImageProvider
|
|
CI: add Windows, CodeQL
|
|
Turned out it was broken, and I was looking the other way.
|
|
|
|
This is useful for cases when the room display name is returned to QML
that doesn't have an equivalent of QString::toHtmlEscaped().
|
|
The parameter packs intended to pass organisation/application names to
QSettings never worked that way since Quotient::Settings didn't have
that parameter pack in its constructor. On the other hand, setting
organisation/application name using static methods before constructing
the first settings object has been working just fine so far. If someone
needs to create a settings object with customised org/app name for some
reason (sneaking settings from other apps?), those can be brought back
in a working manner and without breaking API/ABI even.
|
|
Basic session management class; Created from Quaternion's
AccountRegistry
and NeoChat's AccountListModel.
The connections can be accessed by the user's id, this technically
limits it to one connection for each matrix account.
|
|
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.
|
|
|
|
|
|
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
|
|
Closes #489.
|
|
Read receipts are entangled with counting unread messages, and saving
them also helps in not sending receipts for too old events. Other users'
read receipts are still treated as truly ephemeral.
|
|
|
|
|
|
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.
|
|
[skip ci]
|