Age | Commit message (Collapse) | Author |
|
logging.h/logging.cpp is now a full-fledged pair for all things logging. Two more categories added, EPHEMERAL and SYNCJOB, that control logging for ephemeral events and SyncJob, respectively (in particular, switching off EPHEMERAL greatly reduces the logspam about moving read markers and how many users have read up to which event).
|
|
This greatly reduces the noise made by quaternion.
To enable full logging, export the following variable:
QT_LOGGING_RULES="libqmatrixclient.*.debug=true"
|
|
The one that comes with Qt as a fallback is from 2012 (even from newer Qt versions) and is missing many common content types.
|
|
Compile and run with your username and password as the first two arguments.
|
|
These parts are either deprecated or just unlikely to be reused in the current form. Breaks Quaternion master as of now (it #includes logmessage.h).
|
|
Qt Creator turns out to be watching for "at :" substring in logs to detect messages that refer to files - which is not our case. Removing a comma fixes the alarm.
|
|
That list was bound to become outdated every now and then.
|
|
Qt5Core_DIR shows a path to the .cmake file's directory, which is a little too much information. The same change will be made in Quaternion, with the Qt prefix having additional usage in installation.
|
|
data() in each job class
|
|
This doesn't affect the current build process much but distributions that
require libraries to be built as a shared object also often require
the use of symbol versioning using the SONAME, e.g openSUSE: https://en.opensuse.org/openSUSE:Shared_library_packaging_policy
|
|
|
|
Feel free to use whenever you need to convert another JSON key to some C++ object, or dispatch anything based on a JSON key.
|
|
|
|
Settings is a trivial wrapper around QSettings that makes value() and setValue() available from QML (Tensor has the same class atm). SettingsGroup is a cleaner way to reach for sections inside QSettings. It doesn't refer to another QSettings class, rather derives from it and overrides functions that deal with groups. AccountSettings, contrary to the two above, is by no means generic: it serves the specific purpose of storing settings of a single account in a uniform way. Rationale of it is that key literals like "keep_logged_in" cannot be enforced, while function names can; and the same goes for QVariants stored inside - the class enforces specific types while allowing further extension by clients.
Note that functions in QSettings are not virtual, so all these classes are not polymorphic.
|
|
|
|
Closer investigation found out that there are only two actually used member functions in ConnectionPrivate - provideRoom() and resolveServer(). These two have been transferred to Connection; and data members from ConnectionPrivate found new home in Connection::Private.
Factoring out room management and user management from Connection is still a pending task.
|
|
|
|
Some parts of the code were copied from the KCoreAddons sources - surprisingly few, in fact, mostly API with comments. With this commit, libqmatrixclient doesn't depend on KCoreAddons.
|
|
The job calls the /logout endpoint of CS API that invalidates the passed
access_token; a respective Connection::logout() method and
Connection::loggedOut() signal are added for use in clients.
|
|
|
|
According to section 11.2.2.3 of the CS spec, clients SHOULD follow a certain algorithm of making a non-ambiguous display name of a user in the room context. This algorithm implies checking whether other room members have the same display name. This commit prepares for implementation of the algorithm:
1. Use a hash map instead of a list to store room members. The external Room::users() API is kept intact.
2. Convenience CRUD methods are implemented to deal with the hash map.
3. An additional slot for user renaming is introduced (because renaming affects the hash map). Binding of actual signals is left for the next commit.
4. nullptr is the recommended representation of a null pointer since C++11. Use that and mandate compiler support of that.
|
|
the code.
See https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES for the full list. All the newly added features are already implied by C++11 standard so for older CMakes -std=c++11 should cover all bases anyway.
|
|
This is used once in the library and, I guess, twice more in the
Quaternion. Implemented as a template function that is equally suitable
for Event and Message, and any container that supports STL-style
iterators (QList and other Qt containers do).
|
|
|