fix(chatgui): replace qDebug with DEBUG_INFO for online trace logs
This commit is contained in:
1 parent
ac0d1c18ed
commit
cf46a59d3a
2 files changed
+13
-9
No files matched your search
@@ -7,9 +7,12 @@
|
||||
#include <QPushButton>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QDebug>
|
||||
#include <QMouseEvent>
|
||||
|
||||
extern "C" {
|
||||
#include "../../lib/debug_config.h"
|
||||
}
|
||||
|
||||
/* QListView that prevents deselection, handles invite plus-button clicks */
|
||||
class ChannelListView : public QListView {
|
||||
Q_OBJECT
|
||||
@@ -181,8 +184,8 @@ void ChannelList::loadChannels() {
|
||||
item->setData(QString(), ChannelLastMessageRole);
|
||||
item->setData(makeChannelIcon(colors[ci % 6], letter), ChannelIconRole);
|
||||
m_model->appendRow(item);
|
||||
qDebug() << "ChannelList::loadChannels row=" << (m_model->rowCount()-1)
|
||||
<< "cid='" << ch.channelId << "' name='" << ch.name << "'";
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "ChannelList::loadChannels row=%d cid='%s' name='%s'",
|
||||
m_model->rowCount()-1, qPrintable(ch.channelId), qPrintable(ch.name));
|
||||
ci++;
|
||||
}
|
||||
|
||||
@@ -208,25 +211,25 @@ void ChannelList::selectChannel(const QString& channelId) {
|
||||
|
||||
void ChannelList::setChannelPeersOnline(const QString& channelId, int count) {
|
||||
int found = 0;
|
||||
qDebug() << "ChannelList::setChannelPeersOnline search='" << channelId
|
||||
<< "' online=" << count << " rows=" << m_model->rowCount();
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "ChannelList::setChannelPeersOnline search='%s' online=%d rows=%d",
|
||||
qPrintable(channelId), count, m_model->rowCount());
|
||||
for (int row = 0; row < m_model->rowCount(); row++) {
|
||||
QStandardItem* item = m_model->item(row);
|
||||
if (item) {
|
||||
QString itemCid = item->data(ChannelChannelIdRole).toString();
|
||||
int match = (itemCid == channelId) ? 1 : 0;
|
||||
qDebug() << " row=" << row << "cid='" << itemCid << "' match=" << match;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, " row=%d cid='%s' match=%d", row, qPrintable(itemCid), match);
|
||||
if (match) {
|
||||
item->setData(count, ChannelPeersOnlineRole);
|
||||
item->setData(m_autoConnectActive ? 1 : 0, ChannelAutoConnectActiveRole);
|
||||
qDebug() << " SET online=" << count;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, " SET online=%d", count);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
qDebug() << " NOT FOUND in model";
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, " NOT FOUND in model");
|
||||
}
|
||||
|
||||
void ChannelList::setAutoConnectActive(bool active) {
|
||||
|
||||
Reference in new issue
Block a user