Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 67d7dd05 authored by Kevin Funk's avatar Kevin Funk

Make compile with Qt 5.5 again

parent 1e125abf
......@@ -36,7 +36,12 @@ Visualizer::Visualizer(const QString& resultsFile, QObject* parent)
: QProcess(parent)
, m_resultsFile(resultsFile)
{
connect(this, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
#if QT_VERSION < 0x050600
connect(this, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
#else
connect(this, &QProcess::errorOccurred,
#endif
this, [this](QProcess::ProcessError error) {
QString errorMessage;
if (error == QProcess::FailedToStart) {
errorMessage += i18n("Failed to start visualizer from \"%1\".", program());
......
......@@ -43,7 +43,12 @@ CMakeServer::CMakeServer(QObject* parent)
m_process.setProcessChannelMode(QProcess::ForwardedChannels);
connect(&m_process, &QProcess::errorOccurred, this, [this, path](QProcess::ProcessError error) {
#if QT_VERSION < 0x050600
connect(&m_process, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
#else
connect(&m_process, &QProcess::errorOccurred,
#endif
this, [this, path](QProcess::ProcessError error) {
qCWarning(CMAKE) << "cmake server error:" << error << path << m_process.readAllStandardError() << m_process.readAllStandardOutput();
});
connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished), this, [](int code){
......
......@@ -118,7 +118,7 @@ CMakeServerImportJob::CMakeServerImportJob(KDevelop::IProject* project, CMakeSer
, m_server(server)
, m_project(project)
{
connect(m_server, &CMakeServer::disconnected, this, [this]() {
connect(m_server.data(), &CMakeServer::disconnected, this, [this]() {
setError(UnexpectedDisconnect);
emitResult();
});
......@@ -129,12 +129,12 @@ void CMakeServerImportJob::start()
if (m_server->isServerAvailable())
doStart();
else
connect(m_server, &CMakeServer::connected, this, &CMakeServerImportJob::doStart);
connect(m_server.data(), &CMakeServer::connected, this, &CMakeServerImportJob::doStart);
}
void CMakeServerImportJob::doStart()
{
connect(m_server, &CMakeServer::response, this, &CMakeServerImportJob::processResponse);
connect(m_server.data(), &CMakeServer::response, this, &CMakeServerImportJob::processResponse);
m_server->handshake(m_project->path(), CMake::currentBuildDir(m_project));
}
......
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