Commit Graph

442 Commits

Author SHA1 Message Date
Martchus 9ce76a0f6a Update translations 2023-02-07 18:16:33 +01:00
Martchus d7c5a66cc8 Cover `folder/pullerrors` as well in option for deprecated routes 2023-02-03 14:55:48 +01:00
Martchus 6e51839fba Update translations 2023-02-03 12:44:45 +01:00
Martchus 8d7cfbe0ad Add functions to request overriding/reverting folders 2023-02-03 12:40:12 +01:00
Martchus 46c2333230 Add option to use new config route instead of deprecated one
For the sake of compatibility with older Syncthing versions, this option is
not enabled by default.
2023-02-03 12:21:18 +01:00
Martchus c7f6da6a17 Update translations 2023-01-30 16:29:29 +01:00
Martchus 103b34c64a Apply clang-format 2023-01-30 16:29:07 +01:00
Martchus e67f40ca18 Enable verbose logging for tests and dump Syncthing config at the end
This is not very verbose but hopefully it'll help debugging test failures
more easily.
2023-01-30 15:19:08 +01:00
Martchus edceb2fddb Avoid repetition of if-condition when aborting requests 2023-01-30 15:13:00 +01:00
Martchus f444574cb8 Require at least Boost 1.75
Apparently 1.66 is broken as it does not invoke the `on_exit` handler when
the process finishes. When switching from 1.66 to 1.75 on Leap 15.4 the
problem is not reproducible. Maybe this was already fixed in an earlier
version than 1.75 but 1.75 was the next version available on Leap 15.4 to
test with.
2023-01-28 20:19:28 +01:00
Martchus 818b40801a Allow referencing directories by their labels in syncthingctl 2023-01-28 17:17:34 +01:00
Martchus 2c892d583f Fix possibly broken event handling in `SyncthingProcess`
The lock must not only be tried to be acquired. Otherwise we'd might skip
e.g. the exit handler when one of the other handlers still owns the lock.
2023-01-12 22:57:11 +01:00
Martchus bae5779cb3 Fix typo in doc string 2023-01-12 22:53:36 +01:00
Martchus a541b9ba35 Fix crash in launcher when executable is empty or not found 2023-01-12 22:53:18 +01:00
Martchus 268164748f Improve error message when the executable path in the launcher is empty
* Show error "executable path is empty" instead of "Unknown error"
2023-01-12 22:39:47 +01:00
Martchus 9da5392c35 Fix warnings about unqualified slot arguments 2023-01-09 15:34:51 +01:00
Martchus 256e90a0cb Avoid warning about unqualified std cast 2022-11-04 16:51:01 +01:00
Martchus 0ab21657c4 Mock locating config file for wizard tests to be independent of Qt's behavior
Maybe overriding `HOME` is not sufficient for faking a different home dir
to be picked up by `QStandardPaths`. So this change makes
`LIB_SYNCTHING_CONNECTOR_SYNCTHING_CONFIG_DIR` a hard override and uses it
in tests to fake a different path independently from the behavior of
`QStandardPaths`.
2022-11-03 21:35:03 +01:00
Martchus 2b5c8b6059 Use `qEnvironmentVariable` via compat header from qtutilities 2022-10-29 21:39:43 +02:00
Martchus 48d78c1758 Pass context when connecting signals for tests 2022-10-29 20:32:54 +02:00
Martchus 8e484f246e Allow overriding Syncthing config dir via environment variable 2022-10-23 15:05:47 +02:00
Martchus 67c4e806bd Fix detection of disabled Syncthing systemd unit in wizard
`isUnitAvailable()` would return false for disabled units (that could be
enabled) so `canEnableOrStart()` must return true even if only
`isDisabled()` returns true.
2022-10-22 21:31:03 +02:00
Martchus 6594a667af Update translations 2022-10-22 12:40:57 +02:00
Martchus 77cea5aead Tie suppressing notifications to "reconnect integrations" of launcher/service
So suppressing notifications by either the launcher status or service
status can be enabled/disabled together with the re-connect tweaking. This
makes more sense than having it unconditionally enabled and makes the
presence of the feature (and when it is effective) also more visible to
users.
2022-10-22 12:32:24 +02:00
Martchus 525b2c2f94 Improve tracking of whether Syncthing has been stopped manually
* Don't consider the proccess manually stopped by default; otherwise that's
  considered to be the case even though the launcher isn't used at all
