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

List:       kde-commits
Subject:    KDE/kdelibs/kfile
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-06-30 15:39:34
Message-ID: 1214840374.092230.30734.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 826372 by ppenz:

Removed some very strange code I've introduced when porting kfilewidget to KDE 4.0: \
The passed URL is anyhow a directory and even if this would not be the case, this \
must be handled by the URL navigator itself (thanks to David Faure for the hint).

CCMAIL: faure@kde.org

 M  +2 -16     kfilewidget.cpp  


--- trunk/KDE/kdelibs/kfile/kfilewidget.cpp #826371:826372
@@ -109,11 +109,6 @@
      * handles setting the locationEdit.
      */
     void multiSelectionChanged();
-    /**
-     * Returns the URL which represents the directory of \a url. If
-     * \a url already is a directory, then just \a url is returned.
-     */
-    static KUrl directoryUrl(const KUrl& url);
 
     /**
      * Returns the absolute version of the URL specified in locationEdit.
@@ -280,7 +275,7 @@
     d->toolbar->setMovable(false);
 
     d->model = new KFilePlacesModel(this);
-    d->urlNavigator = new KUrlNavigator(d->model, d->directoryUrl(startDir), \
d->toolbar); +    d->urlNavigator = new KUrlNavigator(d->model, startDir, \
d->toolbar);  d->urlNavigator->setPlacesSelectorVisible(false);
 
     KUrl u;
@@ -452,7 +447,7 @@
     KUrlCompletion *fileCompletionObj = new KUrlCompletion( \
KUrlCompletion::FileCompletion );  QString dir = d->url.url(KUrl::AddTrailingSlash);
 
-    d->urlNavigator->setUrl( d->directoryUrl( dir ) );
+    d->urlNavigator->setUrl( dir );
 
     fileCompletionObj->setDir( dir );
     d->locationEdit->setCompletionObject( fileCompletionObj );
@@ -1054,15 +1049,6 @@
     setLocationText( urlList );
 }
 
-KUrl KFileWidgetPrivate::directoryUrl(const KUrl& url)
-{
-    if (!url.isValid())
-        return url;
-    KFileItem item(S_IFDIR, KFileItem::Unknown, url);
-    item.refresh();
-    return item.isDir() ? url : url.upUrl();
-}
-
 void KFileWidgetPrivate::setDummyHistoryEntry( const QString& text, const QPixmap& \
                icon,
                                                bool usePreviousPixmapIfNull )
 {


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

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