-void DolphinView::updateUrl()
-{
- //KFileView* fileView = (m_iconsView != 0) ? static_cast<KFileView*>(m_iconsView) :
- // static_cast<KFileView*>(m_iconsView);
-
- KFileItem* fileItem = 0; // TODO: fileView->currentFileItem();
- if (fileItem == 0) {
- return;
- }
-
- if (fileItem->isDir()) {
- // Prefer the local path over the Url. This assures that the
- // volume space information is correct. Assuming that the Url is media:/sda1,
- // and the local path is /windows/C: For the Url the space info is related
- // to the root partition (and hence wrong) and for the local path the space
- // info is related to the windows partition (-> correct).
- const QString localPath(fileItem->localPath());
- if (localPath.isEmpty()) {
- setUrl(fileItem->url());
- }
- else {
- setUrl(KUrl(localPath));
- }
- }
- else {
- fileItem->run();
- }
-}
-