Adriaan de Groot
ec073ee188
[libcalamares] Apply coding style to geoip/
2019-08-08 12:32:21 +02:00
Adriaan de Groot
6e9f1be9e9
[libcalamares] Don't reformat string tables in GeoIP
2019-08-08 11:56:20 +02:00
Adriaan de Groot
68dc1f5e31
[libcalamares] Warn about badly-configured GeoIP
...
- Warn when type will be none
- Re-order warnings from general to specific
2019-06-18 12:33:56 +02:00
Adriaan de Groot
10ba468748
[libcalamares] Avoid warnings / errors on both gcc and clang
...
- Clang 8 can detect that there is no need for a return if all
previous paths already return. GCC 8 does not. Clang warns if
the unreachable return is there, GCC errors out if it isn't.
- Introduce a hack NOTREACHED that comments-out on Clang, and
marks as unreachable (but still present) on GCC.
- This might go away with an [[unreachable]] annotation or
similar.
2019-05-14 05:29:18 -04:00
Adriaan de Groot
0b0fb93e75
[libcalamares] Remove redundant default: in case
...
- the switch handles all values of the enum and the compiler should
be smart enough to know that (therefore default isn't needed,
nor the return afterwards).
2019-05-13 12:34:19 +02:00
Adriaan de Groot
2c94cbdb14
[libcalamares] namespace A::B is a C++17 extension
2019-05-13 12:34:19 +02:00
Adriaan de Groot
44559d24bd
[libcalamares] Selector wasn't saved for later queries
2019-05-09 15:09:58 -04:00
Adriaan de Groot
4ea29b1cf1
[libcalamares] Implement "raw" handling
2019-05-09 10:40:51 -04:00
Adriaan de Groot
7899ab83f9
[libcalamares] Remove convenience API
2019-05-03 11:35:13 -04:00
Adriaan de Groot
44cbb0d374
[libcalamares] Drop alternate-config handling for GeoIP
...
- Dealing with legacy formats and alternate configurations
is something that consumers should do (and then hand off
to the 3-string constructor) instead.
2019-05-03 11:21:01 -04:00
Adriaan de Groot
fc76313ea6
[libcalamares] Implement GeoIP Handler config from map
...
- read map entries with alternate keys
- delegate to other constructor
2019-05-03 11:06:36 -04:00
Adriaan de Groot
d5fe86c394
[libcalamares] Use NamedEnum for named-enum wrangling
2019-05-03 11:00:57 -04:00
Adriaan de Groot
2f2adb3623
[libcalamares] Implement async GeoIP::Handler::query()
...
- do this the cheap way by splitting the synchronous API into a
free function and then calling that through QtConcurrent.
2019-05-02 11:17:55 -04:00
Adriaan de Groot
84a759a591
[libcalamares] Emphasise that GeoIP::Handler::get() is synchronous
...
- prep-work for also having an async API
2019-05-02 11:06:08 -04:00
Adriaan de Groot
1da580f43d
[libcalamares] Implement Handler's synchronous query()
...
- Steal code from existing tests for a synchronous HTTP get,
then hand it off to the handler.
- Extend tests with Handler interpreting the same data.
2019-05-02 08:33:29 -04:00
Adriaan de Groot
9bc8d28800
[libcalamares] Shuffle GeoIP into a namespace
...
- Use CalamaresUtils::GeoIP for GeoIP code
- Name the public interface parts generically, while the
implementation details retain GeoIP<foo> names.
2019-05-02 07:25:48 -04:00