codeblocks: moved from contrib
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 22a4af265c78c2d0000c7f234d15b8bf5ff8b2c4 Mon Sep 17 00:00:00 2001
|
||||
From: fuscated <fuscated@2a5c6006-c6dd-42ca-98ab-0921f2732cef>
|
||||
Date: Wed, 12 Jun 2019 19:11:23 +0000
|
||||
Subject: [PATCH] * UI: Fix crash if the list in Settings->Scripting is empty
|
||||
(ticket 842)
|
||||
|
||||
git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11739 2a5c6006-c6dd-42ca-98ab-0921f2732cef
|
||||
---
|
||||
src/src/scriptingsettingsdlg.cpp | 25 ++++++++++++++++---------
|
||||
1 file changed, 16 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/src/scriptingsettingsdlg.cpp b/src/src/scriptingsettingsdlg.cpp
|
||||
index 5cb23aaf4..a7f58f0cb 100644
|
||||
--- a/src/src/scriptingsettingsdlg.cpp
|
||||
+++ b/src/src/scriptingsettingsdlg.cpp
|
||||
@@ -101,16 +101,23 @@ void ScriptingSettingsDlg::UpdateState()
|
||||
wxListCtrl* list = XRCCTRL(*this, "chkStartupScripts", wxListCtrl);
|
||||
long sel = list->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
|
||||
- bool en = sel != -1;
|
||||
-
|
||||
- const ScriptEntry& se = m_ScriptsVector[sel];
|
||||
+ bool hasSelection = false;
|
||||
+ bool enabled = false;
|
||||
+ bool registered = false;
|
||||
+ if (sel >= 0 && sel < long(m_ScriptsVector.size()))
|
||||
+ {
|
||||
+ const ScriptEntry& se = m_ScriptsVector[sel];
|
||||
+ enabled = se.enabled;
|
||||
+ registered = se.registered;
|
||||
+ hasSelection = true;
|
||||
+ }
|
||||
|
||||
- XRCCTRL(*this, "btnDelete", wxButton)->Enable(en);
|
||||
- XRCCTRL(*this, "chkEnableScript", wxCheckBox)->Enable(en);
|
||||
- XRCCTRL(*this, "txtScript", wxTextCtrl)->Enable(en && se.enabled);
|
||||
- XRCCTRL(*this, "btnBrowseScript", wxButton)->Enable(en && se.enabled);
|
||||
- XRCCTRL(*this, "chkRegisterScript", wxCheckBox)->Enable(en && se.enabled);
|
||||
- XRCCTRL(*this, "txtScriptMenu", wxTextCtrl)->Enable(en && se.enabled && se.registered);
|
||||
+ XRCCTRL(*this, "btnDelete", wxButton)->Enable(hasSelection);
|
||||
+ XRCCTRL(*this, "chkEnableScript", wxCheckBox)->Enable(hasSelection);
|
||||
+ XRCCTRL(*this, "txtScript", wxTextCtrl)->Enable(hasSelection && enabled);
|
||||
+ XRCCTRL(*this, "btnBrowseScript", wxButton)->Enable(hasSelection && enabled);
|
||||
+ XRCCTRL(*this, "chkRegisterScript", wxCheckBox)->Enable(hasSelection && enabled);
|
||||
+ XRCCTRL(*this, "txtScriptMenu", wxTextCtrl)->Enable(hasSelection && enabled && registered);
|
||||
}
|
||||
|
||||
void ScriptingSettingsDlg::FillTrusts()
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
Index: src/mime/codeblocks.desktop
|
||||
===================================================================
|
||||
--- src/mime/codeblocks.desktop.orig
|
||||
+++ src/mime/codeblocks.desktop
|
||||
@@ -3,6 +3,7 @@ Version=1.0
|
||||
Type=Application
|
||||
Name=Code::Blocks IDE
|
||||
Comment=Configurable and extensible IDE
|
||||
+Comment[tr]=Yapılandırılabilir ve eklentilerle genişletilebilir IDE
|
||||
Exec=codeblocks %F
|
||||
Icon=codeblocks
|
||||
Terminal=false
|
||||
@@ -0,0 +1,127 @@
|
||||
--- codeblocks-12.11release8629-orig/src/plugins/debuggergdb/gdb_driver.cpp 2012-11-23 20:58:15.000000000 +0200
|
||||
+++ codeblocks-12.11release8629/src/plugins/debuggergdb/gdb_driver.cpp 2013-01-23 00:16:51.780265717 +0200
|
||||
@@ -213,105 +213,6 @@
|
||||
m_pTarget = target;
|
||||
}
|
||||
|
||||
-void GDB_driver::Prepare(bool isConsole, int printElements)
|
||||
-{
|
||||
- // default initialization
|
||||
-
|
||||
- // for the possibility that the program to be debugged is compiled under Cygwin
|
||||
- if (platform::windows)
|
||||
- DetectCygwinMount();
|
||||
-
|
||||
- // make sure we 're using the prompt that we know and trust ;)
|
||||
- QueueCommand(new DebuggerCmd(this, wxString(_T("set prompt ")) + FULL_GDB_PROMPT));
|
||||
-
|
||||
- // debugger version
|
||||
- QueueCommand(new DebuggerCmd(this, _T("show version")));
|
||||
- // no confirmation
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set confirm off")));
|
||||
- // no wrapping lines
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set width 0")));
|
||||
- // no pagination
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set height 0")));
|
||||
- // allow pending breakpoints
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set breakpoint pending on")));
|
||||
- // show pretty function names in disassembly
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set print asm-demangle on")));
|
||||
- // unwind stack on signal
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set unwindonsignal on")));
|
||||
- // disalbe result string truncations
|
||||
- QueueCommand(new DebuggerCmd(this, wxString::Format(wxT("set print elements %d"), printElements)));
|
||||
-
|
||||
- if (platform::windows && isConsole)
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set new-console on")));
|
||||
-
|
||||
- flavour = m_pDBG->GetActiveConfigEx().GetDisassemblyFlavorCommand();
|
||||
- QueueCommand(new DebuggerCmd(this, flavour));
|
||||
-
|
||||
- if (m_pDBG->GetActiveConfigEx().GetFlag(DebuggerConfiguration::CatchExceptions))
|
||||
- {
|
||||
- m_catchThrowIndex = -1;
|
||||
- // catch exceptions
|
||||
- QueueCommand(new GdbCmd_SetCatch(this, wxT("throw"), &m_catchThrowIndex));
|
||||
- }
|
||||
-
|
||||
- // define all scripted types
|
||||
- m_Types.Clear();
|
||||
- InitializeScripting();
|
||||
-
|
||||
- // pass user init-commands
|
||||
- wxString init = m_pDBG->GetActiveConfigEx().GetInitCommands();
|
||||
- Manager::Get()->GetMacrosManager()->ReplaceMacros(init);
|
||||
- // commands are passed in one go, in case the user defines functions in there
|
||||
- // or else it would lock up...
|
||||
- QueueCommand(new DebuggerCmd(this, init));
|
||||
-// wxArrayString initCmds = GetArrayFromString(init, _T('\n'));
|
||||
-// for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
|
||||
-// {
|
||||
-// QueueCommand(new DebuggerCmd(this, initCmds[i]));
|
||||
-// }
|
||||
-
|
||||
- // add search dirs
|
||||
- for (unsigned int i = 0; i < m_Dirs.GetCount(); ++i)
|
||||
- QueueCommand(new GdbCmd_AddSourceDir(this, m_Dirs[i]));
|
||||
-
|
||||
- // set arguments
|
||||
- if (!m_Args.IsEmpty())
|
||||
- QueueCommand(new DebuggerCmd(this, _T("set args ") + m_Args));
|
||||
-
|
||||
- RemoteDebugging* rd = GetRemoteDebuggingInfo();
|
||||
-
|
||||
- // send additional gdb commands before establishing remote connection
|
||||
- if (rd)
|
||||
- {
|
||||
- if (!rd->additionalCmdsBefore.IsEmpty())
|
||||
- {
|
||||
- wxArrayString initCmds = GetArrayFromString(rd->additionalCmdsBefore, _T('\n'));
|
||||
- for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
|
||||
- QueueCommand(new DebuggerCmd(this, initCmds[i]));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // if performing remote debugging, now is a good time to try and connect to the target :)
|
||||
- if (rd && rd->IsOk())
|
||||
- {
|
||||
- if (rd->connType == RemoteDebugging::Serial)
|
||||
- QueueCommand(new GdbCmd_RemoteBaud(this, rd->serialBaud));
|
||||
- QueueCommand(new GdbCmd_RemoteTarget(this, rd));
|
||||
- }
|
||||
-
|
||||
- // run per-target additional commands (remote debugging)
|
||||
- // moved after connection to remote target (if any)
|
||||
- if (rd)
|
||||
- {
|
||||
- if (!rd->additionalCmds.IsEmpty())
|
||||
- {
|
||||
- wxArrayString initCmds = GetArrayFromString(rd->additionalCmds, _T('\n'));
|
||||
- for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
|
||||
- QueueCommand(new DebuggerCmd(this, initCmds[i]));
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
// remote debugging
|
||||
RemoteDebugging* GDB_driver::GetRemoteDebuggingInfo()
|
||||
{
|
||||
@@ -629,17 +530,6 @@
|
||||
QueueCommand(new DebuggerInfoCmd(this, _T("info signals"), _("Signals handling")));
|
||||
}
|
||||
|
||||
-void GDB_driver::EnableCatchingThrow(bool enable)
|
||||
-{
|
||||
- if (enable)
|
||||
- QueueCommand(new GdbCmd_SetCatch(this, wxT("throw"), &m_catchThrowIndex));
|
||||
- else if (m_catchThrowIndex != -1)
|
||||
- {
|
||||
- QueueCommand(new DebuggerCmd(this, wxString::Format(wxT("delete %d"), m_catchThrowIndex)));
|
||||
- m_catchThrowIndex = -1;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
void GDB_driver::SwitchThread(size_t threadIndex)
|
||||
{
|
||||
ResetCursor();
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
--- codeblocks-12.11release8629-orig/src/plugins/debuggergdb/parsewatchvalue.cpp 2012-11-23 20:58:15.000000000 +0200
|
||||
+++ codeblocks-12.11release8629/src/plugins/debuggergdb/parsewatchvalue.cpp 2013-01-22 22:03:44.591542259 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
};
|
||||
|
||||
wxRegEx regexRepeatedChars(wxT("^((\\\\'.{1,6}\\\\')|('.{1,6}'))[ \\t](<repeats[ \\t][0-9]+[ \\t]times>)"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
--- codeblocks-12.11release8629-orig/src/plugins/debuggergdb/gdb_commands.h 2012-11-23 20:58:15.000000000 +0200
|
||||
+++ codeblocks-12.11release8629/src/plugins/debuggergdb/gdb_commands.h 2013-01-22 22:22:52.220502525 +0200
|
||||
@@ -201,13 +201,13 @@
|
||||
//static wxRegEx reStepI(_T("\x1a\x1a.*?:([0-9]*):([0-9]*):(.*?):(.*)"));
|
||||
//static wxRegEx reStepI(_T("\x1a\x1a(([a-zA-Z]:)?.*?):([0-9]*):([0-9]*):(middle|beg):(.*)"));
|
||||
static wxRegEx reStepI(wxT("(((.*)[a-zA-Z]:)?.*)?:(\\d+):(middle|beg):(.*)"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
#endif
|
||||
static wxRegEx reStepI2(_T("\\A(0x[A-Fa-f0-9]+)\\s+(\\d+)\\s+in (.*)"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
@@ -216,7 +216,7 @@
|
||||
static wxRegEx reStepI4(_T("^(0x[A-Fa-f0-9]+) in (.*)? at (.*)"));
|
||||
|
||||
static wxRegEx reNextI(_T("\x1a\x1a(([a-zA-Z]:)?.*?):([0-9]*):([0-9]*):(middle|beg):(.*)"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
@@ -627,36 +627,6 @@
|
||||
};
|
||||
|
||||
/**
|
||||
- * Command to setup an exception breakpoint (for a throw or a catch).
|
||||
- */
|
||||
-class GdbCmd_SetCatch : public DebuggerCmd
|
||||
-{
|
||||
- wxString m_type;
|
||||
- int *m_resultIndex;
|
||||
- wxRegEx m_regExp;
|
||||
- public:
|
||||
- GdbCmd_SetCatch(DebuggerDriver *driver, const wxString &type, int *resultIndex) :
|
||||
- DebuggerCmd(driver),
|
||||
- m_type(type),
|
||||
- m_resultIndex(resultIndex),
|
||||
- m_regExp(wxT("^Catchpoint[ \\t]([0-9]+)[ \\t]\\(") + type + wxT("\\)$"), wxRE_ADVANCED)
|
||||
- {
|
||||
- m_Cmd = wxT("catch ") + type;
|
||||
- }
|
||||
-
|
||||
- void ParseOutput(const wxString& output)
|
||||
- {
|
||||
- if (m_regExp.Matches(output))
|
||||
- {
|
||||
- long index;
|
||||
- m_regExp.GetMatch(output, 1).ToLong(&index);
|
||||
- *m_resultIndex = index;
|
||||
- }
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-
|
||||
-/**
|
||||
* Command that notifies the debugger plugin that the debuggee has been continued
|
||||
*/
|
||||
class GdbCmd_Continue : public DebuggerContinueBaseCmd
|
||||
@@ -0,0 +1,80 @@
|
||||
Index: src/sdk/macrosmanager.cpp
|
||||
===================================================================
|
||||
--- src/sdk/macrosmanager.cpp (revision 7665)
|
||||
+++ src/sdk/macrosmanager.cpp (working copy)
|
||||
@@ -86,19 +86,19 @@
|
||||
m_RE_IfSp.Compile(_T("[^=!<>]+|(([^=!<>]+)[ ]*(=|==|!=|>|<|>=|<=)[ ]*([^=!<>]+))"), wxRE_EXTENDED | wxRE_NEWLINE);
|
||||
m_RE_Script.Compile(_T("(\\[\\[(.*)\\]\\])"), wxRE_EXTENDED | wxRE_NEWLINE);
|
||||
m_RE_ToAbsolutePath.Compile(_T("\\$TO_ABSOLUTE_PATH{([^}]*)}"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
#endif
|
||||
m_RE_To83Path.Compile(_T("\\$TO_83_PATH{([^}]*)}"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
#endif
|
||||
m_RE_RemoveQuotes.Compile(_T("\\$REMOVE_QUOTES{([^}]*)}"),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
Index: src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp
|
||||
===================================================================
|
||||
--- src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp (revision 7665)
|
||||
+++ src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp (working copy)
|
||||
@@ -206,7 +206,12 @@
|
||||
|
||||
void PipedProcessCtrl::ParseLinks(int lineno, int lastline)
|
||||
{
|
||||
- wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
|
||||
+ #ifdef wxHAS_REGEX_ADVANCED
|
||||
+ wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
|
||||
+ #else
|
||||
+ wxRegEx re(m_linkregex,wxRE_EXTENDED|wxRE_NEWLINE);
|
||||
+ #endif
|
||||
+
|
||||
while(lineno<lastline)
|
||||
{
|
||||
int col=0;
|
||||
@@ -305,7 +310,11 @@
|
||||
wxString text=m_textctrl->GetTextRange(start,end+1);
|
||||
|
||||
//retrieve the file and line number parts of the link
|
||||
- wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
|
||||
+ #ifdef wxHAS_REGEX_ADVANCED
|
||||
+ wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
|
||||
+ #else
|
||||
+ wxRegEx re(m_linkregex,wxRE_EXTENDED|wxRE_NEWLINE);
|
||||
+ #endif
|
||||
wxString file;
|
||||
long line;
|
||||
if(!re.Matches(text))
|
||||
Index: src/plugins/contrib/DoxyBlocks/Expressions.h
|
||||
===================================================================
|
||||
--- src/plugins/contrib/DoxyBlocks/Expressions.h (revision 7665)
|
||||
+++ src/plugins/contrib/DoxyBlocks/Expressions.h (working copy)
|
||||
@@ -84,7 +84,7 @@
|
||||
"([^)]*)?" // The function's parameters.
|
||||
"\\)" // The closing parenthesis.
|
||||
),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
@@ -104,7 +104,7 @@
|
||||
"([^)]*)?" // The function's parameters.
|
||||
"\\)" // The closing parenthesis.
|
||||
),
|
||||
-#ifndef __WXMAC__
|
||||
+#ifdef wxHAS_REGEX_ADVANCED
|
||||
wxRE_ADVANCED);
|
||||
#else
|
||||
wxRE_EXTENDED);
|
||||
Reference in New Issue
Block a user