Age | Commit message (Collapse) | Author |
|
|
|
|
|
The spec is told to allow any event to have a thumbnail in future, and the thumbnail will reside under "content" JSON key rather than "info".
|
|
|
|
TextContent is a class to deal with formatted (HTML, RTF, Markdown) text messages. Right now it only supports Vector's non-standard "formatted_body".
|
|
|
|
According to the spec, this key has the same status as msgtype: both should exist in any message. Besides, it's always supposed to be a plain text so there's no polymorphism allowed here.
|
|
|
|
Replaced QList<> with QVector<> where appropriate + minor code cleanup
|
|
|
|
|
|
It's been a warning with GCC/Clang but an error with Visual Studio.
|
|
|
|
|
|
Upon discussion with @Fxrh in #quaternion, this now comes in master,
|
|
See https://marcmutz.wordpress.com/effective-qt/containers/ for the background and http://lists.qt-project.org/pipermail/development/2015-July/022283.html for the relevant flamewar in Qt dev mailing list.
|
|
The two additional braces are due to the fact that array<> is a wrapper
around a C-style array, which means I'm initializing a sub-object with a
list initialization. Google -Wmissing-braces.
|
|
Basically, this commit allows the inserted item type to be different from those in the container, as in findInsertionPos(baseTypeContainer, derivedTypeItem). Of course both types should still provide timestamp() for comparison.
|
|
Fortunately, the clients don't seem to use it atm.
|
|
|
|
Removed unused #includes, fixed incorrect #endif comment.
|
|
|
|
Make sync failure handler emit loginError instead of connectionError in case of access denial
|
|
|
|
return it
This better fixes the contract for derived job classes and simplifies error reporting. Methods error() and errorString() are kept for back-compatibility; status() returns a combination of them, conveniently packed into a Status object. For a quick status check, Status::good() is provided.
|
|
|
|
BaseJob
1. The externally (for derived classes) visible additions are checkReply() and parseReply() virtual methods, with gotReply becoming a mere dispatcher (and therefore a private method). Splitting gotReply() in that way allowed to remove boilerplate code from MediaThumbnailJob.
2. The internal tweak is using QScopedPointer<> to store pointers both to the Private object and to a QNetworkReply (with a special deleter that aborts the reply before destructing the object). This allows to remove desperate attempts to call reply->abort() wherever it's no more needed (and not aborting the in-flight replies seems to be a/the culprit of Quaternion after-exit hangs).
|
|
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.
|
|
|
|
Due to signal-slot processing it's not obvious when exactly each job object is deleted.
|
|
of access denial
|
|
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.
|
|
well + stability fixes
1. Introduce ContentAccessDenied error code to BaseJob to allow clients to treat access denial errors differently from other network errors.
2. Since parseJson() overrides are responsible for calling emitResult(), the "default" BaseJob::parseJson() should call emitResult() as well.
3. Make sure BaseJob::fail() doesn't crash in absence of QNetworkReply.
|
|
|
|
|
|
Previously Room::Private used to have a gotMessages() slot; now that it doesn't, it doesn't need to be a QObject either.
|
|
The license header in the source files says we ship a copy of the LGPL
which we didn't.
|
|
|
|
|
|
|
|
Relax the Qt requirements down to 5.2.0
|
|
Code tweaks
|
|
|
|
data()
Thanks to CLang model.
|
|
And we don't need two log lines for timeouts.
|
|
1. Introduce QDebug manipulators and formatJson manipulator in particular - this allows to accommodate some changes in Qt's debug printing behaviour between versions.
2. Show JSON for some questionable objects (UnknownEvents, events with no event_id etc.)
3. Log the list of typing users and the user id when getting an avatar.
|
|
|
|
In a case when authentication doesn't even happen, PasswordLogin job
won't run. The better place to assign (and log) the token is in
Connection::connectWithToken(), therefore.
|
|
Load a different set of event lists depending on the join state (and actually introduce EventList class)
|
|
actually introduce EventList class)
This makes loading of room events more compliant with the spec, not trying to load from keys that are not supposed to be there. As a result of refactoring along the way, a dedicated QList<Event*> subclass is made that remembers the JSON key it should load from and actually load itself from a QJsonArray.
|