Commit 416023ee authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15

parent 490824b9
......@@ -92,8 +92,11 @@ NotesNetworkReceiver::NotesNetworkReceiver(QTcpSocket *s)
// Setup the communications
connect(d->m_sock, &QTcpSocket::readyRead, this, &NotesNetworkReceiver::slotDataAvailable);
connect(d->m_sock, &QTcpSocket::disconnected, this, &NotesNetworkReceiver::slotConnectionClosed);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->m_sock, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), this, &NotesNetworkReceiver::slotError);
#else
connect(d->m_sock, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::errorOccurred), this, &NotesNetworkReceiver::slotError);
#endif
// Setup the timer
d->m_timer = new QTimer(this);
d->m_timer->setSingleShot(true);
......
......@@ -49,8 +49,13 @@ NotesNetworkSender::NotesNetworkSender(QTcpSocket *socket)
QObject::connect(m_socket, &QTcpSocket::connected,
this, &NotesNetworkSender::slotConnected);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QObject::connect(m_socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error),
this, &NotesNetworkSender::slotError);
#else
QObject::connect(m_socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::errorOccurred),
this, &NotesNetworkSender::slotError);
#endif
QObject::connect(m_socket, &QTcpSocket::disconnected,
this, &NotesNetworkSender::slotClosed);
......
......@@ -41,7 +41,11 @@ NoteUtils::NoteUtils()
bool NoteUtils::sendToMail(QWidget *parent, const QString &title, const QString &message)
{
// get the mail action command
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList cmd_list = NoteShared::NoteSharedGlobalConfig::mailAction().split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
const QStringList cmd_list = NoteShared::NoteSharedGlobalConfig::mailAction().split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
if (cmd_list.isEmpty()) {
KMessageBox::sorry(parent, i18n("Please configure send mail action."));
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment