Daniel Trnka [Tue, 2 Jan 2024 21:13:54 +0000 (22:13 +0100)]
trace: fix crash on empty channel name in popup form
sr_dev_channel_name_set returns SR_ERR_ARG when a channel name is
empty and pulseview crashes once user deletes all characters from
a channel name in trace popup form.
This patch forbids to set empty channel name and keeps last non-empty
name provided by user.
Soeren Apel [Tue, 17 Oct 2023 23:58:33 +0000 (01:58 +0200)]
Fix warning and remove cursor pair selected state
Fixes warning "QObject::connect: Cannot connect (nullptr)::closed() to pv::views::trace::Ruler::on_popup_closed()" and
removes showing the selected state for the cursor pair as it doesn't serve a purpose.
Soeren Apel [Tue, 17 Oct 2023 22:11:53 +0000 (00:11 +0200)]
Flags: Always save raw text, not display text in session setup
Before, get_text() would return the delta time to a selected flag, so if one was selected as the session was saved, this delta time would be saved as the name.
https://sigrok.org/gitweb/?p=pulseview.git;a=commit;f=CMakeLists.txt;h=fa8d0fcb4cff4f19943fe3ff152dc1428b400b01 introduced a CXX_STANDARD value of 17 while still only requiring cmake 2.8.12.
However, https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#cxx-standard shows that a value of 17 was introduced with cmake 3.8, leading to
"CXX_STANDARD is set to invalid value '17'" when trying to build with cmake < 3.8.
Hence, for versions below 3.8, we only check for up to 14.
but https://cmake.org/cmake/help/v3.0/module/FindPkgConfig.html states
A <MODULE> parameter can have the following formats:
{MODNAME} ... matches any version
{MODNAME}>={VERSION} ... at least version <VERSION> is required
{MODNAME}={VERSION} ... exactly version <VERSION> is required
{MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
Hence, ">" is an invalid atom and always makes the check fail. On systems without glibmm-2.68, this leads to glibmm not being found and the build aborting.
Vesa-Pekka Palmu [Thu, 24 Nov 2022 16:58:38 +0000 (18:58 +0200)]
MainWindow: Move show_session_error to signals
Before various capture error handlers called Mainwindow::show_session_error()
directly, and thus outside of the main UI thread. Qt widgets aren't thread-
safe and thus this resulted in crashes or freezes at least on OSX.
Gerhard Sittig [Sat, 22 Apr 2023 07:28:12 +0000 (09:28 +0200)]
cmake: only optionally modify in-source .ts files (Qt lupdate)
The creation of .qm output files from .ts input data undoubtedly needs
to be an unconditional part of the build process. The modification of
.ts source files in contrast needs to remain an intentional activity
during development. The mere act of compiling sources to binaries shall
never modify the source tree. Move the lupdate(1) invocation out of the
default build process, while lrelease(1) remains in place.
Ideally we could have a "make ts-update" target for developers to invoke
as needed. But that'd be more involved since the qt5_create_translation()
cmake routine is involved, which needs to be passed variables content
that is only available at configure time. A future implementation could
investigate the add_custom_target() approach. This commit introduces the
ENABLE_TS_UPDATE cmake option to quickly address the issue.
How to reproduce:
$ cd $SRC
$ cmake --build $OUT
$ git status -s
$ cmake -DENABLE_TS_UPDATE=ON $OUT
$ cmake --build $OUT
$ git status -s
This commit also happens to bring build steps in closer promixity, while
making development iterations stand out more perceivably.
Gerhard Sittig [Sat, 22 Apr 2023 07:20:21 +0000 (09:20 +0200)]
manual: symlink manual/images/ subdir for out-of-source builds
Execution of "make manual" created HTML output, but document inspection
suffered from missing screenshots. Symlink the images/ subdirectory so
that source file content is re-used in output hierarchies.
This has gone unnoticed because "make install" references source files,
and the manual author appears to not use out of source builds. Only
out of source builds and only HTML output inspection before installation
were affected. Installed manuals were not affected.
Vesa-Pekka Palmu [Sun, 20 Nov 2022 18:33:14 +0000 (20:33 +0200)]
CMakeLists.txt: adjust cmake build rules for Qt6 support
Check for the availability of Qt5 as well as Qt6. Prefer Qt5 for
backwards compatibility, but accept when only Qt6 is available.
This unbreaks Mac OSX 12 builds with homebrew.
This change is based on work that was submitted by Dominik Sliwa
<redacted>.
It is assumed that failed tests for timestamps to text conversion
(the format_time_minutes() routine) and Qt widgets not being thread
safe are issues that do reproduce more often on the Mac platform
but are independent from Qt6 support. These issues will be dealt with
separately.
Vesa-Pekka Palmu [Sun, 20 Nov 2022 18:33:14 +0000 (20:33 +0200)]
pv: adjust application source code for Qt6 support
Prepare application source code (C++ programming language files) for Qt6
compatibility. Implement alternative code paths where the API has changed
compared to Qt5. This unbreaks Mac OSX 12 builds with homebrew.
This change is based on work that was submitted by Dominik Sliwa
<redacted>.
Gerhard Sittig [Thu, 24 Nov 2022 13:48:00 +0000 (14:48 +0100)]
CMakeLists.txt: always use highest available C++17/C++14/C++11 standard
Check for the availability of the C++17, C++14, and C++11 language
standards. Prefer the highest available to build any of the feature
tests or applications. Factor out common conditions into a central spot
in the CMake build rules. Rename variables to avoid special chars in
their name.
Setup both the CMAKE_CXX_STANDARD cmake variable which internally is
used transparently, as well explicitly pass the -std= compile flag in
build instructions for feature checks and application code. It's what
the smuview build does, should also work for pulseview, and is assumed
to not harm either in case it's redundant.
This unbreaks operation in most generic ways on platforms like MacOS 12
(system library), and for external libraries of differing degrees of
aggressivness (boost, glibmm, sig++).
Gerhard Sittig [Mon, 28 Nov 2022 09:12:40 +0000 (10:12 +0100)]
manual: fix a clipboard error in PDF creation build rules
This amends commit f2f536aa7be2 which introduced manual build rules and
duplicated HTML in two locations. One of them is PDF creation. Fix it.
This was spotted by smuview maintenance.
Vesa-Pekka Palmu [Sun, 20 Nov 2022 18:23:40 +0000 (20:23 +0200)]
CMakeLists.txt: Enable use of C++17 on Apple systems
The stdlib on OSX 12 Monteray requires C++17 to compile. This change
tests for and conditionally enables C++17 support on Apple devices.
Other platforms remain unaffected.
Vesa-Pekka Palmu [Sun, 20 Nov 2022 18:20:09 +0000 (20:20 +0200)]
CMakeLists.txt: Detect glibmm-2.68 in addition to glibmm-2.4
On OS X with homebrew only glibmm-2.68 series is available. As far
as I can tell there are no breaking changes for PulseView on the
glibmm-2.68 ABI change.
This change still prefers glibmm-2.4 if found, and uses 2.4 if both
2.4 and 2.68 are available.
Gerhard Sittig [Sun, 6 May 2018 09:29:19 +0000 (11:29 +0200)]
CMakeLists.txt: move includes to the top, earlier pkg-config lookup
Move some of the common cmake includes to a location near the top of the
file. Lookup the pkg-config(1) utility before the construction of the
list of dependendencies.
Remaining subsequent includes are strictly conditional (backtrace), or
belong to different groups than source compilation (VCS revision, CPack).
Vesa-Pekka Palmu [Sun, 20 Nov 2022 18:45:09 +0000 (20:45 +0200)]
CMakeLists.txt: consistent whitespace in atomics check
Previous CMakeLists.txt rules used to mix TAB and SPACE indentation.
Consistently use TAB instead. This amends commit 4da54b6be6a1 which
introduced the check for the atomics library.
[ no change in behaviour, see whitespace ignoring diff to verify ]
Gerhard Sittig [Mon, 21 Nov 2022 13:20:53 +0000 (14:20 +0100)]
Signal: Add missing item separator in channel names list
The SCL item in the ChannelNames[] table lacked the separator, which
made it "run into" the next item (preprocessor string concatenation).
Add the missing separator.
This amends commits 9e40e83daf6a (which introduced the lack of the
separator while it did not take effect yet) and 7d5a9c3e79cb (which
made it take effect when items got added and rearranged).
Gerhard Sittig [Sat, 29 Oct 2022 19:37:21 +0000 (21:37 +0200)]
viewport: event->position() isn't Qt 5.12, tweak version check
According to https://doc.qt.io/qt-5/qwheelevent.html#position the
QWheelEvent::position() method was introduced in Qt 5.14. Adjust
the Qt version check to unbreak builds with Qt 5.12.
Self Not Found [Wed, 14 Sep 2022 13:44:04 +0000 (21:44 +0800)]
Settings: Fix the default item in the language combobox
If the language is not set, the default language will be English, but the combobox will show "German"(The first item in language combobox)
This is because the current_language will set to "" if the language is not set, and it doesn't match the default language "en"
Gerhard Sittig [Mon, 3 Oct 2022 19:10:40 +0000 (21:10 +0200)]
DecodeSignal: Process late annotations which are sent upon EOF
When protocol decoders learn about the end of the input data, they may
emit more annotations before their operation terminates or gets reset
and re-fed. Do process these late annotations in the application, too.
Without this change, the last annotations are not seen. See bug #292
for an example.
Łukasz Stelmach [Mon, 7 Dec 2020 17:09:43 +0000 (18:09 +0100)]
Viewport: scroll horizontally with the vertical wheel and the shift key
Some software (notably Gimp and Inkscape) allows horizontal scrolling
with the vertical wheel when the shift key is pressed. Implement this
behaviour for easier navigation with single wheel mice.
Gerhard Sittig [Sun, 2 Oct 2022 14:07:10 +0000 (16:07 +0200)]
manual: add cmake project() directive for standalone operation
The cmake rules in the manual/ subdirectory are designed to work both in
the context of the application build, as well as for exclusive creation
of the manual.
Add a project() directive in the manual/ cmake rules. Its absence was
not fatal but resulted in warnings. This amends commit 074da67ee25a.
Paul Kasemir [Tue, 30 Aug 2022 18:32:49 +0000 (12:32 -0600)]
Segment: Include <memory> so we don't get error at compile time
Example build failure:
In file included from /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.cpp:21:
/home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:130:14: error: 'shared_ptr' in namespace 'std' does not name a template type
130 | typedef std::shared_ptr<pv::data::Segment> SharedPtrToSegment;
| ^~~~~~~~~~
/home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:32:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
31 | #include <QObject>
+++ |+#include <memory>
32 |
Gerhard Sittig [Tue, 22 Feb 2022 00:34:25 +0000 (01:34 +0100)]
Device: Display "continuous" checkbox when settable in the driver.
This has gone unnoticed because the majority of acquisition devices
either have local memory or require streaming. Only few support both
approaches and users can select the most appropriate approach for
their respective use case. Observed with Kingst LA devices.
Gerhard Sittig [Sun, 26 Dec 2021 06:54:36 +0000 (07:54 +0100)]
cmake: check for optional libsigrokdecode features (send EOF)
Implement a feature check for the srd_session_send_eof() routine which
depends on the libsigrokdecode version. This test implementation is a
little more redundant than necessary, check_symbol_exists() would be
preferred instead but would not work in my local setup.
Ralf [Sun, 10 Jan 2021 09:07:14 +0000 (10:07 +0100)]
Save dialog: Fix cancellation
Without the fix cancellation of save data does not work
How to reproduce:
1. Start PV with demo device and generate sufficient data, e.g. demo device 1GSa/s, 10MSa
2. Save data (should take at least 30s) and try to cancel saving
3. PV continues saving data and dialog reappears after next progress update
Stefan Brüns [Wed, 28 Apr 2021 00:14:47 +0000 (02:14 +0200)]
Fix broken build due to C++ template behind C linkage
glib/gatomic.h since 2.68 includes type_traits, which causes a compilation
error:
In file included from /usr/include/glib-2.0/glib/gatomic.h:31,
from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/libsigrokdecode/libsigrokdecode.h:25,
from /home/abuild/rpmbuild/BUILD/pulseview-0.4.2/pv/data/decode/annotation.cpp:21:
/usr/include/c++/10/type_traits:2308:3: error: template with C linkage
2308 | template<typename _CTp, typename _Rp>
As libsigrokdecode.h declares extern C linkage itself where necessary,
remove it from pulseviews include statements from the last two occasions.
Soeren Apel [Thu, 7 Jan 2021 09:03:23 +0000 (10:03 +0100)]
Don't set unicode to true
NSIS 2.x doesn't know the unicode switch and chokes, 3.07 defaults
it to true as well.
As there doesn't seem to be a graceful way to handle 2.x versions,
we have to remove the unicode switch and the warning in 3.x (< 3.7)
installers shall be ignored.
1) Fixed use of raw pointers to shared_ptr-managed instances
2) Fixed bug due to newly-introduced shared_from_this
3) More nullptr checks
4) Add muxer thread interrupting