File 0001-Fix-gcc12-error-ordered-comparison-of-pointer-with-i.patch of Package mingw64-kdelibs4
From dce69336375ada324ec4d2e4965fe9021a73ce26 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Mon, 26 Sep 2022 22:34:27 +0200
Subject: [PATCH] Fix gcc12 error: ordered comparison of pointer with integer
zero ('const void*' and 'int')
---
kdecore/localization/klocale_kde.cpp | 4 ++--
kio/kfile/kopenwithdialog.cpp | 2 +-
kio/kfile/kpropertiesdialog.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdecore/localization/klocale_kde.cpp b/kdecore/localization/klocale_kde.cpp
index 41c39152b9..4521a91702 100644
--- a/kdecore/localization/klocale_kde.cpp
+++ b/kdecore/localization/klocale_kde.cpp
@@ -2438,8 +2438,8 @@ QString KLocalePrivate::formatLocaleTime(const QTime &time, KLocale::TimeFormatO
bool KLocalePrivate::use12Clock() const
{
- if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) ||
- (timeFormat().contains(QString::fromLatin1("%l")) > 0)) {
+ if (timeFormat().contains(QString::fromLatin1("%I")) ||
+ timeFormat().contains(QString::fromLatin1("%l"))) {
return true;
} else {
return false;
diff --git a/kio/kfile/kopenwithdialog.cpp b/kio/kfile/kopenwithdialog.cpp
index 9c1ace86cf..914efe9903 100644
--- a/kio/kfile/kopenwithdialog.cpp
+++ b/kio/kfile/kopenwithdialog.cpp
@@ -713,7 +713,7 @@ void KOpenWithDialog::slotHighlighted(const QString& entryPath, const QString&)
// ### indicate that default value was restored
d->terminal->setChecked(d->curService->terminal());
QString terminalOptions = d->curService->terminalOptions();
- d->nocloseonexit->setChecked((terminalOptions.contains(QLatin1String("--noclose")) > 0));
+ d->nocloseonexit->setChecked(terminalOptions.contains(QLatin1String("--noclose")));
d->m_terminaldirty = false; // slotTerminalToggled changed it
}
}
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index 6611ee7e56..cd4a7a220e 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -3306,7 +3306,7 @@ void KDesktopPropsPlugin::slotAdvanced()
if (preferredTerminal == "konsole")
{
- terminalCloseBool = (d->m_terminalOptionStr.contains( "--noclose" ) > 0);
+ terminalCloseBool = d->m_terminalOptionStr.contains( "--noclose" );
w.terminalCloseCheck->setChecked(terminalCloseBool);
d->m_terminalOptionStr.remove( "--noclose");
}
--
2.35.3