summaryrefslogtreecommitdiffstats
path: root/src/widget/wlibrarysidebar.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2016-04-26 10:31:59 -0700
committerRJ Ryan <rryan@mixxx.org>2016-04-26 10:31:59 -0700
commit266a956138a5f8b713ab8ac14f0057f4bfa75dd3 (patch)
treec283adf20c0d87ab98613e902f4f16dbb6a98aa8 /src/widget/wlibrarysidebar.cpp
parentaf0714af69bcd371b9e588ce59d07f60e2a4410d (diff)
Fix some clang-tidy-produced lint and convert foreach loops to range-based for loops.
Diffstat (limited to 'src/widget/wlibrarysidebar.cpp')
-rw-r--r--src/widget/wlibrarysidebar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp
index 5893ac9dc5..dce544535b 100644
--- a/src/widget/wlibrarysidebar.cpp
+++ b/src/widget/wlibrarysidebar.cpp
@@ -84,7 +84,7 @@ void WLibrarySidebar::dragMoveEvent(QDragMoveEvent * event) {
bool accepted = true;
if (sidebarModel) {
accepted = false;
- foreach (QUrl url, urls) {
+ for (const QUrl& url : urls) {
QModelIndex destIndex = this->indexAt(event->pos());
if (sidebarModel->dragMoveAccept(destIndex, url)) {
// We only need one URL to be valid for us
@@ -195,7 +195,7 @@ void WLibrarySidebar::keyPressEvent(QKeyEvent* event) {
}
void WLibrarySidebar::selectIndex(const QModelIndex& index) {
- auto pModel = new QItemSelectionModel(model());
+ auto pModel = new QItemSelectionModel(model());
pModel->select(index, QItemSelectionModel::Select);
setSelectionModel(pModel);