diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-27 18:41:24 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-27 18:41:24 +0100 |
commit | f74c888ae8d0c04d9b1d944fe61dc9a7e86b5420 (patch) | |
tree | 3bd16bce5d4ae8bc4bf185742cf21af890b7bbdf /src | |
parent | a01f770f1d64770f8a81a53b812d1e086916fff2 (diff) | |
parent | 949884153ae14724c30f17c75656aa0c6f072559 (diff) | |
download | qtquickcontrols-f74c888ae8d0c04d9b1d944fe61dc9a7e86b5420.tar.gz |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I4b1a4ebf258c9d31e537f42c8d0219c4294628bb
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 8 | ||||
-rw-r--r-- | src/controls/doc/src/qtquickcontrols-index.qdoc | 9 | ||||
-rw-r--r-- | src/controls/plugin.cpp | 13 | ||||
-rw-r--r-- | src/controls/qquickmenu.cpp | 5 | ||||
-rw-r--r-- | src/dialogs/doc/src/qtquickdialogs-index.qdoc | 10 | ||||
-rw-r--r-- | src/extras/doc/src/qtquickextras-index.qdoc | 9 | ||||
-rw-r--r-- | src/extras/plugin.cpp | 10 | ||||
-rw-r--r-- | src/extras/plugin.h | 1 |
8 files changed, 44 insertions, 21 deletions
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index d1b172e0..9da43ce5 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -369,6 +369,7 @@ Style { property int hoveredCellIndex: -1 property int pressedCellIndex: -1 property int pressCellIndex: -1 + property var pressDate: null Rectangle { anchors.fill: parent @@ -581,9 +582,11 @@ Style { onPressed: { pressCellIndex = cellIndexAt(mouse.x, mouse.y); + pressDate = null; if (pressCellIndex !== -1) { var date = view.model.dateAt(pressCellIndex); pressedCellIndex = pressCellIndex; + pressDate = date; if (__isValidDate(date)) { control.selectedDate = date; control.pressed(date); @@ -608,9 +611,8 @@ Style { onClicked: { var indexOfCell = cellIndexAt(mouse.x, mouse.y); if (indexOfCell !== -1 && indexOfCell === pressCellIndex) { - var date = view.model.dateAt(indexOfCell); - if (__isValidDate(date)) - control.clicked(date); + if (__isValidDate(pressDate)) + control.clicked(pressDate); } } diff --git a/src/controls/doc/src/qtquickcontrols-index.qdoc b/src/controls/doc/src/qtquickcontrols-index.qdoc index 63753ae1..28bc3644 100644 --- a/src/controls/doc/src/qtquickcontrols-index.qdoc +++ b/src/controls/doc/src/qtquickcontrols-index.qdoc @@ -54,6 +54,15 @@ Types that can be used to build menus. \annotatedlist menus + \section1 Licenses and Attributions + + The Qt Quick Controls module is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under free software licenses. Since Qt 5.4, + these free software licenses are + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + \section1 Related information \list diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index f78098ec..4eb6c466 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -149,11 +149,6 @@ void QtQuickControls1Plugin::registerTypes(const char *uri) const QString filesLocation = fileLocation(); for (int i = 0; i < int(sizeof(qmldir)/sizeof(qmldir[0])); i++) qmlRegisterType(QUrl(filesLocation + "/" + qmldir[i].type + ".qml"), uri, qmldir[i].major, qmldir[i].minor, qmldir[i].type); -} - -void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri) -{ - Q_UNUSED(uri); // Register private API. Note that to use these types outside of the // Qt Quick Controls module, both the public and private imports must be used. @@ -185,6 +180,14 @@ void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *ur #ifdef QT_WIDGETS_LIB qmlRegisterType<QQuickStyleItem1>(private_uri, 1, 0, "StyleItem"); +#endif +} + +void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri) +{ + Q_UNUSED(uri); + +#ifdef QT_WIDGETS_LIB engine->addImageProvider("__tablerow", new QQuickTableRowImageProvider1); #endif engine->addImageProvider("desktoptheme", new QQuickDesktopIconProvider1); diff --git a/src/controls/qquickmenu.cpp b/src/controls/qquickmenu.cpp index d309b67e..3c6d91ef 100644 --- a/src/controls/qquickmenu.cpp +++ b/src/controls/qquickmenu.cpp @@ -45,6 +45,7 @@ #include <qdebug.h> #include <qabstractitemmodel.h> #include <qcursor.h> +#include <private/qhighdpiscaling_p.h> #include <private/qguiapplication_p.h> #include <QtGui/qpa/qplatformtheme.h> #include <QtGui/qpa/qplatformmenu.h> @@ -456,7 +457,9 @@ void QQuickMenu1::__popup(const QRectF &targetRect, int atItemIndex, MenuType me } globalTargetRect.translate(renderOffset); m_platformMenu->setMenuType(QPlatformMenu::MenuType(menuType)); - m_platformMenu->showPopup(parentWindow, globalTargetRect.toRect(), atItem ? atItem->platformItem() : 0); + m_platformMenu->showPopup(parentWindow, + QHighDpi::toNativePixels(globalTargetRect.toRect(), parentWindow), + atItem ? atItem->platformItem() : 0); } else { m_popupWindow = new QQuickMenuPopupWindow1(this); if (visualItem()) diff --git a/src/dialogs/doc/src/qtquickdialogs-index.qdoc b/src/dialogs/doc/src/qtquickdialogs-index.qdoc index 7404dac9..f7fb245c 100644 --- a/src/dialogs/doc/src/qtquickdialogs-index.qdoc +++ b/src/dialogs/doc/src/qtquickdialogs-index.qdoc @@ -37,6 +37,15 @@ \annotatedlist qtquickdialogs + \section1 Licenses and Attributions + + The Qt Quick Dialogs module is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under free software licenses. Since Qt 5.4, + these free software licenses are + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + \section1 Related information \section2 Examples @@ -48,6 +57,5 @@ \list \li \l{Qt Quick Dialogs QML Types}{QML Types} \endlist - */ diff --git a/src/extras/doc/src/qtquickextras-index.qdoc b/src/extras/doc/src/qtquickextras-index.qdoc index 43d78590..4bc2e1da 100644 --- a/src/extras/doc/src/qtquickextras-index.qdoc +++ b/src/extras/doc/src/qtquickextras-index.qdoc @@ -44,6 +44,15 @@ the user. \annotatedlist extras + \section1 Licenses and Attributions + + The Qt Quick Extras module is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under free software licenses. Since Qt 5.4, + these free software licenses are + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + \section1 Related information \list diff --git a/src/extras/plugin.cpp b/src/extras/plugin.cpp index 5133a4ac..68d6ca16 100644 --- a/src/extras/plugin.cpp +++ b/src/extras/plugin.cpp @@ -99,22 +99,12 @@ void QtQuickExtrasPlugin::registerTypes(const char *uri) #if QT_CONFIG(picture) qmlRegisterType<QQuickPicture>(uri, 1, 4, "Picture"); #endif -} -void QtQuickExtrasPlugin::initializeEngine(QQmlEngine *engine, const char *uri) -{ - Q_UNUSED(uri); - Q_UNUSED(engine); qmlRegisterType<QQuickMouseThief>("QtQuick.Extras.Private.CppUtils", 1, 0, "MouseThief"); qmlRegisterType<QQuickCircularProgressBar>("QtQuick.Extras.Private.CppUtils", 1, 1, "CircularProgressBar"); qmlRegisterType<QQuickFlatProgressBar>("QtQuick.Extras.Private.CppUtils", 1, 1, "FlatProgressBar"); qmlRegisterSingletonType<QQuickMathUtils>("QtQuick.Extras.Private.CppUtils", 1, 0, "MathUtils", registerMathUtilsSingleton); -#ifndef QT_STATIC - const QString prefix = baseUrl().toString(); -#else - const QString prefix = "qrc:/qt-project.org/imports/QtQuick/Extras"; -#endif const char *private_uri = "QtQuick.Extras.Private"; qmlRegisterType(QUrl(prefix + "/Private/CircularButton.qml"), private_uri, 1, 0, "CircularButton"); qmlRegisterType(QUrl(prefix + "/Private/CircularButtonStyleHelper.qml"), private_uri, 1, 0, "CircularButtonStyleHelper"); diff --git a/src/extras/plugin.h b/src/extras/plugin.h index 05855f49..5f0a380e 100644 --- a/src/extras/plugin.h +++ b/src/extras/plugin.h @@ -54,7 +54,6 @@ public: explicit QtQuickExtrasPlugin(QObject *parent = 0); void registerTypes(const char *uri); - void initializeEngine(QQmlEngine *engine, const char *uri); }; QT_END_NAMESPACE |