From 16754b4f9da4d6d791a80b217cea264efe9d8ca8 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 15 Nov 2023 11:52:07 +0100 Subject: [PATCH] avoid deprecation warnings --- playground/inputpanel/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/playground/inputpanel/main.cpp b/playground/inputpanel/main.cpp index 6f611a25..9948a048 100644 --- a/playground/inputpanel/main.cpp +++ b/playground/inputpanel/main.cpp @@ -116,7 +116,14 @@ namespace case QLocale::English: { - switch ( locale.country() ) + const auto territory = +#if QT_VERSION >= QT_VERSION_CHECK( 6, 2, 0 ) + locale.territory(); +#else + locale.country(); +#endif + + switch ( territory ) { case QLocale::Canada: case QLocale::UnitedStates: