Fixed some warnings (left some because they need more attention)

This commit is contained in:
Eelke Klein 2017-02-02 07:22:54 +01:00
parent ccae3685ac
commit 468779ba38
6 changed files with 12 additions and 8 deletions

View file

@ -158,7 +158,7 @@ Qt::ItemFlags ConnectionListModel::flags(const QModelIndex &index) const
{
Qt::ItemFlags result;
int row = index.row();
if (row >= 0 && row < m_connections.size()) {
if (row >= 0 && row < (int)m_connections.size()) {
result = Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled;
}
return result;
@ -189,7 +189,7 @@ void ConnectionListModel::add(const ConnectionConfig &cfg)
Expected<ConnectionConfig> ConnectionListModel::get(int row)
{
if (row >= 0 && row < m_connections.size()) {
if (row >= 0 && row < (int)m_connections.size()) {
return m_connections.at(row).m_config;
}
else {
@ -201,7 +201,7 @@ Expected<ConnectionConfig> ConnectionListModel::get(int row)
bool ConnectionListModel::removeRows(int row, int count, const QModelIndex &parent)
{
bool result = false;
if (row >= 0 && row < m_connections.size()) {
if (row >= 0 && row < (int)m_connections.size()) {
beginRemoveRows(parent, row, row + count -1);
SCOPE_EXIT { endRemoveRows(); };
@ -261,7 +261,7 @@ void ConnectionListModel::save()
void ConnectionListModel::save(int index)
{
if (index >= 0 && index < m_connections.size()) {
if (index >= 0 && index < (int)m_connections.size()) {
auto& e = m_connections[index];
if (e.m_dirty) {
QString file_name = iniFileName();