Commit Graph

55 Commits

Author SHA1 Message Date
Lars Toenning
56bd6f0c42 refactor: Fix Qt 5.15 deprecation warnings 2024-10-12 22:16:16 +02:00
Lars Toenning
b4cbed107b refactor: Remove CNetworkWatchdog
The watchdog was used in a few places as a shortcut to skip reading
data. Further, it was used in some places in the UI to display
connectivity. But it also introduced quite some complexity. In some
cases it can be fragile: network accessibilty cannot be looked up on all
platforms/hardware constellations. The connectivity could change
between the last watchdog call and the real call. Hence all readers must
still handle the case where the connection fails.
To simplify swift and further reduce the dependency onto the project
infrastructure (pings etc.), this removes the watchdog.
This also removes the QNetworkConfigurationManager, which is deprecated
and not available with Qt6.
2024-04-15 22:02:11 +02:00
Lars Toenning
c0b0c74c3c fix: Always perform SSL peer verification
As the datastore now has real (no self-signed) TLS certificates, the host
verification should not be disabled by default. When testing locally,
one could use non-TLS connections.
2024-03-21 22:42:01 +01:00
Lars Toenning
bebd5600bb refactor: Remove unused and outdated SSL certificates
Methods are unused since commit 0d0e09333
CNetworkUtils::setSwiftClientSslCertificate was removed with ac48e64
2024-02-06 08:45:34 +01:00
Lars Toenning
bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00
Lars Toenning
970b7c3650 clang-format src 2023-04-18 16:07:19 +02:00
Lars Toenning
c0efc9ea81 Clean up includes 2022-05-25 19:47:34 +01:00
Mat Sutcliffe
002cd1d5b9 Issue #11 Improve CEventLoop API 2021-10-11 14:20:06 +01:00
Mat Sutcliffe
57d32da826 Use nested namespaces (C++17 feature) 2021-09-18 15:07:48 +01:00
Mat Sutcliffe
b81cc9a9dc Issue #77 Break cyclic dependency between CDirectoryUtils and CNetworkUtils by factoring out canPing method 2020-12-19 18:50:39 +00:00
Mat Sutcliffe
ac48e64891 Issue #77 Break dependency of CNetworkUtils on CUrl and CUrlList 2020-12-19 18:50:38 +00:00
Mat Sutcliffe
63e8de8f00 Issue #77 getLogCategories returns a simple QStringList instead of our own class 2020-12-19 18:50:34 +00:00
Roland Rossgotterer
18821c2a30 Fix networkOperationToString 2019-10-11 19:00:45 +01:00
Klaus Basan
ea8e27cc9b Ref T730, obtain duration from "swift modified" QNetworkReply 2019-10-11 19:00:34 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Mat Sutcliffe
fe7a45afcf Ref T516 Update CStatusMessage call sites to use new syntax. 2019-02-22 20:35:51 +00:00
Mat Sutcliffe
80308b85d5 Changed QOverload to qOverload. 2019-02-22 20:35:11 +00:00
Mat Sutcliffe
ace7650ebe Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals. 2019-02-22 20:23:46 +00:00
Klaus Basan
d212d16929 String format 2018-08-27 18:58:13 +02:00
Klaus Basan
f1312bbb50 Style 2018-08-21 22:10:27 +02:00
Klaus Basan
0327776edd Ref T295, based on bug report of RP (no WIFI detected) creating a network report
* network report when starting swift
* also ignore inactive configs when checking for "the bearer bug"

