diff --git a/breakpointcontroller.cpp b/breakpointcontroller.cpp --- a/breakpointcontroller.cpp +++ b/breakpointcontroller.cpp @@ -31,8 +31,8 @@ BreakpointController::BreakpointController(DebugSession* parent) : IBreakpointController(parent) { - connect(debugSession(), SIGNAL(stateChanged(KDevelop::IDebugSession::DebuggerState)), - SLOT(stateChanged(KDevelop::IDebugSession::DebuggerState))); + connect(debugSession(), &DebugSession::stateChanged, this, + &BreakpointController::stateChanged); } void BreakpointController::sendMaybe(KDevelop::Breakpoint* breakpoint) diff --git a/connection.cpp b/connection.cpp --- a/connection.cpp +++ b/connection.cpp @@ -46,10 +46,10 @@ m_codec = QTextCodec::codecForLocale(); - connect(m_socket, SIGNAL(disconnected()), this, SIGNAL(closed())); - connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(error(QAbstractSocket::SocketError))); + connect(m_socket,&QTcpSocket::disconnected, this, &Connection::closed); + connect(m_socket, static_cast(&QTcpSocket::error), this, &Connection::error); - connect(m_socket, SIGNAL(readyRead()), this, SLOT(readyRead())); + connect(m_socket, &QTcpSocket::readyRead, this, &Connection::readyRead); } Connection::~Connection() diff --git a/debugjob.cpp b/debugjob.cpp --- a/debugjob.cpp +++ b/debugjob.cpp @@ -141,9 +141,16 @@ m->setFilteringStrategy(KDevelop::OutputModel::ScriptErrorFilter); setModel(m); - connect(m_lineMaker, SIGNAL(receivedStdoutLines(const QStringList&)), model(), SLOT(appendLines(QStringList))); - connect(m_proc, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError))); - connect(m_proc, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(processFinished(int,QProcess::ExitStatus))); + connect(m_lineMaker, &KDevelop::ProcessLineMaker::receivedStdoutLines, model(),&KDevelop::OutputModel::appendLines); + +#if QT_VERSION < 0x050600 + connect(m_proc, static_cast(&QProcess::error), +#else + connect(m_proc, &QProcess::errorOccurred, +#endif + this, &XDebugJob::processError); + + connect(m_proc, static_cast (&QProcess::finished), this, &XDebugJob::processFinished); QStringList env = l.createEnvironment(envgrp, m_proc->systemEnvironment()); env << "XDEBUG_CONFIG=\"remote_enable=1 \""; @@ -303,7 +310,7 @@ setObjectName(cfg->name()); - connect(m_session, SIGNAL(finished()), SLOT(sessionFinished())); + connect(m_session, &KDevelop::IDebugSession::finished,this, &XDebugBrowserJob::sessionFinished); m_session->setAcceptMultipleConnections(true); } diff --git a/debugsession.cpp b/debugsession.cpp --- a/debugsession.cpp +++ b/debugsession.cpp @@ -73,7 +73,7 @@ qDebug(); int remotePortSetting = m_launchConfiguration->config().readEntry("RemotePort", 9000); if (m_server->listen(QHostAddress::Any, remotePortSetting)) { - connect(m_server, SIGNAL(newConnection()), this, SLOT(incomingConnection())); + connect(m_server, &QTcpServer::newConnection, this, &DebugSession::incomingConnection); } else { error = i18n("Opening port %1 failed: %2.", remotePortSetting, m_server->errorString()); qWarning() << "Error" << m_server->errorString(); @@ -105,12 +105,12 @@ } m_connection = new Connection(client, this); - connect(m_connection, SIGNAL(output(QString)), SIGNAL(output(QString))); - connect(m_connection, SIGNAL(outputLine(QString)), SIGNAL(outputLine(QString))); - connect(m_connection, SIGNAL(stateChanged(KDevelop::IDebugSession::DebuggerState)), SIGNAL(stateChanged(KDevelop::IDebugSession::DebuggerState))); - connect(m_connection, SIGNAL(stateChanged(KDevelop::IDebugSession::DebuggerState)), SLOT(_stateChanged(KDevelop::IDebugSession::DebuggerState))); - connect(m_connection, SIGNAL(currentPositionChanged(QUrl,int)), SLOT(currentPositionChanged(QUrl,int))); - connect(m_connection, SIGNAL(closed()), SLOT(connectionClosed())); + connect(m_connection, &Connection::output, this, &DebugSession::output); + connect(m_connection, &Connection::outputLine, this, &DebugSession::outputLine); + connect(m_connection, &Connection::stateChanged, this, &DebugSession::stateChanged); + connect(m_connection, &Connection::stateChanged, this, &DebugSession::_stateChanged); + connect(m_connection, &Connection::currentPositionChanged,this, &DebugSession::currentPositionChanged); + connect(m_connection, &Connection::closed, this, &DebugSession::connectionClosed); if (!m_acceptMultipleConnections) { closeServer(); diff --git a/launchconfigurationpage.cpp b/launchconfigurationpage.cpp --- a/launchconfigurationpage.cpp +++ b/launchconfigurationpage.cpp @@ -40,7 +40,7 @@ m_ui = new Ui::LaunchConfigurationWidget; m_ui->setupUi(this); - connect(m_ui->pathMappings, SIGNAL(changed()), SIGNAL(changed())); + connect(m_ui->pathMappings, &KDevelop::PathMappingsWidget::changed, this, &ConfigPage::changed); } QIcon ConfigPage::icon() const