diff --git a/NEWS.md b/NEWS.md index ea076421..fb3a8640 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,10 @@ Version 0.6.5 - implement: export as rtf / export as html - fix: the contents copied/exported are not correctly syntax colored - fix: stop execution if the source file is not compiled and user choose not to compile it + - fix: not correctly parse gdb's output + - fix: path not correctly setted for the debugger process + - fix: indent line not correctly drawed + Version 0.6.4 - fix: code completion popup not show after '->' inputted diff --git a/RedPandaIDE/debugger.cpp b/RedPandaIDE/debugger.cpp index 7be4d33a..1a6f7510 100644 --- a/RedPandaIDE/debugger.cpp +++ b/RedPandaIDE/debugger.cpp @@ -4,6 +4,7 @@ #include "editor.h" #include "settings.h" #include "widgets/cpudialog.h" +#include "systemconsts.h" #include #include @@ -792,7 +793,7 @@ QString DebugReader::getNextLine() if (mIndex>=mOutput.length()) return ""; // Skip ONE enter sequence (CRLF, CR, LF, etc.) - if ((mOutput[mIndex] == '\r') && (mOutput[mIndex] == '\n')) // DOS + if ((mOutput[mIndex] == '\r') && (mIndex+1setProgram(cmd); mProcess->setArguments(QProcess::splitCommand(arguments)); + QString cmdDir = extractFileDir(cmd); + if (!cmdDir.isEmpty()) { + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + QString path = env.value("PATH"); + if (path.isEmpty()) { + path = cmdDir; + } else { + path = cmdDir + PATH_SEPARATOR + path; + } + env.insert("PATH",path); + mProcess->setProcessEnvironment(env); + } mProcess->setWorkingDirectory(workingDir); connect(mProcess, &QProcess::errorOccurred, diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 3f29ed4f..20bc1409 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -3487,6 +3487,9 @@ void Editor::applySettings() setCaretUseTextColor(pSettings->editor().caretUseTextColor()); setCaretColor(pSettings->editor().caretColor()); + codeFolding().indentGuides = pSettings->editor().showIndentLines(); + codeFolding().indentGuidesColor = pSettings->editor().indentLineColor(); + QFont f=QFont(pSettings->editor().fontName(),pSettings->editor().fontSize()); f.setStyleStrategy(QFont::PreferAntialias); setFont(f); diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index cf906ccc..9d2c32bc 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -838,7 +838,7 @@ int SynEdit::getLineIndent(const QString &line) const { int indents = 0; for (QChar ch:line) { - switch(ch.digitValue()) { + switch(ch.unicode()) { case '\t': indents+=mTabWidth; break; diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 4ceb9781..99217cf9 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1976,6 +1976,19 @@ void Settings::CompilerSet::setDirectories(const QString& binDir) } } +int Settings::CompilerSet::mainVersion() +{ + int i = mVersion.indexOf('.'); + if (i<0) + return -1; + bool ok; + int num = mVersion.left(i).toInt(&ok); + if (!ok) + return -1; + return num; + +} + void Settings::CompilerSet::setUserInput() { mUseCustomCompileParams = false; diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h index fc99b1c8..2b3d89c7 100644 --- a/RedPandaIDE/settings.h +++ b/RedPandaIDE/settings.h @@ -875,6 +875,7 @@ public: void setOption(PCompilerOption& option, char valueChar); void setProperties(const QString& binDir); void setDirectories(const QString& binDir); + int mainVersion(); bool dirsValid(QString& msg); bool validateExes(QString& msg);