- fix: Can't suggest header filename starting with numbers.
This commit is contained in:
parent
fbef3b4f29
commit
bbdefc4af0
1
NEWS.md
1
NEWS.md
|
@ -30,6 +30,7 @@ Red Panda C++ Version 2.24
|
||||||
- enhancement: Support sdcc compiler.
|
- enhancement: Support sdcc compiler.
|
||||||
- enhancement: Autowrap tool output text.
|
- enhancement: Autowrap tool output text.
|
||||||
- fix: Press up/down arrow key in the option dialog's left panel won't switch page.
|
- fix: Press up/down arrow key in the option dialog's left panel won't switch page.
|
||||||
|
- fix: Can't suggest header filename starting with numbers.
|
||||||
|
|
||||||
Red Panda C++ Version 2.23
|
Red Panda C++ Version 2.23
|
||||||
|
|
||||||
|
|
|
@ -961,7 +961,13 @@ void Editor::keyPressEvent(QKeyEvent *event)
|
||||||
} else {
|
} else {
|
||||||
if (pSettings->codeCompletion().enabled()
|
if (pSettings->codeCompletion().enabled()
|
||||||
&& pSettings->codeCompletion().showCompletionWhileInput() ) {
|
&& pSettings->codeCompletion().showCompletionWhileInput() ) {
|
||||||
if (syntaxer() && syntaxer()->language()==QSynedit::ProgrammingLanguage::CPP) {
|
if (mParser && mParser->isIncludeLine(lineText())) {
|
||||||
|
// is a #include line
|
||||||
|
processCommand(QSynedit::EditCommand::Char,ch,nullptr);
|
||||||
|
showHeaderCompletion(false);
|
||||||
|
handled=true;
|
||||||
|
return;
|
||||||
|
} else if (syntaxer() && syntaxer()->language()==QSynedit::ProgrammingLanguage::CPP) {
|
||||||
//preprocessor ?
|
//preprocessor ?
|
||||||
if ((idCharPressed==0) && (ch=='#') && lineText().isEmpty()) {
|
if ((idCharPressed==0) && (ch=='#') && lineText().isEmpty()) {
|
||||||
processCommand(QSynedit::EditCommand::Char,ch,nullptr);
|
processCommand(QSynedit::EditCommand::Char,ch,nullptr);
|
||||||
|
|
|
@ -2348,6 +2348,19 @@ QStringList Settings::CompilerSet::defines(bool isCpp) {
|
||||||
arguments.append("c");
|
arguments.append("c");
|
||||||
arguments.append("-V");
|
arguments.append("-V");
|
||||||
key=SDCC_CMD_OPT_PROCESSOR;
|
key=SDCC_CMD_OPT_PROCESSOR;
|
||||||
|
//language standard
|
||||||
|
PCompilerOption pOption = CompilerInfoManager::getCompilerOption(compilerType(), key);
|
||||||
|
if (pOption) {
|
||||||
|
if (!mCompileOptions[key].isEmpty())
|
||||||
|
arguments.append(pOption->setting + mCompileOptions[key]);
|
||||||
|
}
|
||||||
|
key=SDCC_CMD_OPT_STD;
|
||||||
|
//language standard
|
||||||
|
pOption = CompilerInfoManager::getCompilerOption(compilerType(), key);
|
||||||
|
if (pOption) {
|
||||||
|
if (!mCompileOptions[key].isEmpty())
|
||||||
|
arguments.append(pOption->setting + mCompileOptions[key]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
if (isCpp) {
|
if (isCpp) {
|
||||||
|
@ -2357,15 +2370,16 @@ QStringList Settings::CompilerSet::defines(bool isCpp) {
|
||||||
arguments.append("c");
|
arguments.append("c");
|
||||||
key=C_CMD_OPT_STD;
|
key=C_CMD_OPT_STD;
|
||||||
}
|
}
|
||||||
|
//language standard
|
||||||
|
PCompilerOption pOption = CompilerInfoManager::getCompilerOption(compilerType(), key);
|
||||||
|
if (pOption) {
|
||||||
|
if (!mCompileOptions[key].isEmpty())
|
||||||
|
arguments.append(pOption->setting + mCompileOptions[key]);
|
||||||
|
}
|
||||||
#ifdef ENABLE_SDCC
|
#ifdef ENABLE_SDCC
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//language standard
|
|
||||||
PCompilerOption pOption = CompilerInfoManager::getCompilerOption(compilerType(), key);
|
|
||||||
if (pOption) {
|
|
||||||
if (!mCompileOptions[key].isEmpty())
|
|
||||||
arguments.append(pOption->setting + mCompileOptions[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
arguments.append(NULL_FILE);
|
arguments.append(NULL_FILE);
|
||||||
|
|
||||||
|
@ -2610,6 +2624,12 @@ void Settings::CompilerSet::setSDCCDirectories(const QString& binDir)
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments.clear();
|
arguments.clear();
|
||||||
arguments.append("--print-search-dirs");
|
arguments.append("--print-search-dirs");
|
||||||
|
QString key = SDCC_CMD_OPT_PROCESSOR;
|
||||||
|
PCompilerOption pOption = CompilerInfoManager::getCompilerOption(compilerType(), key);
|
||||||
|
if (pOption) {
|
||||||
|
if (!mCompileOptions[key].isEmpty())
|
||||||
|
arguments.append(pOption->setting + mCompileOptions[key]);
|
||||||
|
}
|
||||||
QByteArray output = getCompilerOutput(binDir,c_prog,arguments);
|
QByteArray output = getCompilerOutput(binDir,c_prog,arguments);
|
||||||
|
|
||||||
//bindirs
|
//bindirs
|
||||||
|
|
Loading…
Reference in New Issue