[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdelibs/frameworks] /: QUrl porting broke jobtest, due to QString-to-QUrl conversion being implicit
From:       David Faure <faure () kde ! org>
Date:       2012-04-30 23:56:38
Message-ID: 20120430235638.EE98DA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 8f42a3c89888fdfbc1cbb0fcf0b134977cef055c by David Faure.
Committed on 01/05/2012 at 01:56.
Pushed by dfaure into branch 'frameworks'.

QUrl porting broke jobtest, due to QString-to-QUrl conversion being implicit.

Fixed by enabling QT_NO_URL_CAST_FROM_STRING in all of KIO, which spotted
quite a few missing QUrl::fromLocalFile() calls.

M  +2    -0    kio/CMakeLists.txt
M  +3    -3    kio/bookmarks/kbookmarkimporter_ns.cc
M  +2    -2    kio/bookmarks/kbookmarkimporter_opera.cc
M  +7    -7    kio/kfile/kencodingfiledialog.cpp
M  +7    -7    kio/kfile/kencodingfiledialog.h
M  +1    -1    kio/kfile/kurlcombobox.cpp
M  +3    -3    kio/kfile/kurlrequester.cpp
M  +7    -7    kio/kfile/kurlrequesterdialog.cpp
M  +4    -4    kio/kfile/kurlrequesterdialog.h
M  +1    -1    kio/kio/authinfo.cpp
M  +1    -1    kio/kio/fileundomanager.cpp
M  +37   -35   kio/kio/kprotocolmanager.cpp
M  +24   -24   kio/kio/kprotocolmanager.h
M  +1    -1    kio/kio/slavebase.cpp
M  +1    -1    kio/tests/jobguitest.cpp
M  +8    -8    kio/tests/jobtest.cpp
M  +6    -6    kio/tests/kdirlistertest.cpp
M  +1    -1    kio/tests/kdirmodeltest.cpp
M  +7    -7    kio/tests/kfiledialogtest.cpp
M  +1    -1    kio/tests/kurlrequestertest.cpp
M  +0    -1    staging/kwidgets/CMakeLists.txt
M  +0    -1    staging/sonnet/CMakeLists.txt

http://commits.kde.org/kdelibs/8f42a3c89888fdfbc1cbb0fcf0b134977cef055c

diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt
index 19f8d5c..d7b55ce 100644
--- a/kio/CMakeLists.txt
+++ b/kio/CMakeLists.txt
@@ -1,5 +1,7 @@
 project(kio)
 
+add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
+
 if(KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION)
    set(KIO_NO_SOLID TRUE)
    set(KIO_NO_NEPOMUK TRUE)
diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc \
b/kio/bookmarks/kbookmarkimporter_ns.cc index ff41ce8..e7240cd 100644
--- a/kio/bookmarks/kbookmarkimporter_ns.cc
+++ b/kio/bookmarks/kbookmarkimporter_ns.cc
@@ -111,11 +111,11 @@ QString KNSBookmarkImporterImpl::findDefaultLocation(bool \
forSaving) const  if (m_utf8)
     {
        if ( forSaving )
-           return KFileDialog::getSaveFileName( QString(QDir::homePath() + \
"/.mozilla"), +           return KFileDialog::getSaveFileName( \
                QUrl::fromLocalFile(QDir::homePath() + "/.mozilla"),
                                                 i18n("*.html|HTML Files (*.html)"),
                                                 QApplication::activeWindow() );
        else
-           return KFileDialog::getOpenFileName( QString(QDir::homePath() + \
"/.mozilla"), +           return KFileDialog::getOpenFileName( \
                QUrl::fromLocalFile(QDir::homePath() + "/.mozilla"),
                                                 i18n("*.html|HTML Files (*.html)"),
                                                 QApplication::activeWindow() );
     }
@@ -131,7 +131,7 @@ void KNSBookmarkExporterImpl::setUtf8(bool utf8) {
    m_utf8 = utf8;
 }
 
-void KNSBookmarkExporterImpl::write(const KBookmarkGroup &parent) 
+void KNSBookmarkExporterImpl::write(const KBookmarkGroup &parent)
 {
    if (!QFile::exists(m_fileName)) {
       QString errorMsg = QString("Could not find %1. Netscape is probably not \
                installed. "
diff --git a/kio/bookmarks/kbookmarkimporter_opera.cc \
b/kio/bookmarks/kbookmarkimporter_opera.cc index 651eef8..fda0bdf 100644
--- a/kio/bookmarks/kbookmarkimporter_opera.cc
+++ b/kio/bookmarks/kbookmarkimporter_opera.cc
@@ -117,11 +117,11 @@ void KOperaBookmarkImporterImpl::parse() {
 QString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
 {
    return saving ? KFileDialog::getSaveFileName(
-                       QString(QDir::homePath() + "/.opera"),
+                       QUrl::fromLocalFile(QDir::homePath() + "/.opera"),
                        i18n("*.adr|Opera Bookmark Files (*.adr)"),
                        QApplication::activeWindow() )
                  : KFileDialog::getOpenFileName(
-                       QString(QDir::homePath() + "/.opera"),
+                       QUrl::fromLocalFile(QDir::homePath() + "/.opera"),
                        i18n("*.adr|Opera Bookmark Files (*.adr)"),
                        QApplication::activeWindow() );
 }
diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp
index 816dae7..bc21083 100644
--- a/kio/kfile/kencodingfiledialog.cpp
+++ b/kio/kfile/kencodingfiledialog.cpp
@@ -36,7 +36,7 @@ struct KEncodingFileDialogPrivate
     KComboBox *encoding;
 };
 
-KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString& \
encoding , const QString& filter, +KEncodingFileDialog::KEncodingFileDialog(const \
                QUrl& startDir, const QString& encoding , const QString& filter,
                                          const QString& caption, \
KFileDialog::OperationMode type, QWidget *parent)  : \
KFileDialog(startDir,filter,parent), d(new KEncodingFileDialogPrivate)  {
@@ -98,7 +98,7 @@ QString KEncodingFileDialog::selectedEncoding() const
 
 
 KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const \
                QString& encoding,
- 				     const QString& startDir,
+ 				     const QUrl& startDir,
                                      const QString& filter,
                                      QWidget *parent, const QString& caption)
 {
@@ -116,7 +116,7 @@ KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenFileNameAndEncoding(cons  }
 
 KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const \
                QString& encoding,
-					  const QString& startDir,
+					  const QUrl& startDir,
                                           const QString& filter,
                                           QWidget *parent,
                                           const QString& caption)
@@ -132,7 +132,7 @@ KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenFileNamesAndEncoding(con  return res;
 }
 
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenUrlAndEncoding(const \
QString& encoding, const QString& startDir, +KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenUrlAndEncoding(const QString& encoding, const QUrl& \
                startDir,
                                                                        const \
QString& filter, QWidget *parent, const QString& caption)  {
     KEncodingFileDialog dlg(startDir, encoding, filter,
@@ -148,7 +148,7 @@ KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenUrlAndEncoding(const QSt  return res;
 }
 
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenUrlsAndEncoding(const \
QString& encoding, const QString& startDir, +KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenUrlsAndEncoding(const QString& encoding, const QUrl& \
startDir,  const QString& filter,
                                           QWidget *parent,
                                           const QString& caption)
@@ -168,7 +168,7 @@ KEncodingFileDialog::Result \
KEncodingFileDialog::getOpenUrlsAndEncoding(const QS  
 
 KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const \
                QString& encoding,
-			             const QString& dir,
+			             const QUrl& dir,
 				     const QString& filter,
                                      QWidget *parent,
                                      const QString& caption)
@@ -191,7 +191,7 @@ KEncodingFileDialog::Result \
KEncodingFileDialog::getSaveFileNameAndEncoding(cons  
 
 KEncodingFileDialog::Result  KEncodingFileDialog::getSaveUrlAndEncoding(const \
                QString& encoding,
-			     const QString& dir, const  QString& filter,
+			     const QUrl& dir, const  QString& filter,
                              QWidget *parent, const QString& caption)
 {
     KEncodingFileDialog dlg(dir, encoding, filter,
diff --git a/kio/kfile/kencodingfiledialog.h b/kio/kfile/kencodingfiledialog.h
index 8c18322..abb939a 100644
--- a/kio/kfile/kencodingfiledialog.h
+++ b/kio/kfile/kencodingfiledialog.h
@@ -78,7 +78,7 @@ public:
      *		@li Saving
      * @param parent The parent widget of this dialog
      */
-    KEncodingFileDialog (const QString& startDir = QString(),
+    KEncodingFileDialog (const QUrl& startDir = QUrl(),
                     const QString& encoding = QString(),
 		    const QString& filter = QString(),
 		    const QString& caption = QString(), KFileDialog::OperationMode type = \
KFileDialog::Opening, @@ -123,7 +123,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getOpenFileNameAndEncoding(const QString& encoding=QString(),
-   				   const QString& startDir= QString(),
+   				   const QUrl& startDir = QUrl(),
 				   const QString& filter= QString(),
 				   QWidget *parent= 0,
 				   const QString& caption = QString());
@@ -155,7 +155,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getOpenFileNamesAndEncoding(const QString& encoding=QString(),
-					const QString& startDir= QString(),
+					const QUrl& startDir = QUrl(),
 					const QString& filter= QString(),
 					QWidget *parent = 0,
 					const QString& caption= QString());
@@ -187,7 +187,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getOpenUrlAndEncoding(const QString& encoding=QString(),
-			   const QString& startDir = QString(),
+			   const QUrl& startDir = QUrl(),
 			   const QString& filter= QString(),
 			   QWidget *parent= 0,
 			   const QString& caption = QString());
@@ -222,7 +222,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getOpenUrlsAndEncoding(const QString& encoding=QString(),
-				  const QString& startDir= QString(),
+				  const QUrl& startDir = QUrl(),
 				  const QString& filter= QString(),
 				  QWidget *parent = 0,
 				  const QString& caption= QString());
@@ -258,7 +258,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getSaveFileNameAndEncoding(const QString& encoding=QString(),
-				   const QString& startDir=QString(),
+				   const QUrl& startDir = QUrl(),
 				   const QString& filter= QString(),
 				   QWidget *parent= 0,
 				   const QString& caption = QString());
@@ -293,7 +293,7 @@ public:
      * @param caption The name of the dialog widget.
      */
     static Result getSaveUrlAndEncoding(const QString& encoding=QString(),
-			   const QString& startDir= QString(),
+			   const QUrl& startDir= QUrl(),
 			   const QString& filter= QString(),
 			   QWidget *parent= 0,
 			   const QString& caption = QString());
diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp
index 776a4c0..e87586e 100644
--- a/kio/kfile/kurlcombobox.cpp
+++ b/kio/kfile/kurlcombobox.cpp
@@ -232,7 +232,7 @@ void KUrlComboBox::setUrls( const QStringList &_urls, \
OverLoadResolving remove )  ++it;
             continue;
         }
-        QUrl u = *it;
+        QUrl u(*it);
 
         // Don't restore if file doesn't exist anymore
         if (u.isLocalFile() && !QFile::exists(u.toLocalFile())) {
diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp
index 365b8d0..4b1ac65 100644
--- a/kio/kfile/kurlrequester.cpp
+++ b/kio/kfile/kurlrequester.cpp
@@ -339,9 +339,9 @@ void KUrlRequester::KUrlRequesterPrivate::_k_slotOpenDialog()
 
         QUrl newurl;
         if (fileDialogMode & KFile::LocalOnly)
-            newurl = KFileDialog::getExistingDirectory( openUrl, m_parent);
+            newurl = QUrl::fromLocalFile(KFileDialog::getExistingDirectory(openUrl, \
m_parent));  else
-            newurl = KFileDialog::getExistingDirectoryUrl( openUrl, m_parent);
+            newurl = KFileDialog::getExistingDirectoryUrl(openUrl, m_parent);
 
         if ( newurl.isValid() )
         {
@@ -428,7 +428,7 @@ KFileDialog * KUrlRequester::fileDialog() const
 {
     if (!d->myFileDialog) {
         QWidget *p = parentWidget();
-        d->myFileDialog = new KFileDialog(QString(), d->fileDialogFilter, p);
+        d->myFileDialog = new KFileDialog(QUrl(), d->fileDialogFilter, p);
         d->myFileDialog->setMode(d->fileDialogMode);
         d->myFileDialog->setCaption(windowTitle());
         d->myFileDialog->setWindowModality(d->fileDialogModality);
diff --git a/kio/kfile/kurlrequesterdialog.cpp b/kio/kfile/kurlrequesterdialog.cpp
index 436661a..7a7ca84 100644
--- a/kio/kfile/kurlrequesterdialog.cpp
+++ b/kio/kfile/kurlrequesterdialog.cpp
@@ -38,7 +38,7 @@ public:
 
     KUrlRequesterDialog *q;
 
-    void initDialog(const QString &text, const QString &url);
+    void initDialog(const QString &text, const QUrl &url);
 
     // slots
     void _k_slotClear();
@@ -48,7 +48,7 @@ public:
 };
 
 
-KUrlRequesterDialog::KUrlRequesterDialog( const QString& urlName, QWidget *parent)
+KUrlRequesterDialog::KUrlRequesterDialog( const QUrl& urlName, QWidget *parent)
     : KDialog(parent), d(new KUrlRequesterDialogPrivate(this))
 {
   setButtons( Ok | Cancel | User1 );
@@ -57,7 +57,7 @@ KUrlRequesterDialog::KUrlRequesterDialog( const QString& urlName, \
QWidget *paren  d->initDialog(i18n("Location:"), urlName);
 }
 
-KUrlRequesterDialog::KUrlRequesterDialog( const QString& urlName, const QString& \
_text, QWidget *parent) +KUrlRequesterDialog::KUrlRequesterDialog( const QUrl& \
urlName, const QString& _text, QWidget *parent)  : KDialog(parent), d(new \
KUrlRequesterDialogPrivate(this))  {
   setButtons( Ok | Cancel | User1 );
@@ -71,12 +71,12 @@ KUrlRequesterDialog::~KUrlRequesterDialog()
     delete d;
 }
 
-void KUrlRequesterDialogPrivate::initDialog(const QString &text,const QString \
&urlName) +void KUrlRequesterDialogPrivate::initDialog(const QString &text,const QUrl \
&urlName)  {
     q->setDefaultButton(KDialog::Ok);
     QWidget *plainPage = q->mainWidget();
-   QVBoxLayout * topLayout = new QVBoxLayout( plainPage );
-   topLayout->setMargin( 0 );
+    QVBoxLayout * topLayout = new QVBoxLayout( plainPage );
+    topLayout->setMargin( 0 );
 
     QLabel * label = new QLabel( text , plainPage );
     topLayout->addWidget( label );
@@ -119,7 +119,7 @@ QUrl KUrlRequesterDialog::selectedUrl() const
 }
 
 
-QUrl KUrlRequesterDialog::getUrl(const QString& dir, QWidget *parent,
+QUrl KUrlRequesterDialog::getUrl(const QUrl& dir, QWidget *parent,
                                  const QString& caption)
 {
     KUrlRequesterDialog dlg(dir, parent);
diff --git a/kio/kfile/kurlrequesterdialog.h b/kio/kfile/kurlrequesterdialog.h
index 24dbe5d..ec9d703 100644
--- a/kio/kfile/kurlrequesterdialog.h
+++ b/kio/kfile/kurlrequesterdialog.h
@@ -49,7 +49,7 @@ public:
      *               directory where a file has been selected.
      * @param parent The parent object of this widget.
      */
-    explicit KUrlRequesterDialog(const QString &url, QWidget *parent = 0);
+    explicit KUrlRequesterDialog(const QUrl &url, QWidget *parent = 0);
 
     /**
      * Constructs a KUrlRequesterDialog.
@@ -60,8 +60,8 @@ public:
      * @param text   Text of the label
      * @param parent The parent object of this widget.
      */
-    KUrlRequesterDialog( const QString& url, const QString& text,
-                      QWidget *parent);
+    KUrlRequesterDialog(const QUrl& url, const QString& text,
+                        QWidget *parent);
     /**
      * Destructs the dialog.
      */
@@ -79,7 +79,7 @@ public:
      * @param parent The widget the dialog will be centered on initially.
      * @param caption The caption to use for the dialog.
      */
-    static QUrl getUrl(const QString& url = QString(),
+    static QUrl getUrl(const QUrl& url = QUrl(),
                        QWidget *parent= 0, const QString& caption = QString());
 
     /**
diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp
index 47f8764..84c8a77 100644
--- a/kio/kio/authinfo.cpp
+++ b/kio/kio/authinfo.cpp
@@ -250,7 +250,7 @@ const QDBusArgument &KIO::operator>>(const QDBusArgument \
&argument, AuthInfo &a)  >> a.d->extraFields;
     argument.endStructure();
 
-    a.url = url;
+    a.url = QUrl(url);
     return argument;
 }
 
diff --git a/kio/kio/fileundomanager.cpp b/kio/kio/fileundomanager.cpp
index 258af65..16787ae 100644
--- a/kio/kio/fileundomanager.cpp
+++ b/kio/kio/fileundomanager.cpp
@@ -184,7 +184,7 @@ void CommandRecorder::slotCopyingDone(KIO::Job *job, const QUrl \
                &from, const QUr
       QMap<QString, QString>::ConstIterator it = metaData.find("trashURL-" + \
from.path());  if (it != metaData.constEnd()) {
           // Update URL
-          op.m_dst = it.value();
+          op.m_dst = QUrl(it.value());
       }
   }
 
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
index 216a4e3..87f909a 100644
--- a/kio/kio/kprotocolmanager.cpp
+++ b/kio/kio/kprotocolmanager.cpp
@@ -123,7 +123,7 @@ class KProtocolManagerPrivate
 public:
    KProtocolManagerPrivate();
    ~KProtocolManagerPrivate();
-    bool shouldIgnoreProxyFor(const KUrl& url);
+    bool shouldIgnoreProxyFor(const QUrl& url);
 
    KSharedConfig::Ptr config;
    KSharedConfig::Ptr http_config;
@@ -153,7 +153,7 @@ KProtocolManagerPrivate::~KProtocolManagerPrivate()
 /*
  * Returns true if url is in the no proxy list.
  */
-bool KProtocolManagerPrivate::shouldIgnoreProxyFor(const KUrl& url)
+bool KProtocolManagerPrivate::shouldIgnoreProxyFor(const QUrl& url)
 {
   bool isMatch = false;
   const KProtocolManager::ProxyType type = KProtocolManager::proxyType();
@@ -391,7 +391,7 @@ QString KProtocolManager::proxyFor( const QString& protocol )
   return proxyStr;
 }
 
-QString KProtocolManager::proxyForUrl( const KUrl &url )
+QString KProtocolManager::proxyForUrl( const QUrl &url )
 {
   const QStringList proxies = proxiesForUrl(url);
 
@@ -401,7 +401,7 @@ QString KProtocolManager::proxyForUrl( const KUrl &url )
   return proxies.first();
 }
 
-static QStringList getSystemProxyFor( const KUrl& url )
+static QStringList getSystemProxyFor( const QUrl& url )
 {
   QStringList proxies;
 
@@ -410,7 +410,7 @@ static QStringList getSystemProxyFor( const KUrl& url )
   const QList<QNetworkProxy> proxyList = \
QNetworkProxyFactory::systemProxyForQuery(query);  Q_FOREACH(const QNetworkProxy& \
proxy, proxyList)  {
-    KUrl url;
+    QUrl url;
     const QNetworkProxy::ProxyType type = proxy.type();
     if (type == QNetworkProxy::NoProxy || type == QNetworkProxy::DefaultProxy)
     {
@@ -455,7 +455,7 @@ static QStringList getSystemProxyFor( const KUrl& url )
   return proxies;
 }
 
-QStringList KProtocolManager::proxiesForUrl( const KUrl &url )
+QStringList KProtocolManager::proxiesForUrl( const QUrl &url )
 {
   QStringList proxyList;
 
@@ -466,7 +466,7 @@ QStringList KProtocolManager::proxiesForUrl( const KUrl &url )
       case PACProxy:
       case WPADProxy:
       {
-        KUrl u (url);
+        QUrl u (url);
         const QString protocol = adjustProtocol(u.scheme());
         u.setScheme(protocol);
 
@@ -474,7 +474,7 @@ QStringList KProtocolManager::proxiesForUrl( const KUrl &url )
           QDBusReply<QStringList> reply = QDBusInterface(QL1S("org.kde.kded"),
                                                          \
                QL1S("/modules/proxyscout"),
                                                          \
                QL1S("org.kde.KPAC.ProxyScout"))
-                                          .call(QL1S("proxiesForUrl"), u.url());
+                                          .call(QL1S("proxiesForUrl"), \
u.toString());  proxyList = reply;
         }
         break;
@@ -522,7 +522,7 @@ void KProtocolManager::badProxy( const QString &proxy )
   }
 }
 
-QString KProtocolManager::slaveProtocol(const KUrl &url, QString &proxy)
+QString KProtocolManager::slaveProtocol(const QUrl &url, QString &proxy)
 {
     QStringList proxyList;
     const QString protocol = KProtocolManager::slaveProtocol(url, proxyList);
@@ -533,7 +533,7 @@ QString KProtocolManager::slaveProtocol(const KUrl &url, QString \
&proxy)  }
 
 // Generates proxy cache key from request given url.
-static void extractProxyCacheKeyFromUrl(const KUrl& u, QString* key)
+static void extractProxyCacheKeyFromUrl(const QUrl& u, QString* key)
 {
     if (!key)
         return;
@@ -545,19 +545,21 @@ static void extractProxyCacheKeyFromUrl(const KUrl& u, QString* \
                key)
         *key += QString::number(u.port());
 }
 
-QString KProtocolManager::slaveProtocol(const KUrl &url, QStringList &proxyList)
+QString KProtocolManager::slaveProtocol(const QUrl &url, QStringList &proxyList)
 {
+#if 0
   if (url.hasSubUrl()) { // We don't want the suburl's protocol
-      const KUrl::List list = KUrl::split(url);
+      const QUrl::List list = QUrl::split(url);
       return slaveProtocol(list.last(), proxyList);
   }
+#endif
 
   proxyList.clear();
 
   // Do not perform a proxy lookup for any url classified as a ":local" url or
   // one that does not have a host component or if proxy is disabled.
   QString protocol (url.scheme());
-  if (!url.hasHost()
+  if (url.host().isEmpty()
       || KProtocolInfo::protocolClass(protocol) == QL1S(":local")
       || KProtocolManager::proxyType() == KProtocolManager::NoProxy) {
       return protocol;
@@ -582,7 +584,7 @@ QString KProtocolManager::slaveProtocol(const KUrl &url, \
QStringList &proxyList)  if (proxy == QL1S("DIRECT")) {
               proxyList << proxy;
           } else {
-              KUrl u (proxy);
+              QUrl u (proxy);
               if (!u.isEmpty() && u.isValid() && !u.scheme().isEmpty()) {
                   proxyList << proxy;
               }
@@ -597,7 +599,7 @@ QString KProtocolManager::slaveProtocol(const KUrl &url, \
QStringList &proxyList)  && !protocol.startsWith(QL1S("webdav"))
       && KProtocolInfo::isKnownProtocol(protocol)) {
       Q_FOREACH(const QString& proxy, proxyList) {
-          KUrl u (proxy);
+          QUrl u (proxy);
           if (u.isValid() && KProtocolInfo::isKnownProtocol(u.scheme())) {
               protocol = u.scheme();
               break;
@@ -990,7 +992,7 @@ QString KProtocolManager::proxyConfigScript()
 
 /* =========================== PROTOCOL CAPABILITIES ============== */
 
-static KProtocolInfo::Ptr findProtocol(const KUrl &url)
+static KProtocolInfo::Ptr findProtocol(const QUrl &url)
 {
    QString protocol = url.scheme();
 
@@ -1004,7 +1006,7 @@ static KProtocolInfo::Ptr findProtocol(const KUrl &url)
 }
 
 
-KProtocolInfo::Type KProtocolManager::inputType( const KUrl &url )
+KProtocolInfo::Type KProtocolManager::inputType( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1013,7 +1015,7 @@ KProtocolInfo::Type KProtocolManager::inputType( const KUrl \
&url )  return prot->m_inputType;
 }
 
-KProtocolInfo::Type KProtocolManager::outputType( const KUrl &url )
+KProtocolInfo::Type KProtocolManager::outputType( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1023,7 +1025,7 @@ KProtocolInfo::Type KProtocolManager::outputType( const KUrl \
&url )  }
 
 
-bool KProtocolManager::isSourceProtocol( const KUrl &url )
+bool KProtocolManager::isSourceProtocol( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1032,7 +1034,7 @@ bool KProtocolManager::isSourceProtocol( const KUrl &url )
   return prot->m_isSourceProtocol;
 }
 
-bool KProtocolManager::supportsListing( const KUrl &url )
+bool KProtocolManager::supportsListing( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1041,7 +1043,7 @@ bool KProtocolManager::supportsListing( const KUrl &url )
   return prot->m_supportsListing;
 }
 
-QStringList KProtocolManager::listing( const KUrl &url )
+QStringList KProtocolManager::listing( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1050,7 +1052,7 @@ QStringList KProtocolManager::listing( const KUrl &url )
   return prot->m_listing;
 }
 
-bool KProtocolManager::supportsReading( const KUrl &url )
+bool KProtocolManager::supportsReading( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1059,7 +1061,7 @@ bool KProtocolManager::supportsReading( const KUrl &url )
   return prot->m_supportsReading;
 }
 
-bool KProtocolManager::supportsWriting( const KUrl &url )
+bool KProtocolManager::supportsWriting( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1068,7 +1070,7 @@ bool KProtocolManager::supportsWriting( const KUrl &url )
   return prot->m_supportsWriting;
 }
 
-bool KProtocolManager::supportsMakeDir( const KUrl &url )
+bool KProtocolManager::supportsMakeDir( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1077,7 +1079,7 @@ bool KProtocolManager::supportsMakeDir( const KUrl &url )
   return prot->m_supportsMakeDir;
 }
 
-bool KProtocolManager::supportsDeleting( const KUrl &url )
+bool KProtocolManager::supportsDeleting( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1086,7 +1088,7 @@ bool KProtocolManager::supportsDeleting( const KUrl &url )
   return prot->m_supportsDeleting;
 }
 
-bool KProtocolManager::supportsLinking( const KUrl &url )
+bool KProtocolManager::supportsLinking( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1095,7 +1097,7 @@ bool KProtocolManager::supportsLinking( const KUrl &url )
   return prot->m_supportsLinking;
 }
 
-bool KProtocolManager::supportsMoving( const KUrl &url )
+bool KProtocolManager::supportsMoving( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1104,7 +1106,7 @@ bool KProtocolManager::supportsMoving( const KUrl &url )
   return prot->m_supportsMoving;
 }
 
-bool KProtocolManager::supportsOpening( const KUrl &url )
+bool KProtocolManager::supportsOpening( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1113,7 +1115,7 @@ bool KProtocolManager::supportsOpening( const KUrl &url )
   return prot->m_supportsOpening;
 }
 
-bool KProtocolManager::canCopyFromFile( const KUrl &url )
+bool KProtocolManager::canCopyFromFile( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1123,7 +1125,7 @@ bool KProtocolManager::canCopyFromFile( const KUrl &url )
 }
 
 
-bool KProtocolManager::canCopyToFile( const KUrl &url )
+bool KProtocolManager::canCopyToFile( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1132,7 +1134,7 @@ bool KProtocolManager::canCopyToFile( const KUrl &url )
   return prot->m_canCopyToFile;
 }
 
-bool KProtocolManager::canRenameFromFile( const KUrl &url )
+bool KProtocolManager::canRenameFromFile( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1142,7 +1144,7 @@ bool KProtocolManager::canRenameFromFile( const KUrl &url )
 }
 
 
-bool KProtocolManager::canRenameToFile( const KUrl &url )
+bool KProtocolManager::canRenameToFile( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1151,7 +1153,7 @@ bool KProtocolManager::canRenameToFile( const KUrl &url )
   return prot->canRenameToFile();
 }
 
-bool KProtocolManager::canDeleteRecursive( const KUrl &url )
+bool KProtocolManager::canDeleteRecursive( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1160,7 +1162,7 @@ bool KProtocolManager::canDeleteRecursive( const KUrl &url )
   return prot->canDeleteRecursive();
 }
 
-KProtocolInfo::FileNameUsedForCopying KProtocolManager::fileNameUsedForCopying( \
const KUrl &url ) +KProtocolInfo::FileNameUsedForCopying \
KProtocolManager::fileNameUsedForCopying( const QUrl &url )  {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
@@ -1169,7 +1171,7 @@ KProtocolInfo::FileNameUsedForCopying \
KProtocolManager::fileNameUsedForCopying(  return prot->fileNameUsedForCopying();
 }
 
-QString KProtocolManager::defaultMimetype( const KUrl &url )
+QString KProtocolManager::defaultMimetype( const QUrl &url )
 {
   KProtocolInfo::Ptr prot = findProtocol(url);
   if ( !prot )
diff --git a/kio/kio/kprotocolmanager.h b/kio/kio/kprotocolmanager.h
index 11e43fe..c7c09fd 100644
--- a/kio/kio/kprotocolmanager.h
+++ b/kio/kio/kprotocolmanager.h
@@ -259,7 +259,7 @@ public:
    * @param url the URL whose proxy info is needed
    * @returns the proxy server address if one is available, otherwise a QString().
    */
-  static QString proxyForUrl( const KUrl& url );
+  static QString proxyForUrl( const QUrl& url );
 
   /**
    * Returns all the possible proxy server addresses for @p url.
@@ -277,7 +277,7 @@ public:
    * @param url the URL whose proxy info is needed
    * @returns the proxy server address if one is available, otherwise an empty list \
                .
    */
-  static QStringList proxiesForUrl( const KUrl& url );
+  static QStringList proxiesForUrl( const QUrl& url );
 
   /**
    * Marks this proxy as bad (down). It will not be used for the
@@ -397,7 +397,7 @@ public:
    * @return true if the protocol support listing
    * @see listing()
    */
-  static bool supportsListing( const KUrl &url );
+  static bool supportsListing( const QUrl &url );
 
   /**
    * Returns whether the protocol can retrieve data from URLs.
@@ -408,7 +408,7 @@ public:
    * @param url the url to check
    * @return true if it is possible to read from the URL
    */
-  static bool supportsReading( const KUrl &url );
+  static bool supportsReading( const QUrl &url );
 
   /**
    * Returns whether the protocol can store data to URLs.
@@ -419,7 +419,7 @@ public:
    * @param url the url to check
    * @return true if the protocol supports writing
    */
-  static bool supportsWriting( const KUrl &url );
+  static bool supportsWriting( const QUrl &url );
 
   /**
    * Returns whether the protocol can create directories/folders.
@@ -430,7 +430,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can create directories
    */
-  static bool supportsMakeDir( const KUrl &url );
+  static bool supportsMakeDir( const QUrl &url );
 
   /**
    * Returns whether the protocol can delete files/objects.
@@ -441,7 +441,7 @@ public:
    * @param url the url to check
    * @return true if the protocol supports deleting
    */
-  static bool supportsDeleting( const KUrl &url );
+  static bool supportsDeleting( const QUrl &url );
 
   /**
    * Returns whether the protocol can create links between files/objects.
@@ -452,7 +452,7 @@ public:
    * @param url the url to check
    * @return true if the protocol supports linking
    */
-  static bool supportsLinking( const KUrl &url );
+  static bool supportsLinking( const QUrl &url );
 
   /**
    * Returns whether the protocol can move files/objects between different
@@ -464,10 +464,10 @@ public:
    * @param url the url to check
    * @return true if the protocol supports moving
    */
-  static bool supportsMoving( const KUrl &url );
+  static bool supportsMoving( const QUrl &url );
 
   /**
-   * Returns whether the protocol can be opened using KIO::open(const KUrl&).
+   * Returns whether the protocol can be opened using KIO::open(const QUrl&).
    *
    * This corresponds to the "opening=" field in the protocol description file.
    * Valid values for this field are "true" or "false" (default).
@@ -475,7 +475,7 @@ public:
    * @param url the url to check
    * @return true if the protocol supports opening
    */
-  static bool supportsOpening( const KUrl &url );
+  static bool supportsOpening( const QUrl &url );
 
   /**
    * Returns whether the protocol can copy files/objects directly from the
@@ -489,7 +489,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can copy files from the local file system
    */
-  static bool canCopyFromFile( const KUrl &url );
+  static bool canCopyFromFile( const QUrl &url );
 
   /**
    * Returns whether the protocol can copy files/objects directly to the
@@ -503,7 +503,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can copy files to the local file system
    */
-  static bool canCopyToFile( const KUrl &url );
+  static bool canCopyToFile( const QUrl &url );
 
   /**
    * Returns whether the protocol can rename (i.e. move fast) files/objects
@@ -517,7 +517,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can rename/move files from the local file system
    */
-  static bool canRenameFromFile( const KUrl &url );
+  static bool canRenameFromFile( const QUrl &url );
 
   /**
    * Returns whether the protocol can rename (i.e. move fast) files/objects
@@ -531,7 +531,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can rename files to the local file system
    */
-  static bool canRenameToFile( const KUrl &url );
+  static bool canRenameToFile( const QUrl &url );
 
   /**
    * Returns whether the protocol can recursively delete directories by itself.
@@ -544,7 +544,7 @@ public:
    * @param url the url to check
    * @return true if the protocol can delete non-empty directories by itself.
    */
-  static bool canDeleteRecursive( const KUrl &url );
+  static bool canDeleteRecursive( const QUrl &url );
 
   /**
    * This setting defines the strategy to use for generating a filename, when
@@ -561,7 +561,7 @@ public:
    * @param url the url to check
    * @return how to generate the filename in the destination directory when \
                copying/moving
    */
-  static KProtocolInfo::FileNameUsedForCopying fileNameUsedForCopying( const KUrl \
&url ); +  static KProtocolInfo::FileNameUsedForCopying fileNameUsedForCopying( const \
QUrl &url );  
   /**
    * Returns default mimetype for this URL based on the protocol.
@@ -571,7 +571,7 @@ public:
    * @param url the url to check
    * @return the default mime type of the protocol, or null if unknown
    */
-  static QString defaultMimetype( const KUrl& url );
+  static QString defaultMimetype( const QUrl& url );
 
   /**
    * Returns whether the protocol should be treated as a filesystem
@@ -583,7 +583,7 @@ public:
    * @param url the url to check
    * @return the input type of the given @p url
    */
-  static KProtocolInfo::Type inputType( const KUrl &url );
+  static KProtocolInfo::Type inputType( const QUrl &url );
 
   /**
    * Returns whether the protocol should be treated as a filesystem
@@ -595,7 +595,7 @@ public:
    * @param url the url to check
    * @return the output type of the given @p url
    */
-  static KProtocolInfo::Type outputType( const KUrl &url );
+  static KProtocolInfo::Type outputType( const QUrl &url );
 
   /**
    * Returns the list of fields this protocol returns when listing
@@ -609,7 +609,7 @@ public:
    * @param url the url to check
    * @return a list of field names
    */
-  static QStringList listing( const KUrl &url );
+  static QStringList listing( const QUrl &url );
 
 
   /**
@@ -625,7 +625,7 @@ public:
    * @return true if the protocol is a source of data (e.g. http), false if the
    *         protocol is a filter (e.g. gzip)
    */
-  static bool isSourceProtocol( const KUrl &url );
+  static bool isSourceProtocol( const QUrl &url );
 
   /**
    * Returns which protocol handles this mimetype, if it's an archive mimetype.
@@ -659,14 +659,14 @@ public:
    * @param proxy the URL of the proxy to use
    * @return the slave protocol (e.g. 'http'), can be null if unknown
    */
-  static QString slaveProtocol(const KUrl &url, QString &proxy);
+  static QString slaveProtocol(const QUrl &url, QString &proxy);
 
   /**
    * Overloaded function that returns a list of all available proxy servers.
    *
    * @since 4.7
    */
-  static QString slaveProtocol(const KUrl &url, QStringList &proxy);
+  static QString slaveProtocol(const QUrl &url, QStringList &proxy);
 
   /**
    * Return Accept-Languages header built up according to user's desktop
diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
index 5c0aee4..661f81d 100644
--- a/kio/kio/slavebase.cpp
+++ b/kio/kio/slavebase.cpp
@@ -326,7 +326,7 @@ void SlaveBase::dispatchLoop()
 
 void SlaveBase::connectSlave(const QString &address)
 {
-    d->appConnection.connectToRemote(address);
+    d->appConnection.connectToRemote(QUrl(address));
 
     if (!d->appConnection.inited())
     {
diff --git a/kio/tests/jobguitest.cpp b/kio/tests/jobguitest.cpp
index e3205a7..659876a 100644
--- a/kio/tests/jobguitest.cpp
+++ b/kio/tests/jobguitest.cpp
@@ -71,7 +71,7 @@ public Q_SLOTS:
         mimeData->setUrls(QList<QUrl>() << fileUrl);
         QApplication::clipboard()->setMimeData(mimeData);
 
-        KIO::Job* job = KIO::pasteClipboard(otherTmpDir(), \
static_cast<QWidget*>(0)); +        KIO::Job* job = \
KIO::pasteClipboard(QUrl::fromLocalFile(otherTmpDir()), static_cast<QWidget*>(0));  \
job->setUiDelegate(0);  bool ok = KIO::NetAccess::synchronousRun(job, 0);
         QVERIFY( ok );
diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp
index 8aad212..db9b658 100644
--- a/kio/tests/jobtest.cpp
+++ b/kio/tests/jobtest.cpp
@@ -1320,7 +1320,7 @@ void JobTest::rmdirEmpty()
     const QString dir = homeTmpDir() + "dir";
     QDir().mkdir(dir);
     QVERIFY(QFile::exists(dir));
-    KIO::Job* job = KIO::rmdir(dir);
+    KIO::Job* job = KIO::rmdir(QUrl::fromLocalFile(dir));
     QVERIFY(job->exec());
     QVERIFY(!QFile::exists(dir));
 }
@@ -1330,7 +1330,7 @@ void JobTest::rmdirNotEmpty()
     const QString dir = homeTmpDir() + "dir";
     createTestDirectory(dir);
     createTestDirectory(dir + "/subdir");
-    KIO::Job* job = KIO::rmdir(dir);
+    KIO::Job* job = KIO::rmdir(QUrl::fromLocalFile(dir));
     QVERIFY(!job->exec());
     QVERIFY(QFile::exists(dir));
 }
@@ -1340,7 +1340,7 @@ void JobTest::stat()
 #if 1
     const QString filePath = homeTmpDir() + "fileFromHome";
     createTestFile( filePath );
-    KIO::StatJob* job = KIO::stat(filePath, KIO::HideProgressInfo);
+    KIO::StatJob* job = KIO::stat(QUrl::fromLocalFile(filePath), \
KIO::HideProgressInfo);  QVERIFY(job);
     bool ok = KIO::NetAccess::synchronousRun(job, 0);
     QVERIFY(ok);
@@ -1367,7 +1367,7 @@ void JobTest::mostLocalUrl()
 {
     const QString filePath = homeTmpDir() + "fileFromHome";
     createTestFile( filePath );
-    KIO::StatJob* job = KIO::mostLocalUrl(filePath, KIO::HideProgressInfo);
+    KIO::StatJob* job = KIO::mostLocalUrl(QUrl::fromLocalFile(filePath), \
KIO::HideProgressInfo);  QVERIFY(job);
     bool ok = job->exec();
     QVERIFY(ok);
@@ -1379,7 +1379,7 @@ void JobTest::mimeType()
 #if 1
     const QString filePath = homeTmpDir() + "fileFromHome";
     createTestFile( filePath );
-    KIO::MimetypeJob* job = KIO::mimetype(filePath, KIO::HideProgressInfo);
+    KIO::MimetypeJob* job = KIO::mimetype(QUrl::fromLocalFile(filePath), \
KIO::HideProgressInfo);  QVERIFY(job);
     QSignalSpy spyMimeType(job, SIGNAL(mimetype(KIO::Job*,QString)));
     bool ok = KIO::NetAccess::synchronousRun(job, 0);
@@ -1410,7 +1410,7 @@ void JobTest::moveFileDestAlreadyExists() // #157601
     createTestFile( existingDest );
 
     QList<QUrl> urls; urls << QUrl::fromLocalFile(file1) << \
                QUrl::fromLocalFile(file2);
-    KIO::CopyJob* job = KIO::move(urls, otherTmpDir(), KIO::HideProgressInfo);
+    KIO::CopyJob* job = KIO::move(urls, QUrl::fromLocalFile(otherTmpDir()), \
KIO::HideProgressInfo);  job->setUiDelegate(0);
     job->setAutoSkip(true);
     bool ok = KIO::NetAccess::synchronousRun(job, 0);
@@ -1446,7 +1446,7 @@ void JobTest::moveDestAlreadyExistsAutoRename()
 
     if (samePartition) {
         // cleanup
-        KIO::Job* job = KIO::del(dir, KIO::HideProgressInfo);
+        KIO::Job* job = KIO::del(QUrl::fromLocalFile(dir), KIO::HideProgressInfo);
         QVERIFY(job->exec());
         QVERIFY(!QFile::exists(dir));
     }
@@ -1469,7 +1469,7 @@ void JobTest::moveDestAlreadyExistsAutoRename(const QString& \
destDir, bool moveD  }
 
     QList<QUrl> urls; urls << QUrl::fromLocalFile(file1) << \
                QUrl::fromLocalFile(file2);
-    KIO::CopyJob* job = KIO::move(urls, destDir, KIO::HideProgressInfo);
+    KIO::CopyJob* job = KIO::move(urls, QUrl::fromLocalFile(destDir), \
KIO::HideProgressInfo);  job->setUiDelegate(0);
     job->setAutoRename(true);
 
diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp
index 741f636..d2a1cc3 100644
--- a/kio/tests/kdirlistertest.cpp
+++ b/kio/tests/kdirlistertest.cpp
@@ -218,8 +218,8 @@ void KDirListerTest::testNewItemByCopy()
     QTest::qWait(1000); // We need a 1s timestamp difference on the dir, otherwise \
FAM won't notice anything.  
     const QString fileName = "toplevelfile_copy";
-    const KUrl itemUrl(path + fileName);
-    KIO::CopyJob* job = KIO::copyAs(QString(path+"toplevelfile_3"), itemUrl, \
KIO::HideProgressInfo); +    const QUrl itemUrl = QUrl::fromLocalFile(path + \
fileName); +    KIO::CopyJob* job = \
KIO::copyAs(QUrl::fromLocalFile(path+"toplevelfile_3"), itemUrl, \
KIO::HideProgressInfo);  job->exec();
 
     int numTries = 0;
@@ -244,7 +244,7 @@ void KDirListerTest::testNewItemByCopy()
 
     KFileItem itemForUrl = KDirLister::cachedItemForUrl(itemUrl);
     QVERIFY(!itemForUrl.isNull());
-    QCOMPARE(itemForUrl.url().url(), itemUrl.url());
+    QCOMPARE(itemForUrl.url().url(), itemUrl.toString());
     QCOMPARE(itemForUrl.entry().stringValue(KIO::UDSEntry::UDS_NAME), fileName);
 }
 
@@ -477,7 +477,7 @@ void KDirListerTest::testRenameItem()
     const QString path = dirPath+"toplevelfile_2";
     const QString newPath = dirPath+"toplevelfile_2.renamed.html";
 
-    KIO::SimpleJob* job = KIO::rename(path, newPath, KIO::HideProgressInfo);
+    KIO::SimpleJob* job = KIO::rename(QUrl::fromLocalFile(path), \
QUrl::fromLocalFile(newPath), KIO::HideProgressInfo);  bool ok = job->exec();
     QVERIFY(ok);
 
@@ -523,7 +523,7 @@ void KDirListerTest::testRenameAndOverwrite() // has to be run \
                after testRenameI
             this, SLOT(slotRefreshItems(QList<QPair<KFileItem,KFileItem> >)));
     const QString newPath = dirPath+"toplevelfile_2.renamed.html";
 
-    KIO::SimpleJob* job = KIO::rename(newPath, path, KIO::Overwrite | \
KIO::HideProgressInfo); +    KIO::SimpleJob* job = \
KIO::rename(QUrl::fromLocalFile(newPath), QUrl::fromLocalFile(path), KIO::Overwrite | \
KIO::HideProgressInfo);  bool ok = job->exec();
     QVERIFY(ok);
 
@@ -957,7 +957,7 @@ void KDirListerTest::testDeleteCurrentDir()
 
     m_dirLister.clearSpies();
     connect(&m_dirLister, SIGNAL(clear()), &m_eventLoop, SLOT(quit()));
-    KIO::DeleteJob* job = KIO::del(path(), KIO::HideProgressInfo);
+    KIO::DeleteJob* job = KIO::del(QUrl::fromLocalFile(path()), \
KIO::HideProgressInfo);  bool ok = job->exec();
     QVERIFY(ok);
     enterLoop();
diff --git a/kio/tests/kdirmodeltest.cpp b/kio/tests/kdirmodeltest.cpp
index 8e0cd91..4205cc9 100644
--- a/kio/tests/kdirmodeltest.cpp
+++ b/kio/tests/kdirmodeltest.cpp
@@ -1182,7 +1182,7 @@ void KDirModelTest::testOverwriteFileWithDir() // #151851 c4
     connect( m_dirModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
              &m_eventLoop, SLOT(exitLoop()) );
 
-    KIO::Job* job = KIO::move(dir, file, KIO::HideProgressInfo);
+    KIO::Job* job = KIO::move(QUrl::fromLocalFile(dir), QUrl::fromLocalFile(file), \
                KIO::HideProgressInfo);
     PredefinedAnswerJobUiDelegate* delegate = new PredefinedAnswerJobUiDelegate;
     delegate->m_renameResult = KIO::R_OVERWRITE;
     job->setUiDelegate(delegate);
diff --git a/kio/tests/kfiledialogtest.cpp b/kio/tests/kfiledialogtest.cpp
index dcd0da8..8e1f521 100644
--- a/kio/tests/kfiledialogtest.cpp
+++ b/kio/tests/kfiledialogtest.cpp
@@ -81,7 +81,7 @@ int main (int argc, char **argv)
     //     - Should NOT return a non existing filename. If a non existing filename \
                was given to it,
     //       it should inform the user about it, so we always get an empty string or \
an existing  //       filename.
-    QString getOpenFileName = KFileDialog::getOpenFileName(QString(),QString(),0,
+    QString getOpenFileName = KFileDialog::getOpenFileName(QUrl(),QString(),0,
                                                            QString("Test \
getOpenFileName"));  
     if (!getOpenFileName.isEmpty()) {
@@ -96,7 +96,7 @@ int main (int argc, char **argv)
     //     - Should NOT return a non existing filename in the list. If a non \
                existing filename was
     //       given to it, it should inform the user about it, so we always get an \
empty string or an  //       existing list of filenames.
-    QStringList getOpenFileNames = \
KFileDialog::getOpenFileNames(QString(),QString(),0, +    QStringList \
                getOpenFileNames = KFileDialog::getOpenFileNames(QUrl(),QString(),0,
                                                                  QString("Test \
getOpenFileNames"));  if (getOpenFileNames.count()) {
         QString str("The listed files below were asked to be opened:\n");
@@ -113,7 +113,7 @@ int main (int argc, char **argv)
     //       QString object.
     //     - From the previous point it is expectable that its behavior should be \
the same as  //       getOpenFileName.
-    KUrl getOpenUrl = KFileDialog::getOpenUrl(QString(),QString(),0,
+    KUrl getOpenUrl = KFileDialog::getOpenUrl(QUrl(),QString(),0,
                                               QString("Test getOpenUrl"));
     if (getOpenUrl.isValid()) {
         KMessageBox::information(0, QString("\"%1\" file was \
opened").arg(getOpenUrl.url()), "Dialog for 'getOpenUrl' accepted"); @@ -126,7 +126,7 \
@@ int main (int argc, char **argv)  //       of a QStringList object.
     //     - From the previous point it is expectable that its behavior should be \
the same as  //       getOpenFileNames.
-    QList<QUrl> getOpenUrls = KFileDialog::getOpenUrls(QString(),QString(),0,
+    QList<QUrl> getOpenUrls = KFileDialog::getOpenUrls(QUrl(),QString(),0,
                                                       QString("Test getOpenUrls"));
     if (getOpenUrls.count()) {
         QString str("The listed files below were asked to be opened:\n");
@@ -142,7 +142,7 @@ int main (int argc, char **argv)
     //     - Should return the selected file (if any).
     //     - Should return an empty string if 'Cancel' was pressed.
     //     - Don't care about existing or non existing filenames.
-    QString getSaveFileName = KFileDialog::getSaveFileName(QString(),QString(),0,
+    QString getSaveFileName = KFileDialog::getSaveFileName(QUrl(),QString(),0,
                                                            QString("Test \
getSaveFileName"));  if (!getSaveFileName.isEmpty()) {
         KMessageBox::information(0, QString("\"%1\" file was asked to be \
saved").arg(getSaveFileName), "Dialog for 'getSaveFileName' accepted"); @@ -175,7 \
+175,7 @@ int main (int argc, char **argv)  //       QString object.
     //     - From the previous point it is expectable that its behavior should be \
the same as  //       getSaveFileName.
-    KUrl getSaveUrl = KFileDialog::getSaveUrl(QString(),QString(),0,
+    KUrl getSaveUrl = KFileDialog::getSaveUrl(QUrl(),QString(),0,
                                               QString("Test getSaveUrl"));
     if (getSaveUrl.isValid()) {
         KMessageBox::information(0, QString("\"%1\" file was asked to be \
saved").arg(getSaveUrl.url()), "Dialog for 'getSaveUrl' accepted"); @@ -205,7 +205,7 \
@@ int main (int argc, char **argv)  
     // Test for: getImageOpenUrl.
     //     - Is the same as getOpenUrl but showing inline previews.
-    KUrl getImageOpenUrl = KFileDialog::getImageOpenUrl(QString(),0,
+    KUrl getImageOpenUrl = KFileDialog::getImageOpenUrl(QUrl(),0,
                                                         QString("Test \
getImageOpenUrl"));  if (getImageOpenUrl.isValid()) {
         KMessageBox::information(0, QString("\"%1\" file was asked to be \
                saved").arg(getImageOpenUrl.url()), "Dialog for 'getImageOpenUrl' \
                accepted");
diff --git a/kio/tests/kurlrequestertest.cpp b/kio/tests/kurlrequestertest.cpp
index 1ea10f2..493f4eb 100644
--- a/kio/tests/kurlrequestertest.cpp
+++ b/kio/tests/kurlrequestertest.cpp
@@ -9,7 +9,7 @@ int main( int argc, char **argv )
     QApplication app(argc, argv);
     app.setQuitOnLastWindowClosed(false);
 
-    QUrl url = KUrlRequesterDialog::getUrl( "ftp://ftp.kde.org" );
+    QUrl url = KUrlRequesterDialog::getUrl(QUrl("ftp://ftp.kde.org"));
     qDebug() << "Selected url:" << url;
 
     KUrlRequester *req = new KUrlRequester();
diff --git a/staging/kwidgets/CMakeLists.txt b/staging/kwidgets/CMakeLists.txt
index 9ea6204..c07d320 100644
--- a/staging/kwidgets/CMakeLists.txt
+++ b/staging/kwidgets/CMakeLists.txt
@@ -38,7 +38,6 @@ include_directories(
 remove_definitions(-DQT_NO_CAST_TO_ASCII)
 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
 remove_definitions(-DQT_STRICT_ITERATORS)
-remove_definitions(-DQT_NO_URL_CAST_FROM_STRING)
 remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
 remove_definitions(-DQT_NO_KEYWORDS)
 remove_definitions(-DQT_USE_FAST_CONCATENATION)
diff --git a/staging/sonnet/CMakeLists.txt b/staging/sonnet/CMakeLists.txt
index 4de25b0..314ca16 100644
--- a/staging/sonnet/CMakeLists.txt
+++ b/staging/sonnet/CMakeLists.txt
@@ -19,7 +19,6 @@ include(ECMQtFramework)
 remove_definitions(-DQT_NO_CAST_TO_ASCII)
 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
 remove_definitions(-DQT_STRICT_ITERATORS)
-remove_definitions(-DQT_NO_URL_CAST_FROM_STRING)
 remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
 remove_definitions(-DQT_NO_KEYWORDS)
 remove_definitions(-DQT_USE_FAST_CONCATENATION)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic