Remove features.rubberband dependency of features.splitter
Change-Id: Ia55850f37f9384c8e00cef699fa308a02af64fd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
38bedf34c9
commit
72b3fa702a
@ -160,7 +160,6 @@
|
||||
"label": "QSplitter",
|
||||
"purpose": "Provides user controlled splitter widgets.",
|
||||
"section": "Widgets",
|
||||
"condition": "features.rubberband",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"widgettextcontrol": {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user