When restoring analog signal settings from a *.pvs file changes the div height, the vertical scale must be recalculated.
Otherwise, the signal is scaled as if the div height had not changed, until a UI event triggers recalculation.
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.
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.
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=33c5ac28f73aa35c5fc4bbcf69a5ae61c0b50989 introduced the line
pkg_check_modules(GLIBMM_2_4 glibmm-2.4>2.28.0)
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.
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.
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.
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.
How to reproduce:
$ cmake --build $OUT --target manual
$ xdg-open $OUT/manual/manual.html
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
<dominik@sliwa.io>.
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.
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
<dominik@sliwa.io>.
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++).
This amends commit f2f536aa7b 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.
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.
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.
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).
Previous CMakeLists.txt rules used to mix TAB and SPACE indentation.
Consistently use TAB instead. This amends commit 4da54b6be6 which
introduced the check for the atomics library.
[ no change in behaviour, see whitespace ignoring diff to verify ]
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 9e40e83daf (which introduced the lack of the
separator while it did not take effect yet) and 7d5a9c3e79 (which
made it take effect when items got added and rearranged).
Reported-By: Dominik Sliwa <dominik@sliwa.io>
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"
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.
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.
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 074da67ee2.
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 |