- fix: shouldn't auto add /bin/gcc to compiler sets
- fix: if a dir duplicates in PATH, don't add it to compiler sets repeatedly - enhancement: add "--sanitize=address" to compile option in the Debug compiler set in Linux
This commit is contained in:
parent
3b0c8eccdb
commit
8732f7d37e
3
NEWS.md
3
NEWS.md
|
@ -3,6 +3,9 @@ Red Panda C++ Version 0.12.7
|
|||
- fix: crash when close settings dialog in Ubuntu 20.04 (but we'll leak memory now...)
|
||||
- enhancement: add raylib.h to autolink
|
||||
- fix: shouldn't generate default autolink settings in linux
|
||||
- fix: shouldn't auto add /bin/gcc to compiler sets
|
||||
- fix: if a dir duplicates in PATH, don't add it to compiler sets repeatedly
|
||||
- enhancement: add "--sanitize=address" to compile option in the Debug compiler set in Linux
|
||||
|
||||
Red Panda C++ Version 0.12.6
|
||||
- fix: heartbeat for gdb server async command shouldn't disable actions
|
||||
|
|
|
@ -15,7 +15,7 @@ isEmpty(PREFIX) {
|
|||
|
||||
DEFINES += PREFIX=\\\"$${PREFIX}\\\"
|
||||
DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
|
||||
DEFINES += REDPANDA_CPP_VERSION=\\\"beta.0.12.6\\\"
|
||||
DEFINES += REDPANDA_CPP_VERSION=\\\"beta.0.12.7\\\"
|
||||
|
||||
linux: {
|
||||
LINUX_DISTRO = $$system(cat /etc/issue)
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,7 @@
|
|||
#include <QStandardPaths>
|
||||
#include <QScreen>
|
||||
#include <QDesktopWidget>
|
||||
#include <QHash>
|
||||
|
||||
const char ValueToChar[28] = {'0', '1', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
|
||||
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
|
||||
|
@ -2408,6 +2409,11 @@ static void setDebugOptions(Settings::PCompilerSet pSet) {
|
|||
pSet->setOption(pOption,'1');
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
pSet->setCustomCompileParams("--sanitize=address");
|
||||
pSet->setUseCustomCompileParams(true);
|
||||
#endif
|
||||
|
||||
// pOption = pSet->findOption("-static");
|
||||
// if (pOption) {
|
||||
// pSet->setOption(pOption,'1');
|
||||
|
@ -2502,14 +2508,21 @@ void Settings::CompilerSets::clearSets()
|
|||
void Settings::CompilerSets::findSets()
|
||||
{
|
||||
clearSets();
|
||||
#ifdef Q_OS_WIN
|
||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin");
|
||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin");
|
||||
#endif
|
||||
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString path = env.value("PATH");
|
||||
QStringList pathList = path.split(PATH_SEPARATOR);
|
||||
QSet<QString> searched;
|
||||
foreach (const QString& s, pathList){
|
||||
addSets(s);
|
||||
if (searched.contains(s))
|
||||
continue;;
|
||||
searched.insert(s);
|
||||
if (s!="/bin") // /bin/gcc is symbolic link to /usr/bin/gcc
|
||||
addSets(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2581,12 +2594,19 @@ void Settings::CompilerSets::loadSets()
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
#ifdef Q_OS_WIN
|
||||
QString msg = QObject::tr("Compiler set not configuared.")
|
||||
+"<br /><br />"
|
||||
+QObject::tr("Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? ")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64");
|
||||
#else
|
||||
QString msg = QObject::tr("Compiler set not configuared.")
|
||||
+"<br /><br />"
|
||||
+QObject::tr("Would you like Red Panda C++ to search for compilers in PATH?");
|
||||
#endif
|
||||
if (QMessageBox::warning(nullptr,QObject::tr("Confirm"),
|
||||
QObject::tr("Compiler set not configuared.")
|
||||
+"<br /><br />"
|
||||
+QObject::tr("Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? ")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64"),
|
||||
msg,
|
||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -234,11 +234,16 @@ void CompilerSetOptionWidget::saveCurrentCompilerSet()
|
|||
|
||||
void CompilerSetOptionWidget::on_btnFindCompilers_pressed()
|
||||
{
|
||||
if (QMessageBox::warning(this,tr("Confirm"),
|
||||
tr("Red Panda C++ will clear current compiler list and search"
|
||||
" for compilers in the following locations:\n '%1'\n'%2'\nAre you really want to continue?")
|
||||
#ifdef Q_OS_WIN
|
||||
QString msg = tr("Red Panda C++ will clear current compiler list and search"
|
||||
" for compilers in the following locations:<br /> '%1'<br /> '%2'<br />Are you really want to continue?")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64"),
|
||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64");
|
||||
#else
|
||||
QString msg = tr("Red Panda C++ will clear current compiler list and search"
|
||||
" for compilers in the the PATH. <br />Are you really want to continue?");
|
||||
#endif
|
||||
if (QMessageBox::warning(this,tr("Confirm"),msg,
|
||||
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok )
|
||||
return;
|
||||
pSettings->compilerSets().clearSets();
|
||||
|
|
Loading…
Reference in New Issue