Commit Graph

61 Commits

Author SHA1 Message Date
Roland Knall 3a62b1bc75 Qt: Allow profile import from directory
To allow for easy import of profiles, one can select a directory
to import profiles from

Change-Id: I12f66e3dc6bd272d34baa76093152dce412b0158
Reviewed-on: https://code.wireshark.org/review/34038
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-21 16:41:13 +00:00
Roland Knall e3dabc38b3 Qt: Improve profiles import UI
This also allows for profile zips to have a different structure,
and only directories containign actual configuration files will
be part of the import

- Choosen path sticks and starts with current application path
- "Default" can no longer be imported as a profile
- skipped profiles count is being displayed

Change-Id: I0549a1ae81229940e573674a84f2912119d6ee21
Reviewed-on: https://code.wireshark.org/review/34013
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-19 11:41:37 +00:00
Roland Knall 2ab4aa4423 Qt: Delete copied profile proper
If a profile is a copy of another profile and get's deleted
without being saved, the original profile got deleted

Change-Id: Iffccb2e29131f97ad6fe71362946aad4e076eb3f
Reviewed-on: https://code.wireshark.org/review/34011
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-19 07:07:35 +00:00
Roland Knall ea924f7e61 Qt: Use correct name for copy
If the element to copy from has already been renamed, use the new (not
yet saved) name

Change-Id: I868c8ba18566adf9fbad4f1e42a22bdcd9fcbe99
Reviewed-on: https://code.wireshark.org/review/34012
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-18 21:52:08 +00:00
Pascal Quantin 54bbf3cf9e profile_model.cpp: add a missing break
Change-Id: I08f6f0f02a637a1b6c532b5e41396f5ebcd1ed99
Reviewed-on: https://code.wireshark.org/review/34003
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-18 08:44:03 +00:00
Roland Knall 2c7a35bc98 Qt: Fix various issues for profile manager
- Fixing the fact, that the profile did not allways switch to the active profile
when pressing the OK button.
- Adding a new profile can be repeated, if the name "New Profile" is already in
use, a number is incremented and added to subsequently new profiles.
- Copying a profile multiple times, creates individual names each time
- Global profiles should come last in the statusbar popup
- Global profiles should be called "System profiles"
- Fix null-pointer that could happen while querying "DATA_IS_SELECTED"
- Renaming an existing profile was not correctly indicated
- Renaming the currently selected profile works now

Change-Id: Ifa47fd672a6976c07d3e80741cfd61b548a5e1f8
Reviewed-on: https://code.wireshark.org/review/33921
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-18 05:45:29 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
Roland Knall 5e59d50b46 Qt: Fix profile copy and delete
Delete lead to an issue with the sort model, where indeces where
no longer correctly associated with the source model.

Copy did not check if the name already existed in the dialog

Change-Id: I3668dffb1e1956f04a5b9e21c3fcdac266e0cc0c
Reviewed-on: https://code.wireshark.org/review/33911
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-12 13:23:56 +00:00
Roland Knall a87ca4e017 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>
2019-07-11 11:28:11 +00:00
Roland Knall 20d70997ef 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>
2019-07-11 04:49:27 +00:00
Roland Knall 4e7ac431a5 Qt: Move Profile Dialog to Model/View
Move the profile dialog to a model/view based concept. Display and
ordering works now, but nothing much else.

Add possibility to filter for profiles, as well as group filters.

Change-Id: I4740ad5aa10feeb31192f8131fb1204f5dca7232
Reviewed-on: https://code.wireshark.org/review/25141
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-11 04:49:02 +00:00