~ubuntu-branches/ubuntu/jaunty/kde4libs/jaunty-updates

« back to all changes in this revision

Viewing changes to kdeui/itemviews/kextendableitemdelegate.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-12-11 18:26:08 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20081211182608-tsu6p8ncbw1gnqxt
Tags: 4:4.1.85-0ubuntu1
* New upstream release
* Patches:
  + Removed 15_kfreebsd_support.diff from patches/series (doesn't apply and
    has no use for Ubuntu)
  + Redid 20_use_dejavu_as_default_font.diff
  + Completely removed kubuntu_09_fix_application_menu.diff (applied upstream)
  + Refreshed kubuntu_54_use_xdg_menu_prefix.diff
  + Dropped plasma/widgets/toolbutton.cpp from kubuntu_qt_ftbfs.diff (applied
    upstream)
  + Global quilt refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
    rect.setTop(rect.bottom() + 1 - extender->sizeHint().height());
314
314
 
315
315
    rect.setLeft(0);
316
 
    QTreeView *tv = qobject_cast<QTreeView *>(parent());
317
 
    if (tv) {
 
316
    if (QTreeView *tv = qobject_cast<QTreeView *>(parent())) {
 
317
        int indentSteps = 0;
318
318
        for (QModelIndex idx(index.parent()); idx.isValid(); idx = idx.parent()) {
319
 
            rect.translate(tv->indentation(), 0);
320
 
        }
 
319
            indentSteps++;
 
320
        }
 
321
        if (tv->rootIsDecorated()) {
 
322
            indentSteps++;
 
323
        }
 
324
        rect.setLeft(indentSteps * tv->indentation());
321
325
    }
322
326
 
323
327
    QAbstractScrollArea *container = qobject_cast<QAbstractScrollArea *>(parent());