Skip to content

Fix some compile warnings, remove some unused files

Fixes some compile warnings and removes some unused files I happened to stumble across.

First commit fixes .moc includes in files that no longer use them, like this one:

AutoMoc warning
---------------
"SRC:/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp"
includes the moc file "kis_auto_brush_widget.moc", but does not contain a Q_OBJECT, Q_GADGET, Q_NAMESPACE, Q_NAMESPACE_EXPORT, K_PLUGIN_FACTORY, K_PLUGIN_CLASS, K_PLUGIN_FACTORY_WITH_JSON or K_PLUGIN_CLASS_WITH_JSON macro.

Second commit fixes warnings like this one:

C:/kd/src/libs/pigment/resources/KoColorSet.cpp:100:1: warning: 'AddSwatchCommand' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
struct AddSwatchCommand : public KUndo2Command
^
C:/kd/src/libs/pigment/resources/KisSwatchGroup.h:89:12: note: did you mean struct here?
    friend class AddSwatchCommand;
           ^~~~~
           struct

DefaultToolTransformWidget.cpp is definitely unused and was previously deleted and accidentally undeleted, it seems.

kis_linked_pattern_manager I think was recently replaced by KisEmbeddedTextureData and no longer used.

The last commit is a recent simple typo caught by warnings. It has the effect of confusing code-highlighting into thinking everything is part of a string.

Test Plan

Compile Krita, there should be a few less warnings. Run Krita and nothing should have changed.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports