diff --git a/src/lib/bookmarks/bookmarksmodel.cpp b/src/lib/bookmarks/bookmarksmodel.cpp index 953145e73..1c4604d7e 100644 --- a/src/lib/bookmarks/bookmarksmodel.cpp +++ b/src/lib/bookmarks/bookmarksmodel.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2014-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -120,6 +120,7 @@ QVariant BookmarksModel::data(const QModelIndex &index, int role) const if (index.column() == 0 && itm->isUrl()) { return QString("%1\n%2").arg(itm->title(), QString::fromUtf8(itm->url().toEncoded())); } + // fallthrough case Qt::DisplayRole: switch (index.column()) { case 0: diff --git a/src/lib/downloads/downloadoptionsdialog.cpp b/src/lib/downloads/downloadoptionsdialog.cpp index 76e6990ff..69d327358 100644 --- a/src/lib/downloads/downloadoptionsdialog.cpp +++ b/src/lib/downloads/downloadoptionsdialog.cpp @@ -72,6 +72,7 @@ void DownloadOptionsDialog::setLastDownloadOption(const DownloadManager::Downloa ui->radioExternal->setChecked(true); break; } + // fallthrough case DownloadManager::OpenFile: ui->radioOpen->setChecked(true); diff --git a/src/lib/history/historymodel.cpp b/src/lib/history/historymodel.cpp index d3b329958..5739bd79e 100644 --- a/src/lib/history/historymodel.cpp +++ b/src/lib/history/historymodel.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -115,6 +115,7 @@ QVariant HistoryModel::data(const QModelIndex &index, int role) const if (index.column() == 0) { return QString("%1\n%2").arg(entry.title, entry.urlString); } + // fallthrough case Qt::DisplayRole: case Qt::EditRole: switch (index.column()) { diff --git a/tests/modeltest/modeltest.cpp b/tests/modeltest/modeltest.cpp index ac4dd8983..1c67acd6b 100644 --- a/tests/modeltest/modeltest.cpp +++ b/tests/modeltest/modeltest.cpp @@ -455,7 +455,7 @@ void ModelTest::data() QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole); if (textAlignmentVariant.isValid()) { int alignment = textAlignmentVariant.toInt(); - Q_ASSERT(alignment == (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask))); + Q_ASSERT(alignment == int(alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask))); } // General Purpose roles that should return a QColor