summaryrefslogtreecommitdiffstats
path: root/src/plugins/messageservices/imap/serviceactionqueue.cpp
diff options
context:
space:
mode:
authorPekka Vuorela <pvuorela@iki.fi>2025-12-08 09:50:53 +0200
committerPekka Vuorela <pvuorela@iki.fi>2025-12-11 11:32:13 +0200
commite503dedbf6d73dc22a7ed32a78806075da589ae7 (patch)
tree273b0df42f5214a554f785c3f6f4a9f8ca36cfa3 /src/plugins/messageservices/imap/serviceactionqueue.cpp
parent15a73fae6aaffbedc287359fba119e57613a2ed1 (diff)
Clean up service plugin signal connections - minor API changes
The states and signals were painful to follow due to bad naming and excessive overloading. Here: - Renamed some API to avoid overloading, help readability and allow new connect() syntax without resolving the overloads. - updateStatus() signals and slots renamed a bit to make it clearer what is a signal and what is a slot. And avoiding overloading QMailMessageService::updateStatus() to simplify signal connection. - Cleaned up QMailTranport API. It's not doing urls but hostnames and the signals were especially hard to follow - Use the new connect() syntax in messageserver side - Avoiding some protected: / virtual methods when there's nothing even able to inherit the class. - At least print SSL errors instead of signal that's not connected anywhere. - Some minor simplifications and code style adjustments. The SSL error handling is still funny but at least a bit easier to track. Change-Id: If168e15ef068fedee46b9401d695ed5dae7962ba Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Diffstat (limited to 'src/plugins/messageservices/imap/serviceactionqueue.cpp')
-rw-r--r--src/plugins/messageservices/imap/serviceactionqueue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/messageservices/imap/serviceactionqueue.cpp b/src/plugins/messageservices/imap/serviceactionqueue.cpp
index 792b9baa..9a557dbc 100644
--- a/src/plugins/messageservices/imap/serviceactionqueue.cpp
+++ b/src/plugins/messageservices/imap/serviceactionqueue.cpp
@@ -38,7 +38,7 @@
ServiceActionQueue::ServiceActionQueue()
: _running(false)
{
- QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(executeNextCommand()));
+ QObject::connect(&_timer, &QTimer::timeout, this, &ServiceActionQueue::executeNextCommand);
}
// Takes ownership of *command.
@@ -61,8 +61,8 @@ void ServiceActionQueue::executeNextCommand()
}
_running = true;
ServiceActionCommand *command(_commands.first());
- QObject::connect(command->action(), SIGNAL(activityChanged(QMailServiceAction::Activity)),
- this, SLOT(activityChanged(QMailServiceAction::Activity)));
+ QObject::connect(command->action(), &QMailServiceAction::activityChanged,
+ this, &ServiceActionQueue::activityChanged);
command->execute();
}