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

Add transformations for legacy dialogs and application window overlays

parent f7760f0d
Pipeline #202795 passed with stage
in 46 seconds
......@@ -2,6 +2,29 @@
# SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: CC0-1.0
#
# Determine used namespaces
#
QQC2_NS=`cat $1 | grep '^import QtQuick.Controls 2' | grep ' as ' | perl -p -e 's/import QtQuick.Controls 2.\d{1,2} as (.*)/\1./'`
#
# Changes compatible with Qt 5.15
#
# platform dialogs
perl -p -i -e 's/^import QtQuick.Dialogs 1.0/import Qt.labs.platform 1.1/' $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
perl -p -i -e "s/applicationWindow\(\)\.overlay/applicationWindow().${QQC2_NS}Overlay.overlay/g" $1
#
# Changes incompatible with Qt 5
#
# icon property changes
perl -0777 -p -i -e 's/(BasicListItem \{[^\}]*?)(icon): /\1icon.name: /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