[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.3/kdeedu/parley/src
From:       Daniel Laidig <d.laidig () gmx ! de>
Date:       2009-07-20 21:27:43
Message-ID: 1248125263.843201.19878.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1000125 by laidig:

backport r1000122: update window title when closing documents

 M  +1 -0      parleydocument.cpp  
 M  +9 -4      parleymainwindow.cpp  


--- branches/KDE/4.3/kdeedu/parley/src/parleydocument.cpp #1000124:1000125
@@ -188,6 +188,7 @@
     disconnect(m_doc);
     delete m_doc;
     m_doc = 0;
+    m_parleyApp->slotUpdateWindowCaption();
 }
 
 void ParleyDocument::openGHNS()
--- branches/KDE/4.3/kdeedu/parley/src/parleymainwindow.cpp #1000124:1000125
@@ -110,11 +110,16 @@
 
 void ParleyMainWindow::slotUpdateWindowCaption()
 {
-    QString title = m_document->document()->title();
-    if (title == i18n("Untitled")) {
-        title.clear();
+    QString title;
+    bool modified = false;
+    if (m_document->document()) {
+        title = m_document->document()->title();
+        modified = m_document->document()->isModified();
+        if (title == i18n("Untitled")) {
+            title.clear();
+        }
     }
-    setCaption(title, m_document->document()->isModified());
+    setCaption(title, modified);
 }
 
 void ParleyMainWindow::slotShowStatistics()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic