aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-29operation.h.mustache: Add QUOTIENT_APIAlexey Rusakov
2021-12-29Add QUOTIENT_API throughout non-generated codeAlexey Rusakov
This include all (hopefully) classes/structures and functions that have non-inline definitions, as well as namespaces with Q_NAMESPACE since those have non-inline (as of Qt 5.15) QMetaObject - for that a new macro, QUO_NAMESPACE, has been devised to accommodate the lack of Q_NAMESPACE_EXPORT in Qt before 5.14.
2021-12-29Quotest: test sending and receiving custom eventsAlexey Rusakov
This seems to be the crux of #413.
2021-12-29Introduce quotient_export.hAlexey Rusakov
Instead of using CMake's generate_export_header macro, it's a bit easier to maintain a static file (that is not supposed to ever change) with necessary export/import/hidden visibility macros.
2021-12-28EventContent::FileInfo: default payloadSize to 0Alexey Rusakov
Fixes a clang-tidy warning.
2021-12-28Settings classes: unify on QUO_ macro prefixAlexey Rusakov
At some point macros were prepended with QTNT (pronounced "cute-n't", "Quotient" with vowels dropped) but that didn't go very far. Having forgotten about this, I introduced QUO prefix in a few places. Being initial letters of "Quotient", QUO feels more understandable (and coincidentally is a well-known Latin word); so let's unify on this.
2021-12-28Convert struct LoginFlows to namespaceAlexey Rusakov
Because that's what it really is.
2021-12-27Merge branch 'dev' into pinnedarawaaa
2021-12-27EventFactory: remove default constructorAlexey Rusakov
This is a leftover from deferred `name` initialisation that wasn't needed in the end.
2021-12-27EventItem::setUserData: use std::moveAlexey Rusakov
Fixes a clang-tidy warning.
2021-12-27Key* strings: drop 'static'; add 'constexpr' where okAlexey Rusakov
2021-12-27Connection: Simplify room/user factory codeAlexey Rusakov
There's no need to return lambdas where pointers to specialised function templates would work just fine.
2021-12-27Quotest: add compile warnings from libQuotientAlexey Rusakov
2021-12-26Merge #528: Make canChangePassword available from QMLAlexey Rusakov
2021-12-25Make canChangePassword available from QMLCarl Schwan
2021-12-24Prune empty/ish call*event.cpp filesAlexey Rusakov
2021-12-24CI: Fix rm being run in the wrong directoryAlexey Rusakov
It's been alright with the comment inside the script.
2021-12-24CI: Move a comment outside of the scriptAlexey Rusakov
Comments inside shell scripts apparently break the flimsy GHA machinery.
2021-12-24CI: Add missing coverage filesAlexey Rusakov
2021-12-24Merge branch 'kitsune/sonar-coverage'Alexey Rusakov
2021-12-24Reinstate update-api jobsAlexey Rusakov
2021-12-24Don't strip lib from names in .gcov filesAlexey Rusakov
That apparently confuses Sonar as it fails to match the source files.
2021-12-24Analyse in 2 threadsAlexey Rusakov
2021-12-24Actually do and submit coverageAlexey Rusakov
...instead of hoping the thing will sort itself out because CLion does.
2021-12-24Merge Sonar invocation back to ci.ymlAlexey Rusakov
For coverage analysis to work, a test run is needed, making the overlap between ci.yaml and sonar.yml quite significant again. Note: 'update-api' option is temporarily dropped from the matrix to speed up the check. If things run fine, 'update-api' will come back.
2021-12-24Sonar: add coverage analysisAlexey Rusakov
2021-12-24Sonar: leave just one jobAlexey Rusakov
There's not much value in analysing the code without E2EE and with E2EE because E2EE is additive; and there's no plan to look close into the generated API code apart from what already ends up being committed.
2021-12-22Merge pull request #526 from quotient-im/kitsune/simpler-event-factoriesAlexey Rusakov
Simplify event factories
2021-12-22StateEventBase: force type to unknown if stateKey is not in JSONAlexey Rusakov
2021-12-22Simplify the code around EventFactory<>Alexey Rusakov
The former code assumed that EventFactory<> is just a class-level shell for a bunch of functions and a static data member that only exists to allow specialisations to occur for the whole group together. On top of that, setupFactory() and registerEventType() strived to protect this group from double registration coming from static variables in an anonymous namespace produced by REGISTER_EVENT_TYPE. The whole thing is now de-static-ed: resolving the factory now relies on class-static Event/RoomEvent/StateEventBase::factory variables instead of factory_t type aliases; and REGISTER_EVENT_TYPE produces non-static inline variables instead, obviating the need of registerEventType/setupFactory kludge.
2021-12-21Don't chain RoomEvent to Event factory any moreAlexey Rusakov
Objects derived from Event are not room events (in the spec sense) and never occur in the same arrays as room events; therefore this chaining has always been superfluous.
2021-12-21Add event_loader.h to CMakeListsAlexey Rusakov
Another forgotten header file.
2021-12-21Quotest: add a missing \n in the outputAlexey Rusakov
2021-12-17RoomMemberEvent: fix an off-by-one errorAlexey Rusakov
Also: extended quotest to cover member renames, not just user profile renames.
2021-12-10Merge pull request #523 from quotient-im/kitsune/ci-add-autotestsAlexey Rusakov
Add autotests to CI
2021-12-09Fix CI failure on macOSAlexey Rusakov
CMAKE_INSTALL_RPATH_USE_LINK_PATH is more universal than setting LD_LIBRARY_PATH Also: drop an extra slash in the path to installed quotest.
2021-12-08Test installed quotestAlexey Rusakov
This covers Quotient_INSTALL_TESTS setting.
2021-12-07CI: Put all build directories to ${{ runner.workspace }}/buildAlexey Rusakov
2021-12-07Fix valgrind invocation failureAlexey Rusakov
It turned out that, confusingly, ${{ runner.workspace }} refers to the directory above $GITHUB_WORKSPACE, which is why the previous commit ended up with valgrind not finding its suppressions.
2021-12-07Fix quotest invocation; use working-directoryAlexey Rusakov
2021-12-06autotests/: don't instantiate QApplicationAlexey Rusakov
Those tests don't even need an event loop.
2021-12-06Add execution of autotests to CIAlexey Rusakov
2021-12-05Drop 'qmc-example' from one last(?) placeAlexey Rusakov
2021-12-03Cleanup; drop an unused RoomAliasesEvent constructorAlexey Rusakov
Also, RoomAliasesEvent is to be completely gone after 0.7.
2021-12-03Add a couple of bare .h files to CMakeLists.txtAlexey Rusakov
These were missing from the commit introducing .h files to sources, highlighting the reason why .h files should be there...
2021-12-03Rely on GTAD 0.9 that calls clang-format itselfAlexey Rusakov
There was that ugly workaround in CMakeLists.txt to produce the list of files to be formatted and making a separate build target for clang-format. As GTAD 0.9 calls clang-format itself this workaround is no more necessary; generate-unformatted-api and format-api build targets are now gone, and clang-format is no more one-build-system-configuration behind GTAD on the list of files to handle.
2021-12-03CMakeLists.txt: add .h files to sourcesAlexey Rusakov
This is driven by the change in the way Qt Creator 6 works with CMake (see https://www.qt.io/blog/qt-creator-6-cmake-update) that basically requires you to explicitly add header files as source files. While this obviously added to the size of the source files list, it also drove dropping the repeated file(GLOB_RECURSE ... CONFIGURE_DEPENDS) call which added a considerable speedbump to the beginning of each build (now that call is just one).
2021-12-02Cleanup on Sonar issuesAlexey Rusakov
2021-12-02Improve function_traits<>; split out from util.*Alexey Rusakov
Quotient::function_traits<> did not support member functions in a proper way (i.e. the way std::invoke_result<> treats them, with the function's owning class represented as the first parameter). Now that I gained the skill and understanding in function_traits<> somewhat wicked machinery, I could properly support member functions. Overloads and generic lambdas are not supported but maybe we'll get to those one day.
2021-12-02visit(Event, ...) -> switchOnType()Alexey Rusakov
It has not much to do with the Visitor design pattern; also, std::visit() has different conventions on the order of parameters.