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

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdeui/icons
From:       David Faure <faure () kde ! org>
Date:       2010-05-21 9:09:42
Message-ID: 201005211109.42952.faure () kde ! org
[Download RAW message or body]

On Friday 21 May 2010, Michael Pyne wrote:
> SVN commit 1129007 by mpyne:
> 
> Cache when KIconLoader::loadIcon misses finding an icon.
> 
> My initial port of KIconLoader to KSharedDataCache didn't include the old
> behavior of caching icon search misses. Searching for an icon and not
> finding it is slow! So, cache the results.
> 
> I couldn't really understand what loadIcon was supposed to be doing so I
> spent some time refactoring it instead. The behavior should be compatible
> with sane usage patterns, but my first attempt didn't size "User" icons
> appropriately so look at this patch with trepidation if your icons don't
> work.

Talking about trepidation... why do I bother writing unittests if people who 
refactor code don't even run them?

/d/kde/build/t/kdelibs/kdeui/tests>./kiconloader_unittest
********* Start testing of KIconLoader_UnitTest *********
Config: Using QTest library 4.6.3, Qt 4.6.3
PASS   : KIconLoader_UnitTest::initTestCase()
FAIL!  : KIconLoader_UnitTest::testLoadIconCanReturnNull() 'pix.isNull()' 
returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(66)]
PASS   : KIconLoader_UnitTest::testAppPicsDir()
PASS   : KIconLoader_UnitTest::testAppPicsDir_KIcon()
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(existing icon) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(octet-stream icon) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
QWARN  : KIconLoader_UnitTest::testLoadMimeTypeIcon(non-existing icon) 
QImage::scaled: Image is a null image
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(generic fallback) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(image-x-generic itself) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(x-office-document icon) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
QWARN  : KIconLoader_UnitTest::testLoadMimeTypeIcon(unavailable generic icon) 
QImage::scaled: Image is a null image
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(#184852) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(#178847) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
FAIL!  : KIconLoader_UnitTest::testLoadMimeTypeIcon(mimetype generic icon) 
'path.endsWith(expectedFileName)' returned FALSE. ()
   Loc: [/d/kde/src/t/kdelibs/kdeui/tests/kiconloader_unittest.cpp(176)]
PASS   : KIconLoader_UnitTest::cleanupTestCase()
Totals: 4 passed, 9 failed, 0 skipped
********* Finished testing of KIconLoader_UnitTest *********

This test was passing before your changes.

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

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