- add default autolink for fmtlib in Windows
- reduce size of the executable of win-git-askpass tool - fix: memory size not correctly calculated when check if share parser. - fix: c/c++ file use different parser for share.
This commit is contained in:
parent
2ce732cfa5
commit
e987959551
3
NEWS.md
3
NEWS.md
|
@ -5,7 +5,8 @@ Red Panda C++ Version 2.1
|
|||
- enhancement: add "editors share one code parser" in "options" / "editor" / "code completion", to reduce memory usage.
|
||||
Turned off by default on PCs with memory > 4G; Force turned on PCs with memory < 1G.
|
||||
- enhancement: add "goto block start"/"goto block end" in "Code" menu
|
||||
|
||||
- add fmtlib to the gcc compiler's lib distributed with RedPanda IDE windows version
|
||||
- add default autolink for fmtlib in Windows
|
||||
|
||||
Red Panda C++ Version 2.0
|
||||
|
||||
|
|
|
@ -3953,7 +3953,7 @@ PCppParser Editor::sharedParser(ParserLanguage language)
|
|||
{
|
||||
PCppParser parser;
|
||||
if (mSharedParsers.contains(language)) {
|
||||
std::weak_ptr<CppParser> weakParser=mSharedParsers[language].lock();
|
||||
parser=mSharedParsers[language].lock();
|
||||
}
|
||||
if (!parser) {
|
||||
parser=std::make_shared<CppParser>();
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
"header": "ege.h",
|
||||
"links": "-lgraphics -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus"
|
||||
},
|
||||
{
|
||||
"header": "fmt/core.h",
|
||||
"links": "-lfmt"
|
||||
},
|
||||
{
|
||||
"execUseUTF8": true,
|
||||
"header": "raylib.h",
|
||||
|
|
|
@ -3695,9 +3695,16 @@ bool Settings::CodeCompletion::clearWhenEditorHidden()
|
|||
{
|
||||
MEMORYSTATUSEX statex;
|
||||
#ifdef Q_OS_WIN
|
||||
statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
if (statex.ullTotalPhys < (long long int)2*1024*1024*1024) {
|
||||
mClearWhenEditorHidden = true;
|
||||
}
|
||||
|
||||
if (statex.ullAvailPhys < (long long int)2*1024*1024*1024) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return mClearWhenEditorHidden;
|
||||
}
|
||||
|
@ -3732,9 +3739,17 @@ bool Settings::CodeCompletion::shareParser()
|
|||
|
||||
#ifdef Q_OS_WIN
|
||||
MEMORYSTATUSEX statex;
|
||||
statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
|
||||
if (statex.ullTotalPhys < (long long int)1024*1024*1024) {
|
||||
mShareParser = true;
|
||||
}
|
||||
|
||||
if (statex.ullAvailPhys < (long long int)1*1024*1024*1024) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return mShareParser;
|
||||
}
|
||||
|
@ -3906,6 +3921,7 @@ void Settings::CodeCompletion::doLoad()
|
|||
mHideSymbolsStartsWithUnderLine = boolValue("hide_symbols_start_with_underline", false);
|
||||
|
||||
bool doClear = true;
|
||||
bool shouldShare=true;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
MEMORYSTATUSEX statex;
|
||||
|
@ -3913,24 +3929,15 @@ void Settings::CodeCompletion::doLoad()
|
|||
statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
if (statex.ullAvailPhys > (long long int)10*1024*1024*1024) {
|
||||
if (statex.ullAvailPhys > (long long int)16*1024*1024*1024) {
|
||||
doClear = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
mClearWhenEditorHidden = boolValue("clear_when_editor_hidden",doClear);
|
||||
|
||||
bool shouldShare=true;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
if (statex.ullAvailPhys > (long long int)8*1024*1024*1024) {
|
||||
if (statex.ullAvailPhys > (long long int)10*1024*1024*1024) {
|
||||
shouldShare = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
mClearWhenEditorHidden = boolValue("clear_when_editor_hidden",doClear);
|
||||
mShareParser = boolValue("share_parser",shouldShare);
|
||||
}
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ bool copyFile(const QString &fromPath, const QString &toPath, bool overwrite)
|
|||
if (!toFile.open(QFile::WriteOnly | QFile::Truncate))
|
||||
return false;
|
||||
|
||||
int bufferSize=64*1024;
|
||||
constexpr int bufferSize=64*1024;
|
||||
char buffer[bufferSize];
|
||||
|
||||
while (!fromFile.atEnd()) {
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
#win32-msvc{
|
||||
# CONFIG += c++11
|
||||
# CONFIG -= app_bundle
|
||||
#} else {
|
||||
# TEMPLATE = app
|
||||
|
||||
# CONFIG += windows
|
||||
# CONFIG -= app_bundle
|
||||
# CONFIG -= qt
|
||||
#}
|
||||
CONFIG += windows
|
||||
CONFIG -= qt
|
||||
CONFIG += c++11
|
||||
CONFIG -= app_bundle
|
||||
|
||||
|
|
Loading…
Reference in New Issue