mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-25 09:29:23 -04:00
code cleaning/disabled debug output
This commit is contained in:
parent
e63ff4d7db
commit
09e66cbde4
@ -36,7 +36,7 @@
|
|||||||
#include "GxsChannelPostFilesModel.h"
|
#include "GxsChannelPostFilesModel.h"
|
||||||
|
|
||||||
//#define DEBUG_CHANNEL_MODEL_DATA
|
//#define DEBUG_CHANNEL_MODEL_DATA
|
||||||
#define DEBUG_CHANNEL_MODEL
|
//#define DEBUG_CHANNEL_MODEL
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(RsMsgMetaData)
|
Q_DECLARE_METATYPE(RsMsgMetaData)
|
||||||
Q_DECLARE_METATYPE(RsGxsChannelPost)
|
Q_DECLARE_METATYPE(RsGxsChannelPost)
|
||||||
|
@ -119,14 +119,9 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
|||||||
painter->save();
|
painter->save();
|
||||||
painter->setClipRect(option.rect);
|
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>() ;
|
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
|
||||||
|
|
||||||
// if(index.row() & 0x01)
|
painter->fillRect( option.rect, option.palette.base().color());
|
||||||
// painter->fillRect( option.rect, option.palette.alternateBase().color());
|
|
||||||
// else
|
|
||||||
painter->fillRect( option.rect, option.palette.base().color());
|
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
|
|
||||||
if(mUseGrid || index.column()==0)
|
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)
|
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.
|
pixmap.fill(SelectedColor); // I dont know how to grab the backgroud color for selected objects automatically.
|
||||||
else
|
else
|
||||||
{
|
pixmap.fill(option.palette.base().color());
|
||||||
// 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
|
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user