Age | Commit message (Collapse) | Author |
|
|
|
See https://marcmutz.wordpress.com/translated-articles/pimp-my-pimpl-
%E2%80%94-reloaded
|
|
|
|
[FEATURE] Add proper SONAME versioning
|
|
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
|
|
|
|
This should avoid timeout event catching up on a not-yet-deleted-but-
already-invalid job object.
|
|
|
|
|
|
As the url-path seems to start with a slash, we had two slashes in the
request. This broke the feature for some servers, especially when
fetching icons from other servers.
|
|
|
|
Feel free to use whenever you need to convert another JSON key to some C++ object, or dispatch anything based on a JSON key.
|
|
That might be not as efficient as a solution on variadic templates; but
arguably easier to understand. Doesn't have the typo bug the previous version of this commit had.
|
|
|
|
|
|
Settings classes
|
|
breaks highlighting
This reverts commit 0fe83d59d76cd8f9c8f92d40cc58d9f5b082a84a.
|
|
|
|
|
|
VS2013 doesn't like 'using' statements if a base class has private constructors (as in QSettings - Q_DISABLE_COPY makes a copy constructor private and deleted). Hence a workaround.
|
|
|
|
|
|
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.
|
|
accessors de-virtualized
Details:
- New: Connection::homeserver(), returns the homeserver URL from inside ConnectionData
- New/Modify: Connection::accessToken() and ConnectionData::accessToken() - because we will also have refresh tokens eventually; deprecate token() for the same reason
- Modify: Connection::user(), token(), accessToken() are no more virtual (they should have never been, these are plain accessors, after all)
|
|
|
|
|
|
That might be not as efficient as a solution on variadic templates; but
arguably easier to understand.
|
|
|
|
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.
|
|
|
|
|
|
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.
|