aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-07-11 12:43:14 +0200
committerAnders Broman <a.broman58@gmail.com>2019-07-11 11:28:11 +0000
commita87ca4e01720533f51991738ed03d5b499ade153 (patch)
treeb30c4ec844d30bad50b067ca990b5c9cfcc30748 /ui
parent496fe3dfbf698aa027596aa5bdf506361ed065fc (diff)
Qt: Fix various compiler warnings
Change-Id: I050b74a9d57c8d71a9373b6b4d5e942b7e55e8db Reviewed-on: https://code.wireshark.org/review/33895 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/models/profile_model.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp
index 07138450ce..1b2bc41056 100644
--- a/ui/qt/models/profile_model.cpp
+++ b/ui/qt/models/profile_model.cpp
@@ -44,9 +44,9 @@ bool ProfileSortModel::lessThan(const QModelIndex &source_left, const QModelInde
bool igL = left.data(ProfileModel::DATA_IS_GLOBAL).toBool();
bool igR = right.data(ProfileModel::DATA_IS_GLOBAL).toBool();
- if (left.data(ProfileModel::DATA_STATUS) == PROF_STAT_DEFAULT)
+ if (left.data(ProfileModel::DATA_STATUS).toInt() == PROF_STAT_DEFAULT)
igL = true;
- if (right.data(ProfileModel::DATA_STATUS) == PROF_STAT_DEFAULT)
+ if (right.data(ProfileModel::DATA_STATUS).toInt() == PROF_STAT_DEFAULT)
igR = true;
if ( igL && ! igR )
@@ -413,7 +413,7 @@ int ProfileModel::findByNameAndVisibility(QString name, bool isGlobal)
for ( int cnt = 0; cnt < profiles_.count() && row < 0; cnt++ )
{
profile_def * prof = profiles_.at(cnt);
- if ( prof && prof->is_global == isGlobal && name.compare(prof->name) == 0 )
+ if ( prof && static_cast<bool>(prof->is_global) == isGlobal && name.compare(prof->name) == 0 )
row = cnt;
}
@@ -422,7 +422,7 @@ int ProfileModel::findByNameAndVisibility(QString name, bool isGlobal)
QModelIndex ProfileModel::addNewProfile(QString name)
{
- add_to_profile_list(name.toUtf8().data(), "", PROF_STAT_NEW, FALSE, FALSE);
+ add_to_profile_list(name.toUtf8().constData(), "", PROF_STAT_NEW, FALSE, FALSE);
loadProfiles();
return index(findByName(name), COL_NAME);