Commit Graph

45 Commits

Author SHA1 Message Date
8d7cfbe0ad Add functions to request overriding/reverting folders 2023-02-03 12:40:12 +01:00
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
256e90a0cb Avoid warning about unqualified std cast 2022-11-04 16:51:01 +01:00
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
a299e9246f Add remarks about deprecated events 2022-06-06 11:42:49 +02:00
4d47ceae55 Fix wrong comment 2022-06-06 11:36:37 +02:00
8052d04252 Avoid using deprecated folderID 2022-06-06 11:30:35 +02:00
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
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
0ef3b80447 Fix typos found via codespell --skip .git -w 2021-07-03 19:29:49 +02:00
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
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
986959c8b2 Avoid reading reply data if the reply isn't open
This might be the case when the request has been aborted. Reading from the
reply in this case would result in an unwanted log message from Qt.
2021-06-04 16:26:09 +02:00
7ad82c9dfe Emit time stamp parsing errors like other parsing errors 2021-05-21 22:34:42 +02:00
62e7797558 Allow enabling logging of libsyncthingconnector at runtime
* Remove compile-time switches to enable logging
* Enable logging if certain environment variables are set
* Allow logging all API responses
2021-05-18 18:21:48 +02:00
fbb7685f4b Fix warnings about detatching Qt container via for loop 2021-05-18 00:08:21 +02:00
239f750028 Improve timestamp parsing/handling
* Use local time consistently for timestamps which might get displayed
  within the UI, e.g. the dir status was in one case set to the local time
  and in other cases GMT was used which could lead to discarding status
  updates
* Print warning when timestamp parsing fails (instead of ignoring it
  silently)
* Set directory status from folder status response even when parsing the
  timestamp fails
* Catch possible exception when printing log timestamps in syncthingctl
2021-05-18 00:08:21 +02:00
46099abc0c Assign empty completion when receiving 404 response 2021-04-07 19:55:47 +02:00
9ae7f4a265 Avoid requesting completion for paused devs/dirs after remote index changed 2021-04-07 19:53:16 +02:00
a5f629d710 Avoid crash when start time can not be parsed 2021-04-07 19:42:07 +02:00
f75966aadc Fix warnings 2021-03-20 22:39:40 +01:00
851edeaafc Never consider the own device as paused 2021-02-12 19:44:27 +01:00
1cfd067abd Do not accept "lastSeen" timestamps older or equal to the UNIX epoch
The UNIX epoch seems to be the "null-value" provided by Syncthing's API
when there's no "lastSeen" timestamp, e.g. when it is the own device.
2021-02-12 17:55:38 +01:00
bdf00a9889 Never consider the own device as paused 2021-02-12 12:51:18 +01:00
395a3503d7 Apply clang-format 2020-03-05 19:17:55 +01:00
b8f19b5cc1 Improve code to avoid multiple completion requests 2020-03-02 18:20:48 +01:00
28dc0bb825 Fix duplicated 'eventType == ' 2020-03-02 15:51:14 +01:00
5227a7961e Use queued connection for "other replies"
so the handler is not called while looping through the
list of these replies to abort them. The handler must
not be called in that situation because it mutates the
list.
2020-03-01 23:40:27 +01:00
fb86ee7bf9 Avoid unnecessary completion queries
* Ensure the completion for the same dev/dir is not requested
  twice
* Prevent completion query if (no longer) polling for events
2020-03-01 23:06:02 +01:00
bafdb22c47 Compute the sync state for remote devices
See https://github.com/Martchus/syncthingtray/issues/62
2020-03-01 22:04:30 +01:00
f9100bb0b4 Don't record file changes on dir level by default 2020-01-18 16:57:03 +01:00
6026339c83 Show recent changes 2020-01-18 16:43:13 +01:00
31e7e4e79e Support "Waiting to scan"
This state has been introduced
with https://github.com/syncthing/syncthing/pull/4888
2019-09-27 16:41:24 +02:00
dc7d9b815f Adapt to changes in c++utilities 2019-06-14 19:15:26 +02:00
64473df5ba Adapt to changes in c++utilities 2019-06-10 22:48:26 +02:00
d88df866d2 Adapt to c++utilities v5 2019-05-04 21:05:21 +02:00
e56c950100 Show overall statistics in plasmoid 2019-02-17 23:46:03 +01:00
267cbd7dad Document SyncthingConnection::readDevRejected() 2018-12-26 01:14:19 +01:00
c83df582b6 Fix subtile bugs on reconnect
* Ensure previous long polling requests for events are aborted
  before connecting again
* Ensure results from previous requests are always discarded
  after aborting to reconnect
2018-12-25 02:30:13 +01:00
4a42a3f0c0 Fix and refactor directory error handling
* Rely not only on the FolderErrors event
* Request pull errors when opening the dialog
* Use "pullErrors" from FolderSummary
* Move code for directory error dialog into
  its own class

This should fix that sometimes obsolete errors
were still displayed or actually present errors
missing.
2018-11-03 21:30:17 +01:00
0ef2bf919a Remove duplicated status recalculation 2018-11-02 22:15:16 +01:00
9817be858d Update stateChanged in readDirSummary() 2018-11-02 22:10:18 +01:00
038cb130b7 Don't emit notifications for folder errors 2018-11-02 21:49:24 +01:00
25ae9266a8 Discard obsolete folder errors
* Discard folder errors older than the last "sync" state
* Unfortunately we don't know the the time of the last
  sync from the beginning. To prevent showing obsolete
  errors in this state, discard all errors if the status
  changes to something other than "out-of-syn".
2018-11-02 21:47:27 +01:00
32b2907e67 Split syncthingconnection.cpp
* Move methods for specific requests to its own file
2018-10-28 15:37:25 +01:00