Commit Graph

417 Commits

Author SHA1 Message Date
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
Martchus 8052d04252 Avoid using deprecated `folderID` 2022-06-06 11:30:35 +02:00
Martchus 3b50d78f1e Use resource lock to avoid concurrent execution of tests requiring Syncthing test instance
This is likely the cleaner approach compared to just enforcing a serial run
for the CLI test.
2021-10-13 00:14:35 +02:00
Martchus 1f74a82ecb Adapt test for loading self-signed certificate 2021-10-12 23:55:17 +02:00
Martchus 77f0a8d5ae Update translations 2021-10-09 01:15:49 +02:00
Martchus c63719e2d1 Check whether loaded certificate is not null 2021-10-09 01:14:54 +02:00
Martchus 3c6716ebb9 Expect more TLS error types to support Schannel backend
Apparently the Schannel backend also produces
`QSslError::CertificateUntrusted` errors. Also adding
`QSslError::CertificateRejected` to be sure.
2021-10-09 01:14:54 +02:00
Martchus ab605049aa Improve TLS error messages
* Add fallback to .toPem() when .toText() is not implemented by the TLS
  plugin
* Add error number (Qt's enum value)
* Remove leftover cerr logging
2021-10-09 01:14:54 +02:00
Martchus c3182ff256 Apply cmake-format 2021-10-07 18:28:13 +02:00
Martchus 8b273b6945 Improve messages for TLS errors
Before one only gets the generic error "TLS handshake failed". Now one gets
more details error messages plus the problematic certificate. This should
be helpful for debugging.
2021-10-07 18:22:41 +02:00
Julianne420 ddefa35daa Add zh_CN translation 2021-10-07 01:20:24 +08:00
Martchus 8261a161ab Set default re-connect interval back to 30 seconds
See https://github.com/Martchus/syncthingtray/issues/16#issuecomment-932986686
2021-10-03 23:05:49 +02:00
Hannah Rittich 2968898195 Allow finding of packages in namespaces 2021-10-03 02:07:18 +02:00
Martchus 239d751342 Avoid an unhandled exception when local setup is incorrect
Apparently Boost.Process relies on the setup to be correct so the
configured locale actually needs to be available.
2021-09-30 23:41:27 +02:00
Martchus 8d6a9a042e Adapt config parser tests to changed GUI address 2021-08-25 21:48:33 +02:00
Martchus b828d7c274 Fix launching Syncthing with program/args containing non-ASCII characters
* Pass program/args for Syncthing launcher using UTF-16 under Windows
* See https://github.com/Martchus/syncthingtray/issues/107
2021-08-25 00:15:00 +02:00
Martchus 6aac7b0eae Suppress console Window under Windows
See https://github.com/Martchus/syncthingtray/issues/108
2021-08-24 23:50:28 +02:00
Martchus 7e7eab9eb8 Hardcode `127.0.0.1` in test setup instead of relying on DNS resolution of `localhost`
This should not be necessary but apparently helps with test failures
reported in https://github.com/Martchus/syncthingtray/issues/105.
2021-08-09 13:05:12 +02:00
Martchus f2db5e737c Fix typo in logging of tests 2021-08-07 16:03:57 +02:00
Martchus a1fddfcb07 Apply clang-format/cmake-format 2021-08-03 14:06:17 +02:00
Martchus 4c6315b450 Terminate Syncthing gracefully via REST-API on non-UNIX platforms (2)
A follow up to 0faacaa7c8 to cover the stop button within the launcher
and terminating Syncthing on shutdown/exit. To find the relevant connection
the connection settings are searched for a local URL where the port matches
the port from the Syncthing process log.
2021-07-15 02:38:26 +02:00
Martchus 0ef3b80447 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:29:49 +02:00
Martchus 9f7a19eabc Update translations 2021-07-03 18:50:59 +02:00
Martchus 1acfb8c896 Consider directories still out-of-sync if there are pull errors
Syncthing can report an "idle" status despite pull errors. This still means
the directory is out-of-sync. With this change the out-of-sync status is
only cleared when reading a "FolderSummary" event without pull errors (or
temporarily if the directory is e.g. scanning).
2021-07-01 17:40:23 +02:00
Martchus fdc73bed60 Query only one event at the beginning (to find the ID of the latest event)
Syncthing's official web UI also does the first query for events like this.
This should make loading times a bit faster and removes the possibility of
picking-up obsolete events (which was always problematic).
2021-07-01 17:37:47 +02:00
Martchus 6cfa8a96b6 Do not buffer further output when `readData()` is called on empty buffer
See comment; otherwise calls to `readAll()` with no `bytesAvailable()`
like done in the `syncthingctl` tests fail sporadically as async read
operations are started concurrently.
2021-07-01 17:32:49 +02:00