Commit 1b832656 authored by David Edmundson's avatar David Edmundson
Browse files

port old style connects

parent ef0ee3ec
......@@ -93,7 +93,7 @@ void CuttleFishPlugin::contextMenuAboutToShow(KTextEditor::View* view, QMenu* me
cuttlefish->setArguments(QStringList() << "--picker");
connect(cuttlefish, &QProcess::readyReadStandardOutput,
[this, cuttlefish]() {
[ cuttlefish]() {
auto qba = cuttlefish->readAllStandardOutput();
auto view = KTextEditor::Editor::instance()->application()->activeMainWindow()->activeView();
if (view) {
......
......@@ -71,7 +71,7 @@ EngineExplorer::EngineExplorer(QWidget* parent)
layout->addWidget(buttonBox);
setLayout(layout);
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
setupUi(mainWidget);
......@@ -82,7 +82,7 @@ EngineExplorer::EngineExplorer(QWidget* parent)
m_title->setPixmap(pix.pixmap(size, size));
connect(m_engines, SIGNAL(activated(QString)), this, SLOT(showEngine(QString)));
connect(m_sourceRequesterButton, SIGNAL(clicked(bool)), this, SLOT(requestSource()));
connect(m_serviceRequesterButton, SIGNAL(clicked(bool)), this, SLOT(requestServiceForSource()));
connect(m_serviceRequesterButton, &QAbstractButton::clicked, this, &EngineExplorer::requestServiceForSource);
m_data->setModel(m_dataModel);
m_data->setWordWrap(true);
......@@ -92,16 +92,16 @@ EngineExplorer::EngineExplorer(QWidget* parent)
listEngines();
m_engines->setFocus();
connect(m_collapseButton, SIGNAL(clicked()), m_data, SLOT(collapseAll()));
connect(m_expandButton, SIGNAL(clicked()), m_data, SLOT(expandAll()));
connect(m_collapseButton, &QAbstractButton::clicked, m_data, &QTreeView::collapseAll);
connect(m_expandButton, &QAbstractButton::clicked, m_data, &QTreeView::expandAll);
enableButtons(false);
addAction(KStandardAction::quit(qApp, SLOT(quit()), this));
connect(m_data, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(showDataContextMenu(QPoint)));
connect(m_data, &QWidget::customContextMenuRequested,
this, &EngineExplorer::showDataContextMenu);
m_data->setContextMenuPolicy(Qt::CustomContextMenu);
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()));
connect(qApp, &QCoreApplication::aboutToQuit, this, &EngineExplorer::cleanUp);
}
EngineExplorer::~EngineExplorer()
......@@ -204,8 +204,8 @@ void EngineExplorer::showEngine(const QString& name)
//qDebug() << "showing engine " << m_engine->objectName();
//qDebug() << "we have " << sources.count() << " data sources";
connect(m_engine, SIGNAL(sourceAdded(QString)), this, SLOT(addSource(QString)));
connect(m_engine, SIGNAL(sourceRemoved(QString)), this, SLOT(removeSource(QString)));
connect(m_engine, &Plasma::DataEngine::sourceAdded, this, &EngineExplorer::addSource);
connect(m_engine, &Plasma::DataEngine::sourceRemoved, this, &EngineExplorer::removeSource);
foreach (const QString& source, m_engine->sources()) {
//qDebug() << "adding " << source;
addSource(source);
......
......@@ -214,8 +214,8 @@ bool KTreeViewSearchLinePrivate::checkItemParentsVisible( QTreeView *treeView, c
KTreeViewSearchLine::KTreeViewSearchLine( QWidget *parent, QTreeView *treeView )
: KLineEdit( parent ), d( new KTreeViewSearchLinePrivate( this ) )
{
connect( this, SIGNAL(textChanged(QString)),
this, SLOT(queueSearch(QString)) );
connect( this, &QLineEdit::textChanged,
this, &KTreeViewSearchLine::queueSearch );
setClearButtonEnabled( true );
setTreeView( treeView );
......@@ -229,8 +229,8 @@ KTreeViewSearchLine::KTreeViewSearchLine( QWidget *parent,
const QList<QTreeView *> &treeViews )
: KLineEdit( parent ), d( new KTreeViewSearchLinePrivate( this ) )
{
connect( this, SIGNAL(textChanged(QString)),
this, SLOT(queueSearch(QString)) );
connect( this, &QLineEdit::textChanged,
this, &KTreeViewSearchLine::queueSearch );
setClearButtonEnabled( true );
setTreeViews( treeViews );
......@@ -469,8 +469,8 @@ void KTreeViewSearchLine::connectTreeView( QTreeView *treeView )
connect( treeView, SIGNAL(destroyed(QObject*)),
this, SLOT(treeViewDeleted(QObject*)) );
connect( treeView->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)) );
connect( treeView->model(), &QAbstractItemModel::rowsInserted,
this, &KTreeViewSearchLine::rowsInserted );
}
void KTreeViewSearchLine::disconnectTreeView( QTreeView *treeView )
......@@ -478,8 +478,8 @@ void KTreeViewSearchLine::disconnectTreeView( QTreeView *treeView )
disconnect( treeView, SIGNAL(destroyed(QObject*)),
this, SLOT(treeViewDeleted(QObject*)) );
disconnect( treeView->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)) );
disconnect( treeView->model(), &QAbstractItemModel::rowsInserted,
this, &KTreeViewSearchLine::rowsInserted );
}
bool KTreeViewSearchLine::canChooseColumnsCheck()
......@@ -530,7 +530,7 @@ void KTreeViewSearchLine::queueSearch( const QString &search )
d->queuedSearches++;
d->search = search;
QTimer::singleShot( 200, this, SLOT(activateSearch()) );
QTimer::singleShot( 200, this, &KTreeViewSearchLine::activateSearch );
}
void KTreeViewSearchLine::activateSearch()
......@@ -563,7 +563,7 @@ KTreeViewSearchLineWidget::KTreeViewSearchLineWidget( QWidget *parent, QTreeView
{
d->treeView = treeView;
QTimer::singleShot( 0, this, SLOT(createWidgets()) );
QTimer::singleShot( 0, this, &KTreeViewSearchLineWidget::createWidgets );
}
KTreeViewSearchLineWidget::~KTreeViewSearchLineWidget()
......
......@@ -107,7 +107,7 @@ ModelViewer::ModelViewer(Plasma::DataEngine *engine, const QString &source, QWid
m_model = m_engine->modelForSource(m_source);
if (m_model != nullptr) {
connect(m_engine, SIGNAL(destroyed(QObject*)), this, SLOT(engineDestroyed()));
connect(m_engine, &QObject::destroyed, this, &ModelViewer::engineDestroyed);
m_view->setModel(m_model);
} else {
KMessageBox::sorry(this, i18n("No valid model was returned. Verify that a model is available for this source."));
......
......@@ -47,7 +47,7 @@ ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const QString &source,
buttonBox->addButton(m_operationButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(QDialogButtonBox::Close);
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->addWidget(mainWidget);
layout->addWidget(buttonBox);
......@@ -56,7 +56,7 @@ ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const QString &source,
setupUi(mainWidget);
m_operationStatus->hide();
connect(m_operationButton, SIGNAL(clicked()), this, SLOT(startOperation()));
connect(m_operationButton, &QAbstractButton::clicked, this, &ServiceViewer::startOperation);
m_operationButton->setEnabled(false);
connect(m_operations, SIGNAL(currentIndexChanged(QString)),
......@@ -76,7 +76,7 @@ ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const QString &source,
serviceName = m_service->name();
updateOperations();
connect(m_service, SIGNAL(operationsChanged()), this, SLOT(updateOperations()));
connect(m_engine, SIGNAL(destroyed(QObject*)), this, SLOT(engineDestroyed()));
connect(m_engine, &QObject::destroyed, this, &ServiceViewer::engineDestroyed);
} else {
KMessageBox::sorry(this, i18n("No valid service was returned. Verify that a service is available for this source."));
close();
......@@ -147,7 +147,7 @@ void ServiceViewer::startOperation()
updateJobCount(1);
Plasma::ServiceJob *job = m_service->startOperationCall(desc);
connect(job, SIGNAL(finished(KJob*)), this, SLOT(operationResult(KJob*)));
connect(job, &KJob::finished, this, &ServiceViewer::operationResult);
}
void ServiceViewer::operationSelected(const QString &operation)
......
......@@ -263,7 +263,7 @@ void ThemeModel::editElement(const QString& imagePath)
//TODO: don't use the script to not depend from bash/linux?
process->setProgram("bash", QStringList() << m_package.filePath("scripts", "openInEditor.sh") << finalFile);
connect(process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished()));
connect(process, &QProcess::finished, this, &ThemeModel::processFinished);
process->start();
}
......
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