Change in kio[master]: Fix runtime warnings about listing empty URL.

David Faure (Code Review) noreply at kde.org
Sat Dec 6 11:37:38 UTC 2014


David Faure has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/201

Change subject: Fix runtime warnings about listing empty URL.
......................................................................

Fix runtime warnings about listing empty URL.

QWARN  : KFileDialog_UnitTest::testSetFileMode(existingfiles) kfiledialog_unittest(7242)/default KIO::SimpleJobPrivate::simpleJobInit: Invalid URL:  QUrl( "" )

Change-Id: Ibeed58ebd6674a14e5ee144f74dc8b4479c632fd
---
M src/filewidgets/kurlnavigator.cpp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/01/201/1

diff --git a/src/filewidgets/kurlnavigator.cpp b/src/filewidgets/kurlnavigator.cpp
index d0fd71a..0f7fc84 100644
--- a/src/filewidgets/kurlnavigator.cpp
+++ b/src/filewidgets/kurlnavigator.cpp
@@ -529,6 +529,8 @@
 void KUrlNavigator::Private::updateButtons(int startIndex)
 {
     QUrl currentUrl = q->locationUrl();
+    if (!currentUrl.isValid()) // QFileDialog::setDirectory not called yet
+        return;
 
     const QString path = currentUrl.toDisplayString(QUrl::PreferLocalFile);
 

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/201
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeed58ebd6674a14e5ee144f74dc8b4479c632fd
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: David Faure <faure at kde.org>


More information about the Kde-frameworks-devel mailing list