~ubuntu-branches/ubuntu/lucid/kdebase/lucid-proposed

« back to all changes in this revision

Viewing changes to apps/dolphin/src/dolphindetailsview.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-01-20 13:05:56 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120130556-nomzf43wi0xltdhg
Tags: 4:4.3.95-0ubuntu1
* New upstream release
  - Bump build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
    return m_expandedUrls;
172
172
}
173
173
 
174
 
QRegion DolphinDetailsView::visualRegionForSelection(const QItemSelection &selection) const
 
174
QRegion DolphinDetailsView::visualRegionForSelection(const QItemSelection& selection) const
175
175
{
176
176
    // We have to make sure that the visualRect of each model index is inside the region.
177
177
    // QTreeView::visualRegionForSelection does not do it right because it assumes implicitly
188
188
 
189
189
bool DolphinDetailsView::event(QEvent* event)
190
190
{
191
 
    if (event->type() == QEvent::Polish) {
 
191
    switch (event->type()) {
 
192
    case QEvent::Polish:
192
193
        header()->setResizeMode(QHeaderView::Interactive);
193
194
        updateColumnVisibility();
 
195
        break;
 
196
 
 
197
    case QEvent::FocusOut:
 
198
        // If a key-press triggers an action that e. g. opens a dialog, the
 
199
        // widget gets no key-release event. Assure that the pressed state
 
200
        // is reset to prevent accidently setting the current index during a selection.
 
201
        m_keyPressed = false;
 
202
        break;
 
203
 
 
204
    default:
 
205
        break;
194
206
    }
195
207
 
196
208
    return QTreeView::event(event);
765
777
                return;
766
778
            }
767
779
        }
768
 
    }
769
 
    else {
 
780
    } else {
770
781
        // This is the only piece of optimization data that needs to be explicitly
771
782
        // discarded.
772
783
        m_band.lastSelectionOrigin = QPoint();
880
891
       currIndex = nextIndex;
881
892
    } while (!allItemsInBoundDone);
882
893
 
 
894
 
883
895
    selectionModel()->select(itemsToToggle, QItemSelectionModel::Toggle);
884
896
 
885
897
    m_band.lastSelectionOrigin = m_band.origin;