From 3908aca51339b412a6e9de3a6b25a275bc21f023 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 27 Mar 2024 19:22:02 +0100 Subject: [PATCH] Make clang-format happy (cherry picked from commit 6fe9a4354ea7d8553d2f18efa49213cf84c01437) --- plugins/contacts/contactsplugin.cpp | 16 ++++++---------- .../dbusnotificationslistener.cpp | 6 ++---- plugins/sms/conversationsdbusinterface.cpp | 6 ++---- smsapp/conversationmodel.cpp | 3 +-- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/plugins/contacts/contactsplugin.cpp b/plugins/contacts/contactsplugin.cpp index 2f542eb46..737cb617c 100644 --- a/plugins/contacts/contactsplugin.cpp +++ b/plugins/contacts/contactsplugin.cpp @@ -64,8 +64,7 @@ void ContactsPlugin::synchronizeRemoteWithLocal() bool ContactsPlugin::handleResponseUIDsTimestamps(const NetworkPacket &np) { if (!np.has(QStringLiteral("uids"))) { - qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseUIDsTimestamps:" - << "Malformed packet does not have uids key"; + qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseUIDsTimestamps:" << "Malformed packet does not have uids key"; return false; } uIDList_t uIDsToUpdate; @@ -97,8 +96,8 @@ bool ContactsPlugin::handleResponseUIDsTimestamps(const NetworkPacket &np) // Check if the vcard needs to be updated if (!vcardFile.open(QIODevice::ReadOnly)) { - qCWarning(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseUIDsTimestamps:" - << "Unable to open" << filename << "to read even though it was reported to exist"; + qCWarning(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseUIDsTimestamps:" << "Unable to open" << filename + << "to read even though it was reported to exist"; continue; } @@ -136,8 +135,7 @@ bool ContactsPlugin::handleResponseUIDsTimestamps(const NetworkPacket &np) bool ContactsPlugin::handleResponseVCards(const NetworkPacket &np) { if (!np.has(QStringLiteral("uids"))) { - qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" - << "Malformed packet does not have uids key"; + qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" << "Malformed packet does not have uids key"; return false; } @@ -151,8 +149,7 @@ bool ContactsPlugin::handleResponseVCards(const NetworkPacket &np) QFile vcardFile(filename); bool vcardFileOpened = vcardFile.open(QIODevice::WriteOnly); // Want to smash anything that might have already been there if (!vcardFileOpened) { - qCWarning(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" - << "Unable to open" << filename; + qCWarning(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" << "Unable to open" << filename; continue; } @@ -160,8 +157,7 @@ bool ContactsPlugin::handleResponseVCards(const NetworkPacket &np) const QString &vcard = np.get(ID); fileWriteStream << vcard; } - qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" - << "Got" << uIDs.size() << "VCards"; + qCDebug(KDECONNECT_PLUGIN_CONTACTS) << "handleResponseVCards:" << "Got" << uIDs.size() << "VCards"; Q_EMIT localCacheSynchronized(uIDs); return true; } diff --git a/plugins/sendnotifications/dbusnotificationslistener.cpp b/plugins/sendnotifications/dbusnotificationslistener.cpp index 2c5678dc2..0017a4500 100644 --- a/plugins/sendnotifications/dbusnotificationslistener.cpp +++ b/plugins/sendnotifications/dbusnotificationslistener.cpp @@ -194,8 +194,7 @@ void DBusNotificationsListenerThread::run() "member='Notify'"); if (!error.isEmpty()) { - qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS).noquote() << "Failed to become a DBus monitor." - << "No notifictions will be sent. Error:" << error; + qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS).noquote() << "Failed to become a DBus monitor." << "No notifictions will be sent. Error:" << error; } // wake up every minute to see if we are still connected @@ -376,8 +375,7 @@ QSharedPointer DBusNotificationsListener::iconForImageData(const QVar return QSharedPointer(); if (bitsPerSample != 8) { - qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Unsupported image format:" - << "width=" << width << "height=" << height << "rowStride=" << rowStride + qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Unsupported image format:" << "width=" << width << "height=" << height << "rowStride=" << rowStride << "bitsPerSample=" << bitsPerSample << "channels=" << channels << "hasAlpha=" << hasAlpha; return QSharedPointer(); } diff --git a/plugins/sms/conversationsdbusinterface.cpp b/plugins/sms/conversationsdbusinterface.cpp index 8a1e2c0fc..6533909fb 100644 --- a/plugins/sms/conversationsdbusinterface.cpp +++ b/plugins/sms/conversationsdbusinterface.cpp @@ -76,14 +76,12 @@ QVariantList ConversationsDbusInterface::activeConversations() void ConversationsDbusInterface::requestConversation(const qint64 &conversationID, int start, int end) { if (start < 0 || end < 0) { - qCWarning(KDECONNECT_CONVERSATIONS) << "requestConversation" - << "Start and end must be >= 0"; + qCWarning(KDECONNECT_CONVERSATIONS) << "requestConversation" << "Start and end must be >= 0"; return; } if (end - start < 0) { - qCWarning(KDECONNECT_CONVERSATIONS) << "requestConversation" - << "Start must be before end"; + qCWarning(KDECONNECT_CONVERSATIONS) << "requestConversation" << "Start must be before end"; return; } diff --git a/smsapp/conversationmodel.cpp b/smsapp/conversationmodel.cpp index 523729be6..21de6b2ed 100644 --- a/smsapp/conversationmodel.cpp +++ b/smsapp/conversationmodel.cpp @@ -58,8 +58,7 @@ void ConversationModel::setDeviceId(const QString &deviceId) if (deviceId == m_deviceId) return; - qCDebug(KDECONNECT_SMS_CONVERSATION_MODEL) << "setDeviceId" - << "of" << this; + qCDebug(KDECONNECT_SMS_CONVERSATION_MODEL) << "setDeviceId" << "of" << this; if (m_conversationsInterface) { disconnect(m_conversationsInterface, &DeviceConversationsDbusInterface::conversationUpdated, this, &ConversationModel::handleConversationUpdate); disconnect(m_conversationsInterface, &DeviceConversationsDbusInterface::conversationLoaded, this, &ConversationModel::handleConversationLoaded);