summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/controls/Label.qml2
-rw-r--r--src/controls/Private/qquicktooltip.cpp9
-rw-r--r--tests/auto/controls/data/tst_label.qml11
4 files changed, 19 insertions, 5 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 061f0bbb..fa9dae13 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += warning_clean
android|ios|qnx|winrt|isEmpty(QT.widgets.name): CONFIG += no_desktop
-MODULE_VERSION = 5.9.1
+MODULE_VERSION = 5.9.2
diff --git a/src/controls/Label.qml b/src/controls/Label.qml
index f9bc8cdd..ea3f27b3 100644
--- a/src/controls/Label.qml
+++ b/src/controls/Label.qml
@@ -37,7 +37,7 @@
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.6
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
diff --git a/src/controls/Private/qquicktooltip.cpp b/src/controls/Private/qquicktooltip.cpp
index c8eb81f6..88a82e6c 100644
--- a/src/controls/Private/qquicktooltip.cpp
+++ b/src/controls/Private/qquicktooltip.cpp
@@ -44,9 +44,12 @@
#include <qpa/qplatformintegration.h>
#include <QtQuick/QQuickRenderControl>
-#if defined(QT_WIDGETS_LIB) && !defined(QT_NO_TOOLTIP)
+#if defined(QT_WIDGETS_LIB)
+#include <QtWidgets/qtwidgetsglobal.h>
+#if QT_CONFIG(tooltip)
#include <qtooltip.h>
#endif
+#endif
QT_BEGIN_NAMESPACE
@@ -60,7 +63,7 @@ void QQuickTooltip1::showText(QQuickItem *item, const QPointF &pos, const QStrin
{
if (!item || !item->window())
return;
-#if defined(QT_WIDGETS_LIB) && !defined(QT_NO_TOOLTIP)
+#if defined(QT_WIDGETS_LIB) && QT_CONFIG(tooltip)
if (QGuiApplicationPrivate::platformIntegration()->
hasCapability(QPlatformIntegration::MultipleWindows) &&
QCoreApplication::instance()->inherits("QApplication")) {
@@ -80,7 +83,7 @@ void QQuickTooltip1::showText(QQuickItem *item, const QPointF &pos, const QStrin
void QQuickTooltip1::hideText()
{
-#if defined(QT_WIDGETS_LIB) && !defined(QT_NO_TOOLTIP)
+#if defined(QT_WIDGETS_LIB) && QT_CONFIG(tooltip)
QToolTip::hideText();
#endif
}
diff --git a/tests/auto/controls/data/tst_label.qml b/tests/auto/controls/data/tst_label.qml
index e5c53a52..145c7f14 100644
--- a/tests/auto/controls/data/tst_label.qml
+++ b/tests/auto/controls/data/tst_label.qml
@@ -69,6 +69,17 @@ TestCase {
label.destroy()
}
+ function test_textPaddings() {
+ var label = Qt.createQmlObject('import QtQuick.Controls 1.2; Label { leftPadding: 2; rightPadding: 2; topPadding: 2; bottomPadding: 2 }', testCase, '');
+
+ compare(label.leftPadding, 2)
+ compare(label.rightPadding, 2)
+ compare(label.topPadding, 2)
+ compare(label.bottomPadding, 2)
+
+ label.destroy()
+ }
+
function test_activeFocusOnTab() {
if (Qt.styleHints.tabFocusBehavior != Qt.TabFocusAllControls)
skip("This function doesn't support NOT iterating all.")