From 3b10305bec99c5897edbe2a30d29f98370b57a1c Mon Sep 17 00:00:00 2001 From: "shijie.chen" Date: Mon, 18 Mar 2024 09:51:25 +0800 Subject: [PATCH] [dev] Clean up unnecessary include --- gui/customphraseeditor/customphraseeditor.cpp | 5 ----- gui/customphraseeditor/customphrasemodel.cpp | 4 ---- gui/customphraseeditor/customphrasemodel.h | 4 ---- gui/customphraseeditor/editordialog.cpp | 1 - gui/customphraseeditor/editordialog.h | 1 - gui/pinyindictmanager/browserdialog.cpp | 6 ------ gui/pinyindictmanager/browserdialog.h | 4 ---- gui/pinyindictmanager/filedownloader.cpp | 2 -- gui/pinyindictmanager/filedownloader.h | 5 ----- gui/pinyindictmanager/filelistmodel.cpp | 2 -- gui/pinyindictmanager/filelistmodel.h | 1 - gui/pinyindictmanager/pinyindictmanager.cpp | 3 --- gui/pinyindictmanager/pipeline.h | 2 -- gui/pinyindictmanager/pipelinejob.h | 1 - gui/pinyindictmanager/processrunner.cpp | 4 ---- gui/pinyindictmanager/processrunner.h | 3 --- gui/pinyindictmanager/renamefile.cpp | 6 ------ gui/pinyindictmanager/renamefile.h | 6 ------ im/pinyin/customphrase.cpp | 2 -- im/pinyin/pinyin.cpp | 1 - im/pinyin/pinyin.h | 6 ------ im/table/engine.cpp | 8 -------- im/table/ime.cpp | 1 - im/table/state.cpp | 2 -- im/table/state.h | 1 - modules/chttrans/chttrans-native.cpp | 1 - modules/chttrans/chttrans.cpp | 2 -- modules/cloudpinyin/cloudpinyin.cpp | 7 ------- modules/cloudpinyin/cloudpinyin.h | 2 -- modules/cloudpinyin/fetch.cpp | 3 --- modules/fullwidth/fullwidth.cpp | 3 --- modules/fullwidth/fullwidth.h | 1 - modules/pinyinhelper/pinyinhelper.cpp | 4 ---- modules/pinyinhelper/pinyinhelper.h | 2 -- modules/pinyinhelper/pinyinlookup.cpp | 1 - modules/punctuation/punctuation.cpp | 3 --- modules/punctuation/punctuation.h | 2 -- test/testchttrans.cpp | 1 - test/testcloudpinyin.cpp | 2 -- test/testcustomphrase.cpp | 1 - test/testfullwidth.cpp | 2 -- test/testpinyin.cpp | 1 - test/testpinyinhelper.cpp | 1 - test/testpunctuation.cpp | 2 -- test/testtable.cpp | 1 - tools/scel2org5.cpp | 2 -- 46 files changed, 125 deletions(-) diff --git a/gui/customphraseeditor/customphraseeditor.cpp b/gui/customphraseeditor/customphraseeditor.cpp index 6cbef2ec..0da1e020 100644 --- a/gui/customphraseeditor/customphraseeditor.cpp +++ b/gui/customphraseeditor/customphraseeditor.cpp @@ -7,15 +7,10 @@ #include "customphraseeditor.h" #include "customphrasemodel.h" #include "editordialog.h" -#include -#include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/gui/customphraseeditor/customphrasemodel.cpp b/gui/customphraseeditor/customphrasemodel.cpp index 56f72ac3..3a8a9925 100644 --- a/gui/customphraseeditor/customphrasemodel.cpp +++ b/gui/customphraseeditor/customphrasemodel.cpp @@ -5,16 +5,12 @@ * */ #include "customphrasemodel.h" -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/gui/customphraseeditor/customphrasemodel.h b/gui/customphraseeditor/customphrasemodel.h index 19b2fd81..c02dfe1e 100644 --- a/gui/customphraseeditor/customphrasemodel.h +++ b/gui/customphraseeditor/customphrasemodel.h @@ -10,10 +10,6 @@ #include "../../im/pinyin/customphrase.h" #include #include -#include -#include -#include -#include namespace fcitx { diff --git a/gui/customphraseeditor/editordialog.cpp b/gui/customphraseeditor/editordialog.cpp index b4454104..22961fcd 100644 --- a/gui/customphraseeditor/editordialog.cpp +++ b/gui/customphraseeditor/editordialog.cpp @@ -6,7 +6,6 @@ */ #include "editordialog.h" -#include namespace fcitx { EditorDialog::EditorDialog(QWidget *parent) : QDialog(parent) { setupUi(this); } diff --git a/gui/customphraseeditor/editordialog.h b/gui/customphraseeditor/editordialog.h index 0a53429b..0c8277f1 100644 --- a/gui/customphraseeditor/editordialog.h +++ b/gui/customphraseeditor/editordialog.h @@ -8,7 +8,6 @@ #define _QUICKPHRASE_EDITOR_EDITORDIALOG_H_ #include "ui_editordialog.h" -#include namespace fcitx { class EditorDialog : public QDialog, public Ui::EditorDialog { diff --git a/gui/pinyindictmanager/browserdialog.cpp b/gui/pinyindictmanager/browserdialog.cpp index 512dd13e..e90a3e0f 100644 --- a/gui/pinyindictmanager/browserdialog.cpp +++ b/gui/pinyindictmanager/browserdialog.cpp @@ -6,14 +6,8 @@ */ #include "browserdialog.h" -#include "config.h" #include "filedownloader.h" #include "guicommon.h" -#include -#include -#include -#include -#include #include #include diff --git a/gui/pinyindictmanager/browserdialog.h b/gui/pinyindictmanager/browserdialog.h index 38578b0b..f68e0bb4 100644 --- a/gui/pinyindictmanager/browserdialog.h +++ b/gui/pinyindictmanager/browserdialog.h @@ -7,15 +7,11 @@ #ifndef _PINYINDICTMANAGER_BROWSERDIALOG_H_ #define _PINYINDICTMANAGER_BROWSERDIALOG_H_ -#include "config.h" #ifdef USE_WEBKIT #include "ui_browserdialog_webkit.h" #else #include "ui_browserdialog.h" #endif -#include -#include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/filedownloader.cpp b/gui/pinyindictmanager/filedownloader.cpp index fd9bf93b..8183411e 100644 --- a/gui/pinyindictmanager/filedownloader.cpp +++ b/gui/pinyindictmanager/filedownloader.cpp @@ -5,10 +5,8 @@ * */ -#include #include "filedownloader.h" -#include "guicommon.h" #include namespace fcitx { diff --git a/gui/pinyindictmanager/filedownloader.h b/gui/pinyindictmanager/filedownloader.h index 16b888d0..504c2f64 100644 --- a/gui/pinyindictmanager/filedownloader.h +++ b/gui/pinyindictmanager/filedownloader.h @@ -8,12 +8,7 @@ #define _PINYINDICTMANAGER_FILEDOWNLOADER_H_ #include "pipelinejob.h" -#include -#include -#include #include -#include -#include #include namespace fcitx { diff --git a/gui/pinyindictmanager/filelistmodel.cpp b/gui/pinyindictmanager/filelistmodel.cpp index 7c3d1906..7c6b419a 100644 --- a/gui/pinyindictmanager/filelistmodel.cpp +++ b/gui/pinyindictmanager/filelistmodel.cpp @@ -6,10 +6,8 @@ */ #include "filelistmodel.h" -#include #include #include -#include #include namespace fcitx { diff --git a/gui/pinyindictmanager/filelistmodel.h b/gui/pinyindictmanager/filelistmodel.h index dd645605..2d039afa 100644 --- a/gui/pinyindictmanager/filelistmodel.h +++ b/gui/pinyindictmanager/filelistmodel.h @@ -8,7 +8,6 @@ #define _PINYINDICTMANAGER_FILELISTMODEL_H_ #include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/pinyindictmanager.cpp b/gui/pinyindictmanager/pinyindictmanager.cpp index d9a43dca..cf841969 100644 --- a/gui/pinyindictmanager/pinyindictmanager.cpp +++ b/gui/pinyindictmanager/pinyindictmanager.cpp @@ -6,15 +6,12 @@ */ #include "pinyindictmanager.h" #include "config.h" -#include "log.h" #include "processrunner.h" #include "renamefile.h" #include #include #include #include -#include -#include #include #include diff --git a/gui/pinyindictmanager/pipeline.h b/gui/pinyindictmanager/pipeline.h index ab5b8d58..a46da454 100644 --- a/gui/pinyindictmanager/pipeline.h +++ b/gui/pinyindictmanager/pipeline.h @@ -8,8 +8,6 @@ #define _PINYINDICTMANAGER_PIPELINE_H_ #include "pipelinejob.h" -#include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/pipelinejob.h b/gui/pinyindictmanager/pipelinejob.h index d5beebd3..0c09c331 100644 --- a/gui/pinyindictmanager/pipelinejob.h +++ b/gui/pinyindictmanager/pipelinejob.h @@ -8,7 +8,6 @@ #define _PINYINDICTMANAGER_PIPELINEJOB_H_ #include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/processrunner.cpp b/gui/pinyindictmanager/processrunner.cpp index 5d324093..e5ba3f41 100644 --- a/gui/pinyindictmanager/processrunner.cpp +++ b/gui/pinyindictmanager/processrunner.cpp @@ -5,13 +5,9 @@ * */ #include "processrunner.h" -#include "guicommon.h" #include "log.h" -#include -#include #include #include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/processrunner.h b/gui/pinyindictmanager/processrunner.h index d70a8aeb..3c7443a0 100644 --- a/gui/pinyindictmanager/processrunner.h +++ b/gui/pinyindictmanager/processrunner.h @@ -8,10 +8,7 @@ #define _PINYINDICTMANAGER_PROCESSRUNNER_H_ #include "pipelinejob.h" -#include -#include #include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/renamefile.cpp b/gui/pinyindictmanager/renamefile.cpp index 18d4a261..847a0169 100644 --- a/gui/pinyindictmanager/renamefile.cpp +++ b/gui/pinyindictmanager/renamefile.cpp @@ -5,13 +5,7 @@ * */ #include "renamefile.h" -#include "guicommon.h" -#include "log.h" -#include -#include -#include #include -#include namespace fcitx { diff --git a/gui/pinyindictmanager/renamefile.h b/gui/pinyindictmanager/renamefile.h index 8e014982..ac93c231 100644 --- a/gui/pinyindictmanager/renamefile.h +++ b/gui/pinyindictmanager/renamefile.h @@ -8,12 +8,6 @@ #define _PINYINDICTMANAGER_RENAMEFILE_H_ #include "pipelinejob.h" -#include -#include -#include -#include -#include -#include namespace fcitx { diff --git a/im/pinyin/customphrase.cpp b/im/pinyin/customphrase.cpp index ed6d0e17..96f1f3f3 100644 --- a/im/pinyin/customphrase.cpp +++ b/im/pinyin/customphrase.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -18,7 +17,6 @@ #include #include #include -#include namespace fcitx { diff --git a/im/pinyin/pinyin.cpp b/im/pinyin/pinyin.cpp index 81660408..93420c6e 100644 --- a/im/pinyin/pinyin.cpp +++ b/im/pinyin/pinyin.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/im/pinyin/pinyin.h b/im/pinyin/pinyin.h index 35226643..93bb8fa0 100644 --- a/im/pinyin/pinyin.h +++ b/im/pinyin/pinyin.h @@ -13,16 +13,12 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -254,8 +250,6 @@ FCITX_CONFIGURATION( HiddenOption firstRun{this, "FirstRun", "FirstRun", true};) class PinyinState; -struct EventSourceTime; -class CandidateList; class PinyinEngine final : public InputMethodEngineV3 { public: diff --git a/im/table/engine.cpp b/im/table/engine.cpp index ac6b7ee5..59f67ebe 100644 --- a/im/table/engine.cpp +++ b/im/table/engine.cpp @@ -9,16 +9,13 @@ #include "context.h" #include "ime.h" #include "state.h" -#include #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -27,15 +24,10 @@ #include #include #include -#include -#include #include #include -#include #include #include -#include -#include namespace fcitx { diff --git a/im/table/ime.cpp b/im/table/ime.cpp index 7925ce6b..c060de15 100644 --- a/im/table/ime.cpp +++ b/im/table/ime.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/im/table/state.cpp b/im/table/state.cpp index b955dfc5..2670aa71 100644 --- a/im/table/state.cpp +++ b/im/table/state.cpp @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include namespace fcitx { diff --git a/im/table/state.h b/im/table/state.h index 86e1e4da..3c72953c 100644 --- a/im/table/state.h +++ b/im/table/state.h @@ -22,7 +22,6 @@ enum class TableMode { Punctuation, }; -struct EventSourceTime; class TableState : public InputContextProperty { public: diff --git a/modules/chttrans/chttrans-native.cpp b/modules/chttrans/chttrans-native.cpp index 77617713..e16209a8 100644 --- a/modules/chttrans/chttrans-native.cpp +++ b/modules/chttrans/chttrans-native.cpp @@ -5,7 +5,6 @@ * */ #include "chttrans-native.h" -#include "config.h" #include #include #include diff --git a/modules/chttrans/chttrans.cpp b/modules/chttrans/chttrans.cpp index 5a57c598..3129deeb 100644 --- a/modules/chttrans/chttrans.cpp +++ b/modules/chttrans/chttrans.cpp @@ -8,12 +8,10 @@ #include "chttrans.h" #include #include -#include #include #include #include #include -#include #ifdef ENABLE_OPENCC #include "chttrans-opencc.h" #endif diff --git a/modules/cloudpinyin/cloudpinyin.cpp b/modules/cloudpinyin/cloudpinyin.cpp index 4a2e04b3..35899a56 100644 --- a/modules/cloudpinyin/cloudpinyin.cpp +++ b/modules/cloudpinyin/cloudpinyin.cpp @@ -7,15 +7,8 @@ #include "cloudpinyin.h" #include -#include #include -#include -#include -#include #include -#include -#include -#include using namespace fcitx; diff --git a/modules/cloudpinyin/cloudpinyin.h b/modules/cloudpinyin/cloudpinyin.h index 7a139557..ab47201c 100644 --- a/modules/cloudpinyin/cloudpinyin.h +++ b/modules/cloudpinyin/cloudpinyin.h @@ -15,10 +15,8 @@ #include #include #include -#include #include #include -#include FCITX_CONFIG_ENUM(CloudPinyinBackend, Google, GoogleCN, Baidu); FCITX_CONFIGURATION( diff --git a/modules/cloudpinyin/fetch.cpp b/modules/cloudpinyin/fetch.cpp index cc797f67..f35dcfe0 100644 --- a/modules/cloudpinyin/fetch.cpp +++ b/modules/cloudpinyin/fetch.cpp @@ -8,9 +8,6 @@ #include "cloudpinyin.h" #include #include -#include -#include -#include using namespace fcitx; diff --git a/modules/fullwidth/fullwidth.cpp b/modules/fullwidth/fullwidth.cpp index db8b6b99..c80e804e 100644 --- a/modules/fullwidth/fullwidth.cpp +++ b/modules/fullwidth/fullwidth.cpp @@ -9,14 +9,11 @@ #include "notifications_public.h" #include #include -#include #include #include #include -#include #include #include -#include using namespace fcitx; diff --git a/modules/fullwidth/fullwidth.h b/modules/fullwidth/fullwidth.h index 800b01ae..ae903bed 100644 --- a/modules/fullwidth/fullwidth.h +++ b/modules/fullwidth/fullwidth.h @@ -18,7 +18,6 @@ FCITX_CONFIGURATION(FullWidthConfig, fcitx::Option hotkey{ this, "Hotkey", _("Toggle key")};) -class ToggleAction; class Fullwidth final : public fcitx::AddonInstance { class ToggleAction : public fcitx::Action { diff --git a/modules/pinyinhelper/pinyinhelper.cpp b/modules/pinyinhelper/pinyinhelper.cpp index d9b4f634..7699957e 100644 --- a/modules/pinyinhelper/pinyinhelper.cpp +++ b/modules/pinyinhelper/pinyinhelper.cpp @@ -8,15 +8,11 @@ #include "pinyinhelper.h" #include #include -#include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/modules/pinyinhelper/pinyinhelper.h b/modules/pinyinhelper/pinyinhelper.h index 6ebc95f4..84bd2077 100644 --- a/modules/pinyinhelper/pinyinhelper.h +++ b/modules/pinyinhelper/pinyinhelper.h @@ -10,12 +10,10 @@ #include "pinyinhelper_public.h" #include "pinyinlookup.h" #include "stroke.h" -#include #include #include #include #include -#include #include namespace fcitx { diff --git a/modules/pinyinhelper/pinyinlookup.cpp b/modules/pinyinhelper/pinyinlookup.cpp index 2c2853be..2e22a328 100644 --- a/modules/pinyinhelper/pinyinlookup.cpp +++ b/modules/pinyinhelper/pinyinlookup.cpp @@ -7,7 +7,6 @@ */ #include "pinyinlookup.h" -#include #include #include #include diff --git a/modules/punctuation/punctuation.cpp b/modules/punctuation/punctuation.cpp index c7a0c4b0..41fd3051 100644 --- a/modules/punctuation/punctuation.cpp +++ b/modules/punctuation/punctuation.cpp @@ -15,13 +15,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include using namespace fcitx; diff --git a/modules/punctuation/punctuation.h b/modules/punctuation/punctuation.h index 12db57cc..c4ebc6b1 100644 --- a/modules/punctuation/punctuation.h +++ b/modules/punctuation/punctuation.h @@ -9,7 +9,6 @@ #include "punctuation_public.h" #include -#include #include #include #include @@ -17,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/test/testchttrans.cpp b/test/testchttrans.cpp index 7be1704a..aa8ce3c0 100644 --- a/test/testchttrans.cpp +++ b/test/testchttrans.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include using namespace fcitx; diff --git a/test/testcloudpinyin.cpp b/test/testcloudpinyin.cpp index 2b35949a..25a360c1 100644 --- a/test/testcloudpinyin.cpp +++ b/test/testcloudpinyin.cpp @@ -5,8 +5,6 @@ * */ #include "cloudpinyin_public.h" -#include "testdir.h" -#include #include #include #include diff --git a/test/testcustomphrase.cpp b/test/testcustomphrase.cpp index d1bf9d84..5d45d16e 100644 --- a/test/testcustomphrase.cpp +++ b/test/testcustomphrase.cpp @@ -1,6 +1,5 @@ #include "../im/pinyin/customphrase.h" #include -#include #include #include diff --git a/test/testfullwidth.cpp b/test/testfullwidth.cpp index b547b914..829b9103 100644 --- a/test/testfullwidth.cpp +++ b/test/testfullwidth.cpp @@ -13,10 +13,8 @@ #include #include #include -#include #include #include -#include #include using namespace fcitx; diff --git a/test/testpinyin.cpp b/test/testpinyin.cpp index 4f7f1d08..71ea825b 100644 --- a/test/testpinyin.cpp +++ b/test/testpinyin.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include using namespace fcitx; diff --git a/test/testpinyinhelper.cpp b/test/testpinyinhelper.cpp index fe49e470..888046d9 100644 --- a/test/testpinyinhelper.cpp +++ b/test/testpinyinhelper.cpp @@ -9,7 +9,6 @@ #include #include #include -#include int main() { setenv("FCITX_ADDON_DIRS", TESTING_BINARY_DIR "/modules/pinyinhelper", 1); diff --git a/test/testpunctuation.cpp b/test/testpunctuation.cpp index 7e446964..4213af37 100644 --- a/test/testpunctuation.cpp +++ b/test/testpunctuation.cpp @@ -8,8 +8,6 @@ #include "testdir.h" #include #include -#include -#include int main() { setenv("SKIP_FCITX_PATH", "1", 1); diff --git a/test/testtable.cpp b/test/testtable.cpp index 5a42f8a1..3aec6317 100644 --- a/test/testtable.cpp +++ b/test/testtable.cpp @@ -15,7 +15,6 @@ #include #include #include -#include using namespace fcitx; diff --git a/tools/scel2org5.cpp b/tools/scel2org5.cpp index 87e48b6f..699f6b02 100644 --- a/tools/scel2org5.cpp +++ b/tools/scel2org5.cpp @@ -17,11 +17,9 @@ #endif #include #include -#include #include #include #include -#include #include #include