aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-05BaseJob: refresh error handlingAlexey Rusakov
- 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")
2021-10-05BaseJob::StatusCode: officially deprecate most *Error enumeratorsAlexey Rusakov
2021-10-04Room: use more modern Connection APIAlexey Rusakov
2021-10-04Regenerate CS API files upon the previous commitAlexey Rusakov
2021-10-04BaseJob: percent-encode variable path partsAlexey Rusakov
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.
2021-10-04gtad.yaml: make _rightQuote example less trivialAlexey Rusakov
2021-10-04Make connectSingleShot() a tiny wrapper on Qt 6Alexey Rusakov
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.
2021-10-04Drop old compatibility codeAlexey Rusakov
libQuotient 0.7 really requires Qt 5.12, nothing earlier will work.
2021-10-04Move away wrap_in_function to private interfaceAlexey Rusakov
This has always been merely a workaround to enable connectUntil/connectSingleShot and was never intended to be used elsewhere, let alone in clients.
2021-10-04quotient_common.h: remove a stray semicolonAlexey Rusakov
2021-10-04Further tighten the linkifier in prettyPrint()Alexey Rusakov
2021-10-04Add tests for prettyPrint()Alexey Rusakov
2021-10-04prettyPrint(): tighten up Matrix identifier regexAlexey Rusakov
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.
2021-10-04AccountRegistry: minor code cleanupAlexey Rusakov
2021-09-28SyncData: drop a shortcut that led to ignoring invitesAlexey Rusakov
Fixes #510.
2021-09-19Use C++ instead of commentingAlexey Rusakov
2021-09-18Merge pull request #505 from TobiasFella/encryptedfileAlexey Rusakov
2021-09-18Add the encryptedfile to the eventcontentTobias Fella
2021-09-15Merge pull request #507 from TobiasFella/roomcreationtypesAlexey Rusakov
Add room types to RoomCreateEvent
2021-09-14Add room types to RoomCreateEventTobias Fella
2021-09-12Merge pull request #506 from TobiasFella/activateencryptionAlexey Rusakov
Add convenience function for activating encryption
2021-09-12Merge pull request #499 from TobiasFella/mxcnamAlexey Rusakov
Implement the mxc protocol in the NetworkAccessManager
2021-09-12Fix a memory leak in DownloadRunnerAlexey Rusakov
2021-09-12Fix building with older QtAlexey Rusakov
2021-09-12Connection: update AccountRegistryAlexey Rusakov
Clients don't need to do it themselves.
2021-09-12MxcReply: make sure to create a Private objectAlexey Rusakov
2021-09-12NAM::createRequest(): more loggingAlexey Rusakov
2021-09-12Add a download test to quotestAlexey Rusakov
2021-09-11Add convenience function for activating encryption and fixTobias Fella
EncryptionEvent constructor
2021-09-11BaseJob: deprecate endpoint accessors; query returns an objectAlexey Rusakov
To provide more room for internal changes in BaseJob.
2021-09-11Further tweaks to MxcReplyAlexey Rusakov
- 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, ...)`.
2021-09-11Don't parent NAM to QCoreApplicationAlexey Rusakov
QThreadStorage accepts ownership over stored objects.
2021-09-10Move URL creation to Room/Connection; use query instead of fragmentAlexey Rusakov
The query is easier to manipulate; and the original mxc URL is not used for the real network request anyway.
2021-09-10Add "quotient.network" logging categoryAlexey Rusakov
2021-09-10Percent-encode all the thingsTobias Fella
2021-09-10Return a failed MxcReply on invalid requestsTobias Fella
2021-09-10Update lib/networkaccessmanager.cppTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2021-09-10Update lib/networkaccessmanager.cppTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2021-09-09Straighten up file transfer cancellationAlexey Rusakov
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.
2021-09-07Fix showing non-animated ImagesTobias Fella
2021-09-05Create a NAM for each threadTobias Fella
2021-09-05Implement the mxc protocol in the NetworkAccessManagerTobias Fella
Allows images to be loaded using the NetworkAccessManager instead of an ImageProvider
2021-09-03Merge pull request #500 from quotient-im/kitsune/bump-minimal-versionsAlexey Rusakov
Require CMake 3.16, kindly ask for C++20; drop qmake
2021-09-03Tacitly allow CMake 3.13 to keep LGTM workingAlexey Rusakov
Also: drop olm from the LGTM build environment, it's of no use there for now.
2021-09-03CONTRIBUTING.md: update code conventions to C++20Alexey Rusakov
2021-09-03CI experiment: requires GCC 10 and Clang 11Alexey Rusakov
2021-09-03Require CMake 3.16; drop qmake; use C++20 and newer compilersAlexey Rusakov
Also, refresh the documentation a bit.
2021-09-02Merge pull request #495 from quotient-im/kitsune-ci-windows-codeqlAlexey Rusakov
CI: add Windows, CodeQL
2021-09-01Drop .appveyor.ymlAlexey Rusakov
2021-09-01CMakeLists: allow to pass clang-format options in CLANG_FORMATAlexey Rusakov
This supersedes passing clang-format options in a separate CLANG_FORMAT_ARGS CMake variable.