- 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
This commit is contained in:
parent
bb8b711376
commit
7eda4e35b3
4
NEWS.md
4
NEWS.md
|
@ -2,6 +2,10 @@ Version 0.6.5
|
||||||
- implement: export as rtf / export as html
|
- implement: export as rtf / export as html
|
||||||
- fix: the contents copied/exported are not correctly syntax colored
|
- 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: 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
|
Version 0.6.4
|
||||||
- fix: code completion popup not show after '->' inputted
|
- fix: code completion popup not show after '->' inputted
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "widgets/cpudialog.h"
|
#include "widgets/cpudialog.h"
|
||||||
|
#include "systemconsts.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -792,7 +793,7 @@ QString DebugReader::getNextLine()
|
||||||
if (mIndex>=mOutput.length())
|
if (mIndex>=mOutput.length())
|
||||||
return "";
|
return "";
|
||||||
// Skip ONE enter sequence (CRLF, CR, LF, etc.)
|
// Skip ONE enter sequence (CRLF, CR, LF, etc.)
|
||||||
if ((mOutput[mIndex] == '\r') && (mOutput[mIndex] == '\n')) // DOS
|
if ((mOutput[mIndex] == '\r') && (mIndex+1<mOutput.length()) && (mOutput[mIndex+1] == '\n')) // DOS
|
||||||
mIndex+=2;
|
mIndex+=2;
|
||||||
else if (mOutput[mIndex] == '\r') // UNIX
|
else if (mOutput[mIndex] == '\r') // UNIX
|
||||||
mIndex++;
|
mIndex++;
|
||||||
|
@ -1629,6 +1630,18 @@ void DebugReader::run()
|
||||||
mProcess = new QProcess();
|
mProcess = new QProcess();
|
||||||
mProcess->setProgram(cmd);
|
mProcess->setProgram(cmd);
|
||||||
mProcess->setArguments(QProcess::splitCommand(arguments));
|
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);
|
mProcess->setWorkingDirectory(workingDir);
|
||||||
|
|
||||||
connect(mProcess, &QProcess::errorOccurred,
|
connect(mProcess, &QProcess::errorOccurred,
|
||||||
|
|
|
@ -3487,6 +3487,9 @@ void Editor::applySettings()
|
||||||
setCaretUseTextColor(pSettings->editor().caretUseTextColor());
|
setCaretUseTextColor(pSettings->editor().caretUseTextColor());
|
||||||
setCaretColor(pSettings->editor().caretColor());
|
setCaretColor(pSettings->editor().caretColor());
|
||||||
|
|
||||||
|
codeFolding().indentGuides = pSettings->editor().showIndentLines();
|
||||||
|
codeFolding().indentGuidesColor = pSettings->editor().indentLineColor();
|
||||||
|
|
||||||
QFont f=QFont(pSettings->editor().fontName(),pSettings->editor().fontSize());
|
QFont f=QFont(pSettings->editor().fontName(),pSettings->editor().fontSize());
|
||||||
f.setStyleStrategy(QFont::PreferAntialias);
|
f.setStyleStrategy(QFont::PreferAntialias);
|
||||||
setFont(f);
|
setFont(f);
|
||||||
|
|
|
@ -838,7 +838,7 @@ int SynEdit::getLineIndent(const QString &line) const
|
||||||
{
|
{
|
||||||
int indents = 0;
|
int indents = 0;
|
||||||
for (QChar ch:line) {
|
for (QChar ch:line) {
|
||||||
switch(ch.digitValue()) {
|
switch(ch.unicode()) {
|
||||||
case '\t':
|
case '\t':
|
||||||
indents+=mTabWidth;
|
indents+=mTabWidth;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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()
|
void Settings::CompilerSet::setUserInput()
|
||||||
{
|
{
|
||||||
mUseCustomCompileParams = false;
|
mUseCustomCompileParams = false;
|
||||||
|
|
|
@ -875,6 +875,7 @@ public:
|
||||||
void setOption(PCompilerOption& option, char valueChar);
|
void setOption(PCompilerOption& option, char valueChar);
|
||||||
void setProperties(const QString& binDir);
|
void setProperties(const QString& binDir);
|
||||||
void setDirectories(const QString& binDir);
|
void setDirectories(const QString& binDir);
|
||||||
|
int mainVersion();
|
||||||
|
|
||||||
bool dirsValid(QString& msg);
|
bool dirsValid(QString& msg);
|
||||||
bool validateExes(QString& msg);
|
bool validateExes(QString& msg);
|
||||||
|
|
Loading…
Reference in New Issue