diff --git a/src/gui/previewlistdelegate.h b/src/gui/previewlistdelegate.h index 9a7cb3601..08563a167 100644 --- a/src/gui/previewlistdelegate.h +++ b/src/gui/previewlistdelegate.h @@ -32,8 +32,8 @@ #define PREVIEWLISTDELEGATE_H #include -#include -#include +#include +#include #include #include #include @@ -59,7 +59,7 @@ class PreviewListDelegate: public QItemDelegate { void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const { painter->save(); - QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); + QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option); switch(index.column()) { case PreviewSelect::SIZE: @@ -67,7 +67,7 @@ class PreviewListDelegate: public QItemDelegate { QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong())); break; case PreviewSelect::PROGRESS:{ - QStyleOptionProgressBarV2 newopt; + QStyleOptionProgressBar newopt; qreal progress = index.data().toDouble()*100.; newopt.rect = opt.rect; newopt.text = ((progress == 100.0) ? QString("100%") : Utils::String::fromDouble(progress, 1) + "%"); diff --git a/src/gui/properties/peerlistdelegate.h b/src/gui/properties/peerlistdelegate.h index 864a6f424..84cb27110 100644 --- a/src/gui/properties/peerlistdelegate.h +++ b/src/gui/properties/peerlistdelegate.h @@ -50,7 +50,7 @@ public: void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const { painter->save(); - QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); + QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option); switch(index.column()) { case TOT_DOWN: case TOT_UP: diff --git a/src/gui/properties/proplistdelegate.cpp b/src/gui/properties/proplistdelegate.cpp index b6dda5cab..1445c0e13 100644 --- a/src/gui/properties/proplistdelegate.cpp +++ b/src/gui/properties/proplistdelegate.cpp @@ -28,8 +28,8 @@ * Contact : chris@qbittorrent.org */ -#include -#include +#include +#include #include #include #include @@ -60,7 +60,7 @@ PropListDelegate::PropListDelegate(PropertiesWidget *properties, QObject *parent void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { painter->save(); - QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); + QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option); switch(index.column()) { case PCSIZE: @@ -78,7 +78,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti break; case PROGRESS: if (index.data().toDouble() >= 0) { - QStyleOptionProgressBarV2 newopt; + QStyleOptionProgressBar newopt; qreal progress = index.data().toDouble() * 100.; newopt.rect = opt.rect; newopt.text = ((progress == 100.0) ? QString("100%") : Utils::String::fromDouble(progress, 1) + "%"); diff --git a/src/gui/search/searchlistdelegate.cpp b/src/gui/search/searchlistdelegate.cpp index a8ae79dca..646eb8344 100644 --- a/src/gui/search/searchlistdelegate.cpp +++ b/src/gui/search/searchlistdelegate.cpp @@ -28,7 +28,7 @@ * Contact : chris@qbittorrent.org */ -#include +#include #include #include #include @@ -46,7 +46,7 @@ void SearchListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op { painter->save(); - QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); + QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option); switch(index.column()) { case SearchSortModel::SIZE: QItemDelegate::drawBackground(painter, opt, index); diff --git a/src/gui/transferlistdelegate.cpp b/src/gui/transferlistdelegate.cpp index c23141a0e..be5b0bd1c 100644 --- a/src/gui/transferlistdelegate.cpp +++ b/src/gui/transferlistdelegate.cpp @@ -31,7 +31,7 @@ #include "transferlistdelegate.h" #include -#include +#include #include #include #include "base/utils/misc.h" @@ -67,7 +67,7 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem } const bool hideValues = Preferences::instance()->getHideZeroValues() & isHideState; - QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); + QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option); QItemDelegate::drawBackground(painter, opt, index); switch (index.column()) { case TorrentModel::TR_AMOUNT_DOWNLOADED: @@ -162,7 +162,7 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem break; } case TorrentModel::TR_PROGRESS: { - QStyleOptionProgressBarV2 newopt; + QStyleOptionProgressBar newopt; qreal progress = index.data().toDouble() * 100.; newopt.rect = opt.rect; newopt.text = ((progress == 100.0) ? QString("100%") : Utils::String::fromDouble(progress, 1) + "%");