Age | Commit message (Collapse) | Author |
|
An incomplete type was preventing some SFINAE cases for literal types.
|
|
|
|
The two main cases for this header file are:
* namespace QMatrixClient = Quotient should occur exactly once,
to respect ODR.
* Q_NAMESPACE for namespace Quotient (to enable Q_ENUM_NS, particularly)
must be defined exactly once, for the same reason.
|
|
[skip ci]
|
|
See the change in connection.cpp for the example of usage.
Also: removed static_asserts: the first one is provided by std::optional,
and the second one is only relevant to edit().
|
|
To ease on back-compatibility.
|
|
Xcode 10 doesn't have it, and value() is not quite fitting
mostly-exceptionless Quotient anyway.
|
|
That breaks API all over the place but:
1. The fixes are trivial.
2. More of std:: is used instead of home-baking the same stuff.
|
|
Because Apple stdlib doesn't have std::function deduction guides.
|
|
is_callable won't ever be needed because std::is_invokable is here; arg_number and returns() didn't find its users; and function_type has been just broken all along for member functions.
|
|
Invading into std:: is frowned upon, even though legitimate from the C++ standard perspective. Given that it's possible to pass a hash object to unordered_map, it only takes an alias for std::unordered_map to avoid having to specialize std::hash. And besides, a generic compatibility bridge between qHash and std::hash has been long needed.
std::hash<QString> in converters.h remains for now; it will be dropped separately when the API files get regenerated to use UnorderedMap.
|
|
|
|
std::string is still a thing, after all.
|
|
|
|
|
|
|
|
Also: Connection::resolveServer() now only accepts MXIDs, not domains.
|
|
|
|
# Conflicts:
# CMakeLists.txt
# lib/avatar.cpp
# lib/connection.cpp
# lib/connection.h
# lib/connectiondata.cpp
# lib/csapi/account-data.cpp
# lib/csapi/account-data.h
# lib/csapi/capabilities.cpp
# lib/csapi/capabilities.h
# lib/csapi/content-repo.cpp
# lib/csapi/create_room.cpp
# lib/csapi/filter.cpp
# lib/csapi/joining.cpp
# lib/csapi/keys.cpp
# lib/csapi/list_joined_rooms.cpp
# lib/csapi/notifications.cpp
# lib/csapi/openid.cpp
# lib/csapi/presence.cpp
# lib/csapi/pushrules.cpp
# lib/csapi/registration.cpp
# lib/csapi/room_upgrades.cpp
# lib/csapi/room_upgrades.h
# lib/csapi/search.cpp
# lib/csapi/users.cpp
# lib/csapi/versions.cpp
# lib/csapi/whoami.cpp
# lib/csapi/{{base}}.cpp.mustache
# lib/events/accountdataevents.h
# lib/events/eventcontent.h
# lib/events/roommemberevent.cpp
# lib/events/stateevent.cpp
# lib/jobs/basejob.cpp
# lib/jobs/basejob.h
# lib/networkaccessmanager.cpp
# lib/networksettings.cpp
# lib/room.cpp
# lib/room.h
# lib/settings.cpp
# lib/settings.h
# lib/syncdata.cpp
# lib/user.cpp
# lib/user.h
# lib/util.cpp
|
|
|
|
|
|
MemberEventContent::displayName() will strip away Unicode text direction override characters. Direct access to JSON can still provide "raw" data.
|
|
|
|
WORKAROUND_EXTENDED_INITIALIZER_LIST -> BROKEN_INITIALIZER_LISTS is
available from util.h now.
|
|
Because it works, and fails, in surprising ways. And none of the code uses it, as of now.
|
|
|
|
|
|
connectUntil()
|
|
|
|
non-Omittable values
|
|
|
|
|
|
some compilers
A member function reference is not the same as a member function pointer.
|
|
|
|
== true
That is, instead of Q_ASSERTing in debug builds (release builds already work that way). The idea is that since the value is default-initialised anyway it can be used as a "blank canvas" to access specific fields inside the value's structure. The next commit will use that.
|
|
|
|
|
|
|
|
It's borrowed from Qt; namespacing basically forced client writers to put "using namespace QMatrixClient" before using qAsConst.
|
|
|
|
A spin on the standard algorithm.
|
|
|
|
...against unwrapping omitted values (the release build will return a
default-constructed value).
|
|
Turned out to work in unexpected ways when an Omittable<> gets copied.
|
|
|
|
|
|
|
|
There were two common points that had to be updated every time a new event is introduced:
the EventType enumeration and one of 3 doMakeEvent<> specialisations. The new code
has a template class, EventFactory<>, that uses a list of static factory methods
to create events instead of typelists used in doMakeEvent<>(); the EventType enumeration
is replaced with a namespace populated with constants as necessary.
In general, EventType is considered a deprecated mechanism altogether; instead, a set
of facilities is provided: is<>() to check if an event has a certain type (to replace
comparison against an EventType value) and visit<>() to execute actions based on
the event type (replacing switch statements over EventType values).
Closes #129.
|
|
|
|
|