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

List:       kde-commits
Subject:    KDE/kdelibs/kfile
From:       Andrius da Costa Ribas <andriusmao () gmail ! com>
Date:       2011-01-01 13:19:38
Message-ID: 20110101131938.DBB0CAC8AE () svn ! kde ! org
[Download RAW message or body]

SVN commit 1210626 by andriusr:

Fixes for KUrlNavigator behavior on Windows for correcting the display of the root of \
non drive-C local paths. (http://reviewboard.kde.org/r/6206)

 M  +5 -1      kurlnavigator.cpp  


--- trunk/KDE/kdelibs/kfile/kurlnavigator.cpp #1210625:1210626
@@ -682,7 +682,11 @@
     if (text.isEmpty()) {
         const KUrl currentUrl = q->locationUrl();
         if (currentUrl.isLocalFile()) {
+#ifdef Q_OS_WIN
+            text = currentUrl.path().length() > 1 ? currentUrl.path().left(2) : \
QDir::rootPath(); +#else
             text = m_showFullPath ? QLatin1String("/") : i18n("Custom Path");
+#endif
         } else {
             text = currentUrl.protocol() + QLatin1Char(':');
             if (!currentUrl.host().isEmpty()) {
@@ -712,7 +716,7 @@
             // prevent the last "/" from being stripped
             // or we end up with an empty path
 #ifdef Q_OS_WIN
-            pathOrUrl = pathOrUrl.length() > 2 ? pathOrUrl.left(3) : \
QDir::rootPath(); +            pathOrUrl = pathOrUrl.length() > 1 ? pathOrUrl.left(2) \
: QDir::rootPath();  #else
             pathOrUrl = QLatin1String("/");
 #endif


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

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