diff --git a/NEWS.md b/NEWS.md index 7d75abbc..6c8c80e4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ Red Panda C++ Version 0.12.7 - change: make current build system follow FHS specifications + - fix: crash when close settings dialog in Ubuntu 20.04 (but we'll leak memory now...) Red Panda C++ Version 0.12.6 - fix: heartbeat for gdb server async command shouldn't disable actions diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 9870d5cf..c0f0f675 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -17,6 +17,16 @@ DEFINES += PREFIX=\\\"$${PREFIX}\\\" DEFINES += APP_NAME=\\\"$${APP_NAME}\\\" DEFINES += REDPANDA_CPP_VERSION=\\\"beta.0.12.6\\\" +linux: { + LINUX_DISTRO = $$system(cat /etc/issue) + contains(LINUX_DISTRO, .*Ubuntu.*){ + contains(LINUX_DISTRO, .*20\.04.*) { + message("Found Ubuntu 20.04") + DEFINES += SETTINGS_DIALOG_FIX + } + } +} + gcc { QMAKE_CXXFLAGS_RELEASE += -Werror=return-type QMAKE_CXXFLAGS_DEBUG += -Werror=return-type diff --git a/RedPandaIDE/settingsdialog/settingsdialog.cpp b/RedPandaIDE/settingsdialog/settingsdialog.cpp index b90941f2..3054924d 100644 --- a/RedPandaIDE/settingsdialog/settingsdialog.cpp +++ b/RedPandaIDE/settingsdialog/settingsdialog.cpp @@ -88,6 +88,13 @@ SettingsDialog::~SettingsDialog() { for (SettingsWidget* p:mSettingWidgets) { p->setParent(nullptr); + //dirty fix for ubuntu 20.04 LTS +#ifdef SETTINGS_DIALOG_FIX + if (p->group()==tr("Editor") && p->name()==tr("Color")) + continue; + if (p->group()==tr("Editor") && p->name()==tr("Snippet")) + continue; +#endif delete p; } delete ui;