mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fix warnings when building with GCC 7
This commit is contained in:
parent
f0b8ac2daa
commit
567881f130
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2014-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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()) {
|
if (index.column() == 0 && itm->isUrl()) {
|
||||||
return QString("%1\n%2").arg(itm->title(), QString::fromUtf8(itm->url().toEncoded()));
|
return QString("%1\n%2").arg(itm->title(), QString::fromUtf8(itm->url().toEncoded()));
|
||||||
}
|
}
|
||||||
|
// fallthrough
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -72,6 +72,7 @@ void DownloadOptionsDialog::setLastDownloadOption(const DownloadManager::Downloa
|
|||||||
ui->radioExternal->setChecked(true);
|
ui->radioExternal->setChecked(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// fallthrough
|
||||||
|
|
||||||
case DownloadManager::OpenFile:
|
case DownloadManager::OpenFile:
|
||||||
ui->radioOpen->setChecked(true);
|
ui->radioOpen->setChecked(true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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) {
|
if (index.column() == 0) {
|
||||||
return QString("%1\n%2").arg(entry.title, entry.urlString);
|
return QString("%1\n%2").arg(entry.title, entry.urlString);
|
||||||
}
|
}
|
||||||
|
// fallthrough
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
case Qt::EditRole:
|
case Qt::EditRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
|
@ -455,7 +455,7 @@ void ModelTest::data()
|
|||||||
QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
|
QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
|
||||||
if (textAlignmentVariant.isValid()) {
|
if (textAlignmentVariant.isValid()) {
|
||||||
int alignment = textAlignmentVariant.toInt();
|
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
|
// General Purpose roles that should return a QColor
|
||||||
|
Loading…
Reference in New Issue
Block a user