1 /* Copytester is a test case for the fish kioslave. It copies 100 files from /tmp to /tmp/test using fish's functions.
2 It was written to verify KDE bug 147948: https://bugs.kde.org/show_bug.cgi?id=147948 */
4 #include <kio/scheduler.h>
6 #include <kio/jobclasses.h>
8 #include <copytester.h>
9 #include <kio/copyjob.h>
13 Browser::Browser() : QWidget(NULL
)
18 void Browser::slotButtonClicked()
20 kDebug() << "entering function";
21 // creating a kioslave
22 kDebug() << "getting via fish*************************************************************";
23 KUrl::List selectedUrls
;
25 for (int i
=1; i
<=100; i
++)
27 QString filename
=QString("/tmp/fishtest");
28 filename
.append(QString::number(i
)).append(".txt");
30 selectedUrls
.push_back(KUrl(filename
));
32 KUrl
destUrl("fish://root@localhost/tmp/test");
33 KIO::CopyJob
* job0
= KIO::copy( selectedUrls
, destUrl
);
37 void Browser::dataishere(KIO::Job
*,const QByteArray
& data
)
40 kDebug() << ++counter
<< " data is here*************************************************************";