mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 11:25:14 +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();
|
showItemInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InfoSidebarPage::showEvent(QShowEvent* event)
|
||||||
|
{
|
||||||
|
SidebarPage::showEvent(event);
|
||||||
|
showItemInfo();
|
||||||
|
}
|
||||||
|
|
||||||
void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
|
void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
|
||||||
{
|
{
|
||||||
cancelRequest();
|
cancelRequest();
|
||||||
|
@ -143,6 +149,10 @@ void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
|
||||||
|
|
||||||
void InfoSidebarPage::showItemInfo()
|
void InfoSidebarPage::showItemInfo()
|
||||||
{
|
{
|
||||||
|
if (!isVisible()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cancelRequest();
|
cancelRequest();
|
||||||
|
|
||||||
const KFileItemList& selectedItems = selection();
|
const KFileItemList& selectedItems = selection();
|
||||||
|
|
|
@ -63,6 +63,10 @@ public slots:
|
||||||
virtual void setUrl(const KUrl& url);
|
virtual void setUrl(const KUrl& url);
|
||||||
virtual void setSelection(const KFileItemList& selection);
|
virtual void setSelection(const KFileItemList& selection);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/** @see QWidget::showEvent() */
|
||||||
|
virtual void showEvent(QShowEvent* event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/**
|
/**
|
||||||
* Does a delayed request of information for the item of the given Url and
|
* Does a delayed request of information for the item of the given Url and
|
||||||
|
|
Loading…
Reference in a new issue