Commit Graph

741 Commits

Author SHA1 Message Date
Adriaan de Groot
347a25d13d [libcalamaresui] Avoid nullptr deref
- there's a check already there, and probably this means things are hopelessly
  broken anyway, but let's not crash here.
2020-06-24 20:48:06 +02:00
Adriaan de Groot
4a6ee39f8b [libcalamaresui] Blanket unmargin the content area 2020-06-24 11:08:31 +02:00
Adriaan de Groot
bfbb0f1c49 [libcalamaresui] Mark some TODO for 3.3, in passing 2020-06-24 04:59:19 -04:00
Adriaan de Groot
22fdca8f44 [libcalamares] Use Logger::Pointer for logging void-pointers 2020-06-23 13:02:06 +02:00
Adriaan de Groot
dc0ed24f1a [libcalamaresui] Install libcalamaresui headers
- All the headers go to relevant subdirs, but we don't keep
  libcalamares and libcalamaresui apart.
- While here, remove unused variable from libcalamares CMake
2020-06-10 16:43:34 +02:00
Adriaan de Groot
6c272bc8be [libcalamares] Link yamlcpp privately
- link the library privately -- the public API uses QVariantMap
- install FindYAMLCPP just in case
- add yamlcpp explicitly in the few places that really need it
  (e.g. netinstall testing the parsing of netinstall.yaml)
2020-06-10 02:27:57 +02:00
Adriaan de Groot
dc16afac4a CMake: massage IMPORTED targets and module path
- Add the Calamares CMake-modules to the search path automatically
- Export to CalamaresTargets.cmake and use namespace Calamares::
- Document imported targets
- Find Qt, because the translations machinery will need macros from that
- The installed lib links to IMPORTED libraries from KF5, so we need
  to find them (again) as well.
2020-06-10 01:37:54 +02:00
Callum Farmer
210ce97bf6 [libcalamaresui] Update SPDX identifiers.
Update ImageRegistry.cpp
2020-06-03 12:28:58 +01:00
Adriaan de Groot
39b5dd4e6e [libcalamaresui] Avoid deadlock
- When loading QML V2, both loadQmlV2Complete() and changeSlideShowState()
  lock the same mutex, introduced in e7f4479df1.
- Explicitly unlock when loading is done and we need to change the state
  immediately.
2020-05-20 11:36:44 +02:00
Adriaan de Groot
c7d0df223a [libcalamaresui] Expose registering-a-single-module
- For testing purposes, it's useful to load a module externally
  and then register it to the ModuleManager (this hands off ownership).
- Refactor overall module loading to use the exposed single-module method.
2020-05-20 10:36:42 +02:00
Adriaan de Groot
1fec95ac48 [libcalamares] Move QML search-path initialization
- QML files need to be searched in specific places; this was initialized
  by Calamares, but not for the text application. Move initialization
  into the library.
2020-05-19 21:25:05 +02:00
Adriaan de Groot
6dffec2730 [libcalamaresui] Move QML-related directory functions to Qml.cpp 2020-05-19 21:02:06 +02:00
Adriaan de Groot
4491fb8c27 [libcalamaresui] Name QML-wrangling functions consistently
- Use "Qml" in camel-cased names
2020-05-19 21:00:05 +02:00
Adriaan de Groot
0947da3d41 [libcalamaresui] Report on QML errors
- If the slideshow fails to load entirely, say so
2020-05-19 17:08:49 +02:00
Adriaan de Groot
ec2fc5a763 [libcalamaresui] Better default font size
- Previously, unless setDefaultFontSize() was called explicitly,
  the default size would be 0, leading to unexpected and weird
  displays (and a warning on stderr).
- If setDefaultFontSize() is not called, get a sensible size instead
  (like defaultFontHeight() was already trying to do).
2020-05-19 16:44:44 +02:00
Adriaan de Groot
8db8752a41 [libcalamaresui] Remove spurious Q_FUNC_INFO 2020-05-19 16:44:44 +02:00
Adriaan de Groot
17231ae41f [libcalamaresui] Sanitize API of PrettyRadioButton
- Don't expose internals
- Drop unnecessary virtual
- Offer new API to do the things, for which internals were exposed
2020-05-18 11:26:22 +02:00
Adriaan de Groot
3b7c3c4f5d [libcalamaresui] Coding style
- Apply coding style
- Place the widget classes in namespace Calamares
- Export symbols for widgets
2020-05-18 11:26:12 +02:00
Adriaan de Groot
c4951d5090 [libcalamaresui] Move PrettyRadioButton from partition 2020-05-18 10:38:45 +02:00
Adriaan de Groot
8d4c7767d4 [libcalamaresui] Document ClickableLabel 2020-05-18 10:32:25 +02:00
Adriaan de Groot
022045ae05 [libcalamaresui] Refactor loading slideshow
- split into a separate method
- when QML is disabled, warn about QML settings
2020-05-14 17:04:35 +02:00
Adriaan de Groot
c83e5c57a4 [libcalamaresui] When QML is off, there is no Qml panel flavor 2020-05-14 16:57:14 +02:00
Adriaan de Groot
736f99768a [libcalamaresui] Don't build QML bits if they're not wanted
When WITH_QML is off (by explicit choice)

- don't build the QmlViewStep
- don't build the QML slideshow
2020-05-14 16:31:59 +02:00
Adriaan de Groot
c3c4b79147 Merge branch 'fix-slideshow' 2020-05-13 21:20:25 +02:00
Adriaan de Groot
20c1ae246d [libcalamaresui] Center slideshow pictures 2020-05-13 17:28:04 +02:00
Adriaan de Groot
5aafa0f4c4 [libcalamaresui] Expose slideshow image names for API -1
- Branding shows the slide pathnames or the slide QML, depending
  on selected API (which depends on the config-file).
- Use one slideshow or the other.
2020-05-13 17:19:46 +02:00
Adriaan de Groot
df74604755 [libcalamaresui] Implement non-QML Slideshow 2020-05-13 16:35:09 +02:00
Adriaan de Groot
e7f4479df1 [libcalamaresui] Move all the slideshow code out of ExecutionViewStep
- The SlideshowQML now handles all the bits that were in
  the viewstep.
- The viewstep uses the abstract Slideshow API.
2020-05-13 14:01:51 +02:00
Adriaan de Groot
f856c07b04 [libcalamares] Move progress signal to RequirementsModel
- It is the requirements model (checking) that reports progress, and now
  the model is accessible (ask for it with requirementsModel(), make the
  messages come from there.
2020-05-12 16:09:13 +02:00
Adriaan de Groot
fabe5ec439 [welcome] Config should not have its own RequirementsModel
- Use the one from ModuleManager
2020-05-11 16:30:26 +02:00
Adriaan de Groot
153757933a [libcalamares] Stop emitting signals with RequirementsList
- The architecture of letting someone build up a list of requirements
  from data emitted by the ModuleManager is broken: if it gets loaded
  later, it will miss data; passing around complicated objects is
  no fun anyway. Get rid of it, on the way to "ModuleManager has
  its own model of requirements".
2020-05-11 16:30:26 +02:00
Adriaan de Groot
b7c60cec66 [libcalamares] Re-vamp RequirementsChecker
- Give the ModuleManager a RequirementsModel -- that is the source
  of truth about the module-requirements of the modules managed
  by that particular ModuleManager.
- Let the RequirementsChecker operate on a given RequirementsModel.
2020-05-11 16:30:26 +02:00
Adriaan de Groot
df1f9f1b56 [libcalamaresui] Prep-work for image-slideshow
Doesn't compile (but I need to get it off this machine)

- Prepare to implement a picture-based slideshow alongside QML
- Split QML loading into the slideshow component

This might be good prep-work for moving QML loading out of the QMLViewStep as well.
2020-05-09 23:07:56 +02:00
Adriaan de Groot
bb2b5fd982 [libcalamaresui] No reason for bail() to be a method 2020-05-07 20:41:40 +02:00
Adriaan de Groot
526716556c [libcalamaresui] Store the slideshow-from-images data
- This code has existed for a long time but never stored anything
  to the Branding object, and the most literal slideshow (just some
  images) was not implemented.
2020-05-07 19:02:38 +02:00
Adriaan de Groot
a7a6c937ea [libcalamaresui] Add needed includes
- Return type QPixmap means we should definitely #include it
2020-05-06 15:23:27 +02:00
Adriaan de Groot
cd44f548f5 [libcalamaresui] Add donateUrl to the branding settings
SEE #1384
2020-05-06 14:34:37 +02:00
Adriaan de Groot
dc1a4fab8e [libcalamaresui] Chase Branding API change 2020-05-04 12:52:14 +02:00
Adriaan de Groot
62696a3a48 [libcalamaresui] Remove the special * operator for string-enums in branding
- This is a good example of being overly clever in C++
- the whole API with an enum requesting a specific string is a bit weird,
  although it makes sense from the 'might need more strings specified'
  point of view.
2020-05-04 12:52:05 +02:00
Adriaan de Groot
0e71957b74 [libcalamaresui] Apply coding style 2020-05-01 14:37:25 +02:00
Adriaan de Groot
8af17fafe1 [libcalamaresui] Register Global Storage (as 'Global') for QML 2020-05-01 14:37:25 +02:00
Adriaan de Groot
dc523525c2 [libcalamaresui] Register the right type for ViewManager (C&P typo) 2020-05-01 09:15:46 +02:00
Adriaan de Groot
1d44c88e0a [libcalamaresui] Refactor loading of stylesheet
- prep-work for adding special-case styling for productWallpaper
2020-04-30 12:18:15 +02:00
Adriaan de Groot
ddde817abf [libcalamaresui] Apply coding style 2020-04-30 12:10:09 +02:00
Adriaan de Groot
fabb351b77 [libcalamaresui] Give ViewManager widgets names for styling 2020-04-30 12:08:48 +02:00
Adriaan de Groot
86ffab1873 [libcalamares] Use convenience Logger::NoQuote 2020-04-21 16:46:48 +02:00
Adriaan de Groot
a0b4b2bf5e
Merge pull request #1381 from bill-auger/patch-welcome-banner
[welcome] add optional branding banner to welcome page
2020-04-21 13:18:44 +02:00
bill-auger
7bce58f6f2 [welcome] add optional branding banner to welcome page 2020-04-19 04:01:22 -04:00
Adriaan de Groot
e804ad2488 [libcalamaresui] Rename enlarge()
- rename enlarge to ensureSize() and change the meaning from
  "make this much bigger" to "make sure this is displayed",
  which is easier on the caller to calculate.
2020-04-17 12:56:47 +02:00
Adriaan de Groot
af4220331e [libcalamaresui] Move lambda to a "real" slot. 2020-04-03 16:38:10 +02:00
Adriaan de Groot
7393198f7b [libcalamaresui] Tell the manager explicitly when loading is done
- Add some extra checks for validity of m_currentStep (an index)
- Start off with explicitly invalid index, and keep it so until
  loading is complete; this prevents the situation where quit-at-end
  gets triggered after loading the very first module.
2020-04-03 15:36:58 +02:00
Adriaan de Groot
e15e7d1dc5 [libcalamaresui] Load panel-side settings
- Introduce an enum for panel-side
- Expose this to QML -- I can imagine that QML panels need to know
  which side of the Calamares window they're on.
- Refactor loading the setting into a method that handles both
  flavor and side
2020-04-03 11:05:37 +02:00
Adriaan de Groot
733801980c [libcalamaresui] Fix up icon name for back-button 2020-04-03 01:23:17 +02:00
Adriaan de Groot
10dd32edd2 [libcalamaresui] Fix isAtVeryEnd()
- With an empty list, the question is meaningless
- .. and we called this with an empty list while constructing the
  ViewManager; if quit-at-end is true, then this would terminate
  Calamares immediately because the list was at the end.
2020-04-02 23:50:41 +02:00
Adriaan de Groot
081f5ec4d9 [libcalamaresui] Remove unused static methods
- The UI bits that needed these button-setup functions have
  moved to CalamaresWindow (with copies of those functions)
2020-04-02 23:39:29 +02:00
Adriaan de Groot
a3c966cc6c Merge branch 'issue-1361'
FIXES #1361
2020-04-02 23:14:31 +02:00
Adriaan de Groot
e2fee79957 [libcalamaresui] Set icon on back-button 2020-04-02 17:49:08 +02:00
Adriaan de Groot
476a576dda [libcalamaresui] Ensure all button labels are accurate
- since lots of state is updated when the labels change, call that
  in the constructor so that any QML bindings get current values.
2020-04-02 15:48:43 +02:00
Adriaan de Groot
c755c7ed98 [libcalamaresui] restore quit-at-very-end functionality
- This doesn't need to go indirectly through a button
2020-04-02 13:54:14 +02:00
Adriaan de Groot
91d0ba1007 [libcalamaresui] Remove *quit* button from ViewManager
- Mostly like the other buttons
- Also show/hide the button and set tooltip
2020-04-02 13:44:49 +02:00
Adriaan de Groot
38deb66e42 [libcalamaresui] Remove *back* button from ViewManager
- Now the back button should be done by clients as well
- Refactor in CalamaresWindow to avoid leaking local button pointers
  to surrounding code.
- Add macro UPDATE_BUTTON_PROPERTY for convenience in ViewManager
  (ugh, macro) to change a value and emit corresponding update signal.
2020-04-02 12:31:14 +02:00
Adriaan de Groot
8920be6bca [libcalamaresui] Remove *next* button from ViewManager
- add properties for the next button (enabled, label, icon...)
- update those properties as normal
- connect to the properties in the UI implementation
2020-04-02 12:04:24 +02:00
Adriaan de Groot
c638343c18 [libcalamares] Give ViewManager a real quit() slot
- instead of creating a lambda, give ViewManager a real slot
- hook up the new navigation buttons to the next, back, quit slots
2020-04-01 18:45:25 +02:00
Adriaan de Groot
6c8aa5da63 [libcalamaresui] Remove commented-out code 2020-04-01 11:26:09 +02:00
Adriaan de Groot
57e6864902 [libcalamaresui] Add panel flavor
- rename enum to more general PanelFlavor
- introduce branding settings for navigation (e.g. for switching
  the navigation buttons off, or using QML)
2020-04-01 11:13:41 +02:00
Adriaan de Groot
d4083c9bbb [libcalamaresui] Add "hidden" as alias for "none" in sidebar settings 2020-04-01 11:07:23 +02:00
Adriaan de Groot
1765412b61 [libcalamaresui] Move RequirementsChecker to libcalamares
- the checker only collects and calls requirements; it has no
  UI component, and only manages data (and a thread to do the
  checking). Move it out of the UI library.
2020-03-31 23:13:13 +02:00
Adriaan de Groot
7655584022 [libcalamaresui] Move Module to libcalamares
- The Module class has no UI-specific code in it; it's all about
  loading and data-management. Move it out of the UI library.
2020-03-31 22:56:42 +02:00
Adriaan de Groot
e04f87fe95 [libcalamaresui] Refactor moduleFromDescriptor
- this function lives in Module -- and is the only thing typing
  Module to the ViewSteps and JobTypes. Split it out into its
  own funciton. Nothing else in Module needs to befriend the
  ViewSteps, so we move the friend declaration around a bit
  as well.
- while here, apply coding style.

This is prep-work for moving module to libcalamares.
2020-03-31 22:46:45 +02:00
Adriaan de Groot
4ddd1ecceb [libcalamares] Move Requirement to libcalamares
- This isn't a UI component: a requirement can be checked and
  reported-on without a UI entirely.
2020-03-31 22:13:30 +02:00
Adriaan de Groot
fff4caf0de [libcalamaresui] Apply coding style
- while here, update copyright
2020-03-30 14:16:25 +02:00
Adriaan de Groot
3d7e5bc90d [libcalamaresui] Expose just currentIndex
- drop the current and completed roles, and expose only
  the currentIndex. QML can use the QObject property on
  the model, while QWidgets can call internally through
  the model's data() function.
- we don't need to provide role names for this, so drop that bit.
- simplify the delegate code while here.
2020-03-30 14:14:10 +02:00
Adriaan de Groot
aad79f664e [libcalamaresui] Expose currentIndex also as model data 2020-03-30 14:10:20 +02:00
Adriaan de Groot
b8962cec2d [libcalamaresui] Expose currentStepIndex 2020-03-30 13:11:08 +02:00
Adriaan de Groot
1de2a4ff14 [libcalamares] Introduce quit-at-end
- In some cases, it makes sense to close Calamares automatically
  when it is done. Set *quit-at-end* to do so -- although this
  probably also means you should remove the *finished* page.
2020-03-24 15:38:43 +01:00
Adriaan de Groot
1d30c99d89 [libcalamaresui] The ExecutionViewStep is done when the queue is
- While the queue is running, pretend that the EVS is not at the
  last page.

FIXES #1351
2020-03-24 15:19:45 +01:00
Adriaan de Groot
1ec7251275 [libcalamares] Make isAtVeryEnd() internal 2020-03-24 14:57:36 +01:00
Adriaan de Groot
3b0c0435bc [libcalamaresui] Chase API change in Yaml
- We can drop a bunch of calls to toMap() now.
2020-03-20 21:55:03 +01:00
Adriaan de Groot
9fe679dca8 Merge commit 'afc0c78b4c01ac734b9877b11ae94597c685d804'
Pull in the instance-weight changes and type-improvements,
but not the part where special-casing of unsquash is dropped:
weights are still per-job, not per-module.
2020-03-18 23:58:00 +01:00
Adriaan de Groot
c4324fd3ea [libcalamaresui] Provide convenience method for context properties 2020-03-18 11:02:16 +01:00
Adriaan de Groot
e37809a126 [libcalamares] Detailed InstanceDescription type 2020-03-13 02:55:38 +01:00
Adriaan de Groot
3897bd54df Changes: write some of the QML docs
- Fix references; I decided to put it in Qml.h, which is
  the header for the code that does the work.
2020-03-12 17:37:39 +01:00
Adriaan de Groot
8d6e3e547c [libcalamaresui] Add qmlSearch for non-modules
- Refactor into a support method and two API points
- Use std::transform for doing-things-to-a-list
- Add searchQmlFile that only takes a name, for
  non-modules to use.
2020-03-12 04:17:48 +01:00
Adriaan de Groot
0fd7fec25e [libcalamaresui] Move registration into Qml-service
- Registration of QML modules may need to be done
  for more parts of Calamares. Move into the library,
  out of the model.
- Register for QML when using the QML sidebar.
2020-03-12 03:45:14 +01:00
Adriaan de Groot
c628192163 Merge branch 'progress-model' 2020-03-11 19:39:58 +01:00
Adriaan de Groot
28c2da12ae [libcalamaresui] Register in io.calamares namespace
- Register both Branding and ViewManager for QML
- Note that this changes the name of Branding
- Add code-docs about object ownership
2020-03-11 17:40:03 +01:00
Adriaan de Groot
7a8eb09cdb [libcalamaresui] Move QML-searching
- This is utility code, so it can be in the QML "service"
  from Calamares, rather than in the QmlViewStep itself.
  That makes it usable for other QML bits as well.
2020-03-11 17:12:02 +01:00
Adriaan de Groot
862b05221d [libcalamaresui] Drop 'name' parameter in QmlViewStep
- The name is just the module identifier, and now we
  search for *m@i* and also *m* from that identifier,
  the name becomes much less important -- and it
  can be set from the config key *qmlFilename* as well.
2020-03-11 15:57:08 +01:00
Adriaan de Groot
8f1ab99190 [libcalamaresui] Search module name as well
- When searching for QML file, obey module name
  (full instance, module-only) and then others.
2020-03-11 15:53:01 +01:00
Adriaan de Groot
165bcfd75d [libcalamaresui] "namespace" QML settings
- To avoid name-collisions in otherwise well-behaved
  modules and configurations, make the QML settings
  more specific:
    search -> qmlSearch
    filename -> qmlFilename
2020-03-11 15:36:42 +01:00
Adriaan de Groot
99c03f7fbb [libcalamaresui] Behave better as a model 2020-03-11 05:01:39 +01:00
Adriaan de Groot
8f0a6d3065 [calamares] The ViewManager is its own model
- Having a ProgressTreeModel that does nothing but
  proxy to ViewManager methods is kind of useless.
- Move the relevant code from ProgressTreeModel to
  ViewManager.
- Remove now-unused ProgressTreeModel.
2020-03-11 04:49:38 +01:00
Adriaan de Groot
e9965d37e3 [calamares] Don't create sidebar if we don't want it 2020-03-10 18:05:24 -05:00
Adriaan de Groot
80f49bed1d [libcalamaresui] Add a sidebar flavor setting 2020-03-10 17:59:06 -05:00
Adriaan de Groot
841ea9ff48 [libcalamares] Tidy up includes
- Remove commented-out includes
- Consistent punctuation
2020-03-09 21:05:15 -05:00
Adriaan de Groot
1bb43e06e2 Merge branch 'master' into kpmcore-manager 2020-02-19 18:34:44 +01:00
Adriaan de Groot
bff07ded25 Merge remote-tracking branch 'origin/welcome-q'
- Updates QmlViewStep with slightly neater API
- Introduces Config object for QML pages
- Updates notesqml and welcomeq to use that API
2020-02-19 12:56:04 +01:00
Adriaan de Groot
94f5b13db0 [libcalamaresui] Restore previous DLLEXPORT names
- Different libraries should have different EXPORTs, so that
   you can IMPORT one while building the other. Reported (and
   kindly explained) by Kevin Kofler.
 - Stick to one header file, though.

While here, update copyright on file.
2020-02-17 16:55:17 +01:00
Adriaan de Groot
aaa6f6bd55 [libcalamaresui] Drop UiDllMacro.h
- The scattering of DLL export macro's is kind of useless;
   there are several headers, and then the export macro isn't
   even applied consistently. Just drop the one for UI exports,
   which was only used in libcalamaresui.
2020-02-17 11:32:28 +01:00
Adriaan de Groot
e72ecaafd3 Merge branch 'kpmcore-manager'
Introduces a "partitioning service" into libcalamares,
shuffles a bunch of things into it, tries to help out
with settling the system between partitioning actions.
2020-02-13 13:41:53 +01:00
Adriaan de Groot
f094cb543b [libcalamaresui] Set config object earlier
- The config context object should be set earlier, otherwise
   QML code will try binding to a non-existent config already
 - Document that QMLViewStep::setConfigurationMap() parent implementation
   should be called **last**, at the end of the subclass implementation.
2020-02-12 22:33:49 +01:00
Adriaan de Groot
85b873a1a2 [libcalamaresui] Log QML error message
- When loading fails, log a useful error message from the QML
   engine (to help debug the QML)
2020-02-12 17:58:21 +01:00
Adriaan de Groot
49ed97cb77 [libcalamares] Allow QML ViewSteps to expose a config object 2020-02-12 17:51:10 +01:00
Adriaan de Groot
18942f835f [libcalamares] Remove confusing name-qualifiers
- Using Branding::ImageEntry, when ImageEntry is an enum class
   defined *in* Branding, is superfluous, and it also confuses
   moc; the enum type isn't recognized from QML.
2020-02-12 15:35:11 +01:00
Camilo Higuita
15d8503726 [libcalamaresui] Expose the branding strings & urls to qml 2020-02-12 15:18:24 +01:00
Adriaan de Groot
152c3352c2 [welcomeq] Compile the QML into the module
- Default implementation is in the QRC
 - Register Branding for QML modules (just once)
2020-02-12 15:08:18 +01:00
Camilo Higuita
1f2f1a657e [libcalamaresui] Expose Branding strings to QML 2020-02-12 13:57:26 +01:00
Adriaan de Groot
39a5453904 [libcalamaresui] Add QML onActivate() and onLeave() calls.
- This comes from the ExecutionViewStep, V2 loading, which
   notifies the QML that the QML is now active.
2020-02-07 22:18:23 +01:00
Adriaan de Groot
1f34c2834e [libcalamaresui] Move definitions inside namespace {}
- Remove the extra Calamares:: namespace specifier from half the
   definitions.
2020-02-07 21:33:34 +01:00
Adriaan de Groot
12675be516 [libcalamaresui] Factor out "simple" QML method calls 2020-02-07 21:25:55 +01:00
Adriaan de Groot
eaea262449 Merge branch 'master' into qml 2020-02-05 18:03:31 +01:00
Adriaan de Groot
94083edf9c Merge branch 'master' into kpmcore-manager 2020-01-29 12:55:46 +01:00
Adriaan de Groot
71a73ee1a1 [libcalamares] PythonJob created with InstanceKey 2020-01-25 15:15:32 +01:00
Adriaan de Groot
96946a8447 Merge branch 'fix-unpackfs-progress'
This is an ugly hack, using Bill Auger's support for Job weights.
The unpackfs job is arbitrarily awarded a weight of 12. That makes it
(in a Netrunner install) use progress from 12% to 40% or so, overall,
as all the files are unpacked.

Also fixes bug reported by Kevin Kofler that unpackfs was only reporting
progress when it hit an exact multiple of 100 (instead of over 100).

SEE #1176
2020-01-25 11:53:31 +01:00
Adriaan de Groot
d4b24894cb [libcalamares] Weigh unpackfs extra heavy
- This is a gross hack, which hard-codes unpackfs as much-heavier
   than other Python modules.
2020-01-25 02:45:52 +01:00
Adriaan de Groot
83ffbd5126 [libcalamaresui] Only load config file if there is one
- finally, no more warnings for modules that are NO_CONFIG
   (or noconfig: true) and don't have a config file.
2020-01-24 21:47:54 +01:00
Adriaan de Groot
f366e3840f [libcalamaresui] Chase stronger typing of ModuleDescriptor 2020-01-24 21:46:18 +01:00
Adriaan de Groot
00deeec8c8 [libcalamaresui] Use InstanceKey instead of strings
- Replace return type of Module::instanceKey() by the structured
   ModuleSystem::InstanceKey type
 - Chase API breakage
2020-01-24 17:47:06 +01:00
Adriaan de Groot
abdeb07bd3 [dummyqml] Minor polishing in Qml module
- document the default filename better
 - mark TODO actually loading the instance-id file
2020-01-24 17:14:45 +01:00
Adriaan de Groot
6530c889f0 Merge remote-tracking branch 'origin/use-idkey' into no-config
- Join to a single branch that does a bunch of tidying
   in the type-strictness of module interfaces.
2020-01-24 13:05:22 +01:00
Adriaan de Groot
155db29ccf [libcalamares] Add a ModuleSystem::Descriptor
- this is currently just an alias for QVariantMap, which is
   the type already in use.
 - future plan is to tighten this up and have an actual
   Descriptor class that carries only the information
   actually needed for the module descriptor.
2020-01-24 12:59:35 +01:00
Adriaan de Groot
974d795390 [libcalamares] Shuffle module-loading logic
- group ifs by the state of thisModule
2020-01-21 19:57:16 +01:00
Adriaan de Groot
58931d99fa [libcalamaresui] Support noconfig setting
- look up the descriptor and use its noconfig value
 - return empty QString if noconfig is set; this does not
   apply to custom instances
2020-01-21 19:57:16 +01:00
Adriaan de Groot
649eb94d24 [libcalamaresui] Type-alias for module descriptors 2020-01-21 19:29:47 +01:00
Adriaan de Groot
8fbe676280 [libcalamaresui] Refactor finding config file name
- check for broken custom instances earlier in the loop
 - make free function for finding the config file name
2020-01-21 19:22:13 +01:00
Adriaan de Groot
fed0c46612 [libcalamaresui] Change return type of loadedInstanceKeys()
- Replace stringlist with a stronger-typed list of InstanceKey objects
 - Move smashing-that-to-stringlist into consumers of the list
   (just one, the debug window)
2020-01-19 18:07:27 +01:00
Adriaan de Groot
750465153f [dummyqml] Improve QML searching
- if the filename is an absolute path, use that
 - support searching in branding directory
2020-01-13 22:28:21 +01:00
Adriaan de Groot
7f8a31007a [dummyqml] Search for files
- start implementation of searching-for-qml
 - add a *filename* configuration item, so that the filename
   can be set per-instance (via the config file)
2020-01-13 22:04:27 +01:00
Adriaan de Groot
ed4127f661 [libcalamaresui] Shuffle the module interface
- introduce NamedEnum lookup tables for interface and type
 - drop "final" and "virtual" from methods that don't make
   sense as virtual
 - shuffle declaration order so the virtual API for modules
   sits together
2020-01-12 12:18:13 +01:00
Adriaan de Groot
f89c137c90 [libcalamaresui] Migrate module to using InstanceKey
- Trying to get away from untyped strings with special meaning.
 - The "split identifier" branch tried the same thing, but
   was duplicating the existing InstanceKey.h work.
2020-01-12 11:49:10 +01:00
Adriaan de Groot
a7e1a1f9fc [libcalamaresui] Refactor Module::initFrom()
- generic initFrom() also sets the instance id
 - subclass-specific initFrom() now pure virtual in base
 - chase changes in subclasses
2020-01-12 11:37:22 +01:00
Adriaan de Groot
04615b251c [dummyqml] Make prettyName() return a sentence with . 2020-01-10 17:47:02 +01:00
Adriaan de Groot
ce6d54ad95 [libcalamaresui] Improve failure message, unbreak loading
- example loading had an X inserted in filename (to test failure)
 - add a space between name and failure
2020-01-10 17:45:09 +01:00
Adriaan de Groot
fed298b179 [libcalamaresui] Defer QML loading
- need a configuration before we can start loading (to support
   the variable search paths)
 - refactor showing a failure in the spinner widget. On failure,
   the spinner will never go away, so a message for the user is good.
 - stop clang-format from messing up the table of names.
2020-01-10 17:41:20 +01:00
Adriaan de Groot
e7e66497d2 [libcalamaresui] Introduce search method for QML UI modules
- add a sample config and documentation in dummyqml/
2020-01-10 17:19:15 +01:00
Adriaan de Groot
f6d89354a1 Merge branch 'master' into kpmcore-manager 2020-01-10 14:54:13 +01:00
Adriaan de Groot
e6713d456c [libcalamaresui] Need explicit qrc: scheme 2020-01-10 13:44:26 +01:00
Adriaan de Groot
c03c6fc8ed [libcalamaresui] Qml loading
- this is mostly copied from ExecutionViewStep (only the V2 QML
   loading), which does the same kind of thing.
 - loading from QRC does not work yet
2020-01-10 13:39:03 +01:00
Adriaan de Groot
44b250809f [libcalamaresui] Add spinner to QmlViewStep
- view step now has a widget, doesn't load QML yet
2020-01-10 13:10:55 +01:00
Adriaan de Groot
60c1d40b20 [libcalamaresui] Log which ViewStep is broken
- a ViewStep with no widget will crash the application;
   print out its name before doing so.
2020-01-10 12:56:46 +01:00
Adriaan de Groot
4924839217 [libcalamaresui] Start QmlViewStep 2020-01-10 12:13:40 +01:00
Adriaan de Groot
16a460adff [libcalamaresui] Move ExecutionViewStep where it belongs
- viewpages/ collects the ViewStep implementations
 - chase header moving and tidy some #includes
2020-01-10 12:07:35 +01:00
Adriaan de Groot
970702daa0 [libcalamaresui] Tidy up includes 2020-01-09 21:39:34 +01:00
Adriaan de Groot
17d09342e9 [libcalamaresui] Add a setting for window placement 2020-01-07 00:27:11 +01:00
Adriaan de Groot
c030cc41cd [libcalamaresui] Refactor button-creation
- The "convenience" method was no longer convenient, since
   we now place strings on the buttons by default.
 - While here, **name** the buttons so they can be themed.
2019-10-22 15:03:37 +02:00
Adriaan de Groot
b78eacd7a8 [libcalamaresui] Set button texts always
- if the welcome module wasn't loaded (or loading otherwise failed)
   then no text was set, leading to confusing screens with
   buttons with icons but no label.
2019-10-21 19:47:58 +02:00
Adriaan de Groot
5ac4f3ec38 [libcalamaresui] Fix up module dependency checking
- If a module exists, and has unmet dependencies, then
   that is only a problem if the module itself is *used*.
   Merely existing is ok.

This triggers on FreeBSD, where partition isn't built, but
bootloader depends on partition -- so you can never start
Calamares on FreeBSD, because bootloader depends on something
non-existent.

Relax the check: just warn, and only fail if a non-existent
module is used (all those with unmet dependencies are considered
non-existent).
2019-10-21 19:28:59 +02:00
Adriaan de Groot
a9a12820d8 [libcalamaresui] Log the found-modules
- fix up comment because it described an old member variable name
 - log number of modules found (all the *potential* modules)
2019-10-21 19:16:15 +02:00
Adriaan de Groot
c4b0511f8d [libcalamaresui] Improve debug message for bad dirs
- Calamares scans **all** subdirs of the module-directory
   for a module.desc and complains about those that don't have
   a module.desc.
 - For ./calamares -d runs from the build-directory, this
   leads to a few complaints when some plugins have been
   ignored (and so no module.desc is generated for them).
2019-10-21 18:08:16 +02:00
Andrius Štikonas
490c14d93d QLatin1Literal->QLatin1String. 2019-09-21 20:44:33 +01:00