Adriaan de Groot
3b14e354b0
[libcalamares] Log more HTTP errors during requests
5 years ago
Adriaan de Groot
2878c474c5
Warnings-- (~T() override)
...
Change all the places that had
virtual ~T() override
to the less redundant form without override.
5 years ago
Adriaan de Groot
2126be6d6d
Warnings-- (~T() override)
...
Consistently use
~T() override;
in class declarations (so no virtual in front, and avoid
warnings due to the missing override in back).
5 years ago
Asif Mahmud Shimon
c6a3e9b816
Internet accessibility checking done by ping method
5 years ago
Adriaan de Groot
1cd9b93a22
REUSE: Giant boilerplate cleanup
...
- point to main Calamares site in the 'part of' headers instead
of to github (this is the "this file is part of Calamares"
opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
this is the 3-paragraph summary of the GPL-3.0-or-later, which has
a meaning entirely covered by the SPDX tag.
5 years ago
Adriaan de Groot
36fb1124be
[libcalamares] Export network status as Q_PROPERTY and to QML
5 years ago
Callum Farmer
0c4dc71d5c
[libcalamares] Update SPDX identifiers.
...
Update CppJob.h
Update CalamaresConfig.h.in
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.cpp
Update CalamaresConfig.h.in
Update CppJob.cpp
Update CppJob.h
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.h
Update ProcessJob.cpp
Update ProcessJob.h
Update PythonHelper.cpp
Update PythonJob.cpp
Update PythonJob.h
Update PythonHelper.h
Update PythonJobApi.cpp
Update PythonJobApi.h
Update Settings.cpp
Update Settings.h
Update GeoIPJSON.cpp
Update GeoIPJSON.h
Update GeoIPTests.cpp
Update GeoIPTests.h
Update GeoIPXML.cpp
Update GeoIPXML.h
Update Handler.cpp
Update Handler.h
Update Interface.cpp
Update Interface.h
Update test_geoip.cpp
Update CountryData_p.cpp
Update Label.cpp
Update Label.h
Update LabelModel.cpp
Update LabelModel.h
Update CountryData_p.cpp
Update CountryData_p.cpp
Update Lookup.cpp
Update Lookup.h
Update Tests.cpp
Update Tests.h
Update TimeZone.cpp
Update TimeZone.h
Update TranslatableConfiguration.cpp
Update TranslatableConfiguration.h
Update ZoneData_p.cxxtr
Update cldr-extractor.py
Update zone-extractor.py
Update Actions.h
Update Actions.h
Update Descriptor.h
Update InstanceKey.cpp
Update Module.cpp
Update Module.h
Update Requirement.cpp
Update RequirementsChecker.h
Update RequirementsModel.cpp
Update RequirementsModel.h
Update Tests.cpp
Update Manager.cpp
Update Manager.h
Update Tests.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update KPMTests.cpp
Update FileSystem.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update Mount.cpp
Update Mount.h
Update PartitionIterator.cpp
Update PartitionIterator.h
Update PartitionIterator.h
Update PartitionQuery.cpp
Update PartitionQuery.h
Update PartitionSize.cpp
Update PartitionSize.h
Update Sync.cpp
Update Sync.h
Update Tests.cpp
Update Tests.h
Update BoostPython.h
Update CalamaresUtilsSystem.cpp
Update CalamaresUtilsSystem.h
Update CommandList.cpp
Update CommandList.h
Update Dirs.cpp
Update Dirs.h
Update Entropy.cpp
Update Entropy.h
Update Entropy.cpp
Update Logger.cpp
Update Logger.h
Update NamedEnum.h
Update NamedSuffix.h
Update PluginFactory.cpp
Update PluginFactory.h
Update RAII.h
Update RAII.h
Update Retranslator.cpp
Update Retranslator.h
Update String.cpp
Update String.h
Update TestPaths.cpp
Update Tests.cpp
Update Tests.h
Update UMask.cpp
Update UMask.h
Update Units.h
Update Variant.cpp
Update Variant.h
Update Yaml.cpp
Update Yaml.h
Update moc-warnings.h
5 years ago
Adriaan de Groot
401a34fcbd
[libcalamares] Fix tests on FreeBSD
...
- https requests can fail if ca_nss isn't installed; ping something
else then.
5 years ago
Adriaan de Groot
7277d52828
[libcalamares] Expand range of errors for network requests
...
- All failures were being reported as Timeout, which is confusing
when they are not. Introduce HttpError for the not-timeout
other kinds of errors.
- Add operator<< for RequestStatus for nicer error logging.
5 years ago
Adriaan de Groot
d8ecd302e1
[libcalamares] Apply coding style
...
- minor space issues
- drop a blank line after moc-warnings.h to avoid if being sorted
downwards, after the MOC file it's protecting
5 years ago
Adriaan de Groot
1eec1a9fe7
[libcalamares] Fix typo in API
...
- "asynchronouse" is not a thing
5 years ago
Adriaan de Groot
781322ab41
[libcalamares] Use more descriptive variable name
...
- If the test failed, you'd get a cryptic message like
FAIL! : NetworkTests::testPing() 'r' returned FALSE. ()
So rename the variable so the failure mode is more obvious.
(Could have used QVERIFY2() instead, this is simpler)
5 years ago
Adriaan de Groot
24c2c435a0
[libcalamares] Try repairing tests
...
- Fail on FreeBSD with an instant timeout
5 years ago
Adriaan de Groot
bb9cca643f
[libcalamares] Avoid warnings from MOC-generated code
...
- Moc generates Q_UNUSED(_a); which in turn (with clang) issues
a superfluous-semicolon warning. Existing code with automoc
uses utils/moc-warnings.h to turn off warnings that are issued
on moc code. Include it explicitly here because automoc isn't
applied.
6 years ago
Adriaan de Groot
3c387a11c9
[libcalamares] class/struct mismatch
...
- Manager::Private is a class, not just a struct. Needed for
hypothetical MSVC compatibility.
6 years ago
Adriaan de Groot
57a942d155
[libcalamares] Make a NAM per thread
...
- To avoid warnings about creating requests and replies, parented
by the NAM but from another thread, make a NAM per thread.
6 years ago
Adriaan de Groot
ca351ff7b6
[libcalamares] Apply (some) options to request earlier
6 years ago
Adriaan de Groot
badbdf59ee
[libcalamares] Build synchronous get w/ async-get
6 years ago
Adriaan de Groot
f8356a6dcc
[libcalamares] Add an async get method
...
- Mostly a "cheap" wrapper for a half-dozen boilerplate lines
of Qt NAM code.
6 years ago
Adriaan de Groot
eb21c90861
[libcalamares] Avoid implicit 0-to-flags conversion
...
- clang complains about using 0 as a Flags value, so make the
default (empty) initialization explicit.
6 years ago
Adriaan de Groot
a1b0049bbf
[libcalamares] Use more readable names
6 years ago
Adriaan de Groot
e2c6591a77
[libcalamares] Refactor request internals
...
- distinguish timeouts from other failures
- git synchronousPing() a more detailed result, which is
still bool-compatible.
6 years ago
Adriaan de Groot
f0be7fd4aa
[libcalamares] Make failures in the internal methods obvious
...
- internally, timeout and error will return nullptr
6 years ago
Adriaan de Groot
ededebbc6c
[libcalamares] Return reply early if the request is bad
6 years ago
Adriaan de Groot
85f0d38698
[libcalamares] Refactor synchronous get
...
- Add timeout support
- Refactor into a static helper method
6 years ago
Adriaan de Groot
1f2b3b734d
[libcalamares] Extend synchronous API with options
6 years ago
Adriaan de Groot
af1aa701bc
[libcalamares] Shuffle namespace lines around
...
- put all the definitions inside namespace {} to avoid
needlessly long source lines.
6 years ago
Adriaan de Groot
8ea1ea6662
[libcalamares] Add synchronousGet() to network service
...
- Synchronous download of a given URL; not something to
do from the GUI thread.
- Use it from the GeoIP service, which downloads in a
separate thread to do GeoIP lookups.
- Drop now-unused headers.
- Adjust tests for GeoIP to use network service
6 years ago
Adriaan de Groot
eae931f2ed
[libcalamares] Ping only when accessibility is unknown
...
- Restores exact functionality of previous version
(noted by Kevin Kofler)
- Short-circuit ping if the URL is bad.
6 years ago
Adriaan de Groot
4389c254df
[libcalamares] Rely directly on QNAM's networkAccessible()
6 years ago
Adriaan de Groot
11d52df04c
[libcalamares] Add API docs to network service
6 years ago
Adriaan de Groot
8d3530154f
[libcalamares] Expand network service test
...
- Do an actual ping (also to check for memory leaks)
6 years ago
Adriaan de Groot
b8d56bb4a6
[libcalamares] Add tests for network service
6 years ago
Adriaan de Groot
d7602df51e
[libcalamares] Introduce networking service
...
- The networking service is intended to wrap up use of
QNetworkAccessManager and others for consumption within
Calamares, and to provide some convenience functions
for internet access.
- Medium term, it may also monitor network access, so that
we can respond to changes in network availability during
installation.
Currently very minimal and undocumented.
6 years ago