1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 19:45:31 +01:00

fixed indentation / coding style

This commit is contained in:
Alexander Bikadorov 2014-02-11 13:18:08 +01:00
parent c7ac2012b4
commit 3adaf5d598

View File

@ -576,10 +576,9 @@ void PlaylistView::keyPressEvent(QKeyEvent* event) {
} else if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
if (currentIndex().isValid()) emit PlayItem(currentIndex());
event->accept();
} else if (event->modifiers() !=
Qt::ControlModifier // Ctrl+Space selects the item
&&
event->key() == Qt::Key_Space) {
} else if (event->modifiers() != Qt::ControlModifier // Ctrl+Space selects
// the item
&& event->key() == Qt::Key_Space) {
emit PlayPause();
event->accept();
} else if (event->key() == Qt::Key_Left) {
@ -623,8 +622,7 @@ void PlaylistView::RemoveSelected() {
qSort(selection.begin(), selection.end(), CompareSelectionRanges);
for (const QItemSelectionRange& range : selection) {
if (range.top() < last_row)
rows_removed += range.height();
if (range.top() < last_row) rows_removed += range.height();
model()->removeRows(range.top(), range.height(), range.parent());
}
@ -645,9 +643,9 @@ void PlaylistView::RemoveSelected() {
QItemSelectionModel::Rows);
} else {
// We're removing the last item, select the new last row
selectionModel()->select(model()->index(model()->rowCount()-1, 0),
QItemSelectionModel::ClearAndSelect |
QItemSelectionModel::Rows);
selectionModel()->select(
model()->index(model()->rowCount() - 1, 0),
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
}