Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112531
D55.1732329538.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D55.1732329538.diff
View Options
diff --git a/src/contents/ui/ConfirmUploadPopup.qml b/src/contents/ui/ConfirmUploadPopup.qml
--- a/src/contents/ui/ConfirmUploadPopup.qml
+++ b/src/contents/ui/ConfirmUploadPopup.qml
@@ -32,7 +32,7 @@
}
ColumnLayout {
- Layout.preferredWidth: Kirigami.Units.gridUnit * 10
+ Layout.preferredWidth: Kirigami.Units.gridUnit * 40
Label {
text: (
confirmUploadPopup.total === 1
diff --git a/src/tests/quick-tests/tst_ConfirmUploadPopup.qml b/src/tests/quick-tests/tst_ConfirmUploadPopup.qml
--- a/src/tests/quick-tests/tst_ConfirmUploadPopup.qml
+++ b/src/tests/quick-tests/tst_ConfirmUploadPopup.qml
@@ -8,14 +8,14 @@
import QtQuick.Layouts 1.15
import QtTest 1.0
import org.kde.kirigami 2.20 as Kirigami
-
+import moe.kazv.mxc.kazv 0.0 as MK
import '../../contents/ui' as Kazv
import 'test-helpers.js' as Helpers
import 'test-helpers' as TestHelpers
Item {
id: item
- width: 800
+ width: Kirigami.Units.gridUnit * 40
height: 600
property var l10n: Helpers.fluentMock
@@ -33,6 +33,14 @@
}
}
+ function isSheetOpen(sheet) {
+ if (MK.KazvUtil.kfQtMajorVersion === 5) {
+ return sheet.sheetOpen;
+ } else {
+ return sheet.opened;
+ }
+ }
+
TestCase {
id: confirmUploadPopupTest
name: 'ConfirmUploadPopupTest'
@@ -45,32 +53,38 @@
function test_singleUpload() {
confirmUploadPopup.call(['file:///tmp/image.png']);
- tryVerify(() => confirmUploadPopup.sheetOpen);
- confirmUploadPopup.contentItem.parent = item;
+ tryVerify(() => isSheetOpen(confirmUploadPopup));
+ if (MK.KazvUtil.kfQtMajorVersion === 5) {
+ confirmUploadPopup.contentItem.parent = item;
+ }
tryVerify(() => findChild(confirmUploadPopup, 'imagePreview').visible);
mouseClick(findChild(confirmUploadPopup, 'acceptButton'));
- tryVerify(() => !confirmUploadPopup.sheetOpen);
+ tryVerify(() => !isSheetOpen(confirmUploadPopup));
verify(confirmUploadPopup._uploadRequestedCalled === 1);
verify(confirmUploadPopup._uploadRequestedLastUrl === 'file:///tmp/image.png');
}
function test_singleUploadCancelled() {
confirmUploadPopup.call(['file:///tmp/image.png']);
- tryVerify(() => confirmUploadPopup.sheetOpen);
- confirmUploadPopup.contentItem.parent = item;
+ tryVerify(() => isSheetOpen(confirmUploadPopup));
+ if (MK.KazvUtil.kfQtMajorVersion === 5) {
+ confirmUploadPopup.contentItem.parent = item;
+ }
tryVerify(() => findChild(confirmUploadPopup, 'imagePreview').visible);
mouseClick(findChild(confirmUploadPopup, 'cancelButton'));
- tryVerify(() => !confirmUploadPopup.sheetOpen);
+ tryVerify(() => !isSheetOpen(confirmUploadPopup));
verify(confirmUploadPopup._uploadRequestedCalled === 0);
}
function test_multiUpload() {
confirmUploadPopup.call(['file:///tmp/image.png', 'file:///tmp/a.txt']);
- tryVerify(() => confirmUploadPopup.sheetOpen);
- confirmUploadPopup.contentItem.parent = item;
+ tryVerify(() => isSheetOpen(confirmUploadPopup));
+ if (MK.KazvUtil.kfQtMajorVersion === 5) {
+ confirmUploadPopup.contentItem.parent = item;
+ }
tryVerify(() => findChild(confirmUploadPopup, 'imagePreview').visible);
mouseClick(findChild(confirmUploadPopup, 'acceptButton'));
- verify(confirmUploadPopup.sheetOpen);
+ verify(isSheetOpen(confirmUploadPopup));
tryVerify(() => !findChild(confirmUploadPopup, 'imagePreview').visible);
verify(confirmUploadPopup._uploadRequestedCalled === 1);
@@ -78,18 +92,20 @@
verify(confirmUploadPopup.currentIndex === 1);
mouseClick(findChild(confirmUploadPopup, 'acceptButton'));
- tryVerify(() => !confirmUploadPopup.sheetOpen);
+ tryVerify(() => !isSheetOpen(confirmUploadPopup));
verify(confirmUploadPopup._uploadRequestedCalled === 2);
verify(confirmUploadPopup._uploadRequestedLastUrl === 'file:///tmp/a.txt');
}
function test_multiUploadCancelled() {
confirmUploadPopup.call(['file:///tmp/image.png', 'file:///tmp/a.txt']);
- tryVerify(() => confirmUploadPopup.sheetOpen);
- confirmUploadPopup.contentItem.parent = item;
+ tryVerify(() => isSheetOpen(confirmUploadPopup));
+ if (MK.KazvUtil.kfQtMajorVersion === 5) {
+ confirmUploadPopup.contentItem.parent = item;
+ }
tryVerify(() => findChild(confirmUploadPopup, 'imagePreview').visible);
mouseClick(findChild(confirmUploadPopup, 'cancelButton'));
- tryVerify(() => !confirmUploadPopup.sheetOpen);
+ tryVerify(() => !isSheetOpen(confirmUploadPopup));
verify(confirmUploadPopup._uploadRequestedCalled === 0);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 6:38 PM (1 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39051
Default Alt Text
D55.1732329538.diff (4 KB)
Attached To
Mode
D55: Fix ConfirmUploadPopup for KF6
Attached
Detach File
Event Timeline
Log In to Comment