delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kioslave / fish / tests / copytester.cpp
blob55c2235c53a9c35891c0b65367078b0d571459f0
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>
5 #include <kurl.h>
6 #include <kio/jobclasses.h>
7 #include <kdebug.h>
8 #include <copytester.h>
9 #include <kio/copyjob.h>
11 class TransferJob;
13 Browser::Browser() : QWidget(NULL)
15 slotButtonClicked();
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");
29 kDebug() << filename;
30 selectedUrls.push_back(KUrl(filename));
32 KUrl destUrl("fish://root@localhost/tmp/test");
33 KIO::CopyJob* job0 = KIO::copy( selectedUrls, destUrl );
34 job0->start();
37 void Browser::dataishere(KIO::Job *,const QByteArray & data )
39 static int counter=0;
40 kDebug() << ++counter << " data is here*************************************************************";
41 kDebug() << data;