summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-04-20 19:50:15 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-04-21 05:47:02 +0000
commit72b3fa702ab9ea7cc2252ef33a72a791aa032058 (patch)
treeeb2cf1a8c2afa03e9986d851d38f99e07329c435 /src/widgets/widgets
parent38bedf34c9190e3ab7d662eed39a1248698095d8 (diff)
Remove features.rubberband dependency of features.splitter
Change-Id: Ia55850f37f9384c8e00cef699fa308a02af64fd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qsplitter.cpp6
-rw-r--r--src/widgets/widgets/qsplitter_p.h8
2 files changed, 13 insertions, 1 deletions
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 1676c188a6..4c077f5f9f 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -975,7 +975,9 @@ QSplitter::QSplitter(Qt::Orientation orientation, QWidget *parent)
QSplitter::~QSplitter()
{
Q_D(QSplitter);
+#if QT_CONFIG(rubberband)
delete d->rubberBand;
+#endif
while (!d->list.isEmpty())
delete d->list.takeFirst();
}
@@ -1325,6 +1327,7 @@ void QSplitter::childEvent(QChildEvent *c)
void QSplitter::setRubberBand(int pos)
{
+#if QT_CONFIG(rubberband)
Q_D(QSplitter);
if (pos < 0) {
if (d->rubberBand)
@@ -1345,6 +1348,9 @@ void QSplitter::setRubberBand(int pos)
: QRect(QPoint(r.x(), pos + hw / 2 - rBord), QSize(r.width(), 2 * rBord));
d->rubberBand->setGeometry(newGeom);
d->rubberBand->show();
+#else
+ Q_UNUSED(pos);
+#endif
}
/*!
diff --git a/src/widgets/widgets/qsplitter_p.h b/src/widgets/widgets/qsplitter_p.h
index 07b43e56b8..0730fab824 100644
--- a/src/widgets/widgets/qsplitter_p.h
+++ b/src/widgets/widgets/qsplitter_p.h
@@ -81,11 +81,17 @@ class QSplitterPrivate : public QFramePrivate
{
Q_DECLARE_PUBLIC(QSplitter)
public:
- QSplitterPrivate() : rubberBand(0), opaque(true), firstShow(true),
+ QSplitterPrivate() :
+#if QT_CONFIG(rubberband)
+ rubberBand(0),
+#endif
+ opaque(true), firstShow(true),
childrenCollapsible(true), compatMode(false), handleWidth(-1), blockChildAdd(false), opaqueResizeSet(false) {}
~QSplitterPrivate();
+#if QT_CONFIG(rubberband)
QPointer<QRubberBand> rubberBand;
+#endif
mutable QList<QSplitterLayoutStruct *> list;
Qt::Orientation orient;
bool opaque : 8;