]> git.cworth.org Git - apitrace/blobdiff - gui/apicalldelegate.cpp
Merge pull request #61 from prahal/gui-edit
[apitrace] / gui / apicalldelegate.cpp
index 800fcddb1cc842ae95cf0bc69870bc15345a3578..11ed3a5ca03d5c59c96b8c7bc05c67e2e5583bf8 100644 (file)
@@ -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<ApiTraceEvent*>();
 
+#ifndef __APPLE__
+    /* XXX: This fails on MacOSX, but seems safe to ignore */
     Q_ASSERT(index.column() == 0);
+#endif
 
     if (event) {
         QStaticText text = event->staticText();