[sysadmin/release-tools/frameworks/5.0] /: KF5: auto-increase QT_DISABLE_DEPRECATED_BEFORE when upgrading the min Qt version

David Faure null at kde.org
Thu Oct 24 21:16:47 BST 2019


Git commit fb4639b0b5f2a51d124949d59b9a327bf66c8f04 by David Faure.
Committed on 24/10/2019 at 20:15.
Pushed by dfaure into branch 'frameworks/5.0'.

KF5: auto-increase QT_DISABLE_DEPRECATED_BEFORE when upgrading the min Qt version

This is just safety; some time ago I made them all disable API
deprecated before 5.13 and the current min Qt version is 5.11.

Thanks Volker for the idea.

CCMAIL: vkrause at kde.org, kde-frameworks-devel at kde.org

M  +9    -1    increase_qt_version.sh

https://commits.kde.org/sysadmin/release-tools/fb4639b0b5f2a51d124949d59b9a327bf66c8f04

diff --git a/increase_qt_version.sh b/increase_qt_version.sh
index ef17c11..8059910 100755
--- a/increase_qt_version.sh
+++ b/increase_qt_version.sh
@@ -2,7 +2,12 @@
 
 . utils.sh
 
-qt_version="5.11.0"
+qt_version_major=5
+qt_version_minor=11
+qt_version_patch=0
+
+qt_version="${qt_version_major}.${qt_version_minor}.${qt_version_patch}"
+qt_version_hex="0x`printf '%02x%02x%02x\n' ${qt_version_major} ${qt_version_minor} ${qt_version_patch}`"
 
 if [ ! -d $srcdir ]; then
     echo "$srcdir does not exist, please fix srcdir variable"
@@ -20,6 +25,9 @@ cat $releasetools/modules.git | while read repo branch; do
     $cmd git pull --rebase || exit 3
     if [ "$repo" != extra-cmake-modules ]; then
         $cmd perl -pi -e 's/REQUIRED_QT_VERSION \"?[0-9]+\.[0-9]+\.[0-9]+\"?/REQUIRED_QT_VERSION '$qt_version'/g' CMakeLists.txt
+        if ! grep -q 'deprecated: true' metainfo.yaml; then
+            $cmd perl -pi -e 'if (my ($old) = /QT_DISABLE_DEPRECATED_BEFORE=(0x[0-9a-fA-F]+)/) { s/$old/'$qt_version_hex'/ if (hex($old) < hex("'$qt_version_hex'")); }' CMakeLists.txt
+        fi
         $cmd git commit -a -m "GIT_SILENT Upgrade Qt5 version requirement to $qt_version."
     fi
     $cmd git pull --rebase


More information about the Kde-frameworks-devel mailing list