aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-14jobs/generated: Overload toJson() instead of operator QJsonObject()/QJsonValue()Kitsune Ral
It slightly reduces the header interface and shortcuts the actual call chain (not that it had any performance implications, just easier reasoning).
2018-04-14Mustache templates: Overload toJson() instead of operator ↵Kitsune Ral
QJsonObject()/QJsonValue() It slightly reduces the header interface and shortcuts the actual call chain (not that it had any performance implications, just easier reasoning).
2018-04-14Mustache: {{#producesNonJson?}} -> {{#producesNotJson?}}Kitsune Ral
According to the most recent changes in GTAD.
2018-04-14CMakeLists.txt: minor refactoringKitsune Ral
2018-04-13Support Qt 5.4Kitsune Ral
That is until ubports move to xenial.
2018-04-13converters.h: Support QVariantMap and QVariantHashKitsune Ral
2018-04-13Merge branch 'master' into kitsune-gtadKitsune Ral
2018-04-11Comment out install(EXPORT_ANDROID_MK)Kitsune Ral
It's only available in CMake 3.7 and later and is not needed for any known project anyway.
2018-04-05qmc-example: fix false negatives due to a missing returnKitsune Ral
2018-04-05Unofficially relax Qt requirement to 5.5.1Kitsune Ral
This is to support uMatriks that still has to compile on xenial codebase.
2018-04-03DirectChatEvent: be careful with range-for over temporariesKitsune Ral
...because temporaries returned by temporaries tend to disappear before you enter the loop body (see the bottom of http://en.cppreference.com/w/cpp/language/range-for#Explanation).
2018-04-03More fixes from static analysisKitsune Ral
2018-04-03CMakeLists.txt: Specify the API version correctlyKitsune Ral
It's not version 2, it's still version 0.2.
2018-04-02Updated documentationKitsune Ral
[skip ci]
2018-04-02BaseJob: set the status upon headers arrivalKitsune Ral
So that DownloadFileJob could figure if it should save the incoming payload to the file or it's the JSON details about the error.
2018-04-02Fixes according to results of static analysisKitsune Ral
Many thanks to clang-tidy and clazy authors for the tools, and to Qt Creator developers for making them easily available in the IDE.
2018-04-02Be more cautious with rvaluesKitsune Ral
Clang on FreeBSD doesn't seem to be playing nice in Release configuration. See the comment in the committed code.
2018-04-02lookup()/dispatch() removed; unique_ptr_cast() and qAsConst() introducedKitsune Ral
qAsConst() is a copy-paste from Qt code and is only supplied by QMatrixClient if Qt is below 5.7. unique_ptr_cast<> is similar to static_cast<> of pointers but deals with unique_ptr's, passing ownership to the newly made pointer.
2018-04-02Room/Connection: accountData()/accountDataChanged()Kitsune Ral
Generic account data are at least readable now (you can get, say, pushers from the library without it even being aware of what a pusher is).
2018-04-01Pass actual changes with Connection::directChatsListChanged()Kitsune Ral
Also: provide Connection::directChats() to get the whole direct chats map.
2018-04-01BaseJob: use QDebugStateSaverKitsune Ral
...instead of copying the whole QDebug object.
2018-03-31Merge branch 'kitsune-install-target'Kitsune Ral
Closes #113.
2018-03-31Make and install CMake config package; provide examples/CMakeLists.txt using itKitsune Ral
2018-03-31BaseJob::gotReply(): Minor fix in loggingKitsune Ral
2018-03-31Install CMake files to the proper placeKitsune Ral
2018-03-31Move source files to a separate folderKitsune Ral
It's been long overdue to separate them from the rest of the stuff (docs etc.). Also, this allows installing to a directory within the checked out git tree (say, ./install/, similar to ./build/).
2018-03-31Merge branch 'master' into kitsune-gtadKitsune Ral
2018-03-30Introduce install target for the libraryKitsune Ral
Closes #113.
2018-03-29Room: Track encryption state and do not allow sending (unencrypted) messages ↵Kitsune Ral
to it Closes #138. This is of course not encryption support yet, rather a safeguard for rooms that use encryption.
2018-03-28BaseJob: Dump error body (if there's any) to logs; detect error 429 more ↵Kitsune Ral
reliably
2018-03-28BaseJob: more improvements in logging and errors detectionKitsune Ral
2018-03-28BaseJob: Process error 429 (Too Many Requests)Kitsune Ral
The job will retry after the period either advised by the server or the default retry period. Closes #186.
2018-03-28BaseJob: small refactoring and cleanup in logging codeKitsune Ral
2018-03-28Merge branch 'kitsune-unread-messages-count'Kitsune Ral
2018-03-27Rework unread messages counting logicKitsune Ral
The previous one didn't cover all the cases; the current one seems to do. Closes #192. Accompanied by the developer's notes at: https://github.com/QMatrixClient/libqmatrixclient/wiki/unread_count
2018-03-26Room::updateUnreadCount(): Fix a too stringent assertionKitsune Ral
2018-03-26Fix compilation on some environmentsKitsune Ral
...where deque<>::difference_type is long rather than int.
2018-03-26Count unread messagesKitsune Ral
2018-03-26Room: isDirectChat() and directChatUsers()Kitsune Ral
isDirectChat() has been declared previously but not implemented, hence a bit of strangeness in the commit.
2018-03-26Connection::directChatUsers()Kitsune Ral
2018-03-25Merge branch 'kitsune-more-on-direct-chats'Kitsune Ral
2018-03-25Minor cleanupKitsune Ral
2018-03-25Connection::doInDirectChat() and refactored direct chat requesting logicKitsune Ral
Basically, the whole requestDirectChat() body has been moved and generalised to doInDirectChat(), and requestDirectChat() delegates to doInDirectChat(). The logic has been updated to cope with formerly left/forgotten rooms present in the list of direct chats (cleaning up the list along the way).
2018-03-25Direct chat (un)marking: update internal structure synchronouslyKitsune Ral
The asynchronous update first implemented was more verbose and caused more problems than provided solutions. The idea was that the internal directChats map would better reflect the server state if updated asynchronously. However, it also causes a local race condition; e.g., to quickly remove rooms from direct chats one after another becomes very non-trivial (one has to wait until the previous operation succeeds). So after some playing with the code, hitting pitfalls along the way, I decided to align the logic with the one for room tags; synchronously issued signals look uglyish but at least work predictably. And race conditions between several clients generally cannot be cleanly resolved anyway.
2018-03-25One more Valgrind suppression for cases when the test run into "Too many ↵Kitsune Ral
requests"
2018-03-26Connection::room() and Connection::invitation()Kitsune Ral
2018-03-26Introduce JoinStates (QFlags<JoinState>)Kitsune Ral
This required to change numeric values for JoinState enum; so anybody who relied on them being 0-based and/or contiguous, beware.
2018-03-24.travis.yml: Escape all env variables in the configuration with 'Kitsune Ral
Not only those that already caused trouble.
2018-03-24Merge branch 'kitsune-direct-chats'Kitsune Ral
2018-03-24Work around a bug in MSVC leading to "ambiguous call" compilation errorKitsune Ral