From 01cafdac64523191e39eb679c9abd17c25fe0322 Mon Sep 17 00:00:00 2001 From: Rmys Date: Sun, 31 Jul 2022 00:56:11 +0300 Subject: [PATCH] codeblocks-20.03 --- programming/environment/codeblocks/actions.py | 5 +- ...c50fb8c6a29b2d84579ee448d2498414d855.patch | 27 + ...b020b862ec855038dd32a51ebb072647f28d.patch | 45 + ...5df024251850832583f73e67e515dae10830.patch | 129 + ...88e3f2b933f19f9933e06c8d0899c54f5e25.patch | 213 ++ ...0043319758cb0e798eb23520063583c40eaa.patch | 30 + ...0396fad7a5b4bbb40bb8c4b5fe1755078aef.patch | 3215 +++++++++++++++++ ...dfdff321754819f79e3165401aa59bd8c7f7.patch | 724 ++++ ...6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch | 462 +++ ...cc92640b587ad049cd6aa68c637e536e9ab5.patch | 84 + ...f1279804e1d11b71bc75eeb37072c3589296.patch | 66 + ...46f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch | 965 +++++ .../codeblocks/files/codeblocks-gcc11.patch | 13 + ...5c5ea9e3161233f0588a7616b7e4fedc7870.patch | 54 + ...27cf5cd97c7da6a957a3f7764cb25cc9017e.patch | 70 + .../files/sc_wxtypes-normalize.patch | 13 + programming/environment/codeblocks/pspec.xml | 87 +- .../environment/codeblocks/translations.xml | 5 +- server/ntp/comar/ntpdate-service.py | 2 +- 19 files changed, 6157 insertions(+), 52 deletions(-) create mode 100644 programming/environment/codeblocks/files/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch create mode 100644 programming/environment/codeblocks/files/2345b020b862ec855038dd32a51ebb072647f28d.patch create mode 100644 programming/environment/codeblocks/files/29315df024251850832583f73e67e515dae10830.patch create mode 100644 programming/environment/codeblocks/files/40eb88e3f2b933f19f9933e06c8d0899c54f5e25.patch create mode 100644 programming/environment/codeblocks/files/46720043319758cb0e798eb23520063583c40eaa.patch create mode 100644 programming/environment/codeblocks/files/56ac0396fad7a5b4bbb40bb8c4b5fe1755078aef.patch create mode 100644 programming/environment/codeblocks/files/8035dfdff321754819f79e3165401aa59bd8c7f7.patch create mode 100644 programming/environment/codeblocks/files/9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch create mode 100644 programming/environment/codeblocks/files/a4aacc92640b587ad049cd6aa68c637e536e9ab5.patch create mode 100644 programming/environment/codeblocks/files/b2e4f1279804e1d11b71bc75eeb37072c3589296.patch create mode 100644 programming/environment/codeblocks/files/c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch create mode 100644 programming/environment/codeblocks/files/codeblocks-gcc11.patch create mode 100644 programming/environment/codeblocks/files/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch create mode 100644 programming/environment/codeblocks/files/f2f127cf5cd97c7da6a957a3f7764cb25cc9017e.patch create mode 100644 programming/environment/codeblocks/files/sc_wxtypes-normalize.patch diff --git a/programming/environment/codeblocks/actions.py b/programming/environment/codeblocks/actions.py index 1c5c56166c..8d69169015 100644 --- a/programming/environment/codeblocks/actions.py +++ b/programming/environment/codeblocks/actions.py @@ -11,7 +11,10 @@ from pisi.actionsapi import get def setup(): + shelltools.system("sed -i 's|$(datadir)/pixmaps|$(datadir)/icons/hicolor/64x64/apps|' src/mime/Makefile.{am,in}") + shelltools.system("sed -i 's|$(datarootdir)/appdata|$(datarootdir)/metainfo|' Makefile.{am,in} src/plugins/contrib/appdata/Makefile.{am,in}") shelltools.system("./bootstrap") + #shelltools.system("./bootstrap") #autotools.autoreconf("-vif") #plugins = "AutoVersioning,BrowseTracker,byogames,Cccc,CppCheck,cbkoders,codesnippets,codestat,copystrings,dragscroll,envvars,headerfixup,help,hexeditor,incsearch,keybinder,MouseSap,profiler,regex,exporter,symtab,Valgrind" # suppress compiler warnings @@ -36,4 +39,4 @@ def build(): def install(): autotools.install() - pisitools.dodoc("COPYING", "README") \ No newline at end of file + pisitools.dodoc("COPYING", "README") diff --git a/programming/environment/codeblocks/files/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch b/programming/environment/codeblocks/files/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch new file mode 100644 index 0000000000..34b56d80c8 --- /dev/null +++ b/programming/environment/codeblocks/files/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch @@ -0,0 +1,27 @@ +From 04b7c50fb8c6a29b2d84579ee448d2498414d855 Mon Sep 17 00:00:00 2001 +From: ollydbg +Date: Wed, 6 Oct 2021 14:29:21 +0000 +Subject: [PATCH] * Fix CCManager compilation with C++17(apply patch #1142, + thanks Miguel Gimenez) + +See details in: https://sourceforge.net/p/codeblocks/tickets/1142/ +and forum discussion: https://forums.codeblocks.org/index.php/topic,24643.0.html + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12532 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/include/ccmanager.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/include/ccmanager.h b/src/include/ccmanager.h +index 1f471001d..57318bf6f 100644 +--- a/src/include/ccmanager.h ++++ b/src/include/ccmanager.h +@@ -44,7 +44,7 @@ class wxScintillaEvent; + * list or the doxygen popup, the scroll event is instead sent there (and skipped for the editor + * window). + */ +-class DLLIMPORT CCManager : public Mgr, wxEvtHandler ++class DLLIMPORT CCManager : public Mgr, public wxEvtHandler + { + public: + friend class Mgr; diff --git a/programming/environment/codeblocks/files/2345b020b862ec855038dd32a51ebb072647f28d.patch b/programming/environment/codeblocks/files/2345b020b862ec855038dd32a51ebb072647f28d.patch new file mode 100644 index 0000000000..f6c8a34778 --- /dev/null +++ b/programming/environment/codeblocks/files/2345b020b862ec855038dd32a51ebb072647f28d.patch @@ -0,0 +1,45 @@ +From 2345b020b862ec855038dd32a51ebb072647f28d Mon Sep 17 00:00:00 2001 +From: fuscated +Date: Sun, 22 Mar 2020 20:02:49 +0000 +Subject: [PATCH] - build: Fixes to make it compile when using wx-master + +> Paint events aren't no longer allowed to be created. We've used this in a + single place in the code. I'm not sure what is the idea behind this, + probably to redraw something. For now I'm removing it and we'll see if + something breaks. +> The second change is the removal of a c-tor in wxPGWindowList, I've + replaced it with the non-generic two parameter one. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11991 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/src/main.cpp | 2 -- + src/src/watchesdlg.cpp | 3 +-- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/src/main.cpp b/src/src/main.cpp +index 7d0b317eb..323457761 100644 +--- a/src/src/main.cpp ++++ b/src/src/main.cpp +@@ -2680,8 +2680,6 @@ bool MainFrame::OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& f + else + { + wxBusyCursor useless; +- wxPaintEvent e; +- ProcessEvent(e); + for (unsigned int i = 0; i < files.GetCount(); ++i) + success &= OpenGeneric(files[i]); + } +diff --git a/src/src/watchesdlg.cpp b/src/src/watchesdlg.cpp +index 9ff3e8655..ca4fd979a 100644 +--- a/src/src/watchesdlg.cpp ++++ b/src/src/watchesdlg.cpp +@@ -103,8 +103,7 @@ class cbDummyEditor : public wxPGEditor + cb_unused const wxPoint& pos, + cb_unused const wxSize& sz) const override + { +- wxPGWindowList const list; +- return list; ++ return wxPGWindowList(nullptr, nullptr); + } + void UpdateControl(cb_unused wxPGProperty* property, cb_unused wxWindow* ctrl) const override {} + bool OnEvent(cb_unused wxPropertyGrid* propgrid, cb_unused wxPGProperty* property, diff --git a/programming/environment/codeblocks/files/29315df024251850832583f73e67e515dae10830.patch b/programming/environment/codeblocks/files/29315df024251850832583f73e67e515dae10830.patch new file mode 100644 index 0000000000..3f184a90ce --- /dev/null +++ b/programming/environment/codeblocks/files/29315df024251850832583f73e67e515dae10830.patch @@ -0,0 +1,129 @@ +From 29315df024251850832583f73e67e515dae10830 Mon Sep 17 00:00:00 2001 +From: wh11204 +Date: Mon, 7 Feb 2022 15:55:51 +0000 +Subject: [PATCH] - Fix compilation of notebookstyles.cpp with + wxWidgets-master. This change allows testing C::B with the upcoming wx3.1.6. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12707 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/src/notebookstyles.cpp | 52 +++++++++++++++++++++++++++++++++----- + 1 file changed, 45 insertions(+), 7 deletions(-) + +diff --git a/src/src/notebookstyles.cpp b/src/src/notebookstyles.cpp +index d53edcaed..51fef6e49 100644 +--- a/src/src/notebookstyles.cpp ++++ b/src/src/notebookstyles.cpp +@@ -124,14 +124,23 @@ void NbStyleVC71::DrawTab(wxDC& dc, wxWindow* wnd, + if (page.bitmap.IsOk()) + { + bitmap_offset = tab_x + 8; +- + // draw bitmap ++#if wxCHECK_VERSION(3, 1, 6) ++ const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd)); ++ dc.DrawBitmap(bmp, ++ bitmap_offset, ++ drawn_tab_yoff + (drawn_tab_height/2) - (bmp.GetHeight()/2), ++ true); ++ ++ text_offset = bitmap_offset + bmp.GetWidth(); ++#else + dc.DrawBitmap(page.bitmap, + bitmap_offset, + drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), + true); + + text_offset = bitmap_offset + page.bitmap.GetWidth(); ++#endif + text_offset += 3; // bitmap padding + } + else +@@ -161,13 +170,23 @@ void NbStyleVC71::DrawTab(wxDC& dc, wxWindow* wnd, + // draw 'x' on tab (if enabled) + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { +- int close_button_width = m_activeCloseBmp.GetWidth(); +- wxBitmap bmp = m_disabledCloseBmp; ++ wxBitmap bmp; + ++#if wxCHECK_VERSION(3, 1, 6) ++ if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || ++ (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) ++ bmp = m_activeCloseBmp.GetBitmapFor(wnd); ++ else ++ bmp = m_disabledCloseBmp.GetBitmapFor(wnd); ++#else + if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || + (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) + bmp = m_activeCloseBmp; ++ else ++ bmp = m_disabledCloseBmp; ++#endif + ++ const int close_button_width = bmp.GetWidth(); + wxRect rect(tab_x + tab_width - close_button_width - 3, + drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), + close_button_width, tab_height); +@@ -285,17 +304,27 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + int text_offset = tab_x + 8; + + int bitmap_offset = 0; ++ + if (page.bitmap.IsOk()) + { + bitmap_offset = tab_x + 8; +- + // draw bitmap ++#if wxCHECK_VERSION(3, 1, 6) ++ const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd)); ++ dc.DrawBitmap(bmp, ++ bitmap_offset, ++ drawn_tab_yoff + (drawn_tab_height/2) - (bmp.GetHeight()/2), ++ true); ++ ++ text_offset = bitmap_offset + bmp.GetWidth(); ++#else + dc.DrawBitmap(page.bitmap, + bitmap_offset, + drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), + true); + + text_offset = bitmap_offset + page.bitmap.GetWidth(); ++#endif + text_offset += 3; // bitmap padding + } + else +@@ -303,7 +332,6 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + text_offset = tab_x + 8; + } + +- + // if the caption is empty, measure some temporary text + wxString caption = page.caption; + if (caption.empty()) +@@ -325,13 +353,23 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + // draw 'x' on tab (if enabled) + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { +- int close_button_width = m_activeCloseBmp.GetWidth(); +- wxBitmap bmp = m_disabledCloseBmp; ++ wxBitmap bmp; + ++#if wxCHECK_VERSION(3, 1, 6) ++ if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || ++ (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) ++ bmp = m_activeCloseBmp.GetBitmapFor(wnd); ++ else ++ bmp = m_disabledCloseBmp.GetBitmapFor(wnd); ++#else + if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || + (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) + bmp = m_activeCloseBmp; ++ else ++ bmp = m_disabledCloseBmp; ++#endif + ++ const int close_button_width = bmp.GetWidth(); + wxRect rect(tab_x + tab_width - close_button_width - 3, + drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), + close_button_width, tab_height); diff --git a/programming/environment/codeblocks/files/40eb88e3f2b933f19f9933e06c8d0899c54f5e25.patch b/programming/environment/codeblocks/files/40eb88e3f2b933f19f9933e06c8d0899c54f5e25.patch new file mode 100644 index 0000000000..b6b4587bb4 --- /dev/null +++ b/programming/environment/codeblocks/files/40eb88e3f2b933f19f9933e06c8d0899c54f5e25.patch @@ -0,0 +1,213 @@ +From 40eb88e3f2b933f19f9933e06c8d0899c54f5e25 Mon Sep 17 00:00:00 2001 +From: mortenmacfly +Date: Sat, 4 Jan 2020 15:41:53 +0000 +Subject: [PATCH] * applied patch #805: Flashing icons in Windows' taskbar + while starting C::B. Thanks Miguel Gimenez. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11938 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/include/compiler.h | 15 +-- + src/plugins/compilergcc/compilerMINGW.cpp | 13 +-- + src/sdk/compiler.cpp | 106 +++++++++++++++++++--- + 3 files changed, 104 insertions(+), 30 deletions(-) + +diff --git a/src/include/compiler.h b/src/include/compiler.h +index f151ef62f..8d18c8ffc 100644 +--- a/src/include/compiler.h ++++ b/src/include/compiler.h +@@ -100,12 +100,12 @@ struct RegExStruct + } + RegExStruct& operator=(const RegExStruct &obj) + { +- desc=obj.desc; +- lt=obj.lt; +- regex=obj.regex; +- regexCompiled=false; +- filename=obj.filename; +- line=obj.line; ++ desc = obj.desc; ++ lt = obj.lt; ++ regex = obj.regex; ++ regexCompiled = false; ++ filename = obj.filename; ++ line = obj.line; + memcpy(msg, obj.msg, sizeof(msg)); + + return *this; +@@ -404,6 +404,9 @@ class DLLIMPORT Compiler : public CompileOptionsBase + // keeps a copy of current settings (works only the first time it's called) + void MirrorCurrentSettings(); + ++ // execute without creating taskbar icon ++ long Execute(const wxString& cmd, wxArrayString& output); ++ + // set the following members in your class + wxString m_Name; + wxString m_MasterPath; +diff --git a/src/plugins/compilergcc/compilerMINGW.cpp b/src/plugins/compilergcc/compilerMINGW.cpp +index 1c6cd88a7..5f5509229 100644 +--- a/src/plugins/compilergcc/compilerMINGW.cpp ++++ b/src/plugins/compilergcc/compilerMINGW.cpp +@@ -173,7 +173,7 @@ void CompilerMINGW::SetVersionString() + { + // Manager::Get()->GetLogManager()->DebugLog(_T("Compiler detection for compiler ID: '") + GetID() + _T("' (parent ID= '") + GetParentID() + _T("')")); + +- wxArrayString output, errors; ++ wxArrayString output; + wxString sep = wxFileName::GetPathSeparator(); + wxString master_path = m_MasterPath; + wxString compiler_exe = m_Programs.C; +@@ -223,16 +223,7 @@ void CompilerMINGW::SetVersionString() + + // Manager::Get()->GetLogManager()->DebugLog(_T("Compiler version detection: Issuing command: ") + gcc_command); + +- int flags = wxEXEC_SYNC; +-#if wxCHECK_VERSION(3, 0, 0) +- // Stop event-loop while wxExecute runs, to avoid a deadlock on startup, +- // that occurs from time to time on wx3 +- flags |= wxEXEC_NOEVENTS; +-#else +- flags |= wxEXEC_NODISABLE; +-#endif +- long result = wxExecute(gcc_command + _T(" --version"), output, errors, flags ); +- if(result != 0) ++ if ( Execute(gcc_command + _T(" --version"), output) != 0 ) + { + // Manager::Get()->GetLogManager()->DebugLog(_T("Compiler version detection: Error executing command.")); + } +diff --git a/src/sdk/compiler.cpp b/src/sdk/compiler.cpp +index b356de382..c80bbbd61 100644 +--- a/src/sdk/compiler.cpp ++++ b/src/sdk/compiler.cpp +@@ -20,7 +20,9 @@ + #include "compilerfactory.h" + + #include ++ #include + #include ++ #include + #endif + + #include "compilercommandgenerator.h" +@@ -28,7 +30,6 @@ + #include + #include + +- + // static + wxArrayString Compiler::m_CompilerIDs; // map to guarantee unique IDs + +@@ -1229,18 +1230,7 @@ bool Compiler::EvalXMLCondition(const wxXmlNode* node) + + long ret = -1; + if ( !cmd[0].IsEmpty() ) // should never be empty +- { +- int flags = wxEXEC_SYNC; +- #if wxCHECK_VERSION(3, 0, 0) +- // Stop event-loop while wxExecute runs, to avoid a deadlock on startup, +- // that occurs from time to time on wx3 +- flags |= wxEXEC_NOEVENTS; +- #else +- flags |= wxEXEC_NODISABLE; +- #endif +- wxLogNull logNo; // do not warn if execution fails +- ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd, flags); +- } ++ ret = Execute(GetStringFromArray(cmd, wxT(" "), false), cmd); + + if (ret != 0) // execution failed + val = (node->GetAttribute(wxT("default"), wxEmptyString) == wxT("true")); +@@ -1284,3 +1274,93 @@ wxString Compiler::GetExecName(const wxString& name) + ret = m_Programs.MAKE; + return ret; + } ++ ++#ifdef __WXMSW__ ++ ++// In MSW calling wxExecute in synchronous mode while the main window is not visible makes ++// the system show a C::B icon in the taskbar. When this is made repeatedly (as in compiler ++// loading) the result is a stream of flashing icons. ++// However, wxExecute in asynchronous mode does not do this. The caveat is that we must wait ++// in a loop for the end of the task and extract the command output in a separate step. ++ ++// This auxiliary class is needed for detecting the end of the task and retrieving the ouput. ++// OnTerminate() will be called when the task ends with the return code of the task, and then ++// the task output can be retrieved (as a stream). ++ ++class ExecProcess : public wxProcess ++{ ++ public: ++ ExecProcess(cb_unused wxEvtHandler *parent = NULL, cb_unused int id = -1) ++ { ++ m_status = 0; ++ } ++ ++ long GetStatus() const {return m_status;} ++ wxSemaphore &GetSemaphore() {return m_semaphore;} ++ void OnTerminate(cb_unused int pid, int status) ++ { ++ m_status = status; ++ m_semaphore.Post(); ++ } ++ ++ protected: ++ long m_status; ++ wxSemaphore m_semaphore; ++}; ++ ++// Emulates wxExecute() in synchronous mode using asynchronous mode ++ ++long Compiler::Execute(const wxString &cmd, wxArrayString &output) ++{ ++ wxLogNull logNo; // do not warn if execution fails ++ ++ output.Clear(); ++ ++ ExecProcess process; ++ process.Redirect(); // capture task input/output streams ++ ++ // wxExecute in asynchronous mode returns 0 if execution failed. ++ // Return -1 emulating the behaviour of wxExecute in synchronous mode ++ if ( !wxExecute(cmd, wxEXEC_ASYNC, &process) ) ++ return -1; ++ ++ // Wait for the end of the task ++ for (;;) ++ { ++ Manager::Yield(); // needed for semaphore update ++ if (process.GetSemaphore().WaitTimeout(25) == wxSEMA_NO_ERROR) ++ break; ++ } ++ ++ // Loads the wxArrayString with the task output (returned in a wxInputStream) ++ wxInputStream *inputStream = process.GetInputStream(); ++ wxTextInputStream text(*inputStream); ++#if wxCHECK_VERSION(3, 0, 0) ++ while (!text.GetInputStream().Eof()) ++#else ++ while (!inputStream->Eof()) ++#endif ++ { ++ output.Add(text.ReadLine()); ++ } ++ ++ // Return task exit code emulating the behaviour of wxExecute in synchronous mode ++ return process.GetStatus(); ++} ++ ++#else // __WXMSW__ ++ ++long Compiler::Execute(const wxString &cmd, wxArrayString &output) ++{ ++ wxLogNull logNo; // do not warn if execution fails ++ int flags = wxEXEC_SYNC; ++ #if wxCHECK_VERSION(3, 0, 0) ++ // Stop event-loop while wxExecute runs, to avoid a deadlock on startup, ++ // that occurs from time to time on wx3 ++ flags |= wxEXEC_NOEVENTS; ++ #else ++ flags |= wxEXEC_NODISABLE; ++ #endif ++ return wxExecute(cmd, output, flags); ++} ++#endif // __WXMSW__ diff --git a/programming/environment/codeblocks/files/46720043319758cb0e798eb23520063583c40eaa.patch b/programming/environment/codeblocks/files/46720043319758cb0e798eb23520063583c40eaa.patch new file mode 100644 index 0000000000..c6c28c4470 --- /dev/null +++ b/programming/environment/codeblocks/files/46720043319758cb0e798eb23520063583c40eaa.patch @@ -0,0 +1,30 @@ +From 46720043319758cb0e798eb23520063583c40eaa Mon Sep 17 00:00:00 2001 +From: fuscated +Date: Sun, 15 Aug 2021 11:51:11 +0000 +Subject: [PATCH] * SDK: Fix a regex in the MacroManager to work with the PCRE2 + regex engine used by wx3.1.6 (ticket #1120) + +> This regex is totally bonkers. I don't know what its purpose is, but it + is mighty strange. There is a group at the beginning which tries to match + non-$ or start of the string. At the end there is code to match ' ', '/' + or '\'. The braces could be mismatched - ${var) works perfectly fine. +> The fix is - we want to match '\', so we need to escape it. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12511 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/sdk/macrosmanager.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sdk/macrosmanager.cpp b/src/sdk/macrosmanager.cpp +index 4027d1974..086dc35cd 100644 +--- a/src/sdk/macrosmanager.cpp ++++ b/src/sdk/macrosmanager.cpp +@@ -80,7 +80,7 @@ void MacrosManager::Reset() + m_Plugins = UnixFilename(ConfigManager::GetPluginsFolder()); + m_DataPath = UnixFilename(ConfigManager::GetDataFolder()); + ClearProjectKeys(); +- m_RE_Unix.Compile(_T("([^$]|^)(\\$[({]?(#?[A-Za-z_0-9.]+)[)} /\\]?)"), wxRE_EXTENDED | wxRE_NEWLINE); ++ m_RE_Unix.Compile(_T("([^$]|^)(\\$[({]?(#?[A-Za-z_0-9.]+)[\\)} /\\\\]?)"), wxRE_EXTENDED | wxRE_NEWLINE); + m_RE_DOS.Compile(_T("([^%]|^)(%(#?[A-Za-z_0-9.]+)%)"), wxRE_EXTENDED | wxRE_NEWLINE); + m_RE_IfSp.Compile(_T("(([^=!<>]+)[ ]*(=|==|!=|>|<|>=|<=)[ ]*([^=!<>]+))"), wxRE_EXTENDED | wxRE_NEWLINE); + m_RE_Script.Compile(_T("(\\[\\[(.*)\\]\\])"), wxRE_EXTENDED | wxRE_NEWLINE); diff --git a/programming/environment/codeblocks/files/56ac0396fad7a5b4bbb40bb8c4b5fe1755078aef.patch b/programming/environment/codeblocks/files/56ac0396fad7a5b4bbb40bb8c4b5fe1755078aef.patch new file mode 100644 index 0000000000..385266b467 --- /dev/null +++ b/programming/environment/codeblocks/files/56ac0396fad7a5b4bbb40bb8c4b5fe1755078aef.patch @@ -0,0 +1,3215 @@ +From 56ac0396fad7a5b4bbb40bb8c4b5fe1755078aef Mon Sep 17 00:00:00 2001 +From: fuscated +Date: Wed, 29 Jul 2020 21:09:40 +0000 +Subject: [PATCH] * build: Fix many -Wsuggest-override warnings for the core + and core plugins + +> This warning is emitted by GCC starting with version 5.1. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12190 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/include/cbauibook.h | 4 +- + src/plugins/abbreviations/abbreviations.h | 12 +- + .../abbreviations/abbreviationsconfigpanel.h | 10 +- + src/plugins/astyle/astyleconfigdlg.h | 8 +- + src/plugins/autosave/autosave.h | 20 +-- + src/plugins/classwizard/classwizard.h | 8 +- + src/plugins/codecompletion/ccoptionsdlg.h | 10 +- + src/plugins/codecompletion/ccoptionsprjdlg.h | 10 +- + src/plugins/codecompletion/cctreectrl.h | 2 +- + .../classbrowserbuilderthread.h | 4 +- + src/plugins/codecompletion/codecompletion.h | 34 ++--- + src/plugins/codecompletion/parser/parser.h | 43 +++--- + .../codecompletion/parser/parserthread.h | 2 +- + .../parser/parserthreadedtask.h | 4 +- + .../codecompletion/parser/searchtree.h | 8 +- + .../codecompletion/systemheadersthread.h | 4 +- + .../compilergcc/advancedcompileroptionsdlg.h | 4 +- + src/plugins/compilergcc/compilerCYGWIN.h | 6 +- + src/plugins/compilergcc/compilerG95.h | 6 +- + src/plugins/compilergcc/compilerGDC.h | 6 +- + src/plugins/compilergcc/compilerGNUARM.h | 6 +- + src/plugins/compilergcc/compilerGNUFortran.h | 6 +- + src/plugins/compilergcc/compilerIAR.h | 6 +- + src/plugins/compilergcc/compilerICC.h | 6 +- + src/plugins/compilergcc/compilerKeilC51.h | 10 +- + src/plugins/compilergcc/compilerLCC.h | 10 +- + src/plugins/compilergcc/compilerMINGW.h | 10 +- + src/plugins/compilergcc/compilerMSVC.h | 6 +- + src/plugins/compilergcc/compilerMSVC10.h | 6 +- + src/plugins/compilergcc/compilerMSVC8.h | 6 +- + src/plugins/compilergcc/compilerOW.h | 12 +- + src/plugins/compilergcc/compilerXML.h | 6 +- + src/plugins/compilergcc/compilerflagdlg.h | 4 +- + src/plugins/compilergcc/compilergcc.h | 58 ++++---- + src/plugins/compilergcc/compilermessages.h | 8 +- + src/plugins/compilergcc/compileroptionsdlg.h | 10 +- + src/plugins/debuggergdb/cdb_commands.h | 34 ++--- + src/plugins/debuggergdb/cdb_driver.h | 95 ++++++------- + src/plugins/debuggergdb/debugger_defs.h | 40 +++--- + src/plugins/debuggergdb/debuggergdb.h | 132 +++++++++--------- + src/plugins/debuggergdb/debuggeroptionsdlg.h | 6 +- + .../debuggergdb/debuggeroptionsprjdlg.h | 10 +- + src/plugins/debuggergdb/editbreakpointdlg.h | 4 +- + src/plugins/debuggergdb/editwatchdlg.h | 4 +- + src/plugins/debuggergdb/gdb_commands.h | 66 ++++----- + src/plugins/debuggergdb/gdb_driver.h | 110 +++++++-------- + .../defaultmimehandler/defaultmimehandler.h | 16 +-- + .../defaultmimehandler/editmimetypesdlg.h | 10 +- + .../occurrenceshighlighting.h | 19 +-- + ...ccurrenceshighlightingconfigurationpanel.h | 10 +- + .../openfileslist/openfileslistplugin.h | 10 +- + src/plugins/projectsimporter/devcpploader.h | 6 +- + src/plugins/projectsimporter/msvc10loader.h | 6 +- + src/plugins/projectsimporter/msvc7loader.h | 6 +- + .../projectsimporter/msvc7workspaceloader.h | 6 +- + src/plugins/projectsimporter/msvcloader.h | 6 +- + .../projectsimporter/msvcworkspaceloader.h | 6 +- + .../projectsimporter/projectsimporter.h | 10 +- + src/plugins/scriptedwizard/projectpathpanel.h | 6 +- + src/plugins/scriptedwizard/wiz.h | 20 +-- + src/plugins/scriptedwizard/wizpage.h | 38 ++--- + src/plugins/todo/addtododlg.h | 3 +- + src/plugins/todo/todolist.h | 13 +- + src/plugins/todo/todolistview.h | 4 +- + src/plugins/todo/todosettingsdlg.h | 10 +- + src/src/app.cpp | 2 +- + src/src/app.h | 10 +- + src/src/backtracedlg.h | 6 +- + src/src/batchbuild.h | 2 +- + src/src/breakpointsdlg.h | 14 +- + src/src/compilersettingsdlg.h | 4 +- + src/src/cpuregistersdlg.h | 9 +- + src/src/debugger_interface_creator.h | 36 ++--- + src/src/debuggermenu.h | 12 +- + src/src/disassemblydlg.h | 20 +-- + src/src/editorconfigurationdlg.h | 2 +- + src/src/environmentsettingsdlg.h | 4 +- + src/src/examinememorydlg.h | 22 +-- + src/src/notebookstyles.h | 12 +- + src/src/printdlg.h | 4 +- + src/src/projectdepsdlg.h | 4 +- + src/src/projectmanagerui.h | 43 +++--- + src/src/projectoptionsdlg.h | 4 +- + src/src/scriptingsettingsdlg.h | 4 +- + src/src/startherepage.h | 4 +- + src/src/switcherdlg.h | 2 +- + src/src/threadsdlg.h | 6 +- + src/src/watchesdlg.h | 4 +- + 88 files changed, 660 insertions(+), 651 deletions(-) + +diff --git a/src/include/cbauibook.h b/src/include/cbauibook.h +index 2e1840bd1..d0bf79a3a 100644 +--- a/src/include/cbauibook.h ++++ b/src/include/cbauibook.h +@@ -112,7 +112,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook + * \param The index of the tab to be closed + * \return true if successfull + */ +- bool DeletePage(size_t page); ++ bool DeletePage(size_t page) override; + /** \brief Remove Page + * + * Calls the base-class function and after that +@@ -122,7 +122,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook + * \param The index of the tab to be closed + * \return true if successfull + */ +- bool RemovePage(size_t page); ++ bool RemovePage(size_t page) override; + /** \brief Move page + * + * Moves the tab containing page to new_idx +diff --git a/src/plugins/abbreviations/abbreviations.h b/src/plugins/abbreviations/abbreviations.h +index 2edd069bf..b71cf8d34 100644 +--- a/src/plugins/abbreviations/abbreviations.h ++++ b/src/plugins/abbreviations/abbreviations.h +@@ -34,19 +34,19 @@ class Abbreviations : public cbPlugin + * in configuration dialogs. Lower numbers mean the plugin's + * configuration is put higher in the list. + */ +- virtual int GetConfigurationPriority() const { return 50; } ++ int GetConfigurationPriority() const override { return 50; } + + /** Return the configuration group for this plugin. Default is cgUnknown. + * Notice that you can logically OR more than one configuration groups, + * so you could set it, for example, as "cgCompiler | cgContribPlugin". + */ +- virtual int GetConfigurationGroup() const { return cgEditor; } ++ int GetConfigurationGroup() const override { return cgEditor; } + + /** Return plugin's configuration panel. + * @param parent The parent window. + * @return A pointer to the plugin's cbConfigurationPanel. It is deleted by the caller. + */ +- virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; + + /** This method is called by Code::Blocks and is used by the plugin + * to add any menu items it needs on Code::Blocks's menu bar.\n +@@ -55,7 +55,7 @@ class Abbreviations : public cbPlugin + * just do nothing ;) + * @param menuBar the wxMenuBar to create items in + */ +- virtual void BuildMenu(wxMenuBar* menuBar); ++ void BuildMenu(wxMenuBar* menuBar) override; + + protected: + /** Any descendent plugin should override this virtual method and +@@ -68,7 +68,7 @@ class Abbreviations : public cbPlugin + * This means that a plugin might be loaded but not activated...\n + * Think of this method as the actual constructor... + */ +- virtual void OnAttach(); ++ void OnAttach() override; + + /** Any descendent plugin should override this virtual method and + * perform any necessary de-initialization. This method is called by +@@ -79,7 +79,7 @@ class Abbreviations : public cbPlugin + * case *don't* use Manager::Get()->Get...() functions or the + * behaviour is undefined... + */ +- virtual void OnRelease(bool appShutDown); ++ void OnRelease(bool appShutDown) override; + + public: + /** Try to auto-complete the current word. +diff --git a/src/plugins/abbreviations/abbreviationsconfigpanel.h b/src/plugins/abbreviations/abbreviationsconfigpanel.h +index 8724f69be..38df93ef6 100644 +--- a/src/plugins/abbreviations/abbreviationsconfigpanel.h ++++ b/src/plugins/abbreviations/abbreviationsconfigpanel.h +@@ -20,16 +20,16 @@ class AbbreviationsConfigPanel: public cbConfigurationPanel + { + public: + AbbreviationsConfigPanel(wxWindow* parent, Abbreviations* plugin); +- virtual ~AbbreviationsConfigPanel(); ++ ~AbbreviationsConfigPanel() override; + + /// @return the panel's title. +- virtual wxString GetTitle() const; ++ wxString GetTitle() const override; + /// @return the panel's bitmap base name. You must supply two bitmaps: \.png and \-off.png... +- virtual wxString GetBitmapBaseName() const; ++ wxString GetBitmapBaseName() const override; + /// Called when the user chooses to apply the configuration. +- virtual void OnApply(); ++ void OnApply() override; + /// Called when the user chooses to cancel the configuration. +- virtual void OnCancel(); ++ void OnCancel() override; + + private: + void InitCompText(); +diff --git a/src/plugins/astyle/astyleconfigdlg.h b/src/plugins/astyle/astyleconfigdlg.h +index ecab74ff0..8adce2a11 100644 +--- a/src/plugins/astyle/astyleconfigdlg.h ++++ b/src/plugins/astyle/astyleconfigdlg.h +@@ -22,10 +22,10 @@ class AstyleConfigDlg : public cbConfigurationPanel + void OnBreakLineChange(wxCommandEvent& event); + void OnBreakBlocksChange(wxCommandEvent& event); + +- virtual wxString GetTitle() const { return _("Source formatter"); } +- virtual wxString GetBitmapBaseName() const { return _T("astyle-plugin"); } +- virtual void OnApply(){ SaveSettings(); } +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Source formatter"); } ++ wxString GetBitmapBaseName() const override { return _T("astyle-plugin"); } ++ void OnApply() override { SaveSettings(); } ++ void OnCancel() override {} + + void LoadSettings(); + void SaveSettings(); +diff --git a/src/plugins/autosave/autosave.h b/src/plugins/autosave/autosave.h +index 847152805..95d156b4f 100644 +--- a/src/plugins/autosave/autosave.h ++++ b/src/plugins/autosave/autosave.h +@@ -22,13 +22,13 @@ class Autosave : public cbPlugin + + public: + Autosave(); +- ~Autosave(); +- int GetConfigurationPriority() const{ return 50; } +- int GetConfigurationGroup() const{ return cgUnknown; } +- void OnAttach(); // fires when the plugin is attached to the application ++ ~Autosave() override; ++ int GetConfigurationPriority() const override { return 50; } ++ int GetConfigurationGroup() const override { return cgUnknown; } ++ void OnAttach() override; // fires when the plugin is attached to the application + void Start(); +- void OnRelease(bool appShutDown); // fires when the plugin is released from the application +- virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); ++ void OnRelease(bool appShutDown) override; // fires when the plugin is released from the application ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; + void OnTimer(wxTimerEvent& event); + void SaveProject(cbProject *p, int method); + DECLARE_EVENT_TABLE() +@@ -43,10 +43,10 @@ class AutosaveConfigDlg : public cbConfigurationPanel + AutosaveConfigDlg(wxWindow* parent, Autosave* plug); + virtual ~AutosaveConfigDlg(){}; + +- virtual wxString GetTitle() const { return _("Autosave"); } +- virtual wxString GetBitmapBaseName() const { return _T("autosave"); } +- virtual void OnApply(){ SaveSettings(); } +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Autosave"); } ++ wxString GetBitmapBaseName() const override { return _T("autosave"); } ++ void OnApply() override { SaveSettings(); } ++ void OnCancel() override {} + private: + void OnProjectsChecked(wxCommandEvent &event); + void OnSourceChecked(wxCommandEvent &event); +diff --git a/src/plugins/classwizard/classwizard.h b/src/plugins/classwizard/classwizard.h +index 8852eb967..3f865db6d 100644 +--- a/src/plugins/classwizard/classwizard.h ++++ b/src/plugins/classwizard/classwizard.h +@@ -12,12 +12,12 @@ class ClassWizard : public cbPlugin + { + public: + ClassWizard(); +- ~ClassWizard(); ++ ~ClassWizard() override; + +- virtual void OnAttach(); +- virtual void OnRelease(bool appShutDown); ++ void OnAttach() override; ++ void OnRelease(bool appShutDown) override; + +- virtual void BuildMenu(wxMenuBar* menuBar); ++ void BuildMenu(wxMenuBar* menuBar) override; + + void OnLaunch(wxCommandEvent& event); + +diff --git a/src/plugins/codecompletion/ccoptionsdlg.h b/src/plugins/codecompletion/ccoptionsdlg.h +index 8e324ebf7..66bdd4aef 100644 +--- a/src/plugins/codecompletion/ccoptionsdlg.h ++++ b/src/plugins/codecompletion/ccoptionsdlg.h +@@ -19,12 +19,12 @@ class CCOptionsDlg : public cbConfigurationPanel + { + public: + CCOptionsDlg(wxWindow* parent, NativeParser* np, CodeCompletion* cc, DocumentationHelper* dh); +- virtual ~CCOptionsDlg(); ++ ~CCOptionsDlg() override; + +- virtual wxString GetTitle() const { return _("Code completion"); } +- virtual wxString GetBitmapBaseName() const { return _T("codecompletion"); } +- virtual void OnApply(); +- virtual void OnCancel() { ; } ++ wxString GetTitle() const override { return _("Code completion"); } ++ wxString GetBitmapBaseName() const override { return _T("codecompletion"); } ++ void OnApply() override; ++ void OnCancel() override {} + + protected: + void OnChooseColour(wxCommandEvent& event); +diff --git a/src/plugins/codecompletion/ccoptionsprjdlg.h b/src/plugins/codecompletion/ccoptionsprjdlg.h +index de6c6c560..496f186fd 100644 +--- a/src/plugins/codecompletion/ccoptionsprjdlg.h ++++ b/src/plugins/codecompletion/ccoptionsprjdlg.h +@@ -18,12 +18,12 @@ class CCOptionsProjectDlg : public cbConfigurationPanel + { + public: + CCOptionsProjectDlg(wxWindow* parent, cbProject* project, NativeParser* np); +- virtual ~CCOptionsProjectDlg(); ++ ~CCOptionsProjectDlg() override; + +- virtual wxString GetTitle() const { return _("C/C++ parser options"); } +- virtual wxString GetBitmapBaseName() const { return _T("generic-plugin"); } +- virtual void OnApply(); +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("C/C++ parser options"); } ++ wxString GetBitmapBaseName() const override { return _T("generic-plugin"); } ++ void OnApply() override; ++ void OnCancel() override {} + + protected: + void OnAdd(wxCommandEvent& event); +diff --git a/src/plugins/codecompletion/cctreectrl.h b/src/plugins/codecompletion/cctreectrl.h +index ca93673a3..df8838b17 100644 +--- a/src/plugins/codecompletion/cctreectrl.h ++++ b/src/plugins/codecompletion/cctreectrl.h +@@ -105,7 +105,7 @@ class CCTreeCtrl : public wxTreeCtrl + static int CBLineCompare (CCTreeCtrlData* lhs, CCTreeCtrlData* rhs); + static int CBNoCompare (CCTreeCtrlData* lhs, CCTreeCtrlData* rhs); + +- int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2); ++ int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) override; + int (*Compare)(CCTreeCtrlData* lhs, CCTreeCtrlData* rhs); + + DECLARE_DYNAMIC_CLASS(CCTreeCtrl) +diff --git a/src/plugins/codecompletion/classbrowserbuilderthread.h b/src/plugins/codecompletion/classbrowserbuilderthread.h +index 315cb8911..4f2acc284 100644 +--- a/src/plugins/codecompletion/classbrowserbuilderthread.h ++++ b/src/plugins/codecompletion/classbrowserbuilderthread.h +@@ -36,7 +36,7 @@ class ClassBrowserBuilderThread : public wxThread + ClassBrowserBuilderThread(wxEvtHandler* evtHandler, wxSemaphore& sem); + + /** destructor */ +- virtual ~ClassBrowserBuilderThread(); ++ ~ClassBrowserBuilderThread() override; + + // Called from external: + void Init(NativeParser* np, CCTreeCtrl* treeTop, CCTreeCtrl* treeBottom, +@@ -68,7 +68,7 @@ class ClassBrowserBuilderThread : public wxThread + void RequestTermination(bool terminate = true) { m_TerminationRequested = terminate; } + + protected: +- virtual void* Entry(); ++ void* Entry() override; + + // Called from Entry(): + void BuildTree(); +diff --git a/src/plugins/codecompletion/codecompletion.h b/src/plugins/codecompletion/codecompletion.h +index fb0976bf0..83cc146b3 100644 +--- a/src/plugins/codecompletion/codecompletion.h ++++ b/src/plugins/codecompletion/codecompletion.h +@@ -82,34 +82,34 @@ class CodeCompletion : public cbCodeCompletionPlugin + /** Constructor */ + CodeCompletion(); + /** Destructor */ +- virtual ~CodeCompletion(); ++ ~CodeCompletion() override; + + // the function below were virtual functions from the base class +- virtual void OnAttach(); +- virtual void OnRelease(bool appShutDown); +- virtual int GetConfigurationGroup() const { return cgEditor; } ++ void OnAttach() override; ++ void OnRelease(bool appShutDown) override; ++ int GetConfigurationGroup() const override { return cgEditor; } + + /** CC's config dialog */ +- virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; + /** CC's config dialog which show in the project options panel */ +- virtual cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, cbProject* project); ++ cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, cbProject* project) override; + /** build menus in the main frame */ +- virtual void BuildMenu(wxMenuBar* menuBar); ++ void BuildMenu(wxMenuBar* menuBar) override; + /** build context popup menu */ +- virtual void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0); ++ void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0) override; + /** build CC Toolbar */ +- virtual bool BuildToolBar(wxToolBar* toolBar); ++ bool BuildToolBar(wxToolBar* toolBar) override; + /** toolbar priority value */ +- virtual int GetToolBarPriority() { return 10; } ++ int GetToolBarPriority() override { return 10; } + + // override virtual functions in cbCodeCompletionPlugin class +- virtual CCProviderStatus GetProviderStatusFor(cbEditor* ed); +- virtual std::vector GetAutocompList(bool isAuto, cbEditor* ed, int& tknStart, int& tknEnd); +- virtual std::vector GetCallTips(int pos, int style, cbEditor* ed, int& argsPos); +- virtual wxString GetDocumentation(const CCToken& token); +- virtual std::vector GetTokenAt(int pos, cbEditor* ed, bool& allowCallTip); +- virtual wxString OnDocumentationLink(wxHtmlLinkEvent& event, bool& dismissPopup); +- virtual void DoAutocomplete(const CCToken& token, cbEditor* ed); ++ CCProviderStatus GetProviderStatusFor(cbEditor* ed) override; ++ std::vector GetAutocompList(bool isAuto, cbEditor* ed, int& tknStart, int& tknEnd) override; ++ std::vector GetCallTips(int pos, int style, cbEditor* ed, int& argsPos) override; ++ wxString GetDocumentation(const CCToken& token) override; ++ std::vector GetTokenAt(int pos, cbEditor* ed, bool& allowCallTip) override; ++ wxString OnDocumentationLink(wxHtmlLinkEvent& event, bool& dismissPopup) override; ++ void DoAutocomplete(const CCToken& token, cbEditor* ed) override; + + /** Get the include paths setting (usually set by user for each C::B project). + * If it finds some system level include search dirs which haven't been scanned, it will start a +diff --git a/src/plugins/codecompletion/parser/parser.h b/src/plugins/codecompletion/parser/parser.h +index 70796fcb9..ab2f7add4 100644 +--- a/src/plugins/codecompletion/parser/parser.h ++++ b/src/plugins/codecompletion/parser/parser.h +@@ -125,82 +125,83 @@ class Parser : public ParserBase + */ + Parser(wxEvtHandler* parent, cbProject* project); + /** destructor */ +- virtual ~Parser(); ++ ~Parser() override; + + /** Add files to batch parse mode, internally. The files will be parsed sequentially. + * @param filenames input files name array + */ +- virtual void AddBatchParse(const StringList& filenames); ++ void AddBatchParse(const StringList& filenames) override; + + /** Add one file to Batch mode Parsing, this is the bridge between the main thread and the + * thread pool, after this function call, the file(Parserthread) will be run from the thread + * pool. + * @param filenames input file name + */ +- virtual void AddParse(const wxString& filename); ++ void AddParse(const wxString& filename) override; + + /** set the predefined macro definition string was collected from the GCC command line, + * this function adds the string to an internal m_PredefinedMacros, and switch the ParserState + */ +- virtual void AddPredefinedMacros(const wxString& defs); ++ void AddPredefinedMacros(const wxString& defs) override; + + /** clears the list of predefined macros after it has been parsed */ + virtual void ClearPredefinedMacros(); + + /** return the predefined macro definition string that has been collected */ +- virtual const wxString GetPredefinedMacros() const; ++ const wxString GetPredefinedMacros() const override; + + /** set the associated C::B project pointer. (only used by one parser for whole workspace) + * @return true if it can do the switch, other wise, return false, and print some debug logs. + */ +- virtual bool UpdateParsingProject(cbProject* project); ++ bool UpdateParsingProject(cbProject* project) override; + + /** Must add a locker before call all named ParseBufferXXX functions, ParseBuffer function will + * directly run the parsing in the same thread as the caller. So, take care if the time is limited. + * this function usually used to parse the function body to fetch the local variable information. + */ +- virtual bool ParseBuffer(const wxString& buffer, bool isLocal, bool bufferSkipBlocks = false, +- bool isTemp = false, const wxString& filename = wxEmptyString, +- int parentIdx = -1, int initLine = 0); ++ bool ParseBuffer(const wxString& buffer, bool isLocal, bool bufferSkipBlocks = false, ++ bool isTemp = false, const wxString& filename = wxEmptyString, ++ int parentIdx = -1, int initLine = 0) override; + + /** parser the current editor control, this function is used to list all the functions in the + * current code editor + */ +- virtual bool ParseBufferForFunctions(const wxString& buffer); ++ bool ParseBufferForFunctions(const wxString& buffer) override; + + /** parse the buffer for collecting exposed namespace scopes*/ +- virtual bool ParseBufferForNamespaces(const wxString& buffer, NameSpaceVec& result); ++ bool ParseBufferForNamespaces(const wxString& buffer, NameSpaceVec& result) override; + + /** parse the buffer for collecting using namespace directive*/ +- virtual bool ParseBufferForUsingNamespace(const wxString& buffer, wxArrayString& result, bool bufferSkipBlocks = true); ++ bool ParseBufferForUsingNamespace(const wxString& buffer, wxArrayString& result, ++ bool bufferSkipBlocks = true) override; + + /** mark this file to be re-parsed in the TokenTree, tick the reparse timer, note it looks like + * the isLocal parameter is not used in Parser::Reparse function. + * A better function name could be: MarkFileNeedToBeReParsed() + */ +- virtual bool Reparse(const wxString& filename, bool isLocal = true); ++ bool Reparse(const wxString& filename, bool isLocal = true) override; + + /** this usually happens when user adds some files to an existing project, it just use AddParse() + * function internally to add the file. and switch the ParserState to ParserCommon::ptAddFileToParser. + */ +- virtual bool AddFile(const wxString& filename, cbProject* project, bool isLocal = true); ++ bool AddFile(const wxString& filename, cbProject* project, bool isLocal = true) override; + + /** this usually happens when the user removes a file from the existing project, it will remove + * all the tokens belong to the file. + */ +- virtual bool RemoveFile(const wxString& filename); ++ bool RemoveFile(const wxString& filename) override; + + /** check to see a file is parsed already, it first check the TokenTree to see whether it has + * the specified file, but if a file is already queued (put in m_BatchParseFiles), we regard it + * as already parsed. + */ +- virtual bool IsFileParsed(const wxString& filename); ++ bool IsFileParsed(const wxString& filename) override; + + /** check to see whether Parser is in Idle mode, there is no work need to be done in the Parser*/ +- virtual bool Done(); ++ bool Done() override; + + /** if the Parser is not in Idle mode, show which need to be done */ +- virtual wxString NotDoneReason(); ++ wxString NotDoneReason() override; + + protected: + // used for measuring the batch parsing time +@@ -258,9 +259,9 @@ class Parser : public ParserBase + void ProcessParserEvent(ParserCommon::ParserState state, int id, const wxString& info = wxEmptyString); + + /** read Parser options from configure file */ +- virtual void ReadOptions(); ++ void ReadOptions() override; + /** write Parse options to configure file */ +- virtual void WriteOptions(); ++ void WriteOptions() override; + + private: + /** the only usage of this function is in the Parserthread class, when handling include directives +@@ -273,7 +274,7 @@ class Parser : public ParserBase + * the locked should be set as false, but if you want to recursive parse to an include file + * the locked value should be set as true. + */ +- virtual bool ParseFile(const wxString& filename, bool isGlobal, bool locked = false); ++ bool ParseFile(const wxString& filename, bool isGlobal, bool locked = false) override; + + /** connect event handlers of the timers and thread pool */ + void ConnectEvents(); +diff --git a/src/plugins/codecompletion/parser/parserthread.h b/src/plugins/codecompletion/parser/parserthread.h +index 5747d394f..26eec7dd3 100644 +--- a/src/plugins/codecompletion/parser/parserthread.h ++++ b/src/plugins/codecompletion/parser/parserthread.h +@@ -185,7 +185,7 @@ class ParserThread : public cbThreadedTask + * often happens when user open a project. Every parserthread task will firstly be added to the thread pool, later + * called automatically from the thread pool. + */ +- int Execute() ++ int Execute() override + { + CC_LOCKER_TRACK_TT_MTX_LOCK(s_TokenTreeMutex) + +diff --git a/src/plugins/codecompletion/parser/parserthreadedtask.h b/src/plugins/codecompletion/parser/parserthreadedtask.h +index f71141a82..5bd8e028a 100644 +--- a/src/plugins/codecompletion/parser/parserthreadedtask.h ++++ b/src/plugins/codecompletion/parser/parserthreadedtask.h +@@ -26,7 +26,7 @@ class ParserThreadedTask : public cbThreadedTask + // run sequence parsing jobs in a single thread, those include + // 1, parsing predefined macro buffers + // 2, parsing project files(mainly the implementation source files) +- virtual int Execute(); ++ int Execute() override; + + private: + Parser* m_Parser; /// a Parser object which contain TokenTree +@@ -43,7 +43,7 @@ class MarkFileAsLocalThreadedTask : public cbThreadedTask + public: + MarkFileAsLocalThreadedTask(Parser* parser, cbProject* project); + +- virtual int Execute(); ++ int Execute() override; + + private: + Parser* m_Parser; /// a Parser object which contain TokenTree +diff --git a/src/plugins/codecompletion/parser/searchtree.h b/src/plugins/codecompletion/parser/searchtree.h +index 418f6fa4f..6db13cc66 100644 +--- a/src/plugins/codecompletion/parser/searchtree.h ++++ b/src/plugins/codecompletion/parser/searchtree.h +@@ -375,10 +375,10 @@ template class SearchTree : public BasicSearchTree + { + public: + SearchTree(); +- virtual ~SearchTree(); +- virtual void clear(); /// Clears the tree +- size_t GetCount() const; /// Gets the number of items stored +- virtual size_t size() const; /// Same as GetCount ++ ~SearchTree() override; ++ void clear() override; /// Clears the tree ++ size_t GetCount() const override; /// Gets the number of items stored ++ size_t size() const override; /// Same as GetCount + bool SaveCacheTo(const wxString& filename); /// Stores the Tree and items into a file + bool LoadCacheFrom(const wxString& filename); /// Loads the Tree and items from a file + wxString Serialize(); +diff --git a/src/plugins/codecompletion/systemheadersthread.h b/src/plugins/codecompletion/systemheadersthread.h +index fd6955e10..9e6ac1f99 100644 +--- a/src/plugins/codecompletion/systemheadersthread.h ++++ b/src/plugins/codecompletion/systemheadersthread.h +@@ -35,9 +35,9 @@ class SystemHeadersThread : public wxThread + public: + SystemHeadersThread(wxEvtHandler* parent, wxCriticalSection* critSect, + SystemHeadersMap& headersMap, const wxArrayString& incDirs); +- virtual ~SystemHeadersThread(); ++ ~SystemHeadersThread() override; + +- virtual void* Entry(); ++ void* Entry() override; + + private: + wxEvtHandler* m_Parent; /// this is the target the thread will sent any event to +diff --git a/src/plugins/compilergcc/advancedcompileroptionsdlg.h b/src/plugins/compilergcc/advancedcompileroptionsdlg.h +index 1ded3feaa..0e29770de 100644 +--- a/src/plugins/compilergcc/advancedcompileroptionsdlg.h ++++ b/src/plugins/compilergcc/advancedcompileroptionsdlg.h +@@ -17,7 +17,7 @@ class AdvancedCompilerOptionsDlg : public wxScrollingDialog + { + public: + AdvancedCompilerOptionsDlg(wxWindow* parent, const wxString& compilerId); +- virtual ~AdvancedCompilerOptionsDlg(); ++ ~AdvancedCompilerOptionsDlg() override; + bool IsDirty() const {return m_bDirty;} + private: + void OnCommandsChange(wxCommandEvent& event); +@@ -32,7 +32,7 @@ class AdvancedCompilerOptionsDlg : public wxScrollingDialog + void OnRegexUp(wxSpinEvent& event); + void OnRegexDown(wxSpinEvent& event); + +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + void ReadCompilerOptions(); + void WriteCompilerOptions(); + void ReadExtensions(int nr); +diff --git a/src/plugins/compilergcc/compilerCYGWIN.h b/src/plugins/compilergcc/compilerCYGWIN.h +index d24ec4cfd..93ec9bd11 100644 +--- a/src/plugins/compilergcc/compilerCYGWIN.h ++++ b/src/plugins/compilergcc/compilerCYGWIN.h +@@ -12,10 +12,10 @@ class CompilerCYGWIN : public CompilerMINGW + { + public: + CompilerCYGWIN(); +- ~CompilerCYGWIN(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerCYGWIN() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + + }; +diff --git a/src/plugins/compilergcc/compilerG95.h b/src/plugins/compilergcc/compilerG95.h +index 52cffed16..ba594b8cf 100644 +--- a/src/plugins/compilergcc/compilerG95.h ++++ b/src/plugins/compilergcc/compilerG95.h +@@ -13,10 +13,10 @@ class CompilerG95 : public Compiler + { + public: + CompilerG95(); +- virtual ~CompilerG95(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerG95() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerGDC.h b/src/plugins/compilergcc/compilerGDC.h +index fb3786382..b2b9598e0 100644 +--- a/src/plugins/compilergcc/compilerGDC.h ++++ b/src/plugins/compilergcc/compilerGDC.h +@@ -12,10 +12,10 @@ class CompilerGDC : public Compiler + { + public: + CompilerGDC(); +- virtual ~CompilerGDC(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerGDC() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerGNUARM.h b/src/plugins/compilergcc/compilerGNUARM.h +index 101d3c25b..899a77205 100644 +--- a/src/plugins/compilergcc/compilerGNUARM.h ++++ b/src/plugins/compilergcc/compilerGNUARM.h +@@ -12,10 +12,10 @@ class CompilerGNUARM : public Compiler + { + public: + CompilerGNUARM(); +- virtual ~CompilerGNUARM(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerGNUARM() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerGNUFortran.h b/src/plugins/compilergcc/compilerGNUFortran.h +index 38bc1a6ca..4a7807f90 100644 +--- a/src/plugins/compilergcc/compilerGNUFortran.h ++++ b/src/plugins/compilergcc/compilerGNUFortran.h +@@ -12,10 +12,10 @@ class CompilerGNUFortran : public Compiler + { + public: + CompilerGNUFortran(); +- virtual ~CompilerGNUFortran(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerGNUFortran() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerIAR.h b/src/plugins/compilergcc/compilerIAR.h +index fafc3618e..1400bc5b1 100644 +--- a/src/plugins/compilergcc/compilerIAR.h ++++ b/src/plugins/compilergcc/compilerIAR.h +@@ -12,10 +12,10 @@ class CompilerIAR : public Compiler + { + public: + CompilerIAR(wxString arch); +- virtual ~CompilerIAR(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerIAR() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + wxString m_Arch; + private: + }; +diff --git a/src/plugins/compilergcc/compilerICC.h b/src/plugins/compilergcc/compilerICC.h +index 6123d9b4d..cc3afbb1f 100644 +--- a/src/plugins/compilergcc/compilerICC.h ++++ b/src/plugins/compilergcc/compilerICC.h +@@ -16,10 +16,10 @@ class CompilerICC : public Compiler + { + public: + CompilerICC(); +- virtual ~CompilerICC(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerICC() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerKeilC51.h b/src/plugins/compilergcc/compilerKeilC51.h +index e8088809e..a76b2d60a 100644 +--- a/src/plugins/compilergcc/compilerKeilC51.h ++++ b/src/plugins/compilergcc/compilerKeilC51.h +@@ -12,11 +12,11 @@ class CompilerKeilC51 : public Compiler + { + public: + CompilerKeilC51(); +- virtual ~CompilerKeilC51(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerKeilC51() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: + CompilerKeilC51(const wxString& name, const wxString& ID); +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + AutoDetectResult AutoDetectInstallationDir(bool keilx); + private: + }; +@@ -25,9 +25,9 @@ class CompilerKeilCX51 : public CompilerKeilC51 + { + public: + CompilerKeilCX51(); +- virtual ~CompilerKeilCX51(); ++ ~CompilerKeilCX51() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerLCC.h b/src/plugins/compilergcc/compilerLCC.h +index aa496f9f1..063d8a19d 100644 +--- a/src/plugins/compilergcc/compilerLCC.h ++++ b/src/plugins/compilergcc/compilerLCC.h +@@ -7,14 +7,14 @@ class CompilerLCC : public Compiler + { + public: + CompilerLCC(); +- virtual ~CompilerLCC(); ++ ~CompilerLCC() override; + #ifdef __WXMSW__ +- virtual bool IsValid(); ++ bool IsValid() override; + #endif // __WXMSW__ +- virtual void Reset(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ void Reset() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + private: + bool m_RegistryUpdated; + }; +diff --git a/src/plugins/compilergcc/compilerMINGW.h b/src/plugins/compilergcc/compilerMINGW.h +index 9c04e2b22..7d5c47171 100644 +--- a/src/plugins/compilergcc/compilerMINGW.h ++++ b/src/plugins/compilergcc/compilerMINGW.h +@@ -15,12 +15,12 @@ class CompilerMINGW : public Compiler + // added arguments to ctor so we can derive other gcc-flavours directly + // from MinGW (e.g. the cygwin compiler is derived from this one). + CompilerMINGW(const wxString& name = _("GNU GCC Compiler"), const wxString& ID = _T("gcc")); +- virtual ~CompilerMINGW(); +- virtual AutoDetectResult AutoDetectInstallationDir(); +- virtual CompilerCommandGenerator* GetCommandGenerator(cbProject *project); ++ ~CompilerMINGW() override; ++ AutoDetectResult AutoDetectInstallationDir() override; ++ CompilerCommandGenerator* GetCommandGenerator(cbProject *project) override; + protected: +- virtual Compiler* CreateCopy(); +- virtual void SetVersionString(); ++ Compiler* CreateCopy() override; ++ void SetVersionString() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerMSVC.h b/src/plugins/compilergcc/compilerMSVC.h +index d84ed4d14..5b9eb572b 100644 +--- a/src/plugins/compilergcc/compilerMSVC.h ++++ b/src/plugins/compilergcc/compilerMSVC.h +@@ -12,10 +12,10 @@ class CompilerMSVC : public Compiler + { + public: + CompilerMSVC(); +- virtual ~CompilerMSVC(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerMSVC() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- Compiler * CreateCopy(); ++ Compiler * CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerMSVC10.h b/src/plugins/compilergcc/compilerMSVC10.h +index d2bbb5b7f..346fcc8d3 100644 +--- a/src/plugins/compilergcc/compilerMSVC10.h ++++ b/src/plugins/compilergcc/compilerMSVC10.h +@@ -12,11 +12,11 @@ class CompilerMSVC10 : public Compiler + { + public: + CompilerMSVC10(); +- virtual ~CompilerMSVC10(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerMSVC10() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + + protected: +- Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + }; + + #endif // COMPILERMSVC10_H_ +diff --git a/src/plugins/compilergcc/compilerMSVC8.h b/src/plugins/compilergcc/compilerMSVC8.h +index 7345b64a4..81aef9358 100644 +--- a/src/plugins/compilergcc/compilerMSVC8.h ++++ b/src/plugins/compilergcc/compilerMSVC8.h +@@ -12,10 +12,10 @@ class CompilerMSVC8 : public Compiler + { + public: + CompilerMSVC8(); +- virtual ~CompilerMSVC8(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerMSVC8() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + protected: +- Compiler * CreateCopy(); ++ Compiler * CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerOW.h b/src/plugins/compilergcc/compilerOW.h +index 8e0c9a417..734b43fa3 100644 +--- a/src/plugins/compilergcc/compilerOW.h ++++ b/src/plugins/compilergcc/compilerOW.h +@@ -12,14 +12,14 @@ class CompilerOW : public Compiler + { + public: + CompilerOW(); +- virtual ~CompilerOW(); +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ ~CompilerOW() override; ++ AutoDetectResult AutoDetectInstallationDir() override; + +- virtual void LoadSettings(const wxString& baseKey); +- virtual void SetMasterPath(const wxString& path); +- virtual CompilerCommandGenerator* GetCommandGenerator(cbProject *project); ++ void LoadSettings(const wxString& baseKey) override; ++ void SetMasterPath(const wxString& path) override; ++ CompilerCommandGenerator* GetCommandGenerator(cbProject *project) override; + protected: +- Compiler * CreateCopy(); ++ Compiler * CreateCopy() override; + private: + }; + +diff --git a/src/plugins/compilergcc/compilerXML.h b/src/plugins/compilergcc/compilerXML.h +index af0665e74..db2aca08c 100644 +--- a/src/plugins/compilergcc/compilerXML.h ++++ b/src/plugins/compilergcc/compilerXML.h +@@ -9,12 +9,12 @@ class CompilerXML : public Compiler + { + public: + CompilerXML(const wxString& name, const wxString& ID, const wxString& file); +- virtual ~CompilerXML(); ++ ~CompilerXML() override; + +- virtual AutoDetectResult AutoDetectInstallationDir(); ++ AutoDetectResult AutoDetectInstallationDir() override; + + protected: +- virtual Compiler* CreateCopy(); ++ Compiler* CreateCopy() override; + + private: + +diff --git a/src/plugins/compilergcc/compilerflagdlg.h b/src/plugins/compilergcc/compilerflagdlg.h +index f356c6cd3..761ea78fb 100644 +--- a/src/plugins/compilergcc/compilerflagdlg.h ++++ b/src/plugins/compilergcc/compilerflagdlg.h +@@ -13,9 +13,9 @@ class CompilerFlagDlg: public wxDialog + public: + + CompilerFlagDlg(wxWindow* parent, CompOption* opt, wxArrayString& categ, const wxString &selectedCategory); +- virtual ~CompilerFlagDlg(); ++ virtual ~CompilerFlagDlg() override; + +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + + protected: + +diff --git a/src/plugins/compilergcc/compilergcc.h b/src/plugins/compilergcc/compilergcc.h +index 36abee10b..11fd30122 100644 +--- a/src/plugins/compilergcc/compilergcc.h ++++ b/src/plugins/compilergcc/compilergcc.h +@@ -89,40 +89,40 @@ class CompilerGCC : public cbCompilerPlugin + { + public: + CompilerGCC(); +- virtual ~CompilerGCC(); ++ ~CompilerGCC() override; + +- virtual void OnAttach(); +- virtual void OnRelease(bool appShutDown); +- virtual void BuildMenu(wxMenuBar* menuBar); // offer for menu space by host +- virtual void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0); // offer for menu space by a module +- virtual bool BuildToolBar(wxToolBar* toolBar); +- virtual int GetToolBarPriority() { return 1; } ++ void OnAttach() override; ++ void OnRelease(bool appShutDown) override; ++ void BuildMenu(wxMenuBar* menuBar) override; // offer for menu space by host ++ void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0) override; // offer for menu space by a module ++ bool BuildToolBar(wxToolBar* toolBar) override; ++ int GetToolBarPriority() override { return 1; } + +- virtual int Run(ProjectBuildTarget* target = 0L); +- virtual int Run(const wxString& target); ++ int Run(ProjectBuildTarget* target = 0L) override; ++ int Run(const wxString& target) override; + virtual int RunSingleFile(const wxString& filename); +- virtual int Clean(const wxString& target); +- virtual int Clean(ProjectBuildTarget* target = 0L); +- virtual int DistClean(ProjectBuildTarget* target = 0L); +- virtual int DistClean(const wxString& target); +- virtual int Build(ProjectBuildTarget* target = 0L); +- virtual int Build(const wxString& target); +- virtual int Rebuild(ProjectBuildTarget* target = 0L); +- virtual int Rebuild(const wxString& target); +- virtual int CleanWorkspace(const wxString& target = wxEmptyString); +- virtual int BuildWorkspace(const wxString& target = wxEmptyString); +- virtual int RebuildWorkspace(const wxString& target = wxEmptyString); +- virtual int CompileFile(const wxString& file); ++ int Clean(const wxString& target) override; ++ int Clean(ProjectBuildTarget* target = 0L) override; ++ int DistClean(ProjectBuildTarget* target = 0L) override; ++ int DistClean(const wxString& target) override; ++ int Build(ProjectBuildTarget* target = 0L) override; ++ int Build(const wxString& target) override; ++ int Rebuild(ProjectBuildTarget* target = 0L) override; ++ int Rebuild(const wxString& target) override; ++ int CleanWorkspace(const wxString& target = wxEmptyString) override; ++ int BuildWorkspace(const wxString& target = wxEmptyString) override; ++ int RebuildWorkspace(const wxString& target = wxEmptyString) override; ++ int CompileFile(const wxString& file) override; + virtual int CompileFileWithoutProject(const wxString& file); + virtual int CompileFileDefault(cbProject* project, ProjectFile* pf, ProjectBuildTarget* bt); +- virtual int KillProcess(); +- virtual bool IsRunning() const; +- virtual int GetExitCode() const { return m_LastExitCode; } +- virtual int Configure(cbProject* project, ProjectBuildTarget* target, wxWindow *parent); +- +- int GetConfigurationPriority() const { return 0; } +- int GetConfigurationGroup() const { return cgCompiler; } +- cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); ++ int KillProcess() override; ++ bool IsRunning() const override; ++ int GetExitCode() const override { return m_LastExitCode; } ++ int Configure(cbProject* project, ProjectBuildTarget* target, wxWindow *parent) override; ++ ++ int GetConfigurationPriority() const override { return 0; } ++ int GetConfigurationGroup() const override { return cgCompiler; } ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; + + bool IsValidTarget(const wxString& target) const; + +diff --git a/src/plugins/compilergcc/compilermessages.h b/src/plugins/compilergcc/compilermessages.h +index 130c7caca..19b338cd7 100644 +--- a/src/plugins/compilergcc/compilermessages.h ++++ b/src/plugins/compilergcc/compilermessages.h +@@ -20,13 +20,13 @@ class CompilerMessages : public wxEvtHandler, public ListCtrlLogger + virtual void SetCompilerErrors(CompilerErrors* errors){ m_pErrors = errors; } + virtual void FocusError(int nr); + +- void AutoFitColumns(int column); ++ void AutoFitColumns(int column) override; + +- virtual wxWindow* CreateControl(wxWindow* parent); ++ wxWindow* CreateControl(wxWindow* parent) override; + void DestroyControls(); + +- virtual bool HasFeature(Feature::Enum feature) const; +- virtual void AppendAdditionalMenuItems(wxMenu &menu); ++ bool HasFeature(Feature::Enum feature) const override; ++ void AppendAdditionalMenuItems(wxMenu &menu) override; + private: + void OnClick(wxCommandEvent& event); + void OnDoubleClick(wxCommandEvent& event); +diff --git a/src/plugins/compilergcc/compileroptionsdlg.h b/src/plugins/compilergcc/compileroptionsdlg.h +index 756370fc3..fa90a947e 100644 +--- a/src/plugins/compilergcc/compileroptionsdlg.h ++++ b/src/plugins/compilergcc/compileroptionsdlg.h +@@ -29,12 +29,12 @@ class CompilerOptionsDlg : public cbConfigurationPanel + { + public: + CompilerOptionsDlg(wxWindow* parent, CompilerGCC* compiler, cbProject* project = 0L, ProjectBuildTarget* target = 0L); +- ~CompilerOptionsDlg(); ++ ~CompilerOptionsDlg() override; + +- virtual wxString GetTitle() const { return _("Global compiler settings"); } +- virtual wxString GetBitmapBaseName() const { return _T("compiler"); } +- virtual void OnApply(); +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Global compiler settings"); } ++ wxString GetBitmapBaseName() const override { return _T("compiler"); } ++ void OnApply() override; ++ void OnCancel() override {} + private: + enum CustomVarActionType + { +diff --git a/src/plugins/debuggergdb/cdb_commands.h b/src/plugins/debuggergdb/cdb_commands.h +index 617a05480..bb71a11d5 100644 +--- a/src/plugins/debuggergdb/cdb_commands.h ++++ b/src/plugins/debuggergdb/cdb_commands.h +@@ -49,7 +49,7 @@ class CdbCmd_AddSourceDir : public DebuggerCmd + { + m_Cmd << _T("directory ") << dir; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Warning: C:\Devel\tmp\console\111: No such file or directory. +@@ -71,7 +71,7 @@ class CdbCmd_SetDebuggee : public DebuggerCmd + { + m_Cmd << _T("file ") << file; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Reading symbols from C:\Devel\tmp\console/console.exe...done. +@@ -95,7 +95,7 @@ class CdbCmd_AddSymbolFile : public DebuggerCmd + { + m_Cmd << _T("add-symbol-file ") << file; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // +@@ -123,7 +123,7 @@ class CdbCmd_SetArguments : public DebuggerCmd + { + m_Cmd << _T("set args ") << args; + } +- void ParseOutput(cb_unused const wxString& output) ++ void ParseOutput(cb_unused const wxString& output) override + { + // No output + } +@@ -141,7 +141,7 @@ class CdbCmd_GetPID : public DebuggerCmd + { + m_Cmd << _T("|."); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // id: create name: +@@ -177,7 +177,7 @@ class CdbCmd_AttachToProcess : public DebuggerCmd + { + m_Cmd << _T("attach ") << wxString::Format(_T("%d"), pid); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Attaching to process +@@ -214,7 +214,7 @@ class CdbCmd_Detach : public DebuggerCmd + { + m_Cmd << _T(".detach"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output any return, usually "Detached" + m_pDriver->Log(output); +@@ -232,7 +232,7 @@ class CdbCmd_Continue : public DebuggerContinueBaseCmd + : DebuggerContinueBaseCmd(driver,_T("g")) + { + } +- virtual void Action() ++ void Action() override + { + m_pDriver->NotifyDebuggeeContinued(); + } +@@ -269,7 +269,7 @@ class CdbCmd_AddBreakpoint : public DebuggerCmd + bp->alreadySet = true; + } + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // possible outputs (only output lines starting with ***): + // +@@ -305,7 +305,7 @@ class CdbCmd_RemoveBreakpoint : public DebuggerCmd + else + m_Cmd << _T("bc ") << wxString::Format(_T("%d"), (int) bp->index); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // usually no output, so display whatever comes in + if (!output.IsEmpty()) +@@ -331,7 +331,7 @@ class CdbCmd_Watch : public DebuggerCmd + m_Cmd << wxT("?? ") << symbol; + } + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if(!ParseCDBWatchValue(m_watch, output)) + { +@@ -365,7 +365,7 @@ class CdbCmd_TooltipEvaluation : public DebuggerCmd + { + m_Cmd << _T("?? ") << what; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // struct HWND__ * 0x7ffd8000 + // +@@ -407,7 +407,7 @@ class CdbCmd_Backtrace : public DebuggerCmd + { + m_Cmd << _T("k n"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output is: + // # ChildEBP RetAddr +@@ -486,7 +486,7 @@ class CdbCmd_SwitchFrame : public DebuggerCmd + m_Cmd = wxString::Format(wxT(".frame %d"), frameNumber); + } + +- virtual void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + wxArrayString lines = GetArrayFromString(output, wxT('\n')); + +@@ -529,7 +529,7 @@ class CdbCmd_InfoRegisters : public DebuggerCmd + { + m_Cmd << _T("r"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output is: + // +@@ -564,7 +564,7 @@ class CdbCmd_Disassembly : public DebuggerCmd + { + m_Cmd << _T("uf ") << StopAddress; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output is a series of: + // +@@ -601,7 +601,7 @@ class CdbCmd_DisassemblyInit : public DebuggerCmd + // print stack frame and nearest symbol (start of function) + m_Cmd << _T("k n 1; ln"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // m_pDriver->QueueCommand(new CdbCmd_Disassembly(m_pDriver, m_pDlg, StopAddress)); // chain call + +diff --git a/src/plugins/debuggergdb/cdb_driver.h b/src/plugins/debuggergdb/cdb_driver.h +index 014b33f3c..e0a23f82c 100644 +--- a/src/plugins/debuggergdb/cdb_driver.h ++++ b/src/plugins/debuggergdb/cdb_driver.h +@@ -12,60 +12,61 @@ class CDB_driver : public DebuggerDriver + { + public: + CDB_driver(DebuggerGDB* plugin); +- virtual ~CDB_driver(); ++ ~CDB_driver() override; + +- virtual wxString GetCommandLine(const wxString& debugger, +- const wxString& debuggee, +- const wxString &userArguments); +- virtual wxString GetCommandLine(const wxString& debugger, int pid, const wxString &userArguments); +- virtual void SetTarget(ProjectBuildTarget* target); +- virtual void Prepare(bool isConsole, int printElements, const RemoteDebugging &remoteDebugging); +- virtual void Start(bool breakOnEntry); +- virtual void Stop(); ++ wxString GetCommandLine(const wxString& debugger, const wxString& debuggee, ++ const wxString &userArguments) override; ++ wxString GetCommandLine(const wxString& debugger, int pid, ++ const wxString &userArguments) override; ++ void SetTarget(ProjectBuildTarget* target) override; ++ void Prepare(bool isConsole, int printElements, ++ const RemoteDebugging &remoteDebugging) override; ++ void Start(bool breakOnEntry) override; ++ void Stop() override; + +- virtual void Continue(); +- virtual void Step(); +- virtual void StepInstruction(); +- virtual void StepIntoInstruction(); +- virtual void StepIn(); +- virtual void StepOut(); +- virtual void SetNextStatement(const wxString& filename, int line); +- virtual void Backtrace(); +- virtual void Disassemble(); +- virtual void CPURegisters(); +- virtual void SwitchToFrame(size_t number); +- virtual void SetVarValue(const wxString& var, const wxString& value); +- virtual void SetMemoryRangeValue(uint64_t addr, const wxString& value); +- virtual void MemoryDump(); +- virtual void Attach(int pid); +- virtual void Detach(); +- virtual void RunningThreads(); ++ void Continue() override; ++ void Step() override; ++ void StepInstruction() override; ++ void StepIntoInstruction() override; ++ void StepIn() override; ++ void StepOut() override; ++ void SetNextStatement(const wxString& filename, int line) override; ++ void Backtrace() override; ++ void Disassemble() override; ++ void CPURegisters() override; ++ void SwitchToFrame(size_t number) override; ++ void SetVarValue(const wxString& var, const wxString& value) override; ++ void SetMemoryRangeValue(uint64_t addr, const wxString& value) override; ++ void MemoryDump() override; ++ void Attach(int pid) override; ++ void Detach() override; ++ void RunningThreads() override; + +- void InfoFrame(); +- void InfoDLL(); +- void InfoFiles(); +- void InfoFPU(); +- void InfoSignals(); ++ void InfoFrame() override; ++ void InfoDLL() override; ++ void InfoFiles() override; ++ void InfoFPU() override; ++ void InfoSignals() override; + +- void EnableCatchingThrow(bool enable); ++ void EnableCatchingThrow(bool enable) override; + +- virtual void SwitchThread(cb_unused size_t threadIndex){} // not implemented ++ void SwitchThread(cb_unused size_t threadIndex) override {} // not implemented + +- virtual void AddBreakpoint(cb::shared_ptr bp); +- virtual void RemoveBreakpoint(cb::shared_ptr bp); +- virtual void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect); +- virtual void UpdateWatches(cb::shared_ptr localsWatch, +- cb::shared_ptr funcArgsWatch, +- WatchesContainer &watches, bool ignoreAutoUpdate); +- virtual void UpdateWatch(cb::shared_ptr const &watch); +- virtual void UpdateMemoryRangeWatches(MemoryRangeWatchesContainer &watches, +- bool ignoreAutoUpdate); +- virtual void UpdateMemoryRangeWatch(const cb::shared_ptr &watch); +- virtual void UpdateWatchLocalsArgs(cb::shared_ptr const &watch, bool locals); +- virtual void ParseOutput(const wxString& output); +- virtual bool IsDebuggingStarted() const; ++ void AddBreakpoint(cb::shared_ptr bp) override; ++ void RemoveBreakpoint(cb::shared_ptr bp) override; ++ void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect) override; ++ void UpdateWatches(cb::shared_ptr localsWatch, ++ cb::shared_ptr funcArgsWatch, ++ WatchesContainer &watches, bool ignoreAutoUpdate) override; ++ void UpdateWatch(cb::shared_ptr const &watch) override; ++ void UpdateMemoryRangeWatches(MemoryRangeWatchesContainer &watches, ++ bool ignoreAutoUpdate) override; ++ void UpdateMemoryRangeWatch(const cb::shared_ptr &watch) override; ++ void UpdateWatchLocalsArgs(cb::shared_ptr const &watch, bool locals) override; ++ void ParseOutput(const wxString& output) override; ++ bool IsDebuggingStarted() const override; + #ifdef __WXMSW__ +- virtual bool UseDebugBreakProcess() { return true; } ++ bool UseDebugBreakProcess() override { return true; } + #endif + protected: + private: +diff --git a/src/plugins/debuggergdb/debugger_defs.h b/src/plugins/debuggergdb/debugger_defs.h +index 4564f364f..d73f0768c 100644 +--- a/src/plugins/debuggergdb/debugger_defs.h ++++ b/src/plugins/debuggergdb/debugger_defs.h +@@ -95,9 +95,9 @@ class DebuggerInfoCmd : public DebuggerCmd + { + m_Cmd = cmd; + } +- virtual ~DebuggerInfoCmd(){} ++ ~DebuggerInfoCmd() override {} + +- virtual void ParseOutput(const wxString& output); ++ void ParseOutput(const wxString& output) override; + wxString m_Title; + }; + +@@ -110,7 +110,7 @@ class DebuggerContinueBaseCmd : public DebuggerCmd + { + } + +- bool IsContinueCommand() const { return true; } ++ bool IsContinueCommand() const override { return true; } + }; + + /** Action-only debugger command to signal the watches tree to update. */ +@@ -160,15 +160,15 @@ struct DebuggerBreakpoint : cbBreakpoint + {} + + // from cbBreakpoint +- virtual void SetEnabled(bool flag); +- virtual wxString GetLocation() const; +- virtual int GetLine() const; +- virtual wxString GetLineString() const; +- virtual wxString GetType() const; +- virtual wxString GetInfo() const; +- virtual bool IsEnabled() const; +- virtual bool IsVisibleInEditor() const; +- virtual bool IsTemporary() const; ++ void SetEnabled(bool flag) override; ++ wxString GetLocation() const override; ++ int GetLine() const override; ++ wxString GetLineString() const override; ++ wxString GetType() const override; ++ wxString GetInfo() const override; ++ bool IsEnabled() const override; ++ bool IsVisibleInEditor() const override; ++ bool IsTemporary() const override; + + BreakpointType type; ///< The type of this breakpoint. + wxString filename; ///< The filename for the breakpoint (kept as relative). +@@ -217,17 +217,17 @@ class GDBWatch : public cbWatch + { + public: + GDBWatch(wxString const &symbol); +- virtual ~GDBWatch(); ++ ~GDBWatch() override; + public: + +- virtual void GetSymbol(wxString &symbol) const; +- virtual void GetValue(wxString &value) const; +- virtual bool SetValue(const wxString &value); +- virtual void GetFullWatchString(wxString &full_watch) const; +- virtual void GetType(wxString &type) const; +- virtual void SetType(const wxString &type); ++ void GetSymbol(wxString &symbol) const override; ++ void GetValue(wxString &value) const override; ++ bool SetValue(const wxString &value) override; ++ void GetFullWatchString(wxString &full_watch) const override; ++ void GetType(wxString &type) const override; ++ void SetType(const wxString &type) override; + +- virtual wxString GetDebugString() const; ++ wxString GetDebugString() const override; + + wxString MakeSymbolToAddress() const override; + bool IsPointerType() const override; +diff --git a/src/plugins/debuggergdb/debuggergdb.h b/src/plugins/debuggergdb/debuggergdb.h +index f862685cc..89df6f42f 100644 +--- a/src/plugins/debuggergdb/debuggergdb.h ++++ b/src/plugins/debuggergdb/debuggergdb.h +@@ -34,90 +34,92 @@ class DebuggerGDB : public cbDebuggerPlugin + DebuggerState m_State; + public: + DebuggerGDB(); +- ~DebuggerGDB(); ++ ~DebuggerGDB() override; + +- cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, cbProject* project); +- void OnAttachReal(); // fires when the plugin is attached to the application +- void OnReleaseReal(bool appShutDown); // fires when the plugin is released from the application ++ cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, ++ cbProject* project) override; ++ void OnAttachReal() override; // fires when the plugin is attached to the application ++ void OnReleaseReal(bool appShutDown) override; // fires when the plugin is released from the application + +- bool SupportsFeature(cbDebuggerFeature::Flags flag); ++ bool SupportsFeature(cbDebuggerFeature::Flags flag) override; + +- cbDebuggerConfiguration* LoadConfig(const ConfigManagerWrapper &config); ++ cbDebuggerConfiguration* LoadConfig(const ConfigManagerWrapper &config) override; + + DebuggerConfiguration& GetActiveConfigEx(); + + void RunCommand(int cmd); + +- cb::shared_ptr AddBreakpoint(const wxString& filename, int line); +- cb::shared_ptr AddDataBreakpoint(const wxString& dataExpression); +- int GetBreakpointsCount() const; +- cb::shared_ptr GetBreakpoint(int index); +- cb::shared_ptr GetBreakpoint(int index) const; +- void UpdateBreakpoint(cb::shared_ptr breakpoint); +- void DeleteBreakpoint(cb::shared_ptr breakpoint); +- void DeleteAllBreakpoints(); +- void ShiftBreakpoint(int index, int lines_to_shift); +- void EnableBreakpoint(cb::shared_ptr breakpoint, bool enable); ++ cb::shared_ptr AddBreakpoint(const wxString& filename, int line) override; ++ cb::shared_ptr AddDataBreakpoint(const wxString& dataExpression) override; ++ int GetBreakpointsCount() const override; ++ cb::shared_ptr GetBreakpoint(int index) override; ++ cb::shared_ptr GetBreakpoint(int index) const override; ++ void UpdateBreakpoint(cb::shared_ptr breakpoint) override; ++ void DeleteBreakpoint(cb::shared_ptr breakpoint) override; ++ void DeleteAllBreakpoints() override; ++ void ShiftBreakpoint(int index, int lines_to_shift) override; ++ void EnableBreakpoint(cb::shared_ptr breakpoint, bool enable) override; + + // stack frame calls; +- int GetStackFrameCount() const; +- cb::shared_ptr GetStackFrame(int index) const; +- void SwitchToFrame(int number); +- int GetActiveStackFrame() const; ++ int GetStackFrameCount() const override; ++ cb::shared_ptr GetStackFrame(int index) const override; ++ void SwitchToFrame(int number) override; ++ int GetActiveStackFrame() const override; + + // threads +- int GetThreadsCount() const; +- cb::shared_ptr GetThread(int index) const; +- bool SwitchToThread(int thread_number); +- +- bool Debug(bool breakOnEntry); +- void Continue(); +- void Next(); +- void NextInstruction(); +- void StepIntoInstruction(); +- void Step(); +- void StepOut(); +- bool RunToCursor(const wxString& filename, int line, const wxString& line_text); +- void SetNextStatement(const wxString& filename, int line); +- void Break(); +- void Stop(); ++ int GetThreadsCount() const override; ++ cb::shared_ptr GetThread(int index) const override; ++ bool SwitchToThread(int thread_number) override; ++ ++ bool Debug(bool breakOnEntry) override; ++ void Continue() override; ++ void Next() override; ++ void NextInstruction() override; ++ void StepIntoInstruction() override; ++ void Step() override; ++ void StepOut() override; ++ bool RunToCursor(const wxString& filename, int line, const wxString& line_text) override; ++ void SetNextStatement(const wxString& filename, int line) override; ++ void Break() override; ++ void Stop() override; + bool Validate(const wxString& line, const char cb); +- bool IsRunning() const { return m_pProcess; } +- bool IsStopped() const; +- bool IsBusy() const; ++ bool IsRunning() const override { return m_pProcess; } ++ bool IsStopped() const override; ++ bool IsBusy() const override; + bool IsTemporaryBreak() const {return m_TemporaryBreak;} +- int GetExitCode() const { return m_LastExitCode; } ++ int GetExitCode() const override { return m_LastExitCode; } + +- cb::shared_ptr AddWatch(const wxString& symbol, bool update); ++ cb::shared_ptr AddWatch(const wxString& symbol, bool update) override; + cb::shared_ptr AddMemoryRange(uint64_t address, uint64_t size, +- const wxString &symbol, bool update); +- void DeleteWatch(cb::shared_ptr watch); +- bool HasWatch(cb::shared_ptr watch); ++ const wxString &symbol, bool update) override; ++ void DeleteWatch(cb::shared_ptr watch) override; ++ bool HasWatch(cb::shared_ptr watch) override; + bool IsMemoryRangeWatch(const cb::shared_ptr &watch); +- void ShowWatchProperties(cb::shared_ptr watch); +- bool SetWatchValue(cb::shared_ptr watch, const wxString &value); +- void ExpandWatch(cb::shared_ptr watch); +- void CollapseWatch(cb::shared_ptr watch); +- void UpdateWatch(cb::shared_ptr watch); +- void UpdateWatches(const std::vector> &watches); ++ void ShowWatchProperties(cb::shared_ptr watch) override; ++ bool SetWatchValue(cb::shared_ptr watch, const wxString &value) override; ++ void ExpandWatch(cb::shared_ptr watch) override; ++ void CollapseWatch(cb::shared_ptr watch) override; ++ void UpdateWatch(cb::shared_ptr watch) override; ++ void UpdateWatches(const std::vector> &watches) override; + + void AddWatchNoUpdate(const cb::shared_ptr &watch); + +- void OnWatchesContextMenu(wxMenu &menu, const cbWatch &watch, wxObject *property, int &disabledMenus); ++ void OnWatchesContextMenu(wxMenu &menu, const cbWatch &watch, wxObject *property, ++ int &disabledMenus) override; + +- void GetCurrentPosition(wxString &filename, int &line); +- void RequestUpdate(DebugWindows window); ++ void GetCurrentPosition(wxString &filename, int &line) override; ++ void RequestUpdate(DebugWindows window) override; + +- void AttachToProcess(const wxString& pid); +- void DetachFromProcess(); +- bool IsAttachedToProcess() const; ++ void AttachToProcess(const wxString& pid) override; ++ void DetachFromProcess() override; ++ bool IsAttachedToProcess() const override; + +- void SendCommand(const wxString& cmd, bool debugLog); ++ void SendCommand(const wxString& cmd, bool debugLog) override; + void DoSendCommand(const wxString& cmd); + + DebuggerState& GetState(){ return m_State; } + +- void OnConfigurationChange(bool isActive); ++ void OnConfigurationChange(bool isActive) override; + + static wxArrayString ParseSearchDirs(const cbProject &project); + static void SetSearchDirs(cbProject &project, const wxArrayString &dirs); +@@ -125,8 +127,8 @@ class DebuggerGDB : public cbDebuggerPlugin + static RemoteDebuggingMap ParseRemoteDebuggingMap(cbProject &project); + static void SetRemoteDebuggingMap(cbProject &project, const RemoteDebuggingMap &map); + +- void OnValueTooltip(const wxString &token, const wxRect &evalRect); +- bool ShowValueTooltip(int style); ++ void OnValueTooltip(const wxString &token, const wxRect &evalRect) override; ++ bool ShowValueTooltip(int style) override; + + static void ConvertToGDBFriendly(wxString& str); + static void ConvertToGDBFile(wxString& str); +@@ -138,11 +140,11 @@ class DebuggerGDB : public cbDebuggerPlugin + void DetermineLanguage(); + + protected: +- cbProject* GetProject() { return m_pProject; } +- void ResetProject() { m_pProcess = NULL; } +- void ConvertDirectory(wxString& str, wxString base, bool relative); +- void CleanupWhenProjectClosed(cbProject *project); +- bool CompilerFinished(bool compilerFailed, StartType startType); ++ cbProject* GetProject() override { return m_pProject; } ++ void ResetProject() override { m_pProcess = NULL; } ++ void ConvertDirectory(wxString& str, wxString base, bool relative) override; ++ void CleanupWhenProjectClosed(cbProject *project) override; ++ bool CompilerFinished(bool compilerFailed, StartType startType) override; + protected: + void AddSourceDir(const wxString& dir); + private: +@@ -166,7 +168,7 @@ class DebuggerGDB : public cbDebuggerPlugin + void OnShowFile(wxCommandEvent& event); + void OnCursorChanged(wxCommandEvent& event); + +- void SetupToolsMenu(wxMenu &menu); ++ void SetupToolsMenu(wxMenu &menu) override; + void KillConsole(); + void CheckIfConsoleIsClosed(); + +diff --git a/src/plugins/debuggergdb/debuggeroptionsdlg.h b/src/plugins/debuggergdb/debuggeroptionsdlg.h +index 1b358a209..f5bad3db0 100644 +--- a/src/plugins/debuggergdb/debuggeroptionsdlg.h ++++ b/src/plugins/debuggergdb/debuggeroptionsdlg.h +@@ -15,9 +15,9 @@ class DebuggerConfiguration : public cbDebuggerConfiguration + public: + explicit DebuggerConfiguration(const ConfigManagerWrapper &config); + +- virtual cbDebuggerConfiguration* Clone() const; +- virtual wxPanel* MakePanel(wxWindow *parent); +- virtual bool SaveChanges(wxPanel *panel); ++ cbDebuggerConfiguration* Clone() const override; ++ wxPanel* MakePanel(wxWindow *parent) override; ++ bool SaveChanges(wxPanel *panel) override; + public: + enum Flags + { +diff --git a/src/plugins/debuggergdb/debuggeroptionsprjdlg.h b/src/plugins/debuggergdb/debuggeroptionsprjdlg.h +index 70aa74bef..5ceb14244 100644 +--- a/src/plugins/debuggergdb/debuggeroptionsprjdlg.h ++++ b/src/plugins/debuggergdb/debuggeroptionsprjdlg.h +@@ -21,12 +21,12 @@ class DebuggerOptionsProjectDlg : public cbConfigurationPanel + { + public: + DebuggerOptionsProjectDlg(wxWindow* parent, DebuggerGDB* debugger, cbProject* project); +- virtual ~DebuggerOptionsProjectDlg(); ++ ~DebuggerOptionsProjectDlg() override; + +- virtual wxString GetTitle() const { return _("Debugger"); } +- virtual wxString GetBitmapBaseName() const { return _T("debugger"); } +- virtual void OnApply(); +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Debugger"); } ++ wxString GetBitmapBaseName() const override { return _T("debugger"); } ++ void OnApply() override; ++ void OnCancel() override {} + protected: + void OnTargetSel(wxCommandEvent& event); + void OnAdd(wxCommandEvent& event); +diff --git a/src/plugins/debuggergdb/editbreakpointdlg.h b/src/plugins/debuggergdb/editbreakpointdlg.h +index a1949a61d..054485c3f 100644 +--- a/src/plugins/debuggergdb/editbreakpointdlg.h ++++ b/src/plugins/debuggergdb/editbreakpointdlg.h +@@ -13,12 +13,12 @@ class EditBreakpointDlg : public wxScrollingDialog + { + public: + EditBreakpointDlg(const DebuggerBreakpoint &breakpoint, wxWindow* parent = 0); +- virtual ~EditBreakpointDlg(); ++ ~EditBreakpointDlg() override; + + const DebuggerBreakpoint& GetBreakpoint() const { return m_breakpoint; } + protected: + void OnUpdateUI(wxUpdateUIEvent& event); +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + + DebuggerBreakpoint m_breakpoint; + private: +diff --git a/src/plugins/debuggergdb/editwatchdlg.h b/src/plugins/debuggergdb/editwatchdlg.h +index c157009e7..561dcbc87 100644 +--- a/src/plugins/debuggergdb/editwatchdlg.h ++++ b/src/plugins/debuggergdb/editwatchdlg.h +@@ -14,10 +14,10 @@ class EditWatchDlg : public wxScrollingDialog + { + public: + EditWatchDlg(cb::shared_ptr w, wxWindow* parent); +- virtual ~EditWatchDlg(); ++ ~EditWatchDlg() override; + + protected: +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + + cb::shared_ptr m_watch; + }; +diff --git a/src/plugins/debuggergdb/gdb_commands.h b/src/plugins/debuggergdb/gdb_commands.h +index bceb51ada..cd564b29c 100644 +--- a/src/plugins/debuggergdb/gdb_commands.h ++++ b/src/plugins/debuggergdb/gdb_commands.h +@@ -232,7 +232,7 @@ class GdbCmd_AddSourceDir : public DebuggerCmd + { + m_Cmd << _T("directory ") << dir; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Warning: C:\Devel\tmp\console\111: No such file or directory. +@@ -254,7 +254,7 @@ class GdbCmd_SetDebuggee : public DebuggerCmd + { + m_Cmd << _T("file ") << file; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Reading symbols from C:\Devel\tmp\console/console.exe...done. +@@ -278,7 +278,7 @@ class GdbCmd_AddSymbolFile : public DebuggerCmd + { + m_Cmd << _T("add-symbol-file ") << file; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // +@@ -306,7 +306,7 @@ class GdbCmd_SetArguments : public DebuggerCmd + { + m_Cmd << _T("set args ") << args; + } +- void ParseOutput(cb_unused const wxString& output) ++ void ParseOutput(cb_unused const wxString& output) override + { + // No output + } +@@ -325,7 +325,7 @@ class GdbCmd_AttachToProcess : public DebuggerCmd + m_Cmd << _T("attach ") << wxString::Format(_T("%d"), pid); + m_pDriver->Log(wxString::Format(_("Attaching to program with pid: %d"), pid)); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Attaching to process +@@ -364,7 +364,7 @@ class GdbCmd_Detach : public DebuggerCmd + { + m_Cmd << _T("detach"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Output: + // Attaching to process +@@ -397,7 +397,7 @@ class GdbCmd_AddBreakpointCondition : public DebuggerCmd + if (m_BP->useCondition) + m_Cmd << _T(" ") << m_BP->condition; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if (output.StartsWith(_T("No symbol "))) + { +@@ -478,7 +478,7 @@ class GdbCmd_AddBreakpoint : public DebuggerCmd + // condition and ignore count will be set in ParseOutput, where we 'll have the bp number + } + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // possible outputs (we 're only interested in 1st and 2nd samples): + // +@@ -564,7 +564,7 @@ class GdbCmd_AddDataBreakpoint : public DebuggerCmd + if (m_BP->enabled) + m_Cmd << _T("output &") << m_BP->breakAddress; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // Hardware watchpoint 1: expr + if (output.StartsWith(_T("No symbol ")) || output.StartsWith(_T("Attempt to "))) +@@ -605,7 +605,7 @@ class GdbCmd_RemoveBreakpoint : public DebuggerCmd + m_Cmd << _T("delete breakpoints ") << wxString::Format(_T("%d"), (int) bp->index); + } + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if (!m_BP) + return; +@@ -643,7 +643,7 @@ class GdbCmd_SetCatch : public DebuggerCmd + m_Cmd = wxT("catch ") + type; + } + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if (m_regExp.Matches(output)) + { +@@ -666,7 +666,7 @@ class GdbCmd_Continue : public DebuggerContinueBaseCmd + { + } + +- virtual void Action() ++ void Action() override + { + m_pDriver->NotifyDebuggeeContinued(); + } +@@ -680,7 +680,7 @@ class GdbCmd_Start : public DebuggerContinueBaseCmd + { + } + +- virtual void ParseOutput(const wxString &output) ++ void ParseOutput(const wxString &output) override + { + const wxArrayString &lines = GetArrayFromString(output, _T('\n')); + for (size_t ii = 0; ii < lines.GetCount(); ++ii) +@@ -710,7 +710,7 @@ class GdbCmd_InfoProgram : public DebuggerCmd + { + m_Cmd << _T("info program"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + wxString pid_str; + if (reInfoProgramThread.Matches(output)) +@@ -739,7 +739,7 @@ class GdbCmd_Threads : public DebuggerCmd + { + m_Cmd << _T("info threads"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + m_pDriver->GetThreads().clear(); + wxArrayString lines = GetArrayFromString(output, _T('\n')); +@@ -831,7 +831,7 @@ class GdbCmd_Watch : public DebuggerCmd + m_Cmd << symbol; + } + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + wxString w = output; + w.Trim(true); +@@ -873,7 +873,7 @@ class GdbCmd_MemoryRangeWatch : public DebuggerCmd + m_Cmd = wxString(wxT("x /")) << wxString::FromUTF8(tmpSize) << wxT("xb ") << wxString::FromUTF8(tmpAddr); + } + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + wxArrayString lines = GetArrayFromString(output, _T('\n')); + wxString addr; +@@ -915,7 +915,7 @@ class GdbCmd_FindWatchType : public DebuggerCmd + m_watch->GetSymbol(symbol); + m_Cmd << symbol; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // happens, when wxString is passed as const reference parameter + if (m_firstTry && output == wxT("Attempt to take contents of a non-pointer value.")) +@@ -988,7 +988,7 @@ class GdbCmd_TooltipEvaluation : public DebuggerCmd + m_Cmd << wxT("output "); + m_Cmd << m_What; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + wxString contents = output; + contents.Trim(true); +@@ -1044,7 +1044,7 @@ class GdbCmd_FindTooltipAddress : public DebuggerCmd + m_Cmd << _T('&'); + m_Cmd << m_What; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // examples: + // type = wxString +@@ -1087,7 +1087,7 @@ class GdbCmd_FindTooltipType : public DebuggerCmd + { + singleUsage = false; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // examples: + // type = wxString +@@ -1119,7 +1119,7 @@ class GdbCmd_LocalsFuncArgs : public DebuggerCmd + else + m_Cmd = wxT("info args"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if ((m_doLocals && output == wxT("No locals.")) || (!m_doLocals && output == wxT("No arguments."))) + { +@@ -1158,7 +1158,7 @@ class GdbCmd_ChangeFrame : public DebuggerCmd + { + m_Cmd << _T("frame ") << frameno; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + m_pDriver->Log(output); + } +@@ -1175,7 +1175,7 @@ class GdbCmd_Backtrace : public DebuggerCmd + { + m_Cmd << _T("bt 30"); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + int validFrameNumber = -1; + cbStackFrame validSF; +@@ -1321,7 +1321,7 @@ class GdbCmd_InfoRegisters : public DebuggerCmd + m_Cmd << _T("info registers"); + }; + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output is a series of: + // +@@ -1468,7 +1468,7 @@ class GdbCmd_Disassembly : public DebuggerCmd + else + m_Cmd << wxT(" 0x") << hexAddrStr; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // output for "disassemble" is a series of: + // +@@ -1559,7 +1559,7 @@ class GdbCmd_DisassemblyInit : public DebuggerCmd + m_Cmd << _T("info frame\n") << _T("end\n"); + }; + +- void ParseOutput(const wxString& p_output) ++ void ParseOutput(const wxString& p_output) override + { + cbDisassemblyDlg *dialog = Manager::Get()->GetDebuggerManager()->GetDisassemblyDialog(); + +@@ -1652,7 +1652,7 @@ class GdbCmd_ExamineMemory : public DebuggerCmd + const wxString &address = CleanStringValue(dialog->GetBaseAddress()); + m_Cmd.Printf(_T("x/%dxb %s"), dialog->GetBytes(), address.c_str()); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + cbExamineMemoryDlg *dialog = Manager::Get()->GetDebuggerManager()->GetExamineMemoryDialog(); + +@@ -1693,7 +1693,7 @@ class GdbCmd_RemoteBaud : public DebuggerCmd + m_Cmd << _T("set remotebaud ") << baud; + driver->Log(_("Setting serial connection speed to ") + baud); + } +- void ParseOutput(cb_unused const wxString& output) ++ void ParseOutput(cb_unused const wxString& output) override + { + } + }; +@@ -1738,7 +1738,7 @@ class GdbCmd_RemoteTarget : public DebuggerCmd + else + m_pDriver->Log(_("Invalid settings for remote debugging!")); + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + // This command will either output an error or a breakpoint address info + // Connection errors are of the form: +@@ -1802,7 +1802,7 @@ class GdbCmd_StepOrNextInstruction : public DebuggerContinueBaseCmd + { + m_Cmd << command; + } +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + DebuggerManager *manager = Manager::Get()->GetDebuggerManager(); + if (!manager->UpdateDisassembly()) +@@ -1867,7 +1867,7 @@ class GdbCmd_FindCursor : public DebuggerCmd + { + } + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + const wxArrayString &lines = GetArrayFromString(output, _T('\n')); + if (lines.Count() <= 2) +@@ -1915,7 +1915,7 @@ class GdbCmd_DebugLanguage : public DebuggerCmd + m_Cmd << _T("show language"); + } + +- void ParseOutput(const wxString& output) ++ void ParseOutput(const wxString& output) override + { + if (output.Lower().Find(wxT("fortran")) != wxNOT_FOUND) + g_DebugLanguage = dl_Fortran; +diff --git a/src/plugins/debuggergdb/gdb_driver.h b/src/plugins/debuggergdb/gdb_driver.h +index e3617cffb..16ecb6e92 100644 +--- a/src/plugins/debuggergdb/gdb_driver.h ++++ b/src/plugins/debuggergdb/gdb_driver.h +@@ -14,62 +14,62 @@ class GDB_driver : public DebuggerDriver + { + public: + GDB_driver(DebuggerGDB* plugin); +- virtual ~GDB_driver(); +- +- virtual wxString GetCommandLine(const wxString& debugger, +- const wxString& debuggee, +- const wxString &userArguments); +- virtual wxString GetCommandLine(const wxString& debugger, int pid, const wxString &userArguments); +- virtual void SetTarget(ProjectBuildTarget* target); +- virtual void Prepare(bool isConsole, int printElements, const RemoteDebugging &remoteDebugging); +- virtual void Start(bool breakOnEntry); +- virtual void Stop(); +- +- virtual void Continue(); +- virtual void Step(); +- virtual void StepInstruction(); +- virtual void StepIntoInstruction(); +- virtual void StepIn(); +- virtual void StepOut(); +- virtual void SetNextStatement(const wxString& filename, int line); +- virtual void Backtrace(); +- virtual void Disassemble(); +- virtual void CPURegisters(); +- virtual void SwitchToFrame(size_t number); +- virtual void SetVarValue(const wxString& var, const wxString& value); +- virtual void SetMemoryRangeValue(uint64_t addr, const wxString& value); +- virtual void MemoryDump(); +- virtual void Attach(int pid); +- virtual void Detach(); +- virtual void RunningThreads(); +- +- void InfoFrame(); +- void InfoDLL(); +- void InfoFiles(); +- void InfoFPU(); +- void InfoSignals(); +- +- void EnableCatchingThrow(bool enable); +- +- virtual void SwitchThread(size_t threadIndex); +- +- virtual void AddBreakpoint(cb::shared_ptr bp); +- virtual void RemoveBreakpoint(cb::shared_ptr bp); +- virtual void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect); +- virtual void UpdateWatches(cb::shared_ptr localsWatch, +- cb::shared_ptr funcArgsWatch, +- WatchesContainer &watches, bool ignoreAutoUpdate); +- virtual void UpdateMemoryRangeWatches(MemoryRangeWatchesContainer &watches, +- bool ignoreAutoUpdate); +- virtual void UpdateWatch(const cb::shared_ptr &watch); +- virtual void UpdateMemoryRangeWatch(const cb::shared_ptr &watch); +- virtual void UpdateWatchLocalsArgs(cb::shared_ptr const &watch, bool locals); +- virtual void ParseOutput(const wxString& output); +- virtual bool IsDebuggingStarted() const { return m_IsStarted; } +- +- virtual void DetermineLanguage(); ++ ~GDB_driver() override; ++ ++ wxString GetCommandLine(const wxString& debugger, const wxString& debuggee, ++ const wxString &userArguments) override; ++ wxString GetCommandLine(const wxString& debugger, int pid, ++ const wxString &userArguments) override; ++ void SetTarget(ProjectBuildTarget* target) override; ++ void Prepare(bool isConsole, int printElements, const RemoteDebugging &remoteDebugging) override; ++ void Start(bool breakOnEntry) override; ++ void Stop() override; ++ ++ void Continue() override; ++ void Step() override; ++ void StepInstruction() override; ++ void StepIntoInstruction() override; ++ void StepIn() override; ++ void StepOut() override; ++ void SetNextStatement(const wxString& filename, int line) override; ++ void Backtrace() override; ++ void Disassemble() override; ++ void CPURegisters() override; ++ void SwitchToFrame(size_t number) override; ++ void SetVarValue(const wxString& var, const wxString& value) override; ++ void SetMemoryRangeValue(uint64_t addr, const wxString& value) override; ++ void MemoryDump() override; ++ void Attach(int pid) override; ++ void Detach() override; ++ void RunningThreads() override; ++ ++ void InfoFrame() override; ++ void InfoDLL() override; ++ void InfoFiles() override; ++ void InfoFPU() override; ++ void InfoSignals() override; ++ ++ void EnableCatchingThrow(bool enable) override; ++ ++ void SwitchThread(size_t threadIndex) override; ++ ++ void AddBreakpoint(cb::shared_ptr bp) override; ++ void RemoveBreakpoint(cb::shared_ptr bp) override; ++ void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect) override; ++ void UpdateWatches(cb::shared_ptr localsWatch, ++ cb::shared_ptr funcArgsWatch, WatchesContainer &watches, ++ bool ignoreAutoUpdate) override; ++ void UpdateMemoryRangeWatches(MemoryRangeWatchesContainer &watches, ++ bool ignoreAutoUpdate) override; ++ void UpdateWatch(const cb::shared_ptr &watch) override; ++ void UpdateMemoryRangeWatch(const cb::shared_ptr &watch) override; ++ void UpdateWatchLocalsArgs(cb::shared_ptr const &watch, bool locals) override; ++ void ParseOutput(const wxString& output) override; ++ bool IsDebuggingStarted() const override { return m_IsStarted; } ++ ++ void DetermineLanguage() override; + #ifdef __WXMSW__ +- virtual bool UseDebugBreakProcess(); ++ bool UseDebugBreakProcess() override; + #endif + virtual wxString GetDisassemblyFlavour(void); + +diff --git a/src/plugins/defaultmimehandler/defaultmimehandler.h b/src/plugins/defaultmimehandler/defaultmimehandler.h +index 916d95dee..d1cb928b5 100644 +--- a/src/plugins/defaultmimehandler/defaultmimehandler.h ++++ b/src/plugins/defaultmimehandler/defaultmimehandler.h +@@ -15,14 +15,14 @@ class DefaultMimeHandler : public cbMimePlugin + { + public: + DefaultMimeHandler(); +- ~DefaultMimeHandler(); +- int GetConfigurationGroup() const { return cgCorePlugin; } +- cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); +- bool HandlesEverything() const { return true; } +- bool CanHandleFile(const wxString& filename) const; +- int OpenFile(const wxString& filename); +- void OnAttach(); // fires when the plugin is attached to the application +- void OnRelease(bool appShutDown); // fires when the plugin is released from the application ++ ~DefaultMimeHandler() override; ++ int GetConfigurationGroup() const override { return cgCorePlugin; } ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; ++ bool HandlesEverything() const override { return true; } ++ bool CanHandleFile(const wxString& filename) const override; ++ int OpenFile(const wxString& filename) override; ++ void OnAttach() override; // fires when the plugin is attached to the application ++ void OnRelease(bool appShutDown) override; // fires when the plugin is released from the application + private: + cbMimeType* FindMimeTypeFor(const wxString& filename); + wxString ChooseExternalProgram(); +diff --git a/src/plugins/defaultmimehandler/editmimetypesdlg.h b/src/plugins/defaultmimehandler/editmimetypesdlg.h +index 62f00fbae..9744a8d5d 100644 +--- a/src/plugins/defaultmimehandler/editmimetypesdlg.h ++++ b/src/plugins/defaultmimehandler/editmimetypesdlg.h +@@ -14,12 +14,12 @@ class EditMimeTypesDlg : public cbConfigurationPanel + { + public: + EditMimeTypesDlg(wxWindow* parent, MimeTypesArray& array); +- virtual ~EditMimeTypesDlg(); ++ ~EditMimeTypesDlg() override; + +- virtual wxString GetTitle() const { return _("Files extension handling"); } +- virtual wxString GetBitmapBaseName() const { return _T("extensions"); } +- virtual void OnApply(); +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Files extension handling"); } ++ wxString GetBitmapBaseName() const override { return _T("extensions"); } ++ void OnApply() override; ++ void OnCancel() override {} + private: + void FillList(); + void UpdateDisplay(); +diff --git a/src/plugins/occurrenceshighlighting/occurrenceshighlighting.h b/src/plugins/occurrenceshighlighting/occurrenceshighlighting.h +index 8337a4a48..675979a6d 100644 +--- a/src/plugins/occurrenceshighlighting/occurrenceshighlighting.h ++++ b/src/plugins/occurrenceshighlighting/occurrenceshighlighting.h +@@ -24,19 +24,20 @@ class OccurrencesHighlighting : public cbPlugin + { + public: + OccurrencesHighlighting(); +- virtual ~OccurrencesHighlighting(); ++ ~OccurrencesHighlighting() override; + +- virtual void BuildMenu(wxMenuBar* menuBar); +- virtual void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0); +- virtual bool BuildToolBar(cb_unused wxToolBar* toolBar){ return false; } +- virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); +- virtual int GetConfigurationPriority() const { return 50; } +- virtual int GetConfigurationGroup() const { return cgEditor; } ++ void BuildMenu(wxMenuBar* menuBar) override; ++ void BuildModuleMenu(const ModuleType type, wxMenu* menu, ++ const FileTreeData* data = nullptr) override; ++ bool BuildToolBar(cb_unused wxToolBar* toolBar) override { return false; } ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; ++ int GetConfigurationPriority() const override { return 50; } ++ int GetConfigurationGroup() const override { return cgEditor; } + + + protected: +- virtual void OnAttach(); +- virtual void OnRelease(bool appShutDown); ++ void OnAttach() override; ++ void OnRelease(bool appShutDown) override; + + private: + void OnListKeyDown(wxListEvent &event); +diff --git a/src/plugins/occurrenceshighlighting/occurrenceshighlightingconfigurationpanel.h b/src/plugins/occurrenceshighlighting/occurrenceshighlightingconfigurationpanel.h +index 2b6a6b68b..bcd4c5bfc 100644 +--- a/src/plugins/occurrenceshighlighting/occurrenceshighlightingconfigurationpanel.h ++++ b/src/plugins/occurrenceshighlighting/occurrenceshighlightingconfigurationpanel.h +@@ -17,16 +17,16 @@ class OccurrencesHighlightingConfigurationPanel : public cbConfigurationPanel + { + public: + OccurrencesHighlightingConfigurationPanel(wxWindow* parent); +- virtual ~OccurrencesHighlightingConfigurationPanel(); ++ ~OccurrencesHighlightingConfigurationPanel() override; + + /// @return the panel's title. +- virtual wxString GetTitle() const; ++ wxString GetTitle() const override; + /// @return the panel's bitmap base name. You must supply two bitmaps: \.png and \-off.png... +- virtual wxString GetBitmapBaseName() const; ++ wxString GetBitmapBaseName() const override; + /// Called when the user chooses to apply the configuration. +- virtual void OnApply(); ++ void OnApply() override; + /// Called when the user chooses to cancel the configuration. +- virtual void OnCancel(); ++ void OnCancel() override; + + private: + void OnChooseColour(wxCommandEvent& event); +diff --git a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h +index 7fd7a951a..c59d67ba1 100644 +--- a/src/plugins/openfileslist/openfileslistplugin.h ++++ b/src/plugins/openfileslist/openfileslistplugin.h +@@ -38,14 +38,14 @@ class OpenFilesListPlugin : public cbPlugin + { + public: + OpenFilesListPlugin(); +- virtual ~OpenFilesListPlugin(); ++ ~OpenFilesListPlugin() override; + +- virtual int GetConfigurationGroup() const { return cgEditor; } ++ int GetConfigurationGroup() const override { return cgEditor; } + +- virtual void BuildMenu(wxMenuBar* menuBar); ++ void BuildMenu(wxMenuBar* menuBar) override; + +- virtual void OnAttach(); +- virtual void OnRelease(bool appShutDown); ++ void OnAttach() override; ++ void OnRelease(bool appShutDown) override; + protected: + int GetOpenFilesListIcon(EditorBase* ed); + void RebuildOpenFilesTree(); +diff --git a/src/plugins/projectsimporter/devcpploader.h b/src/plugins/projectsimporter/devcpploader.h +index ffdbebd20..3870d8d31 100644 +--- a/src/plugins/projectsimporter/devcpploader.h ++++ b/src/plugins/projectsimporter/devcpploader.h +@@ -15,10 +15,10 @@ class DevCppLoader : public IBaseLoader + { + public: + DevCppLoader(cbProject* project); +- virtual ~DevCppLoader(); ++ ~DevCppLoader() override; + +- bool Open(const wxString& filename); +- bool Save(const wxString& filename); ++ bool Open(const wxString& filename) override; ++ bool Save(const wxString& filename) override; + protected: + cbProject* m_pProject; + private: +diff --git a/src/plugins/projectsimporter/msvc10loader.h b/src/plugins/projectsimporter/msvc10loader.h +index f1c2bab82..26ccfe137 100644 +--- a/src/plugins/projectsimporter/msvc10loader.h ++++ b/src/plugins/projectsimporter/msvc10loader.h +@@ -20,10 +20,10 @@ class MSVC10Loader : public IBaseLoader + // default %(AdditionalDependencies), not sure if "winmm" and "comctl32" are part of them + static const wxString g_AdditionalDependencies; + MSVC10Loader(cbProject* project); +- virtual ~MSVC10Loader(); ++ ~MSVC10Loader() override; + +- bool Open(const wxString& filename); +- bool Save(const wxString& filename); ++ bool Open(const wxString& filename) override; ++ bool Save(const wxString& filename) override; + protected: + cbProject* m_pProject; + char m_ConvertSwitches; +diff --git a/src/plugins/projectsimporter/msvc7loader.h b/src/plugins/projectsimporter/msvc7loader.h +index aaf76727c..9b1743861 100644 +--- a/src/plugins/projectsimporter/msvc7loader.h ++++ b/src/plugins/projectsimporter/msvc7loader.h +@@ -21,10 +21,10 @@ class MSVC7Loader : public IBaseLoader + { + public: + MSVC7Loader(cbProject* project); +- virtual ~MSVC7Loader(); ++ ~MSVC7Loader() override; + +- bool Open(const wxString& filename); +- bool Save(const wxString& filename); ++ bool Open(const wxString& filename) override; ++ bool Save(const wxString& filename) override; + protected: + cbProject* m_pProject; + bool m_ConvertSwitches; +diff --git a/src/plugins/projectsimporter/msvc7workspaceloader.h b/src/plugins/projectsimporter/msvc7workspaceloader.h +index 2a4a19d52..4e417383c 100644 +--- a/src/plugins/projectsimporter/msvc7workspaceloader.h ++++ b/src/plugins/projectsimporter/msvc7workspaceloader.h +@@ -14,10 +14,10 @@ class MSVC7WorkspaceLoader : public IBaseWorkspaceLoader, public MSVCWorkspaceBa + public: + static wxString g_WorkspacePath; //!< @note : maybe put into ImportersGlobals (importers_globals.h in SDK include, who ever put it there...) + MSVC7WorkspaceLoader(); +- virtual ~MSVC7WorkspaceLoader(); ++ ~MSVC7WorkspaceLoader() override; + +- bool Open(const wxString& filename, wxString& Title); +- bool Save(const wxString& title, const wxString& filename); ++ bool Open(const wxString& filename, wxString& Title) override; ++ bool Save(const wxString& title, const wxString& filename) override; + }; + + #endif // MSVC7WORKSPACELOADER_H +diff --git a/src/plugins/projectsimporter/msvcloader.h b/src/plugins/projectsimporter/msvcloader.h +index 95149e83e..86958a03b 100644 +--- a/src/plugins/projectsimporter/msvcloader.h ++++ b/src/plugins/projectsimporter/msvcloader.h +@@ -20,10 +20,10 @@ class MSVCLoader : public IBaseLoader + { + public: + MSVCLoader(cbProject* project); +- virtual ~MSVCLoader(); ++ ~MSVCLoader() override; + +- bool Open(const wxString& filename); +- bool Save(const wxString& filename); ++ bool Open(const wxString& filename) override; ++ bool Save(const wxString& filename) override; + protected: + bool ReadConfigurations(); + bool ParseConfiguration(int index); +diff --git a/src/plugins/projectsimporter/msvcworkspaceloader.h b/src/plugins/projectsimporter/msvcworkspaceloader.h +index 8236fe7fe..325787807 100644 +--- a/src/plugins/projectsimporter/msvcworkspaceloader.h ++++ b/src/plugins/projectsimporter/msvcworkspaceloader.h +@@ -13,10 +13,10 @@ class MSVCWorkspaceLoader : public IBaseWorkspaceLoader, public MSVCWorkspaceBas + { + public: + MSVCWorkspaceLoader(); +- virtual ~MSVCWorkspaceLoader(); ++ ~MSVCWorkspaceLoader() override; + +- bool Open(const wxString& filename, wxString& Title); +- bool Save(const wxString& title, const wxString& filename); ++ bool Open(const wxString& filename, wxString& Title) override; ++ bool Save(const wxString& title, const wxString& filename) override; + }; + + #endif // MSVCWORKSPACELOADER_H +diff --git a/src/plugins/projectsimporter/projectsimporter.h b/src/plugins/projectsimporter/projectsimporter.h +index fd580aa74..19805f4a1 100644 +--- a/src/plugins/projectsimporter/projectsimporter.h ++++ b/src/plugins/projectsimporter/projectsimporter.h +@@ -12,11 +12,11 @@ class ProjectsImporter : public cbMimePlugin + { + public: + ProjectsImporter(); +- ~ProjectsImporter(); +- bool HandlesEverything() const { return false; } +- bool CanHandleFile(const wxString& filename) const; +- int OpenFile(const wxString& filename); +- void BuildMenu(wxMenuBar* menuBar); ++ ~ProjectsImporter() override; ++ bool HandlesEverything() const override { return false; } ++ bool CanHandleFile(const wxString& filename) const override; ++ int OpenFile(const wxString& filename) override; ++ void BuildMenu(wxMenuBar* menuBar) override; + private: + int LoadProject(const wxString& filename); + int LoadWorkspace(const wxString& filename); +diff --git a/src/plugins/scriptedwizard/projectpathpanel.h b/src/plugins/scriptedwizard/projectpathpanel.h +index aa21f8398..6822aa5a3 100644 +--- a/src/plugins/scriptedwizard/projectpathpanel.h ++++ b/src/plugins/scriptedwizard/projectpathpanel.h +@@ -22,7 +22,7 @@ class ProjectPathPanel: public wxPanel + public: + + ProjectPathPanel(wxWindow* parent,wxWindowID id = -1); +- virtual ~ProjectPathPanel(); ++ ~ProjectPathPanel() override; + + void SetPath(const wxString& path) + { +@@ -35,7 +35,7 @@ class ProjectPathPanel: public wxPanel + //wxString GetName(){ return txtPrjName->GetValue(); } + // NOTE (Biplab#1#): This is a temporary fix. This function + // need to be renamed according to it's visual representation +- wxString GetName() const { return txtPrjTitle->GetValue(); } ++ wxString GetName() const override { return txtPrjTitle->GetValue(); } + wxString GetFullFileName() const { return txtFinalDir->GetValue(); } + wxString GetTitle() const { return txtPrjTitle->GetValue(); } + +@@ -54,7 +54,7 @@ class ProjectPathPanel: public wxPanel + + private: + +- void Update(); ++ void Update() override; + void UpdateFromResulting(); + bool m_LockUpdates; + +diff --git a/src/plugins/scriptedwizard/wiz.h b/src/plugins/scriptedwizard/wiz.h +index bd6c8e65a..aaa60b554 100644 +--- a/src/plugins/scriptedwizard/wiz.h ++++ b/src/plugins/scriptedwizard/wiz.h +@@ -39,7 +39,7 @@ class Wiz : public cbWizardPlugin + { + public: + Wiz(); +- ~Wiz(); ++ ~Wiz() override; + + Wiz& operator=(cb_unused const Wiz& rhs) // prevent assignment operator + { +@@ -47,14 +47,14 @@ class Wiz : public cbWizardPlugin + return *this; + } + +- int GetCount() const; +- TemplateOutputType GetOutputType(int index) const; +- wxString GetTitle(int index) const; +- wxString GetDescription(int index) const; +- wxString GetCategory(int index) const; +- const wxBitmap& GetBitmap(int index) const; +- wxString GetScriptFilename(int index) const; +- CompileTargetBase* Launch(int index, wxString* pFilename = 0); ++ int GetCount() const override; ++ TemplateOutputType GetOutputType(int index) const override; ++ wxString GetTitle(int index) const override; ++ wxString GetDescription(int index) const override; ++ wxString GetCategory(int index) const override; ++ const wxBitmap& GetBitmap(int index) const override; ++ wxString GetScriptFilename(int index) const override; ++ CompileTargetBase* Launch(int index, wxString* pFilename = 0) override; + + CompileTargetBase* RunProjectWizard(wxString* pFilename); // called by Launch() for otProject wizards + CompileTargetBase* RunTargetWizard(wxString* pFilename); // called by Launch() for otTarget wizards (always returns NULL) +@@ -171,7 +171,7 @@ class Wiz : public cbWizardPlugin + void RegisterWizard(); + wxString FindTemplateFile(const wxString& filename); + protected: +- void OnAttach(); ++ void OnAttach() override; + void Clear(); + void CopyFiles(cbProject* theproject, const wxString& prjdir, const wxString& srcdir); + wxString GenerateFile(const wxString& basePath, const wxString& filename, const wxString& contents); +diff --git a/src/plugins/scriptedwizard/wizpage.h b/src/plugins/scriptedwizard/wizpage.h +index 5ac6204c4..7aff6d739 100644 +--- a/src/plugins/scriptedwizard/wizpage.h ++++ b/src/plugins/scriptedwizard/wizpage.h +@@ -34,15 +34,15 @@ class WizPageBase : public wxWizardPageSimple + { + public: + WizPageBase(const wxString& pageName, wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizPageBase(); ++ ~WizPageBase() override; + + virtual bool SkipPage() const { return m_SkipPage; } // default: false + + virtual void OnPageChanging(wxWizardEvent& event); + virtual void OnPageChanged(wxWizardEvent& event); + +- virtual wxWizardPage* GetPrev() const; +- virtual wxWizardPage* GetNext() const; ++ wxWizardPage* GetPrev() const override; ++ wxWizardPage* GetNext() const override; + wxString GetPageName() const {return m_PageName;} + bool GetSkipPage() const {return m_SkipPage;} + void SetSkipPage(bool skip) {m_SkipPage = skip;} +@@ -69,9 +69,9 @@ class WizInfoPanel : public WizPageBase + { + public: + WizInfoPanel(const wxString& pageId, const wxString& intro_msg, wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizInfoPanel(); ++ ~WizInfoPanel() override; + +- virtual void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + InfoPanel* m_InfoPanel; + }; +@@ -80,7 +80,7 @@ class WizFilePathPanel : public WizPageBase + { + public: + WizFilePathPanel(bool showHeaderGuard, wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizFilePathPanel(); ++ ~WizFilePathPanel() override; + + wxString GetFilename() const { return m_Filename; } + wxString GetHeaderGuard() const { return m_HeaderGuard; } +@@ -88,7 +88,7 @@ class WizFilePathPanel : public WizPageBase + int GetTargetIndex() const; + void SetFilePathSelectionFilter(const wxString& filter); + +- void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + FilePathPanel* m_pFilePathPanel; + wxString m_Filename; +@@ -100,16 +100,16 @@ class WizProjectPathPanel : public WizPageBase + { + public: + WizProjectPathPanel(wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizProjectPathPanel(); ++ ~WizProjectPathPanel() override; + + wxString GetPath() const; +- wxString GetName() const; ++ wxString GetName() const override; + wxString GetFullFileName() const; + wxString GetTitle() const; + + void OnButton(wxCommandEvent& event); +- virtual void OnPageChanging(wxWizardEvent& event); +- virtual void OnPageChanged(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; ++ void OnPageChanged(wxWizardEvent& event) override; + private: + ProjectPathPanel* m_pProjectPathPanel; + +@@ -121,10 +121,10 @@ class WizGenericSelectPathPanel : public WizPageBase + public: + WizGenericSelectPathPanel(const wxString& pageId, const wxString& descr, const wxString& label, const wxString& defValue, + wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizGenericSelectPathPanel(); ++ ~WizGenericSelectPathPanel() override; + + void OnButton(wxCommandEvent& event); +- virtual void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + GenericSelectPath* m_pGenericSelectPath; + +@@ -136,7 +136,7 @@ class WizCompilerPanel : public WizPageBase + public: + WizCompilerPanel(const wxString& compilerID, const wxString& validCompilerIDs, wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap, + bool allowCompilerChange = true, bool allowConfigChange = true); +- ~WizCompilerPanel(); ++ ~WizCompilerPanel() override; + + wxString GetCompilerID() const; + bool GetWantDebug() const; +@@ -148,7 +148,7 @@ class WizCompilerPanel : public WizPageBase + wxString GetReleaseOutputDir() const; + wxString GetReleaseObjectOutputDir() const; + +- void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + CompilerPanel* m_pCompilerPanel; + bool m_AllowConfigChange; +@@ -162,7 +162,7 @@ class WizBuildTargetPanel : public WizPageBase + bool showCompiler = false, + const wxString& compilerID = wxEmptyString, const wxString& validCompilerIDs = _T("*"), + bool allowCompilerChange = true); +- ~WizBuildTargetPanel(); ++ ~WizBuildTargetPanel() override; + + wxString GetCompilerID() const; + bool GetEnableDebug() const; +@@ -170,7 +170,7 @@ class WizBuildTargetPanel : public WizPageBase + wxString GetTargetOutputDir() const; + wxString GetTargetObjectOutputDir() const; + +- void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + BuildTargetPanel* m_pBuildTargetPanel; + }; +@@ -179,12 +179,12 @@ class WizGenericSingleChoiceList : public WizPageBase + { + public: + WizGenericSingleChoiceList(const wxString& pageId, const wxString& descr, const wxArrayString& choices, int defChoice, wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); +- ~WizGenericSingleChoiceList(); ++ ~WizGenericSingleChoiceList() override; + + int GetChoice() const; + void SetChoice(int choice); + +- void OnPageChanging(wxWizardEvent& event); ++ void OnPageChanging(wxWizardEvent& event) override; + private: + GenericSingleChoiceList* m_pGenericSingleChoiceList; + }; +diff --git a/src/plugins/todo/addtododlg.h b/src/plugins/todo/addtododlg.h +index 42eb6075b..b51565d8f 100644 +--- a/src/plugins/todo/addtododlg.h ++++ b/src/plugins/todo/addtododlg.h +@@ -37,7 +37,6 @@ class AddTodoDlg : public wxScrollingDialog + { + public: + AddTodoDlg(wxWindow* parent, const wxArrayString& users, const wxArrayString& types, std::bitset<(int)tdctError+1> supportedTdcts); +- virtual ~AddTodoDlg() {}; + + wxString GetText() const; + wxString GetUser() const; +@@ -47,7 +46,7 @@ class AddTodoDlg : public wxScrollingDialog + wxString GetType() const; + ToDoCommentType GetCommentType() const; + +- void EndModal(int retVal); ++ void EndModal(int retVal) override; + + private: + void OnAddUser(wxCommandEvent&); +diff --git a/src/plugins/todo/todolist.h b/src/plugins/todo/todolist.h +index 960b6165f..1c868ebc1 100644 +--- a/src/plugins/todo/todolist.h ++++ b/src/plugins/todo/todolist.h +@@ -28,12 +28,13 @@ class ToDoList : public cbPlugin + { + public: + ToDoList(); +- ~ToDoList(); +- virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent); +- void BuildMenu(wxMenuBar* menuBar); +- void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0); +- void OnAttach(); // fires when the plugin is attached to the application +- void OnRelease(bool appShutDown); // fires when the plugin is released from the application ++ ~ToDoList() override; ++ cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent) override; ++ void BuildMenu(wxMenuBar* menuBar) override; ++ void BuildModuleMenu(const ModuleType type, wxMenu* menu, ++ const FileTreeData* data = nullptr) override; ++ void OnAttach() override; // fires when the plugin is attached to the application ++ void OnRelease(bool appShutDown) override; // fires when the plugin is released from the application + private: + // only parse files when C::B app is already start up + void OnAppDoneStartup(CodeBlocksEvent& event); +diff --git a/src/plugins/todo/todolistview.h b/src/plugins/todo/todolistview.h +index 2d9b3426f..523278682 100644 +--- a/src/plugins/todo/todolistview.h ++++ b/src/plugins/todo/todolistview.h +@@ -76,8 +76,8 @@ class ToDoListView : public wxEvtHandler, public ListCtrlLogger + { + public: + ToDoListView(const wxArrayString& titles, const wxArrayInt& widths, const wxArrayString& types); +- ~ToDoListView(); +- virtual wxWindow* CreateControl(wxWindow* parent); ++ ~ToDoListView() override; ++ wxWindow* CreateControl(wxWindow* parent) override; + void DestroyControls(bool control); + + // parse all the sources +diff --git a/src/plugins/todo/todosettingsdlg.h b/src/plugins/todo/todosettingsdlg.h +index c216b482f..c09851454 100644 +--- a/src/plugins/todo/todosettingsdlg.h ++++ b/src/plugins/todo/todosettingsdlg.h +@@ -14,12 +14,12 @@ class ToDoSettingsDlg : public cbConfigurationPanel + { + public: + ToDoSettingsDlg(wxWindow* parent); +- ~ToDoSettingsDlg(); ++ ~ToDoSettingsDlg() override; + +- virtual wxString GetTitle() const { return _("Todo list"); } +- virtual wxString GetBitmapBaseName() const { return _T("todo"); } +- virtual void OnApply(); +- virtual void OnCancel(){} ++ wxString GetTitle() const override { return _("Todo list"); } ++ wxString GetBitmapBaseName() const override { return _T("todo"); } ++ void OnApply() override; ++ void OnCancel() override {} + }; + + #endif // TODOSETTINGSDLG_H +diff --git a/src/src/app.cpp b/src/src/app.cpp +index 10f278ff3..9437c7169 100644 +--- a/src/src/app.cpp ++++ b/src/src/app.cpp +@@ -319,7 +319,7 @@ class cbMessageOutputNull : public wxMessageOutput + public: + + #if wxCHECK_VERSION(3, 0, 0) +- virtual void Output(const wxString &str); ++ virtual void Output(const wxString &str) override; + #else + #ifdef WX_ATTRIBUTE_PRINTF + virtual void Printf(const wxChar* format, ...) WX_ATTRIBUTE_PRINTF_2; +diff --git a/src/src/app.h b/src/src/app.h +index d9808a93f..4348b4688 100644 +--- a/src/src/app.h ++++ b/src/src/app.h +@@ -107,17 +107,17 @@ class cbSplashScreen; + class CodeBlocksApp : public wxApp + { + public: +- virtual bool OnInit(); +- virtual int OnExit(); +- virtual int OnRun(); ++ bool OnInit() override; ++ int OnExit() override; ++ int OnRun() override; + wxString GetAppPath() const; + int ParseCmdLine(MainFrame* handlerFrame, const wxString& CmdLine = wxEmptyString); + #if wxCHECK_VERSION(3,0,0) + void OnCloseBatchBuildWindow(wxCloseEvent& evt); + #endif // wxCHECK_VERSION + void OnAppActivate(wxActivateEvent& event); +- bool OnCmdLineParsed(wxCmdLineParser& parser); +- void OnFatalException(); ++ bool OnCmdLineParsed(wxCmdLineParser& parser) override; ++ void OnFatalException() override; + void LoadDelayedFiles(MainFrame* frame); // command line or DDE (if available) files + void SetAutoFile(wxString& file); // method to set m_AutoFile + void AttachDebugger(); +diff --git a/src/src/backtracedlg.h b/src/src/backtracedlg.h +index 7c0c12f61..9a7e88869 100644 +--- a/src/src/backtracedlg.h ++++ b/src/src/backtracedlg.h +@@ -21,10 +21,10 @@ class BacktraceDlg : public wxPanel, public cbBacktraceDlg + public: + BacktraceDlg(wxWindow* parent); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + +- void Reload(); +- void EnableWindow(bool enable); ++ void Reload() override; ++ void EnableWindow(bool enable) override; + private: + void OnListRightClick(wxListEvent& event); + void OnDoubleClick(wxListEvent& event); +diff --git a/src/src/batchbuild.h b/src/src/batchbuild.h +index b352d06fd..bb2ce5ac5 100644 +--- a/src/src/batchbuild.h ++++ b/src/src/batchbuild.h +@@ -23,7 +23,7 @@ class BatchLogWindow : public wxScrollingDialog + size.SetHeight(Manager::Get()->GetConfigManager(_T("message_manager"))->ReadInt(_T("/batch_build_log/height"), wxDefaultSize.GetHeight())); + SetSize(size); + } +- void EndModal(int retCode) ++ void EndModal(int retCode) override + { + // allowed to close? + // find compiler plugin +diff --git a/src/src/breakpointsdlg.h b/src/src/breakpointsdlg.h +index 37cc4b0ee..36efcb2e8 100644 +--- a/src/src/breakpointsdlg.h ++++ b/src/src/breakpointsdlg.h +@@ -26,15 +26,15 @@ class BreakpointsDlg : public wxPanel, public cbBreakpointsDlg + public: + BreakpointsDlg(); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + +- bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line); +- bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line); +- void RemoveAllBreakpoints(); +- void EditBreakpoint(const wxString& filename, int line); +- void EnableBreakpoint(const wxString& filename, int line, bool enable); ++ bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line) override; ++ bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line) override; ++ void RemoveAllBreakpoints() override; ++ void EditBreakpoint(const wxString& filename, int line) override; ++ void EnableBreakpoint(const wxString& filename, int line, bool enable) override; + +- void Reload(); ++ void Reload() override; + private: + + void OnRemove(wxCommandEvent& event); +diff --git a/src/src/compilersettingsdlg.h b/src/src/compilersettingsdlg.h +index 7927b842b..4d702175d 100644 +--- a/src/src/compilersettingsdlg.h ++++ b/src/src/compilersettingsdlg.h +@@ -15,8 +15,8 @@ class CompilerSettingsDlg : public wxScrollingDialog + { + public: + CompilerSettingsDlg(wxWindow* parent); +- virtual ~CompilerSettingsDlg(); +- virtual void EndModal(int retCode); ++ ~CompilerSettingsDlg() override; ++ void EndModal(int retCode) override; + protected: + void OnPageChanging(wxListbookEvent& event); + void OnPageChanged(wxListbookEvent& event); +diff --git a/src/src/cpuregistersdlg.h b/src/src/cpuregistersdlg.h +index 35e6db300..1aa261765 100644 +--- a/src/src/cpuregistersdlg.h ++++ b/src/src/cpuregistersdlg.h +@@ -16,11 +16,12 @@ class CPURegistersDlg : public wxPanel, public cbCPURegistersDlg + public: + CPURegistersDlg(wxWindow* parent); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + +- void Clear(); +- void SetRegisterValue(const wxString& reg_name, const wxString& hexValue, const wxString& interpreted); +- void EnableWindow(bool enable); ++ void Clear() override; ++ void SetRegisterValue(const wxString& reg_name, const wxString& hexValue, ++ const wxString& interpreted) override; ++ void EnableWindow(bool enable) override; + protected: + int RegisterIndex(const wxString& reg_name); + void OnRefresh(wxCommandEvent& event); +diff --git a/src/src/debugger_interface_creator.h b/src/src/debugger_interface_creator.h +index 232292647..5f51a9940 100644 +--- a/src/src/debugger_interface_creator.h ++++ b/src/src/debugger_interface_creator.h +@@ -17,31 +17,31 @@ class DebugInterfaceFactory : public cbDebugInterfaceFactory + ~DebugInterfaceFactory(); + + public: +- virtual cbBacktraceDlg* CreateBacktrace(); +- virtual void DeleteBacktrace(cbBacktraceDlg *dialog); ++ cbBacktraceDlg* CreateBacktrace() override; ++ void DeleteBacktrace(cbBacktraceDlg *dialog) override; + +- virtual cbBreakpointsDlg* CreateBreapoints(); +- virtual void DeleteBreakpoints(cbBreakpointsDlg *dialog); ++ cbBreakpointsDlg* CreateBreapoints() override; ++ void DeleteBreakpoints(cbBreakpointsDlg *dialog) override; + +- virtual cbCPURegistersDlg* CreateCPURegisters(); +- virtual void DeleteCPURegisters(cbCPURegistersDlg *dialog); ++ cbCPURegistersDlg* CreateCPURegisters() override; ++ void DeleteCPURegisters(cbCPURegistersDlg *dialog) override; + +- virtual cbDisassemblyDlg* CreateDisassembly(); +- virtual void DeleteDisassembly(cbDisassemblyDlg *dialog); ++ cbDisassemblyDlg* CreateDisassembly() override; ++ void DeleteDisassembly(cbDisassemblyDlg *dialog) override; + +- virtual cbExamineMemoryDlg* CreateMemory(); +- virtual void DeleteMemory(cbExamineMemoryDlg *dialog); ++ cbExamineMemoryDlg* CreateMemory() override; ++ void DeleteMemory(cbExamineMemoryDlg *dialog) override; + +- virtual cbThreadsDlg* CreateThreads(); +- virtual void DeleteThreads(cbThreadsDlg *dialog); ++ cbThreadsDlg* CreateThreads() override; ++ void DeleteThreads(cbThreadsDlg *dialog) override; + +- virtual cbWatchesDlg* CreateWatches(); +- virtual void DeleteWatches(cbWatchesDlg *dialog); ++ cbWatchesDlg* CreateWatches() override; ++ void DeleteWatches(cbWatchesDlg *dialog) override; + +- virtual bool ShowValueTooltip(const cb::shared_ptr &watch, const wxRect &rect); +- virtual void HideValueTooltip(); +- virtual bool IsValueTooltipShown(); +- virtual void UpdateValueTooltip(); ++ bool ShowValueTooltip(const cb::shared_ptr &watch, const wxRect &rect) override; ++ void HideValueTooltip() override; ++ bool IsValueTooltipShown() override; ++ void UpdateValueTooltip() override; + private: + void OnEditorDeactivate(CodeBlocksEvent &event); + private: +diff --git a/src/src/debuggermenu.h b/src/src/debuggermenu.h +index 68db401a4..2332ce2db 100644 +--- a/src/src/debuggermenu.h ++++ b/src/src/debuggermenu.h +@@ -21,13 +21,13 @@ class DebuggerMenuHandler : public wxEvtHandler, public cbDebuggerMenuHandler + void AppendWindowMenuItems(wxMenu &menu); + + public: // derived from cbDebuggerMenuHandler +- virtual void SetActiveDebugger(cbDebuggerPlugin *active); +- virtual void MarkActiveTargetAsValid(bool valid); +- virtual void RebuildMenus(); +- virtual void BuildContextMenu(wxMenu &menu, const wxString& word_at_caret, bool is_running); ++ void SetActiveDebugger(cbDebuggerPlugin *active) override; ++ void MarkActiveTargetAsValid(bool valid) override; ++ void RebuildMenus() override; ++ void BuildContextMenu(wxMenu &menu, const wxString& word_at_caret, bool is_running) override; + +- virtual bool RegisterWindowMenu(const wxString &name, const wxString &help, cbDebuggerWindowMenuItem *item); +- virtual void UnregisterWindowMenu(const wxString &name); ++ bool RegisterWindowMenu(const wxString &name, const wxString &help, cbDebuggerWindowMenuItem *item) override; ++ void UnregisterWindowMenu(const wxString &name) override; + private: + void OnUpdateUI(wxUpdateUIEvent& event); + void OnUpdateUIActive(wxUpdateUIEvent &event); +diff --git a/src/src/disassemblydlg.h b/src/src/disassemblydlg.h +index 8ef9b6582..2e74d53fd 100644 +--- a/src/src/disassemblydlg.h ++++ b/src/src/disassemblydlg.h +@@ -20,16 +20,16 @@ class DisassemblyDlg : public wxPanel, public cbDisassemblyDlg + public: + DisassemblyDlg(wxWindow* parent); + +- wxWindow* GetWindow() { return this; } +- +- void Clear(const cbStackFrame& frame); +- void AddAssemblerLine(uint64_t addr, const wxString& line); +- void AddSourceLine(int lineno, const wxString& line); +- bool SetActiveAddress(uint64_t addr); +- void CenterLine(int lineno); +- void CenterCurrentLine(); +- bool HasActiveAddr() { return m_HasActiveAddr; } +- void EnableWindow(bool enable); ++ wxWindow* GetWindow() override { return this; } ++ ++ void Clear(const cbStackFrame& frame) override; ++ void AddAssemblerLine(uint64_t addr, const wxString& line) override; ++ void AddSourceLine(int lineno, const wxString& line) override; ++ bool SetActiveAddress(uint64_t addr) override; ++ void CenterLine(int lineno) override; ++ void CenterCurrentLine() override; ++ bool HasActiveAddr() override { return m_HasActiveAddr; } ++ void EnableWindow(bool enable) override; + + protected: + void OnSave(wxCommandEvent& event); +diff --git a/src/src/editorconfigurationdlg.h b/src/src/editorconfigurationdlg.h +index 83fcac888..170f710ab 100644 +--- a/src/src/editorconfigurationdlg.h ++++ b/src/src/editorconfigurationdlg.h +@@ -48,7 +48,7 @@ class EditorConfigurationDlg : public wxScrollingDialog + void OnCaretStyle(wxCommandEvent& event); + void OnUpdateUIFontQuality(wxUpdateUIEvent& event); + +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + private: + void OnPageChanging(wxListbookEvent& event); + void OnPageChanged(wxListbookEvent& event); +diff --git a/src/src/environmentsettingsdlg.h b/src/src/environmentsettingsdlg.h +index 2e92e60a3..3a1b15784 100644 +--- a/src/src/environmentsettingsdlg.h ++++ b/src/src/environmentsettingsdlg.h +@@ -19,8 +19,8 @@ class EnvironmentSettingsDlg : public wxScrollingDialog, public cbConfigurationP + { + public: + EnvironmentSettingsDlg(wxWindow* parent, wxAuiDockArt* art); +- virtual ~EnvironmentSettingsDlg(); +- virtual void EndModal(int retCode); ++ ~EnvironmentSettingsDlg() override; ++ void EndModal(int retCode) override; + + public: + // From cbConfigurationPanelColoursInterface +diff --git a/src/src/examinememorydlg.h b/src/src/examinememorydlg.h +index d9793320b..051ea1f71 100644 +--- a/src/src/examinememorydlg.h ++++ b/src/src/examinememorydlg.h +@@ -16,19 +16,19 @@ class ExamineMemoryDlg : public wxPanel, public cbExamineMemoryDlg + public: + ExamineMemoryDlg(wxWindow* parent); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + + // used for Freeze()/Thaw() calls +- void Begin(); +- void End(); +- +- void Clear(); +- wxString GetBaseAddress(); +- void SetBaseAddress(const wxString &addr); +- int GetBytes(); +- void AddError(const wxString& err); +- void AddHexByte(const wxString& addr, const wxString& hexbyte); +- void EnableWindow(bool enable); ++ void Begin() override; ++ void End() override; ++ ++ void Clear() override; ++ wxString GetBaseAddress() override; ++ void SetBaseAddress(const wxString &addr) override; ++ int GetBytes() override; ++ void AddError(const wxString& err) override; ++ void AddHexByte(const wxString& addr, const wxString& hexbyte) override; ++ void EnableWindow(bool enable) override; + protected: + void OnGo(wxCommandEvent& event); + +diff --git a/src/src/notebookstyles.h b/src/src/notebookstyles.h +index 80ef2f693..1a4942847 100644 +--- a/src/src/notebookstyles.h ++++ b/src/src/notebookstyles.h +@@ -28,29 +28,29 @@ class NbStyleVC71 : public wxAuiDefaultTabArt + { + public: + NbStyleVC71(); +- wxAuiTabArt* Clone(); ++ wxAuiTabArt* Clone() override; + + void DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, + const wxRect& in_rect, int close_button_state, + wxRect* out_tab_rect, wxRect* out_button_rect, +- int* x_extent); ++ int* x_extent) override; + + int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, +- const wxSize& required_bmp_size); ++ const wxSize& required_bmp_size) override; + }; + + class NbStyleFF2 : public wxAuiDefaultTabArt + { + public: + NbStyleFF2(); +- wxAuiTabArt* Clone(); ++ wxAuiTabArt* Clone() override; + void DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, + const wxRect& in_rect, int close_button_state, + wxRect* out_tab_rect, wxRect* out_button_rect, +- int* x_extent); ++ int* x_extent) override; + + int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, +- const wxSize& required_bmp_size); ++ const wxSize& required_bmp_size) override; + }; + + #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +diff --git a/src/src/printdlg.h b/src/src/printdlg.h +index 8cb554c5f..5289a240e 100644 +--- a/src/src/printdlg.h ++++ b/src/src/printdlg.h +@@ -13,9 +13,9 @@ class PrintDialog : public wxScrollingDialog + { + public: + PrintDialog(wxWindow* parent); +- virtual ~PrintDialog(); ++ ~PrintDialog() override; + +- virtual void EndModal(int retCode); ++ void EndModal(int retCode) override; + + PrintScope GetPrintScope() const; + PrintColourMode GetPrintColourMode() const; +diff --git a/src/src/projectdepsdlg.h b/src/src/projectdepsdlg.h +index 2665cbbd6..f04dafe1b 100644 +--- a/src/src/projectdepsdlg.h ++++ b/src/src/projectdepsdlg.h +@@ -14,8 +14,8 @@ class ProjectDepsDlg : public wxScrollingDialog + { + public: + ProjectDepsDlg(wxWindow* parent, cbProject* sel = nullptr); +- virtual ~ProjectDepsDlg(); +- virtual void EndModal(int retCode); ++ ~ProjectDepsDlg() override; ++ void EndModal(int retCode) override; + protected: + void FillList(); + bool SaveList(); +diff --git a/src/src/projectmanagerui.h b/src/src/projectmanagerui.h +index 851708bfe..97e175c36 100644 +--- a/src/src/projectmanagerui.h ++++ b/src/src/projectmanagerui.h +@@ -20,43 +20,46 @@ class ProjectManagerUI : public wxEvtHandler, public cbProjectManagerUI + ProjectManagerUI(); + ~ProjectManagerUI(); + +- cbAuiNotebook* GetNotebook() { return m_pNotebook; } ++ cbAuiNotebook* GetNotebook() override { return m_pNotebook; } + + /** Retrieve a pointer to the project manager's tree (GUI). + * @return A pointer to a wxTreeCtrl window. + */ +- cbTreeCtrl* GetTree(){ return m_pTree; } ++ cbTreeCtrl* GetTree() override { return m_pTree; } + +- wxTreeItemId GetTreeSelection(); ++ wxTreeItemId GetTreeSelection() override; + +- void RebuildTree(); +- void FreezeTree(); +- void UnfreezeTree(bool force = false); ++ void RebuildTree() override; ++ void FreezeTree() override; ++ void UnfreezeTree(bool force = false) override; + + +- void UpdateActiveProject(cbProject* oldProject, cbProject* newProject, bool refresh); +- void RemoveProject(cbProject* project); +- void BeginLoadingWorkspace(); +- void CloseWorkspace(); +- void FinishLoadingProject(cbProject* project, bool newAddition, cb_unused FilesGroupsAndMasks* fgam); +- void FinishLoadingWorkspace(cbProject* activeProject, const wxString &workspaceTitle); ++ void UpdateActiveProject(cbProject* oldProject, cbProject* newProject, ++ bool refresh) override; ++ void RemoveProject(cbProject* project) override; ++ void BeginLoadingWorkspace() override; ++ void CloseWorkspace() override; ++ void FinishLoadingProject(cbProject* project, bool newAddition, ++ cb_unused FilesGroupsAndMasks* fgam) override; ++ void FinishLoadingWorkspace(cbProject* activeProject, ++ const wxString &workspaceTitle) override; + +- void ShowFileInTree(ProjectFile &projectFile); ++ void ShowFileInTree(ProjectFile &projectFile) override; + + void CreateMenu(wxMenuBar* menuBar); + +- bool QueryCloseAllProjects(); +- bool QueryCloseProject(cbProject* project, bool dontsavefiles); +- bool QueryCloseWorkspace(); ++ bool QueryCloseAllProjects() override; ++ bool QueryCloseProject(cbProject* project, bool dontsavefiles) override; ++ bool QueryCloseWorkspace() override; + +- int AskForBuildTargetIndex(cbProject* project); +- wxArrayInt AskForMultiBuildTargetIndex(cbProject* project); +- void ConfigureProjectDependencies(cbProject* base, wxWindow *parent); ++ int AskForBuildTargetIndex(cbProject* project) override; ++ wxArrayInt AskForMultiBuildTargetIndex(cbProject* project) override; ++ void ConfigureProjectDependencies(cbProject* base, wxWindow *parent) override; + void CheckForExternallyModifiedProjects(); + + private: + void InitPane(); +- void SwitchToProjectsPage(); ++ void SwitchToProjectsPage() override; + void ShowMenu(wxTreeItemId id, const wxPoint& pt); + void CreateMenuTreeProps(wxMenu* menu, bool popup); + +diff --git a/src/src/projectoptionsdlg.h b/src/src/projectoptionsdlg.h +index 3826cc809..01264d405 100644 +--- a/src/src/projectoptionsdlg.h ++++ b/src/src/projectoptionsdlg.h +@@ -23,9 +23,9 @@ class ProjectOptionsDlg : public wxScrollingDialog + // class constructor + ProjectOptionsDlg(wxWindow* parent, cbProject* project); + // class destructor +- ~ProjectOptionsDlg(); ++ ~ProjectOptionsDlg() override; + +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + void OnFileOptionsClick(wxCommandEvent& event); + void OnFileToggleMarkClick(wxCommandEvent& event); + void OnFileMarkOnClick(wxCommandEvent& event); +diff --git a/src/src/scriptingsettingsdlg.h b/src/src/scriptingsettingsdlg.h +index 66878dcad..527ff63e3 100644 +--- a/src/src/scriptingsettingsdlg.h ++++ b/src/src/scriptingsettingsdlg.h +@@ -41,9 +41,9 @@ class ScriptingSettingsDlg : public wxScrollingDialog + { + public: + ScriptingSettingsDlg(wxWindow* parent); +- ~ScriptingSettingsDlg(); ++ ~ScriptingSettingsDlg() override; + +- void EndModal(int retCode); ++ void EndModal(int retCode) override; + protected: + void FillScripts(); + void UpdateState(); +diff --git a/src/src/startherepage.h b/src/src/startherepage.h +index 8b9ef614f..4bc29a199 100644 +--- a/src/src/startherepage.h ++++ b/src/src/startherepage.h +@@ -23,10 +23,10 @@ class StartHerePage : public EditorBase + public: + StartHerePage(wxEvtHandler* owner, const RecentItemsList &projects, + const RecentItemsList &files, wxWindow* parent); +- virtual ~StartHerePage(); ++ ~StartHerePage() override; + + bool LinkClicked(const wxHtmlLinkInfo& link); +- virtual bool VisibleToTree() const { return false; } ++ bool VisibleToTree() const override { return false; } + void Reload(); + private: + void RegisterColours(); +diff --git a/src/src/switcherdlg.h b/src/src/switcherdlg.h +index b23e516c6..8020adac5 100644 +--- a/src/src/switcherdlg.h ++++ b/src/src/switcherdlg.h +@@ -235,7 +235,7 @@ class wxMultiColumnListCtrl: public wxControl + void OnEraseBackground(wxEraseEvent& event); + + // Overrides +- virtual wxSize DoGetBestSize() const ; ++ wxSize DoGetBestSize() const override; + + // Implementation + +diff --git a/src/src/threadsdlg.h b/src/src/threadsdlg.h +index 2cfa55122..31054c769 100644 +--- a/src/src/threadsdlg.h ++++ b/src/src/threadsdlg.h +@@ -18,10 +18,10 @@ class ThreadsDlg : public wxPanel, public cbThreadsDlg + public: + ThreadsDlg(wxWindow* parent); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + +- void Reload(); +- void EnableWindow(bool enable); ++ void Reload() override; ++ void EnableWindow(bool enable) override; + protected: + void OnListRightClick(wxListEvent& event); + void OnListDoubleClick(wxListEvent& event); +diff --git a/src/src/watchesdlg.h b/src/src/watchesdlg.h +index 6bf827910..2803f4b3b 100644 +--- a/src/src/watchesdlg.h ++++ b/src/src/watchesdlg.h +@@ -24,7 +24,7 @@ class WatchesDlg : public wxPanel, public cbWatchesDlg + public: + WatchesDlg(); + +- wxWindow* GetWindow() { return this; } ++ wxWindow* GetWindow() override { return this; } + + void AddWatch(cb::shared_ptr watch) override; + void AddSpecialWatch(cb::shared_ptr watch, bool readonly) override; +@@ -93,7 +93,7 @@ class ValueTooltip : + protected: + virtual void OnDismiss(); + private: +- void Fit(); ++ void Fit() override; + void ClearWatch(); + private: + diff --git a/programming/environment/codeblocks/files/8035dfdff321754819f79e3165401aa59bd8c7f7.patch b/programming/environment/codeblocks/files/8035dfdff321754819f79e3165401aa59bd8c7f7.patch new file mode 100644 index 0000000000..88b52f5834 --- /dev/null +++ b/programming/environment/codeblocks/files/8035dfdff321754819f79e3165401aa59bd8c7f7.patch @@ -0,0 +1,724 @@ +From 8035dfdff321754819f79e3165401aa59bd8c7f7 Mon Sep 17 00:00:00 2001 +From: wh11204 +Date: Tue, 14 Dec 2021 08:57:56 +0000 +Subject: [PATCH] - Remove code for wxWidgets < 3.0.0 (part I). Includes: + src\include\cbart_provider.h src\include\cbauibook.h + src\include\globals.h src\include\logmanager.h + src\include\scrollingdialog.h src\plugins\debuggergdb\debuggergdb.cpp + src\plugins\debuggergdb\gdb_commands.h src\sdk\base64.cpp + src\sdk\cbauibook.cpp src\sdk\crc32.cpp src\sdk\editorcolourset.cpp + src\sdk\editorlexerloader.cpp + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12578 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/include/cbart_provider.h | 18 +-- + src/include/cbauibook.h | 41 ------ + src/include/globals.h | 4 - + src/include/logmanager.h | 4 +- + src/include/scrollingdialog.h | 184 ------------------------ + src/plugins/debuggergdb/debuggergdb.cpp | 10 -- + src/plugins/debuggergdb/gdb_commands.h | 4 - + src/sdk/base64.cpp | 22 --- + src/sdk/cbauibook.cpp | 84 +---------- + src/sdk/crc32.cpp | 4 - + src/sdk/editorcolourset.cpp | 4 - + src/sdk/editorlexerloader.cpp | 4 - + 12 files changed, 10 insertions(+), 373 deletions(-) + +diff --git a/src/include/cbart_provider.h b/src/include/cbart_provider.h +index ed04be85f..272b6d6b5 100644 +--- a/src/include/cbart_provider.h ++++ b/src/include/cbart_provider.h +@@ -34,17 +34,13 @@ class DLLIMPORT cbArtProvider : public wxArtProvider + wxString m_prefix; + + struct StringHash +- { +- size_t operator()(const wxString& s) const +- { +-#if wxCHECK_VERSION(3, 0, 0) +- return std::hash()(s.ToStdWstring()); +-#else +- return std::hash()(s.wc_str()); +-#endif // wxCHECK_VERSION +- } +- }; +- ++ { ++ size_t operator()(const wxString& s) const ++ { ++ return std::hash()(s.ToStdWstring()); ++ } ++ }; ++ + struct Data + { + Data() : hasFormatting(false) {} +diff --git a/src/include/cbauibook.h b/src/include/cbauibook.h +index d0bf79a3a..4e90a65e5 100644 +--- a/src/include/cbauibook.h ++++ b/src/include/cbauibook.h +@@ -78,25 +78,6 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook + * \return int the visible position + */ + int GetTabPositionFromIndex(int index); +-#if !wxCHECK_VERSION(3, 0, 0) +- /** \brief Set a tab tooltip +- * +- * Sets the tooltip for the tab belonging to win. +- * Starts the dwell timer and the stopwatch if it is not already done. +- * \param idx the index of the pane that belongs to the tab +- * \param text the tooltip +- * @remarks Uses the name of the wxWindow to store the message +- * \return bool true if tooltip was updated +- */ +- bool SetPageToolTip(size_t idx, const wxString & text ); +- /** \brief Get a tab tooltip +- * +- * Returns the tooltip for the tab label of the page. +- * @remarks Uses the name of the wxWindow to store the message +- * \return wxString the tooltip of the page with the given index +- */ +- wxString GetPageToolTip(size_t idx ); +-#endif // !wxCHECK_VERSION(3, 0, 0) + /** \brief Minmize free horizontal page + * + * Moves the active tab of all tabCtrl's to the rightmost place, +@@ -205,25 +186,12 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook + * \param event + * @remarks Works not reliable, due to OS/wxWidgets-limitations + */ +-#if wxCHECK_VERSION(3, 0, 0) + void OnNavigationKeyNotebook(wxNavigationKeyEvent& event); +-#else +- void OnNavigationKey(wxNavigationKeyEvent& event); +-#endif // wxCHECK_VERSION(3, 0, 0) + /** \brief OnIdle + * + * \param event unused + */ + void OnIdle(cb_unused wxIdleEvent& event); +-#if !wxCHECK_VERSION(3, 0, 0) +- /** \brief Catch mousemotion-events +- * +- * Needed for the backport of tabtooltip from wx2.9 +- * +- * \param event holds the wxTabCtrl, that sends the event +- */ +- void OnMotion(wxMouseEvent& event); +-#endif // !wxCHECK_VERSION(3, 0, 0) + /** \brief Catch doubleclick-events from wxTabCtrl + * + * Sends cbEVT_CBAUIBOOK_LEFT_DCLICK, if doubleclick was on a tab, +@@ -318,15 +286,6 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook + */ + long m_LastId; + #endif // __WXMSW__ +-#if !wxCHECK_VERSION(3, 0, 0) +- /** \brief If false, tooltips are not shown +- * +- * Needed to only show tooltips, if they have been explicitely set. +- * We store the tooltip-text in the tabs name, without this flag, we +- * get the wxWidgets default-names as tooltips. +- */ +- bool m_HasToolTip; +-#endif // !wxCHECK_VERSION(3, 0, 0) + /** \brief If true, zoom for all editors + * is set in next OnIdle-call + */ +diff --git a/src/include/globals.h b/src/include/globals.h +index c2924cb7f..f5086b643 100644 +--- a/src/include/globals.h ++++ b/src/include/globals.h +@@ -441,11 +441,7 @@ extern DLLIMPORT wxArrayInt cbGetMultiChoiceDialog(const wxString& message, cons + const wxSize& size = wxSize(300, 300), + const wxArrayInt& initialSelection = wxArrayInt()); + +-#if wxCHECK_VERSION(3, 0, 0) + extern DLLIMPORT const char *cbGetTextFromUserPromptStr; +-#else +-extern DLLIMPORT const wxChar *cbGetTextFromUserPromptStr; +-#endif // wxCHECK_VERSION + + extern DLLIMPORT wxString cbGetTextFromUser(const wxString &message, + const wxString &caption = cbGetTextFromUserPromptStr, +diff --git a/src/include/logmanager.h b/src/include/logmanager.h +index 704698f27..29af5fe24 100644 +--- a/src/include/logmanager.h ++++ b/src/include/logmanager.h +@@ -21,7 +21,7 @@ + { + va_list arg_list; + va_start(arg_list, msg); +-#if wxCHECK_VERSION(3, 0, 0) && wxUSE_UNICODE ++#if wxUSE_UNICODE + // in wx >= 3.0 unicode-build (default) we need the %ls here, or the strings get + // cut after the first character + ::temp_string = msg; +@@ -38,7 +38,7 @@ + { + va_list arg_list; + va_start(arg_list, msg); +-#if wxCHECK_VERSION(2,9,0) && wxUSE_UNICODE ++#if wxUSE_UNICODE + // in wx >= 2.9 unicode-build (default) we need the %ls here, or the strings get + // cut after the first character + ::temp_string = msg; +diff --git a/src/include/scrollingdialog.h b/src/include/scrollingdialog.h +index 06f3a1b60..17173f970 100644 +--- a/src/include/scrollingdialog.h ++++ b/src/include/scrollingdialog.h +@@ -30,151 +30,18 @@ class wxBoxSizer; + class wxButton; + class wxScrolledWindow; + +-#if !wxCHECK_VERSION(3, 0, 0) +-class wxDialogLayoutAdapter: public wxObject +-{ +- DECLARE_CLASS(wxDialogLayoutAdapter) +-public: +- wxDialogLayoutAdapter() {} +- +- /// Override this function to indicate that adaptation should be done +- virtual bool CanDoLayoutAdaptation(wxDialogHelper* dialog) = 0; +- +- /// Override this function to do the adaptation +- virtual bool DoLayoutAdaptation(wxDialogHelper* dialog) = 0; +-}; +- +-/*! +- * Standard adapter. Does scrolling adaptation for paged and regular dialogs. +- * +- */ +- +-class wxStandardDialogLayoutAdapter: public wxDialogLayoutAdapter +-{ +- DECLARE_CLASS(wxStandardDialogLayoutAdapter) +-public: +- wxStandardDialogLayoutAdapter() {} +- +-// Overrides +- +- /// Indicate that adaptation should be done +- bool CanDoLayoutAdaptation(wxDialogHelper* dialog) override; +- +- /// Do layout adaptation +- bool DoLayoutAdaptation(wxDialogHelper* dialog) override; +- +-// Implementation +- +- /// Find a standard or horizontal box sizer +- virtual wxSizer* FindButtonSizer(bool stdButtonSizer, wxDialogHelper* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder = 0); +- +- /// Check if this sizer contains standard buttons, and so can be repositioned in the dialog +- virtual bool IsOrdinaryButtonSizer(wxDialogHelper* dialog, wxBoxSizer* sizer); +- +- /// Check if this is a standard button +- virtual bool IsStandardButton(wxDialogHelper* dialog, wxButton* button); +- +- /// Find 'loose' main buttons in the existing layout and add them to the standard dialog sizer +- virtual bool FindLooseButtons(wxDialogHelper* dialog, wxStdDialogButtonSizer* buttonSizer, wxSizer* sizer, int& count); +- +- /// Reparent the controls to the scrolled window, except those in buttonSizer +- virtual void ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL); +- +- /// A function to fit the dialog around its contents, and then adjust for screen size. +- /// If scrolled windows are passed, scrolling is enabled in the required orientation(s). +- virtual bool FitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow); +- virtual bool FitWithScrolling(wxDialog* dialog, wxWindowList& windows); +- +- /// Find whether scrolling will be necessary for the dialog, returning wxVERTICAL, wxHORIZONTAL or both +- virtual int MustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize); +-}; +- +-/*! +- * A base class for dialogs that have adaptation. In wxWidgets 3.0, this will not +- * be needed since the new functionality will be implemented in wxDialogBase. +- */ +- +-class wxDialogHelper +-{ +-public: +- +- wxDialogHelper(wxDialog* dialog = NULL) { Init(); m_dialog = dialog; } +- virtual ~wxDialogHelper() {} +- +- void Init(); +- +- void SetDialog(wxDialog* dialog) { m_dialog = dialog; } +- wxDialog* GetDialog() const { return m_dialog; } +- +- /// Do the adaptation +- virtual bool DoLayoutAdaptation(); +- +- /// Can we do the adaptation? +- virtual bool CanDoLayoutAdaptation(); +- +- /// Returns a content window if there is one +- virtual wxWindow* GetContentWindow() const { return NULL; } +- +- /// Add an id to the list of custom button identifiers that should be in the button sizer +- void AddButtonId(wxWindowID id) { m_buttonIds.Add((int) id); } +- wxArrayInt& GetButtonIds() { return m_buttonIds; } +- +- /// Is this id in the custom button id array? +- bool IsUserButtonId(wxWindowID id) { return (m_buttonIds.Index((int) id) != wxNOT_FOUND); } +- +-// ACCESSORS +- +- /// Level of adaptation, from none (Level 0) to full (Level 3). To disable adaptation, +- /// set level 0, for example in your dialog constructor. You might +- /// do this if you know that you are displaying on a large screen and you don't want the +- /// dialog changed. +- void SetLayoutAdaptationLevel(int level) { m_layoutAdaptationLevel = level; } +- +- /// Get level of adaptation +- int GetLayoutAdaptationLevel() const { return m_layoutAdaptationLevel; } +- +- /// Returns true if the adaptation has been done +- void SetLayoutAdaptationDone(bool adaptationDone) { m_layoutLayoutAdaptationDone = adaptationDone; } +- bool GetLayoutAdaptationDone() const { return m_layoutLayoutAdaptationDone; } +- +- /// Set layout adapter class, returning old adapter +- static wxDialogLayoutAdapter* SetLayoutAdapter(wxDialogLayoutAdapter* adapter); +- static wxDialogLayoutAdapter* GetLayoutAdapter() { return sm_layoutAdapter; } +- +- /// Global switch for layout adaptation +- static bool GetLayoutAdaptation() { return sm_layoutAdaptation; } +- static void SetLayoutAdaptation(bool enable) { sm_layoutAdaptation = enable; } +- +-protected: +- +- wxDialog* m_dialog; +- bool m_layoutLayoutAdaptationDone; +- wxArrayInt m_buttonIds; +- int m_layoutAdaptationLevel; +- static wxDialogLayoutAdapter* sm_layoutAdapter; +- static bool sm_layoutAdaptation; +-}; +-#endif //#if !wxCHECK_VERSION(3, 0, 0) +- + /*! + * A class that makes its content scroll if necessary + */ + + class DLLIMPORT wxScrollingDialog: public wxDialog +-#if !wxCHECK_VERSION(3, 0, 0) +- , public wxDialogHelper +-#endif + { + DECLARE_CLASS(wxScrollingDialog) + public: + + wxScrollingDialog() + { +-#if !wxCHECK_VERSION(3, 0, 0) +- Init(); +-#else + SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED); +-#endif + } + wxScrollingDialog(wxWindow *parent, + int id = wxID_ANY, +@@ -184,30 +51,9 @@ class DLLIMPORT wxScrollingDialog: public wxDialog + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = _("dialogBox")) + { +-#if !wxCHECK_VERSION(3, 0, 0) +- Init(); +-#else + SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED); +-#endif + Create(parent, id, title, pos, size, style, name); + } +-#if !wxCHECK_VERSION(3, 0, 0) +- bool Create(wxWindow *parent, +- int id = wxID_ANY, +- const wxString& title = wxEmptyString, +- const wxPoint& pos = wxDefaultPosition, +- const wxSize& size = wxDefaultSize, +- long style = wxDEFAULT_DIALOG_STYLE, +- const wxString& name = _("dialogBox")); +- +- void Init(); +- +- /// Override Show to rejig the control and sizer hierarchy if necessary +- bool Show(bool show = true) override; +- +- /// Override ShowModal to rejig the control and sizer hierarchy if necessary +- int ShowModal() override; +-#endif + }; + + /*! +@@ -215,19 +61,11 @@ class DLLIMPORT wxScrollingDialog: public wxDialog + */ + + class wxScrollingPropertySheetDialog : public wxPropertySheetDialog +-#if !wxCHECK_VERSION(3, 0, 0) +- , public wxDialogHelper +-#endif +- + { + public: + wxScrollingPropertySheetDialog() : wxPropertySheetDialog() + { +-#if !wxCHECK_VERSION(3, 0, 0) +- Init(); +-#else + SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED); +-#endif + } + + wxScrollingPropertySheetDialog(wxWindow* parent, wxWindowID id, +@@ -237,32 +75,10 @@ class wxScrollingPropertySheetDialog : public wxPropertySheetDialog + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { +-#if !wxCHECK_VERSION(3, 0, 0) +- Init(); +-#else + SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED); +-#endif + Create(parent, id, title, pos, sz, style, name); + } + +-#if !wxCHECK_VERSION(3, 0, 0) +-//// Accessors +- +- /// Returns the content window +- wxWindow* GetContentWindow() const override; +- +-/// Operations +- +- /// Override Show to rejig the control and sizer hierarchy if necessary +- bool Show(bool show = true) override; +- +- /// Override ShowModal to rejig the control and sizer hierarchy if necessary +- int ShowModal() override; +- +-private: +- void Init(); +-#endif +- + protected: + + DECLARE_DYNAMIC_CLASS(wxScrollingPropertySheetDialog) +diff --git a/src/plugins/debuggergdb/debuggergdb.cpp b/src/plugins/debuggergdb/debuggergdb.cpp +index 4d1dabba5..845de0bb3 100644 +--- a/src/plugins/debuggergdb/debuggergdb.cpp ++++ b/src/plugins/debuggergdb/debuggergdb.cpp +@@ -554,7 +554,6 @@ int DebuggerGDB::LaunchProcessWithShell(const wxString &cmd, wxProcess *process, + const wxString &cwd) + { + wxString shell = GetShellString(); +-#if wxCHECK_VERSION(3, 0, 0) + wxExecuteEnv execEnv; + execEnv.cwd = cwd; + // Read the current environment variables and then make changes to them. +@@ -565,15 +564,6 @@ int DebuggerGDB::LaunchProcessWithShell(const wxString &cmd, wxProcess *process, + execEnv.env["SHELL"] = shell; + } + return wxExecute(cmd, wxEXEC_ASYNC, process, &execEnv); +-#else +- if (!shell.empty()) +- { +- Log(wxString::Format(wxT("Setting SHELL to '%s'"), shell.wx_str())); +- wxSetEnv(wxT("SHELL"), shell); +- } +- (void)cwd; +- return wxExecute(cmd, wxEXEC_ASYNC, process); +-#endif // !wxCHECK_VERSION(3, 0, 0) + } + + int DebuggerGDB::LaunchProcess(const wxString& cmd, const wxString& cwd) +diff --git a/src/plugins/debuggergdb/gdb_commands.h b/src/plugins/debuggergdb/gdb_commands.h +index cd564b29c..5a77fbb5e 100644 +--- a/src/plugins/debuggergdb/gdb_commands.h ++++ b/src/plugins/debuggergdb/gdb_commands.h +@@ -63,11 +63,7 @@ namespace + + while (count < sizeof(T) * 2) // be sure we don't keep adding more to ret + { +- #if wxCHECK_VERSION(3, 0, 0) + switch (str[pos].GetValue()) +- #else +- switch (str[pos]) +- #endif + { + case _T('0'): + case _T('1'): +diff --git a/src/sdk/base64.cpp b/src/sdk/base64.cpp +index 3837cb55f..c4593f17f 100644 +--- a/src/sdk/base64.cpp ++++ b/src/sdk/base64.cpp +@@ -22,9 +22,7 @@ + + #include "base64.h" + +-#if wxCHECK_VERSION(3, 0, 0) + #include +-#endif + + const wxChar fillchar = '='; + +@@ -105,29 +103,17 @@ wxString wxBase64::Decode(const wxString& data) + c1 = cvt.Find(data[i]); + wxASSERT_MSG(c1 >= 0, _T("invalid base64 input")); + c = (c << 2) | ((c1 >> 4) & 0x3); +- #if wxCHECK_VERSION(3, 0, 0) + ret.Append(static_cast(c), 1); +- #else +- ret.Append(c, 1); +- #endif + if (++i < len) + { + c = data[i]; + if ((char)fillchar == c) + break; + +- #if wxCHECK_VERSION(3, 0, 0) + c = cvt.Find(static_cast(c)); +- #else +- c = cvt.Find(c); +- #endif + wxASSERT_MSG(c >= 0, _T("invalid base64 input")); + c1 = ((c1 << 4) & 0xf0) | ((c >> 2) & 0xf); +- #if wxCHECK_VERSION(3, 0, 0) + ret.Append(static_cast(c1), 1); +- #else +- ret.Append(c1, 1); +- #endif + } + + if (++i < len) +@@ -136,18 +122,10 @@ wxString wxBase64::Decode(const wxString& data) + if ((char)fillchar == c1) + break; + +- #if wxCHECK_VERSION(3, 0, 0) + c1 = cvt.Find(static_cast(c1)); +- #else +- c1 = cvt.Find(c1); +- #endif + wxASSERT_MSG(c1 >= 0, _T("invalid base64 input")); + c = ((c << 6) & 0xc0) | c1; +- #if wxCHECK_VERSION(3, 0, 0) + ret.Append(static_cast(c), 1); +- #else +- ret.Append(c, 1); +- #endif + } + } + +diff --git a/src/sdk/cbauibook.cpp b/src/sdk/cbauibook.cpp +index b1841b669..ae4776a3d 100644 +--- a/src/sdk/cbauibook.cpp ++++ b/src/sdk/cbauibook.cpp +@@ -37,11 +37,7 @@ int cbAuiNotebook::s_moveDirection = 1; + + + BEGIN_EVENT_TABLE(cbAuiNotebook, wxAuiNotebook) +-#if wxCHECK_VERSION(3, 0, 0) + EVT_NAVIGATION_KEY(cbAuiNotebook::OnNavigationKeyNotebook) +-#else +- EVT_NAVIGATION_KEY(cbAuiNotebook::OnNavigationKey) +-#endif + EVT_IDLE(cbAuiNotebook::OnIdle) + EVT_AUINOTEBOOK_DRAG_DONE(wxID_ANY, cbAuiNotebook::OnDragDone) + END_EVENT_TABLE() +@@ -51,9 +47,6 @@ cbAuiNotebook::cbAuiNotebook(wxWindow* pParent, wxWindowID id, const wxPoint& po + #ifdef __WXMSW__ + m_LastSelected(wxNOT_FOUND), + m_LastId(0), +-#endif +-#if !wxCHECK_VERSION(3, 0, 0) +- m_HasToolTip(false), + #endif + m_SetZoomOnIdle(false), + m_MinimizeFreeSpaceOnIdle(false), +@@ -64,7 +57,7 @@ cbAuiNotebook::cbAuiNotebook(wxWindow* pParent, wxWindowID id, const wxPoint& po + m_mgr.SetFlags((m_mgr.GetFlags() | wxAUI_MGR_VENETIAN_BLINDS_HINT) & ~wxAUI_MGR_TRANSPARENT_HINT); + #endif // #ifdef __WXGTK__ + ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("app")); +-#if defined __WXMSW__ && wxCHECK_VERSION(3, 0, 0) ++#if defined __WXMSW__ + wxToolTip::SetMaxWidth(-1); + #endif + s_AllowMousewheel = cfg->ReadBool(_T("/environment/tabs_use_mousewheel"),true); +@@ -152,10 +145,6 @@ void cbAuiNotebook::ResetTabCtrlEvents() + { + for (size_t i = 0; i < m_TabCtrls.GetCount(); ++i) + { +-#if !wxCHECK_VERSION(3, 0, 0) +- m_TabCtrls[i]->Disconnect(wxEVT_MOTION, wxMouseEventHandler(cbAuiNotebook::OnMotion)); +- m_TabCtrls[i]->Connect(wxEVT_MOTION , wxMouseEventHandler(cbAuiNotebook::OnMotion)); +-#endif + m_TabCtrls[i]->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(cbAuiNotebook::OnTabCtrlDblClick)); + m_TabCtrls[i]->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(cbAuiNotebook::OnTabCtrlDblClick)); + m_TabCtrls[i]->Disconnect(wxEVT_SIZE, wxSizeEventHandler(cbAuiNotebook::OnResize)); +@@ -427,57 +416,6 @@ void cbAuiNotebook::OnResize(wxSizeEvent& event) + event.Skip(); + } + +-#if !wxCHECK_VERSION(3, 0, 0) +-void cbAuiNotebook::OnMotion(wxMouseEvent& event) +-{ +- event.Skip(); +- wxAuiTabCtrl* tabCtrl = (wxAuiTabCtrl*)event.GetEventObject(); +- if (!tabCtrl) +- return; +- cbAuiNotebook* nb = (cbAuiNotebook*)tabCtrl->GetParent(); +- if (!nb || !nb->m_HasToolTip) +- return; +- +- wxWindow* win = nullptr; +- if (event.Moving() && tabCtrl->TabHitTest(event.m_x, event.m_y, &win)) +- { +- if (!win) +- { +- tabCtrl->UnsetToolTip(); +- return; +- } +- wxString text(win->GetName()); +- // If the text changes, set it else, keep old, to avoid +- // 'moving tooltip' effect +- wxToolTip* tooltip = tabCtrl->GetToolTip(); +- if (!tooltip || tooltip->GetTip() != text) +- tabCtrl->SetToolTip(text); +- } +- else +- tabCtrl->UnsetToolTip(); +-} +- +-bool cbAuiNotebook::SetPageToolTip(size_t idx, const wxString & text) +-{ +- if (!m_HasToolTip) +- UpdateTabControlsArray(); +- +- m_HasToolTip = true; +- wxWindow* win = GetPage(idx); +- if (win && win->GetName() != text) +- win->SetName(text); +- else +- return false; +- return true; +-} +-wxString cbAuiNotebook::GetPageToolTip(size_t idx) +-{ +- wxWindow* win = GetPage(idx); +- if (win) +- return win->GetName(); +- return wxEmptyString; +-} +-#endif + void cbAuiNotebook::MinimizeFreeSpace() + { + if (GetPageCount() < 2) +@@ -657,22 +595,14 @@ void cbAuiNotebook::AdvanceSelection(bool forward) + } + } + +-#if wxCHECK_VERSION(3, 0, 0) + void cbAuiNotebook::OnNavigationKeyNotebook(wxNavigationKeyEvent& event) +-#else +-void cbAuiNotebook::OnNavigationKey(wxNavigationKeyEvent& event) +-#endif + { + // if we change window, we call our own AdvanceSelection + if ( event.IsWindowChange() ) + AdvanceSelection(event.GetDirection()); + else // otherwise we call the event-handler from the parent-class + { +-#if wxCHECK_VERSION(3, 0, 0) + wxAuiNotebook::OnNavigationKeyNotebook(event); +-#else +- wxAuiNotebook::OnNavigationKey(event); +-#endif + } + } + +@@ -726,11 +656,7 @@ wxString cbAuiNotebook::SavePerspective(const wxString projectTitle) + if (!tabsTmp.empty()) + tabsTmp += wxT(","); + +-#if wxCHECK_VERSION(3, 0, 0) + if ((int)page_idx == m_curPage) +-#else +- if ((int)page_idx == m_curpage) +-#endif + tabsTmp += wxT("*"); + else if ((int)p == tabCtrl->GetActivePage()) + tabsTmp += wxT("+"); +@@ -886,11 +812,7 @@ bool cbAuiNotebook::LoadPerspective(const wxString& layout, bool mergeLayouts) + wxString pane_name = tab_part.BeforeFirst(wxT('=')); + + // create a new tab frame +-#if wxCHECK_VERSION(3, 0, 0) + m_curPage = -1; +-#else +- m_curpage = -1; +-#endif + + // Get list of tab id's and move them to pane + wxString tab_list = tab_part.AfterFirst(wxT('=')); +@@ -1004,11 +926,7 @@ bool cbAuiNotebook::LoadPerspective(const wxString& layout, bool mergeLayouts) + RemoveEmptyTabFrames(); + + // Force refresh of selection +-#if wxCHECK_VERSION(3, 0, 0) + m_curPage = -1; +-#else +- m_curpage = -1; +-#endif + SetSelection(sel_page); + + UpdateTabControlsArray(); +diff --git a/src/sdk/crc32.cpp b/src/sdk/crc32.cpp +index 7b387877d..62024d3c0 100644 +--- a/src/sdk/crc32.cpp ++++ b/src/sdk/crc32.cpp +@@ -78,11 +78,7 @@ wxUint32 wxCrc32::FromString(const wxString& text) + // Calculate the checksum + crc = 0xFFFFFFFFUL; + while (text[i]) +- #if wxCHECK_VERSION(3, 0, 0) + { crc = (crc>>8) ^ crc_table[ (crc^(text[i++].GetValue())) & 0xFF ]; } +- #else +- { crc = (crc>>8) ^ crc_table[ (crc^(text[i++])) & 0xFF ]; } +- #endif + + crc ^= 0xFFFFFFFFUL ; + } +diff --git a/src/sdk/editorcolourset.cpp b/src/sdk/editorcolourset.cpp +index e39eb412a..483d6a0e8 100644 +--- a/src/sdk/editorcolourset.cpp ++++ b/src/sdk/editorcolourset.cpp +@@ -835,11 +835,7 @@ void EditorColourSet::SetKeywords(HighlightLanguage lang, int idx, const wxStrin + wxString tmp(_T(' '), keywords.length()); // faster than using Alloc() + + const wxChar *src = keywords.c_str(); +- #if wxCHECK_VERSION(3, 0, 0) + wxStringCharType *dst = const_cast(tmp.wx_str()); +- #else +- wxChar *dst = (wxChar *) tmp.c_str(); +- #endif + wxChar c; + size_t len = 0; + +diff --git a/src/sdk/editorlexerloader.cpp b/src/sdk/editorlexerloader.cpp +index ee291b734..85e4d7db8 100644 +--- a/src/sdk/editorlexerloader.cpp ++++ b/src/sdk/editorlexerloader.cpp +@@ -229,11 +229,7 @@ void EditorLexerLoader::DoSingleKeywordNode(HighlightLanguage language, TiXmlEle + wxString value(keywords->Attribute("value"), wxConvUTF8); + regex.Replace(&value, _T(" ")); + +- #if wxCHECK_VERSION(3, 0, 0) + m_pTarget->SetKeywords(language, keyidx, value ); +- #else +- m_pTarget->SetKeywords(language, keyidx, wxString ( value, wxConvUTF8 ) ); +- #endif + } + + keywords = keywords->NextSiblingElement(nodename.mb_str()); diff --git a/programming/environment/codeblocks/files/9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch b/programming/environment/codeblocks/files/9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch new file mode 100644 index 0000000000..33de6a15b6 --- /dev/null +++ b/programming/environment/codeblocks/files/9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch @@ -0,0 +1,462 @@ +From 9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c Mon Sep 17 00:00:00 2001 +From: wh11204 +Date: Tue, 14 Dec 2021 09:27:57 +0000 +Subject: [PATCH] - Remove code for wxWidgets < 3.0.0 (part II). Includes: + src/sdk/cbeditor.cpp src/sdk/compiler.cpp src/sdk/configmanager.cpp + src/sdk/globals.cpp src/sdk/incremental_select_helper.cpp + src/sdk/newfromtemplatedlg.cpp src/sdk/pluginsconfigurationdlg.cpp + src/sdk/printing_types.cpp src/sdk/scripting/bindings/sc_globals.cpp + src/sdk/toolsmanager.cpp src/sdk/uservarmanager.cpp src/sdk/xtra_res.cpp + src/src/app.cpp + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12579 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/sdk/cbeditor.cpp | 8 ++--- + src/sdk/compiler.cpp | 14 ++------- + src/sdk/configmanager.cpp | 37 +---------------------- + src/sdk/globals.cpp | 31 ------------------- + src/sdk/incremental_select_helper.cpp | 4 --- + src/sdk/newfromtemplatedlg.cpp | 4 --- + src/sdk/pluginsconfigurationdlg.cpp | 4 --- + src/sdk/printing_types.cpp | 8 ----- + src/sdk/scripting/bindings/sc_globals.cpp | 8 ----- + src/sdk/toolsmanager.cpp | 4 --- + src/sdk/uservarmanager.cpp | 6 ---- + src/sdk/xtra_res.cpp | 19 ------------ + src/src/app.cpp | 36 +--------------------- + 13 files changed, 9 insertions(+), 174 deletions(-) + +diff --git a/src/sdk/cbeditor.cpp b/src/sdk/cbeditor.cpp +index e0d704bc6..f63f0aca7 100644 +--- a/src/sdk/cbeditor.cpp ++++ b/src/sdk/cbeditor.cpp +@@ -1223,13 +1223,13 @@ void cbEditor::Split(cbEditor::SplitType split) + m_pControl2->SetDocPointer(m_pControl->GetDocPointer()); + + // on wxGTK > 2.9 we need to thaw before reparent and refreeze the editor here or the whole app stays frozen +- #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) ++ #if defined ( __WXGTK__ ) + Thaw(); + #endif + // parent both controls under the splitter + m_pControl->Reparent(m_pSplitter); + m_pControl2->Reparent(m_pSplitter); +- #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) ++ #if defined ( __WXGTK__ ) + Freeze(); + #endif + +@@ -1289,12 +1289,12 @@ void cbEditor::Unsplit() + m_pSizer->Detach(m_pSplitter); + + // on wxGTK > 2.9 we need to thaw before reparent and refreeze the editor here or the whole app stays frozen +- #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) ++ #if defined ( __WXGTK__ ) + Thaw(); + #endif + // parent the left control under this + m_pControl->Reparent(this); +- #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) ++ #if defined ( __WXGTK__ ) + Freeze(); + #endif + // add it in the sizer +diff --git a/src/sdk/compiler.cpp b/src/sdk/compiler.cpp +index 6eb2ff975..ab79812e3 100644 +--- a/src/sdk/compiler.cpp ++++ b/src/sdk/compiler.cpp +@@ -1537,11 +1537,7 @@ long Compiler::Execute(const wxString &cmd, wxArrayString &output) + // Loads the wxArrayString with the task output (returned in a wxInputStream) + wxInputStream *inputStream = process.GetInputStream(); + wxTextInputStream text(*inputStream); +-#if wxCHECK_VERSION(3, 0, 0) + while (!text.GetInputStream().Eof()) +-#else +- while (!inputStream->Eof()) +-#endif + { + output.Add(text.ReadLine()); + } +@@ -1556,13 +1552,9 @@ long Compiler::Execute(const wxString &cmd, wxArrayString &output) + { + wxLogNull logNo; // do not warn if execution fails + int flags = wxEXEC_SYNC; +- #if wxCHECK_VERSION(3, 0, 0) +- // Stop event-loop while wxExecute runs, to avoid a deadlock on startup, +- // that occurs from time to time on wx3 +- flags |= wxEXEC_NOEVENTS; +- #else +- flags |= wxEXEC_NODISABLE; +- #endif ++ // Stop event-loop while wxExecute runs, to avoid a deadlock on startup, ++ // that occurs from time to time on wx3 ++ flags |= wxEXEC_NOEVENTS; + return wxExecute(cmd, output, flags); + } + #endif // __WXMSW__ +diff --git a/src/sdk/configmanager.cpp b/src/sdk/configmanager.cpp +index 355a1e183..c352b6ed2 100644 +--- a/src/sdk/configmanager.cpp ++++ b/src/sdk/configmanager.cpp +@@ -39,11 +39,7 @@ + #endif + + #ifdef __WXMAC__ +-#if wxCHECK_VERSION(3, 0, 0) + #include "wx/osx/core/cfstring.h" +-#else +-#include "wx/mac/corefoundation/cfstring.h" +-#endif + #include "wx/intl.h" + + #include +@@ -124,11 +120,7 @@ namespace + CFRelease(resourcesURL); + CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle); + CFRelease(absoluteURL); +- #if wxCHECK_VERSION(3, 0, 0) +- wxString str = wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding()); +- #else +- wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding()); +- #endif ++ wxString str = wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding()); + if (!str.Contains(wxString(_T("/Resources")))) + return ::DetermineExecutablePath() + _T("/.."); // not a bundle, use relative path + return str; +@@ -239,9 +231,7 @@ static void handleConfigError(TiXmlDocument &doc, const wxString &fileName, cons + wxMessageDialog dlg(Manager::Get()->GetAppWindow(), + message + _("\n\nDiscard old config file?"), _("Config file read error"), + wxSTAY_ON_TOP|wxCENTRE|wxYES|wxNO|wxNO_DEFAULT|wxICON_ERROR); +-#if wxCHECK_VERSION(3, 0, 0) + dlg.SetYesNoLabels(_("&Discard"), _("&Close")); +-#endif + if (dlg.ShowModal() != wxID_YES) + cbThrow(message); + +@@ -337,15 +327,8 @@ void CfgMgrBldr::SwitchToR(const wxString& absFileName) + { + size_t size = is->GetSize(); + wxString str; +- #if wxCHECK_VERSION(3, 0, 0) + wxChar* c = wxStringBuffer(str, size); +- #else +- wxChar* c = str.GetWriteBuf(size); +- #endif + is->Read(c, size); +- #if !wxCHECK_VERSION(3, 0, 0) +- str.UngetWriteBuf(size); +- #endif + + doc = new TiXmlDocument(); + +@@ -493,13 +476,8 @@ wxString CfgMgrBldr::GetConfigFile() const + */ + inline void to_upper(wxString& s) + { +- #if wxCHECK_VERSION(3, 0, 0) + wxStringCharType *p = const_cast(s.wx_str()); + wxStringCharType q; +- #else +- wxChar *p = (wxChar*) s.c_str(); +- wxChar q; +- #endif + size_t len = s.length()+1; + for (;--len;++p) + { +@@ -511,13 +489,8 @@ inline void to_upper(wxString& s) + + inline void to_lower(wxString& s) + { +- #if wxCHECK_VERSION(3, 0, 0) + wxStringCharType *p = const_cast(s.wx_str()); + wxStringCharType q; +- #else +- wxChar *p = (wxChar*) s.c_str(); +- wxChar q; +- #endif + size_t len = s.length()+1; + for (;--len;++p) + { +@@ -1239,11 +1212,7 @@ wxArrayString ConfigManager::EnumerateSubPaths(const wxString& path) + { + while (e->IterateChildren(curr) && (curr = e->IterateChildren(curr)->ToElement())) + { +- #if wxCHECK_VERSION(3, 0, 0) + wxUniChar c = cbC2U(curr->Value())[0]; +- #else +- wxChar c = *(cbC2U(curr->Value())); +- #endif + if (c < _T('A') || c > _T('Z')) // first char must be a letter, uppercase letters are key names + ret.Add(cbC2U(curr->Value())); + } +@@ -1325,11 +1294,7 @@ wxArrayString ConfigManager::EnumerateKeys(const wxString& path) + { + while (e->IterateChildren(curr) && (curr = e->IterateChildren(curr)->ToElement())) + { +- #if wxCHECK_VERSION(3, 0, 0) + wxUniChar c = cbC2U(curr->Value())[0]; +- #else +- wxChar c = *(cbC2U(curr->Value())); +- #endif + if (c >= _T('A') && c <= _T('Z')) // opposite of the above + ret.Add(cbC2U(curr->Value())); + } +diff --git a/src/sdk/globals.cpp b/src/sdk/globals.cpp +index f1fa40eb2..f05975ab0 100644 +--- a/src/sdk/globals.cpp ++++ b/src/sdk/globals.cpp +@@ -1186,11 +1186,7 @@ wxBitmap cbLoadBitmapScaled(const wxString& filename, wxBitmapType bitmapType, d + + double cbGetContentScaleFactor(const wxWindow &window) + { +-#if wxCHECK_VERSION(3, 0, 0) + return window.GetContentScaleFactor(); +-#else +- return 1.0; +-#endif // wxCHECK_VERSION(3, 0, 0) + } + + #ifdef __WXGTK__ +@@ -1200,31 +1196,12 @@ double cbGetContentScaleFactor(const wxWindow &window) + // For other platforms the value returned by GetContentScalingFactor seems adequate. + double cbGetActualContentScaleFactor(cb_unused const wxWindow &window) + { +-#if wxCHECK_VERSION(3, 0, 0) + // It is possible to use the window to find a display, but unfortunately this doesn't work well, + // because we call this function mostly on windows which haven't been shown. This leads to + // warnings in the log about ClientToScreen failures. + // If there are problems on multi-monitor setups we should think about some other solution. :( + const wxSize ppi = wxGetDisplayPPI(); + return ppi.y / 96.0; +-#else // wxCHECK_VERSION(3, 0, 0) +- // This code is the simplest version which works in the most common case. +- // If people complain that multi-monitor setups behave strangely, this should be revised with +- // direct calls to GTK/GDK functions. +- +- // This function might return bad results for multi screen setups. +- const wxSize mm = wxGetDisplaySizeMM(); +- if (mm.x == 0 || mm.y == 0) +- return 1.0; +- const wxSize pixels = wxGetDisplaySize(); +- +- const double ppiX = wxRound((pixels.x * inches2mm) / mm.x); +- const double ppiY = wxRound((pixels.y * inches2mm) / mm.y); +- +- // My guess is that smaller scaling factor would look better. Probably it has effect only in +- // multi monitor setups where there are monitors with different dpi. +- return std::min(ppiX / 96.0, ppiY /96.0); +-#endif // wxCHECK_VERSION(3, 0, 0) + } + #else // __WXGTK__ + double cbGetActualContentScaleFactor(const wxWindow &window) +@@ -1323,11 +1300,7 @@ void SetSettingsIconsStyle(wxListCtrl* lc, SettingsIconsStyle style) + long flags = lc->GetWindowStyleFlag(); + switch (style) + { +-#if wxCHECK_VERSION(3, 0, 0) + case sisNoIcons: flags = (flags & ~wxLC_MASK_TYPE) | wxLC_LIST; break; +-#else +- case sisNoIcons: flags = (flags & ~wxLC_MASK_TYPE) | wxLC_SMALL_ICON; break; +-#endif + default: flags = (flags & ~wxLC_MASK_TYPE) | wxLC_ICON; break; + } + lc->SetWindowStyleFlag(flags); +@@ -1713,11 +1686,7 @@ DLLIMPORT wxArrayInt cbGetMultiChoiceDialog(const wxString& message, const wxStr + return wxArrayInt(); + } + +-#if wxCHECK_VERSION(3, 0, 0) + const char* cbGetTextFromUserPromptStr = wxGetTextFromUserPromptStr; +-#else +-const wxChar* cbGetTextFromUserPromptStr = wxGetTextFromUserPromptStr; +-#endif // wxCHECK_VERSION + + wxString cbGetTextFromUser(const wxString& message, const wxString& caption, const wxString& defaultValue, + wxWindow *parent, wxCoord x, wxCoord y, bool centre) +diff --git a/src/sdk/incremental_select_helper.cpp b/src/sdk/incremental_select_helper.cpp +index ba4d0da97..fdcaf95bd 100644 +--- a/src/sdk/incremental_select_helper.cpp ++++ b/src/sdk/incremental_select_helper.cpp +@@ -195,10 +195,6 @@ void IncrementalSelectHandler::FilterItems() + FilterItemsFinalize(*m_list, *m_iterator); + } + +-#if !wxCHECK_VERSION(3, 0, 0) +- typedef int wxStandardID; +-#endif +- + static wxStandardID KeyDownAction(wxKeyEvent& event, int &selected, int selectedMax) + { + // now, adjust position from key input +diff --git a/src/sdk/newfromtemplatedlg.cpp b/src/sdk/newfromtemplatedlg.cpp +index 8776dcc30..ee65504c3 100644 +--- a/src/sdk/newfromtemplatedlg.cpp ++++ b/src/sdk/newfromtemplatedlg.cpp +@@ -195,11 +195,7 @@ void NewFromTemplateDlg::BuildCategoriesFor(TemplateOutputType otype, wxChoice* + cat->SetSelection(0); + } + +-#if wxCHECK_VERSION(3, 0, 0) + inline int wxCALLBACK SortTemplates(wxIntPtr item1, wxIntPtr item2, cb_unused wxIntPtr sortData) +-#else +-inline int wxCALLBACK SortTemplates(long item1, long item2, cb_unused long sortData) +-#endif + { + ListItemData* data1 = reinterpret_cast(item1); + ListItemData* data2 = reinterpret_cast(item2); +diff --git a/src/sdk/pluginsconfigurationdlg.cpp b/src/sdk/pluginsconfigurationdlg.cpp +index e3949590f..fedb6b845 100644 +--- a/src/sdk/pluginsconfigurationdlg.cpp ++++ b/src/sdk/pluginsconfigurationdlg.cpp +@@ -65,11 +65,7 @@ static wxString GetInitialInfo() + return initialInfo; + } + +-#if wxCHECK_VERSION(3, 0, 0) + inline int wxCALLBACK sortByTitle(wxIntPtr item1, wxIntPtr item2, cb_unused wxIntPtr sortData) +-#else +-inline int wxCALLBACK sortByTitle(long item1, long item2, cb_unused long sortData) +-#endif + { + const PluginElement* elem1 = (const PluginElement*)item1; + const PluginElement* elem2 = (const PluginElement*)item2; +diff --git a/src/sdk/printing_types.cpp b/src/sdk/printing_types.cpp +index 8b62f7983..1cd00a55d 100644 +--- a/src/sdk/printing_types.cpp ++++ b/src/sdk/printing_types.cpp +@@ -28,21 +28,13 @@ void InitPrinting() + { + g_printer = new wxPrinter; + int paperid = Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/printerdialog/paperid"), wxPAPER_A4 ); +- #if wxCHECK_VERSION(3, 0, 0) + wxPrintOrientation paperorientation = static_cast( Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/printerdialog/paperorientation"), wxPORTRAIT ) ); +- #else +- int paperorientation = Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/printerdialog/paperorientation"), wxPORTRAIT ); +- #endif + wxPrintData* ppd = &(g_printer->GetPrintDialogData().GetPrintData()); + ppd->SetPaperId((wxPaperSize)paperid); +- #if wxCHECK_VERSION(3, 0, 0) + if (paperorientation == wxPORTRAIT) + ppd->SetOrientation(wxPORTRAIT); + else + ppd->SetOrientation(wxLANDSCAPE); +- #else +- ppd->SetOrientation(paperorientation); +- #endif + } + + // if (!g_pageSetupData) +diff --git a/src/sdk/scripting/bindings/sc_globals.cpp b/src/sdk/scripting/bindings/sc_globals.cpp +index 3b29eb452..b08dd010e 100644 +--- a/src/sdk/scripting/bindings/sc_globals.cpp ++++ b/src/sdk/scripting/bindings/sc_globals.cpp +@@ -303,15 +303,7 @@ namespace ScriptBindings + if (id != wxNOT_FOUND) + { + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, id); +- #if wxCHECK_VERSION(3, 0, 0) + mbar->GetEventHandler()->ProcessEvent(evt); +- #else +- if ( !mbar->ProcessEvent(evt) ) +- { +- wxString msg; msg.Printf(_("Calling the menu '%s' with ID %d failed."), menuPath.wx_str(), id); +- cbMessageBox(msg, _("Script error"), wxICON_WARNING); +- } +- #endif + // done + } + break; +diff --git a/src/sdk/toolsmanager.cpp b/src/sdk/toolsmanager.cpp +index 86ec3e206..bd128893b 100644 +--- a/src/sdk/toolsmanager.cpp ++++ b/src/sdk/toolsmanager.cpp +@@ -129,11 +129,7 @@ bool ToolsManager::Execute(const cbTool* tool) + + // log info so user can troubleshoot + dir = wxGetCwd(); // read in the actual working dir +- #if wxCHECK_VERSION(3, 0, 0) + Manager::Get()->GetLogManager()->Log(F(_("Launching tool '%s': %s (in %s)"), tool->GetName().wx_str(), cmdline.wx_str(), dir.wx_str())); +- #else +- Manager::Get()->GetLogManager()->Log(F(_("Launching tool '%s': %s (in %s)"), tool->GetName().c_str(), cmdline.c_str(), dir.c_str())); +- #endif + + bool pipe = true; + int flags = wxEXEC_ASYNC; +diff --git a/src/sdk/uservarmanager.cpp b/src/sdk/uservarmanager.cpp +index fa1118f40..ee21a10eb 100644 +--- a/src/sdk/uservarmanager.cpp ++++ b/src/sdk/uservarmanager.cpp +@@ -32,9 +32,7 @@ + + #include "annoyingdialog.h" + +-#if wxCHECK_VERSION(3, 0, 0) + #include +-#endif + + #include + +@@ -637,11 +635,7 @@ void UsrGlblMgrEditDialog::Sanitise(wxString& s) + } + + for (unsigned int i = 0; i < s.length(); ++i) +-#if wxCHECK_VERSION(3, 0, 0) + s[i] = wxIsalnum(s.GetChar(i)) ? s.GetChar(i) : wxUniChar('_'); +-#else +- s[i] = wxIsalnum(s.GetChar(i)) ? s.GetChar(i) : _T('_'); +-#endif + + if (s.GetChar(0) == _T('_')) + s.Prepend(_T("set")); +diff --git a/src/sdk/xtra_res.cpp b/src/sdk/xtra_res.cpp +index 1efe04276..aa7f2ed2b 100644 +--- a/src/sdk/xtra_res.cpp ++++ b/src/sdk/xtra_res.cpp +@@ -100,11 +100,7 @@ wxBitmap wxToolBarAddOnXmlHandler::GetCenteredBitmap(const wxString& param, wxSi + return stockArt; + } + +-#if wxCHECK_VERSION(3, 0, 0) + const wxString name = GetParamValue(paramNode); +-#else +- const wxString name = GetParamValue(param); +-#endif + if (name.empty()) + return wxArtProvider::GetBitmap(wxT("sdk/missing_icon"), wxART_TOOLBAR, size * scaleFactor); + +@@ -186,19 +182,10 @@ wxObject *wxToolBarAddOnXmlHandler::DoCreateResource() + if (GetPosition() != wxDefaultPosition) + { + m_toolbar->AddTool(GetID(), +- #if wxCHECK_VERSION(3, 0, 0) + wxEmptyString, +- #endif + GetCenteredBitmap(_T("bitmap"), bitmapSize, scaleFactor), + GetCenteredBitmap(_T("bitmap2"), bitmapSize, scaleFactor), +- #if !wxCHECK_VERSION(3, 0, 0) +- GetBool(_T("toggle")), +- GetPosition().x, +- GetPosition().y, +- NULL, +- #else + wxITEM_NORMAL, +- #endif + GetText(_T("tooltip")), + GetText(_T("longhelp"))); + } +@@ -332,15 +319,9 @@ bool wxToolBarAddOnXmlHandler::CanHandle(wxXmlNode *node) + // + // Don't ask me why... >:-| + +- #if wxCHECK_VERSION(3, 0, 0) + bool istbar = node->GetAttribute(wxT("class"), wxEmptyString).Matches(_T("wxToolBarAddOn")); + bool istool = node->GetAttribute(wxT("class"), wxEmptyString).Matches(_T("tool")); + bool issep = node->GetAttribute(wxT("class"), wxEmptyString).Matches(_T("separator")); +- #else +- bool istbar = node->GetPropVal(wxT("class"), wxEmptyString).Matches(_T("wxToolBarAddOn")); +- bool istool = node->GetPropVal(wxT("class"), wxEmptyString).Matches(_T("tool")); +- bool issep = node->GetPropVal(wxT("class"), wxEmptyString).Matches(_T("separator")); +- #endif + + return ((!m_isInside && istbar) || + (m_isInside && istool) || diff --git a/programming/environment/codeblocks/files/a4aacc92640b587ad049cd6aa68c637e536e9ab5.patch b/programming/environment/codeblocks/files/a4aacc92640b587ad049cd6aa68c637e536e9ab5.patch new file mode 100644 index 0000000000..f6a1ebc30b --- /dev/null +++ b/programming/environment/codeblocks/files/a4aacc92640b587ad049cd6aa68c637e536e9ab5.patch @@ -0,0 +1,84 @@ +From a4aacc92640b587ad049cd6aa68c637e536e9ab5 Mon Sep 17 00:00:00 2001 +From: mortenmacfly +Date: Tue, 29 Dec 2020 09:51:54 +0000 +Subject: [PATCH] * updated AUTHORS file and about dialog to better reflect + current developers/contribters + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12281 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + AUTHORS | 13 +++++++++++-- + src/src/dlgabout.cpp | 4 +++- + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 07fa7d5c4..b0d6aab5d 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -12,6 +12,8 @@ Teodor Petrov : Developer + Daniel Anselmi : Developer + Yuanhui Zhang : Developer + Damien Moore : Developer ++Micah Ng : Developer ++BlueHazzard : Developer + Ricardo Garcia : All-hands person + Paul A. Jimenez : Help and AStyle plugins + Thomas Lorblanches : CodeStat and Profiler plugins +@@ -20,13 +22,16 @@ Jerome Antoine : ThreadSearch plugin + Pecan Heber : Keybinder, BrowseTracker, DragScroll + CodeSnippets plugins + Arto Jonsson : CodeSnippets plugin (passed on to Pecan) +-Mario Cupelli : User's manual ++Darius Markauskas : Fortran support ++Mario Cupelli : Compiler support for embedded systems ++ User's manual ++Jonas Zinn : Misc. wxSmith AddOns and plugins ++Mirai Computing : cbp2make tool + Anders F Bjoerklund : wxMac compatibility + + Contributors (in no special order): + ----------------------------------- + Daniel Orb : RPM spec file and packages +-Mario Cupelli : Compiler support for embedded systems + byo,elvstone, me22 : Conversion to Unicode + pasgui : Providing Ubuntu nightly packages + Hakki Dogusan : DigitalMars compiler support +@@ -37,6 +42,10 @@ David Perfors : Unicode tester and future documentation writer + Sylvain Prat : Initial MSVC workspace and project importers + Chris Raschko : Design of the 3D logo for Code::Blocks + J.A. Ortega : 3D Icon based on the above ++Alexandr Efremo : Providing OpenSuSe packages ++Huki : Misc. Code-Completion improvements ++stahta01 : Misc. patches for several enhancements ++Miguel Gimenez : Misc. patches for several enhancements + + All contributors that provided patches. + +diff --git a/src/src/dlgabout.cpp b/src/src/dlgabout.cpp +index 5c66794ec..2afeeabac 100644 +--- a/src/src/dlgabout.cpp ++++ b/src/src/dlgabout.cpp +@@ -84,6 +84,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + txtDescription->SetValue(description); + + wxTextCtrl *txtThanksTo = XRCCTRL(*this, "txtThanksTo", wxTextCtrl); ++ // Note: Keep this is sync with the AUTHORS file in SVN. + txtThanksTo->SetValue(_( + "Developers:\n" + "--------------\n" +@@ -100,6 +101,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + "Yuanhui Zhang : Developer\n" + "Damien Moore : Developer\n" + "Micah Ng : Developer\n" ++ "BlueHazzard : Developer\n" + "Ricardo Garcia : All-hands person\n" + "Paul A. Jimenez : Help and AStyle plugins\n" + "Thomas Lorblanches : CodeStat and Profiler plugins\n" +@@ -131,7 +133,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + "Alexandr Efremo : Providing OpenSuSe packages\n" + "Huki : Misc. Code-Completion improvements\n" + "stahta01 : Misc. patches for several enhancements\n" +- "BlueHazzard : Misc. patches for several enhancements\n" ++ "Miguel Gimenez : Misc. patches for several enhancements\n" + "\n" + "All contributors that provided patches.\n" + "The wxWidgets project (http://www.wxwidgets.org).\n" diff --git a/programming/environment/codeblocks/files/b2e4f1279804e1d11b71bc75eeb37072c3589296.patch b/programming/environment/codeblocks/files/b2e4f1279804e1d11b71bc75eeb37072c3589296.patch new file mode 100644 index 0000000000..dfcd414de2 --- /dev/null +++ b/programming/environment/codeblocks/files/b2e4f1279804e1d11b71bc75eeb37072c3589296.patch @@ -0,0 +1,66 @@ +From b2e4f1279804e1d11b71bc75eeb37072c3589296 Mon Sep 17 00:00:00 2001 +From: wh11204 +Date: Sat, 18 Dec 2021 08:13:26 +0000 +Subject: [PATCH] * Fix scale factor detection for wxWidgets >= 3.1.4 (ticket + #1132). wxWidgets changed the value returned by + wxWindow::GetContentScaleFactor() in 3.1.0. In 3.1.4 they restored the + pre-3.1.0 behaviour and created a new method GetDPIScaleFactor() returning + what GetContentScaleFactor() was returning until then. + +This change broke HiDPI detection when using wxWidgets >= 3.1.4. BTW, it was already broken in +32-bit C::B because it was not DPI-aware; this has been fixed in [r12591]. + +Update developer list in Thanks section of the About dialog. + + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12592 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/sdk/globals.cpp | 4 ++++ + src/src/dlgabout.cpp | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/sdk/globals.cpp b/src/sdk/globals.cpp +index f05975ab0..9069305ca 100644 +--- a/src/sdk/globals.cpp ++++ b/src/sdk/globals.cpp +@@ -1186,7 +1186,11 @@ wxBitmap cbLoadBitmapScaled(const wxString& filename, wxBitmapType bitmapType, d + + double cbGetContentScaleFactor(const wxWindow &window) + { ++#if wxCHECK_VERSION(3, 1, 4) ++ return window.GetDPIScaleFactor(); ++#else + return window.GetContentScaleFactor(); ++#endif + } + + #ifdef __WXGTK__ +diff --git a/src/src/dlgabout.cpp b/src/src/dlgabout.cpp +index 545f7d13a..f024d5ed5 100644 +--- a/src/src/dlgabout.cpp ++++ b/src/src/dlgabout.cpp +@@ -101,6 +101,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + "Damien Moore : Developer\n" + "Micah Ng : Developer\n" + "BlueHazzard : Developer\n" ++ "Miguel Gimenez : Developer\n" + "Ricardo Garcia : All-hands person\n" + "Paul A. Jimenez : Help and AStyle plugins\n" + "Thomas Lorblanches : CodeStat and Profiler plugins\n" +@@ -132,7 +133,6 @@ dlgAbout::dlgAbout(wxWindow* parent) + "Alexandr Efremo : Providing OpenSuSe packages\n" + "Huki : Misc. Code-Completion improvements\n" + "stahta01 : Misc. patches for several enhancements\n" +- "Miguel Gimenez : Misc. patches for several enhancements\n" + "\n" + "All contributors that provided patches.\n" + "The wxWidgets project (http://www.wxwidgets.org).\n" +@@ -171,7 +171,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + if (!desktopEnv.empty()) + items.push_back({_("Desktop environment"), desktopEnv }); + +- items.push_back({_("Scaling factor"), wxString::Format("%f", GetContentScaleFactor())}); ++ items.push_back({_("Scaling factor"), wxString::Format("%f", cbGetContentScaleFactor(*this))}); + items.push_back({_("Detected scaling factor"), + wxString::Format("%f", cbGetActualContentScaleFactor(*this))}); + const wxSize displayPPI = wxGetDisplayPPI(); diff --git a/programming/environment/codeblocks/files/c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch b/programming/environment/codeblocks/files/c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch new file mode 100644 index 0000000000..9785143a34 --- /dev/null +++ b/programming/environment/codeblocks/files/c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch @@ -0,0 +1,965 @@ +From c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7 Mon Sep 17 00:00:00 2001 +From: wh11204 +Date: Wed, 15 Dec 2021 08:28:41 +0000 +Subject: [PATCH] - Remove code for wxWidgets < 3.0.0 (part III and last). + Includes: src/plugins/compilergcc/compileroptionsdlg.cpp + src/sdk/templatemanager.cpp src/src/associations.cpp src/src/dlgabout.cpp + src/src/main.cpp src/src/notebookstyles.cpp src/src/notebookstyles.h + src/src/projectmanagerui.cpp + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12580 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + .../compilergcc/compileroptionsdlg.cpp | 12 +- + src/sdk/templatemanager.cpp | 12 - + src/src/associations.cpp | 4 - + src/src/dlgabout.cpp | 10 +- + src/src/main.cpp | 13 - + src/src/notebookstyles.cpp | 592 +----------------- + src/src/notebookstyles.h | 39 -- + src/src/projectmanagerui.cpp | 4 - + 8 files changed, 5 insertions(+), 681 deletions(-) + +diff --git a/src/plugins/compilergcc/compileroptionsdlg.cpp b/src/plugins/compilergcc/compileroptionsdlg.cpp +index 476bbc795..ade5fcf93 100644 +--- a/src/plugins/compilergcc/compileroptionsdlg.cpp ++++ b/src/plugins/compilergcc/compileroptionsdlg.cpp +@@ -677,13 +677,9 @@ void CompilerOptionsDlg::DoFillOptions() + wxPGProperty *root = m_FlagsPG->GetRoot(); + if (root) + { +- unsigned count = root->GetChildCount(); ++ const unsigned count = root->GetChildCount(); + for (unsigned ii = 0; ii < count; ++ii) +-#if wxCHECK_VERSION(3, 0, 0) + m_FlagsPG->SortChildren(root->Item(ii), wxPG_RECURSE); +-#else +- m_FlagsPG->Sort(root->Item(ii)); +-#endif + } + m_FlagsPG->Thaw(); + } // DoFillOptions +@@ -2118,11 +2114,7 @@ void CompilerOptionsDlg::OnSetDefaultCompilerClick(cb_unused wxCommandEvent& eve + CompilerFactory::SetDefaultCompiler(idx); + wxString msg; + Compiler* compiler = CompilerFactory::GetDefaultCompiler(); +- #if wxCHECK_VERSION(3, 0, 0) +- msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName().wx_str() : _("[invalid]").wx_str()); +- #else +- msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName().c_str() : _("[invalid]")); +- #endif ++ msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName() : _("[invalid]")); + cbMessageBox(msg); + } // OnSetDefaultCompilerClick + +diff --git a/src/sdk/templatemanager.cpp b/src/sdk/templatemanager.cpp +index 5b5b91dff..0161badf0 100644 +--- a/src/sdk/templatemanager.cpp ++++ b/src/sdk/templatemanager.cpp +@@ -186,11 +186,7 @@ cbProject* TemplateManager::NewProjectFromUserTemplate(NewFromTemplateDlg& dlg, + ++count; + } + else +- #if wxCHECK_VERSION(3, 0, 0) + Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.wx_str(), dst.wx_str())); +- #else +- Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.c_str(), dst.c_str())); +- #endif + } + if (count != total_count) + cbMessageBox(_("Some files could not be loaded with the template..."), _("Error"), wxICON_ERROR); +@@ -303,21 +299,13 @@ void TemplateManager::SaveUserTemplate(cbProject* prj) + { + wxString src = (*it)->file.GetFullPath(); + wxString dst = templ + (*it)->relativeToCommonTopLevelPath; +- #if wxCHECK_VERSION(3, 0, 0) + Manager::Get()->GetLogManager()->DebugLog(F(_T("Copying %s to %s"), src.wx_str(), dst.wx_str())); +- #else +- Manager::Get()->GetLogManager()->DebugLog(F(_T("Copying %s to %s"), src.c_str(), dst.c_str())); +- #endif + if (!CreateDirRecursively(dst)) + Manager::Get()->GetLogManager()->DebugLog(_T("Failed creating directory for ") + dst); + if (wxCopyFile(src, dst, true)) + ++count; + else +- #if wxCHECK_VERSION(3, 0, 0) + Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.wx_str(), dst.wx_str())); +- #else +- Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.c_str(), dst.c_str())); +- #endif + } + + // cbProject doesn't have a GetRelativeToCommonTopLevelPath() function, so we simulate it here +diff --git a/src/src/associations.cpp b/src/src/associations.cpp +index f6cebd5c0..f981c3f27 100644 +--- a/src/src/associations.cpp ++++ b/src/src/associations.cpp +@@ -201,11 +201,7 @@ void Associations::DoClearAssociation(const wxString& ext) + if (key.Exists()) + { + wxString s; +- #if wxCHECK_VERSION(3, 0, 0) + if (key.QueryValue(wxEmptyString, s) && s.StartsWith(_T("CodeBlocks"))) +- #else +- if (key.QueryValue(NULL, s) && s.StartsWith(_T("CodeBlocks"))) +- #endif + key.DeleteSelf(); + } + +diff --git a/src/src/dlgabout.cpp b/src/src/dlgabout.cpp +index 294350696..545f7d13a 100644 +--- a/src/src/dlgabout.cpp ++++ b/src/src/dlgabout.cpp +@@ -20,9 +20,7 @@ + #include + #include + #include +- #if wxCHECK_VERSION(3, 0, 0) +- #include +- #endif // wxCHECK_VERSION ++ #include + + #include "licenses.h" + #include "configmanager.h" +@@ -146,15 +144,11 @@ dlgAbout::dlgAbout(wxWindow* parent) + wxTextCtrl *txtLicense = XRCCTRL(*this, "txtLicense", wxTextCtrl); + txtLicense->SetValue(LICENSE_GPL); + +-#if wxCHECK_VERSION(3, 0, 0) + const wxVersionInfo scintillaVersion = wxScintilla::GetLibraryVersionInfo(); + const wxString scintillaStr = wxString::Format(wxT("%d.%d.%d"), + scintillaVersion.GetMajor(), + scintillaVersion.GetMinor(), + scintillaVersion.GetMicro()); +-#else +- const wxString scintillaStr = wxSCINTILLA_VERSION; +-#endif // wxCHECK_VERSION + + struct Item + { +@@ -218,9 +212,7 @@ dlgAbout::dlgAbout(wxWindow* parent) + information += wxT(": ") + item.value + wxT("\n"); + } + +-#if wxCHECK_VERSION(3, 0, 0) + information += wxT("\n") + wxGetLibraryVersionInfo().GetDescription(); +-#endif // wxCHECK_VERSION(3, 0, 0) + + wxTextCtrl *txtInformation = XRCCTRL(*this, "txtInformation", wxTextCtrl); + txtInformation->SetValue(information); +diff --git a/src/src/main.cpp b/src/src/main.cpp +index d730a9294..8de2a4206 100644 +--- a/src/src/main.cpp ++++ b/src/src/main.cpp +@@ -2075,11 +2075,7 @@ void MainFrame::DoSelectLayout(const wxString& name) + { + if (!items[i]->IsCheckable()) + continue; +-#if wxCHECK_VERSION(3, 0, 0) + items[i]->Check(items[i]->GetItemLabel().IsSameAs(name)); +-#else +- items[i]->Check(items[i]->GetText().IsSameAs(name)); +-#endif + } + + if (!m_LastLayoutIsTemp) +@@ -2401,12 +2397,7 @@ void MainFrame::DoUpdateEditorStyle(cbAuiNotebook* target, const wxString& prefi + break; + + default: // default style +- #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +- target->SetArtProvider(new NbStyleGTK()); +- #else + target->SetArtProvider(new wxAuiDefaultTabArt()); +- #endif +- break; + } + + target->SetTabCtrlHeight(-1); +@@ -4801,13 +4792,9 @@ void MainFrame::OnEditorUpdateUI(CodeBlocksEvent& event) + + if (Manager::Get()->GetEditorManager() && event.GetEditor() == Manager::Get()->GetEditorManager()->GetActiveEditor()) + { +-#if wxCHECK_VERSION(3, 0, 0) + // Execute the code to update the status bar outside of the paint event for scintilla. + // Executing this function directly in the event handler causes redraw problems on Windows. + CallAfter(&MainFrame::DoUpdateStatusBar); +-#else +- DoUpdateStatusBar(); +-#endif // defined(__wxMSW__) && wxCHECK_VERSION(3, 0, 0) + } + + event.Skip(); +diff --git a/src/src/notebookstyles.cpp b/src/src/notebookstyles.cpp +index 81362d498..d53edcaed 100644 +--- a/src/src/notebookstyles.cpp ++++ b/src/src/notebookstyles.cpp +@@ -13,14 +13,6 @@ + #include "prep.h" + #include "notebookstyles.h" + +-#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +- #define GSocket GLibSocket +- #include +- #undef GSocket +- #include +- #include +-#endif +- + #include + #include + +@@ -42,15 +34,9 @@ wxAuiTabArt* NbStyleVC71::Clone() + { + NbStyleVC71* clone = new NbStyleVC71(); + +-#if wxCHECK_VERSION(3, 0, 0) + clone->SetNormalFont(m_normalFont); + clone->SetSelectedFont(m_selectedFont); + clone->SetMeasuringFont(m_measuringFont); +-#else +- clone->SetNormalFont(m_normal_font); +- clone->SetSelectedFont(m_selected_font); +- clone->SetMeasuringFont(m_measuring_font); +-#endif + + return clone; + } +@@ -75,11 +61,7 @@ void NbStyleVC71::DrawTab(wxDC& dc, wxWindow* wnd, + close_button_state, + x_extent); + +-#if wxCHECK_VERSION(3, 0, 0) + wxCoord tab_height = m_tabCtrlHeight - 3; +-#else +- wxCoord tab_height = m_tab_ctrl_height - 3; +-#endif + wxCoord tab_width = tab_size.x; + wxCoord tab_x = in_rect.x; + wxCoord tab_y = in_rect.y + in_rect.height - tab_height; +@@ -166,17 +148,10 @@ void NbStyleVC71::DrawTab(wxDC& dc, wxWindow* wnd, + wxCoord textx; + wxCoord texty; + if (page.active) +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_selectedFont); +-#else +- dc.SetFont(m_selected_font); +-#endif + else +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_normalFont); +-#else +- dc.SetFont(m_normal_font); +-#endif ++ + dc.GetTextExtent(caption, &textx, &texty); + // draw tab text + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); +@@ -186,21 +161,12 @@ void NbStyleVC71::DrawTab(wxDC& dc, wxWindow* wnd, + // draw 'x' on tab (if enabled) + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { +-#if wxCHECK_VERSION(3, 0, 0) + int close_button_width = m_activeCloseBmp.GetWidth(); + wxBitmap bmp = m_disabledCloseBmp; +-#else +- int close_button_width = m_active_close_bmp.GetWidth(); +- wxBitmap bmp = m_disabled_close_bmp; +-#endif + + if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || + (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) +-#if wxCHECK_VERSION(3, 0, 0) + bmp = m_activeCloseBmp; +-#else +- bmp = m_active_close_bmp; +-#endif + + wxRect rect(tab_x + tab_width - close_button_width - 3, + drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), +@@ -227,11 +193,7 @@ int NbStyleVC71::GetBestTabCtrlSize(wxWindow* wnd, + // m_requested_tabctrl_height = -1; + // m_tab_ctrl_height = -1; + wxClientDC dc(wnd); +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_measuringFont); +-#else +- dc.SetFont(m_measuring_font); +-#endif + int x_ext = 0; + wxSize s = GetTabSize(dc, wnd, wxT("ABCDEFGHIj"), wxNullBitmap, true, + wxAUI_BUTTON_STATE_HIDDEN, &x_ext); +@@ -246,15 +208,9 @@ wxAuiTabArt* NbStyleFF2::Clone() + { + NbStyleFF2* clone = new NbStyleFF2(); + +-#if wxCHECK_VERSION(3, 0, 0) + clone->SetNormalFont(m_normalFont); + clone->SetSelectedFont(m_selectedFont); + clone->SetMeasuringFont(m_measuringFont); +-#else +- clone->SetNormalFont(m_normal_font); +- clone->SetSelectedFont(m_selected_font); +- clone->SetMeasuringFont(m_measuring_font); +-#endif + + return clone; + } +@@ -272,11 +228,7 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + wxSize tab_size = GetTabSize(dc, wnd, page.caption, page.bitmap, + page.active, close_button_state, x_extent); + +-#if wxCHECK_VERSION(3, 0, 0) + wxCoord tab_height = m_tabCtrlHeight - 2; +-#else +- wxCoord tab_height = m_tab_ctrl_height - 2; +-#endif + wxCoord tab_width = tab_size.x; + wxCoord tab_x = in_rect.x; + wxCoord tab_y = in_rect.y + in_rect.height - tab_height; +@@ -360,17 +312,10 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + wxCoord textx; + wxCoord texty; + if (page.active) +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_selectedFont); +-#else +- dc.SetFont(m_selected_font); +-#endif + else +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_normalFont); +-#else +- dc.SetFont(m_normal_font); +-#endif ++ + dc.GetTextExtent(caption, &textx, &texty); + // draw tab text + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); +@@ -380,21 +325,12 @@ void NbStyleFF2::DrawTab(wxDC& dc, wxWindow* wnd, + // draw 'x' on tab (if enabled) + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { +-#if wxCHECK_VERSION(3, 0, 0) + int close_button_width = m_activeCloseBmp.GetWidth(); + wxBitmap bmp = m_disabledCloseBmp; +-#else +- int close_button_width = m_active_close_bmp.GetWidth(); +- wxBitmap bmp = m_disabled_close_bmp; +-#endif + + if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || + (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) +-#if wxCHECK_VERSION(3, 0, 0) + bmp = m_activeCloseBmp; +-#else +- bmp = m_active_close_bmp; +-#endif + + wxRect rect(tab_x + tab_width - close_button_width - 3, + drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), +@@ -421,533 +357,9 @@ int NbStyleFF2::GetBestTabCtrlSize(wxWindow* wnd, + // m_requested_tabctrl_height = -1; + // m_tab_ctrl_height = -1; + wxClientDC dc(wnd); +-#if wxCHECK_VERSION(3, 0, 0) + dc.SetFont(m_measuringFont); +-#else +- dc.SetFont(m_measuring_font); +-#endif + int x_ext = 0; + wxSize s = GetTabSize(dc, wnd, wxT("ABCDEFGHIj"), wxNullBitmap, true, + wxAUI_BUTTON_STATE_HIDDEN, &x_ext); + return s.y + 6; + } +- +-#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +- +-namespace +-{ +- +-static GtkWidget *g_window = nullptr; +-static GtkWidget *g_container = nullptr; +-static GtkWidget *g_notebook = nullptr; +-static GtkWidget *g_button = nullptr; +-static int s_CloseIconSize = 16; // default size +- +-static void setup_widget_prototype(GtkWidget* widget) +-{ +- if (!g_window) +- { +- g_window = gtk_window_new(GTK_WINDOW_POPUP); +- gtk_widget_realize(g_window); +- } +- if (!g_container) +- { +- g_container = gtk_fixed_new(); +- gtk_container_add(GTK_CONTAINER(g_window), g_container); +- } +- +- gtk_container_add(GTK_CONTAINER(g_container), widget); +- gtk_widget_realize(widget); +-} +- +-static GtkStyle * get_style_button() +-{ +- if (!g_button) +- { +- g_button = gtk_button_new(); +- setup_widget_prototype(g_button); +- } +- return gtk_widget_get_style(g_button); +-} +- +-static GtkStyle * get_style_notebook() +-{ +- if (!g_notebook) +- { +- g_notebook = gtk_notebook_new(); +- setup_widget_prototype(g_notebook); +- } +- return gtk_widget_get_style(g_notebook); +-} +- +-} +- +-NbStyleGTK::NbStyleGTK(): +- m_Xthickness(0), +- m_Ythickness(0), +- m_TabHBorder(0), +- m_TabVBorder(0) +- +-{ +-} +- +-wxAuiTabArt* NbStyleGTK::Clone() +-{ +- NbStyleGTK* clone = new NbStyleGTK(); +- +-#if wxCHECK_VERSION(3, 0, 0) +- clone->SetNormalFont(m_normalFont); +- clone->SetSelectedFont(m_normalFont); +- clone->SetMeasuringFont(m_normalFont); +-#else +- clone->SetNormalFont(m_normal_font); +- clone->SetSelectedFont(m_normal_font); +- clone->SetMeasuringFont(m_normal_font); +-#endif +- +- return clone; +-} +- +-void NbStyleGTK::DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) +-{ +- GtkStyle* style_notebook = get_style_notebook(); +- GtkNotebook* notebook = GTK_NOTEBOOK (g_notebook); +- +- // if one of the parameters have changed, the height needs to be recalculated, so we force it, +- if(m_Xthickness != style_notebook->xthickness || +- m_Ythickness != style_notebook->ythickness || +- m_TabVBorder != notebook->tab_vborder || +- m_TabHBorder != notebook->tab_hborder) +- { +- m_Xthickness = style_notebook->xthickness; +- m_Ythickness = style_notebook->ythickness; +- m_TabVBorder = notebook->tab_vborder; +- m_TabHBorder = notebook->tab_hborder; +- wxAuiNotebook* nb = nullptr; +- if(wnd) +- nb = (cbAuiNotebook*)wnd->GetParent(); +- if(nb) +- nb->SetTabCtrlHeight(-1); +- } +-#if wxCHECK_VERSION(3, 0, 0) +- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); +- GdkWindow* pWin = impldc->GetGDKWindow(); +-#else +- GdkWindow* pWin = dc.GetGDKWindow(); +-#endif +- gtk_style_apply_default_background(style_notebook, pWin, 1, GTK_STATE_NORMAL, nullptr, +- rect.x, rect.y, rect.width, rect.height); +-} +- +-void ButtonStateAndShadow(int button_state, GtkStateType &state, GtkShadowType &shadow) +-{ +- +- if (button_state & wxAUI_BUTTON_STATE_DISABLED) +- { +- state = GTK_STATE_INSENSITIVE; +- shadow = GTK_SHADOW_ETCHED_IN; +- } +- else if (button_state & wxAUI_BUTTON_STATE_HOVER) +- { +- state = GTK_STATE_PRELIGHT; +- shadow = GTK_SHADOW_OUT; +- } +- else if (button_state & wxAUI_BUTTON_STATE_PRESSED) +- { +- state = GTK_STATE_ACTIVE; +- shadow = GTK_SHADOW_IN; +- } +- else +- { +- state = GTK_STATE_NORMAL; +- shadow = GTK_SHADOW_OUT; +- } +-} +- +-wxRect DrawCloseButton(wxDC& dc, +- GtkWidget *widget, +- int button_state, +- wxRect const &in_rect, +- int orientation, +- GdkRectangle* clipRect) +-{ +- GtkStyle *style_button = get_style_button(); +- int xthickness = style_button->xthickness; +- int ythickness = style_button->ythickness; +- +- wxBitmap bmp; +- bmp.SetPixbuf(gtk_widget_render_icon(widget, GTK_STOCK_CLOSE, GTK_ICON_SIZE_SMALL_TOOLBAR, "tab")); +- +- if(bmp.GetWidth() != s_CloseIconSize || bmp.GetHeight() != s_CloseIconSize) +- { +- wxImage img = bmp.ConvertToImage(); +- img.Rescale(s_CloseIconSize, s_CloseIconSize); +- bmp = img; +- } +- +- int button_size = s_CloseIconSize + 2 * xthickness; +- +- wxRect out_rect; +- +- if (orientation == wxLEFT) +- out_rect.x = in_rect.x - ythickness; +- else +- out_rect.x = in_rect.x + in_rect.width - button_size - ythickness; +- +- out_rect.y = in_rect.y + (in_rect.height - button_size) / 2; +- out_rect.width = button_size; +- out_rect.height = button_size; +- +-#if wxCHECK_VERSION(3, 0, 0) +- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); +- GdkWindow* pWin = impldc->GetGDKWindow(); +-#else +- GdkWindow* pWin = dc.GetGDKWindow(); +-#endif +- +- if (button_state == wxAUI_BUTTON_STATE_HOVER) +- { +- gtk_paint_box(style_button, pWin, +- GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, clipRect, widget, "button", +- out_rect.x, out_rect.y, out_rect.width, out_rect.height); +- } +- else if (button_state == wxAUI_BUTTON_STATE_PRESSED) +- { +- gtk_paint_box(style_button, pWin, +- GTK_STATE_ACTIVE, GTK_SHADOW_IN, clipRect, widget, "button", +- out_rect.x, out_rect.y, out_rect.width, out_rect.height); +- } +- +- +- dc.DrawBitmap(bmp, out_rect.x + xthickness, out_rect.y + ythickness, true); +- +- return out_rect; +-} +- +-void NbStyleGTK::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, +- const wxRect& in_rect, int close_button_state, wxRect* out_tab_rect, +- wxRect* out_button_rect, int* x_extent) +-{ +- GtkWidget *widget = wnd->GetHandle(); +- GtkStyle *style_notebook = get_style_notebook(); +- +- wxRect const &window_rect = wnd->GetRect(); +- +- int focus_width = 0; +- +- gtk_widget_style_get(g_notebook, +- "focus-line-width", &focus_width, +- NULL); +- +- int tab_pos; +- if (m_flags &wxAUI_NB_BOTTOM) +- tab_pos = wxAUI_NB_BOTTOM; +- else //if (m_flags & wxAUI_NB_TOP) {} +- tab_pos = wxAUI_NB_TOP; +- +- // TODO: else if (m_flags &wxAUI_NB_LEFT) {} +- // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} +- +- // figure out the size of the tab +- wxSize tab_size = GetTabSize(dc, wnd, page.caption, page.bitmap, +- page.active, close_button_state, x_extent); +- +- wxRect tab_rect = in_rect; +- tab_rect.width = tab_size.x; +- tab_rect.height = tab_size.y; +- tab_rect.y += 2 * m_TabHBorder; +- +- if (page.active) +- tab_rect.height += 2 * m_TabHBorder; +-#if wxCHECK_VERSION(3, 0, 0) +- // if no bitmap is set, we need a tiny correction +- if (! page.bitmap.IsOk()) +- tab_rect.height += 1; +-#endif +- +- int gap_rect_height = 6 * m_TabHBorder; +- int gap_rect_x = 1, gap_start = 0, gap_width = 0; +- int gap_rect_y = tab_rect.y - gap_rect_height; +- int gap_rect_width = window_rect.width; +- +- switch (tab_pos) +- { +- case wxAUI_NB_TOP: +- tab_rect.y -= 2 * m_TabHBorder; +- if (!page.active) +- tab_rect.y += 2 * m_TabHBorder; +- gap_rect_y = tab_rect.y + tab_rect.height - m_TabHBorder / 2; +- // fall through +- case wxAUI_NB_BOTTOM: +- gap_start = tab_rect.x - m_TabVBorder / 2; +- gap_width = tab_rect.width; +- break; +- default: +- break; +- } +- tab_rect.y += m_TabHBorder / 2; +- gap_rect_y += m_TabHBorder / 2; +- +- int padding = focus_width + m_TabHBorder; +- +- int clip_width = tab_rect.width; +- if (tab_rect.x + tab_rect.width > in_rect.x + in_rect.width) +- clip_width = (in_rect.x + in_rect.width) - tab_rect.x; +- +- dc.SetClippingRegion(tab_rect.x, tab_rect.y - m_TabVBorder, clip_width, tab_rect.height + m_TabVBorder); +- +- GdkRectangle area; +- area.x = tab_rect.x - m_TabVBorder; +- area.y = tab_rect.y - 2 * m_TabHBorder; +- area.width = clip_width + m_TabVBorder; +- area.height = tab_rect.height + 2 * m_TabHBorder; +- +-#if wxCHECK_VERSION(3, 0, 0) +- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); +- GdkWindow* pWin = impldc->GetGDKWindow(); +-#else +- GdkWindow* pWin = dc.GetGDKWindow(); +-#endif +- +- if (tab_pos == wxAUI_NB_BOTTOM) +- { +- if (page.active) +- { +- gtk_paint_box_gap(style_notebook, pWin, GTK_STATE_NORMAL, GTK_SHADOW_OUT, +- NULL, widget, "notebook", +- gap_rect_x, gap_rect_y, +- gap_rect_width, gap_rect_height, +- GTK_POS_BOTTOM, gap_start , gap_width); +- } +- gtk_paint_extension(style_notebook, pWin, +- page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, +- &area, widget, "tab", +- tab_rect.x, tab_rect.y, +- tab_rect.width, tab_rect.height, +- GTK_POS_TOP); +- } +- else +- { +- if (page.active) +- { +- gtk_paint_box_gap(style_notebook, pWin, GTK_STATE_NORMAL, GTK_SHADOW_OUT, +- NULL, widget, "notebook", +- gap_rect_x, gap_rect_y, +- gap_rect_width, gap_rect_height, +- GTK_POS_TOP, gap_start , gap_width); +- } +- gtk_paint_extension(style_notebook, pWin, +- page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, +- &area, widget, "tab", +- tab_rect.x, tab_rect.y, +- tab_rect.width, tab_rect.height, +- GTK_POS_BOTTOM); +- } +- +- wxCoord textX = tab_rect.x + padding + m_Xthickness; +- +- int bitmap_offset = 0; +- if (page.bitmap.IsOk()) +- { +- bitmap_offset = textX; +- +- // draw bitmap +- int bitmapY = tab_rect.y +(tab_rect.height - page.bitmap.GetHeight()) / 2; +- if(!page.active) +- { +- if (tab_pos == wxAUI_NB_TOP) +- bitmapY += m_Ythickness / 2; +- else +- bitmapY -= m_Ythickness / 2; +- } +- dc.DrawBitmap(page.bitmap, +- bitmap_offset, +- bitmapY, +- true); +- +- textX += page.bitmap.GetWidth() + padding; +- } +- +- wxCoord textW, textH, textY; +- +-#if wxCHECK_VERSION(3, 0, 0) +- dc.SetFont(m_normalFont); +-#else +- dc.SetFont(m_normal_font); +-#endif +- dc.GetTextExtent(page.caption, &textW, &textH); +- textY = tab_rect.y + (tab_rect.height - textH) / 2; +- if(!page.active) +- { +- if (tab_pos == wxAUI_NB_TOP) +- textY += m_Ythickness / 2; +- else +- textY -= m_Ythickness / 2; +- } +- +- // draw tab text +- GdkColor text_colour = page.active ? style_notebook->fg[GTK_STATE_NORMAL] : style_notebook->fg[GTK_STATE_ACTIVE]; +- dc.SetTextForeground(wxColor(text_colour)); +- GdkRectangle focus_area; +- +- int padding_focus = padding - focus_width; +- focus_area.x = tab_rect.x + padding_focus; +- focus_area.y = textY - focus_width; +- focus_area.width = tab_rect.width - 2 * padding_focus; +- focus_area.height = textH + 2 * focus_width; +- +- if(page.active && (wnd->FindFocus() == wnd) && focus_area.x <= (area.x + area.width)) +- { +- // clipping seems not to work here, so we we have to recalc the focus-area manually +- if((focus_area.x + focus_area.width) > (area.x + area.width)) +- focus_area.width = area.x + area.width - focus_area.x + focus_width - m_TabVBorder; +- gtk_paint_focus (style_notebook, pWin, +- GTK_STATE_ACTIVE, NULL, widget, "tab", +- focus_area.x, focus_area.y, focus_area.width, focus_area.height); +- } +- +- dc.DrawText(page.caption, textX, textY); +- +- // draw close-button on tab (if enabled) +- if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) +- { +- wxRect rect(tab_rect.x, tab_rect.y, tab_rect.width - m_Xthickness, tab_rect.height); +- if(!page.active) +- { +- if (tab_pos == wxAUI_NB_TOP) +- rect.y += m_Ythickness / 2; +- else +- rect.y -= m_Ythickness / 2; +- } +- *out_button_rect = DrawCloseButton(dc, widget, close_button_state, rect, wxRIGHT, &area); +- } +- +- tab_rect.width = std::min(tab_rect.width, clip_width); +- *out_tab_rect = tab_rect; +- +- dc.DestroyClippingRegion(); +-} +- +-wxRect DrawSimpleArrow(wxDC& dc, +- GtkWidget *widget, +- int button_state, +- wxRect const &in_rect, +- int orientation, +- GtkArrowType arrow_type) +-{ +- int scroll_arrow_hlength, scroll_arrow_vlength; +- gtk_widget_style_get(widget, +- "scroll-arrow-hlength", &scroll_arrow_hlength, +- "scroll-arrow-vlength", &scroll_arrow_vlength, +- NULL); +- +- GtkStateType state; +- GtkShadowType shadow; +- ButtonStateAndShadow(button_state, state, shadow); +- +- wxRect out_rect; +- +- if (orientation == wxLEFT) +- out_rect.x = in_rect.x; +- else +- out_rect.x = in_rect.x + in_rect.width - scroll_arrow_hlength; +- out_rect.y = (in_rect.y + in_rect.height - 3 * get_style_notebook()->ythickness - scroll_arrow_vlength) / 2; +- out_rect.width = scroll_arrow_hlength; +- out_rect.height = scroll_arrow_vlength; +- +-#if wxCHECK_VERSION(3, 0, 0) +- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); +- GdkWindow* pWin = impldc->GetGDKWindow(); +-#else +- GdkWindow* pWin = dc.GetGDKWindow(); +-#endif +- gtk_paint_arrow (get_style_button(), pWin, state, shadow, nullptr, widget, "notebook", +- arrow_type, TRUE, out_rect.x, out_rect.y, out_rect.width, out_rect.height); +- +- return out_rect; +-} +- +-void NbStyleGTK::DrawButton(wxDC& dc, wxWindow* wnd, +- const wxRect& in_rect, +- int bitmap_id, +- int button_state, +- int orientation, +- wxRect* out_rect) +-{ +- GtkWidget *widget = wnd->GetHandle(); +- wxRect rect = in_rect; +- if (m_flags &wxAUI_NB_BOTTOM) +- rect.y += 2 * get_style_button()->ythickness; +- +- switch (bitmap_id) +- { +- case wxAUI_BUTTON_CLOSE: +- rect.y -= 2 * get_style_button()->ythickness; +- rect = DrawCloseButton(dc, widget, button_state, rect, orientation, NULL); +- break; +- +- case wxAUI_BUTTON_LEFT: +- rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_LEFT); +- break; +- +- case wxAUI_BUTTON_RIGHT: +- rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_RIGHT); +- break; +- +- case wxAUI_BUTTON_WINDOWLIST: +- { +- rect.height -= 4 * get_style_button()->ythickness; +- rect.width = rect.height; +- rect.x = in_rect.x + in_rect.width - rect.width; +- +- if (button_state == wxAUI_BUTTON_STATE_HOVER) +- wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_CURRENT); +- else if (button_state == wxAUI_BUTTON_STATE_PRESSED) +- wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_PRESSED); +- else +- wxRendererNative::Get().DrawDropArrow(wnd, dc, rect); +- } +- break; +- +- default: +- break; +- } +- +- *out_rect = rect; +-} +- +- +-int NbStyleGTK::GetBestTabCtrlSize(wxWindow* wnd, +- const wxAuiNotebookPageArray& pages, +- const wxSize& required_bmp_size) +-{ +-#if wxCHECK_VERSION(3, 0, 0) +- SetMeasuringFont(m_normalFont); +- SetSelectedFont(m_normalFont); +-#else +- SetMeasuringFont(m_normal_font); +- SetSelectedFont(m_normal_font); +-#endif +- int tab_height = 3 * get_style_notebook()->ythickness + wxAuiDefaultTabArt::GetBestTabCtrlSize(wnd, pages, required_bmp_size); +- return tab_height; +-} +- +-wxSize NbStyleGTK::GetTabSize(wxDC& dc, +- wxWindow* wnd, +- const wxString& caption, +- const wxBitmap& bitmap, +- bool active, +- int close_button_state, +- int* x_extent) +-{ +- wxSize s = wxAuiDefaultTabArt::GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent); +- +- int overlap = 0; +- gtk_widget_style_get (wnd->GetHandle(), +- "focus-line-width", &overlap, +- NULL); +- *x_extent -= overlap; +- return s; +-} +- +-#endif // #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +diff --git a/src/src/notebookstyles.h b/src/src/notebookstyles.h +index 1a4942847..36f84139a 100644 +--- a/src/src/notebookstyles.h ++++ b/src/src/notebookstyles.h +@@ -8,14 +8,6 @@ + + #include "cbauibook.h" + +-#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +- #define GSocket GLibSocket +- #include +- #undef GSocket +- #include +-#endif +- +- + class wxDC; + class wxWindow; + class wxRect; +@@ -53,35 +45,4 @@ class NbStyleFF2 : public wxAuiDefaultTabArt + const wxSize& required_bmp_size) override; + }; + +-#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +-class NbStyleGTK : public wxAuiDefaultTabArt +-{ +-public: +- NbStyleGTK(); +- +- virtual wxAuiTabArt* Clone(); +- virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect); +- virtual void DrawTab(wxDC& dc, +- wxWindow* wnd, +- const wxAuiNotebookPage& page, +- const wxRect& in_rect, +- int close_button_state, +- wxRect* out_tab_rect, +- wxRect* out_button_rect, +- int* x_extent); +- void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, int bitmap_id, +- int button_state, int orientation, wxRect* out_rect); +- int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, +- const wxSize& required_bmp_size); +- virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmap& bitmap, bool active, +- int close_button_state, int* x_extent); +-private: +- int m_Xthickness; +- int m_Ythickness; +- int m_TabHBorder; +- int m_TabVBorder; +- wxBitmap m_ActiveCloseButton; +-}; +-#endif // #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) +- + #endif // NOTEBOOKSTYLES_H +diff --git a/src/src/projectmanagerui.cpp b/src/src/projectmanagerui.cpp +index 05718ef60..18b2dcecf 100644 +--- a/src/src/projectmanagerui.cpp ++++ b/src/src/projectmanagerui.cpp +@@ -1875,11 +1875,7 @@ struct cbStringHash + { + size_t operator()(const wxString& s) const + { +-#if wxCHECK_VERSION(3, 0, 0) + return std::hash()(s.ToStdWstring()); +-#else +- return std::hash()(s.wc_str()); +-#endif // wxCHECK_VERSION + } + }; + diff --git a/programming/environment/codeblocks/files/codeblocks-gcc11.patch b/programming/environment/codeblocks/files/codeblocks-gcc11.patch new file mode 100644 index 0000000000..760a8e1ec3 --- /dev/null +++ b/programming/environment/codeblocks/files/codeblocks-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h +index 7fd7a95..87b08ee 100644 +--- a/src/plugins/openfileslist/openfileslistplugin.h ++++ b/src/plugins/openfileslist/openfileslistplugin.h +@@ -23,7 +23,7 @@ struct TargetFilesData + // Functor for the std::set predicate to sort the opened editor files according to their tab order + struct compareLess + { +- bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) { return lhs->editorTabPos < rhs->editorTabPos; } ++ bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) const { return lhs->editorTabPos < rhs->editorTabPos; } + }; + typedef std::set OpenFilesSet; + ProjectFile* activeFile; diff --git a/programming/environment/codeblocks/files/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch b/programming/environment/codeblocks/files/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch new file mode 100644 index 0000000000..de7b228d22 --- /dev/null +++ b/programming/environment/codeblocks/files/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch @@ -0,0 +1,54 @@ +From dbdf5c5ea9e3161233f0588a7616b7e4fedc7870 Mon Sep 17 00:00:00 2001 +From: mortenmacfly +Date: Sat, 3 Apr 2021 05:14:39 +0000 +Subject: [PATCH] * applied patch #1079 Don't call wxChoice::GetString() with + wxNOT_FOUND (thanks Miguel Gimenez) + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12312 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + .../FileManager/FileExplorerUpdater.cpp | 20 +++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp b/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp +index 5a0b3a9ee..9dee80696 100644 +--- a/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp ++++ b/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp +@@ -150,10 +150,16 @@ void FileExplorerUpdater::Update(const wxTreeItemId &ti) + m_path=wxString(m_fe->GetFullPath(ti).c_str()); + m_wildcard=wxString(m_fe->m_WildCards->GetValue().c_str()); + m_vcs_type=wxString(m_fe->m_VCS_Type->GetLabel().c_str()); +- m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str()); ++ const int selection = m_fe->m_VCS_Control->GetSelection(); ++ if (selection == wxNOT_FOUND) ++ m_vcs_commit_string.clear(); ++ else ++ m_vcs_commit_string = wxString(m_fe->m_VCS_Control->GetString(selection).c_str()); ++ + m_vcs_changes_only = m_fe->m_VCS_ChangesOnly->IsChecked(); +- if (m_vcs_type != wxEmptyString) ++ if (!m_vcs_type.empty()) + m_repo_path=wxString(m_fe->GetRootFolder().c_str()); ++ + GetTreeState(ti); + if (Create()==wxTHREAD_NO_ERROR) + { +@@ -1262,11 +1268,17 @@ void VCSFileLoader::Update(const wxString &op, const wxString &source_path, cons + m_source_path=wxString(source_path.c_str()); + m_destination_path=wxString(destination_path.c_str()); + m_vcs_type=wxString(m_fe->m_VCS_Type->GetLabel().c_str()); +- m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str()); ++ const int selection = m_fe->m_VCS_Control->GetSelection(); ++ if (selection == wxNOT_FOUND) ++ m_vcs_commit_string.clear(); ++ else ++ m_vcs_commit_string = wxString(m_fe->m_VCS_Control->GetString(selection).c_str()); ++ + m_vcs_op = wxString(op.c_str()); + m_vcs_comp_commit = wxString(comp_commit.c_str()); +- if (m_vcs_type != wxEmptyString) ++ if (!m_vcs_type.empty()) + m_repo_path=wxString(m_fe->GetRootFolder().c_str()); ++ + if (Create()==wxTHREAD_NO_ERROR) + { + SetPriority(20); diff --git a/programming/environment/codeblocks/files/f2f127cf5cd97c7da6a957a3f7764cb25cc9017e.patch b/programming/environment/codeblocks/files/f2f127cf5cd97c7da6a957a3f7764cb25cc9017e.patch new file mode 100644 index 0000000000..89b6f9be48 --- /dev/null +++ b/programming/environment/codeblocks/files/f2f127cf5cd97c7da6a957a3f7764cb25cc9017e.patch @@ -0,0 +1,70 @@ +From f2f127cf5cd97c7da6a957a3f7764cb25cc9017e Mon Sep 17 00:00:00 2001 +From: fuscated +Date: Tue, 16 Mar 2021 23:28:35 +0000 +Subject: [PATCH] * UI: Add display info in the Help -> About -> Information + dialog + +> There are many reports of people having trouble with either multi monitor + setups or HiDPI setups. It would be a lot easier if they could gather + the information form one single place. +> Note0: The scaling factors are based on the scaling factors of the About + dialog. In a system which supports monitors with different PPIs it might + report the incorrect value. +> Note1: wxGetDisplayPPI is also some global and not per display. + +git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12305 2a5c6006-c6dd-42ca-98ab-0921f2732cef +--- + src/src/dlgabout.cpp | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/src/src/dlgabout.cpp b/src/src/dlgabout.cpp +index 2afeeabac..1df51142a 100644 +--- a/src/src/dlgabout.cpp ++++ b/src/src/dlgabout.cpp +@@ -31,6 +31,7 @@ + + #include + #include // wxMemoryDC ++#include + #include + + #include "appglobals.h" +@@ -164,10 +165,38 @@ dlgAbout::dlgAbout(wxWindow* parent) + items.push_back({_("Version"), appglobals::AppActualVersion}); + items.push_back({_("SDK Version"), appglobals::AppSDKVersion}); + items.push_back({_("Scintilla Version"), scintillaStr}); ++ + items.push_back({_("Author"), _("The Code::Blocks Team")}); + items.push_back({_("E-mail"), appglobals::AppContactEmail}); + items.push_back({_("Website"), appglobals::AppUrl}); + ++ items.push_back({_("Scaling factor"), wxString::Format("%f", GetContentScaleFactor())}); ++ items.push_back({_("Detected scaling factor"), ++ wxString::Format("%f", cbGetActualContentScaleFactor(*this))}); ++ const wxSize displayPPI = wxGetDisplayPPI(); ++ items.push_back({_("Display PPI"), wxString::Format("%dx%d", displayPPI.x, displayPPI.y)}); ++ ++ unsigned displays = wxDisplay::GetCount(); ++ items.push_back({_("Display count"), wxString::Format("%u", displays)}); ++ ++ for (unsigned ii = 0; ii < displays; ++ii) ++ { ++ wxDisplay display(ii); ++ ++ Item item; ++ item.name = wxString::Format(_("Display %u"), ii); ++ ++ const wxString &name = display.GetName(); ++ if (!name.empty()) ++ item.name += " (" + name + ")"; ++ ++ const wxRect geometry = display.GetGeometry(); ++ item.value= wxString::Format(_("XY=[%d,%d]; Size=[%d,%d]; %s"), geometry.GetLeft(), ++ geometry.GetTop(), geometry.GetWidth(), geometry.GetHeight(), ++ (display.IsPrimary() ? _("Primary") : wxString())); ++ items.push_back(item); ++ } ++ + int maxNameLength = 0; + for (const Item &item : items) + { diff --git a/programming/environment/codeblocks/files/sc_wxtypes-normalize.patch b/programming/environment/codeblocks/files/sc_wxtypes-normalize.patch new file mode 100644 index 0000000000..b84a5aef18 --- /dev/null +++ b/programming/environment/codeblocks/files/sc_wxtypes-normalize.patch @@ -0,0 +1,13 @@ +diff --git a/src/sdk/scripting/bindings/sc_wxtypes.cpp b/src/sdk/scripting/bindings/sc_wxtypes.cpp +index 33cd09850..9a162bf9a 100644 +--- a/src/sdk/scripting/bindings/sc_wxtypes.cpp ++++ b/src/sdk/scripting/bindings/sc_wxtypes.cpp +@@ -389,7 +389,6 @@ namespace ScriptBindings + func(&wxFileName::IsDir, "IsDir"). + func(&wxFileName::MakeAbsolute, "MakeAbsolute"). + func(&wxFileName::MakeRelativeTo, "MakeRelativeTo"). +- func(&wxFileName::Normalize, "Normalize"). + func(&wxFileName::PrependDir, "PrependDir"). + func(&wxFileName::RemoveDir, "RemoveDir"). + func(&wxFileName::RemoveLastDir, "RemoveLastDir"). + diff --git a/programming/environment/codeblocks/pspec.xml b/programming/environment/codeblocks/pspec.xml index a6a57810a2..6a869d209b 100644 --- a/programming/environment/codeblocks/pspec.xml +++ b/programming/environment/codeblocks/pspec.xml @@ -1,85 +1,81 @@ - - codeblocks http://www.codeblocks.org/ - Pisi Linux Community - admins@pisilinux.org + Mustafa Cinasal + muscnsl@gmail.com - programming.environment GPLv3 - codeblocks + programming.environment app:gui + codeblocks A free C++ IDE built to meet the most demanding needs of its users Code::Blocks is a free C++ IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable. https://sourceforge.net/projects/codeblocks/files/Sources/20.03/codeblocks-20.03.tar.xz - fontconfig-devel - hunspell-devel + bzip2 + zlib-devel + tinyxml-devel boost-devel + fontconfig-devel gamin-devel - wxGTK-devel glib2-devel gtk3-devel + hunspell-devel + wxGTK-devel wxGTK3 - - - - + codeblocks-gcc11.patch + 04b7c50fb8c6a29b2d84579ee448d2498414d855.patch + 2345b020b862ec855038dd32a51ebb072647f28d.patch + 40eb88e3f2b933f19f9933e06c8d0899c54f5e25.patch + 46720043319758cb0e798eb23520063583c40eaa.patch + 8035dfdff321754819f79e3165401aa59bd8c7f7.patch + a4aacc92640b587ad049cd6aa68c637e536e9ab5.patch + c28746f4887f10e6f9f10eeafae0fb22ecdbf9c7.patch + dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch + f2f127cf5cd97c7da6a957a3f7764cb25cc9017e.patch + 29315df024251850832583f73e67e515dae10830.patch + + + 9a9c6a9d5e3e0f6eff5594ecd61a2222f073be9c.patch + b2e4f1279804e1d11b71bc75eeb37072c3589296.patch + sc_wxtypes-normalize.patch - codeblocks A free C++ IDE built to meet the most demanding needs of its users - wxGTK-common + bzip2 + zlib + tinyxml fontconfig - hunspell - wxBase - wxGTK3 - wxGTK gamin glib2 gtk3 - + hunspell + wxBase + wxGTK + wxGTK-common + wxGTK3 + /usr/bin + /usr/lib + /usr/share/appdata /usr/share/applications /usr/share/codeblocks - /usr/share/appdata - /usr/share/pixmaps - /usr/share/icons - /usr/share/mime - /usr/bin /usr/share/doc + /usr/share/icons /usr/share/man - /usr/lib + /usr/share/mime + /usr/share/pixmaps + /usr/share/metainfo - codeblocks-devel Development files of codeblocks @@ -91,7 +87,6 @@ /usr/lib/pkgconfig - 2022-07-28 diff --git a/programming/environment/codeblocks/translations.xml b/programming/environment/codeblocks/translations.xml index c020a80114..ad36bffc36 100644 --- a/programming/environment/codeblocks/translations.xml +++ b/programming/environment/codeblocks/translations.xml @@ -1,14 +1,11 @@ - codeblocks C++ için bütünleşik geliştirme araçlarını barındıran özgür yazılım Code::Blocks, yazılımcıların en çok ihtiyaç duydukları özellikleri sağlayan, tamamen kişiselleştirilebilen ve geliştirilebilen C++ editörüdür. - codeblocks-devel codeblocks paketlerine ait geliştirme dosyaları - codeblocks-devel, codeblocks için geliştirme dosyalarını içerir. - \ No newline at end of file + diff --git a/server/ntp/comar/ntpdate-service.py b/server/ntp/comar/ntpdate-service.py index a4df66bfcc..0e88142797 100644 --- a/server/ntp/comar/ntpdate-service.py +++ b/server/ntp/comar/ntpdate-service.py @@ -52,7 +52,7 @@ def start(): # Eventhough the ntpdate is a oneshot process, the pidfile hack is used to # work around COMAR's silly status() check in startService() startService(command="/usr/sbin/ntpdate", - args="%s %s" % (config.get("OPTIONS", "-u ntp -s -b"), tickers), + args="%s %s" % (config.get("OPTIONS", "-q -n -g -u ntp:ntp -s -b"), tickers), makepid=True, pidfile=PIDFILE, donotify=True)