diff options
| author | Peter Penz <[email protected]> | 2008-06-29 16:24:09 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-06-29 16:24:09 +0000 |
| commit | 5372176640f0d6c114134fa490587c2ce736ad47 (patch) | |
| tree | 50d2e86c21cca88a06abd9356e51dcef21099a48 /src | |
| parent | b5de4d8ffb3823c6c4bc0ce3d47e74bfa3970d5e (diff) | |
SVN_SILENT: Renamed m_timer to m_infoTimer and slotTimeout() to slotInfoTimeout(), as preperation for a new timer that prevents a flickering of outdated previews.
svn path=/trunk/KDE/kdebase/apps/; revision=825916
Diffstat (limited to 'src')
| -rw-r--r-- | src/infosidebarpage.cpp | 20 | ||||
| -rw-r--r-- | src/infosidebarpage.h | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 7a11994af..0d0ca48b4 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -112,7 +112,7 @@ void InfoSidebarPage::setSelection(const KFileItemList& selection) if ((count == 1) && !selection.first().url().isEmpty()) { m_urlCandidate = selection.first().url(); } - m_timer->start(TimerDelay); + m_infoTimer->start(TimerDelay); } } @@ -130,12 +130,12 @@ void InfoSidebarPage::requestDelayedItemInfo(const KFileItem& item) // show information regarding the selection. if (m_selection.size() > 0) { m_pendingPreview = false; - m_timer->start(TimerDelay); + m_infoTimer->start(TimerDelay); } } else if (!item.url().isEmpty()) { m_urlCandidate = item.url(); m_fileItem = item; - m_timer->start(TimerDelay); + m_infoTimer->start(TimerDelay); } } @@ -167,7 +167,7 @@ void InfoSidebarPage::resizeEvent(QResizeEvent* event) // try to increase the preview as large as possible m_preview->setSizeHint(QSize(maxWidth, maxWidth)); m_urlCandidate = m_shownUrl; // reset the URL candidate if a resizing is done - m_timer->start(TimerDelay); + m_infoTimer->start(TimerDelay); } SidebarPage::resizeEvent(event); @@ -224,7 +224,7 @@ void InfoSidebarPage::showItemInfo() showMetaInfo(); } -void InfoSidebarPage::slotTimeout() +void InfoSidebarPage::slotInfoTimeout() { m_shownUrl = m_urlCandidate; showItemInfo(); @@ -331,7 +331,7 @@ bool InfoSidebarPage::applyPlace(const KUrl& url) void InfoSidebarPage::cancelRequest() { - m_timer->stop(); + m_infoTimer->stop(); } void InfoSidebarPage::showMetaInfo() @@ -452,10 +452,10 @@ void InfoSidebarPage::init() { const int spacing = KDialog::spacingHint(); - m_timer = new QTimer(this); - m_timer->setSingleShot(true); - connect(m_timer, SIGNAL(timeout()), - this, SLOT(slotTimeout())); + m_infoTimer = new QTimer(this); + m_infoTimer->setSingleShot(true); + connect(m_infoTimer, SIGNAL(timeout()), + this, SLOT(slotInfoTimeout())); QVBoxLayout* layout = new QVBoxLayout; layout->setSpacing(spacing); diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index b9771b5ae..f2d63de0e 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -91,7 +91,7 @@ private slots: * Triggered if the request for item information has timed out. * @see InfoSidebarPage::requestDelayedItemInfo() */ - void slotTimeout(); + void slotInfoTimeout(); /** * Is invoked if no preview is available for the item. In this @@ -161,7 +161,7 @@ private: private: bool m_initialized; bool m_pendingPreview; - QTimer* m_timer; + QTimer* m_infoTimer; KUrl m_shownUrl; // URL that is shown as info KUrl m_urlCandidate; // URL candidate that will replace m_shownURL after a delay KFileItem m_fileItem; // file item for m_shownUrl if available (otherwise null) |
