┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanel.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-10-07 14:09:30 +0000
committerPeter Penz <[email protected]>2010-10-07 14:09:30 +0000
commit431da0482caa72f90a6a04785383eb1d133f678e (patch)
treef5f670aefb220aa5f735de6b3cf2c9b859f0b7aa /src/panels/information/informationpanel.cpp
parent06b0569613e918e5f73d762a54df041a38385195 (diff)
Internal cleanup for panels: Let the panel-implementations decide whether they accept an URL or not.
svn path=/trunk/KDE/kdebase/apps/; revision=1183480
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
-rw-r--r--src/panels/information/informationpanel.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index c18cc7fdb..d45974a48 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -52,24 +52,6 @@ QSize InformationPanel::sizeHint() const
return size;
}
-void InformationPanel::setUrl(const KUrl& url)
-{
- Panel::setUrl(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();
- }
-}
-
void InformationPanel::setSelection(const KFileItemList& selection)
{
if (!isVisible()) {
@@ -126,6 +108,25 @@ void InformationPanel::requestDelayedItemInfo(const KFileItem& item)
}
}
+bool InformationPanel::urlChanged()
+{
+ if (!url().isValid() || isEqualToShownUrl(url())) {
+ return false;
+ }
+
+ 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();
+ }
+
+ return true;
+}
+
void InformationPanel::showEvent(QShowEvent* event)
{
Panel::showEvent(event);