Commit Graph

1638 Commits

Author SHA1 Message Date
Martchus c6a5b40a1d Re-connect when event ID is decreasing 2023-04-15 22:25:12 +02:00
Martchus c07f9345b1 Improve wording of comment 2023-04-15 22:25:07 +02:00
Martchus 8c74b24045 Remove uneffective code when handling reply
Calling `handleAdditionalRequestCanceled();` when `handleAborting`
is true is useless because then also `m_abortingAllRequests` is true
and therefore `handleAdditionalRequestCanceled();` always returns
early doing nothing.
2023-04-15 22:02:43 +02:00
Martchus d510b34abb Update translations 2023-04-15 20:36:18 +02:00
Martchus d2bbbab4f2 Remove remark about default browser when built-in web view disabled
This is now misleading as it depends on the general web settings. The
presence of this new settings tab alone should make it clear what will
happen instead so the sentence can just be dropped.
2023-04-15 20:35:24 +02:00
Martchus fc8ab2e845 Improve coding style
Improve coding style, mainly in SynctingConnection, for better
consistency with more recently added code.
2023-04-15 20:28:51 +02:00
Martchus d3901cee37 Don't reset last event IDs when connecting again
When connecting again, no data is cleared. Since we now keep
track of event IDs and not just timestamps it makes sense to not
forget what the last event IDs were. To still run into the
"limit" case the flags for having events at all can be used
(which is also reset on just `connect()`).
2023-04-15 20:08:21 +02:00
Martchus 843f164df1 Avoid potentially losing events
I have observed that Syncthing Tray can get stuck thinking a remote device
still needs data. Likely the update got lost. The code contains certain
conditions in which folder completion events and requesting completion are
supressed. Those conditions are based on timestamps. That is not ideal as
the accuracy is only one second (so different timestamps might be
considered equal as they are rounded to be the same). Additionally, it
makes no sense to assume a timestamp upon receiving a response as the
information might be older than the time it was received.

This change avoids those conditions. It rather uses the event ID to
decide what event/reply is newer.

This change also uses quint64 instead of int for event IDs to avoid running
into an overflow (or rather conversion error) when deserializing the ID
which might be bigger than int. (Not sure how big the ID can become; this
is to be on the safe side.)
2023-04-15 16:18:23 +02:00
Martchus ecfb346344 Bump library version 2023-04-15 16:18:23 +02:00
Martchus cba2f1874b Bump patch version 2023-04-15 16:18:23 +02:00
Martchus 314d51ffac Update release date 2023-04-06 01:08:43 +02:00
Martchus e8e8d7ca33 Update translations 2023-04-06 01:05:44 +02:00
Martchus a5f1ffd439 Never check option for built-in web view when disabled
Even if configured in the settings, check the option to
use a browser tab as this will be used as fallback.
2023-04-06 01:03:13 +02:00
Martchus c08d6e54be Save general web view settings persistently also when built-in web view disabled 2023-04-06 00:58:58 +02:00
Martchus 4c808a098d Fix typo in German translation 2023-04-05 18:10:28 +02:00
Martchus 69ac6cb387 Update libsyncthing to v1.23.4 2023-04-05 18:04:21 +02:00
Martchus f2675687e3 Bump patch version 2023-04-05 18:02:41 +02:00
Martchus 4b77c313eb Fix compilation with Qt < 6.1.0 on Windows 2023-04-04 22:59:40 +02:00
Martchus 83225dbed6 Fix error when generating D-Bus properties interface header
Fixes the following error
```
qdbusxml2cpp: Got unknown type `a{sv}' processing '/build/static-compat-syncthingtray/src/syncthingtray/syncthingconnector/org.freedesktop.DBus.Properties.xml'
You should add <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="<type>"/> to the XML description for 'changed_properties'
```
by following the suggestion of that error. Not sure why this
error occurs only now. Maybe `qdbusxml2cpp` changed in Qt 6.5.0.
2023-04-04 21:55:00 +02:00
Martchus 395e32de2b Update release date 2023-04-04 21:06:59 +02:00
Martchus 1c9e9affe3 Format code in `InternalError::isRelevant()` according to current coding style 2023-04-04 17:14:16 +02:00
Martchus 4fb50526bd Suppress "connection refused" errors when stopping Syncthing ourselves
When stopping the Syncthing service ourselves we can apparently also
get "connection refused" and not just "remote host closed". So this
kind of error should be supressed as well.
2023-04-04 17:13:27 +02:00
Martchus 45d75ac7ae Update libsyncthing to v1.23.3 2023-04-04 10:38:53 +02:00
Martchus 0f6ea4f88e Track "SubState" of systemd service correctly
Due to short-circuing the previous code might not have taken a
changed "SubState" into account. This change should fix it and
therefore might fix
https://github.com/Martchus/syncthingtray/issues/179.
2023-04-03 19:19:45 +02:00
Martchus 76209e2922 Improve handling changed properties in `SyncthingService`
* Check directly whether changed properties contain a property
  instead of checking indirectly whether the returned QVariant
  is invalid.
* Avoid copying the QVariant.
* Effectively this should not change anything; the code is just
  more readable and possibly more efficient.
2023-04-03 19:16:52 +02:00
Martchus f524a18b83 Fix condition for triggering connection once service is back
Skipping the connection attempt if the timer interval is lower
anyways only makes sense if the timer is also active.
2023-04-03 18:47:50 +02:00
Martchus 7b9870aefd Update translations 2023-03-31 22:50:07 +02:00
Martchus 1d221120fe Apply clang-format 2023-03-31 22:46:48 +02:00
Martchus 3fd45accde Allow configuring custom command for launching Chromium-based browser 2023-03-31 22:46:25 +02:00
Martchus 2767c9484a Fix size of wizard's window icon when using Aero-style
Apparently `wizardStyle()` does not return `QWizard::AeroStyle` at this
point of construction, even if that style will be used.
2023-03-28 23:56:23 +02:00
Martchus 7c93c21356 Document `chromiumBasedBrowserBinaries()` 2023-03-28 22:43:59 +02:00
Martchus 033cd21d83 Improve lookup of Chromium-based browser binary
* Consider Edge and Chrome as well
* Read the binary path from the "Application Registration" under Windows
  (see https://learn.microsoft.com/en-us/windows/win32/shell/app-registration)
2023-03-28 22:32:03 +02:00
Martchus db657bb1aa Use QByteArrayLiteral for such literals 2023-03-28 17:20:59 +02:00
Martchus 55360b2563 Fix grammar in German translation of web view settings 2023-03-28 00:20:06 +02:00
Martchus 71a4f188eb Add window icon in error dialog of `openBrowserInAppMode()` 2023-03-28 00:05:03 +02:00
Martchus 57d826dfd5 Fix crashes in SyncthingProcess code with MSVC 2022 and Qt 6.5.0
Not sure why `QString::toStdWString()` doesn't work with this compiler and
the official Qt 6.5.0 build. However, instantiating an `std::wstring`
manually works so let's just use this as a workaround.

Note that with GCC/mingw-w64 and Qt 6.4.3 the `QString::toStdWString()`
function works just fine.
2023-03-28 00:02:35 +02:00
Martchus 58b8a4e540 Allow showing Syncthing UI in Chromium-based browser in "app mode"
See https://github.com/Martchus/syncthingtray/issues/178
2023-03-27 20:28:52 +02:00
Martchus a95fd02436 Bump minor version due to theming-related changes 2023-03-26 21:34:17 +02:00
Martchus 9566623651 Apply Qt settings during runtime
It is no longer required to restart the application to change settings like
the widget style and palette.
2023-03-26 21:32:53 +02:00
Martchus 5a45a46450 Make `addPlasmoidSpecificNote()` static 2023-03-26 21:08:42 +02:00
Martchus 8ce14623fc Fix typo in README.md 2023-03-23 23:52:52 +01:00
Martchus e71a928ae2 Avoid unusable wizard when dark mode is enabled on Windows 2023-03-23 22:59:25 +01:00
Martchus 70e94bcd3c Re-evaluate the default icon theme when the color palette changes
So far the Plasmoid is not covered. It would likely not be very useful
anyways because under GNU/Linux the default icon theme can be determined
from the system and thus the "fallback" default this change is about is not
effective.
2023-03-23 22:43:59 +01:00
Martchus 3a129480b0 Update note about dark mode for recent changes
The best default icon theme is now (as of qtutilities
commit 647ad121a) selected automatically.
2023-03-23 20:54:45 +01:00
Martchus 94e202ead0 Adapt dark mode info in README to Qt 6.5 2023-03-13 21:03:24 +01:00
Martchus 0ec3a6cdfa Improve notes regarding symlink handling on Windows
* Mention developer mode
* Use single `git config` command before cloning
2023-03-13 20:04:51 +01:00
Martchus 7b042f32fd Bump patch version 2023-03-13 20:04:50 +01:00
Martchus 7a5bd78eda Update libsyncthing to v1.23.2 2023-03-07 20:26:48 +01:00
Martchus 6a563b822d Update release date 2023-03-07 20:06:54 +01:00
Martchus 222f0e97ba Add back config for symlinks as still used by subdirs 2023-03-05 22:27:20 +01:00