summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnar Thomsen <[email protected]>2015-07-12 19:55:21 +0200
committerRagnar Thomsen <[email protected]>2015-07-12 20:01:44 +0200
commit3f974b59642795e87620bcfb4ca5d5a9d050c32b (patch)
tree3a7c87a8236d65f5d1c7fbf1ad6b30213f29dd7b
parentad21a5efe08d4a57a5d942e45c82672d52d97426 (diff)
Use QDir::cleanPath() to simplify QUrls in OverwriteQuery::execute()
QDir::cleanPath() simplifies QUrls by resolving . and .. as well as normalizing directory separators.
-rw-r--r--kerfuffle/queries.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/kerfuffle/queries.cpp b/kerfuffle/queries.cpp
index a5a5d71..6f89e73 100644
--- a/kerfuffle/queries.cpp
+++ b/kerfuffle/queries.cpp
@@ -36,6 +36,7 @@
#include <QApplication>
#include <QPointer>
#include <QUrl>
+#include <QDir>
namespace Kerfuffle
{
@@ -85,11 +86,8 @@ void OverwriteQuery::execute()
mode = (KIO::RenameDialog_Mode)(mode | KIO::M_MULTI);
}
- QUrl sourceUrl(m_data.value(QLatin1String( "filename" )).toString());
- QUrl destUrl(m_data.value(QLatin1String( "filename" )).toString());
- //FIXME KF5 Port : Enable
- //sourceUrl.cleanPath();
- //destUrl.cleanPath();
+ QUrl sourceUrl(QDir::cleanPath(m_data.value(QLatin1String( "filename" )).toString()));
+ QUrl destUrl(QDir::cleanPath(m_data.value(QLatin1String( "filename" )).toString()));
QPointer<KIO::RenameDialog> dialog = new KIO::RenameDialog(
Q_NULLPTR,