Fix more warnings and remove dead code
This commit is contained in:
parent
409ff22d80
commit
bb290f9fec
50 changed files with 276 additions and 695 deletions
|
|
@ -273,7 +273,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
|
|||
}
|
||||
|
||||
bool from_their_device = false;
|
||||
for (auto [device_id, key] : otherUserDeviceKeys.device_keys) {
|
||||
for (const auto &[device_id, key] : otherUserDeviceKeys.device_keys) {
|
||||
auto c_key = key.keys.find("curve25519:" + device_id);
|
||||
auto e_key = key.keys.find("ed25519:" + device_id);
|
||||
|
||||
|
|
@ -406,7 +406,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
|
|||
if (failed_decryption) {
|
||||
try {
|
||||
std::map<std::string, std::vector<std::string>> targets;
|
||||
for (auto [device_id, key] : otherUserDeviceKeys.device_keys) {
|
||||
for (const auto &[device_id, key] : otherUserDeviceKeys.device_keys) {
|
||||
if (key.keys.at("curve25519:" + device_id) == msg.sender_key)
|
||||
targets[msg.sender].push_back(device_id);
|
||||
}
|
||||
|
|
@ -1522,7 +1522,7 @@ request_cross_signing_keys()
|
|||
}
|
||||
|
||||
// timeout after 15 min
|
||||
QTimer::singleShot(15 * 60 * 1000, [secretRequest, body]() {
|
||||
QTimer::singleShot(15 * 60 * 1000, ChatPage::instance(), [secretRequest, body]() {
|
||||
if (request_id_to_secret_name.count(secretRequest.request_id)) {
|
||||
request_id_to_secret_name.erase(secretRequest.request_id);
|
||||
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ SelfVerificationStatus::invalidate()
|
|||
|
||||
cache::client()->markUserKeysOutOfDate({http::client()->user_id().to_string()});
|
||||
|
||||
QTimer::singleShot(1'000, [] {
|
||||
QTimer::singleShot(1'000, this, [] {
|
||||
cache::client()->query_keys(http::client()->user_id().to_string(),
|
||||
[](const UserKeyCache &, mtx::http::RequestErr) {});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ VerificationManager::verifyUser(QString userid)
|
|||
auto joined_rooms = cache::joinedRooms();
|
||||
auto room_infos = cache::getRoomInfo(joined_rooms);
|
||||
|
||||
for (std::string room_id : joined_rooms) {
|
||||
for (const std::string &room_id : joined_rooms) {
|
||||
if ((room_infos[QString::fromStdString(room_id)].member_count == 2) &&
|
||||
cache::isRoomEncrypted(room_id)) {
|
||||
auto room_members = cache::roomMembers(room_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue