* Introduce tooldata class
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
* Refactoring list command
- Introduce show_list function that is part of UI
- ListCommand class can be used as library to retrieve metadata.
- Rename ListCommand to MetadataFactory
- Rename action method to getList
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This change adds a function that checks for obvious misuses of the
`--extension` flag, according to these rules:
1. On Qt6 for Android, an extension for processor architecture is
required.
2. On any platform other than Android, or on Qt5, an extension for
processor architecture is forbidden.
3. The "wasm" extension only works on desktop targets for Qt 5.13-5.15.
This validation function is only called on requests for 'modules' and
'architectures', because these are the only places where the version
of Qt is known and the extension matters. Hopefully, this change will
reduce confusion among users.
* Fix failure of requests for Qt 5.9.0
Currently, the following two commands fail with an HTTP 404 when they shouldn't:
```bash
aqt list qt5 windows desktop --modules 5.9.0
aqt list qt5 windows desktop --arch 5.9.0
```
This happens because ListCommand is looking for an xml file at `<base>/<host>/<target>/qt5_590/Updates.xml`; that file doesn't exist because it's actually at `<base>/<host>/<target>/qt5_59/Updates.xml`. So far, this is the only exception like this.
This change accounts for this exception.
* fix whitespace