From 11141a5d65364b4daed2529cc6e81729d00425c7 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Sat, 1 Dec 2018 00:11:46 +0900 Subject: [PATCH 01/13] Use override keyword instead of virtual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仮想関数にはvirtual, override, finalのうち適切な一つを指定する。 例外を投げないデストラクタにnoexceptを指定する。 --- src/article/articleadmin.h | 28 +++++------ src/article/articleview.h | 32 ++++++------- src/article/articleviewbase.h | 77 +++++++++++++++---------------- src/article/articleviewetc.h | 76 +++++++++++++++--------------- src/article/articleviewinfo.h | 10 ++-- src/article/articleviewpopup.h | 40 +++++++++------- src/article/articleviewpreview.h | 6 +-- src/article/articleviewsearch.h | 29 ++++++------ src/article/drawareabase.h | 2 +- src/article/drawareapopup.h | 4 +- src/article/embeddedimage.h | 2 +- src/article/preference.cpp | 2 +- src/article/preference.h | 4 +- src/article/toolbar.h | 6 +-- src/article/toolbarsearch.h | 6 +-- src/article/toolbarsimple.h | 4 +- src/articleitemmenupref.h | 6 +-- src/articleitempref.h | 6 +-- src/bbslist/bbslistadmin.h | 24 +++++----- src/bbslist/bbslistview.h | 16 +++---- src/bbslist/bbslistviewbase.h | 53 +++++++++++---------- src/bbslist/columns.cpp | 5 +- src/bbslist/columns.h | 7 +-- src/bbslist/favoriteview.h | 8 ++-- src/bbslist/historyview.h | 8 ++-- src/bbslist/selectdialog.h | 6 +-- src/bbslist/selectlistview.h | 14 +++--- src/bbslist/toolbar.h | 10 ++-- src/board/boardadmin.h | 30 ++++++------ src/board/boardview.h | 16 +++---- src/board/boardviewbase.h | 79 ++++++++++++++++---------------- src/board/boardviewlog.h | 26 +++++------ src/board/boardviewnext.h | 24 +++++----- src/board/boardviewsidebar.h | 26 +++++------ src/board/preference.h | 6 +-- src/board/toolbar.h | 4 +- src/boarditemmenupref.h | 6 +-- src/boarditempref.h | 12 ++--- src/browserpref.h | 3 +- src/config/aboutconfig.h | 6 +-- src/config/aboutconfigdiag.h | 6 +-- src/config/configitems.cpp | 2 +- src/config/configitems.h | 2 +- src/control/buttonconfig.cpp | 2 +- src/control/buttonconfig.h | 7 +-- src/control/buttonpref.h | 18 ++++---- src/control/keyconfig.cpp | 2 +- src/control/keyconfig.h | 7 +-- src/control/keypref.h | 18 ++++---- src/control/mouseconfig.cpp | 2 +- src/control/mouseconfig.h | 11 +++-- src/control/mousekeyconf.cpp | 2 +- src/control/mousekeyconf.h | 2 +- src/control/mousepref.h | 18 ++++---- src/core.h | 4 +- src/cssmanager.h | 2 +- src/dbimg/delimgcachediag.h | 4 +- src/dbimg/delimgdiag.h | 5 +- src/dbimg/img.h | 6 +-- src/dbtree/article2ch.cpp | 2 +- src/dbtree/article2ch.h | 13 +++--- src/dbtree/article2chcompati.cpp | 2 +- src/dbtree/article2chcompati.h | 11 +++-- src/dbtree/articlebase.h | 4 +- src/dbtree/articlejbbs.h | 11 +++-- src/dbtree/articlelocal.h | 10 ++-- src/dbtree/articlemachi.cpp | 2 +- src/dbtree/articlemachi.h | 13 +++--- src/dbtree/board2ch.cpp | 2 +- src/dbtree/board2ch.h | 42 ++++++++--------- src/dbtree/board2chcompati.h | 41 +++++++++-------- src/dbtree/boardbase.h | 6 +-- src/dbtree/boardjbbs.h | 19 ++++---- src/dbtree/boardlocal.cpp | 2 +- src/dbtree/boardlocal.h | 28 +++++------ src/dbtree/boardmachi.h | 23 +++++----- src/dbtree/nodetree2ch.h | 6 +-- src/dbtree/nodetree2chcompati.h | 12 ++--- src/dbtree/nodetreebase.h | 6 +-- src/dbtree/nodetreedummy.h | 4 +- src/dbtree/nodetreejbbs.h | 8 ++-- src/dbtree/nodetreelocal.h | 4 +- src/dbtree/nodetreemachi.h | 16 +++---- src/dbtree/root.h | 4 +- src/dbtree/ruleloader.h | 10 ++-- src/dbtree/settingloader.h | 10 ++-- src/dndmanager.h | 2 +- src/fontcolorpref.cpp | 2 +- src/fontcolorpref.h | 8 ++-- src/globalabonepref.h | 5 +- src/globalabonethreadpref.h | 5 +- src/history/historysubmenu.h | 2 +- src/image/imageadmin.h | 72 ++++++++++++++--------------- src/image/imagearea.h | 4 +- src/image/imageareabase.h | 4 +- src/image/imageareaicon.h | 8 ++-- src/image/imageareapopup.h | 4 +- src/image/imageview.h | 26 +++++------ src/image/imageviewbase.h | 37 ++++++++------- src/image/imageviewicon.h | 16 +++---- src/image/imageviewpopup.h | 18 ++++---- src/image/imagewin.h | 40 ++++++++-------- src/image/preference.h | 2 +- src/jdlib/imgloader.h | 2 +- src/linkfiltermanager.h | 2 +- src/linkfilterpref.h | 2 +- src/livepref.h | 4 +- src/login2ch.h | 10 ++-- src/loginbe.h | 10 ++-- src/loginp2.h | 10 ++-- src/mainitempref.h | 6 +-- src/maintoolbar.h | 4 +- src/message/confirmdiag.h | 2 +- src/message/messageadmin.h | 31 +++++++------ src/message/messageview.h | 17 ++++--- src/message/messageviewbase.h | 39 ++++++++-------- src/message/messagewin.h | 42 ++++++++--------- src/message/post.h | 4 +- src/message/toolbar.h | 10 ++-- src/msgitempref.h | 6 +-- src/openurldiag.h | 4 +- src/passwdpref.h | 6 +-- src/privacypref.h | 4 +- src/proxypref.h | 6 +-- src/searchitempref.h | 6 +-- src/searchloader.h | 10 ++-- src/searchmanager.h | 4 +- src/setupwizard.h | 2 +- src/sidebaritempref.h | 6 +-- src/skeleton/aamenu.h | 8 ++-- src/skeleton/admin.h | 4 +- src/skeleton/backforwardbutton.h | 2 +- src/skeleton/compentry.cpp | 2 +- src/skeleton/compentry.h | 2 +- src/skeleton/detaildiag.h | 4 +- src/skeleton/dragnote.h | 4 +- src/skeleton/dragtreeview.h | 22 ++++----- src/skeleton/editcolumns.h | 2 +- src/skeleton/edittreeview.h | 24 +++++----- src/skeleton/editview.h | 12 ++--- src/skeleton/entry.h | 8 ++-- src/skeleton/filediag.h | 2 +- src/skeleton/hpaned.h | 14 +++--- src/skeleton/jdtoolbar.h | 4 +- src/skeleton/loadable.h | 4 +- src/skeleton/lockable.h | 2 +- src/skeleton/login.h | 2 +- src/skeleton/menubutton.h | 2 +- src/skeleton/msgdiag.h | 2 +- src/skeleton/panecontrol.cpp | 2 +- src/skeleton/panecontrol.h | 16 ++++--- src/skeleton/popupwin.h | 2 +- src/skeleton/popupwinbase.h | 8 ++-- src/skeleton/prefdiag.h | 2 +- src/skeleton/selectitempref.h | 8 ++-- src/skeleton/spinbutton.h | 6 ++- src/skeleton/tablabel.h | 14 +++--- src/skeleton/tabnote.cpp | 2 +- src/skeleton/tabnote.h | 16 +++---- src/skeleton/tabswitchbutton.cpp | 2 +- src/skeleton/tabswitchbutton.h | 4 +- src/skeleton/tabswitchmenu.h | 4 +- src/skeleton/textloader.h | 4 +- src/skeleton/toolbar.h | 2 +- src/skeleton/toolbarnote.h | 2 +- src/skeleton/treeviewbase.cpp | 2 +- src/skeleton/treeviewbase.h | 14 +++--- src/skeleton/undobuffer.h | 2 +- src/skeleton/view.h | 2 +- src/skeleton/viewnote.h | 2 +- src/skeleton/vpaned.h | 14 +++--- src/skeleton/window.h | 14 +++--- src/sound/playsound.h | 4 +- src/updatemanager.cpp | 2 +- src/updatemanager.h | 2 +- src/urlreplacemanager.h | 2 +- src/usrcmdmanager.h | 2 +- src/usrcmdpref.h | 4 +- src/winmain.h | 50 ++++++++++---------- src/xml/document.h | 2 +- 180 files changed, 1011 insertions(+), 991 deletions(-) diff --git a/src/article/articleadmin.h b/src/article/articleadmin.h index 6cba94f4f..6029209bc 100644 --- a/src/article/articleadmin.h +++ b/src/article/articleadmin.h @@ -36,27 +36,27 @@ namespace ARTICLE ArticleAdmin( const std::string& url ); ~ArticleAdmin(); - virtual void save_session(); + void save_session() override; protected: - virtual COMMAND_ARGS get_open_list_args( const std::string& url, const COMMAND_ARGS& command_list ); - virtual SKELETON::View* create_view( const COMMAND_ARGS& command ); + COMMAND_ARGS get_open_list_args( const std::string& url, const COMMAND_ARGS& command_list ) override; + SKELETON::View* create_view( const COMMAND_ARGS& command ) override; // ツールバー - virtual void show_toolbar(); - virtual void toggle_toolbar(); - virtual void open_searchbar(); - virtual void close_searchbar(); + void show_toolbar() override; + void toggle_toolbar() override; + void open_searchbar() override; + void close_searchbar() override; - virtual void command_local( const COMMAND_ARGS& command ); + void command_local( const COMMAND_ARGS& command ) override; - virtual void restore( const bool only_locked ); - virtual COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ); - virtual const std::string command_to_url( const COMMAND_ARGS& command ); + void restore( const bool only_locked ) override; + COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ) override; + const std::string command_to_url( const COMMAND_ARGS& command ) override; - virtual void switch_admin(); + void switch_admin() override; - virtual void restore_lasttab(); + void restore_lasttab() override; private: @@ -66,7 +66,7 @@ namespace ARTICLE void delete_all_popups(); // タブをお気に入りにドロップした時にお気に入りがデータ送信を要求してきた - virtual void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ); + void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ) override; }; ARTICLE::ArticleAdmin* get_admin(); diff --git a/src/article/articleview.h b/src/article/articleview.h index 749c51de8..ca61cd450 100644 --- a/src/article/articleview.h +++ b/src/article/articleview.h @@ -36,35 +36,35 @@ namespace ARTICLE ArticleViewMain( const std::string& url ); ~ArticleViewMain(); - virtual void clock_in(); - virtual void clock_in_always(); + void clock_in() override; + void clock_in_always() override; - virtual void goto_num( const int num_to, const int num_from ); + void goto_num( const int num_to, const int num_from ) override; // SKELETON::View の関数のオーバロード - virtual void save_session(); + void save_session() override; - virtual const bool is_loading() const; - virtual const bool is_updated(); - virtual const bool is_check_update(); - virtual const bool is_old(); - virtual const bool is_broken(); + const bool is_loading() const override; + const bool is_updated() override; + const bool is_check_update() override; + const bool is_old() override; + const bool is_broken() override; - virtual void show_view(); - virtual void update_view(); - virtual void update_finish(); - virtual void relayout(); + void show_view() override; + void update_view() override; + void update_finish() override; + void relayout() override; protected: // 実況 - virtual void live_start(); - virtual void live_stop(); + void live_start() override; + void live_stop() override; private: - virtual void exec_reload(); + void exec_reload() override; // ステータスに表示する文字列作成 void create_status_message(); diff --git a/src/article/articleviewbase.h b/src/article/articleviewbase.h index 27a934d5e..f1c0a590e 100644 --- a/src/article/articleviewbase.h +++ b/src/article/articleviewbase.h @@ -92,7 +92,7 @@ namespace ARTICLE public: ArticleViewBase( const std::string& url, const std::string& url_article ); - virtual ~ArticleViewBase(); + ~ArticleViewBase(); const std::string& url_article() const { return m_url_article; } @@ -100,47 +100,46 @@ namespace ARTICLE // SKELETON::View の関数のオーバロード - virtual void save_session(){} + void save_session() override {} - virtual const std::string url_for_copy(); // コピーやURLバー表示用のURL - virtual const int width_client(); - virtual const int height_client(); - virtual const int get_icon( const std::string& iconname ); - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); + const std::string url_for_copy() override; // コピーやURLバー表示用のURL + const int width_client() override; + const int height_client() override; + const int get_icon( const std::string& iconname ) override; + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; - virtual void clock_in(); + void clock_in() override; void clock_in_smooth_scroll(); // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ); - - virtual void write(); - virtual void reload(); - virtual void stop(); - virtual void redraw_view(); - virtual void focus_view(); - virtual void focus_out(); - virtual void close_view(); - virtual void delete_view(); - virtual void set_favorite(); - virtual const bool operate_view( const int control ); - virtual void goto_top(); - virtual void goto_bottom(); - virtual void goto_num( const int num_to, const int num_from ); - virtual void show_preference(); + const bool slot_key_press( GdkEventKey* event ) override; + + void write() override; + void reload() override; + void stop() override; + void redraw_view() override; + void focus_view() override; + void focus_out() override; + void close_view() override; + void delete_view() override; + void set_favorite() override; + const bool operate_view( const int control ) override; + void goto_top() override; + void goto_bottom() override; + void goto_num( const int num_to, const int num_from ) override; + void show_preference() override; // 進む、戻る - virtual void back_viewhistory( const int count ); - virtual void forward_viewhistory( const int count ); + void back_viewhistory( const int count ) override; + void forward_viewhistory( const int count ) override; // 検索 - virtual void exec_search(); - virtual void up_search(); - virtual void down_search(); - virtual void operate_search( const std::string& controlid ); + void exec_search() override; + void up_search() override; + void down_search() override; + void operate_search( const std::string& controlid ) override; void clear_highlight(); // ハイライト解除 // 記事削除 & 再オープン @@ -157,15 +156,15 @@ namespace ARTICLE protected: // Viewが所属するAdminクラス - virtual SKELETON::Admin* get_admin(); + SKELETON::Admin* get_admin() override; const JDLIB::RefPtr_Lock< DBTREE::ArticleBase >& get_article() const noexcept; // ポップアップメニューを表示する前にメニューのアクティブ状態を切り替える - virtual void activate_act_before_popupmenu( const std::string& url ); + void activate_act_before_popupmenu( const std::string& url ) override; // ポップアップメニュー取得 - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; // レスポップアップを隠す void hide_popup( const bool force = false ); @@ -237,12 +236,12 @@ namespace ARTICLE // 実況用 void set_enable_live( const bool enable ){ m_enable_live = enable; } void set_live( const bool live ); - virtual void live_start(){} - virtual void live_stop(){} + virtual void live_start() {} + virtual void live_stop() {} private: - virtual DrawAreaBase* create_drawarea(); + virtual DrawAreaBase* create_drawarea(); void setup_action(); diff --git a/src/article/articleviewetc.h b/src/article/articleviewetc.h index 25c113e4d..38f05d1d2 100644 --- a/src/article/articleviewetc.h +++ b/src/article/articleviewetc.h @@ -22,14 +22,14 @@ namespace ARTICLE ~ArticleViewRes(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -46,14 +46,14 @@ namespace ARTICLE ~ArticleViewName(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -70,14 +70,14 @@ namespace ARTICLE ~ArticleViewID(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -94,14 +94,14 @@ namespace ARTICLE ~ArticleViewBM(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -119,14 +119,14 @@ namespace ARTICLE ~ArticleViewPost(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -142,14 +142,14 @@ namespace ARTICLE ~ArticleViewURL(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -166,14 +166,14 @@ namespace ARTICLE ~ArticleViewRefer(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; @@ -192,14 +192,14 @@ namespace ARTICLE ~ArticleViewDrawout(); // SKELETON::View の関数のオーバロード - virtual void relayout(); + void relayout() override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; ///////////////////////////////////////////////////////////////////////// @@ -215,17 +215,17 @@ namespace ARTICLE ~ArticleViewPostlog(); // SKELETON::View の関数のオーバロード - virtual void relayout(); - virtual void stop(){} // キャンセル + void relayout() override; + void stop() override {} // キャンセル // 検索 - virtual void operate_search( const std::string& controlid ); + void operate_search( const std::string& controlid ) override; - virtual void show_view(); - virtual void reload(); + void show_view() override; + void reload() override; private: - virtual void exec_reload(); + void exec_reload() override; }; } diff --git a/src/article/articleviewinfo.h b/src/article/articleviewinfo.h index c4f01d137..edc39438b 100644 --- a/src/article/articleviewinfo.h +++ b/src/article/articleviewinfo.h @@ -17,22 +17,22 @@ namespace ARTICLE ~ArticleViewInfo(); // viewの操作をキャンセル - virtual const bool operate_view( const int control ){ return false; } + const bool operate_view( const int control ) override { return false; } protected: // ポップアップメニューは表示しない - virtual Gtk::Menu* get_popupmenu( const std::string& url ){ return NULL; } + Gtk::Menu* get_popupmenu( const std::string& url ) override { return NULL; } private: // ボタンプレスキャンセル - virtual bool slot_button_press( std::string url, int res_number, GdkEventButton* event ){ return true; } + bool slot_button_press( std::string url, int res_number, GdkEventButton* event ) override { return true; } // ポップアップ表示キャンセル - virtual void slot_on_url( std::string url, std::string imgurl, int res_number ) {} + void slot_on_url( std::string url, std::string imgurl, int res_number ) override {} - virtual DrawAreaBase* create_drawarea(); + DrawAreaBase* create_drawarea() override; }; } diff --git a/src/article/articleviewpopup.h b/src/article/articleviewpopup.h index f66b145bf..f57913b07 100644 --- a/src/article/articleviewpopup.h +++ b/src/article/articleviewpopup.h @@ -19,16 +19,16 @@ namespace ARTICLE public: ArticleViewPopup( const std::string& url, bool show_abone ); - virtual ~ArticleViewPopup(); + ~ArticleViewPopup(); - virtual void stop(){} + void stop() override {} protected: void show_instruct_popup(); const bool show_abone() const { return m_show_abone; } private: - virtual DrawAreaBase* create_drawarea(); + DrawAreaBase* create_drawarea() override; }; ///////////////////////////////////////////////////////////////////////// @@ -41,9 +41,9 @@ namespace ARTICLE public: ArticleViewPopupHTML( const std::string& url, const std::string& html ): ArticleViewPopup( url, false ), m_html( html ){} - virtual ~ArticleViewPopupHTML(){} + ~ArticleViewPopupHTML() noexcept {} - virtual void show_view(){ append_html( m_html ); } + void show_view() override { append_html( m_html ); } }; @@ -59,9 +59,10 @@ namespace ARTICLE public: ArticleViewPopupRes( const std::string& url, const std::string& num, bool show_title, bool show_abone ) : ArticleViewPopup( url, show_abone ), m_str_num( num ), m_show_title( show_title ){} - virtual ~ArticleViewPopupRes(){} + ~ArticleViewPopupRes() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); show_res( m_str_num, m_show_title ); } @@ -78,9 +79,10 @@ namespace ARTICLE public: ArticleViewPopupName( const std::string& url, const std::string& name ): ArticleViewPopup( url, false ), m_str_name( name ){} - virtual ~ArticleViewPopupName(){} + ~ArticleViewPopupName() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); show_name( m_str_name, false ); } @@ -97,9 +99,10 @@ namespace ARTICLE public: ArticleViewPopupID( const std::string& url, const std::string& id ): ArticleViewPopup( url, false ), m_str_id( id ) {} - virtual ~ArticleViewPopupID(){} + ~ArticleViewPopupID() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); show_id( m_str_id, false ); } @@ -116,9 +119,10 @@ namespace ARTICLE public: ArticleViewPopupRefer( const std::string& url, const std::string& num ): ArticleViewPopup( url, false ), m_str_num( num ){} - virtual ~ArticleViewPopupRefer(){} + ~ArticleViewPopupRefer() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); show_refer( atol( m_str_num.c_str() ) ); } @@ -135,9 +139,10 @@ namespace ARTICLE public: ArticleViewPopupDrawout( const std::string& url, const std::string& query, bool mode_or ) : ArticleViewPopup( url, false ), m_query( query ), m_mode_or( mode_or ){} - virtual ~ArticleViewPopupDrawout(){} + ~ArticleViewPopupDrawout() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); drawout_keywords( m_query, m_mode_or, false ); } @@ -151,9 +156,10 @@ namespace ARTICLE { public: ArticleViewPopupBM( const std::string& url ) : ArticleViewPopup( url, false ){} - virtual ~ArticleViewPopupBM(){} + ~ArticleViewPopupBM() noexcept {} - virtual void show_view(){ + void show_view() override + { show_instruct_popup(); show_bm(); } diff --git a/src/article/articleviewpreview.h b/src/article/articleviewpreview.h index 556d7041a..a1fd763b0 100644 --- a/src/article/articleviewpreview.h +++ b/src/article/articleviewpreview.h @@ -18,13 +18,13 @@ namespace ARTICLE ArticleViewPreview( const std::string& url ); ~ArticleViewPreview(); - virtual const bool operate_view( const int control ); + const bool operate_view( const int control ) override; private: - virtual bool slot_button_press( std::string url, int res_number, GdkEventButton* event ); + bool slot_button_press( std::string url, int res_number, GdkEventButton* event ) override; - virtual void goto_num( const int num_to, const int num_from ){} + void goto_num( const int num_to, const int num_from ) override {} }; } diff --git a/src/article/articleviewsearch.h b/src/article/articleviewsearch.h index 58f8e72ce..43c259d6b 100644 --- a/src/article/articleviewsearch.h +++ b/src/article/articleviewsearch.h @@ -35,30 +35,29 @@ namespace ARTICLE // SKELETON::View の関数のオーバロード - virtual const std::string url_for_copy(); // コピーやURLバー表示用のURL - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); + const std::string url_for_copy() override; // コピーやURLバー表示用のURL + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; - virtual const bool is_loading() const { return m_loading; } + const bool is_loading() const override { return m_loading; } - virtual void focus_view(); - virtual void show_view(); - virtual void relayout(); - virtual void reload(); - virtual void stop(); + void focus_view() override; + void show_view() override; + void relayout() override; + void reload() override; + void stop() override; // 検索 - virtual void exec_search(); - virtual void operate_search( const std::string& controlid ); + void exec_search() override; + void operate_search( const std::string& controlid ) override; const bool get_enable_bm() const{ return m_enable_bm; } const bool get_bm() const { return m_bm; } void set_bm( const bool set ){ m_bm = set; } protected: - virtual void slot_push_write(){} // 書き込みキャンセル + virtual void slot_push_write() {} // 書き込みキャンセル private: @@ -76,7 +75,7 @@ namespace ARTICLE void slot_search_fin( const std::string& id ); - virtual void exec_reload(); + void exec_reload() override; }; } diff --git a/src/article/drawareabase.h b/src/article/drawareabase.h index 85f556b66..c325c4ce3 100644 --- a/src/article/drawareabase.h +++ b/src/article/drawareabase.h @@ -227,7 +227,7 @@ namespace ARTICLE SIG_LEAVE_URL sig_leave_url(){ return m_sig_leave_url; } DrawAreaBase( const std::string& url ); - virtual ~DrawAreaBase(); + ~DrawAreaBase(); const std::string& get_url() const { return m_url; } const int& width_client() const { return m_width_client; } diff --git a/src/article/drawareapopup.h b/src/article/drawareapopup.h index 5068e85ef..102c9a25d 100644 --- a/src/article/drawareapopup.h +++ b/src/article/drawareapopup.h @@ -20,10 +20,10 @@ namespace ARTICLE protected: // レイアウト実行 - virtual bool exec_layout(); + bool exec_layout() override; // リサイズした - virtual bool slot_configure_event( GdkEventConfigure* event ); + bool slot_configure_event( GdkEventConfigure* event ) override; }; } diff --git a/src/article/embeddedimage.h b/src/article/embeddedimage.h index 728220a53..57fde9a4f 100644 --- a/src/article/embeddedimage.h +++ b/src/article/embeddedimage.h @@ -43,7 +43,7 @@ namespace ARTICLE private: void stop(); void wait(); - virtual void callback_dispatch(); + void callback_dispatch() override; }; } diff --git a/src/article/preference.cpp b/src/article/preference.cpp index 86fe1347b..52d9e4b32 100644 --- a/src/article/preference.cpp +++ b/src/article/preference.cpp @@ -212,7 +212,7 @@ Preferences::Preferences( Gtk::Window* parent, const std::string& url, const std if( command == "show_abone" ) m_notebook.set_current_page( page_abone ); } -Preferences::~Preferences() +Preferences::~Preferences() noexcept {} diff --git a/src/article/preference.h b/src/article/preference.h index 90c2fd59f..4e79e0c4c 100644 --- a/src/article/preference.h +++ b/src/article/preference.h @@ -64,10 +64,10 @@ namespace ARTICLE public: Preferences( Gtk::Window* parent, const std::string& url, const std::string command ); - virtual ~Preferences(); + ~Preferences() noexcept; private: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_clear_modified(); void slot_clear_post_history(); }; diff --git a/src/article/toolbar.h b/src/article/toolbar.h index 288cadb89..757bff6a9 100644 --- a/src/article/toolbar.h +++ b/src/article/toolbar.h @@ -33,14 +33,14 @@ namespace ARTICLE public: ArticleToolBar(); - virtual ~ArticleToolBar(){} + ~ArticleToolBar() noexcept {} // タブが切り替わった時に呼び出される( Viewの情報を取得する ) - virtual void set_view( SKELETON::View * view ); + void set_view( SKELETON::View * view ) override; protected: - virtual void pack_buttons(); + void pack_buttons() override; // ボタンを押したときのslot関数 void slot_open_board(); diff --git a/src/article/toolbarsearch.h b/src/article/toolbarsearch.h index 5c58e442e..f83f15d21 100644 --- a/src/article/toolbarsearch.h +++ b/src/article/toolbarsearch.h @@ -26,14 +26,14 @@ namespace ARTICLE public: SearchToolBar(); - virtual ~SearchToolBar(){} + ~SearchToolBar() noexcept {} // タブが切り替わった時に呼び出される( Viewの情報を取得する ) - virtual void set_view( SKELETON::View * view ); + void set_view( SKELETON::View * view ) override; protected: - virtual void pack_buttons(); + void pack_buttons() override; private: diff --git a/src/article/toolbarsimple.h b/src/article/toolbarsimple.h index 3e8b6a4ff..56257e1cf 100644 --- a/src/article/toolbarsimple.h +++ b/src/article/toolbarsimple.h @@ -14,11 +14,11 @@ namespace ARTICLE public: ArticleToolBarSimple(); - virtual ~ArticleToolBarSimple(){} + ~ArticleToolBarSimple() noexcept {} protected: - virtual void pack_buttons(); + void pack_buttons() override; }; } diff --git a/src/articleitemmenupref.h b/src/articleitemmenupref.h index 577a2665f..86d6926f4 100644 --- a/src/articleitemmenupref.h +++ b/src/articleitemmenupref.h @@ -14,16 +14,16 @@ namespace CORE public: ArticleItemMenuPref( Gtk::Window* parent, const std::string& url ); - virtual ~ArticleItemMenuPref(){} + ~ArticleItemMenuPref() noexcept {} private: // OKボタン - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/articleitempref.h b/src/articleitempref.h index 89714809a..92ca34d78 100644 --- a/src/articleitempref.h +++ b/src/articleitempref.h @@ -14,15 +14,15 @@ namespace CORE public: ArticleItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~ArticleItemPref(){} + ~ArticleItemPref() noexcept {} private: // OKボタン - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/bbslist/bbslistadmin.h b/src/bbslist/bbslistadmin.h index 9953b29fc..a011166ba 100644 --- a/src/bbslist/bbslistadmin.h +++ b/src/bbslist/bbslistadmin.h @@ -32,7 +32,7 @@ namespace BBSLIST BBSListAdmin( const std::string& url ); ~BBSListAdmin(); - virtual void save_session(); + void save_session() override; // 履歴を DATA_INFO_LIST 型で取得 void get_history( const std::string& url, CORE::DATA_INFO_LIST& info_list ); @@ -45,28 +45,28 @@ namespace BBSLIST protected: - SKELETON::View* create_view( const COMMAND_ARGS& command ); + SKELETON::View* create_view( const COMMAND_ARGS& command ) override; // ツールバー - virtual void show_toolbar(); - virtual void toggle_toolbar(); + void show_toolbar() override; + void toggle_toolbar() override; - virtual void command_local( const COMMAND_ARGS& command ); + void command_local( const COMMAND_ARGS& command ) override; - virtual void restore( const bool only_locked ); - virtual COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ); + void restore( const bool only_locked ) override; + COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ) override; - virtual void switch_admin(); + void switch_admin() override; // bbslistはクローズしない - virtual void close_view( const std::string& url ){} - virtual void close_all_view( const std::string& url ){} + void close_view( const std::string& url ) override {} + void close_all_view( const std::string& url ) override {} // タブの D&D 処理をしない - virtual void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ){} + void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ) override {} // タブメニュー表示キャンセル - virtual void slot_tab_menu( int page, int x, int y ){} + void slot_tab_menu( int page, int x, int y ) override {} }; diff --git a/src/bbslist/bbslistview.h b/src/bbslist/bbslistview.h index abb5e654d..61a482356 100644 --- a/src/bbslist/bbslistview.h +++ b/src/bbslist/bbslistview.h @@ -16,23 +16,23 @@ namespace BBSLIST { public: BBSListViewMain( const std::string& url, const std::string& arg1 = std::string() , const std::string& arg2 = std::string() ); - virtual ~BBSListViewMain(); + ~BBSListViewMain(); - virtual void show_view(); - virtual void update_view(); - virtual void delete_view(); - virtual void show_preference(); + void show_view() override; + void update_view() override; + void delete_view() override; + void show_preference() override; protected: // xml保存 - virtual void save_xml(); + void save_xml() override; - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; private: - virtual void delete_view_impl(); + void delete_view_impl() override; }; } diff --git a/src/bbslist/bbslistviewbase.h b/src/bbslist/bbslistviewbase.h index cdc3d33af..b51caaa91 100644 --- a/src/bbslist/bbslistviewbase.h +++ b/src/bbslist/bbslistviewbase.h @@ -87,7 +87,7 @@ namespace BBSLIST protected: // Viewが所属するAdminクラス - virtual SKELETON::Admin* get_admin(); + SKELETON::Admin* get_admin() override; // treeviewのD&Dによる編集を可能にする void set_editable( const bool editable ); @@ -106,7 +106,7 @@ namespace BBSLIST const bool& get_ready_tree() const{ return m_ready_tree; } void set_open_only_onedir( const bool set ){ m_open_only_onedir = set; } - virtual void activate_act_before_popupmenu( const std::string& url ); + void activate_act_before_popupmenu( const std::string& url ) override; // tree <-> XML( DOM )変換 void tree2xml( const std::string& root_name ); @@ -182,49 +182,48 @@ namespace BBSLIST public: BBSListViewBase( const std::string& url, const std::string& arg1 = std::string() , const std::string& arg2 = std::string() ); - virtual ~BBSListViewBase(); + ~BBSListViewBase(); // // SKELETON::View の関数のオーバロード // - virtual void save_session(); + void save_session() override; // 親ウィンドウをセット - virtual void set_parent_win( Gtk::Window* parent_win ); + void set_parent_win( Gtk::Window* parent_win ) override; - virtual const std::string url_for_copy(){ return std::string(); } + const std::string url_for_copy() override { return {}; } - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; - virtual void clock_in(); + void clock_in() override; // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ); + const bool slot_key_press( GdkEventKey* event ) override; - virtual void stop(); - virtual void redraw_view(); - virtual void relayout(); // 色やフォントなどの変更 - virtual void focus_view(); - virtual void focus_out(); - virtual void close_view(); - virtual void delete_view(); + void stop() override; + void redraw_view() override; + void relayout() override; // 色やフォントなどの変更 + void focus_view() override; + void focus_out() override; + void close_view() override; + void delete_view() override; // ツリー内の全ての項目をURLを新しいアドレスに変更 ( id は未使用 ) - virtual void update_item( const std::string& url, const std::string& id ); + void update_item( const std::string& url, const std::string& id ) override; - virtual const bool operate_view( const int control ); - virtual void goto_top(); - virtual void goto_bottom(); + const bool operate_view( const int control ) override; + void goto_top() override; + void goto_bottom() override; // 検索 - virtual void exec_search(); - virtual void up_search(); - virtual void down_search(); - virtual void operate_search( const std::string& controlid ); + void exec_search() override; + void up_search() override; + void down_search() override; + void operate_search( const std::string& controlid ) override; // 挿入先ダイアログを表示してアイテム追加 // あらかじめ共有バッファに追加するデータをセットしておくこと diff --git a/src/bbslist/columns.cpp b/src/bbslist/columns.cpp index fd2417b04..707dd408a 100644 --- a/src/bbslist/columns.cpp +++ b/src/bbslist/columns.cpp @@ -19,11 +19,12 @@ TreeColumns::TreeColumns() : SKELETON::EditColumns() {} -TreeColumns::~TreeColumns() +TreeColumns::~TreeColumns() noexcept {} void TreeColumns::setup_row( Gtk::TreeModel::Row& row, - const Glib::ustring url, const Glib::ustring name, const Glib::ustring data, const int type, const size_t dirid ) + const Glib::ustring url, const Glib::ustring name, const Glib::ustring data, + const int type, const size_t dirid ) { SKELETON::EditColumns::setup_row( row, url, name, data, type, dirid ); diff --git a/src/bbslist/columns.h b/src/bbslist/columns.h index 8cd7b7d16..d54040a39 100644 --- a/src/bbslist/columns.h +++ b/src/bbslist/columns.h @@ -17,10 +17,11 @@ namespace BBSLIST public: TreeColumns(); - virtual ~TreeColumns(); + ~TreeColumns() noexcept; - virtual void setup_row( Gtk::TreeModel::Row& row, - const Glib::ustring url, const Glib::ustring name, const Glib::ustring data, const int type, const size_t dirid ); + void setup_row( Gtk::TreeModel::Row& row, + const Glib::ustring url, const Glib::ustring name, const Glib::ustring data, + const int type, const size_t dirid ) override; }; } diff --git a/src/bbslist/favoriteview.h b/src/bbslist/favoriteview.h index a3c55fcc1..cc2fff702 100644 --- a/src/bbslist/favoriteview.h +++ b/src/bbslist/favoriteview.h @@ -15,16 +15,16 @@ namespace BBSLIST public: FavoriteListView( const std::string& url, const std::string& arg1 = std::string() , const std::string& arg2 = std::string() ); - virtual ~FavoriteListView(); + ~FavoriteListView(); - virtual void show_view(); + void show_view() override; protected: // xml保存 - virtual void save_xml(); + void save_xml() override; - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; }; } diff --git a/src/bbslist/historyview.h b/src/bbslist/historyview.h index 85862c962..aea030b74 100644 --- a/src/bbslist/historyview.h +++ b/src/bbslist/historyview.h @@ -17,16 +17,16 @@ namespace BBSLIST HistoryViewBase( const std::string& url, const std::string& file_xml, const std::string& arg1, const std::string& arg2 ); - virtual ~HistoryViewBase(); + ~HistoryViewBase(); - virtual void show_view(); + void show_view() override; protected: // xml保存 - virtual void save_xml(); + void save_xml() override; - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; }; /////////////////////////////////////// diff --git a/src/bbslist/selectdialog.h b/src/bbslist/selectdialog.h index d3d0df70c..f1c9fa9f1 100644 --- a/src/bbslist/selectdialog.h +++ b/src/bbslist/selectdialog.h @@ -34,19 +34,19 @@ namespace BBSLIST public: SelectListDialog( Gtk::Window* parent, const std::string& url, Glib::RefPtr< Gtk::TreeStore >& treestore ); - virtual ~SelectListDialog(); + ~SelectListDialog(); const std::string get_name(); const std::string get_path(); protected: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; private: void slot_show_tree(); - virtual void timeout(); + void timeout() override; }; } diff --git a/src/bbslist/selectlistview.h b/src/bbslist/selectlistview.h index ee4198ab8..0d754d522 100644 --- a/src/bbslist/selectlistview.h +++ b/src/bbslist/selectlistview.h @@ -23,21 +23,21 @@ namespace BBSLIST public: SelectListView( const std::string& url, const std::string& arg1 = std::string() , const std::string& arg2 = std::string() ); - virtual ~SelectListView(){} + ~SelectListView() noexcept {} SIG_CLOSE_DIALOG sig_close_dialog() { return m_sig_close_dialog; } SIG_FOCUS_ENTRY_SEARCH sig_focus_entry_search() { return m_sig_focus_entry_search; } - virtual void save_xml(){} + void save_xml() override {} - virtual void close_view(); - virtual const bool operate_view( const int control ); + void close_view() override; + const bool operate_view( const int control ) override; private: - virtual const bool open_row( Gtk::TreePath& path, const bool tab ); - virtual void switch_rightview(){} // boardに移動しないようにキャンセル - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + const bool open_row( Gtk::TreePath& path, const bool tab ) override; + void switch_rightview() override {} // boardに移動しないようにキャンセル + Gtk::Menu* get_popupmenu( const std::string& url ) override; }; } diff --git a/src/bbslist/toolbar.h b/src/bbslist/toolbar.h index 106b1a978..f2046a02c 100644 --- a/src/bbslist/toolbar.h +++ b/src/bbslist/toolbar.h @@ -28,14 +28,14 @@ namespace BBSLIST public: BBSListToolBar(); - virtual ~BBSListToolBar(){} + ~BBSListToolBar() noexcept {} // タブが切り替わった時にDragableNoteBookから呼び出される( Viewの情報を取得する ) - virtual void set_view( SKELETON::View * view ); + void set_view( SKELETON::View * view ) override; protected: - virtual void pack_buttons(); + void pack_buttons() override; private: @@ -57,11 +57,11 @@ namespace BBSLIST public: EditListToolBar(); - virtual ~EditListToolBar(){} + ~EditListToolBar() noexcept {} protected: - virtual void pack_buttons(); + void pack_buttons() override; }; diff --git a/src/board/boardadmin.h b/src/board/boardadmin.h index cf2010be2..e86e1efbe 100644 --- a/src/board/boardadmin.h +++ b/src/board/boardadmin.h @@ -24,36 +24,36 @@ namespace BOARD BoardAdmin( const std::string& url ); ~BoardAdmin(); - virtual void save_session(); + void save_session() override; protected: - virtual COMMAND_ARGS get_open_list_args( const std::string& url, const COMMAND_ARGS& command_list ); - virtual SKELETON::View* create_view( const COMMAND_ARGS& command ); + COMMAND_ARGS get_open_list_args( const std::string& url, const COMMAND_ARGS& command_list ) override; + SKELETON::View* create_view( const COMMAND_ARGS& command ) override; // view_modeに該当するページを探す - virtual int find_view( const std::string& view_mode ); + int find_view( const std::string& view_mode ) override; // ツールバー - virtual void show_toolbar(); - virtual void toggle_toolbar(); - virtual void open_searchbar(); - virtual void close_searchbar(); + void show_toolbar() override; + void toggle_toolbar() override; + void open_searchbar() override; + void close_searchbar() override; - virtual void command_local( const COMMAND_ARGS& command ); + void command_local( const COMMAND_ARGS& command ) override; - virtual void restore( const bool only_locked ); - virtual COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ); - virtual const std::string command_to_url( const COMMAND_ARGS& command ); + void restore( const bool only_locked ) override; + COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ) override; + const std::string command_to_url( const COMMAND_ARGS& command ) override; - virtual void switch_admin(); + void switch_admin() override; - virtual void restore_lasttab(); + void restore_lasttab() override; private: // タブをお気に入りにドロップした時にお気に入りがデータ送信を要求してきた - virtual void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ); + void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ) override; }; BoardAdmin* get_admin(); diff --git a/src/board/boardview.h b/src/board/boardview.h index fdcce7a56..ab287cfc0 100644 --- a/src/board/boardview.h +++ b/src/board/boardview.h @@ -14,19 +14,19 @@ namespace BOARD public: BoardView( const std::string& url ); - virtual ~BoardView(); + ~BoardView(); // SKELETON::View の関数のオーバロード - virtual void save_session(); + void save_session() override; - virtual const bool is_updated(); - virtual const bool is_check_update(); + const bool is_updated() override; + const bool is_check_update() override; - virtual void reload(); - virtual void show_view(); - virtual void update_view(); - virtual void update_boardname(); + void reload() override; + void show_view() override; + void update_view() override; + void update_boardname() override; }; } diff --git a/src/board/boardviewbase.h b/src/board/boardviewbase.h index e2b6822bc..ebdcb1f82 100644 --- a/src/board/boardviewbase.h +++ b/src/board/boardviewbase.h @@ -101,68 +101,67 @@ namespace BOARD public: BoardViewBase( const std::string& url, const bool show_col_board ); - virtual ~BoardViewBase(); + ~BoardViewBase(); const std::string& get_url_board() const { return m_url_board; } - virtual const std::string url_for_copy(); + const std::string url_for_copy() override; // 行数 const int get_row_size(); // SKELETON::View の関数のオーバロード - virtual void save_session(){} + void save_session() override {} - virtual void update_url( const std::string& url_old, const std::string& url_new ); + void update_url( const std::string& url_old, const std::string& url_new ) override; - virtual const int get_icon( const std::string& iconname ); - virtual const bool is_loading() const { return m_loading; } - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); + const int get_icon( const std::string& iconname ) override; + const bool is_loading() const override { return m_loading; } + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; - virtual void clock_in(); + void clock_in() override; // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ); + const bool slot_key_press( GdkEventKey* event ) override; - virtual void write(); - virtual void stop(); - virtual void show_view(); - virtual void redraw_scrollbar(); - virtual void relayout(); - virtual void focus_view(); - virtual void focus_out(); - virtual void close_view(); - virtual void delete_view(); - virtual void set_favorite(); + void write() override; + void stop() override; + void show_view() override; + void redraw_scrollbar() override; + void relayout() override; + void focus_view() override; + void focus_out() override; + void close_view() override; + void delete_view() override; + void set_favorite() override; // 特定の行だけの表示内容更新 // url : subject.txt のアドレス // id : DAT の ID(拡張子付き) // もし ID が empty() なら全ての行の表示内容を更新する - virtual void update_item( const std::string& url, const std::string& id ); + void update_item( const std::string& url, const std::string& id ) override; - virtual const bool operate_view( const int control ); - virtual void goto_top(); - virtual void goto_bottom(); - virtual void goto_num( const int num_to, const int num_from ); - virtual void scroll_left(); - virtual void scroll_right(); - virtual void show_preference(); + const bool operate_view( const int control ) override; + void goto_top() override; + void goto_bottom() override; + void goto_num( const int num_to, const int num_from ) override; + void scroll_left() override; + void scroll_right() override; + void show_preference() override; // 進む、戻る - virtual void back_viewhistory( const int count ); - virtual void forward_viewhistory( const int count ); + void back_viewhistory( const int count ) override; + void forward_viewhistory( const int count ) override; // 検索 - virtual void exec_search(); - virtual void up_search(); - virtual void down_search(); - virtual void operate_search( const std::string& controlid ); - virtual void set_search_query( const std::string& query ); + void exec_search() override; + void up_search() override; + void down_search() override; + void operate_search( const std::string& controlid ) override; + void set_search_query( const std::string& query ) override; void clear_highlight(); void row_up(); @@ -181,13 +180,13 @@ namespace BOARD SKELETON::DragTreeView& get_treeview(){ return m_treeview; } // Viewが所属するAdminクラス - virtual SKELETON::Admin* get_admin(); + SKELETON::Admin* get_admin() override; // ポップアップメニューを表示する前にメニューのアクティブ状態を切り替える - virtual void activate_act_before_popupmenu( const std::string& url ); + void activate_act_before_popupmenu( const std::string& url ) override; // ポップアップメニュー取得 - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; // view更新 void update_view_impl( const std::vector< DBTREE::ArticleBase* >& list_article, const bool loading_fin ); diff --git a/src/board/boardviewlog.h b/src/board/boardviewlog.h index ab21bde85..994f1d9fb 100644 --- a/src/board/boardviewlog.h +++ b/src/board/boardviewlog.h @@ -18,34 +18,34 @@ namespace BOARD public: BoardViewLog( const std::string& url ); - virtual ~BoardViewLog(); + ~BoardViewLog(); - virtual void stop(); - virtual void reload(); - virtual void show_view(); - virtual void update_boardname(); + void stop() override; + void reload() override; + void show_view() override; + void update_boardname() override; - virtual void update_item( const std::string& url, const std::string& id ); + void update_item( const std::string& url, const std::string& id ) override; protected: // デフォルトのソート状態 - virtual const int get_default_sort_column(); - virtual const int get_default_view_sort_mode(); - virtual const int get_default_view_sort_pre_column(); - virtual const int get_default_view_sort_pre_mode(); + const int get_default_sort_column() override; + const int get_default_view_sort_mode() override; + const int get_default_view_sort_pre_column() override; + const int get_default_view_sort_pre_mode() override; private: void slot_search_fin( const std::string& id ); - virtual void slot_abone_thread(); + void slot_abone_thread() override; // ソート列やソートモードの保存 - virtual void save_sort_columns(){} // 保存しない + void save_sort_columns() override {} // 保存しない // 列幅の保存 - virtual void save_column_width(){} // 保存しない + void save_column_width() override {} // 保存しない }; } diff --git a/src/board/boardviewnext.h b/src/board/boardviewnext.h index ac0cc0513..0c9714db9 100644 --- a/src/board/boardviewnext.h +++ b/src/board/boardviewnext.h @@ -28,19 +28,19 @@ namespace BOARD public: BoardViewNext( const std::string& url, const std::string& url_pre_article ); - virtual ~BoardViewNext(); + ~BoardViewNext(); - virtual void reload(); - virtual void update_view(); - virtual void update_boardname(); + void reload() override; + void update_view() override; + void update_boardname() override; protected: // デフォルトのソート状態 - virtual const int get_default_sort_column(); - virtual const int get_default_view_sort_mode(); - virtual const int get_default_view_sort_pre_column(); - virtual const int get_default_view_sort_pre_mode(); + const int get_default_sort_column() override; + const int get_default_view_sort_mode() override; + const int get_default_view_sort_pre_column() override; + const int get_default_view_sort_pre_mode() override; private: @@ -49,15 +49,15 @@ namespace BOARD // 次スレ移行処理に使用する前スレのアドレス // 次スレ移行処理に使用する。BoardViewBase::open_row()を参照せよ - virtual const std::string get_url_pre_article(){ return m_url_pre_article; } + const std::string get_url_pre_article() override { return m_url_pre_article; } - virtual void slot_abone_thread(); + void slot_abone_thread() override; // ソート列やソートモードの保存 - virtual void save_sort_columns(){} // 保存しない + void save_sort_columns() override {} // 保存しない // 列幅の保存 - virtual void save_column_width(){} // 保存しない + void save_column_width() override {} // 保存しない }; } diff --git a/src/board/boardviewsidebar.h b/src/board/boardviewsidebar.h index 07d761174..d63ecb43b 100644 --- a/src/board/boardviewsidebar.h +++ b/src/board/boardviewsidebar.h @@ -23,32 +23,32 @@ namespace BOARD public: BoardViewSidebar( const std::string& url, const bool set_history ); - virtual ~BoardViewSidebar(); + ~BoardViewSidebar(); - virtual void stop(){} - virtual void reload(); - virtual void show_view(); - virtual void update_boardname(); + void stop() override {} + void reload() override; + void show_view() override; + void update_boardname() override; - virtual void update_item( const std::string& url, const std::string& id ); + void update_item( const std::string& url, const std::string& id ) override; protected: // デフォルトのソート状態 - virtual const int get_default_sort_column(); - virtual const int get_default_view_sort_mode(); - virtual const int get_default_view_sort_pre_column(); - virtual const int get_default_view_sort_pre_mode(); + const int get_default_sort_column() override; + const int get_default_view_sort_mode() override; + const int get_default_view_sort_pre_column() override; + const int get_default_view_sort_pre_mode() override; private: - virtual void slot_abone_thread(); + void slot_abone_thread() override; // ソート列やソートモードの保存 - virtual void save_sort_columns(){} // 保存しない + void save_sort_columns() override {} // 保存しない // 列幅の保存 - virtual void save_column_width(){} // 保存しない + void save_column_width() override {} // 保存しない }; } diff --git a/src/board/preference.h b/src/board/preference.h index f84b6844f..844db1e85 100644 --- a/src/board/preference.h +++ b/src/board/preference.h @@ -143,7 +143,7 @@ namespace BOARD public: Preferences( Gtk::Window* parent, const std::string& url, const std::string command ); - virtual ~Preferences(); + ~Preferences(); private: void slot_clear_modified(); @@ -154,8 +154,8 @@ namespace BOARD void slot_check_live(); void slot_remove_old_title(); void slot_switch_page( GtkNotebookPage*, guint page ); - virtual void slot_ok_clicked(); - virtual void timeout(); + void slot_ok_clicked() override; + void timeout() override; }; } diff --git a/src/board/toolbar.h b/src/board/toolbar.h index c85f3cc94..3f8c16cc6 100644 --- a/src/board/toolbar.h +++ b/src/board/toolbar.h @@ -16,14 +16,14 @@ namespace BOARD public: BoardToolBar(); - virtual ~BoardToolBar(){} + ~BoardToolBar() noexcept {} // ツールバー表示切り替え時に検索関係の wiget の位置を変更する void unpack_pack(); protected: - virtual void pack_buttons(); + void pack_buttons() override; private: diff --git a/src/boarditemmenupref.h b/src/boarditemmenupref.h index 02b4309d3..f5669513a 100644 --- a/src/boarditemmenupref.h +++ b/src/boarditemmenupref.h @@ -14,16 +14,16 @@ namespace CORE public: BoardItemMenuPref( Gtk::Window* parent, const std::string& url ); - virtual ~BoardItemMenuPref(){} + ~BoardItemMenuPref() noexcept {} private: // OKボタン - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/boarditempref.h b/src/boarditempref.h index d842b7ee7..e215c9d41 100644 --- a/src/boarditempref.h +++ b/src/boarditempref.h @@ -14,15 +14,15 @@ namespace CORE public: BoardItemColumnPref( Gtk::Window* parent, const std::string& url ); - virtual ~BoardItemColumnPref(){} + ~BoardItemColumnPref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; class BoardItemPref : public SKELETON::SelectItemPref @@ -30,15 +30,15 @@ namespace CORE public: BoardItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~BoardItemPref(){} + ~BoardItemPref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/browserpref.h b/src/browserpref.h index 545a38085..446fed3fe 100644 --- a/src/browserpref.h +++ b/src/browserpref.h @@ -25,7 +25,8 @@ namespace CORE Gtk::Entry m_entry_browser; // OK押した - virtual void slot_ok_clicked(){ + void slot_ok_clicked() override + { CONFIG::set_browsercombo_id( m_combo.get_active_row_number() ); CONFIG::set_command_openurl( MISC::remove_space( m_entry_browser.get_text() ) ); } diff --git a/src/config/aboutconfig.h b/src/config/aboutconfig.h index 994feac1d..a367a47e7 100644 --- a/src/config/aboutconfig.h +++ b/src/config/aboutconfig.h @@ -60,14 +60,14 @@ namespace CONFIG public: AboutConfig( Gtk::Window* parent ); - virtual ~AboutConfig(){} + ~AboutConfig() noexcept {} private: void pack_widgets(); - virtual void slot_ok_clicked(); - virtual void slot_cancel_clicked(); + void slot_ok_clicked() override; + void slot_cancel_clicked() override; void slot_cell_data( Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& it ); diff --git a/src/config/aboutconfigdiag.h b/src/config/aboutconfigdiag.h index a776fb86b..7c7f080ab 100644 --- a/src/config/aboutconfigdiag.h +++ b/src/config/aboutconfigdiag.h @@ -23,7 +23,7 @@ namespace CONFIG AboutConfigDiagStr( Gtk::Window* parent, std::string* value, const std::string& defaultval ); protected: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_default(); }; @@ -46,7 +46,7 @@ namespace CONFIG AboutConfigDiagInt( Gtk::Window* parent, int* value, const int defaultval ); protected: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_default(); }; @@ -71,7 +71,7 @@ namespace CONFIG AboutConfigDiagBool( Gtk::Window* parent, bool* value, const bool defaultval ); protected: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_default(); }; diff --git a/src/config/configitems.cpp b/src/config/configitems.cpp index f8c262bcf..785386fc1 100644 --- a/src/config/configitems.cpp +++ b/src/config/configitems.cpp @@ -66,7 +66,7 @@ ConfigItems::ConfigItems() fontname.resize( FONT_NUM ); } -ConfigItems::~ConfigItems() +ConfigItems::~ConfigItems() noexcept {} // 設定読み込み diff --git a/src/config/configitems.h b/src/config/configitems.h index 3c2d52b81..d183716ec 100644 --- a/src/config/configitems.h +++ b/src/config/configitems.h @@ -528,7 +528,7 @@ namespace CONFIG ConfigItems(); - virtual ~ConfigItems(); + virtual ~ConfigItems() noexcept; // 設定読み込み const bool load( const bool restore = false ); diff --git a/src/control/buttonconfig.cpp b/src/control/buttonconfig.cpp index 59ad1d89b..a3b851f76 100644 --- a/src/control/buttonconfig.cpp +++ b/src/control/buttonconfig.cpp @@ -23,7 +23,7 @@ ButtonConfig::ButtonConfig() {} -ButtonConfig::~ButtonConfig() +ButtonConfig::~ButtonConfig() noexcept {} diff --git a/src/control/buttonconfig.h b/src/control/buttonconfig.h index a20cbabde..83ea947c6 100644 --- a/src/control/buttonconfig.h +++ b/src/control/buttonconfig.h @@ -15,9 +15,9 @@ namespace CONTROL public: ButtonConfig(); - virtual ~ButtonConfig(); + ~ButtonConfig() noexcept; - virtual void load_conf(); + void load_conf() override; const bool is_toggled_tab_button(); // タブで開くボタンを入れ替えているか void toggle_tab_button( const bool toggle ); // タブで開くボタンを入れ替える @@ -28,7 +28,8 @@ namespace CONTROL private: // ひとつの操作をデータベースに登録 - virtual void set_one_motion_impl( const int id, const int mode, const std::string& name, const std::string& str_motion ); + void set_one_motion_impl( const int id, const int mode, + const std::string& name, const std::string& str_motion ) override; }; } diff --git a/src/control/buttonpref.h b/src/control/buttonpref.h index 8620890b0..466647094 100644 --- a/src/control/buttonpref.h +++ b/src/control/buttonpref.h @@ -39,9 +39,9 @@ namespace CONTROL protected: - virtual InputDiag* create_inputdiag(); - virtual const std::string get_default_motions( const int id ); - virtual const std::vector< int > check_conflict( const int mode, const std::string& str_motion ); + InputDiag* create_inputdiag() override; + const std::string get_default_motions( const int id ) override; + const std::vector< int > check_conflict( const int mode, const std::string& str_motion ) override; }; @@ -59,15 +59,15 @@ namespace CONTROL protected: - virtual MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ); - virtual const std::string get_str_motions( const int id ); - virtual const std::string get_default_motions( const int id ); - virtual void set_motions( const int id, const std::string& str_motions ); - virtual const bool remove_motions( const int id ); + MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ) override; + const std::string get_str_motions( const int id ) override; + const std::string get_default_motions( const int id ) override; + void set_motions( const int id, const std::string& str_motions ) override; + const bool remove_motions( const int id ) override; private: - virtual void slot_cancel_clicked(); + void slot_cancel_clicked() override; }; } diff --git a/src/control/keyconfig.cpp b/src/control/keyconfig.cpp index 923893233..d40ae1a9f 100644 --- a/src/control/keyconfig.cpp +++ b/src/control/keyconfig.cpp @@ -25,7 +25,7 @@ KeyConfig::KeyConfig() {} -KeyConfig::~KeyConfig() +KeyConfig::~KeyConfig() noexcept {} diff --git a/src/control/keyconfig.h b/src/control/keyconfig.h index 11709107a..1a7e87234 100644 --- a/src/control/keyconfig.h +++ b/src/control/keyconfig.h @@ -17,9 +17,9 @@ namespace CONTROL public: KeyConfig(); - virtual ~KeyConfig(); + ~KeyConfig() noexcept; - virtual void load_conf(); + void load_conf() override; // editviewの操作をemacs風にする const bool is_emacs_mode(); @@ -34,7 +34,8 @@ namespace CONTROL private: // ひとつの操作をデータベースに登録 - virtual void set_one_motion_impl( const int id, const int mode, const std::string& name, const std::string& str_motion ); + void set_one_motion_impl( const int id, const int mode, + const std::string& name, const std::string& str_motion ) override; }; } diff --git a/src/control/keypref.h b/src/control/keypref.h index 399905a31..ee2f41687 100644 --- a/src/control/keypref.h +++ b/src/control/keypref.h @@ -37,9 +37,9 @@ namespace CONTROL protected: - virtual InputDiag* create_inputdiag(); - virtual const std::string get_default_motions( const int id ); - virtual const std::vector< int > check_conflict( const int mode, const std::string& str_motion ); + InputDiag* create_inputdiag() override; + const std::string get_default_motions( const int id ) override; + const std::vector< int > check_conflict( const int mode, const std::string& str_motion ) override; }; @@ -56,15 +56,15 @@ namespace CONTROL protected: - virtual MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ); - virtual const std::string get_str_motions( const int id ); - virtual const std::string get_default_motions( const int id ); - virtual void set_motions( const int id, const std::string& str_motions ); - virtual const bool remove_motions( const int id ); + MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ) override; + const std::string get_str_motions( const int id ) override; + const std::string get_default_motions( const int id ) override; + void set_motions( const int id, const std::string& str_motions ) override; + const bool remove_motions( const int id ) override; private: - virtual void slot_cancel_clicked(); + void slot_cancel_clicked() override; }; } diff --git a/src/control/mouseconfig.cpp b/src/control/mouseconfig.cpp index 45e7f5982..a81a4cd09 100644 --- a/src/control/mouseconfig.cpp +++ b/src/control/mouseconfig.cpp @@ -24,7 +24,7 @@ MouseConfig::MouseConfig() -MouseConfig::~MouseConfig() +MouseConfig::~MouseConfig() noexcept {} diff --git a/src/control/mouseconfig.h b/src/control/mouseconfig.h index b3d91a509..8c2ed4ef8 100644 --- a/src/control/mouseconfig.h +++ b/src/control/mouseconfig.h @@ -16,20 +16,21 @@ namespace CONTROL public: MouseConfig(); - virtual ~MouseConfig(); + ~MouseConfig() noexcept; - virtual void load_conf(); + void load_conf() override; // 操作文字列取得 - virtual const std::string get_str_motions( const int id ); + const std::string get_str_motions( const int id ) override; // IDからデフォルトの操作文字列取得 - virtual const std::string get_default_motions( const int id ); + const std::string get_default_motions( const int id ) override; private: // ひとつの操作をデータベースに登録 - virtual void set_one_motion_impl( const int id, const int mode, const std::string& name, const std::string& str_motion ); + void set_one_motion_impl( const int id, const int mode, + const std::string& name, const std::string& str_motion ) override; }; } diff --git a/src/control/mousekeyconf.cpp b/src/control/mousekeyconf.cpp index fc6098340..172a9d3ce 100644 --- a/src/control/mousekeyconf.cpp +++ b/src/control/mousekeyconf.cpp @@ -21,7 +21,7 @@ MouseKeyConf::MouseKeyConf() -MouseKeyConf::~MouseKeyConf() +MouseKeyConf::~MouseKeyConf() noexcept {} diff --git a/src/control/mousekeyconf.h b/src/control/mousekeyconf.h index c249fa354..940f80688 100644 --- a/src/control/mousekeyconf.h +++ b/src/control/mousekeyconf.h @@ -26,7 +26,7 @@ namespace CONTROL public: MouseKeyConf(); - virtual ~MouseKeyConf(); + virtual ~MouseKeyConf() noexcept; // 設定ファイル読み込み virtual void load_conf() = 0; diff --git a/src/control/mousepref.h b/src/control/mousepref.h index 703bbf860..223c14fd5 100644 --- a/src/control/mousepref.h +++ b/src/control/mousepref.h @@ -38,9 +38,9 @@ namespace CONTROL protected: - virtual InputDiag* create_inputdiag(); - virtual const std::string get_default_motions( const int id ); - virtual const std::vector< int > check_conflict( const int mode, const std::string& str_motion ); + InputDiag* create_inputdiag() override; + const std::string get_default_motions( const int id ) override; + const std::vector< int > check_conflict( const int mode, const std::string& str_motion ) override; }; @@ -58,15 +58,15 @@ namespace CONTROL protected: - virtual MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ); - virtual const std::string get_str_motions( const int id ); - virtual const std::string get_default_motions( const int id ); - virtual void set_motions( const int id, const std::string& str_motions ); - virtual const bool remove_motions( const int id ); + MouseKeyDiag* create_setting_diag( const int id, const std::string& str_motions ) override; + const std::string get_str_motions( const int id ) override; + const std::string get_default_motions( const int id ) override; + void set_motions( const int id, const std::string& str_motions ) override; + const bool remove_motions( const int id ) override; private: - virtual void slot_cancel_clicked(); + void slot_cancel_clicked() override; }; } diff --git a/src/core.h b/src/core.h index 7654a1922..01e01bbdc 100644 --- a/src/core.h +++ b/src/core.h @@ -112,7 +112,7 @@ namespace CORE public: Core( JDWinMain& win_main ); - virtual ~Core(); + ~Core(); Gtk::Widget* get_toplevel(); @@ -169,7 +169,7 @@ namespace CORE void toggle_sidebar(); void slot_show_hide_leftpane( int mode ); - virtual void callback_dispatch(); + void callback_dispatch() override; // coreが自前でするコマンド処理 void exec_command(); diff --git a/src/cssmanager.h b/src/cssmanager.h index 986f27d54..563333c9b 100644 --- a/src/cssmanager.h +++ b/src/cssmanager.h @@ -147,7 +147,7 @@ namespace CORE public: Css_Manager(); - virtual ~Css_Manager(){} + virtual ~Css_Manager() noexcept {} // ユーザ設定の色取得 std::string get_color( int colorid ); diff --git a/src/dbimg/delimgcachediag.h b/src/dbimg/delimgcachediag.h index a6cd4f33f..5a630b27b 100644 --- a/src/dbimg/delimgcachediag.h +++ b/src/dbimg/delimgcachediag.h @@ -35,11 +35,11 @@ namespace DBIMG protected: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; private: - virtual void callback_dispatch(); + void callback_dispatch() override; void wait(); void slot_cancel_clicked(); time_t get_days( const std::string& path ); diff --git a/src/dbimg/delimgdiag.h b/src/dbimg/delimgdiag.h index fd2dd6ecc..7a56187a2 100644 --- a/src/dbimg/delimgdiag.h +++ b/src/dbimg/delimgdiag.h @@ -96,7 +96,8 @@ namespace DBIMG ImgAboneFrame m_frame_abone; // OK押した - virtual void slot_ok_clicked(){ + void slot_ok_clicked() override + { CONFIG::set_del_img_day( m_frame_cache.get_spin().get_value_as_int() ); CONFIG::set_del_imgabone_day( m_frame_abone.get_spin().get_value_as_int() ); } @@ -118,7 +119,7 @@ namespace DBIMG show_all_children(); } - virtual ~DelImgDiag(){} + ~DelImgDiag() noexcept {} }; } diff --git a/src/dbimg/img.h b/src/dbimg/img.h index 21a5ade14..e0eaada1b 100644 --- a/src/dbimg/img.h +++ b/src/dbimg/img.h @@ -117,14 +117,14 @@ namespace DBIMG void download_img( const std::string refurl, const bool mosaic, const int waitsec ); // ロード停止 - virtual void stop_load(); + void stop_load() override; const bool save( Gtk::Window* parent, const std::string& path_to ); private: - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; // ロード待ち状態セット/リセット const bool set_wait( const std::string& refurl, const bool mosaic, const int waitsec ); diff --git a/src/dbtree/article2ch.cpp b/src/dbtree/article2ch.cpp index d6dbe1094..155d3c727 100644 --- a/src/dbtree/article2ch.cpp +++ b/src/dbtree/article2ch.cpp @@ -25,7 +25,7 @@ Article2ch::Article2ch( const std::string& datbase, const std::string& id, bool {} -Article2ch::~Article2ch() +Article2ch::~Article2ch() noexcept {} diff --git a/src/dbtree/article2ch.h b/src/dbtree/article2ch.h index 7aaa9e454..4c2409917 100644 --- a/src/dbtree/article2ch.h +++ b/src/dbtree/article2ch.h @@ -16,25 +16,26 @@ namespace DBTREE public: Article2ch( const std::string& datbase, const std::string& id, bool cached ); - ~Article2ch(); + ~Article2ch() noexcept; // 書き込みメッセージ変換 - virtual const std::string create_write_message( const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_write_message( const std::string& name, const std::string& mail, + const std::string& msg ) override; // bbscgi のURL - virtual const std::string url_bbscgi(); + const std::string url_bbscgi() override; // subbbscgi のURL - virtual const std::string url_subbbscgi(); + const std::string url_subbbscgi() override; protected: // dat落ちしたスレをロードするか - virtual const bool is_load_olddat(); + const bool is_load_olddat() override; private: - virtual NodeTreeBase* create_nodetree(); + NodeTreeBase* create_nodetree() override; }; } diff --git a/src/dbtree/article2chcompati.cpp b/src/dbtree/article2chcompati.cpp index dc545fcd7..bbb026352 100644 --- a/src/dbtree/article2chcompati.cpp +++ b/src/dbtree/article2chcompati.cpp @@ -35,7 +35,7 @@ Article2chCompati::Article2chCompati( const std::string& datbase, const std::str -Article2chCompati::~Article2chCompati() +Article2chCompati::~Article2chCompati() noexcept {} diff --git a/src/dbtree/article2chcompati.h b/src/dbtree/article2chcompati.h index a6a22f584..2507f3419 100644 --- a/src/dbtree/article2chcompati.h +++ b/src/dbtree/article2chcompati.h @@ -16,20 +16,21 @@ namespace DBTREE public: Article2chCompati( const std::string& datbase, const std::string& id, bool cached ); - virtual ~Article2chCompati(); + ~Article2chCompati() noexcept; // 書き込みメッセージ変換 - virtual const std::string create_write_message( const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_write_message( const std::string& name, const std::string& mail, + const std::string& msg ) override; // bbscgi のURL - virtual const std::string url_bbscgi(); + const std::string url_bbscgi() override; // subbbscgi のURL - virtual const std::string url_subbbscgi(); + const std::string url_subbbscgi() override; private: - virtual NodeTreeBase* create_nodetree(); + NodeTreeBase* create_nodetree() override; }; } diff --git a/src/dbtree/articlebase.h b/src/dbtree/articlebase.h index b6c2b89a3..aba48cde1 100644 --- a/src/dbtree/articlebase.h +++ b/src/dbtree/articlebase.h @@ -119,7 +119,7 @@ namespace DBTREE public: ArticleBase( const std::string& datbase, const std::string& id, bool cached ); - virtual ~ArticleBase(); + ~ArticleBase(); const bool empty(); @@ -416,7 +416,7 @@ namespace DBTREE void slot_node_updated(); void slot_load_finished(); - virtual void unlock_impl(); + void unlock_impl() override; // お気に入りのアイコンとスレビューのタブのアイコンに更新マークを表示 // update == true の時に表示。falseなら戻す diff --git a/src/dbtree/articlejbbs.h b/src/dbtree/articlejbbs.h index db73a4591..b61ad1c00 100644 --- a/src/dbtree/articlejbbs.h +++ b/src/dbtree/articlejbbs.h @@ -21,20 +21,21 @@ namespace DBTREE ~ArticleJBBS(); // 書き込みメッセージ変換 - virtual const std::string create_write_message( const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_write_message( const std::string& name, const std::string& mail, + const std::string& msg ) override; // bbscgi のURL - virtual const std::string url_bbscgi(); + const std::string url_bbscgi() override; // subbbscgi のURL - virtual const std::string url_subbbscgi(); + const std::string url_subbbscgi() override; private: // 更新チェック不可能 - virtual const bool enable_check_update(){ return false; } + const bool enable_check_update() override { return false; } - virtual NodeTreeBase* create_nodetree(); + NodeTreeBase* create_nodetree() override; }; } diff --git a/src/dbtree/articlelocal.h b/src/dbtree/articlelocal.h index 30e50ac0f..a5d948a30 100644 --- a/src/dbtree/articlelocal.h +++ b/src/dbtree/articlelocal.h @@ -19,20 +19,20 @@ namespace DBTREE ~ArticleLocal(); // ID がこのスレのものかどうか - virtual const bool equal( const std::string& datbase, const std::string& id ); + const bool equal( const std::string& datbase, const std::string& id ) override; // キャッシュの削除をしない - virtual void delete_cache( const bool cache_only ){} + void delete_cache( const bool cache_only ) override {} // 情報ファイルを保存しない - virtual void save_info( const bool force ){} + void save_info( const bool force ) override {} // ダウンロードしない - virtual void download_dat( const bool check_update ){} + void download_dat( const bool check_update ) override {} private: - virtual NodeTreeBase* create_nodetree(); + NodeTreeBase* create_nodetree() override; }; } diff --git a/src/dbtree/articlemachi.cpp b/src/dbtree/articlemachi.cpp index c2e949301..b201cff80 100644 --- a/src/dbtree/articlemachi.cpp +++ b/src/dbtree/articlemachi.cpp @@ -30,7 +30,7 @@ ArticleMachi::ArticleMachi( const std::string& datbase, const std::string& _id, } -ArticleMachi::~ArticleMachi() +ArticleMachi::~ArticleMachi() noexcept {} diff --git a/src/dbtree/articlemachi.h b/src/dbtree/articlemachi.h index 4d656db65..9c6399600 100644 --- a/src/dbtree/articlemachi.h +++ b/src/dbtree/articlemachi.h @@ -18,23 +18,24 @@ namespace DBTREE public: ArticleMachi( const std::string& datbase, const std::string& id, bool cached ); - ~ArticleMachi(); + ~ArticleMachi() noexcept; // 書き込みメッセージ変換 - virtual const std::string create_write_message( const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_write_message( const std::string& name, const std::string& mail, + const std::string& msg ) override; // bbscgi のURL - virtual const std::string url_bbscgi(); + const std::string url_bbscgi() override; // subbbscgi のURL - virtual const std::string url_subbbscgi(); + const std::string url_subbbscgi() override; private: // offlawモードなら更新チェック可能 - virtual const bool enable_check_update(); + const bool enable_check_update() override; - virtual NodeTreeBase* create_nodetree(); + NodeTreeBase* create_nodetree() override; }; } diff --git a/src/dbtree/board2ch.cpp b/src/dbtree/board2ch.cpp index 46c039636..97fce3b8d 100644 --- a/src/dbtree/board2ch.cpp +++ b/src/dbtree/board2ch.cpp @@ -31,7 +31,7 @@ Board2ch::Board2ch( const std::string& root, const std::string& path_board, cons } -Board2ch::~Board2ch() +Board2ch::~Board2ch() noexcept {} diff --git a/src/dbtree/board2ch.h b/src/dbtree/board2ch.h index a5cfdb6f1..c569a4253 100644 --- a/src/dbtree/board2ch.h +++ b/src/dbtree/board2ch.h @@ -22,56 +22,56 @@ namespace DBTREE public: Board2ch( const std::string& root, const std::string& path_board,const std::string& name ); - virtual ~Board2ch(); + ~Board2ch() noexcept; // ユーザーエージェント - virtual const std::string& get_agent(); // ダウンロード用 - virtual const std::string& get_agent_w(); // 書き込み用 + const std::string& get_agent() override; // ダウンロード用 + const std::string& get_agent_w() override; // 書き込み用 // 読み込み用プロキシ - virtual const std::string get_proxy_host(); - virtual const int get_proxy_port(); - virtual const std::string get_proxy_basicauth(); + const std::string get_proxy_host() override; + const int get_proxy_port() override; + const std::string get_proxy_basicauth() override; // 書き込み用プロキシ - virtual const std::string get_proxy_host_w(); - virtual const int get_proxy_port_w(); - virtual const std::string get_proxy_basicauth_w(); + const std::string get_proxy_host_w() override; + const int get_proxy_port_w() override; + const std::string get_proxy_basicauth_w() override; // 書き込み用クッキー - virtual const std::string cookie_for_write(); + const std::string cookie_for_write() override; // 書き込み時のリファラ - virtual const std::string get_write_referer(); + const std::string get_write_referer() override; // 新スレ作成用のメッセージ変換 - virtual const std::string create_newarticle_message( const std::string& subject, - const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_newarticle_message( const std::string& subject, const std::string& name, + const std::string& mail, const std::string& msg ) override; // 新スレ作成用のbbscgi のURL - virtual const std::string url_bbscgi_new(); + const std::string url_bbscgi_new() override; // 新スレ作成用のsubbbscgi のURL - virtual const std::string url_subbbscgi_new(); + const std::string url_subbbscgi_new() override; // datの最大サイズ(Kバイト) - virtual const int get_max_dat_lng() const { return DEFAULT_MAX_DAT_LNG; } + const int get_max_dat_lng() const override { return DEFAULT_MAX_DAT_LNG; } protected: // クッキー:HAP - virtual const std::string get_hap(); - virtual void set_hap( const std::string& hap ); + const std::string get_hap() override; + void set_hap( const std::string& hap ) override; // クッキー:HAPの更新 (クッキーをセットした時に実行) - virtual void update_hap(); + void update_hap() override; private: // デフォルト最大レス数 - virtual const int get_default_number_max_res() { return DEFAULT_NUMBER_MAX_2CH; } + const int get_default_number_max_res() override { return DEFAULT_NUMBER_MAX_2CH; } - virtual ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ); + ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; }; } diff --git a/src/dbtree/board2chcompati.h b/src/dbtree/board2chcompati.h index d67a5e161..7db5b6521 100644 --- a/src/dbtree/board2chcompati.h +++ b/src/dbtree/board2chcompati.h @@ -22,47 +22,48 @@ namespace DBTREE public: Board2chCompati( const std::string& root, const std::string& path_board, const std::string& name, const std::string& basicauth ); - virtual ~Board2chCompati(); + ~Board2chCompati(); // 書き込み用クッキー - virtual const std::string cookie_for_write(); + const std::string cookie_for_write() override; // 書き込み時に必要なキーワード( hana=mogera や suka=pontan など )を // 確認画面のhtmlから解析する - virtual void analyze_keyword_for_write( const std::string& html ); + void analyze_keyword_for_write( const std::string& html ) override; // 新スレ作成用のメッセージ変換 - virtual const std::string create_newarticle_message( const std::string& subject, - const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_newarticle_message( const std::string& subject, const std::string& name, + const std::string& mail, const std::string& msg ) override; + // 新スレ作成用のbbscgi のURL - virtual const std::string url_bbscgi_new(); + const std::string url_bbscgi_new() override; // 新スレ作成用のsubbbscgi のURL - virtual const std::string url_subbbscgi_new(); + const std::string url_subbbscgi_new() override; // ローカルルール - virtual const std::string localrule(); + const std::string localrule() override; // SETTING.TXT - virtual const std::string settingtxt(); - virtual const std::string default_noname(); - virtual const int line_number(); - virtual const int message_count(); - virtual const std::string get_unicode(); + const std::string settingtxt() override; + const std::string default_noname() override; + const int line_number() override; + const int message_count() override; + const std::string get_unicode() override; private: - virtual const bool is_valid( const std::string& filename ); + const bool is_valid( const std::string& filename ) override; - virtual ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ); - virtual void parse_subject( const char* str_subject_txt ); - virtual void regist_article( const bool is_online ); + ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; + void parse_subject( const char* str_subject_txt ) override; + void regist_article( const bool is_online ) override; - virtual void load_rule_setting(); - virtual void download_rule_setting(); + void load_rule_setting() override; + void download_rule_setting() override; // レス数であぼーん(グローバル) - virtual const int get_abone_number_global(); + const int get_abone_number_global() override; }; } diff --git a/src/dbtree/boardbase.h b/src/dbtree/boardbase.h index fed94087b..0e4c2bf62 100644 --- a/src/dbtree/boardbase.h +++ b/src/dbtree/boardbase.h @@ -246,7 +246,7 @@ namespace DBTREE public: BoardBase( const std::string& root, const std::string& path_board, const std::string& name ); - virtual ~BoardBase(); + ~BoardBase(); bool empty(); // 状態 ( global.hで定義 ) @@ -567,8 +567,8 @@ namespace DBTREE virtual const bool is_valid( const std::string& filename ){ return false; } virtual void create_loaderdata( JDLIB::LOADERDATA& data ); - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; // url_boardbase をロードして移転したかどうか解析開始 bool start_checkking_if_board_moved(); diff --git a/src/dbtree/boardjbbs.h b/src/dbtree/boardjbbs.h index 759eff5bd..f6cbfa3af 100644 --- a/src/dbtree/boardjbbs.h +++ b/src/dbtree/boardjbbs.h @@ -17,23 +17,24 @@ namespace DBTREE BoardJBBS( const std::string& root, const std::string& path_board,const std::string& name ); - virtual const std::string url_datpath(); + const std::string url_datpath() override; // 新スレ作成用のメッセージ変換 - virtual const std::string create_newarticle_message( const std::string& subject, - const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_newarticle_message( const std::string& subject, const std::string& name, + const std::string& mail, const std::string& msg ) override; + // 新スレ作成用のbbscgi のURL - virtual const std::string url_bbscgi_new(); + const std::string url_bbscgi_new() override; // 新スレ作成用のsubbbscgi のURL - virtual const std::string url_subbbscgi_new(); + const std::string url_subbbscgi_new() override; private: - virtual const bool is_valid( const std::string& filename ); - virtual ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ); - virtual void parse_subject( const char* str_subject_txt ); - virtual void regist_article( const bool is_online ); + const bool is_valid( const std::string& filename ) override; + ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; + void parse_subject( const char* str_subject_txt ) override; + void regist_article( const bool is_online ) override; }; } diff --git a/src/dbtree/boardlocal.cpp b/src/dbtree/boardlocal.cpp index 3028de092..190ec0f1a 100644 --- a/src/dbtree/boardlocal.cpp +++ b/src/dbtree/boardlocal.cpp @@ -24,7 +24,7 @@ BoardLocal::BoardLocal( const std::string& root, const std::string& path_board, } -BoardLocal::~BoardLocal() +BoardLocal::~BoardLocal() noexcept {} diff --git a/src/dbtree/boardlocal.h b/src/dbtree/boardlocal.h index a8e8f9350..65da47872 100644 --- a/src/dbtree/boardlocal.h +++ b/src/dbtree/boardlocal.h @@ -16,35 +16,35 @@ namespace DBTREE public: BoardLocal( const std::string& root, const std::string& path_board, const std::string& name ); - virtual ~BoardLocal(); + ~BoardLocal() noexcept; // url がこの板のものかどうか - virtual bool equal( const std::string& url ); + bool equal( const std::string& url ) override; - virtual const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ); - virtual const std::string url_readcgi( const std::string& url, int num_from, int num_to ); + const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ) override; + const std::string url_readcgi( const std::string& url, int num_from, int num_to ) override; - virtual void download_subject( const std::string& url_update_view, const bool ); + void download_subject( const std::string& url_update_view, const bool ) override; // 板情報の読み書きをキャンセル - virtual void read_info(){} - virtual void save_info(){} + void read_info() override {} + void save_info() override {} // キャッシュサーチをキャンセル - virtual void search_cache( std::vector< ArticleBase* >&, const std::string&, - const bool, const bool, const bool& ) {} + void search_cache( std::vector< ArticleBase* >&, const std::string&, const bool, const bool, + const bool& ) override {} // datファイルのインポート - virtual const std::string import_dat( const std::string& filename ); + const std::string import_dat( const std::string& filename ) override; private: - virtual ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ); + ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; - virtual void append_all_article_in_cache(){} + void append_all_article_in_cache() override {} - virtual void load_rule_setting(){} - virtual void download_rule_setting(){} + void load_rule_setting() override {} + void download_rule_setting() override {} }; } diff --git a/src/dbtree/boardmachi.h b/src/dbtree/boardmachi.h index 3adb57b3c..6fd57028a 100644 --- a/src/dbtree/boardmachi.h +++ b/src/dbtree/boardmachi.h @@ -18,30 +18,31 @@ namespace DBTREE BoardMachi( const std::string& root, const std::string& path_board,const std::string& name ); // url がこの板のものかどうか - virtual bool equal( const std::string& url ); + bool equal( const std::string& url ) override; // スレの url を dat型のurlに変換して出力 // (例) "http://hoge.machi.to/bbs/read.cgi?BBS=board&KEY=12345&START=12&END=15"" のとき // 戻り値 : "http://hoge.machi.to/bbs/read.cgi?BBS=board&KEY=12345", num_from = 12, num_to = 15, num_str = 12-15 - virtual const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ); + const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ) override; - virtual const std::string url_datpath(); + const std::string url_datpath() override; // 新スレ作成用のメッセージ変換 - virtual const std::string create_newarticle_message( const std::string& subject, - const std::string& name, const std::string& mail, const std::string& msg ); + const std::string create_newarticle_message( const std::string& subject, const std::string& name, + const std::string& mail, const std::string& msg ) override; + // 新スレ作成用のbbscgi のURL - virtual const std::string url_bbscgi_new(); + const std::string url_bbscgi_new() override; // 新スレ作成用のsubbbscgi のURL - virtual const std::string url_subbbscgi_new(); + const std::string url_subbbscgi_new() override; private: - virtual const bool is_valid( const std::string& filename ); - virtual ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ); - virtual void parse_subject( const char* str_subject_txt ); - virtual void regist_article( const bool is_online ); + const bool is_valid( const std::string& filename ) override; + ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; + void parse_subject( const char* str_subject_txt ) override; + void regist_article( const bool is_online ) override; }; } diff --git a/src/dbtree/nodetree2ch.h b/src/dbtree/nodetree2ch.h index 9671af048..ba0c6dddf 100644 --- a/src/dbtree/nodetree2ch.h +++ b/src/dbtree/nodetree2ch.h @@ -26,13 +26,13 @@ namespace DBTREE protected: - virtual char* process_raw_lines( char* rawlines ); + char* process_raw_lines( char* rawlines ) override; - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); + void create_loaderdata( JDLIB::LOADERDATA& data ) override; private: - virtual void receive_finish(); + void receive_finish() override; }; } diff --git a/src/dbtree/nodetree2chcompati.h b/src/dbtree/nodetree2chcompati.h index fc78bae1f..f819411ee 100644 --- a/src/dbtree/nodetree2chcompati.h +++ b/src/dbtree/nodetree2chcompati.h @@ -23,18 +23,18 @@ namespace DBTREE public: NodeTree2chCompati( const std::string& url, const std::string& date_modified ); - virtual ~NodeTree2chCompati(); + ~NodeTree2chCompati(); protected: - virtual void clear(); - virtual void init_loading(); - virtual char* process_raw_lines( char* rawlines ); - virtual const char* raw2dat( char* rawlines, int& byte ); + void clear() override; + void init_loading() override; + char* process_raw_lines( char* rawlines ) override; + const char* raw2dat( char* rawlines, int& byte ) override; char* skip_status_line( char* pos, int status ); - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); + void create_loaderdata( JDLIB::LOADERDATA& data ) override; }; } diff --git a/src/dbtree/nodetreebase.h b/src/dbtree/nodetreebase.h index 6fb5051b3..5c355c35e 100644 --- a/src/dbtree/nodetreebase.h +++ b/src/dbtree/nodetreebase.h @@ -140,7 +140,7 @@ namespace DBTREE public: NodeTreeBase( const std::string& url, const std::string& date_modified ); - virtual ~NodeTreeBase(); + ~NodeTreeBase(); bool empty(); void update_url( const std::string& url ); @@ -279,8 +279,8 @@ namespace DBTREE return rawlines; } - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; private: diff --git a/src/dbtree/nodetreedummy.h b/src/dbtree/nodetreedummy.h index d96f79aca..3102c6c85 100644 --- a/src/dbtree/nodetreedummy.h +++ b/src/dbtree/nodetreedummy.h @@ -16,10 +16,10 @@ namespace DBTREE public: NodeTreeDummy( const std::string& url ); - virtual ~NodeTreeDummy(); + ~NodeTreeDummy(); // ダウンロードしない - virtual void download_dat( const bool check_update ){} + void download_dat( const bool check_update ) override {} }; } diff --git a/src/dbtree/nodetreejbbs.h b/src/dbtree/nodetreejbbs.h index 338b35ddf..09aa8b8fe 100644 --- a/src/dbtree/nodetreejbbs.h +++ b/src/dbtree/nodetreejbbs.h @@ -29,10 +29,10 @@ namespace DBTREE protected: - virtual void clear(); - virtual void init_loading(); - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); - virtual const char* raw2dat( char* rawlines, int& byte ); + void clear() override; + void init_loading() override; + void create_loaderdata( JDLIB::LOADERDATA& data ) override; + const char* raw2dat( char* rawlines, int& byte ) override; }; } diff --git a/src/dbtree/nodetreelocal.h b/src/dbtree/nodetreelocal.h index 31b0ff959..270766c9c 100644 --- a/src/dbtree/nodetreelocal.h +++ b/src/dbtree/nodetreelocal.h @@ -16,10 +16,10 @@ namespace DBTREE public: NodeTreeLocal( const std::string& url ); - virtual ~NodeTreeLocal(); + ~NodeTreeLocal(); // ダウンロードしない - virtual void download_dat( const bool check_update ){} + void download_dat( const bool check_update ) override {} }; } diff --git a/src/dbtree/nodetreemachi.h b/src/dbtree/nodetreemachi.h index 308a4d926..c52dedb9b 100644 --- a/src/dbtree/nodetreemachi.h +++ b/src/dbtree/nodetreemachi.h @@ -37,14 +37,14 @@ namespace DBTREE protected: - virtual void clear(); - virtual void init_loading(); - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); - virtual char* process_raw_lines( char* rawlines ); - virtual const char* raw2dat( char* rawlines, int& byte ); - - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void clear() override; + void init_loading() override; + void create_loaderdata( JDLIB::LOADERDATA& data ) override; + char* process_raw_lines( char* rawlines ) override; + const char* raw2dat( char* rawlines, int& byte ) override; + + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; }; } diff --git a/src/dbtree/root.h b/src/dbtree/root.h index 3eaac998d..816586bfe 100644 --- a/src/dbtree/root.h +++ b/src/dbtree/root.h @@ -155,8 +155,8 @@ namespace DBTREE // bbsmenuのダウンロード用関数 void clear(); - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; void bbsmenu2xml( const std::string& menu ); // XML に含まれる板情報を取り出してデータベースを更新 diff --git a/src/dbtree/ruleloader.h b/src/dbtree/ruleloader.h index 22a3f7534..73c8c439b 100644 --- a/src/dbtree/ruleloader.h +++ b/src/dbtree/ruleloader.h @@ -28,15 +28,15 @@ namespace DBTREE protected: - virtual const std::string get_url(); - virtual const std::string get_path(); - virtual const std::string get_charset(); + const std::string get_url() override; + const std::string get_path() override; + const std::string get_charset() override; // ロード用データ作成 - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); + void create_loaderdata( JDLIB::LOADERDATA& data ) override; // ロード後に呼び出される - virtual void parse_data(); + void parse_data() override; }; } diff --git a/src/dbtree/settingloader.h b/src/dbtree/settingloader.h index 14f008527..85cae56d9 100644 --- a/src/dbtree/settingloader.h +++ b/src/dbtree/settingloader.h @@ -45,15 +45,15 @@ namespace DBTREE protected: - virtual const std::string get_url(); - virtual const std::string get_path(); - virtual const std::string get_charset(); + const std::string get_url() override; + const std::string get_path() override; + const std::string get_charset() override; // ロード用データ作成 - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); + void create_loaderdata( JDLIB::LOADERDATA& data ) override; // ロード後に呼び出される - virtual void parse_data(); + void parse_data() override; }; } diff --git a/src/dndmanager.h b/src/dndmanager.h index 5013c29b9..0a9ea83f6 100644 --- a/src/dndmanager.h +++ b/src/dndmanager.h @@ -27,7 +27,7 @@ namespace CORE public: DND_Manager():m_dnd( false ){} - virtual ~DND_Manager(){} + virtual ~DND_Manager() noexcept {} const bool now_dnd() const{ return m_dnd; } diff --git a/src/fontcolorpref.cpp b/src/fontcolorpref.cpp index 59644adfc..e6f98de58 100644 --- a/src/fontcolorpref.cpp +++ b/src/fontcolorpref.cpp @@ -111,7 +111,7 @@ FontColorPref::FontColorPref( Gtk::Window* parent, const std::string& url ) } -FontColorPref::~FontColorPref() +FontColorPref::~FontColorPref() noexcept {} diff --git a/src/fontcolorpref.h b/src/fontcolorpref.h index d99ca6d66..aac1068af 100644 --- a/src/fontcolorpref.h +++ b/src/fontcolorpref.h @@ -85,7 +85,7 @@ namespace CORE public: FontColorPref( Gtk::Window* parent, const std::string& url ); - ~FontColorPref(); + ~FontColorPref() noexcept; private: @@ -110,9 +110,9 @@ namespace CORE void slot_reset_all_colors(); // OK,cancel,apply が押された - virtual void slot_ok_clicked(); - virtual void slot_apply_clicked(); - virtual void slot_cancel_clicked(); + void slot_ok_clicked() override; + void slot_apply_clicked() override; + void slot_cancel_clicked() override; }; } diff --git a/src/globalabonepref.h b/src/globalabonepref.h index fcaaec150..bd1cb62d9 100644 --- a/src/globalabonepref.h +++ b/src/globalabonepref.h @@ -23,7 +23,8 @@ namespace CORE Gtk::Label m_label_warning; // OK押した - virtual void slot_ok_clicked(){ + void slot_ok_clicked() override + { // 全体あぼーん再設定 std::list< std::string > list_name = MISC::get_lines( m_edit_name.get_text() ); @@ -75,7 +76,7 @@ namespace CORE show_all_children(); } - virtual ~GlobalAbonePref(){} + ~GlobalAbonePref() noexcept {} }; } diff --git a/src/globalabonethreadpref.h b/src/globalabonethreadpref.h index d6970ed5a..82f3dba61 100644 --- a/src/globalabonethreadpref.h +++ b/src/globalabonethreadpref.h @@ -36,7 +36,8 @@ namespace CORE SKELETON::SpinButton m_spin_hour; // OK押した - virtual void slot_ok_clicked(){ + void slot_ok_clicked() override + { // 全体あぼーん再設定 @@ -119,7 +120,7 @@ namespace CORE show_all_children(); } - virtual ~GlobalAboneThreadPref(){} + ~GlobalAboneThreadPref() noexcept {} }; } diff --git a/src/history/historysubmenu.h b/src/history/historysubmenu.h index 0bb8827f4..773a05603 100644 --- a/src/history/historysubmenu.h +++ b/src/history/historysubmenu.h @@ -26,7 +26,7 @@ namespace HISTORY public: HistorySubMenu( const std::string& url_history ); - virtual ~HistorySubMenu(); + ~HistorySubMenu(); // 履歴の先頭を復元 void restore_history(); diff --git a/src/image/imageadmin.h b/src/image/imageadmin.h index 411ac5d51..39152233c 100644 --- a/src/image/imageadmin.h +++ b/src/image/imageadmin.h @@ -38,60 +38,60 @@ namespace IMAGE ImageAdmin( const std::string& url ); ~ImageAdmin(); - virtual void save_session(); + void save_session() override; Gtk::HBox& tab() { return m_tab; } - virtual Gtk::Widget* get_widget() { return &m_view; } + Gtk::Widget* get_widget() override { return &m_view; } - virtual bool empty(); - virtual void clock_in(); + bool empty() override; + void clock_in() override; // タブの数 - virtual int get_tab_nums(); + int get_tab_nums() override; // 含まれているページのURLのリスト取得 - virtual const std::list< std::string > get_URLs(); + const std::list< std::string > get_URLs() override; // 現在表示してるページ番号 - virtual int get_current_page(); + int get_current_page() override; protected: - virtual void command_local( const COMMAND_ARGS& command ); - - virtual void restore( const bool only_locked ); - virtual COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ); - - virtual void switch_admin(); - virtual void open_view( const COMMAND_ARGS& command ); - virtual void tab_left( const bool updated ); - virtual void tab_right( const bool updatd ); - virtual void tab_head(); - virtual void tab_tail(); - virtual void redraw_view( const std::string& url ); - virtual void redraw_current_view(); - virtual void close_view( const std::string& url ); - virtual void close_other_views( const std::string& url ); - virtual void restore_lasttab(); - virtual void focus_view( int page ); - virtual void focus_current_view(); - virtual void open_window(); - virtual void close_window(); - - virtual SKELETON::View* get_view( const std::string& url ); - virtual SKELETON::View* get_current_view(); + void command_local( const COMMAND_ARGS& command ) override; + + void restore( const bool only_locked ) override; + COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ) override; + + void switch_admin() override; + void open_view( const COMMAND_ARGS& command ) override; + void tab_left( const bool updated ) override; + void tab_right( const bool updatd ) override; + void tab_head() override; + void tab_tail() override; + void redraw_view( const std::string& url ) override; + void redraw_current_view() override; + void close_view( const std::string& url ) override; + void close_other_views( const std::string& url ) override; + void restore_lasttab() override; + void focus_view( int page ) override; + void focus_current_view() override; + void open_window() override; + void close_window() override; + + SKELETON::View* get_view( const std::string& url ) override; + SKELETON::View* get_current_view() override; // ページがロックされているかリストで取得 - virtual std::list< bool > get_locked(); + std::list< bool > get_locked() override; // タブのロック/アンロック - virtual const bool is_lockable( const int page ); - virtual const bool is_locked( const int page ); - virtual void lock( const int page ); - virtual void unlock( const int page ); + const bool is_lockable( const int page ) override; + const bool is_locked( const int page ) override; + void lock( const int page ) override; + void unlock( const int page ) override; // タブの D&D 処理は SKELETON::Admin とは違うロジックでおこなう - virtual void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ){} + void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ) override {} private: diff --git a/src/image/imagearea.h b/src/image/imagearea.h index 30fe07308..53834e410 100644 --- a/src/image/imagearea.h +++ b/src/image/imagearea.h @@ -16,9 +16,9 @@ namespace IMAGE public: ImageAreaMain( const std::string& url ); - virtual ~ImageAreaMain(); + ~ImageAreaMain(); - virtual void show_image(); + void show_image() override; }; } diff --git a/src/image/imageareabase.h b/src/image/imageareabase.h index a327b67e9..80c3f51d2 100644 --- a/src/image/imageareabase.h +++ b/src/image/imageareabase.h @@ -49,7 +49,7 @@ namespace IMAGE // 1 -> INTERP_BILINEAR // 3 -> INTERP_HYPER ImageAreaBase( const std::string& url, const int interptype ); - virtual ~ImageAreaBase(); + ~ImageAreaBase(); void stop(); void wait(); @@ -84,7 +84,7 @@ namespace IMAGE private: - virtual void callback_dispatch(); + void callback_dispatch() override; virtual void set_image(); void set_mosaic( Glib::RefPtr< Gdk::Pixbuf > pixbuf ); }; diff --git a/src/image/imageareaicon.h b/src/image/imageareaicon.h index b69bdf457..ad92d4796 100644 --- a/src/image/imageareaicon.h +++ b/src/image/imageareaicon.h @@ -32,11 +32,11 @@ namespace IMAGE public: ImageAreaIcon( const std::string& url ); - virtual ~ImageAreaIcon(); + ~ImageAreaIcon(); - virtual void show_image(); + void show_image() override; - virtual void load_image_thread(); + void load_image_thread() override; private: @@ -45,7 +45,7 @@ namespace IMAGE void show_indicator( bool loading ); - virtual void set_image(); + void set_image() override; }; } diff --git a/src/image/imageareapopup.h b/src/image/imageareapopup.h index 9e663758a..f4564a452 100644 --- a/src/image/imageareapopup.h +++ b/src/image/imageareapopup.h @@ -16,9 +16,9 @@ namespace IMAGE public: ImageAreaPopup( const std::string& url ); - virtual ~ImageAreaPopup(); + ~ImageAreaPopup(); - virtual void show_image(); + void show_image() override; }; } diff --git a/src/image/imageview.h b/src/image/imageview.h index e05bab805..0da48342c 100644 --- a/src/image/imageview.h +++ b/src/image/imageview.h @@ -33,31 +33,31 @@ namespace IMAGE public: ImageViewMain( const std::string& url ); - virtual ~ImageViewMain(); + ~ImageViewMain(); - virtual void clock_in(); - virtual void show_view(); - virtual void scroll_up(); - virtual void scroll_down(); - virtual void scroll_left(); - virtual void scroll_right(); + void clock_in() override; + void show_view() override; + void scroll_up() override; + void scroll_down() override; + void scroll_left() override; + void scroll_right() override; - virtual const bool operate_view( const int control ); + const bool operate_view( const int control ) override; protected: - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; - virtual bool slot_button_press( GdkEventButton* event ); - virtual bool slot_motion_notify( GdkEventMotion* event ); + bool slot_button_press( GdkEventButton* event ) override; + bool slot_motion_notify( GdkEventMotion* event ) override; private: void set_status_local( const std::string& status ){ m_status_local = status; } const std::string& get_status_local(){ return m_status_local; } - virtual void show_status(); - virtual void update_status(); + void show_status() override; + void update_status() override; void add_tab_number(); void show_instruct_diag(); diff --git a/src/image/imageviewbase.h b/src/image/imageviewbase.h index 19549d694..3ea020e1a 100644 --- a/src/image/imageviewbase.h +++ b/src/image/imageviewbase.h @@ -51,7 +51,7 @@ namespace IMAGE protected: // Viewが所属するAdminクラス - virtual SKELETON::Admin* get_admin(); + SKELETON::Admin* get_admin() override; JDLIB::ConstPtr< DBIMG::Img >& get_img(){ return m_img;} @@ -62,7 +62,7 @@ namespace IMAGE const bool is_wait() const{ return m_wait; } void set_wait( const bool wait ){ m_wait = wait; } - const bool is_loading() const{ return m_loading; } + const bool is_loading() const override { return m_loading; } void set_loading( const bool loading ){ m_loading = loading; } Gtk::EventBox& get_event(){ return m_event; } @@ -70,7 +70,7 @@ namespace IMAGE public: ImageViewBase( const std::string& url, const std::string& arg1 = std::string(), const std::string& arg2 = std::string() ); - virtual ~ImageViewBase(); + ~ImageViewBase(); const bool is_under_mouse() const { return m_under_mouse; } @@ -78,34 +78,33 @@ namespace IMAGE // SKELETON::View の関数のオーバロード // - virtual void save_session(){} + void save_session() override {} // 親ウィンドウを取得 - virtual Gtk::Window* get_parent_win(); + Gtk::Window* get_parent_win() override; // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ); + const bool slot_key_press( GdkEventKey* event ) override; // コマンド - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); - - virtual void reload(); - virtual void stop(); - virtual void redraw_view(); - virtual void close_view(); - virtual void delete_view(); - virtual const bool operate_view( const int control ); - virtual void show_preference(); + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; + + void reload() override; + void stop() override; + void redraw_view() override; + void close_view() override; + void delete_view() override; + const bool operate_view( const int control ) override; + void show_preference() override; protected: void setup_common(); void set_image_to_buffer(); - virtual void activate_act_before_popupmenu( const std::string& url ); + void activate_act_before_popupmenu( const std::string& url ) override; void delete_view_impl( const bool show_diag ); void slot_cancel_mosaic(); diff --git a/src/image/imageviewicon.h b/src/image/imageviewicon.h index 34713f6c2..a36b08d5d 100644 --- a/src/image/imageviewicon.h +++ b/src/image/imageviewicon.h @@ -17,21 +17,21 @@ namespace IMAGE public: ImageViewIcon( const std::string& url ); - virtual ~ImageViewIcon(); + ~ImageViewIcon(); - virtual void clock_in(); - virtual void focus_view(); - virtual void focus_out(); - virtual void show_view(); + void clock_in() override; + void focus_view() override; + void focus_out() override; + void show_view() override; protected: - virtual Gtk::Menu* get_popupmenu( const std::string& url ); - virtual bool slot_scroll_event( GdkEventScroll* event ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; + bool slot_scroll_event( GdkEventScroll* event ) override; private: - virtual void switch_icon(); + void switch_icon() override; void slot_drag_begin( const Glib::RefPtr& context ); void slot_drag_data_get( const Glib::RefPtr& context, diff --git a/src/image/imageviewpopup.h b/src/image/imageviewpopup.h index 31d553b34..f295025a4 100644 --- a/src/image/imageviewpopup.h +++ b/src/image/imageviewpopup.h @@ -23,28 +23,28 @@ namespace IMAGE public: ImageViewPopup( const std::string& url ); - virtual ~ImageViewPopup(); + ~ImageViewPopup(); - virtual void clock_in(); + void clock_in() override; // 親ウィンドウは無し - virtual Gtk::Window* get_parent_win(){ return NULL; } + Gtk::Window* get_parent_win() override { return nullptr; } - virtual void stop(); - virtual void show_view(); - virtual void close_view(); - virtual const bool operate_view( const int control ); + void stop() override; + void show_view() override; + void close_view() override; + const bool operate_view( const int control ) override; protected: - virtual Gtk::Menu* get_popupmenu( const std::string& url ); + Gtk::Menu* get_popupmenu( const std::string& url ) override; private: void show_view_impl(); // クリックした時の処理 - virtual void clicked(); + void clicked() override; void update_label(); void set_label( const std::string& status ); diff --git a/src/image/imagewin.h b/src/image/imagewin.h index d702b3bd8..534468de9 100644 --- a/src/image/imagewin.h +++ b/src/image/imagewin.h @@ -20,38 +20,38 @@ namespace IMAGE public: ImageWin(); - virtual ~ImageWin(); + ~ImageWin(); void pack_remove_tab( bool unpack, Widget& tab ); protected: - virtual void switch_admin(); + void switch_admin() override; - virtual const int get_x_win(); - virtual const int get_y_win(); - virtual void set_x_win( const int x ); - virtual void set_y_win( const int y ); + const int get_x_win() override; + const int get_y_win() override; + void set_x_win( const int x ) override; + void set_y_win( const int y ) override; - virtual const int get_width_win(); - virtual const int get_height_win(); - virtual void set_width_win( const int width ); - virtual void set_height_win( const int height ); + const int get_width_win() override; + const int get_height_win() override; + void set_width_win( const int width ) override; + void set_height_win( const int height ) override; - virtual const bool is_focus_win(); - virtual void set_focus_win( const bool set ); + const bool is_focus_win() override; + void set_focus_win( const bool set ) override; - virtual const bool is_maximized_win(); - virtual void set_maximized_win( const bool set ); + const bool is_maximized_win() override; + void set_maximized_win( const bool set ) override; - virtual const bool is_iconified_win(); - virtual void set_iconified_win( const bool set ); + const bool is_iconified_win() override; + void set_iconified_win( const bool set ) override; - virtual const bool is_full_win(){ return false; } - virtual void set_full_win( const bool set ){} + const bool is_full_win() override { return false; } + void set_full_win( const bool set ) override {} - virtual const bool is_shown_win(); - virtual void set_shown_win( const bool set ); + const bool is_shown_win() override; + void set_shown_win( const bool set ) override; }; } diff --git a/src/image/preference.h b/src/image/preference.h index a3c1d0a53..43b39a741 100644 --- a/src/image/preference.h +++ b/src/image/preference.h @@ -32,7 +32,7 @@ namespace IMAGE Preferences( Gtk::Window* parent, const std::string& url ); private: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_open_ref(); }; diff --git a/src/jdlib/imgloader.h b/src/jdlib/imgloader.h index 054393ec6..9c49d119a 100644 --- a/src/jdlib/imgloader.h +++ b/src/jdlib/imgloader.h @@ -69,7 +69,7 @@ namespace JDLIB JDLIB::Mutex m_provider_lock; // ImgProvider操作時の必須ロック public: - virtual ~ImgProvider(){} + virtual ~ImgProvider() noexcept {} static ImgProvider& get_provider(); Glib::RefPtr< ImgLoader > get_loader( const std::string& file ); diff --git a/src/linkfiltermanager.h b/src/linkfiltermanager.h index dec8f16b6..c8046c4b7 100644 --- a/src/linkfiltermanager.h +++ b/src/linkfiltermanager.h @@ -26,7 +26,7 @@ namespace CORE public: Linkfilter_Manager(); - virtual ~Linkfilter_Manager(){} + virtual ~Linkfilter_Manager() noexcept {} std::vector< LinkFilterItem >& get_list(){ return m_list_cmd; } void save_xml(); diff --git a/src/linkfilterpref.h b/src/linkfilterpref.h index 242b2a7b7..0d4bb2c44 100644 --- a/src/linkfilterpref.h +++ b/src/linkfilterpref.h @@ -85,7 +85,7 @@ namespace CORE void select_row( const Gtk::TreeModel::iterator& row ); // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_row_activated( const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column ); bool slot_key_release( GdkEventKey* event ); diff --git a/src/livepref.h b/src/livepref.h index 6cdd4e53a..1deac6242 100644 --- a/src/livepref.h +++ b/src/livepref.h @@ -35,12 +35,12 @@ namespace CORE public: LivePref( Gtk::Window* parent, const std::string& url ); - virtual ~LivePref(){} + ~LivePref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; void slot_reset(); }; diff --git a/src/login2ch.h b/src/login2ch.h index 779930731..c47eac1bb 100644 --- a/src/login2ch.h +++ b/src/login2ch.h @@ -21,15 +21,15 @@ namespace CORE public: Login2ch(); - virtual ~Login2ch(); + ~Login2ch(); - virtual void start_login(); - virtual void logout(); + void start_login() override; + void logout() override; private: - virtual void receive_data( const char* , size_t ); - virtual void receive_finish(); + void receive_data( const char* , size_t ) override; + void receive_finish() override; }; diff --git a/src/loginbe.h b/src/loginbe.h index 942618521..a403caad0 100644 --- a/src/loginbe.h +++ b/src/loginbe.h @@ -21,15 +21,15 @@ namespace CORE public: LoginBe(); - virtual ~LoginBe(); + ~LoginBe(); - virtual void start_login(); - virtual void logout(); + void start_login() override; + void logout() override; private: - virtual void receive_data( const char* , size_t ); - virtual void receive_finish(); + void receive_data( const char* , size_t ) override; + void receive_finish() override; }; diff --git a/src/loginp2.h b/src/loginp2.h index 06e41bd14..5c5fa6b40 100644 --- a/src/loginp2.h +++ b/src/loginp2.h @@ -23,15 +23,15 @@ namespace CORE public: Loginp2(); - virtual ~Loginp2(); + ~Loginp2(); - virtual void start_login(); - virtual void logout(); + void start_login() override; + void logout() override; private: - virtual void receive_data( const char* , size_t ); - virtual void receive_finish(); + void receive_data( const char* , size_t ) override; + void receive_finish() override; }; diff --git a/src/mainitempref.h b/src/mainitempref.h index b88b1d353..96e5c7dd8 100644 --- a/src/mainitempref.h +++ b/src/mainitempref.h @@ -14,15 +14,15 @@ namespace CORE public: MainItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~MainItemPref(){} + ~MainItemPref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/maintoolbar.h b/src/maintoolbar.h index 5aba203cb..a87f99649 100644 --- a/src/maintoolbar.h +++ b/src/maintoolbar.h @@ -41,11 +41,11 @@ namespace CORE public: MainToolBar(); - virtual ~MainToolBar(){} + ~MainToolBar() noexcept {} protected: - virtual void pack_buttons(); + void pack_buttons() override; }; } diff --git a/src/message/confirmdiag.h b/src/message/confirmdiag.h index e607a08de..c11a48fd6 100644 --- a/src/message/confirmdiag.h +++ b/src/message/confirmdiag.h @@ -23,7 +23,7 @@ namespace MESSAGE private: - virtual void slot_switch_page( GtkNotebookPage*, guint page ); + void slot_switch_page( GtkNotebookPage*, guint page ) override; }; } diff --git a/src/message/messageadmin.h b/src/message/messageadmin.h index a8e667c1b..042621467 100644 --- a/src/message/messageadmin.h +++ b/src/message/messageadmin.h @@ -42,9 +42,9 @@ namespace MESSAGE public: MessageAdmin( const std::string& url ); - virtual ~MessageAdmin(); + ~MessageAdmin(); - virtual void save_session(){} + void save_session() override {} void show_entry_new_subject( bool show ); std::string get_new_subject(); @@ -53,34 +53,35 @@ namespace MESSAGE protected: - virtual void set_status( const std::string& url, const std::string& stat, const bool force ); + void set_status( const std::string& url, const std::string& stat, const bool force ) override; // ツールバー - virtual void show_toolbar(); + void show_toolbar() override; - virtual void command_local( const COMMAND_ARGS& command ); + void command_local( const COMMAND_ARGS& command ) override; private: const bool delete_message( SKELETON::View * view ); // 復元をしない - virtual void restore( const bool only_locked ){} - virtual COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ){ + void restore( const bool only_locked ) override {} + COMMAND_ARGS url_to_openarg( const std::string& url, const bool tab, const bool lock ) override + { COMMAND_ARGS ret; return ret; } - virtual void open_view( const COMMAND_ARGS& command ); - virtual void switch_admin(); - virtual void tab_left( const bool updated ); - virtual void tab_right( const bool updated ); - virtual void close_view( const std::string& url ); - virtual void open_window(); - virtual void close_window(); + void open_view( const COMMAND_ARGS& command ) override; + void switch_admin() override; + void tab_left( const bool updated ) override; + void tab_right( const bool updated ) override; + void close_view( const std::string& url ) override; + void open_window() override; + void close_window() override; // タブの D&D 処理をしない - virtual void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ){} + void slot_drag_data_get( Gtk::SelectionData& selection_data, const int page ) override {} }; MESSAGE::MessageAdmin* get_admin(); diff --git a/src/message/messageview.h b/src/message/messageview.h index dd89eaa1e..9d5eaef4a 100644 --- a/src/message/messageview.h +++ b/src/message/messageview.h @@ -12,13 +12,13 @@ namespace MESSAGE { public: MessageViewMain( const std::string& url, const std::string& msg ); - virtual ~MessageViewMain(); + ~MessageViewMain(); - virtual void reload(); + void reload() override; private: - virtual void write_impl( const std::string& msg ); - virtual const std::string create_message(); + void write_impl( const std::string& msg ) override; + const std::string create_message() override; }; @@ -27,17 +27,16 @@ namespace MESSAGE { public: MessageViewNew( const std::string& url, const std::string& msg ); - virtual ~MessageViewNew(){} + ~MessageViewNew() noexcept {} - virtual void reload(); + void reload() override; private: - virtual void write_impl( const std::string& msg ); - virtual const std::string create_message(); + void write_impl( const std::string& msg ) override; + const std::string create_message() override; }; } - #endif diff --git a/src/message/messageviewbase.h b/src/message/messageviewbase.h index ab0e09ab8..540cf6ab8 100644 --- a/src/message/messageviewbase.h +++ b/src/message/messageviewbase.h @@ -79,43 +79,42 @@ namespace MESSAGE public: MessageViewBase( const std::string& url ); - virtual ~MessageViewBase(); + ~MessageViewBase(); // // SKELETON::View の関数のオーバロード // - virtual void save_session(){} + void save_session() override {} // 親ウィンドウを取得 - virtual Gtk::Window* get_parent_win(); + Gtk::Window* get_parent_win() override; // コピー用のURL - virtual const std::string url_for_copy(); + const std::string url_for_copy() override; // コマンド - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ); + const bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; // ロード中 - virtual const bool is_loading() const; + const bool is_loading() const override; // 規制中や行数や文字列がオーバーして書き込めない - virtual const bool is_broken(){ return ( ! m_str_pass.empty() || m_over_lines || m_over_lng ); } + const bool is_broken() override { return ( ! m_str_pass.empty() || m_over_lines || m_over_lng ); } // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ); + const bool slot_key_press( GdkEventKey* event ) override; - virtual void clock_in(); - virtual void write(); - virtual void reload(){} - virtual void relayout(); - virtual void close_view(); - virtual void redraw_view(); - virtual void focus_view(); - virtual const bool operate_view( const int control ); + void clock_in() override; + void write() override; + void reload() override {} + void relayout() override; + void close_view() override; + void redraw_view() override; + void focus_view() override; + const bool operate_view( const int control ) override; private: @@ -160,7 +159,7 @@ namespace MESSAGE protected: // Viewが所属するAdminクラス - virtual SKELETON::Admin* get_admin(); + SKELETON::Admin* get_admin() override; void set_message( const std::string& msg ); const Glib::ustring get_message(); diff --git a/src/message/messagewin.h b/src/message/messagewin.h index 566ce83d6..ba56a8f75 100644 --- a/src/message/messagewin.h +++ b/src/message/messagewin.h @@ -14,38 +14,38 @@ namespace MESSAGE public: MessageWin(); - virtual ~MessageWin(); + ~MessageWin(); protected: - virtual void switch_admin(); + void switch_admin() override; - virtual const int get_x_win(); - virtual const int get_y_win(); - virtual void set_x_win( const int x ); - virtual void set_y_win( const int y ); + const int get_x_win() override; + const int get_y_win() override; + void set_x_win( const int x ) override; + void set_y_win( const int y ) override; - virtual const int get_width_win(); - virtual const int get_height_win(); - virtual void set_width_win( const int width ); - virtual void set_height_win( const int height ); + const int get_width_win() override; + const int get_height_win() override; + void set_width_win( const int width ) override; + void set_height_win( const int height ) override; - virtual const bool is_focus_win(); - virtual void set_focus_win( const bool set ); + const bool is_focus_win() override; + void set_focus_win( const bool set ) override; - virtual const bool is_maximized_win(); - virtual void set_maximized_win( const bool set ); + const bool is_maximized_win() override; + void set_maximized_win( const bool set ) override; - virtual const bool is_iconified_win(); - virtual void set_iconified_win( const bool set ); + const bool is_iconified_win() override; + void set_iconified_win( const bool set ) override; - virtual const bool is_full_win(){ return false; } - virtual void set_full_win( const bool set ){} + const bool is_full_win() override { return false; } + void set_full_win( const bool ) override {} - virtual const bool is_shown_win(); - virtual void set_shown_win( const bool set ); + const bool is_shown_win() override; + void set_shown_win( const bool set ) override; - virtual bool on_delete_event( GdkEventAny* event ); + bool on_delete_event( GdkEventAny* event ) override; }; } diff --git a/src/message/post.h b/src/message/post.h index 35459b114..c640928c5 100644 --- a/src/message/post.h +++ b/src/message/post.h @@ -62,8 +62,8 @@ namespace MESSAGE void emit_sigfin(); void slot_response( int id ); - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; }; } diff --git a/src/message/toolbar.h b/src/message/toolbar.h index 77469e8be..624a69425 100644 --- a/src/message/toolbar.h +++ b/src/message/toolbar.h @@ -28,7 +28,7 @@ namespace MESSAGE public: MessageToolBarBase(); - virtual ~MessageToolBarBase(){} + ~MessageToolBarBase() noexcept {} // previewボタンのトグル void set_active_previewbutton( const bool active ); @@ -59,7 +59,7 @@ namespace MESSAGE public: MessageToolBar(); - virtual ~MessageToolBar(){} + ~MessageToolBar() noexcept {} void show_entry_new_subject( bool show ); std::string get_new_subject(); @@ -67,7 +67,7 @@ namespace MESSAGE protected: - virtual void pack_buttons(); + void pack_buttons() override; private: @@ -83,11 +83,11 @@ namespace MESSAGE public: MessageToolBarPreview(); - virtual ~MessageToolBarPreview(){} + ~MessageToolBarPreview() noexcept {} protected: - virtual void pack_buttons(); + void pack_buttons() override; }; } diff --git a/src/msgitempref.h b/src/msgitempref.h index 8b083599c..03b218d89 100644 --- a/src/msgitempref.h +++ b/src/msgitempref.h @@ -14,15 +14,15 @@ namespace CORE public: MsgItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~MsgItemPref(){} + ~MsgItemPref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/openurldiag.h b/src/openurldiag.h index 3781cc036..63fcfb8d6 100644 --- a/src/openurldiag.h +++ b/src/openurldiag.h @@ -19,11 +19,11 @@ namespace CORE public: OpenURLDialog( const std::string& url ); - virtual ~OpenURLDialog(){} + ~OpenURLDialog() noexcept {} protected: - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; }; } diff --git a/src/passwdpref.h b/src/passwdpref.h index 9f3bf2976..657668b68 100644 --- a/src/passwdpref.h +++ b/src/passwdpref.h @@ -125,8 +125,8 @@ namespace CORE PasswdFramep2 m_frame_p2; // OK押した - virtual void slot_ok_clicked(){ - + void slot_ok_clicked() override + { // 2ch CORE::get_login2ch()->set_username( MISC::remove_space( m_frame_2ch.entry_id.get_text() ) ); CORE::get_login2ch()->set_passwd( MISC::remove_space( m_frame_2ch.entry_passwd.get_text() ) ); @@ -176,7 +176,7 @@ namespace CORE show_all_children(); } - virtual ~PasswdPref(){} + ~PasswdPref() noexcept {} }; } diff --git a/src/privacypref.h b/src/privacypref.h index 45ec7e9ac..fcf80bb1d 100644 --- a/src/privacypref.h +++ b/src/privacypref.h @@ -36,7 +36,7 @@ namespace CORE } // OK押した - virtual void slot_ok_clicked() + void slot_ok_clicked() override { if( m_bt_board.get_active() ) CORE::core_set_command( "clear_board" ); if( m_bt_thread.get_active() ) CORE::core_set_command( "clear_thread" ); @@ -78,7 +78,7 @@ namespace CORE show_all_children(); } - virtual ~PrivacyPref(){} + ~PrivacyPref() noexcept {} }; } diff --git a/src/proxypref.h b/src/proxypref.h index 345ac7d86..88742c311 100644 --- a/src/proxypref.h +++ b/src/proxypref.h @@ -57,8 +57,8 @@ namespace CORE ProxyFrame m_frame_data; // OK押した - virtual void slot_ok_clicked(){ - + void slot_ok_clicked() override + { // 2ch if( m_frame_2ch.ckbt.get_active() ) CONFIG::set_use_proxy_for2ch( true ); else CONFIG::set_use_proxy_for2ch( false ); @@ -132,7 +132,7 @@ namespace CORE show_all_children(); } - virtual ~ProxyPref(){} + ~ProxyPref() noexcept {} }; } diff --git a/src/searchitempref.h b/src/searchitempref.h index 71c44e485..e13b0cf82 100644 --- a/src/searchitempref.h +++ b/src/searchitempref.h @@ -14,15 +14,15 @@ namespace CORE public: SearchItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~SearchItemPref(){} + ~SearchItemPref() noexcept {} private: // OKボタン - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/searchloader.h b/src/searchloader.h index 5133154d0..09fa14e10 100644 --- a/src/searchloader.h +++ b/src/searchloader.h @@ -33,15 +33,15 @@ namespace CORE protected: - virtual const std::string get_url(); - virtual const std::string get_path(){ return std::string(); } - virtual const std::string get_charset(){ return m_charset; } + const std::string get_url() override; + const std::string get_path() override { return {}; } + const std::string get_charset() override { return m_charset; } // ロード用データ作成 - virtual void create_loaderdata( JDLIB::LOADERDATA& data ); + void create_loaderdata( JDLIB::LOADERDATA& data ) override; // ロード後に呼び出される - virtual void parse_data(); + void parse_data() override; }; } diff --git a/src/searchmanager.h b/src/searchmanager.h index 52181dbb4..8b54df5a3 100644 --- a/src/searchmanager.h +++ b/src/searchmanager.h @@ -73,7 +73,7 @@ namespace CORE public: Search_Manager(); - virtual ~Search_Manager(); + ~Search_Manager(); SIG_SEARCH_FIN sig_search_fin(){ return m_sig_search_fin; } @@ -109,7 +109,7 @@ namespace CORE static void* launcher( void* ); void wait(); void thread_search(); - virtual void callback_dispatch(); + void callback_dispatch() override; void search_fin(); void search_fin_title(); }; diff --git a/src/setupwizard.h b/src/setupwizard.h index 3591d9e8e..68f747387 100644 --- a/src/setupwizard.h +++ b/src/setupwizard.h @@ -154,7 +154,7 @@ namespace CORE public: SetupWizard(); - virtual ~SetupWizard(); + ~SetupWizard(); private: void slot_switch_page( GtkNotebookPage* notebookpage, guint page ); diff --git a/src/sidebaritempref.h b/src/sidebaritempref.h index 6d96fe65c..211a61ab2 100644 --- a/src/sidebaritempref.h +++ b/src/sidebaritempref.h @@ -14,15 +14,15 @@ namespace CORE public: SidebarItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~SidebarItemPref(){} + ~SidebarItemPref() noexcept {} private: // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; // デフォルトボタン - virtual void slot_default(); + void slot_default() override; }; } diff --git a/src/skeleton/aamenu.h b/src/skeleton/aamenu.h index d2ba9a57f..6b52a47d4 100644 --- a/src/skeleton/aamenu.h +++ b/src/skeleton/aamenu.h @@ -31,16 +31,16 @@ namespace SKELETON public: AAMenu( Gtk::Window& parent ); - virtual ~AAMenu(); + ~AAMenu(); // 選択されたらemitされる SIG_AAMENU_SELECTED sig_selected() { return m_sig_selected; } protected: - virtual void on_map(); - virtual void on_hide(); - virtual bool on_key_press_event (GdkEventKey* event); + void on_map() override; + void on_hide() override; + bool on_key_press_event (GdkEventKey* event) override; private: diff --git a/src/skeleton/admin.h b/src/skeleton/admin.h index ebc199250..576751ec4 100644 --- a/src/skeleton/admin.h +++ b/src/skeleton/admin.h @@ -59,7 +59,7 @@ namespace SKELETON public: Admin( const std::string& url ); - virtual ~Admin(); + ~Admin(); virtual void save_session(); @@ -155,7 +155,7 @@ namespace SKELETON // immediately = true のときディスパッチャを呼ばずにすぐさま実行 void set_command_impl( const bool immediately, const COMMAND_ARGS& command_arg ); - virtual void callback_dispatch(); + void callback_dispatch() override; // admin共通コマンド実行 virtual void exec_command(); diff --git a/src/skeleton/backforwardbutton.h b/src/skeleton/backforwardbutton.h index fea820112..e0f5c0120 100644 --- a/src/skeleton/backforwardbutton.h +++ b/src/skeleton/backforwardbutton.h @@ -23,7 +23,7 @@ namespace SKELETON protected: // ポップアップメニュー表示 - virtual void show_popupmenu(); + void show_popupmenu() override; }; } diff --git a/src/skeleton/compentry.cpp b/src/skeleton/compentry.cpp index 19afab96a..836968e65 100644 --- a/src/skeleton/compentry.cpp +++ b/src/skeleton/compentry.cpp @@ -51,7 +51,7 @@ CompletionEntry::CompletionEntry( const int mode ) } -CompletionEntry::~CompletionEntry() +CompletionEntry::~CompletionEntry() noexcept {} diff --git a/src/skeleton/compentry.h b/src/skeleton/compentry.h index deb43170f..198c97bba 100644 --- a/src/skeleton/compentry.h +++ b/src/skeleton/compentry.h @@ -44,7 +44,7 @@ namespace SKELETON // mode は補完モード ( compmanager.h 参照 ) CompletionEntry( const int mode ); - virtual ~CompletionEntry(); + ~CompletionEntry() noexcept; SIG_OPERATE signal_operate(){ return m_sig_operate; } SIG_ACTIVATE signal_activate(){ return m_sig_activate; } diff --git a/src/skeleton/detaildiag.h b/src/skeleton/detaildiag.h index 002edb843..f1b90d68f 100644 --- a/src/skeleton/detaildiag.h +++ b/src/skeleton/detaildiag.h @@ -24,7 +24,7 @@ namespace SKELETON const std::string& message, const std::string& tab_message, const std::string& detail_html, const std::string& tab_detail ); - virtual ~DetailDiag(); + ~DetailDiag(); protected: @@ -34,7 +34,7 @@ namespace SKELETON private: virtual void slot_switch_page( GtkNotebookPage*, guint page ); - virtual void timeout(); + void timeout() override; }; } diff --git a/src/skeleton/dragnote.h b/src/skeleton/dragnote.h index 234bfa251..1fcc517fc 100644 --- a/src/skeleton/dragnote.h +++ b/src/skeleton/dragnote.h @@ -114,7 +114,7 @@ namespace SKELETON SIG_DRAG_DATA_GET sig_drag_data_get() { return m_sig_drag_data_get; } DragableNoteBook(); - virtual ~DragableNoteBook(); + ~DragableNoteBook(); void clock_in(); void focus_out(); @@ -168,7 +168,7 @@ namespace SKELETON private: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; // DragableNoteBook を構成している各Notebookの高さ // 及びタブの高さと位置を取得 ( 枠の描画用 ) diff --git a/src/skeleton/dragtreeview.h b/src/skeleton/dragtreeview.h index 99ef04683..2c0048b49 100644 --- a/src/skeleton/dragtreeview.h +++ b/src/skeleton/dragtreeview.h @@ -62,7 +62,7 @@ namespace SKELETON // use_usr_fontcolor が true の時はフォントや色を指定する DragTreeView( const std::string& url, const std::string& dndtarget, const bool use_usr_fontcolor, const std::string& fontname, const int colorid_text, const int colorid_bg, const int colorid_bg_even ); - virtual ~DragTreeView(); + ~DragTreeView(); virtual void clock_in(); @@ -114,19 +114,19 @@ namespace SKELETON // drag_source_set() でセットしたボタン以外でドラッグしたときは on_drag_motion() // ではなくて普通に on_motion_notify_event() が呼ばれるのに注意 // - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); - virtual void on_drag_begin( const Glib::RefPtr< Gdk::DragContext>& context ); - virtual void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ); + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; + void on_drag_begin( const Glib::RefPtr< Gdk::DragContext>& context ) override; + void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ) override; - virtual void on_drag_data_received( const Glib::RefPtr< Gdk::DragContext >& context, int x, int y, - const Gtk::SelectionData& selection, guint info, guint time ); + void on_drag_data_received( const Glib::RefPtr< Gdk::DragContext >& context, int x, int y, + const Gtk::SelectionData& selection, guint info, guint time ) override; - virtual bool on_key_press_event( GdkEventKey* event ); + bool on_key_press_event( GdkEventKey* event ) override; - virtual bool on_motion_notify_event( GdkEventMotion* event ); - virtual bool on_scroll_event( GdkEventScroll* event ); - virtual bool on_leave_notify_event( GdkEventCrossing* event ); + bool on_motion_notify_event( GdkEventMotion* event ) override; + bool on_scroll_event( GdkEventScroll* event ) override; + bool on_leave_notify_event( GdkEventCrossing* event ) override; private: diff --git a/src/skeleton/editcolumns.h b/src/skeleton/editcolumns.h index 42849b357..45c9800c0 100644 --- a/src/skeleton/editcolumns.h +++ b/src/skeleton/editcolumns.h @@ -49,7 +49,7 @@ namespace SKELETON Gtk::TreeModelColumn< size_t > m_dirid; // ディレクトリID EditColumns(); - virtual ~EditColumns(); + ~EditColumns(); virtual void setup_row( Gtk::TreeModel::Row& row, const Glib::ustring url, const Glib::ustring name, const Glib::ustring data, const int type, const size_t dirid ); diff --git a/src/skeleton/edittreeview.h b/src/skeleton/edittreeview.h index bd516e1fa..32191f956 100644 --- a/src/skeleton/edittreeview.h +++ b/src/skeleton/edittreeview.h @@ -86,9 +86,9 @@ namespace SKELETON EditTreeView( const std::string& url, const std::string& dndtarget, EditColumns& columns ); - virtual ~EditTreeView(); + ~EditTreeView(); - virtual void clock_in(); + void clock_in() override; SIG_DROPPED_FROM_OTHER sig_dropped_from_other(){ return m_sig_dropped_from_other; } @@ -167,7 +167,7 @@ namespace SKELETON // 選択した行をまとめて削除 // force = true なら m_editable が false でも削除 - virtual void delete_selected_rows( const bool force ); + void delete_selected_rows( const bool force ) override; void undo(); void redo(); @@ -190,15 +190,15 @@ namespace SKELETON protected: - virtual bool on_drag_motion( const Glib::RefPtr& context, int x, int y, guint time ); - virtual void on_drag_leave( const Glib::RefPtr& context, guint time ); - virtual bool on_drag_drop( const Glib::RefPtr& context, int x, int y, guint time ); - virtual void on_drag_data_get( const Glib::RefPtr& context, - Gtk::SelectionData& selection_data, guint info, guint time ); - virtual void on_drag_data_received( const Glib::RefPtr& context, int x, int y, - const Gtk::SelectionData& selection_data, guint info, guint time ); - virtual void on_drag_data_delete( const Glib::RefPtr& context ); - virtual void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ); + bool on_drag_motion( const Glib::RefPtr& context, int x, int y, guint time ) override; + void on_drag_leave( const Glib::RefPtr< Gdk::DragContext >& context, guint time ) override; + bool on_drag_drop( const Glib::RefPtr& context, int x, int y, guint time ) override; + void on_drag_data_get( const Glib::RefPtr< Gdk::DragContext >& context, + Gtk::SelectionData& selection_data, guint info, guint time ) override; + void on_drag_data_received( const Glib::RefPtr< Gdk::DragContext >& context, int x, int y, + const Gtk::SelectionData& selection_data, guint info, guint time ) override; + void on_drag_data_delete( const Glib::RefPtr& context ) override; + void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ) override; private: diff --git a/src/skeleton/editview.h b/src/skeleton/editview.h index bfba9bf17..d958d72fd 100644 --- a/src/skeleton/editview.h +++ b/src/skeleton/editview.h @@ -61,7 +61,7 @@ namespace SKELETON SIG_BUTTON_PRESS sig_button_press() { return m_sig_button_press; } EditTextView(); - virtual ~EditTextView(); + ~EditTextView(); void insert_str( const std::string& str, bool use_br ); @@ -83,12 +83,12 @@ namespace SKELETON protected: - virtual bool on_button_press_event( GdkEventButton* event ); + bool on_button_press_event( GdkEventButton* event ) override; - virtual bool on_key_press_event( GdkEventKey* event ); - virtual bool on_key_release_event( GdkEventKey* event ); + bool on_key_press_event( GdkEventKey* event ) override; + bool on_key_release_event( GdkEventKey* event ) override; - virtual void on_populate_popup( Gtk::Menu* menu ); + void on_populate_popup( Gtk::Menu* menu ) override; void slot_buffer_changed(); @@ -131,7 +131,7 @@ namespace SKELETON show_all_children(); } - virtual ~EditView(){} + ~EditView() noexcept {} SIG_BUTTON_PRESS sig_button_press(){ return m_textview.sig_button_press(); } SIG_KEY_PRESS sig_key_press(){ return m_textview.sig_key_press(); } diff --git a/src/skeleton/entry.h b/src/skeleton/entry.h index fdca0a721..c29230594 100644 --- a/src/skeleton/entry.h +++ b/src/skeleton/entry.h @@ -33,7 +33,7 @@ namespace SKELETON SIG_OPERATE signal_operate(){ return m_sig_operate; } JDEntry() : Gtk::Entry(){} - virtual ~JDEntry(){} + ~JDEntry() noexcept {} // CONTROL::Control のモード設定( controlid.h 参照 ) // キー入力をフックして JDEntry::on_key_release_event() で SIG_OPERATE をemitする @@ -42,11 +42,11 @@ namespace SKELETON protected: // マウスクリックのフック - virtual bool on_button_press_event( GdkEventButton* event ); + bool on_button_press_event( GdkEventButton* event ) override; // キー入力のフック - virtual bool on_key_press_event( GdkEventKey* event ); - virtual bool on_key_release_event( GdkEventKey* event ); + bool on_key_press_event( GdkEventKey* event ) override; + bool on_key_release_event( GdkEventKey* event ) override; }; } diff --git a/src/skeleton/filediag.h b/src/skeleton/filediag.h index 7bbd1ea3e..226f407b2 100644 --- a/src/skeleton/filediag.h +++ b/src/skeleton/filediag.h @@ -45,7 +45,7 @@ namespace SKELETON else set_transient_for( *CORE::get_mainwindow() ); } - virtual ~FileDiag(){} + ~FileDiag() noexcept {} virtual int run(){ diff --git a/src/skeleton/hpaned.h b/src/skeleton/hpaned.h index a4e1d3af7..c3448696a 100644 --- a/src/skeleton/hpaned.h +++ b/src/skeleton/hpaned.h @@ -19,18 +19,18 @@ namespace SKELETON public: JDHPaned( const int fixmode ); - virtual ~JDHPaned(){} + ~JDHPaned() noexcept {} HPaneControl& get_ctrl(){ return m_pctrl; } protected: - virtual void on_realize(); - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); - virtual bool on_motion_notify_event( GdkEventMotion* event ); - virtual bool on_enter_notify_event( GdkEventCrossing* event ); - virtual bool on_leave_notify_event( GdkEventCrossing* event ); + void on_realize() override; + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; + bool on_motion_notify_event( GdkEventMotion* event ) override; + bool on_enter_notify_event( GdkEventCrossing* event ) override; + bool on_leave_notify_event( GdkEventCrossing* event ) override; }; } diff --git a/src/skeleton/jdtoolbar.h b/src/skeleton/jdtoolbar.h index 56c4ef51d..75b345221 100644 --- a/src/skeleton/jdtoolbar.h +++ b/src/skeleton/jdtoolbar.h @@ -15,10 +15,10 @@ namespace SKELETON class JDToolbar : public Gtk::Toolbar { public: - JDToolbar(){} + JDToolbar() noexcept {} protected: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; }; } diff --git a/src/skeleton/loadable.h b/src/skeleton/loadable.h index d2dc2aafd..2121f99da 100644 --- a/src/skeleton/loadable.h +++ b/src/skeleton/loadable.h @@ -78,7 +78,7 @@ namespace SKELETON public: Loadable(); - virtual ~Loadable(); + ~Loadable(); // HTTPコードなどの完全クリア void clear_load_data(); @@ -139,7 +139,7 @@ namespace SKELETON virtual void receive_finish(){}; void delete_loader(); - virtual void callback_dispatch(); + void callback_dispatch() override; const int get_loader_code(); const std::string get_loader_str_code(); diff --git a/src/skeleton/lockable.h b/src/skeleton/lockable.h index c9d56c43e..a71acda87 100644 --- a/src/skeleton/lockable.h +++ b/src/skeleton/lockable.h @@ -20,7 +20,7 @@ namespace SKELETON Lockable() :m_lock( 0 ){} - virtual ~Lockable(){} + virtual ~Lockable() noexcept {} const int get_lock() const { return m_lock; } diff --git a/src/skeleton/login.h b/src/skeleton/login.h index 62806d599..16a337339 100644 --- a/src/skeleton/login.h +++ b/src/skeleton/login.h @@ -28,7 +28,7 @@ namespace SKELETON public: Login( const std::string& url ); - virtual ~Login(); + ~Login(); const bool login_now() const { return m_login_now; } void set_login_now( bool login_now ){ m_login_now = login_now; } diff --git a/src/skeleton/menubutton.h b/src/skeleton/menubutton.h index ab177bebf..89fa9895b 100644 --- a/src/skeleton/menubutton.h +++ b/src/skeleton/menubutton.h @@ -42,7 +42,7 @@ namespace SKELETON MenuButton( const bool show_arrow , const int id ); - virtual ~MenuButton(); + ~MenuButton(); Gtk::Widget* get_label_widget(){ return m_label; } diff --git a/src/skeleton/msgdiag.h b/src/skeleton/msgdiag.h index 98c6b92d5..032a4fbce 100644 --- a/src/skeleton/msgdiag.h +++ b/src/skeleton/msgdiag.h @@ -33,7 +33,7 @@ namespace SKELETON Gtk::ButtonsType buttons = Gtk::BUTTONS_OK, bool modal = false); - virtual ~MsgDiag(){} + ~MsgDiag() noexcept {} void add_default_button( const Gtk::StockID& stock_id, const int id ); void add_default_button( const Glib::ustring& label, const int id ); diff --git a/src/skeleton/panecontrol.cpp b/src/skeleton/panecontrol.cpp index 62cf94f31..c87838fc2 100644 --- a/src/skeleton/panecontrol.cpp +++ b/src/skeleton/panecontrol.cpp @@ -25,7 +25,7 @@ PaneControl::PaneControl( Gtk::Paned& paned, int fixmode ) } -PaneControl::~PaneControl() +PaneControl::~PaneControl() noexcept {} diff --git a/src/skeleton/panecontrol.h b/src/skeleton/panecontrol.h index 1aa63ec56..02fcd9516 100644 --- a/src/skeleton/panecontrol.h +++ b/src/skeleton/panecontrol.h @@ -56,7 +56,7 @@ namespace SKELETON public: PaneControl( Gtk::Paned& paned, int fixmode ); - virtual ~PaneControl(); + virtual ~PaneControl() noexcept; SIG_PANE_MODECHANGED& sig_pane_modechanged() { return m_sig_pane_modechanged; } @@ -100,13 +100,14 @@ namespace SKELETON public: HPaneControl( Gtk::Paned& paned, int fixmode ) : PaneControl( paned, fixmode ) {} - ~HPaneControl(){} + ~HPaneControl() noexcept {} protected: - virtual int get_size(){ return get_paned().get_width(); } + int get_size() override { return get_paned().get_width(); } - virtual bool is_separater_clicked( GdkEventButton* event ){ + bool is_separater_clicked( GdkEventButton* event ) override + { if( is_on_paned() && event->type == GDK_BUTTON_PRESS && event->button == 1 && event->x >= 0 && event->x <= 8 ) return true; return false; @@ -121,13 +122,14 @@ namespace SKELETON public: VPaneControl( Gtk::Paned& paned, int fixmode ) : PaneControl( paned, fixmode ) {} - ~VPaneControl(){} + ~VPaneControl() noexcept {} protected: - virtual int get_size(){ return get_paned().get_height(); } + int get_size() override { return get_paned().get_height(); } - virtual bool is_separater_clicked( GdkEventButton* event ){ + bool is_separater_clicked( GdkEventButton* event ) override + { if( is_on_paned() && event->type == GDK_BUTTON_PRESS && event->button == 1 && event->y >= 0 && event->y <= 8 ) return true; return false; diff --git a/src/skeleton/popupwin.h b/src/skeleton/popupwin.h index f0105c48f..3e84136e0 100644 --- a/src/skeleton/popupwin.h +++ b/src/skeleton/popupwin.h @@ -28,7 +28,7 @@ namespace SKELETON public: PopupWin( Gtk::Widget* parent, SKELETON::View* view, const int mrg_x, const int mrg_y ); - virtual ~PopupWin(); + ~PopupWin(); // m_view からの hide シグナルをブリッジする SIG_HIDE_POPUP& sig_hide_popup() { return m_sig_hide_popup; } diff --git a/src/skeleton/popupwinbase.h b/src/skeleton/popupwinbase.h index 9c2ab9aa2..53f116538 100644 --- a/src/skeleton/popupwinbase.h +++ b/src/skeleton/popupwinbase.h @@ -36,13 +36,13 @@ namespace SKELETON PopupWinBase( bool draw_frame ) : Gtk::Window( Gtk::WINDOW_POPUP ), m_draw_frame( draw_frame ){ if( m_draw_frame ) set_border_width( 1 ); } - virtual ~PopupWinBase(){} + ~PopupWinBase() noexcept {} SIG_CONFIGURED_POPUP sig_configured(){ return m_sig_configured; } protected: - virtual void on_realize() + void on_realize() override { Gtk::Window::on_realize(); @@ -50,7 +50,7 @@ namespace SKELETON m_gc = Gdk::GC::create( window ); } - virtual bool on_expose_event( GdkEventExpose* event ) + bool on_expose_event( GdkEventExpose* event ) override { bool ret = Gtk::Window::on_expose_event( event ); @@ -63,7 +63,7 @@ namespace SKELETON return ret; } - virtual bool on_configure_event( GdkEventConfigure* event ) + bool on_configure_event( GdkEventConfigure* event ) override { bool ret = Gtk::Window::on_configure_event( event ); m_sig_configured.emit( get_width(), get_height() ); diff --git a/src/skeleton/prefdiag.h b/src/skeleton/prefdiag.h index b236c3fc6..7d8c57d94 100644 --- a/src/skeleton/prefdiag.h +++ b/src/skeleton/prefdiag.h @@ -27,7 +27,7 @@ namespace SKELETON // parent == NULL のときはメインウィンドウをparentにする PrefDiag( Gtk::Window* parent, const std::string& url, const bool add_cancel = true, const bool add_apply = false, const bool add_open = false ); - virtual ~PrefDiag(); + ~PrefDiag(); const std::string& get_url() const { return m_url; } diff --git a/src/skeleton/selectitempref.h b/src/skeleton/selectitempref.h index 39cebe11c..07b5a401e 100644 --- a/src/skeleton/selectitempref.h +++ b/src/skeleton/selectitempref.h @@ -80,7 +80,7 @@ namespace SKELETON public: SelectItemPref( Gtk::Window* parent, const std::string& url ); - virtual ~SelectItemPref(){} + ~SelectItemPref() noexcept {} private: @@ -119,10 +119,10 @@ namespace SKELETON void erase_hidden( const std::string& name ); // KeyPressのフック - virtual bool on_key_press_event( GdkEventKey* event ); + bool on_key_press_event( GdkEventKey* event ) override; // KeyReleaseのフック - virtual bool on_key_release_event( GdkEventKey* event ); + bool on_key_release_event( GdkEventKey* event ) override; // 最上位へ移動 void slot_top(); @@ -146,7 +146,7 @@ namespace SKELETON virtual void slot_default() = 0; // 適用ボタン - void slot_apply_clicked(){ slot_ok_clicked(); } + void slot_apply_clicked() override { slot_ok_clicked(); } }; } diff --git a/src/skeleton/spinbutton.h b/src/skeleton/spinbutton.h index 13f358705..9549035ed 100644 --- a/src/skeleton/spinbutton.h +++ b/src/skeleton/spinbutton.h @@ -24,7 +24,8 @@ namespace SKELETON protected: #if !GTKMM_CHECK_VERSION(2,5,0) - virtual void on_spinbutton_digits_changed(){ + void on_spinbutton_digits_changed() override + { const size_t size = 256; char str[ size ]; snprintf( str, size, "%d", (int)get_value() ); @@ -43,7 +44,8 @@ namespace SKELETON protected: #if !GTKMM_CHECK_VERSION(2,5,0) - virtual void on_spinbutton_digits_changed(){ + void on_spinbutton_digits_changed() override + { const size_t size = 256; char str[ size ]; snprintf( str, size, "%4.3lf", get_value() ); diff --git a/src/skeleton/tablabel.h b/src/skeleton/tablabel.h index cfaed3cc7..16c42a9e0 100644 --- a/src/skeleton/tablabel.h +++ b/src/skeleton/tablabel.h @@ -46,7 +46,7 @@ namespace SKELETON public: TabLabel( const std::string& url ); - virtual ~TabLabel(); + ~TabLabel(); SIG_TAB_MOTION_EVENT sig_tab_motion_event(){ return m_sig_tab_motion_event; } SIG_TAB_LEAVE_EVENT sig_tab_leave_event(){ return m_sig_tab_leave_event; } @@ -88,13 +88,13 @@ namespace SKELETON private: - virtual bool on_motion_notify_event( GdkEventMotion* event ); - virtual bool on_leave_notify_event( GdkEventCrossing* event ); + bool on_motion_notify_event( GdkEventMotion* event ) override; + bool on_leave_notify_event( GdkEventCrossing* event ) override; - virtual void on_drag_begin( const Glib::RefPtr< Gdk::DragContext>& context ); - virtual void on_drag_data_get( const Glib::RefPtr& context, - Gtk::SelectionData& selection_data, guint info, guint time ); - virtual void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ); + void on_drag_begin( const Glib::RefPtr< Gdk::DragContext >& context ) override; + void on_drag_data_get( const Glib::RefPtr< Gdk::DragContext >& context, + Gtk::SelectionData& selection_data, guint info, guint time ) override; + void on_drag_end( const Glib::RefPtr< Gdk::DragContext>& context ) override; }; } diff --git a/src/skeleton/tabnote.cpp b/src/skeleton/tabnote.cpp index 1dce243e9..ec18cc415 100644 --- a/src/skeleton/tabnote.cpp +++ b/src/skeleton/tabnote.cpp @@ -340,7 +340,7 @@ class DummyWidget : public Gtk::Widget set_flags( Gtk::NO_WINDOW ); #endif } - virtual ~DummyWidget(){} + ~DummyWidget() noexcept {} }; diff --git a/src/skeleton/tabnote.h b/src/skeleton/tabnote.h index 970b1e484..da57e391e 100644 --- a/src/skeleton/tabnote.h +++ b/src/skeleton/tabnote.h @@ -122,19 +122,19 @@ namespace SKELETON protected: - virtual bool on_expose_event( GdkEventExpose* event ); - virtual void on_size_allocate( Gtk::Allocation& allocation ); + bool on_expose_event( GdkEventExpose* event ) override; + void on_size_allocate( Gtk::Allocation& allocation ) override; // signal_button_press_event と signal_button_release_event は emit されない // ときがあるので自前でemitする - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; - virtual bool on_motion_notify_event( GdkEventMotion* event ); - virtual bool on_leave_notify_event( GdkEventCrossing* event ); - virtual bool on_scroll_event( GdkEventScroll* event ); + bool on_motion_notify_event( GdkEventMotion* event ) override; + bool on_leave_notify_event( GdkEventCrossing* event ) override; + bool on_scroll_event( GdkEventScroll* event ) override; - virtual bool on_drag_motion( const Glib::RefPtr& context, int x, int y, guint time); + bool on_drag_motion( const Glib::RefPtr& context, int x, int y, guint time) override; }; } diff --git a/src/skeleton/tabswitchbutton.cpp b/src/skeleton/tabswitchbutton.cpp index 409321469..9db2d1585 100644 --- a/src/skeleton/tabswitchbutton.cpp +++ b/src/skeleton/tabswitchbutton.cpp @@ -33,7 +33,7 @@ TabSwitchButton::TabSwitchButton( DragableNoteBook* parent ) } -TabSwitchButton::~TabSwitchButton() +TabSwitchButton::~TabSwitchButton() noexcept {} diff --git a/src/skeleton/tabswitchbutton.h b/src/skeleton/tabswitchbutton.h index 4e3886635..f2e8d58c2 100644 --- a/src/skeleton/tabswitchbutton.h +++ b/src/skeleton/tabswitchbutton.h @@ -29,7 +29,7 @@ namespace SKELETON public: TabSwitchButton( DragableNoteBook* parent ); - virtual ~TabSwitchButton(); + ~TabSwitchButton() noexcept; Gtk::Button& get_button(){ return m_button; } void show_button(); @@ -37,7 +37,7 @@ namespace SKELETON protected: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; }; } diff --git a/src/skeleton/tabswitchmenu.h b/src/skeleton/tabswitchmenu.h index fb2f707d1..30ff9058c 100644 --- a/src/skeleton/tabswitchmenu.h +++ b/src/skeleton/tabswitchmenu.h @@ -26,7 +26,7 @@ namespace SKELETON public: TabSwitchMenu( DragableNoteBook* notebook, Admin* admin ); - virtual ~TabSwitchMenu(); + ~TabSwitchMenu(); void remove_items(); void append_items(); @@ -38,7 +38,7 @@ namespace SKELETON protected: - virtual void on_deactivate(); + void on_deactivate() override; }; } diff --git a/src/skeleton/textloader.h b/src/skeleton/textloader.h index d2f41eb0c..1d1707bf1 100644 --- a/src/skeleton/textloader.h +++ b/src/skeleton/textloader.h @@ -62,8 +62,8 @@ namespace SKELETON void init(); void clear(); - virtual void receive_data( const char* data, size_t size ); - virtual void receive_finish(); + void receive_data( const char* data, size_t size ) override; + void receive_finish() override; }; } diff --git a/src/skeleton/toolbar.h b/src/skeleton/toolbar.h index 7a95176cd..595ad1d38 100644 --- a/src/skeleton/toolbar.h +++ b/src/skeleton/toolbar.h @@ -78,7 +78,7 @@ namespace SKELETON public: ToolBar( Admin* admin ); - virtual ~ToolBar(){} + ~ToolBar() noexcept {} void set_url( const std::string& url ); const std::string& get_url() { return m_url; } diff --git a/src/skeleton/toolbarnote.h b/src/skeleton/toolbarnote.h index 87c78572f..a006b67c9 100644 --- a/src/skeleton/toolbarnote.h +++ b/src/skeleton/toolbarnote.h @@ -22,7 +22,7 @@ namespace SKELETON protected: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; }; } diff --git a/src/skeleton/treeviewbase.cpp b/src/skeleton/treeviewbase.cpp index 356d19a5c..7d3685a62 100644 --- a/src/skeleton/treeviewbase.cpp +++ b/src/skeleton/treeviewbase.cpp @@ -19,7 +19,7 @@ JDTreeViewBase::JDTreeViewBase() } -JDTreeViewBase::~JDTreeViewBase() +JDTreeViewBase::~JDTreeViewBase() noexcept {} diff --git a/src/skeleton/treeviewbase.h b/src/skeleton/treeviewbase.h index aa0801f1f..957a034c9 100644 --- a/src/skeleton/treeviewbase.h +++ b/src/skeleton/treeviewbase.h @@ -43,7 +43,7 @@ namespace SKELETON SIG_MOTION_NOTIFY& sig_motion_notify() { return m_sig_motion_notify; } JDTreeViewBase(); - virtual ~JDTreeViewBase(); + ~JDTreeViewBase() noexcept; // 行数 const int get_row_size(); @@ -99,13 +99,13 @@ namespace SKELETON protected: - virtual bool on_key_press_event( GdkEventKey* event ); - virtual bool on_key_release_event( GdkEventKey* event ); + bool on_key_press_event( GdkEventKey* event ) override; + bool on_key_release_event( GdkEventKey* event ) override; - virtual bool on_scroll_event( GdkEventScroll* event ); - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); - virtual bool on_motion_notify_event( GdkEventMotion* event ); + bool on_scroll_event( GdkEventScroll* event ) override; + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; + bool on_motion_notify_event( GdkEventMotion* event ) override; }; } diff --git a/src/skeleton/undobuffer.h b/src/skeleton/undobuffer.h index 0e2dce109..546a68839 100644 --- a/src/skeleton/undobuffer.h +++ b/src/skeleton/undobuffer.h @@ -56,7 +56,7 @@ namespace SKELETON public: UNDO_BUFFER(); - virtual ~UNDO_BUFFER(){} + virtual ~UNDO_BUFFER() noexcept {} SIG_UNDO sig_undo(){ return m_sig_undo; } SIG_REDO sig_redo(){ return m_sig_redo; } diff --git a/src/skeleton/view.h b/src/skeleton/view.h index c49e89307..1b6eb149a 100644 --- a/src/skeleton/view.h +++ b/src/skeleton/view.h @@ -164,7 +164,7 @@ namespace SKELETON SIG_RESIZE_POPUP sig_resize_popup(){ return m_sig_resize_popup; } View( const std::string& url, const std::string& arg1 = std::string(), const std::string& arg2 = std::string() ); - virtual ~View(){} + ~View() noexcept {} virtual void save_session() = 0; diff --git a/src/skeleton/viewnote.h b/src/skeleton/viewnote.h index 0ff10f0c2..6c191ec49 100644 --- a/src/skeleton/viewnote.h +++ b/src/skeleton/viewnote.h @@ -24,7 +24,7 @@ namespace SKELETON protected: - virtual bool on_expose_event( GdkEventExpose* event ); + bool on_expose_event( GdkEventExpose* event ) override; }; } diff --git a/src/skeleton/vpaned.h b/src/skeleton/vpaned.h index b4d450bbb..0cc5200c8 100644 --- a/src/skeleton/vpaned.h +++ b/src/skeleton/vpaned.h @@ -19,18 +19,18 @@ namespace SKELETON public: JDVPaned( const int fixmode ); - virtual ~JDVPaned(){} + ~JDVPaned() noexcept {} VPaneControl& get_ctrl(){ return m_pctrl; } protected: - virtual void on_realize(); - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); - virtual bool on_motion_notify_event( GdkEventMotion* event ); - virtual bool on_enter_notify_event( GdkEventCrossing* event ); - virtual bool on_leave_notify_event( GdkEventCrossing* event ); + void on_realize() override; + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; + bool on_motion_notify_event( GdkEventMotion* event ) override; + bool on_enter_notify_event( GdkEventCrossing* event ) override; + bool on_leave_notify_event( GdkEventCrossing* event ) override; }; } diff --git a/src/skeleton/window.h b/src/skeleton/window.h index 2b3225111..e39e0a4c0 100644 --- a/src/skeleton/window.h +++ b/src/skeleton/window.h @@ -56,7 +56,7 @@ namespace SKELETON public: JDWindow( const bool fold_when_focusout, const bool need_mginfo = true ); - virtual ~JDWindow(); + ~JDWindow(); Gtk::HBox& get_statbar(){ return m_statbar; } @@ -130,12 +130,12 @@ namespace SKELETON virtual const bool is_shown_win() = 0; virtual void set_shown_win( const bool set ) = 0; - virtual bool on_focus_in_event( GdkEventFocus* event ); - virtual bool on_focus_out_event( GdkEventFocus* event ); - virtual bool on_delete_event( GdkEventAny* event ); - virtual bool on_window_state_event( GdkEventWindowState* event ); - virtual bool on_configure_event( GdkEventConfigure* event ); - virtual bool on_key_press_event( GdkEventKey* event ); + bool on_focus_in_event( GdkEventFocus* event ) override; + bool on_focus_out_event( GdkEventFocus* event ) override; + bool on_delete_event( GdkEventAny* event ) override; + bool on_window_state_event( GdkEventWindowState* event ) override; + bool on_configure_event( GdkEventConfigure* event ) override; + bool on_key_press_event( GdkEventKey* event ) override; private: diff --git a/src/sound/playsound.h b/src/sound/playsound.h index 0163631de..fdd725620 100644 --- a/src/sound/playsound.h +++ b/src/sound/playsound.h @@ -56,7 +56,7 @@ namespace SOUND public: Play_Sound(); - virtual ~Play_Sound(); + ~Play_Sound(); const bool is_playing() const { return m_playing; } @@ -68,7 +68,7 @@ namespace SOUND void wait(); static void* launcher( void* ); void play_wavfile(); - virtual void callback_dispatch(); + void callback_dispatch() override; }; diff --git a/src/updatemanager.cpp b/src/updatemanager.cpp index d9ac947f2..7fd496dbc 100644 --- a/src/updatemanager.cpp +++ b/src/updatemanager.cpp @@ -44,7 +44,7 @@ CheckUpdate_Manager::CheckUpdate_Manager() } -CheckUpdate_Manager::~CheckUpdate_Manager() +CheckUpdate_Manager::~CheckUpdate_Manager() noexcept { assert( ! m_list_item.size() ); } diff --git a/src/updatemanager.h b/src/updatemanager.h index 5f8177bc0..06e1810b5 100644 --- a/src/updatemanager.h +++ b/src/updatemanager.h @@ -37,7 +37,7 @@ namespace CORE public: CheckUpdate_Manager(); - virtual ~CheckUpdate_Manager(); + virtual ~CheckUpdate_Manager() noexcept; void run(); void stop(); diff --git a/src/urlreplacemanager.h b/src/urlreplacemanager.h index 5dacf3284..fa89f8414 100644 --- a/src/urlreplacemanager.h +++ b/src/urlreplacemanager.h @@ -39,7 +39,7 @@ namespace CORE public: Urlreplace_Manager(); - virtual ~Urlreplace_Manager(){} + virtual ~Urlreplace_Manager() noexcept {} // URLを任意の正規表現で変換する const bool exec( std::string &url ); diff --git a/src/usrcmdmanager.h b/src/usrcmdmanager.h index cbb125aa6..501c10bb3 100644 --- a/src/usrcmdmanager.h +++ b/src/usrcmdmanager.h @@ -27,7 +27,7 @@ namespace CORE public: Usrcmd_Manager(); - virtual ~Usrcmd_Manager(){} + virtual ~Usrcmd_Manager() noexcept {} XML::Document& xml_document() { return m_document; } void analyze_xml(); diff --git a/src/usrcmdpref.h b/src/usrcmdpref.h index 0749fb875..a56fd8f01 100644 --- a/src/usrcmdpref.h +++ b/src/usrcmdpref.h @@ -61,10 +61,10 @@ namespace CORE private: - virtual void timeout(); + void timeout() override; // OK押した - virtual void slot_ok_clicked(); + void slot_ok_clicked() override; bool slot_button_press( GdkEventButton* event ); bool slot_button_release( GdkEventButton* event ); diff --git a/src/winmain.h b/src/winmain.h index f9d967f20..9fdb5322a 100644 --- a/src/winmain.h +++ b/src/winmain.h @@ -26,7 +26,7 @@ class JDWinMain : public SKELETON::JDWindow public: JDWinMain( const bool init, const bool skip_setupdiag, const int init_w, const int init_h, const int init_x, const int init_y ); - virtual ~JDWinMain(); + ~JDWinMain(); // 通常のセッション保存 void save_session(); @@ -35,37 +35,37 @@ class JDWinMain : public SKELETON::JDWindow protected: - virtual const int get_x_win(); - virtual const int get_y_win(); - virtual void set_x_win( const int x ); - virtual void set_y_win( const int y ); + const int get_x_win() override; + const int get_y_win() override; + void set_x_win( const int x ) override; + void set_y_win( const int y ) override; - virtual const int get_width_win(); - virtual const int get_height_win(); - virtual void set_width_win( const int width ); - virtual void set_height_win( const int height ); + const int get_width_win() override; + const int get_height_win() override; + void set_width_win( const int width ) override; + void set_height_win( const int height ) override; - virtual const bool is_focus_win(); - virtual void set_focus_win( const bool set ); + const bool is_focus_win() override; + void set_focus_win( const bool set ) override; - virtual const bool is_maximized_win(); - virtual void set_maximized_win( const bool set ); + const bool is_maximized_win() override; + void set_maximized_win( const bool set ) override; - virtual const bool is_iconified_win(); - virtual void set_iconified_win( const bool set ); + const bool is_iconified_win() override; + void set_iconified_win( const bool set ) override; - virtual const bool is_full_win(); - virtual void set_full_win( const bool set ); + const bool is_full_win() override; + void set_full_win( const bool set ) override; - virtual const bool is_shown_win(); - virtual void set_shown_win( const bool set ); + const bool is_shown_win() override; + void set_shown_win( const bool set ) override; - virtual bool on_delete_event( GdkEventAny* event ); - virtual bool on_window_state_event( GdkEventWindowState* event ); - virtual bool on_configure_event( GdkEventConfigure* event ); - virtual bool on_button_press_event( GdkEventButton* event ); - virtual bool on_button_release_event( GdkEventButton* event ); - virtual bool on_motion_notify_event( GdkEventMotion* event ); + bool on_delete_event( GdkEventAny* event ) override; + bool on_window_state_event( GdkEventWindowState* event ) override; + bool on_configure_event( GdkEventConfigure* event ) override; + bool on_button_press_event( GdkEventButton* event ) override; + bool on_button_release_event( GdkEventButton* event ) override; + bool on_motion_notify_event( GdkEventMotion* event ) override; private: const bool operate_win( const int control ); diff --git a/src/xml/document.h b/src/xml/document.h index f56f27755..c113155a1 100644 --- a/src/xml/document.h +++ b/src/xml/document.h @@ -30,7 +30,7 @@ namespace XML // 何も無い状態からノードツリーを作る場合 Document(); - virtual ~Document(){}; + ~Document() noexcept {} // このクラスは代入可能 Document& operator=( const Document& document ); From f1c16fda35449bdaf3107f8625b2774b3cdc70ed Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Wed, 12 Dec 2018 21:00:53 +0900 Subject: [PATCH 02/13] Fix io manipulator to reset std::hex by std::dec --- src/control/control.cpp | 2 +- src/control/mousekeypref.cpp | 2 +- src/jdlib/misctrip.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control/control.cpp b/src/control/control.cpp index 9c7d394df..7b7aa56b8 100644 --- a/src/control/control.cpp +++ b/src/control/control.cpp @@ -86,7 +86,7 @@ const int Control::key_press( const GdkEventKey* event ) if( CONTROL::is_ascii( key ) && ( key < 'A' || key > 'Z' ) ) shift = false; #ifdef _DEBUG - std::cout << "Control::key_press key = " << std::hex << key; + std::cout << "Control::key_press key = " << std::hex << key << std::dec; if( ctrl ) std::cout << " ctrl"; if( shift ) std::cout << " shift"; if( alt ) std::cout << " alt"; diff --git a/src/control/mousekeypref.cpp b/src/control/mousekeypref.cpp index 51f5e26b4..f2cf691d5 100644 --- a/src/control/mousekeypref.cpp +++ b/src/control/mousekeypref.cpp @@ -69,7 +69,7 @@ bool InputDiag::on_key_press_event( GdkEventKey* event ) if( CONTROL::is_ascii( key ) ) shift = false; #ifdef _DEBUG - std::cout << "InputDiag::on_key_press_event key = " << std::hex << key; + std::cout << "InputDiag::on_key_press_event key = " << std::hex << key << std::dec; if( ctrl ) std::cout << " ctrl"; if( shift ) std::cout << " shift"; if( alt ) std::cout << " alt"; diff --git a/src/jdlib/misctrip.cpp b/src/jdlib/misctrip.cpp index 16bdd680e..b3a6ad24d 100644 --- a/src/jdlib/misctrip.cpp +++ b/src/jdlib/misctrip.cpp @@ -80,7 +80,7 @@ const std::string create_sha1( const std::string& key ) sha1 << digest[n]; #ifdef _DEBUG - std::cout << std::hex << (unsigned int)digest[n]; + std::cout << std::hex << (unsigned int)digest[n] << std::dec; #endif } From 0721cf27905c792aacd6f76c5f5c92b134172da6 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Mon, 26 Nov 2018 16:46:53 +0900 Subject: [PATCH 03/13] Use compiler option "-Wextra" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * -Wextraで有効になる-Wunused-parameterは修正方法が複数あり 検討が必要なので暫定的に無効にする * Fix warning for 'const' type qualifier on return type has no effect --- configure.ac | 3 +- src/aamanager.cpp | 4 +- src/aamanager.h | 8 +- src/article/articleview.cpp | 10 +- src/article/articleview.h | 10 +- src/article/articleviewbase.cpp | 18 +- src/article/articleviewbase.h | 24 +-- src/article/articleviewinfo.h | 2 +- src/article/articleviewpopup.h | 2 +- src/article/articleviewpreview.cpp | 2 +- src/article/articleviewpreview.h | 2 +- src/article/articleviewsearch.cpp | 2 +- src/article/articleviewsearch.h | 12 +- src/article/drawareabase.cpp | 46 ++--- src/article/drawareabase.h | 54 +++--- src/article/font.cpp | 2 +- src/article/font.h | 2 +- src/article/layouttree.h | 4 +- src/bbslist/bbslistviewbase.cpp | 14 +- src/bbslist/bbslistviewbase.h | 18 +- src/bbslist/selectlistview.cpp | 4 +- src/bbslist/selectlistview.h | 4 +- src/board/boardview.cpp | 4 +- src/board/boardview.h | 4 +- src/board/boardviewbase.cpp | 40 ++-- src/board/boardviewbase.h | 46 ++--- src/board/boardviewlog.cpp | 8 +- src/board/boardviewlog.h | 8 +- src/board/boardviewnext.cpp | 8 +- src/board/boardviewnext.h | 8 +- src/board/boardviewsidebar.cpp | 8 +- src/board/boardviewsidebar.h | 8 +- src/browsers.cpp | 2 +- src/browsers.h | 2 +- src/cache.cpp | 4 +- src/cache.h | 4 +- src/config/configitems.cpp | 2 +- src/config/configitems.h | 2 +- src/config/globalconf.cpp | 296 ++++++++++++++--------------- src/config/globalconf.h | 294 ++++++++++++++-------------- src/control/buttonconfig.cpp | 4 +- src/control/buttonconfig.h | 4 +- src/control/buttonpref.cpp | 2 +- src/control/buttonpref.h | 2 +- src/control/control.cpp | 20 +- src/control/control.h | 22 +-- src/control/controlutil.cpp | 24 +-- src/control/controlutil.h | 28 +-- src/control/keyconfig.cpp | 4 +- src/control/keyconfig.h | 4 +- src/control/keypref.cpp | 2 +- src/control/keypref.h | 2 +- src/control/mousekeyconf.cpp | 8 +- src/control/mousekeyconf.h | 8 +- src/control/mousekeyitem.h | 26 +-- src/control/mousekeypref.h | 14 +- src/control/mousepref.cpp | 2 +- src/control/mousepref.h | 2 +- src/dbimg/img.cpp | 16 +- src/dbimg/img.h | 36 ++-- src/dbimg/imginterface.cpp | 38 ++-- src/dbimg/imginterface.h | 42 ++-- src/dbimg/imgroot.cpp | 2 +- src/dbimg/imgroot.h | 4 +- src/dbtree/article2ch.cpp | 2 +- src/dbtree/article2ch.h | 2 +- src/dbtree/articlebase.cpp | 34 ++-- src/dbtree/articlebase.h | 80 ++++---- src/dbtree/articlehash.cpp | 2 +- src/dbtree/articlehash.h | 8 +- src/dbtree/articlejbbs.h | 2 +- src/dbtree/articlelocal.cpp | 2 +- src/dbtree/articlelocal.h | 2 +- src/dbtree/articlemachi.cpp | 2 +- src/dbtree/articlemachi.h | 2 +- src/dbtree/board2ch.cpp | 4 +- src/dbtree/board2ch.h | 8 +- src/dbtree/board2chcompati.cpp | 8 +- src/dbtree/board2chcompati.h | 8 +- src/dbtree/boardbase.cpp | 12 +- src/dbtree/boardbase.h | 54 +++--- src/dbtree/boardjbbs.cpp | 2 +- src/dbtree/boardjbbs.h | 2 +- src/dbtree/boardmachi.cpp | 2 +- src/dbtree/boardmachi.h | 2 +- src/dbtree/interface.cpp | 106 +++++------ src/dbtree/interface.h | 124 ++++++------ src/dbtree/nodetreebase.cpp | 26 +-- src/dbtree/nodetreebase.h | 36 ++-- src/dbtree/root.cpp | 12 +- src/dbtree/root.h | 12 +- src/dbtree/settingloader.h | 4 +- src/dbtree/spchar_decoder.cpp | 6 +- src/dbtree/spchar_decoder.h | 2 +- src/dndmanager.cpp | 2 +- src/dndmanager.h | 4 +- src/environment.cpp | 2 +- src/environment.h | 2 +- src/history/historymanager.cpp | 10 +- src/history/historymanager.h | 10 +- src/history/historysubmenu.cpp | 2 +- src/history/historysubmenu.h | 2 +- src/history/viewhistory.cpp | 4 +- src/history/viewhistory.h | 12 +- src/image/imageadmin.cpp | 4 +- src/image/imageadmin.h | 4 +- src/image/imageareabase.cpp | 2 +- src/image/imageareabase.h | 10 +- src/image/imageareaicon.cpp | 4 +- src/image/imageareaicon.h | 4 +- src/image/imageview.cpp | 2 +- src/image/imageview.h | 2 +- src/image/imageviewbase.cpp | 6 +- src/image/imageviewbase.h | 16 +- src/image/imageviewpopup.cpp | 2 +- src/image/imageviewpopup.h | 2 +- src/image/imagewin.cpp | 16 +- src/image/imagewin.h | 18 +- src/jdlib/confloader.cpp | 8 +- src/jdlib/confloader.h | 10 +- src/jdlib/hash_set.cpp | 4 +- src/jdlib/hash_set.h | 8 +- src/jdlib/imgloader.cpp | 4 +- src/jdlib/imgloader.h | 4 +- src/jdlib/jdregex.cpp | 10 +- src/jdlib/jdregex.h | 12 +- src/jdlib/jdthread.cpp | 4 +- src/jdlib/jdthread.h | 6 +- src/jdlib/loader.cpp | 14 +- src/jdlib/loader.h | 10 +- src/jdlib/misctime.cpp | 4 +- src/jdlib/misctime.h | 4 +- src/jdlib/miscutil.cpp | 26 +-- src/jdlib/miscutil.h | 30 +-- src/jdlib/ssl.cpp | 16 +- src/jdlib/ssl.h | 8 +- src/jdlib/tfidf.cpp | 6 +- src/jdlib/tfidf.h | 6 +- src/linkfiltermanager.cpp | 2 +- src/linkfiltermanager.h | 2 +- src/message/logmanager.cpp | 6 +- src/message/logmanager.h | 8 +- src/message/messageadmin.cpp | 2 +- src/message/messageadmin.h | 2 +- src/message/messageviewbase.cpp | 8 +- src/message/messageviewbase.h | 14 +- src/message/messagewin.cpp | 16 +- src/message/messagewin.h | 18 +- src/searchmanager.cpp | 6 +- src/searchmanager.h | 10 +- src/session.cpp | 172 ++++++++--------- src/session.h | 172 ++++++++--------- src/sharedbuffer.cpp | 2 +- src/sharedbuffer.h | 2 +- src/skeleton/aamenu.cpp | 2 +- src/skeleton/aamenu.h | 2 +- src/skeleton/admin.cpp | 12 +- src/skeleton/admin.h | 18 +- src/skeleton/dragnote.cpp | 10 +- src/skeleton/dragnote.h | 12 +- src/skeleton/dragtreeview.cpp | 4 +- src/skeleton/dragtreeview.h | 6 +- src/skeleton/edittreeview.cpp | 12 +- src/skeleton/edittreeview.h | 14 +- src/skeleton/iconpopup.h | 4 +- src/skeleton/label_entry.cpp | 2 +- src/skeleton/label_entry.h | 2 +- src/skeleton/loadable.cpp | 8 +- src/skeleton/loadable.h | 16 +- src/skeleton/lockable.h | 2 +- src/skeleton/login.h | 2 +- src/skeleton/panecontrol.h | 6 +- src/skeleton/tablabel.cpp | 2 +- src/skeleton/tablabel.h | 12 +- src/skeleton/tabnote.cpp | 6 +- src/skeleton/tabnote.h | 6 +- src/skeleton/toolbar.cpp | 2 +- src/skeleton/toolbar.h | 2 +- src/skeleton/treeviewbase.cpp | 8 +- src/skeleton/treeviewbase.h | 8 +- src/skeleton/undobuffer.h | 4 +- src/skeleton/view.cpp | 4 +- src/skeleton/view.h | 53 +++--- src/skeleton/window.cpp | 2 +- src/skeleton/window.h | 22 +-- src/sound/playsound.h | 2 +- src/urlreplacemanager.cpp | 8 +- src/urlreplacemanager.h | 8 +- src/usrcmdmanager.cpp | 6 +- src/usrcmdmanager.h | 8 +- src/winmain.cpp | 20 +- src/winmain.h | 20 +- src/xml/dom.cpp | 8 +- src/xml/dom.h | 8 +- 194 files changed, 1505 insertions(+), 1505 deletions(-) diff --git a/configure.ac b/configure.ac index 0af9b8f16..7750df9af 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,8 @@ dnl ユーザー設定 dnl dnl 追加コンパイルオプション -CXXFLAGS="-ggdb -Wall -pedantic $CXXFLAGS" +dnl -Wextraで有効になる-Wunused-parameterは修正方法の検討が必要なので暫定的に無効 +CXXFLAGS="-ggdb -Wall -Wextra -Wno-unused-parameter -pedantic $CXXFLAGS" dnl --------------------------------------------------- dnl --------------------------------------------------- diff --git a/src/aamanager.cpp b/src/aamanager.cpp index 27cce9f3e..3ff8e6e69 100644 --- a/src/aamanager.cpp +++ b/src/aamanager.cpp @@ -262,7 +262,7 @@ const std::string AAManager::id2shortcut( const int id ) // ショートカットからid取得 -const int AAManager::shortcut2id( const char key ) +int AAManager::shortcut2id( const char key ) { if( key == '\0' ) return -1; @@ -300,7 +300,7 @@ void AAManager::append_history( const int id ) // num 番目の履歴をIDに変換 -const int AAManager::history2id( const int num ) +int AAManager::history2id( const int num ) { if( num < 0 || num >= get_historysize() ) return -1; diff --git a/src/aamanager.h b/src/aamanager.h index dcc039563..bfbb181ab 100644 --- a/src/aamanager.h +++ b/src/aamanager.h @@ -26,8 +26,8 @@ namespace CORE AAManager(); virtual ~AAManager(); - const int get_size(){ return m_vec_label.size(); } - const int get_historysize(){ return m_history.size(); } + int get_size(){ return m_vec_label.size(); } + int get_historysize(){ return m_history.size(); } const std::string get_label( const int id ); const std::string get_aa( const int id ); @@ -36,13 +36,13 @@ namespace CORE const std::string id2shortcut( const int id ); // ショートカットからid取得 - const int shortcut2id( const char key ); + int shortcut2id( const char key ); // id 番を履歴に追加 void append_history( const int id ); // num 番目の履歴をIDに変換 - const int history2id( const int num ); + int history2id( const int num ); void save_history(); diff --git a/src/article/articleview.cpp b/src/article/articleview.cpp index bf2f75dd9..c0574441e 100644 --- a/src/article/articleview.cpp +++ b/src/article/articleview.cpp @@ -175,14 +175,14 @@ void ArticleViewMain::goto_num( const int num_to, const int num_from ) // ロード中 -const bool ArticleViewMain::is_loading() const +bool ArticleViewMain::is_loading() const { return get_article()->is_loading(); } // 更新した -const bool ArticleViewMain::is_updated() +bool ArticleViewMain::is_updated() { #ifdef _DEBUG @@ -194,7 +194,7 @@ const bool ArticleViewMain::is_updated() // 更新チェックして更新可能か -const bool ArticleViewMain::is_check_update() +bool ArticleViewMain::is_check_update() { #ifdef _DEBUG std::cout << "ArticleViewMain::is_check_update " << url_article() << " " << ( get_article()->get_status() & STATUS_UPDATE ) << std::endl; @@ -204,13 +204,13 @@ const bool ArticleViewMain::is_check_update() } // 古いデータか -const bool ArticleViewMain::is_old() +bool ArticleViewMain::is_old() { return ( get_article()->get_status() & STATUS_OLD ); } // 壊れているか -const bool ArticleViewMain::is_broken() +bool ArticleViewMain::is_broken() { return ( get_article()->get_status() & STATUS_BROKEN ); } diff --git a/src/article/articleview.h b/src/article/articleview.h index ca61cd450..dbb895c14 100644 --- a/src/article/articleview.h +++ b/src/article/articleview.h @@ -45,11 +45,11 @@ namespace ARTICLE void save_session() override; - const bool is_loading() const override; - const bool is_updated() override; - const bool is_check_update() override; - const bool is_old() override; - const bool is_broken() override; + bool is_loading() const override; + bool is_updated() override; + bool is_check_update() override; + bool is_old() override; + bool is_broken() override; void show_view() override; void update_view() override; diff --git a/src/article/articleviewbase.cpp b/src/article/articleviewbase.cpp index dd3b67b30..d859dffe3 100644 --- a/src/article/articleviewbase.cpp +++ b/src/article/articleviewbase.cpp @@ -685,7 +685,7 @@ const char* ArticleViewBase::get_menu_item( const int item ) // // クライアント領域幅 // -const int ArticleViewBase::width_client() +int ArticleViewBase::width_client() { #ifdef _DEBUG if( m_drawarea ) std::cout << "ArticleViewBase::width_client : " << m_drawarea->width_client() << std::endl; @@ -700,7 +700,7 @@ const int ArticleViewBase::width_client() // // クライアント領高さ // -const int ArticleViewBase::height_client() +int ArticleViewBase::height_client() { #ifdef _DEBUG if( m_drawarea ) std::cout << "ArticleViewBase::height_client : " << m_drawarea->height_client() << std::endl; @@ -713,7 +713,7 @@ const int ArticleViewBase::height_client() // アイコンのID取得 -const int ArticleViewBase::get_icon( const std::string& iconname ) +int ArticleViewBase::get_icon( const std::string& iconname ) { int id = ICON::NONE; @@ -735,7 +735,7 @@ const int ArticleViewBase::get_icon( const std::string& iconname ) // // コマンド // -const bool ArticleViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool ArticleViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { #ifdef _DEBUG std::cout << "ArticleViewBase::set_command " << get_url() << std::endl @@ -1006,7 +1006,7 @@ void ArticleViewBase::delete_open_view() // 実況可能か -const bool ArticleViewBase::get_enable_live() +bool ArticleViewBase::get_enable_live() { return ( m_enable_live && DBTREE::board_get_live_sec( m_url_article ) ); } @@ -1040,7 +1040,7 @@ void ArticleViewBase::warp_pointer_to_popup() // // viewの操作 // -const bool ArticleViewBase::operate_view( const int control ) +bool ArticleViewBase::operate_view( const int control ) { assert( m_drawarea ); @@ -2088,7 +2088,7 @@ bool ArticleViewBase::slot_motion_notify( GdkEventMotion* event ) // // drawareaのキープレスイベント // -const bool ArticleViewBase::slot_key_press( GdkEventKey* event ) +bool ArticleViewBase::slot_key_press( GdkEventKey* event ) { #ifdef _DEBUG std::cout << "ArticleViewBase::slot_key_press\n"; @@ -2807,7 +2807,7 @@ void ArticleViewBase::open_image( const std::string& url, const int res_number, // // ポップアップが表示されているか // -const bool ArticleViewBase::is_popup_shown() const +bool ArticleViewBase::is_popup_shown() const { return ( m_popup_win && m_popup_shown ); } @@ -2816,7 +2816,7 @@ const bool ArticleViewBase::is_popup_shown() const // // ポップアップが表示されていてかつマウスがその上にあるか // -const bool ArticleViewBase::is_mouse_on_popup() +bool ArticleViewBase::is_mouse_on_popup() { if( ! is_popup_shown() ) return false; return m_popup_win->view()->is_mouse_on_view(); diff --git a/src/article/articleviewbase.h b/src/article/articleviewbase.h index f1c0a590e..1fa60b5ff 100644 --- a/src/article/articleviewbase.h +++ b/src/article/articleviewbase.h @@ -103,18 +103,18 @@ namespace ARTICLE void save_session() override {} const std::string url_for_copy() override; // コピーやURLバー表示用のURL - const int width_client() override; - const int height_client() override; - const int get_icon( const std::string& iconname ) override; - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + int width_client() override; + int height_client() override; + int get_icon( const std::string& iconname ) override; + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; void clock_in() override; void clock_in_smooth_scroll(); // キーを押した - const bool slot_key_press( GdkEventKey* event ) override; + bool slot_key_press( GdkEventKey* event ) override; void write() override; void reload() override; @@ -125,7 +125,7 @@ namespace ARTICLE void close_view() override; void delete_view() override; void set_favorite() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; void goto_top() override; void goto_bottom() override; void goto_num( const int num_to, const int num_from ) override; @@ -146,10 +146,10 @@ namespace ARTICLE void delete_open_view(); // 実況モードが可能か - const bool get_enable_live(); + bool get_enable_live(); // 実況モードか - const bool get_live() const { return m_live; } + bool get_live() const { return m_live; } DrawAreaBase* drawarea(); @@ -170,7 +170,7 @@ namespace ARTICLE void hide_popup( const bool force = false ); // ポップアップが表示されているか - const bool is_popup_shown() const; + bool is_popup_shown() const; // 初期設定 void setup_view(); @@ -268,7 +268,7 @@ namespace ARTICLE // レスポップアップ関係 // ポップアップが表示されていてかつマウスがその上にあるか - const bool is_mouse_on_popup(); + bool is_mouse_on_popup(); void show_popup( SKELETON::View* view, const int mrg_x, const int mrg_y ); bool slot_popup_leave_notify_event( GdkEventCrossing* event ); diff --git a/src/article/articleviewinfo.h b/src/article/articleviewinfo.h index edc39438b..7e22e829a 100644 --- a/src/article/articleviewinfo.h +++ b/src/article/articleviewinfo.h @@ -17,7 +17,7 @@ namespace ARTICLE ~ArticleViewInfo(); // viewの操作をキャンセル - const bool operate_view( const int control ) override { return false; } + bool operate_view( const int control ) override { return false; } protected: diff --git a/src/article/articleviewpopup.h b/src/article/articleviewpopup.h index f57913b07..52ff0c1e5 100644 --- a/src/article/articleviewpopup.h +++ b/src/article/articleviewpopup.h @@ -25,7 +25,7 @@ namespace ARTICLE protected: void show_instruct_popup(); - const bool show_abone() const { return m_show_abone; } + bool show_abone() const { return m_show_abone; } private: DrawAreaBase* create_drawarea() override; diff --git a/src/article/articleviewpreview.cpp b/src/article/articleviewpreview.cpp index 40b874d2e..a779e8b79 100644 --- a/src/article/articleviewpreview.cpp +++ b/src/article/articleviewpreview.cpp @@ -52,7 +52,7 @@ ArticleViewPreview::~ArticleViewPreview() // // viewの操作 // -const bool ArticleViewPreview::operate_view( const int control ) +bool ArticleViewPreview::operate_view( const int control ) { if( control == CONTROL::None ) return false; diff --git a/src/article/articleviewpreview.h b/src/article/articleviewpreview.h index a1fd763b0..d42b108a9 100644 --- a/src/article/articleviewpreview.h +++ b/src/article/articleviewpreview.h @@ -18,7 +18,7 @@ namespace ARTICLE ArticleViewPreview( const std::string& url ); ~ArticleViewPreview(); - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; private: diff --git a/src/article/articleviewsearch.cpp b/src/article/articleviewsearch.cpp index 889b1d2ea..2500a7777 100644 --- a/src/article/articleviewsearch.cpp +++ b/src/article/articleviewsearch.cpp @@ -197,7 +197,7 @@ const std::string ArticleViewSearch::url_for_copy() // // コマンド // -const bool ArticleViewSearch::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool ArticleViewSearch::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { // URL とツールバーの状態を一致させる if( command == "set_toolbar_from_url" ){ diff --git a/src/article/articleviewsearch.h b/src/article/articleviewsearch.h index 43c259d6b..4f5c0a04c 100644 --- a/src/article/articleviewsearch.h +++ b/src/article/articleviewsearch.h @@ -36,11 +36,11 @@ namespace ARTICLE // SKELETON::View の関数のオーバロード const std::string url_for_copy() override; // コピーやURLバー表示用のURL - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; - const bool is_loading() const override { return m_loading; } + bool is_loading() const override { return m_loading; } void focus_view() override; void show_view() override; @@ -51,8 +51,8 @@ namespace ARTICLE // 検索 void exec_search() override; void operate_search( const std::string& controlid ) override; - const bool get_enable_bm() const{ return m_enable_bm; } - const bool get_bm() const { return m_bm; } + bool get_enable_bm() const { return m_enable_bm; } + bool get_bm() const { return m_bm; } void set_bm( const bool set ){ m_bm = set; } protected: diff --git a/src/article/drawareabase.cpp b/src/article/drawareabase.cpp index 0a38e970b..220fe3053 100644 --- a/src/article/drawareabase.cpp +++ b/src/article/drawareabase.cpp @@ -211,7 +211,7 @@ void DrawAreaBase::setup( const bool show_abone, const bool show_scrbar, const b // // 背景色のID( colorid.h にある ID を指定) // -const int DrawAreaBase::get_colorid_back() +int DrawAreaBase::get_colorid_back() { if( m_css_body.bg_color >= 0 ) return m_css_body.bg_color; @@ -477,7 +477,7 @@ void DrawAreaBase::focus_out() // 新着セパレータのあるレス番号の取得とセット -const int DrawAreaBase::get_separator_new() +int DrawAreaBase::get_separator_new() { return m_layout_tree->get_separator_new(); } @@ -498,7 +498,7 @@ void DrawAreaBase::hide_separator_new() // セパレータが画面に表示されているか -const bool DrawAreaBase::is_separator_on_screen() +bool DrawAreaBase::is_separator_on_screen() { if( ! m_layout_tree ) return false; @@ -517,7 +517,7 @@ const bool DrawAreaBase::is_separator_on_screen() // 現在のポインタの下にあるレス番号取得 -const int DrawAreaBase::get_current_res_num() +int DrawAreaBase::get_current_res_num() { const int y = m_y_pointer + get_vscr_val(); @@ -546,7 +546,7 @@ const std::string DrawAreaBase::str_selection() // 範囲選択を開始したレス番号 -const int DrawAreaBase::get_selection_resnum_from() +int DrawAreaBase::get_selection_resnum_from() { if( ! m_selection.select ) return 0; if( ! m_selection.caret_from.layout ) return 0; @@ -556,7 +556,7 @@ const int DrawAreaBase::get_selection_resnum_from() // 範囲選択を終了したレス番号 -const int DrawAreaBase::get_selection_resnum_to() +int DrawAreaBase::get_selection_resnum_to() { if( ! m_selection.select ) return 0; if( ! m_selection.caret_to.layout ) return 0; @@ -800,7 +800,7 @@ bool DrawAreaBase::exec_layout() // is_popup = true ならポップアップウィンドウの幅を親ビューの幅とする // offset_y は y 座標の上オフセット行数 // -const bool DrawAreaBase::exec_layout_impl( const bool is_popup, const int offset_y ) +bool DrawAreaBase::exec_layout_impl( const bool is_popup, const int offset_y ) { // 起動中とシャットダウン中は処理しない if( SESSION::is_booting() ) return false; @@ -1546,7 +1546,7 @@ bool DrawAreaBase::set_init_wide_mode( const char* str, const int pos_start, con // wide_mode : 全角半角モード( アルファベット以外の文字ではモードにしたがって幅を変える ) // mode : fontid.h で定義されているフォントのID // -const int DrawAreaBase::get_width_of_one_char( const char* utfstr, int& byte, char& pre_char, bool& wide_mode, const int mode ) +int DrawAreaBase::get_width_of_one_char( const char* utfstr, int& byte, char& pre_char, bool& wide_mode, const int mode ) { int width = 0; int width_wide = 0; @@ -1676,7 +1676,7 @@ const int DrawAreaBase::get_width_of_one_char( const char* utfstr, int& byte, ch // y から height の高さ分だけ描画する // height == 0 ならスクロールした分だけ描画( y は無視 ) // -const bool DrawAreaBase::draw_screen( const int y, const int height ) +bool DrawAreaBase::draw_screen( const int y, const int height ) { if( ! m_enable_draw ) return false; if( ! m_gc ) return false; @@ -2398,7 +2398,7 @@ void DrawAreaBase::draw_frame() // byte_from : 描画開始位置 // byte_to : 描画終了位置 // -const bool DrawAreaBase::get_selection_byte( const LAYOUT* layout, const SELECTION& selection, size_t& byte_from, size_t& byte_to ) +bool DrawAreaBase::get_selection_byte( const LAYOUT* layout, const SELECTION& selection, size_t& byte_from, size_t& byte_to ) { if( ! layout ) return false; if( ! selection.caret_from.layout ) return false; @@ -2560,7 +2560,7 @@ void DrawAreaBase::draw_one_text_node( LAYOUT* layout, const CLIPINFO& ci ) // // 戻り値 : true なら描画後に再レイアウトを実行する // -const bool DrawAreaBase::draw_one_img_node( LAYOUT* layout, const CLIPINFO& ci ) +bool DrawAreaBase::draw_one_img_node( LAYOUT* layout, const CLIPINFO& ci ) { #ifdef _DEBUG std::cout << "DrawAreaBase::draw_one_img_node link = " << layout->link << std::endl; @@ -2864,7 +2864,7 @@ int DrawAreaBase::set_num_id( LAYOUT* layout ) // // 実際にスクロールして描画を実行するのは exec_scroll() // -const bool DrawAreaBase::set_scroll( const int control ) +bool DrawAreaBase::set_scroll( const int control ) { // スクロール系の操作でないときは関数を抜ける switch( control ){ @@ -3450,7 +3450,7 @@ void DrawAreaBase::goto_back() // // 戻り値: ヒット数 // -const int DrawAreaBase::search( const std::list< std::string >& list_query, const bool reverse ) +int DrawAreaBase::search( const std::list< std::string >& list_query, const bool reverse ) { assert( m_layout_tree ); @@ -3640,7 +3640,7 @@ const int DrawAreaBase::search( const std::list< std::string >& list_query, cons // // 戻り値: ヒット数 // -const int DrawAreaBase::search_move( const bool reverse ) +int DrawAreaBase::search_move( const bool reverse ) { #ifdef _DEBUG std::cout << "ArticleViewBase::search_move " << m_multi_selection.size() << std::endl; @@ -4049,8 +4049,8 @@ bool is_separate_char( const int ucs2 ) // // ダブルクリック時にキャレット位置を決める // -const bool DrawAreaBase::set_carets_dclick( CARET_POSITION& caret_left, CARET_POSITION& caret_right - ,const int x, const int y, const bool triple ) +bool DrawAreaBase::set_carets_dclick( CARET_POSITION& caret_left, CARET_POSITION& caret_right, + const int x, const int y, const bool triple ) { if( ! m_layout_tree ) return false; @@ -4206,7 +4206,7 @@ const bool DrawAreaBase::set_carets_dclick( CARET_POSITION& caret_left, CARET_PO // caret_left から caret_right まで範囲選択状態にする // -const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_left, const CARET_POSITION& caret_right ) +bool DrawAreaBase::set_selection( const CARET_POSITION& caret_left, const CARET_POSITION& caret_right ) { m_caret_pos_pre = caret_left; m_caret_pos = caret_left; @@ -4220,7 +4220,7 @@ const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_left, const // // caret_pos : 移動後のキャレット位置、m_caret_pos_pre から caret_pos まで範囲選択状態にする // -const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos ) +bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos ) { return set_selection( caret_pos, NULL ); } @@ -4228,7 +4228,7 @@ const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos ) // rect に再描画範囲を計算して入れる( NULL なら入らない ) // その後 draw_screen( rect.y, rect.height ) で選択範囲を描画する -const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos, RECTANGLE* rect ) +bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos, RECTANGLE* rect ) { if( ! caret_pos.layout ) return false; if( ! m_caret_pos_dragstart.layout ) return false; @@ -4323,7 +4323,7 @@ const bool DrawAreaBase::set_selection( const CARET_POSITION& caret_pos, RECTANG // // set_selection()の中で毎回やると重いので、ボタンのリリース時に一回だけ呼び出すこと // -const bool DrawAreaBase::set_selection_str() +bool DrawAreaBase::set_selection_str() { assert( m_layout_tree ); @@ -4430,7 +4430,7 @@ const bool DrawAreaBase::set_selection_str() // caret_pos が範囲選択の上にあるか // // -const bool DrawAreaBase::is_caret_on_selection( const CARET_POSITION& caret_pos ) +bool DrawAreaBase::is_caret_on_selection( const CARET_POSITION& caret_pos ) { LAYOUT* layout = caret_pos.layout; @@ -5146,7 +5146,7 @@ bool DrawAreaBase::motion_mouse() // // 現在のポインターの下のノードからカーソルのタイプを決定する // -const Gdk::CursorType DrawAreaBase::get_cursor_type() +Gdk::CursorType DrawAreaBase::get_cursor_type() { Gdk::CursorType cursor_type = Gdk::ARROW; if( m_layout_current ){ @@ -5182,7 +5182,7 @@ void DrawAreaBase::change_cursor( const Gdk::CursorType type ) // // キーを押した // -const bool DrawAreaBase::slot_key_press_event( GdkEventKey* event ) +bool DrawAreaBase::slot_key_press_event( GdkEventKey* event ) { //オートスクロール中なら無視 if( m_scrollinfo.mode == SCROLL_AUTO ) return true; diff --git a/src/article/drawareabase.h b/src/article/drawareabase.h index c325c4ce3..9ab6135e8 100644 --- a/src/article/drawareabase.h +++ b/src/article/drawareabase.h @@ -241,19 +241,19 @@ namespace ARTICLE void set_enable_draw( const bool enable ){ m_enable_draw = enable; } // フォントID( fontid.h にある ID を指定) - const int get_fontid() const { return m_fontid; } + int get_fontid() const { return m_fontid; } void set_fontid( int id ){ m_fontid = id; m_defaultfontid = id; } // 新着セパレータのあるレス番号の取得とセット - const int get_separator_new(); + int get_separator_new(); void set_separator_new( int num ); void hide_separator_new(); // セパレータが画面に表示されているか - const bool is_separator_on_screen(); + bool is_separator_on_screen(); // 現在のポインタの下にあるレス番号取得 - const int get_current_res_num(); + int get_current_res_num(); // 全選択 void select_all(); @@ -263,16 +263,16 @@ namespace ARTICLE const std::string& str_pre_selection() const { return m_selection.str_pre; } // 一つ前の選択文字列 // 範囲選択を開始したレス番号 - const int get_selection_resnum_from(); + int get_selection_resnum_from(); // 範囲選択を終了したレス番号 - const int get_selection_resnum_to(); + int get_selection_resnum_to(); // 範囲選択に含まれる画像URLのリスト const std::vector< URLINFO >& get_selection_imgurls() const { return m_selection.imgurls; } - const int get_seen_current() const { return m_seen_current; } // 現在見ているレスの番号 - const int get_goto_num_reserve() const { return m_goto_num_reserve; } // 初期化時のジャンプ予約(レス番号) + int get_seen_current() const { return m_seen_current; } // 現在見ているレスの番号 + int get_goto_num_reserve() const { return m_goto_num_reserve; } // 初期化時のジャンプ予約(レス番号) int max_number(); // 表示されている最後のレスの番号 @@ -301,7 +301,7 @@ namespace ARTICLE void redraw_view(); // スクロール方向指定 - const bool set_scroll( const int control ); + bool set_scroll( const int control ); // マウスホイールの処理 void wheelscroll( GdkEventScroll* event ); @@ -317,8 +317,8 @@ namespace ARTICLE void goto_back(); // 検索 - const int search( const std::list< std::string >& list_query, const bool reverse ); - const int search_move( const bool reverse ); + int search( const std::list< std::string >& list_query, const bool reverse ); + int search_move( const bool reverse ); void clear_highlight(); // 実況モード @@ -330,14 +330,14 @@ namespace ARTICLE // リアライズしたか // Gtk::Widget::is_realized() はうまく動作しない - const bool is_drawarea_realized(){ return static_cast(m_window); } + bool is_drawarea_realized(){ return static_cast(m_window); } // 文字色のID( colorid.h にある ID を指定) - const int get_colorid_text() const{ return m_colorid_text; } + int get_colorid_text() const{ return m_colorid_text; } void set_colorid_text( int id ){ m_colorid_text = id; } // 背景色のID( colorid.h にある ID を指定) - const int get_colorid_back(); + int get_colorid_back(); void set_colorid_back( int id ){ m_colorid_back = id; } // 共通セットアップ @@ -348,7 +348,7 @@ namespace ARTICLE // レイアウト処理 virtual bool exec_layout(); - const bool exec_layout_impl( const bool is_popup, const int offset_y ); + bool exec_layout_impl( const bool is_popup, const int offset_y ); // DrawAreaに枠を描画する void set_draw_frame( bool draw_frame ){ m_draw_frame = draw_frame; } @@ -378,23 +378,23 @@ namespace ARTICLE const bool init_popupwin, const int mrg_right, const int mrg_bottom ); // 文字の幅などの情報 - const int get_width_of_one_char( const char* str, int& byte, char& pre_char, bool& wide_mode, const int mode ); + int get_width_of_one_char( const char* str, int& byte, char& pre_char, bool& wide_mode, const int mode ); bool set_init_wide_mode( const char* str, const int pos_start, const int pos_to ); bool is_wrapped( const int x, const int border, const char* str ); // スクリーン描画 // y から height の高さ分だけ描画する // height == 0 ならスクロールした分だけ描画( y は無視 ) - const bool draw_screen( const int y, const int height ); + bool draw_screen( const int y, const int height ); void exec_draw_screen( const int y_redraw, const int height_redraw ); bool draw_one_node( LAYOUT* layout, const CLIPINFO& ci ); void draw_div( LAYOUT* layout_div, const CLIPINFO& ci ); - const bool get_selection_byte( const LAYOUT* layout, const SELECTION& selection, size_t& byte_from, size_t& byte_to ); + bool get_selection_byte( const LAYOUT* layout, const SELECTION& selection, size_t& byte_from, size_t& byte_to ); void draw_one_text_node( LAYOUT* layout, const CLIPINFO& ci ); void draw_string( LAYOUT* node, const CLIPINFO& ci, const int color, const int color_back, const int byte_from, const int byte_to ); - const bool draw_one_img_node( LAYOUT* layout, const CLIPINFO& ci ); + bool draw_one_img_node( LAYOUT* layout, const CLIPINFO& ci ); void set_node_font( LAYOUT* layout ); // drawarea がリサイズ実行 @@ -413,21 +413,21 @@ namespace ARTICLE const int x, const int y, int& pos, int& width_line, int& char_width, int& byte_char ); LAYOUT* set_caret( CARET_POSITION& caret_pos, int x, int y ); - const bool set_carets_dclick( CARET_POSITION& caret_left, CARET_POSITION& caret_right, const int x, const int y, const bool triple ); + bool set_carets_dclick( CARET_POSITION& caret_left, CARET_POSITION& caret_right, const int x, const int y, const bool triple ); // 範囲選択関係 - const bool set_selection( const CARET_POSITION& caret_left, const CARET_POSITION& caret_right ); - const bool set_selection( const CARET_POSITION& caret_pos ); - const bool set_selection( const CARET_POSITION& caret_pos, RECTANGLE* rect ); - const bool set_selection_str(); - const bool is_caret_on_selection( const CARET_POSITION& caret_pos ); + bool set_selection( const CARET_POSITION& caret_left, const CARET_POSITION& caret_right ); + bool set_selection( const CARET_POSITION& caret_pos ); + bool set_selection( const CARET_POSITION& caret_pos, RECTANGLE* rect ); + bool set_selection_str(); + bool is_caret_on_selection( const CARET_POSITION& caret_pos ); std::string get_selection_as_url( const CARET_POSITION& caret_pos ); // マウスが動いた時の処理 bool motion_mouse(); // 現在のポインターの下のノードからカーソルのタイプを決定する - const Gdk::CursorType get_cursor_type(); + Gdk::CursorType get_cursor_type(); // カーソルの形状の変更 void change_cursor( const Gdk::CursorType type ); @@ -450,7 +450,7 @@ namespace ARTICLE bool slot_button_release_event( GdkEventButton* event ); bool slot_motion_notify_event( GdkEventMotion* event ); - const bool slot_key_press_event( GdkEventKey* event ); + bool slot_key_press_event( GdkEventKey* event ); bool slot_key_release_event( GdkEventKey* event ); }; diff --git a/src/article/font.cpp b/src/article/font.cpp index f02bcc28a..bbc83e86f 100644 --- a/src/article/font.cpp +++ b/src/article/font.cpp @@ -69,7 +69,7 @@ void ARTICLE::init_font() // mode : fontid.h で定義されているフォントのID // 戻り値 : 登録されていればtrue // -const bool ARTICLE::get_width_of_char( const char* utfstr, int& byte, const char pre_char, int& width, int& width_wide, const int mode ) +bool ARTICLE::get_width_of_char( const char* utfstr, int& byte, const char pre_char, int& width, int& width_wide, const int mode ) { byte = 0; width = 0; diff --git a/src/article/font.h b/src/article/font.h index c2201524c..81e599016 100644 --- a/src/article/font.h +++ b/src/article/font.h @@ -17,7 +17,7 @@ namespace ARTICLE // width_wide : 全角モードでの幅 // mode : fontid.h で定義されているフォントのID // 戻り値 : 登録されていればtrue - const bool get_width_of_char( const char* utfstr, int& byte, const char pre_char, int& width, int& width_wide, const int mode ); + bool get_width_of_char( const char* utfstr, int& byte, const char pre_char, int& width, int& width_wide, const int mode ); // 文字幅を登録する関数 // width == -1 はフォント幅の取得に失敗した場合 diff --git a/src/article/layouttree.h b/src/article/layouttree.h index 20fe067ae..499ec8d6d 100644 --- a/src/article/layouttree.h +++ b/src/article/layouttree.h @@ -129,7 +129,7 @@ namespace ARTICLE LAYOUT* top_header() const { return m_root_header->next_header; } const LAYOUT* last_header() const { return m_last_header; } - const int max_res_number() const { return m_max_res_number; } + int max_res_number() const { return m_max_res_number; } const LAYOUT* get_separator() const{ return m_separator_header; } // nodetreeのノード構造をコピーし、ツリーの一番最後に加える @@ -153,7 +153,7 @@ namespace ARTICLE void set_separator_new( int num ){ m_separator_new_reserve = num; } void move_separator(); void hide_separator(); - const int get_separator_new() const { return m_separator_new; } + int get_separator_new() const { return m_separator_new; } private: diff --git a/src/bbslist/bbslistviewbase.cpp b/src/bbslist/bbslistviewbase.cpp index 388b707e6..03c4eb3f7 100644 --- a/src/bbslist/bbslistviewbase.cpp +++ b/src/bbslist/bbslistviewbase.cpp @@ -551,7 +551,7 @@ void BBSListViewBase::set_parent_win( Gtk::Window* parent_win ) // // コマンド // -const bool BBSListViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool BBSListViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { if( command == "append_item" ) append_item(); else if( command == "append_history" ) append_history(); @@ -733,7 +733,7 @@ void BBSListViewBase::update_item( const std::string& url, const std::string& id // // viewの操作 // -const bool BBSListViewBase::operate_view( const int control ) +bool BBSListViewBase::operate_view( const int control ) { if( CONTROL::operate_common( control, get_url(), BBSLIST::get_admin() ) ) return true; @@ -1204,7 +1204,7 @@ bool BBSListViewBase::slot_motion_notify( GdkEventMotion* event ) // // キーを押した // -const bool BBSListViewBase::slot_key_press( GdkEventKey* event ) +bool BBSListViewBase::slot_key_press( GdkEventKey* event ) { // 行の名前を編集中なら何もしない if( m_treeview.is_renaming_row() ) return false; @@ -1886,7 +1886,7 @@ void BBSListViewBase::slot_row_col( const Gtk::TreeModel::iterator&, const Gtk:: // // 選択した行を開く // -const bool BBSListViewBase::open_row( Gtk::TreePath& path, const bool tab ) +bool BBSListViewBase::open_row( Gtk::TreePath& path, const bool tab ) { if( ! m_treeview.get_row( path ) ) return false; @@ -2146,7 +2146,7 @@ const Glib::ustring BBSListViewBase::path2name( const Gtk::TreePath& path ) // // path -> type 変換 // -const int BBSListViewBase::path2type( const Gtk::TreePath& path ) +int BBSListViewBase::path2type( const Gtk::TreePath& path ) { Gtk::TreeModel::Row row = m_treeview.get_row( path ); if( !row ) return TYPE_UNKNOWN; @@ -2157,7 +2157,7 @@ const int BBSListViewBase::path2type( const Gtk::TreePath& path ) // // row -> type 変換 // -const int BBSListViewBase::row2type( const Gtk::TreeModel::Row& row ) +int BBSListViewBase::row2type( const Gtk::TreeModel::Row& row ) { if( ! row ) return TYPE_UNKNOWN; return row[ m_columns.m_type ]; @@ -2177,7 +2177,7 @@ const Glib::ustring BBSListViewBase::row2name( const Gtk::TreeModel::Row& row ) // // row -> dirid 変換 // -const size_t BBSListViewBase::row2dirid( const Gtk::TreeModel::Row& row ) +size_t BBSListViewBase::row2dirid( const Gtk::TreeModel::Row& row ) { if( !row ) return 0; return row[ m_columns.m_dirid ]; diff --git a/src/bbslist/bbslistviewbase.h b/src/bbslist/bbslistviewbase.h index b51caaa91..e775dbd1b 100644 --- a/src/bbslist/bbslistviewbase.h +++ b/src/bbslist/bbslistviewbase.h @@ -135,10 +135,10 @@ namespace BBSLIST void replace_thread( const std::string& url, const std::string& url_new ); // path からその行のタイプを取得 - const int path2type( const Gtk::TreePath& path ); + int path2type( const Gtk::TreePath& path ); // row からタイプを取得 - const int row2type( const Gtk::TreeModel::Row& row ); + int row2type( const Gtk::TreeModel::Row& row ); // row -> name 変換 const Glib::ustring row2name( const Gtk::TreeModel::Row& row ); @@ -149,7 +149,7 @@ namespace BBSLIST const Glib::ustring row2url( const Gtk::TreeModel::Row& row ); // row -> dirid 変換 - const size_t row2dirid( const Gtk::TreeModel::Row& row ); + size_t row2dirid( const Gtk::TreeModel::Row& row ); // path からその行の名前を取得 const Glib::ustring path2name( const Gtk::TreePath& path ); @@ -195,14 +195,14 @@ namespace BBSLIST const std::string url_for_copy() override { return {}; } - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; void clock_in() override; // キーを押した - const bool slot_key_press( GdkEventKey* event ) override; + bool slot_key_press( GdkEventKey* event ) override; void stop() override; void redraw_view() override; @@ -215,7 +215,7 @@ namespace BBSLIST // ツリー内の全ての項目をURLを新しいアドレスに変更 ( id は未使用 ) void update_item( const std::string& url, const std::string& id ) override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; void goto_top() override; void goto_bottom() override; @@ -312,7 +312,7 @@ namespace BBSLIST // D&D 関係 void slot_drag_drop( Gtk::TreeModel::Path path, const bool after ); - virtual const bool open_row( Gtk::TreePath& path, const bool tab ); + virtual bool open_row( Gtk::TreePath& path, const bool tab ); virtual void switch_rightview(); void open_selected_rows(); void checkupdate_selected_rows( const bool open ); diff --git a/src/bbslist/selectlistview.cpp b/src/bbslist/selectlistview.cpp index 4045afea0..f16c5fc57 100644 --- a/src/bbslist/selectlistview.cpp +++ b/src/bbslist/selectlistview.cpp @@ -31,7 +31,7 @@ void SelectListView::close_view() } -const bool SelectListView::operate_view( const int control ) +bool SelectListView::operate_view( const int control ) { bool ret = true; @@ -82,7 +82,7 @@ Gtk::Menu* SelectListView::get_popupmenu( const std::string& url ) // // 選択した行を開く // -const bool SelectListView::open_row( Gtk::TreePath& path, const bool tab ) +bool SelectListView::open_row( Gtk::TreePath& path, const bool tab ) { if( ! get_treeview().get_row( path ) ) return false; diff --git a/src/bbslist/selectlistview.h b/src/bbslist/selectlistview.h index 0d754d522..85c854856 100644 --- a/src/bbslist/selectlistview.h +++ b/src/bbslist/selectlistview.h @@ -31,11 +31,11 @@ namespace BBSLIST void save_xml() override {} void close_view() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; private: - const bool open_row( Gtk::TreePath& path, const bool tab ) override; + bool open_row( Gtk::TreePath& path, const bool tab ) override; void switch_rightview() override {} // boardに移動しないようにキャンセル Gtk::Menu* get_popupmenu( const std::string& url ) override; }; diff --git a/src/board/boardview.cpp b/src/board/boardview.cpp index f5b651581..660734a1d 100644 --- a/src/board/boardview.cpp +++ b/src/board/boardview.cpp @@ -62,7 +62,7 @@ void BoardView::save_session() // 更新した -const bool BoardView::is_updated() +bool BoardView::is_updated() { const int status = DBTREE::board_status( get_url_board() ); @@ -75,7 +75,7 @@ const bool BoardView::is_updated() // 更新チェックして更新可能か -const bool BoardView::is_check_update() +bool BoardView::is_check_update() { const int status = DBTREE::board_status( get_url_board() ); diff --git a/src/board/boardview.h b/src/board/boardview.h index ab287cfc0..c3790f08b 100644 --- a/src/board/boardview.h +++ b/src/board/boardview.h @@ -20,8 +20,8 @@ namespace BOARD void save_session() override; - const bool is_updated() override; - const bool is_check_update() override; + bool is_updated() override; + bool is_check_update() override; void reload() override; void show_view() override; diff --git a/src/board/boardviewbase.cpp b/src/board/boardviewbase.cpp index f6a0a33c7..755e156c8 100644 --- a/src/board/boardviewbase.cpp +++ b/src/board/boardviewbase.cpp @@ -219,7 +219,7 @@ void BoardViewBase::update_url( const std::string& url_old, const std::string& u // アイコンのID取得 -const int BoardViewBase::get_icon( const std::string& iconname ) +int BoardViewBase::get_icon( const std::string& iconname ) { int id = ICON::NONE; @@ -487,7 +487,7 @@ const char* BoardViewBase::get_menu_item( const int item ) // // 行数 // -const int BoardViewBase::get_row_size() +int BoardViewBase::get_row_size() { return m_treeview.get_row_size(); } @@ -711,7 +711,7 @@ void BoardViewBase::update_columns() // // 失敗の時は-1を変えす // -const int BoardViewBase::get_title_id( const int col ) +int BoardViewBase::get_title_id( const int col ) { Gtk::TreeView::Column* column = m_treeview.get_column( col ); if( ! column ) return -1; @@ -893,22 +893,22 @@ void BoardViewBase::restore_sort() // // デフォルトのソート状態 // -const int BoardViewBase::get_default_sort_column() +int BoardViewBase::get_default_sort_column() { return DBTREE::board_view_sort_column( get_url_board() ); } -const int BoardViewBase::get_default_view_sort_mode() +int BoardViewBase::get_default_view_sort_mode() { return DBTREE::board_view_sort_mode( get_url_board() ); } -const int BoardViewBase::get_default_view_sort_pre_column() +int BoardViewBase::get_default_view_sort_pre_column() { return DBTREE::board_view_sort_pre_column( get_url_board() ); } -const int BoardViewBase::get_default_view_sort_pre_mode() +int BoardViewBase::get_default_view_sort_pre_mode() { return DBTREE::board_view_sort_pre_mode( get_url_board() ); } @@ -969,7 +969,7 @@ void BoardViewBase::slot_col_clicked( const int col ) // // row_a が上か row_b が上かを返す。同じ状態なら 0 // -const int BoardViewBase::compare_drawbg( Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ) +int BoardViewBase::compare_drawbg( Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ) { const bool draw_a = row_a[ m_columns.m_col_drawbg ]; const bool draw_b = row_b[ m_columns.m_col_drawbg ]; @@ -986,7 +986,7 @@ const int BoardViewBase::compare_drawbg( Gtk::TreeModel::Row& row_a, Gtk::TreeMo // // row_a が上か row_b が上かを返す。同じなら 0 // -const int BoardViewBase::compare_col( const int col, const int sortmode, Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ) +int BoardViewBase::compare_col( const int col, const int sortmode, Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ) { int num_a = 0, num_b = 0; int ret = 0; @@ -1137,7 +1137,7 @@ const int BoardViewBase::compare_col( const int col, const int sortmode, Gtk::Tr // // ソート関数 // -const int BoardViewBase::slot_compare_row( const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b ) +int BoardViewBase::slot_compare_row( const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b ) { Gtk::TreeModel::Row row_a = *( a ); Gtk::TreeModel::Row row_b = *( b ); @@ -1160,7 +1160,7 @@ const int BoardViewBase::slot_compare_row( const Gtk::TreeModel::iterator& a, co // // コマンド // -const bool BoardViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool BoardViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { if( command == "update_columns" ) update_columns(); @@ -1402,7 +1402,7 @@ void BoardViewBase::slot_delete_logs() // // viewの操作 // -const bool BoardViewBase::operate_view( const int control ) +bool BoardViewBase::operate_view( const int control ) { if( CONTROL::operate_common( control, get_url(), BOARD::get_admin() ) ) return true; @@ -2006,7 +2006,7 @@ void BoardViewBase::update_row_common( const Gtk::TreeModel::Row& row ) // // マウスボタン押した // -const bool BoardViewBase::slot_button_press( GdkEventButton* event ) +bool BoardViewBase::slot_button_press( GdkEventButton* event ) { #ifdef _DEBUG std::cout << "BoardViewBase::slot_button_press\n"; @@ -2042,7 +2042,7 @@ const bool BoardViewBase::slot_button_press( GdkEventButton* event ) // // マウスボタン離した // -const bool BoardViewBase::slot_button_release( GdkEventButton* event ) +bool BoardViewBase::slot_button_release( GdkEventButton* event ) { if( ! m_clicked ) return true; m_clicked = false; @@ -2121,7 +2121,7 @@ const bool BoardViewBase::slot_button_release( GdkEventButton* event ) // // マウス動かした // -const bool BoardViewBase::slot_motion_notify( GdkEventMotion* event ) +bool BoardViewBase::slot_motion_notify( GdkEventMotion* event ) { /// マウスジェスチャ get_control().MG_motion( event ); @@ -2156,7 +2156,7 @@ const bool BoardViewBase::slot_motion_notify( GdkEventMotion* event ) // // キー入力 // -const bool BoardViewBase::slot_key_press( GdkEventKey* event ) +bool BoardViewBase::slot_key_press( GdkEventKey* event ) { m_pressed_key = get_control().key_press( event ); @@ -2179,7 +2179,7 @@ const bool BoardViewBase::slot_key_press( GdkEventKey* event ) // // キーリリースイベント // -const bool BoardViewBase::slot_key_release( GdkEventKey* event ) +bool BoardViewBase::slot_key_release( GdkEventKey* event ) { const int key = get_control().key_press( event ); @@ -2201,7 +2201,7 @@ const bool BoardViewBase::slot_key_release( GdkEventKey* event ) // // マウスホイールイベント // -const bool BoardViewBase::slot_scroll_event( GdkEventScroll* event ) +bool BoardViewBase::slot_scroll_event( GdkEventScroll* event ) { // ホイールマウスジェスチャ const int control = get_control().MG_wheel_scroll( event ); @@ -2417,7 +2417,7 @@ void BoardViewBase::slot_open_browser() // // 記事を開く // -const bool BoardViewBase::open_row( Gtk::TreePath& path, const bool tab, const bool reget ) +bool BoardViewBase::open_row( Gtk::TreePath& path, const bool tab, const bool reget ) { std::string str_tab = "false"; if( tab ) str_tab = "opentab"; @@ -2554,7 +2554,7 @@ const std::string BoardViewBase::path2url_board( const Gtk::TreePath& path ) // // 抽出 // -const bool BoardViewBase::drawout( const bool force_reset ) +bool BoardViewBase::drawout( const bool force_reset ) { int hit = 0; bool reset = false; diff --git a/src/board/boardviewbase.h b/src/board/boardviewbase.h index ebdcb1f82..426d21b9c 100644 --- a/src/board/boardviewbase.h +++ b/src/board/boardviewbase.h @@ -107,7 +107,7 @@ namespace BOARD const std::string url_for_copy() override; // 行数 - const int get_row_size(); + int get_row_size(); // SKELETON::View の関数のオーバロード @@ -115,16 +115,16 @@ namespace BOARD void update_url( const std::string& url_old, const std::string& url_new ) override; - const int get_icon( const std::string& iconname ) override; - const bool is_loading() const override { return m_loading; } - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + int get_icon( const std::string& iconname ) override; + bool is_loading() const override { return m_loading; } + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; void clock_in() override; // キーを押した - const bool slot_key_press( GdkEventKey* event ) override; + bool slot_key_press( GdkEventKey* event ) override; void write() override; void stop() override; @@ -144,7 +144,7 @@ namespace BOARD // もし ID が empty() なら全ての行の表示内容を更新する void update_item( const std::string& url, const std::string& id ) override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; void goto_top() override; void goto_bottom() override; void goto_num( const int num_to, const int num_from ) override; @@ -204,10 +204,10 @@ namespace BOARD const Gtk::TreeModel::Row prepend_row( DBTREE::ArticleBase* art, const int id ); // デフォルトのソート状態 - virtual const int get_default_sort_column(); - virtual const int get_default_view_sort_mode(); - virtual const int get_default_view_sort_pre_column(); - virtual const int get_default_view_sort_pre_mode(); + virtual int get_default_sort_column(); + virtual int get_default_view_sort_mode(); + virtual int get_default_view_sort_pre_column(); + virtual int get_default_view_sort_pre_mode(); private: @@ -223,7 +223,7 @@ namespace BOARD void update_columns(); - const int get_title_id( const int col ); + int get_title_id( const int col ); // ソート列やソートモードの保存 virtual void save_sort_columns(); @@ -245,16 +245,16 @@ namespace BOARD // ヘッダをクリックしたときのslot関数 void slot_col_clicked( const int col ); - const int compare_drawbg( Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ); - const int compare_col( const int col, const int sortmode, Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ); - const int slot_compare_row( const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b ); + int compare_drawbg( Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ); + int compare_col( const int col, const int sortmode, Gtk::TreeModel::Row& row_a, Gtk::TreeModel::Row& row_b ); + int slot_compare_row( const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b ); // UI - const bool slot_button_press( GdkEventButton* event ); - const bool slot_button_release( GdkEventButton* event ); - const bool slot_motion_notify( GdkEventMotion* event ); - const bool slot_key_release( GdkEventKey* event ); - const bool slot_scroll_event( GdkEventScroll* event ); + bool slot_button_press( GdkEventButton* event ); + bool slot_button_release( GdkEventButton* event ); + bool slot_motion_notify( GdkEventMotion* event ); + bool slot_key_release( GdkEventKey* event ); + bool slot_scroll_event( GdkEventScroll* event ); void slot_bookmark( int bookmark ); void slot_open_tab(); @@ -276,13 +276,13 @@ namespace BOARD Gtk::SelectionData& selection_data, guint info, guint time ); void slot_dropped_url_list( const std::list< std::string >& ); - const bool open_row( Gtk::TreePath& path, const bool tab, const bool reget ); + bool open_row( Gtk::TreePath& path, const bool tab, const bool reget ); void open_selected_rows( const bool reget ); const std::string path2daturl( const Gtk::TreePath& path ); const std::string path2url_board( const Gtk::TreePath& path ); // 検索 - const bool drawout( const bool force_reset ); + bool drawout( const bool force_reset ); void update_row_common( const Gtk::TreeModel::Row& row ); const std::string get_subject_from_path( Gtk::TreePath& path ); diff --git a/src/board/boardviewlog.cpp b/src/board/boardviewlog.cpp index 2f0fc0808..af71dc15e 100644 --- a/src/board/boardviewlog.cpp +++ b/src/board/boardviewlog.cpp @@ -189,28 +189,28 @@ void BoardViewLog::update_item( const std::string& url, const std::string& id ) // // デフォルトのソート状態 // -const int BoardViewLog::get_default_sort_column() +int BoardViewLog::get_default_sort_column() { if( get_url() != URL_ALLLOG ) return BoardViewBase::get_default_sort_column(); return COL_BOARD; } -const int BoardViewLog::get_default_view_sort_mode() +int BoardViewLog::get_default_view_sort_mode() { if( get_url() != URL_ALLLOG ) return BoardViewBase::get_default_view_sort_mode(); return SORTMODE_ASCEND; } -const int BoardViewLog::get_default_view_sort_pre_column() +int BoardViewLog::get_default_view_sort_pre_column() { if( get_url() != URL_ALLLOG ) return BoardViewBase::get_default_view_sort_pre_column(); return COL_ID; } -const int BoardViewLog::get_default_view_sort_pre_mode() +int BoardViewLog::get_default_view_sort_pre_mode() { if( get_url() != URL_ALLLOG ) return BoardViewBase::get_default_view_sort_pre_mode(); diff --git a/src/board/boardviewlog.h b/src/board/boardviewlog.h index 994f1d9fb..ba64ec0fe 100644 --- a/src/board/boardviewlog.h +++ b/src/board/boardviewlog.h @@ -30,10 +30,10 @@ namespace BOARD protected: // デフォルトのソート状態 - const int get_default_sort_column() override; - const int get_default_view_sort_mode() override; - const int get_default_view_sort_pre_column() override; - const int get_default_view_sort_pre_mode() override; + int get_default_sort_column() override; + int get_default_view_sort_mode() override; + int get_default_view_sort_pre_column() override; + int get_default_view_sort_pre_mode() override; private: diff --git a/src/board/boardviewnext.cpp b/src/board/boardviewnext.cpp index c47830734..cced5f86e 100644 --- a/src/board/boardviewnext.cpp +++ b/src/board/boardviewnext.cpp @@ -194,22 +194,22 @@ void BoardViewNext::update_boardname() // // デフォルトのソート状態 // -const int BoardViewNext::get_default_sort_column() +int BoardViewNext::get_default_sort_column() { return COL_ID; } -const int BoardViewNext::get_default_view_sort_mode() +int BoardViewNext::get_default_view_sort_mode() { return SORTMODE_ASCEND; } -const int BoardViewNext::get_default_view_sort_pre_column() +int BoardViewNext::get_default_view_sort_pre_column() { return COL_ID; } -const int BoardViewNext::get_default_view_sort_pre_mode() +int BoardViewNext::get_default_view_sort_pre_mode() { return SORTMODE_ASCEND; } diff --git a/src/board/boardviewnext.h b/src/board/boardviewnext.h index 0c9714db9..2dba7c33c 100644 --- a/src/board/boardviewnext.h +++ b/src/board/boardviewnext.h @@ -37,10 +37,10 @@ namespace BOARD protected: // デフォルトのソート状態 - const int get_default_sort_column() override; - const int get_default_view_sort_mode() override; - const int get_default_view_sort_pre_column() override; - const int get_default_view_sort_pre_mode() override; + int get_default_sort_column() override; + int get_default_view_sort_mode() override; + int get_default_view_sort_pre_column() override; + int get_default_view_sort_pre_mode() override; private: diff --git a/src/board/boardviewsidebar.cpp b/src/board/boardviewsidebar.cpp index 57af75001..35877c213 100644 --- a/src/board/boardviewsidebar.cpp +++ b/src/board/boardviewsidebar.cpp @@ -150,22 +150,22 @@ void BoardViewSidebar::update_item( const std::string& url, const std::string& i // // デフォルトのソート状態 // -const int BoardViewSidebar::get_default_sort_column() +int BoardViewSidebar::get_default_sort_column() { return COL_ID; } -const int BoardViewSidebar::get_default_view_sort_mode() +int BoardViewSidebar::get_default_view_sort_mode() { return SORTMODE_ASCEND; } -const int BoardViewSidebar::get_default_view_sort_pre_column() +int BoardViewSidebar::get_default_view_sort_pre_column() { return COL_ID; } -const int BoardViewSidebar::get_default_view_sort_pre_mode() +int BoardViewSidebar::get_default_view_sort_pre_mode() { return SORTMODE_ASCEND; } diff --git a/src/board/boardviewsidebar.h b/src/board/boardviewsidebar.h index d63ecb43b..e5ec1efbe 100644 --- a/src/board/boardviewsidebar.h +++ b/src/board/boardviewsidebar.h @@ -35,10 +35,10 @@ namespace BOARD protected: // デフォルトのソート状態 - const int get_default_sort_column() override; - const int get_default_view_sort_mode() override; - const int get_default_view_sort_pre_column() override; - const int get_default_view_sort_pre_mode() override; + int get_default_sort_column() override; + int get_default_view_sort_mode() override; + int get_default_view_sort_pre_column() override; + int get_default_view_sort_pre_mode() override; private: diff --git a/src/browsers.cpp b/src/browsers.cpp index dc1850073..a02027626 100644 --- a/src/browsers.cpp +++ b/src/browsers.cpp @@ -54,5 +54,5 @@ namespace CORE return name; } - const int get_browser_number(){ return BROWSER_NUM; } + int get_browser_number(){ return BROWSER_NUM; } } diff --git a/src/browsers.h b/src/browsers.h index 208e1b238..b6b7bdc12 100644 --- a/src/browsers.h +++ b/src/browsers.h @@ -13,7 +13,7 @@ namespace CORE const std::string get_browser_name( const int num ); - const int get_browser_number(); + int get_browser_number(); } diff --git a/src/cache.cpp b/src/cache.cpp index 0f305ac96..a36821aa6 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -770,7 +770,7 @@ size_t CACHE::save_rawdata( const std::string& path, const char* data, size_t n, } -const int CACHE::file_exists( const std::string& path ) +int CACHE::file_exists( const std::string& path ) { struct stat buf_stat; @@ -815,7 +815,7 @@ time_t CACHE::get_filemtime( const std::string& path ) } -const bool CACHE::set_filemtime( const std::string& path, const time_t mtime ) +bool CACHE::set_filemtime( const std::string& path, const time_t mtime ) { #ifdef _DEBUG std::cout << "CACHE::set_filemtime path = " << path diff --git a/src/cache.h b/src/cache.h index a1887b0bd..b9b0cc32b 100644 --- a/src/cache.h +++ b/src/cache.h @@ -202,10 +202,10 @@ namespace CACHE size_t save_rawdata( const std::string& path, const char* data, const size_t n, const bool append = false ); // ファイル情報 - const int file_exists( const std::string& path ); + int file_exists( const std::string& path ); size_t get_filesize( const std::string& path ); time_t get_filemtime( const std::string& path ); - const bool set_filemtime( const std::string& path, const time_t mtime ); + bool set_filemtime( const std::string& path, const time_t mtime ); // ファイル操作 bool jdmkdir( const std::string& path ); diff --git a/src/config/configitems.cpp b/src/config/configitems.cpp index 785386fc1..5d626e5ce 100644 --- a/src/config/configitems.cpp +++ b/src/config/configitems.cpp @@ -70,7 +70,7 @@ ConfigItems::~ConfigItems() noexcept {} // 設定読み込み -const bool ConfigItems::load( const bool restore ) +bool ConfigItems::load( const bool restore ) { std::string path_conf; diff --git a/src/config/configitems.h b/src/config/configitems.h index d183716ec..d5ecb752c 100644 --- a/src/config/configitems.h +++ b/src/config/configitems.h @@ -531,7 +531,7 @@ namespace CONFIG virtual ~ConfigItems() noexcept; // 設定読み込み - const bool load( const bool restore = false ); + bool load( const bool restore = false ); // 保存 void save(); diff --git a/src/config/globalconf.cpp b/src/config/globalconf.cpp index 3e5e3a1fb..98a95ddd3 100644 --- a/src/config/globalconf.cpp +++ b/src/config/globalconf.cpp @@ -34,7 +34,7 @@ void CONFIG::delete_confitem() } -const bool CONFIG::load_conf() +bool CONFIG::load_conf() { return get_confitem()->load(); } @@ -64,14 +64,14 @@ void CONFIG::restore_conf() -const bool CONFIG::get_restore_board(){ return get_confitem()->restore_board; } +bool CONFIG::get_restore_board(){ return get_confitem()->restore_board; } void CONFIG::set_restore_board( const bool restore ){ get_confitem()->restore_board = restore; } -const bool CONFIG::get_restore_article(){ return get_confitem()->restore_article; } +bool CONFIG::get_restore_article(){ return get_confitem()->restore_article; } void CONFIG::set_restore_article( const bool restore ){ get_confitem()->restore_article = restore; } -const bool CONFIG::get_restore_image(){ return get_confitem()->restore_image; } +bool CONFIG::get_restore_image(){ return get_confitem()->restore_image; } void CONFIG::set_restore_image( const bool restore ){ get_confitem()->restore_image = restore; } -const bool CONFIG::get_manage_winpos(){ return get_confitem()->manage_winpos; } +bool CONFIG::get_manage_winpos(){ return get_confitem()->manage_winpos; } void CONFIG::set_manage_winpos( const bool manage ){ get_confitem()->manage_winpos = manage; } @@ -88,35 +88,35 @@ void CONFIG::set_color( const int id, const std::string& color ) void CONFIG::reset_colors(){ get_confitem()->reset_colors(); } -const bool CONFIG::get_use_tree_gtkrc(){ return get_confitem()->use_tree_gtkrc; } +bool CONFIG::get_use_tree_gtkrc(){ return get_confitem()->use_tree_gtkrc; } void CONFIG::set_use_tree_gtkrc( const bool use ){ get_confitem()->use_tree_gtkrc = use; } -const bool CONFIG::get_use_select_gtkrc(){ return get_confitem()->use_select_gtkrc; } +bool CONFIG::get_use_select_gtkrc(){ return get_confitem()->use_select_gtkrc; } void CONFIG::set_use_select_gtkrc( const bool use ){ get_confitem()->use_select_gtkrc = use; } // ツリービューの行間スペース -const int CONFIG::get_tree_ypad(){ return get_confitem()->tree_ypad; } +int CONFIG::get_tree_ypad(){ return get_confitem()->tree_ypad; } // ツリービューにエクスパンダを表示 -const bool CONFIG::get_tree_show_expanders(){ return get_confitem()->tree_show_expanders; } +bool CONFIG::get_tree_show_expanders(){ return get_confitem()->tree_show_expanders; } // ツリービューのレベルインデント調整量(ピクセル) -const int CONFIG::get_tree_level_indent(){ return get_confitem()->tree_level_indent; } +int CONFIG::get_tree_level_indent(){ return get_confitem()->tree_level_indent; } // カテゴリを開いたときにツリービューをスクロールする -const bool CONFIG::get_scroll_tree(){ return get_confitem()->scroll_tree; } +bool CONFIG::get_scroll_tree(){ return get_confitem()->scroll_tree; } // ツリービューの選択を表示中のビューと同期する ( 0: 同期しない 1: 同期する 2: 同期する(フォルダを開く) ) -const int CONFIG::get_select_item_sync(){ return get_confitem()->select_item_sync; } +int CONFIG::get_select_item_sync(){ return get_confitem()->select_item_sync; } void CONFIG::set_select_item_sync( const int sync ){ get_confitem()->select_item_sync = sync; } -const int CONFIG::get_view_margin(){ return get_confitem()->view_margin; } +int CONFIG::get_view_margin(){ return get_confitem()->view_margin; } // スクロールバーを左に配置 -const bool CONFIG::get_left_scrbar(){ return get_confitem()->left_scrbar; } +bool CONFIG::get_left_scrbar(){ return get_confitem()->left_scrbar; } -// スレ一覧で古いスレも表示 -const bool CONFIG::get_show_oldarticle(){ return get_confitem()->show_oldarticle; } +// スレ一覧で古いスレも表示 +bool CONFIG::get_show_oldarticle(){ return get_confitem()->show_oldarticle; } // フォント const std::string& CONFIG::get_fontname( const int id ) @@ -131,11 +131,11 @@ void CONFIG::set_fontname( const int id, const std::string& fontname ) void CONFIG::reset_fonts(){ get_confitem()->reset_fonts(); } -const bool CONFIG::get_aafont_enabled(){ return get_confitem()->aafont_enabled; } +bool CONFIG::get_aafont_enabled(){ return get_confitem()->aafont_enabled; } const std::string CONFIG::get_ref_prefix(){ return get_confitem()->ref_prefix + get_confitem()->ref_prefix_space_str; } -const int CONFIG::ref_prefix_space(){ return get_confitem()->ref_prefix_space; } +int CONFIG::ref_prefix_space(){ return get_confitem()->ref_prefix_space; } // レスにアスキーアートがあると判定する正規表現 const std::string CONFIG::get_regex_res_aa(){ @@ -166,9 +166,9 @@ const std::string& CONFIG::get_url_loginbe() { return get_confitem()->url_loginb const std::string& CONFIG::get_url_bbsmenu() { return get_confitem()->url_bbsmenu; } -const bool CONFIG::use_link_as_board(){ return get_confitem()->use_link_as_board; } +bool CONFIG::use_link_as_board(){ return get_confitem()->use_link_as_board; } -const bool CONFIG::get_show_movediag(){ return get_confitem()->show_movediag; } +bool CONFIG::get_show_movediag(){ return get_confitem()->show_movediag; } void CONFIG::set_show_movediag( const bool show ){ get_confitem()->show_movediag = show; } const std::string& CONFIG::get_menu_search_title(){ return get_confitem()->menu_search_title; } @@ -183,18 +183,18 @@ const std::string& CONFIG::get_url_resp2(){ return get_confitem()->url_resp2; } const std::string& CONFIG::get_agent_for2ch() { return get_confitem()->agent_for2ch; } -const bool CONFIG::get_use_proxy_for2ch() { return get_confitem()->use_proxy_for2ch; } +bool CONFIG::get_use_proxy_for2ch() { return get_confitem()->use_proxy_for2ch; } const std::string& CONFIG::get_proxy_for2ch() { return get_confitem()->proxy_for2ch; } -const int CONFIG::get_proxy_port_for2ch() { return get_confitem()->proxy_port_for2ch; } +int CONFIG::get_proxy_port_for2ch() { return get_confitem()->proxy_port_for2ch; } const std::string& CONFIG::get_proxy_basicauth_for2ch() { return get_confitem()->proxy_basicauth_for2ch; } void CONFIG::set_use_proxy_for2ch( bool set ){ get_confitem()->use_proxy_for2ch = set; } void CONFIG::set_proxy_for2ch( const std::string& proxy ){ get_confitem()->set_proxy_for2ch( proxy ); } void CONFIG::set_proxy_port_for2ch( int port ){ get_confitem()->proxy_port_for2ch = port; } -const bool CONFIG::get_use_proxy_for2ch_w() { return get_confitem()->use_proxy_for2ch_w; } +bool CONFIG::get_use_proxy_for2ch_w() { return get_confitem()->use_proxy_for2ch_w; } const std::string& CONFIG::get_proxy_for2ch_w() { return get_confitem()->proxy_for2ch_w; } -const int CONFIG::get_proxy_port_for2ch_w() { return get_confitem()->proxy_port_for2ch_w; } +int CONFIG::get_proxy_port_for2ch_w() { return get_confitem()->proxy_port_for2ch_w; } const std::string& CONFIG::get_proxy_basicauth_for2ch_w() { return get_confitem()->proxy_basicauth_for2ch_w; } void CONFIG::set_use_proxy_for2ch_w( bool set ){ get_confitem()->use_proxy_for2ch_w = set; } @@ -203,9 +203,9 @@ void CONFIG::set_proxy_port_for2ch_w( int port ){ get_confitem()->proxy_port_for const std::string& CONFIG::get_agent_for_data() { return get_confitem()->agent_for_data; } -const bool CONFIG::get_use_proxy_for_data() { return get_confitem()->use_proxy_for_data; } +bool CONFIG::get_use_proxy_for_data() { return get_confitem()->use_proxy_for_data; } const std::string& CONFIG::get_proxy_for_data() { return get_confitem()->proxy_for_data; } -const int CONFIG::get_proxy_port_for_data() { return get_confitem()->proxy_port_for_data; } +int CONFIG::get_proxy_port_for_data() { return get_confitem()->proxy_port_for_data; } const std::string& CONFIG::get_proxy_basicauth_for_data() { return get_confitem()->proxy_basicauth_for_data; } const std::string& CONFIG::get_x_2ch_ua() { return get_confitem()->x_2ch_ua; } @@ -214,115 +214,115 @@ void CONFIG::set_use_proxy_for_data( bool set ){ get_confitem()->use_proxy_for_d void CONFIG::set_proxy_for_data( const std::string& proxy ){ get_confitem()->set_proxy_for_data( proxy ); } void CONFIG::set_proxy_port_for_data( int port ){ get_confitem()->proxy_port_for_data = port; } -const int CONFIG::get_loader_bufsize(){ return get_confitem()->loader_bufsize; } -const int CONFIG::get_loader_bufsize_board(){ return get_confitem()->loader_bufsize_board; } +int CONFIG::get_loader_bufsize(){ return get_confitem()->loader_bufsize; } +int CONFIG::get_loader_bufsize_board(){ return get_confitem()->loader_bufsize_board; } -const int CONFIG::get_loader_timeout(){ return get_confitem()->loader_timeout; } -const int CONFIG::get_loader_timeout_post(){ return get_confitem()->loader_timeout_post; } -const int CONFIG::get_loader_timeout_data(){ return get_confitem()->loader_timeout_img; } // 旧 get_loader_timeout_img() 関数 -const int CONFIG::get_loader_timeout_checkupdate(){ return get_confitem()->loader_timeout_checkupdate; } +int CONFIG::get_loader_timeout(){ return get_confitem()->loader_timeout; } +int CONFIG::get_loader_timeout_post(){ return get_confitem()->loader_timeout_post; } +int CONFIG::get_loader_timeout_data(){ return get_confitem()->loader_timeout_img; } // 旧 get_loader_timeout_img() 関数 +int CONFIG::get_loader_timeout_checkupdate(){ return get_confitem()->loader_timeout_checkupdate; } -const bool CONFIG::get_use_ipv6(){ return get_confitem()->use_ipv6; } +bool CONFIG::get_use_ipv6(){ return get_confitem()->use_ipv6; } void CONFIG::set_use_ipv6( const bool set ){ get_confitem()->use_ipv6 = set; } // 同一ホストに対する最大コネクション数( 1 または 2 ) -const int CONFIG::get_connection_num(){ return get_confitem()->connection_num; } +int CONFIG::get_connection_num(){ return get_confitem()->connection_num; } // 2chのクッキー:HAP -const bool CONFIG::get_use_cookie_hap(){ return get_confitem()->use_cookie_hap; } +bool CONFIG::get_use_cookie_hap(){ return get_confitem()->use_cookie_hap; } const std::string& CONFIG::get_cookie_hap(){ return get_confitem()->cookie_hap; } const std::string& CONFIG::get_cookie_hap_bbspink(){ return get_confitem()->cookie_hap_bbspink; } void CONFIG::set_cookie_hap( const std::string& cookie_hap ){ get_confitem()->cookie_hap = cookie_hap; } void CONFIG::set_cookie_hap_bbspink( const std::string& cookie_hap ){ get_confitem()->cookie_hap_bbspink = cookie_hap; } // 2chの過去ログ取得時にofflaw2を使用する -const bool CONFIG::get_use_offlaw2_2ch(){ return get_confitem()->use_offlaw2_2ch; } +bool CONFIG::get_use_offlaw2_2ch(){ return get_confitem()->use_offlaw2_2ch; } const std::string& CONFIG::get_command_openurl() { return get_confitem()->command_openurl; } void CONFIG::set_command_openurl( const std::string& command ){ get_confitem()->command_openurl = command; } -const int CONFIG::get_browsercombo_id(){ return get_confitem()->browsercombo_id; } +int CONFIG::get_browsercombo_id(){ return get_confitem()->browsercombo_id; } void CONFIG::set_browsercombo_id( const int id ){ get_confitem()->browsercombo_id = id; } -const bool CONFIG::get_refpopup_by_mo(){ return get_confitem()->refpopup_by_mo; } -const bool CONFIG::get_namepopup_by_mo(){ return get_confitem()->namepopup_by_mo; } -const bool CONFIG::get_idpopup_by_mo(){ return get_confitem()->idpopup_by_mo; } +bool CONFIG::get_refpopup_by_mo(){ return get_confitem()->refpopup_by_mo; } +bool CONFIG::get_namepopup_by_mo(){ return get_confitem()->namepopup_by_mo; } +bool CONFIG::get_idpopup_by_mo(){ return get_confitem()->idpopup_by_mo; } -const int CONFIG::get_imgemb_interp(){ return get_confitem()->imgemb_interp; } -const int CONFIG::get_imgmain_interp(){ return get_confitem()->imgmain_interp; } -const int CONFIG::get_imgpopup_interp(){ return get_confitem()->imgpopup_interp; } +int CONFIG::get_imgemb_interp(){ return get_confitem()->imgemb_interp; } +int CONFIG::get_imgmain_interp(){ return get_confitem()->imgmain_interp; } +int CONFIG::get_imgpopup_interp(){ return get_confitem()->imgpopup_interp; } -const int CONFIG::get_imgpopup_width(){ return get_confitem()->imgpopup_width; } -const int CONFIG::get_imgpopup_height(){ return get_confitem()->imgpopup_height; } +int CONFIG::get_imgpopup_width(){ return get_confitem()->imgpopup_width; } +int CONFIG::get_imgpopup_height(){ return get_confitem()->imgpopup_height; } -const bool CONFIG::get_use_image_popup(){ return get_confitem()->use_image_popup; } +bool CONFIG::get_use_image_popup(){ return get_confitem()->use_image_popup; } void CONFIG::set_use_image_popup( const bool use ){ get_confitem()->use_image_popup = use; } -const bool CONFIG::get_use_image_view(){ return get_confitem()->use_image_view; } +bool CONFIG::get_use_image_view(){ return get_confitem()->use_image_view; } void CONFIG::set_use_image_view( const bool image_view ){ get_confitem()->use_image_view = image_view; } -const bool CONFIG::get_use_inline_image(){ return get_confitem()->use_inline_image; } +bool CONFIG::get_use_inline_image(){ return get_confitem()->use_inline_image; } void CONFIG::set_use_inline_image( const bool inline_img ){ get_confitem()->use_inline_image = inline_img; } -const bool CONFIG::get_show_ssspicon(){ return get_confitem()->show_ssspicon; } +bool CONFIG::get_show_ssspicon(){ return get_confitem()->show_ssspicon; } void CONFIG::set_show_sssp_icon( const bool show ){ get_confitem()->show_ssspicon = show; } // インライン画像の最大幅と高さ -const int CONFIG::get_embimg_width(){ return get_confitem()->embimg_width; } -const int CONFIG::get_embimg_height(){ return get_confitem()->embimg_height; } +int CONFIG::get_embimg_width(){ return get_confitem()->embimg_width; } +int CONFIG::get_embimg_height(){ return get_confitem()->embimg_height; } // 埋め込み画像ビューを閉じたときにタブも閉じる -const bool CONFIG::get_hide_imagetab(){ return get_confitem()->hide_imagetab; } +bool CONFIG::get_hide_imagetab(){ return get_confitem()->hide_imagetab; } // 画像ビューでdeleteを押したときに確認ダイアログを表示する -const bool CONFIG::get_show_delimgdiag(){ return get_confitem()->show_delimgdiag; } +bool CONFIG::get_show_delimgdiag(){ return get_confitem()->show_delimgdiag; } void CONFIG::set_show_delimgdiag( const bool show ){ get_confitem()->show_delimgdiag = show; } -const bool CONFIG::get_use_mosaic(){ return get_confitem()->use_mosaic; } +bool CONFIG::get_use_mosaic(){ return get_confitem()->use_mosaic; } void CONFIG::set_use_mosaic( const bool mosaic ) { get_confitem()->use_mosaic = mosaic; } -const int CONFIG::get_mosaic_size(){ return get_confitem()->mosaic_size; } -const bool CONFIG::get_zoom_to_fit(){ return get_confitem()->zoom_to_fit; } +int CONFIG::get_mosaic_size(){ return get_confitem()->mosaic_size; } +bool CONFIG::get_zoom_to_fit(){ return get_confitem()->zoom_to_fit; } void CONFIG::set_zoom_to_fit( const bool fit ){ get_confitem()->zoom_to_fit = fit; } -const int CONFIG::get_del_img_day(){ return get_confitem()->del_img_day; } +int CONFIG::get_del_img_day(){ return get_confitem()->del_img_day; } void CONFIG::set_del_img_day( const int day ){ get_confitem()->del_img_day = day; } -const int CONFIG::get_del_imgabone_day(){ return get_confitem()->del_imgabone_day; } +int CONFIG::get_del_imgabone_day(){ return get_confitem()->del_imgabone_day; } void CONFIG::set_del_imgabone_day( const int day ){ get_confitem()->del_imgabone_day = day; } -const int CONFIG::get_max_img_size(){ return get_confitem()->max_img_size; } -const int CONFIG::get_max_img_pixel(){ return get_confitem()->max_img_pixel; } -const int CONFIG::get_imgcache_size(){ return get_confitem()->imgcache_size; } +int CONFIG::get_max_img_size(){ return get_confitem()->max_img_size; } +int CONFIG::get_max_img_pixel(){ return get_confitem()->max_img_pixel; } +int CONFIG::get_imgcache_size(){ return get_confitem()->imgcache_size; } -const int CONFIG::get_newthread_hour(){ return get_confitem()->newthread_hour; } +int CONFIG::get_newthread_hour(){ return get_confitem()->newthread_hour; } -const bool CONFIG::get_inc_search_board(){ return get_confitem()->inc_search_board; } +bool CONFIG::get_inc_search_board(){ return get_confitem()->inc_search_board; } -const bool CONFIG::get_show_deldiag(){ return get_confitem()->show_deldiag; } +bool CONFIG::get_show_deldiag(){ return get_confitem()->show_deldiag; } void CONFIG::set_show_deldiag( const bool show ){ get_confitem()->show_deldiag = show; } // スレ一覧をロードする前にキャッシュにある一覧を表示 -const bool CONFIG::get_show_cached_board(){ return get_confitem()->show_cached_board; } +bool CONFIG::get_show_cached_board(){ return get_confitem()->show_cached_board; } // スレ一覧でお知らせスレ(924)のアイコンを表示する -const bool CONFIG::get_show_924(){ return get_confitem()->show_924; } +bool CONFIG::get_show_924(){ return get_confitem()->show_924; } -const int CONFIG::get_tree_scroll_size(){ return get_confitem()->tree_scroll_size; } -const int CONFIG::get_scroll_size(){ return get_confitem()->scroll_size; } -const int CONFIG::get_key_scroll_size(){ return get_confitem()->key_scroll_size; } -const int CONFIG::get_key_fastscroll_size(){ return get_confitem()->key_fastscroll_size; } +int CONFIG::get_tree_scroll_size(){ return get_confitem()->tree_scroll_size; } +int CONFIG::get_scroll_size(){ return get_confitem()->scroll_size; } +int CONFIG::get_key_scroll_size(){ return get_confitem()->key_scroll_size; } +int CONFIG::get_key_fastscroll_size(){ return get_confitem()->key_fastscroll_size; } -const bool CONFIG::get_jump_after_reload(){ return get_confitem()->jump_after_reload; } +bool CONFIG::get_jump_after_reload(){ return get_confitem()->jump_after_reload; } void CONFIG::set_jump_after_reload( const bool set ){ get_confitem()->jump_after_reload = set; } -const bool CONFIG::get_jump_new_after_reload(){ return get_confitem()->jump_new_after_reload; } +bool CONFIG::get_jump_new_after_reload(){ return get_confitem()->jump_new_after_reload; } void CONFIG::set_jump_new_after_reload( const bool set ){ get_confitem()->jump_new_after_reload = set; } -const int CONFIG::get_live_mode(){ return get_confitem()->live_mode; } +int CONFIG::get_live_mode(){ return get_confitem()->live_mode; } void CONFIG::set_live_mode( const int mode ) { get_confitem()->live_mode = mode; } -const int CONFIG::get_live_speed(){ return get_confitem()->live_speed; } +int CONFIG::get_live_speed(){ return get_confitem()->live_speed; } void CONFIG::set_live_speed( const int speed ){ get_confitem()->live_speed = speed; } -const int CONFIG::get_live_threshold(){ return get_confitem()->live_threshold; } +int CONFIG::get_live_threshold(){ return get_confitem()->live_threshold; } void CONFIG::set_live_threshode( const int th ){ get_confitem()->live_threshold = th; } -const bool CONFIG::get_open_one_category(){ return get_confitem()->open_one_category; } -const bool CONFIG::get_open_one_favorite(){ return get_confitem()->open_one_favorite; } +bool CONFIG::get_open_one_category(){ return get_confitem()->open_one_category; } +bool CONFIG::get_open_one_favorite(){ return get_confitem()->open_one_favorite; } // デフォルトの書き込み名 const std::string CONFIG::get_write_name(){ return get_confitem()->write_name; } @@ -330,66 +330,66 @@ const std::string CONFIG::get_write_name(){ return get_confitem()->write_name; } // デフォルトのメールアドレス const std::string CONFIG::get_write_mail(){ return get_confitem()->write_mail; } -const bool CONFIG::get_always_write_ok() { return get_confitem()->always_write_ok; } +bool CONFIG::get_always_write_ok() { return get_confitem()->always_write_ok; } void CONFIG::set_always_write_ok( const bool write_ok ){ get_confitem()->always_write_ok = write_ok; } -const bool CONFIG::get_save_post_log(){ return get_confitem()->save_postlog; } +bool CONFIG::get_save_post_log(){ return get_confitem()->save_postlog; } void CONFIG::set_save_post_log( const bool save ){ get_confitem()->save_postlog = save; } -const size_t CONFIG::get_maxsize_post_log(){ return get_confitem()->maxsize_postlog; } +size_t CONFIG::get_maxsize_post_log(){ return get_confitem()->maxsize_postlog; } // 書き込み履歴を保存 -const bool CONFIG::get_save_post_history(){ return get_confitem()->save_posthist; } +bool CONFIG::get_save_post_history(){ return get_confitem()->save_posthist; } void CONFIG::set_save_post_history( const bool save ){ get_confitem()->save_posthist = save; } -const bool CONFIG::get_hide_writing_dialog(){ return get_confitem()->hide_writing_dialog; } +bool CONFIG::get_hide_writing_dialog(){ return get_confitem()->hide_writing_dialog; } // 編集中のメッセージの保存確認ダイアログを表示する -const bool CONFIG::get_show_savemsgdiag(){ return get_confitem()->show_savemsgdiag; } +bool CONFIG::get_show_savemsgdiag(){ return get_confitem()->show_savemsgdiag; } void CONFIG::set_show_savemsgdiag( const bool show ){ get_confitem()->show_savemsgdiag = show; } // 書き込みビューでテキストを折り返す -const bool CONFIG::get_message_wrap(){ return get_confitem()->message_wrap; } +bool CONFIG::get_message_wrap(){ return get_confitem()->message_wrap; } void CONFIG::set_message_wrap( const bool wrap ){ get_confitem()->message_wrap = wrap; } -const bool CONFIG::get_fold_message(){ return get_confitem()->fold_message; } +bool CONFIG::get_fold_message(){ return get_confitem()->fold_message; } void CONFIG::set_fold_message( const bool fold ){ get_confitem()->fold_message = fold; } -const bool CONFIG::get_fold_image(){ return get_confitem()->fold_image; } +bool CONFIG::get_fold_image(){ return get_confitem()->fold_image; } -const bool CONFIG::get_keep_im_status(){ return get_confitem()->keep_im_status; } +bool CONFIG::get_keep_im_status(){ return get_confitem()->keep_im_status; } -const int CONFIG::get_margin_popup(){ return get_confitem()->margin_popup; } +int CONFIG::get_margin_popup(){ return get_confitem()->margin_popup; } void CONFIG::set_margin_popup( const int margin ){ get_confitem()->margin_popup = margin; } // 画像ポップアップとカーソルの間のマージン -const int CONFIG::get_margin_imgpopup_x(){ return get_confitem()->margin_imgpopup_x; } -const int CONFIG::get_margin_imgpopup(){ return get_confitem()->margin_imgpopup; } +int CONFIG::get_margin_imgpopup_x(){ return get_confitem()->margin_imgpopup_x; } +int CONFIG::get_margin_imgpopup(){ return get_confitem()->margin_imgpopup; } // ポップアップが消えるまでの時間(ミリ秒) -const int CONFIG::get_hide_popup_msec(){ return get_confitem()->hide_popup_msec; } +int CONFIG::get_hide_popup_msec(){ return get_confitem()->hide_popup_msec; } // マウスジェスチャを有効 -const bool CONFIG::get_enable_mg(){ return get_confitem()->enable_mg; } +bool CONFIG::get_enable_mg(){ return get_confitem()->enable_mg; } // マウスジェスチャの判定開始半径 -const int CONFIG::get_mouse_radius(){ return get_confitem()->mouse_radius; } +int CONFIG::get_mouse_radius(){ return get_confitem()->mouse_radius; } // 数字入力ジャンプのウェイト(ミリ秒) -const int CONFIG::get_numberjmp_msec(){ return get_confitem()->numberjmp_msec; } +int CONFIG::get_numberjmp_msec(){ return get_confitem()->numberjmp_msec; } -const int CONFIG::get_history_size(){ return get_confitem()->history_size; } -const int CONFIG::get_historyview_size(){ return get_confitem()->historyview_size; } -const int CONFIG::get_aahistory_size(){ return get_confitem()->aahistory_size; } +int CONFIG::get_history_size(){ return get_confitem()->history_size; } +int CONFIG::get_historyview_size(){ return get_confitem()->historyview_size; } +int CONFIG::get_aahistory_size(){ return get_confitem()->aahistory_size; } // 0以上なら多重ポップアップの説明を表示する // 呼び出される度に--する -const int CONFIG::get_instruct_popup(){ +int CONFIG::get_instruct_popup(){ if( get_confitem()->instruct_popup ) return get_confitem()->instruct_popup--; return 0; } -const bool CONFIG::get_instruct_tglart(){ +bool CONFIG::get_instruct_tglart(){ if( get_confitem()->instruct_tglart_end ) return false; @@ -398,7 +398,7 @@ const bool CONFIG::get_instruct_tglart(){ } void CONFIG::set_instruct_tglart( const bool tgl ){ get_confitem()->instruct_tglart = tgl; } -const bool CONFIG::get_instruct_tglimg(){ +bool CONFIG::get_instruct_tglimg(){ if( get_confitem()->instruct_tglimg_end ) return false; @@ -410,59 +410,59 @@ void CONFIG::set_instruct_tglimg( bool tgl ){ get_confitem()->instruct_tglimg = // スレビューでdeleteを押したときに確認ダイアログを表示する -const bool CONFIG::get_show_delartdiag(){ return get_confitem()->show_delartdiag; } +bool CONFIG::get_show_delartdiag(){ return get_confitem()->show_delartdiag; } void CONFIG::set_show_delartdiag( const bool show ){ get_confitem()->show_delartdiag = show; } -const double CONFIG::get_adjust_underline_pos(){ return get_confitem()->adjust_underline_pos; } +double CONFIG::get_adjust_underline_pos(){ return get_confitem()->adjust_underline_pos; } void CONFIG::set_adjust_underline_pos( const double pos ){ get_confitem()->adjust_underline_pos = pos; } -const double CONFIG::get_adjust_line_space(){ return get_confitem()->adjust_line_space; } +double CONFIG::get_adjust_line_space(){ return get_confitem()->adjust_line_space; } void CONFIG::set_adjust_line_space( const double space ){ get_confitem()->adjust_line_space = space; } -const bool CONFIG::get_draw_underline(){ return get_confitem()->draw_underline; } +bool CONFIG::get_draw_underline(){ return get_confitem()->draw_underline; } -const bool CONFIG::get_strict_char_width(){ return get_confitem()->strict_char_width; } +bool CONFIG::get_strict_char_width(){ return get_confitem()->strict_char_width; } void CONFIG::set_strict_char_width( const bool strictwidth ){ get_confitem()->strict_char_width = strictwidth; } -const bool CONFIG::get_check_id(){ return get_confitem()->check_id; } +bool CONFIG::get_check_id(){ return get_confitem()->check_id; } -const int CONFIG::get_num_reference_high(){ return get_confitem()->num_reference_high; } -const int CONFIG::get_num_reference_low(){ return get_confitem()->num_reference_low; } -const int CONFIG::get_num_id_high(){ return get_confitem()->num_id_high; } -const int CONFIG::get_num_id_low(){ return get_confitem()->num_id_low; } +int CONFIG::get_num_reference_high(){ return get_confitem()->num_reference_high; } +int CONFIG::get_num_reference_low(){ return get_confitem()->num_reference_low; } +int CONFIG::get_num_id_high(){ return get_confitem()->num_id_high; } +int CONFIG::get_num_id_low(){ return get_confitem()->num_id_low; } -const bool CONFIG::get_loose_url(){ return get_confitem()->loose_url; } +bool CONFIG::get_loose_url(){ return get_confitem()->loose_url; } -const bool CONFIG::get_hide_usrcmd(){ return get_confitem()->hide_usrcmd; } +bool CONFIG::get_hide_usrcmd(){ return get_confitem()->hide_usrcmd; } void CONFIG::set_hide_usrcmd( const bool hide ){ get_confitem()->hide_usrcmd = hide; } -const bool CONFIG::get_reload_allthreads(){ return get_confitem()->reload_allthreads; } +bool CONFIG::get_reload_allthreads(){ return get_confitem()->reload_allthreads; } -const int CONFIG::get_tab_min_str(){ return get_confitem()->tab_min_str; } +int CONFIG::get_tab_min_str(){ return get_confitem()->tab_min_str; } -const bool CONFIG::get_show_tab_icon(){ return get_confitem()->show_tab_icon; } +bool CONFIG::get_show_tab_icon(){ return get_confitem()->show_tab_icon; } // タブ上でマウスホイールを回転してタブを切り替える -const bool CONFIG::get_switchtab_wheel(){ return get_confitem()->switchtab_wheel; } +bool CONFIG::get_switchtab_wheel(){ return get_confitem()->switchtab_wheel; } // 他のビューを開くときのタブの位置 ( 0: 一番右端 1:右隣 2:左隣 ) -const int CONFIG::get_newtab_pos(){ return get_confitem()->newtab_pos; } +int CONFIG::get_newtab_pos(){ return get_confitem()->newtab_pos; } // ツリービューで選択したビューを開くときのタブの位置 ( 0: 一番右端 1:右隣 2:左隣 ) -const int CONFIG::get_opentab_pos(){ return get_confitem()->opentab_pos; } +int CONFIG::get_opentab_pos(){ return get_confitem()->opentab_pos; } // 次スレ検索を開くときのタブの位置 ( 0: 次スレ検索タブ 1:新しいタブ 2:アクティブなタブを置き換え ) -const int CONFIG::get_boardnexttab_pos(){ return get_confitem()->boardnexttab_pos; } +int CONFIG::get_boardnexttab_pos(){ return get_confitem()->boardnexttab_pos; } -const bool CONFIG::get_show_post_mark(){ return get_confitem()->show_post_mark; } +bool CONFIG::get_show_post_mark(){ return get_confitem()->show_post_mark; } void CONFIG::set_show_post_mark( const bool show ){ get_confitem()->show_post_mark = show; } -const bool CONFIG::get_flat_button(){ return get_confitem()->flat_button; } +bool CONFIG::get_flat_button(){ return get_confitem()->flat_button; } void CONFIG::set_flat_button( const bool set ){ get_confitem()->flat_button = set; } // ツールバーの背景描画 -const bool CONFIG::get_draw_toolbarback(){ return get_confitem()->draw_toolbarback; } +bool CONFIG::get_draw_toolbarback(){ return get_confitem()->draw_toolbarback; } void CONFIG::set_draw_toolbarback( const bool set ){ get_confitem()->draw_toolbarback = set; } std::list< std::string >& CONFIG::get_list_abone_word_thread(){ return get_confitem()->list_abone_word_thread; } @@ -485,13 +485,13 @@ void CONFIG::set_list_abone_regex_thread( std::list< std::string >& regex ) } -const int CONFIG::get_remove_old_abone_thread(){ return get_confitem()->remove_old_abone_thread; } +int CONFIG::get_remove_old_abone_thread(){ return get_confitem()->remove_old_abone_thread; } void CONFIG::set_remove_old_abone_thread( const int remove ){ get_confitem()->remove_old_abone_thread = remove; } -const int CONFIG::get_abone_number_thread(){ return get_confitem()->abone_number_thread; } +int CONFIG::get_abone_number_thread(){ return get_confitem()->abone_number_thread; } void CONFIG::set_abone_number_thread( const int number ){ get_confitem()->abone_number_thread = number; } -const int CONFIG::get_abone_hour_thread(){ return get_confitem()->abone_hour_thread; } +int CONFIG::get_abone_hour_thread(){ return get_confitem()->abone_hour_thread; } void CONFIG::set_abone_hour_thread( const int hour ){ get_confitem()->abone_hour_thread = hour; } @@ -523,83 +523,83 @@ void CONFIG::set_list_abone_regex( const std::list< std::string >& regex ) // デフォルトで透明、連鎖あぼーんをするか -const bool CONFIG::get_abone_transparent(){ return get_confitem()->abone_transparent; } +bool CONFIG::get_abone_transparent(){ return get_confitem()->abone_transparent; } void CONFIG::set_abone_transparent( const bool set ){ get_confitem()->abone_transparent = set; } -const bool CONFIG::get_abone_chain(){ return get_confitem()->abone_chain; } +bool CONFIG::get_abone_chain(){ return get_confitem()->abone_chain; } void CONFIG::set_abone_chain( const bool set ){ get_confitem()->abone_chain = set; } // NG正規表現によるあぼーん時に大小と全半角文字の違いを無視 -const bool CONFIG::get_abone_icase(){ return get_confitem()->abone_icase; } +bool CONFIG::get_abone_icase(){ return get_confitem()->abone_icase; } void CONFIG::set_abone_icase( const bool set ){ get_confitem()->abone_icase = set; } -const bool CONFIG::get_abone_wchar(){ return get_confitem()->abone_wchar; } +bool CONFIG::get_abone_wchar(){ return get_confitem()->abone_wchar; } void CONFIG::set_abone_wchar( const bool set ){ get_confitem()->abone_wchar = set; } -const bool CONFIG::get_expand_sidebar(){ return get_confitem()->expand_sidebar; } +bool CONFIG::get_expand_sidebar(){ return get_confitem()->expand_sidebar; } -const bool CONFIG::get_expand_rpane(){ return get_confitem()->expand_rpane; } +bool CONFIG::get_expand_rpane(){ return get_confitem()->expand_rpane; } // ペーンの境界をクリックしてサイドバーを開け閉めする -const bool CONFIG::get_open_sidebar_by_click(){ return get_confitem()->open_sidebar_by_click; } +bool CONFIG::get_open_sidebar_by_click(){ return get_confitem()->open_sidebar_by_click; } // 次スレ検索の類似度のしきい値 -const int CONFIG::get_threshold_next(){ return get_confitem()->threshold_next; } +int CONFIG::get_threshold_next(){ return get_confitem()->threshold_next; } // 次スレを開いたときにお気に入りのアドレスと名前を自動更新 -const int CONFIG::get_replace_favorite_next(){ return get_confitem()->replace_favorite_next; } +int CONFIG::get_replace_favorite_next(){ return get_confitem()->replace_favorite_next; } void CONFIG::set_replace_favorite_next( const int mode ){ get_confitem()->replace_favorite_next = mode; } // お気に入りの自動更新をするかダイアログを出す -const bool CONFIG::show_diag_replace_favorite(){ return get_confitem()->show_diag_replace_favorite; } +bool CONFIG::show_diag_replace_favorite(){ return get_confitem()->show_diag_replace_favorite; } void CONFIG::set_show_diag_replace_favorite( const bool show ){ get_confitem()->show_diag_replace_favorite = show; } // スレをお気に入りに追加したときにしおりをセットする -const bool CONFIG::get_bookmark_drop(){ return get_confitem()->bookmark_drop; } +bool CONFIG::get_bookmark_drop(){ return get_confitem()->bookmark_drop; } // お気に入りの更新チェック時に板の更新もチェックする -const bool CONFIG::get_check_update_board(){ return get_confitem()->check_update_board; } +bool CONFIG::get_check_update_board(){ return get_confitem()->check_update_board; } // 起動時にお気に入りを自動でチェックする -const bool CONFIG::get_check_update_boot(){ return get_confitem()->check_update_boot; } +bool CONFIG::get_check_update_boot(){ return get_confitem()->check_update_boot; } // お気に入り登録時に重複項目を登録するか ( 0: 登録する 1: ダイアログ表示 2: 登録しない ) -const int CONFIG::get_check_favorite_dup(){ return get_confitem()->check_favorite_dup; } +int CONFIG::get_check_favorite_dup(){ return get_confitem()->check_favorite_dup; } void CONFIG::set_check_favorite_dup( const int check ){ get_confitem()->check_favorite_dup = check; } // お気に入り登録時に挿入先ダイアログを表示する ( 0 : 表示する 1: 表示せず先頭に追加 2: 表示せず最後に追加 ) -const int CONFIG::get_show_favorite_select_diag(){ return get_confitem()->show_favorite_select_diag; } +int CONFIG::get_show_favorite_select_diag(){ return get_confitem()->show_favorite_select_diag; } // Ctrl+qでウィンドウを閉じない ( 2.8.6以前と互換性を保つため残す ) -const bool CONFIG::get_disable_close(){ return get_confitem()->disable_close; } +bool CONFIG::get_disable_close(){ return get_confitem()->disable_close; } void CONFIG::set_disable_close( const bool disable ){ get_confitem()->disable_close = disable; } // メニューバーを非表示にした時にダイアログを表示 -const bool CONFIG::get_show_hide_menubar_diag(){ return get_confitem()->show_hide_menubar_diag; } +bool CONFIG::get_show_hide_menubar_diag(){ return get_confitem()->show_hide_menubar_diag; } void CONFIG::set_show_hide_menubar_diag( const bool set ){ get_confitem()->show_hide_menubar_diag = set; } // 状態変更時にメインステータスバーの色を変える -const bool CONFIG::get_change_stastatus_color(){ return get_confitem()->change_stastatus_color; } +bool CONFIG::get_change_stastatus_color(){ return get_confitem()->change_stastatus_color; } // まちBBSの取得に offlaw.cgi を使用する -const bool CONFIG::get_use_machi_offlaw(){ return get_confitem()->use_machi_offlaw; } +bool CONFIG::get_use_machi_offlaw(){ return get_confitem()->use_machi_offlaw; } void CONFIG::set_use_machi_offlaw( const bool set ){ get_confitem()->use_machi_offlaw = set; } // 書き込み履歴のあるスレを削除する時にダイアログを表示 -const bool CONFIG::get_show_del_written_thread_diag(){ return get_confitem()->show_del_written_thread_diag; } +bool CONFIG::get_show_del_written_thread_diag(){ return get_confitem()->show_del_written_thread_diag; } void CONFIG::set_del_written_thread_diag( const bool set ){ get_confitem()->show_del_written_thread_diag = set; } // スレを削除する時に画像キャッシュも削除する ( 0: ダイアログ表示 1: 削除 2: 削除しない ) -const int CONFIG::get_delete_img_in_thread(){ return get_confitem()->delete_img_in_thread; } +int CONFIG::get_delete_img_in_thread(){ return get_confitem()->delete_img_in_thread; } void CONFIG::set_delete_img_in_thread( const int set ){ get_confitem()->delete_img_in_thread = set; } // FIFOの作成などにエラーがあったらダイアログを表示する -const bool CONFIG::get_show_diag_fifo_error(){ return get_confitem()->show_diag_fifo_error; } +bool CONFIG::get_show_diag_fifo_error(){ return get_confitem()->show_diag_fifo_error; } void CONFIG::set_show_diag_fifo_error( const bool set ){ get_confitem()->show_diag_fifo_error = set; } // 指定した分ごとにセッションを自動保存 (0: 保存しない) -const int CONFIG::get_save_session(){ return get_confitem()->save_session; } +int CONFIG::get_save_session(){ return get_confitem()->save_session; } #ifdef HAVE_MIGEMO_H const std::string& CONFIG::get_migemodict_path() { return get_confitem()->migemodict_path; } diff --git a/src/config/globalconf.h b/src/config/globalconf.h index a49eef98a..6cac2a942 100644 --- a/src/config/globalconf.h +++ b/src/config/globalconf.h @@ -17,7 +17,7 @@ namespace CONFIG void delete_confitem(); // 設定読み込み、書き込み - const bool load_conf(); + bool load_conf(); void save_conf(); // 設定の一時的なバックアップと復元 @@ -28,15 +28,15 @@ namespace CONFIG ///////////////////////////////////////////// // 前回開いたviewを復元するか - const bool get_restore_board(); + bool get_restore_board(); void set_restore_board( const bool restore ); - const bool get_restore_article(); + bool get_restore_article(); void set_restore_article( const bool restore ); - const bool get_restore_image(); + bool get_restore_image(); void set_restore_image( const bool restore ); // 自前でウィンドウ配置を管理する - const bool get_manage_winpos(); + bool get_manage_winpos(); void set_manage_winpos( const bool manage ); // 色 ( # + 12桁の16進数 の形式 ) @@ -45,49 +45,49 @@ namespace CONFIG void reset_colors(); // ツリービューでgtkrcの設定を使用するか - const bool get_use_tree_gtkrc(); + bool get_use_tree_gtkrc(); void set_use_tree_gtkrc( const bool use ); // スレビューの選択色でgtkrcの設定を使用するか - const bool get_use_select_gtkrc(); + bool get_use_select_gtkrc(); void set_use_select_gtkrc( const bool use ); // ツリービューの行間スペース - const int get_tree_ypad(); + int get_tree_ypad(); // ツリービューにエクスパンダを表示 - const bool get_tree_show_expanders(); + bool get_tree_show_expanders(); // ツリービューのレベルインデント調整量(ピクセル) - const int get_tree_level_indent(); + int get_tree_level_indent(); // カテゴリを開いたときにツリービューをスクロールする - const bool get_scroll_tree(); + bool get_scroll_tree(); // ツリービューの選択を表示中のビューと同期する ( 0: 同期しない 1: 同期する 2: 同期する(フォルダを開く) ) - const int get_select_item_sync(); + int get_select_item_sync(); void set_select_item_sync( const int sync ); // 各ビューと枠との間の余白 - const int get_view_margin(); + int get_view_margin(); // スクロールバーを左に配置 - const bool get_left_scrbar(); + bool get_left_scrbar(); // スレ一覧で古いスレも表示 - const bool get_show_oldarticle(); + bool get_show_oldarticle(); // フォント const std::string& get_fontname( const int id ); void set_fontname( const int id, const std::string& fontname ); void reset_fonts(); - const bool get_aafont_enabled(); + bool get_aafont_enabled(); // レスを参照するときに前に付ける文字 const std::string get_ref_prefix(); // 参照文字( ref_prefix ) の後のスペースの数 - const int ref_prefix_space(); + int ref_prefix_space(); // レスにアスキーアートがあると判定する正規表現 const std::string get_regex_res_aa(); @@ -110,10 +110,10 @@ namespace CONFIG const std::string& get_url_bbsmenu(); // bbsmenu.html内にあるリンクは全て板とみなす - const bool use_link_as_board(); + bool use_link_as_board(); // 板移転時に確認ダイアログを表示する - const bool get_show_movediag(); + bool get_show_movediag(); void set_show_movediag( const bool show ); // スレタイ検索用メニュータイトルアドレス @@ -138,9 +138,9 @@ namespace CONFIG const std::string& get_x_2ch_ua(); // 2ch 読み込み用プロクシとポート番号 - const bool get_use_proxy_for2ch(); + bool get_use_proxy_for2ch(); const std::string& get_proxy_for2ch(); - const int get_proxy_port_for2ch(); + int get_proxy_port_for2ch(); const std::string& get_proxy_basicauth_for2ch(); void set_use_proxy_for2ch( const bool set ); @@ -148,9 +148,9 @@ namespace CONFIG void set_proxy_port_for2ch( const int port ); // 2ch 書き込み用プロクシとポート番号 - const bool get_use_proxy_for2ch_w(); + bool get_use_proxy_for2ch_w(); const std::string& get_proxy_for2ch_w(); - const int get_proxy_port_for2ch_w(); + int get_proxy_port_for2ch_w(); const std::string& get_proxy_basicauth_for2ch_w(); void set_use_proxy_for2ch_w( const bool set ); @@ -161,9 +161,9 @@ namespace CONFIG const std::string& get_agent_for_data(); // 2chの外にアクセスするときのプロクシとポート番号 - const bool get_use_proxy_for_data(); + bool get_use_proxy_for_data(); const std::string& get_proxy_for_data(); - const int get_proxy_port_for_data(); + int get_proxy_port_for_data(); const std::string& get_proxy_basicauth_for_data(); void set_use_proxy_for_data( const bool set ); @@ -171,166 +171,166 @@ namespace CONFIG void set_proxy_port_for_data( const int port ); // ローダのバッファサイズ - const int get_loader_bufsize(); // 一般 - const int get_loader_bufsize_board(); // スレ一覧読み込み用 + int get_loader_bufsize(); // 一般 + int get_loader_bufsize_board(); // スレ一覧読み込み用 // ローダのタイムアウト値 - const int get_loader_timeout(); - const int get_loader_timeout_post(); - const int get_loader_timeout_data(); - const int get_loader_timeout_checkupdate(); + int get_loader_timeout(); + int get_loader_timeout_post(); + int get_loader_timeout_data(); + int get_loader_timeout_checkupdate(); // ipv6使用 - const bool get_use_ipv6(); + bool get_use_ipv6(); void set_use_ipv6( const bool set ); // 同一ホストに対する最大コネクション数( 1 または 2 ) - const int get_connection_num(); + int get_connection_num(); // 2chのクッキー:HAP - const bool get_use_cookie_hap(); + bool get_use_cookie_hap(); const std::string& get_cookie_hap(); const std::string& get_cookie_hap_bbspink(); void set_cookie_hap( const std::string& cookie_hap ); void set_cookie_hap_bbspink( const std::string& cookie_hap ); // 2chの過去ログ取得時にofflaw2を使用する - const bool get_use_offlaw2_2ch(); + bool get_use_offlaw2_2ch(); // リンクをクリックしたときに実行するコマンド const std::string& get_command_openurl(); void set_command_openurl( const std::string& command ); // ブラウザ設定ダイアログのコンボボックスの番号 - const int get_browsercombo_id(); + int get_browsercombo_id(); void set_browsercombo_id( const int id ); // レス番号の上にマウスオーバーしたときに参照ポップアップ表示する - const bool get_refpopup_by_mo(); + bool get_refpopup_by_mo(); // 名前の上にマウスオーバーしたときにポップアップ表示する - const bool get_namepopup_by_mo(); + bool get_namepopup_by_mo(); // IDの上にマウスオーバーしたときにIDをポップアップ表示する - const bool get_idpopup_by_mo(); + bool get_idpopup_by_mo(); // 画像のスムージングレベル(0-2, 2が最も高画質かつ低速) - const int get_imgemb_interp(); - const int get_imgmain_interp(); - const int get_imgpopup_interp(); + int get_imgemb_interp(); + int get_imgmain_interp(); + int get_imgpopup_interp(); // 画像ポップアップサイズ - const int get_imgpopup_width(); - const int get_imgpopup_height(); + int get_imgpopup_width(); + int get_imgpopup_height(); // 画像ポップアップを使用する - const bool get_use_image_popup(); + bool get_use_image_popup(); void set_use_image_popup( const bool use ); // 画像ビューを使用する - const bool get_use_image_view(); + bool get_use_image_view(); void set_use_image_view( const bool image_view ); // インライン画像表示をする - const bool get_use_inline_image(); + bool get_use_inline_image(); void set_use_inline_image( const bool inline_img ); // ssspアイコン表示 - const bool get_show_ssspicon(); + bool get_show_ssspicon(); void set_show_sssp_icon( const bool show ); // インライン画像の最大幅と高さ - const int get_embimg_width(); - const int get_embimg_height(); + int get_embimg_width(); + int get_embimg_height(); // 埋め込み画像ビューを閉じたときにタブも閉じる - const bool get_hide_imagetab(); + bool get_hide_imagetab(); // 画像ビューでdeleteを押したときに確認ダイアログを表示する - const bool get_show_delimgdiag(); + bool get_show_delimgdiag(); void set_show_delimgdiag( const bool show ); // 画像にモザイクかける - const bool get_use_mosaic(); + bool get_use_mosaic(); void set_use_mosaic( const bool mosaic ); // モザイクの大きさ - const int get_mosaic_size(); + int get_mosaic_size(); // 画像をデフォルトでウィンドウサイズに合わせる - const bool get_zoom_to_fit(); + bool get_zoom_to_fit(); void set_zoom_to_fit( const bool fit ); // 画像キャッシュ削除の日数 - const int get_del_img_day(); + int get_del_img_day(); void set_del_img_day( const int day ); // 画像あぼーん削除の日数 - const int get_del_imgabone_day(); + int get_del_imgabone_day(); void set_del_imgabone_day( const int day ); // ダウンロードする画像の最大ファイルサイズ(Mbyte) - const int get_max_img_size(); + int get_max_img_size(); // 画像の最大サイズ(Mピクセル) - const int get_max_img_pixel(); + int get_max_img_pixel(); // 画像のメモリキャッシュ枚数 - const int get_imgcache_size(); + int get_imgcache_size(); // スレ一覧で指定した値(時間)よりも後に立てられたスレを新着とみなす - const int get_newthread_hour(); + int get_newthread_hour(); // スレ一覧でインクリメント検索をする - const bool get_inc_search_board(); + bool get_inc_search_board(); // スレ一覧でdeleteを押したときに確認ダイアログを表示する - const bool get_show_deldiag(); + bool get_show_deldiag(); void set_show_deldiag( const bool show ); // スレ一覧をロードする前にキャッシュにある一覧を表示 - const bool get_show_cached_board(); + bool get_show_cached_board(); // スレ一覧でお知らせスレ(924)のアイコンを表示する - const bool get_show_924(); + bool get_show_924(); // ツリービューのスクロール量(マウスホイール上下・行数) - const int get_tree_scroll_size(); + int get_tree_scroll_size(); // スレビューのスクロール量(マウスホイール上下・行数) - const int get_scroll_size(); + int get_scroll_size(); // スレビューのスクロール量(キー上下・行数) - const int get_key_scroll_size(); + int get_key_scroll_size(); // スレビューの高速スクロール量(キー上下・ ページ高 - 行高 * key_fastscroll_size ) - const int get_key_fastscroll_size(); + int get_key_fastscroll_size(); // スレビューでリロード後に一番下までスクロール - const bool get_jump_after_reload(); + bool get_jump_after_reload(); void set_jump_after_reload( const bool set ); // スレビューでリロード後に新着までスクロール - const bool get_jump_new_after_reload(); + bool get_jump_new_after_reload(); void set_jump_new_after_reload( const bool set ); // 実況モード - const int get_live_mode(); + int get_live_mode(); void set_live_mode( const int mode ); // 実況速度 - const int get_live_speed(); + int get_live_speed(); void set_live_speed( const int speed ); // 実況のスクロールモードを切り替えるしきい値 - const int get_live_threshold(); + int get_live_threshold(); void set_live_threshode( const int th ); // 板一覧でカテゴリを常にひとつだけ開く - const bool get_open_one_category(); + bool get_open_one_category(); // お気に入りでカテゴリを常にひとつだけ開く - const bool get_open_one_favorite(); + bool get_open_one_favorite(); // デフォルトの書き込み名 const std::string get_write_name(); @@ -339,149 +339,149 @@ namespace CONFIG const std::string get_write_mail(); // 書き込み時に書き込み確認ダイアログを出すかどうか - const bool get_always_write_ok(); + bool get_always_write_ok(); void set_always_write_ok( const bool write_ok ); // 書き込みログを保存 - const bool get_save_post_log(); + bool get_save_post_log(); void set_save_post_log( const bool save ); // 書き込みログの最大サイズ - const size_t get_maxsize_post_log(); + size_t get_maxsize_post_log(); // 書き込み履歴を保存 - const bool get_save_post_history(); + bool get_save_post_history(); void set_save_post_history( const bool save ); // 書き込み中のダイアログを表示しない - const bool get_hide_writing_dialog(); + bool get_hide_writing_dialog(); // 編集中のメッセージの保存確認ダイアログを表示する - const bool get_show_savemsgdiag(); + bool get_show_savemsgdiag(); void set_show_savemsgdiag( const bool show ); // 書き込みビューでテキストを折り返す - const bool get_message_wrap(); + bool get_message_wrap(); void set_message_wrap( const bool wrap ); // 非アクティブ時に書き込みビューを折りたたむ - const bool get_fold_message(); + bool get_fold_message(); void set_fold_message( const bool fold ); // 非アクティブ時に画像ビューを折りたたむ - const bool get_fold_image(); + bool get_fold_image(); // 書き込み欄の日本語のON/OFF状態を保存 - const bool get_keep_im_status(); + bool get_keep_im_status(); // ポップアップとカーソルの間のマージン - const int get_margin_popup(); + int get_margin_popup(); void set_margin_popup( const int margin ); // 画像ポップアップとカーソルの間のマージン - const int get_margin_imgpopup_x(); // 水平方向 - const int get_margin_imgpopup(); // 垂直方向 + int get_margin_imgpopup_x(); // 水平方向 + int get_margin_imgpopup(); // 垂直方向 // ポップアップが消えるまでの時間(ミリ秒) - const int get_hide_popup_msec(); + int get_hide_popup_msec(); // マウスジェスチャを有効 - const bool get_enable_mg(); + bool get_enable_mg(); // マウスジェスチャの判定開始半径 - const int get_mouse_radius(); + int get_mouse_radius(); // 数字入力ジャンプの待ち時間(ミリ秒) - const int get_numberjmp_msec(); + int get_numberjmp_msec(); // 履歴メニューの表示数 - const int get_history_size(); + int get_history_size(); // 履歴ビューの表示数 - const int get_historyview_size(); + int get_historyview_size(); // AA履歴の保持数 - const int get_aahistory_size(); + int get_aahistory_size(); // 0以上なら多重ポップアップの説明を表示する - const int get_instruct_popup(); + int get_instruct_popup(); // スレビューを開いたときにスレ一覧との切り替え方法を説明する - const bool get_instruct_tglart(); + bool get_instruct_tglart(); void set_instruct_tglart( const bool set ); // 画像ビューを開いたときにスレビューとの切り替え方法を説明する - const bool get_instruct_tglimg(); + bool get_instruct_tglimg(); void set_instruct_tglimg( const bool set ); // スレビューでdeleteを押したときに確認ダイアログを表示する - const bool get_show_delartdiag(); + bool get_show_delartdiag(); void set_show_delartdiag( const bool show ); // 下線位置調整 - const double get_adjust_underline_pos(); + double get_adjust_underline_pos(); void set_adjust_underline_pos( const double pos ); // スレ表示の行間調整 - const double get_adjust_line_space(); + double get_adjust_line_space(); void set_adjust_line_space( const double space ); // スレ表示でリンクの下に下線を引く - const bool get_draw_underline(); + bool get_draw_underline(); // スレビューで文字幅の近似を厳密にする - const bool get_strict_char_width(); + bool get_strict_char_width(); void set_strict_char_width( const bool strictwidth ); // スレビューで発言数(ID)をカウントする - const bool get_check_id(); + bool get_check_id(); // レス参照で色を変える回数 - const int get_num_reference_high(); - const int get_num_reference_low(); + int get_num_reference_high(); + int get_num_reference_low(); // 発言数で色を変える回数 - const int get_num_id_high(); - const int get_num_id_low(); + int get_num_id_high(); + int get_num_id_low(); // datのパース時にURL判定を甘くする(^なども含める) - const bool get_loose_url(); + bool get_loose_url(); // ユーザーコマンドで選択できない項目を非表示にする - const bool get_hide_usrcmd(); + bool get_hide_usrcmd(); void set_hide_usrcmd( const bool hide ); // スレビューで再読み込みボタンを押したときに全タブを更新する - const bool get_reload_allthreads(); + bool get_reload_allthreads(); // タブに表示する文字列の最小値 - const int get_tab_min_str(); + int get_tab_min_str(); // タブにアイコンを表示するか - const bool get_show_tab_icon(); + bool get_show_tab_icon(); // タブ上でマウスホイールを回転してタブを切り替える - const bool get_switchtab_wheel(); + bool get_switchtab_wheel(); // 他のビューを開くときのタブの位置 ( 0: 一番右端 1:右隣 2:左隣 ) - const int get_newtab_pos(); + int get_newtab_pos(); // ツリービューで選択したビューを開くときのタブの位置 ( 0: 一番右端 1:右隣 2:左隣 ) - const int get_opentab_pos(); + int get_opentab_pos(); // 次スレ検索を開くときのタブの位置 ( 0: 次スレ検索タブ 1:新しいタブ 2:アクティブなタブを置き換え ) - const int get_boardnexttab_pos(); + int get_boardnexttab_pos(); // スレビューに書き込みマークを表示するか - const bool get_show_post_mark(); + bool get_show_post_mark(); void set_show_post_mark( const bool show ); // ボタンをフラットにするか - const bool get_flat_button(); + bool get_flat_button(); void set_flat_button( const bool set ); // ツールバーの背景描画 - const bool get_draw_toolbarback(); + bool get_draw_toolbarback(); void set_draw_toolbarback( const bool set ); // boardviewでのスレの全体あぼーん @@ -491,13 +491,13 @@ namespace CONFIG void set_list_abone_word_thread( std::list< std::string >& word ); void set_list_abone_regex_thread( std::list< std::string >& regex ); - const int get_remove_old_abone_thread(); // dat落ちしたスレをNGスレタイトルリストから取り除くか( 0: ダイアログ表示 1: 取り除く 2: 除かない ) + int get_remove_old_abone_thread(); // dat落ちしたスレをNGスレタイトルリストから取り除くか( 0: ダイアログ表示 1: 取り除く 2: 除かない ) void set_remove_old_abone_thread( const int remove ); - const int get_abone_number_thread(); + int get_abone_number_thread(); void set_abone_number_thread( const int number ); - const int get_abone_hour_thread(); + int get_abone_hour_thread(); void set_abone_hour_thread( const int hour ); // articleviewでのレスの全体あぼーん @@ -510,84 +510,84 @@ namespace CONFIG void set_list_abone_regex( const std::list< std::string >& regex ); // デフォルトで透明、連鎖あぼーんをするか - const bool get_abone_transparent(); + bool get_abone_transparent(); void set_abone_transparent( const bool set ); - const bool get_abone_chain(); + bool get_abone_chain(); void set_abone_chain( const bool set ); // NG正規表現によるあぼーん時に大小と全半角文字の違いを無視 - const bool get_abone_icase(); + bool get_abone_icase(); void set_abone_icase( const bool set ); - const bool get_abone_wchar(); + bool get_abone_wchar(); void set_abone_wchar( const bool set ); // 右ペーンが空の時にサイドバーを閉じるか - const bool get_expand_sidebar(); + bool get_expand_sidebar(); // 3ペーン時にスレ一覧やスレビューを最大化するか - const bool get_expand_rpane(); + bool get_expand_rpane(); // ペーンの境界をクリックしてサイドバーを開け閉めする - const bool get_open_sidebar_by_click(); + bool get_open_sidebar_by_click(); // 次スレ検索の類似度のしきい値 - const int get_threshold_next(); + int get_threshold_next(); // 次スレを開いたときにお気に入りのアドレスと名前を自動更新 - const int get_replace_favorite_next(); + int get_replace_favorite_next(); void set_replace_favorite_next( const int mode ); // お気に入りの自動更新をするかダイアログを出す - const bool show_diag_replace_favorite(); + bool show_diag_replace_favorite(); void set_show_diag_replace_favorite( const bool show ); // スレをお気に入りに追加したときにしおりをセットする - const bool get_bookmark_drop(); + bool get_bookmark_drop(); // お気に入りの更新チェック時に板の更新もチェックする - const bool get_check_update_board(); + bool get_check_update_board(); // 起動時にお気に入りを自動でチェックする - const bool get_check_update_boot(); + bool get_check_update_boot(); // お気に入り登録時に重複項目を登録するか ( 0: 登録する 1: ダイアログ表示 2: 登録しない ) - const int get_check_favorite_dup(); + int get_check_favorite_dup(); void set_check_favorite_dup( const int check ); // お気に入り登録時に挿入先ダイアログを表示する ( 0 : 表示する 1: 表示せず先頭に追加 2: 表示せず最後に追加 ) - const int get_show_favorite_select_diag(); + int get_show_favorite_select_diag(); // Ctrl+qでウィンドウを閉じない - const bool get_disable_close(); + bool get_disable_close(); void set_disable_close( const bool disable ); // メニューバーを非表示にした時にダイアログを表示 - const bool get_show_hide_menubar_diag(); + bool get_show_hide_menubar_diag(); void set_show_hide_menubar_diag( const bool set ); // 状態変更時にメインステータスバーの色を変える - const bool get_change_stastatus_color(); + bool get_change_stastatus_color(); // まちBBSの取得に offlaw.cgi を使用する - const bool get_use_machi_offlaw(); + bool get_use_machi_offlaw(); void set_use_machi_offlaw( const bool set ); // 書き込み履歴のあるスレを削除する時にダイアログを表示 - const bool get_show_del_written_thread_diag(); + bool get_show_del_written_thread_diag(); void set_del_written_thread_diag( const bool set ); // スレを削除する時に画像キャッシュも削除する ( 0: ダイアログ表示 1: 削除 2: 削除しない ) - const int get_delete_img_in_thread(); + int get_delete_img_in_thread(); void set_delete_img_in_thread( const int set ); // FIFOの作成などにエラーがあったらダイアログを表示する - const bool get_show_diag_fifo_error(); + bool get_show_diag_fifo_error(); void set_show_diag_fifo_error( const bool set ); // 指定した分ごとにセッションを自動保存 (0: 保存しない) - const int get_save_session(); + int get_save_session(); #ifdef HAVE_MIGEMO_H // migemo-dictの場所 diff --git a/src/control/buttonconfig.cpp b/src/control/buttonconfig.cpp index a3b851f76..fb75cb06e 100644 --- a/src/control/buttonconfig.cpp +++ b/src/control/buttonconfig.cpp @@ -160,7 +160,7 @@ void ButtonConfig::set_one_motion_impl( const int id, const int mode, const std: // タブで開くボタンを入れ替えているか -const bool ButtonConfig::is_toggled_tab_button() +bool ButtonConfig::is_toggled_tab_button() { const bool ret = ( get_str_motions( CONTROL::OpenBoardButton ).find( "Mid" ) != std::string::npos && get_str_motions( CONTROL::OpenBoardTabButton ).find( "Left" ) != std::string::npos @@ -207,7 +207,7 @@ void ButtonConfig::toggle_tab_button( const bool toggle ) // ポップアップ表示の時にクリックでワープするか -const bool ButtonConfig::is_popup_warpmode() +bool ButtonConfig::is_popup_warpmode() { return ( get_str_motions( CONTROL::PopupWarpButton).find( "Left" ) != std::string::npos ); } diff --git a/src/control/buttonconfig.h b/src/control/buttonconfig.h index 83ea947c6..ad08770b8 100644 --- a/src/control/buttonconfig.h +++ b/src/control/buttonconfig.h @@ -19,10 +19,10 @@ namespace CONTROL void load_conf() override; - const bool is_toggled_tab_button(); // タブで開くボタンを入れ替えているか + bool is_toggled_tab_button(); // タブで開くボタンを入れ替えているか void toggle_tab_button( const bool toggle ); // タブで開くボタンを入れ替える - const bool is_popup_warpmode(); // ポップアップ表示の時にクリックでワープするか + bool is_popup_warpmode(); // ポップアップ表示の時にクリックでワープするか void toggle_popup_warpmode(); // ポップアップ表示の時にクリックでワープする private: diff --git a/src/control/buttonpref.cpp b/src/control/buttonpref.cpp index 5bd40bd27..b42809451 100644 --- a/src/control/buttonpref.cpp +++ b/src/control/buttonpref.cpp @@ -145,7 +145,7 @@ void ButtonPref::set_motions( const int id, const std::string& str_motions ) } -const bool ButtonPref::remove_motions( const int id ) +bool ButtonPref::remove_motions( const int id ) { return CONTROL::remove_buttonmotions( id ); } diff --git a/src/control/buttonpref.h b/src/control/buttonpref.h index 466647094..3e77f31da 100644 --- a/src/control/buttonpref.h +++ b/src/control/buttonpref.h @@ -63,7 +63,7 @@ namespace CONTROL const std::string get_str_motions( const int id ) override; const std::string get_default_motions( const int id ) override; void set_motions( const int id, const std::string& str_motions ) override; - const bool remove_motions( const int id ) override; + bool remove_motions( const int id ) override; private: diff --git a/src/control/control.cpp b/src/control/control.cpp index 7b7aa56b8..ef9565344 100644 --- a/src/control/control.cpp +++ b/src/control/control.cpp @@ -61,7 +61,7 @@ void Control::clear_mode() // 戻り値はコントロールID -const int Control::key_press( const GdkEventKey* event ) +int Control::key_press( const GdkEventKey* event ) { guint key = event->keyval; const bool ctrl = ( event->state ) & GDK_CONTROL_MASK; @@ -112,7 +112,7 @@ const int Control::key_press( const GdkEventKey* event ) // 戻り値はコントロールID -const int Control::button_press( const GdkEventButton* event ) +int Control::button_press( const GdkEventButton* event ) { const guint button = event->button; const bool ctrl = ( event->state ) & GDK_CONTROL_MASK; @@ -133,7 +133,7 @@ const int Control::button_press( const GdkEventButton* event ) // eventがidに割り当てられていたらtrue -const bool Control::button_alloted( const GdkEventButton* event, const int id ) +bool Control::button_alloted( const GdkEventButton* event, const int id ) { const guint button = event->button; const bool ctrl = ( event->state ) & GDK_CONTROL_MASK; @@ -147,7 +147,7 @@ const bool Control::button_alloted( const GdkEventButton* event, const int id ) // ID からevent取得 -const bool Control::get_eventbutton( const int id, GdkEventButton& event ) +bool Control::get_eventbutton( const int id, GdkEventButton& event ) { guint button; bool ctrl; @@ -186,7 +186,7 @@ void Control::MG_reset() } -const bool Control::MG_start( const GdkEventButton* event ) +bool Control::MG_start( const GdkEventButton* event ) { if( ! CONFIG::get_enable_mg() ) return false; @@ -207,7 +207,7 @@ const bool Control::MG_start( const GdkEventButton* event ) -const bool Control::MG_motion( const GdkEventMotion* event ) +bool Control::MG_motion( const GdkEventMotion* event ) { if( ! m_mg ) return false; if( m_mg_lng >= MAX_MG_LNG ) return false; @@ -288,7 +288,7 @@ const bool Control::MG_motion( const GdkEventMotion* event ) // 戻り値はコントロールID -const int Control::MG_end( const GdkEventButton* event ) +int Control::MG_end( const GdkEventButton* event ) { if( ! m_mg ) return None; @@ -341,7 +341,7 @@ void Control::MG_wheel_reset() // ホイールマウスジェスチャ開始 -const bool Control::MG_wheel_start( const GdkEventButton* event ) +bool Control::MG_wheel_start( const GdkEventButton* event ) { MG_wheel_reset(); @@ -356,7 +356,7 @@ const bool Control::MG_wheel_start( const GdkEventButton* event ) // ホイールマウスジェスチャ。 戻り値はコントロールID -const int Control::MG_wheel_scroll( const GdkEventScroll* event ) +int Control::MG_wheel_scroll( const GdkEventScroll* event ) { int control = CONTROL::None; @@ -428,7 +428,7 @@ const int Control::MG_wheel_scroll( const GdkEventScroll* event ) // ホイールマウスジェスチャ終了 // もしジェスチャが実行されたら true が戻る -const bool Control::MG_wheel_end( const GdkEventButton* event ) +bool Control::MG_wheel_end( const GdkEventButton* event ) { #ifdef _DEBUG std::cout << "Control::MG_wheel_end\n"; diff --git a/src/control/control.h b/src/control/control.h index 5e498f387..9dd555525 100644 --- a/src/control/control.h +++ b/src/control/control.h @@ -38,27 +38,27 @@ namespace CONTROL // キー入力 // 戻り値はコントロールID - const int key_press( const GdkEventKey* event ); + int key_press( const GdkEventKey* event ); // マウスボタン - const int button_press( const GdkEventButton* event ); // 戻り値はコントロールID - const bool button_alloted( const GdkEventButton* event, const int id ); // eventがidに割り当てられていたらtrue - const bool get_eventbutton( const int id, GdkEventButton& event ); // ID からevent取得 + int button_press( const GdkEventButton* event ); // 戻り値はコントロールID + bool button_alloted( const GdkEventButton* event, const int id ); // eventがidに割り当てられていたらtrue + bool get_eventbutton( const int id, GdkEventButton& event ); // ID からevent取得 // マウスジェスチャ void MG_reset(); - const bool is_mg_mode() const { return m_mg; } + bool is_mg_mode() const { return m_mg; } void set_send_mg_info( const bool send ){ m_send_mg_info = send; } const std::string& get_mg_direction() const{ return m_mg_direction; } - const bool MG_start( const GdkEventButton* event ); - const bool MG_motion( const GdkEventMotion* event ); - const int MG_end( const GdkEventButton* event ); // 戻り値はコントロールID + bool MG_start( const GdkEventButton* event ); + bool MG_motion( const GdkEventMotion* event ); + int MG_end( const GdkEventButton* event ); // 戻り値はコントロールID // ホイールマウスジェスチャ void MG_wheel_reset(); - const bool MG_wheel_start( const GdkEventButton* event ); - const int MG_wheel_scroll( const GdkEventScroll* event ); // 戻り値はコントロールID - const bool MG_wheel_end( const GdkEventButton* event ); // ジェスチャを実行したらtrueを返す + bool MG_wheel_start( const GdkEventButton* event ); + int MG_wheel_scroll( const GdkEventScroll* event ); // 戻り値はコントロールID + bool MG_wheel_end( const GdkEventButton* event ); // ジェスチャを実行したらtrueを返す }; } diff --git a/src/control/controlutil.cpp b/src/control/controlutil.cpp index 7d99bfb4a..858691f11 100644 --- a/src/control/controlutil.cpp +++ b/src/control/controlutil.cpp @@ -129,7 +129,7 @@ void CONTROL::delete_conf() // keysymはアスキー文字か -const bool CONTROL::is_ascii( const guint keysym ) +bool CONTROL::is_ascii( const guint keysym ) { if( keysym > 32 && keysym < 127 ) return true; @@ -177,7 +177,7 @@ void CONTROL::set_menu_motion( Gtk::Menu* menu ) // IDからモードを取得 // 例えば id == CONTROL::Up の時は CONTROL::COMMONMOTION を返す -const int CONTROL::get_mode( const int id ) +int CONTROL::get_mode( const int id ) { if( id < CONTROL::COMMONMOTION_END ) return CONTROL::MODE_COMMON; if( id < CONTROL::BBSLISTMOTION_END ) return CONTROL::MODE_BBSLIST; @@ -205,7 +205,7 @@ const std::string CONTROL::get_mode_label( const int mode ) // キー名からkeysymを取得 // 例えば keyname == "Space" の時は GDK_space を返す -const guint CONTROL::get_keysym( const std::string& keyname ) +guint CONTROL::get_keysym( const std::string& keyname ) { #ifdef _DEBUG std::cout << "CONTROL::get_keysym name = " << keyname; @@ -270,7 +270,7 @@ const std::string CONTROL::get_keyname( const guint keysym ) // 操作名からID取得 // 例えば name == "Up" の時は CONTROL::Up を返す -const int CONTROL::get_id( const std::string& name ) +int CONTROL::get_id( const std::string& name ) { for( int id = CONTROL::COMMONMOTION; id < CONTROL::CONTROL_END; ++id ){ if( name == CONTROL::control_label[ id ][0] ) return id; @@ -524,7 +524,7 @@ const std::string CONTROL::get_label_motions( const int id ) // 共通操作 -const bool CONTROL::operate_common( const int control, const std::string& url, SKELETON::Admin* admin ) +bool CONTROL::operate_common( const int control, const std::string& url, SKELETON::Admin* admin ) { if( control == CONTROL::None ) return false;; @@ -707,7 +707,7 @@ void CONTROL::set_keymotions( const int id, const std::string& str_motions ) // 指定したIDのキーボード操作を全て削除 -const bool CONTROL::remove_keymotions( const int id ) +bool CONTROL::remove_keymotions( const int id ) { return CONTROL::get_keyconfig()->remove_motions( id ); } @@ -721,7 +721,7 @@ const std::vector< int > CONTROL::check_key_conflict( const int mode, const std: // editviewの操作をemacs風にする -const bool CONTROL::is_emacs_mode() +bool CONTROL::is_emacs_mode() { return CONTROL::get_keyconfig()->is_emacs_mode(); } @@ -734,7 +734,7 @@ void CONTROL::toggle_emacs_mode() // 「タブで開く」キーを入れ替える -const bool CONTROL::is_toggled_tab_key() +bool CONTROL::is_toggled_tab_key() { return CONTROL::get_keyconfig()->is_toggled_tab_key(); } @@ -816,7 +816,7 @@ void CONTROL::set_mousemotions( const int id, const std::string& str_motions ) // 指定したIDのマウスジェスチャを全て削除 -const bool CONTROL::remove_mousemotions( const int id ) +bool CONTROL::remove_mousemotions( const int id ) { return CONTROL::get_mouseconfig()->remove_motions( id ); } @@ -869,7 +869,7 @@ void CONTROL::set_buttonmotions( const int id, const std::string& str_motions ) } // 指定したIDのボタン設定を全て削除 -const bool CONTROL::remove_buttonmotions( const int id ) +bool CONTROL::remove_buttonmotions( const int id ) { return CONTROL::get_buttonconfig()->remove_motions( id ); } @@ -886,7 +886,7 @@ const std::vector< int > CONTROL::check_button_conflict( const int mode, const s // タブで開くボタンを入れ替える -const bool CONTROL::is_toggled_tab_button() +bool CONTROL::is_toggled_tab_button() { return CONTROL::get_buttonconfig()->is_toggled_tab_button(); } @@ -899,7 +899,7 @@ void CONTROL::toggle_tab_button( const bool toggle ) // ポップアップ表示の時にクリックでワープ -const bool CONTROL::is_popup_warpmode() +bool CONTROL::is_popup_warpmode() { return CONTROL::get_buttonconfig()->is_popup_warpmode(); } diff --git a/src/control/controlutil.h b/src/control/controlutil.h index 1e8813152..6692f4a9d 100644 --- a/src/control/controlutil.h +++ b/src/control/controlutil.h @@ -25,22 +25,22 @@ namespace CONTROL // keysymはアスキー文字か - const bool is_ascii( const guint keysym ); + bool is_ascii( const guint keysym ); // メニューにショートカットキーやマウスジェスチャを表示 void set_menu_motion( Gtk::Menu* menu ); // IDからモードを取得 // 例えば id == CONTROL::Up の時は CONTROL::COMMONMOTION を返す - const int get_mode( const int id ); + int get_mode( const int id ); // 操作モードIDからモード名取得 // 例えば mode == CONTROL::MODE_COMMON の時は "共通" を返す const std::string get_mode_label( const int mode ); - + // キー名からkeysymを取得 // 例えば keyname == "Space" の時は GDK_space を返す - const guint get_keysym( const std::string& keyname ); + guint get_keysym( const std::string& keyname ); // keysymからキー名を取得 // 例えば keysym == GDK_space の時は "Space" を返す @@ -48,7 +48,7 @@ namespace CONTROL // 操作名からID取得 // 例えば name == "Up" の時は CONTROL::Up を返す - const int get_id( const std::string& name ); + int get_id( const std::string& name ); // IDから操作名取得 // 例えば id == CONTROL::Up の時は "Up" を返す @@ -69,7 +69,7 @@ namespace CONTROL const std::string get_label_motions( const int id ); // 共通操作 - const bool operate_common( const int control, const std::string& url, SKELETON::Admin* admin ); + bool operate_common( const int control, const std::string& url, SKELETON::Admin* admin ); /////////////////////// @@ -89,18 +89,18 @@ namespace CONTROL void set_keymotions( const int id, const std::string& str_motions ); // 指定したIDのキーボード操作を全て削除 - const bool remove_keymotions( const int id ); + bool remove_keymotions( const int id ); // キーボード操作が重複していないか const std::vector< int > check_key_conflict( const int mode, const std::string& str_motion ); // editviewの操作をemacs風にする - const bool is_emacs_mode(); + bool is_emacs_mode(); void toggle_emacs_mode(); // 「タブで開く」キーを入れ替える - const bool is_toggled_tab_key(); - void toggle_tab_key( const bool toggle ); + bool is_toggled_tab_key(); + void toggle_tab_key( const bool toggle ); // Gtk アクセラレーションキーを取得 Gtk::AccelKey get_accelkey( const int id ); @@ -123,7 +123,7 @@ namespace CONTROL void set_mousemotions( const int id, const std::string& str_motions ); // 指定したIDのマウスジェスチャを全て削除 - const bool remove_mousemotions( const int id ); + bool remove_mousemotions( const int id ); // マウスジェスチャが重複していないか const std::vector< int > check_mouse_conflict( const int mode, const std::string& str_motion ); @@ -146,7 +146,7 @@ namespace CONTROL void set_buttonmotions( const int id, const std::string& str_motions ); // 指定したIDのボタン設定を全て削除 - const bool remove_buttonmotions( const int id ); + bool remove_buttonmotions( const int id ); // ボタンが重複していないか const std::vector< int > check_button_conflict( const int mode, const std::string& str_motion ); @@ -156,11 +156,11 @@ namespace CONTROL // タブで開くボタンを入れ替える - const bool is_toggled_tab_button(); + bool is_toggled_tab_button(); void toggle_tab_button( const bool toggle ); // ポップアップ表示の時にクリックでワープ - const bool is_popup_warpmode(); + bool is_popup_warpmode(); void toggle_popup_warpmode(); } diff --git a/src/control/keyconfig.cpp b/src/control/keyconfig.cpp index d40ae1a9f..b91919fd4 100644 --- a/src/control/keyconfig.cpp +++ b/src/control/keyconfig.cpp @@ -261,7 +261,7 @@ void KeyConfig::set_one_motion_impl( const int id, const int mode, const std::st // editviewの操作をemacs風か -const bool KeyConfig::is_emacs_mode() +bool KeyConfig::is_emacs_mode() { return ( get_str_motions( CONTROL::UpEdit ).find( "Ctrl+p" ) != std::string::npos ); } @@ -314,7 +314,7 @@ void KeyConfig::toggle_emacs_mode() // タブで開くキーを入れ替えているか -const bool KeyConfig::is_toggled_tab_key() +bool KeyConfig::is_toggled_tab_key() { const bool ret = ( get_str_motions( CONTROL::OpenBoard ).find( "Ctrl+Space" ) != std::string::npos && get_str_motions( CONTROL::OpenBoardTab ).find( "Space" ) != std::string::npos diff --git a/src/control/keyconfig.h b/src/control/keyconfig.h index 1a7e87234..e1b641fdc 100644 --- a/src/control/keyconfig.h +++ b/src/control/keyconfig.h @@ -22,10 +22,10 @@ namespace CONTROL void load_conf() override; // editviewの操作をemacs風にする - const bool is_emacs_mode(); + bool is_emacs_mode(); void toggle_emacs_mode(); - const bool is_toggled_tab_key(); // タブで開くキーを入れ替えているか + bool is_toggled_tab_key(); // タブで開くキーを入れ替えているか void toggle_tab_key( const bool toggle ); // タブで開くキーを入れ替える // Gtk アクセラレーションキーを取得 diff --git a/src/control/keypref.cpp b/src/control/keypref.cpp index 6d47a57b6..1dffc268f 100644 --- a/src/control/keypref.cpp +++ b/src/control/keypref.cpp @@ -260,7 +260,7 @@ void KeyPref::set_motions( const int id, const std::string& str_motions ) } -const bool KeyPref::remove_motions( const int id ) +bool KeyPref::remove_motions( const int id ) { return CONTROL::remove_keymotions( id ); } diff --git a/src/control/keypref.h b/src/control/keypref.h index ee2f41687..69b9cdc21 100644 --- a/src/control/keypref.h +++ b/src/control/keypref.h @@ -60,7 +60,7 @@ namespace CONTROL const std::string get_str_motions( const int id ) override; const std::string get_default_motions( const int id ) override; void set_motions( const int id, const std::string& str_motions ) override; - const bool remove_motions( const int id ) override; + bool remove_motions( const int id ) override; private: diff --git a/src/control/mousekeyconf.cpp b/src/control/mousekeyconf.cpp index 172a9d3ce..e12dc4e46 100644 --- a/src/control/mousekeyconf.cpp +++ b/src/control/mousekeyconf.cpp @@ -61,7 +61,7 @@ void MouseKeyConf::save_conf( const std::string& savefile ) // 操作からID取得 -const int MouseKeyConf::get_id( const int mode, +int MouseKeyConf::get_id( const int mode, const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ) { @@ -86,7 +86,7 @@ const int MouseKeyConf::get_id( const int mode, // ID から操作を取得 // (注意) リストの一番上にあるものを出力 -const bool MouseKeyConf::get_motion( const int id, guint& motion, bool& ctrl, bool& shift, bool& alt, bool& dblclick, bool& trpclick ) +bool MouseKeyConf::get_motion( const int id, guint& motion, bool& ctrl, bool& shift, bool& alt, bool& dblclick, bool& trpclick ) { std::vector< MouseKeyItem >::iterator it = m_vec_items.begin(); for( ; it != m_vec_items.end(); ++it ){ @@ -109,7 +109,7 @@ const bool MouseKeyConf::get_motion( const int id, guint& motion, bool& ctrl, bo // ID が割り当てられているかチェック -const bool MouseKeyConf::alloted( const int id, +bool MouseKeyConf::alloted( const int id, const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ) { @@ -232,7 +232,7 @@ void MouseKeyConf::set_one_motion( const std::string& name, const std::string& s // 指定したIDの操作を全て削除 // 削除したら true を返す -const bool MouseKeyConf::remove_motions( const int id ) +bool MouseKeyConf::remove_motions( const int id ) { bool ret = false; diff --git a/src/control/mousekeyconf.h b/src/control/mousekeyconf.h index 940f80688..326700aaf 100644 --- a/src/control/mousekeyconf.h +++ b/src/control/mousekeyconf.h @@ -35,17 +35,17 @@ namespace CONTROL void save_conf( const std::string& savefile ); // 操作からID取得 - const int get_id( const int mode, + int get_id( const int mode, const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ); // ID から操作を取得 // (注意) リストの一番上にあるものを出力 - const bool get_motion( const int id, + bool get_motion( const int id, guint& motion, bool& ctrl, bool& shift, bool& alt, bool& dblclick, bool& trpclick ); // ID が割り当てられているかチェック - const bool alloted( const int id, + bool alloted( const int id, const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ); @@ -63,7 +63,7 @@ namespace CONTROL void set_motions( const int id, const std::string& str_motions ); // 指定したIDの操作を全て削除 - const bool remove_motions( const int id ); + bool remove_motions( const int id ); protected: diff --git a/src/control/mousekeyitem.h b/src/control/mousekeyitem.h index c539139e2..b1793fbda 100644 --- a/src/control/mousekeyitem.h +++ b/src/control/mousekeyitem.h @@ -43,39 +43,39 @@ namespace CONTROL m_trpclick( trpclick ) {} - const int get_id() const { return m_id; } - const int get_mode() const{ return m_mode; } + int get_id() const { return m_id; } + int get_mode() const { return m_mode; } const std::string& get_name() const { return m_name; } const std::string& get_str_motion() const { return m_str_motion; } - const gint get_motion() const{ return m_motion; } - const bool get_ctrl() const { return m_ctrl; } - const bool get_shift() const { return m_shift; } - const bool get_alt() const { return m_alt; } - const bool get_dblclick() const { return m_dblclick; } - const bool get_trpclick() const { return m_trpclick; } + gint get_motion() const { return m_motion; } + bool get_ctrl() const { return m_ctrl; } + bool get_shift() const { return m_shift; } + bool get_alt() const { return m_alt; } + bool get_dblclick() const { return m_dblclick; } + bool get_trpclick() const { return m_trpclick; } // モード無視 - const int equal( const std::string& str_motion ) + int equal( const std::string& str_motion ) { if( str_motion == m_str_motion ) return m_id; return CONTROL::None; } // モード無視 - const int equal( const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ) + int equal( const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ) { if( motion == m_motion && ctrl == m_ctrl && shift == m_shift && alt == m_alt && dblclick == m_dblclick && trpclick == m_trpclick ) return m_id; return CONTROL::None; } - const int is_activated( const int mode, const std::string& str_motion ) + int is_activated( const int mode, const std::string& str_motion ) { if( mode == m_mode ) return equal( str_motion ); return CONTROL::None; } - const int is_activated( const int mode, - const guint motion, const bool ctrl, const bool shift, const bool alt, const bool dblclick, const bool trpclick ) + int is_activated( const int mode, const guint motion, const bool ctrl, const bool shift, const bool alt, + const bool dblclick, const bool trpclick ) { if( mode == m_mode ) return equal( motion, ctrl, shift, alt, dblclick, trpclick ); return CONTROL::None; diff --git a/src/control/mousekeypref.h b/src/control/mousekeypref.h index 8d9bb7ffb..b78c238da 100644 --- a/src/control/mousekeypref.h +++ b/src/control/mousekeypref.h @@ -46,7 +46,7 @@ namespace CONTROL protected: - const int get_id() const { return m_id; } + int get_id() const { return m_id; } const std::string get_key_label(); const std::string get_mouse_label(); @@ -109,12 +109,12 @@ namespace CONTROL protected: - const int get_id() const { return m_id; } - const int get_controlmode() const { return m_controlmode; } - const int get_count() const { return m_liststore->children().size(); } + int get_id() const { return m_id; } + int get_controlmode() const { return m_controlmode; } + int get_count() const { return m_liststore->children().size(); } - const int get_single() const { return m_single; } - const void set_single( bool single ){ m_single = single; } + int get_single() const { return m_single; } + void set_single( bool single ){ m_single = single; } virtual InputDiag* create_inputdiag() = 0; virtual const std::string get_default_motions( const int id ) = 0; @@ -194,7 +194,7 @@ namespace CONTROL virtual const std::string get_str_motions( const int id ) = 0; virtual const std::string get_default_motions( const int id ) = 0; virtual void set_motions( const int id, const std::string& str_motions ) = 0; - virtual const bool remove_motions( const int id ) = 0; + virtual bool remove_motions( const int id ) = 0; private: diff --git a/src/control/mousepref.cpp b/src/control/mousepref.cpp index 494e6ebcd..d7c995dc9 100644 --- a/src/control/mousepref.cpp +++ b/src/control/mousepref.cpp @@ -136,7 +136,7 @@ void MousePref::set_motions( const int id, const std::string& str_motions ) } -const bool MousePref::remove_motions( const int id ) +bool MousePref::remove_motions( const int id ) { return CONTROL::remove_mousemotions( id ); } diff --git a/src/control/mousepref.h b/src/control/mousepref.h index 223c14fd5..cfe835c2e 100644 --- a/src/control/mousepref.h +++ b/src/control/mousepref.h @@ -62,7 +62,7 @@ namespace CONTROL const std::string get_str_motions( const int id ) override; const std::string get_default_motions( const int id ) override; void set_motions( const int id, const std::string& str_motions ) override; - const bool remove_motions( const int id ) override; + bool remove_motions( const int id ) override; private: diff --git a/src/dbimg/img.cpp b/src/dbimg/img.cpp index b1dbd8eff..b08c08998 100644 --- a/src/dbimg/img.cpp +++ b/src/dbimg/img.cpp @@ -136,7 +136,7 @@ void Img::clear() // // ロード待ち状態セット/リセット // -const bool Img::set_wait( const std::string& refurl, const bool mosaic, const int waitsec ) +bool Img::set_wait( const std::string& refurl, const bool mosaic, const int waitsec ) { if( waitsec && ! m_wait ){ @@ -179,14 +179,14 @@ void Img::reset_wait() // スレ埋め込み画像の高さ、幅 -const int Img::get_width_emb() +int Img::get_width_emb() { if( ! m_width_emb ) set_embedded_size(); return m_width_emb; } -const int Img::get_height_emb() +int Img::get_height_emb() { if( ! m_height_emb ) set_embedded_size(); @@ -195,14 +195,14 @@ const int Img::get_height_emb() // モザイク処理時に縮小するサイズ -const int Img::get_width_mosaic() +int Img::get_width_mosaic() { if( ! m_width_mosaic ) set_mosaic_size(); return m_width_mosaic; } -const int Img::get_height_mosaic() +int Img::get_height_mosaic() { if( ! m_height_mosaic ) set_mosaic_size(); @@ -210,7 +210,7 @@ const int Img::get_height_mosaic() } -const bool Img::is_cached() +bool Img::is_cached() { if( is_loading() ) return false; if( is_wait() ) return false; @@ -338,7 +338,7 @@ void Img::stop_load() // // path_to はデフォルトのファイル名 // -const bool Img::save( Gtk::Window* parent, const std::string& path_to ) +bool Img::save( Gtk::Window* parent, const std::string& path_to ) { if( ! is_cached() ) return false; @@ -422,7 +422,7 @@ void Img::set_protect( bool protect ) // 拡張子が偽装されているか -const bool Img::is_fake() +bool Img::is_fake() { if( ! is_cached() ) return false; if( m_imgctrl & CORE::IMGCTRL_GENUINE ) return false; diff --git a/src/dbimg/img.h b/src/dbimg/img.h index e0eaada1b..a177923b4 100644 --- a/src/dbimg/img.h +++ b/src/dbimg/img.h @@ -64,50 +64,50 @@ namespace DBIMG const std::string& url() const { return m_url; } const std::string get_cache_path(); - const bool is_wait() const{ return m_wait; } + bool is_wait() const { return m_wait; } - const int get_imgctrl() const { return m_imgctrl; } + int get_imgctrl() const { return m_imgctrl; } - const int get_type() const { return m_type; } + int get_type() const { return m_type; } void set_type( const int type ){ m_type = type; } // 高さ、幅 - const int get_width() const { return m_width; } - const int get_height() const { return m_height; } + int get_width() const { return m_width; } + int get_height() const { return m_height; } // スレ埋め込み画像の高さ、幅 - const int get_width_emb(); - const int get_height_emb(); + int get_width_emb(); + int get_height_emb(); // モザイク処理時に縮小するサイズ - const int get_width_mosaic(); - const int get_height_mosaic(); + int get_width_mosaic(); + int get_height_mosaic(); - const bool is_cached(); + bool is_cached(); - const bool get_abone() const { return m_abone; } + bool get_abone() const { return m_abone; } void set_abone( bool abone ); - const bool get_mosaic() const { return m_mosaic; } + bool get_mosaic() const { return m_mosaic; } void set_mosaic( const bool mosaic ); void show_large_img(); - const bool is_zoom_to_fit() const { return m_zoom_to_fit; } + bool is_zoom_to_fit() const { return m_zoom_to_fit; } void set_zoom_to_fit( bool fit ) { m_zoom_to_fit = fit; } // 表示倍率 // ファイルサイズ(byte)は JDLIB::Loadable::total_length() で取得 - const int get_size() const { return m_size; } + int get_size() const { return m_size; } void set_size( int size ) { m_size = size; } const std::string& get_refurl() const { return m_refurl; } - const bool is_protected() const { return m_protect; } + bool is_protected() const { return m_protect; } void set_protect( bool protect ); // 拡張子が偽装されているか - const bool is_fake(); + bool is_fake(); // ロード開始 // receive_data() と receive_finish() がコールバックされる @@ -119,7 +119,7 @@ namespace DBIMG // ロード停止 void stop_load() override; - const bool save( Gtk::Window* parent, const std::string& path_to ); + bool save( Gtk::Window* parent, const std::string& path_to ); private: @@ -127,7 +127,7 @@ namespace DBIMG void receive_finish() override; // ロード待ち状態セット/リセット - const bool set_wait( const std::string& refurl, const bool mosaic, const int waitsec ); + bool set_wait( const std::string& refurl, const bool mosaic, const int waitsec ); void reset_wait(); // 埋め込み画像のサイズを計算 diff --git a/src/dbimg/imginterface.cpp b/src/dbimg/imginterface.cpp index 1faaba2a4..1506eb9e9 100644 --- a/src/dbimg/imginterface.cpp +++ b/src/dbimg/imginterface.cpp @@ -44,27 +44,27 @@ void DBIMG::reset_clock_in( Img* img ) } -const int DBIMG::get_type_ext( const std::string& url ) +int DBIMG::get_type_ext( const std::string& url ) { if( instance_dbimg_root ) return instance_dbimg_root->get_type_ext( url ); return T_UNKNOWN; } -const int DBIMG::get_image_type( const unsigned char *sign ) +int DBIMG::get_image_type( const unsigned char *sign ) { if( instance_dbimg_root ) return instance_dbimg_root->get_image_type( sign ); return T_UNKNOWN; } -const int DBIMG::get_type_ext( const char* url, int n ) +int DBIMG::get_type_ext( const char* url, int n ) { if( instance_dbimg_root ) return instance_dbimg_root->get_type_ext( url, n ); return T_UNKNOWN; } -const int DBIMG::get_type_real( const std::string& url ) +int DBIMG::get_type_real( const std::string& url ) { int type = T_UNKNOWN; DBIMG::Img* img = DBIMG::get_img( url ); @@ -117,7 +117,7 @@ void DBIMG::stop_load( const std::string& url ) -const bool DBIMG::save( const std::string& url, Gtk::Window* parent, const std::string& path_to ) +bool DBIMG::save( const std::string& url, Gtk::Window* parent, const std::string& path_to ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->save( parent, path_to ); @@ -138,7 +138,7 @@ void DBIMG::delete_all_files() } -const int DBIMG::get_width( const std::string& url ) +int DBIMG::get_width( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_width(); @@ -146,7 +146,7 @@ const int DBIMG::get_width( const std::string& url ) } -const int DBIMG::get_height( const std::string& url ) +int DBIMG::get_height( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_height(); @@ -154,7 +154,7 @@ const int DBIMG::get_height( const std::string& url ) } -const bool DBIMG::is_cached( const std::string& url ) +bool DBIMG::is_cached( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_cached(); @@ -162,7 +162,7 @@ const bool DBIMG::is_cached( const std::string& url ) } -const bool DBIMG::get_abone( const std::string& url ) +bool DBIMG::get_abone( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_abone(); @@ -177,7 +177,7 @@ void DBIMG::set_abone( const std::string& url, bool abone ) } -const bool DBIMG::is_loading( const std::string& url ) +bool DBIMG::is_loading( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_loading(); @@ -185,7 +185,7 @@ const bool DBIMG::is_loading( const std::string& url ) return false; } -const bool DBIMG::is_wait( const std::string& url ) +bool DBIMG::is_wait( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_wait(); @@ -193,7 +193,7 @@ const bool DBIMG::is_wait( const std::string& url ) return false; } -const int DBIMG::get_code( const std::string& url ) +int DBIMG::get_code( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_code(); @@ -209,7 +209,7 @@ const std::string DBIMG::get_str_code( const std::string& url ) } -const bool DBIMG::get_mosaic( const std::string& url ) +bool DBIMG::get_mosaic( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_mosaic(); @@ -231,7 +231,7 @@ void DBIMG::show_large_img( const std::string& url ) } -const bool DBIMG::is_zoom_to_fit( const std::string& url ) +bool DBIMG::is_zoom_to_fit( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_zoom_to_fit(); @@ -246,7 +246,7 @@ void DBIMG::set_zoom_to_fit( const std::string& url, bool fit ) } -const int DBIMG::get_size( const std::string& url ) +int DBIMG::get_size( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->get_size(); @@ -269,14 +269,14 @@ const std::string DBIMG::get_refurl( const std::string& url ) } -const size_t DBIMG::byte( const std::string& url ) +size_t DBIMG::byte( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->current_length(); return 0; } -const size_t DBIMG::get_filesize( const std::string& url ) +size_t DBIMG::get_filesize( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->total_length(); @@ -284,14 +284,14 @@ const size_t DBIMG::get_filesize( const std::string& url ) } -const bool DBIMG::is_protected( const std::string& url ) +bool DBIMG::is_protected( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_protected(); return true; } -const bool DBIMG::is_fake( const std::string& url ) +bool DBIMG::is_fake( const std::string& url ) { DBIMG::Img* img = DBIMG::get_img( url ); if( img ) return img->is_fake(); diff --git a/src/dbimg/imginterface.h b/src/dbimg/imginterface.h index 85eb03193..e93c0fd53 100644 --- a/src/dbimg/imginterface.h +++ b/src/dbimg/imginterface.h @@ -49,17 +49,17 @@ namespace DBIMG // 画像データの先頭のシグネチャを見て画像のタイプを取得 // 画像ではない場合は T_NOIMG を返す - const int get_image_type( const unsigned char *sign ); + int get_image_type( const unsigned char *sign ); // 拡張子だけをみて画像の種類を判断 // キャッシュに無くても判断可能 // 画像ではない場合は T_UNKNOWN を返す - const int get_type_ext( const std::string& url ); - const int get_type_ext( const char* url, int n ); + int get_type_ext( const std::string& url ); + int get_type_ext( const char* url, int n ); // 実際の画像ファイルの種類を判断 // 画像がキャッシュに無いときは判断不能( T_UNKNOWN を返す ) - const int get_type_real( const std::string& url ); + int get_type_real( const std::string& url ); DBIMG::Img* get_img( const std::string& url ); const std::string get_cache_path( const std::string& url ); @@ -74,32 +74,32 @@ namespace DBIMG void download_img_wait( const std::string& url, const std::string& refurl, const bool mosaic, const int first ); void stop_load( const std::string& url ); - const bool save( const std::string& url, Gtk::Window* parent, const std::string& path_to ); + bool save( const std::string& url, Gtk::Window* parent, const std::string& path_to ); void delete_cache( const std::string& url ); void delete_all_files(); - const int get_width( const std::string& url ); - const int get_height( const std::string& url ); - const bool is_cached( const std::string& url ); - const int get_type( const std::string& url ); - const bool get_abone( const std::string& url ); - void set_abone( const std::string& url, bool abone ); - const bool is_loading( const std::string& url ); - const bool is_wait( const std::string& url ); - const int get_code( const std::string& url ); + int get_width( const std::string& url ); + int get_height( const std::string& url ); + bool is_cached( const std::string& url ); + int get_type( const std::string& url ); + bool get_abone( const std::string& url ); + void set_abone( const std::string& url, bool abone ); + bool is_loading( const std::string& url ); + bool is_wait( const std::string& url ); + int get_code( const std::string& url ); const std::string get_str_code( const std::string& url ); - const bool get_mosaic( const std::string& url ); + bool get_mosaic( const std::string& url ); void set_mosaic( const std::string& url, bool mosaic ); void show_large_img( const std::string& url ); - const bool is_zoom_to_fit( const std::string& url ); + bool is_zoom_to_fit( const std::string& url ); void set_zoom_to_fit( const std::string& url, bool fit ); - const int get_size( const std::string& url ); + int get_size( const std::string& url ); void set_size( const std::string& url, int size ); const std::string get_refurl( const std::string& url ); - const size_t byte( const std::string& url ); - const size_t get_filesize( const std::string& url ); - const bool is_protected( const std::string& url ); - const bool is_fake( const std::string& url ); + size_t byte( const std::string& url ); + size_t get_filesize( const std::string& url ); + bool is_protected( const std::string& url ); + bool is_fake( const std::string& url ); void set_protect( const std::string& url, bool protect ); } diff --git a/src/dbimg/imgroot.cpp b/src/dbimg/imgroot.cpp index 61bfdf121..a50e44d12 100644 --- a/src/dbimg/imgroot.cpp +++ b/src/dbimg/imgroot.cpp @@ -122,7 +122,7 @@ Img* ImgRoot::search_img( const std::string& url ) // 画像データの先頭のシグネチャを見て画像のタイプを取得 // 画像ではない場合は T_NOIMG を返す // -const int ImgRoot::get_image_type( const unsigned char *sign ) +int ImgRoot::get_image_type( const unsigned char *sign ) { int type = T_NOIMG; diff --git a/src/dbimg/imgroot.h b/src/dbimg/imgroot.h index 0c676b0ec..e4cfb8a96 100644 --- a/src/dbimg/imgroot.h +++ b/src/dbimg/imgroot.h @@ -29,7 +29,7 @@ namespace DBIMG void set_clock_in( Img* img ); void reset_clock_in( Img* img ); void remove_clock_in(); - const int get_wait_size(){ return m_list_wait.size(); } + int get_wait_size(){ return m_list_wait.size(); } // Imgクラス取得(無ければ作成) Img* get_img( const std::string& url ); @@ -39,7 +39,7 @@ namespace DBIMG // 画像データの先頭のシグネチャを見て画像のタイプを取得 // 画像ではない場合は T_NOIMG を返す - const int get_image_type( const unsigned char *sign ); + int get_image_type( const unsigned char *sign ); // 拡張子から画像タイプを取得 // 画像ではない場合は T_UNKNOWN を返す diff --git a/src/dbtree/article2ch.cpp b/src/dbtree/article2ch.cpp index 155d3c727..d1b9a8733 100644 --- a/src/dbtree/article2ch.cpp +++ b/src/dbtree/article2ch.cpp @@ -115,7 +115,7 @@ NodeTreeBase* Article2ch::create_nodetree() // // dat落ちしたスレをロードするか // -const bool Article2ch::is_load_olddat() +bool Article2ch::is_load_olddat() { // 2chにログインしている場合 // または、offlaw2を使う設定の場合 ( bbspinkを除く ) diff --git a/src/dbtree/article2ch.h b/src/dbtree/article2ch.h index 4c2409917..8d317b194 100644 --- a/src/dbtree/article2ch.h +++ b/src/dbtree/article2ch.h @@ -31,7 +31,7 @@ namespace DBTREE protected: // dat落ちしたスレをロードするか - const bool is_load_olddat() override; + bool is_load_olddat() override; private: diff --git a/src/dbtree/articlebase.cpp b/src/dbtree/articlebase.cpp index b42ffdc79..9cbf9f177 100644 --- a/src/dbtree/articlebase.cpp +++ b/src/dbtree/articlebase.cpp @@ -121,14 +121,14 @@ ArticleBase::~ArticleBase() } -const bool ArticleBase::empty() +bool ArticleBase::empty() { return m_url.empty(); } // ID がこのスレのものかどうか -const bool ArticleBase::equal( const std::string& datbase, const std::string& id ) +bool ArticleBase::equal( const std::string& datbase, const std::string& id ) { return ( id == m_id ); } @@ -158,7 +158,7 @@ const std::string& ArticleBase::get_since_date() // スレ速度 -const int ArticleBase::get_speed() +int ArticleBase::get_speed() { time_t current_t = time( NULL ); return ( get_number() * 60 * 60 * 24 ) / MAX( 1, current_t - get_since_time() ); @@ -166,7 +166,7 @@ const int ArticleBase::get_speed() // キャッシュにあるdatファイルのサイズ -const size_t ArticleBase::get_lng_dat() +size_t ArticleBase::get_lng_dat() { return get_nodetree()->get_lng_dat(); } @@ -363,7 +363,7 @@ time_t ArticleBase::get_time_modified() // スレが立ってからの経過時間( 時間 ) -const int ArticleBase::get_hour() +int ArticleBase::get_hour() { return ( time( NULL ) - get_since_time() ) / ( 60 * 60 ); } @@ -568,7 +568,7 @@ void ArticleBase::update_writetime() // // 書き込み数 // -const int ArticleBase::get_num_posted() +int ArticleBase::get_num_posted() { if( ! m_vec_posted.size() ) return 0; @@ -594,7 +594,7 @@ void ArticleBase::set_bookmarked_thread( const bool bookmarked ) // // キャッシュがあって、かつ新着の読み込みが可能 // -const bool ArticleBase::enable_load() +bool ArticleBase::enable_load() { return ( is_cached() && ( m_status & STATUS_UPDATE ) && ! ( m_status & STATUS_OLD ) ); } @@ -603,7 +603,7 @@ const bool ArticleBase::enable_load() // // キャッシュはあるが規定のレス数を越えていて、かつ全てのレスが既読 // -const bool ArticleBase::is_finished() +bool ArticleBase::is_finished() { if( is_cached() && ! enable_load() && m_number_max && get_number_seen() >= m_number_max ){ @@ -621,7 +621,7 @@ const bool ArticleBase::is_finished() // // 透明あぼーん // -const bool ArticleBase::get_abone_transparent() +bool ArticleBase::get_abone_transparent() { if( CONFIG::get_abone_transparent() ) return true; @@ -632,7 +632,7 @@ const bool ArticleBase::get_abone_transparent() // // 連鎖あぼーん // -const bool ArticleBase::get_abone_chain() +bool ArticleBase::get_abone_chain() { if( CONFIG::get_abone_chain() ) return true; @@ -643,7 +643,7 @@ const bool ArticleBase::get_abone_chain() // // あぼーんしてるか // -const bool ArticleBase::get_abone( int number ) +bool ArticleBase::get_abone( int number ) { return get_nodetree()->get_abone( number ); } @@ -890,7 +890,7 @@ void ArticleBase::set_abone_global( const bool set ) // // ブックマークの数 // -const int ArticleBase::get_num_bookmark() +int ArticleBase::get_num_bookmark() { if( ! m_vec_bookmark.size() ) return 0; @@ -903,7 +903,7 @@ const int ArticleBase::get_num_bookmark() // // ブックマークされているか // -const bool ArticleBase::is_bookmarked( const int number ) +bool ArticleBase::is_bookmarked( const int number ) { if( number <= 0 || number > m_number_load ) return false; @@ -934,7 +934,7 @@ void ArticleBase::set_bookmark( const int number, const bool set ) // // 自分が書き込んだレスか // -const bool ArticleBase::is_posted( const int number ) +bool ArticleBase::is_posted( const int number ) { if( number <= 0 || number > m_number_load ) return false; @@ -948,7 +948,7 @@ const bool ArticleBase::is_posted( const int number ) // 自分の書き込みにレスしたか -const bool ArticleBase::is_refer_posted( const int number ) +bool ArticleBase::is_refer_posted( const int number ) { return get_nodetree()->is_refer_posted( number ); } @@ -1071,7 +1071,7 @@ void ArticleBase::unlock_impl() // // ロード中か // -const bool ArticleBase::is_loading() const +bool ArticleBase::is_loading() const { if( ! m_nodetree ) return false; return m_nodetree->is_loading(); @@ -1081,7 +1081,7 @@ const bool ArticleBase::is_loading() const // // 更新チェック中か // -const bool ArticleBase::is_checking_update() +bool ArticleBase::is_checking_update() { if( ! is_loading() ) return false; diff --git a/src/dbtree/articlebase.h b/src/dbtree/articlebase.h index aba48cde1..215fdf86b 100644 --- a/src/dbtree/articlebase.h +++ b/src/dbtree/articlebase.h @@ -82,7 +82,7 @@ namespace DBTREE bool m_abone_global; // 全体レベルでのあぼーんを有効にする // 「スレ」がスレ一覧でブックマークされているか - bool m_bookmarked_thread; + bool m_bookmarked_thread; // 「レス」のブックマーク std::vector< char > m_vec_bookmark; // ブックマーク判定キャッシュ @@ -94,7 +94,7 @@ namespace DBTREE bool m_cached; // 情報ファイルを読みこんだらtrueにして2度読みしないようにする - bool m_read_info; + bool m_read_info; // true ならunlock_impl()がコールバックされたときに情報保存 bool m_save_info; @@ -114,19 +114,19 @@ namespace DBTREE void set_is_924( const bool is924 ){ m_924 = is924; } // dat落ちしたスレをロードするか - virtual const bool is_load_olddat(){ return false; } + virtual bool is_load_olddat(){ return false; } public: ArticleBase( const std::string& datbase, const std::string& id, bool cached ); ~ArticleBase(); - const bool empty(); + bool empty(); const std::string& get_url() const { return m_url; } // ID がこのスレのものかどうか - virtual const bool equal( const std::string& datbase, const std::string& id ); + virtual bool equal( const std::string& datbase, const std::string& id ); // 移転があったときなどにdatファイルのベースアドレスを更新 void update_datbase( const std::string& datbase ); @@ -141,19 +141,19 @@ namespace DBTREE const std::string& get_id() const { return m_id; } const std::string& get_key() const { return m_key; } const std::string& get_subject() const { return m_subject; } - const int get_number() const { return m_number; } - const int get_number_diff() const { return m_number_diff; } - const int get_number_new() const { return m_number_new; } - const int get_number_load() const { return m_number_load; } - const int get_number_seen() const{ return m_number_seen; } + int get_number() const { return m_number; } + int get_number_diff() const { return m_number_diff; } + int get_number_new() const { return m_number_new; } + int get_number_load() const { return m_number_load; } + int get_number_seen() const{ return m_number_seen; } void set_number_max( const int number ){ m_number_max = number; } // スレ速度 - const int get_speed(); + int get_speed(); // キャッシュにあるdatファイルのサイズ - const size_t get_lng_dat(); + size_t get_lng_dat(); // nodetree の number 番のレスのヘッダノードのポインタを返す NODE* res_header( int number ); @@ -209,7 +209,7 @@ namespace DBTREE const std::list< int > get_res_query( const std::string& query, const bool mode_or ); // number番のレスの文字列を返す - // ref == true なら先頭に ">" を付ける + // ref == true なら先頭に ">" を付ける const std::string get_res_str( int number, bool ref = false ); // number 番のレスの生文字列を返す @@ -218,12 +218,12 @@ namespace DBTREE // 書き込み時の名前とメアド const std::string& get_write_name() const { return m_write_name; } void set_write_name( const std::string& str ){ m_save_info = true; m_write_name = str; } - const bool get_write_fixname() const { return m_write_fixname; } + bool get_write_fixname() const { return m_write_fixname; } void set_write_fixname( bool set ){ m_save_info = true; m_write_fixname = set; } const std::string& get_write_mail() const { return m_write_mail; } void set_write_mail( const std::string& str ){ m_save_info = true; m_write_mail = str; } - const bool get_write_fixmail() const { return m_write_fixmail; } + bool get_write_fixmail() const { return m_write_fixmail; } void set_write_fixmail( bool set ){ m_save_info = true; m_write_fixmail = set; } // 書き込みメッセージ作成 @@ -232,7 +232,7 @@ namespace DBTREE // bbscgi のURL virtual const std::string url_bbscgi() { return std::string(); } - + // subbbscgi のURL virtual const std::string url_subbbscgi() { return std::string(); } @@ -248,13 +248,13 @@ namespace DBTREE void reset_write_date(){ m_write_time_date = std::string(); } // 書き込み数 - const int get_num_posted(); + int get_num_posted(); // 自分の書き込みか - const bool is_posted( const int number ); + bool is_posted( const int number ); // 自分の書き込みにレスしたか - const bool is_refer_posted( const int number ); + bool is_refer_posted( const int number ); // 書き込みマークセット void set_posted( const int number, const bool set ); @@ -273,19 +273,19 @@ namespace DBTREE void set_date_modified( const std::string& date ){ m_date_modified = date; } // スレが立ってからの経過時間( 時間 ) - const int get_hour(); + int get_hour(); // http コード - const int get_code() const { return m_code; } + int get_code() const { return m_code; } const std::string& get_str_code() const { return m_str_code; } // エラーメッセージ const std::string& get_ext_err() const { return m_ext_err; } // DAT落ちかどうかなどの状態 ( global.hで定義 ) - const int get_status() const{ return m_status; } + int get_status() const { return m_status; } void set_status( const int status ){ m_status = status; } - + void set_subject( const std::string& subject ); void set_number( const int number, const bool is_online ); void set_number_load( const int number_load ); @@ -300,17 +300,17 @@ namespace DBTREE bool save_dat( const std::string& path_to ); // HDDにキャッシュされているか - const bool is_cached() const { return m_cached; } + bool is_cached() const { return m_cached; } void set_cached( const bool set ){ m_cached = set; } // キャッシュがarticlebaseに読み込まれている(nodetree!=NULL)か - const bool is_cache_read() const { return ( m_nodetree ); } + bool is_cache_read() const { return ( m_nodetree ); } // キャッシュがあって、かつ新着の読み込みが可能 - const bool enable_load(); + bool enable_load(); // キャッシュはあるが規定のレス数を越えていて、かつ全てのレスが既読 - const bool is_finished(); + bool is_finished(); // あぼーん情報 const std::list< std::string >& get_abone_list_id(){ return m_list_abone_id; } @@ -320,22 +320,22 @@ namespace DBTREE const std::vector< char >& get_abone_vec_res(){ return m_vec_abone_res; } // 透明 - const bool get_abone_transparent(); + bool get_abone_transparent(); // 連鎖 - const bool get_abone_chain(); + bool get_abone_chain(); // ageあぼーん - const bool get_abone_age() const { return m_abone_age; } + bool get_abone_age() const { return m_abone_age; } // 板レベルでのあぼーん - const bool get_abone_board() const { return m_abone_board; } + bool get_abone_board() const { return m_abone_board; } // 全体レベルでのあぼーん - const bool get_abone_global() const { return m_abone_global; } + bool get_abone_global() const { return m_abone_global; } // number番のレスがあぼーんされているか - const bool get_abone( int number ); + bool get_abone( int number ); // 全レスのあぼーん状態の更新 void update_abone(); @@ -364,11 +364,11 @@ namespace DBTREE // 「スレ」のブックマーク void set_bookmarked_thread( const bool bookmarked ); - const bool is_bookmarked_thread() const { return m_bookmarked_thread; } + bool is_bookmarked_thread() const { return m_bookmarked_thread; } // 「レス」のブックマーク - const int get_num_bookmark(); - const bool is_bookmarked( const int number ); + int get_num_bookmark(); + bool is_bookmarked( const int number ); void set_bookmark( const int number, const bool set ); // 情報ファイル読み込み @@ -378,8 +378,8 @@ namespace DBTREE // キャッシュがあって、force = true の時は強制書き込み virtual void save_info( const bool force ); - const bool is_loading() const; // ロード中か - const bool is_checking_update(); // 更新チェック中か + bool is_loading() const; // ロード中か + bool is_checking_update(); // 更新チェック中か // スレッドのロード停止 void stop_load(); @@ -399,12 +399,12 @@ namespace DBTREE void copy_article_info( const std::string& url_src ); // スレッド924か - const bool is_924() const{ return m_924; } + bool is_924() const { return m_924; } private: // 更新チェック可能 - virtual const bool enable_check_update(){ return true; } + virtual bool enable_check_update() { return true; } // NodeTree作成 // もしNodeTreeが作られていなかったら作成 diff --git a/src/dbtree/articlehash.cpp b/src/dbtree/articlehash.cpp index 169b423b9..625f54bde 100644 --- a/src/dbtree/articlehash.cpp +++ b/src/dbtree/articlehash.cpp @@ -43,7 +43,7 @@ ArticleHash::~ArticleHash() } -const int ArticleHash::get_hash( const std::string& id ) +int ArticleHash::get_hash( const std::string& id ) { const size_t hash = atoi( id.c_str() ) & ( HASH_TBLSIZE -1 ); diff --git a/src/dbtree/articlehash.h b/src/dbtree/articlehash.h index 7699aa89d..c1e324bbd 100644 --- a/src/dbtree/articlehash.h +++ b/src/dbtree/articlehash.h @@ -35,23 +35,23 @@ namespace DBTREE ArticleHash(); virtual ~ArticleHash(); - const size_t size() const { return m_size; } + size_t size() const { return m_size; } void push( ArticleBase* article ); ArticleBase* find( const std::string& datbase, const std::string& id ); const ArticleHashIterator begin(); - const size_t end() const{ return size(); } + size_t end() const { return size(); } private: - const int get_hash( const std::string& id ); + int get_hash( const std::string& id ); // iterator 用関数 ArticleBase* it_get(); void it_inc(); - const size_t it_size() const { return m_it_size; } + size_t it_size() const { return m_it_size; } }; diff --git a/src/dbtree/articlejbbs.h b/src/dbtree/articlejbbs.h index b61ad1c00..10d99e03c 100644 --- a/src/dbtree/articlejbbs.h +++ b/src/dbtree/articlejbbs.h @@ -33,7 +33,7 @@ namespace DBTREE private: // 更新チェック不可能 - const bool enable_check_update() override { return false; } + bool enable_check_update() override { return false; } NodeTreeBase* create_nodetree() override; }; diff --git a/src/dbtree/articlelocal.cpp b/src/dbtree/articlelocal.cpp index 30a7049d2..fcd0b088c 100644 --- a/src/dbtree/articlelocal.cpp +++ b/src/dbtree/articlelocal.cpp @@ -30,7 +30,7 @@ ArticleLocal::~ArticleLocal() // ID がこのスレのものかどうか -const bool ArticleLocal::equal( const std::string& datbase, const std::string& id ) +bool ArticleLocal::equal( const std::string& datbase, const std::string& id ) { return ( get_url() == datbase + id ); } diff --git a/src/dbtree/articlelocal.h b/src/dbtree/articlelocal.h index a5d948a30..36e94412d 100644 --- a/src/dbtree/articlelocal.h +++ b/src/dbtree/articlelocal.h @@ -19,7 +19,7 @@ namespace DBTREE ~ArticleLocal(); // ID がこのスレのものかどうか - const bool equal( const std::string& datbase, const std::string& id ) override; + bool equal( const std::string& datbase, const std::string& id ) override; // キャッシュの削除をしない void delete_cache( const bool cache_only ) override {} diff --git a/src/dbtree/articlemachi.cpp b/src/dbtree/articlemachi.cpp index b201cff80..a51843efd 100644 --- a/src/dbtree/articlemachi.cpp +++ b/src/dbtree/articlemachi.cpp @@ -87,7 +87,7 @@ const std::string ArticleMachi::url_subbbscgi() // offlawモードなら更新チェック可能 -const bool ArticleMachi::enable_check_update() +bool ArticleMachi::enable_check_update() { return CONFIG::get_use_machi_offlaw(); } diff --git a/src/dbtree/articlemachi.h b/src/dbtree/articlemachi.h index 9c6399600..63d64b498 100644 --- a/src/dbtree/articlemachi.h +++ b/src/dbtree/articlemachi.h @@ -33,7 +33,7 @@ namespace DBTREE private: // offlawモードなら更新チェック可能 - const bool enable_check_update() override; + bool enable_check_update() override; NodeTreeBase* create_nodetree() override; }; diff --git a/src/dbtree/board2ch.cpp b/src/dbtree/board2ch.cpp index 97fce3b8d..07c7906af 100644 --- a/src/dbtree/board2ch.cpp +++ b/src/dbtree/board2ch.cpp @@ -65,7 +65,7 @@ const std::string Board2ch::get_proxy_host() return std::string(); } -const int Board2ch::get_proxy_port() +int Board2ch::get_proxy_port() { const int mode = get_mode_local_proxy(); @@ -105,7 +105,7 @@ const std::string Board2ch::get_proxy_host_w() return std::string(); } -const int Board2ch::get_proxy_port_w() +int Board2ch::get_proxy_port_w() { if( CORE::get_loginp2()->login_now() ) return CONFIG::get_proxy_port_for_data(); diff --git a/src/dbtree/board2ch.h b/src/dbtree/board2ch.h index c569a4253..25190cf58 100644 --- a/src/dbtree/board2ch.h +++ b/src/dbtree/board2ch.h @@ -30,12 +30,12 @@ namespace DBTREE // 読み込み用プロキシ const std::string get_proxy_host() override; - const int get_proxy_port() override; + int get_proxy_port() override; const std::string get_proxy_basicauth() override; // 書き込み用プロキシ const std::string get_proxy_host_w() override; - const int get_proxy_port_w() override; + int get_proxy_port_w() override; const std::string get_proxy_basicauth_w() override; // 書き込み用クッキー @@ -55,7 +55,7 @@ namespace DBTREE const std::string url_subbbscgi_new() override; // datの最大サイズ(Kバイト) - const int get_max_dat_lng() const override { return DEFAULT_MAX_DAT_LNG; } + int get_max_dat_lng() const override { return DEFAULT_MAX_DAT_LNG; } protected: @@ -69,7 +69,7 @@ namespace DBTREE private: // デフォルト最大レス数 - const int get_default_number_max_res() override { return DEFAULT_NUMBER_MAX_2CH; } + int get_default_number_max_res() override { return DEFAULT_NUMBER_MAX_2CH; } ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; }; diff --git a/src/dbtree/board2chcompati.cpp b/src/dbtree/board2chcompati.cpp index 743e19f94..6c18de0ec 100644 --- a/src/dbtree/board2chcompati.cpp +++ b/src/dbtree/board2chcompati.cpp @@ -73,7 +73,7 @@ Board2chCompati::~Board2chCompati() // // キャッシュのファイル名が正しいか // -const bool Board2chCompati::is_valid( const std::string& filename ) +bool Board2chCompati::is_valid( const std::string& filename ) { if( filename.find( get_ext() ) == std::string::npos ) return false; if( filename.length() - filename.rfind( get_ext() ) != get_ext().length() ) return false; @@ -520,7 +520,7 @@ const std::string Board2chCompati::default_noname() } -const int Board2chCompati::line_number() +int Board2chCompati::line_number() { if( m_settingloader && m_settingloader->get_code() == HTTP_OK ) return m_settingloader->line_number(); @@ -529,7 +529,7 @@ const int Board2chCompati::line_number() } -const int Board2chCompati::message_count() +int Board2chCompati::message_count() { if( m_settingloader && m_settingloader->get_code() == HTTP_OK ) return m_settingloader->message_count(); @@ -588,7 +588,7 @@ void Board2chCompati::download_rule_setting() // // レス数であぼーん(グローバル) // -const int Board2chCompati::get_abone_number_global() +int Board2chCompati::get_abone_number_global() { return CONFIG::get_abone_number_thread(); } diff --git a/src/dbtree/board2chcompati.h b/src/dbtree/board2chcompati.h index 7db5b6521..1ad123d54 100644 --- a/src/dbtree/board2chcompati.h +++ b/src/dbtree/board2chcompati.h @@ -47,13 +47,13 @@ namespace DBTREE // SETTING.TXT const std::string settingtxt() override; const std::string default_noname() override; - const int line_number() override; - const int message_count() override; + int line_number() override; + int message_count() override; const std::string get_unicode() override; private: - const bool is_valid( const std::string& filename ) override; + bool is_valid( const std::string& filename ) override; ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; void parse_subject( const char* str_subject_txt ) override; @@ -63,7 +63,7 @@ namespace DBTREE void download_rule_setting() override; // レス数であぼーん(グローバル) - const int get_abone_number_global() override; + int get_abone_number_global() override; }; } diff --git a/src/dbtree/boardbase.cpp b/src/dbtree/boardbase.cpp index ffb19aa22..a3d8c2b2a 100644 --- a/src/dbtree/boardbase.cpp +++ b/src/dbtree/boardbase.cpp @@ -178,7 +178,7 @@ const std::string BoardBase::get_proxy_host() return std::string(); } -const int BoardBase::get_proxy_port() +int BoardBase::get_proxy_port() { const int mode = get_mode_local_proxy(); @@ -213,7 +213,7 @@ const std::string BoardBase::get_proxy_host_w() return std::string(); } -const int BoardBase::get_proxy_port_w() +int BoardBase::get_proxy_port_w() { const int mode = get_mode_local_proxy_w(); @@ -256,14 +256,14 @@ const std::string BoardBase::default_noname() // 最大改行数/2 -const int BoardBase::line_number() +int BoardBase::line_number() { return 0; } // 最大書き込みバイト数 -const int BoardBase::message_count() +int BoardBase::message_count() { return 0; } @@ -420,7 +420,7 @@ void BoardBase::update_writetime() // // 経過時間(秒) // -const time_t BoardBase::get_write_pass() +time_t BoardBase::get_write_pass() { time_t ret = 0; struct timeval tv; @@ -1519,7 +1519,7 @@ void BoardBase::update_abone_all_article() // // スレあぼーん判定 // -const bool BoardBase::is_abone_thread( ArticleBase* article ) +bool BoardBase::is_abone_thread( ArticleBase* article ) { if( ! article ) return false; if( article->empty() ) return false; diff --git a/src/dbtree/boardbase.h b/src/dbtree/boardbase.h index 0e4c2bf62..8e6a4d132 100644 --- a/src/dbtree/boardbase.h +++ b/src/dbtree/boardbase.h @@ -231,7 +231,7 @@ namespace DBTREE void set_charset( const std::string& str ){ m_charset = str; } // articleがスレあぼーんされているか - const bool is_abone_thread( ArticleBase* article ); + bool is_abone_thread( ArticleBase* article ); // m_url_update_views に登録されている view に update_board コマンドを送る void send_update_board(); @@ -250,7 +250,7 @@ namespace DBTREE bool empty(); // 状態 ( global.hで定義 ) - const int get_status() const{ return m_status; } + int get_status() const { return m_status; } // boardviewに表示するスレッドのリストを取得 std::vector< ArticleBase* >& get_list_subject(){ return m_list_subject; } @@ -264,22 +264,22 @@ namespace DBTREE void set_modified_setting( const std::string& modified ){ m_modified_setting = modified; } // boardviewでソートする列番号とソート順 - const int get_view_sort_column() const { return m_view_sort_column; } + int get_view_sort_column() const { return m_view_sort_column; } void set_view_sort_column( int column ){ m_view_sort_column = column; } - const int get_view_sort_mode() const { return m_view_sort_mode; } + int get_view_sort_mode() const { return m_view_sort_mode; } void set_view_sort_mode( int mode ){ m_view_sort_mode = mode; } - const int get_view_sort_pre_column() const { return m_view_sort_pre_column; } + int get_view_sort_pre_column() const { return m_view_sort_pre_column; } void set_view_sort_pre_column( int column ) { m_view_sort_pre_column = column; } - const int get_view_sort_pre_mode() const { return m_view_sort_pre_mode; } + int get_view_sort_pre_mode() const { return m_view_sort_pre_mode; } void set_view_sort_pre_mode( int mode ){ m_view_sort_pre_mode = mode; } // 名無し書き込み不可 - const bool get_check_noname() const { return m_check_noname; } + bool get_check_noname() const { return m_check_noname; } void set_check_noname( const bool check ){ m_check_noname = check; } // 過去ログも表示する - const bool get_show_oldlog() const { return m_show_oldlog; } + bool get_show_oldlog() const { return m_show_oldlog; } void set_show_oldlog( const bool show ){ m_show_oldlog = show; } // url がこの板のものかどうか @@ -303,12 +303,12 @@ namespace DBTREE // ダウンロード時のプロキシ virtual const std::string get_proxy_host(); - virtual const int get_proxy_port(); + virtual int get_proxy_port(); virtual const std::string get_proxy_basicauth(); // 書き込み時のプロキシ virtual const std::string get_proxy_host_w(); - virtual const int get_proxy_port_w(); + virtual int get_proxy_port_w(); virtual const std::string get_proxy_basicauth_w(); // ローカルルール @@ -321,10 +321,10 @@ namespace DBTREE virtual const std::string default_noname(); // 最大改行数/2 - virtual const int line_number(); + virtual int line_number(); // 最大書き込みバイト数 - virtual const int message_count(); + virtual int message_count(); // 特殊文字書き込み可能か( pass なら可能、 change なら不可 ) virtual const std::string get_unicode(); @@ -447,8 +447,8 @@ namespace DBTREE const std::list< std::string >& get_abone_list_thread_remove(){ return m_list_abone_thread_remove; } const std::list< std::string >& get_abone_list_word_thread(){ return m_list_abone_word_thread; } const std::list< std::string >& get_abone_list_regex_thread(){ return m_list_abone_regex_thread; } - const int get_abone_number_thread(){ return m_abone_number_thread; } - const int get_abone_hour_thread(){ return m_abone_hour_thread; } + int get_abone_number_thread(){ return m_abone_number_thread; } + int get_abone_hour_thread(){ return m_abone_hour_thread; } // subject.txtのロード後にdat落ちしたスレッドをスレあぼーんのリストから取り除く void remove_old_abone_thread(); @@ -469,18 +469,18 @@ namespace DBTREE ); // ローカルプロキシ設定 - const int get_mode_local_proxy() const { return m_mode_local_proxy; } + int get_mode_local_proxy() const { return m_mode_local_proxy; } const std::string& get_local_proxy() const { return m_local_proxy; } - const int get_local_proxy_port() const { return m_local_proxy_port; } + int get_local_proxy_port() const { return m_local_proxy_port; } const std::string& get_local_proxy_basicauth() const { return m_local_proxy_basicauth; } void set_mode_local_proxy( int mode ){ m_mode_local_proxy = mode; } void set_local_proxy( const std::string& proxy ); void set_local_proxy_port( int port ){ m_local_proxy_port = port; } - const int get_mode_local_proxy_w() const { return m_mode_local_proxy_w; } + int get_mode_local_proxy_w() const { return m_mode_local_proxy_w; } const std::string& get_local_proxy_w() const { return m_local_proxy_w; } - const int get_local_proxy_port_w() const { return m_local_proxy_port_w; } + int get_local_proxy_port_w() const { return m_local_proxy_port_w; } const std::string& get_local_proxy_basicauth_w() const { return m_local_proxy_basicauth_w; } void set_mode_local_proxy_w( int mode ){ m_mode_local_proxy_w = mode; } @@ -497,8 +497,8 @@ namespace DBTREE // 最終書き込み時間 void update_writetime(); const time_t& get_write_time() const { return m_write_time.tv_sec; } // 秒 - const time_t get_write_pass(); // 経過時間(秒) - const time_t get_samba_sec() const { return m_samba_sec; } // samba(秒) + time_t get_write_pass(); // 経過時間(秒) + time_t get_samba_sec() const { return m_samba_sec; } // samba(秒) void set_samba_sec( time_t sec ){ m_samba_sec = sec; } time_t get_write_leftsec(); // 書き込み可能までの残り秒 @@ -511,18 +511,18 @@ namespace DBTREE void reset_all_access_date(); // 実況の秒数 - const time_t get_live_sec() const{ return m_live_sec; } + time_t get_live_sec() const{ return m_live_sec; } void set_live_sec( time_t sec ){ m_live_sec = sec; } // 最終アクセス時刻 - const time_t get_last_access_time() const{ return m_last_access_time; } + time_t get_last_access_time() const{ return m_last_access_time; } // 最大レス数 - const int get_number_max_res() const{ return m_number_max_res; } + int get_number_max_res() const { return m_number_max_res; } void set_number_max_res( const int number ); // datの最大サイズ(Kバイト) - virtual const int get_max_dat_lng() const { return 0; } + virtual int get_max_dat_lng() const { return 0; } // 板情報の取得 virtual void read_info(); @@ -561,10 +561,10 @@ namespace DBTREE void clear(); // デフォルト最大レス数( 0 : 未設定 ) - virtual const int get_default_number_max_res(){ return 0; } + virtual int get_default_number_max_res() { return 0; } // キャッシュのファイル名が正しいかどうか - virtual const bool is_valid( const std::string& filename ){ return false; } + virtual bool is_valid( const std::string& filename ) { return false; } virtual void create_loaderdata( JDLIB::LOADERDATA& data ); void receive_data( const char* data, size_t size ) override; @@ -592,7 +592,7 @@ namespace DBTREE // レス数であぼーん(グローバル) // 2ch以外の板ではキャンセルする - virtual const int get_abone_number_global(){ return 0; } + virtual int get_abone_number_global() { return 0; } }; } diff --git a/src/dbtree/boardjbbs.cpp b/src/dbtree/boardjbbs.cpp index 1de3fda01..a0236a122 100644 --- a/src/dbtree/boardjbbs.cpp +++ b/src/dbtree/boardjbbs.cpp @@ -38,7 +38,7 @@ BoardJBBS::BoardJBBS( const std::string& root, const std::string& path_board, co // // キャッシュのファイル名が正しいか // -const bool BoardJBBS::is_valid( const std::string& filename ) +bool BoardJBBS::is_valid( const std::string& filename ) { if( filename.length() != 10 ) return false; diff --git a/src/dbtree/boardjbbs.h b/src/dbtree/boardjbbs.h index f6cbfa3af..8ceceba6d 100644 --- a/src/dbtree/boardjbbs.h +++ b/src/dbtree/boardjbbs.h @@ -31,7 +31,7 @@ namespace DBTREE private: - const bool is_valid( const std::string& filename ) override; + bool is_valid( const std::string& filename ) override; ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; void parse_subject( const char* str_subject_txt ) override; void regist_article( const bool is_online ) override; diff --git a/src/dbtree/boardmachi.cpp b/src/dbtree/boardmachi.cpp index 12e31e39f..349de7e63 100644 --- a/src/dbtree/boardmachi.cpp +++ b/src/dbtree/boardmachi.cpp @@ -55,7 +55,7 @@ bool BoardMachi::equal( const std::string& url ) // // キャッシュのファイル名が正しいか // -const bool BoardMachi::is_valid( const std::string& filename ) +bool BoardMachi::is_valid( const std::string& filename ) { if( filename.length() != 10 ) return false; diff --git a/src/dbtree/boardmachi.h b/src/dbtree/boardmachi.h index 6fd57028a..e8e9c8927 100644 --- a/src/dbtree/boardmachi.h +++ b/src/dbtree/boardmachi.h @@ -39,7 +39,7 @@ namespace DBTREE private: - const bool is_valid( const std::string& filename ) override; + bool is_valid( const std::string& filename ) override; ArticleBase* append_article( const std::string& datbase, const std::string& id, const bool cached ) override; void parse_subject( const char* str_subject_txt ) override; void regist_article( const bool is_online ) override; diff --git a/src/dbtree/interface.cpp b/src/dbtree/interface.cpp index 0e9135cb3..8c82e6ad4 100644 --- a/src/dbtree/interface.cpp +++ b/src/dbtree/interface.cpp @@ -156,7 +156,7 @@ const std::string DBTREE::is_board_moved( const std::string& url, } -const bool DBTREE::move_board( const std::string& url_old, const std::string& url_new ) +bool DBTREE::move_board( const std::string& url_old, const std::string& url_new ) { return get_root()->move_board( url_old, url_new, false ); } @@ -225,7 +225,7 @@ const std::string DBTREE::get_date_modified() // bbsmenuの更新時間( time_t ) -const time_t DBTREE::get_time_modified() +time_t DBTREE::get_time_modified() { return get_root()->get_time_modified(); } @@ -243,7 +243,7 @@ const std::string DBTREE::board_id( const std::string& url ) } // 更新時間( time_t ) -const time_t DBTREE::board_time_modified( const std::string& url ) +time_t DBTREE::board_time_modified( const std::string& url ) { return DBTREE::get_board( url )->get_time_modified(); } @@ -351,13 +351,13 @@ const std::string DBTREE::board_ext( const std::string& url ) } -const int DBTREE::board_status( const std::string& url ) +int DBTREE::board_status( const std::string& url ) { return DBTREE::get_board( url )->get_status(); } -const int DBTREE::board_code( const std::string& url ) +int DBTREE::board_code( const std::string& url ) { return DBTREE::get_board( url )->get_code(); } @@ -385,7 +385,7 @@ void DBTREE::board_read_subject_from_cache( const std::string& url ) DBTREE::get_board( url )->download_subject( std::string(), true ); } -const bool DBTREE::board_is_loading( const std::string& url ) +bool DBTREE::board_is_loading( const std::string& url ) { return DBTREE::get_board( url )->is_loading(); } @@ -402,7 +402,7 @@ std::vector< DBTREE::ArticleBase* >& DBTREE::board_list_subject( const std::stri } -const int DBTREE::board_view_sort_column( const std::string& url ) +int DBTREE::board_view_sort_column( const std::string& url ) { return DBTREE::get_board( url )->get_view_sort_column(); } @@ -414,7 +414,7 @@ void DBTREE::board_set_view_sort_column( const std::string& url, int column ) } -const int DBTREE::board_view_sort_mode( const std::string& url ) +int DBTREE::board_view_sort_mode( const std::string& url ) { return DBTREE::get_board( url )->get_view_sort_mode(); } @@ -426,7 +426,7 @@ void DBTREE::board_set_view_sort_mode( const std::string& url, int mode ) } -const int DBTREE::board_view_sort_pre_column( const std::string& url ) +int DBTREE::board_view_sort_pre_column( const std::string& url ) { return DBTREE::get_board( url )->get_view_sort_pre_column(); } @@ -438,7 +438,7 @@ void DBTREE::board_set_view_sort_pre_column( const std::string& url, int column } -const int DBTREE::board_view_sort_pre_mode( const std::string& url ) +int DBTREE::board_view_sort_pre_mode( const std::string& url ) { return DBTREE::get_board( url )->get_view_sort_pre_mode(); } @@ -449,7 +449,7 @@ void DBTREE::board_set_view_sort_pre_mode( const std::string& url, int mode ) DBTREE::get_board( url )->set_view_sort_pre_mode( mode ); } -const bool DBTREE::board_check_noname( const std::string& url ) +bool DBTREE::board_check_noname( const std::string& url ) { return DBTREE::get_board( url )->get_check_noname(); } @@ -459,7 +459,7 @@ void DBTREE::board_set_check_noname( const std::string& url, const bool check ) DBTREE::get_board( url )->set_check_noname( check ); } -const bool DBTREE::board_show_oldlog( const std::string& url ) +bool DBTREE::board_show_oldlog( const std::string& url ) { return DBTREE::get_board( url )->get_show_oldlog(); } @@ -470,7 +470,7 @@ void DBTREE::board_set_show_oldlog( const std::string& url, const bool show ) } -const int DBTREE::board_get_mode_local_proxy( const std::string& url ) +int DBTREE::board_get_mode_local_proxy( const std::string& url ) { return DBTREE::get_board( url )->get_mode_local_proxy(); } @@ -480,7 +480,7 @@ const std::string& DBTREE::board_get_local_proxy( const std::string& url ) return DBTREE::get_board( url )->get_local_proxy(); } -const int DBTREE::board_get_local_proxy_port( const std::string& url ) +int DBTREE::board_get_local_proxy_port( const std::string& url ) { return DBTREE::get_board( url )->get_local_proxy_port(); } @@ -505,7 +505,7 @@ void DBTREE::board_set_local_proxy_port( const std::string& url, int port ) DBTREE::get_board( url )->set_local_proxy_port( port ); } -const int DBTREE::board_get_mode_local_proxy_w( const std::string& url ) +int DBTREE::board_get_mode_local_proxy_w( const std::string& url ) { return DBTREE::get_board( url )->get_mode_local_proxy_w(); } @@ -520,7 +520,7 @@ const std::string& DBTREE::board_get_local_proxy_basicauth_w( const std::string& return DBTREE::get_board( url )->get_local_proxy_basicauth_w(); } -const int DBTREE::board_get_local_proxy_port_w( const std::string& url ) +int DBTREE::board_get_local_proxy_port_w( const std::string& url ) { return DBTREE::get_board( url )->get_local_proxy_port_w(); } @@ -590,17 +590,17 @@ void DBTREE::board_update_writetime( const std::string& url ) DBTREE::get_board( url )->update_writetime(); } -const time_t DBTREE::board_write_time( const std::string& url ) +time_t DBTREE::board_write_time( const std::string& url ) { return DBTREE::get_board( url )->get_write_time(); } -const time_t DBTREE::board_write_pass( const std::string& url ) +time_t DBTREE::board_write_pass( const std::string& url ) { return DBTREE::get_board( url )->get_write_pass(); } -const time_t DBTREE::board_samba_sec( const std::string& url ) +time_t DBTREE::board_samba_sec( const std::string& url ) { return DBTREE::get_board( url )->get_samba_sec(); } @@ -638,7 +638,7 @@ void DBTREE::board_clear_all_post_history( const std::string& url ) } -const int DBTREE::board_get_number_max_res( const std::string& url ) +int DBTREE::board_get_number_max_res( const std::string& url ) { return DBTREE::get_board( url )->get_number_max_res(); } @@ -649,12 +649,12 @@ void DBTREE::board_set_number_max_res( const std::string& url, const int number } // datの最大サイズ(Kバイト) -const int DBTREE::board_get_max_dat_lng( const std::string& url ) +int DBTREE::board_get_max_dat_lng( const std::string& url ) { return DBTREE::get_board( url )->get_max_dat_lng(); } -const time_t DBTREE::board_get_live_sec( const std::string& url ) +time_t DBTREE::board_get_live_sec( const std::string& url ) { return DBTREE::get_board( url )->get_live_sec(); } @@ -664,7 +664,7 @@ void DBTREE::board_set_live_sec( const std::string& url, time_t sec ) DBTREE::get_board( url )->set_live_sec( sec ); } -const time_t DBTREE::board_last_access_time( const std::string& url ) +time_t DBTREE::board_last_access_time( const std::string& url ) { return DBTREE::get_board( url )->get_last_access_time(); } @@ -742,12 +742,12 @@ const std::list< std::string >& DBTREE::get_abone_list_regex_thread( const std:: return DBTREE::get_board( url )->get_abone_list_regex_thread(); } -const int DBTREE::get_abone_number_thread( const std::string& url ) +int DBTREE::get_abone_number_thread( const std::string& url ) { return DBTREE::get_board( url )->get_abone_number_thread(); } -const int DBTREE::get_abone_hour_thread( const std::string& url ) +int DBTREE::get_abone_hour_thread( const std::string& url ) { return DBTREE::get_board( url )->get_abone_hour_thread(); } @@ -778,7 +778,7 @@ void DBTREE::reset_abone_thread( const std::string& url, ///////////////////////////////////////////////// -const bool DBTREE::article_is_cached( const std::string& url ) +bool DBTREE::article_is_cached( const std::string& url ) { return DBTREE::get_article( url )->is_cached(); } @@ -805,7 +805,7 @@ const std::string DBTREE::article_org_host( const std::string& url ) } -const time_t DBTREE::article_since_time( const std::string& url ) +time_t DBTREE::article_since_time( const std::string& url ) { return DBTREE::get_article( url )->get_since_time(); } @@ -818,7 +818,7 @@ const std::string DBTREE::article_since_date( const std::string& url ) // スレの更新時間( time_t ) -const time_t DBTREE::article_time_modified( const std::string& url ) +time_t DBTREE::article_time_modified( const std::string& url ) { return DBTREE::get_article( url )->get_time_modified(); } @@ -836,14 +836,14 @@ void DBTREE::article_set_date_modified( const std::string& url, const std::strin DBTREE::get_article( url )->set_date_modified( date ); } -const int DBTREE::article_hour( const std::string& url ) +int DBTREE::article_hour( const std::string& url ) { return DBTREE::get_article( url )->get_hour(); } // 最終書き込み時刻 -const time_t DBTREE::article_write_time( const std::string& url ) +time_t DBTREE::article_write_time( const std::string& url ) { return DBTREE::get_article( url )->get_write_time(); } @@ -855,13 +855,13 @@ const std::string DBTREE::article_write_date( const std::string& url ) } -const int DBTREE::article_status( const std::string& url ) +int DBTREE::article_status( const std::string& url ) { return DBTREE::get_article( url )->get_status(); } -const int DBTREE::article_code( const std::string& url ) +int DBTREE::article_code( const std::string& url ) { return DBTREE::get_article( url )->get_code(); } @@ -882,17 +882,17 @@ const std::string DBTREE::article_subject( const std::string& url ) } -const int DBTREE::article_number( const std::string& url ) +int DBTREE::article_number( const std::string& url ) { return DBTREE::get_article( url )->get_number(); } -const int DBTREE::article_number_load( const std::string& url ) +int DBTREE::article_number_load( const std::string& url ) { return DBTREE::get_article( url )->get_number_load(); } -const int DBTREE::article_number_seen( const std::string& url ) +int DBTREE::article_number_seen( const std::string& url ) { return DBTREE::get_article( url )->get_number_seen(); } @@ -902,17 +902,17 @@ void DBTREE::article_set_number_seen( const std::string& url, int seen ) DBTREE::get_article( url )->set_number_seen( seen ); } -const int DBTREE::article_number_new( const std::string& url ) +int DBTREE::article_number_new( const std::string& url ) { return DBTREE::get_article( url )->get_number_new(); } -const bool DBTREE::article_is_loading( const std::string& url ) +bool DBTREE::article_is_loading( const std::string& url ) { return DBTREE::get_article( url )->is_loading(); } -const bool DBTREE::article_is_checking_update( const std::string& url ) +bool DBTREE::article_is_checking_update( const std::string& url ) { return DBTREE::get_article( url )->is_checking_update(); } @@ -938,7 +938,7 @@ void DBTREE::article_stop_load( const std::string& url ) } -const int DBTREE::article_get_speed( const std::string& url ) +int DBTREE::article_get_speed( const std::string& url ) { return DBTREE::get_article( url )->get_speed(); } @@ -970,7 +970,7 @@ const std::string DBTREE::get_proxy_host( const std::string& url ) return DBTREE::get_board( url )->get_proxy_host(); } -const int DBTREE::get_proxy_port( const std::string& url ) +int DBTREE::get_proxy_port( const std::string& url ) { return DBTREE::get_board( url )->get_proxy_port(); } @@ -985,7 +985,7 @@ const std::string DBTREE::get_proxy_host_w( const std::string& url ) return DBTREE::get_board( url )->get_proxy_host_w(); } -const int DBTREE::get_proxy_port_w( const std::string& url ) +int DBTREE::get_proxy_port_w( const std::string& url ) { return DBTREE::get_board( url )->get_proxy_port_w(); } @@ -1013,12 +1013,12 @@ const std::string DBTREE::default_noname( const std::string& url ) return DBTREE::get_board( url )->default_noname(); } -const int DBTREE::line_number( const std::string& url ) +int DBTREE::line_number( const std::string& url ) { return DBTREE::get_board( url )->line_number(); } -const int DBTREE::message_count( const std::string& url ) +int DBTREE::message_count( const std::string& url ) { return DBTREE::get_board( url )->message_count(); } @@ -1039,7 +1039,7 @@ void DBTREE::set_write_name( const std::string& url, const std::string& str ) DBTREE::get_article( url )->set_write_name( str ); } -const bool DBTREE::write_fixname( const std::string& url ) +bool DBTREE::write_fixname( const std::string& url ) { return DBTREE::get_article( url )->get_write_fixname(); } @@ -1059,7 +1059,7 @@ void DBTREE::set_write_mail( const std::string& url, const std::string& str ) DBTREE::get_article( url )->set_write_mail( str ); } -const bool DBTREE::write_fixmail( const std::string& url ) +bool DBTREE::write_fixmail( const std::string& url ) { return DBTREE::get_article( url )->get_write_fixmail(); } @@ -1213,7 +1213,7 @@ void DBTREE::add_abone_word( const std::string& url, const std::string& word ) // 透明あぼーん -const bool DBTREE::get_abone_transparent( const std::string& url ) +bool DBTREE::get_abone_transparent( const std::string& url ) { return DBTREE::get_article( url )->get_abone_transparent(); } @@ -1226,7 +1226,7 @@ void DBTREE::set_abone_transparent( const std::string& url, const bool set ) // 連鎖あぼーん -const bool DBTREE::get_abone_chain( const std::string& url ) +bool DBTREE::get_abone_chain( const std::string& url ) { return DBTREE::get_article( url )->get_abone_chain(); } @@ -1239,7 +1239,7 @@ void DBTREE::set_abone_chain( const std::string& url, const bool set ) // ageあぼーん -const bool DBTREE::get_abone_age( const std::string& url ) +bool DBTREE::get_abone_age( const std::string& url ) { return DBTREE::get_article( url )->get_abone_age(); } @@ -1252,7 +1252,7 @@ void DBTREE::set_abone_age( const std::string& url, const bool set ) // 板レベルでのあぼーん -const bool DBTREE::get_abone_board( const std::string& url ) +bool DBTREE::get_abone_board( const std::string& url ) { return DBTREE::get_article( url )->get_abone_board(); } @@ -1265,7 +1265,7 @@ void DBTREE::set_abone_board( const std::string& url, const bool set ) // 全体レベルでのあぼーん -const bool DBTREE::get_abone_global( const std::string& url ) +bool DBTREE::get_abone_global( const std::string& url ) { return DBTREE::get_article( url )->get_abone_global(); } @@ -1277,7 +1277,7 @@ void DBTREE::set_abone_global( const std::string& url, const bool set ) } -const bool DBTREE::is_bookmarked_thread( const std::string& url ) +bool DBTREE::is_bookmarked_thread( const std::string& url ) { return DBTREE::get_article( url )->is_bookmarked_thread(); } @@ -1288,12 +1288,12 @@ void DBTREE::set_bookmarked_thread( const std::string& url, const bool bookmarke } -const int DBTREE::get_num_bookmark( const std::string& url ) +int DBTREE::get_num_bookmark( const std::string& url ) { return DBTREE::get_article( url )->get_num_bookmark(); } -const bool DBTREE::is_bookmarked( const std::string& url, const int number ) +bool DBTREE::is_bookmarked( const std::string& url, const int number ) { return DBTREE::get_article( url )->is_bookmarked( number ); } diff --git a/src/dbtree/interface.h b/src/dbtree/interface.h index 94677c70e..e5bd79b33 100644 --- a/src/dbtree/interface.h +++ b/src/dbtree/interface.h @@ -29,7 +29,7 @@ namespace DBTREE void create_root(); void delete_root(); - + // 各クラスのポインタ取得 Root* get_root(); BoardBase* get_board( const std::string& url ); @@ -42,10 +42,10 @@ namespace DBTREE const std::string url_datbase( const std::string& url ); // dat型のurlに変換 - const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ); + const std::string url_dat( const std::string& url, int& num_from, int& num_to, std::string& num_str ); // dat型のurlに変換(簡易版) - const std::string url_dat( const std::string& url ); + const std::string url_dat( const std::string& url ); // read.cgi型のurlに変換 const std::string url_readcgi( const std::string& url, int num_from, int num_to ); @@ -69,7 +69,7 @@ namespace DBTREE ); // 板移転 - const bool move_board( const std::string& url_old, const std::string& url_new ); + bool move_board( const std::string& url_old, const std::string& url_new ); // 板移転情報の保存の有効切り替え void set_enable_save_movetable( const bool set ); @@ -88,12 +88,12 @@ namespace DBTREE void save_etc(); void download_bbsmenu(); const std::string get_date_modified(); // bbsmenuの更新時間( 文字列 ) - const time_t get_time_modified(); // bbsmenuの更新時間( time_t ) - + time_t get_time_modified(); // bbsmenuの更新時間( time_t ) + // board 系 const std::string board_path( const std::string& url ); const std::string board_id( const std::string& url ); - const time_t board_time_modified( const std::string& url ); // 板の更新時間( time_t ) + time_t board_time_modified( const std::string& url ); // 板の更新時間( time_t ) const std::string board_date_modified( const std::string& url ); // 板の更新時間( 文字列 ) void board_set_date_modified( const std::string& url, const std::string& date ); // 板の更新時間( 文字列 )をセット const std::string& board_get_modified_localrule( const std::string& url ); @@ -105,44 +105,44 @@ namespace DBTREE const std::string board_charset( const std::string& url ); const std::string board_cookie_for_write( const std::string& url ); const std::list< std::string >& board_list_cookies_for_write( const std::string& url ); - void board_set_list_cookies_for_write( const std::string& url, const std::list< std::string>& list_cookies ); + void board_set_list_cookies_for_write( const std::string& url, const std::list< std::string>& list_cookies ); void board_reset_list_cookies_for_write( const std::string& url ); const std::string board_keyword_for_write( const std::string& url ); void board_set_keyword_for_write( const std::string& url, const std::string& keyword ); void board_analyze_keyword_for_write( const std::string& url, const std::string& html ); const std::string board_basicauth( const std::string& url ); const std::string board_ext( const std::string& url ); - const int board_status( const std::string& url ); - const int board_code( const std::string& url ); + int board_status( const std::string& url ); + int board_code( const std::string& url ); const std::string board_str_code( const std::string& url ); void board_save_info( const std::string& url ); void board_download_subject( const std::string& url, const std::string& url_update_view ); void board_read_subject_from_cache( const std::string& url ); - const bool board_is_loading( const std::string& url ); + bool board_is_loading( const std::string& url ); void board_stop_load( const std::string& url ); std::vector< DBTREE::ArticleBase* >& board_list_subject( const std::string& url ); - const int board_view_sort_column( const std::string& url ); + int board_view_sort_column( const std::string& url ); void board_set_view_sort_column( const std::string& url, int column ); - const int board_view_sort_mode( const std::string& url ); + int board_view_sort_mode( const std::string& url ); void board_set_view_sort_mode( const std::string& url, int mode ); - const int board_view_sort_pre_column( const std::string& url ); + int board_view_sort_pre_column( const std::string& url ); void board_set_view_sort_pre_column( const std::string& url, int column ); - const int board_view_sort_pre_mode( const std::string& url ); + int board_view_sort_pre_mode( const std::string& url ); void board_set_view_sort_pre_mode( const std::string& url, int mode ); - const bool board_check_noname( const std::string& url ); + bool board_check_noname( const std::string& url ); void board_set_check_noname( const std::string& url, const bool check ); - const bool board_show_oldlog( const std::string& url ); + bool board_show_oldlog( const std::string& url ); void board_set_show_oldlog( const std::string& url, const bool show ); - const int board_get_mode_local_proxy( const std::string& url ); + int board_get_mode_local_proxy( const std::string& url ); const std::string& board_get_local_proxy( const std::string& url ); - const int board_get_local_proxy_port( const std::string& url ); + int board_get_local_proxy_port( const std::string& url ); const std::string& board_get_local_proxy_basicauth( const std::string& url ); void board_set_mode_local_proxy( const std::string& url, int mode ); void board_set_local_proxy( const std::string& url, const std::string& proxy ); void board_set_local_proxy_port( const std::string& url, int port ); - const int board_get_mode_local_proxy_w( const std::string& url ); + int board_get_mode_local_proxy_w( const std::string& url ); const std::string& board_get_local_proxy_w( const std::string& url ); - const int board_get_local_proxy_port_w( const std::string& url ); + int board_get_local_proxy_port_w( const std::string& url ); const std::string& board_get_local_proxy_basicauth_w( const std::string& url ); void board_set_mode_local_proxy_w( const std::string& url, int mode ); void board_set_local_proxy_w( const std::string& url, const std::string& proxy ); @@ -152,9 +152,9 @@ namespace DBTREE void board_set_write_name( const std::string& url, const std::string& name ); void board_set_write_mail( const std::string& url, const std::string& mail ); void board_update_writetime( const std::string& url ); - const time_t board_write_time( const std::string& url ); - const time_t board_write_pass( const std::string& url ); - const time_t board_samba_sec( const std::string& url ); + time_t board_write_time( const std::string& url ); + time_t board_write_pass( const std::string& url ); + time_t board_samba_sec( const std::string& url ); void board_set_samba_sec( const std::string& url, time_t sec ); time_t board_write_leftsec( const std::string& url ); @@ -173,15 +173,15 @@ namespace DBTREE // 各板に属する全スレの書き込み履歴のリセット void board_clear_all_post_history( const std::string& url ); - const int board_get_number_max_res( const std::string& url ); + int board_get_number_max_res( const std::string& url ); void board_set_number_max_res( const std::string& url, const int number ); // datの最大サイズ(Kバイト) - const int board_get_max_dat_lng( const std::string& url ); + int board_get_max_dat_lng( const std::string& url ); - const time_t board_get_live_sec( const std::string& url ); + time_t board_get_live_sec( const std::string& url ); void board_set_live_sec( const std::string& url, time_t sec ); - const time_t board_last_access_time( const std::string& url ); + time_t board_last_access_time( const std::string& url ); // 全スレの書き込み履歴のリセット void clear_all_post_history(); @@ -197,44 +197,44 @@ namespace DBTREE const std::string& query, const bool mode_or, const bool bm, const bool& stop ); void search_cache( const std::string& url, std::vector< DBTREE::ArticleBase* >& list_article, const std::string& query, const bool mode_or, const bool bm, const bool& stop ); - + // article 系 - const bool article_is_cached( const std::string& url ); // キャッシュにあるかどうか + bool article_is_cached( const std::string& url ); // キャッシュにあるかどうか const std::string article_id( const std::string& url ); // 拡張子込み "12345.dat" みたいに const std::string article_key( const std::string& url ); // idから拡張子を取ったもの。書き込み用 const std::string article_org_host( const std::string& url ); // 移転する前のオリジナルのURL - const time_t article_since_time( const std::string& url ); + time_t article_since_time( const std::string& url ); const std::string article_since_date( const std::string& url ); - const time_t article_time_modified( const std::string& url ); // スレの更新時間( time_t ) + time_t article_time_modified( const std::string& url ); // スレの更新時間( time_t ) const std::string article_date_modified( const std::string& url ); // スレの更新時間( 文字列 ) void article_set_date_modified( const std::string& url, const std::string& date ); // スレの更新時間( 文字列 )をセット - const int article_hour( const std::string& url ); - const time_t article_write_time( const std::string& url ); + int article_hour( const std::string& url ); + time_t article_write_time( const std::string& url ); const std::string article_write_date( const std::string& url ); - const int article_status( const std::string& url ); - const int article_code( const std::string& url ); + int article_status( const std::string& url ); + int article_code( const std::string& url ); const std::string article_str_code( const std::string& url ); const std::string article_ext_err( const std::string& url ); const std::string article_subject( const std::string& url ); - const int article_number( const std::string& url ); - const int article_number_load( const std::string& url ); - const int article_number_seen( const std::string& url ); + int article_number( const std::string& url ); + int article_number_load( const std::string& url ); + int article_number_seen( const std::string& url ); void article_set_number_seen( const std::string& url, int seen ); - const int article_number_new( const std::string& url ); - const bool article_is_loading( const std::string& url ); - const bool article_is_checking_update( const std::string& url ); + int article_number_new( const std::string& url ); + bool article_is_loading( const std::string& url ); + bool article_is_checking_update( const std::string& url ); void article_download_dat( const std::string& url, const bool check_update ); void article_set_url_pre_article( const std::string& url, const std::string& url_pre_article ); void article_copy_article_info( const std::string& url, const std::string& url_src ); void article_stop_load( const std::string& url ); - const int article_get_speed( const std::string& url ); + int article_get_speed( const std::string& url ); // 書き込み履歴のリセット void article_clear_post_history( const std::string& url ); // キャッシュ削除 // cache_only == true の時はキャッシュだけ削除してスレ情報は消さない - void delete_article( const std::string& url, const bool cache_only ); + void delete_article( const std::string& url, const bool cache_only ); // キャッシュ保存 bool article_save_dat( const std::string& url, const std::string& path_to ); @@ -251,12 +251,12 @@ namespace DBTREE // 読み込み用プロキシ const std::string get_proxy_host( const std::string& url ); - const int get_proxy_port( const std::string& url ); + int get_proxy_port( const std::string& url ); const std::string get_proxy_basicauth( const std::string& url ); // 書き込み用プロキシ - const std::string get_proxy_host_w( const std::string& url ); - const int get_proxy_port_w( const std::string& url ); + const std::string get_proxy_host_w( const std::string& url ); + int get_proxy_port_w( const std::string& url ); const std::string get_proxy_basicauth_w( const std::string& url ); // ローカルルール @@ -271,10 +271,10 @@ namespace DBTREE const std::string default_noname( const std::string& url ); // 最大改行数/2 - const int line_number( const std::string& url ); + int line_number( const std::string& url ); // 最大書き込みバイト数 - const int message_count( const std::string& url ); + int message_count( const std::string& url ); // 特殊文字書き込み可能か( pass なら可能、 change なら不可 ) const std::string get_unicode( const std::string& url ); @@ -282,12 +282,12 @@ namespace DBTREE // 書き込み時の名前とメール const std::string& write_name( const std::string& url ); void set_write_name( const std::string& url, const std::string& str ); - const bool write_fixname( const std::string& url ); + bool write_fixname( const std::string& url ); void set_write_fixname( const std::string& url, bool set ); const std::string& write_mail( const std::string& url ); void set_write_mail( const std::string& url, const std::string& str ); - const bool write_fixmail( const std::string& url ); + bool write_fixmail( const std::string& url ); void set_write_fixmail( const std::string& url, bool set ); // ポストするメッセージの作成 @@ -327,8 +327,8 @@ namespace DBTREE const std::list< std::string >& get_abone_list_word_thread( const std::string& url ); const std::list< std::string >& get_abone_list_regex_thread( const std::string& url ); const std::vector< char >& get_abone_vec_res( const std::string& url ); - const int get_abone_number_thread( const std::string& url ); - const int get_abone_hour_thread( const std::string& url ); + int get_abone_number_thread( const std::string& url ); + int get_abone_hour_thread( const std::string& url ); // subject.txtのロード後にdat落ちしたスレッドをスレあぼーんのリストから取り除く void remove_old_abone_thread( const std::string& url ); @@ -338,7 +338,7 @@ namespace DBTREE void update_abone_thread(); // スレあぼーん状態のリセット - // redraw : スレ一覧の表示更新を行う + // redraw : スレ一覧の表示更新を行う void reset_abone_thread( const std::string& url, const std::list< std::string >& threads, const std::list< std::string >& words, @@ -382,34 +382,34 @@ namespace DBTREE void add_abone_word( const std::string& url, const std::string& word ); // 透明あぼーん - const bool get_abone_transparent( const std::string& url ); + bool get_abone_transparent( const std::string& url ); void set_abone_transparent( const std::string& url, const bool set ); // 連鎖あぼーん - const bool get_abone_chain( const std::string& url ); + bool get_abone_chain( const std::string& url ); void set_abone_chain( const std::string& url, const bool set ); // ageあぼーん - const bool get_abone_age( const std::string& url ); + bool get_abone_age( const std::string& url ); void set_abone_age( const std::string& url, const bool set ); // 板レベルでのあぼーん - const bool get_abone_board( const std::string& url ); + bool get_abone_board( const std::string& url ); void set_abone_board( const std::string& url, const bool set ); // 全体レベルでのあぼーん - const bool get_abone_global( const std::string& url ); + bool get_abone_global( const std::string& url ); void set_abone_global( const std::string& url, const bool set ); // ブックマーク関係 // スレのブックマーク - const bool is_bookmarked_thread( const std::string& url ); + bool is_bookmarked_thread( const std::string& url ); void set_bookmarked_thread( const std::string& url, const bool bookmarked ); // レスのブックマーク - const int get_num_bookmark( const std::string& url ); - const bool is_bookmarked( const std::string& url, const int number ); + int get_num_bookmark( const std::string& url ); + bool is_bookmarked( const std::string& url, const int number ); void set_bookmark( const std::string& url, const int number, const bool set ); } diff --git a/src/dbtree/nodetreebase.cpp b/src/dbtree/nodetreebase.cpp index 25ec00843..dcd6cc15c 100644 --- a/src/dbtree/nodetreebase.cpp +++ b/src/dbtree/nodetreebase.cpp @@ -201,7 +201,7 @@ void NodeTreeBase::clear() // // ロード中は m_id_header 番のレスはまだ処理中なので m_id_header -1 を返す // -const int NodeTreeBase::get_res_number() +int NodeTreeBase::get_res_number() { if( is_loading() ) return m_id_header -1; @@ -225,7 +225,7 @@ NODE* NodeTreeBase::res_header( int number ) // // 下の get_num_id_name( int number ) と違って検索するので遅い // -const int NodeTreeBase::get_num_id_name( const std::string& id ) +int NodeTreeBase::get_num_id_name( const std::string& id ) { if( id.empty() ) return 0; @@ -253,7 +253,7 @@ const int NodeTreeBase::get_num_id_name( const std::string& id ) // // number番の ID の重複数 // -const int NodeTreeBase::get_num_id_name( const int number ) +int NodeTreeBase::get_num_id_name( const int number ) { NODE* head = res_header( number ); if( ! head ) return 0; @@ -2519,8 +2519,8 @@ void NodeTreeBase::parse_write( const char* str, const int lng, const int max_ln // // 戻り値 : アンカーが現れれば true // -const bool NodeTreeBase::check_anchor( const int mode, const char* str_in, - int& n_in, char* str_out, char* str_link, int lng_link, ANCINFO* ancinfo ) +bool NodeTreeBase::check_anchor( const int mode, const char* str_in, + int& n_in, char* str_out, char* str_link, int lng_link, ANCINFO* ancinfo ) { char tmp_out[ 64 ]; int lng_out = 0; @@ -2683,7 +2683,7 @@ const bool NodeTreeBase::check_anchor( const int mode, const char* str_in, // // 注意 : MISC::is_url_scheme() と MISC::is_url_char() の仕様に合わせる事 // -const int NodeTreeBase::check_link_impl( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link, const int linktype, const int delim_pos ) +int NodeTreeBase::check_link_impl( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link, const int linktype, const int delim_pos ) { // CONFIG::get_loose_url() == true の時はRFCで規定されていない文字も含める const bool loose_url = CONFIG::get_loose_url(); @@ -2908,7 +2908,7 @@ void NodeTreeBase::update_abone( const int from_number, const int to_number ) // // あぼーんの時はtrueを返す // -const bool NodeTreeBase::check_abone_res( const int number ) +bool NodeTreeBase::check_abone_res( const int number ) { if( ! m_vec_abone_res.size() ) return false; if( ! m_vec_abone_res[ number ] ) return false; @@ -2927,7 +2927,7 @@ const bool NodeTreeBase::check_abone_res( const int number ) // // あぼーんの時はtrueを返す // -const bool NodeTreeBase::check_abone_id( const int number ) +bool NodeTreeBase::check_abone_id( const int number ) { const bool check_id = ! m_list_abone_id.empty(); const bool check_id_board = ! m_list_abone_id_board.empty(); @@ -2977,7 +2977,7 @@ const bool NodeTreeBase::check_abone_id( const int number ) // // あぼーんの時はtrueを返す // -const bool NodeTreeBase::check_abone_name( const int number ) +bool NodeTreeBase::check_abone_name( const int number ) { const bool check_name = ! m_list_abone_name.empty(); const bool check_name_board = ! m_list_abone_name_board.empty(); @@ -3036,7 +3036,7 @@ const bool NodeTreeBase::check_abone_name( const int number ) // // あぼーんの時はtrueを返す // -const bool NodeTreeBase::check_abone_mail( const int number ) +bool NodeTreeBase::check_abone_mail( const int number ) { if( ! m_abone_age ) return false; @@ -3059,7 +3059,7 @@ const bool NodeTreeBase::check_abone_mail( const int number ) // // あぼーんの時はtrueを返す // -const bool NodeTreeBase::check_abone_word( const int number ) +bool NodeTreeBase::check_abone_word( const int number ) { const bool check_word = ! m_list_abone_word.empty(); const bool check_regex = ! m_list_abone_regex.empty(); @@ -3170,7 +3170,7 @@ const bool NodeTreeBase::check_abone_word( const int number ) // // あぼーんしているレスにアンカーを張っているときはtrueを返す // -const bool NodeTreeBase::check_abone_chain( const int number ) +bool NodeTreeBase::check_abone_chain( const int number ) { if( !m_abone_chain ) return false; @@ -3635,7 +3635,7 @@ int NodeTreeBase::convert_amp( char* text, const int n ) // 自分の書き込みにレスしたか -const bool NodeTreeBase::is_refer_posted( const int number ) +bool NodeTreeBase::is_refer_posted( const int number ) { if( ! m_vec_refer_posted.size() ) return false; if( m_vec_refer_posted.size() <= ( size_t )number ) return false; diff --git a/src/dbtree/nodetreebase.h b/src/dbtree/nodetreebase.h index 5c355c35e..9a35ce215 100644 --- a/src/dbtree/nodetreebase.h +++ b/src/dbtree/nodetreebase.h @@ -134,7 +134,7 @@ namespace DBTREE void set_resume( const bool resume ); void set_broken( const bool broken ) { m_broken = broken; } - const int id_header() const { return m_id_header; } + int id_header() const { return m_id_header; } void set_ext_err( const std::string& ext_err ){ m_ext_err = ext_err; } public: @@ -153,11 +153,11 @@ namespace DBTREE const std::string& get_url() const { return m_url; } const std::string& get_subject() const { return m_subject; } - const int get_res_number(); - const size_t get_lng_dat() const { return m_lng_dat; } - const bool is_broken() const{ return m_broken; } + int get_res_number(); + size_t get_lng_dat() const { return m_lng_dat; } + bool is_broken() const{ return m_broken; } const std::string& get_ext_err() const { return m_ext_err; } - const bool is_checking_update() const { return m_check_update; } + bool is_checking_update() const { return m_check_update; } // number番のレスのヘッダノードのポインタを返す NODE* res_header( int number ); @@ -180,10 +180,10 @@ namespace DBTREE // 指定したID の重複数( = 発言数 ) // 下のget_num_id_name( int number )と違って検索するので遅い - const int get_num_id_name( const std::string& id ); + int get_num_id_name( const std::string& id ); // number番のID の重複数( = 発言数 ) - const int get_num_id_name( const int number ); + int get_num_id_name( const int number ); // 指定した発言者IDを持つレス番号をリストにして取得 std::list< int > get_res_id_name( const std::string& id_name ); @@ -252,7 +252,7 @@ namespace DBTREE const std::vector< char >& get_vec_posted(){ return m_vec_posted; } // 自分の書き込みにレスしたか - const bool is_refer_posted( const int number ); + bool is_refer_posted( const int number ); // 書き込みマークセット void set_posted( const int number, const bool set ); @@ -323,9 +323,9 @@ namespace DBTREE // m_buffer_write に作成した文字列をセットする void parse_write( const char* str, const int lng, const int max_lng_write ); - const bool check_anchor( const int mode, const char* str_in, int& n, char* str_out, char* str_link, int lng_link, ANCINFO* ancinfo ); - const int check_link( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link ); - const int check_link_impl( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link, const int linktype, const int delim_pos ); + bool check_anchor( const int mode, const char* str_in, int& n, char* str_out, char* str_link, int lng_link, ANCINFO* ancinfo ); + int check_link( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link ); + int check_link_impl( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link, const int linktype, const int delim_pos ); // レジューム時のチェックデータをキャッシュ void set_resume_data( const char* data, size_t length ); @@ -337,12 +337,12 @@ namespace DBTREE void update_abone( const int from_number, const int to_number ); // あぼーんチェック - const bool check_abone_res( const int number ); - const bool check_abone_id( const int number ); - const bool check_abone_name( const int number ); - const bool check_abone_mail( const int number ); - const bool check_abone_word( const int number ); - const bool check_abone_chain( const int number ); + bool check_abone_res( const int number ); + bool check_abone_id( const int number ); + bool check_abone_name( const int number ); + bool check_abone_mail( const int number ); + bool check_abone_word( const int number ); + bool check_abone_chain( const int number ); // number番のレスに含まれるレスアンカーをリストにして取得 @@ -394,7 +394,7 @@ namespace DBTREE // リンクが現れたかチェックして文字列を取得する関数 // (引数の値は、check_link_impl()を見ること) // - inline const int NodeTreeBase::check_link( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link ) + inline int NodeTreeBase::check_link( const char* str_in, const int lng_in, int& n_in, char* str_link, const int lng_link ) { // http://, https://, ftp://, ttp(s)://, tp(s):// のチェック int delim_pos = 0; diff --git a/src/dbtree/root.cpp b/src/dbtree/root.cpp index 781f59028..a38185f86 100644 --- a/src/dbtree/root.cpp +++ b/src/dbtree/root.cpp @@ -740,7 +740,7 @@ bool Root::set_board( const std::string& url, const std::string& name, const std // // (明示的に)板移転 // -const bool Root::move_board( const std::string& url_old, const std::string& url_new, const bool etc ) +bool Root::move_board( const std::string& url_old, const std::string& url_new, const bool etc ) { if( url_old == url_new ) return false; @@ -1543,7 +1543,7 @@ void Root::save_movetable() // // 2ch型のURLかどうか // -const bool Root::is_2ch( const std::string& url ) +bool Root::is_2ch( const std::string& url ) { const std::string hostname = MISC::get_hostname( url ); @@ -1559,7 +1559,7 @@ const bool Root::is_2ch( const std::string& url ) // // JBBS型のURLかどうか // -const bool Root::is_JBBS( const std::string& url ) +bool Root::is_JBBS( const std::string& url ) { const std::string hostname = MISC::get_hostname( url ); @@ -1574,7 +1574,7 @@ const bool Root::is_JBBS( const std::string& url ) // // まち型のURLかどうか // -const bool Root::is_machi( const std::string& url ) +bool Root::is_machi( const std::string& url ) { const std::string hostname = MISC::get_hostname( url ); @@ -1587,7 +1587,7 @@ const bool Root::is_machi( const std::string& url ) // // vipサービスのURLか // -const bool Root::is_vip2ch( const std::string& url ) +bool Root::is_vip2ch( const std::string& url ) { const std::string hostname = MISC::get_hostname( url ); @@ -1600,7 +1600,7 @@ const bool Root::is_vip2ch( const std::string& url ) // // ローカルファイルか // -const bool Root::is_local( const std::string& url ) +bool Root::is_local( const std::string& url ) { if( url.find( "file://" ) != std::string::npos ) return true; diff --git a/src/dbtree/root.h b/src/dbtree/root.h index 816586bfe..d2039702a 100644 --- a/src/dbtree/root.h +++ b/src/dbtree/root.h @@ -84,7 +84,7 @@ namespace DBTREE const XML::Document& xml_document() const { return m_xml_document; } // 板移転 - const bool move_board( const std::string& url_old, const std::string& url_new, const bool etc ); + bool move_board( const std::string& url_old, const std::string& url_new, const bool etc ); // 外部板情報取得 const std::list< DBTREE::ETCBOARDINFO >& get_etcboards() const { return m_etcboards; } @@ -197,11 +197,11 @@ namespace DBTREE void load_movetable(); // urlのタイプ判定 - const bool is_2ch( const std::string& url ); - const bool is_JBBS( const std::string& url ); - const bool is_machi( const std::string& url ); - const bool is_vip2ch( const std::string& url ); - const bool is_local( const std::string& url ); + bool is_2ch( const std::string& url ); + bool is_JBBS( const std::string& url ); + bool is_machi( const std::string& url ); + bool is_vip2ch( const std::string& url ); + bool is_local( const std::string& url ); }; } diff --git a/src/dbtree/settingloader.h b/src/dbtree/settingloader.h index 85cae56d9..072e34239 100644 --- a/src/dbtree/settingloader.h +++ b/src/dbtree/settingloader.h @@ -39,8 +39,8 @@ namespace DBTREE ~SettingLoader(); const std::string& default_noname() const { return m_default_noname; } - const int line_number() { return m_line_number; } - const int message_count() { return m_message_count; } + int line_number() { return m_line_number; } + int message_count() { return m_message_count; } const std::string& get_unicode() const { return m_unicode; } protected: diff --git a/src/dbtree/spchar_decoder.cpp b/src/dbtree/spchar_decoder.cpp index 4e000d72c..46fede117 100644 --- a/src/dbtree/spchar_decoder.cpp +++ b/src/dbtree/spchar_decoder.cpp @@ -13,7 +13,7 @@ #include -const bool check_spchar( const char* n_in, const char* spchar ) +bool check_spchar( const char* n_in, const char* spchar ) { int i = 0; while( spchar[ i ] != '\0' ){ @@ -37,7 +37,7 @@ const bool check_spchar( const char* n_in, const char* spchar ) // // 戻り値 : node.h で定義したノード番号 // -const int decode_char_number( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ) +int decode_char_number( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ) { int ret = DBTREE::NODE_TEXT; n_in = n_out = 0; @@ -86,7 +86,7 @@ const int decode_char_number( const char* in_char, int& n_in, char* out_char, i // // 戻り値 : node.h で定義したノード番号 // -const int DBTREE::decode_char( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ) +int DBTREE::decode_char( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ) { // 1文字目が&以外の場合は出力しない if( in_char[ 0 ] != '&' ){ diff --git a/src/dbtree/spchar_decoder.h b/src/dbtree/spchar_decoder.h index 9d01bdcea..a0549288c 100644 --- a/src/dbtree/spchar_decoder.h +++ b/src/dbtree/spchar_decoder.h @@ -18,7 +18,7 @@ namespace DBTREE // // 戻り値 : node.h で定義したノード番号 // - const int decode_char( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ); + int decode_char( const char* in_char, int& n_in, char* out_char, int& n_out, const bool only_check ); } #endif diff --git a/src/dndmanager.cpp b/src/dndmanager.cpp index 2e078f412..8a6d57da0 100644 --- a/src/dndmanager.cpp +++ b/src/dndmanager.cpp @@ -38,7 +38,7 @@ void CORE::DND_End() } -const bool CORE::DND_Now_dnd() +bool CORE::DND_Now_dnd() { CORE::DND_Manager* manager = CORE::get_dnd_manager(); if( manager ) return manager->now_dnd(); diff --git a/src/dndmanager.h b/src/dndmanager.h index 0a9ea83f6..ee58deeee 100644 --- a/src/dndmanager.h +++ b/src/dndmanager.h @@ -29,7 +29,7 @@ namespace CORE DND_Manager():m_dnd( false ){} virtual ~DND_Manager() noexcept {} - const bool now_dnd() const{ return m_dnd; } + bool now_dnd() const { return m_dnd; } // DnD 開始 void begin(){ m_dnd = true; } @@ -46,7 +46,7 @@ namespace CORE void DND_Begin(); void DND_End(); - const bool DND_Now_dnd(); + bool DND_Now_dnd(); } diff --git a/src/environment.cpp b/src/environment.cpp index 5aa933f07..7f7539011 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -512,7 +512,7 @@ std::string ENVIRONMENT::get_distname() // WM 判定 // TODO: 環境変数で判定できない場合の判定方法を考える // -const int ENVIRONMENT::get_wm() +int ENVIRONMENT::get_wm() { if( window_manager != WM_UNKNOWN ) return window_manager; diff --git a/src/environment.h b/src/environment.h index 97b0e5bec..2d24e6555 100644 --- a/src/environment.h +++ b/src/environment.h @@ -36,7 +36,7 @@ namespace ENVIRONMENT std::string get_jdversion(); std::string get_distname(); - const int get_wm(); + int get_wm(); std::string get_wm_str(); std::string get_gtkmm_version(); std::string get_glibmm_version(); diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index bef13f88f..f71f99a1d 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -461,7 +461,7 @@ void History_Manager::delete_viewhistory( const std::string& url ) // // 現在表示中のViewのURL( url_old) を新しいURL( url_new )に変更 // -const bool History_Manager::replace_current_url_viewhistory( const std::string& url_old, const std::string& url_new ) +bool History_Manager::replace_current_url_viewhistory( const std::string& url_old, const std::string& url_new ) { #ifdef _DEBUG std::cout << "History_Manager::replace_current_url_viewhistory\n" @@ -498,7 +498,7 @@ void History_Manager::replace_url_viewhistory( const std::string& url_old, const // // View履歴タイトル更新 // -const bool History_Manager::replace_current_title_viewhistory( const std::string& url, const std::string& title ) +bool History_Manager::replace_current_title_viewhistory( const std::string& url, const std::string& title ) { #ifdef _DEBUG std::cout << "History_Manager::replace_current_title_viewhistory\n" @@ -540,7 +540,7 @@ std::vector< ViewHistoryItem* >& History_Manager::get_items_forward_viewhistory( // // View履歴追加 // -const bool History_Manager::append_viewhistory( const std::string& url_current, const std::string& url_append ) +bool History_Manager::append_viewhistory( const std::string& url_current, const std::string& url_append ) { #ifdef _DEBUG std::cout << "History_Manager::append_viewhistory" << std::endl @@ -559,7 +559,7 @@ const bool History_Manager::append_viewhistory( const std::string& url_current, // // View履歴「戻る」可能 // -const bool History_Manager::can_back_viewhistory( const std::string& url, const int count ) +bool History_Manager::can_back_viewhistory( const std::string& url, const int count ) { ViewHistory* history = get_viewhistory( url ); if( ! history ) return false; @@ -571,7 +571,7 @@ const bool History_Manager::can_back_viewhistory( const std::string& url, const // // View履歴「進む」可能 // -const bool History_Manager::can_forward_viewhistory( const std::string& url, const int count ) +bool History_Manager::can_forward_viewhistory( const std::string& url, const int count ) { ViewHistory* history = get_viewhistory( url ); if( ! history ) return false; diff --git a/src/history/historymanager.h b/src/history/historymanager.h index 57859ec1d..44624934c 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -76,26 +76,26 @@ namespace HISTORY void delete_viewhistory( const std::string& url ); // 現在表示中のViewのURL( url_old) を新しいURL( url_new )に変更 - const bool replace_current_url_viewhistory( const std::string& url_old, const std::string& url_new ); + bool replace_current_url_viewhistory( const std::string& url_old, const std::string& url_new ); // 履歴全体で url_old を url_new に変更 void replace_url_viewhistory( const std::string& url_old, const std::string& url_new ); // タイトル更新 - const bool replace_current_title_viewhistory( const std::string& url, const std::string& title ); + bool replace_current_title_viewhistory( const std::string& url, const std::string& title ); // item の取得 std::vector< ViewHistoryItem* >& get_items_back_viewhistory( const std::string& url, const int count ); std::vector< ViewHistoryItem* >& get_items_forward_viewhistory( const std::string& url, const int count ); // 追加 - const bool append_viewhistory( const std::string& url_current, const std::string& url_append ); + bool append_viewhistory( const std::string& url_current, const std::string& url_append ); // 戻る / 進む // exec = true のときは履歴の位置を変更する // false の時はURLの取得のみ - const bool can_back_viewhistory( const std::string& url, const int count ); - const bool can_forward_viewhistory( const std::string& url, const int count ); + bool can_back_viewhistory( const std::string& url, const int count ); + bool can_forward_viewhistory( const std::string& url, const int count ); const ViewHistoryItem* back_viewhistory( const std::string& url, const int count, const bool exec ); const ViewHistoryItem* forward_viewhistory( const std::string& url, const int count, const bool exec ); diff --git a/src/history/historysubmenu.cpp b/src/history/historysubmenu.cpp index 67ee4020c..c04e62b1c 100644 --- a/src/history/historysubmenu.cpp +++ b/src/history/historysubmenu.cpp @@ -129,7 +129,7 @@ void HistorySubMenu::restore_history() // 履歴を開く -const bool HistorySubMenu::open_history( const int i ) +bool HistorySubMenu::open_history( const int i ) { bool ret = false; CORE::DATA_INFO_LIST info_list; diff --git a/src/history/historysubmenu.h b/src/history/historysubmenu.h index 773a05603..dff1ca892 100644 --- a/src/history/historysubmenu.h +++ b/src/history/historysubmenu.h @@ -36,7 +36,7 @@ namespace HISTORY private: - const bool open_history( const int i ); + bool open_history( const int i ); // メニューのslot関数 void slot_clear(); diff --git a/src/history/viewhistory.cpp b/src/history/viewhistory.cpp index f05b09532..0a3bfcd6a 100644 --- a/src/history/viewhistory.cpp +++ b/src/history/viewhistory.cpp @@ -203,7 +203,7 @@ std::vector< ViewHistoryItem* >& ViewHistory::get_items_forward( const int count // // 「戻る」可能 // -const bool ViewHistory::can_back( const int count ) +bool ViewHistory::can_back( const int count ) { if( count <= 0 ) return false; @@ -221,7 +221,7 @@ const bool ViewHistory::can_back( const int count ) // // 「進む」可能 // -const bool ViewHistory::can_forward( const int count ) +bool ViewHistory::can_forward( const int count ) { if( count <= 0 ) return false; diff --git a/src/history/viewhistory.h b/src/history/viewhistory.h index f0895ef9f..73476ff11 100644 --- a/src/history/viewhistory.h +++ b/src/history/viewhistory.h @@ -26,12 +26,12 @@ namespace HISTORY ViewHistory(); virtual ~ViewHistory(); - const int get_size() const { return m_items.size(); } + int get_size() const { return m_items.size(); } const ViewHistoryItem* get_item( const int pos ){ return m_items[ pos ]; } - const int get_top() const { return m_history_top; } - const int get_cur() const { return m_history_current; } - const int get_end() const { return m_history_end; } + int get_top() const { return m_history_top; } + int get_cur() const { return m_history_current; } + int get_end() const { return m_history_end; } void set_top( const int top ); void set_cur( const int cur ); @@ -52,8 +52,8 @@ namespace HISTORY std::vector< ViewHistoryItem* >& get_items_forward( const int count ); // 戻る / 進む 可能かの判定 - const bool can_back( const int count ); - const bool can_forward( const int count ); + bool can_back( const int count ); + bool can_forward( const int count ); // 追加 void append( const std::string& url ); diff --git a/src/image/imageadmin.cpp b/src/image/imageadmin.cpp index b88314416..ad74d23fc 100644 --- a/src/image/imageadmin.cpp +++ b/src/image/imageadmin.cpp @@ -1196,7 +1196,7 @@ std::list< bool > ImageAdmin::get_locked() // タブのロック/アンロック -const bool ImageAdmin::is_lockable( const int page ) +bool ImageAdmin::is_lockable( const int page ) { SKELETON::View* view = get_nth_icon( page ); if( view ) return view->is_lockable(); @@ -1204,7 +1204,7 @@ const bool ImageAdmin::is_lockable( const int page ) return false; } -const bool ImageAdmin::is_locked( const int page ) +bool ImageAdmin::is_locked( const int page ) { SKELETON::View* view = get_nth_icon( page ); if( view ) return view->is_locked(); diff --git a/src/image/imageadmin.h b/src/image/imageadmin.h index 39152233c..bed5806f2 100644 --- a/src/image/imageadmin.h +++ b/src/image/imageadmin.h @@ -85,8 +85,8 @@ namespace IMAGE std::list< bool > get_locked() override; // タブのロック/アンロック - const bool is_lockable( const int page ) override; - const bool is_locked( const int page ) override; + bool is_lockable( const int page ) override; + bool is_locked( const int page ) override; void lock( const int page ) override; void unlock( const int page ) override; diff --git a/src/image/imageareabase.cpp b/src/image/imageareabase.cpp index be5c7ddab..f40bf5fd3 100644 --- a/src/image/imageareabase.cpp +++ b/src/image/imageareabase.cpp @@ -180,7 +180,7 @@ void ImageAreaBase::load_image_thread() } -const bool ImageAreaBase::create_imgloader( const bool pixbufonly, std::string& errmsg ) +bool ImageAreaBase::create_imgloader( const bool pixbufonly, std::string& errmsg ) { m_imgloader = JDLIB::ImgLoader::get_loader( m_img->get_cache_path() ); bool ret = m_imgloader->load( pixbufonly ); diff --git a/src/image/imageareabase.h b/src/image/imageareabase.h index 80c3f51d2..1bf77348b 100644 --- a/src/image/imageareabase.h +++ b/src/image/imageareabase.h @@ -57,11 +57,11 @@ namespace IMAGE const std::string& get_url() const{ return m_url;} const std::string& get_errmsg() const{ return m_errmsg;} - const bool is_ready() const { return m_ready; } - const bool is_loading(){ return m_thread.is_running(); } + bool is_ready() const { return m_ready; } + bool is_loading(){ return m_thread.is_running(); } - const int get_width() const { return m_width; } - const int get_height() const { return m_height; } + int get_width() const { return m_width; } + int get_height() const { return m_height; } virtual void show_image() = 0; @@ -80,7 +80,7 @@ namespace IMAGE void load_image(); - const bool create_imgloader( const bool pixbufonly, std::string& errmsg ); + bool create_imgloader( const bool pixbufonly, std::string& errmsg ); private: diff --git a/src/image/imageareaicon.cpp b/src/image/imageareaicon.cpp index 468b23020..371d9e4de 100644 --- a/src/image/imageareaicon.cpp +++ b/src/image/imageareaicon.cpp @@ -137,12 +137,12 @@ void ImageAreaIcon::load_image_thread() // // インジケータ幅、高さ -const int ImageAreaIcon::width_indicator() +int ImageAreaIcon::width_indicator() { return MAX( 1, get_width()/4 ); } -const int ImageAreaIcon::height_indicator() +int ImageAreaIcon::height_indicator() { return MAX( 1, get_height()/4 ); } diff --git a/src/image/imageareaicon.h b/src/image/imageareaicon.h index ad92d4796..d4497b54c 100644 --- a/src/image/imageareaicon.h +++ b/src/image/imageareaicon.h @@ -40,8 +40,8 @@ namespace IMAGE private: - const int width_indicator(); - const int height_indicator(); + int width_indicator(); + int height_indicator(); void show_indicator( bool loading ); diff --git a/src/image/imageview.cpp b/src/image/imageview.cpp index 2da610c0f..91b82ae9d 100644 --- a/src/image/imageview.cpp +++ b/src/image/imageview.cpp @@ -556,7 +556,7 @@ void ImageViewMain::scroll_right() // // viewの操作 // -const bool ImageViewMain::operate_view( const int control ) +bool ImageViewMain::operate_view( const int control ) { // スクロールしたときはキャンセル if( m_scrolled ){ diff --git a/src/image/imageview.h b/src/image/imageview.h index 0da48342c..8551ede53 100644 --- a/src/image/imageview.h +++ b/src/image/imageview.h @@ -42,7 +42,7 @@ namespace IMAGE void scroll_left() override; void scroll_right() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; protected: diff --git a/src/image/imageviewbase.cpp b/src/image/imageviewbase.cpp index 5f49330ab..75dcaa672 100644 --- a/src/image/imageviewbase.cpp +++ b/src/image/imageviewbase.cpp @@ -403,7 +403,7 @@ void ImageViewBase::remove_imagearea() // // コマンド // -const bool ImageViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool ImageViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { if( command == "switch_icon" ) switch_icon(); else if( command == "update_status" ) update_status(); @@ -636,7 +636,7 @@ void ImageViewBase::clicked() // // viewの操作 // -const bool ImageViewBase::operate_view( const int control ) +bool ImageViewBase::operate_view( const int control ) { if( CONTROL::operate_common( control, get_url(), IMAGE::get_admin() ) ) return true; @@ -741,7 +741,7 @@ const bool ImageViewBase::operate_view( const int control ) // // キープレスイベント // -const bool ImageViewBase::slot_key_press( GdkEventKey* event ) +bool ImageViewBase::slot_key_press( GdkEventKey* event ) { #ifdef _DEBUG std::cout << "ImageViewBase::slot_key_press url = " << get_url() << std::endl; diff --git a/src/image/imageviewbase.h b/src/image/imageviewbase.h index 3ea020e1a..7d625ba20 100644 --- a/src/image/imageviewbase.h +++ b/src/image/imageviewbase.h @@ -59,10 +59,10 @@ namespace IMAGE void set_imagearea( ImageAreaBase* imagearea ); void remove_imagearea(); - const bool is_wait() const{ return m_wait; } + bool is_wait() const { return m_wait; } void set_wait( const bool wait ){ m_wait = wait; } - const bool is_loading() const override { return m_loading; } + bool is_loading() const override { return m_loading; } void set_loading( const bool loading ){ m_loading = loading; } Gtk::EventBox& get_event(){ return m_event; } @@ -72,7 +72,7 @@ namespace IMAGE ImageViewBase( const std::string& url, const std::string& arg1 = std::string(), const std::string& arg2 = std::string() ); ~ImageViewBase(); - const bool is_under_mouse() const { return m_under_mouse; } + bool is_under_mouse() const { return m_under_mouse; } // // SKELETON::View の関数のオーバロード @@ -84,19 +84,19 @@ namespace IMAGE Gtk::Window* get_parent_win() override; // キーを押した - const bool slot_key_press( GdkEventKey* event ) override; + bool slot_key_press( GdkEventKey* event ) override; // コマンド - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; void reload() override; void stop() override; void redraw_view() override; void close_view() override; void delete_view() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; void show_preference() override; protected: diff --git a/src/image/imageviewpopup.cpp b/src/image/imageviewpopup.cpp index e335da62b..4b3da8a99 100644 --- a/src/image/imageviewpopup.cpp +++ b/src/image/imageviewpopup.cpp @@ -350,7 +350,7 @@ void ImageViewPopup::close_view() // // viewの操作 // -const bool ImageViewPopup::operate_view( const int control ) +bool ImageViewPopup::operate_view( const int control ) { #ifdef _DEBUG std::cout << "ImageViewPopup::operate_view control = " << control << std::endl; diff --git a/src/image/imageviewpopup.h b/src/image/imageviewpopup.h index f295025a4..e5f90e41d 100644 --- a/src/image/imageviewpopup.h +++ b/src/image/imageviewpopup.h @@ -33,7 +33,7 @@ namespace IMAGE void stop() override; void show_view() override; void close_view() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; protected: diff --git a/src/image/imagewin.cpp b/src/image/imagewin.cpp index 36cf022b2..c3bedecd8 100644 --- a/src/image/imagewin.cpp +++ b/src/image/imagewin.cpp @@ -47,12 +47,12 @@ ImageWin::~ImageWin() } -const int ImageWin::get_x_win() +int ImageWin::get_x_win() { return SESSION::get_x_win_img(); } -const int ImageWin::get_y_win() +int ImageWin::get_y_win() { return SESSION::get_y_win_img(); } @@ -67,12 +67,12 @@ void ImageWin::set_y_win( const int y ) SESSION::set_y_win_img( y ); } -const int ImageWin::get_width_win() +int ImageWin::get_width_win() { return SESSION::get_width_win_img(); } -const int ImageWin::get_height_win() +int ImageWin::get_height_win() { return SESSION::get_height_win_img(); } @@ -87,7 +87,7 @@ void ImageWin::set_height_win( const int height ) SESSION::set_height_win_img( height ); } -const bool ImageWin::is_focus_win() +bool ImageWin::is_focus_win() { return SESSION::is_focus_win_img(); } @@ -98,7 +98,7 @@ void ImageWin::set_focus_win( const bool set ) } -const bool ImageWin::is_maximized_win() +bool ImageWin::is_maximized_win() { return SESSION::is_maximized_win_img(); } @@ -109,7 +109,7 @@ void ImageWin::set_maximized_win( const bool set ) } -const bool ImageWin::is_iconified_win() +bool ImageWin::is_iconified_win() { return SESSION::is_iconified_win_img(); } @@ -120,7 +120,7 @@ void ImageWin::set_iconified_win( const bool set ) } -const bool ImageWin::is_shown_win() +bool ImageWin::is_shown_win() { return SESSION::is_shown_win_img(); } diff --git a/src/image/imagewin.h b/src/image/imagewin.h index 534468de9..cdcecf355 100644 --- a/src/image/imagewin.h +++ b/src/image/imagewin.h @@ -28,29 +28,29 @@ namespace IMAGE void switch_admin() override; - const int get_x_win() override; - const int get_y_win() override; + int get_x_win() override; + int get_y_win() override; void set_x_win( const int x ) override; void set_y_win( const int y ) override; - const int get_width_win() override; - const int get_height_win() override; + int get_width_win() override; + int get_height_win() override; void set_width_win( const int width ) override; void set_height_win( const int height ) override; - const bool is_focus_win() override; + bool is_focus_win() override; void set_focus_win( const bool set ) override; - const bool is_maximized_win() override; + bool is_maximized_win() override; void set_maximized_win( const bool set ) override; - const bool is_iconified_win() override; + bool is_iconified_win() override; void set_iconified_win( const bool set ) override; - const bool is_full_win() override { return false; } + bool is_full_win() override { return false; } void set_full_win( const bool set ) override {} - const bool is_shown_win() override; + bool is_shown_win() override; void set_shown_win( const bool set ) override; }; } diff --git a/src/jdlib/confloader.cpp b/src/jdlib/confloader.cpp index ab9f75020..7030c0359 100644 --- a/src/jdlib/confloader.cpp +++ b/src/jdlib/confloader.cpp @@ -57,7 +57,7 @@ ConfLoader::ConfLoader( const std::string& file, std::string str_conf ) -const bool ConfLoader::empty() +bool ConfLoader::empty() { return !( m_data.size() ); } @@ -172,7 +172,7 @@ const std::string ConfLoader::get_option_str( const std::string& name, const std // // bool型 // -const bool ConfLoader::get_option_bool( const std::string& name, const bool dflt ) +bool ConfLoader::get_option_bool( const std::string& name, const bool dflt ) { std::string val_str = get_option_str( name, std::string() ); @@ -198,7 +198,7 @@ const bool ConfLoader::get_option_bool( const std::string& name, const bool dflt // // int 型 // -const int ConfLoader::get_option_int( const std::string& name, const int dflt, const int min, const int max ) +int ConfLoader::get_option_int( const std::string& name, const int dflt, const int min, const int max ) { std::string val_str = get_option_str( name, std::string() ); @@ -222,7 +222,7 @@ const int ConfLoader::get_option_int( const std::string& name, const int dflt, c // // double 型 // -const double ConfLoader::get_option_double( const std::string& name, const double dflt, const double min, const double max ) +double ConfLoader::get_option_double( const std::string& name, const double dflt, const double min, const double max ) { std::string val_str = get_option_str( name, std::string() ); diff --git a/src/jdlib/confloader.h b/src/jdlib/confloader.h index ca0323d7e..1004be903 100644 --- a/src/jdlib/confloader.h +++ b/src/jdlib/confloader.h @@ -34,8 +34,8 @@ namespace JDLIB // もしstr_confがemptyの時はfileから読み込む ConfLoader( const std::string& file, std::string str_conf ); - const bool empty(); - const bool is_broken(){ return m_broken; } + bool empty(); + bool is_broken(){ return m_broken; } // 保存 void save(); @@ -49,9 +49,9 @@ namespace JDLIB // 値取得 const std::string get_option_str( const std::string& name, const std::string& dflt, const size_t maxlength = 0 ); - const bool get_option_bool( const std::string& name, const bool dflt ); - const int get_option_int( const std::string& name, const int dflt, const int min, const int max ); - const double get_option_double( const std::string& name, const double dflt, const double min , const double max ); + bool get_option_bool( const std::string& name, const bool dflt ); + int get_option_int( const std::string& name, const int dflt, const int min, const int max ); + double get_option_double( const std::string& name, const double dflt, const double min , const double max ); }; } diff --git a/src/jdlib/hash_set.cpp b/src/jdlib/hash_set.cpp index 405d987be..27effafe1 100644 --- a/src/jdlib/hash_set.cpp +++ b/src/jdlib/hash_set.cpp @@ -51,7 +51,7 @@ void simple_hash_set::erase( const std::string& item ) } -const bool simple_hash_set::find_if( const std::string& item ) +bool simple_hash_set::find_if( const std::string& item ) { if( ! m_hash.size() ) return false; @@ -77,7 +77,7 @@ hash_set_thread::hash_set_thread() {} -const int hash_set_thread::get_key( const std::string& url ) +int hash_set_thread::get_key( const std::string& url ) { const int lng = DBTREE::url_datbase( url ).length(); diff --git a/src/jdlib/hash_set.h b/src/jdlib/hash_set.h index 7bbadd2ee..2a7ac4c38 100644 --- a/src/jdlib/hash_set.h +++ b/src/jdlib/hash_set.h @@ -23,16 +23,16 @@ namespace JDLIB simple_hash_set( const int hash_size ); virtual ~simple_hash_set(); - const int size() const { return m_hash_size; } + int size() const { return m_hash_size; } void clear(); void insert( const std::string& item ); void erase( const std::string& item ); - const bool find_if( const std::string& item ); + bool find_if( const std::string& item ); private: - virtual const int get_key( const std::string& item ) = 0; + virtual int get_key( const std::string& item ) = 0; }; @@ -48,7 +48,7 @@ namespace JDLIB private: - virtual const int get_key( const std::string& url ); + virtual int get_key( const std::string& url ); }; } diff --git a/src/jdlib/imgloader.cpp b/src/jdlib/imgloader.cpp index 05204097f..81bebb028 100644 --- a/src/jdlib/imgloader.cpp +++ b/src/jdlib/imgloader.cpp @@ -87,7 +87,7 @@ Glib::RefPtr< Gdk::PixbufAnimation > ImgLoader::get_animation() // 画像読み込み // 動画でpixbufonly = true の時はアニメーションさせない -const bool ImgLoader::load( const bool pixbufonly ) +bool ImgLoader::load( const bool pixbufonly ) { JDLIB::LockGuard lock( m_loader_lock ); return load_imgfile( pixbufonly ? LOADLEVEL_PIXBUFONLY : LOADLEVEL_NORMAL ); @@ -97,7 +97,7 @@ const bool ImgLoader::load( const bool pixbufonly ) /* create PixbufLoader ************************************/ // private, NOT thread safe -const bool ImgLoader::load_imgfile( const int loadlevel ) +bool ImgLoader::load_imgfile( const int loadlevel ) { if( m_loader ) { // キャッシュに読み込んだデータが十分かどうか diff --git a/src/jdlib/imgloader.h b/src/jdlib/imgloader.h index 9c49d119a..3c8e7588a 100644 --- a/src/jdlib/imgloader.h +++ b/src/jdlib/imgloader.h @@ -47,7 +47,7 @@ namespace JDLIB void request_stop(); - const bool load( const bool pixbufonly = false ); + bool load( const bool pixbufonly = false ); Glib::RefPtr get_pixbuf( const bool pixbufonly = false ); Glib::RefPtr get_animation(); @@ -55,7 +55,7 @@ namespace JDLIB private: ImgLoader( const std::string& file ); - const bool load_imgfile( const int loadlevel ); + bool load_imgfile( const int loadlevel ); void slot_size_prepared( int w, int h ); void slot_area_updated(int x, int y, int w, int h ); diff --git a/src/jdlib/jdregex.cpp b/src/jdlib/jdregex.cpp index 1eac1be6c..d6fa47bf3 100644 --- a/src/jdlib/jdregex.cpp +++ b/src/jdlib/jdregex.cpp @@ -52,7 +52,7 @@ void Regex::dispose() // newline : . に改行をマッチさせない // usemigemo : migemo使用 (コンパイルオプションで指定する必要あり) // wchar : 全角半角の区別をしない -const bool Regex::compile( const std::string reg, const bool icase, const bool newline, const bool use_migemo, const bool wchar ) +bool Regex::compile( const std::string reg, const bool icase, const bool newline, const bool use_migemo, const bool wchar ) { #ifdef _DEBUG if( wchar ){ @@ -122,7 +122,7 @@ const bool Regex::compile( const std::string reg, const bool icase, const bool n } -const bool Regex::exec( const std::string& target, const size_t offset ) +bool Regex::exec( const std::string& target, const size_t offset ) { regmatch_t pmatch[ REGEX_MAX_NMATCH ]; @@ -211,8 +211,8 @@ const bool Regex::exec( const std::string& target, const size_t offset ) // newline : . に改行をマッチさせない // usemigemo : migemo使用 (コンパイルオプションで指定する必要あり) // wchar : 全角半角の区別をしない -const bool Regex::exec( const std::string reg, const std::string& target, - const size_t offset, const bool icase, const bool newline, const bool use_migemo, const bool wchar ) +bool Regex::exec( const std::string reg, const std::string& target, + const size_t offset, const bool icase, const bool newline, const bool use_migemo, const bool wchar ) { if ( ! compile(reg, icase, newline, use_migemo, wchar ) ) return false; @@ -235,7 +235,7 @@ const std::string Regex::str( const size_t num ) } -const int Regex::pos( const size_t num ) +int Regex::pos( const size_t num ) { if( m_results.size() > num ) return m_pos[ num ]; diff --git a/src/jdlib/jdregex.h b/src/jdlib/jdregex.h index 57c74212b..afb9c7921 100644 --- a/src/jdlib/jdregex.h +++ b/src/jdlib/jdregex.h @@ -44,14 +44,14 @@ namespace JDLIB // newline : . に改行をマッチさせない // usemigemo : migemo使用 (コンパイルオプションで指定する必要あり) // wchar : 全角半角の区別をしない - const bool compile( const std::string reg - , const bool icase, const bool newline, const bool usemigemo, const bool wchar ); + bool compile( const std::string reg, const bool icase, const bool newline, const bool usemigemo, + const bool wchar ); - const bool exec( const std::string& target, const size_t offset ); - const bool exec( const std::string reg, const std::string& target, const size_t offset - , const bool icase, const bool newline, const bool usemigemo, const bool wchar ); + bool exec( const std::string& target, const size_t offset ); + bool exec( const std::string reg, const std::string& target, const size_t offset, const bool icase, + const bool newline, const bool usemigemo, const bool wchar ); - const int pos( const size_t num ); + int pos( const size_t num ); const std::string str( const size_t num ); }; } diff --git a/src/jdlib/jdthread.cpp b/src/jdlib/jdthread.cpp index 00e5e93e2..56f539e7c 100644 --- a/src/jdlib/jdthread.cpp +++ b/src/jdlib/jdthread.cpp @@ -56,7 +56,7 @@ void Thread::slot_wrapper( STARTFUNC func, void* arg ) // スレッド作成 -const bool Thread::create( STARTFUNC func , void* arg, const bool detach, const int stack_kbyte ) +bool Thread::create( STARTFUNC func , void* arg, const bool detach, const int stack_kbyte ) { if( JDTH_ISRUNNING( m_thread ) ){ MISC::ERRMSG( "Thread::create : thread is already running" ); @@ -146,7 +146,7 @@ const bool Thread::create( STARTFUNC func , void* arg, const bool detach, const } -const bool Thread::join() +bool Thread::join() { if( ! JDTH_ISRUNNING( m_thread ) ) return true; diff --git a/src/jdlib/jdthread.h b/src/jdlib/jdthread.h index 1e4fe52ec..feaca2916 100644 --- a/src/jdlib/jdthread.h +++ b/src/jdlib/jdthread.h @@ -54,12 +54,12 @@ namespace JDLIB Thread(); virtual ~Thread(); - const bool is_running() const { return JDTH_ISRUNNING( m_thread ); } + bool is_running() const { return JDTH_ISRUNNING( m_thread ); } // スレッド作成 - const bool create( STARTFUNC func , void * arg, const bool detach, const int stack_kbyte = DEFAULT_STACKSIZE ); + bool create( STARTFUNC func , void * arg, const bool detach, const int stack_kbyte = DEFAULT_STACKSIZE ); - const bool join(); + bool join(); }; } diff --git a/src/jdlib/loader.cpp b/src/jdlib/loader.cpp index 72beacd00..3735ea88b 100644 --- a/src/jdlib/loader.cpp +++ b/src/jdlib/loader.cpp @@ -76,11 +76,11 @@ bool initialized_loader = false; namespace JDLIB { - const bool get_token( JDLIB::Loader* loader ); + bool get_token( JDLIB::Loader* loader ); void return_token( JDLIB::Loader* loader ); void push_loader_queue( JDLIB::Loader* loader ); - const bool remove_loader_queue( JDLIB::Loader* loader ); + bool remove_loader_queue( JDLIB::Loader* loader ); void pop_loader_queue(); } @@ -94,7 +94,7 @@ bool disable_pop = false; // トークン取得 -const bool JDLIB::get_token( JDLIB::Loader* loader ) +bool JDLIB::get_token( JDLIB::Loader* loader ) { JDLIB::LockGuard lock( mutex_token ); @@ -166,7 +166,7 @@ void JDLIB::push_loader_queue( JDLIB::Loader* loader ) // キューから Loader を取り除いたらtrueを返す -const bool JDLIB::remove_loader_queue( JDLIB::Loader* loader ) +bool JDLIB::remove_loader_queue( JDLIB::Loader* loader ) { JDLIB::LockGuard lock( mutex_queue ); @@ -565,7 +565,7 @@ void* Loader::launcher( void* dat ) } -const bool Loader::send_connect( const int soc, std::string& errmsg ) +bool Loader::send_connect( const int soc, std::string& errmsg ) { std::string authority; std::string msg_send; @@ -1183,7 +1183,7 @@ const std::string Loader::create_msg_send() // buf : ヘッダが取り除かれたデータ // readsize: 出力データサイズ // -const int Loader::receive_header( char* buf, size_t& read_size ) +int Loader::receive_header( char* buf, size_t& read_size ) { #ifdef _DEBUG std::cout << "Loader::receive_header : read_size = " << read_size << std::endl; @@ -1686,7 +1686,7 @@ bool Loader::unzip( char* buf, size_t& read_size ) // // sent, recv待ち // -const bool Loader::wait_recv_send( const int fd, const bool recv ) +bool Loader::wait_recv_send( const int fd, const bool recv ) { if( !fd ) return true; diff --git a/src/jdlib/loader.h b/src/jdlib/loader.h index 58f091145..f061bb7eb 100644 --- a/src/jdlib/loader.h +++ b/src/jdlib/loader.h @@ -84,14 +84,14 @@ namespace JDLIB Loader( const bool low_priority ); ~Loader(); - const bool is_loading() const { return m_loading; } + bool is_loading() const { return m_loading; } const LOADERDATA& data() const { return m_data; } bool run( SKELETON::Loadable* cb, const LOADERDATA& data_in ); void wait(); void stop(); - const bool get_low_priority() const { return m_low_priority; } + bool get_low_priority() const { return m_low_priority; } void create_thread(); @@ -103,14 +103,14 @@ namespace JDLIB void run_main(); struct addrinfo* get_addrinfo( const std::string& hostname, const int port ); const std::string create_msg_send(); - const bool wait_recv_send( const int fd, const bool recv ); - const bool send_connect( const int soc, std::string& errmsg ); + bool wait_recv_send( const int fd, const bool recv ); + bool send_connect( const int soc, std::string& errmsg ); // ローディング終了処理 void finish_loading(); // ヘッダ用 - const int receive_header( char* buf, size_t& read_size ); + int receive_header( char* buf, size_t& read_size ); bool analyze_header(); std::string analyze_header_option( const std::string& option ); std::list< std::string > analyze_header_option_list( const std::string& option ); diff --git a/src/jdlib/misctime.cpp b/src/jdlib/misctime.cpp index 1c078e5ef..7cb7334ab 100644 --- a/src/jdlib/misctime.cpp +++ b/src/jdlib/misctime.cpp @@ -55,7 +55,7 @@ const std::string MISC::timevaltostr( const struct timeval& tv ) // // 時刻を紀元からの経過秒に直す // -const time_t MISC::datetotime( const std::string& date ) +time_t MISC::datetotime( const std::string& date ) { if( date.empty() ) return 0; @@ -222,7 +222,7 @@ void MISC::start_measurement( const int id ) gettimeofday( &tv_measurement[ id ], NULL ); } -const int MISC::measurement( const int id ) +int MISC::measurement( const int id ) { if( id >= (int)tv_measurement.size() ) return 0; diff --git a/src/jdlib/misctime.h b/src/jdlib/misctime.h index c97e744d6..b1164877f 100644 --- a/src/jdlib/misctime.h +++ b/src/jdlib/misctime.h @@ -33,7 +33,7 @@ namespace MISC // 時刻の文字列を紀元からの経過秒に直す // (例) Tue, 27 Dec 2005 14:28:10 GMT -> 1135693690 - const time_t datetotime( const std::string& date ); + time_t datetotime( const std::string& date ); // time_t を月日の文字列に変換 // (例) mode == TIME_NORMAL なら 1135785252 -> 2005/12/29 0:54 @@ -41,7 +41,7 @@ namespace MISC // 実行時間測定用 void start_measurement( const int id ); - const int measurement( const int id ); + int measurement( const int id ); } #endif diff --git a/src/jdlib/miscutil.cpp b/src/jdlib/miscutil.cpp index 310263e5d..c9da4c0e7 100644 --- a/src/jdlib/miscutil.cpp +++ b/src/jdlib/miscutil.cpp @@ -509,7 +509,7 @@ const std::string MISC::recover_quot( const std::string& str ) // // str 中に含まれている str2 の 数を返す // -const int MISC::count_str( const std::string& str, const std::string& str2 ) +int MISC::count_str( const std::string& str, const std::string& str2 ) { int count = 0; size_t found, pos = 0; @@ -527,7 +527,7 @@ const int MISC::count_str( const std::string& str, const std::string& str2 ) // // str 中に含まれている chr の 数を返す // -const int MISC::count_chr( const std::string& str, const char chr ) +int MISC::count_chr( const std::string& str, const char chr ) { int count = 0; const int size = str.size(); @@ -550,7 +550,7 @@ const int MISC::count_chr( const std::string& str, const char chr ) // // 戻り値: 数値 // -const int MISC::str_to_uint( const char* str, size_t& dig, size_t& n ) +int MISC::str_to_uint( const char* str, size_t& dig, size_t& n ) { int out = 0; dig = 0; @@ -644,7 +644,7 @@ const std::string MISC::intlisttostr( const std::list< int >& list_num ) // 出力 : char_out // 戻り値: 変換に成功した chr_in のバイト数 // -const size_t MISC::chrtobin( const char* chr_in, char* chr_out ) +size_t MISC::chrtobin( const char* chr_in, char* chr_out ) { if( ! chr_in ) return 0; @@ -705,7 +705,7 @@ const std::string MISC::cut_str( const std::string& str, const unsigned int maxs #define REGEX_METACHARS ".+*?^$|{}[]()\\" -const bool MISC::has_regex_metachar( const std::string& str, const bool escape ) +bool MISC::has_regex_metachar( const std::string& str, const bool escape ) { const char metachars[] = REGEX_METACHARS; const size_t str_length = str.length(); @@ -948,7 +948,7 @@ const std::string MISC::html_unescape( const std::string& str ) // 戻り値 : スキームタイプ // length : "http://"等の文字数 // -const int MISC::is_url_scheme_impl( const char* str_in, int* length ) +int MISC::is_url_scheme_impl( const char* str_in, int* length ) { int scheme = SCHEME_NONE; int len = 0; @@ -1030,7 +1030,7 @@ static const char s_url_char[ 128 ] = { // p q r s t u v w x y z { | } ~ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 0, }; -const bool MISC::is_url_char( const char* str_in, const bool loose_url ) +bool MISC::is_url_char( const char* str_in, const bool loose_url ) { unsigned char c = (unsigned char)(*str_in); @@ -1259,7 +1259,7 @@ const std::string MISC::Iconv( const std::string& str, const std::string& coding // // 例 : ✏ なら 戻り値 = 4、 offset = 2 // -const int MISC::spchar_number_ln( const char* in_char, int& offset ) +int MISC::spchar_number_ln( const char* in_char, int& offset ) { int lng = 0; offset = 2; @@ -1316,7 +1316,7 @@ const int MISC::spchar_number_ln( const char* in_char, int& offset ) // // 戻り値 : 「&#数字;」の中の数字(int型) // -const int MISC::decode_spchar_number( const char* in_char, const int offset, const int lng ) +int MISC::decode_spchar_number( const char* in_char, const int offset, const int lng ) { char str_num[ 16 ]; @@ -1382,7 +1382,7 @@ const std::string MISC::decode_spchar_number( const std::string& str ) // // 戻り値 : ucs2 // -const int MISC::utf8toucs2( const char* utfstr, int& byte ) +int MISC::utf8toucs2( const char* utfstr, int& byte ) { int ucs2 = 0; byte = 0; @@ -1435,7 +1435,7 @@ const int MISC::utf8toucs2( const char* utfstr, int& byte ) // // 戻り値 : バイト数 // -const int MISC::ucs2toutf8( const int ucs2, char* utfstr ) +int MISC::ucs2toutf8( const int ucs2, char* utfstr ) { int byte = 0; @@ -1473,7 +1473,7 @@ const int MISC::ucs2toutf8( const int ucs2, char* utfstr ) // // ucs2 の種類 // -const int MISC::get_ucs2mode( const int ucs2 ) +int MISC::get_ucs2mode( const int ucs2 ) { if( ucs2 >= 0x0000 && ucs2 <= 0x007f ) return UCS2MODE_BASIC_LATIN; if( ucs2 >= 0x3040 && ucs2 <= 0x309f ) return UCS2MODE_HIRA; @@ -1686,7 +1686,7 @@ std::vector< std::string > MISC::recover_path( std::vector< std::string >&& list // // 文字列(utf-8)に全角英数字が含まれるか判定する // -const bool MISC::has_widechar( const char* str ) +bool MISC::has_widechar( const char* str ) { while( *str != '\0' ){ diff --git a/src/jdlib/miscutil.h b/src/jdlib/miscutil.h index 2f80cb630..3b3d60622 100644 --- a/src/jdlib/miscutil.h +++ b/src/jdlib/miscutil.h @@ -108,10 +108,10 @@ namespace MISC const std::string recover_quot( const std::string& str ); // str 中に含まれている str2 の 数を返す - const int count_str( const std::string& str, const std::string& str2 ); + int count_str( const std::string& str, const std::string& str2 ); // str 中に含まれている chr の 数を返す - const int count_chr( const std::string& str, const char chr ); + int count_chr( const std::string& str, const char chr ); // 文字列(utf-8も) -> 整数変換 // (例) "123" -> 123 @@ -120,7 +120,7 @@ namespace MISC // dig: 桁数、0なら失敗 // n : str から何バイト読み取ったか // 戻り値: 数値 - const int str_to_uint( const char* str, size_t& dig, size_t& n ); + int str_to_uint( const char* str, size_t& dig, size_t& n ); // 数字 -> 文字変換 const std::string itostr( const int n ); @@ -131,14 +131,14 @@ namespace MISC // 16進数表記文字をバイナリに変換する( 例 "E38182" -> 0xE38182 ) // 出力 : char_out // 戻り値: 変換に成功した chr_in のバイト数 - const size_t chrtobin( const char* chr_in, char* chr_out ); + size_t chrtobin( const char* chr_in, char* chr_out ); // strが半角でmaxsize文字を超えたらカットして後ろに...を付ける const std::string cut_str( const std::string& str, const unsigned int maxsize ); // 正規表現のメタ文字が含まれているか // escape == true ならエスケープを考慮 (例) escape == true なら \+ → \+ のまま、falseなら \+ → \\\+ - const bool has_regex_metachar( const std::string& str, const bool escape ); + bool has_regex_metachar( const std::string& str, const bool escape ); // 正規表現のメタ文字をエスケープ // escape == true ならエスケープを考慮 (例) escape == true なら \+ → \+ のまま、falseなら \+ → \\\+ @@ -157,8 +157,8 @@ namespace MISC // URL中のスキームを判別する // 戻り値 : スキームタイプ // length : "http://"等の文字数 - const int is_url_scheme( const char* str_in, int* length = NULL ); - const int is_url_scheme_impl( const char* str_in, int* length ); + int is_url_scheme( const char* str_in, int* length = NULL ); + int is_url_scheme_impl( const char* str_in, int* length ); // URLとして扱う文字かどうか判別する // 基本 : 「!#$%&'()*+,-./0-9:;=?@A-Z_a-z~」 @@ -166,7 +166,7 @@ namespace MISC // // "RFC 3986" : http://www.ietf.org/rfc/rfc3986.txt // "RFC 2396" : http://www.ietf.org/rfc/rfc2396.txt - const bool is_url_char( const char* str_in, const bool loose_url ); + bool is_url_char( const char* str_in, const bool loose_url ); // URLデコード const std::string url_decode( const std::string& url ); @@ -199,7 +199,7 @@ namespace MISC // // 例 : ✏ なら 戻り値 = 4、 offset = 2 // - const int spchar_number_ln( const char* in_char, int& offset ); + int spchar_number_ln( const char* in_char, int& offset ); // 「&#数字;」形式の数字参照文字列を数字(int)に変換する // @@ -211,7 +211,7 @@ namespace MISC // // 戻り値 : 「&#数字;」の中の数字(int型) // - const int decode_spchar_number( const char* in_char, const int offset, const int lng ); + int decode_spchar_number( const char* in_char, const int offset, const int lng ); // str に含まれる「&#数字;」形式の数字参照文字列を全てユニーコード文字に変換する const std::string decode_spchar_number( const std::string& str ); @@ -220,15 +220,15 @@ namespace MISC // 入力 : utfstr 入力文字 (UTF-8) // 出力 : byte 長さ(バイト) utfstr が ascii なら 1, UTF-8 なら 2 or 3 or 4 を入れて返す // 戻り値 : ucs2 - const int utf8toucs2( const char* utfstr, int& byte ); + int utf8toucs2( const char* utfstr, int& byte ); // ucs2 の種類 - const int get_ucs2mode( const int ucs2 ); + int get_ucs2mode( const int ucs2 ); // ucs2 -> utf8 変換 // 出力 : utfstr 変換後の文字 // 戻り値 : バイト数 - const int ucs2toutf8( const int ucs2, char* utfstr ); + int ucs2toutf8( const int ucs2, char* utfstr ); // WAVEDASHなどのWindows系UTF-8文字をUnix系文字と相互変換 const std::string utf8_fix_wavedash( const std::string& str, const int mode ); @@ -260,7 +260,7 @@ namespace MISC std::vector< std::string > recover_path( std::vector< std::string >&& list_str ); // 文字列(utf-8)に全角英数字が含まれるか判定する - const bool has_widechar( const char* str ); + bool has_widechar( const char* str ); // 全角英数字(str1) -> 半角英数字(str2) // table_pos : 置き換えた文字列の位置 @@ -269,7 +269,7 @@ namespace MISC // URL中のスキームを判別する - inline const int is_url_scheme( const char* str_in, int* length ) + inline int is_url_scheme( const char* str_in, int* length ) { // 候補になり得ない場合は以降の処理はしない if( *str_in != 'h' && *str_in != 'f' && *str_in != 't' && *str_in != 's' ) diff --git a/src/jdlib/ssl.cpp b/src/jdlib/ssl.cpp index a9107d759..1c31888ad 100644 --- a/src/jdlib/ssl.cpp +++ b/src/jdlib/ssl.cpp @@ -53,7 +53,7 @@ JDSSL::~JDSSL() } -const bool JDSSL::connect( const int soc, const char *host ) +bool JDSSL::connect( const int soc, const char *host ) { #ifdef _DEBUG std::cout << "JDSSL::connect(gnutls)\n"; @@ -105,7 +105,7 @@ const bool JDSSL::connect( const int soc, const char *host ) } -const bool JDSSL::close() +bool JDSSL::close() { #ifdef _DEBUG std::cout << "JDSSL::close(gnutlsl)\n"; @@ -125,7 +125,7 @@ const bool JDSSL::close() } -const int JDSSL::write( const char* buf, const size_t bufsize ) +int JDSSL::write( const char* buf, const size_t bufsize ) { int tmpsize = gnutls_record_send( m_session, buf, bufsize ); if( tmpsize < 0 ) m_errmsg = "gnutls_record_send failed"; @@ -134,7 +134,7 @@ const int JDSSL::write( const char* buf, const size_t bufsize ) } -const int JDSSL::read( char* buf, const size_t bufsize ) +int JDSSL::read( char* buf, const size_t bufsize ) { int tmpsize = gnutls_record_recv( m_session, buf, bufsize ); if( tmpsize < 0 ) m_errmsg = "gnutls_record_recv failed"; @@ -181,7 +181,7 @@ JDSSL::~JDSSL() } -const bool JDSSL::connect( const int soc, const char *host ) +bool JDSSL::connect( const int soc, const char *host ) { #ifdef _DEBUG std::cout << "JDSSL::connect(openssl)\n"; @@ -223,7 +223,7 @@ const bool JDSSL::connect( const int soc, const char *host ) } -const bool JDSSL::close() +bool JDSSL::close() { #ifdef _DEBUG std::cout << "JDSSL::close(openssl)\n"; @@ -243,7 +243,7 @@ const bool JDSSL::close() } -const int JDSSL::write( const char* buf, const size_t bufsize ) +int JDSSL::write( const char* buf, const size_t bufsize ) { int tmpsize = SSL_write( m_ssl, buf, bufsize ); if( tmpsize < 0 ) m_errmsg = "SSL_write failed"; @@ -252,7 +252,7 @@ const int JDSSL::write( const char* buf, const size_t bufsize ) } -const int JDSSL::read( char* buf, const size_t bufsize ) +int JDSSL::read( char* buf, const size_t bufsize ) { int tmpsize = SSL_read( m_ssl, buf, bufsize ); if( tmpsize < 0 ) m_errmsg = "SSL_read failed"; diff --git a/src/jdlib/ssl.h b/src/jdlib/ssl.h index a458c5026..3ee5cc60b 100644 --- a/src/jdlib/ssl.h +++ b/src/jdlib/ssl.h @@ -50,11 +50,11 @@ namespace JDLIB const std::string& get_errmsg(){ return m_errmsg; } - const bool connect( const int soc, const char* host ); - const bool close(); + bool connect( const int soc, const char* host ); + bool close(); - const int write( const char* buf, const size_t bufsize ); - const int read( char* buf, const size_t bufsize ); + int write( const char* buf, const size_t bufsize ); + int read( char* buf, const size_t bufsize ); }; void init_ssl(); diff --git a/src/jdlib/tfidf.cpp b/src/jdlib/tfidf.cpp index 4c8c9ced7..f3cfd7cef 100755 --- a/src/jdlib/tfidf.cpp +++ b/src/jdlib/tfidf.cpp @@ -123,7 +123,7 @@ void MISC::tfidf_calc_vec_tfifd( VEC_TFIDF& vec_tfidf, const Glib::ustring& docu // // 相関計算 // -const double MISC::tfidf_cos_similarity( const VEC_TFIDF& vec_tfidf1, const VEC_TFIDF& vec_tfidf2 ) +double MISC::tfidf_cos_similarity( const VEC_TFIDF& vec_tfidf1, const VEC_TFIDF& vec_tfidf2 ) { const int n = vec_tfidf1.size(); @@ -202,8 +202,8 @@ void MISC::tfidf_create_vec_idf_from_board( VEC_IDF& vec_idf, // str1 と str2 間のレーベンシュタイン距離 -const double MISC::leven( std::vector< std::vector< int > >& dist, - const Glib::ustring& str1, const Glib::ustring& str2 ) +double MISC::leven( std::vector< std::vector< int > >& dist, + const Glib::ustring& str1, const Glib::ustring& str2 ) { const size_t maxlng = dist.size() -1; const size_t lng1 = MIN( maxlng, str1.length() ); diff --git a/src/jdlib/tfidf.h b/src/jdlib/tfidf.h index 370e4f053..c44089989 100644 --- a/src/jdlib/tfidf.h +++ b/src/jdlib/tfidf.h @@ -34,7 +34,7 @@ namespace MISC const VEC_IDF& vec_idf, const VEC_WORDS& vec_words ); // tfidf1 と tfidf2 の相関計算 - const double tfidf_cos_similarity( const VEC_TFIDF& vec_tfidf1, const VEC_TFIDF& vec_tfidf2 ); + double tfidf_cos_similarity( const VEC_TFIDF& vec_tfidf1, const VEC_TFIDF& vec_tfidf2 ); // スレ一覧からIDF 計算 void tfidf_create_vec_idf_from_board( VEC_IDF& vec_idf, @@ -43,8 +43,8 @@ namespace MISC // str1 と str2 間のレーベンシュタイン距離 // スレ一覧を使用できない場合に使う - const double leven( std::vector< std::vector< int > >& dist, - const Glib::ustring& str1, const Glib::ustring& str2 ); + double leven( std::vector< std::vector< int > >& dist, + const Glib::ustring& str1, const Glib::ustring& str2 ); } #endif diff --git a/src/linkfiltermanager.cpp b/src/linkfiltermanager.cpp index 96522fd57..79fa06c22 100644 --- a/src/linkfiltermanager.cpp +++ b/src/linkfiltermanager.cpp @@ -123,7 +123,7 @@ void Linkfilter_Manager::save_xml() // // 実行したら true を返す // -const bool Linkfilter_Manager::exec( const std::string& url, const std::string& link, const std::string& selection ) +bool Linkfilter_Manager::exec( const std::string& url, const std::string& link, const std::string& selection ) { if( ! m_list_cmd.size() ) return false; diff --git a/src/linkfiltermanager.h b/src/linkfiltermanager.h index c8046c4b7..238fcd0ac 100644 --- a/src/linkfiltermanager.h +++ b/src/linkfiltermanager.h @@ -33,7 +33,7 @@ namespace CORE // 実行 // 実行したら true を返す - const bool exec( const std::string& url, const std::string& link, const std::string& selection ); + bool exec( const std::string& url, const std::string& link, const std::string& selection ); private: diff --git a/src/message/logmanager.cpp b/src/message/logmanager.cpp index 4b5efd374..e678458c1 100644 --- a/src/message/logmanager.cpp +++ b/src/message/logmanager.cpp @@ -80,7 +80,7 @@ Log_Manager::~Log_Manager() -const bool Log_Manager::has_items( const std::string& url, const bool newthread ) +bool Log_Manager::has_items( const std::string& url, const bool newthread ) { if( ! m_logitems.size() ) return false; @@ -170,7 +170,7 @@ void Log_Manager::remove_items( const std::string& url ) // // headsize > 0 の時は先頭の headsize 文字だけを比較 // -const bool Log_Manager::check_write( const std::string& url, const bool newthread, const char* msg_in, const size_t headsize ) +bool Log_Manager::check_write( const std::string& url, const bool newthread, const char* msg_in, const size_t headsize ) { if( ! m_logitems.size() ) return false; @@ -376,7 +376,7 @@ const std::string Log_Manager::get_post_log( const int num ) // // ログファイル( log/postlog-* ) の最大数 // -const int Log_Manager::get_max_num_of_log() +int Log_Manager::get_max_num_of_log() { #ifdef _DEBUG std::cout << "Log_Manager::get_max_num_of_log\n"; diff --git a/src/message/logmanager.h b/src/message/logmanager.h index a1636ecc2..54c071f02 100644 --- a/src/message/logmanager.h +++ b/src/message/logmanager.h @@ -23,14 +23,14 @@ namespace MESSAGE Log_Manager(); virtual ~Log_Manager(); - const int size() const { return m_logitems.size(); } - const bool has_items( const std::string& url, const bool newthread ); + int size() const { return m_logitems.size(); } + bool has_items( const std::string& url, const bool newthread ); void remove_items( const std::string& url ); // messageが自分の書き込んだものかチェックする // newthread == true の時は新スレの>>1のチェック // headsize > 0 の時は先頭の headsize 文字だけを比較 - const bool check_write( const std::string& url, const bool newthread, const char* msg_in, const size_t headsize ); + bool check_write( const std::string& url, const bool newthread, const char* msg_in, const size_t headsize ); // 自分の書き込みの判定用データの保存 void push_logitem( const std::string& url, const bool newthread, const std::string& msg ); @@ -43,7 +43,7 @@ namespace MESSAGE const std::string get_post_log( const int num ); // ログファイル( log/postlog-* ) の最大数 - const int get_max_num_of_log(); + int get_max_num_of_log(); // ログ削除 void clear_post_log(); diff --git a/src/message/messageadmin.cpp b/src/message/messageadmin.cpp index 0b4fc6c8e..f6dc319fc 100644 --- a/src/message/messageadmin.cpp +++ b/src/message/messageadmin.cpp @@ -370,7 +370,7 @@ void MessageAdmin::show_toolbar() // // 破棄する場合はtrueが戻る // -const bool MessageAdmin::delete_message( SKELETON::View * view ) +bool MessageAdmin::delete_message( SKELETON::View * view ) { if( ! CONFIG::get_show_savemsgdiag() ) return true; diff --git a/src/message/messageadmin.h b/src/message/messageadmin.h index 042621467..0bd7083ec 100644 --- a/src/message/messageadmin.h +++ b/src/message/messageadmin.h @@ -62,7 +62,7 @@ namespace MESSAGE private: - const bool delete_message( SKELETON::View * view ); + bool delete_message( SKELETON::View * view ); // 復元をしない void restore( const bool only_locked ) override {} diff --git a/src/message/messageviewbase.cpp b/src/message/messageviewbase.cpp index 55e067f55..11623bae5 100644 --- a/src/message/messageviewbase.cpp +++ b/src/message/messageviewbase.cpp @@ -255,7 +255,7 @@ const Glib::ustring MessageViewBase::get_message() // ロード中 // // virtual -const bool MessageViewBase::is_loading() const +bool MessageViewBase::is_loading() const { if( ! m_post ) return false; @@ -266,7 +266,7 @@ const bool MessageViewBase::is_loading() const // // コマンド // -const bool MessageViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) +bool MessageViewBase::set_command( const std::string& command, const std::string& arg1, const std::string& arg2 ) { if( command == "empty" ) return get_message().empty(); @@ -532,7 +532,7 @@ void MessageViewBase::focus_view() // // viewの操作 // -const bool MessageViewBase::operate_view( const int control ) +bool MessageViewBase::operate_view( const int control ) { if( control == CONTROL::None ) return false; @@ -697,7 +697,7 @@ void MessageViewBase::toggle_preview() // // テキストビューでキーを押した // -const bool MessageViewBase::slot_key_press( GdkEventKey* event ) +bool MessageViewBase::slot_key_press( GdkEventKey* event ) { #ifdef _DEBUG_KEY guint key = event->keyval; diff --git a/src/message/messageviewbase.h b/src/message/messageviewbase.h index 540cf6ab8..ddee514e9 100644 --- a/src/message/messageviewbase.h +++ b/src/message/messageviewbase.h @@ -94,18 +94,18 @@ namespace MESSAGE const std::string url_for_copy() override; // コマンド - const bool set_command( const std::string& command, - const std::string& arg1 = {}, - const std::string& arg2 = {} ) override; + bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) override; // ロード中 - const bool is_loading() const override; + bool is_loading() const override; // 規制中や行数や文字列がオーバーして書き込めない - const bool is_broken() override { return ( ! m_str_pass.empty() || m_over_lines || m_over_lng ); } + bool is_broken() override { return ( ! m_str_pass.empty() || m_over_lines || m_over_lng ); } // キーを押した - const bool slot_key_press( GdkEventKey* event ) override; + bool slot_key_press( GdkEventKey* event ) override; void clock_in() override; void write() override; @@ -114,7 +114,7 @@ namespace MESSAGE void close_view() override; void redraw_view() override; void focus_view() override; - const bool operate_view( const int control ) override; + bool operate_view( const int control ) override; private: diff --git a/src/message/messagewin.cpp b/src/message/messagewin.cpp index b1d0c3e70..ae17b7f64 100644 --- a/src/message/messagewin.cpp +++ b/src/message/messagewin.cpp @@ -59,12 +59,12 @@ bool MessageWin::on_delete_event( GdkEventAny* event ) } -const int MessageWin::get_x_win() +int MessageWin::get_x_win() { return SESSION::get_x_win_mes(); } -const int MessageWin::get_y_win() +int MessageWin::get_y_win() { return SESSION::get_y_win_mes(); } @@ -79,12 +79,12 @@ void MessageWin::set_y_win( const int y ) SESSION::set_y_win_mes( y ); } -const int MessageWin::get_width_win() +int MessageWin::get_width_win() { return SESSION::get_width_win_mes(); } -const int MessageWin::get_height_win() +int MessageWin::get_height_win() { return SESSION::get_height_win_mes(); } @@ -99,7 +99,7 @@ void MessageWin::set_height_win( const int height ) SESSION::set_height_win_mes( height ); } -const bool MessageWin::is_focus_win() +bool MessageWin::is_focus_win() { return SESSION::is_focus_win_mes(); } @@ -110,7 +110,7 @@ void MessageWin::set_focus_win( const bool set ) } -const bool MessageWin::is_maximized_win() +bool MessageWin::is_maximized_win() { return SESSION::is_maximized_win_mes(); } @@ -121,7 +121,7 @@ void MessageWin::set_maximized_win( const bool set ) } -const bool MessageWin::is_iconified_win() +bool MessageWin::is_iconified_win() { return SESSION::is_iconified_win_mes(); } @@ -132,7 +132,7 @@ void MessageWin::set_iconified_win( const bool set ) } -const bool MessageWin::is_shown_win() +bool MessageWin::is_shown_win() { return SESSION::is_shown_win_mes(); } diff --git a/src/message/messagewin.h b/src/message/messagewin.h index ba56a8f75..edf94990d 100644 --- a/src/message/messagewin.h +++ b/src/message/messagewin.h @@ -20,29 +20,29 @@ namespace MESSAGE void switch_admin() override; - const int get_x_win() override; - const int get_y_win() override; + int get_x_win() override; + int get_y_win() override; void set_x_win( const int x ) override; void set_y_win( const int y ) override; - const int get_width_win() override; - const int get_height_win() override; + int get_width_win() override; + int get_height_win() override; void set_width_win( const int width ) override; void set_height_win( const int height ) override; - const bool is_focus_win() override; + bool is_focus_win() override; void set_focus_win( const bool set ) override; - const bool is_maximized_win() override; + bool is_maximized_win() override; void set_maximized_win( const bool set ) override; - const bool is_iconified_win() override; + bool is_iconified_win() override; void set_iconified_win( const bool set ) override; - const bool is_full_win() override { return false; } + bool is_full_win() override { return false; } void set_full_win( const bool ) override {} - const bool is_shown_win() override; + bool is_shown_win() override; void set_shown_win( const bool set ) override; bool on_delete_event( GdkEventAny* event ) override; diff --git a/src/searchmanager.cpp b/src/searchmanager.cpp index 40987bb4b..3c8730f3b 100644 --- a/src/searchmanager.cpp +++ b/src/searchmanager.cpp @@ -67,8 +67,8 @@ Search_Manager::~Search_Manager() // bm : trueの時、しおりが付いている(スレ一覧でしおりを付けた or レスに一つでもしおりが付いている)スレのみを対象に検索する // calc_data : 検索終了時に m_list_data を求める // -const bool Search_Manager::search( const std::string& id, const int searchmode, const std::string& url, - const std::string& query, const bool mode_or, const bool bm, const bool calc_data ) +bool Search_Manager::search( const std::string& id, const int searchmode, const std::string& url, + const std::string& query, const bool mode_or, const bool bm, const bool calc_data ) { #ifdef _DEBUG std::cout << "Search_Manager::search url = " << url << " query = " << query << std::endl; @@ -213,7 +213,7 @@ void Search_Manager::wait() // // スレタイ検索 // -const bool Search_Manager::search_title( const std::string& id, const std::string& query ) +bool Search_Manager::search_title( const std::string& id, const std::string& query ) { if( m_searching ) return false; if( m_searchloader && m_searchloader->is_loading() ) return false; diff --git a/src/searchmanager.h b/src/searchmanager.h index 8b54df5a3..2b76e49d8 100644 --- a/src/searchmanager.h +++ b/src/searchmanager.h @@ -80,8 +80,8 @@ namespace CORE const std::vector< DBTREE::ArticleBase* >& get_list_article() const{ return m_list_article; } const std::list< SEARCHDATA >& get_list_data() const { return m_list_data; } - const bool is_searching() const { return m_searching; } - const bool is_searching( const std::string& id ) const { if( id == m_id ) return m_searching; else return false; } + bool is_searching() const { return m_searching; } + bool is_searching( const std::string& id ) const { if( id == m_id ) return m_searching; else return false; } void stop( const std::string& id ); @@ -96,12 +96,12 @@ namespace CORE // mode_or : false なら AND、true なら OR で検索する // bm : trueの時、しおりが付いている(スレ一覧でしおりを付けた or レスに一つでもしおりが付いている)スレのみを対象に検索する // calc_data : 検索終了時に m_list_data を求める - const bool search( const std::string& id, const int searchmode, const std::string& url, - const std::string& query, const bool mode_or, const bool bm, const bool calc_data ); + bool search( const std::string& id, const int searchmode, const std::string& url, + const std::string& query, const bool mode_or, const bool bm, const bool calc_data ); // スレタイ検索 - const bool search_title( const std::string& id, const std::string& query ); + bool search_title( const std::string& id, const std::string& query ); private: diff --git a/src/session.cpp b/src/session.cpp index 99d21df4f..41d93e038 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -174,7 +174,7 @@ std::string dir_select_favorite; // ツールバー等の項目名 -> ID 変換 -const int SESSION::parse_item( const std::string& item_name ) +int SESSION::parse_item( const std::string& item_name ) { int item = ITEM_END; @@ -712,16 +712,16 @@ void SESSION::save_session() } // ブート中 -const bool SESSION::is_booting(){ return booting; } +bool SESSION::is_booting(){ return booting; } void SESSION::set_booting( const bool boot ){ booting = boot; } // 終了中 -const bool SESSION::is_quitting(){ return quitting; } +bool SESSION::is_quitting(){ return quitting; } void SESSION::set_quitting( const bool quit ){ quitting = quit; } // 入れ替えなどのタブ操作中 // ビューの再描画などを禁止する -const bool SESSION::is_tab_operating( const std::string& url_admin ) +bool SESSION::is_tab_operating( const std::string& url_admin ) { if( url_admin == URL_ARTICLEADMIN ) return tab_operating_article; if( url_admin == URL_IMAGEADMIN ) return tab_operating_image; @@ -735,105 +735,105 @@ void SESSION::set_tab_operating( const std::string& url_admin, const bool operat if( url_admin == URL_IMAGEADMIN ) tab_operating_image = operating; } -const int SESSION::get_mode_pane() { return mode_pane; } +int SESSION::get_mode_pane() { return mode_pane; } void SESSION::set_mode_pane( const int mode ){ mode_pane = mode; } -const bool SESSION::is_online(){ return mode_online; } +bool SESSION::is_online(){ return mode_online; } void SESSION::set_online( const bool mode ){ mode_online = mode; } -const bool SESSION::login2ch(){ return mode_login2ch; } +bool SESSION::login2ch(){ return mode_login2ch; } void SESSION::set_login2ch( const bool login ){ mode_login2ch = login; } -const bool SESSION::loginbe(){ return mode_loginbe; } +bool SESSION::loginbe(){ return mode_loginbe; } void SESSION::set_loginbe( const bool login ){ mode_loginbe = login; } -const bool SESSION::loginp2(){ return mode_loginp2; } +bool SESSION::loginp2(){ return mode_loginp2; } void SESSION::set_loginp2( const bool login ){ mode_loginp2 = login; } -const bool SESSION::show_sidebar(){ return win_show_sidebar; } +bool SESSION::show_sidebar(){ return win_show_sidebar; } -const bool SESSION::show_menubar(){ return win_show_menubar; } +bool SESSION::show_menubar(){ return win_show_menubar; } void SESSION::set_show_menubar( const bool show ){ win_show_menubar = show; } -const bool SESSION::get_show_main_toolbar(){ return show_main_toolbar; } +bool SESSION::get_show_main_toolbar(){ return show_main_toolbar; } void SESSION::set_show_main_toolbar( const bool show ){ show_main_toolbar = show; } -const int SESSION::get_toolbar_pos(){ return win_toolbar_pos; } +int SESSION::get_toolbar_pos(){ return win_toolbar_pos; } void SESSION::set_toolbar_pos( const int pos ){ win_toolbar_pos = pos; } -const bool SESSION::get_show_bbslist_toolbar(){ return show_bbslist_toolbar; } +bool SESSION::get_show_bbslist_toolbar(){ return show_bbslist_toolbar; } void SESSION::set_show_bbslist_toolbar( const bool show ){ show_bbslist_toolbar = show; } -const bool SESSION::get_show_board_toolbar(){ return show_board_toolbar; } +bool SESSION::get_show_board_toolbar(){ return show_board_toolbar; } void SESSION::set_show_board_toolbar( const bool show ){ show_board_toolbar = show; } -const bool SESSION::get_show_article_toolbar(){ return show_article_toolbar; } +bool SESSION::get_show_article_toolbar(){ return show_article_toolbar; } void SESSION::set_show_article_toolbar( const bool show ){ show_article_toolbar = show; } -const bool SESSION::get_show_board_tab(){ return show_board_tab; } +bool SESSION::get_show_board_tab(){ return show_board_tab; } void SESSION::set_show_board_tab( const bool show ){ show_board_tab = show; } -const bool SESSION::get_show_article_tab(){ return show_article_tab; } +bool SESSION::get_show_article_tab(){ return show_article_tab; } void SESSION::set_show_article_tab( const bool show ){ show_article_tab = show; } -const bool SESSION::get_show_main_statbar(){ return show_main_statbar; } +bool SESSION::get_show_main_statbar(){ return show_main_statbar; } void SESSION::set_show_main_statbar( const bool show ){ show_main_statbar = show; } -const int SESSION::focused_admin(){ return win_focused_admin; } +int SESSION::focused_admin(){ return win_focused_admin; } void SESSION::set_focused_admin( const int admin ){ win_focused_admin = admin; } -const int SESSION::focused_admin_sidebar(){ return win_focused_admin_sidebar; } +int SESSION::focused_admin_sidebar(){ return win_focused_admin_sidebar; } void SESSION::set_focused_admin_sidebar( const int admin ){ win_focused_admin_sidebar = admin; } // 各windowの座標 -const int SESSION::get_x_win_main(){ return x_win_main; } -const int SESSION::get_y_win_main(){ return y_win_main; } +int SESSION::get_x_win_main(){ return x_win_main; } +int SESSION::get_y_win_main(){ return y_win_main; } void SESSION::set_x_win_main( const int x ){ x_win_main = x; } void SESSION::set_y_win_main( const int y ){ y_win_main = y; } -const int SESSION::get_x_win_img(){ return x_win_img; } -const int SESSION::get_y_win_img(){ return y_win_img; } +int SESSION::get_x_win_img(){ return x_win_img; } +int SESSION::get_y_win_img(){ return y_win_img; } void SESSION::set_x_win_img( const int x ){ x_win_img = x; } void SESSION::set_y_win_img( const int y ){ y_win_img = y; } -const int SESSION::get_x_win_mes(){ return x_win_mes; } -const int SESSION::get_y_win_mes(){ return y_win_mes; } +int SESSION::get_x_win_mes(){ return x_win_mes; } +int SESSION::get_y_win_mes(){ return y_win_mes; } void SESSION::set_x_win_mes( const int x ){ x_win_mes = x; } void SESSION::set_y_win_mes( const int y ){ y_win_mes = y; } // 各windowのサイズ -const int SESSION::get_width_win_main(){ return width_win_main; } -const int SESSION::get_height_win_main(){ return height_win_main; } +int SESSION::get_width_win_main(){ return width_win_main; } +int SESSION::get_height_win_main(){ return height_win_main; } void SESSION::set_width_win_main( const int width ){ width_win_main = width; } void SESSION::set_height_win_main( const int height ){ height_win_main = height; } -const int SESSION::get_width_win_img(){ return width_win_img; } -const int SESSION::get_height_win_img(){ return height_win_img; } +int SESSION::get_width_win_img(){ return width_win_img; } +int SESSION::get_height_win_img(){ return height_win_img; } void SESSION::set_width_win_img( const int width ){ width_win_img = width; } void SESSION::set_height_win_img( const int height ){ height_win_img = height; } -const int SESSION::get_width_win_mes(){ return width_win_mes; } -const int SESSION::get_height_win_mes(){ return height_win_mes; } +int SESSION::get_width_win_mes(){ return width_win_mes; } +int SESSION::get_height_win_mes(){ return height_win_mes; } void SESSION::set_width_win_mes( const int width ){ width_win_mes = width; } void SESSION::set_height_win_mes( const int height ){ height_win_mes = height; } // 各window がフォーカスされているか -const bool SESSION::is_focus_win_main(){ return focus_win_main; } +bool SESSION::is_focus_win_main(){ return focus_win_main; } void SESSION::set_focus_win_main( const bool set ){ focus_win_main = set; } -const bool SESSION::is_focus_win_img(){ return focus_win_img; } +bool SESSION::is_focus_win_img(){ return focus_win_img; } void SESSION::set_focus_win_img( const bool set ){ focus_win_img = set; } -const bool SESSION::is_focus_win_mes(){ return focus_win_mes; } +bool SESSION::is_focus_win_mes(){ return focus_win_mes; } void SESSION::set_focus_win_mes( const bool set ){ focus_win_mes = set; } // 各window が最大化されているか -const bool SESSION::is_maximized_win_main(){ return maximized_win_main; } +bool SESSION::is_maximized_win_main(){ return maximized_win_main; } void SESSION::set_maximized_win_main( const bool set ){ maximized_win_main = set; } -const bool SESSION::is_maximized_win_img(){ return maximized_win_img; } +bool SESSION::is_maximized_win_img(){ return maximized_win_img; } void SESSION::set_maximized_win_img( const bool set ){ maximized_win_img = set; } bool SESSION::is_maximized_win_mes(){ return maximized_win_mes; } @@ -841,44 +841,44 @@ void SESSION::set_maximized_win_mes( const bool set ){ maximized_win_mes = set; // 各window が最小化されているか -const bool SESSION::is_iconified_win_main(){ return iconified_win_main; } +bool SESSION::is_iconified_win_main(){ return iconified_win_main; } void SESSION::set_iconified_win_main( const bool set ){ iconified_win_main = set; } -const bool SESSION::is_iconified_win_img(){ return iconified_win_img; } +bool SESSION::is_iconified_win_img(){ return iconified_win_img; } void SESSION::set_iconified_win_img( const bool set ){ iconified_win_img = set; } -const bool SESSION::is_iconified_win_mes(){ return iconified_win_mes; } +bool SESSION::is_iconified_win_mes(){ return iconified_win_mes; } void SESSION::set_iconified_win_mes( const bool set ){ iconified_win_mes = set; } // 各window が画面に表示されているか -const bool SESSION::is_shown_win_main(){ return shown_win_main; } +bool SESSION::is_shown_win_main(){ return shown_win_main; } void SESSION::set_shown_win_main( const bool set ){ shown_win_main = set; } -const bool SESSION::is_shown_win_img(){ return shown_win_img; } +bool SESSION::is_shown_win_img(){ return shown_win_img; } void SESSION::set_shown_win_img( const bool set ){ shown_win_img = set; } -const bool SESSION::is_shown_win_mes(){ return shown_win_mes; } +bool SESSION::is_shown_win_mes(){ return shown_win_mes; } void SESSION::set_shown_win_mes( const bool set ){ shown_win_mes = set; } // windowがフルスクリーンか -const bool SESSION::is_full_win_main(){ return full_win_main; } +bool SESSION::is_full_win_main(){ return full_win_main; } void SESSION::set_full_win_main( const bool set ){ full_win_main = set; } // ダイアログ表示中 -const bool SESSION::is_dialog_shown(){ return dialog_shown; } +bool SESSION::is_dialog_shown(){ return dialog_shown; } void SESSION::set_dialog_shown( const bool set ){ dialog_shown = set; } void SESSION::set_show_sidebar( const bool showurl ){ win_show_sidebar = showurl; } // メインウィンドウのペインの敷居の位置 -const int SESSION::hpane_main_pos(){ return win_hpane_main_pos; } -const int SESSION::vpane_main_pos(){ return win_vpane_main_pos; } -const int SESSION::hpane_main_r_pos(){ return win_hpane_main_r_pos; } -const int SESSION::vpane_main_mes_pos(){ return win_vpane_main_mes_pos; } +int SESSION::hpane_main_pos(){ return win_hpane_main_pos; } +int SESSION::vpane_main_pos(){ return win_vpane_main_pos; } +int SESSION::hpane_main_r_pos(){ return win_hpane_main_r_pos; } +int SESSION::vpane_main_mes_pos(){ return win_vpane_main_mes_pos; } void SESSION::set_hpane_main_pos( const int pos ){ win_hpane_main_pos = pos; } void SESSION::set_vpane_main_pos( const int pos ){ win_vpane_main_pos = pos; } @@ -886,16 +886,16 @@ void SESSION::set_hpane_main_r_pos( const int pos ){ win_hpane_main_r_pos = pos; void SESSION::set_vpane_main_mes_pos( const int pos ){ win_vpane_main_mes_pos = pos; } // メインnotebookのページ番号 -const int SESSION::notebook_main_page(){ return win_notebook_main_page; } +int SESSION::notebook_main_page(){ return win_notebook_main_page; } void SESSION::set_notebook_main_page( const int page ){ win_notebook_main_page = page; } // bbslistの開いてるページ番号 -const int SESSION::bbslist_page(){ return win_bbslist_page; } +int SESSION::bbslist_page(){ return win_bbslist_page; } void SESSION::set_bbslist_page( const int page ){ win_bbslist_page = page; } // 前回閉じたときに開いていたboardのページ番号とURL -const int SESSION::board_page(){ return win_board_page; } +int SESSION::board_page(){ return win_board_page; } void SESSION::set_board_page( const int page ){ win_board_page = page; } const std::list< std::string >& SESSION::get_board_URLs(){ return board_urls; } void SESSION::set_board_URLs( const std::list< std::string >& urls ){ board_urls = urls; } @@ -909,7 +909,7 @@ const std::list< std::string >& SESSION::get_board_switchhistory(){ return board void SESSION::set_board_switchhistory( const std::list< std::string >& hist ){ board_switchhistory = hist; } // 前回閉じたときに開いていたスレタブのページ番号とURL -const int SESSION::article_page(){ return win_article_page; } +int SESSION::article_page(){ return win_article_page; } void SESSION::set_article_page( const int page ){ win_article_page = page; } const std::list< std::string >& SESSION::get_article_URLs(){ return article_urls; } void SESSION::set_article_URLs( const std::list< std::string >& urls ){ article_urls = urls; } @@ -923,7 +923,7 @@ const std::list< std::string >& SESSION::get_article_switchhistory(){ return art void SESSION::set_article_switchhistory( const std::list< std::string >& hist ){ article_switchhistory = hist; } // 前回閉じたときに開いていたimageのページ番号とURL -const int SESSION::image_page(){ return win_image_page; } +int SESSION::image_page(){ return win_image_page; } void SESSION::set_image_page( const int page ){ win_image_page = page; } const std::list< std::string >& SESSION::image_URLs(){ return image_urls; } void SESSION::set_image_URLs( const std::list< std::string >& urls ){ image_urls = urls; } @@ -947,7 +947,7 @@ void SESSION::set_items_sidebar_toolbar_str( const std::string& items_str ) items_sidebar_toolbar_str = items_str; items_sidebar_toolbar = parse_items( items_sidebar_toolbar_str ); } -const int SESSION::get_item_sidebar_toolbar( const int num ){ return items_sidebar_toolbar[ num ]; } +int SESSION::get_item_sidebar_toolbar( const int num ){ return items_sidebar_toolbar[ num ]; } // メインツールバーの項目 const std::string& SESSION::get_items_main_toolbar_str(){ return items_main_toolbar_str; } @@ -968,7 +968,7 @@ void SESSION::set_items_main_toolbar_str( const std::string& items_str ) items_main_toolbar_str = items_str; items_main_toolbar = parse_items( items_main_toolbar_str ); } -const int SESSION::get_item_main_toolbar( const int num ){ return items_main_toolbar[ num ]; } +int SESSION::get_item_main_toolbar( const int num ){ return items_main_toolbar[ num ]; } // スレビューのツールバーの項目 const std::string& SESSION::get_items_article_toolbar_str(){ return items_article_toolbar_str; } @@ -990,7 +990,7 @@ void SESSION::set_items_article_toolbar_str( const std::string& items_str ) items_article_toolbar_str = items_str; items_article_toolbar = parse_items( items_article_toolbar_str ); } -const int SESSION::get_item_article_toolbar( const int num ){ return items_article_toolbar[ num ]; } +int SESSION::get_item_article_toolbar( const int num ){ return items_article_toolbar[ num ]; } // 検索ビューのツールバーの項目 const std::string& SESSION::get_items_search_toolbar_str(){ return items_search_toolbar_str; } @@ -1008,7 +1008,7 @@ void SESSION::set_items_search_toolbar_str( const std::string& items_str ) items_search_toolbar_str = items_str; items_search_toolbar = parse_items( items_search_toolbar_str ); } -const int SESSION::get_item_search_toolbar( const int num ){ return items_search_toolbar[ num ]; } +int SESSION::get_item_search_toolbar( const int num ){ return items_search_toolbar[ num ]; } // スレ一覧のツールバー項目 const std::string& SESSION::get_items_board_toolbar_str(){ return items_board_toolbar_str; } @@ -1030,7 +1030,7 @@ void SESSION::set_items_board_toolbar_str( const std::string& items_str ) items_board_toolbar_str = items_str; items_board_toolbar = parse_items( items_board_toolbar_str ); } -const int SESSION::get_item_board_toolbar( const int num ){ return items_board_toolbar[ num ]; } +int SESSION::get_item_board_toolbar( const int num ){ return items_board_toolbar[ num ]; } // 書き込みビューのツールバー項目 const std::string& SESSION::get_items_msg_toolbar_str(){ return items_msg_toolbar_str; } @@ -1050,7 +1050,7 @@ void SESSION::set_items_msg_toolbar_str( const std::string& items_str ) items_msg_toolbar_str = items_str; items_msg_toolbar = parse_items( items_msg_toolbar_str ); } -const int SESSION::get_item_msg_toolbar( const int num ){ return items_msg_toolbar[ num ]; } +int SESSION::get_item_msg_toolbar( const int num ){ return items_msg_toolbar[ num ]; } // スレ一覧の列項目 const std::string& SESSION::get_items_board_col_str(){ return items_board_col_str; } @@ -1072,7 +1072,7 @@ void SESSION::set_items_board_col_str( const std::string& items_str ) items_board_col_str = items_str; items_board_col = parse_items( items_board_col_str ); } -const int SESSION::get_item_board_col( const int num ){ return items_board_col[ num ]; } +int SESSION::get_item_board_col( const int num ){ return items_board_col[ num ]; } // スレ一覧のコンテキストメニュー項目 const std::string& SESSION::get_items_board_menu_str(){ return items_board_menu_str; } @@ -1101,7 +1101,7 @@ void SESSION::set_items_board_menu_str( const std::string& items_str ) items_board_menu_str = items_str; items_board_menu = parse_items( items_board_menu_str ); } -const int SESSION::get_item_board_menu( const int num ){ return items_board_menu[ num ]; } +int SESSION::get_item_board_menu( const int num ){ return items_board_menu[ num ]; } // スレビューのコンテキストメニュー項目 @@ -1131,36 +1131,36 @@ void SESSION::set_items_article_menu_str( const std::string& items_str ) items_article_menu_str = items_str; items_article_menu = parse_items( items_article_menu_str ); } -const int SESSION::get_item_article_menu( const int num ){ return items_article_menu[ num ]; } +int SESSION::get_item_article_menu( const int num ){ return items_article_menu[ num ]; } // board ビューの列幅 -const int SESSION::col_mark(){ return board_col_mark; } -const int SESSION::col_id(){ return board_col_id; } -const int SESSION::col_board(){ return board_col_board; } -const int SESSION::col_subject(){ return board_col_subject; } -const int SESSION::col_number(){ return board_col_number; } -const int SESSION::col_load(){ return board_col_load; } -const int SESSION::col_new(){ return board_col_new; } -const int SESSION::col_since(){ return board_col_since; } -const int SESSION::col_write(){ return board_col_write; } -const int SESSION::col_access(){ return board_col_access; } -const int SESSION::col_speed(){ return board_col_speed; } -const int SESSION::col_diff(){ return board_col_diff; } +int SESSION::col_mark(){ return board_col_mark; } +int SESSION::col_id(){ return board_col_id; } +int SESSION::col_board(){ return board_col_board; } +int SESSION::col_subject(){ return board_col_subject; } +int SESSION::col_number(){ return board_col_number; } +int SESSION::col_load(){ return board_col_load; } +int SESSION::col_new(){ return board_col_new; } +int SESSION::col_since(){ return board_col_since; } +int SESSION::col_write(){ return board_col_write; } +int SESSION::col_access(){ return board_col_access; } +int SESSION::col_speed(){ return board_col_speed; } +int SESSION::col_diff(){ return board_col_diff; } // スレ一覧の since の表示モード -const int SESSION::get_col_since_time() { return board_col_since_time; } +int SESSION::get_col_since_time() { return board_col_since_time; } void SESSION::set_col_since_time( const int mode ){ board_col_since_time = mode; } // スレ一覧の 最終書込 の表示モード -const int SESSION::get_col_write_time() { return board_col_write_time; } +int SESSION::get_col_write_time() { return board_col_write_time; } void SESSION::set_col_write_time( const int mode ){ board_col_write_time = mode; } // スレ一覧の 最終取得 の表示モード -const int SESSION::get_col_access_time() { return board_col_access_time; } +int SESSION::get_col_access_time() { return board_col_access_time; } void SESSION::set_col_access_time( const int mode ){ board_col_access_time = mode; } // 現在開いているサイドバーのページ -const int SESSION::get_sidebar_current_page() +int SESSION::get_sidebar_current_page() { return BBSLIST::get_admin()->get_current_page(); } @@ -1209,16 +1209,16 @@ const std::string SESSION::get_article_current_url() // 埋め込みimage使用 -const bool SESSION::get_embedded_img(){ return embedded_img; } +bool SESSION::get_embedded_img(){ return embedded_img; } void SESSION::set_embedded_img( const bool set ){ embedded_img = set; } // 埋め込みmessageを使用 -const bool SESSION::get_embedded_mes(){ return embedded_mes; } +bool SESSION::get_embedded_mes(){ return embedded_mes; } void SESSION::set_embedded_mes( const bool set ){ embedded_mes = set; } // 書き込み後にmessageを閉じる -const bool SESSION::get_close_mes(){ return close_mes; } +bool SESSION::get_close_mes(){ return close_mes; } void SESSION::set_close_mes( const bool set ){ close_mes = set; } @@ -1236,7 +1236,7 @@ void SESSION::set_dir_draft( const std::string& dir ){ dir_draft = dir; } // ポップアップメニュー表示中 -const bool SESSION::is_popupmenu_shown(){ return popupmenu_shown; } +bool SESSION::is_popupmenu_shown(){ return popupmenu_shown; } void SESSION::set_popupmenu_shown( const bool shown ){ popupmenu_shown = shown; } @@ -1277,7 +1277,7 @@ void SESSION::remove_delete_list( const std::string& url ) // 実況実行中のスレか -const bool SESSION::is_live( const std::string& url ) +bool SESSION::is_live( const std::string& url ) { #ifdef _DEBUG std::cout << "SESSION::is_live live_urls == " << live_urls.size() << " url = " << url << std::endl; @@ -1320,7 +1320,7 @@ void SESSION::remove_live( const std::string& url ) // 画像のfitモード -const int SESSION::get_img_fit_mode() +int SESSION::get_img_fit_mode() { return img_fit_mode; } diff --git a/src/session.h b/src/session.h index 9019eafcf..8d2514a4f 100644 --- a/src/session.h +++ b/src/session.h @@ -76,130 +76,130 @@ namespace SESSION void save_session(); // ブート中 - const bool is_booting(); + bool is_booting(); void set_booting( const bool boot ); // 終了中 - const bool is_quitting(); + bool is_quitting(); void set_quitting( const bool quit ); // 入れ替えなどのタブ操作中 // ビューの再描画などを禁止する - const bool is_tab_operating( const std::string& url_admin ); + bool is_tab_operating( const std::string& url_admin ); void set_tab_operating( const std::string& url_admin, const bool operating ); - const int get_mode_pane(); + int get_mode_pane(); void set_mode_pane( const int mode ); - const bool is_online(); + bool is_online(); void set_online( const bool mode ); // 2chログイン中 - const bool login2ch(); + bool login2ch(); void set_login2ch( const bool login ); // BEログイン中 - const bool loginbe(); + bool loginbe(); void set_loginbe( const bool login ); // P2ログイン中 - const bool loginp2(); + bool loginp2(); void set_loginp2( const bool login ); // サイドバー表示中 - const bool show_sidebar(); + bool show_sidebar(); void set_show_sidebar( const bool showbar ); // メニューバー - const bool show_menubar(); + bool show_menubar(); void set_show_menubar( const bool show ); // メインツールバー表示 - const bool get_show_main_toolbar(); + bool get_show_main_toolbar(); void set_show_main_toolbar( const bool show ); // メインツールバー位置 - const int get_toolbar_pos(); + int get_toolbar_pos(); void set_toolbar_pos( const int pos ); // 板一覧のツールバー表示 - const bool get_show_bbslist_toolbar(); + bool get_show_bbslist_toolbar(); void set_show_bbslist_toolbar( const bool show ); // スレ一覧のツールバー表示 - const bool get_show_board_toolbar(); + bool get_show_board_toolbar(); void set_show_board_toolbar( const bool show ); // スレビューのツールバー表示 - const bool get_show_article_toolbar(); + bool get_show_article_toolbar(); void set_show_article_toolbar( const bool show ); // スレ一覧のタブ表示 - const bool get_show_board_tab(); + bool get_show_board_tab(); void set_show_board_tab( const bool show ); // スレビューのタブ - const bool get_show_article_tab(); + bool get_show_article_tab(); void set_show_article_tab( const bool show ); // メインステータスバー表示 - const bool get_show_main_statbar(); + bool get_show_main_statbar(); void set_show_main_statbar( const bool show ); // フォーカスされているadmin - const int focused_admin(); + int focused_admin(); void set_focused_admin( const int admin ); // 各windowの座標 - const int get_x_win_main(); // メインウィンドウ - const int get_y_win_main(); + int get_x_win_main(); // メインウィンドウ + int get_y_win_main(); void set_x_win_main( const int x ); void set_y_win_main( const int y ); - const int get_x_win_img(); // 画像ウィンドウ - const int get_y_win_img(); + int get_x_win_img(); // 画像ウィンドウ + int get_y_win_img(); void set_x_win_img( const int x ); void set_y_win_img( const int y ); - const int get_x_win_mes(); // 書き込みウィンドウ - const int get_y_win_mes(); + int get_x_win_mes(); // 書き込みウィンドウ + int get_y_win_mes(); void set_x_win_mes( const int x ); void set_y_win_mes( const int y ); // 各windowのサイズ - const int get_width_win_main(); // メインウィンドウ - const int get_height_win_main(); + int get_width_win_main(); // メインウィンドウ + int get_height_win_main(); void set_width_win_main( const int width ); void set_height_win_main( const int height ); - const int get_width_win_img(); // 画像ウィンドウ - const int get_height_win_img(); + int get_width_win_img(); // 画像ウィンドウ + int get_height_win_img(); void set_width_win_img( const int width ); void set_height_win_img( const int height ); - const int get_width_win_mes(); // 書き込みウィンドウ - const int get_height_win_mes(); + int get_width_win_mes(); // 書き込みウィンドウ + int get_height_win_mes(); void set_width_win_mes( const int width ); void set_height_win_mes( const int height ); // 各window がフォーカスされているか - const bool is_focus_win_main(); // メインウィンドウ + bool is_focus_win_main(); // メインウィンドウ void set_focus_win_main( const bool set ); - const bool is_focus_win_img(); // 画像ウィンドウ + bool is_focus_win_img(); // 画像ウィンドウ void set_focus_win_img( const bool set ); - const bool is_focus_win_mes(); // 書き込みウィンドウ + bool is_focus_win_mes(); // 書き込みウィンドウ void set_focus_win_mes( const bool set ); // 各window が最大化されているか - const bool is_maximized_win_main(); // メインウィンドウ + bool is_maximized_win_main(); // メインウィンドウ void set_maximized_win_main( const bool maximized ); - const bool is_maximized_win_img(); // 画像ウィンドウ + bool is_maximized_win_img(); // 画像ウィンドウ void set_maximized_win_img( const bool set ); bool is_maximized_win_mes(); // 書き込みウィンドウ @@ -207,60 +207,60 @@ namespace SESSION // 各window が最小化されているか - const bool is_iconified_win_main(); // メインウィンドウ + bool is_iconified_win_main(); // メインウィンドウ void set_iconified_win_main( const bool set ); - const bool is_iconified_win_img(); // 画像ウィンドウ + bool is_iconified_win_img(); // 画像ウィンドウ void set_iconified_win_img( const bool set ); - const bool is_iconified_win_mes(); // 書き込みウィンドウ + bool is_iconified_win_mes(); // 書き込みウィンドウ void set_iconified_win_mes( const bool set ); // 各window が画面に表示されているか - const bool is_shown_win_main(); // メインウィンドウ + bool is_shown_win_main(); // メインウィンドウ void set_shown_win_main( const bool set ); - const bool is_shown_win_img(); // 画像ウィンドウ + bool is_shown_win_img(); // 画像ウィンドウ void set_shown_win_img( const bool set ); - const bool is_shown_win_mes(); // 書き込みウィンドウ + bool is_shown_win_mes(); // 書き込みウィンドウ void set_shown_win_mes( const bool set ); // windowがフルスクリーンか - const bool is_full_win_main(); // メインウィンドウ + bool is_full_win_main(); // メインウィンドウ void set_full_win_main( const bool set ); // ダイアログ表示中 - const bool is_dialog_shown(); + bool is_dialog_shown(); void set_dialog_shown( const bool set ); // サイドバーを閉じる前にフォーカスされていたadmin - const int focused_admin_sidebar(); + int focused_admin_sidebar(); void set_focused_admin_sidebar( const int admin ); /// メインウィンドウのペインの敷居の位置 - const int hpane_main_pos(); - const int vpane_main_pos(); - const int hpane_main_r_pos(); - const int vpane_main_mes_pos(); + int hpane_main_pos(); + int vpane_main_pos(); + int hpane_main_r_pos(); + int vpane_main_mes_pos(); void set_hpane_main_pos( const int pos ); void set_vpane_main_pos( const int pos ); void set_hpane_main_r_pos( const int pos ); void set_vpane_main_mes_pos( const int pos ); // 前回閉じたときに開いていたメインnotebookのページ番号 - const int notebook_main_page(); + int notebook_main_page(); void set_notebook_main_page( const int page ); // 前回閉じたときに開いていたbbslistの開いてるページ番号 - const int bbslist_page(); + int bbslist_page(); void set_bbslist_page( const int page ); // 前回閉じたときに開いていたスレ一覧のページ番号とURL - const int board_page(); + int board_page(); void set_board_page( const int page ); const std::list< std::string >& get_board_URLs(); void set_board_URLs( const std::list< std::string >& urls ); @@ -274,7 +274,7 @@ namespace SESSION void set_board_switchhistory( const std::list< std::string >& hist ); // 前回閉じたときに開いていたスレタブのページ番号とURL - const int article_page(); + int article_page(); void set_article_page( const int page ); const std::list< std::string >& get_article_URLs(); void set_article_URLs( const std::list< std::string >& urls ); @@ -288,7 +288,7 @@ namespace SESSION void set_article_switchhistory( const std::list< std::string >& hist ); // 前回閉じたときに開いていたimageのページ番号とURL - const int image_page(); + int image_page(); void set_image_page( const int page ); const std::list< std::string >& image_URLs(); void set_image_URLs( const std::list< std::string >& urls ); @@ -298,81 +298,81 @@ namespace SESSION void set_image_locked( const std::list< bool >& locked ); // 現在開いているサイドバーのページ - const int get_sidebar_current_page(); + int get_sidebar_current_page(); // 現在開いているサイドバーのurl const std::string get_sidebar_current_url(); // ツールバー等の項目名 -> ID 変換 - const int parse_item( const std::string& item_name ); + int parse_item( const std::string& item_name ); // サイドバーのツールバー項目 const std::string& get_items_sidebar_toolbar_str(); const std::string get_items_sidebar_toolbar_default_str(); void set_items_sidebar_toolbar_str( const std::string& items ); - const int get_item_sidebar_toolbar( const int num ); + int get_item_sidebar_toolbar( const int num ); // メインツールバーの項目 const std::string& get_items_main_toolbar_str(); const std::string get_items_main_toolbar_default_str(); void set_items_main_toolbar_str( const std::string& items_str ); - const int get_item_main_toolbar( const int num ); + int get_item_main_toolbar( const int num ); // スレビューのツールバーの項目 const std::string& get_items_article_toolbar_str(); const std::string get_items_article_toolbar_default_str(); void set_items_article_toolbar_str( const std::string& items_str ); - const int get_item_article_toolbar( const int num ); + int get_item_article_toolbar( const int num ); // 検索ビューのツールバーの項目 const std::string& get_items_search_toolbar_str(); const std::string get_items_search_toolbar_default_str(); void set_items_search_toolbar_str( const std::string& items_str ); - const int get_item_search_toolbar( const int num ); + int get_item_search_toolbar( const int num ); // スレ一覧のツールバー項目 const std::string& get_items_board_toolbar_str(); const std::string get_items_board_toolbar_default_str(); void set_items_board_toolbar_str( const std::string& items ); - const int get_item_board_toolbar( const int num ); + int get_item_board_toolbar( const int num ); // 書き込みビューのツールバー項目 const std::string& get_items_msg_toolbar_str(); const std::string get_items_msg_toolbar_default_str(); void set_items_msg_toolbar_str( const std::string& items ); - const int get_item_msg_toolbar( const int num ); + int get_item_msg_toolbar( const int num ); // スレ一覧の列項目 const std::string& get_items_board_col_str(); const std::string get_items_board_col_default_str(); void set_items_board_col_str( const std::string& items ); - const int get_item_board_col( const int num ); + int get_item_board_col( const int num ); // スレ一覧のコンテキストメニュー項目 const std::string& get_items_board_menu_str(); const std::string get_items_board_menu_default_str(); void set_items_board_menu_str( const std::string& items_str ); - const int get_item_board_menu( const int num ); + int get_item_board_menu( const int num ); // スレビューのコンテキストメニュー項目 const std::string& get_items_article_menu_str(); const std::string get_items_article_menu_default_str(); void set_items_article_menu_str( const std::string& items_str ); - const int get_item_article_menu( const int num ); + int get_item_article_menu( const int num ); // スレ一覧の列幅 - const int col_mark(); - const int col_id(); - const int col_board(); - const int col_subject(); - const int col_number(); - const int col_load(); - const int col_new(); - const int col_since(); - const int col_write(); - const int col_access(); - const int col_speed(); - const int col_diff(); + int col_mark(); + int col_id(); + int col_board(); + int col_subject(); + int col_number(); + int col_load(); + int col_new(); + int col_since(); + int col_write(); + int col_access(); + int col_speed(); + int col_diff(); void set_col_mark( const int width ); void set_col_id( const int width ); void set_col_board( const int width ); @@ -387,15 +387,15 @@ namespace SESSION void set_col_diff( const int width ); // スレ一覧の since の表示モード - const int get_col_since_time(); + int get_col_since_time(); void set_col_since_time( const int mode ); // スレ一覧の 最終書込 の表示モード - const int get_col_write_time(); + int get_col_write_time(); void set_col_write_time( const int mode ); // スレ一覧の 最終取得 の表示モード - const int get_col_access_time(); + int get_col_access_time(); void set_col_access_time( const int mode ); // 現在開いているarticle の ARTICLE::DrawAreaBase @@ -406,16 +406,16 @@ namespace SESSION // 埋め込みimage使用 - const bool get_embedded_img(); + bool get_embedded_img(); void set_embedded_img( const bool set ); // 埋め込みmessageを使用 - const bool get_embedded_mes(); + bool get_embedded_mes(); void set_embedded_mes( const bool set ); // 書き込み後にmessageを閉じる - const bool get_close_mes(); + bool get_close_mes(); void set_close_mes( const bool set ); @@ -432,7 +432,7 @@ namespace SESSION void set_dir_draft( const std::string& dir ); // ポップアップメニュー表示中 - const bool is_popupmenu_shown(); + bool is_popupmenu_shown(); void set_popupmenu_shown( const bool shown ); // JD終了時に削除するスレのリスト @@ -441,12 +441,12 @@ namespace SESSION void remove_delete_list( const std::string& url ); // 実況実行中のスレ - const bool is_live( const std::string& url ); + bool is_live( const std::string& url ); void append_live( const std::string& url ); void remove_live( const std::string& url ); // 画像のfitモード - const int get_img_fit_mode(); + int get_img_fit_mode(); void toggle_img_fit_mode(); // お気に入り挿入ダイアログで最後に保存したディレクトリ名 diff --git a/src/sharedbuffer.cpp b/src/sharedbuffer.cpp index 2e9a28b02..be8924cbf 100644 --- a/src/sharedbuffer.cpp +++ b/src/sharedbuffer.cpp @@ -6,7 +6,7 @@ using namespace CORE; CORE::DATA_INFO_LIST shared_infolist; -const int CORE::SBUF_size() +int CORE::SBUF_size() { return shared_infolist.size(); } diff --git a/src/sharedbuffer.h b/src/sharedbuffer.h index f4fcfaa7f..a6b3eade0 100644 --- a/src/sharedbuffer.h +++ b/src/sharedbuffer.h @@ -14,7 +14,7 @@ namespace CORE { - const int SBUF_size(); + int SBUF_size(); void SBUF_clear_info(); void SBUF_set_list( const CORE::DATA_INFO_LIST& list_info ); CORE::DATA_INFO_LIST& SBUF_list_info(); diff --git a/src/skeleton/aamenu.cpp b/src/skeleton/aamenu.cpp index 982b4dcf4..783ad030e 100644 --- a/src/skeleton/aamenu.cpp +++ b/src/skeleton/aamenu.cpp @@ -45,7 +45,7 @@ AAMenu::~AAMenu() } -const int AAMenu::get_size() +int AAMenu::get_size() { return static_cast< int >( get_children().size() ); } diff --git a/src/skeleton/aamenu.h b/src/skeleton/aamenu.h index 6b52a47d4..17d5481d5 100644 --- a/src/skeleton/aamenu.h +++ b/src/skeleton/aamenu.h @@ -44,7 +44,7 @@ namespace SKELETON private: - const int get_size(); + int get_size(); void set_text( const std::string& text ); void create_menuitem( Glib::RefPtr< Gtk::ActionGroup > actiongroup, Gtk::Menu* menu, const int id ); diff --git a/src/skeleton/admin.cpp b/src/skeleton/admin.cpp index c09366ce3..c44116999 100644 --- a/src/skeleton/admin.cpp +++ b/src/skeleton/admin.cpp @@ -295,7 +295,7 @@ void Admin::delete_jdwin() } -const bool Admin::is_booting() +bool Admin::is_booting() { if( get_jdwin() && get_jdwin()->is_booting() ) return true; @@ -2583,7 +2583,7 @@ std::list< bool > Admin::get_locked() } // タブのロック/アンロック -const bool Admin::is_lockable( const int page ) +bool Admin::is_lockable( const int page ) { SKELETON::View* view = dynamic_cast< View* >( m_notebook->get_nth_page( page ) ); if( view ) return view->is_lockable(); @@ -2591,7 +2591,7 @@ const bool Admin::is_lockable( const int page ) return false; } -const bool Admin::is_locked( const int page ) +bool Admin::is_locked( const int page ) { SKELETON::View* view = dynamic_cast< View* >( m_notebook->get_nth_page( page ) ); if( view ) return view->is_locked(); @@ -2599,7 +2599,7 @@ const bool Admin::is_locked( const int page ) return false; } -const bool Admin::is_locked( const std::string& url ) +bool Admin::is_locked( const std::string& url ) { SKELETON::View* view = get_view( url ); if( view ) return view->is_locked(); @@ -2626,7 +2626,7 @@ void Admin::unlock( const int page ) } // urlで指定されるタブが存在するか -const bool Admin::exist_tab( const std::string& url ) +bool Admin::exist_tab( const std::string& url ) { SKELETON::View* view = get_view( url ); if( view ) return true; @@ -2686,7 +2686,7 @@ void Admin::forward_clicked_viewhistory( const int count ) // // 戻る、進む // -const bool Admin::back_forward_viewhistory( const std::string& url, const bool back, const int count ) +bool Admin::back_forward_viewhistory( const std::string& url, const bool back, const int count ) { if( ! m_use_viewhistory ) return false; diff --git a/src/skeleton/admin.h b/src/skeleton/admin.h index 576751ec4..f81b14bac 100644 --- a/src/skeleton/admin.h +++ b/src/skeleton/admin.h @@ -71,10 +71,10 @@ namespace SKELETON virtual Gtk::Window* get_win(); // 起動中 - const bool is_booting(); + bool is_booting(); // フォーカスされているか - virtual const bool has_focus() const { return m_focus; } + virtual bool has_focus() const { return m_focus; } // タブの数 virtual int get_tab_nums(); @@ -114,7 +114,7 @@ namespace SKELETON ); // コマンドがセットされているか - const bool has_commands() const { return ( m_list_command.size() ); } + bool has_commands() const { return m_list_command.size(); } // 現在表示してるページ番号およびURL // 表示ページを指定したいときは "set_page" コマンドを使う @@ -122,10 +122,10 @@ namespace SKELETON const std::string get_current_url(); // urlで指定されるタブがロックされているか - const bool is_locked( const std::string& url ); + bool is_locked( const std::string& url ); // urlで指定されるタブが存在するか - const bool exist_tab( const std::string& url ); + bool exist_tab( const std::string& url ); // 指定したページに表示切替え void set_current_page( const int page ); @@ -138,7 +138,7 @@ namespace SKELETON protected: void set_use_viewhistory( const bool use ){ m_use_viewhistory = use; } - const bool get_use_viewhistory() const { return m_use_viewhistory; } + bool get_use_viewhistory() const { return m_use_viewhistory; } void set_use_switchhistory( const bool use ){ m_use_switchhistory = use; } @@ -301,8 +301,8 @@ namespace SKELETON virtual std::list< bool > get_locked(); // タブのロック/アンロック - virtual const bool is_lockable( const int page ); - virtual const bool is_locked( const int page ); + virtual bool is_lockable( const int page ); + virtual bool is_locked( const int page ); virtual void lock( const int page ); virtual void unlock( const int page ); @@ -327,7 +327,7 @@ namespace SKELETON void slot_popupmenu_deactivate(); - const bool back_forward_viewhistory( const std::string& url, const bool back, const int count ); + bool back_forward_viewhistory( const std::string& url, const bool back, const int count ); // 移転などでviewのurlを更新 void update_url( const std::string& url_old, const std::string& url_new ); diff --git a/src/skeleton/dragnote.cpp b/src/skeleton/dragnote.cpp index 4fed33a92..c75f51e4b 100644 --- a/src/skeleton/dragnote.cpp +++ b/src/skeleton/dragnote.cpp @@ -279,7 +279,7 @@ void DragableNoteBook::set_scrollable( bool scrollable ) } -const int DragableNoteBook::get_n_pages() +int DragableNoteBook::get_n_pages() { return m_notebook_view.get_n_pages(); } @@ -291,13 +291,13 @@ Gtk::Widget* DragableNoteBook::get_nth_page( int page_num ) } -const int DragableNoteBook::page_num( const Gtk::Widget& child ) +int DragableNoteBook::page_num( const Gtk::Widget& child ) { return m_notebook_view.page_num( child ); } -const int DragableNoteBook::get_current_page() +int DragableNoteBook::get_current_page() { return m_notebook_view.get_current_page(); } @@ -473,7 +473,7 @@ void DragableNoteBook::set_current_toolbar( const int id_toolbar, SKELETON::View } -const int DragableNoteBook::get_current_toolbar() +int DragableNoteBook::get_current_toolbar() { return m_notebook_toolbar.get_current_page(); } @@ -516,7 +516,7 @@ void DragableNoteBook::update_toolbar_button() // // タブのアイコンを取得する // -const int DragableNoteBook::get_tabicon( const int page ) +int DragableNoteBook::get_tabicon( const int page ) { SKELETON::TabLabel* tablabel = m_notebook_tab.get_tablabel( page ); if( tablabel ) return tablabel->get_id_icon(); diff --git a/src/skeleton/dragnote.h b/src/skeleton/dragnote.h index 1fcc517fc..c40213188 100644 --- a/src/skeleton/dragnote.h +++ b/src/skeleton/dragnote.h @@ -122,13 +122,13 @@ namespace SKELETON // 枠描画 void draw_box( Gtk::Widget* widget, GdkEventExpose* event ); - const bool get_show_tabs() const{ return m_show_tabs; } + bool get_show_tabs() const { return m_show_tabs; } void set_show_tabs( bool show_tabs ); void set_scrollable( bool scrollable ); - const int get_n_pages(); + int get_n_pages(); Gtk::Widget* get_nth_page( int page_num ); - const int page_num( const Gtk::Widget& child ); - const int get_current_page(); + int page_num( const Gtk::Widget& child ); + int get_current_page(); void set_current_page( int page_num ); int append_page( const std::string& url, Gtk::Widget& child ); @@ -141,7 +141,7 @@ namespace SKELETON void hide_toolbar(); void append_toolbar( Gtk::Widget& toolbar ); void set_current_toolbar( const int id_toolbar, SKELETON::View* view ); - const int get_current_toolbar(); + int get_current_toolbar(); void focus_toolbar_search(); // ツールバー内の検索entryにフォーカスを移す void update_toolbar_url( std::string& url_old, std::string& url_new ); void update_toolbar_button(); @@ -151,7 +151,7 @@ namespace SKELETON void set_tab_fulltext( const std::string& str, const int page ); // タブのアイコン取得/セット - const int get_tabicon( const int page ); + int get_tabicon( const int page ); void set_tabicon( const std::string& iconname, const int page, const int icon ); // ドラッグ可/不可切り替え(デフォルト false ); diff --git a/src/skeleton/dragtreeview.cpp b/src/skeleton/dragtreeview.cpp index 937fc63a1..68027a7b3 100644 --- a/src/skeleton/dragtreeview.cpp +++ b/src/skeleton/dragtreeview.cpp @@ -196,7 +196,7 @@ void DragTreeView::hide_tooltip() // // ポップアップが表示されていてかつマウスがその上にあるか // -const bool DragTreeView::is_mouse_on_popup() +bool DragTreeView::is_mouse_on_popup() { if( ! is_popup_shown() ) return false; if( ! m_popup_win->view() ) return false; @@ -231,7 +231,7 @@ void DragTreeView::show_popup( const std::string& url, View* view ) // // popup windowの外にポインタが出た // -const bool DragTreeView::slot_popup_leave_notify_event( GdkEventCrossing* event ) +bool DragTreeView::slot_popup_leave_notify_event( GdkEventCrossing* event ) { #ifdef _DEBUG std::cout << "DragTreeView::slot_popup_leave_notify_event\n"; diff --git a/src/skeleton/dragtreeview.h b/src/skeleton/dragtreeview.h index 2c0048b49..56899c3ee 100644 --- a/src/skeleton/dragtreeview.h +++ b/src/skeleton/dragtreeview.h @@ -131,15 +131,15 @@ namespace SKELETON private: // ポップアップが表示されているか - const bool is_popup_shown() const { return ( m_popup_win && m_popup_shown ); } + bool is_popup_shown() const { return ( m_popup_win && m_popup_shown ); } // ポップアップ削除 void delete_popup(); // ポップアップが表示されていてかつマウスがその上にあるか - const bool is_mouse_on_popup(); + bool is_mouse_on_popup(); - const bool slot_popup_leave_notify_event( GdkEventCrossing* event ); + bool slot_popup_leave_notify_event( GdkEventCrossing* event ); void slot_selection_changed(); }; } diff --git a/src/skeleton/edittreeview.cpp b/src/skeleton/edittreeview.cpp index 0d5e11e1d..8da875354 100644 --- a/src/skeleton/edittreeview.cpp +++ b/src/skeleton/edittreeview.cpp @@ -59,7 +59,7 @@ const std::string get_uptodate_url( const std::string& url_org, const int type ) // // 行の最新状態を取得 // -const int get_uptodate_type( const std::string& url, const int type_org ) +int get_uptodate_type( const std::string& url, const int type_org ) { int type = type_org; @@ -90,7 +90,7 @@ class compare_path SKELETON::EditColumns& m_columns; int m_mode; - const int type_to_order( const int type ) + int type_to_order( const int type ) { int order[]={ @@ -560,7 +560,7 @@ const Gtk::TreePath EditTreeView::dirid_to_path( const size_t dirid ) } -const size_t EditTreeView::path_to_dirid( const Gtk::TreePath path ) +size_t EditTreeView::path_to_dirid( const Gtk::TreePath path ) { Gtk::TreeModel::Row row = get_row( Gtk::TreePath( path ) ); if( row ) return row[ m_columns.m_dirid ]; @@ -936,7 +936,7 @@ void EditTreeView::draw_underline( const Gtk::TreePath& path, const bool draw ) // // path は ディレクトリか // -const bool EditTreeView::is_dir( Gtk::TreeModel::iterator& it ) +bool EditTreeView::is_dir( Gtk::TreeModel::iterator& it ) { const Gtk::TreeRow row = ( *it ); if( ! row ) return false; @@ -946,7 +946,7 @@ const bool EditTreeView::is_dir( Gtk::TreeModel::iterator& it ) return false; } -const bool EditTreeView::is_dir( const Gtk::TreePath& path ) +bool EditTreeView::is_dir( const Gtk::TreePath& path ) { if( path.size() <= 0 ) return false; Gtk::TreeModel::iterator it = get_model()->get_iter( path ); @@ -991,7 +991,7 @@ void EditTreeView::next_dir() // // 指定したアドレスの行が含まれているか // -const bool EditTreeView::exist_row( const std::string& url, const int type ) +bool EditTreeView::exist_row( const std::string& url, const int type ) { if( url.empty() ) return false; diff --git a/src/skeleton/edittreeview.h b/src/skeleton/edittreeview.h index 32191f956..9c9f6496d 100644 --- a/src/skeleton/edittreeview.h +++ b/src/skeleton/edittreeview.h @@ -97,7 +97,7 @@ namespace SKELETON void set_undo_buffer( UNDO_BUFFER* undo_buffer ){ m_undo_buffer = undo_buffer; } - const bool is_updated() const { return m_updated; }; + bool is_updated() const { return m_updated; }; void set_updated( const bool set ){ m_updated = set; } // treestoreのセット @@ -117,15 +117,15 @@ namespace SKELETON void set_editable_view( const bool editable ); // 指定した path のタイプは ディレクトリか - const bool is_dir( Gtk::TreeModel::iterator& it ); - const bool is_dir( const Gtk::TreePath& path ); + bool is_dir( Gtk::TreeModel::iterator& it ); + bool is_dir( const Gtk::TreePath& path ); // 次のディレクトリに移動 void prev_dir(); void next_dir(); // 指定したアドレスの行が含まれているか - const bool exist_row( const std::string& url, const int type ); + bool exist_row( const std::string& url, const int type ); // ディレクトリ内を全選択 void select_all_dir( Gtk::TreePath path_dir ); @@ -135,14 +135,14 @@ namespace SKELETON // ディレクトリIDとパスを相互変換 const Gtk::TreePath dirid_to_path( const size_t dirid ); - const size_t path_to_dirid( const Gtk::TreePath path ); + size_t path_to_dirid( const Gtk::TreePath path ); // コメント挿入 const Gtk::TreePath create_newcomment( const Gtk::TreePath& path ); // pathで指定した行の名前の変更 void rename_row( const Gtk::TreePath& path ); - const bool is_renaming_row(){ return m_ren_text->property_editable(); } + bool is_renaming_row(){ return m_ren_text->property_editable(); } // list_info を path_dest 以下に追加 // @@ -286,7 +286,7 @@ namespace SKELETON void operator ++ (); - const bool end() const { return m_end; } + bool end() const { return m_end; } }; } diff --git a/src/skeleton/iconpopup.h b/src/skeleton/iconpopup.h index 9c518f29c..946f5b507 100644 --- a/src/skeleton/iconpopup.h +++ b/src/skeleton/iconpopup.h @@ -31,8 +31,8 @@ namespace SKELETON show_all_children(); } - const int get_img_width(){ return m_pixbuf->get_width(); } - const int get_img_height(){ return m_pixbuf->get_height(); } + int get_img_width(){ return m_pixbuf->get_width(); } + int get_img_height(){ return m_pixbuf->get_height(); } }; } diff --git a/src/skeleton/label_entry.cpp b/src/skeleton/label_entry.cpp index 411e1c9bd..12907d80d 100644 --- a/src/skeleton/label_entry.cpp +++ b/src/skeleton/label_entry.cpp @@ -83,7 +83,7 @@ void LabelEntry::grab_focus() } -const bool LabelEntry::has_grab() +bool LabelEntry::has_grab() { if( m_editable ) return m_entry.has_grab(); return false; diff --git a/src/skeleton/label_entry.h b/src/skeleton/label_entry.h index 0bd067b71..cad467743 100644 --- a/src/skeleton/label_entry.h +++ b/src/skeleton/label_entry.h @@ -39,7 +39,7 @@ namespace SKELETON const Glib::ustring get_text(); void grab_focus(); - const bool has_grab(); + bool has_grab(); private: diff --git a/src/skeleton/loadable.cpp b/src/skeleton/loadable.cpp index 77d04c8c3..6ca2d2808 100644 --- a/src/skeleton/loadable.cpp +++ b/src/skeleton/loadable.cpp @@ -57,7 +57,7 @@ void Loadable::clear_load_data() -const bool Loadable::is_loading() const +bool Loadable::is_loading() const { if( ! m_loader ) return false; @@ -69,7 +69,7 @@ const bool Loadable::is_loading() const // // 更新時刻 // -const time_t Loadable::get_time_modified() +time_t Loadable::get_time_modified() { time_t time_out; time_out = MISC::datetotime( m_date_modified ); @@ -204,7 +204,7 @@ void Loadable::callback_dispatch() // ローダから各種情報の取得 -const int Loadable::get_loader_code() +int Loadable::get_loader_code() { if( ! m_loader ) return HTTP_INIT; @@ -252,7 +252,7 @@ const std::string Loadable::get_loader_location() } -const size_t Loadable::get_loader_length() +size_t Loadable::get_loader_length() { if( ! m_loader ) return 0; diff --git a/src/skeleton/loadable.h b/src/skeleton/loadable.h index 2121f99da..39458b85c 100644 --- a/src/skeleton/loadable.h +++ b/src/skeleton/loadable.h @@ -84,10 +84,10 @@ namespace SKELETON void clear_load_data(); // ロード中かどうか - const bool is_loading() const; + bool is_loading() const; - const int get_code() const { return m_code; } - void set_code( int code ){ m_code = code; } + int get_code() const { return m_code; } + void set_code( int code ) { m_code = code; } const std::string& get_str_code() const { return m_str_code; } void set_str_code( const std::string& str_code ){ m_str_code = str_code; } @@ -97,14 +97,14 @@ namespace SKELETON const std::list< std::string >& cookies() { return m_cookies; } const std::string& location() const { return m_location; } - const size_t total_length() const { return m_total_length; } + size_t total_length() const { return m_total_length; } void set_total_length( int length ){ m_total_length = length; } - const size_t current_length() const { return m_current_length; } + size_t current_length() const { return m_current_length; } void set_current_length( int length ){ m_current_length = length; } // 更新時刻関係 - const time_t get_time_modified(); + time_t get_time_modified(); const std::string& get_date_modified() const { return m_date_modified; } void set_date_modified( const std::string& date ){ m_date_modified = date; } @@ -141,13 +141,13 @@ namespace SKELETON void delete_loader(); void callback_dispatch() override; - const int get_loader_code(); + int get_loader_code(); const std::string get_loader_str_code(); const std::string get_loader_contenttype(); const std::string get_loader_modified(); const std::list< std::string > get_loader_cookies(); const std::string get_loader_location(); - const size_t get_loader_length(); + size_t get_loader_length(); }; } diff --git a/src/skeleton/lockable.h b/src/skeleton/lockable.h index a71acda87..48155a052 100644 --- a/src/skeleton/lockable.h +++ b/src/skeleton/lockable.h @@ -22,7 +22,7 @@ namespace SKELETON virtual ~Lockable() noexcept {} - const int get_lock() const { return m_lock; } + int get_lock() const { return m_lock; } void lock(){ ++m_lock; } void unlock(){ diff --git a/src/skeleton/login.h b/src/skeleton/login.h index 16a337339..ad99346e8 100644 --- a/src/skeleton/login.h +++ b/src/skeleton/login.h @@ -30,7 +30,7 @@ namespace SKELETON Login( const std::string& url ); ~Login(); - const bool login_now() const { return m_login_now; } + bool login_now() const { return m_login_now; } void set_login_now( bool login_now ){ m_login_now = login_now; } const std::string& get_url() const { return m_url; } diff --git a/src/skeleton/panecontrol.h b/src/skeleton/panecontrol.h index 02fcd9516..481bfebfb 100644 --- a/src/skeleton/panecontrol.h +++ b/src/skeleton/panecontrol.h @@ -69,11 +69,11 @@ namespace SKELETON // PANE_MAX_PAGE1 などを指定 void set_mode( int mode ); - const int get_mode() const { return m_mode; } + int get_mode() const { return m_mode; } // PANE_CLICK_FOLD_PAGE1 などを指定 void set_click_fold( int mode ){ m_click_fold = mode; } - const int get_click_fold() const { return m_click_fold; } + int get_click_fold() const { return m_click_fold; } void add_remove1( bool unpack, Gtk::Widget& child ); void add_remove2( bool unpack, Gtk::Widget& child ); @@ -86,7 +86,7 @@ namespace SKELETON protected: - const bool is_on_paned() const { return m_on_paned; } + bool is_on_paned() const { return m_on_paned; } Gtk::Paned& get_paned(){ return m_paned; } virtual int get_size() = 0; virtual bool is_separater_clicked( GdkEventButton* event ) = 0; diff --git a/src/skeleton/tablabel.cpp b/src/skeleton/tablabel.cpp index 7f6e49ba2..6db95a47e 100644 --- a/src/skeleton/tablabel.cpp +++ b/src/skeleton/tablabel.cpp @@ -117,7 +117,7 @@ void TabLabel::set_dragable( bool dragable, int button ) // // 本体の横幅 - ラベルの横幅 // -const int TabLabel::get_label_margin() +int TabLabel::get_label_margin() { int label_margin; diff --git a/src/skeleton/tablabel.h b/src/skeleton/tablabel.h index 16c42a9e0..767dd53b8 100644 --- a/src/skeleton/tablabel.h +++ b/src/skeleton/tablabel.h @@ -55,10 +55,10 @@ namespace SKELETON SIG_TAB_DRAG_DATA_GET sig_tab_drag_data_get() { return m_sig_tab_drag_data_get; } SIG_TAB_DRAG_END sig_tab_drag_end() { return m_sig_tab_drag_end; } - const int get_tab_x() const { return m_x; } - const int get_tab_y() const { return m_y; } - const int get_tab_width() const { return m_width; } - const int get_tab_height() const { return m_height; } + int get_tab_x() const { return m_x; } + int get_tab_y() const { return m_y; } + int get_tab_width() const { return m_width; } + int get_tab_height() const { return m_height; } void set_tab_x( const int x ){ m_x = x; } void set_tab_y( const int y ){ m_y = y; } @@ -73,7 +73,7 @@ namespace SKELETON void set_dragable( bool dragable, int button ); // 本体の横幅 - ラベルの横幅 - const int get_label_margin(); + int get_label_margin(); // カットしていない全体の文字列 const std::string& get_fulltext() const { return m_fulltext; } @@ -81,7 +81,7 @@ namespace SKELETON // アイコンセット void set_id_icon( const int id ); - const int get_id_icon() const { return m_id_icon; } + int get_id_icon() const { return m_id_icon; } // タブの文字列の文字数をlngにセット void resize_tab( const unsigned int lng ); diff --git a/src/skeleton/tabnote.cpp b/src/skeleton/tabnote.cpp index ec18cc415..d69735d6b 100644 --- a/src/skeleton/tabnote.cpp +++ b/src/skeleton/tabnote.cpp @@ -105,7 +105,7 @@ struct _GtkNotebookPage // 描画本体 -const bool TabNotebook::paint( GdkEventExpose* event ) +bool TabNotebook::paint( GdkEventExpose* event ) { GtkNotebook *notebook = gobj(); if( ! notebook || ! notebook->cur_page || ! GTK_WIDGET_VISIBLE( notebook->cur_page->child ) ) return true; @@ -292,7 +292,7 @@ void TabNotebook::get_arrow_rect( GtkWidget *widget, const GtkNotebook *notebook // タブ描画領域の位置、幅、高さを取得 -const gboolean TabNotebook::get_event_window_position( const GtkWidget *widget, const GtkNotebook *notebook, GdkRectangle *rectangle ) +gboolean TabNotebook::get_event_window_position( const GtkWidget *widget, const GtkNotebook *notebook, GdkRectangle *rectangle ) { GtkNotebookPage* visible_page = NULL; GList* children = notebook->children; @@ -472,7 +472,7 @@ SKELETON::TabLabel* TabNotebook::get_tablabel( int page ) // タブ上では無いときは-1を返す // マウスがタブの右側にある場合はページ数( get_n_pages() )を返す // -const int TabNotebook::get_page_under_mouse() +int TabNotebook::get_page_under_mouse() { int x, y; Gdk::Rectangle rect = get_allocation(); diff --git a/src/skeleton/tabnote.h b/src/skeleton/tabnote.h index da57e391e..6f86a9835 100644 --- a/src/skeleton/tabnote.h +++ b/src/skeleton/tabnote.h @@ -90,7 +90,7 @@ namespace SKELETON // マウスの下にあるタブの番号を取得 // タブ上では無いときは-1を返す // マウスがタブの右側にある場合はページ数の値を返す - const int get_page_under_mouse(); + int get_page_under_mouse(); // タブの高さ、幅、位置を取得 ( 描画用 ) void get_alloc_tab( Alloc_NoteBook& alloc ); @@ -98,7 +98,7 @@ namespace SKELETON private: // gtknotebook.c ( Revision 19311, 2008-01-06 ) を参考にして作成した描画関係の関数 - const bool paint( GdkEventExpose* event ); + bool paint( GdkEventExpose* event ); void draw_tab( const GtkNotebook *notebook, const GtkNotebookPage *page, @@ -114,7 +114,7 @@ namespace SKELETON const int nbarrow ); void get_arrow_rect( GtkWidget *widget, const GtkNotebook *notebook, GdkRectangle *rectangle, const gboolean before ); - const gboolean get_event_window_position( const GtkWidget *widget, const GtkNotebook *notebook, GdkRectangle *rectangle ); + gboolean get_event_window_position( const GtkWidget *widget, const GtkNotebook *notebook, GdkRectangle *rectangle ); // 各タブのサイズと座標を取得 diff --git a/src/skeleton/toolbar.cpp b/src/skeleton/toolbar.cpp index 8c2129622..c5acb7512 100644 --- a/src/skeleton/toolbar.cpp +++ b/src/skeleton/toolbar.cpp @@ -88,7 +88,7 @@ void ToolBar::set_url( const std::string& url ) } -const bool ToolBar::is_empty() +bool ToolBar::is_empty() { return ( ! m_buttonbar.get_children().size() ); } diff --git a/src/skeleton/toolbar.h b/src/skeleton/toolbar.h index 595ad1d38..23e3f6233 100644 --- a/src/skeleton/toolbar.h +++ b/src/skeleton/toolbar.h @@ -83,7 +83,7 @@ namespace SKELETON void set_url( const std::string& url ); const std::string& get_url() { return m_url; } - const bool is_empty(); + bool is_empty(); // タブが切り替わった時にDragableNoteBookから呼び出される( Viewの情報を取得する ) virtual void set_view( SKELETON::View * view ); diff --git a/src/skeleton/treeviewbase.cpp b/src/skeleton/treeviewbase.cpp index 7d3685a62..a09239308 100644 --- a/src/skeleton/treeviewbase.cpp +++ b/src/skeleton/treeviewbase.cpp @@ -26,7 +26,7 @@ JDTreeViewBase::~JDTreeViewBase() noexcept // // 行数 // -const int JDTreeViewBase::get_row_size() +int JDTreeViewBase::get_row_size() { if( ! get_model() ) return 0; @@ -198,7 +198,7 @@ void JDTreeViewBase::goto_bottom() // // 選択行を上へ移動 // -const bool JDTreeViewBase::row_up() +bool JDTreeViewBase::row_up() { Gtk::TreePath path = get_current_path(); if( !get_row( path ) ) return false; @@ -215,7 +215,7 @@ const bool JDTreeViewBase::row_up() // // 選択行を下へ移動 // -const bool JDTreeViewBase::row_down() +bool JDTreeViewBase::row_down() { Gtk::TreePath path = get_current_path(); if( !get_row( path ) ) return false; @@ -359,7 +359,7 @@ void JDTreeViewBase::expand_parents( const Gtk::TreePath& path ) // // pathが開かれているか // -const bool JDTreeViewBase::is_expand( const Gtk::TreePath& path ) +bool JDTreeViewBase::is_expand( const Gtk::TreePath& path ) { Gtk::TreePath parent( path ); diff --git a/src/skeleton/treeviewbase.h b/src/skeleton/treeviewbase.h index 957a034c9..fce59e63b 100644 --- a/src/skeleton/treeviewbase.h +++ b/src/skeleton/treeviewbase.h @@ -46,7 +46,7 @@ namespace SKELETON ~JDTreeViewBase() noexcept; // 行数 - const int get_row_size(); + int get_row_size(); // カーソル解除 void unset_cursor(){ get_selection()->unselect_all(); } @@ -75,8 +75,8 @@ namespace SKELETON // 選択行の移動 void goto_top(); void goto_bottom(); - const bool row_up(); - const bool row_down(); + bool row_up(); + bool row_down(); void page_up(); void page_down(); @@ -91,7 +91,7 @@ namespace SKELETON void expand_parents( const Gtk::TreePath& path ); // pathが開かれているか - const bool is_expand( const Gtk::TreePath& path ); + bool is_expand( const Gtk::TreePath& path ); // 行のセルの高さ int get_row_height(); diff --git a/src/skeleton/undobuffer.h b/src/skeleton/undobuffer.h index 546a68839..2d63cbef6 100644 --- a/src/skeleton/undobuffer.h +++ b/src/skeleton/undobuffer.h @@ -64,8 +64,8 @@ namespace SKELETON UNDO_DATA& get_undo_data(){ return m_vec_undo[ m_pos ]; } - const bool get_enable_undo() const { return ( m_pos ); } - const bool get_enable_redo() const { return ( m_pos < m_max ); } + bool get_enable_undo() const { return ( m_pos ); } + bool get_enable_redo() const { return ( m_pos < m_max ); } void undo(); void redo(); diff --git a/src/skeleton/view.cpp b/src/skeleton/view.cpp index ec9657643..0e22767b6 100644 --- a/src/skeleton/view.cpp +++ b/src/skeleton/view.cpp @@ -160,7 +160,7 @@ void View::reset_keyjump_counter() // 数字入力ジャンプ用に sig_key_press() から呼び出す -const bool View::release_keyjump_key( int key ) +bool View::release_keyjump_key( int key ) { // キーパッド対応 if( key >= GDK_KP_0 && key <= GDK_KP_9 ) key = key - GDK_KP_0 + GDK_0; @@ -180,7 +180,7 @@ const bool View::release_keyjump_key( int key ) // view 上にマウスポインタがあれば true -const bool View::is_mouse_on_view() +bool View::is_mouse_on_view() { bool ret = false; diff --git a/src/skeleton/view.h b/src/skeleton/view.h index 1b6eb149a..87a167390 100644 --- a/src/skeleton/view.h +++ b/src/skeleton/view.h @@ -110,7 +110,7 @@ namespace SKELETON // マウスジェスチャ void set_enable_mg( bool mg ){ m_enable_mg = mg; } - const bool enable_mg() const { return m_enable_mg; } + bool enable_mg() const { return m_enable_mg; } // オートリロードのカウンタをインクリメント // 指定秒数を越えたら true を返す @@ -123,11 +123,11 @@ namespace SKELETON void reset_autoreload_counter(); // オートリロード間隔設定 - const int get_autoreload_sec() const{ return m_autoreload_sec; } + int get_autoreload_sec() const { return m_autoreload_sec; } void set_autoreload_sec( const int sec ){ m_autoreload_sec = sec; } // オートリロード用のカウンタ - const int get_autoreload_counter() const{ return m_autoreload_counter; } + int get_autoreload_counter() const { return m_autoreload_counter; } void set_autoreload_counter( const int counter ) { m_autoreload_counter = counter; } // 数字入力ジャンプカウンタのインクリメント @@ -138,7 +138,7 @@ namespace SKELETON void reset_keyjump_counter(); // 数字入力ジャンプ用に sig_key_press() から呼び出す - const bool release_keyjump_key( int key ); + bool release_keyjump_key( int key ); // ポップアップメニュー表示 void show_popupmenu( const std::string& url, bool use_slot = false ); @@ -184,31 +184,30 @@ namespace SKELETON // タブの切り替えのときに Admin から参照される // コンストラクタであらかじめ指定しておくこと void set_id_toolbar( const int id ) { m_id_toolbar = id; } - const int get_id_toolbar() const { return m_id_toolbar; } + int get_id_toolbar() const { return m_id_toolbar; } // ロック/アンロック - const bool is_lockable() const { return m_lockable; } + bool is_lockable() const { return m_lockable; } void set_lockable( const bool lockable ){ m_lockable = lockable; } - const bool is_locked() const { return m_locked; } + bool is_locked() const { return m_locked; } virtual void lock(){ m_locked = true; } virtual void unlock(){ m_locked = false; } // 書き込み可能/不可能 - const bool is_writeable() const { return m_writeable; } + bool is_writeable() const { return m_writeable; } void set_writeable( const bool writeable ){ m_writeable = writeable; } // ポップアップ時に全ての領域を表示できないならカーソルの上に表示 - const bool get_popup_upside() const { return m_popup_upside; } + bool get_popup_upside() const { return m_popup_upside; } void set_popup_upside( const bool upside ){ m_popup_upside = upside; } // view 上にマウスポインタがあれば true - const bool is_mouse_on_view(); + bool is_mouse_on_view(); // 各view個別のコマンド - virtual const bool set_command( const std::string& command, - const std::string& arg1 = std::string(), - const std::string& arg2 = std::string() - ){ return true; } + virtual bool set_command( const std::string& command, + const std::string& arg1 = {}, + const std::string& arg2 = {} ) { return true; } // コピー用のURL virtual const std::string url_for_copy(){ return m_url; } @@ -223,47 +222,47 @@ namespace SKELETON virtual const std::string& get_status(){ return m_status; } // クライアント領域の幅、高さ - virtual const int width_client(){ return m_width_client; } - virtual const int height_client(){ return m_height_client; } + virtual int width_client(){ return m_width_client; } + virtual int height_client(){ return m_height_client; } void set_width_client( int val ){ m_width_client = val; } void set_height_client( int val ){ m_height_client = val; } // オートリロード可能か - const bool get_enable_autoreload() const { return m_enable_autoreload; } + bool get_enable_autoreload() const { return m_enable_autoreload; } // オートリロードのモード設定 void set_autoreload_mode( int mode, int sec ); // 現在のオートリロードのモード取得 - const int get_autoreload_mode() const { return m_autoreload_mode; } + int get_autoreload_mode() const { return m_autoreload_mode; } // ロード時にキャッシュを削除してからviewを再読み込みする - const bool get_reget() const{ return m_reget; } + bool get_reget() const{ return m_reget; } void set_reget( const bool reget ){ m_reget = reget; } // アイコンのID取得 - virtual const int get_icon( const std::string& iconname ){ return -1; } + virtual int get_icon( const std::string& iconname ){ return -1; } // ロード中 - virtual const bool is_loading() const { return false; } + virtual bool is_loading() const { return false; } // 更新した - virtual const bool is_updated(){ return false;} + virtual bool is_updated(){ return false;} // 更新チェックして更新可能か - virtual const bool is_check_update(){ return false;} + virtual bool is_check_update(){ return false;} // 古いデータか - virtual const bool is_old(){ return false;} + virtual bool is_old(){ return false;} // 壊れているか - virtual const bool is_broken(){ return false; } + virtual bool is_broken(){ return false; } // ラベルやステータスバーの色 const std::string get_color(); // キーを押した - virtual const bool slot_key_press( GdkEventKey* event ){ return false; } + virtual bool slot_key_press( GdkEventKey* event ){ return false; } // クロック入力 // clock_in()はビューがアクティブのときに呼び出される @@ -286,7 +285,7 @@ namespace SKELETON virtual void delete_view(){} virtual void set_favorite(){} virtual void update_item( const std::string& url, const std::string& id ){} - virtual const bool operate_view( const int ) = 0; + virtual bool operate_view( const int ) = 0; virtual void goto_top(){} virtual void goto_bottom(){} virtual void goto_num( const int num_to, const int num_from ){} diff --git a/src/skeleton/window.cpp b/src/skeleton/window.cpp index aa2664f3b..890a038bd 100644 --- a/src/skeleton/window.cpp +++ b/src/skeleton/window.cpp @@ -342,7 +342,7 @@ void JDWindow::set_win_pos() // hide 中 -const bool JDWindow::is_hide() +bool JDWindow::is_hide() { return ( m_mode == JDWIN_HIDE ); } diff --git a/src/skeleton/window.h b/src/skeleton/window.h index e39e0a4c0..cf554b3ef 100644 --- a/src/skeleton/window.h +++ b/src/skeleton/window.h @@ -70,10 +70,10 @@ namespace SKELETON void set_spacing( int space ); // hide 中 - const bool is_hide(); + bool is_hide(); // 起動中 - const bool is_booting() const { return m_boot; } + bool is_booting() const { return m_boot; } void pack_remove_start( bool unpack, Widget& child, Gtk::PackOptions options = Gtk::PACK_EXPAND_WIDGET, guint padding = 0 ); void pack_remove_end( bool unpack, Widget& child, Gtk::PackOptions options = Gtk::PACK_EXPAND_WIDGET, guint padding = 0 ); @@ -105,29 +105,29 @@ namespace SKELETON virtual void switch_admin(){} - virtual const int get_x_win() = 0; - virtual const int get_y_win() = 0; + virtual int get_x_win() = 0; + virtual int get_y_win() = 0; virtual void set_x_win( const int x ) = 0; virtual void set_y_win( const int y ) = 0; - virtual const int get_width_win() = 0; - virtual const int get_height_win() = 0; + virtual int get_width_win() = 0; + virtual int get_height_win() = 0; virtual void set_width_win( const int width ) = 0; virtual void set_height_win( const int height ) = 0; - virtual const bool is_focus_win() = 0; + virtual bool is_focus_win() = 0; virtual void set_focus_win( const bool set ) = 0; - virtual const bool is_maximized_win() = 0; + virtual bool is_maximized_win() = 0; virtual void set_maximized_win( const bool set ) = 0; - virtual const bool is_iconified_win() = 0; + virtual bool is_iconified_win() = 0; virtual void set_iconified_win( const bool set ) = 0; - virtual const bool is_full_win() = 0; + virtual bool is_full_win() = 0; virtual void set_full_win( const bool set ) = 0; - virtual const bool is_shown_win() = 0; + virtual bool is_shown_win() = 0; virtual void set_shown_win( const bool set ) = 0; bool on_focus_in_event( GdkEventFocus* event ) override; diff --git a/src/sound/playsound.h b/src/sound/playsound.h index fdd725620..c5d43d597 100644 --- a/src/sound/playsound.h +++ b/src/sound/playsound.h @@ -58,7 +58,7 @@ namespace SOUND Play_Sound(); ~Play_Sound(); - const bool is_playing() const { return m_playing; } + bool is_playing() const { return m_playing; } void play( const std::string& wavfile ); void stop(); diff --git a/src/urlreplacemanager.cpp b/src/urlreplacemanager.cpp index f1f1a6ea6..fa9928a9e 100644 --- a/src/urlreplacemanager.cpp +++ b/src/urlreplacemanager.cpp @@ -137,7 +137,7 @@ void Urlreplace_Manager::conf2list( const std::string& conf ) // // URLを任意の正規表現で変換する // -const bool Urlreplace_Manager::exec( std::string &url ) +bool Urlreplace_Manager::exec( std::string &url ) { if( m_list_cmd.empty() ) return false; @@ -171,7 +171,7 @@ const bool Urlreplace_Manager::exec( std::string &url ) // // URLからリファラを求める // -const bool Urlreplace_Manager::referer( const std::string &url, std::string &referer ) +bool Urlreplace_Manager::referer( const std::string &url, std::string &referer ) { if( m_list_cmd.empty() ) return false; @@ -207,7 +207,7 @@ const bool Urlreplace_Manager::referer( const std::string &url, std::string &ref // // URLの画像コントロールを取得する (URLキャッシュ) // -const int Urlreplace_Manager::get_imgctrl( const std::string &url ) +int Urlreplace_Manager::get_imgctrl( const std::string &url ) { if( m_list_cmd.empty() ) return IMGCTRL_NONE; @@ -225,7 +225,7 @@ const int Urlreplace_Manager::get_imgctrl( const std::string &url ) // // URLの画像コントロールを取得する // -const int Urlreplace_Manager::get_imgctrl_impl( const std::string &url ) +int Urlreplace_Manager::get_imgctrl_impl( const std::string &url ) { int imgctrl = IMGCTRL_NONE; diff --git a/src/urlreplacemanager.h b/src/urlreplacemanager.h index fa89f8414..040c207fc 100644 --- a/src/urlreplacemanager.h +++ b/src/urlreplacemanager.h @@ -42,18 +42,18 @@ namespace CORE virtual ~Urlreplace_Manager() noexcept {} // URLを任意の正規表現で変換する - const bool exec( std::string &url ); + bool exec( std::string &url ); // URLからリファラを求める - const bool referer( const std::string &url, std::string &referer ); + bool referer( const std::string &url, std::string &referer ); // URLの画像コントロールを取得する - const int get_imgctrl( const std::string &url ); + int get_imgctrl( const std::string &url ); private: void conf2list( const std::string& conf ); - const int get_imgctrl_impl( const std::string &url ); + int get_imgctrl_impl( const std::string &url ); // 置換文字列を変換 void replace( JDLIB::Regex ®ex, std::string &str ); diff --git a/src/usrcmdmanager.cpp b/src/usrcmdmanager.cpp index 1b63b15b3..49e633bc4 100644 --- a/src/usrcmdmanager.cpp +++ b/src/usrcmdmanager.cpp @@ -277,7 +277,7 @@ void Usrcmd_Manager::exec( const std::string command, // コマンド // // 文字列置換用テキストダイアログ表示 // -const bool Usrcmd_Manager::show_replacetextdiag( std::string& texti, const std::string& title ) +bool Usrcmd_Manager::show_replacetextdiag( std::string& texti, const std::string& title ) { if( ! texti.empty() ) return true; @@ -410,7 +410,7 @@ const std::string Usrcmd_Manager::replace_cmd( const std::string& cmd, // // メニューをアクティブにするか // -const bool Usrcmd_Manager::is_sensitive( int num, const std::string& link, const std::string& selection ) +bool Usrcmd_Manager::is_sensitive( int num, const std::string& link, const std::string& selection ) { const unsigned int max_selection_str = 1024; @@ -450,7 +450,7 @@ const bool Usrcmd_Manager::is_sensitive( int num, const std::string& link, const // // メニューを隠すか // -const bool Usrcmd_Manager::is_hide( int num, const std::string& url ) +bool Usrcmd_Manager::is_hide( int num, const std::string& url ) { if( num >= m_size ) return false; diff --git a/src/usrcmdmanager.h b/src/usrcmdmanager.h index 501c10bb3..01226983f 100644 --- a/src/usrcmdmanager.h +++ b/src/usrcmdmanager.h @@ -33,7 +33,7 @@ namespace CORE void analyze_xml(); void save_xml(); - const int get_size() const { return m_size; } + int get_size() const { return m_size; } // 実行 void exec( const int comnum, // コマンド番号 @@ -77,11 +77,11 @@ namespace CORE void txt2xml(); - const bool show_replacetextdiag( std::string& texti, const std::string& title ); + bool show_replacetextdiag( std::string& texti, const std::string& title ); void set_cmd( const std::string& cmd ); - const bool is_sensitive( int num, const std::string& link, const std::string& selection ); - const bool is_hide( int num, const std::string& url ); + bool is_sensitive( int num, const std::string& link, const std::string& selection ); + bool is_hide( int num, const std::string& url ); }; /////////////////////////////////////// diff --git a/src/winmain.cpp b/src/winmain.cpp index 31a0c90bd..4c60e0bb4 100644 --- a/src/winmain.cpp +++ b/src/winmain.cpp @@ -156,12 +156,12 @@ void JDWinMain::hide() } -const int JDWinMain::get_x_win() +int JDWinMain::get_x_win() { return SESSION::get_x_win_main(); } -const int JDWinMain::get_y_win() +int JDWinMain::get_y_win() { return SESSION::get_y_win_main(); } @@ -176,12 +176,12 @@ void JDWinMain::set_y_win( const int y ) SESSION::set_y_win_main( y ); } -const int JDWinMain::get_width_win() +int JDWinMain::get_width_win() { return SESSION::get_width_win_main(); } -const int JDWinMain::get_height_win() +int JDWinMain::get_height_win() { return SESSION::get_height_win_main(); } @@ -196,7 +196,7 @@ void JDWinMain::set_height_win( const int height ) SESSION::set_height_win_main( height ); } -const bool JDWinMain::is_focus_win() +bool JDWinMain::is_focus_win() { return SESSION::is_focus_win_main(); } @@ -207,7 +207,7 @@ void JDWinMain::set_focus_win( const bool set ) } -const bool JDWinMain::is_maximized_win() +bool JDWinMain::is_maximized_win() { return SESSION::is_maximized_win_main(); } @@ -219,7 +219,7 @@ void JDWinMain::set_maximized_win( const bool set ) } -const bool JDWinMain::is_iconified_win() +bool JDWinMain::is_iconified_win() { return SESSION::is_iconified_win_main(); } @@ -230,7 +230,7 @@ void JDWinMain::set_iconified_win( const bool set ) } -const bool JDWinMain::is_full_win() +bool JDWinMain::is_full_win() { return SESSION::is_full_win_main(); } @@ -241,7 +241,7 @@ void JDWinMain::set_full_win( const bool set ) } -const bool JDWinMain::is_shown_win() +bool JDWinMain::is_shown_win() { return SESSION::is_shown_win_main(); } @@ -344,7 +344,7 @@ bool JDWinMain::on_motion_notify_event( GdkEventMotion* event ) } -const bool JDWinMain::operate_win( const int control ) +bool JDWinMain::operate_win( const int control ) { return CONTROL::operate_common( control, std::string(), NULL ); } diff --git a/src/winmain.h b/src/winmain.h index 9fdb5322a..51e294e21 100644 --- a/src/winmain.h +++ b/src/winmain.h @@ -35,29 +35,29 @@ class JDWinMain : public SKELETON::JDWindow protected: - const int get_x_win() override; - const int get_y_win() override; + int get_x_win() override; + int get_y_win() override; void set_x_win( const int x ) override; void set_y_win( const int y ) override; - const int get_width_win() override; - const int get_height_win() override; + int get_width_win() override; + int get_height_win() override; void set_width_win( const int width ) override; void set_height_win( const int height ) override; - const bool is_focus_win() override; + bool is_focus_win() override; void set_focus_win( const bool set ) override; - const bool is_maximized_win() override; + bool is_maximized_win() override; void set_maximized_win( const bool set ) override; - const bool is_iconified_win() override; + bool is_iconified_win() override; void set_iconified_win( const bool set ) override; - const bool is_full_win() override; + bool is_full_win() override; void set_full_win( const bool set ) override; - const bool is_shown_win() override; + bool is_shown_win() override; void set_shown_win( const bool set ) override; bool on_delete_event( GdkEventAny* event ) override; @@ -68,7 +68,7 @@ class JDWinMain : public SKELETON::JDWindow bool on_motion_notify_event( GdkEventMotion* event ) override; private: - const bool operate_win( const int control ); + bool operate_win( const int control ); }; diff --git a/src/xml/dom.cpp b/src/xml/dom.cpp index 7c186264c..11ba1a346 100644 --- a/src/xml/dom.cpp +++ b/src/xml/dom.cpp @@ -530,7 +530,7 @@ void Dom::append_treestore( Glib::RefPtr< Gtk::TreeStore >& treestore, // // プロパティを扱うアクセッサ // -const int Dom::nodeType() +int Dom::nodeType() { return m_nodeType; } @@ -635,7 +635,7 @@ void Dom::parentNode( Dom* parent ) // // ノード:hasChildNodes // -const bool Dom::hasChildNodes() +bool Dom::hasChildNodes() { return ! m_childNodes.empty(); } @@ -859,7 +859,7 @@ void Dom::attributes( const std::map< std::string, std::string > attributes ) // // 属性:hasAttributes() // -const bool Dom::hasAttributes() +bool Dom::hasAttributes() { return ! m_attributes.empty(); } @@ -868,7 +868,7 @@ const bool Dom::hasAttributes() // // 属性:hasAttribute() // -const bool Dom::hasAttribute( const std::string& name ) +bool Dom::hasAttribute( const std::string& name ) { if( name.empty() ) return false; diff --git a/src/xml/dom.h b/src/xml/dom.h index 376e4dd49..c4eb6d50b 100644 --- a/src/xml/dom.h +++ b/src/xml/dom.h @@ -100,7 +100,7 @@ namespace XML DomList getElementsByTagName( const std::string& name ); // プロパティを扱うアクセッサ - const int nodeType(); + int nodeType(); const std::string nodeName(); std::string nodeValue(); void nodeValue( const std::string& value ); @@ -115,7 +115,7 @@ namespace XML Dom* ownerDocument(); Dom* parentNode(); - const bool hasChildNodes(); + bool hasChildNodes(); DomList childNodes(); Dom* firstChild(); Dom* lastChild(); @@ -127,10 +127,10 @@ namespace XML Dom* nextSibling(); // 属性 - const bool hasAttributes(); + bool hasAttributes(); std::map< std::string, std::string > attributes(); void attributes( const std::map< std::string, std::string > attributes ); - const bool hasAttribute( const std::string& name ); + bool hasAttribute( const std::string& name ); std::string getAttribute( const std::string& name ); bool setAttribute( const std::string& name, const std::string& value ); bool setAttribute( const std::string& name, const int& value ); From 18e0bd2bdd8f86cbf90e81b428f1b843cdfb4ab8 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Fri, 7 Dec 2018 00:08:57 +0900 Subject: [PATCH 04/13] Use std::mutex instead of Glib::StaticMutex * Fix compile warning for missing field unused initializer --- src/article/embeddedimage.cpp | 7 +++-- src/dispatchmanager.cpp | 13 +++++---- src/image/imageareabase.cpp | 7 +++-- src/jdlib/imgloader.cpp | 10 +++---- src/jdlib/imgloader.h | 6 ++-- src/jdlib/jdmutex.h | 52 ----------------------------------- src/jdlib/loader.cpp | 21 +++++++------- src/jdlib/timeout.cpp | 6 ++-- src/jdlib/timeout.h | 4 +-- 9 files changed, 38 insertions(+), 88 deletions(-) delete mode 100644 src/jdlib/jdmutex.h diff --git a/src/article/embeddedimage.cpp b/src/article/embeddedimage.cpp index 430d59e71..31825b101 100644 --- a/src/article/embeddedimage.cpp +++ b/src/article/embeddedimage.cpp @@ -7,7 +7,6 @@ #include "articleadmin.h" #include "jdlib/imgloader.h" -#include "jdlib/jdmutex.h" #include "jdlib/miscmsg.h" #include "dbimg/imginterface.h" @@ -17,10 +16,12 @@ #include "message/messageadmin.h" +#include + // // スレッドのランチャ // -static JDLIB::StaticMutex eimg_launcher_mutex = JDLIB_STATIC_MUTEX_INIT; +static std::mutex eimg_launcher_mutex; int redraw_counter = 0; // 0 になったとき再描画する void* eimg_launcher( void* dat ) @@ -29,7 +30,7 @@ void* eimg_launcher( void* dat ) // 遅いCPUの場合は同時に画像をリサイズしようとすると固まった様になるので // mutexをかけて同時にリサイズしないようにする - JDLIB::LockGuard lock( eimg_launcher_mutex ); + std::lock_guard< std::mutex > lock( eimg_launcher_mutex ); #ifdef _DEBUG std::cout << "start eimg_launcher" << std::endl; diff --git a/src/dispatchmanager.cpp b/src/dispatchmanager.cpp index 21c771458..8b563a4e1 100644 --- a/src/dispatchmanager.cpp +++ b/src/dispatchmanager.cpp @@ -5,11 +5,12 @@ #include "dispatchmanager.h" -#include "jdlib/jdmutex.h" #include "skeleton/dispatchable.h" +#include -static JDLIB::StaticMutex dispatch_mutex = JDLIB_STATIC_MUTEX_INIT; + +static std::mutex dispatch_mutex; CORE::DispatchManager* instance_dispmanager = NULL; @@ -52,7 +53,7 @@ DispatchManager::~DispatchManager() void DispatchManager::add( SKELETON::Dispatchable* child ) { - JDLIB::LockGuard lock( dispatch_mutex ); + std::lock_guard< std::mutex > lock( dispatch_mutex ); // 既にlistに登録されていたらキャンセルする std::list< SKELETON::Dispatchable* >::iterator it = m_children.begin(); @@ -76,7 +77,7 @@ void DispatchManager::add( SKELETON::Dispatchable* child ) void DispatchManager::remove( SKELETON::Dispatchable* child ) { - JDLIB::LockGuard lock( dispatch_mutex ); + std::lock_guard< std::mutex > lock( dispatch_mutex ); size_t size = m_children.size(); if( ! size ) return; @@ -92,7 +93,7 @@ void DispatchManager::remove( SKELETON::Dispatchable* child ) void DispatchManager::slot_dispatch() { - JDLIB::UniqueLock lock( dispatch_mutex ); + std::unique_lock< std::mutex > lock( dispatch_mutex ); const size_t size = m_children.size(); if( ! size ) return; @@ -102,7 +103,7 @@ void DispatchManager::slot_dispatch() // child->callback_dispatch()の中で再び Dispatchable::add()が呼び出されると // キャンセルされてしまうので callback_dispatch() を呼び出す前にremoveする m_children.remove( child ); - JDLIB::unique_unlock( lock ); + lock.unlock(); if( child ) child->callback_dispatch(); diff --git a/src/image/imageareabase.cpp b/src/image/imageareabase.cpp index f40bf5fd3..5b4550bf2 100644 --- a/src/image/imageareabase.cpp +++ b/src/image/imageareabase.cpp @@ -5,7 +5,6 @@ #include "imageareabase.h" -#include "jdlib/jdmutex.h" #include "jdlib/miscmsg.h" #include "dbimg/imginterface.h" @@ -13,14 +12,16 @@ #include "config/globalconf.h" +#include + // // スレッドのランチャ // -static JDLIB::StaticMutex imgarea_launcher_mutex = JDLIB_STATIC_MUTEX_INIT; +static std::mutex imgarea_launcher_mutex; void* imgarea_launcher( void* dat ) { - JDLIB::LockGuard lock( imgarea_launcher_mutex ); + std::lock_guard< std::mutex > lock( imgarea_launcher_mutex ); #ifdef _DEBUG std::cout << "start imgarea_launcher" << std::endl; diff --git a/src/jdlib/imgloader.cpp b/src/jdlib/imgloader.cpp index 81bebb028..8b6080620 100644 --- a/src/jdlib/imgloader.cpp +++ b/src/jdlib/imgloader.cpp @@ -43,7 +43,7 @@ ImgLoader::~ImgLoader() Glib::RefPtr< ImgLoader > ImgLoader::get_loader( const std::string& file ) { ImgProvider& provider = ImgProvider::get_provider(); - JDLIB::LockGuard lock( provider.m_provider_lock ); + std::lock_guard< std::mutex > lock( provider.m_provider_lock ); Glib::RefPtr< ImgLoader > loader = provider.get_loader( file ); if( ! loader ) { loader = Glib::RefPtr< ImgLoader >( new ImgLoader( file ) ); @@ -58,7 +58,7 @@ Glib::RefPtr< ImgLoader > ImgLoader::get_loader( const std::string& file ) // 画像サイズ取得 bool ImgLoader::get_size( int& width, int& height ) { - JDLIB::LockGuard lock( m_loader_lock ); + std::lock_guard< std::mutex > lock( m_loader_lock ); bool ret = load_imgfile( LOADLEVEL_SIZEONLY ); width = m_width; height = m_height; @@ -68,7 +68,7 @@ bool ImgLoader::get_size( int& width, int& height ) Glib::RefPtr< Gdk::Pixbuf > ImgLoader::get_pixbuf( const bool pixbufonly ) { Glib::RefPtr< Gdk::Pixbuf > ret; - JDLIB::LockGuard lock( m_loader_lock ); + std::lock_guard< std::mutex > lock( m_loader_lock ); if( load_imgfile( pixbufonly ? LOADLEVEL_PIXBUFONLY : LOADLEVEL_NORMAL ) ) { ret = m_loader->get_pixbuf(); } @@ -78,7 +78,7 @@ Glib::RefPtr< Gdk::Pixbuf > ImgLoader::get_pixbuf( const bool pixbufonly ) Glib::RefPtr< Gdk::PixbufAnimation > ImgLoader::get_animation() { Glib::RefPtr< Gdk::PixbufAnimation > ret; - JDLIB::LockGuard lock( m_loader_lock ); + std::lock_guard< std::mutex > lock( m_loader_lock ); if( load_imgfile( LOADLEVEL_NORMAL ) ) { ret = m_loader->get_animation(); } @@ -89,7 +89,7 @@ Glib::RefPtr< Gdk::PixbufAnimation > ImgLoader::get_animation() // 動画でpixbufonly = true の時はアニメーションさせない bool ImgLoader::load( const bool pixbufonly ) { - JDLIB::LockGuard lock( m_loader_lock ); + std::lock_guard< std::mutex > lock( m_loader_lock ); return load_imgfile( pixbufonly ? LOADLEVEL_PIXBUFONLY : LOADLEVEL_NORMAL ); } diff --git a/src/jdlib/imgloader.h b/src/jdlib/imgloader.h index 3c8e7588a..9e7d8c947 100644 --- a/src/jdlib/imgloader.h +++ b/src/jdlib/imgloader.h @@ -9,7 +9,7 @@ #include -#include "jdmutex.h" +#include namespace JDLIB { @@ -26,7 +26,7 @@ namespace JDLIB class ImgLoader : public Glib::Object { Glib::RefPtr< Gdk::PixbufLoader > m_loader; - JDLIB::Mutex m_loader_lock; + std::mutex m_loader_lock; std::string m_file; std::string m_errmsg; @@ -66,7 +66,7 @@ namespace JDLIB std::list< Glib::RefPtr< ImgLoader > > m_cache; public: - JDLIB::Mutex m_provider_lock; // ImgProvider操作時の必須ロック + std::mutex m_provider_lock; // ImgProvider操作時の必須ロック public: virtual ~ImgProvider() noexcept {} diff --git a/src/jdlib/jdmutex.h b/src/jdlib/jdmutex.h deleted file mode 100644 index b542f90db..000000000 --- a/src/jdlib/jdmutex.h +++ /dev/null @@ -1,52 +0,0 @@ -// ライセンス: GPL2 - -// ミューテックス - -#ifndef JDMUTEX_H -#define JDMUTEX_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WITH_STD_THREAD -#include -#else -#include -#endif - - -namespace JDLIB -{ -#ifdef WITH_STD_THREAD - using Mutex = std::mutex; - using StaticMutex = std::mutex; - - using LockGuard = std::lock_guard< std::mutex >; - using UniqueLock = std::unique_lock< std::mutex >; -#else - using Mutex = Glib::Mutex; - using StaticMutex = Glib::StaticMutex; - - using LockGuard = Glib::Mutex::Lock; - using UniqueLock = Glib::Mutex::Lock; -#endif - - static inline void unique_unlock( UniqueLock& lock ) - { -#ifdef WITH_STD_THREAD - lock.unlock(); -#else - lock.release(); -#endif - } -} - -#ifdef WITH_STD_THREAD -// std::mutexは初期化子を必要としないがglibmmに合わせる -#define JDLIB_STATIC_MUTEX_INIT {} -#else -#define JDLIB_STATIC_MUTEX_INIT GLIBMM_STATIC_MUTEX_INIT -#endif - -#endif diff --git a/src/jdlib/loader.cpp b/src/jdlib/loader.cpp index 3735ea88b..53aa5d8a7 100644 --- a/src/jdlib/loader.cpp +++ b/src/jdlib/loader.cpp @@ -29,8 +29,9 @@ #include "httpcode.h" -#include #include +#include +#include #include #include @@ -44,8 +45,6 @@ #include -#include "jdmutex.h" - #ifdef _WIN32 // _soc : SOCKET (unsigned int) #define SOC_ISVALID(_soc) ( (_soc) != INVALID_SOCKET ) @@ -85,8 +84,8 @@ namespace JDLIB } -static JDLIB::StaticMutex mutex_token = JDLIB_STATIC_MUTEX_INIT; -static JDLIB::StaticMutex mutex_queue = JDLIB_STATIC_MUTEX_INIT; +static std::mutex mutex_token; +static std::mutex mutex_queue; std::list< JDLIB::Loader* > queue_loader; // スレッド起動待ちの Loader のキュー int token_loader = 0; std::vector< JDLIB::Loader* > vec_loader( MAX_LOADER ); @@ -96,7 +95,7 @@ bool disable_pop = false; // トークン取得 bool JDLIB::get_token( JDLIB::Loader* loader ) { - JDLIB::LockGuard lock( mutex_token ); + std::lock_guard< std::mutex > lock( mutex_token ); #ifdef _DEBUG std::cout << "JDLIB::get_token : url = " << loader->data().url << " token = " << token_loader << std::endl; @@ -130,7 +129,7 @@ bool JDLIB::get_token( JDLIB::Loader* loader ) // トークン返す void JDLIB::return_token( JDLIB::Loader* loader ) { - JDLIB::LockGuard lock( mutex_token ); + std::lock_guard< std::mutex > lock( mutex_token ); --token_loader; assert( token_loader >= 0 ); @@ -147,7 +146,7 @@ void JDLIB::return_token( JDLIB::Loader* loader ) // スレッド起動待ちキューに Loader を登録 void JDLIB::push_loader_queue( JDLIB::Loader* loader ) { - JDLIB::LockGuard lock( mutex_queue ); + std::lock_guard< std::mutex > lock( mutex_queue ); if( ! loader ) return; @@ -168,7 +167,7 @@ void JDLIB::push_loader_queue( JDLIB::Loader* loader ) // キューから Loader を取り除いたらtrueを返す bool JDLIB::remove_loader_queue( JDLIB::Loader* loader ) { - JDLIB::LockGuard lock( mutex_queue ); + std::lock_guard< std::mutex > lock( mutex_queue ); if( ! queue_loader.size() ) return false; if( std::find( queue_loader.begin(), queue_loader.end(), loader ) == queue_loader.end() ) return false; @@ -186,7 +185,7 @@ bool JDLIB::remove_loader_queue( JDLIB::Loader* loader ) // キューに登録されたスレッドを起動する void JDLIB::pop_loader_queue() { - JDLIB::LockGuard lock( mutex_queue ); + std::lock_guard< std::mutex > lock( mutex_queue ); if( disable_pop ) return; if( ! queue_loader.size() ) return; @@ -217,7 +216,7 @@ void JDLIB::pop_loader_queue() // void JDLIB::disable_pop_loader_queue() { - JDLIB::LockGuard lock( mutex_queue ); + std::lock_guard< std::mutex > lock( mutex_queue ); #ifdef _DEBUG std::cout << "JDLIB::disable_pop_loader_queue\n"; diff --git a/src/jdlib/timeout.cpp b/src/jdlib/timeout.cpp index 12ba6edb1..ea38e1bff 100644 --- a/src/jdlib/timeout.cpp +++ b/src/jdlib/timeout.cpp @@ -14,7 +14,7 @@ using namespace JDLIB; #ifdef _WIN32 // static -JDLIB::StaticMutex Timeout::s_lock = JDLIB_STATIC_MUTEX_INIT; +std::mutex Timeout::s_lock; std::map< UINT_PTR, Timeout* > Timeout::s_timeouts; #endif @@ -38,7 +38,7 @@ Timeout::~Timeout() { #ifdef _WIN32 if( m_identifer != 0 ){ - JDLIB::LockGuard lock( s_lock ); + std::lock_guard< std::mutex > lock( s_lock ); KillTimer( NULL, m_identifer ); s_timeouts.erase( m_identifer ); m_identifer = 0; @@ -53,7 +53,7 @@ Timeout* Timeout::connect( const sigc::slot< bool > slot_timeout, unsigned int i { Timeout* timeout = new Timeout( slot_timeout ); #ifdef _WIN32 - JDLIB::LockGuard lock( s_lock ); + std::lock_guard< std::mutex > lock( s_lock ); // use global windows timer UINT_PTR ident = SetTimer( NULL, 0, interval, slot_timeout_win32 ); if( ident != 0 ) { diff --git a/src/jdlib/timeout.h b/src/jdlib/timeout.h index 8aa1d9b7f..8e9f14ac9 100644 --- a/src/jdlib/timeout.h +++ b/src/jdlib/timeout.h @@ -7,7 +7,7 @@ #ifdef _WIN32 #include #undef DELETE // conflict with Gtk::Stock::DELETE -#include "jdmutex.h" +#include #endif namespace JDLIB @@ -19,7 +19,7 @@ namespace JDLIB Glib::RefPtr m_context; UINT_PTR m_identifer; - static JDLIB::StaticMutex s_lock; + static std::mutex s_lock; static std::map< UINT_PTR, Timeout* > s_timeouts; #else sigc::connection m_connection; From 12ca62591d4a3de2f19c2489e0d0551e2034c091 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Sat, 8 Dec 2018 20:23:59 +0900 Subject: [PATCH 05/13] Fix compile warning for enum and non-enum compare (by GCC 7) --- src/dbtree/nodetreebase.cpp | 25 +++++++++++-------------- src/dbtree/nodetreebase.h | 5 +---- src/dbtree/nodetreemachi.cpp | 5 +---- src/jdlib/loader.cpp | 11 ++++------- src/skeleton/menubutton.cpp | 6 +++--- src/skeleton/menubutton.h | 5 +---- 6 files changed, 21 insertions(+), 36 deletions(-) diff --git a/src/dbtree/nodetreebase.cpp b/src/dbtree/nodetreebase.cpp index dcd6cc15c..036627f6b 100644 --- a/src/dbtree/nodetreebase.cpp +++ b/src/dbtree/nodetreebase.cpp @@ -41,21 +41,18 @@ #endif -enum -{ - SECTION_NUM = 5, - LNG_RES = 16, - LNG_ID = 256, - LNG_LINK = 256, - MAX_ANCINFO = 64, - RANGE_REF = 20, - MAX_LINK_DIGIT = 4, // レスアンカーでMAX_LINK_DIGIT 桁までリンクにする +constexpr size_t SECTION_NUM = 5; +constexpr size_t LNG_RES = 16; +constexpr int LNG_ID = 256; +constexpr size_t LNG_LINK = 256; +constexpr size_t MAX_ANCINFO = 64; +constexpr int RANGE_REF = 20; +constexpr size_t MAX_LINK_DIGIT = 4; // レスアンカーでMAX_LINK_DIGIT 桁までリンクにする - MAXSISE_OF_LINES = 512 * 1024, // ロード時に1回の呼び出しで読み込まれる最大データサイズ - SIZE_OF_HEAP = MAXSISE_OF_LINES + 64, +constexpr size_t MAXSISE_OF_LINES = 512 * 1024; // ロード時に1回の呼び出しで読み込まれる最大データサイズ +constexpr size_t SIZE_OF_HEAP = MAXSISE_OF_LINES + 64; - INITIAL_RES_BUFSIZE = 128, // レスの文字列を返すときの初期バッファサイズ -}; +constexpr size_t INITIAL_RES_BUFSIZE = 128; // レスの文字列を返すときの初期バッファサイズ // レジュームのモード @@ -1556,7 +1553,7 @@ const char* NodeTreeBase::add_one_dat_line( const char* datline ) const char* pos = datline; if( *pos == '\0' || *pos == '\n' ) return datline; - int i; + size_t i; NODE* header = create_node_header(); m_vec_header[ m_id_header ] = header; diff --git a/src/dbtree/nodetreebase.h b/src/dbtree/nodetreebase.h index 9a35ce215..3e8b58855 100644 --- a/src/dbtree/nodetreebase.h +++ b/src/dbtree/nodetreebase.h @@ -31,10 +31,7 @@ namespace DBTREE LINK_NUM }; - enum - { - RESUME_CHKSIZE = 64 - }; + constexpr size_t RESUME_CHKSIZE = 64; //ノードツリーのベースクラス class NodeTreeBase : public SKELETON::Loadable diff --git a/src/dbtree/nodetreemachi.cpp b/src/dbtree/nodetreemachi.cpp index e61430d33..603a79a0e 100644 --- a/src/dbtree/nodetreemachi.cpp +++ b/src/dbtree/nodetreemachi.cpp @@ -23,10 +23,7 @@ using namespace DBTREE; -enum -{ - BUF_SIZE_200 = 256 -}; +constexpr size_t BUF_SIZE_200 = 256; NodeTreeMachi::NodeTreeMachi( const std::string& url, const std::string& date_modified ) diff --git a/src/jdlib/loader.cpp b/src/jdlib/loader.cpp index 53aa5d8a7..573737a84 100644 --- a/src/jdlib/loader.cpp +++ b/src/jdlib/loader.cpp @@ -53,13 +53,10 @@ #define SOC_ISVALID(_soc) ( (_soc) >= 0 ) #endif -enum -{ - MAX_LOADER = 10, // 最大スレッド数 - MAX_LOADER_SAMEHOST = 2, // 同一ホストに対して実行できる最大スレッド数 - LNG_BUF_MIN = 1 * 1024, // 読み込みバッファの最小値 (byte) - TIMEOUT_MIN = 1 // タイムアウトの最小値 (秒) -}; +constexpr int MAX_LOADER = 10; // 最大スレッド数 +constexpr int MAX_LOADER_SAMEHOST = 2; // 同一ホストに対して実行できる最大スレッド数 +constexpr size_t LNG_BUF_MIN = 1 * 1024; // 読み込みバッファの最小値 (byte) +constexpr long TIMEOUT_MIN = 1; // タイムアウトの最小値 (秒) #ifdef _WIN32 diff --git a/src/skeleton/menubutton.cpp b/src/skeleton/menubutton.cpp index 1c4b74028..76a77da99 100644 --- a/src/skeleton/menubutton.cpp +++ b/src/skeleton/menubutton.cpp @@ -68,7 +68,7 @@ void MenuButton::setup( const bool show_arrow, Gtk::Widget* label, Gtk::PackOpti // メニュー項目作成 Glib::RefPtr< Gtk::ActionGroup > actiongroup = Gtk::ActionGroup::create(); Glib::RefPtr< Gtk::AccelGroup > agroup = CORE::get_mainwindow()->get_accel_group(); - for( int i = 0 ; i < MAX_MENU_SIZE; ++i ){ + for( size_t i = 0 ; i < MAX_MENU_SIZE; ++i ){ Glib::RefPtr< Gtk::Action > action = Gtk::Action::create( "menu" + MISC::itostr( i ), "dummy" ); action->set_accel_group( agroup ); Gtk::MenuItem* item = Gtk::manage( action->create_menu_item() ); @@ -117,8 +117,8 @@ void MenuButton::append_menu( std::vector< std::string >& items ) // 新しくメニューを作成して項目追加 m_popupmenu = Gtk::manage( new Gtk::Menu() ); - const int size = MIN( items.size(), MAX_MENU_SIZE ); - for( int i = 0 ; i < size; ++i ){ + const size_t size = MIN( items.size(), MAX_MENU_SIZE ); + for( size_t i = 0 ; i < size; ++i ){ Gtk::MenuItem* item = NULL; diff --git a/src/skeleton/menubutton.h b/src/skeleton/menubutton.h index 89fa9895b..7cd28af1b 100644 --- a/src/skeleton/menubutton.h +++ b/src/skeleton/menubutton.h @@ -9,10 +9,7 @@ #include #include -enum -{ - MAX_MENU_SIZE = 20 -}; +constexpr size_t MAX_MENU_SIZE = 20; namespace SKELETON { From d6e5eab5e784c1b36ce096a72ff6e01cfbfb95f2 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Sat, 8 Dec 2018 20:55:44 +0900 Subject: [PATCH 06/13] Fix compile warning for implicit fallthrough (by GCC 7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++11では属性[[fallthrough]]が使えないのでGCC 7が認識するコメント[1] // fallthrough を代わりに記述し警告を抑制する [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough_003d --- src/article/drawareabase.cpp | 4 +++- src/bbslist/bbslistviewbase.cpp | 1 + src/board/boardviewbase.cpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/article/drawareabase.cpp b/src/article/drawareabase.cpp index 220fe3053..15cdf6389 100644 --- a/src/article/drawareabase.cpp +++ b/src/article/drawareabase.cpp @@ -951,6 +951,7 @@ bool DrawAreaBase::exec_layout_impl( const bool is_popup, const int offset_y ) case DBTREE::NODE_IDNUM: // 発言数ノード if( ! set_num_id( layout ) ) break; + // fallthrough case DBTREE::NODE_TEXT: // テキスト case DBTREE::NODE_LINK: // リンク @@ -995,7 +996,7 @@ bool DrawAreaBase::exec_layout_impl( const bool is_popup, const int offset_y ) y += 2; // 水平線1px + 余白1px - // フォールスルー + // fallthrough ////////////////////////////////////////// @@ -2094,6 +2095,7 @@ bool DrawAreaBase::draw_one_node( LAYOUT* layout, const CLIPINFO& ci ) else node->color_text = COLOR_IMG_ERR; } } + // fallthrough ////////////////////////////////////////// diff --git a/src/bbslist/bbslistviewbase.cpp b/src/bbslist/bbslistviewbase.cpp index 03c4eb3f7..a74aaec8b 100644 --- a/src/bbslist/bbslistviewbase.cpp +++ b/src/bbslist/bbslistviewbase.cpp @@ -1909,6 +1909,7 @@ bool BBSListViewBase::open_row( Gtk::TreePath& path, const bool tab ) case TYPE_THREAD_OLD: toggle_articleicon( url ); // break;しない + // fallthrough case TYPE_THREAD: case TYPE_THREAD_UPDATE: CORE::core_set_command( "open_article", DBTREE::url_dat( url ), str_tab, str_mode ); diff --git a/src/board/boardviewbase.cpp b/src/board/boardviewbase.cpp index 755e156c8..c84a438e5 100644 --- a/src/board/boardviewbase.cpp +++ b/src/board/boardviewbase.cpp @@ -1458,6 +1458,7 @@ bool BoardViewBase::operate_view( const int control ) // スレを開く case CONTROL::OpenArticleTab: open_tab = true; + // fallthrough case CONTROL::OpenArticle: if( ! path.empty() ) open_row( path, open_tab, false ); break; @@ -2887,6 +2888,7 @@ void BoardViewBase::slot_save_dat() // 名前変更 case Gtk::RESPONSE_YES: if( ! art->save_dat( path_to ) ) continue; + // fallthrough default: copy_file = false; From 682ed8dc5cff965b03bab7dd4f1f35977f76e370 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Sat, 8 Dec 2018 20:57:29 +0900 Subject: [PATCH 07/13] Fix compile warning for comparison of unsigned >= 0 (by GCC 7) --- src/jdlib/jdiconv.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/jdlib/jdiconv.cpp b/src/jdlib/jdiconv.cpp index 607395c98..0da070eb3 100644 --- a/src/jdlib/jdiconv.cpp +++ b/src/jdlib/jdiconv.cpp @@ -107,7 +107,6 @@ const char* Iconv::convert( char* str_in, int size_in, int& size_out ) std::cout << "m_byte_left_in = " << m_byte_left_in << std::endl; std::cout << "byte_left_out = " << byte_left_out << std::endl; #endif - assert( byte_left_out >= 0 ); // エラー if( ret == -1 ){ From 54beafbfaa00171d12d4743505e44a275597108f Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 19:23:16 +0900 Subject: [PATCH 08/13] Rename desktop and spec files --- jd.desktop => jdim.desktop | 0 jd.spec => jdim.spec | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename jd.desktop => jdim.desktop (100%) rename jd.spec => jdim.spec (100%) diff --git a/jd.desktop b/jdim.desktop similarity index 100% rename from jd.desktop rename to jdim.desktop diff --git a/jd.spec b/jdim.spec similarity index 100% rename from jd.spec rename to jdim.spec From 00b43ecd7f2f5c893887a31b2e0ecec9632ee3a8 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 20:21:52 +0900 Subject: [PATCH 09/13] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit READMEの内容をREADME.mdに移動する。 autoreconfの警告を回避するためREADMEは削除しない。 変更箇所 * 概要 - GTK+のバージョンを表示しない * ライセンス - GPLv3への言及を削除 * 連絡先 - サポート掲示板の案内を削除 --- README | 106 +------------------------ README.md | 230 ++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 189 insertions(+), 147 deletions(-) diff --git a/README b/README index 0f131bc67..9bb5bc1ed 100644 --- a/README +++ b/README @@ -1,105 +1 @@ -[ JDについて ] - -ここに書かれていない詳細については"http://jd4linux.sourceforge.jp/"や -"http://sourceforge.jp/projects/jd4linux/wiki/FrontPage"を参照してください。 - -* 概要 - - JDはGTK+2(gtkmm)を使用した"2ちゃんねる [http://www.2ch.net/]"型マルチスレッドBBSを閲覧するためのブラウザです。 - -* 著作権 - - ©2006-2015 "JD Project [http://sourceforge.jp/projects/jd4linux/]" - - パッチやファイルを取り込んだ場合、それらのコピーライトは「JD Project」に統一します。 - -* ライセンス - - "GNU General Public License, version 2 [http://sourceforge.jp/projects/opensource/wiki/licenses%2FGNU_General_Public_License]" - - 将来的にライセンスをGPL3に変更するかもしれません。GPL3以降へのライセンス変更に関してはプロジェクトリーダーに一任させて頂きます。 - -* 連絡先 - - バグ報告その他は"Linux板@2ちゃんねる [http://www.2ch.net/linux/]"のJDスレ、またはJDのヘルプメニューから行くことが出来るサポート掲示板にて行ってください。 - -* 動作プラットフォーム - - LinuxなどのUnixライクなOS(FreeBSD,OpenBSD,Nexenta,MacOSXでも動作報告例があります)。 - - WindowsではMinGWを使ってビルド可能ですが、動作はまだ安定していないようです。 - -* 通常の起動 - - 使い方は以下のとおり。 - - $ jd [OPTION] [URL,FILE] - - 引数にURLを付けて起動する事も出来るので、他のアプリケーションから外部コマンドとしてURLを開く事などが出来る。(JDが扱う事の出来るURLでない場合は設定されているWebブラウザに渡される) - - $ jd http://pc99.2ch.net/test/read.cgi/linux/1234567890/ - - ローカルにあるdatファイルを指定して、一時的にスレビュー表示させることも出来る。 - - $ jd ./12345.dat - - 環境変数 JD_CACHE でキャッシュディレクトリの位置を変更・指定することが可能。指定しなければ ~/.jd がキャッシュディレクトリになる。 - - $ JD_CACHE=~/.mycache jd - - 環境変数 JD_LOCK でロックファイルの位置を変更・指定することが可能。指定しなければ ~/.jd/JDLOCK がロックファイルになる。 - - $ JD_LOCK=~/mylock jd - - オプション - - -h, --help - - ヘルプを表示 - - -m, --multi - - 多重起動時のサブプロセスであっても終了しない - - -n, --norestore - - 前回異常終了した時にバックアップファイルを復元しない - - -s, --skip-setup - - 初回起動時の設定ダイアログを表示しない - - -l, --logfile - - エラーなどのメッセージをファイル(キャッシュディレクトリのlog/msglog)に出力する - - -g, --geometry WxH-X+Y - - 幅(W)高さ(H)横位置(X)縦位置(Y)の指定。WxHは省略化(例: -g 100x40-10+30, -g -20+100 ) - - -V, --version - - バージョン及びconfigureオプションを全て表示 - -* 多重起動について - - JDはメインプロセス/サブプロセスという関係で動作する。 - - メインプロセス: 指令を受け取る事が出来るプロセス - サブプロセス : 指令を出す事が出来るプロセス - - 通常は最初に起動した物がメインプロセスとなり、メインプロセスは1つだけ存在する事が出来る。メインプロセスが存在する状態で起動したプロセスはサブプロセスとして扱われ、複数存在させる事も可能。なお、指令を受け取るのはメインプロセスのみなので、指令を出す側のサブプロセスでURLは開かれない。 - - 以下のコマンドを使い分ける事でサブプロセスの起動のしかたをコントロール出来る。 - - a. 起動するかどうか確認してサブプロセスを起動 - - $ jd - b. 確認せずにサブプロセスを起動 - - $ jd -m - c. メインプロセスにを渡してサブプロセスを起動 - - $ jd -m http://pc99.2ch.net/test/read.cgi/linux/1234567890/ - - 注: サブプロセスを残したままメインプロセスを終了していた場合は次に起動したプロセスがメインプロセスとなる。 \ No newline at end of file +README.mdを見てください。 diff --git a/README.md b/README.md index c4d7708f9..7ad4202d4 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,217 @@ +# JDim - 2ch browser for linux -# 導入方法 +ここに書かれていない詳細については[リポジトリ][repository]を参照してください。 -## 事前準備 +[repository]: https://github.com/JDimproved/JDim - 一度だけやればいい。 +* [概要](#概要) +* [動作プラットフォーム](#動作プラットフォーム) +* [導入方法](#導入方法) +* [通常の起動](#通常の起動) +* [多重起動について](#多重起動について) +* [著作権](#著作権) +* [ライセンス](#ライセンス) +* [連絡先](#連絡先) -### Redhat系 -` dnf install gtkmm24-devel gnutls-devel libSM-devel libtool automake git ` -### Debin系 -` sudo apt-get build-dep jd` +## 概要 - 開発環境が入っていない場合は、 +JDim (JD improved) は gtkmm/GTK+ を使用した"2ちゃんねる"型マルチスレッドBBSを閲覧するためのブラウザです。 +JDim は GPLv2 の下で公開されている [JD][jd-project] からforkしたソフトウェアであり、 +ルック・アンド・フィールや環境設定は JD と互換性があります。 -` sudo apt-get install build-essential automake autoconf-archive git` +**注意: JDim本体は5ch.netのAPIに対応しておりません。** +ご不便をおかけして申し訳ありませんが、5ch.netにアクセスする場合はWebブラウザなどをご使用ください。 -### Ubuntu 18.04 - 開発環境が入っていない場合は、 +[jd-project]: https://jd4linux.osdn.jp/ -` sudo apt-get install build-essential automake autoconf-archive git libtool` - 必要なライブラリを入れる。(抜けがあるかも) +## 動作プラットフォーム -` sudo apt-get install libgtkmm-2.4-dev libmigemo1 libasound2-data libltdl-dev libasound2-dev libgnutls28-dev libgcrypt20-dev` +LinuxなどのUnixライクなOS(FreeBSD,OpenBSD,Nexenta,MacOSXでも動作報告例があります)。 +WindowsではMinGWを使ってビルド可能ですが、動作はまだ安定していないようです。 -## インストール +## 導入方法 + +### 事前準備 + +一度だけやればいい。 + +#### Redhat系 +```sh +dnf install gtkmm24-devel gnutls-devel libSM-devel libtool automake git +``` + +#### Debian系 +```sh +sudo apt-get build-dep jd +``` + +開発環境が入っていない場合は、 + +```sh +sudo apt-get install build-essential automake autoconf-archive git +``` + +#### Ubuntu 18.04 +開発環境が入っていない場合は、 + +```sh +sudo apt-get install build-essential automake autoconf-archive git libtool +``` + +必要なライブラリを入れる。(抜けがあるかも) + +```sh +sudo apt-get install libgtkmm-2.4-dev libmigemo1 libasound2-data libltdl-dev libasound2-dev libgnutls28-dev libgcrypt20-dev +``` + +### ビルド + +```sh +git clone -b test --depth 1 https://github.com/JDimproved/JDim.git jdim +cd jdim +autoreconf -i +./configure +make +``` + +実行するには直接 src/jdim を起動するか手動で /usr/bin あたりに src/jdim を cp する。 + + +### 参考 + +詳しいインストールの方法は [本家のwiki](https://ja.osdn.net/projects/jd4linux/wiki/OS%2f%E3%83%87%E3%82%A3%E3%82%B9%E3%83%88%E3%83%AA%E3%83%93%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%88%A5%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95) を参照。 + + +### Tips + +* **buildの高速化** + + make するときに `-j job数`(並列処理の数) を指定すれば高速にコンパイルできます。 + 使用するCPUのコア数と相談して決めてください。 + +* **‘to_string’ is not a member of ‘std’なエラーが出た場合** + + このエラーが出た場合は、 automake のマクロが入っていないか、gcc のバージョンが古い可能性があります。 + automakeのマクロはubuntuでは `autoconf-archive` というパッケージ名です。 + + またマクロを入れなくても、 + ```sh + make CXXFLAGS+="-std=c++11" + ``` + でも同様の効果があります。もしこれで駄目な場合はgccのversionが古すぎるので、 + gccのバージョンアップをするか、ディストリをバージョンアップしてください。 + +* **configureチェック中に `AX_CXX_COMPILE_STDCXX_11(noext, mandatory)` に関連したエラーがでた場合** + + ubuntuでは `autoconf-archive` をインストールして `autoreconf -i` からやり直してみてください。 + パッケージが見つからないまたはエラーが消えない場合は以下の手順を試してみてください。 + + 1. `configure.ac` の `AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])` の行を削除する。 + 2. `autoreconf -i` で `configure` を作りconfigureチェックをやり直す。 + 3. `make CXXFLAGS+="-std=c++11"` でビルドする。 + + +## 通常の起動 + +使い方は以下のとおり。 + +```sh +$ jdim [OPTION] [URL,FILE] +``` + +引数にURLを付けて起動する事も出来るので、他のアプリケーションから外部コマンドとしてURLを開く事などが出来る。 +(JDimが扱う事の出来るURLでない場合は設定されているWebブラウザに渡される) + +```sh +$ jdim http://pc99.2ch.net/test/read.cgi/linux/1234567890/ +``` + +ローカルにあるdatファイルを指定して、一時的にスレビュー表示させることも出来る。 + +```sh +$ jdim ./12345.dat ``` - git clone -b test --depth 1 https://github.com/yama-natuki/JD.git jd - cd jd - autoreconf -i - ./configure - make + +環境変数 `JD_CACHE` でキャッシュディレクトリの位置を変更・指定することが可能。 +指定しなければ `~/.jd` がキャッシュディレクトリになる。 + +```sh +$ JD_CACHE=~/.mycache jdim ``` - 実行するには直接 src/jd を起動するか手動で /usr/bin あたりに src/jd を cp する。 +環境変数 `JD_LOCK` でロックファイルの位置を変更・指定することが可能。 +指定しなければ `~/.jd/JDLOCK` がロックファイルになる。 + +```sh +$ JD_LOCK=~/mylock jdim +``` + +### コマンドライン オプション + +オプション | 説明 +--- | --- +-h, --help | ヘルプを表示 +-m, --multi | 多重起動時のサブプロセスであっても終了しない +-n, --norestore | 前回異常終了した時にバックアップファイルを復元しない +-s, --skip-setup | 初回起動時の設定ダイアログを表示しない +-l, --logfile | エラーなどのメッセージをファイル(キャッシュディレクトリのlog/msglog)に出力する +-g, --geometry WxH-X+Y | 幅(W)高さ(H)横位置(X)縦位置(Y)の指定。WxHは省略化(例: -g 100x40-10+30, -g -20+100 ) +-V, --version | バージョン及びconfigureオプションを全て表示 + + +## 多重起動について + +JDはメインプロセス/サブプロセスという関係で動作する。 + +* メインプロセス: 指令を受け取る事が出来るプロセス +* サブプロセス: 指令を出す事が出来るプロセス + +通常は最初に起動した物がメインプロセスとなり、メインプロセスは1つだけ存在する事が出来る。 +メインプロセスが存在する状態で起動したプロセスはサブプロセスとして扱われ、複数存在させる事も可能。 +なお、指令を受け取るのはメインプロセスのみなので、指令を出す側のサブプロセスでURLは開かれない。 + +以下のコマンドを使い分ける事でサブプロセスの起動のしかたをコントロール出来る。 + +* a. 起動するかどうか確認してサブプロセスを起動 + ```sh + $ jdim + ``` +* b. 確認せずにサブプロセスを起動 + ```sh + $ jdim -m + ``` +* c. メインプロセスにURLを渡してサブプロセスを起動 + ```sh + $ jdim -m http://pc99.2ch.net/test/read.cgi/linux/1234567890/ + ``` + +注: サブプロセスを残したままメインプロセスを終了していた場合は次に起動したプロセスがメインプロセスとなる。 -# 参考 - 詳しいインストールの方法は [本家のwiki](https://ja.osdn.net/projects/jd4linux/wiki/OS%2f%E3%83%87%E3%82%A3%E3%82%B9%E3%83%88%E3%83%AA%E3%83%93%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%88%A5%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95) を参照。 +## 著作権 +© 2017-2019 yama-natuki [https://github.com/yama-natuki/JD] +© 2019 JDimproved project [https://github.com/JDimproved/JDim] -## Tips +パッチやファイルを取り込んだ場合、それらのコピーライトは「JDimproved project」に統一します。 -### ●buildの高速化 - make するときに -j job数(並列処理の数) を指定すれば高速にコンパイルできます。 -使用するCPUのコア数と相談して決めてください。 +fork元の JD: -### ●to_string’ is not a member of ‘std’なエラーが出た場合 - このエラーが出た場合は、 automake のマクロが入っていないか、 -gcc のバージョンが古い可能性があります。 +© 2006-2015 JD project [https://ja.osdn.net/projects/jd4linux/] -automakeのマクロはubuntuでは autoconf-archive というパッケージ名です。 -またマクロを入れなくても、 +## ライセンス -` make CXXFLAGS+="-std=c++11" ` +JDim 及びfork元の JD は GPLv2 の下で公開されています。 +[GNU General Public License, version 2][lisence] -でも同様の効果があります。 +[lisence]: https://github.com/JDimproved/JDim/blob/master/COPYING - もしこれで駄目な場合はgccのversionが古すぎるので、 -gccのバージョンアップをするか、ディストリをバージョンアップしてください。 -### ●configureチェック中に `AX_CXX_COMPILE_STDCXX_11(noext, mandatory)` に関連したエラーがでた場合 -ubuntuでは `autoconf-archive` をインストールして `autoreconf -i` からやり直してみてください。 -パッケージが見つからないまたはエラーが消えない場合は以下の手順を試してみてください。 +## 連絡先 -1. `configure.ac` の `AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])` の行を削除する。 -2. `autoreconf -i` で `configure` を作りconfigureチェックをやり直す。 -3. `make CXXFLAGS+="-std=c++11"` でビルドする。 +バグ報告その他は [Linux板@5ちゃんねる](http://mao.5ch.net/linux/) のJD/JDimスレ、 +またはJDimのリポジトリにて行ってください。 From 7371d7d3abb49b6e4246b066dc42a54889db885b Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 20:41:04 +0900 Subject: [PATCH 10/13] Update URL for JD project --- AUTHORS | 2 +- ChangeLog | 2 +- INSTALL | 4 ++-- NEWS | 2 +- jdim.spec | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 401e876dd..755d9fcfb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -http://jd4linux.sourceforge.jp/manual/を見てください。 +https://jd4linux.osdn.jp/manual/ を見てください。 diff --git a/ChangeLog b/ChangeLog index f351a726e..cca63a1c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ [ 更新履歴 ] - 以前の更新履歴は"http://jd4linux.sourceforge.jp/manual/"を参照してください。 + 以前の更新履歴は"https://jd4linux.osdn.jp/manual/"を参照してください。 svnのコミットログを知りたい場合は diff --git a/INSTALL b/INSTALL index d0ade81b0..17d83786d 100644 --- a/INSTALL +++ b/INSTALL @@ -36,7 +36,7 @@ ・oniguruma (--with-oniguruma) ・libpcre (--with-pcre) - OSやディストリビューション別の解説は"OS/ディストリビューション別インストール方法 [http://sourceforge.jp/projects/jd4linux/wiki/OS%2f%E3%83%87%E3%82%A3%E3%82%B9%E3%83%88%E3%83%AA%E3%83%93%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%88%A5%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95]"(wiki) を参照。 + OSやディストリビューション別の解説は"OS/ディストリビューション別インストール方法 [https://ja.osdn.net/projects/jd4linux/wiki/OS%2f%E3%83%87%E3%82%A3%E3%82%B9%E3%83%88%E3%83%AA%E3%83%93%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%88%A5%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95]"(wiki) を参照。 * make 方法( rpmbuild の場合 ) @@ -75,7 +75,7 @@ --with-alsa - ALSAによる効果音再生機能を有効にする。詳しくは"http://jd4linux.sourceforge.jp/manual/"の項を参照すること。 + ALSAによる効果音再生機能を有効にする。詳しくは"https://jd4linux.osdn.jp/manual/"の項を参照すること。 --with-xdgopen diff --git a/NEWS b/NEWS index 401e876dd..755d9fcfb 100644 --- a/NEWS +++ b/NEWS @@ -1 +1 @@ -http://jd4linux.sourceforge.jp/manual/を見てください。 +https://jd4linux.osdn.jp/manual/ を見てください。 diff --git a/jdim.spec b/jdim.spec index 665f59c76..dabcb63c7 100644 --- a/jdim.spec +++ b/jdim.spec @@ -49,7 +49,7 @@ Summary: A 2ch browser Group: Applications/Internet License: GPLv2 -URL: http://jd4linux.sourceforge.jp/ +URL: http://jd4linux.osdn.jp/ Source0: http://downloads.sourceforge.jp/jd4linux/%{repoid}/%{name}-%{main_ver}-%{strtag}.tgz #Source0: %{name}-%{main_ver}-%{strtag}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From 9632925e25f9cdf13f6efefee919f313874467c9 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 21:29:06 +0900 Subject: [PATCH 11/13] Update program name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 名称をjdimに変更する。デフォルトのキャッシュディレクトリ(~/.jd)、 C++ソースコードのファイル名や識別子(マクロ、変数、クラス) などは変更しない。 変更箇所 * 実行ファイル名 - jdim * 環境変数 - JDIM_CACHE, JDIM_LOCK --- .gitignore | 2 +- INSTALL | 8 ++++---- Makefile.am | 18 +++++++++--------- README.md | 10 +++++----- configure.ac | 4 ++-- jdim.desktop | 10 +++++----- jdim.spec | 4 ++-- src/Makefile.am | 8 ++++---- src/cache.cpp | 4 ++-- src/config/aboutconfig.cpp | 6 +++--- src/config/configitems.cpp | 4 ++++ src/config/configitems.h | 3 +++ src/config/defaultconf.h | 5 ++++- src/config/globalconf.cpp | 1 + src/config/globalconf.h | 2 ++ src/control/controllabel.h | 2 +- src/core.cpp | 14 +++++++------- src/dbimg/delimgcachediag.cpp | 2 +- src/fontcolorpref.cpp | 2 +- src/main.cpp | 6 +++--- src/menuslots.cpp | 2 +- src/setupwizard.cpp | 14 +++++++++----- src/skeleton/aboutdiag.cpp | 4 ++-- src/skeleton/admin.cpp | 2 +- src/skeleton/editview.cpp | 4 ++-- 25 files changed, 79 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index 23b6afa60..9542566de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ buildinfo.h -src/jd +src/jdim src/**/*.a src/icons/*.h !src/icons/iconmanager.h diff --git a/INSTALL b/INSTALL index 17d83786d..4d2e1e965 100644 --- a/INSTALL +++ b/INSTALL @@ -42,14 +42,14 @@ 1. rpmbuild -tb 〜.tgz でrpmファイルが出来るのであとは rpm -Uvh 〜.rpm 2. ライブラリが足りないといわれたら yum install 〜-devel - 3. 起動はメニューから起動するか、端末で jd と打ち込んでエンターを押す。 + 3. 起動はメニューから起動するか、端末で jdim と打ち込んでエンターを押す。 * make 方法( configure + make の場合 ) 1. autoreconf -i ( 又は ./autogen.sh ) 2. ./configure 3. make - 4. (お好みで) strip src/jd + 4. (お好みで) strip src/jdim * configureオプション @@ -101,6 +101,6 @@ 最近のディストリビューションの場合は autogen.sh よりも autoreconf -i の方を推奨。 - 実行するには直接 src/jd を起動するか手動で /usr/bin あたりに src/jd を cp する。 + 実行するには直接 src/jdim を起動するか手動で /usr/bin あたりに src/jdim を cp する。 - 以上の操作でmakeが通らなかったり動作が変な時は configure のオプションを変更する。 \ No newline at end of file + 以上の操作でmakeが通らなかったり動作が変な時は configure のオプションを変更する。 diff --git a/Makefile.am b/Makefile.am index 7e1b55b6f..e717caaa7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,21 @@ SUBDIRS = src desktopdir= $(datadir)/applications -dist_desktop_DATA = jd.desktop +dist_desktop_DATA = jdim.desktop icondir = $(datadir)/pixmaps dist_icon_DATA = jd.png -EXTRA_DIST = AUTHORS TODO README configure jd.spec +EXTRA_DIST = AUTHORS TODO README configure jdim.spec -jd_BUILDINFO_HEADER = buildinfo.h -jd_CONFIGURE_ARGS = @ac_configure_args@ +jdim_BUILDINFO_HEADER = buildinfo.h +jdim_CONFIGURE_ARGS = @ac_configure_args@ -all: $(jd_BUILDINFO_HEADER) +all: $(jdim_BUILDINFO_HEADER) -.PHONY: $(jd_BUILDINFO_HEADER) +.PHONY: $(jdim_BUILDINFO_HEADER) -$(jd_BUILDINFO_HEADER): +$(jdim_BUILDINFO_HEADER): @-rm -f $@.new @echo '/* This file is generated from Makefile by make. */' >> $@.new @@ -40,9 +40,9 @@ $(jd_BUILDINFO_HEADER): echo "#define CXX_INFO \"$${CXX_INFO}\"" >> $@.new; \ fi - @if test -n "$(jd_CONFIGURE_ARGS)"; \ + @if test -n "$(jdim_CONFIGURE_ARGS)"; \ then \ - echo "#define CONFIGURE_ARGS \"$(jd_CONFIGURE_ARGS)\"" >> $@.new; \ + echo "#define CONFIGURE_ARGS \"$(jdim_CONFIGURE_ARGS)\"" >> $@.new; \ fi @echo '' >> $@.new diff --git a/README.md b/README.md index 7ad4202d4..d62071b7b 100644 --- a/README.md +++ b/README.md @@ -135,18 +135,18 @@ $ jdim http://pc99.2ch.net/test/read.cgi/linux/1234567890/ $ jdim ./12345.dat ``` -環境変数 `JD_CACHE` でキャッシュディレクトリの位置を変更・指定することが可能。 +環境変数 `JDIM_CACHE` でキャッシュディレクトリの位置を変更・指定することが可能。 指定しなければ `~/.jd` がキャッシュディレクトリになる。 ```sh -$ JD_CACHE=~/.mycache jdim +$ JDIM_CACHE=~/.mycache jdim ``` -環境変数 `JD_LOCK` でロックファイルの位置を変更・指定することが可能。 +環境変数 `JDIM_LOCK` でロックファイルの位置を変更・指定することが可能。 指定しなければ `~/.jd/JDLOCK` がロックファイルになる。 ```sh -$ JD_LOCK=~/mylock jdim +$ JDIM_LOCK=~/mylock jdim ``` ### コマンドライン オプション @@ -205,7 +205,7 @@ fork元の JD: ## ライセンス -JDim 及びfork元の JD は GPLv2 の下で公開されています。 +JDim は GPLv2 の下で公開されています。 [GNU General Public License, version 2][lisence] [lisence]: https://github.com/JDimproved/JDim/blob/master/COPYING diff --git a/configure.ac b/configure.ac index 7750df9af..252ac718d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl -dnl JD用 configure.ac +dnl JDim用 configure.ac dnl AC_PREREQ(2.50) -AC_INIT(jd, 1.0) +AC_INIT(jdim, 1.0) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS(config.h) diff --git a/jdim.desktop b/jdim.desktop index 030c14cf5..004c6c62f 100644 --- a/jdim.desktop +++ b/jdim.desktop @@ -1,10 +1,10 @@ [Desktop Entry] -Exec=jd +Exec=jdim Icon=jd Terminal=false Type=Application -Name=JD 2ch browser -Name[ja]=2ch ブラウザ JD -Comment=JD is a 2ch browser based on gtkmm2. -Comment[ja]=gtkmm2 を利用した 2ch ブラウザ +Name=JDim 2ch browser +Name[ja]=2ch ブラウザ JDim +Comment=JDim is a 2ch browser based on gtkmm. +Comment[ja]=gtkmm を利用した 2ch ブラウザ Categories=Network; diff --git a/jdim.spec b/jdim.spec index dabcb63c7..0afc92f7a 100644 --- a/jdim.spec +++ b/jdim.spec @@ -42,7 +42,7 @@ %define migemo_dict %{_datadir}/cmigemo/utf-8/migemo-dict ########################################## -Name: jd +Name: jdim Version: %{main_ver} Release: %{rel} Summary: A 2ch browser @@ -66,7 +66,7 @@ Requires: %{fontpackage} %description -JD is a 2ch browser based on gtkmm2. +JDim is a 2ch browser based on gtkmm. %prep %setup -q -n %{name}-%{main_ver}-%{strtag} diff --git a/src/Makefile.am b/src/Makefile.am index a2a0500bf..739ff8e87 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = dbtree dbimg bbslist board article image message jdlib skeleton history config icons sound xml control -bin_PROGRAMS = jd +bin_PROGRAMS = jdim -jd_LDADD = \ +jdim_LDADD = \ ./dbimg/libdbimg.a \ ./bbslist/libbbslist.a \ ./board/libboard.a \ @@ -21,7 +21,7 @@ jd_LDADD = \ @LIBS@ @GTKMM_LIBS@ @GTHREAD_LIBS@ @GNUTLS_LIBS@ @OPENSSL_LIBS@ @GNOMEUI_LIBS@ @LIBSM_LIBS@ @ALSA_LIBS@ @ONIG_LIBS@ @X11_LIBS@ -jd_SOURCES = \ +jdim_SOURCES = \ main.cpp \ winmain.cpp \ core.cpp \ @@ -70,7 +70,7 @@ jd_SOURCES = \ environment.cpp if MAKE_WINDRES -jd_SOURCES += jd_windres.rc +jdim_SOURCES += jd_windres.rc endif diff --git a/src/cache.cpp b/src/cache.cpp index a36821aa6..17b678c7b 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -70,7 +70,7 @@ std::string CACHE::path_session() // ロックファイル std::string CACHE::path_lock() { - const std::string jd_lock = MISC::getenv_limited( "JD_LOCK", MAX_SAFE_PATH ); + const std::string jd_lock = MISC::getenv_limited( "JDIM_LOCK", MAX_SAFE_PATH ); if( ! jd_lock.empty() ) return jd_lock; return CACHE::path_root() + "JDLOCK"; @@ -89,7 +89,7 @@ std::string CACHE::path_root() { if( root_path.empty() ){ - const std::string jd_cache = MISC::getenv_limited( "JD_CACHE", MAX_SAFE_PATH ); + const std::string jd_cache = MISC::getenv_limited( "JDIM_CACHE", MAX_SAFE_PATH ); root_path = jd_cache.empty() ? "~/.jd/" : jd_cache; if( root_path[ root_path.length() -1 ] != '/' ) root_path = root_path + "/"; diff --git a/src/config/aboutconfig.cpp b/src/config/aboutconfig.cpp index e1efa2327..4d14f2d26 100644 --- a/src/config/aboutconfig.cpp +++ b/src/config/aboutconfig.cpp @@ -46,7 +46,7 @@ AboutConfig::AboutConfig( Gtk::Window* parent ) // void AboutConfig::pack_widgets() { - m_label.set_text( "動作保証外です。高度な設定を変更するとJDが誤作動する場合があります。" ); + m_label.set_text( "動作保証外です。高度な設定を変更するとJDimが誤作動する場合があります。" ); m_liststore = Gtk::ListStore::create( m_columns ); m_treeview.set_model( m_liststore ); @@ -85,7 +85,7 @@ void AboutConfig::pack_widgets() // void AboutConfig::slot_ok_clicked() { - SKELETON::MsgDiag mdiag( NULL, "一部の設定はJDを再起動しない限り有効になりません。JDを再起動してください。" ); + SKELETON::MsgDiag mdiag( NULL, "一部の設定はJDimを再起動しない限り有効になりません。JDimを再起動してください。" ); mdiag.run(); } @@ -118,7 +118,7 @@ void AboutConfig::append_rows() { // ネットワーク append_row( "■ ネットワーク" ); - append_row( "JD ホームページのアドレス", get_confitem()->url_jdhp, CONF_URL_JDHP ); + append_row( "JDim ホームページのアドレス", get_confitem()->url_jdimhp, CONF_URL_JDIMHP ); append_row( "板一覧を取得するサーバ", get_confitem()->url_bbsmenu, CONF_URL_BBSMENU ); append_row( "2chログイン認証サーバのアドレス", get_confitem()->url_login2ch, CONF_LOGIN2CH ); append_row( "p2ログイン認証サーバのアドレス", get_confitem()->url_loginp2, CONF_LOGINP2 ); diff --git a/src/config/configitems.cpp b/src/config/configitems.cpp index 5d626e5ce..d54dd6b22 100644 --- a/src/config/configitems.cpp +++ b/src/config/configitems.cpp @@ -255,6 +255,9 @@ bool ConfigItems::load( const bool restore ) // JD ホームページのアドレス url_jdhp = cf.get_option_str( "url_jdhp", CONF_URL_JDHP ); + // JDim ホームページのアドレス + url_jdimhp = cf.get_option_str( "url_jdimhp", CONF_URL_JDIMHP ); + // 2chの認証サーバのアドレス url_login2ch = cf.get_option_str( "url_login2ch", CONF_LOGIN2CH ); @@ -663,6 +666,7 @@ void ConfigItems::save_impl( const std::string& path ) cf.update( "restore_image", restore_image ); cf.update( "manage_winpos", manage_winpos ); cf.update( "url_jdhp", url_jdhp ); + cf.update( "url_jdimhp", url_jdimhp ); cf.update( "url_login2ch", url_login2ch ); cf.update( "url_loginp2", url_loginp2 ); cf.update( "url_loginbe", url_loginbe ); diff --git a/src/config/configitems.h b/src/config/configitems.h index d5ecb752c..73fea821f 100644 --- a/src/config/configitems.h +++ b/src/config/configitems.h @@ -179,6 +179,9 @@ namespace CONFIG // JD ホームページのアドレス std::string url_jdhp; + // JDim ホームページのアドレス + std::string url_jdimhp; + // 2chの認証サーバのアドレス std::string url_login2ch; diff --git a/src/config/defaultconf.h b/src/config/defaultconf.h index 771621a00..0d34c699c 100644 --- a/src/config/defaultconf.h +++ b/src/config/defaultconf.h @@ -201,7 +201,10 @@ namespace CONFIG #define CONF_X_2CH_UA "Navigator for 2ch 1.7.5" // JD ホームページのアドレス -#define CONF_URL_JDHP "http://jd4linux.sourceforge.jp/" +#define CONF_URL_JDHP "https://jd4linux.osdn.jp/" + +// JDim ホームページのアドレス +#define CONF_URL_JDIMHP "https://github.com/JDimproved/JDim" // 2chの認証サーバのアドレス #define CONF_LOGIN2CH "https://2chv.tora3.net/futen.cgi" diff --git a/src/config/globalconf.cpp b/src/config/globalconf.cpp index 98a95ddd3..bdfce71e3 100644 --- a/src/config/globalconf.cpp +++ b/src/config/globalconf.cpp @@ -153,6 +153,7 @@ void CONFIG::set_regex_res_aa( const std::string& regex ){ } const std::string& CONFIG::get_url_jdhp() { return get_confitem()->url_jdhp; } +const std::string& CONFIG::get_url_jdimhp() { return get_confitem()->url_jdimhp; } // 2chの認証サーバのアドレス const std::string& CONFIG::get_url_login2ch() { return get_confitem()->url_login2ch; } diff --git a/src/config/globalconf.h b/src/config/globalconf.h index 6cac2a942..194005be1 100644 --- a/src/config/globalconf.h +++ b/src/config/globalconf.h @@ -95,6 +95,8 @@ namespace CONFIG // JD ホームページのアドレス const std::string& get_url_jdhp(); + // JDim ホームページのアドレス + const std::string& get_url_jdimhp(); // 2chの認証サーバのアドレス const std::string& get_url_login2ch(); diff --git a/src/control/controllabel.h b/src/control/controllabel.h index c7b7fa6d7..7f5d7c8f4 100644 --- a/src/control/controllabel.h +++ b/src/control/controllabel.h @@ -133,7 +133,7 @@ namespace CONTROL { "CheckUpdateRoot", ITEM_NAME_CHECK_UPDATE_ROOT }, { "CheckUpdateOpenRoot", ITEM_NAME_CHECK_UPDATE_OPEN_ROOT }, - { "QuitJD", "JD終了" }, + { "QuitJD", "JDim終了" }, { "MaximizeMainWin", "最大化 / 最大化解除" }, { "IconifyMainWin", "最小化" }, { "FullScreen", "全画面表示" }, diff --git a/src/core.cpp b/src/core.cpp index 76a70e3c7..e21970028 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -759,18 +759,18 @@ void Core::run( const bool init, const bool skip_setupdiag ) // help m_action_group->add( Gtk::Action::create( "Menu_Help", "ヘルプ(_H)" ) ); - m_action_group->add( Gtk::Action::create( "Bbs", "サポート掲示板(_B)" ), sigc::mem_fun( *this, &Core::slot_show_bbs ) ); + m_action_group->add( Gtk::Action::create( "Bbs", "JD サポート掲示板(_B)" ), sigc::mem_fun( *this, &Core::slot_show_bbs ) ); m_action_group->add( Gtk::Action::create( "OldLog", "2chスレ過去ログ(_L)" ), sigc::mem_fun( *this, &Core::slot_show_old2ch ) ); Gtk::AccelKey jdhelpKey = CONTROL::get_accelkey( CONTROL::JDHelp ); if( jdhelpKey.is_null() ){ - m_action_group->add( Gtk::Action::create( "Manual", "オンラインマニュアル(_M)..." ), + m_action_group->add( Gtk::Action::create( "Manual", "JD オンラインマニュアル(_M)..." ), sigc::mem_fun( *this, &Core::slot_show_manual ) ); }else{ - m_action_group->add( Gtk::Action::create( "Manual", "オンラインマニュアル(_M)..." ), + m_action_group->add( Gtk::Action::create( "Manual", "JD オンラインマニュアル(_M)..." ), jdhelpKey, sigc::mem_fun( *this, &Core::slot_show_manual ) ); } - m_action_group->add( Gtk::Action::create( "About", "JDについて(_A)..." ), sigc::mem_fun( *this, &Core::slot_show_about ) ); + m_action_group->add( Gtk::Action::create( "About", "JDimについて(_A)..." ), sigc::mem_fun( *this, &Core::slot_show_about ) ); m_ui_manager = Gtk::UIManager::create(); @@ -1361,8 +1361,8 @@ void Core::set_maintitle() std::string title; - if( m_title.empty() ) title = "JD - " + ENVIRONMENT::get_jdversion(); - else title = "JD - " + m_title; + if( m_title.empty() ) title = "JDim - " + ENVIRONMENT::get_jdversion(); + else title = "JDim - " + m_title; if( CORE::get_login2ch()->login_now() ) title +=" [ ● ]"; if( CORE::get_loginbe()->login_now() ) title +=" [ BE ]"; @@ -1822,7 +1822,7 @@ void Core::toggle_draw_toolbarback() CONFIG::set_draw_toolbarback( ! CONFIG::get_draw_toolbarback() ); - SKELETON::MsgDiag mdiag( NULL, "正しく表示させるためにはJDを再起動してください。" ); + SKELETON::MsgDiag mdiag( NULL, "正しく表示させるためにはJDimを再起動してください。" ); mdiag.run(); } diff --git a/src/dbimg/delimgcachediag.cpp b/src/dbimg/delimgcachediag.cpp index 67e984f1e..b1649d862 100644 --- a/src/dbimg/delimgcachediag.cpp +++ b/src/dbimg/delimgcachediag.cpp @@ -28,7 +28,7 @@ DelImgCacheDiag::DelImgCacheDiag() add_button( Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL ) ->signal_clicked().connect( sigc::mem_fun(*this, &DelImgCacheDiag::slot_cancel_clicked ) ); - set_title( "JD 画像キャッシュ削除中" ); + set_title( "JDim 画像キャッシュ削除中" ); const int mrg = 8; get_vbox()->set_spacing( mrg ); diff --git a/src/fontcolorpref.cpp b/src/fontcolorpref.cpp index e6f98de58..f3b8fa751 100644 --- a/src/fontcolorpref.cpp +++ b/src/fontcolorpref.cpp @@ -20,7 +20,7 @@ #define WARNING_STRICTCHAR "スレビューのフォント幅の近似計算を厳密に行います\n\nレイアウトが崩れにくくなるかわりにパフォーマンスが著しく低下します。通常は設定しないでください" -#define WARNING_GTKRC_TREE "gtkrc 関係の設定はJDの再起動後に有効になります" +#define WARNING_GTKRC_TREE "gtkrc 関係の設定はJDimの再起動後に有効になります" using namespace CORE; diff --git a/src/main.cpp b/src/main.cpp index 4a7c5a1e7..dee5aca03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -302,7 +302,7 @@ void usage( const int status ) // -h, --help で表示するメッセージ std::stringstream help_message; help_message << - "Usage: jd [OPTION] [URL,FILE]\n" + "Usage: jdim [OPTION] [URL,FILE]\n" "\n" "-h, --help\n" " Display this information\n" @@ -431,7 +431,7 @@ int main( int argc, char **argv ) break; case 'V': // バージョンと完全なconfigureオプションを表示 - std::cout << "JD " << ENVIRONMENT::get_jdversion() << ", " << + std::cout << "JDim " << ENVIRONMENT::get_jdversion() << ", " << ENVIRONMENT::get_jdcopyright() << "\n" "configure: " << ENVIRONMENT::get_configure_args( ENVIRONMENT::CONFIGURE_FULL ) << std::endl; exit( 0 ); @@ -520,7 +520,7 @@ int main( int argc, char **argv ) #endif // gnomeセッションマネージャとつないでログアウト時に"save_yourself"シグナルをもらう - gnome_init( "jd", "1.0", argc, argv ); + gnome_init( "jdim", "1.0", argc, argv ); GnomeClient *client_gnome = gnome_master_client(); if( client_gnome ) gtk_signal_connect( GTK_OBJECT( client_gnome ), "save_yourself", GTK_SIGNAL_FUNC( save_yourself_gnome ), NULL ); else MISC::ERRMSG( "failed to connect to gnome session manager" ); diff --git a/src/menuslots.cpp b/src/menuslots.cpp index 16e56f6d2..b73b0d199 100644 --- a/src/menuslots.cpp +++ b/src/menuslots.cpp @@ -1296,6 +1296,6 @@ void Core::slot_show_manual() // void Core::slot_show_about() { - SKELETON::AboutDiag about( "JDについて" ); + SKELETON::AboutDiag about( "JDimについて" ); about.run(); } diff --git a/src/setupwizard.cpp b/src/setupwizard.cpp index 46a9a7c67..ec0d8f108 100644 --- a/src/setupwizard.cpp +++ b/src/setupwizard.cpp @@ -20,8 +20,10 @@ enum }; PageStart::PageStart() : Gtk::VBox(), - m_label( "1/5.JD セットアップ開始", Gtk::ALIGN_START ), - m_label2( "JDセットアップウィザードへようこそ\n\nこのウィザードでネットワークとフォント等の設定をおこないます\n\n設定を始めるには[次へ]を押してください", Gtk::ALIGN_START ) + m_label( "1/5.JDim セットアップ開始", Gtk::ALIGN_START ), + m_label2( "JDimセットアップウィザードへようこそ\n\n" + "このウィザードでネットワークとフォント等の設定をおこないます\n\n" + "設定を始めるには[次へ]を押してください", Gtk::ALIGN_START ) { m_icon.set( ICON::get_icon_manager()->get_icon( ICON::JD48 ) ); m_hbox_label.set_spacing( SPACING_SIZE ); @@ -222,8 +224,10 @@ void PagePane::slot_v3pane() PageEnd::PageEnd() : Gtk::VBox(), - m_label( "5/5.JD セットアップ完了", Gtk::ALIGN_START ), - m_label2( "その他の設定は起動後に設定及び表示メニューからおこなって下さい\n\n完了を押すとJDを起動して板一覧のリストをロードします\n板一覧が表示されるまでしばらくお待ち下さい" , Gtk::ALIGN_START ) + m_label( "5/5.JDim セットアップ完了", Gtk::ALIGN_START ), + m_label2( "その他の設定は起動後に設定及び表示メニューからおこなって下さい\n\n" + "完了を押すとJDimを起動して板一覧のリストをロードします\n" + "板一覧が表示されるまでしばらくお待ち下さい" , Gtk::ALIGN_START ) { m_icon.set( ICON::get_icon_manager()->get_icon( ICON::JD48 ) ); m_hbox_label.set_spacing( SPACING_SIZE ); @@ -242,7 +246,7 @@ PageEnd::PageEnd() : Gtk::VBox(), SetupWizard::SetupWizard() : Gtk::Dialog(), m_back( "<< 戻る(_B)", true ), m_next( "次へ(_N) >>", true ) { - set_title( "JD セットアップウィザード" ); + set_title( "JDim セットアップウィザード" ); set_keep_above( true ); set_resizable( false ); diff --git a/src/skeleton/aboutdiag.cpp b/src/skeleton/aboutdiag.cpp index 4ccbc3e31..abb857b70 100644 --- a/src/skeleton/aboutdiag.cpp +++ b/src/skeleton/aboutdiag.cpp @@ -36,7 +36,7 @@ AboutDiag::AboutDiag( const Glib::ustring& title ) set_logo( ICON::get_icon( ICON::JD96 ) ); set_version( ENVIRONMENT::get_jdversion() ); set_comments( ENVIRONMENT::get_jdcomments() ); - set_website( CONFIG::get_url_jdhp() ); + set_website( CONFIG::get_url_jdimhp() ); set_copyright( ENVIRONMENT::get_jdcopyright() ); set_license( ENVIRONMENT::get_jdlicense() ); set_environment_list(); @@ -283,7 +283,7 @@ void AboutDiag::set_environment_list() m_treeview_environment.append_column( "内容", column_value ); row = *( liststore->append() ); - row[ column_name ] = "JDのバージョン"; + row[ column_name ] = "JDimのバージョン"; row[ column_value ] = ENVIRONMENT::get_jdversion(); row = *( liststore->append() ); diff --git a/src/skeleton/admin.cpp b/src/skeleton/admin.cpp index c44116999..040c3e76a 100644 --- a/src/skeleton/admin.cpp +++ b/src/skeleton/admin.cpp @@ -1651,7 +1651,7 @@ void Admin::update_finish( const std::string& url ) // void Admin::set_title( const std::string& url, const std::string& title, const bool force ) { - if( m_win ) m_win->set_title( "JD - " + title ); + if( m_win ) m_win->set_title( "JDim - " + title ); else{ SKELETON::View* view = get_current_view(); diff --git a/src/skeleton/editview.cpp b/src/skeleton/editview.cpp index 5e332f7bb..f649695d9 100644 --- a/src/skeleton/editview.cpp +++ b/src/skeleton/editview.cpp @@ -463,8 +463,8 @@ void EditTextView::on_populate_popup( Gtk::Menu* menu ) Gtk::MenuItem* menuitem = Gtk::manage( new Gtk::SeparatorMenuItem() ); menu->prepend( *menuitem ); - // JDの動作環境を記入 - menuitem = Gtk::manage( new Gtk::MenuItem( "JDの動作環境を記入" ) ); + // JDimの動作環境を記入 + menuitem = Gtk::manage( new Gtk::MenuItem( "JDimの動作環境を記入" ) ); menuitem->signal_activate().connect( sigc::mem_fun( *this, &EditTextView::slot_write_jdinfo ) ); menu->prepend( *menuitem ); From bddcff0253c09fb8bfb87930f417deb450e6aa57 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 21:49:51 +0900 Subject: [PATCH 12/13] Update embedded copyright MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --versionオプション、Aboutダイアログの表示を調整する --- src/jdversion.h | 6 ++++-- src/main.cpp | 2 +- src/skeleton/aboutdiag.cpp | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jdversion.h b/src/jdversion.h index 7f91e250c..156c894af 100644 --- a/src/jdversion.h +++ b/src/jdversion.h @@ -30,8 +30,10 @@ //--------------------------------- -#define JDCOMMENT "JD は gtkmm/GTK+2 を用いた2chブラウザです。" -#define JDCOPYRIGHT "(c) 2006-2015 JD project" +#define JDCOMMENT "JDim (JD improved) は gtkmm/GTK+ を用いた2chブラウザです。" +#define JDCOPYRIGHT "(c) 2006-2015 JD project" "\n" \ + "(c) 2017-2019 yama-natuki" "\n" \ + "(c) 2019 JDimproved project" #define JDBBS CONFIG::get_url_jdhp()+"cgi-bin/bbs/support/" #define JD2CHLOG CONFIG::get_url_jdhp()+"old2ch/" #define JDHELP CONFIG::get_url_jdhp()+"manual/"+MISC::itostr( JDVERSION )+"/" diff --git a/src/main.cpp b/src/main.cpp index dee5aca03..48368d524 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -431,7 +431,7 @@ int main( int argc, char **argv ) break; case 'V': // バージョンと完全なconfigureオプションを表示 - std::cout << "JDim " << ENVIRONMENT::get_jdversion() << ", " << + std::cout << "JDim " << ENVIRONMENT::get_jdversion() << "\n" << ENVIRONMENT::get_jdcopyright() << "\n" "configure: " << ENVIRONMENT::get_configure_args( ENVIRONMENT::CONFIGURE_FULL ) << std::endl; exit( 0 ); diff --git a/src/skeleton/aboutdiag.cpp b/src/skeleton/aboutdiag.cpp index abb857b70..629af56f1 100644 --- a/src/skeleton/aboutdiag.cpp +++ b/src/skeleton/aboutdiag.cpp @@ -96,6 +96,7 @@ void AboutDiag::init() // コピーライト if( ! get_copyright().empty() ) { + m_label_copyright.set_justify( Gtk::JUSTIFY_CENTER ); m_vbox_info.pack_start( m_label_copyright, Gtk::PACK_SHRINK ); } // Webサイト From 95e5f2d5c8087338ae14e3cc0ab3cf5840a8e732 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Tue, 22 Jan 2019 22:00:52 +0900 Subject: [PATCH 13/13] Reset version number to 0.1.0 --- src/jdversion.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jdversion.h b/src/jdversion.h index 156c894af..5629a784a 100644 --- a/src/jdversion.h +++ b/src/jdversion.h @@ -17,15 +17,16 @@ // リビジョンが参照できない場合はJDDATE_FALLBACKを使う // SEE ALSO: ENVIRONMENT::get_jdversion() -#define MAJORVERSION 2 -#define MINORVERSION 8 -#define MICROVERSION 9 -#define JDDATE_FALLBACK "180424" +#define MAJORVERSION 0 +#define MINORVERSION 1 +#define MICROVERSION 0 +#define JDDATE_FALLBACK "20190122" #define JDTAG "" //--------------------------------- -#define JDVERSION ( MAJORVERSION * 100 + MINORVERSION * 10 + MICROVERSION ) +// FIXME: オンラインマニュアルはfork元のURLを参照している +#define JDVERSION ( 289 ) #define JDVERSION_FULL ( JDVERSION * 1000000 + atoi( JDDATE_FALLBACK ) ) //---------------------------------