Soeren Apel [Sun, 21 Oct 2018 19:22:01 +0000 (21:22 +0200)]
Fix clazy warnings regarding range-for references
The warnings that are fixed are of this type:
warning: Missing reference in range-for with non trivial type (std::__cxx11::string) [-Wclazy-range-loop]
Jon Burgess [Sun, 14 Oct 2018 22:52:24 +0000 (23:52 +0100)]
Fix memory leak in DecoderMenu
==214004== 1,536 (16 direct, 1,520 indirect) bytes in 1 blocks are definitely lost in loss record 6,288 of 6,442
==214004== at 0x4C2EE0B: malloc (vg_replace_malloc.c:299)
==214004== by 0x67D8435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214004== by 0x67F0056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214004== by 0x67F14FA: g_slist_copy_deep (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214004== by 0x5584FC: pv::widgets::DecoderMenu::DecoderMenu(QWidget*, bool) (decodermenu.cpp:33)
==214004==
Soeren Apel [Wed, 3 Oct 2018 19:52:00 +0000 (21:52 +0200)]
Fix #1292/1294 by snapping to any edge when not hovering over a signal
1292: TimeItem instances now snap to any edge when not hovering over a
signal, including the ruler itself. Hence, there is always an area
where one can hover without selecting a signal, even if the entire
view is full of signals.
Cursors also show the desired behavior: the left edge snaps while
the right does not. Hence, the width is kept constant. If the user
wants to snap the right edge to a signal edge, this can be achieved
by dragging the right edge separately.
1294: TimeItem instances now snap to any edge - before, they were snapping
only to edges when hovering over a signal.
Gerhard Sittig [Tue, 18 Sep 2018 16:34:42 +0000 (18:34 +0200)]
Logging: avoid "cb was NULL" warning message during logging shutdown
Commit 4b9234088f56 introduced the fetch and restore of the libraries'
default log routines in addition to the registration of a Pulseview
application's log routine. Some code paths in main() could result in
unexpected "cb was NULL" messages on stderr, when logging::init() did
not execute but the destructor tried to restore a handler which was not
fetched before. Silence the error message.
Gerhard Sittig [Mon, 20 Aug 2018 16:57:25 +0000 (18:57 +0200)]
Android: implement chained log callbacks (buffer and terminal output)
Query the libraries' default log handlers before registering the
application's own handler. Queue log messages in the application's
internal buffer _and_ hand them to the default handlers which send
the text to stdout as well.
Gerhard Sittig [Wed, 15 Aug 2018 21:48:52 +0000 (23:48 +0200)]
Logging: obsolete -s, log to internal buffer as well as stdout
Query the sr and srd libraries' current log routines before registering
PV's own log callback which queues messages in an internal buffer. This
allows duplication of messages to the internal buffer _and_ stdout, and
thus obsoletes the -s option.
"sr: hwdriver: Option 'external_clock' not available for this device instance."
Avoid this message by checking if the EXTERNAL_CLOCK property is actually
supplied by the driver.
The regression was that when clicking+dragging on a trace in the
trace view area, the individual trace was moving, not the view area
itself. This was unintended.
Soeren Apel [Mon, 6 Aug 2018 19:25:59 +0000 (21:25 +0200)]
Implement annotation export for all rows
Needed parts are:
1) Annotations must have a reference to the row they belong to
2) DecodeSignal must offer a method to return annotations for all rows
3) Annotations must become comparable to allow for sorting
4) DecodeTrace must handle the different annotation export cases
Fix #1204 by making sure the lazy event handler is fired
The QTimer reference says about QTimer::start():
> Starts or restarts the timer with the timeout specified in interval.
> If the timer is already running, it will be stopped and restarted.
> If singleShot is true, the timer will be activated only once.
This suggests that the timer is reset when start() is called even
when it is in single shot mode. However, this is actually not the case
and start() doesn't appear to be doing anything if it has already
been started. While this works in most cases, it causes issues when
the timer is supposed to be reset and timeout at the specified time
since view items are still in flux.
Gerhard Sittig [Sat, 18 Aug 2018 15:47:03 +0000 (17:47 +0200)]
about: move Pulseview version information into the text box
Move the application's version information out of the caption and into
the text box. So that it resides with the libraries' version information,
and is accessible via clipboard for reports.
This addresses part of bug #1213, and fixes all of #1264.
Uwe Hermann [Sun, 19 Aug 2018 15:36:04 +0000 (17:36 +0200)]
CMakeLists.txt: Set DISABLE_WERROR to TRUE by default.
There's various compile problems that can result from building with
-Werror on by default, which are outside of our control (e.g. that need
to be fixed in external libraries), for example #1144 or 1145.
Uwe Hermann [Tue, 24 Jul 2018 20:07:25 +0000 (22:07 +0200)]
HardwareDevice: Only show non-empty device name components.
Fields such as vendor, version, serial number etc. are not always
provided by drivers. Avoid printing them, since it causes stray
whitespace to be added to the displayed strings.
Brian Starkey [Sat, 21 Jul 2018 17:08:45 +0000 (18:08 +0100)]
Fix the build - catch exceptions by reference
Fix the following build errors seen with gcc 8.1.1:
error: catching polymorphic type ‘class std::out_of_range’ by value
error: catching polymorphic type ‘class boost::archive::archive_exception’ by value
Make sure PD row colors remain constant by adding a row index
Without this change, PD row colors depend on the visible rows,
not a constant ID. This means that rows that collapse change the
colors of all rows coming after them.