Commit Graph

28 Commits

Author SHA1 Message Date
Gerald Combs b9b16e2f64 QCustomPlot: Fix qsizetype warnings
Starting with Qt 5.10 (our earliest supported version),
Qt has a qsizetype (alias of ssize_t) that functions
like size() and indexOf() return. On clang that does not
have the same size as an int, so cast it away in a number
of places.
2022-11-23 01:02:25 +00:00
John Thacker 498dc04278 Qt: Update QCustomPlot to 2.1.1
Remove a bunch of line ending whitespace from upstream to
get it to compile.

Fix #18654
2022-11-23 01:02:25 +00:00
João Valverde 3903740534 Try to fix more -Wdocumentation-html warnings
/Users/buildslave/builds/UfJL1hoT/0/wireshark/wireshark/ui/qt/widgets/qcustomplot.cpp:16020:17: error: HTML tag 'tt' requires an end tag [-Werror,-Wdocumentation-html]
  parameter as <tt>QVariant(\ref QCPDataSelection)</tt>. All plottables that weren't touched by \a
               ~^~~
1 error generated.
2022-11-17 13:34:21 +00:00
Roland Knall e43501cf9e qcustomsplot: revert for fix Clang Warnings[core.UndefinedBinaryOperatorResult]
The commit prevents compilation for Qt 6.3.0

This reverts commit 3afa8264cb.
2022-05-03 15:46:03 +02:00
Gerald Combs e9a7f8c9e0 Qt: Fix some QCustomPlot Qt 6 warnings. 2022-03-27 14:35:55 +00:00
Alexis La Goutte a0328bdb03 qcustomsplot: Fix Clang Warnings [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:34001:37: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:34001:37: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 075ee9138a qcustomsplot: fix Clang warnings [core.CallAndMessage]
qcustomplot.cpp:26643:9: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27752:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27779:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:34087:7: warning: 2nd function call argument is an uninitialized value [core.CallAndMessage]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 6fd4188804 qcustomsplot: fix Clang Warning UndefinedBinaryOperatorResult
qcustomplot.cpp:22400:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:22400:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 3afa8264cb qcustomsplot: fix Clang Warnings[core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:21229:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:21274:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35323:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35349:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
João Valverde e5cb4ddd87 Qt: Fix clang -Wmisleading-indentation 2021-06-07 00:20:14 +00:00
Kevin Hogan 92e652ebfa Fix adaptive sampling performance on scatterplots
QCustomPlot's adaptive sampling decimates the data to be plotted based
on the screen resolution.  Specifically, if many data points fit within
the same pixel on the X (key) axis, then QCustomPlot attempts to plot
only the min value, the max value, and a few values in-between to
maintain a good "density" on the Y (value) axis.

The density QCustomPlot wants is about one datapoint for every 4 pixels
covered by the value range of a single X (key) pixel.  Unfortunately,
this calculation is flawed if all values also fit within a single pixel
on the Y (value) axis - so this change fixes that bug.
2021-04-15 07:34:19 +00:00
Alexis La Goutte 38d279326a Fix -Wdocumentation warning 2021-04-14 14:01:49 +00:00
Martin Mathieson d06287ec2e Some more spelling fixes.
Changed script to allow recursive search for multi-words.
2021-04-10 22:50:52 +00:00
John Thacker 67301b471a qcustomplot: Fix some clang code analysis warnings
Two dead stores and a possible call of memcpy with a null
destination.
2021-04-09 17:30:20 -04:00
John Thacker d0088585b3 qcustomplot: Fix some warnings in upstream code
QPainter::HighQualityAntialiasing is obsolete and ignored
(https://doc.qt.io/qt-5/qpainter.html#RenderHint-enum) since
at least 5.6, so use Antialiasing instead, as indicated by the docs.
(https://doc.qt.io/archives/qt-5.6/qpainter.html#RenderHint-enum)

Explicitly cast a long to an int, like already done on line 21080.

Put in a break to suppress an overly aggressive fallthrough warning
on g++ (all values of an enum are tested, so it cannot actually fall
through.)
2021-04-06 07:43:55 -04:00
John Thacker 35d47066b3 QCustomPlot: Update external library to version 2.1.0
QCustomPlot 2.1.0 was just released (Mar 29, 2021) and officially supports
Qt 5.12-6.0, which in order to support we've been patching it
internally. Update to this latest external version (after removing
the whitespace at the end of a bunch of lines internal to comments.)
(https://www.qcustomplot.com/index.php/download) Edited to include
the permission from the author Emanuel Eichhammer to use the GPLv2.
(Does someone need to ask if that permission applies to 2.1.0?)

Ping #17144 and #17163 but those bugs appear to still be here.
2021-04-03 17:56:01 +00:00
Martin Mathieson cd77e5aa5f Some more spelling fixes.
Also add more words to dictionary file.
2021-02-21 09:59:04 +00:00
Guy Harris bb494c11de Fix various spelling errors.
Found by lintian and by looking for the misspelled words that lintian
found.

(Does not fix spelling errors in .asn1 files.)
2020-12-09 05:52:50 +00:00
Gerald Combs 8b80b9111a Qt: Fix QCustomPlot deprecation warnings.
Fix Qt 5.15 deprecation warnings in QCustomPlot, similar to 76d92ba7e7.

Use default flags constructors instead of 0.

Use QWheelEvent::angleDelta() instead of QWheelEvent::angle().

Use QWheelEvent::position() instead of QWheelEvent::pos().

Use date::startOfDay() instead of QDateTime(date).

Use QMultiMap instead of QMap where needed.
2020-10-22 07:19:14 +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
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 f88dba216a Qt: QCustomplot fix warnings
Fix compile warnings due to incorrect conversions.

Change-Id: Ia24e9cb6ef5ed9ca1391dd005ed1eb95db1b0d30
Reviewed-on: https://code.wireshark.org/review/34553
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-09-19 08:08:27 +00:00
Alexis La Goutte ef500e800a Update to qcustomplot 2.0.1
Upgrade the internal version of QCustomPlot to 2.0.1

Change-Id: I1eb372d8e6a2f6c1bbdde4c74596785bf2d405c2
Reviewed-on: https://code.wireshark.org/review/17980
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-17 08:34:46 +00:00
Peter Wu 8563b94d56 Qt: update to QCustomPlot 1.3.2
QCustomPlot 1.3.1 includes a fix for a crash ("Fixed potential crash in
QCPGraph::pointDistance if getScatterPlotData returns empty list").
Full changelog: http://www.qcustomplot.com/release/1.3.2/changelog.txt

The new files are based on QCustomPlot-source.tar.gz (1.3.2) with
Alexis' typo and license header changes from v1.99.2rc0-479-gc411029a3c
("Update to QCustomPlot 1.3.0") applied. All successive Wireshark
patches up to v2.5.0rc0-854-g6f28f1a59e ("Fix MacOS build") were
applied. The Retina patches ("Fix QCustmPlot retina problems." and "QCP:
Fix retina label calculations.") gave conflicts due contextual changes
which I resolved by renaming newCachedLabel to cachedLabel (following
the change in upstream commit baaad24706187f5be0a68011c780b51c4de11558).

Bug: 14971
Change-Id: I5012cb5a867891b466cbf1898fe4c28cbd11ba20
Reviewed-on: https://code.wireshark.org/review/28732
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-17 09:05:06 +00:00
Jim Young 6f28f1a59e Fix MacOS build
Commit 8d13f14f95 introduced a
preprocessor buglet affecting MacOS builds.  Change #if to #ifdef.

Change-Id: I3d76c83428658abcf382e18066be0e24309ecbba
Reviewed-on: https://code.wireshark.org/review/23317
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
2017-08-31 06:29:25 +00:00
Gerald Combs 8d13f14f95 Qt: Temporarily disable DP scaling on non-macOS systems.
Enable device pixel scaling in QCustomPlot only on macOS. Blind attempt
at diagnosing / fixing bug 14012.

Change-Id: I95e38eaa072d69aef0fe1d642951603800c3a280
Ping-Bug: 14012
Reviewed-on: https://code.wireshark.org/review/23314
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-30 20:54:05 +00:00
Roland Knall ddfc1d37cc Qt: Move utils to separate utils directory
Following the move for widgets directory, moving utils
to the utils directory. Guidelines for this directory are:

 - Generic use but not a widget
 - Utility functionality used by many classes
 
 Note: additionally all includes affected by this move have been changed
 to absolute path includes, instead of relative ones.

Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b
Reviewed-on: https://code.wireshark.org/review/22602
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 10:11:55 +00:00