Uwe Hermann [Thu, 14 Mar 2019 20:22:47 +0000 (21:22 +0100)]
DecoderSelector: Fix catching polymorphic types by value.
[...]/pv/subwindows/decoder_selector/item.cpp: In member function ‘std::shared_ptr<pv::subwindows::decoder_selector::DecoderCollectionItem> pv::subwindows::decoder_selector::DecoderCollectionItem::subItem(int) const’:
[...]/pv/subwindows/decoder_selector/item.cpp:44:11: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
} catch (out_of_range) {
^~~~~~~~~~~~
[...]/pv/subwindows/decoder_selector/item.cpp: In member function ‘QVariant pv::subwindows::decoder_selector::DecoderCollectionItem::data(int) const’:
[...]/pv/subwindows/decoder_selector/item.cpp:88:11: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
} catch (out_of_range) {
^~~~~~~~~~~~
Soeren Apel [Wed, 20 Feb 2019 08:40:42 +0000 (09:40 +0100)]
Fix #1338 ("show time zero at the trigger" option)
Before, successive runs were shifting the zero point for no valid reason
and markers created on the ruler/trace used the wrong time and thus
showed up at the wrong location.
Gerhard Sittig [Thu, 10 Jan 2019 19:30:24 +0000 (20:30 +0100)]
CMakeLists.txt: create NSIS file in binary directory not source
The sigrok-util scripts (mingw and msys2) expect the pulseview_cross.nsi
file in the build directory, and it's good tradition to not write into
the source directory during build. Adjust the configure_file() call.
We must not include decodesignal.hpp if we're not using libsigrokdecode
or the build will fail due to libsigrokdecode.hpp not being present in
the system.
libsigrokcxx is the most important dependency. A QUIET search means we
can miss important information, such as a version mismatch, and the
"libsigrokcxx not found" message is not at all helpful in determining
the cause of the problem.
Gerhard Sittig [Sun, 28 Oct 2018 21:15:49 +0000 (22:15 +0100)]
manual: allow manual conversion without source builds
Add a cmake_minimum_required() directive to the manual/ subdir's CMake
rules, such that the documentation can get built without involving the
application and its build dependencies.
Gerhard Sittig [Thu, 25 Oct 2018 17:26:27 +0000 (19:26 +0200)]
manual: expand the protocol decoder troubleshooting subsection
Expand the discussion that timing information is not required or
optional to some decoders, but essential to others (because of the very
protocol that gets interpreted). Mention that some oversampling is
typically required. Don't suggest that PD exceptions must be bugs,
incomplete configuration may be even more typical.
Separate the "you can ..." introduction from the first check list item,
to increase visibility of the entry. Existing text was not re-flown, to
reduce the diff size.
Gerhard Sittig [Sun, 14 Oct 2018 15:06:16 +0000 (17:06 +0200)]
manual: also install images/*.png with the HTML output
Extend the CMake rules for the manual. Do install the images/ subdir but
omit the *.xcf files. Prepare the CSS file although this seems to be not
strictly necessary (gets inlined, but we are prepared if it's external).
Only install these additional files when the asciidoctor(1) tool is
available, and thus the .html file can get generated (to not install
some questionable combination of a .pdf and unrelated .png files, or to
not install the resources when none of the manual files got created).
This approach was tested with the following command sequence:
$ make manual
$ make install
$ xdg-open ~/share/doc/pulseview/*.html
Gerhard Sittig [Sun, 14 Oct 2018 14:05:04 +0000 (16:05 +0200)]
manual: accept absence of the asciidoctor-pdf exectuable
The asciidoctor(1) executable is considered mandatory when building the
Pulseview manual. The asciidoctor-pdf(1) executable is not universally
available (is missing in Debian), accept its absence, avoid execution
failure in that case.
This implementation replaces the actual .txt to .pdf conversion with a
mere echo(1) message, which may go unnoticed in verbose build output.
"make --no-print-directories manual" may be required to remain aware.
Gerhard Sittig [Sun, 14 Oct 2018 13:30:46 +0000 (15:30 +0200)]
manual: introduce CMake logic for asciidoctor execution
Introduce new "manual", "manual-html" and "manual-pdf" make(1) targets
(the former depending on the latter). None of these targets are part of
"make all" by design, users decide whether to convert the manual text.
Execution will fail (fatally) in the absence of dependencies or tools.
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==