Git commit 9fd0fd049f32a573f20df908ffbb9469a3b96e3b by David Faure. Committed on 01/05/2012 at 00:50. Pushed by dfaure into branch 'frameworks'. KUrl -> QUrl M +1 -1 kfile/kdiroperator.cpp M +3 -3 kio/kfile/kpropertiesdialog.cpp M +1 -1 kio/kfile/kpropertiesdialog_p.h M +26 -26 kio/kio/copyjob.cpp M +22 -22 kio/kio/copyjob.h M +1 -1 kio/kio/deletejob.cpp M +1 -1 kio/kio/deletejob.h M +6 -6 kio/kio/fileundomanager.cpp M +2 -2 kio/kio/fileundomanager_p.h M +17 -17 kio/tests/fileundomanagertest.cpp M +3 -3 kio/tests/jobtest.cpp http://commits.kde.org/kdelibs/9fd0fd049f32a573f20df908ffbb9469a3b96e3b diff --git a/kfile/kdiroperator.cpp b/kfile/kdiroperator.cpp index 480d722..60d76e8 100644 --- a/kfile/kdiroperator.cpp +++ b/kfile/kdiroperator.cpp @@ -845,7 +845,7 @@ KIO::CopyJob * KDirOperator::trash(const KFileItemList&= items, return 0L; } = - QList urls; + QList urls; QStringList files; foreach (const KFileItem &item, items) { const KUrl url =3D item.url(); diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.= cpp index 95f5647..a950236 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -1346,8 +1346,8 @@ void KFilePropsPlugin::applyChanges() = connect( job, SIGNAL(result(KJob*)), SLOT(slotCopyFinished(KJob*)) ); - connect( job, SIGNAL(renamed(KIO::Job*,KUrl,KUrl)), - SLOT(slotFileRenamed(KIO::Job*,KUrl,KUrl)) ); + connect( job, SIGNAL(renamed(KIO::Job*,QUrl,QUrl)), + SLOT(slotFileRenamed(KIO::Job*,QUrl,QUrl)) ); // wait for job QEventLoop eventLoop; connect(this, SIGNAL(leaveModality()), @@ -1495,7 +1495,7 @@ void KFilePropsPlugin::applyIconChanges() } } = -void KFilePropsPlugin::slotFileRenamed( KIO::Job *, const KUrl &, const KU= rl & newUrl ) +void KFilePropsPlugin::slotFileRenamed( KIO::Job *, const QUrl &, const QU= rl & newUrl ) { // This is called in case of an existing local file during the copy/mo= ve operation, // if the user chooses Rename. diff --git a/kio/kfile/kpropertiesdialog_p.h b/kio/kfile/kpropertiesdialog_= p.h index f7e416a..b91ddf8 100644 --- a/kio/kfile/kpropertiesdialog_p.h +++ b/kio/kfile/kpropertiesdialog_p.h @@ -77,7 +77,7 @@ public: protected Q_SLOTS: void slotEditFileType(); void slotCopyFinished( KJob * ); - void slotFileRenamed( KIO::Job *, const KUrl &, const KUrl & ); + void slotFileRenamed(KIO::Job *, const QUrl &, const QUrl &); void slotDirSizeUpdate(); void slotDirSizeFinished( KJob * ); void slotFoundMountPoint( const QString& mp, quint64 kibSize, diff --git a/kio/kio/copyjob.cpp b/kio/kio/copyjob.cpp index 8ce2461..2c102df 100644 --- a/kio/kio/copyjob.cpp +++ b/kio/kio/copyjob.cpp @@ -100,7 +100,7 @@ enum CopyJobState { class KIO::CopyJobPrivate: public KIO::JobPrivate { public: - CopyJobPrivate(const KUrl::List& src, const KUrl& dest, + CopyJobPrivate(const QList& src, const KUrl& dest, CopyJob::CopyMode mode, bool asMethod) : m_globalDest(dest) , m_globalDestinationState(DEST_NOT_STATED) @@ -164,9 +164,9 @@ public: QList files; QList dirs; KUrl::List dirsToRemove; - KUrl::List m_srcList; + QList m_srcList; KUrl::List m_successSrcList; // Entries in m_srcList that have success= fully been moved - KUrl::List::const_iterator m_currentStatSrc; + QList::const_iterator m_currentStatSrc; bool m_bCurrentSrcIsDir; bool m_bCurrentOperationIsLink; bool m_bSingleFileCopy; @@ -238,7 +238,7 @@ public: = Q_DECLARE_PUBLIC(CopyJob) = - static inline CopyJob *newJob(const KUrl::List& src, const KUrl& dest, + static inline CopyJob *newJob(const QList& src, const KUrl& dest, CopyJob::CopyMode mode, bool asMethod, J= obFlags flags) { CopyJob *job =3D new CopyJob(*new CopyJobPrivate(src,dest,mode,asM= ethod)); @@ -264,12 +264,12 @@ CopyJob::~CopyJob() { } = -KUrl::List CopyJob::srcUrls() const +QList CopyJob::srcUrls() const { return d_func()->m_srcList; } = -KUrl CopyJob::destUrl() const +QUrl CopyJob::destUrl() const { return d_func()->m_dest; } @@ -2144,79 +2144,79 @@ void KIO::CopyJob::setWriteIntoExistingDirectories(= bool overwriteAll) // #65926 d_func()->m_bOverwriteAllDirs =3D overwriteAll; } = -CopyJob *KIO::copy(const KUrl& src, const KUrl& dest, JobFlags flags) +CopyJob *KIO::copy(const QUrl& src, const QUrl& dest, JobFlags flags) { //kDebug(7007) << "src=3D" << src << "dest=3D" << dest; - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, dest, CopyJob::Copy, false, fla= gs); } = -CopyJob *KIO::copyAs(const KUrl& src, const KUrl& dest, JobFlags flags) +CopyJob *KIO::copyAs(const QUrl& src, const QUrl& dest, JobFlags flags) { //kDebug(7007) << "src=3D" << src << "dest=3D" << dest; - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, dest, CopyJob::Copy, true, flag= s); } = -CopyJob *KIO::copy( const KUrl::List& src, const KUrl& dest, JobFlags flag= s ) +CopyJob *KIO::copy( const QList& src, const QUrl& dest, JobFlags fla= gs ) { //kDebug(7007) << src << dest; return CopyJobPrivate::newJob(src, dest, CopyJob::Copy, false, flags); } = -CopyJob *KIO::move(const KUrl& src, const KUrl& dest, JobFlags flags) +CopyJob *KIO::move(const QUrl& src, const QUrl& dest, JobFlags flags) { //kDebug(7007) << src << dest; - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, dest, CopyJob::Move, false, fla= gs); } = -CopyJob *KIO::moveAs(const KUrl& src, const KUrl& dest, JobFlags flags) +CopyJob *KIO::moveAs(const QUrl& src, const QUrl& dest, JobFlags flags) { //kDebug(7007) << src << dest; - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, dest, CopyJob::Move, true, flag= s); } = -CopyJob *KIO::move( const KUrl::List& src, const KUrl& dest, JobFlags flag= s) +CopyJob *KIO::move( const QList& src, const QUrl& dest, JobFlags fla= gs) { //kDebug(7007) << src << dest; return CopyJobPrivate::newJob(src, dest, CopyJob::Move, false, flags); } = -CopyJob *KIO::link(const KUrl& src, const KUrl& destDir, JobFlags flags) +CopyJob *KIO::link(const QUrl& src, const QUrl& destDir, JobFlags flags) { - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, destDir, CopyJob::Link, false, = flags); } = -CopyJob *KIO::link(const KUrl::List& srcList, const KUrl& destDir, JobFlag= s flags) +CopyJob *KIO::link(const QList& srcList, const QUrl& destDir, JobFla= gs flags) { return CopyJobPrivate::newJob(srcList, destDir, CopyJob::Link, false, = flags); } = -CopyJob *KIO::linkAs(const KUrl& src, const KUrl& destDir, JobFlags flags ) +CopyJob *KIO::linkAs(const QUrl& src, const QUrl& destDir, JobFlags flags ) { - KUrl::List srcList; + QList srcList; srcList.append( src ); return CopyJobPrivate::newJob(srcList, destDir, CopyJob::Link, false, = flags); } = -CopyJob *KIO::trash(const KUrl& src, JobFlags flags) +CopyJob *KIO::trash(const QUrl& src, JobFlags flags) { - KUrl::List srcList; + QList srcList; srcList.append( src ); - return CopyJobPrivate::newJob(srcList, KUrl( "trash:/" ), CopyJob::Mov= e, false, flags); + return CopyJobPrivate::newJob(srcList, QUrl("trash:/"), CopyJob::Move,= false, flags); } = -CopyJob *KIO::trash(const KUrl::List& srcList, JobFlags flags) +CopyJob *KIO::trash(const QList& srcList, JobFlags flags) { - return CopyJobPrivate::newJob(srcList, KUrl( "trash:/" ), CopyJob::Mov= e, false, flags); + return CopyJobPrivate::newJob(srcList, QUrl("trash:/"), CopyJob::Move,= false, flags); } = #include "moc_copyjob.cpp" diff --git a/kio/kio/copyjob.h b/kio/kio/copyjob.h index 81a6be5..d3befe5 100644 --- a/kio/kio/copyjob.h +++ b/kio/kio/copyjob.h @@ -27,7 +27,7 @@ = #include // time_t = -#include +#include = #include "jobclasses.h" = @@ -84,13 +84,13 @@ namespace KIO { * Returns the list of source URLs. * @return the list of source URLs. */ - KUrl::List srcUrls() const; + QList srcUrls() const; = /** * Returns the destination URL. * @return the destination URL */ - KUrl destUrl() const; + QUrl destUrl() const; = /** * By default the permissions of the copied files will be those of= the source files. @@ -180,7 +180,7 @@ namespace KIO { * being copied * @param dest the destination of the current operation */ - void copying( KIO::Job *job, const KUrl& src, const KUrl& dest ); + void copying(KIO::Job *job, const QUrl& src, const QUrl& dest); /** * The job is creating a symbolic link. * @@ -192,7 +192,7 @@ namespace KIO { * being linked * @param to the destination of the current operation */ - void linking( KIO::Job *job, const QString& target, const KUrl& to= ); + void linking(KIO::Job *job, const QString& target, const QUrl& to); /** * The job is moving a file or directory. * @@ -204,7 +204,7 @@ namespace KIO { * being moved * @param to the destination of the current operation */ - void moving( KIO::Job *job, const KUrl& from, const KUrl& to ); + void moving(KIO::Job *job, const QUrl& from, const QUrl& to); /** * The job is creating the directory @p dir. * @@ -213,7 +213,7 @@ namespace KIO { * @param job the job that emitted this signal * @param dir the directory that is currently being created */ - void creatingDir( KIO::Job *job, const KUrl& dir ); + void creatingDir(KIO::Job *job, const QUrl& dir); /** * The user chose to rename @p from to @p to. * @@ -221,7 +221,7 @@ namespace KIO { * @param from the original name * @param to the new name */ - void renamed( KIO::Job *job, const KUrl& from, const KUrl& to ); + void renamed(KIO::Job *job, const QUrl& from, const QUrl& to); = /** * The job emits this signal when copying or moving a file or dire= ctory successfully finished. @@ -238,7 +238,7 @@ namespace KIO { * @param renamed indicates that the destination URL was created u= sing a * rename operation (i.e. fast directory moving). true if is has b= een renamed */ - void copyingDone( KIO::Job *job, const KUrl &from, const KUrl &to,= time_t mtime, bool directory, bool renamed ); + void copyingDone(KIO::Job *job, const QUrl &from, const QUrl &to, = time_t mtime, bool directory, bool renamed); /** * The job is copying or moving a symbolic link, that points to ta= rget. * The new link is created in @p to. The existing one is/was in @p= from. @@ -248,7 +248,7 @@ namespace KIO { * @param target the target * @param to the destination URL */ - void copyingLinkDone( KIO::Job *job, const KUrl &from, const QStri= ng& target, const KUrl& to ); + void copyingLinkDone(KIO::Job *job, const QUrl &from, const QStrin= g& target, const QUrl& to); protected Q_SLOTS: virtual void slotResult( KJob *job ); = @@ -283,7 +283,7 @@ namespace KIO { * @return the job handling the operation * @see copyAs() */ - KIO_EXPORT CopyJob *copy( const KUrl& src, const KUrl& dest, JobFlags = flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *copy(const QUrl& src, const QUrl& dest, JobFlags f= lags =3D DefaultFlags); = /** * Copy a file or directory @p src into the destination @p dest, @@ -302,7 +302,7 @@ namespace KIO { * * * @return the job handling the operation */ - KIO_EXPORT CopyJob *copyAs( const KUrl& src, const KUrl& dest, JobFlag= s flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *copyAs(const QUrl& src, const QUrl& dest, JobFlags= flags =3D DefaultFlags); = /** * Copy a list of file/dirs @p src into a destination directory @p des= t. @@ -315,7 +315,7 @@ namespace KIO { * into a subdir of dest, just like "cp" does. * @return the job handling the operation */ - KIO_EXPORT CopyJob *copy( const KUrl::List& src, const KUrl& dest, Job= Flags flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *copy(const QList& src, const QUrl& dest, Job= Flags flags =3D DefaultFlags); = /** * Moves a file or directory @p src to the given destination @p dest. @@ -330,7 +330,7 @@ namespace KIO { * @see copy() * @see moveAs() */ - KIO_EXPORT CopyJob *move( const KUrl& src, const KUrl& dest, JobFlags = flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *move(const QUrl& src, const QUrl& dest, JobFlags f= lags =3D DefaultFlags); /** * Moves a file or directory @p src to the given destination @p dest. = Unlike move() * this operation will not move @p src into @p dest when @p dest exist= s: it will @@ -344,7 +344,7 @@ namespace KIO { * @return the job handling the operation * @see copyAs() */ - KIO_EXPORT CopyJob *moveAs( const KUrl& src, const KUrl& dest, JobFlag= s flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *moveAs(const QUrl& src, const QUrl& dest, JobFlags= flags =3D DefaultFlags); /** * Moves a list of files or directories @p src to the given destinatio= n @p dest. * @@ -357,7 +357,7 @@ namespace KIO { * @return the job handling the operation * @see copy() */ - KIO_EXPORT CopyJob *move( const KUrl::List& src, const KUrl& dest, Job= Flags flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *move(const QList& src, const QUrl& dest, Job= Flags flags =3D DefaultFlags); = /** * Create a link. @@ -369,7 +369,7 @@ namespace KIO { * @param flags: link() supports HideProgressInfo only * @return the job handling the operation */ - KIO_EXPORT CopyJob *link( const KUrl& src, const KUrl& destDir, JobFla= gs flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *link(const QUrl& src, const QUrl& destDir, JobFlag= s flags =3D DefaultFlags); = /** * Create several links @@ -382,7 +382,7 @@ namespace KIO { * @return the job handling the operation * @see link() */ - KIO_EXPORT CopyJob *link( const KUrl::List& src, const KUrl& destDir, = JobFlags flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *link(const QList& src, const QUrl& destDir, = JobFlags flags =3D DefaultFlags); = /** * Create a link. Unlike link() this operation will fail when the dire= ctory already @@ -397,18 +397,18 @@ namespace KIO { * @see link () * @see copyAs() */ - KIO_EXPORT CopyJob *linkAs( const KUrl& src, const KUrl& dest, JobFlag= s flags =3D DefaultFlags ); + KIO_EXPORT CopyJob *linkAs(const QUrl& src, const QUrl& dest, JobFlags= flags =3D DefaultFlags); = /** * Trash a file or directory. * This is currently only supported for local files and directories. - * Use "KUrl src; src.setPath( path );" to create a URL from a path. + * Use QUrl::fromLocalFile to create a URL from a local file path. * * @param src file to delete * @param flags: trash() supports HideProgressInfo only * @return the job handling the operation */ - KIO_EXPORT CopyJob *trash( const KUrl& src, JobFlags flags =3D Default= Flags ); + KIO_EXPORT CopyJob *trash(const QUrl& src, JobFlags flags =3D DefaultF= lags); = /** * Trash a list of files or directories. @@ -418,7 +418,7 @@ namespace KIO { * @param flags: trash() supports HideProgressInfo only * @return the job handling the operation */ - KIO_EXPORT CopyJob *trash( const KUrl::List& src, JobFlags flags =3D D= efaultFlags ); + KIO_EXPORT CopyJob *trash(const QList& src, JobFlags flags =3D D= efaultFlags); = } = diff --git a/kio/kio/deletejob.cpp b/kio/kio/deletejob.cpp index 679803e..3048b42 100644 --- a/kio/kio/deletejob.cpp +++ b/kio/kio/deletejob.cpp @@ -481,7 +481,7 @@ void DeleteJob::slotResult( KJob *job ) } } = -DeleteJob *KIO::del( const KUrl& src, JobFlags flags ) +DeleteJob *KIO::del(const QUrl& src, JobFlags flags) { QList srcList; srcList.append( src ); diff --git a/kio/kio/deletejob.h b/kio/kio/deletejob.h index 6212c03..06b0b5d 100644 --- a/kio/kio/deletejob.h +++ b/kio/kio/deletejob.h @@ -108,7 +108,7 @@ namespace KIO { * @param flags: We support HideProgressInfo here * @return the job handling the operation */ - KIO_EXPORT DeleteJob *del( const KUrl& src, JobFlags flags =3D Default= Flags ); + KIO_EXPORT DeleteJob *del( const QUrl& src, JobFlags flags =3D Default= Flags ); = /** * Deletes a list of files or directories. diff --git a/kio/kio/fileundomanager.cpp b/kio/kio/fileundomanager.cpp index fdca552..5a84c62 100644 --- a/kio/kio/fileundomanager.cpp +++ b/kio/kio/fileundomanager.cpp @@ -139,10 +139,10 @@ CommandRecorder::CommandRecorder(FileUndoManager::Com= mandType op, const KUrl::Li = // TODO whitelist, instead if (op !=3D FileUndoManager::Mkdir && op !=3D FileUndoManager::Put) { - connect(job, SIGNAL(copyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,bool= )), - this, SLOT(slotCopyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,b= ool))); - connect(job, SIGNAL(copyingLinkDone(KIO::Job*,KUrl,QString,KUrl)), - this, SLOT(slotCopyingLinkDone(KIO::Job*,KUrl,QString,KUrl))= ); + connect(job, SIGNAL(copyingDone(KIO::Job*,QUrl,QUrl,time_t,bool,bool= )), + this, SLOT(slotCopyingDone(KIO::Job*,QUrl,QUrl,time_t,bool,b= ool))); + connect(job, SIGNAL(copyingLinkDone(KIO::Job*,QUrl,QString,QUrl)), + this, SLOT(slotCopyingLinkDone(KIO::Job*,QUrl,QString,QUrl))= ); } } = @@ -158,7 +158,7 @@ void CommandRecorder::slotResult(KJob *job) FileUndoManager::self()->d->addCommand(m_cmd); } = -void CommandRecorder::slotCopyingDone(KIO::Job *job, const KUrl &from, con= st KUrl &to, time_t mtime, bool directory, bool renamed) +void CommandRecorder::slotCopyingDone(KIO::Job *job, const QUrl &from, con= st QUrl &to, time_t mtime, bool directory, bool renamed) { BasicOperation op; op.m_valid =3D true; @@ -183,7 +183,7 @@ void CommandRecorder::slotCopyingDone(KIO::Job *job, co= nst KUrl &from, const KUr } = // TODO merge the signals? -void CommandRecorder::slotCopyingLinkDone(KIO::Job *, const KUrl &from, co= nst QString &target, const KUrl &to) +void CommandRecorder::slotCopyingLinkDone(KIO::Job *, const QUrl &from, co= nst QString &target, const QUrl &to) { BasicOperation op; op.m_valid =3D true; diff --git a/kio/kio/fileundomanager_p.h b/kio/kio/fileundomanager_p.h index c6eda2c..f443fa1 100644 --- a/kio/kio/fileundomanager_p.h +++ b/kio/kio/fileundomanager_p.h @@ -87,8 +87,8 @@ public: private Q_SLOTS: void slotResult( KJob *job ); = - void slotCopyingDone( KIO::Job *, const KUrl &from, const KUrl &to, time= _t, bool directory, bool renamed ); - void slotCopyingLinkDone( KIO::Job *, const KUrl &from, const QString &t= arget, const KUrl &to ); + void slotCopyingDone( KIO::Job *, const QUrl &from, const QUrl &to, time= _t, bool directory, bool renamed ); + void slotCopyingLinkDone( KIO::Job *, const QUrl &from, const QString &t= arget, const QUrl &to ); = private: UndoCommand m_cmd; diff --git a/kio/tests/fileundomanagertest.cpp b/kio/tests/fileundomanagert= est.cpp index 01e9ffe..e7cf92e 100644 --- a/kio/tests/fileundomanagertest.cpp +++ b/kio/tests/fileundomanagertest.cpp @@ -58,12 +58,12 @@ static QString destLink() { return destDir() + "symlink= "; } static QString srcSubDir() { return homeTmpDir() + "subdir"; } static QString destSubDir() { return destDir() + "subdir"; } = -static QList sourceList() +static QList sourceList() { - QList lst; - lst << KUrl( srcFile() ); + QList lst; + lst << QUrl::fromLocalFile(srcFile()); #ifndef Q_WS_WIN - lst << KUrl( srcLink() ); + lst << QUrl::fromLocalFile(srcLink()); #endif return lst; } @@ -210,8 +210,8 @@ void FileUndoManagerTest::testCopyFiles() kDebug() ; // Initially inspired from JobTest::copyFileToSamePartition() const QString destdir =3D destDir(); - QList lst =3D sourceList(); - const KUrl d( destdir ); + QList lst =3D sourceList(); + const QUrl d =3D QUrl::fromLocalFile(destdir); KIO::CopyJob* job =3D KIO::copy( lst, d, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); FileUndoManager::self()->recordCopyJob(job); @@ -266,8 +266,8 @@ void FileUndoManagerTest::testMoveFiles() { kDebug() ; const QString destdir =3D destDir(); - QList lst =3D sourceList(); - const KUrl d( destdir ); + QList lst =3D sourceList(); + const QUrl d =3D QUrl::fromLocalFile(destdir); KIO::CopyJob* job =3D KIO::move( lst, d, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); FileUndoManager::self()->recordCopyJob(job); @@ -309,8 +309,8 @@ void FileUndoManagerTest::testCopyFilesOverwrite() void FileUndoManagerTest::testCopyDirectory() { const QString destdir =3D destDir(); - QList lst; lst << srcSubDir(); - const KUrl d( destdir ); + QList lst; lst << QUrl::fromLocalFile(srcSubDir()); + const QUrl d =3D QUrl::fromLocalFile(destdir); KIO::CopyJob* job =3D KIO::copy( lst, d, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); FileUndoManager::self()->recordCopyJob(job); @@ -330,8 +330,8 @@ void FileUndoManagerTest::testCopyDirectory() void FileUndoManagerTest::testMoveDirectory() { const QString destdir =3D destDir(); - QList lst; lst << srcSubDir(); - const KUrl d( destdir ); + QList lst; lst << QUrl::fromLocalFile(srcSubDir()); + const QUrl d =3D QUrl::fromLocalFile(destdir); KIO::CopyJob* job =3D KIO::move( lst, d, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); FileUndoManager::self()->recordCopyJob(job); @@ -430,11 +430,11 @@ void FileUndoManagerTest::testTrashFiles() QSKIP_PORTING( "kio_trash not installed", SkipAll ); = // Trash it all at once: the file, the symlink, the subdir. - QList lst =3D sourceList(); - lst.append( srcSubDir() ); + QList lst =3D sourceList(); + lst.append(QUrl::fromLocalFile(srcSubDir())); KIO::Job* job =3D KIO::trash( lst, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); - FileUndoManager::self()->recordJob( FileUndoManager::Trash, lst, KUrl(= "trash:/"), job ); + FileUndoManager::self()->recordJob( FileUndoManager::Trash, lst, QUrl(= "trash:/"), job ); = bool ok =3D KIO::NetAccess::synchronousRun( job, 0 ); QVERIFY( ok ); @@ -482,8 +482,8 @@ void FileUndoManagerTest::testModifyFileBeforeUndo() { // based on testCopyDirectory (so that we check that it works for file= s in subdirs too) const QString destdir =3D destDir(); - QList lst; lst << srcSubDir(); - const KUrl d( destdir ); + QList lst; lst << QUrl::fromLocalFile(srcSubDir()); + const QUrl d =3D QUrl::fromLocalFile(destdir); KIO::CopyJob* job =3D KIO::copy( lst, d, KIO::HideProgressInfo ); job->setUiDelegate( 0 ); FileUndoManager::self()->recordCopyJob(job); diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index befe241..8aad212 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -264,7 +264,7 @@ void JobTest::copyLocalFile( const QString& src, const = QString& dest ) // cleanup and retry with KIO::copy() QFile::remove( dest ); job =3D KIO::copy(u, d, KIO::HideProgressInfo ); - QSignalSpy spyCopyingDone(job, SIGNAL(copyingDone(KIO::Job*,KUrl,KUrl,= time_t,bool,bool))); + QSignalSpy spyCopyingDone(job, SIGNAL(copyingDone(KIO::Job*,QUrl,QUrl,= time_t,bool,bool))); job->setUiDelegate(0); ok =3D KIO::NetAccess::synchronousRun(job, 0); QVERIFY( ok ); @@ -1409,7 +1409,7 @@ void JobTest::moveFileDestAlreadyExists() // #157601 const QString existingDest =3D otherTmpDir() + "fileFromHome"; createTestFile( existingDest ); = - QList urls; urls << KUrl(file1) << KUrl(file2); + QList urls; urls << QUrl::fromLocalFile(file1) << QUrl::fromLoca= lFile(file2); KIO::CopyJob* job =3D KIO::move(urls, otherTmpDir(), KIO::HideProgress= Info); job->setUiDelegate(0); job->setAutoSkip(true); @@ -1468,7 +1468,7 @@ void JobTest::moveDestAlreadyExistsAutoRename(const Q= String& destDir, bool moveD createTestFile(source); } = - QList urls; urls << KUrl(file1) << KUrl(file2); + QList urls; urls << QUrl::fromLocalFile(file1) << QUrl::fromLoca= lFile(file2); KIO::CopyJob* job =3D KIO::move(urls, destDir, KIO::HideProgressInfo); job->setUiDelegate(0); job->setAutoRename(true);