Commit b1ad8b76 authored by hjk's avatar hjk

Debugger: Use some Qt5 connects

Change-Id: I03c301ae71c3747afc5d17a6f7689620e46fde62
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 777b08f0
......@@ -80,8 +80,6 @@ private:
class DebuggerMainWindowPrivate : public QObject
{
Q_OBJECT
public:
explicit DebuggerMainWindowPrivate(DebuggerMainWindow *mainWindow);
......@@ -97,7 +95,6 @@ public:
QDockWidget *dockWidget(const QString &objectName) const
{ return q->findChild<QDockWidget *>(objectName); }
public slots:
void resetDebuggerLayout();
void updateUiForProject(Project *project);
void updateUiForTarget(Target *target);
......@@ -105,7 +102,6 @@ public slots:
void updateUiForCurrentRunConfiguration();
void updateActiveLanguages();
void updateDockWidgetSettings();
void openMemoryEditor() { Internal::openMemoryEditor(); }
public:
DebuggerMainWindow *q;
......@@ -300,10 +296,10 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
m_viewsMenu = ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
QTC_ASSERT(m_viewsMenu, return);
QAction *openMemoryEditorAction = new QAction(this);
openMemoryEditorAction->setText(tr("Memory..."));
auto openMemoryEditorAction = new QAction(this);
openMemoryEditorAction->setText(DebuggerMainWindow::tr("Memory..."));
connect(openMemoryEditorAction, &QAction::triggered,
this, &DebuggerMainWindowPrivate::openMemoryEditor);
this, &Internal::openMemoryEditor);
// Add menu items
Command *cmd = 0;
......@@ -405,12 +401,12 @@ QDockWidget *DebuggerMainWindow::createDockWidget(const DebuggerLanguage &langua
dockWidget->installEventFilter(&d->m_resizeEventFilter);
connect(dockWidget->toggleViewAction(), SIGNAL(triggered(bool)),
d, SLOT(updateDockWidgetSettings()));
connect(dockWidget, SIGNAL(topLevelChanged(bool)),
d, SLOT(updateDockWidgetSettings()));
connect(dockWidget, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
d, SLOT(updateDockWidgetSettings()));
connect(dockWidget->toggleViewAction(), &QAction::triggered,
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
connect(dockWidget, &QDockWidget::topLevelChanged,
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
connect(dockWidget, &QDockWidget::dockLocationChanged,
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
return dockWidget;
}
......@@ -431,10 +427,10 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
//d->m_mainWindow = new Internal::DebuggerMainWindow(this);
setDocumentMode(true);
setDockNestingEnabled(true);
connect(this, SIGNAL(resetLayout()),
d, SLOT(resetDebuggerLayout()));
connect(autoHideTitleBarsAction(), SIGNAL(triggered()),
d, SLOT(updateDockWidgetSettings()));
connect(this, &FancyMainWindow::resetLayout,
d, &DebuggerMainWindowPrivate::resetDebuggerLayout);
connect(autoHideTitleBarsAction(), &QAction::triggered,
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
auto editorHolderLayout = new QVBoxLayout;
editorHolderLayout->setMargin(0);
......@@ -473,7 +469,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
menu.exec(d->m_viewButton->mapToGlobal(QPoint()));
});
auto dock = new QDockWidget(DebuggerMainWindowPrivate::tr("Debugger Toolbar"));
auto dock = new QDockWidget(DebuggerMainWindow::tr("Debugger Toolbar"));
dock->setObjectName(QLatin1String("Debugger Toolbar"));
dock->setWidget(debugToolBar);
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
......
......@@ -2496,8 +2496,8 @@ void DebuggerPluginPrivate::extensionsInitialized()
act = m_frameUpAction = new QAction(tr("Move to Calling Frame"), this);
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleFrameUp);
connect(action(OperateByInstruction), SIGNAL(triggered(bool)),
SLOT(handleOperateByInstructionTriggered(bool)));
connect(action(OperateByInstruction), &QAction::triggered,
this, &DebuggerPluginPrivate::handleOperateByInstructionTriggered);
ActionContainer *debugMenu = ActionManager::actionContainer(PE::M_DEBUG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment