forked from qt-creator/qt-creator
Debugger: Replace Internal::mainWindow
... by DebuggerMainWindow::instance() and clean up a few uses. Change-Id: I7ae4073aa97fc2f00108533bed91db330b07880f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -68,7 +68,6 @@ enum TestCases
|
||||
// Some convenience.
|
||||
void openTextEditor(const QString &titlePattern, const QString &contents);
|
||||
|
||||
QWidget *mainWindow();
|
||||
void showModuleSymbols(const QString &moduleName, const QVector<Internal::Symbol> &symbols);
|
||||
void showModuleSections(const QString &moduleName, const QVector<Internal::Section> §ions);
|
||||
|
||||
|
@@ -1258,7 +1258,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
|
||||
showMessage(tr("Stopped."), StatusBar);
|
||||
setState(InferiorStopOk);
|
||||
if (boolSetting(RaiseOnInterrupt))
|
||||
ICore::raiseWindow(Internal::mainWindow());
|
||||
ICore::raiseWindow(DebuggerMainWindow::instance());
|
||||
EngineManager::activateEngine(this);
|
||||
}
|
||||
|
||||
@@ -1423,7 +1423,7 @@ void DebuggerEnginePrivate::updateState(bool alsoUpdateCompanion)
|
||||
m_detachAction.setEnabled(detachable);
|
||||
|
||||
if (stopped)
|
||||
QApplication::alert(mainWindow(), 3000);
|
||||
QApplication::alert(ICore::mainWindow(), 3000);
|
||||
|
||||
updateReverseActions();
|
||||
|
||||
|
@@ -2318,11 +2318,6 @@ void openTextEditor(const QString &titlePattern0, const QString &contents)
|
||||
QTC_ASSERT(editor, return);
|
||||
}
|
||||
|
||||
QWidget *mainWindow()
|
||||
{
|
||||
return DebuggerMainWindow::instance();
|
||||
}
|
||||
|
||||
QSharedPointer<Internal::GlobalDebuggerOptions> globalDebuggerOptions()
|
||||
{
|
||||
return dd->m_globalDebuggerOptions;
|
||||
|
@@ -24,16 +24,18 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "debuggertooltipmanager.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerprotocol.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "snapshothandler.h"
|
||||
#include "stackhandler.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggermainwindow.h"
|
||||
#include "debuggerprotocol.h"
|
||||
#include "snapshothandler.h"
|
||||
#include "sourceutils.h"
|
||||
#include "stackhandler.h"
|
||||
#include "watchhandler.h"
|
||||
#include "watchwindow.h"
|
||||
#include "sourceutils.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
@@ -797,7 +799,7 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
|
||||
|
||||
if (state == PendingUnshown) {
|
||||
setState(PendingShown);
|
||||
ToolTip::show(context.mousePosition, widget, Internal::mainWindow());
|
||||
ToolTip::show(context.mousePosition, widget, DebuggerMainWindow::instance());
|
||||
}
|
||||
|
||||
if (item && sameFrame) {
|
||||
@@ -845,7 +847,7 @@ void DebuggerToolTipHolder::releaseEngine()
|
||||
// (Out of scope items, keywords, ...)
|
||||
ToolTip::show(context.mousePosition,
|
||||
DebuggerToolTipManager::tr("No valid expression"),
|
||||
Internal::mainWindow());
|
||||
DebuggerMainWindow::instance());
|
||||
widget->deleteLater();
|
||||
return;
|
||||
}
|
||||
@@ -1156,7 +1158,7 @@ static void slotTooltipOverrideRequested
|
||||
|
||||
if (context.expression.isEmpty()) {
|
||||
ToolTip::show(point, DebuggerToolTipManager::tr("No valid expression"),
|
||||
Internal::mainWindow());
|
||||
DebuggerMainWindow::instance());
|
||||
*handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -1178,13 +1180,13 @@ static void slotTooltipOverrideRequested
|
||||
if (tooltip) {
|
||||
DEBUG("REUSING LOCALS TOOLTIP");
|
||||
tooltip->context.mousePosition = point;
|
||||
ToolTip::move(point, Internal::mainWindow());
|
||||
ToolTip::move(point, DebuggerMainWindow::instance());
|
||||
} else {
|
||||
DEBUG("CREATING LOCALS, WAITING...");
|
||||
tooltip = new DebuggerToolTipHolder(context);
|
||||
tooltip->setState(Acquired);
|
||||
m_tooltips.push_back(tooltip);
|
||||
ToolTip::show(point, tooltip->widget, Internal::mainWindow());
|
||||
ToolTip::show(point, tooltip->widget, DebuggerMainWindow::instance());
|
||||
}
|
||||
DEBUG("SYNC IN STATE" << tooltip->state);
|
||||
tooltip->updateTooltip(engine);
|
||||
@@ -1202,7 +1204,7 @@ static void slotTooltipOverrideRequested
|
||||
if (tooltip) {
|
||||
//tooltip->destroy();
|
||||
tooltip->context.mousePosition = point;
|
||||
ToolTip::move(point, Internal::mainWindow());
|
||||
ToolTip::move(point, DebuggerMainWindow::instance());
|
||||
DEBUG("UPDATING DELAYED.");
|
||||
*handled = true;
|
||||
} else {
|
||||
@@ -1215,7 +1217,7 @@ static void slotTooltipOverrideRequested
|
||||
engine->updateItem(context.iname);
|
||||
} else {
|
||||
ToolTip::show(point, DebuggerToolTipManager::tr("Expression too complex"),
|
||||
Internal::mainWindow());
|
||||
DebuggerMainWindow::instance());
|
||||
tooltip->destroy();
|
||||
}
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include "debuggerdialogs.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggermainwindow.h"
|
||||
#include "debuggerprotocol.h"
|
||||
#include "debuggertooltipmanager.h"
|
||||
#include "imageviewer.h"
|
||||
@@ -269,7 +270,7 @@ static void saveFormats()
|
||||
class SeparatedView : public QTabWidget
|
||||
{
|
||||
public:
|
||||
SeparatedView() : QTabWidget(Internal::mainWindow())
|
||||
SeparatedView() : QTabWidget(DebuggerMainWindow::instance())
|
||||
{
|
||||
setTabsClosable(true);
|
||||
connect(this, &QTabWidget::tabCloseRequested, this, &SeparatedView::closeTab);
|
||||
@@ -1975,7 +1976,6 @@ void WatchHandler::cleanup()
|
||||
saveWatchers();
|
||||
m_model->reinitialize();
|
||||
emit m_model->updateFinished();
|
||||
if (Internal::mainWindow())
|
||||
m_model->m_separatedView->hide();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user