Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 42704ba..72313e3 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -431,3 +431,10 @@ void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,in | |||
431 | if (s!=width) return; | 431 | if (s!=width) return; |
432 | LauncherItem*item = findDocItem(aFile); | 432 | LauncherItem*item = 0; |
433 | QMap<QString,LauncherItem*>::Iterator it; | ||
434 | if ( ( it = m_itemCache.find(aFile))!=m_itemCache.end()) { | ||
435 | item = it.data(); | ||
436 | m_itemCache.remove(it); | ||
437 | } else { | ||
438 | item = findDocItem(aFile); | ||
439 | } | ||
433 | if (!item||!item->isEyeImage()) return; | 440 | if (!item||!item->isEyeImage()) return; |
@@ -438,5 +445,3 @@ void LauncherIconView::checkCallback() | |||
438 | { | 445 | { |
439 | if (m_EyeCallBack) { | 446 | if (!m_EyeCallBack) { |
440 | return; | ||
441 | } | ||
442 | m_EyeCallBack = new LauncherThumbReceiver(); | 447 | m_EyeCallBack = new LauncherThumbReceiver(); |
@@ -444,2 +449,4 @@ void LauncherIconView::checkCallback() | |||
444 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); | 449 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); |
450 | m_eyeTimer.changeInterval(600000); | ||
451 | } | ||
445 | } | 452 | } |
@@ -458,5 +465,5 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) | |||
458 | if (item->isEyeImage()) { | 465 | if (item->isEyeImage()) { |
459 | m_eyeTimer.changeInterval(600000); | ||
460 | checkCallback(); | 466 | checkCallback(); |
461 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); | 467 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); |
468 | m_itemCache[item->appLnk()->file()]=(LauncherItem*)item; | ||
462 | m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); | 469 | m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); |
@@ -467,3 +474,2 @@ void LauncherIconView::stopEyeTimer() | |||
467 | { | 474 | { |
468 | odebug << "Launcherview: delete opie-eye handle" << oendl; | ||
469 | if (m_EyeCallBack) { | 475 | if (m_EyeCallBack) { |
@@ -472,2 +478,3 @@ void LauncherIconView::stopEyeTimer() | |||
472 | } | 478 | } |
479 | m_itemCache.clear(); | ||
473 | m_eyeTimer.stop(); | 480 | m_eyeTimer.stop(); |