* Unset the service being manually stopped only when there's an actual
  state transition to running; otherwise we'd immediately unset the flag
  after manually stopping the service
2022-10-22 12:06:18 +02:00
Martchus 2abb468d93 Fix typo 2022-10-02 20:34:40 +02:00
Martchus 4f58b2cb7e Fix determining whether GUI address is local
The port must be stripped from the address before passing it to
`isLocal()` which only expects a hostname.
2022-09-25 22:40:37 +02:00
Martchus 3320f712db Fix condition when making Syncthing URL
TLS is preferred when the address is *not* local.
2022-09-25 22:13:44 +02:00
Martchus 6e6fbf757b Fix buffering further output in `SyncthingProcess` without event loop
When the calling code does not return to the event loop (like the CLI test)
we need to run the event loop internally to make sure `bufferOutput()` is
called as of ecd730fd49.
2022-09-18 19:59:46 +02:00
Martchus ecd730fd49 Avoid crash when invoking short-lived process via `SyncthingProcess`
At least when using Qt 6 I could reproduce crashes very often when invoking
`syncthing -version` as part of the wizard's setup detection (inside
a `QIODevice::readAll()` call).

I suppose the problem is that the callback `bufferOutput()` is already
invoked  on another thread and emitting the next `readyRead()` signal while
Qt is still handling the previous `readData()` call. Continuing reading
from the pipe only after `readData()` returns should fix it. At least it
does not crash anymore with that change in the wizard's setup detection.
2022-09-17 22:52:26 +02:00
Martchus 25b9116250 Show only relevant options in wizard and improve UI for displaying details 2022-08-27 23:35:15 +02:00
Martchus 14c4aa618b Remove redundant `META_PUBLIC_QT_MODULES` 2022-08-09 11:08:27 +02:00
Martchus 95ff84afb8 Update translations 2022-08-02 20:17:35 +02:00
Martchus 788a5b2947 Allow opening dir in file browser if path contains tilde
See https://github.com/Martchus/syncthingtray/issues/148
2022-08-02 20:15:24 +02:00
Martchus a7370fd8b8 Update translations 2022-07-26 23:59:42 +02:00
Martchus 80c608208d Show status text "Connecting to Syncthing ... " when connecting
instead of just "Not connected to Syncthing"
2022-07-26 23:52:26 +02:00
Martchus a49da56829 Update translations 2022-07-16 19:37:00 +02:00
Martchus 97a8dc3f99 Apply clang-format 2022-07-16 12:30:51 +02:00
Martchus 18d7e51c31 Improve documentation of `MiscTests::testService()` 2022-07-04 22:28:35 +02:00
Martchus 0865d11d42 Update translations 2022-07-04 21:55:28 +02:00
Martchus 81b15b904f Improve systemd integration
* Read properties from unit interface only if it is valid and set a timeout
  to prevent the UI from hanging
* Query the unit file state in case the unit itself cannot be queries so
  the file state of disabled units with no status is shown correctly
* Reload unit status when starting a disabled unit with no status so the
  effect is visible
2022-07-04 21:55:15 +02:00
Martchus e7098002c1 Update translations 2022-07-04 19:59:53 +02:00
Martchus d735455c2a Add button to reload all unit files 2022-07-04 19:55:58 +02:00
Martchus cc31872fc7 Show effect of enabling/disabling systemd unit immediately by reloading manager 2022-07-04 19:32:06 +02:00
Martchus 0b8d52563b Fix use of bitwise `|` with boolean 2022-07-04 18:20:54 +02:00
Martchus 835ba78b85 Make `readMockFile()` static and `MockedReply` final 2022-06-07 10:43:48 +02:00
Martchus 54b9b5e7cd Update translations 2022-06-07 10:42:38 +02:00
Martchus 4b174eae20 Add option to ignore folder "out-of-sync" errors for overall status
* Add option to ignore unread notifications as well to cover all those
  extra cases
* See https://github.com/Martchus/syncthingtray/issues/141
2022-06-07 10:42:22 +02:00
Martchus a299e9246f Add remarks about deprecated events 2022-06-06 11:42:49 +02:00
Martchus 4d47ceae55 Fix wrong comment 2022-06-06 11:36:37 +02:00