aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-22 08:58:37 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-22 09:59:37 +0000
commitf1eef22d0d1ddcc2ee48e45e522788eb97f429b0 (patch)
tree7f73763f338864a487c2d4980790f49975389e91 /src/quicktemplates2
parentab91c57135f7a86437a5a4341cd32df1d4682480 (diff)
Revert "Popup: expose flip API"
This reverts commit 09706e8f9fc481d848a3616cace58baf5bc8b67c. It was a bit rushed to expose the allow*Flip properties. We have now added several other similar internal allowFooBar flags, so clearly a more sustainable solution is to craft some kind of horizontal and vertical sizing/positioning policies out of them. So, remove this unreleased API while we still can, so we don't have to deprecate it right away. Conflicts: src/imports/templates/qtquicktemplates2plugin.cpp Change-Id: Iea33c11805071499b472b18426bbdc8d871a4a58 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp2
-rw-r--r--src/quicktemplates2/qquickpopup.cpp58
-rw-r--r--src/quicktemplates2/qquickpopup_p.h10
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp5
4 files changed, 4 insertions, 71 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index 07d7d126..4ae78a01 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -688,7 +688,7 @@ void QQuickComboBox::setPopup(QQuickPopup *popup)
d->deleteDelegate(d->popup);
if (popup) {
- popup->setAllowVerticalFlip(true);
+ QQuickPopupPrivate::get(popup)->allowVerticalFlip = true;
popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
}
d->popup = popup;
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 1a5310bf..d2625c3e 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -1386,64 +1386,6 @@ void QQuickPopup::resetBottomPadding()
}
/*!
- \since QtQuick.Controls 2.1
- \qmlproperty bool QtQuick.Controls::Popup::allowVerticalFlip
-
- This property holds whether the popup is allowed to flip vertically.
-
- A popup can be flipped from above its parent item to below it, or vice
- versa, in order to make the popup fit inside the window.
-
- The default value is \c false.
-
- \sa allowHorizontalFlip
-*/
-bool QQuickPopup::allowVerticalFlip() const
-{
- Q_D(const QQuickPopup);
- return d->allowVerticalFlip;
-}
-
-void QQuickPopup::setAllowVerticalFlip(bool allow)
-{
- Q_D(QQuickPopup);
- if (d->allowVerticalFlip == allow)
- return;
-
- d->allowVerticalFlip = allow;
- emit allowVerticalFlipChanged();
-}
-
-/*!
- \since QtQuick.Controls 2.1
- \qmlproperty bool QtQuick.Controls::Popup::allowHorizontalFlip
-
- This property holds whether the popup is allowed to flip horizontally.
-
- A popup can be flipped from the left side of its parent item to the right
- side, or vice versa, in order to make the popup fit inside the window.
-
- The default value is \c false.
-
- \sa allowVerticalFlip
-*/
-bool QQuickPopup::allowHorizontalFlip() const
-{
- Q_D(const QQuickPopup);
- return d->allowHorizontalFlip;
-}
-
-void QQuickPopup::setAllowHorizontalFlip(bool allow)
-{
- Q_D(QQuickPopup);
- if (d->allowHorizontalFlip == allow)
- return;
-
- d->allowHorizontalFlip = allow;
- emit allowHorizontalFlipChanged();
-}
-
-/*!
\qmlproperty Locale QtQuick.Controls::Popup::locale
This property holds the locale of the popup.
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h
index 5f5fd6bd..9ef5c64b 100644
--- a/src/quicktemplates2/qquickpopup_p.h
+++ b/src/quicktemplates2/qquickpopup_p.h
@@ -94,8 +94,6 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml
Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged FINAL)
Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged FINAL)
Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL)
- Q_PROPERTY(bool allowVerticalFlip READ allowVerticalFlip WRITE setAllowVerticalFlip NOTIFY allowVerticalFlipChanged FINAL REVISION 1)
- Q_PROPERTY(bool allowHorizontalFlip READ allowHorizontalFlip WRITE setAllowHorizontalFlip NOTIFY allowHorizontalFlipChanged FINAL REVISION 1)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
Q_PROPERTY(QQuickItem *parent READ parentItem WRITE setParentItem NOTIFY parentChanged FINAL)
@@ -196,12 +194,6 @@ public:
void setBottomPadding(qreal padding);
void resetBottomPadding();
- bool allowVerticalFlip() const;
- void setAllowVerticalFlip(bool allow);
-
- bool allowHorizontalFlip() const;
- void setAllowHorizontalFlip(bool allow);
-
QLocale locale() const;
void setLocale(const QLocale &locale);
void resetLocale();
@@ -311,8 +303,6 @@ Q_SIGNALS:
void leftPaddingChanged();
void rightPaddingChanged();
void bottomPaddingChanged();
- Q_REVISION(1) void allowVerticalFlipChanged();
- Q_REVISION(1) void allowHorizontalFlipChanged();
void fontChanged();
void localeChanged();
void parentChanged();
diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp
index e49d68a4..27449194 100644
--- a/src/quicktemplates2/qquicktooltip.cpp
+++ b/src/quicktemplates2/qquicktooltip.cpp
@@ -163,8 +163,9 @@ void QQuickToolTipPrivate::stopTimeout()
QQuickToolTip::QQuickToolTip(QQuickItem *parent) :
QQuickPopup(*(new QQuickToolTipPrivate), parent)
{
- setAllowVerticalFlip(true);
- setAllowHorizontalFlip(true);
+ Q_D(QQuickToolTip);
+ d->allowVerticalFlip = true;
+ d->allowHorizontalFlip = true;
}
/*!