Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fcitx5-qt for openSUSE:Factory 
checked in at 2025-06-23 15:04:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fcitx5-qt (Old)
 and      /work/SRC/openSUSE:Factory/.fcitx5-qt.new.7067 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fcitx5-qt"

Mon Jun 23 15:04:01 2025 rev:17 rq:1287542 version:5.1.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/fcitx5-qt/fcitx5-qt.changes      2025-01-29 
16:18:21.179312613 +0100
+++ /work/SRC/openSUSE:Factory/.fcitx5-qt.new.7067/fcitx5-qt.changes    
2025-06-23 15:04:38.928171694 +0200
@@ -1,0 +2,7 @@
+Sat Jun 21 08:04:15 UTC 2025 - Marguerite Su <i...@marguerite.su>
+
+- update to 5.1.10
+  * drop qt5 quickphrase editor and port to StandardPaths
+  * Drop some header only in new qt QtClassHelperMacros
+
+-------------------------------------------------------------------

Old:
----
  fcitx5-qt-5.1.9.tar.zst

New:
----
  fcitx5-qt-5.1.10.tar.zst

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fcitx5-qt.spec ++++++
--- /var/tmp/diff_new_pack.A9MN5j/_old  2025-06-23 15:04:39.648201733 +0200
+++ /var/tmp/diff_new_pack.A9MN5j/_new  2025-06-23 15:04:39.648201733 +0200
@@ -29,7 +29,7 @@
 
 %define build_qt5 1
 Name:           fcitx5-qt
-Version:        5.1.9
+Version:        5.1.10
 Release:        0
 Summary:        Qt library and IM module for fcitx5
 License:        BSD-3-Clause AND LGPL-2.1-or-later
@@ -40,7 +40,11 @@
 BuildRequires:  extra-cmake-modules
 BuildRequires:  fcitx5-devel
 BuildRequires:  fdupes
+%if 0%{?suse_version} >= 1550
 BuildRequires:  gcc-c++
+%else
+BuildRequires:  gcc13-c++
+%endif
 BuildRequires:  libQt5Gui-private-headers-devel
 BuildRequires:  pkgconfig
 %if %{build_qt5}
@@ -179,6 +183,10 @@
 %setup -q
 
 %build
+%if 0%{?suse_version} < 1550
+export CC=%{_bindir}/gcc-13
+export CXX=%{_bindir}/g++-13
+%endif
 ARGS="-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir}"
 %if %{build_qt4}
 ARGS="$ARGS -DENABLE_QT4=ON"
@@ -231,8 +239,6 @@
 %{_libexecdir}/fcitx5-qt5-gui-wrapper
 %{_datadir}/applications/org.fcitx.fcitx5-qt5-gui-wrapper.desktop
 %dir %{_libdir}/fcitx5
-%dir %{_libdir}/fcitx5/qt5
-%{_libdir}/fcitx5/qt5/libfcitx-quickphrase-editor5.so
 
%{_libdir}/qt5/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so
 
 %files -n libFcitx5Qt5DBusAddons1

++++++ fcitx5-qt-5.1.9.tar.zst -> fcitx5-qt-5.1.10.tar.zst ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/CMakeLists.txt 
new/fcitx5-qt-5.1.10/CMakeLists.txt
--- old/fcitx5-qt-5.1.9/CMakeLists.txt  2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/CMakeLists.txt 2025-06-16 09:21:11.000000000 +0200
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.16)
-project(fcitx5-qt VERSION 5.1.9)
+project(fcitx5-qt VERSION 5.1.10)
 set(FCITX5_QT_VERSION ${PROJECT_VERSION})
 
 set(REQUIRED_QT4_VERSION 4.8.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/po/LINGUAS 
new/fcitx5-qt-5.1.10/po/LINGUAS
--- old/fcitx5-qt-5.1.9/po/LINGUAS      2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/po/LINGUAS     2025-06-16 09:21:11.000000000 +0200
@@ -8,5 +8,6 @@
 ja
 ko
 ru
+vi
 zh_CN
 zh_TW
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/po/vi.po 
new/fcitx5-qt-5.1.10/po/vi.po
--- old/fcitx5-qt-5.1.9/po/vi.po        1970-01-01 01:00:00.000000000 +0100
+++ new/fcitx5-qt-5.1.10/po/vi.po       2025-06-16 09:21:11.000000000 +0200
@@ -0,0 +1,273 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the fcitx5-qt package.
+#
+# Translators:
+# hoanghuy309 <hoanghuy...@gmail.com>, 2025
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: fcitx5-qt\n"
+"Report-Msgid-Bugs-To: fcitx-...@googlegroups.com\n"
+"POT-Creation-Date: 2025-04-22 20:24+0000\n"
+"PO-Revision-Date: 2017-12-20 02:52+0000\n"
+"Last-Translator: hoanghuy309 <hoanghuy...@gmail.com>, 2025\n"
+"Language-Team: Vietnamese (https://app.transifex.com/fcitx/teams/12005/vi/)\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: qt5/quickphrase-editor/editor.cpp:260 qt6/quickphrase-editor/editor.cpp:260
+msgid "%1 is a system file, do you want to delete all phrases instead?"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:52
+#. i18n: ectx: property (text), widget (QPushButton, addButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:52
+#. i18n: ectx: property (text), widget (QPushButton, addButton)
+#: rc.cpp:12 rc.cpp:39
+#, kde-format
+msgid "&Add"
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:32 qt6/guiwrapper/mainwindow.cpp:32
+msgid "&Apply"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:63
+#. i18n: ectx: property (text), widget (QPushButton, batchEditButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:63
+#. i18n: ectx: property (text), widget (QPushButton, batchEditButton)
+#: rc.cpp:15 rc.cpp:42
+#, kde-format
+msgid "&Batch Edit"
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:34 qt6/guiwrapper/mainwindow.cpp:34
+msgid "&Close"
+msgstr "Đóng"
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:74
+#. i18n: ectx: property (text), widget (QPushButton, deleteButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:74
+#. i18n: ectx: property (text), widget (QPushButton, deleteButton)
+#: rc.cpp:18 rc.cpp:45
+#, kde-format
+msgid "&Delete"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:103
+#. i18n: ectx: property (text), widget (QPushButton, importButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:103
+#. i18n: ectx: property (text), widget (QPushButton, importButton)
+#: rc.cpp:24 rc.cpp:51
+#, kde-format
+msgid "&Import"
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:31 qt6/guiwrapper/mainwindow.cpp:31
+msgid "&Ok"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:45
+#. i18n: ectx: property (text), widget (QPushButton, operationButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:45
+#. i18n: ectx: property (text), widget (QPushButton, operationButton)
+#: rc.cpp:9 rc.cpp:36
+#, kde-format
+msgid "&Operation"
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:33 qt6/guiwrapper/mainwindow.cpp:33
+msgid "&Reset"
+msgstr ""
+
+#: qt5/guiwrapper/wrapperapp.cpp:32 qt6/guiwrapper/wrapperapp.cpp:32
+msgid "A launcher for Fcitx Gui plugin."
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:33 qt6/quickphrase-editor/editor.cpp:33
+msgid "Add File"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:272 qt6/quickphrase-editor/editor.cpp:272
+msgid "Are you sure to delete %1?"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/batchdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, BatchDialog)
+#. i18n: file: qt6/quickphrase-editor/batchdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, BatchDialog)
+#: rc.cpp:3 rc.cpp:30
+#, kde-format
+msgid "Batch editing"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:238 qt6/quickphrase-editor/editor.cpp:238
+msgid "Cannot create file %1."
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:259 qt6/quickphrase-editor/editor.cpp:259
+msgid "Cannot remove system file"
+msgstr ""
+
+#: qt5/guiwrapper/wrapperapp.cpp:38 qt6/guiwrapper/wrapperapp.cpp:38
+msgid "Config path"
+msgstr "Đường dẫn cấu hình"
+
+#: qt5/quickphrase-editor/editor.cpp:271 qt6/quickphrase-editor/editor.cpp:271
+msgid "Confirm deletion"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:221 qt6/quickphrase-editor/editor.cpp:221
+msgid "Create new file"
+msgstr ""
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:85
+#. i18n: ectx: property (text), widget (QPushButton, clearButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:85
+#. i18n: ectx: property (text), widget (QPushButton, clearButton)
+#: rc.cpp:21 rc.cpp:48
+#, kde-format
+msgid "De&lete All"
+msgstr "Xóa Tất Cả"
+
+#: qt5/quickphrase-editor/filelistmodel.cpp:29
+#: qt6/quickphrase-editor/filelistmodel.cpp:29
+msgid "Default"
+msgstr "Mặc định"
+
+#. i18n: file: qt5/quickphrase-editor/editor.ui:114
+#. i18n: ectx: property (text), widget (QPushButton, exportButton)
+#. i18n: file: qt6/quickphrase-editor/editor.ui:114
+#. i18n: ectx: property (text), widget (QPushButton, exportButton)
+#: rc.cpp:27 rc.cpp:54
+#, kde-format
+msgid "E&xport"
+msgstr ""
+
+#: qt5/widgetsaddons/fcitxqtkeysequencewidget.cpp:353
+#: qt6/widgetsaddons/fcitxqtkeysequencewidget.cpp:322
+msgid "Empty"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:280 qt6/quickphrase-editor/editor.cpp:280
+msgid "Error while deleting %1."
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:109 qt6/guiwrapper/mainwindow.cpp:109
+msgid "Failed to notify Fcitx"
+msgstr ""
+
+#: qt5/guiwrapper/mainwindow.cpp:110 qt6/guiwrapper/mainwindow.cpp:110
+msgid "Failed to notify Fcitx about the configuration change."
+msgstr ""
+
+#: qt5/guiwrapper/org.fcitx.fcitx5-qt5-gui-wrapper.desktop.in.in:2
+msgid "Fcitx 5 Qt5 Gui Wrapper"
+msgstr ""
+
+#: qt6/guiwrapper/org.fcitx.fcitx5-qt6-gui-wrapper.desktop.in.in:2
+msgid "Fcitx 5 Qt6 Gui Wrapper"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:237 qt5/quickphrase-editor/editor.cpp:279
+#: qt6/quickphrase-editor/editor.cpp:237 qt6/quickphrase-editor/editor.cpp:279
+msgid "File Operation Failed"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:226 qt6/quickphrase-editor/editor.cpp:226
+msgid "File name should not contain '/'."
+msgstr ""
+
+#: qt5/guiwrapper/org.fcitx.fcitx5-qt5-gui-wrapper.desktop.in.in:3
+#: qt6/guiwrapper/org.fcitx.fcitx5-qt6-gui-wrapper.desktop.in.in:3
+msgid "Input Method Configuration helper"
+msgstr "Trợ Giúp Cấu Hình Kiểu Gõ"
+
+#: qt5/quickphrase-editor/editor.cpp:225 qt6/quickphrase-editor/editor.cpp:225
+msgid "Invalid filename"
+msgstr ""
+
+#: qt5/widgetsaddons/fcitxqtkeysequencewidget.cpp:179
+#: qt6/widgetsaddons/fcitxqtkeysequencewidget.cpp:148
+msgid "Key code mode"
+msgstr "Chế độ mã phím"
+
+#: qt5/quickphrase-editor/model.cpp:73 qt6/quickphrase-editor/model.cpp:73
+msgid "Keyword"
+msgstr "Từ khóa"
+
+#: qt5/guiwrapper/org.fcitx.fcitx5-qt5-gui-wrapper.desktop.in.in:4
+#: qt6/guiwrapper/org.fcitx.fcitx5-qt6-gui-wrapper.desktop.in.in:4
+msgid "Load configuration plugin for Fcitx Addon"
+msgstr ""
+
+#: qt5/guiwrapper/wrapperapp.cpp:35 qt6/guiwrapper/wrapperapp.cpp:35
+msgid "Parent window ID"
+msgstr ""
+
+#: qt5/quickphrase-editor/model.cpp:75 qt6/quickphrase-editor/model.cpp:75
+msgid "Phrase"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:221 qt6/quickphrase-editor/editor.cpp:221
+msgid "Please input a filename for newfile"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:101 qt6/quickphrase-editor/editor.cpp:101
+msgid "Quick Phrase Editor"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:37 qt6/quickphrase-editor/editor.cpp:37
+msgid "Refresh List"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:35 qt6/quickphrase-editor/editor.cpp:35
+msgid "Remove File"
+msgstr ""
+
+#: qt5/quickphrase-editor/editor.cpp:85 qt6/quickphrase-editor/editor.cpp:85
+msgid "Save Changes"
+msgstr "Lưu Thay Đổi"
+
+#: qt5/guiwrapper/wrapperapp.cpp:36 qt6/guiwrapper/wrapperapp.cpp:36
+msgid "Test if config exists"
+msgstr "Kiểm tra nếu cấu hình tồn tại"
+
+#: qt5/quickphrase-editor/editor.cpp:86 qt6/quickphrase-editor/editor.cpp:86
+msgid ""
+"The content has changed.\n"
+"Do you want to save the changes or discard them?"
+msgstr ""
+"Nội dung đã thay đổi.\n"
+"Bạn có muốn lưu các thay đổi hoặc loại bỏ chúng?"
+
+#: qt5/widgetsaddons/fcitxqtkeysequencewidget.cpp:390
+#: qt6/widgetsaddons/fcitxqtkeysequencewidget.cpp:359
+msgid "The key you just pressed is not supported by Qt."
+msgstr "Phím bạn vừa nhấn không được Qt hỗ trợ."
+
+#: qt5/widgetsaddons/fcitxqtkeysequencewidget.cpp:391
+#: qt6/widgetsaddons/fcitxqtkeysequencewidget.cpp:360
+msgid "Unsupported Key"
+msgstr "Phím Không Được Hỗ Trợ"
+
+#. i18n: file: qt5/quickphrase-editor/batchdialog.ui:50
+#. i18n: ectx: property (text), widget (QLabel, infoLabel)
+#. i18n: file: qt6/quickphrase-editor/batchdialog.ui:50
+#. i18n: ectx: property (text), widget (QLabel, infoLabel)
+#: rc.cpp:6 rc.cpp:33
+#, kde-format
+msgid "Use <Keyword> <Phrase> format on every line."
+msgstr ""
+
+#: qt5/guiwrapper/wrapperapp.cpp:38 qt6/guiwrapper/wrapperapp.cpp:38
+msgid "path"
+msgstr ""
+
+#: qt5/guiwrapper/wrapperapp.cpp:35 qt6/guiwrapper/wrapperapp.cpp:35
+msgid "winid"
+msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/CMakeLists.txt 
new/fcitx5-qt-5.1.10/qt5/CMakeLists.txt
--- old/fcitx5-qt-5.1.9/qt5/CMakeLists.txt      2025-01-23 00:27:37.000000000 
+0100
+++ new/fcitx5-qt-5.1.10/qt5/CMakeLists.txt     2025-06-16 09:21:11.000000000 
+0200
@@ -11,6 +11,5 @@
 if(NOT BUILD_ONLY_PLUGIN)
   add_subdirectory(guiwrapper)
   add_subdirectory(widgetsaddons)
-  add_subdirectory(quickphrase-editor)
   add_subdirectory(immodule-probing)
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/guiwrapper/wrapperapp.cpp 
new/fcitx5-qt-5.1.10/qt5/guiwrapper/wrapperapp.cpp
--- old/fcitx5-qt-5.1.9/qt5/guiwrapper/wrapperapp.cpp   2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt5/guiwrapper/wrapperapp.cpp  2025-06-16 
09:21:11.000000000 +0200
@@ -5,22 +5,24 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#include <QDebug>
-
+#include "wrapperapp.h"
 #include "fcitxqtconfiguifactory.h"
+#include "fcitxqtconfiguiwidget.h"
 #include "mainwindow.h"
-#include "wrapperapp.h"
+#include <QApplication>
 #include <QCommandLineParser>
+#include <QDebug>
+#include <QLatin1String>
 #include <QWindow>
+#include <Qt>
+#include <QtGlobal>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
-#include <qnamespace.h>
 
 namespace fcitx {
 
 WrapperApp::WrapperApp(int &argc, char **argv)
     : QApplication(argc, argv), factory_(new FcitxQtConfigUIFactory(this)),
-      mainWindow_(0) {
+      mainWindow_(nullptr) {
     setApplicationName(QLatin1String(
         "fcitx5-qt" QT_STRINGIFY(QT_VERSION_MAJOR) "-gui-wrapper"));
     setApplicationVersion(QLatin1String(FCITX5_QT_VERSION));
@@ -79,11 +81,7 @@
 
 void WrapperApp::run() { mainWindow_->show(); }
 
-WrapperApp::~WrapperApp() {
-    if (mainWindow_) {
-        delete mainWindow_;
-    }
-}
+WrapperApp::~WrapperApp() { delete mainWindow_; }
 
 void WrapperApp::errorExit() { exit(1); }
 } // namespace fcitx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp 
new/fcitx5-qt-5.1.10/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
--- old/fcitx5-qt-5.1.9/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp 
2025-01-23 00:27:37.000000000 +0100
+++ 
new/fcitx5-qt-5.1.10/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp    
    2025-06-16 09:21:11.000000000 +0200
@@ -1249,9 +1249,6 @@
             break;
         }
         QObject *realFocusObject = focusObjectWrapper();
-        if (qGuiApp->focusObject() == realFocusObject) {
-            break;
-        }
         auto *widget = qobject_cast<QWidget *>(realFocusObject);
         if (!widget) {
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/CMakeLists.txt 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/CMakeLists.txt
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/CMakeLists.txt   2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/CMakeLists.txt  1970-01-01 
01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-find_package(Qt5Concurrent REQUIRED)
-
-set(QUICKPHRASE_EDITOR_SRCS 
-  main.cpp
-  model.cpp
-  editor.cpp
-  editordialog.cpp
-  batchdialog.cpp
-  filelistmodel.cpp
-  )
-
-add_library(fcitx-quickphrase-editor5-qt5
-  MODULE ${QUICKPHRASE_EDITOR_SRCS})
-set_target_properties(fcitx-quickphrase-editor5-qt5 PROPERTIES
-                      OUTPUT_NAME fcitx-quickphrase-editor5
-                      AUTOMOC TRUE AUTOUIC TRUE AUTOUIC_OPTIONS 
"-tr=fcitx::tr2fcitx;--include=fcitxqti18nhelper.h"
-)
-target_link_libraries(fcitx-quickphrase-editor5-qt5
-  Fcitx5::Utils
-  Qt5::Core
-  Qt5::Gui
-  Qt5::Concurrent
-  Fcitx5Qt5::WidgetsAddons
-)
-
-install(TARGETS fcitx-quickphrase-editor5-qt5 DESTINATION 
${CMAKE_INSTALL_LIBDIR}/fcitx5/qt5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.cpp  2025-06-23 
15:04:39.844209911 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.cpp 1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/batchdialog.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.h    2025-06-23 
15:04:39.828209243 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.h   1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/batchdialog.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.ui 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.ui
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/batchdialog.ui   2025-06-23 
15:04:39.776207074 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/batchdialog.ui  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/batchdialog.ui
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.cpp       2025-06-23 
15:04:39.896212080 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.cpp      1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editor.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.h 2025-06-23 
15:04:39.800208075 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.h        1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editor.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.ui 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.ui
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editor.ui        2025-06-23 
15:04:39.888211746 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editor.ui       1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editor.ui
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.cpp 2025-06-23 
15:04:39.860210578 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.cpp        
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editordialog.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.h   2025-06-23 
15:04:39.856210411 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.h  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editordialog.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.ui 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.ui
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/editordialog.ui  2025-06-23 
15:04:39.784207407 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/editordialog.ui 1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/editordialog.ui
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/filelistmodel.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/filelistmodel.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/filelistmodel.cpp        
2025-06-23 15:04:39.836209577 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/filelistmodel.cpp       
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/filelistmodel.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/filelistmodel.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/filelistmodel.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/filelistmodel.h  2025-06-23 
15:04:39.880211412 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/filelistmodel.h 1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/filelistmodel.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/main.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/main.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/main.cpp 2025-06-23 
15:04:39.872211079 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/main.cpp        1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/main.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/main.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/main.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/main.h   2025-06-23 
15:04:39.812208576 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/main.h  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/main.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/model.cpp 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/model.cpp
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/model.cpp        2025-06-23 
15:04:39.820208909 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/model.cpp       1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/model.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/model.h 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/model.h
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/model.h  2025-06-23 
15:04:39.788207574 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/model.h 1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/model.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/quickphrase-editor.json 
new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/quickphrase-editor.json
--- old/fcitx5-qt-5.1.9/qt5/quickphrase-editor/quickphrase-editor.json  
2025-06-23 15:04:39.808208409 +0200
+++ new/fcitx5-qt-5.1.10/qt5/quickphrase-editor/quickphrase-editor.json 
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to ../../qt6/quickphrase-editor/quickphrase-editor.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/widgetsaddons/fcitxqtconfiguifactory.cpp 
new/fcitx5-qt-5.1.10/qt5/widgetsaddons/fcitxqtconfiguifactory.cpp
--- old/fcitx5-qt-5.1.9/qt5/widgetsaddons/fcitxqtconfiguifactory.cpp    
2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt5/widgetsaddons/fcitxqtconfiguifactory.cpp   
2025-06-16 09:21:11.000000000 +0200
@@ -7,14 +7,14 @@
 #include "fcitxqtconfiguifactory.h"
 #include "fcitxqtconfiguifactory_p.h"
 #include "fcitxqtconfiguiplugin.h"
-
 #include <QDebug>
 #include <QDir>
 #include <QLibrary>
 #include <QPluginLoader>
 #include <QStandardPaths>
+#include <QString>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
+#include <fcitx-utils/standardpaths.h>
 
 namespace fcitx {
 
@@ -50,12 +50,12 @@
     Q_D(FcitxQtConfigUIFactory);
 
     auto path = normalizePath(file);
-    auto loader = d->plugins_.value(path);
+    auto *loader = d->plugins_.value(path);
     if (!loader) {
         return nullptr;
     }
 
-    auto instance =
+    auto *instance =
         qobject_cast<FcitxQtConfigUIFactoryInterface *>(loader->instance());
     if (!instance) {
         return nullptr;
@@ -71,39 +71,27 @@
 }
 
 void FcitxQtConfigUIFactoryPrivate::scan() {
-    fcitx::StandardPath::global().scanFiles(
-        fcitx::StandardPath::Type::Addon, "qt5",
-        [this](const std::string &path, const std::string &dirPath, bool user) 
{
-            do {
-                if (user) {
-                    break;
-                }
-
-                QDir dir(QString::fromLocal8Bit(dirPath.c_str()));
-                QFileInfo fi(
-                    dir.filePath(QString::fromLocal8Bit(path.c_str())));
-
-                QString filePath = fi.filePath(); // file name with path
-                QString fileName = fi.fileName(); // just file name
-
-                if (!QLibrary::isLibrary(filePath)) {
-                    break;
-                }
-
-                QPluginLoader *loader = new QPluginLoader(filePath, this);
-                if (loader->metaData().value("IID") !=
-                    QLatin1String(FcitxQtConfigUIFactoryInterface_iid)) {
-                    delete loader;
-                    break;
-                }
-                auto metadata = 
loader->metaData().value("MetaData").toObject();
-                auto files = 
metadata.value("files").toVariant().toStringList();
-                auto addon = metadata.value("addon").toVariant().toString();
-                for (const auto &file : files) {
-                    plugins_[addon + "/" + file] = loader;
-                }
-            } while (0);
-            return true;
-        });
+    auto addonFiles = fcitx::StandardPaths::global().locate(
+        fcitx::StandardPathsType::Addon, "qt6",
+        [](const std::filesystem::path &path) {
+            return QLibrary::isLibrary(QString::fromStdString(path));
+        },
+        StandardPathsMode::System);
+
+    for (const auto &[_, filePath] : addonFiles) {
+        auto *loader =
+            new QPluginLoader(QString::fromStdString(filePath), this);
+        if (loader->metaData().value("IID") !=
+            QLatin1String(FcitxQtConfigUIFactoryInterface_iid)) {
+            delete loader;
+            continue;
+        }
+        auto metadata = loader->metaData().value("MetaData").toObject();
+        auto files = metadata.value("files").toVariant().toStringList();
+        auto addon = metadata.value("addon").toVariant().toString();
+        for (const auto &file : files) {
+            plugins_[addon + "/" + file] = loader;
+        }
+    }
 }
 } // namespace fcitx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt5/widgetsaddons/fcitxqtconfiguifactory_p.h 
new/fcitx5-qt-5.1.10/qt5/widgetsaddons/fcitxqtconfiguifactory_p.h
--- old/fcitx5-qt-5.1.9/qt5/widgetsaddons/fcitxqtconfiguifactory_p.h    
2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt5/widgetsaddons/fcitxqtconfiguifactory_p.h   
2025-06-16 09:21:11.000000000 +0200
@@ -9,14 +9,13 @@
 #include "fcitxqtconfiguifactory.h"
 #include <QObject>
 #include <QPluginLoader>
-#include <qpluginloader.h>
 
 namespace fcitx {
 
 class FcitxQtConfigUIFactoryPrivate : public QObject {
     Q_OBJECT
 public:
-    FcitxQtConfigUIFactoryPrivate(FcitxQtConfigUIFactory *conn);
+    FcitxQtConfigUIFactoryPrivate(FcitxQtConfigUIFactory *factory);
     virtual ~FcitxQtConfigUIFactoryPrivate();
     FcitxQtConfigUIFactory *const q_ptr;
     Q_DECLARE_PUBLIC(FcitxQtConfigUIFactory);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/editor.cpp 
new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/editor.cpp
--- old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/editor.cpp       2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/editor.cpp      2025-06-16 
09:21:11.000000000 +0200
@@ -15,9 +15,11 @@
 #include <QInputDialog>
 #include <QMenu>
 #include <QMessageBox>
+#include <QPushButton>
 #include <QtConcurrentRun>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
+#include <fcitx-utils/standardpaths.h>
+#include <filesystem>
 
 namespace fcitx {
 
@@ -228,10 +230,10 @@
     }
 
     filename.append(".mb");
-    if (!StandardPath::global().safeSave(
-            StandardPath::Type::PkgData,
-            stringutils::joinPath(QUICK_PHRASE_CONFIG_DIR,
-                                  filename.toLocal8Bit().constData()),
+    if (!StandardPaths::global().safeSave(
+            StandardPathsType::PkgData,
+            std::filesystem::path(QUICK_PHRASE_CONFIG_DIR) /
+                filename.toStdString(),
             [](int) { return true; })) {
         QMessageBox::warning(
             this, _("File Operation Failed"),
@@ -250,10 +252,10 @@
 void ListEditor::removeFileTriggered() {
     QString filename = currentFile();
     QString curName = currentName();
-    auto fullname = stringutils::joinPath(
-        StandardPath::global().userDirectory(StandardPath::Type::PkgData),
-        filename.toLocal8Bit().constData());
-    QFile f(fullname.data());
+    auto fullname =
+        StandardPaths::global().userDirectory(StandardPathsType::PkgData) /
+        filename.toStdString();
+    QFile f(QString::fromStdString(fullname.string()));
     if (!f.exists()) {
         int ret = QMessageBox::question(
             this, _("Cannot remove system file"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/filelistmodel.cpp 
new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/filelistmodel.cpp
--- old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/filelistmodel.cpp        
2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/filelistmodel.cpp       
2025-06-16 09:21:11.000000000 +0200
@@ -6,9 +6,14 @@
  */
 
 #include "filelistmodel.h"
+#include <QAbstractListModel>
+#include <QObject>
+#include <Qt>
+#include <algorithm>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
-#include <fcntl.h>
+#include <fcitx-utils/standardpaths.h>
+#include <filesystem>
+#include <iterator>
 
 fcitx::FileListModel::FileListModel(QObject *parent)
     : QAbstractListModel(parent) {}
@@ -20,48 +25,47 @@
 }
 
 QVariant fcitx::FileListModel::data(const QModelIndex &index, int role) const {
-    if (!index.isValid() || index.row() >= fileList_.size())
-        return QVariant();
+    if (!index.isValid() || index.row() >= fileList_.size()) {
+        return {};
+    }
 
     switch (role) {
     case Qt::DisplayRole:
         if (fileList_[index.row()] == QUICK_PHRASE_CONFIG_FILE) {
             return _("Default");
         } else {
-            // remove "data/quickphrase.d/"
-            const size_t length = strlen(QUICK_PHRASE_CONFIG_DIR);
-            return fileList_[index.row()].mid(length + 1,
-                                              fileList_[index.row()].size() -
-                                                  length - strlen(".mb") - 1);
+            return QString::fromStdString(
+                fileList_[index.row()].stem().string());
         }
     case Qt::UserRole:
-        return fileList_[index.row()];
+        return QString::fromStdString(fileList_[index.row()].string());
     default:
         break;
     }
-    return QVariant();
+    return {};
 }
 
 void fcitx::FileListModel::loadFileList() {
     beginResetModel();
     fileList_.clear();
-    fileList_.append(QUICK_PHRASE_CONFIG_FILE);
-    auto files = StandardPath::global().multiOpen(
-        StandardPath::Type::PkgData, QUICK_PHRASE_CONFIG_DIR, O_RDONLY,
-        filter::Suffix(".mb"));
+    fileList_.push_back(QUICK_PHRASE_CONFIG_FILE);
+    auto files = StandardPaths::global().locate(StandardPathsType::PkgData,
+                                                QUICK_PHRASE_CONFIG_DIR,
+                                                pathfilter::extension(".mb"));
 
     for (auto &file : files) {
-        fileList_.append(QString::fromLocal8Bit(
-            stringutils::joinPath(QUICK_PHRASE_CONFIG_DIR, 
file.first).data()));
+        fileList_.push_back(std::filesystem::path(QUICK_PHRASE_CONFIG_DIR) /
+                            file.first);
     }
 
     endResetModel();
 }
 
 int fcitx::FileListModel::findFile(const QString &lastFileName) {
-    int idx = fileList_.indexOf(lastFileName);
-    if (idx < 0) {
+    auto iter = std::ranges::find(
+        fileList_, std::filesystem::path(lastFileName.toStdString()));
+    if (iter == fileList_.end()) {
         return 0;
     }
-    return idx;
+    return std::distance(fileList_.begin(), iter);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/filelistmodel.h 
new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/filelistmodel.h
--- old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/filelistmodel.h  2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/filelistmodel.h 2025-06-16 
09:21:11.000000000 +0200
@@ -9,6 +9,8 @@
 
 #include <QAbstractListModel>
 #include <QStringList>
+#include <filesystem>
+#include <vector>
 
 #define QUICK_PHRASE_CONFIG_DIR "data/quickphrase.d"
 #define QUICK_PHRASE_CONFIG_FILE "data/QuickPhrase.mb"
@@ -29,7 +31,7 @@
     int findFile(const QString &lastFileName);
 
 private:
-    QStringList fileList_;
+    std::vector<std::filesystem::path> fileList_;
 };
 } // namespace fcitx
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/model.cpp 
new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/model.cpp
--- old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/model.cpp        2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/model.cpp       2025-06-16 
09:21:11.000000000 +0200
@@ -5,16 +5,27 @@
  *
  */
 #include "model.h"
-#include "editor.h"
 #include "filelistmodel.h"
+#include <QAbstractItemModel>
 #include <QApplication>
 #include <QFile>
+#include <QFuture>
 #include <QFutureWatcher>
+#include <QObject>
+#include <QString>
+#include <QTextStream>
+#include <Qt>
 #include <QtConcurrentRun>
+#include <fcitx-utils/fs.h>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
+#include <fcitx-utils/macros.h>
+#include <fcitx-utils/standardpaths.h>
+#include <fcitx-utils/stringutils.h>
 #include <fcitx-utils/utf8.h>
-#include <fcntl.h>
+#include <optional>
+#include <string>
+#include <string_view>
+#include <utility>
 
 namespace fcitx {
 
@@ -22,11 +33,10 @@
 
 std::optional<std::pair<std::string, std::string>>
 parseLine(const std::string &strBuf) {
-    auto [start, end] = stringutils::trimInplace(strBuf);
-    if (start == end) {
+    auto text = stringutils::trimView(strBuf);
+    if (text.empty()) {
         return std::nullopt;
     }
-    std::string_view text(strBuf.data() + start, end - start);
     if (!utf8::validate(text)) {
         return std::nullopt;
     }
@@ -57,24 +67,26 @@
 
 } // namespace
 
-typedef QPair<QString, QString> ItemType;
+using ItemType = std::pair<QString, QString>;
 
 QuickPhraseModel::QuickPhraseModel(QObject *parent)
     : QAbstractTableModel(parent), needSave_(false), futureWatcher_(0) {}
 
 QuickPhraseModel::~QuickPhraseModel() {}
 
-bool QuickPhraseModel::needSave() { return needSave_; }
+bool QuickPhraseModel::needSave() const { return needSave_; }
 
 QVariant QuickPhraseModel::headerData(int section, Qt::Orientation orientation,
                                       int role) const {
     if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
-        if (section == 0)
+        if (section == 0) {
             return _("Keyword");
-        else if (section == 1)
+        }
+        if (section == 1) {
             return _("Phrase");
+        }
     }
-    return QVariant();
+    return {};
 }
 
 int QuickPhraseModel::rowCount(const QModelIndex &parent) const {
@@ -93,7 +105,8 @@
             index.row() < list_.count()) {
             if (index.column() == 0) {
                 return list_[index.row()].first;
-            } else if (index.column() == 1) {
+            }
+            if (index.column() == 1) {
                 return list_[index.row()].second;
             }
         }
@@ -103,15 +116,16 @@
 
 void QuickPhraseModel::addItem(const QString &macro, const QString &word) {
     beginInsertRows(QModelIndex(), list_.size(), list_.size());
-    list_.append(QPair<QString, QString>(macro, word));
+    list_.append({macro, word});
     endInsertRows();
     setNeedSave(true);
 }
 
 void QuickPhraseModel::deleteItem(int row) {
-    if (row >= list_.count())
+    if (row >= list_.count()) {
         return;
-    QPair<QString, QString> item = list_.at(row);
+    }
+    auto item = list_.at(row);
     QString key = item.first;
     beginRemoveRows(QModelIndex(), row, row);
     list_.removeAt(row);
@@ -120,24 +134,27 @@
 }
 
 void QuickPhraseModel::deleteAllItem() {
-    if (list_.count())
+    if (list_.count()) {
         setNeedSave(true);
+    }
     beginResetModel();
     list_.clear();
     endResetModel();
 }
 
 Qt::ItemFlags QuickPhraseModel::flags(const QModelIndex &index) const {
-    if (!index.isValid())
+    if (!index.isValid()) {
         return {};
+    }
 
     return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 }
 
 bool QuickPhraseModel::setData(const QModelIndex &index, const QVariant &value,
                                int role) {
-    if (role != Qt::EditRole)
+    if (role != Qt::EditRole) {
         return false;
+    }
 
     if (index.column() == 0) {
         list_[index.row()].first = value.toString();
@@ -145,14 +162,15 @@
         Q_EMIT dataChanged(index, index);
         setNeedSave(true);
         return true;
-    } else if (index.column() == 1) {
+    }
+    if (index.column() == 1) {
         list_[index.row()].second = value.toString();
 
         Q_EMIT dataChanged(index, index);
         setNeedSave(true);
         return true;
-    } else
-        return false;
+    }
+    return false;
 }
 
 void QuickPhraseModel::load(const QString &file, bool append) {
@@ -164,8 +182,9 @@
     if (!append) {
         list_.clear();
         setNeedSave(false);
-    } else
+    } else {
         setNeedSave(true);
+    }
     futureWatcher_ = new QFutureWatcher<QStringPairList>(this);
     futureWatcher_->setFuture(
         QtConcurrent::run([this, file]() { return parse(file); }));
@@ -174,15 +193,14 @@
 }
 
 QStringPairList QuickPhraseModel::parse(const QString &file) {
-    QByteArray fileNameArray = file.toLocal8Bit();
     QStringPairList list;
 
     do {
-        auto fp = fcitx::StandardPath::global().open(
-            fcitx::StandardPath::Type::PkgData, fileNameArray.constData(),
-            O_RDONLY);
-        if (fp.fd() < 0)
+        auto fp = fcitx::StandardPaths::global().open(
+            fcitx::StandardPathsType::PkgData, file.toStdString());
+        if (!fp.isValid()) {
             break;
+        }
 
         QFile file;
         if (!file.open(fp.fd(), QFile::ReadOnly)) {
@@ -192,8 +210,9 @@
         while (!(line = file.readLine()).isNull()) {
             auto l = line.toStdString();
             auto parsed = parseLine(l);
-            if (!parsed)
+            if (!parsed) {
                 continue;
+            }
             auto [key, value] = *parsed;
             if (key.empty() || value.empty()) {
                 continue;
@@ -203,7 +222,7 @@
         }
 
         file.close();
-    } while (0);
+    } while (false);
 
     return list;
 }
@@ -238,8 +257,9 @@
     while (!(s = stream.readLine()).isNull()) {
         auto line = s.toStdString();
         auto parsed = parseLine(line);
-        if (!parsed)
+        if (!parsed) {
             continue;
+        }
         auto [key, value] = *parsed;
         if (key.empty() || value.empty()) {
             continue;
@@ -252,13 +272,11 @@
 
 bool QuickPhraseModel::saveData(const QString &file,
                                 const QStringPairList &list) {
-    QByteArray filenameArray = file.toLocal8Bit();
-    fs::makePath(stringutils::joinPath(
-        StandardPath::global().userDirectory(StandardPath::Type::PkgData),
-        QUICK_PHRASE_CONFIG_DIR));
-    return StandardPath::global().safeSave(
-        StandardPath::Type::PkgData, filenameArray.constData(),
-        [&list](int fd) {
+    fs::makePath(
+        StandardPaths::global().userDirectory(StandardPathsType::PkgData) /
+        QUICK_PHRASE_CONFIG_DIR);
+    return StandardPaths::global().safeSave(
+        StandardPathsType::PkgData, file.toStdString(), [&list](int fd) {
             QFile tempFile;
             if (!tempFile.open(fd, QIODevice::WriteOnly)) {
                 return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/model.h 
new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/model.h
--- old/fcitx5-qt-5.1.9/qt6/quickphrase-editor/model.h  2025-01-23 
00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/quickphrase-editor/model.h 2025-06-16 
09:21:11.000000000 +0200
@@ -9,13 +9,18 @@
 
 #include <QAbstractTableModel>
 #include <QFutureWatcher>
+#include <QList>
+#include <QObject>
 #include <QSet>
 #include <QTextStream>
+#include <QVariant>
+#include <Qt>
+#include <utility>
 
 class QFile;
 namespace fcitx {
 
-typedef QList<QPair<QString, QString>> QStringPairList;
+using QStringPairList = QList<std::pair<QString, QString>>;
 
 class QuickPhraseModel : public QAbstractTableModel {
     Q_OBJECT
@@ -39,7 +44,7 @@
     void deleteAllItem();
     QFutureWatcher<bool> *save(const QString &file);
     void saveDataToStream(QTextStream &dev);
-    bool needSave();
+    bool needSave() const;
 
 Q_SIGNALS:
     void needSaveChanged(bool needSave);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt6/widgetsaddons/fcitxqtconfiguifactory.cpp 
new/fcitx5-qt-5.1.10/qt6/widgetsaddons/fcitxqtconfiguifactory.cpp
--- old/fcitx5-qt-5.1.9/qt6/widgetsaddons/fcitxqtconfiguifactory.cpp    
2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/widgetsaddons/fcitxqtconfiguifactory.cpp   
2025-06-16 09:21:11.000000000 +0200
@@ -7,14 +7,16 @@
 #include "fcitxqtconfiguifactory.h"
 #include "fcitxqtconfiguifactory_p.h"
 #include "fcitxqtconfiguiplugin.h"
-
 #include <QDebug>
 #include <QDir>
+#include <QLatin1String>
 #include <QLibrary>
+#include <QObject>
 #include <QPluginLoader>
 #include <QStandardPaths>
 #include <fcitx-utils/i18n.h>
-#include <fcitx-utils/standardpath.h>
+#include <fcitx-utils/standardpaths.h>
+#include <filesystem>
 
 namespace fcitx {
 
@@ -50,12 +52,12 @@
     Q_D(FcitxQtConfigUIFactory);
 
     auto path = normalizePath(file);
-    auto loader = d->plugins_.value(path);
+    auto *loader = d->plugins_.value(path);
     if (!loader) {
         return nullptr;
     }
 
-    auto instance =
+    auto *instance =
         qobject_cast<FcitxQtConfigUIFactoryInterface *>(loader->instance());
     if (!instance) {
         return nullptr;
@@ -71,39 +73,27 @@
 }
 
 void FcitxQtConfigUIFactoryPrivate::scan() {
-    fcitx::StandardPath::global().scanFiles(
-        fcitx::StandardPath::Type::Addon, "qt6",
-        [this](const std::string &path, const std::string &dirPath, bool user) 
{
-            do {
-                if (user) {
-                    break;
-                }
-
-                QDir dir(QString::fromLocal8Bit(dirPath.c_str()));
-                QFileInfo fi(
-                    dir.filePath(QString::fromLocal8Bit(path.c_str())));
-
-                QString filePath = fi.filePath(); // file name with path
-                QString fileName = fi.fileName(); // just file name
-
-                if (!QLibrary::isLibrary(filePath)) {
-                    break;
-                }
-
-                QPluginLoader *loader = new QPluginLoader(filePath, this);
-                if (loader->metaData().value("IID") !=
-                    QLatin1String(FcitxQtConfigUIFactoryInterface_iid)) {
-                    delete loader;
-                    break;
-                }
-                auto metadata = 
loader->metaData().value("MetaData").toObject();
-                auto files = 
metadata.value("files").toVariant().toStringList();
-                auto addon = metadata.value("addon").toVariant().toString();
-                for (const auto &file : files) {
-                    plugins_[addon + "/" + file] = loader;
-                }
-            } while (0);
-            return true;
-        });
+    auto addonFiles = fcitx::StandardPaths::global().locate(
+        fcitx::StandardPathsType::Addon, "qt6",
+        [](const std::filesystem::path &path) {
+            return QLibrary::isLibrary(QString::fromStdString(path));
+        },
+        StandardPathsMode::System);
+
+    for (const auto &[_, filePath] : addonFiles) {
+        auto *loader =
+            new QPluginLoader(QString::fromStdString(filePath), this);
+        if (loader->metaData().value("IID") !=
+            QLatin1String(FcitxQtConfigUIFactoryInterface_iid)) {
+            delete loader;
+            continue;
+        }
+        auto metadata = loader->metaData().value("MetaData").toObject();
+        auto files = metadata.value("files").toVariant().toStringList();
+        auto addon = metadata.value("addon").toVariant().toString();
+        for (const auto &file : files) {
+            plugins_[addon + "/" + file] = loader;
+        }
+    }
 }
 } // namespace fcitx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-qt-5.1.9/qt6/widgetsaddons/fcitxqtconfiguifactory_p.h 
new/fcitx5-qt-5.1.10/qt6/widgetsaddons/fcitxqtconfiguifactory_p.h
--- old/fcitx5-qt-5.1.9/qt6/widgetsaddons/fcitxqtconfiguifactory_p.h    
2025-01-23 00:27:37.000000000 +0100
+++ new/fcitx5-qt-5.1.10/qt6/widgetsaddons/fcitxqtconfiguifactory_p.h   
2025-06-16 09:21:11.000000000 +0200
@@ -7,16 +7,17 @@
 #define _WIDGETSADDONS_FCITXQTCONFIGUIFACTORY_P_H_
 
 #include "fcitxqtconfiguifactory.h"
+#include <QMap>
 #include <QObject>
 #include <QPluginLoader>
-#include <qpluginloader.h>
+#include <QString>
 
 namespace fcitx {
 
 class FcitxQtConfigUIFactoryPrivate : public QObject {
     Q_OBJECT
 public:
-    FcitxQtConfigUIFactoryPrivate(FcitxQtConfigUIFactory *conn);
+    FcitxQtConfigUIFactoryPrivate(FcitxQtConfigUIFactory *factory);
     virtual ~FcitxQtConfigUIFactoryPrivate();
     FcitxQtConfigUIFactory *const q_ptr;
     Q_DECLARE_PUBLIC(FcitxQtConfigUIFactory);

Reply via email to