aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-21CMakeLists: suppress subobject-linkage warningsAlexey Rusakov
GCC (even 12.x) doesn't like when a template parameter is of a pointer/reference type and dumps this warning. See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90670
2022-06-21.clang-tidy: drop some dubious noisy warningsAlexey Rusakov
2022-06-21Move out Overloads to util.hAlexey Rusakov
...instead of tucking the template in filesourceinfo.cpp where it surely will be forgotten.
2022-06-21room.cpp: replace two signal connections with oneAlexey Rusakov
2022-06-19Add a missing #includeAlexey Rusakov
2022-06-19CI: fix macos-10.15 leftoverAlexey Rusakov
2022-06-18CI: switch to macos-11 imageAlexey Rusakov
2022-06-18Move C++-only macros to util.hAlexey Rusakov
This pertains to QUO_IMPLICIT and DECL_DEPRECATED_ENUMERATOR - both can be used with no connection to Qt meta-type system (which is what quotient_common.h is for).
2022-06-18Drop make_array(); use std::to_array() where neededAlexey Rusakov
make_array() has been introduced to cover for shortcomings on macOS and Windows. These shortcomings are no more there, so we can just use the standardrlibrary.
2022-06-18Drop pre-Qt 5.15 codeAlexey Rusakov
2022-06-18Regenerate API files upon the previous commitAlexey Rusakov
2022-06-18operation.cpp.mustache: streamline RequestData constructionAlexey Rusakov
That `std::move(_data)` never worked because the passed object is a precursor to RequestData, and RequestData always takes things by const-ref or by value, never by rvalue. Also, explicit mention of RequestData is unnecessary, as its constructors are implicit by design.
2022-06-18Replace LGTM badge with GHA/SonarAlexey Rusakov
Also: add a Matrix chat badge. [skip ci]
2022-06-17Merge #562: Build with Qt 5.15 and Qt 6Alexey Rusakov
2022-06-17CMakeLists and elsewhere: require Qt 5.15Alexey Rusakov
2022-06-17Further fix building with Qt 6Alexey Rusakov
Also: build with Qt 6 first, so that it fails sooner.
2022-06-17Make Connection::sendToDevices() an actual slotAlexey Rusakov
Although Qt 5 didn't complain about that, you could never really use sendToDevices() in its slot (or even invocable) capacity because Qt's meta-type system could not handle move-only UsersToDevicesToEvents. Qt 6 is more stringent; the build fails at trying to instantiate QMetaType for that type (with a rather unhelpful error message thrown by Clang, and more helpful but very verbose diagnostic from MSVC) because it does not provide a copy constructor. However, sendToDevice doesn't really need to have full-blown events in that parameter; just the content of the event is equally fine. This commit does exactly that: replaces UsersToDevicesToEvents with UsersToDevicesToContent that contains QJsonObject's instead of EventPtr's. The code around is updated accordingly. Also: factor out the key event JSON creation from makeMessageEventForSessionKey() because it's the same JSON for each target device; the function therefore is called encryptSessionKeyEvent() now.
2022-06-15Rearrange CI jobs to spend time more efficientlyAlexey Rusakov
- CodeQL analysis was executed on every job that ran Clang, humping the total execution time by 10+ minutes alone. Now it only runs on a single job. - libolm is no more compiled but installed from the repo, along with libssl-dev; and both are installed in the same transaction as ninja and valgrind, shaving out one apt transaction - One more Windows job has been added to test building with Qt 6.3.1 on that OS. - Qt version is pushed earlier in the job matrix, as it becomes more significant than the compiler for a given platform.
2022-06-14CI: Switch to Qt 5.15 and introduce Qt 6 optionsAlexey Rusakov
Qt 6 builds are allowed to fail for now.
2022-06-14CI: bump used versions for GitHub ActionsAlexey Rusakov
Also, use MSVC 2019 on Windows.
2022-06-14Stop using LGTM.comAlexey Rusakov
Its platform has been lagging behind most of the time; but more importantly, the value from its analysis is almost non-existent, with just one considerable issue being identified over the recent year if not more. These days we have clang-tidy and Sonar that are much better at static code analysis. [skip ci]
2022-06-14Add .clang-tidy fileAlexey Rusakov
[skip ci]
2022-06-13Refresh documentationAlexey Rusakov
CONTRIBUTING.md got bitrotten in quite a few places. [skip ci]
2022-06-12Merge branch 'kitsune/more-gtad-fixes' into devAlexey Rusakov
2022-06-12Reduce the number of CI jobsAlexey Rusakov
It takes well over an hour to build the whole lineup for now; while the single right fix for that is making quotest capable of running in parallel, a few GCC jobs can be safely dropped for now (and we'll see if they should be brought back when parallel quotest unleashes the CI).
2022-06-12Require CMake 3.16; extend C++20 to headersAlexey Rusakov
...meaning, clients have to compile in C++20 mode too from now.
2022-06-12CI: No more allow failure of update-api jobsAlexey Rusakov
2022-06-11Regenerate API files using latest matrix-specAlexey Rusakov
New: - refresh tokens support (changes in login.* and registration.*; RefreshJob); - GetRelatingEvents[WithRelType[AndEventType]]Job Changed space_hierarchy.*: - childrenState is of type StateEvents now; limit and maxDepth are (omittable) integers, not doubles. - no more unused `stripped_state.h` file inclusion.
2022-06-11gtad: update submodule (again)Alexey Rusakov
2022-06-11gtad.yaml: Drop deprecated home_server field from login/registerAlexey Rusakov
2022-06-11gtad.yaml: Treat child rooms state as eventsAlexey Rusakov
2022-06-11Regenerate API filesAlexey Rusakov
The latest GTAD no more emits public_rooms_chunk.h (public_rooms_response.h already has the same definition), and skips on PublicRoomsResponse structure that is never used.
2022-06-11gtad: update submoduleAlexey Rusakov
2022-06-11gtad.yaml: more clarifying commentsAlexey Rusakov
2022-06-08Save connection state while QCoreApplication is still thereAlexey Rusakov
This reimplements #558 in a more reliable way. Deconstruction of AccountRegistry may (or may not, yay for static initialisation) occur after deconstruction of QCoreApplication, in which case an attempt to determine the directory for the state fails because it depends on the application object existence.
2022-06-07Merge pull request #561 from quotient-im/kitsune/gtad-submoduleAlexey Rusakov
Add GTAD as a submodule
2022-06-07CI: use GTAD submoduleAlexey Rusakov
Also: make all cloning for update-api shallow, for optimisation.
2022-06-07Add GTAD as a submoduleAlexey Rusakov
Code generation in libQuotient is pretty sensitive to GTAD version (or even a particular commit at times); so it makes sense to have GTAD as a submodule in order to control the revision CI uses. (amended with the GTAD commit that uses the right yaml-cpp commit)
2022-06-06Regenerate API filesAlexey Rusakov
This only updates 3 files affected by the change in the previous commit.
2022-06-06GTAD: inline public_rooms_chunk.yamlAlexey Rusakov
Also: drop inlining PublicRoomResponse by the name because it's already inlined by $ref before that. This configuration needs the latest GTAD (revision 51c53ed3) to work correctly; earlier GTAD will produce FTBFS code.
2022-06-04Address Sonar warningsAlexey Rusakov
2022-06-02Merge pull request #560 from TobiasFella/createnewsessionwhenuserleavesAlexey Rusakov
2022-06-01Immediately create a new megolm session when user leaves instead ofTobias Fella
deferring until sending event
2022-06-01Merge pull request #559 from TobiasFella/removeaccountsloadingAlexey Rusakov
2022-06-01#554: Fix update-api jobsAlexey Rusakov
2022-06-01Fix FTBFS after the mergeAlexey Rusakov
2022-05-31Remove accounts from accountsLoading when they're no longer loadingTobias Fella
2022-05-31Merge branch 'dev' into update-api-updateAlexey Rusakov
2022-05-31Fix Room::getPreviousContent() to match new CS APIAlexey Rusakov
There was a fairly nasty change where `from` parameter in /messages became optional and that led to two QString parameters (`from` and `dir) switching positions. Because they have the same type, the problem only shows at runtime. This commit fixes Room::getPreviousContent() to pass the parameters at right positions; client code won't feel anything (unless it uses GetRoomEventsJob directly).
2022-05-31Tweak QOlmAccount and data structures aroundAlexey Rusakov
This is mainly to plug the definition of a string-to-variant map for one-time keys (see https://spec.matrix.org/v1.2/client-server-api/#key-algorithms) into the CS API generated code (see the "shortcut OneTimeKeys" commit for gtad.yaml); but along with it came considerable streamlining of code in qolmaccount.cpp. Using std::variant to store that map also warranted converters.h to gain support for that type (even wider than toJson() that is already in dev - a non-trivial merge from dev is in order).