forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Conflicts: qtcreator.pri qtcreator.qbs Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
This commit is contained in:
@@ -655,6 +655,9 @@ public:
|
||||
|
||||
void updateWatchersHeader(int section, int, int newSize)
|
||||
{
|
||||
if (m_shuttingDown)
|
||||
return;
|
||||
|
||||
m_watchersView->header()->resizeSection(section, newSize);
|
||||
m_returnView->header()->resizeSection(section, newSize);
|
||||
}
|
||||
@@ -1004,7 +1007,7 @@ public:
|
||||
|
||||
SnapshotHandler *m_snapshotHandler = 0;
|
||||
bool m_shuttingDown = false;
|
||||
DebuggerEngine *m_currentEngine = 0;
|
||||
QPointer<DebuggerEngine> m_currentEngine;
|
||||
DebuggerSettings *m_debuggerSettings = 0;
|
||||
QStringList m_arguments;
|
||||
DebuggerToolTipManager m_toolTipManager;
|
||||
@@ -1346,14 +1349,14 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
|
||||
this, &DebuggerPluginPrivate::updateWatchersHeader, Qt::QueuedConnection);
|
||||
|
||||
auto act = m_continueAction = new QAction(tr("Continue"), this);
|
||||
act->setIcon(Icon::combinedIcon({Icons::DEBUG_CONTINUE_SMALL.icon(), continueSideBarIcon}));
|
||||
act->setIcon(Icon::combinedIcon({Icons::DEBUG_CONTINUE_SMALL_TOOLBAR.icon(), continueSideBarIcon}));
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecContinue);
|
||||
|
||||
act = m_exitAction = new QAction(tr("Stop Debugger"), this);
|
||||
act->setIcon(Icons::DEBUG_EXIT_SMALL.icon());
|
||||
act->setIcon(Icons::DEBUG_EXIT_SMALL_TOOLBAR.icon());
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecExit);
|
||||
|
||||
auto interruptIcon = Icon::combinedIcon({Icons::DEBUG_INTERRUPT_SMALL.icon(), interruptSideBarIcon});
|
||||
auto interruptIcon = Icon::combinedIcon({Icons::DEBUG_INTERRUPT_SMALL_TOOLBAR.icon(), interruptSideBarIcon});
|
||||
act = m_interruptAction = new QAction(tr("Interrupt"), this);
|
||||
act->setIcon(interruptIcon);
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecInterrupt);
|
||||
@@ -1370,19 +1373,19 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
|
||||
|
||||
act = m_resetAction = new QAction(tr("Restart Debugging"),this);
|
||||
act->setToolTip(tr("Restart the debugging session."));
|
||||
act->setIcon(Icons::RESTART.icon());
|
||||
act->setIcon(Icons::RESTART_TOOLBAR.icon());
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleReset);
|
||||
|
||||
act = m_nextAction = new QAction(tr("Step Over"), this);
|
||||
act->setIcon(Icons::STEP_OVER.icon());
|
||||
act->setIcon(Icons::STEP_OVER_TOOLBAR.icon());
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecNext);
|
||||
|
||||
act = m_stepAction = new QAction(tr("Step Into"), this);
|
||||
act->setIcon(Icons::STEP_INTO.icon());
|
||||
act->setIcon(Icons::STEP_INTO_TOOLBAR.icon());
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStep);
|
||||
|
||||
act = m_stepOutAction = new QAction(tr("Step Out"), this);
|
||||
act->setIcon(Icons::STEP_OUT.icon());
|
||||
act->setIcon(Icons::STEP_OUT_TOOLBAR.icon());
|
||||
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStepOut);
|
||||
|
||||
act = m_runToLineAction = new QAction(tr("Run to Line"), this);
|
||||
@@ -1440,7 +1443,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
|
||||
act = m_startAction = new QAction(this);
|
||||
const QIcon sideBarIcon =
|
||||
Icon::sideBarIcon(ProjectExplorer::Icons::DEBUG_START, ProjectExplorer::Icons::DEBUG_START_FLAT);
|
||||
const QIcon debuggerIcon = Icon::combinedIcon({ProjectExplorer::Icons::DEBUG_START_SMALL.icon(), sideBarIcon});
|
||||
const QIcon debuggerIcon = Icon::combinedIcon({ProjectExplorer::Icons::DEBUG_START_SMALL_TOOLBAR.icon(), sideBarIcon});
|
||||
act->setIcon(debuggerIcon);
|
||||
act->setText(tr("Start Debugging"));
|
||||
connect(act, &QAction::triggered, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE); });
|
||||
@@ -1775,12 +1778,12 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
|
||||
// Toolbar
|
||||
ToolbarDescription toolbar;
|
||||
toolbar.addAction(m_visibleStartAction);
|
||||
toolbar.addAction(m_exitAction);
|
||||
toolbar.addAction(m_nextAction);
|
||||
toolbar.addAction(m_stepAction);
|
||||
toolbar.addAction(m_stepOutAction);
|
||||
toolbar.addAction(m_resetAction);
|
||||
toolbar.addAction(m_operateByInstructionAction);
|
||||
toolbar.addAction(ActionManager::command(Constants::STOP)->action());
|
||||
toolbar.addAction(ActionManager::command(Constants::NEXT)->action());
|
||||
toolbar.addAction(ActionManager::command(Constants::STEP)->action());
|
||||
toolbar.addAction(ActionManager::command(Constants::STEPOUT)->action());
|
||||
toolbar.addAction(ActionManager::command(Constants::RESET)->action());
|
||||
toolbar.addAction(ActionManager::command(Constants::OPERATE_BY_INSTRUCTION)->action());
|
||||
|
||||
if (isReverseDebuggingEnabled()) {
|
||||
m_reverseToolButton = new QToolButton;
|
||||
@@ -2359,6 +2362,9 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
|
||||
if (m_currentEngine == engine)
|
||||
return;
|
||||
|
||||
if (m_shuttingDown)
|
||||
return;
|
||||
|
||||
if (m_currentEngine)
|
||||
m_currentEngine->resetLocation();
|
||||
m_currentEngine = engine;
|
||||
@@ -2742,6 +2748,8 @@ void DebuggerPluginPrivate::aboutToSaveSession()
|
||||
|
||||
void DebuggerPluginPrivate::showStatusMessage(const QString &msg0, int timeout)
|
||||
{
|
||||
if (m_shuttingDown)
|
||||
return;
|
||||
showMessage(msg0, LogStatus);
|
||||
QString msg = msg0;
|
||||
msg.replace(QChar::LineFeed, QLatin1String("; "));
|
||||
@@ -2751,6 +2759,12 @@ void DebuggerPluginPrivate::showStatusMessage(const QString &msg0, int timeout)
|
||||
void DebuggerPluginPrivate::coreShutdown()
|
||||
{
|
||||
m_shuttingDown = true;
|
||||
if (currentEngine()) {
|
||||
if (currentEngine()->state() != Debugger::DebuggerNotReady) {
|
||||
currentEngine()->setTargetState(Debugger::DebuggerFinished);
|
||||
currentEngine()->abortDebugger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const CPlusPlus::Snapshot &cppCodeModelSnapshot()
|
||||
@@ -2887,6 +2901,8 @@ void DebuggerPluginPrivate::runControlStarted(DebuggerEngine *engine)
|
||||
|
||||
void DebuggerPluginPrivate::runControlFinished(DebuggerEngine *engine)
|
||||
{
|
||||
if (m_shuttingDown)
|
||||
return;
|
||||
showStatusMessage(tr("Debugger finished."));
|
||||
m_snapshotHandler->removeSnapshot(engine);
|
||||
if (m_snapshotHandler->size() == 0) {
|
||||
@@ -3535,7 +3551,7 @@ QAction *createStartAction()
|
||||
QAction *createStopAction()
|
||||
{
|
||||
auto action = new QAction(DebuggerMainWindow::tr("Stop"), DebuggerPlugin::instance());
|
||||
action->setIcon(Core::Icons::STOP_SMALL.icon());
|
||||
action->setIcon(Core::Icons::STOP_SMALL_TOOLBAR.icon());
|
||||
action->setEnabled(true);
|
||||
return action;
|
||||
}
|
||||
@@ -3672,7 +3688,8 @@ void DebuggerUnitTests::testStateMachine()
|
||||
QTestEventLoop::instance().exitLoop();
|
||||
});
|
||||
|
||||
// QTestEventLoop::instance().enterLoop(20);
|
||||
QTestEventLoop::instance().enterLoop(5);
|
||||
EditorManager::closeAllEditors(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user