projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modernize: Use auto where the type is clear from context
[quassel.git]
/
src
/
common
/
eventmanager.cpp
diff --git
a/src/common/eventmanager.cpp
b/src/common/eventmanager.cpp
index
503babf
..
606356d
100644
(file)
--- a/
src/common/eventmanager.cpp
+++ b/
src/common/eventmanager.cpp
@@
-207,7
+207,7
@@
void EventManager::registerEventHandler(QList<EventType> events, QObject *object
void EventManager::postEvent(Event *event)
{
if (sender() && sender()->thread() != this->thread()) {
void EventManager::postEvent(Event *event)
{
if (sender() && sender()->thread() != this->thread()) {
-
QueuedQuasselEvent
*queuedEvent = new QueuedQuasselEvent(event);
+
auto
*queuedEvent = new QueuedQuasselEvent(event);
QCoreApplication::postEvent(this, queuedEvent);
}
else {
QCoreApplication::postEvent(this, queuedEvent);
}
else {
@@
-223,7
+223,7
@@
void EventManager::postEvent(Event *event)
void EventManager::customEvent(QEvent *event)
{
if (event->type() == QEvent::User) {
void EventManager::customEvent(QEvent *event)
{
if (event->type() == QEvent::User) {
-
QueuedQuasselEvent
*queuedEvent = static_cast<QueuedQuasselEvent *>(event);
+
auto
*queuedEvent = static_cast<QueuedQuasselEvent *>(event);
processEvent(queuedEvent->event);
event->accept();
}
processEvent(queuedEvent->event);
event->accept();
}
@@
-258,7
+258,7
@@
void EventManager::dispatchEvent(Event *event)
// special handling for numeric IrcEvents
if ((type & ~IrcEventNumericMask) == IrcEventNumeric) {
// special handling for numeric IrcEvents
if ((type & ~IrcEventNumericMask) == IrcEventNumeric) {
-
::IrcEventNumeric
*numEvent = static_cast< ::IrcEventNumeric *>(event);
+
auto
*numEvent = static_cast< ::IrcEventNumeric *>(event);
if (!numEvent)
qWarning() << "Invalid event type for IrcEventNumeric!";
else {
if (!numEvent)
qWarning() << "Invalid event type for IrcEventNumeric!";
else {