please review

Jens Herden <[email protected]>
Newsgroups gmane.comp.kde.devel.quanta
Organization http://www.kdewebdev.org
Message-ID <[email protected]>
Hi Andras,

I looked into bug #121329 and the report is correct because Quanta does not 
reload if an open document was not modified. This is not very clever because 
the document might have changed on the server!

I attach my proposed solution. This would always reload the file and also 
prevent a message if you have a modified untitled file and try to reload this 
one. An untitled file was never reloaded, because this is impossible, but you 
got a message (if you want to save the changes) if the file was modified.

OK?

Jens

_______________________________________________
quanta-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/quanta-devel
patch-for-121329.diff (text/x-diff, 613 B)
Index: quanta.cpp
===================================================================
--- quanta.cpp	(revision 517605)
+++ quanta.cpp	(working copy)
@@ -626,14 +626,11 @@
   if (!view)
      view = ViewManager::ref()->activeView();
   Document *w = view->document();
-  if (!w || !view->saveModified())
+  if (!w || w->isUntitled() || !view->saveModified())
       return;
-  if (!w->isUntitled() && w->isModified())
-  {
-    w->setModified(false);
-    w->openURL(w->url());
-    reparse(true);
-  }
+  w->setModified(false);
+  w->openURL(w->url());
+  reparse(true);
 }
 
 void QuantaApp::slotFileReloadAll()
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEEwKTkYmIVB8IV+ARAnb7AJwLQAYJNyOnyatRb2zReHF8/m8lMwCeLHn9
VbJieAQtbJKebV3WUhMHwWY=
=eigM
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.