]> cloud.milkyroute.net Git - dolphin.git/commit
Fix a couple of crashes. First was to avoid problem caused by KIconLoader::global...
authorRobert Knight <robertknight@gmail.com>
Mon, 23 Jul 2007 23:08:47 +0000 (23:08 +0000)
committerRobert Knight <robertknight@gmail.com>
Mon, 23 Jul 2007 23:08:47 +0000 (23:08 +0000)
commite6785665752a8a3e6f9d9a73d40fdb22a2af7d04
tree86e1292257ecbc659530e3939839c16808b77547
parent117899b07c05c3efe5cc5d4818d30322095d76e9
Fix a couple of crashes.  First was to avoid problem caused by KIconLoader::global()->theme() returning 0 (which according to the API, it can do).  Second was to fix the 'lastIndex' member of KCategorizedView::Private being out of date when used.  According to the comments this member existed as an optimization.  However in the only function where it is used, scrollbar updates are also performed.  This will be several orders of magnitude more expensive than the 3 constant-time operations on Qt containers (QHash,QList) which the optimization avoided.  So I removed the 'lastIndex' member and moved the calculation to where the data is needed.

svn path=/trunk/KDE/kdebase/apps/; revision=691574
src/dolphinitemcategorizer.cpp
src/kcategorizedview.cpp
src/kcategorizedview_p.h