fix misnomer: MainWindow::closePhraseBooks() => maybeSavePhraseBooks()
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Wed, 1 Jun 2011 15:58:13 +0000 (17:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Sep 2011 15:29:43 +0000 (17:29 +0200)
(cherry picked from commit ad23439b7e112aa8a36f34e7b16224dcab742147)

Change-Id: I8bbe3a1a4463e14a93d1c09ab0ad82a3cd36c1b7
Reviewed-on: http://codereview.qt-project.org/4607
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/linguist/linguist/mainwindow.cpp
src/linguist/linguist/mainwindow.h

index 05b34bc..ddefa9a 100644 (file)
@@ -1388,7 +1388,7 @@ void MainWindow::setupPhrase()
 
 void MainWindow::closeEvent(QCloseEvent *e)
 {
-    if (maybeSaveAll() && closePhraseBooks())
+    if (maybeSaveAll() && maybeSavePhraseBooks())
         e->accept();
     else
         e->ignore();
@@ -2302,7 +2302,7 @@ bool MainWindow::maybeSavePhraseBook(PhraseBook *pb)
     return true;
 }
 
-bool MainWindow::closePhraseBooks()
+bool MainWindow::maybeSavePhraseBooks()
 {
     foreach(PhraseBook *phraseBook, m_phraseBooks)
         if (!maybeSavePhraseBook(phraseBook))
index c589945..7a81ff6 100644 (file)
@@ -192,7 +192,7 @@ private:
     bool isPhraseBookOpen(const QString &name);
     bool savePhraseBook(QString *name, PhraseBook &pb);
     bool maybeSavePhraseBook(PhraseBook *phraseBook);
-    bool closePhraseBooks();
+    bool maybeSavePhraseBooks();
     QStringList pickTranslationFiles();
     void showTranslationSettings(int model);
     void updateLatestModel(int model);