aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-06Set CMAKE_BUILD_TYPE if none is specifiedKitsune Ral
2016-08-31QList<Event*> -> using Events=QVector<Event*>Kitsune Ral
2016-08-31Event::fromJson(): made the code more compactKitsune Ral
That might be not as efficient as a solution on variadic templates; but arguably easier to understand.
2016-08-31Room: Drop unused codeKitsune Ral
2016-08-31Dismiss ConnectionPrivate, long live Connection::PrivateKitsune Ral
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.
2016-08-29RoomTopicEvent: parse and provide sender informationKitsune Ral
2016-08-29Merge pull request #20 from Fxrh/kitsune-roommessage-refactoring2KitsuneRal
2016-08-29Align AudioContent with the rest; special-case creation of VideoContent onlyKitsune Ral
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".
2016-08-25Structured parsing, folded repetitive initialization codeKitsune Ral
2016-08-24Introduce TextContent + minor cleanupKitsune Ral
TextContent is a class to deal with formatted (HTML, RTF, Markdown) text messages. Right now it only supports Vector's non-standard "formatted_body".
2016-08-24Drop unused (by code and by spec) hsob_ts valueKitsune Ral
2016-08-24Move plain body from Base (former MessageEventContent) inside RoomMessageEventKitsune Ral
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.
2016-08-24Moved message content classes to a dedicated namespaceKitsune Ral
2016-08-23Merge pull request #18 from Fxrh/kitsune-use-qvector-with-nonpointersFelix Rohrbach
Replaced QList<> with QVector<> where appropriate + minor code cleanup
2016-08-23Merge pull request #19 from Fxrh/kitsune-travisciKitsuneRal
2016-08-23Drop KCoreAddons part; enable building with CLang besides GCCKitsune Ral
2016-08-23CheckAuthMethods: fixed parseJson() to return some valueKitsune Ral
It's been a warning with GCC/Clang but an error with Visual Studio.
2016-08-23Restore accidentally merged-out find_package() linesKitsune Ral
2016-08-23Fix compilation with Qt 5.2.1Kitsune Ral
2016-08-23Merge pull request #15 from Fxrh/kitsune-dropped-kcoreaddonsKitsuneRal
Upon discussion with @Fxrh in #quaternion, this now comes in master,
2016-08-22Replaced QList<> with QVector<> where appropriate + minor code cleanupKitsune Ral
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.
2016-08-22Minor cleanupKitsune Ral
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.
2016-08-22findInsertionPos: allow usage with polymorphic typesKitsune Ral
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.
2016-08-15Fixed a typo in the enum definitionKitsune Ral
Fortunately, the clients don't seem to use it atm.
2016-07-29Added roomMembername() overload for userId, in addition to User*Kitsune Ral
2016-07-28CleanupKitsune Ral
Removed unused #includes, fixed incorrect #endif comment.
2016-07-28Fixed double-emission of signal(s) on job timeout + general cleanupKitsune Ral
2016-07-28Merge pull request #14 from Fxrh/kitsune-sync-emits-loginerrorKitsuneRal
Make sync failure handler emit loginError instead of connectionError in case of access denial
2016-07-27Removing kcoreaddons submoduleKitsune Ral
2016-07-27Introduce Status class + BaseJob::{checkReply,parseReply,parseJson} now ↵Kitsune Ral
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.
2016-07-26Update libqmatrixclient.priDavid A Roberts
2016-07-26Split BaseJob::gotReply into checkReply and parseReply + internal tweaks to ↵Kitsune Ral
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).
2016-07-26Rewritten BaseJob to not depend on KJob.Kitsune Ral
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.
2016-07-26Added a missing #include.Kitsune Ral
2016-07-26Log creation/deletion of jobs (especially SyncJob)Kitsune Ral
Due to signal-slot processing it's not obvious when exactly each job object is deleted.
2016-07-25Make sync failure handler emit loginError instead of connectionError in case ↵Kitsune Ral
of access denial
2016-07-22Introduced LogoutJobKitsune Ral
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.
2016-07-22Separate errors of access denial kind to a different BaseJob error code as ↵Kitsune Ral
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.
2016-07-22Removed unneeded Q_OBJECT macros (slots don't require Q_OBJECT to work).Kitsune Ral
2016-07-12Added a missing #includeKitsune Ral
2016-06-13Dropped unused codeKitsune Ral
Previously Room::Private used to have a gotMessages() slot; now that it doesn't, it doesn't need to be a QObject either.
2016-06-05Add missing licence fileFelix Rohrbach
The license header in the source files says we ship a copy of the LGPL which we didn't.
2016-06-03Bump version of ecmFelix Rohrbach
2016-06-03Next testFelix Rohrbach
2016-06-03First test with travisFelix Rohrbach
2016-06-02Merge pull request #10 from ilpianista/masterKitsuneRal
Relax the Qt requirements down to 5.2.0
2016-06-01Merge pull request #9 from Fxrh/code-tweaksKitsuneRal
Code tweaks
2016-05-30Require Qt 5.2.0Andrea Scarpino
2016-05-27Use 'override' keyword throughout job classes; constify apiPath(), query(), ↵Kitsune Ral
data() Thanks to CLang model.
2016-05-27Set the object name for each job, to make it clear which job has failedKitsune Ral
And we don't need two log lines for timeouts.