mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
optimization: don't try to show the meta information if the widget is invisible
svn path=/trunk/KDE/kdebase/apps/; revision=661864
This commit is contained in:
parent
cdcb4b0166
commit
4405774647
|
@ -130,6 +130,12 @@ void InfoSidebarPage::setSelection(const KFileItemList& selection)
|
|||
showItemInfo();
|
||||
}
|
||||
|
||||
void InfoSidebarPage::showEvent(QShowEvent* event)
|
||||
{
|
||||
SidebarPage::showEvent(event);
|
||||
showItemInfo();
|
||||
}
|
||||
|
||||
void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
|
||||
{
|
||||
cancelRequest();
|
||||
|
@ -143,6 +149,10 @@ void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
|
|||
|
||||
void InfoSidebarPage::showItemInfo()
|
||||
{
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
cancelRequest();
|
||||
|
||||
const KFileItemList& selectedItems = selection();
|
||||
|
|
|
@ -63,6 +63,10 @@ public slots:
|
|||
virtual void setUrl(const KUrl& url);
|
||||
virtual void setSelection(const KFileItemList& selection);
|
||||
|
||||
protected:
|
||||
/** @see QWidget::showEvent() */
|
||||
virtual void showEvent(QShowEvent* event);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* Does a delayed request of information for the item of the given Url and
|
||||
|
|
Loading…
Reference in a new issue