From 3bbd03478176825dd500d9019d206e97a8f43b03 Mon Sep 17 00:00:00 2001 From: Nicolas Werner <nicolas.werner@hotmail.de> 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 0bfc28429..d74bbe910 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 5e63eca54..b481a57ce 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 ec96f0ec9..37b38c1bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,6 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <iostream> + #include <QApplication> #include <QCommandLineParser> #include <QDesktopWidget> @@ -43,15 +45,15 @@ #include "emoji/MacHelper.h" #endif -#if defined(Q_OS_LINUX) -#include <boost/stacktrace.hpp> -#include <csignal> - #ifdef QML_DEBUGGING #include <QQmlDebuggingEnabler> QQmlDebuggingEnabler enabler; #endif +#if defined(Q_OS_LINUX) +#include <boost/stacktrace.hpp> +#include <csignal> + void stacktraceHandler(int signum) { -- GitLab