Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the version to 0.10 alpha; stop using old API #859

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ if (POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()

set(API_VERSION "0.9")
project(Quotient VERSION "${API_VERSION}.2" LANGUAGES CXX)
set(PRE_STAGE "")
set(API_VERSION "0.10")
project(Quotient VERSION "${API_VERSION}.0" LANGUAGES CXX)
set(PRE_STAGE "alpha")
string(JOIN ~ FULL_VERSION ${PROJECT_VERSION} ${PRE_STAGE})

message(STATUS)
Expand Down
6 changes: 3 additions & 3 deletions Quotient/connectionencryptiondata_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void ConnectionEncryptionData::handleEncryptedToDeviceEvent(const EncryptedEvent

void ConnectionEncryptionData::handleMasterKeys(const QHash<QString, CrossSigningKey>& masterKeys)
{
for (const auto &[userId, key] : asKeyValueRange(masterKeys)) {
for (const auto &[userId, key] : masterKeys.asKeyValueRange()) {
if (key.userId != userId) {
qCWarning(E2EE) << "Master key: userId mismatch" << key.userId << userId;
continue;
Expand Down Expand Up @@ -459,7 +459,7 @@ QString getEd25519Signature(const CrossSigningKey& keyObject, const QString& use

void ConnectionEncryptionData::handleSelfSigningKeys(const QHash<QString, CrossSigningKey>& selfSigningKeys)
{
for (const auto &[userId, key] : asKeyValueRange(selfSigningKeys)) {
for (const auto &[userId, key] : selfSigningKeys.asKeyValueRange()) {
if (key.userId != userId) {
qCWarning(E2EE) << "Self signing key: userId mismatch"<< key.userId << userId;
continue;
Expand Down Expand Up @@ -505,7 +505,7 @@ void ConnectionEncryptionData::handleSelfSigningKeys(const QHash<QString, CrossS

void ConnectionEncryptionData::handleUserSigningKeys(const QHash<QString, CrossSigningKey>& userSigningKeys)
{
for (const auto &[userId, key] : asKeyValueRange(userSigningKeys)) {
for (const auto &[userId, key] : userSigningKeys.asKeyValueRange()) {
if (key.userId != userId) {
qWarning() << "User signing key: userId mismatch" << key.userId << userId;
continue;
Expand Down
2 changes: 1 addition & 1 deletion Quotient/events/roommessageevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ bool RoomMessageEvent::isThreaded() const
{
const auto relation = relatesTo();
return (relation && relation.value().type == EventRelation::ThreadType)
|| unsignedPart<QJsonObject>("m.relations"_ls).contains(EventRelation::ThreadType);
|| unsignedPart<QJsonObject>("m.relations"_L1).contains(EventRelation::ThreadType);
}

QString RoomMessageEvent::threadRootEventId() const
Expand Down
2 changes: 0 additions & 2 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,8 +3477,6 @@ QJsonObject Room::Private::toJson() const

QJsonObject Room::toJson() const { return d->toJson(); }

MemberSorter Room::memberSorter() const { return MemberSorter(); }

void Room::activateEncryption()
{
if(usesEncryption()) {
Expand Down
5 changes: 0 additions & 5 deletions Quotient/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,6 @@ class QUOTIENT_API Room : public QObject {
*/
Q_INVOKABLE QString prettyPrint(const QString& plainText) const;

#if Quotient_VERSION_MAJOR == 0 && Quotient_VERSION_MINOR < 10
[[deprecated("Create MemberSorter objects directly instead")]]
MemberSorter memberSorter() const;
#endif

Q_INVOKABLE bool supportsCalls() const;

/// Whether the current user is allowed to upgrade the room
Expand Down
12 changes: 2 additions & 10 deletions Quotient/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ inline auto makeReadyValueFuture(T&& value)
#endif
}

inline namespace Literals { using namespace Qt::Literals; }

#if Quotient_VERSION_MAJOR == 0 && Quotient_VERSION_MINOR < 10
/// This is only to make UnorderedMap alias work until we get rid of it
template <typename T>
Expand All @@ -125,16 +127,6 @@ template <typename KeyT, typename ValT>
using UnorderedMap
[[deprecated("Use std::unordered_map directly")]] = std::unordered_map<KeyT, ValT, HashQ<KeyT>>;

inline namespace Literals { using namespace Qt::Literals; }

#if Quotient_VERSION_MAJOR == 0 && Quotient_VERSION_MINOR > 9
[[deprecated("Use operators from Qt::Literals (aka Quotient::Literals) instead")]]
#endif
constexpr auto operator""_ls(const char* s, std::size_t size)
{
return operator""_L1(s, size);
}

template <typename ArrayT>
class [[deprecated("Use std::ranges::subrange instead")]] Range {
using iterator = typename ArrayT::iterator;
Expand Down