QList<KFileItem> itemList;
const QModelIndexList indexList = selection.indexes();
- QModelIndexList::const_iterator end = indexList.end();
- for (QModelIndexList::const_iterator it = indexList.begin(); it != end; ++it) {
- Q_ASSERT((*it).isValid());
-
- KFileItem item = m_dirModel->itemForIndex(*it);
+ foreach (QModelIndex index, indexList) {
+ KFileItem item = m_dirModel->itemForIndex(index);
if (!item.isNull()) {
itemList.append(item);
}
applyViewProperties(url);
startDirLister(url);
+ itemView()->setFocus();
}
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
this, SLOT(emitContentsMoved()));
connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(emitContentsMoved()));
+ view->setFocus();
}
QAbstractItemView* DolphinView::itemView() const
void DolphinView::updateViewportColor()
{
- QColor color = KColorScheme(KColorScheme::View).background();
+ QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
if (m_active) {
emit urlChanged(url()); // Hmm, this is a hack; the url hasn't really changed.
emit selectionChanged(selectedItems());