[graphics/digikam] core: cppcheck++: fix virtual calls in constructors
Gilles Caulier <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 8e06345c1257b67ce86769870ad61466085a059b by Gilles Caulier.
Committed on 09/08/2026 at 20:25.
Pushed by cgilles into branch 'master'.
cppcheck++: fix virtual calls in constructors
M +5 -4 core/libs/tags/autoassignment/autotagsengine.cpp
M +2 -2 core/libs/tags/autoassignment/autotagsengine.h
M +2 -2 core/utilities/lighttable/lighttablethumbbar.cpp
M +1 -1 core/utilities/lighttable/lighttablethumbbar.h
https://invent.kde.org/graphics/digikam/-/commit/8e06345c1257b67ce86769870ad61466085a059b
diff --git a/core/libs/tags/autoassignment/autotagsengine.cpp b/core/libs/tags/autoassignment/autotagsengine.cpp
index a266c1a977..973688fe7b 100644
--- a/core/libs/tags/autoassignment/autotagsengine.cpp
+++ b/core/libs/tags/autoassignment/autotagsengine.cpp
@@ -63,8 +63,11 @@ AutotagsEngine::AutotagsEngine(const AutotagsScanSettings& _settings, ProgressIt
d->settings = _settings;
d->newPipeline = new AutotagsPipelineObject(_settings);
- connect(d->newPipeline, SIGNAL(finished()),
- this, SLOT(slotDone()));
+ connect(d->newPipeline, &AutotagsPipelineBase::finished,
+ this, &AutotagsEngine::slotDone);
+
+ connect(this, &MaintenanceTool::progressItemCanceled,
+ this, &AutotagsEngine::slotCancel);
connect(d->newPipeline, SIGNAL(processed(MLPipelinePackageNotify::Ptr)),
this, SLOT(slotShowOneDetected(MLPipelinePackageNotify::Ptr)));
@@ -72,8 +75,6 @@ AutotagsEngine::AutotagsEngine(const AutotagsScanSettings& _settings, ProgressIt
connect(d->newPipeline, SIGNAL(skipped(MLPipelinePackageNotify::Ptr)),
this, SLOT(slotImagesSkipped(MLPipelinePackageNotify::Ptr)));
- connect(this, SIGNAL(progressItemCanceled(ProgressItem*)),
- this, SLOT(slotCancel()));
connect(d->newPipeline, SIGNAL(signalUpdateItemCount(qlonglong)),
this, SLOT(slotUpdateItemCount(qlonglong)));
diff --git a/core/libs/tags/autoassignment/autotagsengine.h b/core/libs/tags/autoassignment/autotagsengine.h
index 5334eeb15d..654bb2867f 100644
--- a/core/libs/tags/autoassignment/autotagsengine.h
+++ b/core/libs/tags/autoassignment/autotagsengine.h
@@ -53,8 +53,8 @@ private Q_SLOTS:
void slotUpdateItemCount(const qlonglong itemCount);
void slotImagesSkipped(const MLPipelinePackageNotify::Ptr&);
void slotShowOneDetected(const MLPipelinePackageNotify::Ptr&);
- void slotDone() override; // cppcheck-suppress virtualCallInConstructor
- void slotCancel() override; // cppcheck-suppress virtualCallInConstructor
+ void slotDone() override;
+ void slotCancel() override;
private:
diff --git a/core/utilities/lighttable/lighttablethumbbar.cpp b/core/utilities/lighttable/lighttablethumbbar.cpp
index 54c5066a57..5953c344b0 100644
--- a/core/utilities/lighttable/lighttablethumbbar.cpp
+++ b/core/utilities/lighttable/lighttablethumbbar.cpp
@@ -100,8 +100,8 @@ LightTableThumbBar::LightTableThumbBar(QWidget* const parent)
connect(d->imageInfoModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SIGNAL(signalContentChanged()));
- connect(settings, SIGNAL(setupChanged()),
- this, SLOT(slotSetupChanged()));
+ connect(settings, &ApplicationSettings::setupChanged,
+ this, &LightTableThumbBar::slotSetupChanged);
}
LightTableThumbBar::~LightTableThumbBar()
diff --git a/core/utilities/lighttable/lighttablethumbbar.h b/core/utilities/lighttable/lighttablethumbbar.h
index 2bb2aa8077..468102630e 100644
--- a/core/utilities/lighttable/lighttablethumbbar.h
+++ b/core/utilities/lighttable/lighttablethumbbar.h
@@ -80,7 +80,7 @@ private:
private Q_SLOTS:
- void slotSetupChanged() override; // cppcheck-suppress virtualCallInConstructor
+ void slotSetupChanged() override;
private: