Commit ea6d462e authored by Volker Krause's avatar Volker Krause
Browse files

Update QtQuick.Dialogs import versions for Qt 6

QtQuick.Dialogs still exists, it just doesn't work with version 1 imports
anymore. Use that instead of the labs version.
parent 87c7962f
Pipeline #229005 skipped
......@@ -12,12 +12,6 @@ QQC2_NS=`cat $1 | grep '^import QtQuick.Controls 2' | grep ' as ' | perl -p -e '
# Changes compatible with Qt 5.15
#
# platform dialogs
perl -p -i -e 's/^import QtQuick.Dialogs 1.\d/import Qt.labs.platform 1.1/' $1
perl -0777 -p -i -e 's/(MessageDialog \{[^\}]*?on(:?Apply|Discard)): /\1Clicked: /sg' $1
perl -0777 -p -i -e 's/(MessageDialog \{[^\}]*?)(standardButtons): /\1buttons: /sg' $1
perl -p -i -e 's/StandardButton\./MessageDialog./g' $1
# migrate from ApplicationWindow.overlay to Overlay.overlay
# (needs current QQC2 import version!)
perl -p -i -e "s/(?:\w+\.)?ApplicationWindow\.overlay/applicationWindow().${QQC2_NS}Overlay.overlay/g" $1
......@@ -28,7 +22,7 @@ perl -p -i -e "s/applicationWindow\(\)\.overlay/applicationWindow().${QQC2_NS}Ov
# Changes incompatible with Qt 5
#
# icon property changes
# Kirigami.BasicListItem icon property changes
perl -0777 -p -i -e 's/(BasicListItem \{[^\}]*?)(icon): /\1icon.name: /sg' $1
# QtGraphicalEffects
......@@ -36,3 +30,10 @@ perl -0777 -p -i -e 's/(BasicListItem \{[^\}]*?)(icon): /\1icon.name: /sg' $1
perl -p -i -e 's/import QtGraphicalEffects 1\.\d+/import Qt5Compat.GraphicalEffects 6.0/' $1
# remove obsolete samples: property
perl -0777 -p -i -e 's/((?:DropShadow|GaussianBlur) \{[^\}].*?)\n\s*samples: .*?\n/\1\n/sg' $1
# QtQuick.Dialogs
perl -p -i -e 's/^import QtQuick.Dialogs 1.\d/import QtQuick.Dialogs 6.3/' $1
# remove obsolete properties
perl -0777 -p -i -e 's/(FileDialog \{[^\}].*?)\n\s*selectExisting: false\n/\1\n/sg' $1
perl -0777 -p -i -e 's/(FileDialog \{[^\}].*?)\n\s*selectMultiple: false\n/\1\n/sg' $1
perl -0777 -p -i -e 's/(FileDialog \{[^\}].*?)\n\s*selectFolder: false\n/\1\n/sg' $1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment