From 8e9d210a2a2136d1d517645b2b2412b15da09360 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 14 Jun 2018 02:28:35 +0300 Subject: Rename the log namespace to avoid symbol clash with the math function - Patch the olm repo with a CMakeLists.txt file --- src/dialogs/RoomSettings.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/dialogs/RoomSettings.cpp') diff --git a/src/dialogs/RoomSettings.cpp b/src/dialogs/RoomSettings.cpp index a091c8bc..74d08478 100644 --- a/src/dialogs/RoomSettings.cpp +++ b/src/dialogs/RoomSettings.cpp @@ -338,7 +338,7 @@ RoomSettings::setupEditButton() hasEditRights_ = cache::client()->hasEnoughPowerLevel( {EventType::RoomName, EventType::RoomTopic}, room_id_.toStdString(), userId); } catch (const lmdb::error &e) { - qWarning() << "lmdb error" << e.what(); + nhlog::db()->warn("lmdb error: {}", e.what()); } constexpr int buttonSize = 36; @@ -379,7 +379,8 @@ RoomSettings::retrieveRoomInfo() info_ = cache::client()->singleRoomInfo(room_id_.toStdString()); setAvatar(QImage::fromData(cache::client()->image(info_.avatar_url))); } catch (const lmdb::error &e) { - qWarning() << "failed to retrieve room info from cache" << room_id_; + nhlog::db()->warn("failed to retrieve room info from cache: {}", + room_id_.toStdString()); } } @@ -415,17 +416,17 @@ RoomSettings::enableEncryption() room_id, [room_id, this](const mtx::responses::EventId &, mtx::http::RequestErr err) { if (err) { int status_code = static_cast(err->status_code); - log::net()->warn("failed to enable encryption in room ({}): {} {}", - room_id, - err->matrix_error.error, - status_code); + nhlog::net()->warn("failed to enable encryption in room ({}): {} {}", + room_id, + err->matrix_error.error, + status_code); emit enableEncryptionError( tr("Failed to enable encryption: %1") .arg(QString::fromStdString(err->matrix_error.error))); return; } - log::net()->info("enabled encryption on room ({})", room_id); + nhlog::net()->info("enabled encryption on room ({})", room_id); }); } -- cgit 1.5.1