- fix: If the integrated gcc compiler is add to path, auto find compilers will find in twice. (Windows)
This commit is contained in:
parent
3a78819fb8
commit
94e955b07a
1
NEWS.md
1
NEWS.md
|
@ -19,6 +19,7 @@ Red Panda C++ Version 2.26
|
||||||
- fix: Macros that defined by the compiler are not correctly syntax-colored and tooltiped.
|
- fix: Macros that defined by the compiler are not correctly syntax-colored and tooltiped.
|
||||||
- fix: Code suggestion for identifiers after '*' (eg. 3 * item->price) can't correct.
|
- fix: Code suggestion for identifiers after '*' (eg. 3 * item->price) can't correct.
|
||||||
- fix: C++ compiler atrribute '[[xxx]]' are not correctly handled.
|
- fix: C++ compiler atrribute '[[xxx]]' are not correctly handled.
|
||||||
|
- fix: If the integrated gcc compiler is add to path, auto find compilers will find in twice. (Windows)
|
||||||
|
|
||||||
Red Panda C++ Version 2.25
|
Red Panda C++ Version 2.25
|
||||||
|
|
||||||
|
|
|
@ -2331,7 +2331,16 @@ QStringList Editor::getExpressionAtPosition(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LastSymbolType::AmpersandSign: // before '&':
|
case LastSymbolType::AmpersandSign: // before '&':
|
||||||
|
{
|
||||||
|
QChar ch=token.front();
|
||||||
|
if (isIdentChar(ch)
|
||||||
|
|| ch.isDigit()
|
||||||
|
|| ch == '.'
|
||||||
|
|| ch == ')' ) {
|
||||||
|
result.pop_front();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case LastSymbolType::ParenthesisMatched: //before '()'
|
case LastSymbolType::ParenthesisMatched: //before '()'
|
||||||
// if (token == ".") {
|
// if (token == ".") {
|
||||||
|
|
|
@ -4397,8 +4397,8 @@ void CppParser::internalParse(const QString &fileName)
|
||||||
|
|
||||||
QStringList preprocessResult = mPreprocessor.result();
|
QStringList preprocessResult = mPreprocessor.result();
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
stringsToFile(mPreprocessor.result(),QString("r:\\preprocess-%1.txt").arg(extractFileName(fileName)));
|
// stringsToFile(mPreprocessor.result(),QString("r:\\preprocess-%1.txt").arg(extractFileName(fileName)));
|
||||||
mPreprocessor.dumpDefinesTo("r:\\defines.txt");
|
// mPreprocessor.dumpDefinesTo("r:\\defines.txt");
|
||||||
// mPreprocessor.dumpIncludesListTo("r:\\includes.txt");
|
// mPreprocessor.dumpIncludesListTo("r:\\includes.txt");
|
||||||
#endif
|
#endif
|
||||||
//qDebug()<<"preprocess"<<timer.elapsed();
|
//qDebug()<<"preprocess"<<timer.elapsed();
|
||||||
|
@ -4416,7 +4416,7 @@ void CppParser::internalParse(const QString &fileName)
|
||||||
if (mTokenizer.tokenCount() == 0)
|
if (mTokenizer.tokenCount() == 0)
|
||||||
return;
|
return;
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
mTokenizer.dumpTokens(QString("r:\\tokens-%1.txt").arg(extractFileName(fileName)));
|
// mTokenizer.dumpTokens(QString("r:\\tokens-%1.txt").arg(extractFileName(fileName)));
|
||||||
#endif
|
#endif
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
mLastIndex = -1;
|
mLastIndex = -1;
|
||||||
|
@ -4429,8 +4429,8 @@ void CppParser::internalParse(const QString &fileName)
|
||||||
}
|
}
|
||||||
// qDebug()<<"parse"<<timer.elapsed();
|
// qDebug()<<"parse"<<timer.elapsed();
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName)));
|
// mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName)));
|
||||||
mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName)));
|
// mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName)));
|
||||||
#endif
|
#endif
|
||||||
//reduce memory usage
|
//reduce memory usage
|
||||||
internalClear();
|
internalClear();
|
||||||
|
|
|
@ -3123,7 +3123,7 @@ void Settings::CompilerSets::findSets()
|
||||||
QStringList pathList = path.split(PATH_SEPARATOR);
|
QStringList pathList = path.split(PATH_SEPARATOR);
|
||||||
QString folder;
|
QString folder;
|
||||||
for (int i=pathList.count()-1;i>=0;i--) {
|
for (int i=pathList.count()-1;i>=0;i--) {
|
||||||
folder = pathList[i];
|
folder = QFileInfo(pathList[i]).absoluteFilePath();
|
||||||
if (searched.contains(folder))
|
if (searched.contains(folder))
|
||||||
continue;
|
continue;
|
||||||
searched.insert(folder);
|
searched.insert(folder);
|
||||||
|
@ -3134,11 +3134,13 @@ void Settings::CompilerSets::findSets()
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin";
|
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin";
|
||||||
|
folder = QFileInfo(folder).absoluteFilePath();
|
||||||
if (!searched.contains(folder)) {
|
if (!searched.contains(folder)) {
|
||||||
addSets(folder);
|
addSets(folder);
|
||||||
searched.insert(folder);
|
searched.insert(folder);
|
||||||
}
|
}
|
||||||
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin";
|
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin";
|
||||||
|
folder = QFileInfo(folder).absoluteFilePath();
|
||||||
if (!searched.contains(folder)) {
|
if (!searched.contains(folder)) {
|
||||||
addSets(folder);
|
addSets(folder);
|
||||||
searched.insert(folder);
|
searched.insert(folder);
|
||||||
|
|
Loading…
Reference in New Issue