[-]
[+]
|
Changed |
_service:tar_git:qtquickcontrols2.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/sailfishos-chum/qtquickcontrols2.git</param>
<param name="branch">main</param>
- <param name="revision">5.15.9+kde5</param>
+ <param name="revision">5.15.10+kde6</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/.qmake.conf
^
|
@@ -5,4 +5,4 @@
QQC2_SOURCE_TREE = $$PWD
-MODULE_VERSION = 5.15.9
+MODULE_VERSION = 5.15.10
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/DialogButtonBox.qml
^
|
@@ -55,6 +55,7 @@
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/fusion/DialogButtonBox.qml
^
|
@@ -56,6 +56,7 @@
delegate: Button { }
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/imagine/DialogButtonBox.qml
^
|
@@ -66,6 +66,7 @@
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/imagine/qquickninepatchimage.cpp
^
|
@@ -439,6 +439,8 @@
QSizeF sz = size();
QImage image = d->pix.image();
if (!sz.isValid() || image.isNull()) {
+ if (d->provider)
+ d->provider->updateTexture(nullptr);
delete oldNode;
return nullptr;
}
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/material/DialogButtonBox.qml
^
|
@@ -60,6 +60,7 @@
delegate: Button { flat: true }
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/controls/universal/DialogButtonBox.qml
^
|
@@ -59,6 +59,7 @@
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/imports/platform/qquickplatformfiledialog.cpp
^
|
@@ -552,8 +552,14 @@
QUrl url = file;
const QString path = url.path();
const QString suffix = m_options->defaultSuffix();
- if (!suffix.isEmpty() && !path.endsWith(QLatin1Char('/')) && path.lastIndexOf(QLatin1Char('.')) == -1)
+ // Urls with "content" scheme do not require suffixes. Such schemes are
+ // used on Android.
+ const bool isContentScheme = url.scheme() == QStringLiteral("content");
+ if (!isContentScheme && !suffix.isEmpty() && !path.endsWith(QLatin1Char('/'))
+ && path.lastIndexOf(QLatin1Char('.')) == -1) {
url.setPath(path + QLatin1Char('.') + suffix);
+ }
+
return url;
}
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/quicktemplates2/qquickcontrol.cpp
^
|
@@ -179,9 +179,10 @@
// If the control is on a Flickable that has a pressDelay, then the press is never
// sent as a touch event, therefore we need to check for this case.
- if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased &&
- point.pos() == previousPressPos) {
- return true;
+ if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased) {
+ const auto delta = QVector2D(point.pos() - previousPressPos);
+ if (!QQuickWindowPrivate::dragOverThreshold(delta))
+ return true;
}
return false;
}
@@ -2326,12 +2327,13 @@
void QQuickControl::accessibilityActiveChanged(bool active)
{
+ Q_D(QQuickControl);
if (!active)
return;
QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(this, true));
Q_ASSERT(accessibleAttached);
- accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->setRole(d->effectiveAccessibleRole());
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/quicktemplates2/qquicklabel.cpp
^
|
@@ -263,7 +263,7 @@
Q_Q(QQuickLabel);
QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
Q_ASSERT(accessibleAttached);
- accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->setRole(effectiveAccessibleRole());
maybeSetAccessibleName(text);
}
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/quicktemplates2/qquicktextarea.cpp
^
|
@@ -512,7 +512,7 @@
Q_Q(QQuickTextArea);
QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
Q_ASSERT(accessibleAttached);
- accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->setRole(effectiveAccessibleRole());
accessibleAttached->set_readOnly(q->isReadOnly());
accessibleAttached->setDescription(placeholder);
}
@@ -1086,7 +1086,11 @@
if (d->flickable)
clipper = d->flickable;
- const QRectF cr = clipper->clipRect().adjusted(leftPadding(), topPadding(), -rightPadding(), -bottomPadding());
+ const QRectF cr = clipper->clipRect().adjusted(
+ leftPadding(), topPadding(),
+ (!d->cursorItem && effectiveHAlign() == HAlignment::AlignRight ? 1 : 0) - rightPadding(),
+ -bottomPadding());
+
clipNode->setRect(!d->flickable ? cr : cr.translated(d->flickable->contentX(), d->flickable->contentY()));
clipNode->update();
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/src/quicktemplates2/qquicktextfield.cpp
^
|
@@ -359,7 +359,7 @@
Q_Q(QQuickTextField);
QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
Q_ASSERT(accessibleAttached);
- accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->setRole(effectiveAccessibleRole());
accessibleAttached->set_readOnly(m_readOnly);
accessibleAttached->set_passwordEdit((m_echoMode == QQuickTextField::Password || m_echoMode == QQuickTextField::PasswordEchoOnEdit) ? true : false);
accessibleAttached->setDescription(placeholder);
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/tests/auto/controls/data/tst_dialogbuttonbox.qml
^
|
@@ -398,7 +398,7 @@
// QTBUG-72886
function test_changeCustomButtonText(data) {
- var control = createTemporaryObject(customButtonBox, testCase, {})
+ var control = createTemporaryObject(data.component, testCase, {})
verify(control)
var listView = control.contentItem
@@ -410,6 +410,88 @@
// The button should never go outside of the box.
tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
+ 1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
+ ", but it's " + button.mapToItem(control, 0, 0).x)
+ tryVerify(function() { return button.mapToItem(control, 0, 0).x + button.width <= control.width },
+ 1000, "Expected right edge of button to be within right edge of DialogButtonBox (i.e. less than or equal to " +
+ control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
+ }
+
+ Component {
+ id: customButtonBoxInDialog
+
+ Dialog {
+ width: 300
+ visible: true
+
+ footer: DialogButtonBox {
+ objectName: "customButtonBoxInDialog"
+ alignment: Qt.AlignRight
+
+ property alias okButton: okButton
+
+ Button {
+ id: okButton
+ text: "OK"
+
+ DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
+ }
+ }
+ }
+ }
+
+ Component {
+ id: customButtonBoxTwoButtonsInDialog
+
+ Dialog {
+ width: 300
+ visible: true
+
+ footer: DialogButtonBox {
+ objectName: "customButtonBoxTwoButtonsInDialog"
+ alignment: Qt.AlignRight
+
+ property alias okButton: okButton
+
+ Button {
+ id: okButton
+ text: "OK"
+
+ DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
+ }
+ Button {
+ text: "Cancel"
+
+ DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
+ }
+ }
+ }
+ }
+
+ function test_changeCustomButtonImplicitWidth_data() {
+ return [
+ { tag: "oneButton", component: customButtonBoxInDialog },
+ { tag: "twoButtons", component: customButtonBoxTwoButtonsInDialog },
+ ]
+ }
+
+ // QTBUG-102558
+ function test_changeCustomButtonImplicitWidth(data) {
+ let dialog = createTemporaryObject(data.component, testCase, {})
+ verify(dialog)
+
+ let control = dialog.footer
+ verify(control)
+
+ let listView = control.contentItem
+ waitForRendering(listView)
+
+ let button = control.okButton
+ verify(button)
+ button.implicitWidth *= 1.5
+
+ // The button should never go outside of the box.
+ tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
", but it's " + button.mapToItem(control, 0, 0).x)
tryVerify(function() { return button.mapToItem(control, 0, 0).x + button.width <= control.width },
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
^
|
@@ -98,9 +98,12 @@
QSignalSpy buttonClickedSpy(button, SIGNAL(clicked()));
QVERIFY(buttonClickedSpy.isValid());
- QTest::touchEvent(window, touchDevice.data()).press(0, QPoint(button->width() / 2, button->height() / 2));
+ QPoint p(button->width() / 2, button->height() / 2);
+ QTest::touchEvent(window, touchDevice.data()).press(0, p);
QTRY_COMPARE(buttonPressedSpy.count(), 1);
- QTest::touchEvent(window, touchDevice.data()).release(0, QPoint(button->width() / 2, button->height() / 2));
+ p += QPoint(1, 1); // less than the drag threshold
+ QTest::touchEvent(window, touchDevice.data()).move(0, p);
+ QTest::touchEvent(window, touchDevice.data()).release(0, p);
QTRY_COMPARE(buttonReleasedSpy.count(), 1);
QTRY_COMPARE(buttonClickedSpy.count(), 1);
}
|
[-]
[+]
|
Changed |
_service:tar_git:opt-qt5-qtquickcontrols2-5.15.10+kde6.tar.bz2/upstream/tests/auto/qquickimaginestyle/data/tst_imagine.qml
^
|
@@ -153,4 +153,60 @@
// Shouldn't result in a crash.
afterRenderingSpy.wait(1000)
}
+
+ Component {
+ id: invalidNinePatchImageProvider
+ Item {
+ width: 200
+ height: 200
+ property alias ninePatchImage: np
+
+ NinePatchImage {
+ id: np
+ source : "qrc:/test-assets/button-background-1.png"
+ cache: false
+ visible: false
+ }
+ ShaderEffect {
+ width: 300
+ height: 300
+ property variant src: np
+ vertexShader: "
+ uniform highp mat4 qt_Matrix;
+ attribute highp vec4 qt_Vertex;
+ attribute highp vec2 qt_MultiTexCoord0;
+ varying highp vec2 coord;
+ void main() {
+ coord = qt_MultiTexCoord0;
+ gl_Position = qt_Matrix * qt_Vertex;
+ }"
+ fragmentShader: "
+ varying highp vec2 coord;
+ uniform sampler2D src;
+ uniform lowp float qt_Opacity;
+ void main() {
+ lowp vec4 tex = texture2D(src, coord);
+ gl_FragColor = vec4(vec3(dot(tex.rgb,
+ vec3(0.344, 0.5, 0.156))),
+ tex.a) * qt_Opacity;
+ }"
+ }
+ }
+ }
+
+ function test_invalidNinePatchImageProvide() {
+ var container = createTemporaryObject(invalidNinePatchImageProvider, testCase)
+ verify(container);
+
+ var afterRenderingSpy = signalSpyComponent.createObject(null,
+ { target: testCase.Window.window, signalName: "afterRendering" })
+ verify(afterRenderingSpy.valid)
+
+ afterRenderingSpy.wait(100)
+ container.ninePatchImage.source = ""
+ testCase.Window.window.update()
+ // Shouldn't result in a crash.
+ wait(10)
+ afterRenderingSpy.wait(100)
+ }
}
|