forked from qt-creator/qt-creator
Debugger: Use some Qt5 connects
Change-Id: I03c301ae71c3747afc5d17a6f7689620e46fde62 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -80,8 +80,6 @@ private:
|
|||||||
|
|
||||||
class DebuggerMainWindowPrivate : public QObject
|
class DebuggerMainWindowPrivate : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DebuggerMainWindowPrivate(DebuggerMainWindow *mainWindow);
|
explicit DebuggerMainWindowPrivate(DebuggerMainWindow *mainWindow);
|
||||||
|
|
||||||
@@ -97,7 +95,6 @@ public:
|
|||||||
QDockWidget *dockWidget(const QString &objectName) const
|
QDockWidget *dockWidget(const QString &objectName) const
|
||||||
{ return q->findChild<QDockWidget *>(objectName); }
|
{ return q->findChild<QDockWidget *>(objectName); }
|
||||||
|
|
||||||
public slots:
|
|
||||||
void resetDebuggerLayout();
|
void resetDebuggerLayout();
|
||||||
void updateUiForProject(Project *project);
|
void updateUiForProject(Project *project);
|
||||||
void updateUiForTarget(Target *target);
|
void updateUiForTarget(Target *target);
|
||||||
@@ -105,7 +102,6 @@ public slots:
|
|||||||
void updateUiForCurrentRunConfiguration();
|
void updateUiForCurrentRunConfiguration();
|
||||||
void updateActiveLanguages();
|
void updateActiveLanguages();
|
||||||
void updateDockWidgetSettings();
|
void updateDockWidgetSettings();
|
||||||
void openMemoryEditor() { Internal::openMemoryEditor(); }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DebuggerMainWindow *q;
|
DebuggerMainWindow *q;
|
||||||
@@ -300,10 +296,10 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
|
|||||||
m_viewsMenu = ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
|
m_viewsMenu = ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
|
||||||
QTC_ASSERT(m_viewsMenu, return);
|
QTC_ASSERT(m_viewsMenu, return);
|
||||||
|
|
||||||
QAction *openMemoryEditorAction = new QAction(this);
|
auto openMemoryEditorAction = new QAction(this);
|
||||||
openMemoryEditorAction->setText(tr("Memory..."));
|
openMemoryEditorAction->setText(DebuggerMainWindow::tr("Memory..."));
|
||||||
connect(openMemoryEditorAction, &QAction::triggered,
|
connect(openMemoryEditorAction, &QAction::triggered,
|
||||||
this, &DebuggerMainWindowPrivate::openMemoryEditor);
|
this, &Internal::openMemoryEditor);
|
||||||
|
|
||||||
// Add menu items
|
// Add menu items
|
||||||
Command *cmd = 0;
|
Command *cmd = 0;
|
||||||
@@ -405,12 +401,12 @@ QDockWidget *DebuggerMainWindow::createDockWidget(const DebuggerLanguage &langua
|
|||||||
|
|
||||||
dockWidget->installEventFilter(&d->m_resizeEventFilter);
|
dockWidget->installEventFilter(&d->m_resizeEventFilter);
|
||||||
|
|
||||||
connect(dockWidget->toggleViewAction(), SIGNAL(triggered(bool)),
|
connect(dockWidget->toggleViewAction(), &QAction::triggered,
|
||||||
d, SLOT(updateDockWidgetSettings()));
|
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
|
||||||
connect(dockWidget, SIGNAL(topLevelChanged(bool)),
|
connect(dockWidget, &QDockWidget::topLevelChanged,
|
||||||
d, SLOT(updateDockWidgetSettings()));
|
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
|
||||||
connect(dockWidget, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
|
connect(dockWidget, &QDockWidget::dockLocationChanged,
|
||||||
d, SLOT(updateDockWidgetSettings()));
|
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
|
||||||
|
|
||||||
return dockWidget;
|
return dockWidget;
|
||||||
}
|
}
|
||||||
@@ -431,10 +427,10 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
|||||||
//d->m_mainWindow = new Internal::DebuggerMainWindow(this);
|
//d->m_mainWindow = new Internal::DebuggerMainWindow(this);
|
||||||
setDocumentMode(true);
|
setDocumentMode(true);
|
||||||
setDockNestingEnabled(true);
|
setDockNestingEnabled(true);
|
||||||
connect(this, SIGNAL(resetLayout()),
|
connect(this, &FancyMainWindow::resetLayout,
|
||||||
d, SLOT(resetDebuggerLayout()));
|
d, &DebuggerMainWindowPrivate::resetDebuggerLayout);
|
||||||
connect(autoHideTitleBarsAction(), SIGNAL(triggered()),
|
connect(autoHideTitleBarsAction(), &QAction::triggered,
|
||||||
d, SLOT(updateDockWidgetSettings()));
|
d, &DebuggerMainWindowPrivate::updateDockWidgetSettings);
|
||||||
|
|
||||||
auto editorHolderLayout = new QVBoxLayout;
|
auto editorHolderLayout = new QVBoxLayout;
|
||||||
editorHolderLayout->setMargin(0);
|
editorHolderLayout->setMargin(0);
|
||||||
@@ -473,7 +469,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
|||||||
menu.exec(d->m_viewButton->mapToGlobal(QPoint()));
|
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->setObjectName(QLatin1String("Debugger Toolbar"));
|
||||||
dock->setWidget(debugToolBar);
|
dock->setWidget(debugToolBar);
|
||||||
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||||
|
|||||||
@@ -2496,8 +2496,8 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
act = m_frameUpAction = new QAction(tr("Move to Calling Frame"), this);
|
act = m_frameUpAction = new QAction(tr("Move to Calling Frame"), this);
|
||||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleFrameUp);
|
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleFrameUp);
|
||||||
|
|
||||||
connect(action(OperateByInstruction), SIGNAL(triggered(bool)),
|
connect(action(OperateByInstruction), &QAction::triggered,
|
||||||
SLOT(handleOperateByInstructionTriggered(bool)));
|
this, &DebuggerPluginPrivate::handleOperateByInstructionTriggered);
|
||||||
|
|
||||||
ActionContainer *debugMenu = ActionManager::actionContainer(PE::M_DEBUG);
|
ActionContainer *debugMenu = ActionManager::actionContainer(PE::M_DEBUG);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user