Unfortunately Coverity doesn't understand that most Qt data
structures are copy-on-write. It's a mis-feature of Qt, but
it is the way it is. Thus, passing by value is not an issue.
Out of ca. 25 warnings only two were legit. Let's silence
the others by either std::move()ing or passing by reference,
as would be idiomatic C++, which Qt is not.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Remove `renderSVGIcon()` and `renderSVGIconWidth()`, as QPixmaps can be
loaded directly from SVG, and support scaling.
Signed-off-by: Michael Keller <github@ike.ch>
In order to be able to correctly size the chart type popup, we'll need
access to the total count or rows as a property that signals changes to
QML.
The hack to use rowCount() as the READ function requires that rowCount()
can be called without argument, therefore the addition of a default
parent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For QML, the roles have to be associated dynamically with
name. Moreover, the model has to be registered as a QML
type to make it accessible from QML.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Qt's comboboxes are controlled by models, there's no way around
that. To customize the chart-selection widget this must therefore
be abstracted into a model. On the upside, this hopefully can
be used for desktop and mobile.
The model provides icons and paints a warning-symbol on it
if the statistics core code deems the chart to be not recommended.
Notably, when plotting a categorical bar chart against a
numerical value (in such a case histograms are preferred).
Includes a fix for a silly oversight in CMakelist.txt: add the
statstranslations.h header.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>