mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
Define variables in their context
svn path=/trunk/KDE/kdebase/apps/; revision=682100
This commit is contained in:
parent
1bc9f442be
commit
388187924e
|
@ -169,16 +169,14 @@ QRect KListView::Private::visualRectInViewport(const QModelIndex &index) const
|
|||
retRect.setLeft(retRect.left() + column * listView->spacing() +
|
||||
column * itemWidth);
|
||||
|
||||
float rows;
|
||||
int rowsInt;
|
||||
foreach (const QString &category, categories)
|
||||
{
|
||||
if (category == curCategory)
|
||||
break;
|
||||
|
||||
rows = (float) ((float) categoriesIndexes[category].count() /
|
||||
(float) elementsPerRow);
|
||||
rowsInt = categoriesIndexes[category].count() / elementsPerRow;
|
||||
float rows = (float) ((float) categoriesIndexes[category].count() /
|
||||
(float) elementsPerRow);
|
||||
int rowsInt = categoriesIndexes[category].count() / elementsPerRow;
|
||||
|
||||
if (rows - trunc(rows)) rowsInt++;
|
||||
|
||||
|
@ -226,16 +224,14 @@ QRect KListView::Private::visualCategoryRectInViewport(const QString &category)
|
|||
if (!elementsPerRow)
|
||||
elementsPerRow++;
|
||||
|
||||
float rows;
|
||||
int rowsInt;
|
||||
foreach (const QString &itCategory, categories)
|
||||
{
|
||||
if (itCategory == category)
|
||||
break;
|
||||
|
||||
rows = (float) ((float) categoriesIndexes[itCategory].count() /
|
||||
(float) elementsPerRow);
|
||||
rowsInt = categoriesIndexes[itCategory].count() / elementsPerRow;
|
||||
float rows = (float) ((float) categoriesIndexes[itCategory].count() /
|
||||
(float) elementsPerRow);
|
||||
int rowsInt = categoriesIndexes[itCategory].count() / elementsPerRow;
|
||||
|
||||
if (rows - trunc(rows)) rowsInt++;
|
||||
|
||||
|
|
Loading…
Reference in a new issue