[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kfile
From:       Peter Penz <peter.penz19 () gmail ! com>
Date:       2010-09-17 18:59:26
Message-ID: 20100917185926.C7794AC888 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1176452 by ppenz:

Set the icon-update interval once when constructing the timer-instance \
instead of doing it each time when restarting the timer.


 M  +5 -4      kfilepreviewgenerator.cpp  


--- trunk/KDE/kdelibs/kfile/kfilepreviewgenerator.cpp #1176451:1176452
@@ -458,6 +458,7 @@
 
     m_iconUpdateTimer = new QTimer(q);
     m_iconUpdateTimer->setSingleShot(true);
+    m_iconUpdateTimer->setInterval(200);
     connect(m_iconUpdateTimer, SIGNAL(timeout()), q, \
SLOT(dispatchIconUpdateQueue()));  
     // Whenever the scrollbar values have been changed, the pending \
previews should @@ -751,9 +752,9 @@
 
     if (m_pendingVisibleIconUpdates > 0) {
         // As long as there are pending previews for visible items, poll
-        // the preview queue each 200 ms. If there are no pending \
previews, +        // the preview queue periodically. If there are no \
pending previews,  // the queue is dispatched in slotPreviewJobFinished().
-        m_iconUpdateTimer->start(200);
+        m_iconUpdateTimer->start();
     }
 }
 
@@ -815,7 +816,7 @@
 void KFilePreviewGenerator::Private::startMimeTypeResolving()
 {
     resolveMimeType();
-    m_iconUpdateTimer->start(200);
+    m_iconUpdateTimer->start();
 }
 
 void KFilePreviewGenerator::Private::resolveMimeType()
@@ -1015,7 +1016,7 @@
     const int cacheSize = (size.width() > 128) || (size.height() > 128) ? \
256 : 128;  startPreviewJob(imageItems, cacheSize, cacheSize);
 
-    m_iconUpdateTimer->start(200);
+    m_iconUpdateTimer->start();
 }
 
 void KFilePreviewGenerator::Private::startPreviewJob(const KFileItemList& \
items, int width, int height)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic