Previously, if Archive::create() failed to load a plugin, a QInputDialog was shown where the user could choose the mime-type of the archive. This was not suitable anymore, since mime-type detection is much better now and because we try all registered plugins for a mimetype.
New behavior: When a plugin fails to load, two different error messages can be shown:
- No suitable plugin was found.
- All suitable plugins failed to load.
Because we (potentially) try to load different plugins, which can fail for different reasons (missing executables, broken plugin, etc.), error message 2 can not be made more specific.
This was implemented by adding an alternative constructor for Archive which takes an error code. Part::openFile() then checks if an error message is found before continuing to load the interface, and displays the error messages.