File fix-remove-paths-warnings.patch of Package fcitx-qt5

diff --git a/platforminputcontext/fcitxwatcher.cpp b/platforminputcontext/fcitxwatcher.cpp
index 1a2b4baa215237012fdd0c62e793d786d4e58b0c..6165a5bdd45146efc83545982cf37a5927c5613e 100644
--- a/platforminputcontext/fcitxwatcher.cpp
+++ b/platforminputcontext/fcitxwatcher.cpp
@@ -256,8 +256,12 @@ void FcitxWatcher::watchSocketFile() {
 }
 
 void FcitxWatcher::unwatchSocketFile() {
-    m_fsWatcher->removePaths(m_fsWatcher->files());
-    m_fsWatcher->removePaths(m_fsWatcher->directories());
+    if (!m_fsWatcher->files().isEmpty()) {
+        m_fsWatcher->removePaths(m_fsWatcher->files());
+    }
+    if (!m_fsWatcher->directories().isEmpty()) {
+        m_fsWatcher->removePaths(m_fsWatcher->directories());
+    }
     m_fsWatcher->disconnect(SIGNAL(fileChanged(QString)));
     m_fsWatcher->disconnect(SIGNAL(directoryChanged(QString)));
 }

openSUSE Build Service is sponsored by