- 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:
royqh1979@gmail.com 2021-10-12 19:39:24 +08:00
parent bb8b711376
commit 7eda4e35b3
6 changed files with 36 additions and 2 deletions

View File

@ -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

View File

@ -4,6 +4,7 @@
#include "editor.h"
#include "settings.h"
#include "widgets/cpudialog.h"
#include "systemconsts.h"
#include <QFile>
#include <QFileInfo>
@ -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+1<mOutput.length()) && (mOutput[mIndex+1] == '\n')) // DOS
mIndex+=2;
else if (mOutput[mIndex] == '\r') // UNIX
mIndex++;
@ -1629,6 +1630,18 @@ void DebugReader::run()
mProcess = new QProcess();
mProcess->setProgram(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,

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);