Merge pull request #2801 from csoler/v0.6-BugFixing_30

removed some debug output
This commit is contained in:
csoler 2023-12-18 20:48:07 +01:00 committed by GitHub
commit 883d9f9b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 5 deletions

View File

@ -619,12 +619,13 @@ void PostedListWidgetWithModel::updateGroupData()
void PostedListWidgetWithModel::postPostLoad()
{
#ifdef DEBUG_POSTED
std::cerr << "Post channel load..." << std::endl;
#endif
whileBlocking(ui->filter_LE)->setText(QString()); //Clear it before navigate, as it will update it.
if (!mNavigatePendingMsgId.isNull())
navigate(mNavigatePendingMsgId);
#ifdef TO_REMOVE
else if( (mLastSelectedPosts.count(groupId()) > 0)
&& !mLastSelectedPosts[groupId()].isNull())
@ -639,8 +640,10 @@ void PostedListWidgetWithModel::postPostLoad()
ui->postsTree->setFocus();
}
#endif
#ifdef DEBUG_POSTED
else
std::cerr << "No pre-selected channel post." << std::endl;
#endif
updateShowLabel();
}

View File

@ -131,15 +131,19 @@ void GxsCommentDialog::idChooserReady()
void GxsCommentDialog::voterSelectionChanged( int index )
{
#ifdef DEBUG_COMMENT_DIALOG
std::cerr << "GxsCommentDialog::voterSelectionChanged(" << index << ")";
std::cerr << std::endl;
#endif
RsGxsId voterId;
switch (ui->idChooser->getChosenId(voterId)) {
case GxsIdChooser::KnowId:
case GxsIdChooser::UnKnowId:
std::cerr << "GxsCommentDialog::voterSelectionChanged() => " << voterId;
#ifdef DEBUG_COMMENT_DIALOG
std::cerr << "GxsCommentDialog::voterSelectionChanged() => " << voterId;
std::cerr << std::endl;
#endif
ui->treeWidget->setVoteId(voterId);
break;
@ -160,8 +164,10 @@ void GxsCommentDialog::setCommentHeader(QWidget *header)
return;
}
std::cerr << "GxsCommentDialog::setCommentHeader() Adding header to ui,postFrame";
#ifdef DEBUG_COMMENT_DIALOG
std::cerr << "GxsCommentDialog::setCommentHeader() Adding header to ui,postFrame";
std::cerr << std::endl;
#endif
//header->setParent(ui->postFrame);
//ui->postFrame->setVisible(true);

View File

@ -466,7 +466,9 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
uint32_t current_store_time = checkDelay(mInterface->getStoragePeriod(mGroupId))/86400 ;
uint32_t current_sync_time = checkDelay(mInterface->getSyncPeriod(mGroupId))/86400 ;
#ifdef DEBUG_GROUPFRAMEDIALOG
std::cerr << "Got sync=" << current_sync_time << ". store=" << current_store_time << std::endl;
#endif
QAction *actnn = NULL;
QMenu *ctxMenu2 = contextMnu.addMenu(tr("Synchronise posts of last...")) ;

View File

@ -499,8 +499,9 @@ void RsGxsChannelPostFilesModel::update_files(std::set<ChannelPostFileInfo>& add
else
++afit;
}
#ifdef DEBUG_CHANNEL_FILES_MODEL
RsDbg() << " Remains: " << added_files.size() << " added files and " << removed_files.size() << " removed files" ;
#endif
// 2 - add whatever file remains,

View File

@ -38,7 +38,7 @@
#include "GxsChannelPostFilesModel.h"
//#define DEBUG_CHANNEL_MODEL_DATA
#define DEBUG_CHANNEL_MODEL
//#define DEBUG_CHANNEL_MODEL
Q_DECLARE_METATYPE(RsMsgMetaData)
Q_DECLARE_METATYPE(RsGxsChannelPost)
@ -592,10 +592,12 @@ void RsGxsChannelPostsModel::update_posts(const RsGxsGroupId& group_id)
std::cerr << __PRETTY_FUNCTION__ << " failed to retrieve channel messages for channel " << group_id << std::endl;
return;
}
#ifdef DEBUG_CHANNEL_MODEL
std::cerr << "Got channel all content for channel " << group_id << std::endl;
std::cerr << " posts : " << posts->size() << std::endl;
std::cerr << " comments: " << comments.size() << std::endl;
std::cerr << " votes : " << votes.size() << std::endl;
#endif
// 2 - update the model in the UI thread.

View File

@ -781,7 +781,9 @@ void GxsChannelPostsWidgetWithModel::handlePostsTreeSizeChange(QSize s,bool forc
return;
int n_columns = std::max(1,(int)floor(s.width() / (mChannelPostsDelegate->cellSize(0,font(),ui->postsTree->width()))));
#ifdef DEBUG_CHANNEL_POSTS_WIDGET
RsDbg() << "nb columns: " << n_columns << " current count=" << mChannelPostsModel->columnCount() ;
#endif
// save current post. The setNumColumns() indeed loses selection
@ -825,7 +827,9 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr<con
{
if(e->mChannelGroupId == groupId())
{
#ifdef DEBUG_CHANNEL_POSTS_WIDGET
RsDbg() << "Received new message in current channel, msgId=" << e->mChannelMsgId ;
#endif
RsThread::async([this,E=*e]() // dereferencing to make a copy that will survive while e is deleted by the parent thread.
{
@ -1042,7 +1046,9 @@ void GxsChannelPostsWidgetWithModel::updateData(bool update_group_data, bool upd
void GxsChannelPostsWidgetWithModel::postChannelPostLoad()
{
#ifdef DEBUG_CHANNEL_POSTS_WIDGET
std::cerr << "Post channel load..." << std::endl;
#endif
if (!mNavigatePendingMsgId.isNull())
navigate(mNavigatePendingMsgId);