mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 01:24:15 -05:00
Replaced deprecated QStyleOptionProgressBarV2 by QStyleOptionProgressBar and QStyleOptionViewItemV4 by QStyleOptionViewItem
This commit is contained in:
parent
15437c0d2d
commit
3874390de7
3 changed files with 4 additions and 4 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
#include <retroshare/rstypes.h>
|
#include <retroshare/rstypes.h>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOptionProgressBarV2>
|
#include <QStyleOptionProgressBar>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
@ -44,7 +44,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
||||||
{
|
{
|
||||||
QString byteUnits[4] = {tr("B"), tr("KB"), tr("MB"), tr("GB")};
|
QString byteUnits[4] = {tr("B"), tr("KB"), tr("MB"), tr("GB")};
|
||||||
QStyleOptionViewItem opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBar newopt;
|
||||||
QRect pixmapRect;
|
QRect pixmapRect;
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
qlonglong fileSize;
|
qlonglong fileSize;
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ public:
|
||||||
{
|
{
|
||||||
Q_ASSERT(index.isValid());
|
Q_ASSERT(index.isValid());
|
||||||
|
|
||||||
QStyleOptionViewItemV4 opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
initStyleOption(&opt, index);
|
initStyleOption(&opt, index);
|
||||||
// disable default icon
|
// disable default icon
|
||||||
opt.icon = QIcon();
|
opt.icon = QIcon();
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
||||||
{
|
{
|
||||||
QString byteUnits[4] = {tr("B"), tr("KB"), tr("MB"), tr("GB")};
|
QString byteUnits[4] = {tr("B"), tr("KB"), tr("MB"), tr("GB")};
|
||||||
QStyleOptionViewItem opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBar newopt;
|
||||||
QRect pixmapRect;
|
QRect pixmapRect;
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
qlonglong fileSize;
|
qlonglong fileSize;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue