summaryrefslogtreecommitdiffstats
path: root/source/kde/kcm-fcitx
diff options
context:
space:
mode:
Diffstat (limited to 'source/kde/kcm-fcitx')
-rw-r--r--source/kde/kcm-fcitx/destroy-erroroverlay-with-base-widget.patch46
-rwxr-xr-xsource/kde/kcm-fcitx/kcm-fcitx.SlackBuild4
2 files changed, 49 insertions, 1 deletions
diff --git a/source/kde/kcm-fcitx/destroy-erroroverlay-with-base-widget.patch b/source/kde/kcm-fcitx/destroy-erroroverlay-with-base-widget.patch
new file mode 100644
index 000000000..dfb7c4513
--- /dev/null
+++ b/source/kde/kcm-fcitx/destroy-erroroverlay-with-base-widget.patch
@@ -0,0 +1,46 @@
+From b955a9fc005682ccde57aad3de68405e944f4cf7 Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt@gmail.com>
+Date: Fri, 11 Dec 2020 12:44:32 -0800
+Subject: [PATCH] Destroy the error erroroverlay with base widget
+
+Fix #19
+---
+ src/erroroverlay.cpp | 3 ++-
+ src/erroroverlay.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/erroroverlay.cpp b/src/erroroverlay.cpp
+index efef8f5..0f85fbd 100644
+--- a/src/erroroverlay.cpp
++++ b/src/erroroverlay.cpp
+@@ -60,7 +60,8 @@ ErrorOverlay::ErrorOverlay(QWidget *baseWidget, QWidget *parent) :
+ setAutoFillBackground(true);
+
+ m_BaseWidget->installEventFilter(this);
+-
++ // Destory overlay with the base widget.
++ connect(m_BaseWidget, SIGNAL(destroyed()), this, SLOT(deleteLater()));
+ connect(Fcitx::Global::instance(), SIGNAL(connectStatusChanged(bool)), this, SLOT(onConnectStatusChanged(bool)));
+ onConnectStatusChanged(Fcitx::Global::instance()->inputMethodProxy() != 0);
+ }
+diff --git a/src/erroroverlay.h b/src/erroroverlay.h
+index cf8aeaf..847b456 100644
+--- a/src/erroroverlay.h
++++ b/src/erroroverlay.h
+@@ -21,6 +21,7 @@
+ #define ERROROVERLAY_H
+
+ #include <QWidget>
++#include <QPointer>
+
+ class ErrorOverlay : public QWidget
+ {
+@@ -38,7 +39,7 @@ public slots:
+ void reposition();
+
+ private:
+- QWidget *m_BaseWidget;
++ QPointer<QWidget> m_BaseWidget;
+ bool m_enable;
+ };
+
diff --git a/source/kde/kcm-fcitx/kcm-fcitx.SlackBuild b/source/kde/kcm-fcitx/kcm-fcitx.SlackBuild
index 101a7f4fb..d7a39ed9a 100755
--- a/source/kde/kcm-fcitx/kcm-fcitx.SlackBuild
+++ b/source/kde/kcm-fcitx/kcm-fcitx.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=kcm-fcitx
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | cut -f 2- -d _ | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -86,6 +86,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+zcat $CWD/destroy-erroroverlay-with-base-widget.patch.gz | patch -p1 --verbose || exit 1
+
mkdir build
cd build
cmake -DCMAKE_C_FLAGS:STRING=${SLKCFLAGS} \