Helpviewer/HelpWindow.py

branch
5_2_x
changeset 1650
ee57b7f8fa10
parent 1646
26e064833700
child 1692
f67b8b8e372a
--- a/Helpviewer/HelpWindow.py	Mon Feb 20 08:36:08 2012 +0100
+++ b/Helpviewer/HelpWindow.py	Tue Feb 21 18:37:34 2012 +0100
@@ -12,7 +12,7 @@
 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt, QByteArray, QSize, QTimer, QUrl, \
     QThread, QTextCodec
 from PyQt4.QtGui import QMainWindow, QWidget, QVBoxLayout, QSizePolicy, QDockWidget, \
-    QDesktopServices, QKeySequence, qApp, QComboBox, QFont, QFontMetrics, QLabel, \
+    QDesktopServices, QKeySequence, QComboBox, QFont, QFontMetrics, QLabel, \
     QSplitter, QMenu, QToolButton, QLineEdit, QApplication, QWhatsThis, QDialog, \
     QHBoxLayout, QProgressBar, QAction, QIcon
 from PyQt4.QtWebKit import QWebSettings, QWebDatabase, QWebSecurityOrigin, QWebPage
@@ -545,7 +545,7 @@
             if self.fromEric:
                 self.exitAct.triggered[()].connect(self.close)
             else:
-                self.exitAct.triggered[()].connect(qApp.closeAllWindows)
+                self.exitAct.triggered[()].connect(self.__closeAllWindows)
         self.__actions.append(self.exitAct)
         
         self.backAct = E5Action(self.trUtf8('Backward'),
@@ -1786,6 +1786,15 @@
         """
         self.findDlg.showFind()
         
+    def __closeAllWindows(self):
+        """
+        Private slot to close all windows.
+        """
+        for browser in HelpWindow.helpwindows:
+            if browser != self:
+                browser.close()
+        self.close()
+        
     def closeEvent(self, e):
         """
         Private event handler for the close event.

eric ide

mercurial