X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=0382a21473d72310b6cf48c77338d0f2771f46e4;hb=e3a91437981155e3657284cbd850c22c6522817b;hp=8c28ac0f700bb2c758c198a119f21b3661024b8a;hpb=6ee26fd6d0a163314002616d277e5444f11b7720;p=quassel.git diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 8c28ac0f..0382a214 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -69,7 +69,7 @@ void BufferView::init() hideColumn(2); setIndentation(10); - expandAll(); + // New entries will be expanded automatically when added; no need to call expandAll() header()->hide(); // nobody seems to use this anyway @@ -657,7 +657,11 @@ bool BufferViewDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, c if (!value.isValid()) return QStyledItemDelegate::editorEvent(event, model, option, index); +#if QT_VERSION < 0x050000 QStyleOptionViewItemV4 viewOpt(option); +#else + QStyleOptionViewItem viewOpt(option); +#endif initStyleOption(&viewOpt, index); QRect checkRect = viewOpt.widget->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &viewOpt, viewOpt.widget);