forked from qt-creator/qt-creator
Port to new connect api
Change-Id: I873a36601d54065b61d0666558b93dc839ad0dfc Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -37,8 +37,8 @@ static const char settingsSuffixKey[] = "CodeStyleSettings";
|
|||||||
CppCodeStylePreferences::CppCodeStylePreferences(QObject *parent) :
|
CppCodeStylePreferences::CppCodeStylePreferences(QObject *parent) :
|
||||||
ICodeStylePreferences(parent)
|
ICodeStylePreferences(parent)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(currentValueChanged(QVariant)),
|
connect(this, &CppCodeStylePreferences::currentValueChanged,
|
||||||
this, SLOT(slotCurrentValueChanged(QVariant)));
|
this, &CppCodeStylePreferences::slotCurrentValueChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CppCodeStylePreferences::value() const
|
QVariant CppCodeStylePreferences::value() const
|
||||||
|
@@ -282,48 +282,48 @@ CppCodeStylePreferencesWidget::CppCodeStylePreferencesWidget(QWidget *parent)
|
|||||||
|
|
||||||
setVisualizeWhitespace(true);
|
setVisualizeWhitespace(true);
|
||||||
|
|
||||||
connect(m_ui->tabSettingsWidget, SIGNAL(settingsChanged(TextEditor::TabSettings)),
|
connect(m_ui->tabSettingsWidget, &TextEditor::TabSettingsWidget::settingsChanged,
|
||||||
this, SLOT(slotTabSettingsChanged(TextEditor::TabSettings)));
|
this, &CppCodeStylePreferencesWidget::slotTabSettingsChanged);
|
||||||
connect(m_ui->indentBlockBraces, SIGNAL(toggled(bool)),
|
connect(m_ui->indentBlockBraces, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentBlockBody, SIGNAL(toggled(bool)),
|
connect(m_ui->indentBlockBody, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentClassBraces, SIGNAL(toggled(bool)),
|
connect(m_ui->indentClassBraces, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentNamespaceBraces, SIGNAL(toggled(bool)),
|
connect(m_ui->indentNamespaceBraces, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentEnumBraces, SIGNAL(toggled(bool)),
|
connect(m_ui->indentEnumBraces, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentNamespaceBody, SIGNAL(toggled(bool)),
|
connect(m_ui->indentNamespaceBody, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentSwitchLabels, SIGNAL(toggled(bool)),
|
connect(m_ui->indentSwitchLabels, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentCaseStatements, SIGNAL(toggled(bool)),
|
connect(m_ui->indentCaseStatements, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentCaseBlocks, SIGNAL(toggled(bool)),
|
connect(m_ui->indentCaseBlocks, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentCaseBreak, SIGNAL(toggled(bool)),
|
connect(m_ui->indentCaseBreak, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentAccessSpecifiers, SIGNAL(toggled(bool)),
|
connect(m_ui->indentAccessSpecifiers, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentDeclarationsRelativeToAccessSpecifiers, SIGNAL(toggled(bool)),
|
connect(m_ui->indentDeclarationsRelativeToAccessSpecifiers, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentFunctionBody, SIGNAL(toggled(bool)),
|
connect(m_ui->indentFunctionBody, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->indentFunctionBraces, SIGNAL(toggled(bool)),
|
connect(m_ui->indentFunctionBraces, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->extraPaddingConditions, SIGNAL(toggled(bool)),
|
connect(m_ui->extraPaddingConditions, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->alignAssignments, SIGNAL(toggled(bool)),
|
connect(m_ui->alignAssignments, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->bindStarToIdentifier, SIGNAL(toggled(bool)),
|
connect(m_ui->bindStarToIdentifier, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->bindStarToTypeName, SIGNAL(toggled(bool)),
|
connect(m_ui->bindStarToTypeName, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->bindStarToLeftSpecifier, SIGNAL(toggled(bool)),
|
connect(m_ui->bindStarToLeftSpecifier, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
connect(m_ui->bindStarToRightSpecifier, SIGNAL(toggled(bool)),
|
connect(m_ui->bindStarToRightSpecifier, &QCheckBox::toggled,
|
||||||
this, SLOT(slotCodeStyleSettingsChanged()));
|
this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
|
||||||
|
|
||||||
m_ui->categoryTab->setCurrentIndex(0);
|
m_ui->categoryTab->setCurrentIndex(0);
|
||||||
|
|
||||||
@@ -340,8 +340,8 @@ void CppCodeStylePreferencesWidget::setCodeStyle(CppTools::CppCodeStylePreferenc
|
|||||||
// code preferences
|
// code preferences
|
||||||
m_preferences = codeStylePreferences;
|
m_preferences = codeStylePreferences;
|
||||||
|
|
||||||
connect(m_preferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)),
|
connect(m_preferences, &CppCodeStylePreferences::currentTabSettingsChanged,
|
||||||
this, SLOT(setTabSettings(TextEditor::TabSettings)));
|
this, &CppCodeStylePreferencesWidget::setTabSettings);
|
||||||
connect(m_preferences, SIGNAL(currentCodeStyleSettingsChanged(CppTools::CppCodeStyleSettings)),
|
connect(m_preferences, SIGNAL(currentCodeStyleSettingsChanged(CppTools::CppCodeStyleSettings)),
|
||||||
this, SLOT(setCodeStyleSettings(CppTools::CppCodeStyleSettings)));
|
this, SLOT(setCodeStyleSettings(CppTools::CppCodeStyleSettings)));
|
||||||
connect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)),
|
connect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)),
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace CppTools;
|
using namespace CppTools;
|
||||||
using namespace CppTools::Internal;
|
using namespace CppTools::Internal;
|
||||||
|
using namespace ProjectExplorer;
|
||||||
namespace CppTools {
|
namespace CppTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -140,8 +140,7 @@ CppIncludesFilter::CppIncludesFilter()
|
|||||||
setIncludedByDefault(true);
|
setIncludedByDefault(true);
|
||||||
setPriority(ILocatorFilter::Low);
|
setPriority(ILocatorFilter::Low);
|
||||||
|
|
||||||
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
|
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged,
|
||||||
&ProjectExplorer::ProjectExplorerPlugin::fileListChanged,
|
|
||||||
this, &CppIncludesFilter::markOutdated);
|
this, &CppIncludesFilter::markOutdated);
|
||||||
connect(CppModelManager::instance(), &CppModelManager::documentUpdated,
|
connect(CppModelManager::instance(), &CppModelManager::documentUpdated,
|
||||||
this, &CppIncludesFilter::markOutdated);
|
this, &CppIncludesFilter::markOutdated);
|
||||||
|
@@ -152,11 +152,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension);
|
JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension);
|
||||||
|
|
||||||
CppLocatorData *locatorData = new CppLocatorData;
|
CppLocatorData *locatorData = new CppLocatorData;
|
||||||
connect(modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
|
connect(modelManager, &CppModelManager::documentUpdated,
|
||||||
locatorData, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr)));
|
locatorData, &CppLocatorData::onDocumentUpdated);
|
||||||
|
|
||||||
connect(modelManager, SIGNAL(aboutToRemoveFiles(QStringList)),
|
connect(modelManager, &CppModelManager::aboutToRemoveFiles,
|
||||||
locatorData, SLOT(onAboutToRemoveFiles(QStringList)));
|
locatorData, &CppLocatorData::onAboutToRemoveFiles);
|
||||||
|
|
||||||
addAutoReleasedObject(locatorData);
|
addAutoReleasedObject(locatorData);
|
||||||
addAutoReleasedObject(new CppLocatorFilter(locatorData));
|
addAutoReleasedObject(new CppLocatorFilter(locatorData));
|
||||||
@@ -184,7 +184,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
Command *command = ActionManager::registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true);
|
Command *command = ActionManager::registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true);
|
||||||
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
|
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
|
||||||
mcpptools->addAction(command);
|
mcpptools->addAction(command);
|
||||||
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource()));
|
connect(switchAction, &QAction::triggered,
|
||||||
|
this, &CppToolsPlugin::switchHeaderSource);
|
||||||
|
|
||||||
QAction *openInNextSplitAction = new QAction(tr("Open Corresponding Header/Source in Next Split"), this);
|
QAction *openInNextSplitAction = new QAction(tr("Open Corresponding Header/Source in Next Split"), this);
|
||||||
command = ActionManager::registerAction(openInNextSplitAction, Constants::OPEN_HEADER_SOURCE_IN_NEXT_SPLIT, context, true);
|
command = ActionManager::registerAction(openInNextSplitAction, Constants::OPEN_HEADER_SOURCE_IN_NEXT_SPLIT, context, true);
|
||||||
@@ -192,7 +193,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
? tr("Meta+E, F4")
|
? tr("Meta+E, F4")
|
||||||
: tr("Ctrl+E, F4")));
|
: tr("Ctrl+E, F4")));
|
||||||
mcpptools->addAction(command);
|
mcpptools->addAction(command);
|
||||||
connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit()));
|
connect(openInNextSplitAction, &QAction::triggered,
|
||||||
|
this, &CppToolsPlugin::switchHeaderSourceInNextSplit);
|
||||||
|
|
||||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||||
expander->registerVariable("Cpp:LicenseTemplate",
|
expander->registerVariable("Cpp:LicenseTemplate",
|
||||||
|
@@ -60,13 +60,14 @@ ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) :
|
|||||||
CppModelManager *mm = CppModelManager::instance();
|
CppModelManager *mm = CppModelManager::instance();
|
||||||
assert(mm);
|
assert(mm);
|
||||||
|
|
||||||
connect(this, SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)),
|
connect(this, &ModelManagerTestHelper::aboutToRemoveProject,
|
||||||
mm, SLOT(onAboutToRemoveProject(ProjectExplorer::Project*)));
|
mm, &CppModelManager::onAboutToRemoveProject);
|
||||||
connect(this, SIGNAL(projectAdded(ProjectExplorer::Project*)),
|
connect(this, &ModelManagerTestHelper::projectAdded,
|
||||||
mm, SLOT(onProjectAdded(ProjectExplorer::Project*)));
|
mm, &CppModelManager::onProjectAdded);
|
||||||
connect(mm, SIGNAL(sourceFilesRefreshed(QSet<QString>)),
|
connect(mm, &CppModelManager::sourceFilesRefreshed,
|
||||||
this, SLOT(sourceFilesRefreshed(QSet<QString>)));
|
this, &ModelManagerTestHelper::sourceFilesRefreshed);
|
||||||
connect(mm, SIGNAL(gcFinished()), this, SLOT(gcFinished()));
|
connect(mm, &CppModelManager::gcFinished,
|
||||||
|
this, &ModelManagerTestHelper::gcFinished);
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
Tests::VerifyCleanCppModelManager::verify();
|
Tests::VerifyCleanCppModelManager::verify();
|
||||||
|
@@ -53,8 +53,7 @@ StringTable::StringTable()
|
|||||||
m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown"));
|
m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown"));
|
||||||
m_gcCountDown.setSingleShot(true);
|
m_gcCountDown.setSingleShot(true);
|
||||||
m_gcCountDown.setInterval(GCTimeOut);
|
m_gcCountDown.setInterval(GCTimeOut);
|
||||||
connect(&m_gcCountDown, SIGNAL(timeout()),
|
connect(&m_gcCountDown, &QTimer::timeout, this, &StringTable::startGC);
|
||||||
this, SLOT(startGC()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString StringTable::insert(const QString &string)
|
QString StringTable::insert(const QString &string)
|
||||||
|
@@ -313,7 +313,8 @@ QWidget *QmlConsoleItemDelegate::createEditor(QWidget *parent,
|
|||||||
|
|
||||||
{
|
{
|
||||||
QmlConsoleEdit *editor = new QmlConsoleEdit(index, parent);
|
QmlConsoleEdit *editor = new QmlConsoleEdit(index, parent);
|
||||||
connect(editor, SIGNAL(editingFinished()), this, SLOT(commitAndCloseEditor()));
|
connect(editor, &QmlConsoleEdit::editingFinished,
|
||||||
|
this, &QmlConsoleItemDelegate::commitAndCloseEditor);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -73,22 +73,23 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
|||||||
m_proxyModel = new QmlConsoleProxyModel(this);
|
m_proxyModel = new QmlConsoleProxyModel(this);
|
||||||
m_proxyModel->setSourceModel(QmlConsoleModel::qmlConsoleItemModel());
|
m_proxyModel->setSourceModel(QmlConsoleModel::qmlConsoleItemModel());
|
||||||
connect(QmlConsoleModel::qmlConsoleItemModel(),
|
connect(QmlConsoleModel::qmlConsoleItemModel(),
|
||||||
SIGNAL(selectEditableRow(QModelIndex,QItemSelectionModel::SelectionFlags)),
|
&QmlConsoleItemModel::selectEditableRow,
|
||||||
m_proxyModel,
|
m_proxyModel,
|
||||||
SLOT(selectEditableRow(QModelIndex,QItemSelectionModel::SelectionFlags)));
|
&QmlConsoleProxyModel::selectEditableRow);
|
||||||
|
|
||||||
//Scroll to bottom when rows matching current filter settings are inserted
|
//Scroll to bottom when rows matching current filter settings are inserted
|
||||||
//Not connecting rowsRemoved as the only way to remove rows is to clear the
|
//Not connecting rowsRemoved as the only way to remove rows is to clear the
|
||||||
//model which will automatically reset the view.
|
//model which will automatically reset the view.
|
||||||
connect(QmlConsoleModel::qmlConsoleItemModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
|
connect(QmlConsoleModel::qmlConsoleItemModel(), &QAbstractItemModel::rowsInserted,
|
||||||
m_proxyModel, SLOT(onRowsInserted(QModelIndex,int,int)));
|
m_proxyModel, &QmlConsoleProxyModel::onRowsInserted);
|
||||||
m_consoleView->setModel(m_proxyModel);
|
m_consoleView->setModel(m_proxyModel);
|
||||||
|
|
||||||
connect(m_proxyModel,
|
connect(m_proxyModel,
|
||||||
SIGNAL(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)),
|
SIGNAL(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)),
|
||||||
m_consoleView->selectionModel(),
|
m_consoleView->selectionModel(),
|
||||||
SLOT(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)));
|
SLOT(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)));
|
||||||
connect(m_proxyModel, SIGNAL(scrollToBottom()), m_consoleView, SLOT(onScrollToBottom()));
|
connect(m_proxyModel, &QmlConsoleProxyModel::scrollToBottom,
|
||||||
|
m_consoleView, &QmlConsoleView::onScrollToBottom);
|
||||||
|
|
||||||
m_itemDelegate = new QmlConsoleItemDelegate(this);
|
m_itemDelegate = new QmlConsoleItemDelegate(this);
|
||||||
connect(m_consoleView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
connect(m_consoleView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
||||||
@@ -111,7 +112,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
|||||||
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
||||||
m_showDebugButtonAction->setCheckable(true);
|
m_showDebugButtonAction->setCheckable(true);
|
||||||
m_showDebugButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_INFO)));
|
m_showDebugButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_INFO)));
|
||||||
connect(m_showDebugButtonAction, SIGNAL(toggled(bool)), m_proxyModel, SLOT(setShowLogs(bool)));
|
connect(m_showDebugButtonAction, &Utils::SavedAction::toggled,
|
||||||
|
m_proxyModel, &QmlConsoleProxyModel::setShowLogs);
|
||||||
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
|
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
|
||||||
|
|
||||||
m_showWarningButton = new QToolButton(m_consoleWidget);
|
m_showWarningButton = new QToolButton(m_consoleWidget);
|
||||||
@@ -123,8 +125,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
|||||||
m_showWarningButtonAction->setToolTip(tr("Show warning messages."));
|
m_showWarningButtonAction->setToolTip(tr("Show warning messages."));
|
||||||
m_showWarningButtonAction->setCheckable(true);
|
m_showWarningButtonAction->setCheckable(true);
|
||||||
m_showWarningButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
|
m_showWarningButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
|
||||||
connect(m_showWarningButtonAction, SIGNAL(toggled(bool)), m_proxyModel,
|
connect(m_showWarningButtonAction, &Utils::SavedAction::toggled,
|
||||||
SLOT(setShowWarnings(bool)));
|
m_proxyModel, &QmlConsoleProxyModel::setShowWarnings);
|
||||||
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
|
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
|
||||||
|
|
||||||
m_showErrorButton = new QToolButton(m_consoleWidget);
|
m_showErrorButton = new QToolButton(m_consoleWidget);
|
||||||
@@ -136,8 +138,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
|||||||
m_showErrorButtonAction->setToolTip(tr("Show error messages."));
|
m_showErrorButtonAction->setToolTip(tr("Show error messages."));
|
||||||
m_showErrorButtonAction->setCheckable(true);
|
m_showErrorButtonAction->setCheckable(true);
|
||||||
m_showErrorButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_ERROR)));
|
m_showErrorButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_ERROR)));
|
||||||
connect(m_showErrorButtonAction, SIGNAL(toggled(bool)), m_proxyModel,
|
connect(m_showErrorButtonAction, &Utils::SavedAction::toggled, m_proxyModel, &QmlConsoleProxyModel::setShowErrors);
|
||||||
SLOT(setShowErrors(bool)));
|
|
||||||
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
|
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
|
||||||
|
|
||||||
m_spacer = new QWidget(m_consoleWidget);
|
m_spacer = new QWidget(m_consoleWidget);
|
||||||
|
@@ -129,7 +129,7 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) :
|
|||||||
horizontalScrollBar()->setSingleStep(20);
|
horizontalScrollBar()->setSingleStep(20);
|
||||||
verticalScrollBar()->setSingleStep(20);
|
verticalScrollBar()->setSingleStep(20);
|
||||||
|
|
||||||
connect(this, SIGNAL(activated(QModelIndex)), SLOT(onRowActivated(QModelIndex)));
|
connect(this, &QmlConsoleView::activated, this, &QmlConsoleView::onRowActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlConsoleView::onScrollToBottom()
|
void QmlConsoleView::onScrollToBottom()
|
||||||
|
@@ -88,8 +88,8 @@ void QmlJSCodeStylePreferencesWidget::setPreferences(TextEditor::ICodeStylePrefe
|
|||||||
m_preferences = preferences;
|
m_preferences = preferences;
|
||||||
m_ui->tabPreferencesWidget->setPreferences(preferences);
|
m_ui->tabPreferencesWidget->setPreferences(preferences);
|
||||||
if (m_preferences)
|
if (m_preferences)
|
||||||
connect(m_preferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)),
|
connect(m_preferences, &TextEditor::ICodeStylePreferences::currentTabSettingsChanged,
|
||||||
this, SLOT(slotSettingsChanged()));
|
this, &QmlJSCodeStylePreferencesWidget::slotSettingsChanged);
|
||||||
updatePreview();
|
updatePreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,10 +46,10 @@ LocatorData::LocatorData(QObject *parent)
|
|||||||
{
|
{
|
||||||
QmlJS::ModelManagerInterface *manager = QmlJS::ModelManagerInterface::instance();
|
QmlJS::ModelManagerInterface *manager = QmlJS::ModelManagerInterface::instance();
|
||||||
|
|
||||||
connect(manager, SIGNAL(documentUpdated(QmlJS::Document::Ptr)),
|
connect(manager, &QmlJS::ModelManagerInterface::documentUpdated,
|
||||||
this, SLOT(onDocumentUpdated(QmlJS::Document::Ptr)));
|
this, &LocatorData::onDocumentUpdated);
|
||||||
connect(manager, SIGNAL(aboutToRemoveFiles(QStringList)),
|
connect(manager, &QmlJS::ModelManagerInterface::aboutToRemoveFiles,
|
||||||
this, SLOT(onAboutToRemoveFiles(QStringList)));
|
this, &LocatorData::onAboutToRemoveFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocatorData::~LocatorData()
|
LocatorData::~LocatorData()
|
||||||
|
@@ -108,7 +108,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
Context globalContext(Core::Constants::C_GLOBAL);
|
Context globalContext(Core::Constants::C_GLOBAL);
|
||||||
Command *cmd = ActionManager::registerAction(
|
Command *cmd = ActionManager::registerAction(
|
||||||
m_resetCodeModelAction, Constants::RESET_CODEMODEL, globalContext);
|
m_resetCodeModelAction, Constants::RESET_CODEMODEL, globalContext);
|
||||||
connect(m_resetCodeModelAction, SIGNAL(triggered()), m_modelManager, SLOT(resetCodeModel()));
|
connect(m_resetCodeModelAction, &QAction::triggered,
|
||||||
|
m_modelManager, &ModelManager::resetCodeModel);
|
||||||
mqmljstools->addAction(cmd);
|
mqmljstools->addAction(cmd);
|
||||||
|
|
||||||
// watch task progress
|
// watch task progress
|
||||||
|
@@ -89,8 +89,8 @@ Core::BaseFileWizard *QmlApplicationWizard::create(QWidget *parent, const Wizard
|
|||||||
{
|
{
|
||||||
QmlApplicationWizardDialog *wizardDialog = new QmlApplicationWizardDialog(parent, parameters);
|
QmlApplicationWizardDialog *wizardDialog = new QmlApplicationWizardDialog(parent, parameters);
|
||||||
|
|
||||||
connect(wizardDialog, SIGNAL(projectParametersChanged(QString,QString)), m_qmlApp,
|
connect(wizardDialog, &QmlApplicationWizardDialog::projectParametersChanged,
|
||||||
SLOT(setProjectNameAndBaseDirectory(QString,QString)));
|
m_qmlApp, &QmlApp::setProjectNameAndBaseDirectory);
|
||||||
|
|
||||||
wizardDialog->setPath(parameters.defaultPath());
|
wizardDialog->setPath(parameters.defaultPath());
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ void QmlProject::addedTarget(ProjectExplorer::Target *target)
|
|||||||
void QmlProject::onActiveTargetChanged(ProjectExplorer::Target *target)
|
void QmlProject::onActiveTargetChanged(ProjectExplorer::Target *target)
|
||||||
{
|
{
|
||||||
if (m_activeTarget)
|
if (m_activeTarget)
|
||||||
disconnect(m_activeTarget, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
|
disconnect(m_activeTarget, &ProjectExplorer::Target::kitChanged, this, &QmlProject::onKitChanged);
|
||||||
m_activeTarget = target;
|
m_activeTarget = target;
|
||||||
if (m_activeTarget)
|
if (m_activeTarget)
|
||||||
connect(target, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
|
connect(target, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
|
||||||
@@ -397,11 +397,9 @@ bool QmlProject::fromMap(const QVariantMap &map)
|
|||||||
foreach (Target *t, targets())
|
foreach (Target *t, targets())
|
||||||
addedTarget(t);
|
addedTarget(t);
|
||||||
|
|
||||||
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
|
connect(this, &QmlProject::addedTarget, this, &QmlProject::addedTarget);
|
||||||
this, SLOT(addedTarget(ProjectExplorer::Target*)));
|
|
||||||
|
|
||||||
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
|
connect(this, &QmlProject::activeTargetChanged, this, &QmlProject::onActiveTargetChanged);
|
||||||
this, SLOT(onActiveTargetChanged(ProjectExplorer::Target*)));
|
|
||||||
|
|
||||||
onActiveTargetChanged(activeTarget());
|
onActiveTargetChanged(activeTarget());
|
||||||
|
|
||||||
|
@@ -71,13 +71,15 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun
|
|||||||
m_fileListCombo = new QComboBox;
|
m_fileListCombo = new QComboBox;
|
||||||
m_fileListCombo->setModel(m_fileListModel);
|
m_fileListCombo->setModel(m_fileListModel);
|
||||||
|
|
||||||
connect(m_fileListCombo, SIGNAL(activated(int)), this, SLOT(setMainScript(int)));
|
connect(m_fileListCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
|
||||||
|
this, &QmlProjectRunConfigurationWidget::setMainScript);
|
||||||
connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()),
|
connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()),
|
||||||
SLOT(updateFileComboBox()));
|
SLOT(updateFileComboBox()));
|
||||||
|
|
||||||
QLineEdit *qmlViewerArgs = new QLineEdit;
|
QLineEdit *qmlViewerArgs = new QLineEdit;
|
||||||
qmlViewerArgs->setText(rc->m_qmlViewerArgs);
|
qmlViewerArgs->setText(rc->m_qmlViewerArgs);
|
||||||
connect(qmlViewerArgs, SIGNAL(textChanged(QString)), this, SLOT(onViewerArgsChanged()));
|
connect(qmlViewerArgs, &QLineEdit::textChanged,
|
||||||
|
this, &QmlProjectRunConfigurationWidget::onViewerArgsChanged);
|
||||||
|
|
||||||
form->addRow(tr("Arguments:"), qmlViewerArgs);
|
form->addRow(tr("Arguments:"), qmlViewerArgs);
|
||||||
form->addRow(tr("Main QML file:"), m_fileListCombo);
|
form->addRow(tr("Main QML file:"), m_fileListCombo);
|
||||||
|
@@ -78,7 +78,8 @@ void AbstractPackagingStep::ctor()
|
|||||||
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(setDeploymentDataModified()));
|
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(setDeploymentDataModified()));
|
||||||
setDeploymentDataModified();
|
setDeploymentDataModified();
|
||||||
|
|
||||||
connect(this, SIGNAL(unmodifyDeploymentData()), this, SLOT(setDeploymentDataUnmodified()));
|
connect(this, &AbstractPackagingStep::unmodifyDeploymentData,
|
||||||
|
this, &AbstractPackagingStep::setDeploymentDataUnmodified);
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractPackagingStep::~AbstractPackagingStep()
|
AbstractPackagingStep::~AbstractPackagingStep()
|
||||||
@@ -92,8 +93,8 @@ void AbstractPackagingStep::handleBuildConfigurationChanged()
|
|||||||
disconnect(d->currentBuildConfiguration, 0, this, 0);
|
disconnect(d->currentBuildConfiguration, 0, this, 0);
|
||||||
d->currentBuildConfiguration = target()->activeBuildConfiguration();
|
d->currentBuildConfiguration = target()->activeBuildConfiguration();
|
||||||
if (d->currentBuildConfiguration) {
|
if (d->currentBuildConfiguration) {
|
||||||
connect(d->currentBuildConfiguration, SIGNAL(buildDirectoryChanged()), this,
|
connect(d->currentBuildConfiguration, &BuildConfiguration::buildDirectoryChanged,
|
||||||
SIGNAL(packageFilePathChanged()));
|
this, &AbstractPackagingStep::packageFilePathChanged);
|
||||||
}
|
}
|
||||||
emit packageFilePathChanged();
|
emit packageFilePathChanged();
|
||||||
}
|
}
|
||||||
|
@@ -274,12 +274,13 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success)
|
|||||||
|
|
||||||
d->state = Connecting;
|
d->state = Connecting;
|
||||||
d->connection = QSsh::acquireConnection(deviceConfiguration()->sshParameters());
|
d->connection = QSsh::acquireConnection(deviceConfiguration()->sshParameters());
|
||||||
connect(d->connection, SIGNAL(error(QSsh::SshError)),
|
connect(d->connection, &SshConnection::error,
|
||||||
SLOT(handleConnectionFailure()));
|
this, &AbstractRemoteLinuxDeployService::handleConnectionFailure);
|
||||||
if (d->connection->state() == SshConnection::Connected) {
|
if (d->connection->state() == SshConnection::Connected) {
|
||||||
handleConnected();
|
handleConnected();
|
||||||
} else {
|
} else {
|
||||||
connect(d->connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(d->connection, &SshConnection::connected,
|
||||||
|
this, &AbstractRemoteLinuxDeployService::handleConnected);
|
||||||
emit progressMessage(tr("Connecting to device..."));
|
emit progressMessage(tr("Connecting to device..."));
|
||||||
if (d->connection->state() == SshConnection::Unconnected)
|
if (d->connection->state() == SshConnection::Unconnected)
|
||||||
d->connection->connectToHost();
|
d->connection->connectToHost();
|
||||||
|
@@ -97,8 +97,10 @@ void AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(d->state == Inactive, return);
|
QTC_ASSERT(d->state == Inactive, return);
|
||||||
d->state = GatheringPorts;
|
d->state = GatheringPorts;
|
||||||
connect(&d->portsGatherer, SIGNAL(error(QString)), SLOT(handlePortsGathererError(QString)));
|
connect(&d->portsGatherer, &DeviceUsedPortsGatherer::error,
|
||||||
connect(&d->portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady()));
|
this, &AbstractRemoteLinuxRunSupport::handlePortsGathererError);
|
||||||
|
connect(&d->portsGatherer, &DeviceUsedPortsGatherer::portListReady,
|
||||||
|
this, &AbstractRemoteLinuxRunSupport::handlePortListReady);
|
||||||
d->portsGatherer.start(d->device);
|
d->portsGatherer.start(d->device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -116,8 +116,10 @@ void AbstractUploadAndInstallPackageService::doDeploy()
|
|||||||
d->state = Uploading;
|
d->state = Uploading;
|
||||||
const QString fileName = Utils::FileName::fromString(packageFilePath()).fileName();
|
const QString fileName = Utils::FileName::fromString(packageFilePath()).fileName();
|
||||||
const QString remoteFilePath = uploadDir() + QLatin1Char('/') + fileName;
|
const QString remoteFilePath = uploadDir() + QLatin1Char('/') + fileName;
|
||||||
connect(d->uploader, SIGNAL(progress(QString)), SIGNAL(progressMessage(QString)));
|
connect(d->uploader, &PackageUploader::progress,
|
||||||
connect(d->uploader, SIGNAL(uploadFinished(QString)), SLOT(handleUploadFinished(QString)));
|
this, &AbstractUploadAndInstallPackageService::progressMessage);
|
||||||
|
connect(d->uploader, &PackageUploader::uploadFinished,
|
||||||
|
this, &AbstractUploadAndInstallPackageService::handleUploadFinished);
|
||||||
d->uploader->uploadPackage(connection(), packageFilePath(), remoteFilePath);
|
d->uploader->uploadPackage(connection(), packageFilePath(), remoteFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,9 +78,10 @@ void GenericLinuxDeviceTester::testDevice(const IDevice::ConstPtr &deviceConfigu
|
|||||||
|
|
||||||
d->deviceConfiguration = deviceConfiguration;
|
d->deviceConfiguration = deviceConfiguration;
|
||||||
d->connection = new SshConnection(deviceConfiguration->sshParameters(), this);
|
d->connection = new SshConnection(deviceConfiguration->sshParameters(), this);
|
||||||
connect(d->connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(d->connection, &SshConnection::connected,
|
||||||
connect(d->connection, SIGNAL(error(QSsh::SshError)),
|
this, &GenericLinuxDeviceTester::handleConnected);
|
||||||
SLOT(handleConnectionFailure()));
|
connect(d->connection, &SshConnection::error,
|
||||||
|
this, &GenericLinuxDeviceTester::handleConnectionFailure);
|
||||||
|
|
||||||
emit progressMessage(tr("Connecting to host..."));
|
emit progressMessage(tr("Connecting to host..."));
|
||||||
d->state = Connecting;
|
d->state = Connecting;
|
||||||
@@ -147,8 +148,10 @@ void GenericLinuxDeviceTester::handleProcessFinished(int exitStatus)
|
|||||||
emit progressMessage(QString::fromUtf8(d->process->readAllStandardOutput()));
|
emit progressMessage(QString::fromUtf8(d->process->readAllStandardOutput()));
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(&d->portsGatherer, SIGNAL(error(QString)), SLOT(handlePortsGatheringError(QString)));
|
connect(&d->portsGatherer, &DeviceUsedPortsGatherer::error,
|
||||||
connect(&d->portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady()));
|
this, &GenericLinuxDeviceTester::handlePortsGatheringError);
|
||||||
|
connect(&d->portsGatherer, &DeviceUsedPortsGatherer::portListReady,
|
||||||
|
this, &GenericLinuxDeviceTester::handlePortListReady);
|
||||||
|
|
||||||
emit progressMessage(tr("Checking if specified ports are available..."));
|
emit progressMessage(tr("Checking if specified ports are available..."));
|
||||||
d->state = TestingPorts;
|
d->state = TestingPorts;
|
||||||
|
@@ -59,7 +59,8 @@ void PackageUploader::uploadPackage(SshConnection *connection,
|
|||||||
m_localFilePath = localFilePath;
|
m_localFilePath = localFilePath;
|
||||||
m_remoteFilePath = remoteFilePath;
|
m_remoteFilePath = remoteFilePath;
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionFailure()));
|
connect(m_connection, &QSsh::SshConnection::error,
|
||||||
|
this, &PackageUploader::handleConnectionFailure);
|
||||||
m_uploader = m_connection->createSftpChannel();
|
m_uploader = m_connection->createSftpChannel();
|
||||||
connect(m_uploader.data(), SIGNAL(initialized()), this,
|
connect(m_uploader.data(), SIGNAL(initialized()), this,
|
||||||
SLOT(handleSftpChannelInitialized()));
|
SLOT(handleSftpChannelInitialized()));
|
||||||
|
@@ -75,9 +75,12 @@ PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const IDevice::ConstPtr &de
|
|||||||
d->done = false;
|
d->done = false;
|
||||||
setLabelText(tr("Deploying..."));
|
setLabelText(tr("Deploying..."));
|
||||||
setValue(0);
|
setValue(0);
|
||||||
connect(this, SIGNAL(canceled()), SLOT(handleCanceled()));
|
connect(this, &PublicKeyDeploymentDialog::canceled,
|
||||||
connect(&d->keyDeployer, SIGNAL(error(QString)), SLOT(handleDeploymentError(QString)));
|
this, &PublicKeyDeploymentDialog::handleCanceled);
|
||||||
connect(&d->keyDeployer, SIGNAL(finishedSuccessfully()), SLOT(handleDeploymentSuccess()));
|
connect(&d->keyDeployer, &SshKeyDeployer::error,
|
||||||
|
this, &PublicKeyDeploymentDialog::handleDeploymentError);
|
||||||
|
connect(&d->keyDeployer, &SshKeyDeployer::finishedSuccessfully,
|
||||||
|
this, &PublicKeyDeploymentDialog::handleDeploymentSuccess);
|
||||||
d->keyDeployer.deployPublicKey(deviceConfig->sshParameters(), publicKeyFileName);
|
d->keyDeployer.deployPublicKey(deviceConfig->sshParameters(), publicKeyFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -96,8 +96,8 @@ RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(AbstractRemoteLinuxRunConfi
|
|||||||
{
|
{
|
||||||
connect(d->runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
|
connect(d->runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
|
||||||
SLOT(handleRemoteSetupRequested()));
|
SLOT(handleRemoteSetupRequested()));
|
||||||
connect(&d->outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
|
connect(&d->outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||||
SLOT(remoteIsRunning()));
|
this, &RemoteLinuxAnalyzeSupport::remoteIsRunning);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxAnalyzeSupport::~RemoteLinuxAnalyzeSupport()
|
RemoteLinuxAnalyzeSupport::~RemoteLinuxAnalyzeSupport()
|
||||||
@@ -133,12 +133,18 @@ void RemoteLinuxAnalyzeSupport::startExecution()
|
|||||||
setState(StartingRunner);
|
setState(StartingRunner);
|
||||||
|
|
||||||
DeviceApplicationRunner *runner = appRunner();
|
DeviceApplicationRunner *runner = appRunner();
|
||||||
connect(runner, SIGNAL(remoteStderr(QByteArray)), SLOT(handleRemoteErrorOutput(QByteArray)));
|
connect(runner, &DeviceApplicationRunner::remoteStderr,
|
||||||
connect(runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
this, &RemoteLinuxAnalyzeSupport::handleRemoteErrorOutput);
|
||||||
connect(runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted()));
|
connect(runner, &DeviceApplicationRunner::remoteStdout,
|
||||||
connect(runner, SIGNAL(finished(bool)), SLOT(handleAppRunnerFinished(bool)));
|
this, &RemoteLinuxAnalyzeSupport::handleRemoteOutput);
|
||||||
connect(runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString)));
|
connect(runner, &DeviceApplicationRunner::remoteProcessStarted,
|
||||||
connect(runner, SIGNAL(reportError(QString)), SLOT(handleAppRunnerError(QString)));
|
this, &RemoteLinuxAnalyzeSupport::handleRemoteProcessStarted);
|
||||||
|
connect(runner, &DeviceApplicationRunner::finished,
|
||||||
|
this, &RemoteLinuxAnalyzeSupport::handleAppRunnerFinished);
|
||||||
|
connect(runner, &DeviceApplicationRunner::reportProgress,
|
||||||
|
this, &RemoteLinuxAnalyzeSupport::handleProgressReport);
|
||||||
|
connect(runner, &DeviceApplicationRunner::reportError,
|
||||||
|
this, &RemoteLinuxAnalyzeSupport::handleAppRunnerError);
|
||||||
|
|
||||||
const QStringList args = arguments()
|
const QStringList args = arguments()
|
||||||
<< QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(d->qmlPort);
|
<< QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(d->qmlPort);
|
||||||
|
@@ -129,8 +129,10 @@ bool RemoteLinuxCheckForFreeDiskSpaceService::isDeploymentPossible(QString *whyN
|
|||||||
void RemoteLinuxCheckForFreeDiskSpaceService::doDeploy()
|
void RemoteLinuxCheckForFreeDiskSpaceService::doDeploy()
|
||||||
{
|
{
|
||||||
d->processRunner = new QSsh::SshRemoteProcessRunner;
|
d->processRunner = new QSsh::SshRemoteProcessRunner;
|
||||||
connect(d->processRunner, SIGNAL(processClosed(int)), SLOT(handleProcessFinished()));
|
connect(d->processRunner, &QSsh::SshRemoteProcessRunner::processClosed,
|
||||||
connect(d->processRunner, SIGNAL(readyReadStandardError()), SLOT(handleStdErr()));
|
this, &RemoteLinuxCheckForFreeDiskSpaceService::handleProcessFinished);
|
||||||
|
connect(d->processRunner, &QSsh::SshRemoteProcessRunner::readyReadStandardError,
|
||||||
|
this, &RemoteLinuxCheckForFreeDiskSpaceService::handleStdErr);
|
||||||
const QString command = QString::fromLatin1("df -k %1 |tail -n 1 |sed 's/ */ /g' "
|
const QString command = QString::fromLatin1("df -k %1 |tail -n 1 |sed 's/ */ /g' "
|
||||||
"|cut -d ' ' -f 4").arg(d->pathToCheck);
|
"|cut -d ' ' -f 4").arg(d->pathToCheck);
|
||||||
d->processRunner->run(command.toUtf8(), deviceConfiguration()->sshParameters());
|
d->processRunner->run(command.toUtf8(), deviceConfiguration()->sshParameters());
|
||||||
|
@@ -168,10 +168,13 @@ void LinuxDeviceDebugSupport::startExecution()
|
|||||||
d->gdbserverOutput.clear();
|
d->gdbserverOutput.clear();
|
||||||
|
|
||||||
DeviceApplicationRunner *runner = appRunner();
|
DeviceApplicationRunner *runner = appRunner();
|
||||||
connect(runner, SIGNAL(remoteStderr(QByteArray)), SLOT(handleRemoteErrorOutput(QByteArray)));
|
connect(runner, &DeviceApplicationRunner::remoteStderr,
|
||||||
connect(runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
this, &LinuxDeviceDebugSupport::handleRemoteErrorOutput);
|
||||||
|
connect(runner, &DeviceApplicationRunner::remoteStdout,
|
||||||
|
this, &LinuxDeviceDebugSupport::handleRemoteOutput);
|
||||||
if (d->qmlDebugging && !d->cppDebugging)
|
if (d->qmlDebugging && !d->cppDebugging)
|
||||||
connect(runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted()));
|
connect(runner, &DeviceApplicationRunner::remoteProcessStarted,
|
||||||
|
this, &LinuxDeviceDebugSupport::handleRemoteProcessStarted);
|
||||||
|
|
||||||
QStringList args = arguments();
|
QStringList args = arguments();
|
||||||
QString command;
|
QString command;
|
||||||
@@ -190,9 +193,12 @@ void LinuxDeviceDebugSupport::startExecution()
|
|||||||
args.append(QString::fromLatin1(":%1").arg(d->gdbServerPort));
|
args.append(QString::fromLatin1(":%1").arg(d->gdbServerPort));
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(runner, SIGNAL(finished(bool)), SLOT(handleAppRunnerFinished(bool)));
|
connect(runner, &DeviceApplicationRunner::finished,
|
||||||
connect(runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString)));
|
this, &LinuxDeviceDebugSupport::handleAppRunnerFinished);
|
||||||
connect(runner, SIGNAL(reportError(QString)), SLOT(handleAppRunnerError(QString)));
|
connect(runner, &DeviceApplicationRunner::reportProgress,
|
||||||
|
this, &LinuxDeviceDebugSupport::handleProgressReport);
|
||||||
|
connect(runner, &DeviceApplicationRunner::reportError,
|
||||||
|
this, &LinuxDeviceDebugSupport::handleAppRunnerError);
|
||||||
runner->setEnvironment(environment());
|
runner->setEnvironment(environment());
|
||||||
runner->setWorkingDirectory(workingDirectory());
|
runner->setWorkingDirectory(workingDirectory());
|
||||||
runner->start(device(), command, args);
|
runner->start(device(), command, args);
|
||||||
|
@@ -50,9 +50,11 @@ RemoteLinuxEnvironmentAspectWidget::RemoteLinuxEnvironmentAspectWidget(RemoteLin
|
|||||||
{
|
{
|
||||||
QPushButton *button = fetchButton();
|
QPushButton *button = fetchButton();
|
||||||
button->setText(FetchEnvButtonText);
|
button->setText(FetchEnvButtonText);
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
|
connect(button, &QPushButton::clicked, this, &RemoteLinuxEnvironmentAspectWidget::fetchEnvironment);
|
||||||
connect(deviceEnvReader, SIGNAL(finished()), this, SLOT(fetchEnvironmentFinished()));
|
connect(deviceEnvReader, &Internal::RemoteLinuxEnvironmentReader::finished,
|
||||||
connect(deviceEnvReader, SIGNAL(error(QString)), this, SLOT(fetchEnvironmentError(QString)));
|
this, &RemoteLinuxEnvironmentAspectWidget::fetchEnvironmentFinished);
|
||||||
|
connect(deviceEnvReader, &Internal::RemoteLinuxEnvironmentReader::error,
|
||||||
|
this, &RemoteLinuxEnvironmentAspectWidget::fetchEnvironmentError);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxEnvironmentAspect *RemoteLinuxEnvironmentAspectWidget::aspect() const
|
RemoteLinuxEnvironmentAspect *RemoteLinuxEnvironmentAspectWidget::aspect() const
|
||||||
@@ -68,8 +70,10 @@ QPushButton *RemoteLinuxEnvironmentAspectWidget::fetchButton() const
|
|||||||
void RemoteLinuxEnvironmentAspectWidget::fetchEnvironment()
|
void RemoteLinuxEnvironmentAspectWidget::fetchEnvironment()
|
||||||
{
|
{
|
||||||
QPushButton *button = fetchButton();
|
QPushButton *button = fetchButton();
|
||||||
disconnect(button, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
|
disconnect(button, &QPushButton::clicked,
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
|
this, &RemoteLinuxEnvironmentAspectWidget::fetchEnvironment);
|
||||||
|
connect(button, &QPushButton::clicked,
|
||||||
|
this, &RemoteLinuxEnvironmentAspectWidget::stopFetchEnvironment);
|
||||||
button->setText(tr("Cancel Fetch Operation"));
|
button->setText(tr("Cancel Fetch Operation"));
|
||||||
deviceEnvReader->start();
|
deviceEnvReader->start();
|
||||||
}
|
}
|
||||||
@@ -77,8 +81,10 @@ void RemoteLinuxEnvironmentAspectWidget::fetchEnvironment()
|
|||||||
void RemoteLinuxEnvironmentAspectWidget::fetchEnvironmentFinished()
|
void RemoteLinuxEnvironmentAspectWidget::fetchEnvironmentFinished()
|
||||||
{
|
{
|
||||||
QPushButton *button = fetchButton();
|
QPushButton *button = fetchButton();
|
||||||
disconnect(button, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
|
disconnect(button, &QPushButton::clicked,
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
|
this, &RemoteLinuxEnvironmentAspectWidget::stopFetchEnvironment);
|
||||||
|
connect(button, &QPushButton::clicked,
|
||||||
|
this, &RemoteLinuxEnvironmentAspectWidget::fetchEnvironment);
|
||||||
button->setText(FetchEnvButtonText);
|
button->setText(FetchEnvButtonText);
|
||||||
aspect()->setRemoteEnvironment(deviceEnvReader->remoteEnvironment());
|
aspect()->setRemoteEnvironment(deviceEnvReader->remoteEnvironment());
|
||||||
}
|
}
|
||||||
|
@@ -58,8 +58,10 @@ void RemoteLinuxEnvironmentReader::start()
|
|||||||
return;
|
return;
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
m_deviceProcess = device->createProcess(this);
|
m_deviceProcess = device->createProcess(this);
|
||||||
connect(m_deviceProcess, SIGNAL(error(QProcess::ProcessError)), SLOT(handleError()));
|
connect(m_deviceProcess, &ProjectExplorer::DeviceProcess::error,
|
||||||
connect(m_deviceProcess, SIGNAL(finished()), SLOT(remoteProcessFinished()));
|
this, &RemoteLinuxEnvironmentReader::handleError);
|
||||||
|
connect(m_deviceProcess, &ProjectExplorer::DeviceProcess::finished,
|
||||||
|
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
||||||
m_deviceProcess->start(QLatin1String("env"));
|
m_deviceProcess->start(QLatin1String("env"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,10 +70,14 @@ void AbstractRemoteLinuxPackageInstaller::installPackage(const IDevice::ConstPtr
|
|||||||
prepareInstallation();
|
prepareInstallation();
|
||||||
if (!d->installer)
|
if (!d->installer)
|
||||||
d->installer = new SshRemoteProcessRunner(this);
|
d->installer = new SshRemoteProcessRunner(this);
|
||||||
connect(d->installer, SIGNAL(connectionError()), SLOT(handleConnectionError()));
|
connect(d->installer, &QSsh::SshRemoteProcessRunner::connectionError,
|
||||||
connect(d->installer, SIGNAL(readyReadStandardOutput()), SLOT(handleInstallerOutput()));
|
this, &AbstractRemoteLinuxPackageInstaller::handleConnectionError);
|
||||||
connect(d->installer, SIGNAL(readyReadStandardError()), SLOT(handleInstallerErrorOutput()));
|
connect(d->installer, &QSsh::SshRemoteProcessRunner::readyReadStandardOutput,
|
||||||
connect(d->installer, SIGNAL(processClosed(int)), SLOT(handleInstallationFinished(int)));
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerOutput);
|
||||||
|
connect(d->installer, &QSsh::SshRemoteProcessRunner::readyReadStandardError,
|
||||||
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerErrorOutput);
|
||||||
|
connect(d->installer, &QSsh::SshRemoteProcessRunner::processClosed,
|
||||||
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallationFinished);
|
||||||
|
|
||||||
QString cmdLine = installCommandLine(packageFilePath);
|
QString cmdLine = installCommandLine(packageFilePath);
|
||||||
if (removePackageFile)
|
if (removePackageFile)
|
||||||
|
@@ -88,8 +88,8 @@ RemoteLinuxRunConfigurationWidget::RemoteLinuxRunConfigurationWidget(RemoteLinux
|
|||||||
mainLayout->setMargin(0);
|
mainLayout->setMargin(0);
|
||||||
addGenericWidgets(mainLayout);
|
addGenericWidgets(mainLayout);
|
||||||
|
|
||||||
connect(d->runConfiguration, SIGNAL(enabledChanged()),
|
connect(d->runConfiguration, &RemoteLinuxRunConfiguration::enabledChanged,
|
||||||
SLOT(runConfigurationEnabledChange()));
|
this, &RemoteLinuxRunConfigurationWidget::runConfigurationEnabledChange);
|
||||||
runConfigurationEnabledChange();
|
runConfigurationEnabledChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,16 +157,18 @@ void RemoteLinuxRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayou
|
|||||||
d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory());
|
d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory());
|
||||||
d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit);
|
d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit);
|
||||||
|
|
||||||
connect(&d->argsLineEdit, SIGNAL(textEdited(QString)), SLOT(argumentsEdited(QString)));
|
connect(&d->argsLineEdit, &QLineEdit::textEdited,
|
||||||
connect(d->runConfiguration, SIGNAL(targetInformationChanged()), this,
|
this, &RemoteLinuxRunConfigurationWidget::argumentsEdited);
|
||||||
SLOT(updateTargetInformation()));
|
connect(d->runConfiguration, &RemoteLinuxRunConfiguration::targetInformationChanged,
|
||||||
connect(d->runConfiguration, SIGNAL(deploySpecsChanged()), SLOT(handleDeploySpecsChanged()));
|
this, &RemoteLinuxRunConfigurationWidget::updateTargetInformation);
|
||||||
connect(&d->useAlternateCommandBox, SIGNAL(toggled(bool)),
|
connect(d->runConfiguration, &RemoteLinuxRunConfiguration::deploySpecsChanged,
|
||||||
SLOT(handleUseAlternateCommandChanged()));
|
this, &RemoteLinuxRunConfigurationWidget::handleDeploySpecsChanged);
|
||||||
connect(&d->alternateCommand, SIGNAL(textEdited(QString)),
|
connect(&d->useAlternateCommandBox, &QCheckBox::toggled,
|
||||||
SLOT(handleAlternateCommandChanged()));
|
this, &RemoteLinuxRunConfigurationWidget::handleUseAlternateCommandChanged);
|
||||||
connect(&d->workingDirLineEdit, SIGNAL(textEdited(QString)),
|
connect(&d->alternateCommand, &QLineEdit::textEdited,
|
||||||
SLOT(handleWorkingDirectoryChanged()));
|
this, &RemoteLinuxRunConfigurationWidget::handleAlternateCommandChanged);
|
||||||
|
connect(&d->workingDirLineEdit, &QLineEdit::textEdited,
|
||||||
|
this, &RemoteLinuxRunConfigurationWidget::handleWorkingDirectoryChanged);
|
||||||
handleDeploySpecsChanged();
|
handleDeploySpecsChanged();
|
||||||
handleUseAlternateCommandChanged();
|
handleUseAlternateCommandChanged();
|
||||||
}
|
}
|
||||||
|
@@ -80,12 +80,16 @@ void RemoteLinuxRunControl::start()
|
|||||||
d->running = true;
|
d->running = true;
|
||||||
emit started();
|
emit started();
|
||||||
d->runner.disconnect(this);
|
d->runner.disconnect(this);
|
||||||
connect(&d->runner, SIGNAL(reportError(QString)), SLOT(handleErrorMessage(QString)));
|
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::reportError,
|
||||||
connect(&d->runner, SIGNAL(remoteStderr(QByteArray)),
|
this, &RemoteLinuxRunControl::handleErrorMessage);
|
||||||
SLOT(handleRemoteErrorOutput(QByteArray)));
|
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::remoteStderr,
|
||||||
connect(&d->runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
this, &RemoteLinuxRunControl::handleRemoteErrorOutput);
|
||||||
connect(&d->runner, SIGNAL(finished(bool)), SLOT(handleRunnerFinished()));
|
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::remoteStdout,
|
||||||
connect(&d->runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString)));
|
this, &RemoteLinuxRunControl::handleRemoteOutput);
|
||||||
|
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::finished,
|
||||||
|
this, &RemoteLinuxRunControl::handleRunnerFinished);
|
||||||
|
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::reportProgress,
|
||||||
|
this, &RemoteLinuxRunControl::handleProgressReport);
|
||||||
d->runner.setEnvironment(d->environment);
|
d->runner.setEnvironment(d->environment);
|
||||||
d->runner.setWorkingDirectory(d->workingDir);
|
d->runner.setWorkingDirectory(d->workingDir);
|
||||||
d->runner.start(d->device, d->remoteExecutable, d->arguments);
|
d->runner.start(d->device, d->remoteExecutable, d->arguments);
|
||||||
|
@@ -47,8 +47,10 @@ RemoteLinuxSignalOperation::RemoteLinuxSignalOperation(
|
|||||||
RemoteLinuxSignalOperation::~RemoteLinuxSignalOperation()
|
RemoteLinuxSignalOperation::~RemoteLinuxSignalOperation()
|
||||||
{
|
{
|
||||||
if (m_runner) {
|
if (m_runner) {
|
||||||
connect(m_runner, SIGNAL(processClosed(int)), m_runner, SLOT(deleteLater()));
|
connect(m_runner, &QSsh::SshRemoteProcessRunner::processClosed,
|
||||||
connect(m_runner, SIGNAL(connectionError()), m_runner, SLOT(deleteLater()));
|
m_runner, &QSsh::SshRemoteProcessRunner::deleteLater);
|
||||||
|
connect(m_runner, &QSsh::SshRemoteProcessRunner::connectionError,
|
||||||
|
m_runner, &QSsh::SshRemoteProcessRunner::deleteLater);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,8 +67,10 @@ void SshKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(&d->deployProcess, SIGNAL(connectionError()), SLOT(handleConnectionFailure()));
|
connect(&d->deployProcess, &SshRemoteProcessRunner::connectionError,
|
||||||
connect(&d->deployProcess, SIGNAL(processClosed(int)), SLOT(handleKeyUploadFinished(int)));
|
this, &SshKeyDeployer::handleConnectionFailure);
|
||||||
|
connect(&d->deployProcess, &SshRemoteProcessRunner::processClosed,
|
||||||
|
this, &SshKeyDeployer::handleKeyUploadFinished);
|
||||||
const QByteArray command = "test -d .ssh "
|
const QByteArray command = "test -d .ssh "
|
||||||
"|| mkdir .ssh && chmod 0700 .ssh && echo '"
|
"|| mkdir .ssh && chmod 0700 .ssh && echo '"
|
||||||
+ reader.data() + "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys";
|
+ reader.data() + "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys";
|
||||||
|
@@ -48,9 +48,11 @@ CallgrindRunControl::CallgrindRunControl(const AnalyzerStartParameters &sp,
|
|||||||
: ValgrindRunControl(sp, runConfiguration)
|
: ValgrindRunControl(sp, runConfiguration)
|
||||||
, m_markAsPaused(false)
|
, m_markAsPaused(false)
|
||||||
{
|
{
|
||||||
connect(&m_runner, SIGNAL(finished()), this, SLOT(slotFinished()));
|
connect(&m_runner, &Valgrind::Callgrind::CallgrindRunner::finished,
|
||||||
|
this, &CallgrindRunControl::slotFinished);
|
||||||
connect(m_runner.parser(), SIGNAL(parserDataReady()), this, SLOT(slotFinished()));
|
connect(m_runner.parser(), SIGNAL(parserDataReady()), this, SLOT(slotFinished()));
|
||||||
connect(&m_runner, SIGNAL(statusMessage(QString)), SLOT(showStatusMessage(QString)));
|
connect(&m_runner, &Valgrind::Callgrind::CallgrindRunner::statusMessage,
|
||||||
|
this, &CallgrindRunControl::showStatusMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallgrindRunControl::showStatusMessage(const QString &msg)
|
void CallgrindRunControl::showStatusMessage(const QString &msg)
|
||||||
|
@@ -52,12 +52,12 @@ MemcheckRunControl::MemcheckRunControl(const AnalyzerStartParameters &sp,
|
|||||||
ProjectExplorer::RunConfiguration *runConfiguration)
|
ProjectExplorer::RunConfiguration *runConfiguration)
|
||||||
: ValgrindRunControl(sp, runConfiguration)
|
: ValgrindRunControl(sp, runConfiguration)
|
||||||
{
|
{
|
||||||
connect(&m_parser, SIGNAL(error(Valgrind::XmlProtocol::Error)),
|
connect(&m_parser, &XmlProtocol::ThreadedParser::error,
|
||||||
SIGNAL(parserError(Valgrind::XmlProtocol::Error)));
|
this, &MemcheckRunControl::parserError);
|
||||||
connect(&m_parser, SIGNAL(suppressionCount(QString,qint64)),
|
connect(&m_parser, &XmlProtocol::ThreadedParser::suppressionCount,
|
||||||
SIGNAL(suppressionCount(QString,qint64)));
|
this, &MemcheckRunControl::suppressionCount);
|
||||||
connect(&m_parser, SIGNAL(internalError(QString)),
|
connect(&m_parser, &XmlProtocol::ThreadedParser::internalError,
|
||||||
SIGNAL(internalParserError(QString)));
|
this, &MemcheckRunControl::internalParserError);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MemcheckRunControl::progressTitle() const
|
QString MemcheckRunControl::progressTitle() const
|
||||||
|
@@ -187,8 +187,7 @@ QWidget *MemcheckErrorDelegate::createDetailsWidget(const QFont & font,
|
|||||||
errorLocation(errorIndex, error, /*link=*/ true,
|
errorLocation(errorIndex, error, /*link=*/ true,
|
||||||
/*absolutePath=*/ false, linkStyle),
|
/*absolutePath=*/ false, linkStyle),
|
||||||
linkStyle));
|
linkStyle));
|
||||||
connect(errorLabel, &QLabel::linkActivated,
|
connect(errorLabel, &QLabel::linkActivated, this, &MemcheckErrorDelegate::openLinkInEditor);
|
||||||
this, &MemcheckErrorDelegate::openLinkInEditor);
|
|
||||||
layout->addWidget(errorLabel);
|
layout->addWidget(errorLabel);
|
||||||
|
|
||||||
const QVector<Stack> stacks = error.stacks();
|
const QVector<Stack> stacks = error.stacks();
|
||||||
@@ -223,8 +222,7 @@ QWidget *MemcheckErrorDelegate::createDetailsWidget(const QFont & font,
|
|||||||
QFont fixedPitchFont = font;
|
QFont fixedPitchFont = font;
|
||||||
fixedPitchFont.setFixedPitch(true);
|
fixedPitchFont.setFixedPitch(true);
|
||||||
frameLabel->setFont(fixedPitchFont);
|
frameLabel->setFont(fixedPitchFont);
|
||||||
connect(frameLabel, &QLabel::linkActivated,
|
connect(frameLabel, &QLabel::linkActivated, this, &MemcheckErrorDelegate::openLinkInEditor);
|
||||||
this, &MemcheckErrorDelegate::openLinkInEditor);
|
|
||||||
// pad frameNr to 2 chars since only 50 frames max are supported by valgrind
|
// pad frameNr to 2 chars since only 50 frames max are supported by valgrind
|
||||||
const QString displayText = displayTextTemplate
|
const QString displayText = displayTextTemplate
|
||||||
.arg(frameNr++, 2).arg(frameName);
|
.arg(frameNr++, 2).arg(frameName);
|
||||||
|
@@ -250,12 +250,12 @@ void MemcheckTool::updateFromSettings()
|
|||||||
m_filterProjectAction->setChecked(!m_settings->filterExternalIssues());
|
m_filterProjectAction->setChecked(!m_settings->filterExternalIssues());
|
||||||
m_errorView->settingsChanged(m_settings);
|
m_errorView->settingsChanged(m_settings);
|
||||||
|
|
||||||
connect(m_settings, SIGNAL(visibleErrorKindsChanged(QList<int>)),
|
connect(m_settings, &ValgrindBaseSettings::visibleErrorKindsChanged,
|
||||||
m_errorProxyModel, SLOT(setAcceptedKinds(QList<int>)));
|
m_errorProxyModel, &MemcheckErrorFilterProxyModel::setAcceptedKinds);
|
||||||
m_errorProxyModel->setAcceptedKinds(m_settings->visibleErrorKinds());
|
m_errorProxyModel->setAcceptedKinds(m_settings->visibleErrorKinds());
|
||||||
|
|
||||||
connect(m_settings, SIGNAL(filterExternalIssuesChanged(bool)),
|
connect(m_settings, &ValgrindBaseSettings::filterExternalIssuesChanged,
|
||||||
m_errorProxyModel, SLOT(setFilterExternalIssues(bool)));
|
m_errorProxyModel, &MemcheckErrorFilterProxyModel::setFilterExternalIssues);
|
||||||
m_errorProxyModel->setFilterExternalIssues(m_settings->filterExternalIssues());
|
m_errorProxyModel->setFilterExternalIssues(m_settings->filterExternalIssues());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ void MemcheckTool::maybeActiveRunConfigurationChanged()
|
|||||||
// now make the new settings current, update and connect input widgets
|
// now make the new settings current, update and connect input widgets
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
QTC_ASSERT(m_settings, return);
|
QTC_ASSERT(m_settings, return);
|
||||||
connect(m_settings, SIGNAL(destroyed(QObject*)), SLOT(settingsDestroyed(QObject*)));
|
connect(m_settings, &ValgrindBaseSettings::destroyed, this, &MemcheckTool::settingsDestroyed);
|
||||||
|
|
||||||
updateFromSettings();
|
updateFromSettings();
|
||||||
}
|
}
|
||||||
@@ -381,7 +381,7 @@ QWidget *MemcheckTool::createWidgets()
|
|||||||
action = new QAction(this);
|
action = new QAction(this);
|
||||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_OPENFILE)));
|
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_OPENFILE)));
|
||||||
action->setToolTip(tr("Load External XML Log File"));
|
action->setToolTip(tr("Load External XML Log File"));
|
||||||
connect(action, SIGNAL(triggered(bool)), this, SLOT(loadExternalXmlLogFile()));
|
connect(action, &QAction::triggered, this, &MemcheckTool::loadExternalXmlLogFile);
|
||||||
button = new QToolButton;
|
button = new QToolButton;
|
||||||
button->setDefaultAction(action);
|
button->setDefaultAction(action);
|
||||||
layout->addWidget(button);
|
layout->addWidget(button);
|
||||||
@@ -421,7 +421,7 @@ QWidget *MemcheckTool::createWidgets()
|
|||||||
m_filterMenu->addSeparator();
|
m_filterMenu->addSeparator();
|
||||||
m_filterMenu->addAction(m_filterProjectAction);
|
m_filterMenu->addAction(m_filterProjectAction);
|
||||||
m_filterMenu->addAction(m_suppressionSeparator);
|
m_filterMenu->addAction(m_suppressionSeparator);
|
||||||
connect(m_filterMenu, SIGNAL(triggered(QAction*)), SLOT(updateErrorFilter()));
|
connect(m_filterMenu, &QMenu::triggered, this, &MemcheckTool::updateErrorFilter);
|
||||||
filterButton->setMenu(m_filterMenu);
|
filterButton->setMenu(m_filterMenu);
|
||||||
layout->addWidget(filterButton);
|
layout->addWidget(filterButton);
|
||||||
|
|
||||||
@@ -440,13 +440,10 @@ AnalyzerRunControl *MemcheckTool::createRunControl(const AnalyzerStartParameters
|
|||||||
|
|
||||||
MemcheckRunControl *engine = new MemcheckRunControl(sp, runConfiguration);
|
MemcheckRunControl *engine = new MemcheckRunControl(sp, runConfiguration);
|
||||||
|
|
||||||
connect(engine, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
|
connect(engine, &MemcheckRunControl::starting, this, &MemcheckTool::engineStarting);
|
||||||
this, SLOT(engineStarting(const Analyzer::AnalyzerRunControl*)));
|
connect(engine, &MemcheckRunControl::parserError, this, &MemcheckTool::parserError);
|
||||||
connect(engine, SIGNAL(parserError(Valgrind::XmlProtocol::Error)),
|
connect(engine, &MemcheckRunControl::internalParserError, this, &MemcheckTool::internalParserError);
|
||||||
this, SLOT(parserError(Valgrind::XmlProtocol::Error)));
|
connect(engine, &MemcheckRunControl::finished, this, &MemcheckTool::engineFinished);
|
||||||
connect(engine, SIGNAL(internalParserError(QString)),
|
|
||||||
this, SLOT(internalParserError(QString)));
|
|
||||||
connect(engine, SIGNAL(finished()), this, SLOT(engineFinished()));
|
|
||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,8 +467,7 @@ void MemcheckTool::engineStarting(const AnalyzerRunControl *engine)
|
|||||||
QAction *action = m_filterMenu->addAction(Utils::FileName::fromString(file).fileName());
|
QAction *action = m_filterMenu->addAction(Utils::FileName::fromString(file).fileName());
|
||||||
action->setToolTip(file);
|
action->setToolTip(file);
|
||||||
action->setData(file);
|
action->setData(file);
|
||||||
connect(action, SIGNAL(triggered(bool)),
|
connect(action, &QAction::triggered, this, &MemcheckTool::suppressionActionTriggered);
|
||||||
this, SLOT(suppressionActionTriggered()));
|
|
||||||
m_suppressionActions.append(action);
|
m_suppressionActions.append(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -515,12 +511,10 @@ void MemcheckTool::loadExternalXmlLogFile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ThreadedParser *parser = new ThreadedParser;
|
ThreadedParser *parser = new ThreadedParser;
|
||||||
connect(parser, SIGNAL(error(Valgrind::XmlProtocol::Error)),
|
connect(parser, &ThreadedParser::error, this, &MemcheckTool::parserError);
|
||||||
this, SLOT(parserError(Valgrind::XmlProtocol::Error)));
|
connect(parser, &ThreadedParser::internalError, this, &MemcheckTool::internalParserError);
|
||||||
connect(parser, SIGNAL(internalError(QString)),
|
connect(parser, &ThreadedParser::finished, this, &MemcheckTool::loadingExternalXmlLogFileFinished);
|
||||||
this, SLOT(internalParserError(QString)));
|
connect(parser, &ThreadedParser::finished, parser, &ThreadedParser::deleteLater);
|
||||||
connect(parser, SIGNAL(finished()), this, SLOT(loadingExternalXmlLogFileFinished()));
|
|
||||||
connect(parser, SIGNAL(finished()), parser, SLOT(deleteLater()));
|
|
||||||
|
|
||||||
parser->parse(logFile); // ThreadedParser owns the file
|
parser->parse(logFile); // ThreadedParser owns the file
|
||||||
}
|
}
|
||||||
|
@@ -63,14 +63,14 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings,
|
|||||||
m_ui->valgrindExeChooser->setPromptDialogTitle(tr("Valgrind Command"));
|
m_ui->valgrindExeChooser->setPromptDialogTitle(tr("Valgrind Command"));
|
||||||
|
|
||||||
updateUi();
|
updateUi();
|
||||||
connect(m_settings, SIGNAL(changed()), this, SLOT(updateUi()));
|
connect(m_settings, &ValgrindBaseSettings::changed, this, &ValgrindConfigWidget::updateUi);
|
||||||
|
|
||||||
connect(m_ui->valgrindExeChooser, SIGNAL(changed(QString)),
|
connect(m_ui->valgrindExeChooser, &Utils::PathChooser::changed,
|
||||||
m_settings, SLOT(setValgrindExecutable(QString)));
|
m_settings, &ValgrindBaseSettings::setValgrindExecutable);
|
||||||
connect(m_settings, SIGNAL(valgrindExecutableChanged(QString)),
|
connect(m_settings, SIGNAL(valgrindExecutableChanged(QString)),
|
||||||
m_ui->valgrindExeChooser, SLOT(setPath(QString)));
|
m_ui->valgrindExeChooser, SLOT(setPath(QString)));
|
||||||
connect(m_ui->smcDetectionComboBox, SIGNAL(currentIndexChanged(int)),
|
connect(m_ui->smcDetectionComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||||
m_settings, SLOT(setSelfModifyingCodeDetection(int)));
|
m_settings, &ValgrindBaseSettings::setSelfModifyingCodeDetection);
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||||
// FIXME: On Window we know that we don't have a local valgrind
|
// FIXME: On Window we know that we don't have a local valgrind
|
||||||
@@ -82,38 +82,38 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings,
|
|||||||
//
|
//
|
||||||
// Callgrind
|
// Callgrind
|
||||||
//
|
//
|
||||||
connect(m_ui->enableCacheSim, SIGNAL(toggled(bool)),
|
connect(m_ui->enableCacheSim, &QCheckBox::toggled,
|
||||||
m_settings, SLOT(setEnableCacheSim(bool)));
|
m_settings, &ValgrindBaseSettings::setEnableCacheSim);
|
||||||
connect(m_settings, SIGNAL(enableCacheSimChanged(bool)),
|
connect(m_settings, SIGNAL(enableCacheSimChanged(bool)),
|
||||||
m_ui->enableCacheSim, SLOT(setChecked(bool)));
|
m_ui->enableCacheSim, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->enableBranchSim, SIGNAL(toggled(bool)),
|
connect(m_ui->enableBranchSim, &QCheckBox::toggled,
|
||||||
m_settings, SLOT(setEnableBranchSim(bool)));
|
m_settings, &ValgrindBaseSettings::setEnableBranchSim);
|
||||||
connect(m_settings, SIGNAL(enableBranchSimChanged(bool)),
|
connect(m_settings, SIGNAL(enableBranchSimChanged(bool)),
|
||||||
m_ui->enableBranchSim, SLOT(setChecked(bool)));
|
m_ui->enableBranchSim, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->collectSystime, SIGNAL(toggled(bool)),
|
connect(m_ui->collectSystime, &QCheckBox::toggled,
|
||||||
m_settings, SLOT(setCollectSystime(bool)));
|
m_settings, &ValgrindBaseSettings::setCollectSystime);
|
||||||
connect(m_settings, SIGNAL(collectSystimeChanged(bool)),
|
connect(m_settings, SIGNAL(collectSystimeChanged(bool)),
|
||||||
m_ui->collectSystime, SLOT(setChecked(bool)));
|
m_ui->collectSystime, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->collectBusEvents, SIGNAL(toggled(bool)),
|
connect(m_ui->collectBusEvents, &QCheckBox::toggled,
|
||||||
m_settings, SLOT(setCollectBusEvents(bool)));
|
m_settings, &ValgrindBaseSettings::setCollectBusEvents);
|
||||||
connect(m_settings, SIGNAL(collectBusEventsChanged(bool)),
|
connect(m_settings, SIGNAL(collectBusEventsChanged(bool)),
|
||||||
m_ui->collectBusEvents, SLOT(setChecked(bool)));
|
m_ui->collectBusEvents, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->enableEventToolTips, SIGNAL(toggled(bool)),
|
connect(m_ui->enableEventToolTips, &QGroupBox::toggled,
|
||||||
m_settings, SLOT(setEnableEventToolTips(bool)));
|
m_settings, &ValgrindBaseSettings::setEnableEventToolTips);
|
||||||
connect(m_settings, SIGNAL(enableEventToolTipsChanged(bool)),
|
connect(m_settings, SIGNAL(enableEventToolTipsChanged(bool)),
|
||||||
m_ui->enableEventToolTips, SLOT(setChecked(bool)));
|
m_ui->enableEventToolTips, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->minimumInclusiveCostRatio, SIGNAL(valueChanged(double)),
|
connect(m_ui->minimumInclusiveCostRatio, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||||
m_settings, SLOT(setMinimumInclusiveCostRatio(double)));
|
m_settings, &ValgrindBaseSettings::setMinimumInclusiveCostRatio);
|
||||||
connect(m_settings, SIGNAL(minimumInclusiveCostRatioChanged(double)),
|
connect(m_settings, SIGNAL(minimumInclusiveCostRatioChanged(double)),
|
||||||
m_ui->minimumInclusiveCostRatio, SLOT(setValue(double)));
|
m_ui->minimumInclusiveCostRatio, SLOT(setValue(double)));
|
||||||
|
|
||||||
connect(m_ui->visualisationMinimumInclusiveCostRatio, SIGNAL(valueChanged(double)),
|
connect(m_ui->visualisationMinimumInclusiveCostRatio, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||||
m_settings, SLOT(setVisualisationMinimumInclusiveCostRatio(double)));
|
m_settings, &ValgrindBaseSettings::setVisualisationMinimumInclusiveCostRatio);
|
||||||
connect(m_settings, SIGNAL(visualisationMinimumInclusiveCostRatioChanged(double)),
|
connect(m_settings, SIGNAL(visualisationMinimumInclusiveCostRatioChanged(double)),
|
||||||
m_ui->visualisationMinimumInclusiveCostRatio, SLOT(setValue(double)));
|
m_ui->visualisationMinimumInclusiveCostRatio, SLOT(setValue(double)));
|
||||||
|
|
||||||
@@ -123,36 +123,32 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings,
|
|||||||
m_ui->suppressionList->setModel(m_model);
|
m_ui->suppressionList->setModel(m_model);
|
||||||
m_ui->suppressionList->setSelectionMode(QAbstractItemView::MultiSelection);
|
m_ui->suppressionList->setSelectionMode(QAbstractItemView::MultiSelection);
|
||||||
|
|
||||||
connect(m_ui->addSuppression, SIGNAL(clicked()),
|
connect(m_ui->addSuppression, &QPushButton::clicked, this, &ValgrindConfigWidget::slotAddSuppression);
|
||||||
this, SLOT(slotAddSuppression()));
|
connect(m_ui->removeSuppression, &QPushButton::clicked, this, &ValgrindConfigWidget::slotRemoveSuppression);
|
||||||
connect(m_ui->removeSuppression, SIGNAL(clicked()),
|
|
||||||
this, SLOT(slotRemoveSuppression()));
|
|
||||||
|
|
||||||
connect(m_ui->numCallers, SIGNAL(valueChanged(int)), m_settings, SLOT(setNumCallers(int)));
|
connect(m_ui->numCallers, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||||
|
m_settings, &ValgrindBaseSettings::setNumCallers);
|
||||||
connect(m_settings, SIGNAL(numCallersChanged(int)), m_ui->numCallers, SLOT(setValue(int)));
|
connect(m_settings, SIGNAL(numCallersChanged(int)), m_ui->numCallers, SLOT(setValue(int)));
|
||||||
|
|
||||||
connect(m_ui->leakCheckOnFinish, SIGNAL(currentIndexChanged(int)),
|
connect(m_ui->leakCheckOnFinish, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||||
m_settings, SLOT(setLeakCheckOnFinish(int)));
|
m_settings, &ValgrindBaseSettings::setLeakCheckOnFinish);
|
||||||
connect(m_settings, SIGNAL(leakCheckOnFinishChanged(int)),
|
connect(m_settings, SIGNAL(leakCheckOnFinishChanged(int)),
|
||||||
m_ui->leakCheckOnFinish, SLOT(setCurrentIndex(int)));
|
m_ui->leakCheckOnFinish, SLOT(setCurrentIndex(int)));
|
||||||
|
|
||||||
connect(m_ui->showReachable, SIGNAL(toggled(bool)),
|
connect(m_ui->showReachable, &QCheckBox::toggled, m_settings, &ValgrindBaseSettings::setShowReachable);
|
||||||
m_settings, SLOT(setShowReachable(bool)));
|
|
||||||
connect(m_settings, SIGNAL(showReachableChanged(bool)),
|
connect(m_settings, SIGNAL(showReachableChanged(bool)),
|
||||||
m_ui->showReachable, SLOT(setChecked(bool)));
|
m_ui->showReachable, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_ui->trackOrigins, SIGNAL(toggled(bool)),
|
connect(m_ui->trackOrigins, &QCheckBox::toggled, m_settings, &ValgrindBaseSettings::setTrackOrigins);
|
||||||
m_settings, SLOT(setTrackOrigins(bool)));
|
|
||||||
connect(m_settings, SIGNAL(trackOriginsChanged(bool)),
|
connect(m_settings, SIGNAL(trackOriginsChanged(bool)),
|
||||||
m_ui->trackOrigins, SLOT(setChecked(bool)));
|
m_ui->trackOrigins, SLOT(setChecked(bool)));
|
||||||
|
|
||||||
connect(m_settings, SIGNAL(suppressionFilesRemoved(QStringList)),
|
connect(m_settings, &ValgrindBaseSettings::suppressionFilesRemoved,
|
||||||
this, SLOT(slotSuppressionsRemoved(QStringList)));
|
this, &ValgrindConfigWidget::slotSuppressionsRemoved);
|
||||||
connect(m_settings, SIGNAL(suppressionFilesAdded(QStringList)),
|
connect(m_settings, &ValgrindBaseSettings::suppressionFilesAdded,
|
||||||
this, SLOT(slotSuppressionsAdded(QStringList)));
|
this, &ValgrindConfigWidget::slotSuppressionsAdded);
|
||||||
|
|
||||||
connect(m_ui->suppressionList->selectionModel(),
|
connect(m_ui->suppressionList->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||||
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
|
||||||
this, SLOT(slotSuppressionSelectionChanged()));
|
this, SLOT(slotSuppressionSelectionChanged()));
|
||||||
slotSuppressionSelectionChanged();
|
slotSuppressionSelectionChanged();
|
||||||
|
|
||||||
|
@@ -79,8 +79,10 @@ bool ValgrindRunControl::startEngine()
|
|||||||
|
|
||||||
FutureProgress *fp = ProgressManager::addTimedTask(m_progress, progressTitle(), "valgrind", 100);
|
FutureProgress *fp = ProgressManager::addTimedTask(m_progress, progressTitle(), "valgrind", 100);
|
||||||
fp->setKeepOnFinish(FutureProgress::HideOnFinish);
|
fp->setKeepOnFinish(FutureProgress::HideOnFinish);
|
||||||
connect(fp, SIGNAL(canceled()), this, SLOT(handleProgressCanceled()));
|
connect(fp, &FutureProgress::canceled,
|
||||||
connect(fp, SIGNAL(finished()), this, SLOT(handleProgressFinished()));
|
this, &ValgrindRunControl::handleProgressCanceled);
|
||||||
|
connect(fp, &FutureProgress::finished,
|
||||||
|
this, &ValgrindRunControl::handleProgressFinished);
|
||||||
m_progress.reportStarted();
|
m_progress.reportStarted();
|
||||||
|
|
||||||
const AnalyzerStartParameters &sp = startParameters();
|
const AnalyzerStartParameters &sp = startParameters();
|
||||||
@@ -101,11 +103,12 @@ bool ValgrindRunControl::startEngine()
|
|||||||
run->setStartMode(sp.startMode);
|
run->setStartMode(sp.startMode);
|
||||||
run->setLocalRunMode(sp.localRunMode);
|
run->setLocalRunMode(sp.localRunMode);
|
||||||
|
|
||||||
connect(run, SIGNAL(processOutputReceived(QString,Utils::OutputFormat)),
|
connect(run, &ValgrindRunner::processOutputReceived,
|
||||||
SLOT(receiveProcessOutput(QString,Utils::OutputFormat)));
|
this, &ValgrindRunControl::receiveProcessOutput);
|
||||||
connect(run, SIGNAL(processErrorReceived(QString,QProcess::ProcessError)),
|
connect(run, &ValgrindRunner::processErrorReceived,
|
||||||
SLOT(receiveProcessError(QString,QProcess::ProcessError)));
|
this, &ValgrindRunControl::receiveProcessError);
|
||||||
connect(run, SIGNAL(finished()), SLOT(runnerFinished()));
|
connect(run, &ValgrindRunner::finished,
|
||||||
|
this, &ValgrindRunControl::runnerFinished);
|
||||||
|
|
||||||
if (!run->start()) {
|
if (!run->start()) {
|
||||||
m_progress.cancel();
|
m_progress.cancel();
|
||||||
|
@@ -188,7 +188,8 @@ void ValgrindPlugin::extensionsInitialized()
|
|||||||
|
|
||||||
QAction *action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
|
QAction *action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
|
||||||
action->setIcon(QIcon(QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
|
action->setIcon(QIcon(QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
|
||||||
connect(action, SIGNAL(triggered()), m_callgrindTool, SLOT(handleShowCostsOfFunction()));
|
connect(action, &QAction::triggered, m_callgrindTool,
|
||||||
|
&CallgrindTool::handleShowCostsOfFunction);
|
||||||
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
|
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
|
||||||
analyzerContext);
|
analyzerContext);
|
||||||
editorContextMenu->addAction(cmd);
|
editorContextMenu->addAction(cmd);
|
||||||
|
Reference in New Issue
Block a user