Commit Graph

61 Commits

Author SHA1 Message Date
Martchus becf6e873b Enable timeout for long-polling requests by default
This setting does work quite well in my testing so far and it can help with
the issue of the connection becoming stale (see
https://github.com/Martchus/syncthingtray/issues/209).
2023-11-25 23:31:42 +01:00
Martchus 9360bf8bc8 Fix grammar mistakes in German translation after replacing "Verzeichnis" with "Ordner" 2023-11-10 13:17:16 +01:00
Martchus 9c49c41990 Adapt integration test for auth changes in Syncthing v1.26.0 2023-11-07 12:48:38 +01:00
Martchus 7c932fdb31 Update translations 2023-11-07 11:58:55 +01:00
Martchus fada3c98dd Allow configuring long-polling timeout 2023-11-06 15:06:40 +01:00
Martchus 8aedecf5f5 Update translations 2023-10-03 14:14:01 +02:00
Martchus aa524aa8b7 Make event handling of `syncthingctl wait-for-idle` more efficient
Don't go though the list of dirs/devs for every dir/dev change event. Just
go though the list once after receiving new events. This makes also the
code a little bit easier to follow.
2023-09-20 18:12:55 +02:00
Martchus 230532d15e Do the directory/folder replacement also in German translation 2023-09-18 22:34:30 +02:00
Martchus 2073692968 Update translations 2023-09-18 22:13:41 +02:00
Martchus 63bd9bb306 Merge remote-tracking branch 'JohnVeness/folder' 2023-09-18 22:07:24 +02:00
Martchus 978636b5aa Fix crash in `syncthingctl cat` after f5795d45c2 2023-09-18 22:05:25 +02:00
John Veness c2a0eee029 Change Directory to Folder in user-facing strings 2023-09-17 19:33:31 +01:00
Martchus bc02a70ae9 Update translations 2023-09-16 23:10:09 +02:00
Martchus f5795d45c2 Show this/own device always as first device
See https://github.com/Martchus/syncthingtray/issues/203
2023-09-16 23:07:00 +02:00
Martchus 5fa69e4f5a Rename `SyncthingDevStatus::OwnDevice` in accordance with UI change 2023-09-16 22:28:35 +02:00
Martchus d623dfdf5e Replace "own device" with "this device" where it makes sense
* Be consistent with official UI
* See https://github.com/Martchus/syncthingtray/issues/203
2023-09-16 22:19:04 +02:00
Martchus 081def0a9e Update translations 2023-09-04 20:35:57 +02:00
Martchus 669923dbb6 Ensure redirects to HTTPS are enabled/allowed regardless of the Qt version
Technically, this is not completely true because it is not supported on Qt
versions older than 5.9.
2023-09-04 20:33:32 +02:00
Martchus b7d19ea904 Avoid duplicated code in functions for locating config files 2023-09-04 20:23:32 +02:00
Martchus bd924330ad Remove identical branches
GCC warns about this so let's just remove this leftover.
2023-09-04 20:20:51 +02:00
Martchus c3233a8954 Update translations 2023-09-01 23:36:04 +02:00
Martchus 25c8d3f69a Use consistent/new coding style in `readDirEvent` as well 2023-09-01 23:34:26 +02:00
Martchus 92b305aa89 Store the disconnect reason in the device info 2023-09-01 23:33:50 +02:00
Martchus 3696869a99 Remove useless and possibly problematic code when handling device events 2023-09-01 23:25:06 +02:00
Martchus ae319f604b Fix reading device events
* Fix logic error that prevented the `devStatusChanged()` event
  from being emitted when a device has connected
* Fix reading device ID from event data
2023-09-01 23:21:01 +02:00
Martchus 968fcb988c Fix finding Syncthing dir by path on Windows
The path needs to be normalized so inconsistent uses of `/` and `\` are not
a problem.
2023-08-19 19:16:16 +02:00
Martchus 66a8dda244 Improve test setup
* Improve code for reading environment variables
* Make tests work when the temp directory is not `/tmp` because e.g. `TEMP`
  has been set or tests are executed under Windows
2023-08-02 17:36:26 +02:00
Martchus e4bbe852bd Avoid CMake deprecation warning by bumping version 2023-07-23 21:05:22 +02:00
Martchus 00f444484c Update translations 2023-07-14 02:14:32 +02:00
Martchus 7e651be694 Fix compilation against Qt < 5.15 for Leap 15.3 builds 2023-07-11 11:55:39 +02:00
Martchus 8f481b0168 Update translations 2023-07-04 19:38:52 +02:00
Martchus 69568ea6dd Set default transfer timeout to infinity
Apparently the default before introducing the request timeout was not 30000
(which is the value of QNetworkRequest::TransferTimeoutConstant). There was
actually no timeout. So let's restore this behavior for now as the main
intention was to make the timeout configurable but not change any defaults.
2023-07-04 19:33:30 +02:00
Martchus faeefba03f Do not apply transfer timeout to long-polling requests
This leads to "disconnects" from Syncthing otherwise.
2023-07-04 19:26:48 +02:00
Martchus 690804be5c Add the request timeout to SyncthingConnectionSettings 2023-07-04 19:01:08 +02:00
Martchus ac07982596 Allow setting transfer timeout for network requests of SyncthingConnection 2023-07-04 18:39:14 +02:00
Martchus 4b5bd05221 Remove TODO for unification with `InternalError::isRelevant()`
The code is not similar enough to unify it.
2023-06-30 12:46:01 +02:00
Martchus 8b8854d243 Avoid warning about sign conversion
This is actually about the conversion of the `-1` literal in case the
process ID is already `qint64` (e.g. on Windows).
2023-06-10 18:19:28 +02:00
Martchus dd936b4a81 Workaround lupdate not understanding "enum class" in some cases
Apparently this is still problematic leading to errors like
`Qualifying with unknown namespace/class`. It seems that moving the enum to
a different header file works. The trick to use a macro to define
`enum class` ceased to work on the other hand.

Specifying a function with the namespace like
`void QtGui::FinalWizardPage::showResults()` leads to the same problem and
also needs to be avoided.
2023-06-07 23:14:48 +02:00
Martchus bccd953274 Avoid C++20 compatibility warning 2023-05-21 18:56:56 +02:00
Martchus dfe7759116 Update translations 2023-05-11 23:48:58 +02:00
Martchus 42a0d9c9f7 Show the connection type of a device 2023-05-11 23:44:10 +02:00
Martchus 35eb90e88c Ignore deprecation warning of `wait_for`
This function might not be completely reliable but it is
supposedly good enough for the use cases of
`SyncthingProcess::waitForFinished()`.
2023-05-11 17:57:04 +02:00
Martchus 208391acf7 Ensure `_WIN32_WINNT` is set for Boost.Process
Apparently is is not always set when using MSVC (not sure in which cases it
is missing).
2023-05-01 20:58:40 +02:00
Martchus e9135d735a Update translations 2023-04-29 21:08:29 +02:00
Martchus ae6b8712cb Re-connect if Syncthing appears to be restarted
* This is now required after 843f164d which uses event IDs
  instead of time stamps and event IDs reset when Syncthing has
  been restarted.
* It is likely a good idea to cleanly re-connect anyways.
* This change re-introduces the previously uneffective and hence
  removed code (see 8c74b240). It fixes the code to effectively
  make sure a re-connect is continued once it has been started.
  So this change should fix the re-connect not working in
  certain cases.
2023-04-15 22:51:55 +02:00
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 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