From 3bbd03478176825dd500d9019d206e97a8f43b03 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 23 Dec 2019 05:22:03 +0100 Subject: [PATCH] Fix transitive dependencies on iostream --- src/Cache.cpp | 4 ++-- src/TextInputWidget.cpp | 2 +- src/main.cpp | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Cache.cpp b/src/Cache.cpp index 0bfc2842..d74bbe91 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -1065,8 +1065,8 @@ Cache::saveInvite(lmdb::txn &txn, lmdb::val(json(msg).dump())); if (!res) - std::cout << "couldn't save data" << json(msg).dump() - << '\n'; + nhlog::db()->warn("couldn't save data: {}", + json(msg).dump()); }, e); } diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp index 5e63eca5..b481a57c 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp @@ -537,7 +537,7 @@ TextInputWidget::TextInputWidget(QWidget *parent) emit input_->resultsRetrieved(cache::searchUsers( ChatPage::instance()->currentRoom().toStdString(), q)); } catch (const lmdb::error &e) { - std::cout << e.what() << '\n'; + nhlog::db()->error("Suggestion retrieval failed: {}", e.what()); } }); }); diff --git a/src/main.cpp b/src/main.cpp index ec96f0ec..37b38c1b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +#include + #include #include #include @@ -43,15 +45,15 @@ #include "emoji/MacHelper.h" #endif -#if defined(Q_OS_LINUX) -#include -#include - #ifdef QML_DEBUGGING #include QQmlDebuggingEnabler enabler; #endif +#if defined(Q_OS_LINUX) +#include +#include + void stacktraceHandler(int signum) {