Commit Graph

38 Commits

Author SHA1 Message Date
2ebfdb2cc2 Add function to query ignore patterns 2024-05-04 23:00:13 +02:00
83e1dd6d8a Improve file browser 2024-05-04 22:44:00 +02:00
047a4e461e Allow refreshing root in file browser 2024-05-01 15:58:09 +02:00
96bf755af2 Apply clang-format 2024-04-09 11:35:45 +02:00
1293a36613 Fix compilation with Qt 5 2024-04-08 14:17:04 +02:00
93b5d66875 Allow browsing remote/global files 2024-04-05 01:30:00 +02:00
572e82cec0 Fix resuming devs when network not metered anymore after 57d47de7 2024-02-18 00:53:28 +01:00
57d47de74c Avoid considering manually changed devs handling metered network 2024-02-16 17:37:52 +01:00
219863be3e Remove obsolete "currently" in remark about pauseResumeDevice() 2024-02-15 22:03:46 +01:00
30fa37f048 Allow to pause automatically on metered network connections
* Allow to pause all devices on metered network connections (devices will
  be automatically resumed when network is no longer metered)
* Allow to stop Syncthing when it was started via the built-in launcher
  on metered network connections (it will be automatically started again
  when the network connection is no longer metered)
* See https://github.com/Martchus/syncthingtray/issues/231
2024-02-15 21:02:18 +01:00
0ba97e2355 Fix encoding of query items
Plus signs must be percent encoded as they are otherwise interpreted as
white-spaces, see https://github.com/Martchus/syncthingtray/issues/229.
2024-01-28 20:57:22 +01:00
07ff8a5c1b Avoid TLS errors on Syncthing's automatic certificate renewal
* Reload the certificate when running into TLS errors an it looks like the
  certificate was renewed
* See https://github.com/Martchus/syncthingtray/issues/226
2024-01-15 21:29:24 +01:00
c1284331be Handle redirections more nicely
* Log redirections in accordance with logging settings
* Load self-signed certificate as needed
2023-12-30 20:11:34 +01:00
fada3c98dd Allow configuring long-polling timeout 2023-11-06 15:06:40 +01:00
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
63bd9bb306 Merge remote-tracking branch 'JohnVeness/folder' 2023-09-18 22:07:24 +02:00
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
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
5fa69e4f5a Rename SyncthingDevStatus::OwnDevice in accordance with UI change 2023-09-16 22:28:35 +02:00
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
bd924330ad Remove identical branches
GCC warns about this so let's just remove this leftover.
2023-09-04 20:20:51 +02:00
25c8d3f69a Use consistent/new coding style in readDirEvent as well 2023-09-01 23:34:26 +02:00
92b305aa89 Store the disconnect reason in the device info 2023-09-01 23:33:50 +02:00
3696869a99 Remove useless and possibly problematic code when handling device events 2023-09-01 23:25:06 +02:00
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
7e651be694 Fix compilation against Qt < 5.15 for Leap 15.3 builds 2023-07-11 11:55:39 +02:00
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
ac07982596 Allow setting transfer timeout for network requests of SyncthingConnection 2023-07-04 18:39:14 +02:00
42a0d9c9f7 Show the connection type of a device 2023-05-11 23:44:10 +02:00
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
c6a5b40a1d Re-connect when event ID is decreasing 2023-04-15 22:25:12 +02:00
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
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
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
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
db657bb1aa Use QByteArrayLiteral for such literals 2023-03-28 17:20:59 +02:00
96e92f13a3 Avoid relying on symlink for include directories
Symlinks aren't working very well with Git under Windows so better avoid
them.
2023-02-27 18:27:33 +01:00