[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/frameworks] /: Port KDirNotify to QList<QUrl> instead of QStringList
From: David Faure <faure () kde ! org>
Date: 2012-04-30 22:49:29
Message-ID: 20120430224929.7E518A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 6d3ebee139d27dac30762ad4cab9227c7e3ba625 by David Faure.
Committed on 01/05/2012 at 00:26.
Pushed by dfaure into branch 'frameworks'.
Port KDirNotify to QList<QUrl> instead of QStringList
(so that the calling code can be ported away from KUrl::List::toStringList)
M +1 -1 kfile/kdiroperator.cpp
M +1 -1 kio/kfile/kpropertiesdialog.cpp
M +1 -1 kio/kio/copyjob.cpp
M +6 -6 kio/kio/davjob.cpp
M +4 -4 kio/kio/davjob.h
M +13 -13 kio/kio/deletejob.cpp
M +2 -2 kio/kio/deletejob.h
M +2 -6 kio/kio/kautomount.cpp
M +1 -1 kio/kio/kdesktopfileactions.cpp
M +31 -14 kio/kio/kdirnotify.cpp
M +21 -13 kio/kio/kdirnotify.h
M +6 -6 kio/tests/jobtest.cpp
M +3 -3 kio/tests/kdirlistertest.cpp
M +3 -3 kio/tests/kdirmodeltest.cpp
http://commits.kde.org/kdelibs/6d3ebee139d27dac30762ad4cab9227c7e3ba625
diff --git a/kfile/kdiroperator.cpp b/kfile/kdiroperator.cpp
index 004f21c..480d722 100644
--- a/kfile/kdiroperator.cpp
+++ b/kfile/kdiroperator.cpp
@@ -787,7 +787,7 @@ KIO::DeleteJob * KDirOperator::del(const KFileItemList& items,
parent = this;
}
- QList<KUrl> urls;
+ QList<QUrl> urls;
QStringList files;
foreach (const KFileItem &item, items) {
const KUrl url = item.url();
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index 2347eff..95f5647 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -1509,7 +1509,7 @@ void KFilePropsPlugin::postApplyChanges()
const KFileItemList items = properties->items();
const QList<KUrl> lst = items.urlList();
- org::kde::KDirNotify::emitFilesChanged( KUrl::List(lst).toStringList() );
+ org::kde::KDirNotify::emitFilesChanged(KUrl::List(lst));
}
class KFilePermissionsPropsPlugin::KFilePermissionsPropsPluginPrivate
diff --git a/kio/kio/copyjob.cpp b/kio/kio/copyjob.cpp
index e654f36..8ce2461 100644
--- a/kio/kio/copyjob.cpp
+++ b/kio/kio/copyjob.cpp
@@ -1744,7 +1744,7 @@ void CopyJob::emitResult()
if (d->m_mode == CopyJob::Move && !d->m_successSrcList.isEmpty()) {
kDebug(7007) << "KDirNotify'ing FilesRemoved" << \
d->m_successSrcList.toStringList();
- org::kde::KDirNotify::emitFilesRemoved(d->m_successSrcList.toStringList());
+ org::kde::KDirNotify::emitFilesRemoved(d->m_successSrcList);
}
// Re-enable watching on the dirs that held the deleted files
diff --git a/kio/kio/davjob.cpp b/kio/kio/davjob.cpp
index 7a4dea6..7feaf35 100644
--- a/kio/kio/davjob.cpp
+++ b/kio/kio/davjob.cpp
@@ -47,7 +47,7 @@ using namespace KIO;
class KIO::DavJobPrivate: public KIO::TransferJobPrivate
{
public:
- DavJobPrivate(const KUrl& url)
+ DavJobPrivate(const QUrl& url)
: TransferJobPrivate(url, KIO::CMD_SPECIAL, QByteArray(), QByteArray())
{}
QByteArray savedStaticData;
@@ -58,7 +58,7 @@ public:
Q_DECLARE_PUBLIC(DavJob)
- static inline DavJob *newJob(const KUrl &url, int method, const QString \
&request, + static inline DavJob *newJob(const QUrl &url, int method, const \
QString &request, JobFlags flags)
{
DavJob *job = new DavJob(*new DavJobPrivate(url), method, request);
@@ -141,7 +141,7 @@ void DavJob::slotFinished()
/* Convenience methods */
-DavJob* KIO::davPropFind( const KUrl& url, const QDomDocument& properties, const \
QString &depth, JobFlags flags ) +DavJob* KIO::davPropFind( const QUrl& url, const \
QDomDocument& properties, const QString &depth, JobFlags flags ) {
DavJob *job = DavJobPrivate::newJob(url, (int) KIO::DAV_PROPFIND, \
properties.toString(), flags); job->addMetaData( "davDepth", depth );
@@ -149,13 +149,13 @@ DavJob* KIO::davPropFind( const KUrl& url, const QDomDocument& \
properties, const }
-DavJob* KIO::davPropPatch( const KUrl& url, const QDomDocument& properties, JobFlags \
flags ) +DavJob* KIO::davPropPatch( const QUrl& url, const QDomDocument& properties, \
JobFlags flags ) {
return DavJobPrivate::newJob(url, (int) KIO::DAV_PROPPATCH, \
properties.toString(), flags);
}
-DavJob* KIO::davSearch( const KUrl& url, const QString& nsURI, const QString& qName, \
const QString& query, JobFlags flags ) +DavJob* KIO::davSearch( const QUrl& url, \
const QString& nsURI, const QString& qName, const QString& query, JobFlags flags ) {
QDomDocument doc;
QDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" );
@@ -167,7 +167,7 @@ DavJob* KIO::davSearch( const KUrl& url, const QString& nsURI, \
const QString& qN return DavJobPrivate::newJob(url, KIO::DAV_SEARCH, doc.toString(), \
flags); }
-DavJob* KIO::davReport( const KUrl& url, const QString& report, const QString \
&depth, JobFlags flags ) +DavJob* KIO::davReport( const QUrl& url, const QString& \
report, const QString &depth, JobFlags flags ) {
DavJob *job = DavJobPrivate::newJob(url, (int) KIO::DAV_REPORT, report, flags);
job->addMetaData( "davDepth", depth );
diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h
index 0b141be..bd4742e 100644
--- a/kio/kio/davjob.h
+++ b/kio/kio/davjob.h
@@ -81,7 +81,7 @@ namespace KIO {
* @param flags: We support HideProgressInfo here
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropFind( const KUrl& url, const QDomDocument& properties, \
const QString &depth, JobFlags flags = DefaultFlags ); + KIO_EXPORT DavJob* \
davPropFind( const QUrl& url, const QDomDocument& properties, const QString &depth, \
JobFlags flags = DefaultFlags );
/**
* Creates a new DavJob that issues a PROPPATCH command. PROPPATCH sets
@@ -93,7 +93,7 @@ namespace KIO {
* @param flags: We support HideProgressInfo here
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropPatch( const KUrl& url, const QDomDocument& properties, \
JobFlags flags = DefaultFlags ); + KIO_EXPORT DavJob* davPropPatch( const QUrl& \
url, const QDomDocument& properties, JobFlags flags = DefaultFlags );
/**
* Creates a new DavJob that issues a SEARCH command.
@@ -105,7 +105,7 @@ namespace KIO {
* @param flags: We support HideProgressInfo here
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davSearch( const KUrl &url, const QString& nsURI, const \
QString& qName, const QString& query, JobFlags flags = DefaultFlags ); + KIO_EXPORT \
DavJob* davSearch( const QUrl &url, const QString& nsURI, const QString& qName, const \
QString& query, JobFlags flags = DefaultFlags );
/**
* Creates a new DavJob that issues a REPORT command.
@@ -117,7 +117,7 @@ namespace KIO {
* @return the new DavJob
* @since 4.4
*/
- KIO_EXPORT DavJob* davReport( const KUrl& url, const QString& report, const \
QString &depth, JobFlags flags = DefaultFlags ); + KIO_EXPORT DavJob* davReport( \
const QUrl& url, const QString& report, const QString &depth, JobFlags flags = \
DefaultFlags );
}
diff --git a/kio/kio/deletejob.cpp b/kio/kio/deletejob.cpp
index 03586ef..679803e 100644
--- a/kio/kio/deletejob.cpp
+++ b/kio/kio/deletejob.cpp
@@ -65,7 +65,7 @@ namespace KIO
class DeleteJobPrivate: public KIO::JobPrivate
{
public:
- DeleteJobPrivate(const KUrl::List& src)
+ DeleteJobPrivate(const QList<QUrl>& src)
: state( DELETEJOB_STATE_STATING )
, m_processedFiles( 0 )
, m_processedDirs( 0 )
@@ -80,11 +80,11 @@ namespace KIO
int m_processedDirs;
int m_totalFilesDirs;
KUrl m_currentURL;
- KUrl::List files;
- KUrl::List symlinks;
- KUrl::List dirs;
- KUrl::List m_srcList;
- KUrl::List::iterator m_currentStat;
+ QList<QUrl> files;
+ QList<QUrl> symlinks;
+ QList<QUrl> dirs;
+ QList<QUrl> m_srcList;
+ QList<QUrl>::iterator m_currentStat;
QSet<QString> m_parentDirs;
QTimer *m_reportTimer;
@@ -99,7 +99,7 @@ namespace KIO
Q_DECLARE_PUBLIC(DeleteJob)
- static inline DeleteJob *newJob(const KUrl::List &src, JobFlags flags)
+ static inline DeleteJob *newJob(const QList<QUrl> &src, JobFlags flags)
{
DeleteJob *job = new DeleteJob(*new DeleteJobPrivate(src));
job->setUiDelegate(new JobUiDelegate);
@@ -128,7 +128,7 @@ DeleteJob::~DeleteJob()
{
}
-KUrl::List DeleteJob::urls() const
+QList<QUrl> DeleteJob::urls() const
{
return d_func()->m_srcList;
}
@@ -277,7 +277,7 @@ void DeleteJobPrivate::deleteNextFile()
SimpleJob *job;
do {
// Take first file to delete out of list
- KUrl::List::iterator it = files.begin();
+ QList<QUrl>::iterator it = files.begin();
bool isLink = false;
if ( it == files.end() ) // No more files
{
@@ -330,7 +330,7 @@ void DeleteJobPrivate::deleteNextDir()
{
do {
// Take first dir to delete out of list - last ones first !
- KUrl::List::iterator it = --dirs.end();
+ QList<QUrl>::iterator it = --dirs.end();
// If local dir, try to rmdir it directly
#ifdef Q_WS_WIN
if ( (*it).isLocalFile() && RemoveDirectoryW( \
(LPCWSTR)(*it).toLocalFile().utf16() ) != 0 ) { @@ -366,7 +366,7 @@ void \
DeleteJobPrivate::deleteNextDir() if ( !m_srcList.isEmpty() )
{
//kDebug(7007) << "KDirNotify'ing FilesRemoved " << \
m_srcList.toStringList();
- org::kde::KDirNotify::emitFilesRemoved( m_srcList.toStringList() );
+ org::kde::KDirNotify::emitFilesRemoved(m_srcList);
}
if (m_reportTimer!=0)
m_reportTimer->stop();
@@ -483,12 +483,12 @@ void DeleteJob::slotResult( KJob *job )
DeleteJob *KIO::del( const KUrl& src, JobFlags flags )
{
- KUrl::List srcList;
+ QList<QUrl> srcList;
srcList.append( src );
return DeleteJobPrivate::newJob(srcList, flags);
}
-DeleteJob *KIO::del( const KUrl::List& src, JobFlags flags )
+DeleteJob *KIO::del( const QList<QUrl>& src, JobFlags flags )
{
return DeleteJobPrivate::newJob(src, flags);
}
diff --git a/kio/kio/deletejob.h b/kio/kio/deletejob.h
index eaba4be..6212c03 100644
--- a/kio/kio/deletejob.h
+++ b/kio/kio/deletejob.h
@@ -50,7 +50,7 @@ namespace KIO {
* Returns the list of URLs.
* @return the list of URLs.
*/
- KUrl::List urls() const;
+ QList<QUrl> urls() const;
Q_SIGNALS:
@@ -117,7 +117,7 @@ namespace KIO {
* @param flags: We support HideProgressInfo here
* @return the job handling the operation
*/
- KIO_EXPORT DeleteJob *del( const KUrl::List& src, JobFlags flags = DefaultFlags \
); + KIO_EXPORT DeleteJob *del( const QList<QUrl>& src, JobFlags flags = \
DefaultFlags ); }
#endif
diff --git a/kio/kio/kautomount.cpp b/kio/kio/kautomount.cpp
index 872a025..5768940 100644
--- a/kio/kio/kautomount.cpp
+++ b/kio/kio/kautomount.cpp
@@ -84,9 +84,7 @@ void KAutoMountPrivate::slotResult( KJob * job )
// Update the desktop file which is used for mount/unmount (icon change)
kDebug(7015) << " mount finished : updating " << m_desktopFile;
- KUrl dfURL;
- dfURL.setPath( m_desktopFile );
- org::kde::KDirNotify::emitFilesChanged( QStringList() << dfURL.url() );
+ org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() << \
QUrl::fromLocalFile(m_desktopFile)); //KDirWatch::self()->setFileDirty( \
m_desktopFile );
emit q->finished();
@@ -124,9 +122,7 @@ void KAutoUnmountPrivate::slotResult( KJob * job )
{
// Update the desktop file which is used for mount/unmount (icon change)
kDebug(7015) << "unmount finished : updating " << m_desktopFile;
- KUrl dfURL;
- dfURL.setPath( m_desktopFile );
- org::kde::KDirNotify::emitFilesChanged( QStringList() << dfURL.url() );
+ org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() << \
QUrl::fromLocalFile(m_desktopFile)); //KDirWatch::self()->setFileDirty( \
m_desktopFile );
// Notify about the new stuff in that dir, in case of opened windows showing \
it
diff --git a/kio/kio/kdesktopfileactions.cpp b/kio/kio/kdesktopfileactions.cpp
index 3262abe..2a9f300 100644
--- a/kio/kio/kdesktopfileactions.cpp
+++ b/kio/kio/kdesktopfileactions.cpp
@@ -367,7 +367,7 @@ void KDesktopFileActions::executeService( const KUrl::List& urls, \
const KService
kDebug() << action.name() << "first url's path=" << urls.first().path() << \
"exec=" << action.exec(); KRun::run( action.exec(), urls, 0, action.text(), \
action.icon());
// The action may update the desktop file. Example: eject unmounts (#5129).
- org::kde::KDirNotify::emitFilesChanged( urls.toStringList() );
+ org::kde::KDirNotify::emitFilesChanged(urls);
}
}
diff --git a/kio/kio/kdirnotify.cpp b/kio/kio/kdirnotify.cpp
index 5f06b38..c10bcfb 100644
--- a/kio/kio/kdirnotify.cpp
+++ b/kio/kio/kdirnotify.cpp
@@ -1,13 +1,20 @@
-/*
- * This file was generated by dbusxml2cpp version 0.6
- * Command line was: dbusxml2cpp -m -p kdirnotify -- org.kde.KDirNotify.xml
- *
- * dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved.
- *
- * This is an auto-generated file.
- * This file may have been hand-edited. Look for HAND-EDIT comments
- * before re-generating it.
- */
+/* This file is part of the KDE libraries
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
#include "kdirnotify.h"
@@ -47,14 +54,24 @@ void OrgKdeKDirNotifyInterface::emitFilesAdded(const QString \
&directory) emitSignal(QLatin1String("FilesAdded"), QVariantList() << directory);
}
-void OrgKdeKDirNotifyInterface::emitFilesChanged(const QStringList &fileList)
+static QStringList urlListToStringList(const QList<QUrl> &urls)
+{
+ QStringList lst;
+ for(QList<QUrl>::const_iterator it = urls.constBegin();
+ it != urls.constEnd(); ++it) {
+ lst.append(it->toString());
+ }
+ return lst;
+}
+
+void OrgKdeKDirNotifyInterface::emitFilesChanged(const QList<QUrl> &fileList)
{
- emitSignal(QLatin1String("FilesChanged"), QVariantList() << QVariant(fileList));
+ emitSignal(QLatin1String("FilesChanged"), QVariantList() << \
QVariant(urlListToStringList(fileList))); }
-void OrgKdeKDirNotifyInterface::emitFilesRemoved(const QStringList &fileList)
+void OrgKdeKDirNotifyInterface::emitFilesRemoved(const QList<QUrl> &fileList)
{
- emitSignal(QLatin1String("FilesRemoved"), QVariantList() << QVariant(fileList));
+ emitSignal(QLatin1String("FilesRemoved"), QVariantList() << \
QVariant(urlListToStringList(fileList))); }
void OrgKdeKDirNotifyInterface::emitEnteredDirectory(const QString &url)
diff --git a/kio/kio/kdirnotify.h b/kio/kio/kdirnotify.h
index 52f344e..17ed777 100644
--- a/kio/kio/kdirnotify.h
+++ b/kio/kio/kdirnotify.h
@@ -1,15 +1,23 @@
-/*
- * This file was generated by dbusxml2cpp version 0.6
- * Command line was: dbusxml2cpp -m -p kdirnotify -- org.kde.KDirNotify.xml
- *
- * dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved.
- *
- * This is an auto-generated file.
- * Do not edit! All changes made to it will be lost.
- */
+/* This file is part of the KDE libraries
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
-#ifndef KDIRNOTIFY_H_268161151672021
-#define KDIRNOTIFY_H_268161151672021
+#ifndef KDIRNOTIFY_H
+#define KDIRNOTIFY_H
#include <QtCore/QObject>
#include <QtCore/QByteArray>
@@ -83,8 +91,8 @@ public:
static void emitFileRenamed(const QString &src, const QString &dst);
static void emitFileMoved(const QString &src, const QString &dst);
static void emitFilesAdded(const QString &directory);
- static void emitFilesChanged(const QStringList &fileList);
- static void emitFilesRemoved(const QStringList &fileList);
+ static void emitFilesChanged(const QList<QUrl> &fileList);
+ static void emitFilesRemoved(const QList<QUrl> &fileList);
static void emitEnteredDirectory(const QString &url);
static void emitLeftDirectory(const QString &url);
};
diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp
index 5946751..befe241 100644
--- a/kio/tests/jobtest.cpp
+++ b/kio/tests/jobtest.cpp
@@ -1226,11 +1226,11 @@ void JobTest::deleteManyDirs(bool using_fast_path)
kio_resolve_local_urls = !using_fast_path;
const int numDirs = 50;
- QList<KUrl> dirs;
+ QList<QUrl> dirs;
for (int i = 0; i < numDirs; ++i) {
const QString dir = homeTmpDir() + "dir" + QString::number(i);
createTestDirectory(dir);
- dirs << KUrl(dir);
+ dirs << QUrl::fromLocalFile(dir);
}
QTime dt;
dt.start();
@@ -1238,8 +1238,8 @@ void JobTest::deleteManyDirs(bool using_fast_path)
job->setUiDelegate(0);
bool ok = KIO::NetAccess::synchronousRun(job, 0);
QVERIFY(ok);
- Q_FOREACH(const KUrl& dir, dirs) {
- QVERIFY(!QFile::exists(dir.path()));
+ Q_FOREACH(const QUrl& dir, dirs) {
+ QVERIFY(!QFile::exists(dir.toLocalFile()));
}
kDebug() << "Deleted" << numDirs << "dirs in" << dt.elapsed() << "milliseconds";
@@ -1292,11 +1292,11 @@ void JobTest::deleteManyFilesTogether(bool using_fast_path)
const int numFiles = 100; // Use 1000 for performance testing
const QString baseDir = homeTmpDir();
createManyFiles(baseDir, numFiles);
- QList<KUrl> urls;
+ QList<QUrl> urls;
for (int i = 0; i < numFiles; ++i) {
const QString file = baseDir + QString::number(i);
QVERIFY(QFile::exists(file));
- urls.append(KUrl(file));
+ urls.append(QUrl::fromLocalFile(file));
}
//kDebug() << file;
diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp
index 6362baf..741f636 100644
--- a/kio/tests/kdirlistertest.cpp
+++ b/kio/tests/kdirlistertest.cpp
@@ -385,7 +385,7 @@ void KDirListerTest::testRefreshRootItem()
connect(&m_dirLister, SIGNAL(refreshItems(QList<QPair<KFileItem,KFileItem> >)),
this, SLOT(slotRefreshItems(QList<QPair<KFileItem,KFileItem> >)));
- org::kde::KDirNotify::emitFilesChanged(QStringList() << KUrl(path).url());
+ org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() << \
QUrl::fromLocalFile(path)); waitForRefreshedItems();
QCOMPARE(m_dirLister.spyStarted.count(), 0);
@@ -416,10 +416,10 @@ void KDirListerTest::testRefreshRootItem()
org::kde::KDirNotify::emitFilesAdded(KUrl(path).url());
QTest::qWait(200);
- org::kde::KDirNotify::emitFilesChanged(QStringList() << \
KUrl(directoryFile).url()); + org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() \
<< QUrl::fromLocalFile(directoryFile)); QCOMPARE(m_refreshedItems.count(), 0);
- org::kde::KDirNotify::emitFilesChanged(QStringList() << KUrl(path).url());
+ org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() << \
QUrl::fromLocalFile(path)); waitForRefreshedItems();
QCOMPARE(m_refreshedItems.count(), 1);
entry = m_refreshedItems.first();
diff --git a/kio/tests/kdirmodeltest.cpp b/kio/tests/kdirmodeltest.cpp
index b0c9477..a5a0528 100644
--- a/kio/tests/kdirmodeltest.cpp
+++ b/kio/tests/kdirmodeltest.cpp
@@ -649,7 +649,7 @@ void KDirModelTest::testChmodDirectory() // #53397
QVERIFY(KIO::NetAccess::synchronousRun(job, 0));
// ChmodJob doesn't talk to KDirNotify, kpropertiesdialog does.
// [this allows to group notifications after all the changes one can make in the \
dialog]
- org::kde::KDirNotify::emitFilesChanged( QStringList() << path );
+ org::kde::KDirNotify::emitFilesChanged(QList<QUrl>() << \
QUrl::fromLocalFile(path));
// Wait for the DBUS signal from KDirNotify, it's the one the triggers \
rowsRemoved enterLoop();
@@ -1216,8 +1216,8 @@ void KDirModelTest::testDeleteFiles()
{
const int oldTopLevelRowCount = m_dirModel->rowCount();
const QString file = m_tempDir->path() + "/toplevelfile_";
- QList<KUrl> urls;
- urls << KUrl(file + '1') << KUrl(file + '2') << KUrl(file + '3');
+ QList<QUrl> urls;
+ urls << QUrl::fromLocalFile(file + '1') << QUrl::fromLocalFile(file + '2') << \
QUrl::fromLocalFile(file + '3');
QSignalSpy spyRowsRemoved(m_dirModel, SIGNAL(rowsRemoved(QModelIndex,int,int)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic