From 69bdaf5d1cdf2cb6a5da8371658e1c3995a71cfb Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 16 Dec 2010 19:46:34 +0100 Subject: Cache for frame grabbing Implemetented a cache for hovering over movies, saving the pictures from ffmpeg. For that SmGlobals got a new member *frameCache, handling all the dirty file access. I first tried to implement it as a helper, but that produced too much duplicate code. --- filestreewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filestreewidget.cpp') diff --git a/filestreewidget.cpp b/filestreewidget.cpp index b6189c5..857b848 100644 --- a/filestreewidget.cpp +++ b/filestreewidget.cpp @@ -408,7 +408,7 @@ void FilesTreeView::doHover(const QModelIndex &idx){ bool scale = true; mCurHover = idx; if(idx.data(FilesTreeModel::FileTypeRole).toInt() == FilesTreeModel::Movie){ - pm = Helper::grabFrame(idx.data(FilesTreeModel::FullPathRole).toString()); + pm = SmGlobals::instance()->frameCache()->entry(idx.data(FilesTreeModel::FullPathRole).toString()); if(pm.isNull()){ return; } -- cgit v1.2.3-70-g09d2