Commit 624bd403 authored by Kevin Funk's avatar Kevin Funk
Browse files

Clazy fixit: fix-old-style-connect

parent ac30c478
......@@ -54,7 +54,7 @@ HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
// signal will never be emitted by the corresponding QWebView.
if (!origLen) {
qCDebug(QTHELP) << "Empty data for" << request.url().toDisplayString();
QTimer::singleShot(0, this, SIGNAL(finished()));
QTimer::singleShot(0, this, &QNetworkReply::finished);
}
// Fix broken CSS images (tested on Qt 5.5.1 and 5.7.0)
......@@ -64,8 +64,8 @@ HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
QTimer::singleShot(0, this, SIGNAL(readyRead()));
QTimer::singleShot(0, this, &QNetworkReply::metaDataChanged);
QTimer::singleShot(0, this, &QIODevice::readyRead);
}
qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
......@@ -76,7 +76,7 @@ qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
data.remove(0, len);
}
if (!data.length())
QTimer::singleShot(0, this, SIGNAL(finished()));
QTimer::singleShot(0, this, &QNetworkReply::finished);
return len;
}
......
......@@ -187,10 +187,10 @@ ClangSupport::ClangSupport(QObject* parent, const QVariantList& )
auto model = new KDevelop::CodeCompletion( this, new ClangCodeCompletionModel(m_index.data(), this), name() );
// TODO: use direct signal/slot connect syntax for 5.1
connect(model, SIGNAL(registeredToView(KTextEditor::View*)),
this, SLOT(disableKeywordCompletion(KTextEditor::View*)));
connect(model, SIGNAL(unregisteredFromView(KTextEditor::View*)),
this, SLOT(enableKeywordCompletion(KTextEditor::View*)));
connect(model, &CodeCompletion::registeredToView,
this, &ClangSupport::disableKeywordCompletion);
connect(model, &CodeCompletion::unregisteredFromView,
this, &ClangSupport::enableKeywordCompletion);
for(const auto& type : DocumentFinderHelpers::mimeTypesList()){
KDevelop::IBuddyDocumentFinder::addFinder(type, this);
}
......
......@@ -114,7 +114,7 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent)
m_asyncResetTimer = new QTimer(this);
m_asyncResetTimer->setInterval(15000);
m_asyncResetTimer->setSingleShot(true);
connect(m_asyncResetTimer, SIGNAL(timeout()), SLOT(resetCodeModel()));
connect(m_asyncResetTimer, &QTimer::timeout, this, &ModelManagerInterface::resetCodeModel);
qRegisterMetaType<QmlJS::Document::Ptr>("QmlJS::Document::Ptr");
qRegisterMetaType<QmlJS::LibraryInfo>("QmlJS::LibraryInfo");
......
......@@ -55,8 +55,8 @@ Utils::FileSystemWatcher *PluginDumper::pluginWatcher()
if (!m_pluginWatcher) {
m_pluginWatcher = new Utils::FileSystemWatcher(this);
m_pluginWatcher->setObjectName(QLatin1String("PluginDumperWatcher"));
connect(m_pluginWatcher, SIGNAL(fileChanged(QString)),
this, SLOT(pluginChanged(QString)));
connect(m_pluginWatcher, &Utils::FileSystemWatcher::fileChanged,
this, &PluginDumper::pluginChanged);
}
return m_pluginWatcher;
}
......
......@@ -63,8 +63,8 @@ QMakeBuilderPreferences::QMakeBuilderPreferences(KDevelop::IPlugin* plugin,
connect(m_prefsUi->buildDirCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(loadOtherConfig(QString)));
connect(m_prefsUi->buildDirCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
&QMakeBuilderPreferences::changed);
connect(m_prefsUi->addButton, SIGNAL(pressed()), this, SLOT(addBuildConfig()));
connect(m_prefsUi->removeButton, SIGNAL(pressed()), this, SLOT(removeBuildConfig()));
connect(m_prefsUi->addButton, &QAbstractButton::pressed, this, &QMakeBuilderPreferences::addBuildConfig);
connect(m_prefsUi->removeButton, &QAbstractButton::pressed, this, &QMakeBuilderPreferences::removeBuildConfig);
reset(); // load initial values
}
......
......@@ -129,9 +129,9 @@ void CTestRunJob::start()
m_outputJob->setTitle(title);
connect(m_outputJob->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), SLOT(rowsInserted(QModelIndex,int,int)));
connect(m_outputJob->model(), &QAbstractItemModel::rowsInserted, this, &CTestRunJob::rowsInserted);
}
connect(m_job, SIGNAL(finished(KJob*)), SLOT(processFinished(KJob*)));
connect(m_job, &KJob::finished, this, &CTestRunJob::processFinished);
ICore::self()->testController()->notifyTestRunStarted(m_suite, cases_selected);
}
......
......@@ -116,8 +116,8 @@ void QMakeJob::start()
m_process->setProcessChannelMode(QProcess::MergedChannels);
auto lineMaker = new KDevelop::ProcessLineMaker(m_process, this);
connect(lineMaker, SIGNAL(receivedStdoutLines(QStringList)), m_model, SLOT(appendLines(QStringList)));
connect(lineMaker, SIGNAL(receivedStderrLines(QStringList)), m_model, SLOT(appendLines(QStringList)));
connect(lineMaker, &ProcessLineMaker::receivedStdoutLines, m_model, &OutputModel::appendLines);
connect(lineMaker, &ProcessLineMaker::receivedStderrLines, m_model, &OutputModel::appendLines);
connect(m_process, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError)));
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(processFinished(int,QProcess::ExitStatus)));
......
......@@ -100,7 +100,7 @@ QMakeProjectManager::QMakeProjectManager(QObject* parent, const QVariantList&)
SLOT(slotFolderAdded(KDevelop::ProjectFolderItem*)));
m_runQMake = new QAction(QIcon::fromTheme("qtlogo"), i18n("Run QMake"), this);
connect(m_runQMake, SIGNAL(triggered(bool)), this, SLOT(slotRunQMake()));
connect(m_runQMake, &QAction::triggered, this, &QMakeProjectManager::slotRunQMake);
}
QMakeProjectManager::~QMakeProjectManager()
......@@ -311,7 +311,7 @@ ProjectFolderItem* QMakeProjectManager::import(IProject* project)
QMakeUtils::checkForNeedingConfigure(project);
ProjectFolderItem* ret = AbstractFileManagerPlugin::import(project);
connect(projectWatcher(project), SIGNAL(dirty(QString)), this, SLOT(slotDirty(QString)));
connect(projectWatcher(project), &KDirWatch::dirty, this, &QMakeProjectManager::slotDirty);
return ret;
}
......
......@@ -76,8 +76,8 @@ Dialog::Dialog(QWidget *parent, Account *account)
buttonBox->addButton(forceSyncButton, QDialogButtonBox::ActionRole);
connect(forceSyncButton, &QPushButton::clicked, this, &Dialog::syncUser);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
} else {
m_text = new QLabel(invalidAccountText(), this);
......@@ -96,8 +96,8 @@ Dialog::Dialog(QWidget *parent, Account *account)
mainLayout->addWidget(m_text);
mainLayout->addWidget(buttonBox);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
setWindowTitle(i18n("GitHub Account"));
}
......
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