code cleaning/disabled debug output

This commit is contained in:
csoler 2023-03-26 23:03:09 +02:00
parent e63ff4d7db
commit 09e66cbde4
2 changed files with 3 additions and 15 deletions

View File

@ -36,7 +36,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)

View File

@ -119,14 +119,9 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
painter->save();
painter->setClipRect(option.rect);
std::cerr << "option.rect=" << option.rect.width() << " x " << option.rect.height() << std::endl;
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
// if(index.row() & 0x01)
// painter->fillRect( option.rect, option.palette.alternateBase().color());
// else
painter->fillRect( option.rect, option.palette.base().color());
painter->restore();
if(mUseGrid || index.column()==0)
@ -145,14 +140,7 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
if((option.state & QStyle::State_Selected) && post.mMeta.mPublishTs > 0) // check if post is selected and is not empty (end of last row)
pixmap.fill(SelectedColor); // I dont know how to grab the backgroud color for selected objects automatically.
else
{
// we need to do the alternate color manually
//if(index.row() & 0x01)
// pixmap.fill(option.palette.alternateBase().color());
//else
pixmap.fill(option.palette.base().color());
}
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background