┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanel.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-09-28 17:51:20 +0000
committerPeter Penz <[email protected]>2010-09-28 17:51:20 +0000
commitc98eebdfa3835a05e20cd627c16c212cff749cfd (patch)
treed47cec2096afa71a8bffe4bb388e4f3859f5ac04 /src/panels/information/informationpanel.cpp
parentaf98817d43e37a3044eb1908fc2a98f37a3aeb32 (diff)
Fix issue that no content is shown in the Information Panel on startup
svn path=/trunk/KDE/kdebase/apps/; revision=1180723
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
-rw-r--r--src/panels/information/informationpanel.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 2d6810c88..c18cc7fdb 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -55,18 +55,18 @@ QSize InformationPanel::sizeHint() const
void InformationPanel::setUrl(const KUrl& url)
{
Panel::setUrl(url);
- if (url.isValid() && !isEqualToShownUrl(url)) {
- if (isVisible()) {
- cancelRequest();
- m_shownUrl = url;
- // Update the content with a delay. This gives
- // the directory lister the chance to show the content
- // before expensive operations are done to show
- // meta information.
- m_urlChangedTimer->start();
- } else {
- m_shownUrl = url;
- }
+ if (!url.isValid() || isEqualToShownUrl(url)) {
+ return;
+ }
+
+ m_shownUrl = url;
+ if (isVisible()) {
+ cancelRequest();
+ // Update the content with a delay. This gives
+ // the directory lister the chance to show the content
+ // before expensive operations are done to show
+ // meta information.
+ m_urlChangedTimer->start();
}
}
@@ -103,7 +103,7 @@ void InformationPanel::setSelection(const KFileItemList& selection)
void InformationPanel::requestDelayedItemInfo(const KFileItem& item)
{
- if (!isVisible()) {
+ if (!isVisible() || (item.isNull() && m_fileItem.isNull())) {
return;
}
@@ -175,14 +175,13 @@ void InformationPanel::showItemInfo()
item = m_selection.first();
}
- if ( item.isNull() ) {
+ if (item.isNull()) {
// no item is hovered and no selection has been done: provide
// an item for the directory represented by m_shownUrl
m_folderStatJob = KIO::stat(m_shownUrl, KIO::HideProgressInfo);
connect(m_folderStatJob, SIGNAL(result(KJob*)),
this, SLOT(slotFolderStatFinished(KJob*)));
- }
- else {
+ } else {
m_content->showItem(item);
}
}