X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d3496b12310d9fec0e52e537c341e87fcaa2f8b5..509464cce954f7fc4b00a9dafc2bc6355eb99ec6:/src/panels/information/informationpanel.cpp diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 9bfb711c6..eda74f3b5 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -21,6 +21,7 @@ #include "informationpanelcontent.h" #include +#include #include #include #include @@ -48,21 +49,13 @@ InformationPanel::~InformationPanel() void InformationPanel::setSelection(const KFileItemList& selection) { - if (!isVisible()) { - return; - } + m_selection = selection; + m_fileItem = KFileItem(); - if (selection.isEmpty() && m_selection.isEmpty()) { - // The selection has not really changed, only the current index. - // QItemSelectionModel emits a signal in this case and it is less - // expensive doing the check this way instead of patching - // DolphinView::emitSelectionChanged(). + if (!isVisible()) { return; } - m_selection = selection; - m_fileItem = KFileItem(); - const int count = selection.count(); if (count == 0) { if (!isEqualToShownUrl(url())) { @@ -190,6 +183,9 @@ void InformationPanel::showItemInfo() // No item is hovered and no selection has been done: provide // an item for the currently shown directory. m_folderStatJob = KIO::stat(url(), KIO::HideProgressInfo); + if (m_folderStatJob->ui()) { + m_folderStatJob->ui()->setWindow(this); + } connect(m_folderStatJob, SIGNAL(result(KJob*)), this, SLOT(slotFolderStatFinished(KJob*))); } else { @@ -346,7 +342,7 @@ void InformationPanel::init() org::kde::KDirNotify* dirNotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this); - connect(dirNotify, SIGNAL(FileRenamed(QString, QString)), SLOT(slotFileRenamed(QString, QString))); + connect(dirNotify, SIGNAL(FileRenamed(QString,QString)), SLOT(slotFileRenamed(QString,QString))); connect(dirNotify, SIGNAL(FilesAdded(QString)), SLOT(slotFilesAdded(QString))); connect(dirNotify, SIGNAL(FilesChanged(QStringList)), SLOT(slotFilesChanged(QStringList))); connect(dirNotify, SIGNAL(FilesRemoved(QStringList)), SLOT(slotFilesRemoved(QStringList))); @@ -357,6 +353,7 @@ void InformationPanel::init() connect(m_content, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl))); QVBoxLayout* layout = new QVBoxLayout(this); + layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(m_content); m_initialized = true;