Skip to content

Commit

Permalink
Merge pull request #79 from shundhammer/huha-nonempty-dialog-stack-SL…
Browse files Browse the repository at this point in the history
…E-12-SP2

Prevent segfault upon exit when a dialog remains open (SLE-12 SP2)
  • Loading branch information
shundhammer authored Feb 6, 2018
2 parents a4ff748 + f883a02 commit 2dc8d3d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
3 changes: 2 additions & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "46")
SET(VERSION_PATCH "24")
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )
SET(VERSION_TWEAK "1")
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}${GIT_SHA1_VERSION}" )

##### This is need for the libyui core, ONLY.
##### These will be overridden from exports in LibyuiConfig.cmake
Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
%define so_version 7

Name: %{parent}-doc
Version: 2.46.24
Version: 2.46.24.1
Release: 0
Source: %{parent}-%{version}.tar.bz2

Expand Down
10 changes: 10 additions & 0 deletions package/libyui-qt.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Feb 1 12:49:24 UTC 2018 - [email protected]

- Prevent segfault if an open dialog is left over:
Don't do anything widget related after the QApplication is
destroyed, in particular not deleting other widgets, even if
indirectly via YDialog::deleteAllDialogs() in YUI.
(bsc#1074596, bsc#1077991)
- 2.46.24.1

-------------------------------------------------------------------
Mon Aug 22 12:47:32 UTC 2016 - [email protected]

Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: libyui-qt
Version: 2.46.24
Version: 2.46.24.1
Release: 0
Source: %{name}-%{version}.tar.bz2

Expand Down
16 changes: 13 additions & 3 deletions src/YQUI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void YQUI::processCommandLineArgs( int argc, char **argv )

YQUI::~YQUI()
{
yuiDebug() <<"Closing down Qt UI." << std::endl;
yuiMilestone() <<"Closing down Qt UI." << std::endl;

// Intentionally NOT calling dlclose() to libqt-mt
// (see constructor for explanation)
Expand All @@ -356,10 +356,20 @@ YQUI::~YQUI()
void
YQUI::uiThreadDestructor()
{
yuiMilestone() <<"Destroying UI thread" << std::endl;

if ( qApp ) // might already be reset to 0 internally from Qt
{
qApp->exit();
delete qApp;
if ( YDialog::openDialogsCount() > 0 )
{
yuiError() << YDialog::openDialogsCount() << " open dialogs left over" << endl;
yuiError() << "Topmost dialog:" << endl;
YDialog::topmostDialog()->dumpWidgetTree();
}

YDialog::deleteAllDialogs();
qApp->exit();
qApp->deleteLater();
}
}

Expand Down

0 comments on commit 2dc8d3d

Please sign in to comment.