Commit Graph

2523 Commits

Author SHA1 Message Date
Soeren Apel 32ca796643 CMakeLists.txt: Remove -Wunqualified-std-cast-call 2024-08-31 20:51:16 +02:00
Soeren Apel f48be9a602 Fix warnings coming up with clang 17
Also with -Wunqualified-std-cast-call that's enabled on github's macos-14-arm64 runner.
2024-08-30 21:27:30 +02:00
Soeren Apel 3cb3859dfc build.yml: Synchronize with github-cli's build.yml 2024-08-28 22:47:16 +02:00
Soeren Apel f1fa4a6e15 build.yml: Add yaml file 2024-08-13 22:34:10 +02:00
Soeren Apel d00efc65ef Session: Fix issue #67 by improving error handling 2024-03-14 21:59:45 +01:00
Ramon Felder 9b8b734272 AnalogSignal: Recalculate scale when restoring div height
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.
2024-01-26 23:45:20 +01:00
hasecilu 82c6d8f06a Add new translators to "About" section
- A typo on the code prevented to add previous Spanish translator.
2024-01-26 23:40:26 +01:00
hasecilu 000a6cedbb Update Spanish translation to latest changes
Full review on the used terms to improve the consistency.

- This patch includes a lot of grammatical improvements.
- Finish the translation
2024-01-26 23:39:46 +01:00
Soeren Apel ca0a72a2d3 trace: Whitespace fix 2024-01-26 22:36:04 +01:00
Daniel Trnka 67784be7a0 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.
2024-01-26 22:35:00 +01:00
Soeren Apel 105ecffd86 Session: Record acquisition start time and use it when saving 2023-10-21 22:28:10 +02:00
Soeren Apel e3faae50d5 Trace view: Add setting to keep ruler item selected 2023-10-19 01:19:55 +02:00
Soeren Apel 5f0ea35639 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.
2023-10-19 01:00:31 +02:00
Soeren Apel 499f68de03 TimeMarker: Automatically deselect item when popup closes
If this is not done, the item remains selected and the user has to manually deselect it, which is bothersome.
2023-10-19 01:00:27 +02:00
Soeren Apel ef6cbaa211 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.
2023-10-19 01:00:12 +02:00
ZtyPro 3d396c8e79 Add Chinese translate files 2023-09-27 11:55:54 +02:00
Soeren Apel 1c2b253935 Manual: Make timestamp less ambiguous so people don't think it's old 2023-09-17 22:21:56 +02:00
Soeren Apel a9bead7252 Fix CMake CXX_STANDARD handling, part 2
VERSION_GREATER_EQUAL was introduced with cmake 3.7, so we have to use the older, more verbose expression.

https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal
2023-09-08 21:27:53 +02:00
Soeren Apel cb40d40c6c Fix CMake CXX_STANDARD handling
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.
2023-09-08 21:15:11 +02:00
Soeren Apel e0a90b4c5d Fix glibmm dependency check
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.
2023-09-08 20:37:13 +02:00
Vesa-Pekka Palmu ae8dd8753e 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.
2023-05-17 14:53:14 +02:00
Gerhard Sittig 3903edbd71 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.
2023-04-22 19:31:40 +02:00
Gerhard Sittig cfcda2e615 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.

How to reproduce:

  $ cmake --build $OUT --target manual
  $ xdg-open $OUT/manual/manual.html
2023-04-22 19:31:07 +02:00
Frank Stettner 62c0968530 DecodeTrace: Change code path for obsolete Qt constants (Qt >= 5.12)
This unbreaks macOS 11 builds with qt@5 from homebrew.
This ammends commit 1ed73eb
2023-04-13 19:48:44 +02:00
Soeren Apel 292b6ebc37 StoreSession: Use Glib::DateTime 2023-04-09 22:27:42 +02:00
Soeren Apel b30e50f983 StoreSession: Also send SR_DF_HEADER packet
Some output modules rely on it, e.g. CSV
2023-04-08 23:17:39 +02:00
Vesa-Pekka Palmu 136995b831 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
<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.
2022-11-30 18:32:36 +01:00
Vesa-Pekka Palmu 1ed73ebd60 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
<dominik@sliwa.io>.
2022-11-30 18:32:36 +01:00
Gerhard Sittig fa8d0fcb4c 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++).
2022-11-30 09:11:05 +01:00
Gerhard Sittig 0f76477f61 manual: fix a clipboard error in PDF creation build rules
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.
2022-11-28 10:12:40 +01:00
Vesa-Pekka Palmu c303f96d91 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.
2022-11-21 17:04:55 +01:00
Vesa-Pekka Palmu 33c5ac28f7 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.
2022-11-21 17:02:05 +01:00
Gerhard Sittig 723ac3f8c5 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).
2022-11-21 16:58:01 +01:00
Vesa-Pekka Palmu d56edfc6b1 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 4da54b6be6 which
introduced the check for the atomics library.

[ no change in behaviour, see whitespace ignoring diff to verify ]
2022-11-21 14:28:29 +01:00
Gerhard Sittig 3919e81ffa 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 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>
2022-11-21 14:21:41 +01:00
Gerhard Sittig a7988e20ee 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.
2022-11-21 13:36:06 +01:00
Soeren Apel 18a155ce64 Man: Document shift+mouse wheel modifier 2022-10-08 21:56:54 +02:00
Yukari-Shoji 6daf265cd0 Update translations.qrc 2022-10-08 21:43:46 +02:00
Yukari Shoji d32f4fda8e Add Japanese translation file 2022-10-08 21:43:43 +02:00
Ramon Felder d570226007 AnalogSignal: Fix storing of autoranging setting 2022-10-08 21:40:03 +02:00
hasecilu 56e547f7af Spanish translation updated
Signed-off-by: hasecilu <dev.n47os@aleeas.com>
2022-10-08 21:37:56 +02:00
Self Not Found db843aa8f7 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"
2022-10-08 21:31:22 +02:00
Gerhard Sittig fd6005aadf 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.
2022-10-08 20:59:26 +02:00
Łukasz Stelmach f375439ffd 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.
2022-10-08 20:48:02 +02:00
Gerhard Sittig 16d72fc1ac 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 074da67ee2.
2022-10-02 16:07:10 +02:00
Paul Kasemir 2802b9ec97 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 |
2022-09-27 00:28:31 +02:00
Soeren Apel eb31c23847 Fix #1663 by handling the case where annotations aren't assigned a row 2022-09-18 22:28:51 +02:00
Soeren Apel 9e5ccb72d0 Add missing version check 2022-09-18 13:33:57 +02:00
Soeren Apel ffad6cd685 Fix depreciation warnings caused by newer Qt versions 2022-09-13 22:16:31 +02:00
Soeren Apel 153225bc33 Trace View: Allow context menu to show basic options in empty area 2022-07-30 22:58:23 +02:00