Commit c7015063 authored by Montel Laurent's avatar Montel Laurent Committed by hjk
Browse files

Use new qt5 connect api



Change-Id: I7841baa54c9861275269981892e18d6b8fa58f3b
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 7740c3bb
......@@ -96,14 +96,14 @@ bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
m_dialog = &dialog;
m_ui.setupUi(&dialog);
dialog.setWindowTitle(tr("Filter Configuration"));
connect(m_ui.addButton, SIGNAL(clicked()),
this, SLOT(addDirectory()), Qt::DirectConnection);
connect(m_ui.editButton, SIGNAL(clicked()),
this, SLOT(editDirectory()), Qt::DirectConnection);
connect(m_ui.removeButton, SIGNAL(clicked()),
this, SLOT(removeDirectory()), Qt::DirectConnection);
connect(m_ui.directoryList, SIGNAL(itemSelectionChanged()),
this, SLOT(updateOptionButtons()), Qt::DirectConnection);
connect(m_ui.addButton, &QPushButton::clicked,
this, &DirectoryFilter::addDirectory, Qt::DirectConnection);
connect(m_ui.editButton, &QPushButton::clicked,
this, &DirectoryFilter::editDirectory, Qt::DirectConnection);
connect(m_ui.removeButton, &QPushButton::clicked,
this, &DirectoryFilter::removeDirectory, Qt::DirectConnection);
connect(m_ui.directoryList, &QListWidget::itemSelectionChanged,
this, &DirectoryFilter::updateOptionButtons, Qt::DirectConnection);
m_ui.nameEdit->setText(displayName());
m_ui.nameEdit->selectAll();
m_ui.directoryList->clear();
......
......@@ -106,8 +106,8 @@ bool ILocatorFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
vlayout->addLayout(hlayout);
vlayout->addStretch();
......
......@@ -101,7 +101,7 @@ void Locator::initialize(CorePlugin *corePlugin, const QStringList &, QString *)
Command *cmd = ActionManager::registerAction(action, Constants::LOCATE,
Context(Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+K")));
connect(action, SIGNAL(triggered()), this, SLOT(openLocator()));
connect(action, &QAction::triggered, this, &Locator::openLocator);
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updatePlaceholderText()));
updatePlaceholderText(cmd);
......@@ -308,7 +308,7 @@ void Locator::refresh(QList<ILocatorFilter *> filters)
QFuture<void> task = QtConcurrent::run(&ILocatorFilter::refresh, filters);
FutureProgress *progress =
ProgressManager::addTask(task, tr("Updating Locator Caches"), Constants::TASK_INDEX);
connect(progress, SIGNAL(finished()), this, SLOT(saveSettings()));
connect(progress, &FutureProgress::finished, this, &Locator::saveSettings);
}
} // namespace Internal
......
......@@ -61,16 +61,16 @@ QWidget *LocatorSettingsPage::widget()
m_widget = new QWidget;
m_ui.setupUi(m_widget);
m_ui.refreshInterval->setToolTip(m_ui.refreshIntervalLabel->toolTip());
connect(m_ui.filterList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
this, SLOT(updateButtonStates()));
connect(m_ui.filterList, &QListWidget::currentItemChanged,
this, &LocatorSettingsPage::updateButtonStates);
connect(m_ui.filterList, SIGNAL(itemActivated(QListWidgetItem*)),
this, SLOT(configureFilter(QListWidgetItem*)));
connect(m_ui.editButton, SIGNAL(clicked()),
this, SLOT(configureFilter()));
connect(m_ui.addButton, SIGNAL(clicked()),
this, SLOT(addCustomFilter()));
connect(m_ui.removeButton, SIGNAL(clicked()),
this, SLOT(removeCustomFilter()));
connect(m_ui.addButton, &QPushButton::clicked,
this, &LocatorSettingsPage::addCustomFilter);
connect(m_ui.removeButton, &QPushButton::clicked,
this, &LocatorSettingsPage::removeCustomFilter);
m_ui.refreshInterval->setValue(m_plugin->refreshInterval());
m_filters = m_plugin->filters();
......
......@@ -147,8 +147,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
}
m_urlOpen = new UrlOpenProtocol;
connect(m_urlOpen, SIGNAL(fetchDone(QString,QString,bool)),
this, SLOT(finishFetch(QString,QString,bool)));
connect(m_urlOpen, &Protocol::fetchDone, this, &CodepasterPlugin::finishFetch);
//register actions
......@@ -171,12 +170,12 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
command = Core::ActionManager::registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+F") : tr("Alt+C,Alt+F")));
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
connect(m_fetchAction, &QAction::triggered, this, &CodepasterPlugin::fetch);
cpContainer->addAction(command);
m_fetchUrlAction = new QAction(tr("Fetch from URL..."), this);
command = Core::ActionManager::registerAction(m_fetchUrlAction, "CodePaster.FetchUrl", globalcontext);
connect(m_fetchUrlAction, SIGNAL(triggered()), this, SLOT(fetchUrl()));
connect(m_fetchUrlAction, &QAction::triggered, this, &CodepasterPlugin::fetchUrl);
cpContainer->addAction(command);
addAutoReleasedObject(new CodePasterService);
......
......@@ -133,7 +133,7 @@ void StickyNotesPasteProtocol::paste(const QString &text,
}
m_pasteReply = httpPost(m_hostUrl + QLatin1String("api/json/create"), pasteData);
connect(m_pasteReply, SIGNAL(finished()), this, SLOT(pasteFinished()));
connect(m_pasteReply, &QNetworkReply::finished, this, &StickyNotesPasteProtocol::pasteFinished);
if (debug)
qDebug() << "paste: sending " << m_pasteReply << pasteData;
}
......@@ -196,7 +196,8 @@ void StickyNotesPasteProtocol::fetch(const QString &id)
qDebug() << "fetch: sending " << url;
m_fetchReply = httpGet(url);
connect(m_fetchReply, SIGNAL(finished()), this, SLOT(fetchFinished()));
connect(m_fetchReply, &QNetworkReply::finished,
this, &StickyNotesPasteProtocol::fetchFinished);
}
// Parse: '<result><id>143228</id><author>foo</author><timestamp>1320661026</timestamp><language>text</language>
......@@ -227,7 +228,8 @@ void StickyNotesPasteProtocol::list()
// Trailing slash is important to prevent redirection.
QString url = m_hostUrl + QLatin1String("api/json/list");
m_listReply = httpGet(url);
connect(m_listReply, SIGNAL(finished()), this, SLOT(listFinished()));
connect(m_listReply, &QNetworkReply::finished,
this, &StickyNotesPasteProtocol::listFinished);
if (debug)
qDebug() << "list: sending " << url << m_listReply;
}
......
......@@ -98,7 +98,8 @@ void PasteBinDotCaProtocol::fetch(const QString &id)
link.insert(0, url);
}
m_fetchReply = httpGet(link);
connect(m_fetchReply, SIGNAL(finished()), this, SLOT(fetchFinished()));
connect(m_fetchReply, &QNetworkReply::finished,
this, &PasteBinDotCaProtocol::fetchFinished);
m_fetchId = id;
}
......@@ -138,7 +139,8 @@ void PasteBinDotCaProtocol::paste(const QString &text,
// fire request
const QString link = QLatin1String(internalUrlC) + QLatin1String("quiet-paste.php");
m_pasteReply = httpPost(link, data);
connect(m_pasteReply, SIGNAL(finished()), this, SLOT(pasteFinished()));
connect(m_pasteReply, &QNetworkReply::finished,
this, &PasteBinDotCaProtocol::pasteFinished);
}
void PasteBinDotCaProtocol::pasteFinished()
......@@ -177,7 +179,7 @@ void PasteBinDotCaProtocol::list()
{
QTC_ASSERT(!m_listReply, return);
m_listReply = httpGet(QLatin1String(urlC));
connect(m_listReply, SIGNAL(finished()), this, SLOT(listFinished()));
connect(m_listReply, &QNetworkReply::finished, this, &PasteBinDotCaProtocol::listFinished);
}
bool PasteBinDotCaProtocol::checkConfiguration(QString *errorMessage)
......
......@@ -136,7 +136,7 @@ void PasteBinDotComProtocol::paste(const QString &text,
pasteData += QUrl::toPercentEncoding(fixNewLines(text));
// fire request
m_pasteReply = httpPost(QLatin1String(PASTEBIN_BASE) + QLatin1String(PASTEBIN_API), pasteData);
connect(m_pasteReply, SIGNAL(finished()), this, SLOT(pasteFinished()));
connect(m_pasteReply, &QNetworkReply::finished, this, &PasteBinDotComProtocol::pasteFinished);
if (debug)
qDebug() << "paste: sending " << m_pasteReply << pasteData;
}
......@@ -167,7 +167,7 @@ void PasteBinDotComProtocol::fetch(const QString &id)
qDebug() << "fetch: sending " << link;
m_fetchReply = httpGet(link);
connect(m_fetchReply, SIGNAL(finished()), this, SLOT(fetchFinished()));
connect(m_fetchReply, &QNetworkReply::finished, this, &PasteBinDotComProtocol::fetchFinished);
m_fetchId = id;
}
......@@ -212,7 +212,7 @@ void PasteBinDotComProtocol::list()
const QString url = QLatin1String(PASTEBIN_BASE) + QLatin1String(PASTEBIN_ARCHIVE);
m_listReply = httpGet(url);
connect(m_listReply, SIGNAL(finished()), this, SLOT(listFinished()));
connect(m_listReply, &QNetworkReply::finished, this, &PasteBinDotComProtocol::listFinished);
if (debug)
qDebug() << "list: sending " << url << m_listReply;
}
......
......@@ -55,12 +55,12 @@ PasteView::PasteView(const QList<Protocol *> &protocols,
m_ui.setupUi(this);
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Paste"));
connect(m_ui.uiPatchList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(contentChanged()));
connect(m_ui.uiPatchList, &QListWidget::itemChanged, this, &PasteView::contentChanged);
foreach (const Protocol *p, protocols)
m_ui.protocolBox->addItem(p->name());
connect(m_ui.protocolBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(protocolChanged(int)));
connect(m_ui.protocolBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &PasteView::protocolChanged);
}
PasteView::~PasteView()
......
......@@ -223,7 +223,7 @@ bool NetworkProtocol::httpStatus(QString url, QString *errorMessage, bool useHtt
// User canceled, discard and be happy.
if (!reply->isFinished()) {
QNetworkReply *replyPtr = reply.take();
connect(replyPtr, SIGNAL(finished()), replyPtr, SLOT(deleteLater()));
connect(replyPtr, &QNetworkReply::finished, replyPtr, &QNetworkReply::deleteLater);
return false;
}
// Passed
......
......@@ -55,7 +55,8 @@ void UrlOpenProtocol::fetch(const QString &url)
{
QTC_ASSERT(!m_fetchReply, return);
m_fetchReply = httpGet(url);
connect(m_fetchReply, SIGNAL(finished()), this, SLOT(fetchFinished()));
connect(m_fetchReply, &QNetworkReply::finished,
this, &UrlOpenProtocol::fetchFinished);
}
void UrlOpenProtocol::fetchFinished()
......
......@@ -304,7 +304,8 @@ void GdbCoreEngine::unpackCoreIfNeeded()
m_coreUnpackProcess = new QProcess(this);
m_coreUnpackProcess->setWorkingDirectory(QDir::tempPath());
m_coreUnpackProcess->start(QLatin1String("lzop"), arguments);
connect(m_coreUnpackProcess, SIGNAL(finished(int)), SLOT(continueSetupEngine()));
connect(m_coreUnpackProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &GdbCoreEngine::continueSetupEngine);
} else if (m_coreName.endsWith(QLatin1String(".gz"))) {
m_tempCoreName = tempCoreFilename();
showMessage(msg.arg(m_tempCoreName));
......@@ -314,8 +315,9 @@ void GdbCoreEngine::unpackCoreIfNeeded()
m_coreUnpackProcess = new QProcess(this);
m_coreUnpackProcess->setWorkingDirectory(QDir::tempPath());
m_coreUnpackProcess->start(QLatin1String("gzip"), arguments);
connect(m_coreUnpackProcess, SIGNAL(readyRead()), SLOT(writeCoreChunk()));
connect(m_coreUnpackProcess, SIGNAL(finished(int)), SLOT(continueSetupEngine()));
connect(m_coreUnpackProcess, &QProcess::readyRead, this, &GdbCoreEngine::writeCoreChunk);
connect(m_coreUnpackProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &GdbCoreEngine::continueSetupEngine);
} else {
continueSetupEngine();
}
......
......@@ -232,7 +232,7 @@ GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters)
//ExtensionSystem::PluginManager::addObject(m_debugInfoTaskHandler);
m_commandTimer.setSingleShot(true);
connect(&m_commandTimer, SIGNAL(timeout()), SLOT(commandTimeout()));
connect(&m_commandTimer, &QTimer::timeout, this, &GdbEngine::commandTimeout);
connect(action(AutoDerefPointers), SIGNAL(valueChanged(QVariant)),
SLOT(reloadLocals()));
......@@ -4195,14 +4195,10 @@ void GdbEngine::startGdb(const QStringList &args)
gdbArgs << _("-n");
gdbArgs += args;
connect(m_gdbProc, SIGNAL(error(QProcess::ProcessError)),
SLOT(handleGdbError(QProcess::ProcessError)));
connect(m_gdbProc, SIGNAL(finished(int,QProcess::ExitStatus)),
SLOT(handleGdbFinished(int,QProcess::ExitStatus)));
connect(m_gdbProc, SIGNAL(readyReadStandardOutput()),
SLOT(readGdbStandardOutput()));
connect(m_gdbProc, SIGNAL(readyReadStandardError()),
SLOT(readGdbStandardError()));
connect(m_gdbProc, &GdbProcess::error, this, &GdbEngine::handleGdbError);
connect(m_gdbProc, &GdbProcess::finished, this, &GdbEngine::handleGdbFinished);
connect(m_gdbProc, &GdbProcess::readyReadStandardOutput, this, &GdbEngine::readGdbStandardOutput);
connect(m_gdbProc, &GdbProcess::readyReadStandardError, this, &GdbEngine::readGdbStandardError);
showMessage(_("STARTING ") + m_gdb + _(" ") + gdbArgs.join(QLatin1Char(' ')));
m_gdbProc->start(m_gdb, gdbArgs);
......
......@@ -64,14 +64,14 @@ GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerStartParameters &star
{
if (Utils::HostOsInfo::isWindowsHost())
m_gdbProc->setUseCtrlCStub(startParameters.useCtrlCStub); // This is only set for QNX/BlackBerry
connect(&m_uploadProc, SIGNAL(error(QProcess::ProcessError)),
SLOT(uploadProcError(QProcess::ProcessError)));
connect(&m_uploadProc, SIGNAL(readyReadStandardOutput()),
SLOT(readUploadStandardOutput()));
connect(&m_uploadProc, SIGNAL(readyReadStandardError()),
SLOT(readUploadStandardError()));
connect(&m_uploadProc, SIGNAL(finished(int)),
SLOT(uploadProcFinished()));
connect(&m_uploadProc, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &GdbRemoteServerEngine::uploadProcError);
connect(&m_uploadProc, &QProcess::readyReadStandardOutput,
this, &GdbRemoteServerEngine::readUploadStandardOutput);
connect(&m_uploadProc, &QProcess::readyReadStandardError,
this, &GdbRemoteServerEngine::readUploadStandardError);
connect(&m_uploadProc, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &GdbRemoteServerEngine::uploadProcFinished);
}
void GdbRemoteServerEngine::setupEngine()
......
......@@ -103,8 +103,10 @@ void GdbServerStarter::portGathererError(const QString &text)
void GdbServerStarter::run()
{
QTC_ASSERT(d->device, return);
connect(&d->gatherer, SIGNAL(error(QString)), SLOT(portGathererError(QString)));
connect(&d->gatherer, SIGNAL(portListReady()), SLOT(portListReady()));
connect(&d->gatherer, &DeviceUsedPortsGatherer::error,
this, &GdbServerStarter::portGathererError);
connect(&d->gatherer, &DeviceUsedPortsGatherer::portListReady,
this, &GdbServerStarter::portListReady);
d->gatherer.start(d->device);
}
......@@ -118,11 +120,16 @@ void GdbServerStarter::portListReady()
return;
}
connect(&d->runner, SIGNAL(connectionError()), SLOT(handleConnectionError()));
connect(&d->runner, SIGNAL(processStarted()), SLOT(handleProcessStarted()));
connect(&d->runner, SIGNAL(readyReadStandardOutput()), SLOT(handleProcessOutputAvailable()));
connect(&d->runner, SIGNAL(readyReadStandardError()), SLOT(handleProcessErrorOutput()));
connect(&d->runner, SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int)));
connect(&d->runner, &SshRemoteProcessRunner::connectionError,
this, &GdbServerStarter::handleConnectionError);
connect(&d->runner, &SshRemoteProcessRunner::processStarted,
this, &GdbServerStarter::handleProcessStarted);
connect(&d->runner, &SshRemoteProcessRunner::readyReadStandardOutput,
this, &GdbServerStarter::handleProcessOutputAvailable);
connect(&d->runner, &SshRemoteProcessRunner::readyReadStandardError,
this, &GdbServerStarter::handleProcessErrorOutput);
connect(&d->runner, &SshRemoteProcessRunner::processClosed,
this, &GdbServerStarter::handleProcessClosed);
QByteArray gdbServerPath = d->device->debugServerPath().toUtf8();
if (gdbServerPath.isEmpty())
......
......@@ -94,9 +94,12 @@ void GdbTermEngine::setupEngine()
// Set environment + dumper preload.
m_stubProc.setEnvironment(startParameters().environment);
connect(&m_stubProc, SIGNAL(processError(QString)), SLOT(stubError(QString)));
connect(&m_stubProc, SIGNAL(processStarted()), SLOT(stubStarted()));
connect(&m_stubProc, SIGNAL(stubStopped()), SLOT(stubExited()));
connect(&m_stubProc, &Utils::ConsoleProcess::processError,
this, &GdbTermEngine::stubError);
connect(&m_stubProc, &Utils::ConsoleProcess::processStarted,
this, &GdbTermEngine::stubStarted);
connect(&m_stubProc, &Utils::ConsoleProcess::stubStopped,
this, &GdbTermEngine::stubExited);
// FIXME: Starting the stub implies starting the inferior. This is
// fairly unclean as far as the state machine and error reporting go.
......
......@@ -57,21 +57,25 @@ QmlAdapter::QmlAdapter(DebuggerEngine *engine, QObject *parent)
{
m_connectionTimer.setInterval(4000);
m_connectionTimer.setSingleShot(true);
connect(&m_connectionTimer, SIGNAL(timeout()), SLOT(checkConnectionState()));
connect(&m_connectionTimer, &QTimer::timeout, this, &QmlAdapter::checkConnectionState);
m_conn = new QmlDebugConnection(this);
connect(m_conn, SIGNAL(stateMessage(QString)), SLOT(showConnectionStateMessage(QString)));
connect(m_conn, SIGNAL(errorMessage(QString)), SLOT(showConnectionErrorMessage(QString)));
connect(m_conn, SIGNAL(error(QDebugSupport::Error)),
SLOT(connectionErrorOccurred(QDebugSupport::Error)));
connect(m_conn, SIGNAL(opened()), &m_connectionTimer, SLOT(stop()));
connect(m_conn, SIGNAL(opened()), SIGNAL(connected()));
connect(m_conn, SIGNAL(closed()), SIGNAL(disconnected()));
connect(m_conn, &QmlDebug::QmlDebugConnection::stateMessage,
this, &QmlAdapter::showConnectionStateMessage);
connect(m_conn, &QmlDebug::QmlDebugConnection::errorMessage,
this, &QmlAdapter::showConnectionErrorMessage);
connect(m_conn, &QmlDebug::QmlDebugConnection::error,
this, &QmlAdapter::connectionErrorOccurred);
connect(m_conn, &QmlDebug::QmlDebugConnection::opened,
&m_connectionTimer, &QTimer::stop);
connect(m_conn, &QmlDebug::QmlDebugConnection::opened,
this, &QmlAdapter::connected);
connect(m_conn, &QmlDebug::QmlDebugConnection::closed,
this, &QmlAdapter::disconnected);
createDebuggerClients();
m_msgClient = new QDebugMessageClient(m_conn);
connect(m_msgClient, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(clientStateChanged(QmlDebug::QmlDebugClient::State)));
connect(m_msgClient, &QmlDebug::QDebugMessageClient::newState, this, &QmlAdapter::clientStateChanged);
}
......@@ -150,16 +154,16 @@ bool QmlAdapter::isConnected() const
void QmlAdapter::createDebuggerClients()
{
QScriptDebuggerClient *debugClient1 = new QScriptDebuggerClient(m_conn);
connect(debugClient1, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(clientStateChanged(QmlDebug::QmlDebugClient::State)));
connect(debugClient1, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(debugClientStateChanged(QmlDebug::QmlDebugClient::State)));
connect(debugClient1, &QScriptDebuggerClient::newState,
this, &QmlAdapter::clientStateChanged);
connect(debugClient1, &QScriptDebuggerClient::newState,
this, &QmlAdapter::debugClientStateChanged);
QmlV8DebuggerClient *debugClient2 = new QmlV8DebuggerClient(m_conn);
connect(debugClient2, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(clientStateChanged(QmlDebug::QmlDebugClient::State)));
connect(debugClient2, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(debugClientStateChanged(QmlDebug::QmlDebugClient::State)));
connect(debugClient2, &QmlV8DebuggerClient::newState,
this, &QmlAdapter::clientStateChanged);
connect(debugClient2, &QmlV8DebuggerClient::newState,
this, &QmlAdapter::debugClientStateChanged);
m_debugClients.insert(debugClient1->name(),debugClient1);
m_debugClients.insert(debugClient2->name(),debugClient2);
......
......@@ -68,7 +68,8 @@ QmlInspectorAgent::QmlInspectorAgent(DebuggerEngine *engine, QObject *parent)
SIGNAL(valueChanged(QVariant)), SLOT(updateState()));
m_delayQueryTimer.setSingleShot(true);
m_delayQueryTimer.setInterval(100);
connect(&m_delayQueryTimer, SIGNAL(timeout()), SLOT(queryEngineContext()));
connect(&m_delayQueryTimer, &QTimer::timeout,
this, &QmlInspectorAgent::queryEngineContext);
}
quint32 QmlInspectorAgent::queryExpressionResult(int debugId,
......@@ -395,14 +396,14 @@ void QmlInspectorAgent::setEngineClient(BaseEngineDebugClient *client)
m_engineClient = client;
if (m_engineClient) {
connect(m_engineClient, SIGNAL(newState(QmlDebug::QmlDebugClient::State)),
this, SLOT(updateState()));
connect(m_engineClient, SIGNAL(result(quint32,QVariant,QByteArray)),
this, SLOT(onResult(quint32,QVariant,QByteArray)));
connect(m_engineClient, SIGNAL(newObject(int,int,int)),
this, SLOT(newObject(int,int,int)));
connect(m_engineClient, SIGNAL(valueChanged(int,QByteArray,QVariant)),
this, SLOT(onValueChanged(int,QByteArray,QVariant)));
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::newState,
this, &QmlInspectorAgent::updateState);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::result,
this, &QmlInspectorAgent::onResult);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::newObject,
this, &QmlInspectorAgent::newObject);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::valueChanged,
this, &QmlInspectorAgent::onValueChanged);
}
updateState();
......
......@@ -982,7 +982,8 @@ void QmlV8DebuggerClient::expandObject(const QByteArray &iname, quint64 objectId
void QmlV8DebuggerClient::setEngine(QmlEngine *engine)
{
d->engine = engine;
connect(this, SIGNAL(stackFrameCompleted()), engine, SIGNAL(stackFrameCompleted()));
connect(this, &QmlV8DebuggerClient::stackFrameCompleted,
engine, &QmlEngine::stackFrameCompleted);
}
void QmlV8DebuggerClient::getSourceFiles()
......
......@@ -582,7 +582,8 @@ void QScriptDebuggerClient::insertLocalsAndWatches(QList<WatchData> &locals,
void QScriptDebuggerClient::setEngine(QmlEngine *engine)
{
d->engine = engine;
connect(this, SIGNAL(stackFrameCompleted()), engine, SIGNAL(stackFrameCompleted()));
connect(this, &QScriptDebuggerClient::stackFrameCompleted,
engine, &DebuggerEngine::stackFrameCompleted);
}
void QScriptDebuggerClientPrivate::logSendMessage(const QString &msg) const
......
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