X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fd74aa8e2057158d2eadb835eb61564854c81020..899c171a2b62f0666dbe2ed755d51a8ae0f7ef9f:/src/panels/information/informationpanel.cpp diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 949e4d777..3b4747b77 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -21,7 +21,7 @@ #include "informationpanelcontent.h" #include -#include +#include #include #include #include @@ -48,21 +48,13 @@ InformationPanel::~InformationPanel() void InformationPanel::setSelection(const KFileItemList& selection) { - if (!isVisible()) { - return; - } + m_selection = selection; + m_fileItem = KFileItem(); - if ((selection.count() == 0) && (m_selection.count() == 0)) { - // 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())) { @@ -346,7 +338,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 +349,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;