aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-07-09 15:38:30 +0200
committerAnders Broman <a.broman58@gmail.com>2019-07-11 04:49:27 +0000
commit20d70997ef6790b73edfa135b742c5af410bbe6a (patch)
treeb581c308e704e291fe46805374942f44d11a44b3 /ui/qt/models
parent4e7ac431a55ab8da9155e1f040d676569aa6d184 (diff)
Qt: MainStatusbar and CopyFromProfileMenu to Model
Remove the profile.? specific implementation and move both functions to profile model, makeing the class the single source for profile related parsing Change-Id: I61ecc2fc1f294e4e3943a00bb8522258c8ff8ec5 Reviewed-on: https://code.wireshark.org/review/33880 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/models')
-rw-r--r--ui/qt/models/profile_model.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp
index 79995cc824..07138450ce 100644
--- a/ui/qt/models/profile_model.cpp
+++ b/ui/qt/models/profile_model.cpp
@@ -309,6 +309,7 @@ QVariant ProfileModel::data(const QModelIndex &index, int role) const
case ProfileModel::DATA_IS_DEFAULT:
return qVariantFromValue(prof->status == PROF_STAT_DEFAULT);
+
case ProfileModel::DATA_IS_GLOBAL:
return qVariantFromValue(prof->is_global);
@@ -391,7 +392,7 @@ Qt::ItemFlags ProfileModel::flags(const QModelIndex &index) const
if ( ! prof )
return fl;
- if ( index.column() == ProfileModel::COL_NAME && ! prof->is_global && prof->status != PROF_STAT_DEFAULT )
+ if ( index.column() == ProfileModel::COL_NAME && prof->status != PROF_STAT_DEFAULT && ! prof->is_global && set_profile_.compare(prof->name) != 0 )
fl |= Qt::ItemIsEditable;
return fl;