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

Small Bug Fixing
This commit is contained in:
csoler 2023-10-12 20:21:36 +02:00 committed by GitHub
commit 7eb08c8706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -42,6 +42,8 @@
#include <iostream> #include <iostream>
//#define DEBUG_COMMENT_TREE_WIDGET
#define PCITEM_COLUMN_COMMENT 0 #define PCITEM_COLUMN_COMMENT 0
#define PCITEM_COLUMN_AUTHOR 1 #define PCITEM_COLUMN_AUTHOR 1
#define PCITEM_COLUMN_DATE 2 #define PCITEM_COLUMN_DATE 2
@ -768,8 +770,10 @@ void GxsCommentTreeWidget::insertComments(const std::vector<RsGxsComment>& comme
new_comments.push_back(comment.mMeta.mMsgId); new_comments.push_back(comment.mMeta.mMsgId);
/* convert to a QTreeWidgetItem */ /* convert to a QTreeWidgetItem */
#ifdef DEBUG_COMMENT_TREE_WIDGET
std::cerr << "GxsCommentTreeWidget::service_loadThread() Got Comment: " << comment.mMeta.mMsgId; std::cerr << "GxsCommentTreeWidget::service_loadThread() Got Comment: " << comment.mMeta.mMsgId;
std::cerr << std::endl; std::cerr << std::endl;
#endif
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(NULL,GxsIdDetails::ICON_TYPE_AVATAR) ; GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(NULL,GxsIdDetails::ICON_TYPE_AVATAR) ;
QString text; QString text;

View file

@ -514,13 +514,13 @@ void GxsChannelPostsWidgetWithModel::keyPressEvent(QKeyEvent *e)
if(e->key() == Qt::Key_Left && index.column()==0) if(e->key() == Qt::Key_Left && index.column()==0)
{ {
ui->postsTree->setCurrentIndex(index.siblingAtColumn(n)); ui->postsTree->setCurrentIndex(index.sibling(index.row(),n));
e->accept(); e->accept();
return; return;
} }
if(e->key() == Qt::Key_Right && index.column()==n) if(e->key() == Qt::Key_Right && index.column()==n)
{ {
ui->postsTree->setCurrentIndex(index.siblingAtColumn(0)); ui->postsTree->setCurrentIndex(index.sibling(index.row(),0));
e->accept(); e->accept();
return; return;
} }

View file

@ -255,7 +255,7 @@ private:
QList<QLabel*> tagLabels; QList<QLabel*> tagLabels;
// needed to send system flags with reply // needed to send system flags with reply
unsigned msgFlags; unsigned int msgFlags;
RSTreeWidgetItemCompareRole *m_compareRole; RSTreeWidgetItemCompareRole *m_compareRole;
QCompleter *m_completer; QCompleter *m_completer;