From ef688f609739c2a8d455cc48b2f3d5482a6b6284 Mon Sep 17 00:00:00 2001 From: tux3 Date: Mon, 11 May 2015 16:06:12 +0200 Subject: [PATCH] Remove pointless or potentially sensitive log messages --- src/core/core.cpp | 11 ++++------- src/historykeeper.cpp | 2 +- src/misc/db/encrypteddb.cpp | 1 - src/widget/widget.cpp | 2 -- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/core/core.cpp b/src/core/core.cpp index 241e491be..39eff2ce8 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -527,7 +527,6 @@ void Core::onGroupNamelistChange(Tox*, int groupnumber, int peernumber, uint8_t void Core::onGroupTitleChange(Tox*, int groupnumber, int peernumber, const uint8_t* title, uint8_t len, void* _core) { - qDebug() << "group" << groupnumber << "title changed by" << peernumber; Core* core = static_cast(_core); QString author; if (peernumber >= 0) @@ -573,17 +572,18 @@ void Core::requestFriendship(const QString& friendAddress, const QString& messag } else { - qDebug() << "requesting friendship of "+friendAddress; CString cMessage(message); uint32_t friendId = tox_friend_add(tox, CFriendAddress(friendAddress).data(), cMessage.data(), cMessage.size(), nullptr); if (friendId == std::numeric_limits::max()) { + qDebug() << "Failed to request friendship"; emit failedToAddFriend(userId); } else { + qDebug() << "Requested friendship of "<::max()) { - qWarning() << "getPeerName: No such peer "+id.toString(); + qWarning() << "getPeerName: No such peer"; return name; } const size_t nameSize = tox_friend_get_name_size(tox, friendId, nullptr); if (nameSize == SIZE_MAX) - { - //qDebug() << "getPeerName: Can't get name of friend "+QString().setNum(friendId)+" ("+id.toString()+")"; return name; - } uint8_t* cname = new uint8_t[nameSize HistoryKeeper::exportMessagesDeleteFile(int encrypted) { auto msgs = getInstance()->exportMessages(); - qDebug() << "count" << msgs.size() << "messages exported"; + qDebug() << "Messages exported"; if (!removeHistory(encrypted)) qWarning() << "couldn't delete old log file!"; diff --git a/src/misc/db/encrypteddb.cpp b/src/misc/db/encrypteddb.cpp index 8f504c2a9..e5982fcba 100644 --- a/src/misc/db/encrypteddb.cpp +++ b/src/misc/db/encrypteddb.cpp @@ -87,7 +87,6 @@ bool EncryptedDb::pullFileContent(const QString &fname, QByteArray &buf) while (!dbFile.atEnd()) { QByteArray encrChunk = dbFile.read(encryptedChunkSize); - qDebug() << "pullFileContent: got chunk:" << encrChunk.size(); buf = Core::getInstance()->decryptData(encrChunk, Core::ptHistory); if (buf.size() > 0) { diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index ea6843727..249781280 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -609,7 +609,6 @@ void Widget::reloadHistory() void Widget::addFriend(int friendId, const QString &userId) { - //qDebug() << "Adding friend with id" << userId; ToxID userToxId = ToxID::fromString(userId); Friend* newfriend = FriendList::addFriend(friendId, userToxId); contactListWidget->moveWidget(newfriend->getFriendWidget(),Status::Offline); @@ -654,7 +653,6 @@ void Widget::addFriend(int friendId, const QString &userId) QPixmap avatar = Settings::getInstance().getSavedAvatar(userId); if (!avatar.isNull()) { - //qWarning() << "loadded avatar for id" << userId; newfriend->getChatForm()->onAvatarChange(friendId, avatar); newfriend->getFriendWidget()->onAvatarChange(friendId, avatar); }