Commit Graph

61 Commits

Author SHA1 Message Date
Gerald Combs 85357ae721 Fix more unused variables and enable unused-but-set-variable errors.
Add -Werror=unused-but-set-variable to our default compiler flags and fix

```
epan/dissectors/packet-dcerpc-frsrpc.c:709:10: error: variable 'nb_chunk' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 nb_chunk = 0;
                ^
```

```
epan/dissectors/packet-dcom-oxid.c:175:13: error: variable 'u32ItemIdx' set but not used [-Werror,-Wunused-but-set-variable]
    guint32 u32ItemIdx;
            ^
```

```
epan/dissectors/packet-l2tp.c:1775:104: error: parameter 'ccid' set but not used [-Werror,-Wunused-but-set-parameter]
static int dissect_l2tp_ericsson_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 ccid)
                                                                                                       ^
```

```
epan/dissectors/packet-ldp.c:1922:19: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
    guint8        ix;
                  ^
```

```
epan/dissectors/packet-nas_5gs.c:4757:14: error: variable 'curr_len' set but not used [-Werror,-Wunused-but-set-variable]
    guint i, curr_len;
             ^
```

```
epan/dissectors/packet-per.c:1769:6: error: variable 'extension_addition_entries' set but not used [-Werror,-Wunused-but-set-variable]
        int extension_addition_entries;
            ^
```

```
epan/dissectors/packet-rtitcp.c:618:11: error: variable 'messages_count' set but not used [-Werror,-Wunused-but-set-variable]
    guint messages_count, offset;
          ^
```

```
epan/dissectors/packet-tcp.c:2130:9: error: variable 'ackcount' set but not used [-Werror,-Wunused-but-set-variable]
    int ackcount;
        ^
epan/dissectors/packet-tcp.c:3317:12: error: variable 'nbOptionsChanged' set but not used [-Werror,-Wunused-but-set-variable]
    guint8 nbOptionsChanged = 0;
           ^
```

```
epan/dissectors/packet-zbee-zcl-se.c:11802:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
    for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5; i++) {
              ^
```

```
ui/iface_lists.c:142:23: error: variable 'linktype_count' set but not used [-Werror,-Wunused-but-set-variable]
    gint              linktype_count;
                      ^
```

```
ui/voip_calls.c:456:15: error: variable 'item_num' set but not used [-Werror,-Wunused-but-set-variable]
    guint     item_num;
              ^
```

```
file.c:572:17: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 count             = 0;
                ^
```

```
file.c:3667:24: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
        pd = (guint8 *)ws_mempbrk_exec(pd, buf_end - pd, pattern, &c_char);
                       ^
```

```
ui/qt/io_graph_dialog.cpp:1932:60: error: variable 'mavg_right' set but not used [-Werror,-Wunused-but-set-variable]
    unsigned int mavg_in_average_count = 0, mavg_left = 0, mavg_right = 0;
                                                           ^
```

```
ui/qt/stats_tree_dialog.cpp:166:9: error: variable 'node_count' set but not used [-Werror,-Wunused-but-set-variable]
    int node_count = 0;
        ^
```

```
ui/qt/models/profile_model.cpp:1142:13: error: variable 'entryCount' set but not used [-Werror,-Wunused-but-set-variable]
        int entryCount = 0;
            ^
```
2022-11-08 13:49:44 -08:00
Gerald Combs 76423db8e0 Qt: Fix clazy-incorrect-emit warnings.
QAbstractItemModel::beginResetModel and endResetModel aren't signals, so
don't emit them. dataChanged is, so do.

Fixes clazy-incorrect-emit:
https://github.com/KDE/clazy/blob/master/docs/checks/README-incorrect-emit.md
2022-05-12 17:29:06 +00:00
Gerald Combs bcd3d05a3e Qt: Fix more Qt6-related warnings. 2022-03-25 12:48:01 -07:00
Tomasz Moń 890555b8bd Qt: Qt6.2 compatibility fixes
Wireshark successfully compiles on Windows with Qt6.2 with following
cmake options:
  -DUSE_qt6=ON -DDISABLE_ERROR=ON

QCustomPlot QT 6.2 patch is taken from QCustomPlot forum post by miccs.
2021-11-29 04:55:12 +00:00
Tomasz Moń e51a0cb4f4 Qt: Use QRegularExpression instead of QRegExp
Qt5 recommended to use QRegularExpression instead of QRegExp.
Qt6 deprecated QRegExp and provides it in Qt5 compatibility module.

QRegularExpression is generally faster and safer to use as the results
are returned in separate QRegularExpressionMatch instead of modifying
interal QRegExp object state.
2021-11-26 09:10:42 +00:00
Joerg Mayer 5bb7e1606b Fix some of the compile errors when compiling with Qt6
This is basically applying c knowledge and Google to the compiler
error messages. There is basically no understanding involved into
what I was doing:
- No idea why lots of #includes needed to be added for Qt6
- No idea how to actually fix the remaining problems, but it's a start

Things that need to be done:
- The AudioDeviceInfo thingy needs to be replaced by something new (as
  an interim solution another patch disables the audio player in Qt6).
- GRegExp eventually needs to be replaced by QRegularExpression
  (available since Qt5.0, so development can be done in Qt5).
- Solutions for the other problems like some methods no longer
  being available in Qt6 that have to sort of co-exist with Qt5.
2021-11-24 10:31:16 +00:00
Dr. Lars Völker 8e2cd4f652 UI: Import profiles from ZIP supporting bigger files (Bugfix)
This patch allows the profile importer to recover from a file too large
to import as well as adjusts the maximum allowed config file size.

Closes: #17504
2021-08-25 13:40:12 +00:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

    perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' )

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches the default in our top-level .editorconfig

- The one notable editor that's likely to be used on these files and
  *doesn't* support EditorConfig (Qt Creator) defaults to 4 space
  indentation.
2021-03-08 18:11:32 +00:00
Roland Knall adb8feee6d Qt: Allow renaming personal profile
If a personal profile has the same name as a global profile (which
is usually the case if it has been copied without changing the name
afterwards), there was a bug where renaming the profile was no longer
possible.

Bug: 16423
Change-Id: Idafd216d007179a4c6221eafc2ff296d277d5b1d
Reviewed-on: https://code.wireshark.org/review/36902
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>
2020-04-30 11:19:41 +00:00
Tomasz Moń c07a48b6d3 Qt: Fix profile zip import on Windows
Do not use QDir::separator() as a directory separator. QT internally
uses "/" as separator on all systems, including Windows. The zip files
were not unzipped into target directory because splitting path on
QDir::separator() in ProfileModel::cleanName() returned only one part
(there weren't any "\' in file name, only "/").

Qt documentation for QDir::separator() mentions:
  "You do not need to use this function to build file paths.
   If you always use "/", Qt will translate your paths to conform to
   the underlying operating system. If you want to display paths to
   the user using their operating system's separator use
   toNativeSeparators()."

Bug: 16410
Change-Id: I9627684f58f4c1da24b6eec8958a2542fe07d915
Reviewed-on: https://code.wireshark.org/review/36237
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-29 10:15:29 +00:00
Roland Knall 4fe7fbd51d Qt: Changes ProfileModel assert
The assert mistakenly crashed the import

Bug: 16410
Change-Id: I385f4ba9b842f0f25d6ffe30db6065946fd55d84
Reviewed-on: https://code.wireshark.org/review/36233
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-28 20:34:03 +00:00
Orgad Shaneh bc8140be0b Fix build and deprecation warnings with Qt 5.14
Change-Id: I1fa6b5d3105288d25717a9fe4ae93ad3f471aaca
Reviewed-on: https://code.wireshark.org/review/35727
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-01-10 08:42:21 +00:00
Orgad Shaneh 0442f7a2c3 UI: Fix compilation with Qt 5.14
Change-Id: I8adae4609ff2857cb12bc803839ebb2c6afbd264
Reviewed-on: https://code.wireshark.org/review/35517
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-21 20:25:51 +00:00
Gerald Combs d614ade782 De-camel-ize "Wireshark" in a few places.
The _wslua_main struct / WireShark class appears to have never been
used, so remove it.

Change-Id: Id80fb2c2065accedf632ea4cc467d566d10870de
Reviewed-on: https://code.wireshark.org/review/35480
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-18 04:31:03 +00:00
Stig Bjørlykke a51c58fa1b Qt: Cleanup space inside parentheses
Remove randomly used space inside parentheses to make the coding
style uniform. Add space after if, for and while.

Change-Id: I519f5994b6f73d8a57a5004d51ca460276c618fe
Reviewed-on: https://code.wireshark.org/review/35112
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 20:43:10 +00:00
Roland Knall f577d5b3ea Qt: Add Shortcut methods for active profile
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-28 15:06:01 +00:00
Roland Knall a53545c0c8 Qt: Add macro for g_list_next for C++
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-30 13:37:25 +00:00
Tomasz Moń 8103070fd8 Qt: Fix memory leak in ProfileModel constructor
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-26 17:01:01 +00:00
Roland Knall 2729a89353 Qt: Fix copy from default profile
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-26 15:45:36 +00:00
Tomasz Moń 9784b1dda1 Qt: Fix importProfilesFromDir() semantics
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-13 13:46:01 +00:00
Roland Knall bc2b1a9a72 Qt: Remove unnecessary const_cast's
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-13 10:49:40 +00:00
Roland Knall 2a32808e50 Qt: Import zips with illegal names
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-13 08:16:50 +00:00
Roland Knall 9ac61952ec Qt: Correctly identify the active profile
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-13 08:16:41 +00:00
Roland Knall 4b00898a2a Qt: Prevent loop in renames of profiles
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-13 08:16:12 +00:00
Roland Knall 5199a0efd9 Qt: Fix coverity issues for profile model
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-09 12:56:59 +00:00
Roland Knall 0dfb50ef82 Qt: Restructure duplicateEntry to rectify copying issues
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-08 14:23:22 +00:00
Roland Knall 52e111e4d9 Qt: Remove unnecessary label from default copy
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-08 11:12:25 +00:00
Roland Knall 293b239406 Qt: Simplify guard checks
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-08 11:12:14 +00:00
Stig Bjørlykke 8097f6a038 Qt: ProfileModel code cleanup
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-06 10:31:07 +00:00
Roland Knall 24e43bf542 Qt: Fix profile copy with wrong profile name
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-05 15:11:44 +00:00
Roland Knall 353a2dabb0 Qt: Better translation texts
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-05 15:01:05 +00:00
Roland Knall 5c678288bc Qt: Check filename before import
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-05 13:47:11 +00:00
Stig Bjørlykke ca432674b1 Qt: Write recent before exporting profiles
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-03 21:45:37 +00:00
Roland Knall f259187803 Qt: Update UI for profiles and handle export/import properly
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-02 21:38:02 +00:00
Stig Bjørlykke 927afac570 Qt: Check for NULL pointer in profile->reference
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-30 11:34:35 +00:00
Stig Bjørlykke 5d0a2ccbb7 Qt: Change from User/System to Personal/Global profile types
Change the Profile types from User/System to Personal/Global in UI
to match the terminology used in About Wireshark -> Folders.

This reverts commit 40af4aa93e.
This reverts commit f0cde7ca34.
This reverts commit c37cabe900.

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-30 10:11:10 +00:00
Stig Bjørlykke 348de74cfb Qt: Fix memory leak in Profile model
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-29 13:36:58 +00:00
Stig Bjørlykke c37cabe900 Qt: Rename profile global to system
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>
2019-07-29 11:07:15 +00:00
Guy Harris 245086eb83 HTTPS In Still More Places, update more URLs.
Microsoft reshuffled their documentation - almost all of it moved from
msdn.microsoft.com to docs.microsoft.com.  Some blogs moved to
devblogs.microsoft.com; the comments *didn't* move, so in one case we go
to the Wayback Machine - the link isn't dead, but it formats horribly,
at least on my browser, but the archived version formats OK.

Use the Wayback Machine for some URLs, and update others.

Update the sections for MS-ADTS.

Point to the HTML versions of some RFCs and I-Ds.

Change-Id: I344b20f880de63f1ae2a4e3f9ff98af78a7fe139
Reviewed-on: https://code.wireshark.org/review/34101
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 22:56:35 +00:00
Roland Knall 970524e329 Qt: Export profiles
Allow for the export of profiles. The currently selected profile may be
selected, as well as all user-defined profiles

Fixes: Bug, where invalid data has been written into the profiles not
present inside the original file

Change-Id: I7c6310920a1f3a064cfcedc7774b742ff01c9b9e
Reviewed-on: https://code.wireshark.org/review/34077
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-25 18:00:24 +00:00
Roland Knall d55cf134eb Qt: Fix copy indicator for profile
If a profile has been created as a copy from a user profile,
and a global profile exists with the same name as the parent user
profile, deleting the parent user profile mistakenly indicates,
that the copy has been cerated with the parent global profile
not the then deleted user profile

Change-Id: I4d4c91de64b623a8553a3c51ad449988dfe8eec5
Reviewed-on: https://code.wireshark.org/review/34079
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-25 08:19:39 +00:00
Roland Knall faf520681a Qt: Various Profile UI Updates
Correct the text for delete and copy profiles, which better
display if they have been copied from a system-profile or
if the original entry has been deleted

Move Import button into the button box, as this seems
to be the consensus with applications and gives the info
label more room

Tooltips now behave the same way as they did before the
refactoring and copying from a new element creates the
correct names

Only one element could be deleted any given time, if the
default element was to be resetted

Change-Id: Ieb902b68627cb9bda5d2483b39de6479ff8d4533
Reviewed-on: https://code.wireshark.org/review/34070
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-25 06:49:47 +00:00
Guy Harris 53fddee43b Remove an extra backslash.
The only backslashes in invalid_dir_chars on Windows should be the one
escaping " and the one escaping \ itself; there's no need for one to
escape | and, in fact, MSVC warns about that.

Change-Id: I7622f5123df7da3049352dc0e86322b11f8c4150
Reviewed-on: https://code.wireshark.org/review/34068
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-24 09:46:52 +00:00
Roland Knall a96d6c4cea Qt: Stop profile import when action pending
When a reset/delete/add/rename action is pending, profiles
cannot be imported.

Change-Id: I4521b8a265ec4346b7028bc5a7173fd531be24c2
Reviewed-on: https://code.wireshark.org/review/34057
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-22 15:58:35 +00:00
Roland Knall 8892da8a47 Qt: Fix invalid characters for profiles
Change-Id: Ic44f075b2723e2d5d95e29b485791e89134315e8
Reviewed-on: https://code.wireshark.org/review/34056
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-22 15:58:04 +00:00
Roland Knall 8198413514 Qt: Fix filename check
On *nix only check for the separator, on Windows for all
invalid characters as defined in
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Change-Id: I5842ca9f0926cc9d6ce9b839be226051497cf647
Reviewed-on: https://code.wireshark.org/review/34055
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-22 15:57:51 +00:00
Roland Knall 91ed69488f Qt: Cleanup data() method and interface
Interface resembles the old interface

Change-Id: I7301f8bb6e00d30c20d7e5fdc9252a6a1765ff97
Reviewed-on: https://code.wireshark.org/review/34054
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-22 15:57:48 +00:00
Stig Bjørlykke 4257a8486d Qt: Improve profile import messages
Only show the message "No profiles found for import" when no profiles
actually found, not when found but all are skipped.

Add correct numerus translation for imported and skipped counts.

Change-Id: I0425aafb09fc4722cc765ae4f20ce8248b767c44
Reviewed-on: https://code.wireshark.org/review/34050
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-21 21:07:14 +00:00
Roland Knall 193ca63247 Qt: Fix deletion
- If a profile, based on a system default, is being deleted the
selected profile should switch back to the default
- The default profile is not a system profile

Change-Id: I267a0e14b9f974fdabe5a9b21187ad0673265b01
Reviewed-on: https://code.wireshark.org/review/34051
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-21 21:07:04 +00:00
Roland Knall 4e2a63f543 Qt: Fix copy-from menu
It stopped working after moving to the ProfileModel

Change-Id: I20d095ece8ce842e9ded4489fd8e062b35ffc968
Reviewed-on: https://code.wireshark.org/review/34030
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-21 16:41:29 +00:00