diff --git a/src/DLListDelegate.h b/src/DLListDelegate.h index d21a32b6e..969295643 100644 --- a/src/DLListDelegate.h +++ b/src/DLListDelegate.h @@ -104,15 +104,6 @@ class DLListDelegate: public QItemDelegate { } } - QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const{ - QVariant value = index.data(Qt::FontRole); - QFont fnt = value.isValid() ? qvariant_cast(value) : option.font; - QFontMetrics fontMetrics(fnt); - const QString text = index.data(Qt::DisplayRole).toString(); - QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1)); - return textRect.size(); - } - QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const { // No editor here return 0; diff --git a/src/FinishedListDelegate.h b/src/FinishedListDelegate.h index 13ed7d50b..b4a7e03f8 100644 --- a/src/FinishedListDelegate.h +++ b/src/FinishedListDelegate.h @@ -133,6 +133,11 @@ class FinishedListDelegate: public QItemDelegate { return textRect.size(); } + QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const { + // No editor here + return 0; + } + }; #endif