[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kpf/src
From: Waldo Bastian <bastian () kde ! org>
Date: 2003-05-13 21:11:26
[Download RAW message or body]
CVS commit by waba:
s^QUriDrag^KURLDrag^
M +13 -8 Applet.cpp 1.13
M +12 -8 AppletItem.cpp 1.14
--- kdenetwork/kpf/src/Applet.cpp #1.12:1.13
@@ -28,5 +28,4 @@
#include <qtoolbutton.h>
#include <qpopupmenu.h>
-#include <qdragobject.h>
#include <qfileinfo.h>
#include <qcursor.h>
@@ -41,4 +40,5 @@
#include <kmessagebox.h>
#include <kapplication.h>
+#include <kurldrag.h>
#include "System.h"
@@ -383,7 +383,7 @@ namespace KPF
Applet::dragEnterEvent(QDragEnterEvent * e)
{
- QStringList l;
+ KURL::List l;
- if (!QUriDrag::decodeLocalFiles(e, l))
+ if (!KURLDrag::decode(e, l))
return;
@@ -391,5 +391,7 @@ namespace KPF
return;
- if (!QFileInfo(l[0]).isDir())
+ const KURL &url = l[0];
+
+ if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
return;
@@ -400,7 +402,7 @@ namespace KPF
Applet::dropEvent(QDropEvent * e)
{
- QStringList l;
+ KURL::List l;
- if (!QUriDrag::decodeLocalFiles(e, l))
+ if (!KURLDrag::decode(e, l))
return;
@@ -408,9 +410,12 @@ namespace KPF
return;
- if (!QFileInfo(l[0]).isDir())
+ const KURL &url = l[0];
+
+ if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
return;
e->accept();
- slotNewServerAtLocation(l[0]);
+
+ slotNewServerAtLocation(url.path());
}
--- kdenetwork/kpf/src/AppletItem.cpp #1.13:1.14
@@ -25,5 +25,4 @@
#include <qlayout.h>
#include <qtimer.h>
-#include <qdragobject.h>
#include <qfileinfo.h>
#include <qcursor.h>
@@ -32,4 +31,5 @@
#include <klocale.h>
#include <kpopupmenu.h>
+#include <kurldrag.h>
#include "Defines.h"
@@ -215,7 +215,7 @@ namespace KPF
}
- QStringList l;
+ KURL::List l;
- if (!QUriDrag::decodeLocalFiles(e, l))
+ if (!KURLDrag::decode(e, l))
break;
@@ -223,5 +223,7 @@ namespace KPF
break;
- if (!QFileInfo(l[0]).isDir())
+ const KURL &url = l[0];
+
+ if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
break;
@@ -242,7 +244,7 @@ namespace KPF
}
- QStringList l;
+ KURL::List l;
- if (!QUriDrag::decodeLocalFiles(e, l))
+ if (!KURLDrag::decode(e, l))
break;
@@ -250,9 +252,11 @@ namespace KPF
break;
- if (!QFileInfo(l[0]).isDir())
+ const KURL &url = l[0];
+
+ if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
break;
e->accept();
- emit(newServerAtLocation(l[0]));
+ emit(newServerAtLocation(url.path()));
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic