Skip to content

Commit

Permalink
further reduce patch
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Nov 8, 2024
1 parent 3322a1e commit aa16c2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 92 deletions.
2 changes: 1 addition & 1 deletion fcitx5
91 changes: 0 additions & 91 deletions patches/fcitx5.patch
Original file line number Diff line number Diff line change
Expand Up @@ -69,47 +69,6 @@ index dd67e07d..2b942b28 100644
if (ENABLE_DBUS)
target_link_libraries(Fcitx5Utils PRIVATE PkgConfig::DBus)
endif()
diff --git a/src/lib/fcitx-utils/misc.cpp b/src/lib/fcitx-utils/misc.cpp
index e31993cb..bf53b10d 100644
--- a/src/lib/fcitx-utils/misc.cpp
+++ b/src/lib/fcitx-utils/misc.cpp
@@ -20,12 +20,11 @@
#if defined(__FreeBSD__)
#include <sys/user.h>
#endif
-#elif defined(__APPLE__)
-#include <libproc.h>
#endif

namespace fcitx {

+#if 0
void startProcess(const std::vector<std::string> &args,
const std::string &workingDirectory) {
/* exec command */
@@ -126,6 +125,7 @@ std::string getProcessName(pid_t pid) {
return {};
#endif
}
+#endif

ssize_t getline(UniqueCPtr<char> &lineptr, size_t *n, std::FILE *stream) {
auto *lineRawPtr = lineptr.release();
@@ -135,13 +135,7 @@ ssize_t getline(UniqueCPtr<char> &lineptr, size_t *n, std::FILE *stream) {
}

bool isInFlatpak() {
- static const bool flatpak = []() {
- if (checkBoolEnvVar("FCITX_OVERRIDE_FLATPAK")) {
- return true;
- }
- return fs::isreg("/.flatpak-info");
- }();
- return flatpak;
+ return false;
}

} // namespace fcitx
diff --git a/src/lib/fcitx/CMakeLists.txt b/src/lib/fcitx/CMakeLists.txt
index df15dd57..3c1d3ff2 100644
--- a/src/lib/fcitx/CMakeLists.txt
Expand Down Expand Up @@ -195,53 +154,3 @@ index ab1ce4df..106a010c 100644
if (BUILD_SPELL_DICT)
set(DICT_COMP_SRC
comp_spell_dict.cpp
diff --git a/src/modules/spell/spell.cpp b/src/modules/spell/spell.cpp
index cc3d951f..a4229234 100644
--- a/src/modules/spell/spell.cpp
+++ b/src/modules/spell/spell.cpp
@@ -7,7 +7,6 @@

#include "spell.h"
#include "fcitx-config/iniparser.h"
-#include "fcitx/addonmanager.h"
#include "config.h"
#include "spell-custom.h"
#ifdef ENABLE_ENCHANT
@@ -110,12 +109,6 @@ Spell::hintForDisplay(const std::string &language, SpellProvider provider,

return iter->second->hint(language, word, limit);
}
-
-class SpellModuleFactory : public AddonFactory {
- AddonInstance *create(AddonManager *manager) override {
- return new Spell(manager->instance());
- }
-};
} // namespace fcitx

FCITX_ADDON_FACTORY(fcitx::SpellModuleFactory)
diff --git a/src/modules/spell/spell.h b/src/modules/spell/spell.h
index 60778962..3cfa2db5 100644
--- a/src/modules/spell/spell.h
+++ b/src/modules/spell/spell.h
@@ -13,6 +13,7 @@
#include "fcitx-utils/i18n.h"
#include "fcitx/addonfactory.h"
#include "fcitx/addoninstance.h"
+#include "fcitx/addonmanager.h"
#include "fcitx/instance.h"
#include "spell_public.h"

@@ -104,6 +105,12 @@ public:
private:
Spell *parent_;
};
+
+class SpellModuleFactory : public AddonFactory {
+ AddonInstance *create(AddonManager *manager) override {
+ return new Spell(manager->instance());
+ }
+};
} // namespace fcitx

#endif // _FCITX_MODULES_SPELL_SPELL_H_

0 comments on commit aa16c2e

Please sign in to comment.