references:
https://stackoverflow.com/questions/51824242/disable-qt-bearer-management-at-runtime
https://swift-project.slack.com/archives/G7GD2UP9C/p1534181224000115
https://swift-project.slack.com/archives/G96QTUBEG/p1534162173000320
2018-08-16 14:33:52 +02:00
Klaus Basan
bab821d3f1 Ref T295, QNetworkConfiguration as string 2018-08-09 01:25:14 +02:00
Klaus Basan
e1421622b1 Reset URL list and adjusted timeouts for for bootstrap file. Also avoid problems when shutting down. 2018-05-08 16:06:34 +02:00
Klaus Basan
42ef7c5633 Avoid long "hanging" if Windows UNC path is not reachable
Use own "isDirExisting" function checking UNC paths
2018-04-05 02:54:40 +02:00
Mathew Sutcliffe
0cae43197c Consume all console output of ping process, to avoid noise in test output. 2017-11-12 21:20:09 +00:00
Klaus Basan
5682c9cb58 Ref T169, set http USER-AGENT version in a defined way, so we can use it for checks at the backend 2017-10-10 00:28:35 +01:00
Klaus Basan
dabe50bcfe Ref T160, improved / more detailed info for user-agent in requests
* renamed to getSwiftNetworkRequest (make clear request is tweaked)
* add details to user request
2017-09-25 05:23:56 +02:00
Klaus Basan
db05d237c2 Ref T149, indentify PHP error string 2017-09-24 20:28:56 +01:00
Klaus Basan
b01c7d6333 Ref T150, Ref T156 overloading canPing 2017-09-24 20:28:46 +01:00
Mathew Sutcliffe
d5ab73e1bc Replace QRegExp with QRegularExpression
Reviewers: kbasan, msutcliffe

Reviewed By: kbasan, msutcliffe

Subscribers: jenkins

Differential Revision: https://dev.swift-project.org/D11
2017-05-05 23:08:35 +01:00
Klaus Basan
d46257f670 Ref T42, util function to create network report 2017-05-05 23:07:38 +01:00
Klaus Basan
640ad99520 Allow to pass timeout to obtainNextWorkingUrl
Sometimes timeout for news in launcher, needs to be investigated
2017-05-05 22:39:56 +01:00
Klaus Basan
65f4d1f9e2 Increase timeout a bit (WLAN experience) 2017-04-20 20:35:48 +02:00
Klaus Basan
660798e43c refs #930, moved multipart functions to database utils and added support for compression 2017-04-18 00:08:00 +01:00
Klaus Basan
f85501c7bf refs #921, use QVersionNumber
* CVersion removed
* remaining utility functions moved to CBuildConfig
* patch version -> micro version (Qt naming)
* using classes adjusted
2017-04-18 00:06:58 +01:00
Mathew Sutcliffe
c1a82ad60e Fixed undescriptive error message generated by CNetworkUtils::canConnect. 2017-04-18 00:06:08 +01:00
Roland Winklmeier
66cf96d47f Use CEventLoop to process events until a signal is received
refs #869
2017-02-24 15:22:18 +00:00
Roland Winklmeier
7faffc520d Remove obsolete network connection checks
refs #869
2017-02-24 15:22:15 +00:00
Roland Winklmeier
98b2061d3d Remove redundant checks in CNetworkUtils::getKnownLocalIpV4Addresses()
refs #869
2017-02-24 15:22:14 +00:00
Klaus Basan
c460505d2e refs #883, refs #869 using ping as socket is slow/sometimes has trouble 2017-02-24 15:21:59 +00:00
Klaus Basan
92100c85f7 refs #883, added utility function ping 2017-02-24 15:21:53 +00:00
Klaus Basan
74db515802 refs #882, support for 30x redirect and some more utility functions
* CNetworkUtils::setSwiftClientSslCertificate for shared URLs
* redirect functions
2017-02-24 15:21:34 +00:00
Klaus Basan
9beb6c79e1 refs #875, renamed to getKnownLocalIpV4Addresses() 2017-02-24 15:21:04 +00:00
Roland Winklmeier
7be604741c Add swift client ssl certificate
refs #762
2017-02-24 00:19:36 +00:00
Klaus Basan
492649c061 fixes "unable to login", discovered during #780,
* fixed bootstrap file
* improved timeout of connect, now in single static function
* some minor tweaks
2016-12-06 09:33:56 +01:00
Klaus Basan
03c642d88a refs #751, detect invalid JSON message
(which normally means a PHP error message in HTML)
* utility function to remove HTML parts
* adjustments
2016-09-19 16:18:40 +02:00
Klaus Basan
5789bdd722 * refs #658, set user-agent "swift" to swift requests
some style changes in same step
2016-06-08 18:20:22 +02:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
9ff322ae25 refs #597, use CMD arguments in setup reader.
* Setup reader will now be initialized and handles by CApplication
* Setup reader no longer threaded reader as it will be initialized and loade upfront
2016-03-18 01:08:24 +00:00
Roland Winklmeier
bd251b5de6 Fix license headers 2016-02-16 20:01:21 +01:00