mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Restore the default message handler on application shutdown. Fixes sporadic segfaults on exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24599 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e5caf93e23
commit
446eda80c9
3 changed files with 426 additions and 430 deletions
|
@ -102,6 +102,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
||||||
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
||||||
connect(ui.action_Help, SIGNAL(triggered()), this, SLOT(help()));
|
connect(ui.action_Help, SIGNAL(triggered()), this, SLOT(help()));
|
||||||
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
||||||
|
connect(ui.actionE_xit, SIGNAL(triggered()), this, SLOT(shutdown()));
|
||||||
connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog()));
|
connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog()));
|
||||||
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(installBtn()));
|
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(installBtn()));
|
||||||
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBootloaderBtn()));
|
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBootloaderBtn()));
|
||||||
|
@ -142,6 +143,16 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RbUtilQt::shutdown(void)
|
||||||
|
{
|
||||||
|
// restore default message handler to prevent trace accesses during
|
||||||
|
// object destruction -- the trace object could already be destroyed.
|
||||||
|
// Fixes segfaults on exit.
|
||||||
|
qInstallMsgHandler(0);
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::trace(void)
|
void RbUtilQt::trace(void)
|
||||||
{
|
{
|
||||||
SysTrace wnd(this);
|
SysTrace wnd(this);
|
||||||
|
|
|
@ -64,6 +64,7 @@ class RbUtilQt : public QMainWindow
|
||||||
bool m_auto;
|
bool m_auto;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void shutdown(void);
|
||||||
void about(void);
|
void about(void);
|
||||||
void help(void);
|
void help(void);
|
||||||
void sysinfo(void);
|
void sysinfo(void);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RbUtilQtFrm</class>
|
<class>RbUtilQtFrm</class>
|
||||||
<widget class="QMainWindow" name="RbUtilQtFrm">
|
<widget class="QMainWindow" name="RbUtilQtFrm">
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelDeviceTitle">
|
<widget class="QLabel" name="labelDeviceTitle">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -150,7 +151,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="labelComplete">
|
<widget class="QLabel" name="labelComplete">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Complete Installation</b><br/>This installs the bootloader, a current build and the extras package. This is the recommended method for new installations.</string>
|
<string><b>Complete Installation</b><br/>This installs the bootloader, a current build and the extras package. This is the recommended method for new installations.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::AutoText</enum>
|
<enum>Qt::AutoText</enum>
|
||||||
|
@ -180,7 +181,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelSmall">
|
<widget class="QLabel" name="labelSmall">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Minimal installation</b><br/>This installs bootloader and the current build of Rockbox. If you don't want the extras package, choose this option.</string>
|
<string><b>Minimal installation</b><br/>This installs bootloader and the current build of Rockbox. If you don't want the extras package, choose this option.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -246,7 +247,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="labelBootloader">
|
<widget class="QLabel" name="labelBootloader">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Install the bootloader</b><br/>Before Rockbox can be run on your audio player, you may have to install a bootloader. This is only necessary the first time Rockbox is installed.</string>
|
<string><b>Install the bootloader</b><br/>Before Rockbox can be run on your audio player, you may have to install a bootloader. This is only necessary the first time Rockbox is installed.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -273,7 +274,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelInstall">
|
<widget class="QLabel" name="labelInstall">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Install Rockbox</b> on your audio player</string>
|
<string><b>Install Rockbox</b> on your audio player</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
@ -342,7 +343,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="labelFonts">
|
<widget class="QLabel" name="labelFonts">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Fonts Package</b><br/>The Fonts Package contains a couple of commonly used fonts. Installation is highly recommended.</string>
|
<string><b>Fonts Package</b><br/>The Fonts Package contains a couple of commonly used fonts. Installation is highly recommended.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -369,7 +370,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelThemes">
|
<widget class="QLabel" name="labelThemes">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Install Themes</b><br/>Rockbox' look can be customized by themes. You can choose and install several officially distributed themes.</string>
|
<string><b>Install Themes</b><br/>Rockbox' look can be customized by themes. You can choose and install several officially distributed themes.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -396,7 +397,7 @@
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="labelGames">
|
<widget class="QLabel" name="labelGames">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Install Game Files</b><br/>Doom needs a base wad file to run.</string>
|
<string><b>Install Game Files</b><br/>Doom needs a base wad file to run.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -459,7 +460,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="labelVoice">
|
<widget class="QLabel" name="labelVoice">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Install Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so if you installed the voice file Rockbox will speak.</string>
|
<string><b>Install Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so if you installed the voice file Rockbox will speak.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -486,7 +487,7 @@
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="labelTalk">
|
<widget class="QLabel" name="labelTalk">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Create Talk Files</b><br/>Talkfiles are needed to let Rockbox speak File and Foldernames</string>
|
<string><b>Create Talk Files</b><br/>Talkfiles are needed to let Rockbox speak File and Foldernames</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -536,7 +537,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelCreateVoice">
|
<widget class="QLabel" name="labelCreateVoice">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Create Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so
|
<string><b>Create Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so
|
||||||
if you installed the voice file Rockbox will speak.</string>
|
if you installed the voice file Rockbox will speak.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
|
@ -574,7 +575,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="labelRemoveBootloader">
|
<widget class="QLabel" name="labelRemoveBootloader">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Remove the bootloader</b><br/>After removing the bootloader you won't be able to start Rockbox.</string>
|
<string><b>Remove the bootloader</b><br/>After removing the bootloader you won't be able to start Rockbox.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -601,7 +602,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelUninstall">
|
<widget class="QLabel" name="labelUninstall">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Uninstall Rockbox from your audio player.</b><br/>This will leave the bootloader in place (you need to remove it manually).</string>
|
<string><b>Uninstall Rockbox from your audio player.</b><br/>This will leave the bootloader in place (you need to remove it manually).</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
@ -755,7 +756,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelInfo">
|
<widget class="QLabel" name="labelInfo">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Currently installed packages.<br/><b>Note:</b> if you manually installed packages this might not be correct!</string>
|
<string>Currently installed packages.<br/><b>Note:</b> if you manually installed packages this might not be correct!</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
|
@ -786,7 +787,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>650</width>
|
<width>650</width>
|
||||||
<height>31</height>
|
<height>18</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menu_File">
|
<widget class="QMenu" name="menu_File">
|
||||||
|
@ -1075,22 +1076,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
<include location="rbutilqt.qrc"/>
|
<include location="rbutilqt.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections/>
|
||||||
<connection>
|
|
||||||
<sender>actionE_xit</sender>
|
|
||||||
<signal>triggered()</signal>
|
|
||||||
<receiver>RbUtilQtFrm</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>-1</x>
|
|
||||||
<y>-1</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>279</x>
|
|
||||||
<y>315</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue