X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fapicalldelegate.cpp;h=11ed3a5ca03d5c59c96b8c7bc05c67e2e5583bf8;hb=2ae3c962d308ceb866f7478866cdcc85f50a987d;hp=800fcddb1cc842ae95cf0bc69870bc15345a3578;hpb=b53b161dfae79f1bbb1dd2c8dff087b5e2365a26;p=apitrace diff --git a/gui/apicalldelegate.cpp b/gui/apicalldelegate.cpp index 800fcdd..11ed3a5 100644 --- a/gui/apicalldelegate.cpp +++ b/gui/apicalldelegate.cpp @@ -33,7 +33,7 @@ void ApiCallDelegate::paint(QPainter *painter, //QStyledItemDelegate::paint(painter, option, index); QStyle *style = QApplication::style(); style->drawControl(QStyle::CE_ItemViewItem, &option, painter, 0); - if (!event->state().isEmpty()) { + if (event->hasState()) { QPixmap px = m_stateEmblem.pixmap(option.rect.height(), option.rect.height()); painter->drawPixmap(option.rect.topLeft(), px); @@ -67,7 +67,10 @@ QSize ApiCallDelegate::sizeHint(const QStyleOptionViewItem &option, ApiTraceEvent *event = index.data(ApiTraceModel::EventRole).value(); +#ifndef __APPLE__ + /* XXX: This fails on MacOSX, but seems safe to ignore */ Q_ASSERT(index.column() == 0); +#endif if (event) { QStaticText text = event->staticText();