aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06Qt: Ensure only valid input for DisplayFilterRoland Knall1-1/+4
Allow only valid inputs to be given for the name of a DisplayFilter. Specifically adding a quotation mark is not allowed Change-Id: I10454a2d23db1e0ef08148571d2762a3285e5ab8 Reviewed-on: https://code.wireshark.org/review/35006 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-05QT/CLI: Remove limit for object export filesUli Heilmeier1-2/+4
Removes the limit to export more than 1000 files with the same name when exporting objects. For this a preference name gui.max_export_objects is used. Bug: 16010 Change-Id: Iefc138ac2617491aad3b6ad5827c9058aed112c7 Reviewed-on: https://code.wireshark.org/review/34339 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-05Qt: Use g_new0 to allocate fmt_dataStig Bjørlykke1-1/+1
The column fmt_data will be g_free()'d later so ensure this is allocated using g_new0(). Change-Id: I31abe4ea16004e7972a59b4fff965460fa930800 Reviewed-on: https://code.wireshark.org/review/34981 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-05Qt: Load filenames properlyRoland Knall1-10/+11
Use a more stable approach for checking the file and avoid having QFile reset with the filename. It is ok due to the fact, that it is not opened, but is frowned upon in the documentation. This only sets the filename once. Change-Id: Ibe13eaf5938e060d7c39655591af34ac44340f49 Reviewed-on: https://code.wireshark.org/review/34965 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-05Qt: Fix memory leaks in FilterListModel::reload()Stig Bjørlykke1-3/+3
This fixes up to 6 string leaks in FilterListModel::reload(). 1. The char pointer returned from get_persconffile_path() and get_datafile_path() is allocated and must be free'd by the caller. 2. QFile.setFileName() takes a QString() so don't strdup() the name given because that will leak as well. Change-Id: I580020a5ff37a9b2b8ae16179ac6d7ba4a0f16da Reviewed-on: https://code.wireshark.org/review/34964 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-04Qt: Coloringrules Mime is encoded as JSONRoland Knall1-25/+43
Encode coloring rules as json objects to avoid encoding issues Change-Id: I4b5369fef3c0f9e73cbb08edf14de6535ff35026 Reviewed-on: https://code.wireshark.org/review/34947 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-03Qt: Consolidate mimedata usageRoland Knall4-23/+22
Ensure, that all mimedata uses similar mimetypes and document the mimetypes being used throughout wireshark Change-Id: I7c02d0a5e12a823153640e600051abb95d58cdeb Reviewed-on: https://code.wireshark.org/review/34923 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-03Qt: Filter list model filter selection (CID 1455165)Jaap Keuter1-3/+3
The code as it stands seems to work for a single type of filter type only. When making choice on filter type, reference the type set in the object. Change-Id: I5f4181372db6045e17ba1519828346f098dce8d3 Reviewed-on: https://code.wireshark.org/review/34916 Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-02filter_list_model (Qt): Fix Dead StoreAlexis La Goutte1-2/+0
Fix dead store (Dead assignement/Dead increment) Warning found by Clang Change-Id: If2050d2e0137afcadc382b12c0756bd49dfc0f7c Reviewed-on: https://code.wireshark.org/review/34904 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-29Qt: Fix override for FilterModelRoland Knall1-3/+3
Change-Id: I73428fe09c36dd53bc24f99d893404a7cac10175 Reviewed-on: https://code.wireshark.org/review/34886 Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-29Qt: Allow drag/drop of filter buttons in dialogRoland Knall2-3/+68
Allow the drag/drop of filter buttons in the dialog Change-Id: Ie2d5987ecdb626a8f12e8f17e6967f937bdf4648 Reviewed-on: https://code.wireshark.org/review/34885 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-28Qt: Filter enabled/disabled protocolsRoland Knall2-2/+9
Allow for filtering of enabled/disabled protocols in the EnabledProtocols dialog Change-Id: Ib9a8bbe2a23fdcd3ecd2b9ca08de17f77e85049c Reviewed-on: https://code.wireshark.org/review/34878 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-28Qt: Fix macos buildbotRoland Knall1-1/+1
Change-Id: I5b6f11b3a5736b50c6928081df16f6bdb5125ea8 Reviewed-on: https://code.wireshark.org/review/34881 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-28Qt: Implement FilterListModelRoland Knall2-0/+333
Change-Id: I365281a709ded644fc8d6ccfce5870a000221a3b Reviewed-on: https://code.wireshark.org/review/34856 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-28Qt: Add Shortcut methods for active profileRoland Knall2-0/+16
Change-Id: Ied32cf386074b97cfea38ffe6b8be6b916164712 Reviewed-on: https://code.wireshark.org/review/34873 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-21Qt: Reset all changes in the column preferencesRoland Knall2-0/+8
Allow the user to reset the changes done. This can be done at any time, as long as the dialog has not been closed Change-Id: I0d72a7972b4ea94b53fbed4c84ea952fd6f71b01 Reviewed-on: https://code.wireshark.org/review/34825 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20Qt: Make enums anonymousRoland Knall1-2/+2
Make them anonymous as they are not related to any attribute Change-Id: I697ce1c04196e035bf5d394b0785826d251fb8cf Reviewed-on: https://code.wireshark.org/review/34821 Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20Qt: ColumnPreferences hide hidden columnsRoland Knall2-3/+43
Filter on columns being hidden or not Change-Id: Ia41f556e00c7de471b1d4b7f9b5f6c099b7ddcf3 Reviewed-on: https://code.wireshark.org/review/34820 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20Qt: Fix Column PreferencesRoland Knall2-0/+549
The current implementation has some serious bugs. e.g. if an added column is moved, existing columns disappear. Also, if new columns are being added, existing columns may disappear. This moves the column preferences to a Movel/View concept and implements necessary checks to ensure, that such an issue cannot occur Change-Id: I73810812180e2fbed4d2fe67316f190aba82c719 Reviewed-on: https://code.wireshark.org/review/34819 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-04Qt: Do not redissect packets before sortingTomasz Moń1-23/+1
There's no need to perform redissection as we are sorting data already present in PacketListRecord. This change is not only improving performance, but prevents a crash related to "event interruptions". As wsApp->processEvents() is called with QEventLoop::AllEvents, it is possible for user to trigger any action. If the user decided to close the file while packets are being redissected inside PacketListModel::sort(), Wireshark would crash. Ping-Bug: 16097 Change-Id: I82eee0efc789a1102e5fbe3670ed79039a18b8be Reviewed-on: https://code.wireshark.org/review/34679 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-04Qt: fix compilation for enabled_protocols_model.Dario Lombardo1-2/+2
clang complains, gcc doesn't. Error: In file included from ../ui/qt/enabled_protocols_dialog.cpp:10: In file included from ../ui/qt/enabled_protocols_dialog.h:15: ../ui/qt/models/enabled_protocols_model.h:121:18: error: 'filterAcceptsRow' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; Change-Id: Ifbba736158a841752da27349925a3b55556728ca Reviewed-on: https://code.wireshark.org/review/34447 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-04Qt: in EnabledProtocolsDialog handle protocol typeRoland Knall2-43/+131
Allow a selection of the list based on the protocol type. That way one can easily enable/disable for instance just heuristic protocols Change-Id: I1ee8df5d9887c764272ec55b33703855c0c91f5a Reviewed-on: https://code.wireshark.org/review/34442 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-01Qt: Rework Resolved Addresses dialogRoland Knall4-19/+428
This is a refactoring/redesign of the "Resolved Addresses" dialog, allowing for sorting/filtering and searching within the addresses and ports. Change-Id: I5071e92ff699323b6c93fc533eeaf92e0db334de Reviewed-on: https://code.wireshark.org/review/34398 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-30Qt: Add macro for g_list_next for C++Roland Knall4-8/+6
Using a simple (type *) cast on g_list_next results in a warning with modern compilers "old-style cast" Adding a warning for g_list_next and data access to avoid the warning A good overview why reinterpret_cast has been used can be found here: https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used It is a 1:1 replacement in this case, but does not use any of the new cast styles and therefore should be used with caution. Change-Id: I989f237afc39aaf40133a788b1c0bbd7a51bf974 Reviewed-on: https://code.wireshark.org/review/34284 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-29Qt: Apply Invert/Enable/Disable only to selected listRoland Knall2-59/+58
Also, put the search field on top, as this is the default for search fields and apply the change of enable/disable and invert-all only to the selected items, instead of all items. Bug: 16013 Change-Id: If4ef1c5ce63eef6fa72db679cdcbf52dcb0e8fb6 Reviewed-on: https://code.wireshark.org/review/34393 Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-26Qt: Fix memory leak in ProfileModel constructorTomasz Moń1-0/+1
Change-Id: I4a0ccaebe7ab821a22b86ce1155328fd714caf50 Reviewed-on: https://code.wireshark.org/review/34376 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-08-26Qt: Fix copy from default profileRoland Knall1-1/+1
The default profile was available to be selected, even if it was the active profile. Bug: 16021 Change-Id: If08a563f243f18f32e17cb2169180ec0b1274a9a Reviewed-on: https://code.wireshark.org/review/34366 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-19Qt: Fix CredentialsModel::clear()Tomasz Moń1-7/+9
The last parameter to beginRemoveRows() is the last row index, not the number of rows. The QAbstractItemModel::beginRemoveRows() source code expliticly checks if the value is smaller than row count. Do not emit beginRemoveRows() if the model is empty as it does not make sense and it is impossible to pass the QAbstractItemModel assertions in such case. Emit endRemoveRows() when finished instead of endInsertRows(). Change-Id: I93be4820b1ea0fbb5c0f3cd28edca329b4017814 Reviewed-on: https://code.wireshark.org/review/34318 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-13Qt: Fix importProfilesFromDir() semanticsTomasz Moń1-2/+3
The default value for skippedCnt is Q_NULLPTR. Do not dereference skippedCnt unconditionally. Change-Id: Ice33a7f9034507f39f16406cc365f39f4e543da5 Reviewed-on: https://code.wireshark.org/review/34271 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-08-13Qt: Remove unnecessary const_cast'sRoland Knall2-11/+11
Change-Id: I566cb963b919f6de91a809661856beadd1d4a14a Reviewed-on: https://code.wireshark.org/review/34264 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-13Qt: Import zips with illegal namesRoland Knall2-7/+25
If a profile import contains illegal path names inside the zip container, the illegal names are being filtered out and replaced with an underscore Change-Id: I4e1bc495156b8c1cd3f4dfca69604e880647f74e Reviewed-on: https://code.wireshark.org/review/34220 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-13Qt: Correctly identify the active profileRoland Knall1-8/+12
Correctly mark the active profile in the list and identify it by making it bold, even if it has been renamed Change-Id: I8c5c8215b924735f460c5bd0bb4d4c21632d494b Reviewed-on: https://code.wireshark.org/review/34211 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-13Qt: Prevent loop in renames of profilesRoland Knall2-41/+193
This prevents the case, where there are two profiles, and one is renamed, after which the second one is renamed to the firsts original name. This could lead to undefined behavior in the underlying data structure. Fixes an issue as well, where deleting the identical named duplicate would delete the original one Bug: 15975 Change-Id: Ia7112779f2c2ef926c3ea915852b6d7b4497f777 Reviewed-on: https://code.wireshark.org/review/34189 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-09Qt: Fix coverity issues for profile modelRoland Knall1-3/+2
Change-Id: I59c4f6e6d22ae77934d3c841cd6905c76da76781 Reviewed-on: https://code.wireshark.org/review/34219 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-09Qt: Fix Preference dialog translationRoland Knall2-35/+41
The title names of each section are not presented correctly Bug: 15977 Change-Id: I68ab0fb6fc7131f9d2af67fa38c509ed6808c7d3 Reviewed-on: https://code.wireshark.org/review/34218 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-08Qt: Restructure duplicateEntry to rectify copying issuesRoland Knall1-34/+38
Various issues rose during restructuring which are now being fixed with the help of unittests. Mainly also renaming new profiles and createing copies from them, as well as deleting profiles and keeping copies names Change-Id: I39e1772c7be586fe07ea0613fa9e23d40d864012 Reviewed-on: https://code.wireshark.org/review/34214 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-08Qt: Remove unnecessary label from default copyRoland Knall1-21/+35
Restructures dataPath for PROF_STAT_COPY to ensure correct labeling of the hintLabel Bug: 15974 Change-Id: I69f61f4f8db74ca52c3b72d32af2b2bb8b19957d Reviewed-on: https://code.wireshark.org/review/34202 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-08Qt: Simplify guard checksRoland Knall2-26/+20
Change-Id: I726dfba29ad75719a128e39190f6deeb9e77ceeb Reviewed-on: https://code.wireshark.org/review/34204 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-06Qt: ProfileModel code cleanupStig Bjørlykke1-11/+3
Remove code which cannot be reached. Remove unused QString variables. Fix indentation. Change-Id: If4616fb5f800f5a87bff6d7571b366a583af62fc Reviewed-on: https://code.wireshark.org/review/34195 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-05Qt: Fix profile copy with wrong profile nameRoland Knall1-1/+8
Bug: 15967 Change-Id: Ifda13a517fdcfd5a34fd298f08d0714e36301a91 Reviewed-on: https://code.wireshark.org/review/34187 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-05Qt: Better translation textsRoland Knall1-5/+9
Improve text for translation in the profile model Change-Id: If1cb7f4e83c9a45729391ce8a69029d6bc95d87b Reviewed-on: https://code.wireshark.org/review/34188 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-05Qt: Check filename before importRoland Knall2-5/+37
Before the unzipped files are being copied from the temp directory, they are checked against the stored list of profile names, to ensure, that only allowed files are being imported. Also ensures, that no empty directory exists for the skipped one Bug: 15969 Change-Id: I6ae8c9fb5f63d089d42fc0ef18dbe84baec515a2 Reviewed-on: https://code.wireshark.org/review/34184 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-03Qt: Write recent before exporting profilesStig Bjørlykke1-0/+4
The selected profile may have unsaved recent settings when exported, so write the recent file before exporting to ensure that we save the latest changes. A side effect is that it's now possible to export a newly created profile even if it has only default configuration. Bug: 15965 Change-Id: I7bb6428283789894bd2863e9ddbd130ca56b1219 Reviewed-on: https://code.wireshark.org/review/34172 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-02Qt: Update UI for profiles and handle export/import properlyRoland Knall2-71/+293
This patchset ensures a 1:1 replacement of the old 3.0 version of the profiles dialog. It is a major bugfix for the new version in case of handling creating/ deleting and adding profiles. Delete can be performed on multiple profiles now, by selecting the profiles which need to be deleted. Import/Export functionality has been overhauled to follow these rules: * No imports while changes are pending, due to datamodel sanity * Export for Default Profile and Global Profiles is not possible * Either all personal profiles can be selected or individually choosen ones * Use last directory and store it properly * Imports can be cancelled * Only one import is allowed at a time (but it can contain as many profiles as needed) Change-Id: Ie2fccd397202ec06976d764734437284f464409a Reviewed-on: https://code.wireshark.org/review/34123 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-02Qt: Rework VOIP Dialog context menuRoland Knall2-0/+6
Rework the context menu to have same functions behave the same way and just create the menu while it is needed. Also, add switch for setting the time of day to the context menu Change-Id: Id813ff39431f6fad15887856f246d03f209e438d Reviewed-on: https://code.wireshark.org/review/34165 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-30Qt: Check for NULL pointer in profile->referenceStig Bjørlykke1-2/+2
Check for NULL pointer before using profile->reference in strcmp() because this will give a crash. Doing a copy profile from a new profile will set the reference to NULL in get_profile_parent(). Use an unambiguously profile reference value NULL as profile->reference when creating a new profile to align with when copy from a new profile. Change-Id: Ib27a1a309776e9c2ec44677f2d22f9a5635dd38a Reviewed-on: https://code.wireshark.org/review/34137 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-30Qt: Change from User/System to Personal/Global profile typesStig Bjørlykke2-39/+39
Change the Profile types from User/System to Personal/Global in UI to match the terminology used in About Wireshark -> Folders. This reverts commit 40af4aa93e469d37bd8e712228ecccb07407c3c6. This reverts commit f0cde7ca34a4975370e1b9ded2fee7df266343f6. This reverts commit c37cabe900b9b11e12c8626ca46adc080e465fdb. Change-Id: I9012db6385707754e26a2dadb57f6003f8112f9b Reviewed-on: https://code.wireshark.org/review/34134 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-07-29Qt: avoid NULL to terminate a g_build_filename in ExportObjectModelPeter Wu1-8/+7
While documentation for g_build_filename suggests the use of NULL as terminator, the C++ standard permits NULL to be defined as integer 0. This potentially has a different size than a void pointer and can cause crashes if this is the case. Instead of using (void*)0 as terminator, let's just rewrite this piece to avoid the problem in its entirely. Fixes "missing sentinel" warning in GCC with musl due to NULL being 0L. Change-Id: I6a7911887eaeeaa56fdb03d14ee8b70a42c8a05b Reviewed-on: https://code.wireshark.org/review/34107 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-07-29Qt: Fix memory leak in Profile modelStig Bjørlykke1-4/+9
The pointer from get_persconffile_path(), get_profiles_dir() and get_system_profiles_dir() is malloc'ed so ensure this is freed when done. Change-Id: Id836643a4209f0f9ec570a18f62a8c58cf2b67a7 Reviewed-on: https://code.wireshark.org/review/34119 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-29Qt: Rename profile global to systemStig Bjørlykke2-34/+34
It's called system profiles in UI so update function names and variables to use the same name. This will increase code readability. Change-Id: I048e9ea85bd6ebab4a2c3ed1c685487ac8f7e40e Reviewed-on: https://code.wireshark.org/review/34116 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>