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