[Uml-devel] KDE_3_4_BRANCH: kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Thu Mar 31 11:57:52 UTC 2005


CVS commit by okellogg: 

Backport following fix from HEAD:
> CVS commit by okellogg:
> Patch by Albert Astals Cid fixes a saving error described in
> http://sourceforge.net/mailarchive/forum.php?thread_id=6923476&forum_id=472


  M +7 -5      uml.cpp   1.138.2.1
  M +7 -1      umldoc.cpp   1.239.2.2


--- kdesdk/umbrello/umbrello/uml.cpp  #1.138:1.138.2.1
@@ -780,9 +780,11 @@ bool UMLApp::slotFileSaveAs()
         }
         if(!url.isEmpty()) {
-                m_doc->saveDocument(url);
+                bool b = m_doc->saveDocument(url);
+                if (b) {
                 fileOpenRecent->addURL(url);
                 setCaption(url.fileName(),m_doc->isModified());
                 slotStatusMsg(i18n("Ready."));
-                return true;
+                }
+                return b;
 
         } else {

--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.239.2.1:1.239.2.2
@@ -656,6 +656,12 @@ bool UMLDoc::saveDocument(const KURL& ur
                 } else {
                         // now remove the original file
-                        if ( KIO::file_move( tmpfile.name(), d.path(), -1, true ) == false ) {
+                        if ( KIO::
+#if KDE_IS_VERSION(3,1,90)
+                                NetAccess::
+#endif
+                                file_move( tmpfile.name(), d.path(), -1, true ) == false ) {
                                 KMessageBox::error(0, i18n("There was a problem saving file: %1").arg(d.path()), i18n("Save Error"));
+                                m_doc_url.setFileName(i18n("Untitled"));
+                                return false;
                         }
                 }






More information about the umbrello-devel mailing list