[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Thu Jan 6 20:21:22 CET 2005


CVS commit by arwalker: 

Get things compiling under KDE 3.1
KTempFile::sync() not supported until KDE 3.3


  M +16 -3     vectorsavedialog.ui.h   1.6


--- kdeextragear-2/kst/kst/vectorsavedialog.ui.h  #1.5:1.6
@@ -8,4 +8,5 @@
 *****************************************************************************/
 
+#include <kdeversion.h>
 
 void VectorSaveDialog::save()
@@ -39,5 +40,7 @@ void VectorSaveDialog::save()
                         return;
                     }
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
                     tf.sync();
+#endif
                     if (KIO::NetAccess::exists(url)) {
                         int rc = KMessageBox::warningYesNo(this, i18n("File %1 exists.  Overwrite?").arg(url.prettyURL()), i18n("Kst"));
@@ -46,5 +49,9 @@ void VectorSaveDialog::save()
                         }
                     }
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
                     KIO::NetAccess::file_copy(KURL(tf.name()), url, -1, true, false, this);
+#else
+                        KIO::NetAccess::upload(tf.name(), url);
+#endif
                 }
                 break;
@@ -61,5 +68,7 @@ void VectorSaveDialog::save()
                             return;
                         }
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
                         tf.sync();
+#endif
                         if (KIO::NetAccess::exists(url2)) {
                             int rc = KMessageBox::warningYesNo(this, i18n("File %1 exists.  Overwrite?").arg(url2.prettyURL()), i18n("Kst"));
@@ -68,5 +77,9 @@ void VectorSaveDialog::save()
                             }
                         }
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
                         KIO::NetAccess::file_copy(KURL(tf.name()), url2, -1, true, false, this);
+#else
+                        KIO::NetAccess::upload(tf.name(), url2);
+#endif
                     }
                 }




More information about the Kst mailing list