Age | Commit message (Collapse) | Author |
|
Closes #514.
|
|
|
|
|
|
- BaseJob::prepareError() slightly updated to get the current status
instead of checking the returned value outside in gotReply()
- BaseJob::gotReply() no more reports on 429 Too Many Requests twice
(the first time with dubious "Too Many Requests: Unknown error")
|
|
|
|
|
|
|
|
This is meant to spare clients from having to percent-encode
room aliases, v3 event ids etc. that happen to hit the endpoint path.
It is unfair to expect clients to do that since they are not supposed
to care about the shape of CS API, which parameter should be encoded
in which way. The trick (together with the slightly updated GTAD
configuration) is to percent-encode parts that happen to be QStrings
and not `const char[]`'s while passing all constant parts as plain
C character literals. This also allows to make it more certain that
the path is correctly encoded by passing and storing QByteArray's
wherever the path is already encoded, and only use QStrings (next to
const char arrays) before that.
Since the change alters the API contract (even if that contract was
crappy), some crude detection of percent-encoded stuff on input is
inserted; if input is already percent-encoded, a warning is put to
the logs, alerting developers about the change.
|
|
Qt 6 has Qt::SingleShotConnection; connectSingleShot remains just for
the sake of compatibility across Qt 5 and Qt 6. If you target Qt 6 only,
feel free to use the Qt facility directly.
|
|
libQuotient 0.7 really requires Qt 5.12, nothing earlier will work.
|
|
This has always been merely a workaround to enable
connectUntil/connectSingleShot and was never intended to be used
elsewhere, let alone in clients.
|
|
|
|
|
|
It was too permissive on characters before the identifier and also
allowed the domain name to start on dash, which should not occur.
Closes #512.
|
|
|
|
Fixes #510.
|
|
|
|
|
|
|
|
Add convenience function for activating encryption
|
|
Implement the mxc protocol in the NetworkAccessManager
|
|
Clients don't need to do it themselves.
|
|
|
|
|
|
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.
|