removed some debug output

This commit is contained in:
csoler 2023-08-15 21:13:53 +02:00
parent f6bcfb549a
commit eeacb4500d

View File

@ -95,6 +95,7 @@
#define ROW_SENTBOX 3 #define ROW_SENTBOX 3
#define ROW_TRASHBOX 4 #define ROW_TRASHBOX 4
// #define DEBUG_MESSAGES_DIALOG 1
class MessageSortFilterProxyModel: public QSortFilterProxyModel class MessageSortFilterProxyModel: public QSortFilterProxyModel
{ {
@ -365,15 +366,18 @@ void MessagesDialog::preModelUpdate()
if (m.isValid()) { if (m.isValid()) {
mTmpSavedCurrentId = m.sibling(m.row(), RsMessageModel::COLUMN_THREAD_MSGID).data(RsMessageModel::MsgIdRole).toString(); mTmpSavedCurrentId = m.sibling(m.row(), RsMessageModel::COLUMN_THREAD_MSGID).data(RsMessageModel::MsgIdRole).toString();
} }
#ifdef DEBUG_MESSAGES_DIALOG
std::cerr << "Pre-change: saving selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl; std::cerr << "Pre-change: saving selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl;
#endif
} }
void MessagesDialog::postModelUpdate() void MessagesDialog::postModelUpdate()
{ {
// restore selection // restore selection
#ifdef DEBUG_MESSAGES_DIALOG
std::cerr << "Post-change: restoring selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl; std::cerr << "Post-change: restoring selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl;
#endif
QItemSelection sel; QItemSelection sel;
foreach(const QString& s,mTmpSavedSelectedIds) foreach(const QString& s,mTmpSavedSelectedIds)