From 02143921f429d238793f8e2fe559afff7079ed71 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Thu, 7 Nov 2024 02:48:39 -0500 Subject: [PATCH] =?UTF-8?q?opt:=20disable=20Qt=E2=89=A46.7=20deprecated=20?= =?UTF-8?q?features=20and=20disable=20Qt=20deprecation=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 ++++++ src/macos/macmouseover.mm | 4 ++-- website/docs/install.md | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0ca11d2..c0be571c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,6 +192,12 @@ endif () #### Compile definitions +# Disable deprecated staffs for Qt<=6.7 (Bump this if ever consider bump Qt version) +target_compile_definitions(${GOLDENDICT} PRIVATE + QT_DISABLE_DEPRECATED_UP_TO=0x060700 + QT_NO_DEPRECATED_WARNINGS +) + target_compile_definitions(${GOLDENDICT} PUBLIC CMAKE_USED_HACK # temporal hack to avoid breaking qmake build MAKE_QTMULTIMEDIA_PLAYER diff --git a/src/macos/macmouseover.mm b/src/macos/macmouseover.mm index f17523e1..a6c775cc 100644 --- a/src/macos/macmouseover.mm +++ b/src/macos/macmouseover.mm @@ -88,8 +88,8 @@ QString MacMouseOver::CFStringRefToQString( CFStringRef str ) UniChar *chars = new UniChar[ length ]; CFStringGetCharacters( str, CFRangeMake( 0, length ), chars ); - - QString result = QString::fromUtf16( chars, length ); + + QString result = QString::fromUtf16( (char16_t*)chars, length ); delete[] chars; return result; diff --git a/website/docs/install.md b/website/docs/install.md index b74114a5..9feedcb1 100644 --- a/website/docs/install.md +++ b/website/docs/install.md @@ -31,7 +31,7 @@ Requires Windows 10 (1809 or later). * For ArchLinux, pre-built binary is available from [archlinuxcn's repo](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/goldendict-ng-git). * [Gentoo package from PG_Overlay](https://gitlab.com/Perfect_Gentleman/PG_Overlay/-/tree/master/app-text/goldendict-ng) -Minimum supported "Linux" versions is supposedly the current Ubuntu LTS or Debian's old stable or Qt6.4. +Minimum supported "Linux" version is supposedly the current Ubuntu LTS and Debian's oldstable. ## macOS