- change: highlight whole #define statement using one color
- enhancement: don't highlight '\' as error - enhancement: hide add charset option in project options dialog's compiler set page, when project compiler set is clang - fix: When generating project's makefile for clang, don't add -fexec-charset / -finput-charset command line options
This commit is contained in:
parent
d2a09dea24
commit
45744b43f0
4
NEWS.md
4
NEWS.md
|
@ -1,5 +1,9 @@
|
|||
Red Panda C++ Version 1.0.7
|
||||
- change: use Shift+Enter to break line
|
||||
- change: highlight whole #define statement using one color
|
||||
- enhancement: don't highlight '\' as error
|
||||
- enhancement: hide add charset option in project options dialog's compiler set page, when project compiler set is clang
|
||||
- fix: When generating project's makefile for clang, don't add -fexec-charset / -finput-charset command line options
|
||||
|
||||
Red Panda C++ Version 1.0.6
|
||||
- fix: gcc compiler set name is not correct in Linux
|
||||
|
|
|
@ -10,7 +10,7 @@ isEmpty(APP_NAME) {
|
|||
}
|
||||
|
||||
isEmpty(APP_VERSION) {
|
||||
APP_VERSION=1.0.6
|
||||
APP_VERSION=1.0.7
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -383,7 +383,6 @@ QString Compiler::getCCompileArguments(bool checkSyntax)
|
|||
|
||||
QString Compiler::getCppCompileArguments(bool checkSyntax)
|
||||
{
|
||||
return getCCompileArguments(checkSyntax);
|
||||
QString result;
|
||||
if (checkSyntax) {
|
||||
result += " -fsyntax-only";
|
||||
|
|
|
@ -386,7 +386,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
|
|||
// Or roll our own
|
||||
} else {
|
||||
QString encodingStr;
|
||||
if (mProject->options().addCharset) {
|
||||
if (compilerSet()->compilerType() != COMPILER_CLANG && mProject->options().addCharset) {
|
||||
QByteArray defaultSystemEncoding = pCharsetInfoManager->getDefaultSystemEncoding();
|
||||
if (unit->encoding() == ENCODING_AUTO_DETECT) {
|
||||
Editor* editor = mProject->unitEditor(unit);
|
||||
|
|
|
@ -445,32 +445,36 @@ void SynEditCppHighlighter::directiveProc()
|
|||
mRun+=1;
|
||||
}
|
||||
|
||||
QString directive;
|
||||
while (mLine[mRun]!=0 && isIdentChar(mLine[mRun])) {
|
||||
directive+=mLine[mRun];
|
||||
mRun+=1;
|
||||
}
|
||||
if (directive == "define") {
|
||||
do {
|
||||
switch(mLine[mRun].unicode()) {
|
||||
case '/': //comment?
|
||||
switch (mLine[mRun+1].unicode()) {
|
||||
case '/': // is end of directive as well
|
||||
mRange.state = RangeState::rsUnknown;
|
||||
return;
|
||||
case '*': // might be embeded only
|
||||
mRange.state = RangeState::rsDirectiveComment;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case '\\': // yet another line?
|
||||
if (mLine[mRun+1] == 0) {
|
||||
mRun+=1;
|
||||
mRange.state = RangeState::rsMultiLineDirective;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
mRun+=1;
|
||||
} while (mLine[mRun]!=0);
|
||||
} else
|
||||
mRange.state = RangeState::rsUnknown;
|
||||
// do {
|
||||
// switch(mLine[mRun].unicode()) {
|
||||
// case '/': //comment?
|
||||
// switch (mLine[mRun+1].unicode()) {
|
||||
// case '/': // is end of directive as well
|
||||
// mRange.state = RangeState::rsUnknown;
|
||||
// return;
|
||||
// case '*': // might be embeded only
|
||||
// mRange.state = RangeState::rsDirectiveComment;
|
||||
// return;
|
||||
// }
|
||||
// break;
|
||||
// case '\\': // yet another line?
|
||||
// if (mLine[mRun+1] == 0) {
|
||||
// mRun+=1;
|
||||
// mRange.state = RangeState::rsMultiLineDirective;
|
||||
// return;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// mRun+=1;
|
||||
// } while (mLine[mRun]!=0);
|
||||
}
|
||||
|
||||
void SynEditCppHighlighter::directiveEndProc()
|
||||
|
@ -972,6 +976,13 @@ void SynEditCppHighlighter::slashProc()
|
|||
}
|
||||
}
|
||||
|
||||
void SynEditCppHighlighter::backSlashProc()
|
||||
{
|
||||
mTokenId = TokenKind::Symbol;
|
||||
mExtTokenId = ExtTokenKind::BackSlash;
|
||||
mRun+=1;
|
||||
}
|
||||
|
||||
void SynEditCppHighlighter::spaceProc()
|
||||
{
|
||||
mRun += 1;
|
||||
|
@ -1287,6 +1298,9 @@ void SynEditCppHighlighter::processChar()
|
|||
case '!':
|
||||
notSymbolProc();
|
||||
break;
|
||||
case '\\':
|
||||
backSlashProc();
|
||||
break;
|
||||
case 0:
|
||||
nullProc();
|
||||
break;
|
||||
|
|
|
@ -53,7 +53,7 @@ class SynEditCppHighlighter: public SynHighlighter
|
|||
RoundClose, RoundOpen, ScopeResolution, SemiColon, ShiftLeft,
|
||||
ShiftLeftAssign, ShiftRight, ShiftRightAssign, SquareClose,
|
||||
SquareOpen, Star, Subtract, SubtractAssign, Xor,
|
||||
XorAssign
|
||||
XorAssign, BackSlash
|
||||
};
|
||||
|
||||
enum RangeState {
|
||||
|
@ -130,6 +130,7 @@ private:
|
|||
void roundOpenProc();
|
||||
void semiColonProc();
|
||||
void slashProc();
|
||||
void backSlashProc();
|
||||
void spaceProc();
|
||||
void squareCloseProc();
|
||||
void squareOpenProc();
|
||||
|
|
|
@ -37,6 +37,8 @@ void ProjectCompilerWidget::refreshOptions()
|
|||
Settings::PCompilerSet pSet = pSettings->compilerSets().getSet(ui->cbCompilerSet->currentIndex());
|
||||
if (!pSet)
|
||||
return;
|
||||
ui->chkAddCharset->setVisible(pSet->compilerType()!=COMPILER_CLANG);
|
||||
ui->chkAddCharset->setEnabled(pSet->compilerType()!=COMPILER_CLANG);
|
||||
mOptions = pSet->iniOptions();
|
||||
QTabWidget* pTab = ui->tabOptions;
|
||||
while (pTab->count()>0) {
|
||||
|
@ -111,7 +113,7 @@ void ProjectCompilerWidget::doLoad()
|
|||
|
||||
void ProjectCompilerWidget::doSave()
|
||||
{
|
||||
Settings::PCompilerSet pSet = pSettings->compilerSets().defaultSet();
|
||||
Settings::PCompilerSet pSet = pSettings->compilerSets().getSet(ui->cbCompilerSet->currentIndex());
|
||||
if (!pSet)
|
||||
return;
|
||||
//read values in the options widget
|
||||
|
@ -137,6 +139,7 @@ void ProjectCompilerWidget::doSave()
|
|||
}
|
||||
pMainWindow->project()->setCompilerSet(ui->cbCompilerSet->currentIndex());
|
||||
pMainWindow->project()->options().compilerOptions = mOptions;
|
||||
if (pSet->compilerType()!=COMPILER_CLANG)
|
||||
pMainWindow->project()->options().addCharset = ui->chkAddCharset->isChecked();
|
||||
pMainWindow->project()->options().staticLink = ui->chkStaticLink->isChecked();
|
||||
pMainWindow->project()->saveOptions();
|
||||
|
|
|
@ -17,7 +17,7 @@ SUBDIRS += \
|
|||
|
||||
APP_NAME = RedPandaCPP
|
||||
|
||||
APP_VERSION = 1.0.6
|
||||
APP_VERSION = 1.0.7
|
||||
|
||||
linux: {
|
||||
|
||||
|
|
Loading…
Reference in New Issue