-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to Qt 6.3.0 due CMake/Wasm fixes #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,120 +36,124 @@ ApplicationWindow { | |
} | ||
|
||
Item { | ||
anchors.centerIn: base.contentItem | ||
width: _portrait ? base.height : base.width | ||
height: _portrait ? base.width : base.height | ||
rotation: _portrait ? 90 : 0 | ||
|
||
Background { | ||
anchors.fill: parent | ||
rotateCompass: menuArea.expanded | ||
} | ||
anchors.fill: parent | ||
|
||
AppPage { | ||
id: pagesArea | ||
width: parent.width*1.4 | ||
height: parent.height | ||
widthOffset: width - parent.width + 80 | ||
x: menuArea.expanded ? parent.width : 80 | ||
title: menuArea.currentItemText | ||
Item { | ||
anchors.centerIn: parent | ||
width: _portrait ? parent.height : parent.width | ||
height: _portrait ? parent.width : parent.height | ||
rotation: _portrait ? 90 : 0 | ||
|
||
SwipeView { | ||
Background { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to test the changes in here to understand what they're about. Are they self contained? I guess they could be split in their own commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added another Item to fill the parent, because wasm was not starting at the right size (only after a click it noticed the window size), with this it just works |
||
anchors.fill: parent | ||
anchors.rightMargin: pagesArea.widthOffset | ||
interactive: false | ||
currentIndex: menuArea.currentIndex | ||
clip: true | ||
rotateCompass: menuArea.expanded | ||
} | ||
|
||
Loader { | ||
AppPage { | ||
id: pagesArea | ||
width: parent.width*1.4 | ||
height: parent.height | ||
widthOffset: width - parent.width + 80 | ||
x: menuArea.expanded ? parent.width : 80 | ||
title: menuArea.currentItemText | ||
|
||
SwipeView { | ||
anchors.fill: parent | ||
anchors.rightMargin: pagesArea.widthOffset | ||
interactive: false | ||
currentIndex: menuArea.currentIndex | ||
clip: true | ||
visible: SwipeView.isCurrentItem | ||
sourceComponent: _isLowRes ? smallBoatStatus : normalBoatStatus | ||
Component { | ||
id: normalBoatStatus | ||
BoatStatusContents { } | ||
|
||
Loader { | ||
clip: true | ||
visible: SwipeView.isCurrentItem | ||
sourceComponent: _isLowRes ? smallBoatStatus : normalBoatStatus | ||
Component { | ||
id: normalBoatStatus | ||
BoatStatusContents { } | ||
} | ||
Component { | ||
id: smallBoatStatus | ||
BoatStatusContentsSmall { } | ||
} | ||
} | ||
Component { | ||
id: smallBoatStatus | ||
BoatStatusContentsSmall { } | ||
|
||
Loader { | ||
clip: true | ||
visible: SwipeView.isCurrentItem | ||
sourceComponent: _isLowRes ? smallBoatSailing : normalBoatSailing | ||
Component { | ||
id: normalBoatSailing | ||
BoatSailingContents { } | ||
} | ||
Component { | ||
id: smallBoatSailing | ||
BoatSailingContentsSmall { } | ||
} | ||
} | ||
} | ||
|
||
Loader { | ||
clip: true | ||
visible: SwipeView.isCurrentItem | ||
sourceComponent: _isLowRes ? smallBoatSailing : normalBoatSailing | ||
Component { | ||
id: normalBoatSailing | ||
BoatSailingContents { } | ||
PageNavigation { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
Component { | ||
id: smallBoatSailing | ||
BoatSailingContentsSmall { } | ||
Radio { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
PlayItem { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
} | ||
|
||
PageNavigation { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
Radio { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
PlayItem { | ||
visible: SwipeView.isCurrentItem | ||
clip: true | ||
} | ||
|
||
AboutItem { | ||
id: aboutItem | ||
visible: SwipeView.isCurrentItem | ||
AboutItem { | ||
id: aboutItem | ||
visible: SwipeView.isCurrentItem | ||
} | ||
} | ||
} | ||
} | ||
|
||
AppMenu { | ||
id: menuArea | ||
height: parent.height | ||
AppMenu { | ||
id: menuArea | ||
height: parent.height | ||
|
||
model: ListModel { | ||
ListElement { | ||
name: qsTr("Boat Status") | ||
iconText: "icon1" | ||
} | ||
ListElement { | ||
name: qsTr("Sailing") | ||
iconText: "icon2" | ||
} | ||
ListElement { | ||
name: qsTr("Navigation") | ||
iconText: "icon5" | ||
} | ||
ListElement { | ||
name: qsTr("Com. Radio") | ||
iconText: "icon3" | ||
} | ||
ListElement { | ||
name: qsTr("Music Player") | ||
iconText: "icon4" | ||
} | ||
ListElement { | ||
name: qsTr("About KDAB") | ||
iconText: "icon6" | ||
model: ListModel { | ||
ListElement { | ||
name: qsTr("Boat Status") | ||
iconText: "icon1" | ||
} | ||
ListElement { | ||
name: qsTr("Sailing") | ||
iconText: "icon2" | ||
} | ||
ListElement { | ||
name: qsTr("Navigation") | ||
iconText: "icon5" | ||
} | ||
ListElement { | ||
name: qsTr("Com. Radio") | ||
iconText: "icon3" | ||
} | ||
ListElement { | ||
name: qsTr("Music Player") | ||
iconText: "icon4" | ||
} | ||
ListElement { | ||
name: qsTr("About KDAB") | ||
iconText: "icon6" | ||
} | ||
} | ||
} | ||
} | ||
|
||
MouseArea { | ||
onClicked: Qt.quit() | ||
enabled: canCloseDemoFromUI | ||
anchors.right: parent.right | ||
anchors.top: parent.top | ||
width: 50 | ||
height: 50 | ||
} | ||
MouseArea { | ||
onClicked: Qt.quit() | ||
enabled: canCloseDemoFromUI | ||
anchors.right: parent.right | ||
anchors.top: parent.top | ||
width: 50 | ||
height: 50 | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ Flickable { | |
flickDeceleration: 350 | ||
Image { | ||
id: image | ||
source: "/img/maps/resources/images/maps/shot"+map.numberi | ||
source: "/img/maps/resources/images/maps/shot" + map.numberi + (Qt.platform.os === "wasm" ? ".png" : "") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is weird. Is this a Qt 6 regression? Is there a bug report somewhere? Qt is supposed to detect that one can't load compressed textures and fall back on the .png files gracefully. Side note: if WASM can't make use of the compressed textures at all (don't really know, need to check), then it's worth splitting the .qrc files and not shipping such textures on this platform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me it's a regression, didn't look at bug reports, it certainly would be good to remove them as they probably add ~4MB.. |
||
anchors.centerIn: parent | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
*/ | ||
|
||
import QtQuick 2.0 | ||
import QtGraphicalEffects 1.0 // for OpacityMask | ||
import Qt5Compat.GraphicalEffects // for OpacityMask | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this is annoying to keep working across 5 and 6. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which is why I just dropped Qt5 :) |
||
|
||
Item { | ||
id: mask | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random question, do we want to drop Qt 5 support entirely, or keep this code compile in both 5 and 6?
(I don't know if a decision has been made in that regard.)
Of course one can require Qt 6 for a WASM build.