From 32e9d58d95666bcb71eae0b7e576a0f4750aab86 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 3 May 2024 20:53:39 +0300 Subject: [PATCH] generic: compiler warning fixes Signed-off-by: Ivailo Monev --- kcontrol/colors/colorscm.cpp | 5 ++++- plasma/applets/digital-clock/digitalclock.cpp | 2 +- plasma/applets/launcher/launcher.cpp | 1 - plasma/applets/system-monitor/system-monitor.cpp | 1 - plasma/wallpapers/image/backgroundlistmodel.cpp | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kcontrol/colors/colorscm.cpp b/kcontrol/colors/colorscm.cpp index 38f95cd6..99d83d54 100644 --- a/kcontrol/colors/colorscm.cpp +++ b/kcontrol/colors/colorscm.cpp @@ -457,7 +457,10 @@ void KColorCm::variesClicked() // find which button was changed const int row = sender()->objectName().toInt(); - QColor color = QColorDialog::getColor(color, this, KDialog::makeStandardCaption(i18n("Select Color"), this)); + QColor color = QColorDialog::getColor( + QColor(Qt::white), + this, KDialog::makeStandardCaption(i18n("Select Color"), this) + ); if(color.isValid()) { changeColor(row, color); diff --git a/plasma/applets/digital-clock/digitalclock.cpp b/plasma/applets/digital-clock/digitalclock.cpp index 579cffc2..0fe96179 100644 --- a/plasma/applets/digital-clock/digitalclock.cpp +++ b/plasma/applets/digital-clock/digitalclock.cpp @@ -149,7 +149,7 @@ void DigitalClockApplet::createConfigurationInterface(KConfigDialog *parent) void DigitalClockApplet::constraintsEvent(Plasma::Constraints constraints) { - if (constraints && Plasma::SizeConstraint || constraints & Plasma::FormFactorConstraint) { + if (constraints & Plasma::SizeConstraint || constraints & Plasma::FormFactorConstraint) { switch (formFactor()) { // panel case Plasma::FormFactor::Horizontal: { diff --git a/plasma/applets/launcher/launcher.cpp b/plasma/applets/launcher/launcher.cpp index 421c32ed..0dbb407c 100644 --- a/plasma/applets/launcher/launcher.cpp +++ b/plasma/applets/launcher/launcher.cpp @@ -1156,7 +1156,6 @@ void LauncherApplications::slotCheckBookmarks() QStringList bookmarkurls; KBookmarkGroup bookmarkgroup = m_bookmarkmanager->root(); KBookmark bookmark = bookmarkgroup.first(); - bool isinfavorites = false; while (!bookmark.isNull()) { bookmarkurls.append(bookmark.url().url()); bookmark = bookmarkgroup.next(bookmark); diff --git a/plasma/applets/system-monitor/system-monitor.cpp b/plasma/applets/system-monitor/system-monitor.cpp index 25ffabf8..3ac0a575 100644 --- a/plasma/applets/system-monitor/system-monitor.cpp +++ b/plasma/applets/system-monitor/system-monitor.cpp @@ -41,7 +41,6 @@ static const int s_monitorsid = -1; static const int s_update = 1; // 1 sec static const QSizeF s_minimumframesize = QSizeF(150, 90); static const QSizeF s_minimummetersize = QSizeF(90, 90); -static const int s_textoffset = 10; enum KSensorType { UnknownSensor = 0, diff --git a/plasma/wallpapers/image/backgroundlistmodel.cpp b/plasma/wallpapers/image/backgroundlistmodel.cpp index 64d4f4cf..072ab70c 100644 --- a/plasma/wallpapers/image/backgroundlistmodel.cpp +++ b/plasma/wallpapers/image/backgroundlistmodel.cpp @@ -175,7 +175,6 @@ QSize BackgroundListModel::bestSize(Plasma::Package *package) const if (m_structureParent) { QModelIndex index = indexOf(image); if (index.isValid()) { - Plasma::Package *package = m_packages.at(index.row()); m_structureParent.data()->updateScreenshot(index); } }