summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <[email protected]>2017-09-10 11:49:44 -0400
committerAllen Winter <[email protected]>2017-09-10 11:49:44 -0400
commita33763323f206937bb927fb0becb6fad78a5c5d1 (patch)
tree1abe3e69a5280b7b3b77c532fa33e71304fc9b85
parent7a21a1dbd4d2b2d31c0d60153ee655a646c8c6c3 (diff)
noteshared/src/network/notesnetworksender.cpp - micro-opt
-rw-r--r--noteshared/src/network/notesnetworksender.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/noteshared/src/network/notesnetworksender.cpp b/noteshared/src/network/notesnetworksender.cpp
index 490c159..76fdae1 100644
--- a/noteshared/src/network/notesnetworksender.cpp
+++ b/noteshared/src/network/notesnetworksender.cpp
@@ -47,10 +47,17 @@ NotesNetworkSender::NotesNetworkSender(QTcpSocket *socket)
{
// QObject:: prefix needed, otherwise the KStreamSocket::connect()
// method is called!!!
- QObject::connect(m_socket, &QTcpSocket::connected, this, &NotesNetworkSender::slotConnected);
- QObject::connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &NotesNetworkSender::slotError);
- QObject::connect(m_socket, &QTcpSocket::disconnected, this, &NotesNetworkSender::slotClosed);
- QObject::connect(m_socket, &QTcpSocket::bytesWritten, this, &NotesNetworkSender::slotWritten);
+ QObject::connect(m_socket, &QTcpSocket::connected,
+ this, &NotesNetworkSender::slotConnected);
+
+ QObject::connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error),
+ this, &NotesNetworkSender::slotError);
+
+ QObject::connect(m_socket, &QTcpSocket::disconnected,
+ this, &NotesNetworkSender::slotClosed);
+
+ QObject::connect(m_socket, &QTcpSocket::bytesWritten,
+ this, &NotesNetworkSender::slotWritten);
}
NotesNetworkSender::~NotesNetworkSender()
@@ -74,7 +81,7 @@ void NotesNetworkSender::setNote(const QString &title, const QString &text)
void NotesNetworkSender::slotConnected()
{
if (m_sender.isEmpty()) {
- m_note.prepend(m_title + "\n");
+ m_note.prepend(m_title + '\n');
} else {
m_note.prepend(m_title + " (" + m_sender + ")\n");
}