diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-29 18:51:54 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-06 15:11:38 +0900 |
| commit | 2ce559458e5803dca8d98664d954b0108a72efbb (patch) | |
| tree | 509ec8aed816cc32e8ab97b24b0275cfabfd57a6 /kpdf/shell/shell.cpp | |
| parent | 52b719af6697a88e0173a35ed85afaf228b714d5 (diff) | |
| download | tdegraphics-2ce559458e5803dca8d98664d954b0108a72efbb.tar.gz tdegraphics-2ce559458e5803dca8d98664d954b0108a72efbb.zip | |
kpdf: fix crash when requested to shutdown from the session manager or dcop. This resolves issue #139
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kpdf/shell/shell.cpp')
| -rw-r--r-- | kpdf/shell/shell.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index c0df6a4f..ed9403df 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -50,6 +50,7 @@ Shell::Shell() : DCOPObject("KPDFShellDCOPIface"), KParts::MainWindow(0, "KPDF::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true), + m_shuttingDown(false), m_showToolBarAction(nullptr), m_tabs(nullptr), m_tabsContextMenu(nullptr), @@ -63,6 +64,7 @@ Shell::Shell(const KURL &url) : DCOPObject("KPDFShellDCOPIface"), KParts::MainWindow(0, "KPDF::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true), + m_shuttingDown(false), m_showToolBarAction(nullptr), m_tabs(nullptr), m_tabsContextMenu(nullptr), @@ -101,6 +103,8 @@ void Shell::init() this, TQ_SLOT(createGUI(KParts::Part*))); connect(m_manager, TQ_SIGNAL(activePartChanged(KParts::Part*)), this, TQ_SLOT(slotChangeTab(KParts::Part*))); + connect(tdeApp, TQ_SIGNAL(shutDown()), + this, TQ_SLOT(slotShutDown())); setCentralWidget(m_tabs); setXMLFile("shell.rc"); @@ -433,8 +437,18 @@ void Shell::removeTab() m_workingTab = -1; } +void Shell::slotShutDown() +{ + m_shuttingDown = true; +} + void Shell::slotChangeTab(KParts::Part *part) { + if (m_shuttingDown) + { + return; + } + if (!part) { part = createTab(); |
