- change: Default value of option "Editors share one code analyzer" is ON
- change: Default value of option "Auto clear symbols in hidden editors" is OFF - minor fix
This commit is contained in:
parent
ba1e100ab4
commit
bb2532a2ef
4
NEWS.md
4
NEWS.md
|
@ -6,8 +6,8 @@ Red Panda C++ Version 2.5
|
|||
- enhancement: project's custom compile include/lib/bin directory is under folder of the app, save them using the path relative to the app
|
||||
- enhancement: slightly reduce memory usage
|
||||
- enhancement: Options -> editor -> custom C/C++ type keywords page
|
||||
- change: Default value of option "Editors share one code analyzer" is ON if available physical memory <= 32G
|
||||
- change: Default value of option "Auto clear symbols in hidden editors" is ON if number of CPU cores > 8 and "Editors share one code analyzer" is on
|
||||
- change: Default value of option "Editors share one code analyzer" is ON
|
||||
- change: Default value of option "Auto clear symbols in hidden editors" is OFF
|
||||
- enhancement: show completion suggest for "namespace" after "using"
|
||||
- fix: MinGW-w64 gcc displayed as "MinGW GCC"
|
||||
- enhancement: Deduce type info for "auto" in some simple cases for stl containers.
|
||||
|
|
|
@ -1068,10 +1068,11 @@ QString CppParser::prettyPrintStatement(const PStatement& statement, const QStri
|
|||
return result;
|
||||
}
|
||||
|
||||
QString CppParser::getFirstTemplateParam(const PStatement& statement,
|
||||
const QString& filename,
|
||||
const QString& phrase,
|
||||
const PStatement& currentScope)
|
||||
QString CppParser::getTemplateParam(const PStatement& statement,
|
||||
const QString& filename,
|
||||
const QString& phrase,
|
||||
int index,
|
||||
const PStatement& currentScope)
|
||||
{
|
||||
if (!statement)
|
||||
return "";
|
||||
|
@ -1079,7 +1080,7 @@ QString CppParser::getFirstTemplateParam(const PStatement& statement,
|
|||
return "";
|
||||
if (statement->type == phrase) // prevent infinite loop
|
||||
return "";
|
||||
return findFirstTemplateParamOf(filename,statement->type, currentScope);
|
||||
return doFindTemplateParamOf(filename,statement->type,index,currentScope);
|
||||
}
|
||||
|
||||
int CppParser::getTemplateParamStart(const QString &s, int startAt, int index)
|
||||
|
@ -2042,7 +2043,7 @@ QString CppParser::doFindTemplateParamOf(const QString &fileName, const QString
|
|||
PStatement scopeStatement = currentScope;
|
||||
|
||||
PStatement statement = findStatementOf(fileName,s,currentScope);
|
||||
return getFirstTemplateParam(statement,fileName, phrase, currentScope);
|
||||
return getTemplateParam(statement,fileName, phrase,index, currentScope);
|
||||
}
|
||||
|
||||
int CppParser::getCurrentBlockEndSkip()
|
||||
|
@ -3248,6 +3249,7 @@ void CppParser::handleStructs(bool isTypedef)
|
|||
|
||||
// normal class/struct decl
|
||||
} else {
|
||||
bool templateSpecialization=false;
|
||||
PStatement firstSynonym;
|
||||
// Add class/struct name BEFORE opening brace
|
||||
if (mTokenizer[mIndex]->text.front() != '{') {
|
||||
|
|
|
@ -410,8 +410,8 @@ private:
|
|||
int getCurrentBlockEndSkip();
|
||||
int getCurrentInlineNamespaceEndSkip();
|
||||
PStatement getCurrentScope(); // gets last item from last level
|
||||
QString getFirstTemplateParam(const PStatement& statement, const QString& filename,
|
||||
const QString& phrase, const PStatement& currentScope);
|
||||
QString getTemplateParam(const PStatement& statement, const QString& filename,
|
||||
const QString& phrase, int index, const PStatement& currentScope);
|
||||
int getTemplateParamStart(const QString& s, int startAt, int index);
|
||||
int getTemplateParamEnd(const QString& s, int startAt);
|
||||
|
||||
|
|
|
@ -4002,31 +4002,31 @@ void Settings::CodeCompletion::doLoad()
|
|||
bool shouldShare= true;
|
||||
bool doClear = false;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
MEMORYSTATUSEX statex;
|
||||
//#ifdef Q_OS_WIN
|
||||
// MEMORYSTATUSEX statex;
|
||||
|
||||
statex.dwLength = sizeof (statex);
|
||||
// statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
// GlobalMemoryStatusEx (&statex);
|
||||
|
||||
if (statex.ullAvailPhys > (long long int)24*1024*1024*1024) {
|
||||
shouldShare = false;
|
||||
}
|
||||
// if (statex.ullAvailPhys > (long long int)32*1024*1024*1024) {
|
||||
// shouldShare = false;
|
||||
// }
|
||||
|
||||
if (shouldShare) {
|
||||
SYSTEM_INFO info;
|
||||
GetSystemInfo(&info);
|
||||
if (info.dwNumberOfProcessors>8 && info.dwProcessorType) {
|
||||
doClear = true;
|
||||
}
|
||||
}
|
||||
#elif defined(Q_OS_LINUX)
|
||||
struct sysinfo si;
|
||||
sysinfo(&si);
|
||||
if (si.freeram > (long long int)24*1024*1024*1024) {
|
||||
shouldShare = false;
|
||||
}
|
||||
#endif
|
||||
//// if (shouldShare) {
|
||||
//// SYSTEM_INFO info;
|
||||
//// GetSystemInfo(&info);
|
||||
//// if (info.dwNumberOfProcessors>8 && info.dwProcessorType) {
|
||||
//// doClear = true;
|
||||
//// }
|
||||
//// }
|
||||
//#elif defined(Q_OS_LINUX)
|
||||
// struct sysinfo si;
|
||||
// sysinfo(&si);
|
||||
// if (si.freeram > (long long int)24*1024*1024*1024) {
|
||||
// shouldShare = false;
|
||||
// }
|
||||
//#endif
|
||||
mClearWhenEditorHidden = boolValue("clear_when_editor_hidden",doClear);
|
||||
mShareParser = boolValue("share_parser",shouldShare);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue