aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2020-01-10 09:34:20 +0200
committerRoland Knall <rknall@gmail.com>2020-01-10 08:42:21 +0000
commitbc8140be0bc9dc06e64db3a69b1eb6fa3a0de3a7 (patch)
treec158b8b7ccf5af1f25ceb12c7d68de9e91456572 /ui/qt
parent507bec0f361def9a3224f7e6e664d40342174204 (diff)
Fix build and deprecation warnings with Qt 5.14
Change-Id: I1fa6b5d3105288d25717a9fe4ae93ad3f471aaca Reviewed-on: https://code.wireshark.org/review/35727 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/models/astringlist_list_model.cpp17
-rw-r--r--ui/qt/models/profile_model.cpp2
-rw-r--r--ui/qt/widgets/qcustomplot.cpp4
-rw-r--r--ui/qt/widgets/splash_overlay.cpp2
-rw-r--r--ui/qt/wireshark_application.cpp2
5 files changed, 10 insertions, 17 deletions
diff --git a/ui/qt/models/astringlist_list_model.cpp b/ui/qt/models/astringlist_list_model.cpp
index 9d91fea9b3..2a66071949 100644
--- a/ui/qt/models/astringlist_list_model.cpp
+++ b/ui/qt/models/astringlist_list_model.cpp
@@ -266,19 +266,12 @@ QVariant AStringListListUrlProxyModel::data(const QModelIndex &index, int role)
{
QVariant result = QIdentityProxyModel::data(index, role);
- if (urls_.contains(index.column()))
+ if (role == Qt::ForegroundRole && urls_.contains(index.column())
+ && result.canConvert(QVariant::Brush))
{
- if (role == Qt::ForegroundRole)
- {
- if (result.canConvert(QVariant::Brush))
- {
- QBrush selected = result.value<QBrush>();
- selected.setColor(ColorUtils::themeLinkBrush().color());
- return selected;
- }
- } else if (role == Qt::TextColorRole) {
- return QApplication::palette().link().color();
- }
+ QBrush selected = result.value<QBrush>();
+ selected.setColor(ColorUtils::themeLinkBrush().color());
+ return selected;
}
return result;
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp
index ae6284d0b8..68079b1b00 100644
--- a/ui/qt/models/profile_model.cpp
+++ b/ui/qt/models/profile_model.cpp
@@ -582,7 +582,7 @@ QVariant ProfileModel::data(const QModelIndex &index, int role) const
return dataDisplay(index);
case Qt::FontRole:
return dataFontRole(index);
- case Qt::BackgroundColorRole:
+ case Qt::BackgroundRole:
return dataBackgroundRole(index);
case Qt::ToolTipRole:
return dataToolTipRole(index);
diff --git a/ui/qt/widgets/qcustomplot.cpp b/ui/qt/widgets/qcustomplot.cpp
index cc29e1db5b..972b613886 100644
--- a/ui/qt/widgets/qcustomplot.cpp
+++ b/ui/qt/widgets/qcustomplot.cpp
@@ -657,7 +657,7 @@ QCPPaintBufferPixmap::~QCPPaintBufferPixmap()
QCPPainter *QCPPaintBufferPixmap::startPainting()
{
QCPPainter *result = new QCPPainter(&mBuffer);
- result->setRenderHint(QPainter::HighQualityAntialiasing);
+ result->setRenderHint(QPainter::Antialiasing);
return result;
}
@@ -14738,7 +14738,7 @@ void QCustomPlot::paintEvent(QPaintEvent *event)
QCPPainter painter(this);
if (painter.isActive())
{
- painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
+ painter.setRenderHint(QPainter::Antialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
if (mBackgroundBrush.style() != Qt::NoBrush)
painter.fillRect(mViewport, mBackgroundBrush);
drawBackground(&painter);
diff --git a/ui/qt/widgets/splash_overlay.cpp b/ui/qt/widgets/splash_overlay.cpp
index 0ba729f0bd..92761d4344 100644
--- a/ui/qt/widgets/splash_overlay.cpp
+++ b/ui/qt/widgets/splash_overlay.cpp
@@ -55,7 +55,7 @@ SplashOverlay::SplashOverlay(QWidget *parent) :
QColor bg = QColor(tango_aluminium_6);
bg.setAlphaF(0.2);
QPalette pal;
- pal.setColor(QPalette::Background, bg);
+ pal.setColor(QPalette::Window, bg);
setPalette(pal);
setAutoFillBackground(true);
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index eb56e2f167..bbf2b9c25d 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -616,7 +616,7 @@ void WiresharkApplication::checkForDbar()
// We have a list of context menu handler CLSIDs. Now look for
// offending DLLs.
- foreach (QString clsid, clsids.toList()) {
+ foreach (QString clsid, clsids.values()) {
QString inproc_path = QString("HKEY_CLASSES_ROOT\\CLSID\\%1\\InprocServer32").arg(clsid);
QSettings inproc_reg(inproc_path, QSettings::NativeFormat);
QString inproc_default = inproc_reg.value(".").toString();