From 9faa049c55d83d12e6ab7ad842494d7d5840f222 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 4 Jun 2024 19:02:58 +0200 Subject: [PATCH] Make clang-format happy --- plugins/contacts/contactsplugin.cpp | 16 ++++++++++------ .../dbusnotificationslistener.cpp | 6 ++++-- plugins/sms/conversationsdbusinterface.cpp | 6 ++++-- plugins/systemvolume/systemvolumeplugin-win.cpp | 6 +++--- smsapp/conversationmodel.cpp | 3 ++- smsapp/smscharcount.h | 4 ++-- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/plugins/contacts/contactsplugin.cpp b/plugins/contacts/contactsplugin.cpp index 737cb617c..2f542eb46 100644 --- a/plugins/contacts/contactsplugin.cpp +++ b/plugins/contacts/contactsplugin.cpp @@ -64,7 +64,8 @@ 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; @@ -96,8 +97,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; } @@ -135,7 +136,8 @@ 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; } @@ -149,7 +151,8 @@ 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; } @@ -157,7 +160,8 @@ 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 0017a4500..2c5678dc2 100644 --- a/plugins/sendnotifications/dbusnotificationslistener.cpp +++ b/plugins/sendnotifications/dbusnotificationslistener.cpp @@ -194,7 +194,8 @@ 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 @@ -375,7 +376,8 @@ 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 4a0ad5fb1..014f460de 100644 --- a/plugins/sms/conversationsdbusinterface.cpp +++ b/plugins/sms/conversationsdbusinterface.cpp @@ -76,12 +76,14 @@ 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/plugins/systemvolume/systemvolumeplugin-win.cpp b/plugins/systemvolume/systemvolumeplugin-win.cpp index a7b70b6b6..10bd3bc9d 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.cpp +++ b/plugins/systemvolume/systemvolumeplugin-win.cpp @@ -35,7 +35,7 @@ public: , _cRef(1) { } - ~CAudioEndpointVolumeCallback(){}; + ~CAudioEndpointVolumeCallback() {}; // IUnknown methods -- AddRef, Release, and QueryInterface @@ -91,9 +91,9 @@ class SystemvolumePlugin::CMMNotificationClient : public IMMNotificationClient public: CMMNotificationClient(SystemvolumePlugin &x) : enclosing(x) - , _cRef(1){}; + , _cRef(1) {}; - ~CMMNotificationClient(){}; + ~CMMNotificationClient() {}; // IUnknown methods -- AddRef, Release, and QueryInterface diff --git a/smsapp/conversationmodel.cpp b/smsapp/conversationmodel.cpp index 21de6b2ed..523729be6 100644 --- a/smsapp/conversationmodel.cpp +++ b/smsapp/conversationmodel.cpp @@ -58,7 +58,8 @@ 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); diff --git a/smsapp/smscharcount.h b/smsapp/smscharcount.h index 703412105..83ba4231e 100644 --- a/smsapp/smscharcount.h +++ b/smsapp/smscharcount.h @@ -30,8 +30,8 @@ public: */ qint32 messages; - SmsCharCount(){}; - ~SmsCharCount(){}; + SmsCharCount() {}; + ~SmsCharCount() {}; }; #endif // CHARCOUNT_H