digikam/Fix-compilation-with-Qt-5.6.patch

110 lines
4.8 KiB
Diff
Raw Normal View History

From dbc7b17f4d61fda327f273e30a85c8d59c913a16 Mon Sep 17 00:00:00 2001
From: Gilles Caulier <caulier.gilles@gmail.com>
Date: Wed, 17 Apr 2019 11:21:18 +0200
Subject: [PATCH] fix compilation with Qt 5.6 REVIEW: D20632
---
core/libs/dimg/filters/curves/curvesbox.cpp | 20 ++++++++++----------
core/libs/dimg/filters/curves/curvesbox.h | 10 +++++++---
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/core/libs/dimg/filters/curves/curvesbox.cpp b/core/libs/dimg/filters/curves/curvesbox.cpp
index d8a534d9aa..be64ac1976 100644
--- a/core/libs/dimg/filters/curves/curvesbox.cpp
+++ b/core/libs/dimg/filters/curves/curvesbox.cpp
@@ -146,16 +146,16 @@ void CurvesBox::setup()
// -------------------------------------------------------------
- QWidget* const typeBox = new QWidget();
+ QWidget* const typeBox = new QWidget();
- d->curveFree = new QToolButton;
+ d->curveFree = new QToolButton;
d->curveFree->setIcon(QPixmap(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/curvefree.png"))));
d->curveFree->setCheckable(true);
d->curveFree->setToolTip(i18n("Curve free mode"));
d->curveFree->setWhatsThis(i18n("With this button, you can draw your curve free-hand "
"with the mouse."));
- d->curveSmooth = new QToolButton;
+ d->curveSmooth = new QToolButton;
d->curveSmooth->setIcon(QPixmap(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/curvemooth.png"))));
d->curveSmooth->setCheckable(true);
d->curveSmooth->setToolTip(i18n("Curve smooth mode"));
@@ -228,9 +228,9 @@ void CurvesBox::setup()
"First option will reset current channel. "
"Second option will reset all channels."));
- QMenu* const resetMenu = new QMenu(i18n("&Reset"), d->resetButton);
- d->resetChannelAction = new QAction(i18n("Reset &Channel"));
- d->resetChannelsAction = new QAction(i18n("Reset &All"));
+ QMenu* const resetMenu = new QMenu(i18n("&Reset"), d->resetButton);
+ d->resetChannelAction = new QAction(i18n("Reset &Channel"), nullptr);
+ d->resetChannelsAction = new QAction(i18n("Reset &All"), nullptr);
resetMenu->addAction(d->resetChannelAction);
resetMenu->addAction(d->resetChannelsAction);
@@ -268,10 +268,10 @@ void CurvesBox::setup()
connect(d->curveType, SIGNAL(buttonClicked(int)),
this, SLOT(slotCurveTypeChanged(int)));
- connect(d->resetChannelAction, SIGNAL(triggered()),
+ connect(d->resetChannelAction, SIGNAL(triggered()),
this, SLOT(slotResetChannel()));
- connect(d->resetChannelsAction, SIGNAL(triggered()),
+ connect(d->resetChannelsAction, SIGNAL(triggered()),
this, SLOT(slotResetChannels()));
}
@@ -358,7 +358,7 @@ void CurvesBox::setChannel(ChannelType channel)
{
case RedChannel:
d->hGradient->setColors(QColor("black"), QColor("red"));
- d->vGradient->setColors(QColor("red"), QColor("black"));
+ d->vGradient->setColors(QColor("red"), QColor("black"));
break;
case GreenChannel:
@@ -368,7 +368,7 @@ void CurvesBox::setChannel(ChannelType channel)
case BlueChannel:
d->hGradient->setColors(QColor("black"), QColor("blue"));
- d->vGradient->setColors(QColor("blue"), QColor("black"));
+ d->vGradient->setColors(QColor("blue"), QColor("black"));
break;
default:
diff --git a/core/libs/dimg/filters/curves/curvesbox.h b/core/libs/dimg/filters/curves/curvesbox.h
index 752395b1e5..6a073ff7ab 100644
--- a/core/libs/dimg/filters/curves/curvesbox.h
+++ b/core/libs/dimg/filters/curves/curvesbox.h
@@ -51,8 +51,8 @@ public:
enum ColorPicker
{
- NoPicker = -1,
- BlackTonal = 0,
+ NoPicker = -1,
+ BlackTonal = 0,
GrayTonal,
WhiteTonal
};
@@ -65,7 +65,11 @@ public:
public:
- CurvesBox(int w, int h, QWidget* const parent=0, bool readOnly=false);
+ CurvesBox(int w, int h, // Widget size.
+ QWidget* const parent=0, // Parent widget instance.
+ bool readOnly=false); // If true : widget with full edition mode capabilities.
+ // If false : display curve data only without edition.
+
CurvesBox(int w, int h, // Widget size.
const DImg& img, // Image data.
QWidget* const parent=0, // Parent widget instance.
--
2.16.4