[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [konversation] src: Use non-deprecated QStyleOptionXXX classes
From:       Pino Toscano <pino () kde ! org>
Date:       2016-12-03 17:36:34
Message-ID: E1cDEEk-0004qP-Mj () code ! kde ! org
[Download RAW message or body]

Git commit 8a868db9b46de9c35ca739834ccd7d2ef6fd126c by Pino Toscano.
Committed on 03/12/2016 at 17:35.
Pushed by pino into branch 'master'.

Use non-deprecated QStyleOptionXXX classes

All the Vn are simple typedef's in Qt5.

M  +4    -5    src/dcc/transferlistmodel.cpp
M  +1    -1    src/viewer/ircinput.cpp

https://commits.kde.org/konversation/8a868db9b46de9c35ca739834ccd7d2ef6fd126c

diff --git a/src/dcc/transferlistmodel.cpp b/src/dcc/transferlistmodel.cpp
index a4325a2..cc1763f 100644
--- a/src/dcc/transferlistmodel.cpp
+++ b/src/dcc/transferlistmodel.cpp
@@ -124,18 +124,17 @@ namespace Konversation
                     return;
                 }
             }
-            QStyleOptionViewItemV4 _option(option);
-            QStyle* style = _option.widget ? _option.widget->style() : QApplication::style();
-            style->drawPrimitive(QStyle::PE_PanelItemViewItem, &_option, painter, _option.widget);
+            QStyle* style = option.widget ? option.widget->style() : QApplication::style();
+            style->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter, option.widget);
 
             QStyleOptionProgressBar progressBarOption;
-            progressBarOption.rect = _option.rect;
+            progressBarOption.rect = option.rect;
             progressBarOption.minimum = 0;
             progressBarOption.maximum = 100;
             progressBarOption.progress = index.data().toInt();
             progressBarOption.text = QString::number(progressBarOption.progress) + '%';
             progressBarOption.textVisible = true;
-            progressBarOption.state = _option.state;
+            progressBarOption.state = option.state;
 
             style->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter);
         }
diff --git a/src/viewer/ircinput.cpp b/src/viewer/ircinput.cpp
index ef729e0..817ec19 100644
--- a/src/viewer/ircinput.cpp
+++ b/src/viewer/ircinput.cpp
@@ -82,7 +82,7 @@ QSize IRCInput::sizeHint() const
 
     int h = document()->size().toSize().height() - fm.descent() + 2 * frameWidth();
 
-    QStyleOptionFrameV2 opt;
+    QStyleOptionFrame opt;
     opt.initFrom(this);
     opt.rect = QRect(0, 0, 100, h);
     opt.lineWidth = lineWidth();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic