Adriaan de Groot
29fd0e0319
[locale] Expand test to check zones-overlap
...
- Document index and find methods,
- Check that each location is claimed by only one image (e.g. by
one zone). This is currently false.
2020-04-14 16:21:24 +02:00
Adriaan de Groot
1d5c4f13aa
[locale] Move the find-a-zone-image-for position to the image list
2020-04-14 16:06:21 +02:00
Adriaan de Groot
6173f9337a
[locale] Refactor long+lat -> x,y mapping
...
- Move this code to a static method since it only depends on the
expected image size (which here, is managed by the image list).
2020-04-14 15:24:05 +02:00
Adriaan de Groot
3945008956
[locale] Test the TZ image loader
...
- QImage needs Qt5::Gui, so this isn't a guiless-test; it can use
the offscreen QPA, though.
- Check that the images are all the same size
- Debugging / check code removed from timezonewidget
2020-04-14 15:10:04 +02:00
Adriaan de Groot
340c462062
[locale] Refactor loading of timezone images
...
- Move the image-loading to a separate class
2020-04-14 14:44:24 +02:00
Adriaan de Groot
4b65600c08
[locale] Remove useless localeglobal
...
- Although ::init() was called, none of the actual functionality
from localeglobal was still in use.
2020-04-14 12:37:22 +02:00
Adriaan de Groot
36d9e7d8f4
[locale] Extend tests with tz-image-validation
...
- The idea is to check all the TZ images for consistency, like
TimeZoneWidget::setCurrentLocation() does when DEBUG_TIMEZONES is
on; a zone-pixel should be set in only **one** image.
The test so far is just a stub.
2020-04-14 11:59:45 +02:00
Adriaan de Groot
e84db033b0
[locale] Debug-message typo
2020-04-14 11:57:03 +02:00
Adriaan de Groot
f9d888ec24
[locale] Warnings--
...
- remove unused variables, tighten up code some
- while here, apply coding style
2020-04-14 11:32:15 +02:00
Adriaan de Groot
022e62b829
[licale] Fix build with DEBUG_TIMEZONES
...
- QLatin1String isn't a constexpr; the whole ZONE is a bit derpy,
so let's just #define it.
2020-04-14 11:26:03 +02:00
Adriaan de Groot
08b5012946
[locale] Apply coding style to Config
...
- ci/calamaresstyle
- sort includes by kind (local module, Calamares, Qt, STL)
- add copyright line
2020-03-24 22:48:14 +01:00
Camilo Higuita
8ff1996e12
add the localq module and config to locale
2020-03-24 09:47:53 -05:00
Adriaan de Groot
ebb3f319cc
[modules] Be more consistent in include punctuation
...
- Use <> for Qt, system, externals
- Use double-quotes for Calamares headers
2020-03-09 21:05:15 -05:00
Adriaan de Groot
adf81c0ab5
[locale][packagechooser] Fix tests, QCOMPARE again
2020-02-21 18:24:39 +01:00
Adriaan de Groot
6f996d8eed
CMake: give yamlcpp a proper imported target
...
- This makes linking easier,
- Adds the right includes (needed on FreeBSD),
- Lets us drop silly GUI setting for non-GUI tests (I think this was
a side-effect of compiling on FreeBSD, where UI would pull in
/usr/local/include).
2020-02-17 14:55:12 +01:00
Adriaan de Groot
4495a4c739
CMake: Allow extra libraries in calamares_add_test
...
- Extra libraries specified via LIBRARIES part of CMake function
- Convert all the other module tests
2020-02-17 14:36:52 +01:00
Adriaan de Groot
b044549013
[libcalamares] Merge PluginDllMacro.h into DllMacro.h
...
- Let's just have one header definining export- and visibility-
macros for Calamares. They are still selected based on the
export flags (*_PRO), just defined in one header instead of two.
2020-02-17 11:37:35 +01:00
Adriaan de Groot
a09593e4a2
[locale] Tighten up language-matching
...
- Drop plain startsWith() matching, since we now have "as" and "ast"
as supported languages, where one name is a prefix of the other.
2020-01-28 17:35:54 +01:00
Adriaan de Groot
49690fc681
[locale] Remove superfluous code
...
- the list is already filtered for UTF-8, so this is redundant
- this *incidentally* fixes the problem with Assamese and Asturian,
since Assamese (as_IN) was having its only entry removed,
after which it would match Asturian (ast_ES)
2020-01-28 16:41:15 +01:00
Adriaan de Groot
97f622e094
[locale] Use standard algorithms
2020-01-28 15:50:08 +01:00
Adriaan de Groot
1a8926181e
[locale] Warnings-- (initialization-order)
2020-01-07 10:46:26 +01:00
Adriaan de Groot
1625bb1dae
[locale] Support Qt 5.9
...
FIXES #1296
2020-01-07 00:09:04 +01:00
Adriaan de Groot
7bea19a62c
[locale] Fix build with debugging enabled (API changes)
2019-12-11 08:45:35 -05:00
Adriaan de Groot
242b79e2e1
[locale] Remove old Location information
...
- all the TZ location information now lives in the Calamares
locale service and the TZ list
- replace the Location class that was local to the timezone
widget by the TZZone class
- chase a bunch of small API changes that this needs
2019-12-11 08:45:35 -05:00
Adriaan de Groot
e164f8d63a
[locale] Fix build with DEBUG_TIMEZONE
...
- all the API changes were not reflected in the debugging code
2019-12-10 16:19:06 -01:00
Adriaan de Groot
fb9d53909e
[locale] Drop ZONES #define
...
- this was a "cheap" way to write a list, but going through
QStringList::split() is just a long-way-around for static
initialization
2019-12-10 16:09:48 -01:00
Adriaan de Groot
2dfbed40c5
[locale] Move defines
...
- Used in only one place, move to .cpp
- Drop useless scaling all the images *are* that size already
- Add debugging check that the images match expected size
2019-12-10 10:00:16 -07:00
Adriaan de Groot
9d9d9c361d
[locale] Clean up constants
...
- move LOCALESDIR to the one place it's used
- remove file with only unused #defines
2019-12-10 17:46:09 +01:00
Adriaan de Groot
7354d35faf
[locale] Apply coding style to timezonewidget/
2019-12-10 17:42:58 +01:00
Adriaan de Groot
1e04924224
[locale] Drop the TZ-widget's timezone database
...
- use the global TZ service instead
- contains hacks to keep some of the API unchanged, which will be
removed shortly
2019-12-10 17:29:35 +01:00
Adriaan de Groot
4089a01cb1
[locale] Create TZ model earlier
2019-12-11 01:31:56 +10:00
Adriaan de Groot
226530cf6f
[locale] Use model functions from locale service
...
- drop the home-grown combo-box filling, use model
2019-12-11 01:04:09 +10:00
Adriaan de Groot
c75e870073
[libcalamares] CStringList::find() convenience function
...
- search for a key and return a type-cast pointer to the result
- while here, simplify some other code
- the find() function could be done with std::find_if but doesn't
get any shorter or more elegant
2019-12-10 15:54:43 +01:00
Adriaan de Groot
6092172f8d
[libcalamares] Regions and zones change to QList<Base*>
...
- By using QList< CStringPair* > consistently, we can save
a bunch of model code at the cost of an occasional dynamic_cast;
it's fairly rare for there to be a need for the derived pointer.
2019-12-10 15:32:15 +01:00
Adriaan de Groot
f4509f3380
[libcalamares] Move loading to TZRegion
...
- don't make the model load files, provide convenience functions
for loading in the value classes
- create model from lists of value pointers
2019-12-10 10:48:39 -01:00
Adriaan de Groot
9f06903115
[local] Chase API change in TZRegionModel
2019-12-09 23:36:32 -11:00
Adriaan de Groot
afb5430c42
[locale] Use TZRegionModel
...
- instead of populating combo box with texts, use the model
read in from zone.tab
- this **partly** deprecates the LocaleGlobal stuff
2019-12-10 11:30:48 +02:00
Adriaan de Groot
ddc2f60768
Merge branch 'master' into zone-data
2019-12-09 17:44:32 +01:00
Adriaan de Groot
ad868033f3
[locale] Chase deprecations in Qt
2019-11-26 16:56:12 +01:00
Adriaan de Groot
906aeec5d3
[locale] Replace #define with a static const
...
- TZ_DATA_FILE is only used in one place
2019-11-25 11:49:41 +01:00
Adriaan de Groot
1df6454cfe
[locale] Tidy up types
...
- use JobList typedef where possible
- remove unused forward type definitions
2019-11-25 10:52:22 +01:00
Adriaan de Groot
5d0a5c035d
Merge pull request #1243 from stikonas/master
...
QLatin1Literal->QLatin1String.
2019-09-30 10:30:02 +02:00
Adriaan de Groot
4799e821d3
[locale] Reduce warnings, missing override
2019-09-23 11:25:18 +02:00
Andrius Štikonas
490c14d93d
QLatin1Literal->QLatin1String.
2019-09-21 20:44:33 +01:00
Adriaan de Groot
11d3f10e26
[locale] Dispose of waiting widget
...
- Do the async GeoIP checking in the async requirements-checking phase
- Do not return any requirements results -- we just need the async bit
- Drop the waiting widget, since it's not needed (done by the
requirements phase)
2019-09-10 14:18:47 +02:00
Adriaan de Groot
41ece863de
[locale] Create widgets when needed instead of at startup
...
- this blocks forever, since now the GeoIP lookup isn't done at all.
2019-09-10 06:19:20 -04:00
Adriaan de Groot
0a1dc77f9b
[locale] Hang on to GeoIP::Handler just once
...
- replace configuration settings by putting them in an object
- use unique_ptr to allow us to create one optionally.
2019-09-10 11:26:47 +02:00
Adriaan de Groot
d70d418d92
[locale] Refactor setting of LC entries
2019-09-07 17:02:59 +02:00
Adriaan de Groot
5cac3ac6ad
[locale] Apply coding style
2019-09-07 16:58:37 +02:00
Adriaan de Groot
0ee8427d5a
[locale] Remove old-style GeoIP configuration
2019-09-07 16:05:09 +02:00