aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-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-08-30Room: displayNameForHtmlAlexey Rusakov
This is useful for cases when the room display name is returned to QML that doesn't have an equivalent of QString::toHtmlEscaped().
2021-08-30SettingsGroup, AccountSettings: simplify constructorsAlexey Rusakov
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.
2021-08-26Merge pull request #497 from TobiasFella/accountregistryAlexey Rusakov
Add AccountRegistry
2021-08-26Add AccountRegistryTobias Fella
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.
2021-08-23Room: isMember(); memberState() only needs user idAlexey Rusakov
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
2021-08-23Merge branch 'kitsune/deprecations'Alexey Rusakov
2021-08-22User::isGuest(): fix a clazy warningAlexey Rusakov
2021-08-22Fix building with MSVCAlexey Rusakov
2021-08-22RoomEvent: drop timestamp()Alexey Rusakov
Use originTimestamp(); the corresponding Q_PROPERTY was not renamed (in error) so it is now.
2021-08-22Settings: no more setToken() and accessToken(); deprecate clearAccessToken()Alexey Rusakov
Access tokens should be stored with Qt Keychain that's about to come; and these methods were deprecated since before 0.5.
2021-08-22Use Q_DECL_DEPRECATED_X instead of \deprecated doc-commentAlexey Rusakov
This still works with older moc yet produces actual warnings when compiling C++ code.
2021-08-22Drop other stuff deprecated pre- or early 0.6Alexey Rusakov
BaseJob: StatusCode::JsonParseError Connection: resolved() and reconnected() signals; roomMap(); postReceipt() User: bridged() and rawName() ConnectionData: setHost() and setPort() StateEventBase: prev_content()
2021-08-22Drop QMatrixClient namespace aliasAlexey Rusakov
2021-08-22Deprecate BaseJob::DataAlexey Rusakov
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.
2021-08-22Regenerate API filesAlexey Rusakov
2021-08-22Mustache: avoid BaseJob::DataAlexey Rusakov
It's about to be deprecated in the next commits.
2021-08-21CleanupAlexey Rusakov
2021-08-21Merge branch 'kitsune/event-status-namespace'Alexey Rusakov
2021-08-10Turn EventStatus from a class to a namespaceAlexey Rusakov
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.
2021-08-10Room::Private::sync/historyEdge()Alexey Rusakov
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.
2021-08-09Merge pull request #492 from quotient-im/kitsune-qurl-in-csapiAlexey Rusakov
Use QUrl in CS API backend
2021-08-07Update non-generated code to work with QUrls in CS APIAlexey Rusakov
2021-08-07Update generated filesAlexey Rusakov
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.
2021-08-07User::avatar: add constAlexey Rusakov
2021-08-07gtad.yaml: use QUrl where API uses 'format: uri'Alexey Rusakov
2021-08-07converters.h: (actually) enable QUrl; drop unused typesAlexey Rusakov
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.
2021-08-07Drop an out-of-date commentAlexey Rusakov
BaseJob::loadFromJson() does just fine without QStringViews. [skip ci]
2021-08-07API files: reformat after .clang-format changeAlexey Rusakov
See 000b5730.
2021-08-07README.md: replace "PRs welcome" with a merge chance badgeAlexey Rusakov
2021-08-02Fix lack of percent encoding in User::load()Alexey Rusakov
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.
2021-08-02More doc-commentsAlexey Rusakov
2021-07-31Room: Mark dependent Q_PROPERTYs as STORED falseAlexey Rusakov
hasUnreadMessages is derived from unreadCount; isFavourite/isLowPriority effectively depend on tagNames.
2021-07-30Clean up after the previous commitAlexey Rusakov
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().
2021-07-30Use a better type in makeRedactedAlexey Rusakov
2021-07-30Room: drop 0.6 deprecations; deprecate RoomAliasEventAlexey Rusakov
Namely memberCount(), localAliases(), remoteAliases(), timelineEdge().
2021-07-30.clang-format: add DEFINE_EVENT_TYPEID to StatementMacrosAlexey Rusakov
2021-07-30FormattingAlexey Rusakov
2021-07-28.clang-format: revert BraceWrapping.AfterControlStatementAlexey Rusakov
It triggers a bug in libformat that prevents AllowShortFunctionsOnASingleLine to do its job: https://bugs.llvm.org/show_bug.cgi?id=47936
2021-07-28setFirst/LastDisplayedEvent(): warn about unloaded eventsAlexey Rusakov
2021-07-24Wrap SyncRoomData counters into OmittablesAlexey Rusakov
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.
2021-07-24Make operator ""_ls constexprAlexey Rusakov