Debugger: Remove unneeded qualifications

Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-03 23:58:49 +02:00
committed by hjk
parent 3a9b34f232
commit 4e8e75d88e
23 changed files with 152 additions and 155 deletions

View File

@@ -293,7 +293,7 @@ QIcon BreakHandler::emptyIcon()
static inline bool fileNameMatch(const QString &f1, const QString &f2)
{
if (Utils::HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
if (HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
return f1.compare(f2, Qt::CaseInsensitive) == 0;
return f1 == f2;
}
@@ -637,7 +637,7 @@ QVariant BreakpointItem::data(int column, int role) const
if (str.isEmpty() && !m_params.fileName.isEmpty())
str = m_params.fileName;
if (str.isEmpty()) {
QString s = Utils::FileName::fromString(str).fileName();
QString s = FileName::fromString(str).fileName();
if (!s.isEmpty())
str = s;
}

View File

@@ -2980,7 +2980,7 @@ CdbEngine::NormalizedSourceFileName CdbEngine::sourceMapNormalizeFileNameFromDeb
const QString fileName = cdbSourcePathMapping(QDir::toNativeSeparators(f), m_sourcePathMappings,
DebuggerToSource);
// Up/lower case normalization according to Windows.
const QString normalized = Utils::FileUtils::normalizePathName(fileName);
const QString normalized = FileUtils::normalizePathName(fileName);
if (debugSourceMapping)
qDebug(" sourceMapNormalizeFileNameFromDebugger %s->%s", qPrintable(fileName), qPrintable(normalized));
// Check if it really exists, that is normalize worked and QFileInfo confirms it.

View File

@@ -105,19 +105,19 @@ namespace Internal {
///////////////////////////////////////////////////////////////////////
DebuggerKitChooser::DebuggerKitChooser(Mode mode, QWidget *parent)
: ProjectExplorer::KitChooser(parent)
, m_hostAbi(ProjectExplorer::Abi::hostAbi())
: KitChooser(parent)
, m_hostAbi(Abi::hostAbi())
, m_mode(mode)
{
}
// Match valid debuggers and restrict local debugging to compatible toolchains.
bool DebuggerKitChooser::kitMatches(const ProjectExplorer::Kit *k) const
bool DebuggerKitChooser::kitMatches(const Kit *k) const
{
if (!DebuggerKitInformation::isValidDebugger(k))
return false;
if (m_mode == LocalDebugging) {
const ProjectExplorer::ToolChain *tc = ToolChainKitInformation::toolChain(k);
const ToolChain *tc = ToolChainKitInformation::toolChain(k);
return tc && tc->targetAbi().os() == m_hostAbi.os();
}
return true;

View File

@@ -313,7 +313,7 @@ public:
DisassemblerAgent m_disassemblerAgent;
MemoryAgent m_memoryAgent;
QScopedPointer<TextEditor::TextMark> m_locationMark;
QScopedPointer<TextMark> m_locationMark;
QTimer m_locationTimer;
bool m_isStateDebugging;
@@ -594,9 +594,9 @@ void DebuggerEngine::gotoLocation(const Location &loc)
editor->document()->setProperty(Constants::OPENED_BY_DEBUGGER, true);
if (loc.needsMarker()) {
d->m_locationMark.reset(new TextEditor::TextMark(file, line));
d->m_locationMark.reset(new TextMark(file, line));
d->m_locationMark->setIcon(Internal::locationMarkIcon());
d->m_locationMark->setPriority(TextEditor::TextMark::HighPriority);
d->m_locationMark->setPriority(TextMark::HighPriority);
}
//qDebug() << "MEMORY: " << d->m_memoryAgent.hasVisibleEditor();
@@ -1404,7 +1404,7 @@ Terminal *DebuggerEngine::terminal() const
return &d->m_terminal;
}
bool DebuggerEngine::setToolTipExpression(TextEditor::TextEditorWidget *,
bool DebuggerEngine::setToolTipExpression(TextEditorWidget *,
const DebuggerToolTipContext &)
{
return false;
@@ -1714,7 +1714,7 @@ void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
"<tr><td>Signal meaning : </td><td>%2</td></tr></table>")
.arg(name, meaning);
Core::AsynchronousMessageBox::information(tr("Signal received"), msg);
AsynchronousMessageBox::information(tr("Signal received"), msg);
}
void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description)
@@ -1722,7 +1722,7 @@ void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description
const QString msg =
tr("<p>The inferior stopped because it triggered an exception.<p>%1").
arg(description);
Core::AsynchronousMessageBox::information(tr("Exception Triggered"), msg);
AsynchronousMessageBox::information(tr("Exception Triggered"), msg);
}
void DebuggerEngine::openMemoryView(const MemoryViewSetupData &data)
@@ -1762,7 +1762,7 @@ void DebuggerEngine::validateExecutable(DebuggerStartParameters *sp)
const bool warnOnRelease = boolSetting(WarnOnReleaseBuilds);
QString detailedWarning;
switch (sp->toolChainAbi.binaryFormat()) {
case ProjectExplorer::Abi::PEFormat: {
case Abi::PEFormat: {
if (!warnOnRelease || (sp->masterEngineType != CdbEngineType))
return;
if (!binary.endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
@@ -1777,7 +1777,7 @@ void DebuggerEngine::validateExecutable(DebuggerStartParameters *sp)
}
break;
}
case ProjectExplorer::Abi::ElfFormat: {
case Abi::ElfFormat: {
Utils::ElfReader reader(binary);
Utils::ElfData elfData = reader.readHeaders();
@@ -1876,7 +1876,7 @@ void DebuggerEngine::validateExecutable(DebuggerStartParameters *sp)
return;
}
if (warnOnRelease) {
Core::AsynchronousMessageBox::information(tr("Warning"),
AsynchronousMessageBox::information(tr("Warning"),
tr("This does not seem to be a \"Debug\" build.\n"
"Setting breakpoints by file name and line number may fail.")
+ QLatin1Char('\n') + detailedWarning);

View File

@@ -232,7 +232,7 @@ void DebuggerItem::setEngineType(const DebuggerEngineType &engineType)
m_engineType = engineType;
}
void DebuggerItem::setCommand(const Utils::FileName &command)
void DebuggerItem::setCommand(const FileName &command)
{
m_command = command;
}
@@ -257,7 +257,7 @@ void DebuggerItem::setAutoDetectionSource(const QString &autoDetectionSource)
m_autoDetectionSource = autoDetectionSource;
}
void DebuggerItem::setAbis(const QList<ProjectExplorer::Abi> &abis)
void DebuggerItem::setAbis(const QList<Abi> &abis)
{
m_abis = abis;
}

View File

@@ -336,14 +336,14 @@ KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) cons
return ItemList() << qMakePair(tr("Debugger"), displayString(k));
}
FileName DebuggerKitInformation::debuggerCommand(const ProjectExplorer::Kit *k)
FileName DebuggerKitInformation::debuggerCommand(const Kit *k)
{
const DebuggerItem *item = debugger(k);
QTC_ASSERT(item, return FileName());
return item->command();
}
DebuggerEngineType DebuggerKitInformation::engineType(const ProjectExplorer::Kit *k)
DebuggerEngineType DebuggerKitInformation::engineType(const Kit *k)
{
const DebuggerItem *item = debugger(k);
QTC_ASSERT(item, return NoEngineType);

View File

@@ -89,16 +89,16 @@ public:
bool isQmlActive() const;
void setSimpleDockWidgetArrangement();
// Debuggable languages are registered with this function.
void addLanguage(DebuggerLanguage language, const Core::Context &context);
void addLanguage(DebuggerLanguage language, const Context &context);
QDockWidget *dockWidget(const QString &objectName) const
{ return q->findChild<QDockWidget *>(objectName); }
public slots:
void resetDebuggerLayout();
void updateUiForProject(ProjectExplorer::Project *project);
void updateUiForTarget(ProjectExplorer::Target *target);
void updateUiForRunConfiguration(ProjectExplorer::RunConfiguration *rc);
void updateUiForProject(Project *project);
void updateUiForTarget(Target *target);
void updateUiForRunConfiguration(RunConfiguration *rc);
void updateUiForCurrentRunConfiguration();
void updateActiveLanguages();
void updateDockWidgetSettings();
@@ -162,26 +162,24 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
void DebuggerMainWindowPrivate::updateUiForProject(Project *project)
{
if (m_previousProject) {
disconnect(m_previousProject,
SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(updateUiForTarget(ProjectExplorer::Target*)));
disconnect(m_previousProject, &Project::activeTargetChanged,
this, &DebuggerMainWindowPrivate::updateUiForTarget);
}
m_previousProject = project;
if (!project) {
updateUiForTarget(0);
return;
}
connect(project, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
SLOT(updateUiForTarget(ProjectExplorer::Target*)));
connect(project, &Project::activeTargetChanged,
this, &DebuggerMainWindowPrivate::updateUiForTarget);
updateUiForTarget(project->activeTarget());
}
void DebuggerMainWindowPrivate::updateUiForTarget(Target *target)
{
if (m_previousTarget) {
disconnect(m_previousTarget,
SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
this, SLOT(updateUiForRunConfiguration(ProjectExplorer::RunConfiguration*)));
disconnect(m_previousTarget, &Target::activeRunConfigurationChanged,
this, &DebuggerMainWindowPrivate::updateUiForRunConfiguration);
}
m_previousTarget = target;
@@ -191,9 +189,8 @@ void DebuggerMainWindowPrivate::updateUiForTarget(Target *target)
return;
}
connect(target,
SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
SLOT(updateUiForRunConfiguration(ProjectExplorer::RunConfiguration*)));
connect(target, &Target::activeRunConfigurationChanged,
this, &DebuggerMainWindowPrivate::updateUiForRunConfiguration);
updateUiForRunConfiguration(target->activeRunConfiguration());
}
@@ -297,7 +294,7 @@ void DebuggerMainWindow::onModeChanged(IMode *mode)
void DebuggerMainWindowPrivate::createViewsMenuItems()
{
Context debugcontext(Constants::C_DEBUGMODE);
m_viewsMenu = Core::ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
m_viewsMenu = ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
QTC_ASSERT(m_viewsMenu, return);
QAction *openMemoryEditorAction = new QAction(this);
@@ -307,20 +304,20 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
// Add menu items
Command *cmd = 0;
cmd = Core::ActionManager::registerAction(openMemoryEditorAction,
cmd = ActionManager::registerAction(openMemoryEditorAction,
"Debugger.Views.OpenMemoryEditor", debugcontext);
cmd->setAttribute(Command::CA_Hide);
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
cmd = Core::ActionManager::registerAction(q->menuSeparator1(),
cmd = ActionManager::registerAction(q->menuSeparator1(),
"Debugger.Views.Separator1", debugcontext);
cmd->setAttribute(Command::CA_Hide);
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
cmd = Core::ActionManager::registerAction(q->autoHideTitleBarsAction(),
cmd = ActionManager::registerAction(q->autoHideTitleBarsAction(),
"Debugger.Views.AutoHideTitleBars", debugcontext);
cmd->setAttribute(Command::CA_Hide);
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
cmd = Core::ActionManager::registerAction(q->menuSeparator2(),
cmd = ActionManager::registerAction(q->menuSeparator2(),
"Debugger.Views.Separator2", debugcontext);
cmd->setAttribute(Command::CA_Hide);
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
@@ -406,8 +403,8 @@ QDockWidget *DebuggerMainWindow::createDockWidget(const DebuggerLanguage &langua
Context globalContext(Core::Constants::C_GLOBAL);
QAction *toggleViewAction = dockWidget->toggleViewAction();
Command *cmd = Core::ActionManager::registerAction(toggleViewAction,
Core::Id("Debugger.").withSuffix(widget->objectName()), globalContext);
Command *cmd = ActionManager::registerAction(toggleViewAction,
Id("Debugger.").withSuffix(widget->objectName()), globalContext);
cmd->setAttribute(Command::CA_Hide);
dockWidget->installEventFilter(&d->m_resizeEventFilter);
@@ -429,10 +426,10 @@ void DebuggerMainWindow::addStagedMenuEntries()
QWidget *DebuggerMainWindow::createContents(IMode *mode)
{
connect(SessionManager::instance(), SIGNAL(startupProjectChanged(ProjectExplorer::Project*)),
d, SLOT(updateUiForProject(ProjectExplorer::Project*)));
connect(SessionManager::instance(), &SessionManager::startupProjectChanged,
d, &DebuggerMainWindowPrivate::updateUiForProject);
d->m_viewsMenu = Core::ActionManager::actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS));
d->m_viewsMenu = ActionManager::actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
QTC_ASSERT(d->m_viewsMenu, return 0);
//d->m_mainWindow = new Internal::DebuggerMainWindow(this);

View File

@@ -92,7 +92,7 @@ public:
// DebuggerItemModel
// --------------------------------------------------------------------------
class DebuggerItemModel : public Utils::TreeModel
class DebuggerItemModel : public TreeModel
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)

View File

@@ -418,12 +418,12 @@ static QToolButton *toolButton(QAction *action)
return button;
}
static void setProxyAction(ProxyAction *proxy, Core::Id id)
static void setProxyAction(ProxyAction *proxy, Id id)
{
proxy->setAction(ActionManager::command(id)->action());
}
static QToolButton *toolButton(Core::Id id)
static QToolButton *toolButton(Id id)
{
return toolButton(ActionManager::command(id)->action());
}
@@ -688,12 +688,12 @@ public:
}
}
void editorOpened(Core::IEditor *editor);
void updateBreakMenuItem(Core::IEditor *editor);
void editorOpened(IEditor *editor);
void updateBreakMenuItem(IEditor *editor);
void setBusyCursor(bool busy);
void requestMark(TextEditor::TextEditorWidget *widget, int lineNumber,
TextEditor::TextMarkRequestKind kind);
void requestContextMenu(TextEditor::TextEditorWidget *widget,
void requestMark(TextEditorWidget *widget, int lineNumber,
TextMarkRequestKind kind);
void requestContextMenu(TextEditorWidget *widget,
int lineNumber, QMenu *menu);
void activatePreviousMode();
@@ -703,7 +703,7 @@ public:
const QString &tracePointMessage = QString());
void toggleBreakpointByAddress(quint64 address,
const QString &tracePointMessage = QString());
void onModeChanged(Core::IMode *mode);
void onModeChanged(IMode *mode);
void onCoreAboutToOpen();
void showSettingsDialog();
void updateDebugWithoutDeployMenu();
@@ -745,11 +745,11 @@ public:
void cleanupViews();
void setInitialState();
void fontSettingsChanged(const TextEditor::FontSettings &settings);
void fontSettingsChanged(const FontSettings &settings);
void updateState(DebuggerEngine *engine);
void updateWatchersWindow(bool showWatch, bool showReturn);
void onCurrentProjectChanged(ProjectExplorer::Project *project);
void onCurrentProjectChanged(Project *project);
void sessionLoaded();
void aboutToUnloadSession();
@@ -760,7 +760,7 @@ public:
#ifdef WITH_TESTS
public slots:
void testLoadProject(const QString &proFile, const TestCallBack &cb);
void testProjectLoaded(ProjectExplorer::Project *project);
void testProjectLoaded(Project *project);
void testProjectEvaluated();
void testProjectBuilt(bool success);
void testUnloadProject();
@@ -1276,9 +1276,9 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
// Cpp/Qml ui setup
m_mainWindow = new DebuggerMainWindow;
TaskHub::addCategory(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO,
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_DEBUGINFO,
tr("Debug Information"));
TaskHub::addCategory(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME,
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_RUNTIME,
tr("Debugger Runtime"));
return true;
@@ -1330,7 +1330,7 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
m_startAction->setEnabled(canRun);
m_startAction->setToolTip(whyNot);
m_debugWithoutDeployAction->setEnabled(canRun);
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
setProxyAction(m_visibleStartAction, Id(Constants::DEBUG));
}
void DebuggerPluginPrivate::debugProject()
@@ -1441,7 +1441,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
DebuggerKitChooser::RemoteDebugging : DebuggerKitChooser::LocalDebugging;
DebuggerKitChooser *kitChooser = new DebuggerKitChooser(mode);
DeviceProcessesDialog *dlg = new DeviceProcessesDialog(kitChooser, ICore::dialogParent());
dlg->addAcceptButton(ProjectExplorer::DeviceProcessesDialog::tr("&Attach to Process"));
dlg->addAcceptButton(DeviceProcessesDialog::tr("&Attach to Process"));
dlg->showAllDevices();
if (dlg->exec() == QDialog::Rejected) {
delete dlg;
@@ -1508,7 +1508,7 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
QTC_ASSERT(device, return 0);
if (process.pid == 0) {
Core::AsynchronousMessageBox::warning(tr("Warning"),
AsynchronousMessageBox::warning(tr("Warning"),
tr("Cannot attach to process with PID 0"));
return 0;
}
@@ -1517,14 +1517,14 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
if (const ToolChain *tc = ToolChainKitInformation::toolChain(kit))
isWindows = tc->targetAbi().os() == Abi::WindowsOS;
if (isWindows && isWinProcessBeingDebugged(process.pid)) {
Core::AsynchronousMessageBox::warning(tr("Process Already Under Debugger Control"),
AsynchronousMessageBox::warning(tr("Process Already Under Debugger Control"),
tr("The process %1 is already under the control of a debugger.\n"
"Qt Creator cannot attach to it.").arg(process.pid));
return 0;
}
if (device->type() != PE::DESKTOP_DEVICE_TYPE) {
Core::AsynchronousMessageBox::warning(tr("Not a Desktop Device Type"),
AsynchronousMessageBox::warning(tr("Not a Desktop Device Type"),
tr("It is only possible to attach to a locally running process."));
return 0;
}
@@ -1865,7 +1865,7 @@ static void changeFontSize(QWidget *widget, qreal size)
}
void DebuggerPluginPrivate::fontSettingsChanged
(const TextEditor::FontSettings &settings)
(const FontSettings &settings)
{
if (!boolSetting(FontSizeFollowsEditor))
return;
@@ -2013,7 +2013,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_exitAction->setEnabled(false);
m_startAction->setEnabled(true);
m_debugWithoutDeployAction->setEnabled(true);
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
setProxyAction(m_visibleStartAction, Id(Constants::DEBUG));
m_hiddenStopAction->setAction(m_undisturbableAction);
} else if (state == InferiorStopOk) {
// F5 continues, Shift-F5 kills. It is "continuable".
@@ -2022,7 +2022,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_exitAction->setEnabled(true);
m_startAction->setEnabled(false);
m_debugWithoutDeployAction->setEnabled(false);
setProxyAction(m_visibleStartAction, Core::Id(Constants::CONTINUE));
setProxyAction(m_visibleStartAction, Id(Constants::CONTINUE));
m_hiddenStopAction->setAction(m_exitAction);
m_localsAndExpressionsWindow->setShowLocals(true);
} else if (state == InferiorRunOk) {
@@ -2032,7 +2032,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_exitAction->setEnabled(true);
m_startAction->setEnabled(false);
m_debugWithoutDeployAction->setEnabled(false);
setProxyAction(m_visibleStartAction, Core::Id(Constants::INTERRUPT));
setProxyAction(m_visibleStartAction, Id(Constants::INTERRUPT));
m_hiddenStopAction->setAction(m_interruptAction);
m_localsAndExpressionsWindow->setShowLocals(false);
} else if (state == DebuggerFinished) {
@@ -2044,7 +2044,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_exitAction->setEnabled(false);
m_startAction->setEnabled(canRun);
m_debugWithoutDeployAction->setEnabled(canRun);
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
setProxyAction(m_visibleStartAction, Id(Constants::DEBUG));
m_hiddenStopAction->setAction(m_undisturbableAction);
m_codeModelSnapshot = CPlusPlus::Snapshot();
setBusyCursor(false);
@@ -2447,7 +2447,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
{
const QKeySequence debugKey = QKeySequence(UseMacShortcuts ? tr("Ctrl+Y") : tr("F5"));
QSettings *settings = Core::ICore::settings();
QSettings *settings = ICore::settings();
m_debuggerSettings = new DebuggerSettings;
m_debuggerSettings->readSettings();
@@ -2733,17 +2733,17 @@ void DebuggerPluginPrivate::extensionsInitialized()
cmd = ActionManager::registerAction(m_attachToRunningApplication,
"Debugger.AttachToRemoteProcess", globalcontext);
cmd->setDescription(tr("Attach to Running Application"));
mstart->addAction(cmd, Debugger::Constants::G_GENERAL);
mstart->addAction(cmd, G_GENERAL);
cmd = ActionManager::registerAction(m_attachToUnstartedApplication,
"Debugger.AttachToUnstartedProcess", globalcontext);
cmd->setDescription(tr("Attach to Unstarted Application"));
mstart->addAction(cmd, Debugger::Constants::G_GENERAL);
mstart->addAction(cmd, G_GENERAL);
cmd = ActionManager::registerAction(m_startAndDebugApplicationAction,
"Debugger.StartAndDebugApplication", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Debugger::Constants::G_GENERAL);
mstart->addAction(cmd, G_GENERAL);
cmd = ActionManager::registerAction(m_attachToCoreAction,
"Debugger.AttachCore", globalcontext);
@@ -2976,10 +2976,10 @@ void DebuggerPluginPrivate::extensionsInitialized()
// Debug mode setup
DebugMode *debugMode = new DebugMode;
QWidget *widget = m_mainWindow->createContents(debugMode);
Core::IContext *modeContextObject = new Core::IContext(this);
modeContextObject->setContext(Core::Context(CC::C_EDITORMANAGER));
IContext *modeContextObject = new IContext(this);
modeContextObject->setContext(Context(CC::C_EDITORMANAGER));
modeContextObject->setWidget(widget);
Core::ICore::addContextObject(modeContextObject);
ICore::addContextObject(modeContextObject);
debugMode->setWidget(widget);
m_plugin->addAutoReleasedObject(debugMode);
@@ -3505,7 +3505,7 @@ void DebuggerPluginPrivate::testBenchmark1()
{
#ifdef WITH_BENCHMARK
CALLGRIND_START_INSTRUMENTATION;
volatile Core::Id id1 = Core::Id(DEBUGGER_COMMON_SETTINGS_ID);
volatile Id id1 = Id(DEBUGGER_COMMON_SETTINGS_ID);
CALLGRIND_STOP_INSTRUMENTATION;
CALLGRIND_DUMP_STATS;

View File

@@ -295,7 +295,7 @@ bool DebuggerRunControlFactory::fillParametersFromLocalRunConfiguration
QTC_ASSERT(runConfiguration, return false);
auto rc = qobject_cast<const LocalApplicationRunConfiguration *>(runConfiguration);
QTC_ASSERT(rc, return false);
EnvironmentAspect *environmentAspect = rc->extraAspect<ProjectExplorer::EnvironmentAspect>();
EnvironmentAspect *environmentAspect = rc->extraAspect<EnvironmentAspect>();
QTC_ASSERT(environmentAspect, return false);
Target *target = runConfiguration->target();
@@ -331,7 +331,7 @@ bool DebuggerRunControlFactory::fillParametersFromLocalRunConfiguration
sp->languages |= CppLanguage;
if (debuggerAspect->useQmlDebugger()) {
const ProjectExplorer::IDevice::ConstPtr device =
const IDevice::ConstPtr device =
DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp);
QTcpServer server;
@@ -491,7 +491,7 @@ bool DebuggerRunControlFactory::fillParametersFromKit(DebuggerStartParameters *s
sp->executable = executableForPid(sp->attachPID);
}
if (!sp->executable.isEmpty())
abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable));
abis = Abi::abisOfBinary(FileName::fromString(sp->executable));
}
if (!abis.isEmpty()) {
// Try exact abis.

View File

@@ -337,7 +337,7 @@ void DisassemblerAgent::updateBreakpointMarkers()
return;
const DisassemblerLines contents = d->contentsAtCurrentLocation();
foreach (TextEditor::TextMark *marker, d->breakpointMarks)
foreach (TextMark *marker, d->breakpointMarks)
d->document->removeMark(marker);
qDeleteAll(d->breakpointMarks);
d->breakpointMarks.clear();

View File

@@ -1063,7 +1063,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
// with helpers enabled. In this case we get a second response with
// msg="Cannot find new threads: generic error"
showMessage(_("APPLYING WORKAROUND #1"));
Core::AsynchronousMessageBox::critical(
AsynchronousMessageBox::critical(
tr("Executable failed"), QString::fromLocal8Bit(msg));
showStatusMessage(tr("Process failed to start"));
//shutdown();
@@ -1103,7 +1103,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
// long as the breakpoints are enabled.
// FIXME: Should we silently disable the offending breakpoints?
showMessage(_("APPLYING WORKAROUND #5"));
Core::AsynchronousMessageBox::critical(
AsynchronousMessageBox::critical(
tr("Setting breakpoints failed"), QString::fromLocal8Bit(msg));
QTC_CHECK(state() == InferiorRunOk);
notifyInferiorSpontaneousStop();
@@ -1119,7 +1119,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
if (!m_lastWinException.isEmpty())
logMsg = m_lastWinException + QLatin1Char('\n');
logMsg += QString::fromLocal8Bit(msg);
Core::AsynchronousMessageBox::critical(tr("Executable Failed"), logMsg);
AsynchronousMessageBox::critical(tr("Executable Failed"), logMsg);
showStatusMessage(tr("Executable failed: %1").arg(logMsg));
}
}
@@ -1748,7 +1748,7 @@ void GdbEngine::handlePythonSetup(const GdbResponse &response)
QString out1 = _("The selected build of GDB does not support Python scripting.");
QString out2 = _("It cannot be used in Qt Creator.");
showStatusMessage(out1 + QLatin1Char(' ') + out2);
Core::AsynchronousMessageBox::critical(tr("Execution Error"), out1 + _("<br>") + out2);
AsynchronousMessageBox::critical(tr("Execution Error"), out1 + _("<br>") + out2);
}
notifyEngineSetupFailed();
}
@@ -1756,7 +1756,7 @@ void GdbEngine::handlePythonSetup(const GdbResponse &response)
void GdbEngine::showExecutionError(const QString &message)
{
Core::AsynchronousMessageBox::critical(tr("Execution Error"),
AsynchronousMessageBox::critical(tr("Execution Error"),
tr("Cannot continue debugged process:") + QLatin1Char('\n') + message);
}
@@ -1888,7 +1888,7 @@ void GdbEngine::handleInferiorShutdown(const GdbResponse &response)
notifyInferiorShutdownOk();
return;
}
Core::AsynchronousMessageBox::critical(
AsynchronousMessageBox::critical(
tr("Failed to shut down application"),
msgInferiorStopFailed(QString::fromLocal8Bit(ba)));
notifyInferiorShutdownFailed();
@@ -2172,7 +2172,7 @@ void GdbEngine::handleExecuteNext(const GdbResponse &response)
showExecutionError(QString::fromLocal8Bit(msg));
notifyInferiorRunFailed();
} else {
Core::AsynchronousMessageBox::critical(tr("Execution Error"),
AsynchronousMessageBox::critical(tr("Execution Error"),
tr("Cannot continue debugged process:") + QLatin1Char('\n') + QString::fromLocal8Bit(msg));
notifyInferiorIll();
}
@@ -3039,7 +3039,7 @@ void GdbEngine::handleShowModuleSymbols(const GdbResponse &response)
file.remove();
Internal::showModuleSymbols(modulePath, symbols);
} else {
Core::AsynchronousMessageBox::critical(tr("Cannot Read Symbols"),
AsynchronousMessageBox::critical(tr("Cannot Read Symbols"),
tr("Cannot read symbols for module \"%1\".").arg(fileName));
}
}
@@ -3527,7 +3527,7 @@ void GdbEngine::createSnapshot()
postCommand("gcore " + fileName.toLocal8Bit(),
NeedsStop|ConsoleCommand, CB(handleMakeSnapshot), fileName);
} else {
Core::AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
tr("Cannot create snapshot file."));
}
}
@@ -3550,7 +3550,7 @@ void GdbEngine::handleMakeSnapshot(const GdbResponse &response)
DebuggerRunControlFactory::createAndScheduleRun(sp);
} else {
QByteArray msg = response.data["msg"].data();
Core::AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
tr("Cannot create snapshot:") + QLatin1Char('\n') + QString::fromLocal8Bit(msg));
}
}
@@ -4381,7 +4381,7 @@ void GdbEngine::loadInitScript()
if (QFileInfo(script).isReadable()) {
postCommand("source " + script.toLocal8Bit());
} else {
Core::AsynchronousMessageBox::warning(
AsynchronousMessageBox::warning(
tr("Cannot find debugger initialization script"),
tr("The debugger settings point to a script file at \"%1\" "
"which is not accessible. If a script file is not needed, "
@@ -4419,7 +4419,7 @@ void GdbEngine::handleGdbError(QProcess::ProcessError error)
default:
//m_gdbProc->kill();
//notifyEngineIll();
Core::AsynchronousMessageBox::critical(tr("GDB I/O Error"), msg);
AsynchronousMessageBox::critical(tr("GDB I/O Error"), msg);
break;
}
}
@@ -4447,7 +4447,7 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
const QString msg = type == QProcess::CrashExit ?
tr("The gdb process terminated.") :
tr("The gdb process terminated unexpectedly (code %1)").arg(code);
Core::AsynchronousMessageBox::critical(tr("Unexpected GDB Exit"), msg);
AsynchronousMessageBox::critical(tr("Unexpected GDB Exit"), msg);
break;
}
}
@@ -4614,7 +4614,7 @@ void GdbEngine::notifyInferiorSetupFailed(const QString &msg)
return; // Adapter crashed meanwhile, so this notification is meaningless.
}
showMessage(_("INFERIOR START FAILED"));
Core::AsynchronousMessageBox::critical(tr("Failed to start application"), msg);
AsynchronousMessageBox::critical(tr("Failed to start application"), msg);
DebuggerEngine::notifyInferiorSetupFailed();
}
@@ -4636,7 +4636,7 @@ void GdbEngine::handleAdapterCrashed(const QString &msg)
m_gdbProc->kill();
if (!msg.isEmpty())
Core::AsynchronousMessageBox::critical(tr("Adapter crashed"), msg);
AsynchronousMessageBox::critical(tr("Adapter crashed"), msg);
}
void GdbEngine::createFullBacktrace()

View File

@@ -311,7 +311,7 @@ QWidget *GdbOptionsPage::widget()
void GdbOptionsPage::apply()
{
if (m_widget)
m_widget->group.apply(Core::ICore::settings());
m_widget->group.apply(ICore::settings());
}
void GdbOptionsPage::finish()
@@ -457,7 +457,7 @@ QWidget *GdbOptionsPage2::widget()
void GdbOptionsPage2::apply()
{
if (m_widget)
m_widget->group.apply(Core::ICore::settings());
m_widget->group.apply(ICore::settings());
}
void GdbOptionsPage2::finish()

View File

@@ -90,7 +90,7 @@ GdbServerStarter::~GdbServerStarter()
void GdbServerStarter::handleRemoteError(const QString &errorMsg)
{
Core::AsynchronousMessageBox::critical(tr("Remote Error"), errorMsg);
AsynchronousMessageBox::critical(tr("Remote Error"), errorMsg);
}
void GdbServerStarter::portGathererError(const QString &text)
@@ -198,15 +198,15 @@ void GdbServerStarter::attach(int port)
localExecutable = candidate;
}
if (localExecutable.isEmpty()) {
Core::AsynchronousMessageBox::warning(tr("Warning"),
AsynchronousMessageBox::warning(tr("Warning"),
tr("Cannot find local executable for remote process \"%1\".")
.arg(d->process.exe));
return;
}
QList<Abi> abis = Abi::abisOfBinary(Utils::FileName::fromString(localExecutable));
QList<Abi> abis = Abi::abisOfBinary(FileName::fromString(localExecutable));
if (abis.isEmpty()) {
Core::AsynchronousMessageBox::warning(tr("Warning"),
AsynchronousMessageBox::warning(tr("Warning"),
tr("Cannot find ABI for remote process \"%1\".")
.arg(d->process.exe));
return;

View File

@@ -62,11 +62,11 @@ GdbTermEngine::GdbTermEngine(const DebuggerStartParameters &startParameters)
#ifdef Q_OS_WIN
// Windows up to xp needs a workaround for attaching to freshly started processes. see proc_stub_win
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
m_stubProc.setMode(Utils::ConsoleProcess::Suspend);
m_stubProc.setMode(ConsoleProcess::Suspend);
else
m_stubProc.setMode(Utils::ConsoleProcess::Debug);
m_stubProc.setMode(ConsoleProcess::Debug);
#else
m_stubProc.setMode(Utils::ConsoleProcess::Debug);
m_stubProc.setMode(ConsoleProcess::Debug);
m_stubProc.setSettings(Core::ICore::settings());
#endif
}
@@ -94,11 +94,11 @@ void GdbTermEngine::setupEngine()
// Set environment + dumper preload.
m_stubProc.setEnvironment(startParameters().environment);
connect(&m_stubProc, &Utils::ConsoleProcess::processError,
connect(&m_stubProc, &ConsoleProcess::processError,
this, &GdbTermEngine::stubError);
connect(&m_stubProc, &Utils::ConsoleProcess::processStarted,
connect(&m_stubProc, &ConsoleProcess::processStarted,
this, &GdbTermEngine::stubStarted);
connect(&m_stubProc, &Utils::ConsoleProcess::stubStopped,
connect(&m_stubProc, &ConsoleProcess::stubStopped,
this, &GdbTermEngine::stubExited);
// FIXME: Starting the stub implies starting the inferior. This is
// fairly unclean as far as the state machine and error reporting go.

View File

@@ -83,7 +83,7 @@ public:
QString remoteFile() const { return m_remoteFile; }
private slots:
void handleSftpOperationFinished(QSsh::SftpJobId, const QString &error);
void handleSftpOperationFinished(SftpJobId, const QString &error);
void handleSftpOperationFailed(const QString &errorMessage);
void handleConnectionError(const QString &errorMessage);
void handleRemoteError(const QString &errorMessage);
@@ -143,7 +143,7 @@ void SelectRemoteFileDialog::attachToDevice(Kit *k)
QTC_ASSERT(k, return);
IDevice::ConstPtr device = DeviceKitInformation::device(k);
QTC_ASSERT(device, return);
QSsh::SshConnectionParameters sshParams = device->sshParameters();
SshConnectionParameters sshParams = device->sshParameters();
m_fileSystemModel.setSshConnection(sshParams);
}
@@ -159,7 +159,7 @@ void SelectRemoteFileDialog::handleConnectionError(const QString &errorMessage)
//reject();
}
void SelectRemoteFileDialog::handleSftpOperationFinished(QSsh::SftpJobId, const QString &error)
void SelectRemoteFileDialog::handleSftpOperationFinished(SftpJobId, const QString &error)
{
if (error.isEmpty()) {
m_textBrowser->append(tr("Download of remote file succeeded."));
@@ -364,7 +364,7 @@ bool AttachCoreDialog::useLocalCoreFile() const
void AttachCoreDialog::coreFileChanged(const QString &core)
{
if (!Utils::HostOsInfo::isWindowsHost() && QFile::exists(core)) {
if (!HostOsInfo::isWindowsHost() && QFile::exists(core)) {
Kit *k = d->kitChooser->currentKit();
QTC_ASSERT(k, return);
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
@@ -441,7 +441,7 @@ QString AttachCoreDialog::remoteCoreFile() const
return d->remoteCoreFileName->text();
}
void AttachCoreDialog::setKitId(Core::Id id)
void AttachCoreDialog::setKitId(Id id)
{
d->kitChooser->setCurrentKitId(id);
}

View File

@@ -189,7 +189,7 @@ bool MemoryAgent::doCreateBinEditor(const MemoryViewSetupData &data)
void MemoryAgent::createBinEditor(const MemoryViewSetupData &data)
{
if (!doCreateBinEditor(data))
Core::AsynchronousMessageBox::warning(
AsynchronousMessageBox::warning(
tr("No Memory Viewer Available"),
tr("The memory contents cannot be shown as no viewer plugin "
"for binary data has been loaded."));
@@ -234,7 +234,7 @@ void MemoryAgent::handleWatchpointRequest(quint64 address, uint size)
void MemoryAgent::updateContents()
{
foreach (const QPointer<Core::IEditor> &e, m_editors)
foreach (const QPointer<IEditor> &e, m_editors)
if (e)
MemoryView::binEditorUpdateContents(e->widget());
// Update all views except register views, which trigger on

View File

@@ -60,22 +60,22 @@ QmlAdapter::QmlAdapter(DebuggerEngine *engine, QObject *parent)
connect(&m_connectionTimer, &QTimer::timeout, this, &QmlAdapter::checkConnectionState);
m_conn = new QmlDebugConnection(this);
connect(m_conn, &QmlDebug::QmlDebugConnection::stateMessage,
connect(m_conn, &QmlDebugConnection::stateMessage,
this, &QmlAdapter::showConnectionStateMessage);
connect(m_conn, &QmlDebug::QmlDebugConnection::errorMessage,
connect(m_conn, &QmlDebugConnection::errorMessage,
this, &QmlAdapter::showConnectionErrorMessage);
connect(m_conn, &QmlDebug::QmlDebugConnection::error,
connect(m_conn, &QmlDebugConnection::error,
this, &QmlAdapter::connectionErrorOccurred);
connect(m_conn, &QmlDebug::QmlDebugConnection::opened,
connect(m_conn, &QmlDebugConnection::opened,
&m_connectionTimer, &QTimer::stop);
connect(m_conn, &QmlDebug::QmlDebugConnection::opened,
connect(m_conn, &QmlDebugConnection::opened,
this, &QmlAdapter::connected);
connect(m_conn, &QmlDebug::QmlDebugConnection::closed,
connect(m_conn, &QmlDebugConnection::closed,
this, &QmlAdapter::disconnected);
createDebuggerClients();
m_msgClient = new QDebugMessageClient(m_conn);
connect(m_msgClient, &QmlDebug::QDebugMessageClient::newState, this, &QmlAdapter::clientStateChanged);
connect(m_msgClient, &QDebugMessageClient::newState, this, &QmlAdapter::clientStateChanged);
}
@@ -129,7 +129,7 @@ void QmlAdapter::clientStateChanged(QmlDebugClient::State state)
void QmlAdapter::debugClientStateChanged(QmlDebugClient::State state)
{
if (state != QmlDebug::QmlDebugClient::Enabled)
if (state != QmlDebugClient::Enabled)
return;
QmlDebugClient *client = qobject_cast<QmlDebugClient*>(sender());
QTC_ASSERT(client, return);
@@ -210,21 +210,21 @@ QDebugMessageClient *QmlAdapter::messageClient() const
}
void QmlAdapter::logServiceStateChange(const QString &service, float version,
QmlDebug::QmlDebugClient::State newState)
QmlDebugClient::State newState)
{
switch (newState) {
case QmlDebug::QmlDebugClient::Unavailable: {
case QmlDebugClient::Unavailable: {
showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'unavailable'.").
arg(service).arg(QString::number(version)));
break;
}
case QmlDebug::QmlDebugClient::Enabled: {
case QmlDebugClient::Enabled: {
showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'enabled'.").
arg(service).arg(QString::number(version)));
break;
}
case QmlDebug::QmlDebugClient::NotConnected: {
case QmlDebugClient::NotConnected: {
showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'not connected'.").
arg(service).arg(QString::number(version)));
break;

View File

@@ -249,9 +249,9 @@ public:
quint32 *column;
};
QmlJS::ConsoleManagerInterface *qmlConsoleManager()
ConsoleManagerInterface *qmlConsoleManager()
{
return QmlJS::ConsoleManagerInterface::instance();
return ConsoleManagerInterface::instance();
}
///////////////////////////////////////////////////////////////////////
@@ -1041,7 +1041,7 @@ void QmlEngine::synchronizeWatchers()
}
}
QmlJS::ConsoleItem *constructLogItemTree(QmlJS::ConsoleItem *parent,
ConsoleItem *constructLogItemTree(ConsoleItem *parent,
const QVariant &result,
const QString &key = QString())
{
@@ -1135,7 +1135,7 @@ void QmlEngine::disconnected()
notifyInferiorExited();
}
void QmlEngine::documentUpdated(QmlJS::Document::Ptr doc)
void QmlEngine::documentUpdated(Document::Ptr doc)
{
QString fileName = doc->fileName();
if (pendingBreakpoints.contains(fileName)) {
@@ -1167,7 +1167,7 @@ void QmlEngine::updateCurrentContext()
synchronizeWatchers();
QmlJS::ConsoleManagerInterface *consoleManager = qmlConsoleManager();
ConsoleManagerInterface *consoleManager = qmlConsoleManager();
if (consoleManager)
consoleManager->setContext(tr("Context:") + QLatin1Char(' ') + context);
}

View File

@@ -396,13 +396,13 @@ void QmlInspectorAgent::setEngineClient(BaseEngineDebugClient *client)
m_engineClient = client;
if (m_engineClient) {
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::newState,
connect(m_engineClient, &BaseEngineDebugClient::newState,
this, &QmlInspectorAgent::updateState);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::result,
connect(m_engineClient, &BaseEngineDebugClient::result,
this, &QmlInspectorAgent::onResult);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::newObject,
connect(m_engineClient, &BaseEngineDebugClient::newObject,
this, &QmlInspectorAgent::newObject);
connect(m_engineClient, &QmlDebug::BaseEngineDebugClient::valueChanged,
connect(m_engineClient, &BaseEngineDebugClient::valueChanged,
this, &QmlInspectorAgent::onValueChanged);
}

View File

@@ -346,8 +346,8 @@ void MapObjectWithDebugReference::process(UiObjectBinding *ast)
/*!
* Manages a Qml/JS document for the inspector
*/
QmlLiveTextPreview::QmlLiveTextPreview(const QmlJS::Document::Ptr &doc,
const QmlJS::Document::Ptr &initDoc,
QmlLiveTextPreview::QmlLiveTextPreview(const Document::Ptr &doc,
const Document::Ptr &initDoc,
QmlInspectorAdapter *inspectorAdapter,
QObject *parent)
: QObject(parent)
@@ -362,8 +362,8 @@ QmlLiveTextPreview::QmlLiveTextPreview(const QmlJS::Document::Ptr &doc,
{
QTC_CHECK(doc->fileName() == initDoc->fileName());
QmlJS::ModelManagerInterface *modelManager
= QmlJS::ModelManagerInterface::instance();
ModelManagerInterface *modelManager
= ModelManagerInterface::instance();
if (modelManager) {
connect(modelManager, SIGNAL(documentChangedOnDisk(QmlJS::Document::Ptr)),
SLOT(documentChanged(QmlJS::Document::Ptr)));
@@ -424,7 +424,7 @@ void QmlLiveTextPreview::unassociateEditor(Core::IEditor *oldEditor)
}
}
void QmlLiveTextPreview::resetInitialDoc(const QmlJS::Document::Ptr &doc)
void QmlLiveTextPreview::resetInitialDoc(const Document::Ptr &doc)
{
m_initialDoc = doc;
m_previousDoc = doc;
@@ -463,7 +463,7 @@ void QmlLiveTextPreview::updateDebugIds()
if (it != m_inspectorAdapter->agent()->debugIdHash().constEnd()) {
// Map all the object that comes from the document as it has been loaded
// by the server.
const QmlJS::Document::Ptr &doc = m_initialDoc;
const Document::Ptr &doc = m_initialDoc;
MapObjectWithDebugReference visitor;
visitor.ids = (*it);
@@ -477,7 +477,7 @@ void QmlLiveTextPreview::updateDebugIds()
}
}
const QmlJS::Document::Ptr &doc = m_previousDoc;
const Document::Ptr &doc = m_previousDoc;
if (!doc->qmlProgram())
return;
@@ -500,7 +500,7 @@ void QmlLiveTextPreview::updateDebugIds()
= m_createdObjects.constBegin();
it != m_createdObjects.constEnd(); ++it) {
const QmlJS::Document::Ptr &doc = it.key();
const Document::Ptr &doc = it.key();
DebugIdHash::const_iterator id_it = m_inspectorAdapter->agent()->debugIdHash().constFind(
qMakePair<QString, int>(doc->fileName(), doc->editorRevision()));
@@ -527,14 +527,14 @@ void QmlLiveTextPreview::updateDebugIds()
changeSelectedElements(m_lastOffsets, QString());
}
void QmlLiveTextPreview::changeSelectedElements(const QList<QmlJS::AST::UiObjectMember*> offsetObjects,
void QmlLiveTextPreview::changeSelectedElements(const QList<UiObjectMember*> offsetObjects,
const QString &wordAtCursor)
{
if (m_editors.isEmpty() || !m_previousDoc)
return;
QList<int> offsets;
foreach (QmlJS::AST::UiObjectMember *member, offsetObjects)
foreach (UiObjectMember *member, offsetObjects)
offsets << member->firstSourceLocation().offset;
if (!changeSelectedElements(offsets, wordAtCursor) && m_initialDoc && offsetObjects.count()) {
@@ -588,7 +588,7 @@ bool QmlLiveTextPreview::changeSelectedElements(const QList<int> offsets,
return true;
}
void QmlLiveTextPreview::documentChanged(QmlJS::Document::Ptr doc)
void QmlLiveTextPreview::documentChanged(Document::Ptr doc)
{
if (doc->fileName() != m_previousDoc->fileName())
return;
@@ -650,11 +650,11 @@ void QmlLiveTextPreview::onAutomaticUpdateFailed()
QList<int> QmlLiveTextPreview::objectReferencesForOffset(quint32 offset)
{
QList<int> result;
QHashIterator<QmlJS::AST::UiObjectMember*, QList<int> > iter(m_debugIds);
QmlJS::AST::UiObjectMember *possibleNode = 0;
QHashIterator<UiObjectMember*, QList<int> > iter(m_debugIds);
UiObjectMember *possibleNode = 0;
while (iter.hasNext()) {
iter.next();
QmlJS::AST::UiObjectMember *member = iter.key();
UiObjectMember *member = iter.key();
quint32 startOffset = member->firstSourceLocation().offset;
quint32 endOffset = member->lastSourceLocation().offset;
if (startOffset <= offset && offset <= endOffset) {

View File

@@ -152,7 +152,7 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent)
connect(m_pathChooser, SIGNAL(pathChanged(QString)), this, SLOT(stopAndCheckExecutable()));
connect(m_closePushButton, SIGNAL(clicked()), this, SLOT(reject()));
connect(&m_timer, SIGNAL(timeout()), this, SLOT(findProcess()));
connect(m_kitChooser, &ProjectExplorer::KitChooser::currentIndexChanged,
connect(m_kitChooser, &KitChooser::currentIndexChanged,
this, &UnstartedAppWatcherDialog::kitChanged);
kitChanged();

View File

@@ -256,11 +256,11 @@ WatchModel::WatchModel(WatchHandler *handler)
root->appendChild(m_tooltipRoot = new WatchItem("tooltip", tr("Tooltip")));
setRootItem(root);
connect(action(SortStructMembers), &Utils::SavedAction::valueChanged,
connect(action(SortStructMembers), &SavedAction::valueChanged,
this, &WatchModel::reinsertAllData);
connect(action(ShowStdNamespace), &Utils::SavedAction::valueChanged,
connect(action(ShowStdNamespace), &SavedAction::valueChanged,
this, &WatchModel::reinsertAllData);
connect(action(ShowQtNamespace), &Utils::SavedAction::valueChanged,
connect(action(ShowQtNamespace), &SavedAction::valueChanged,
this, &WatchModel::reinsertAllData);
}
@@ -1451,7 +1451,7 @@ void WatchHandler::clearWatches()
if (theWatcherNames.isEmpty())
return;
const QDialogButtonBox::StandardButton ret = Utils::CheckableMessageBox::doNotAskAgainQuestion(
const QDialogButtonBox::StandardButton ret = CheckableMessageBox::doNotAskAgainQuestion(
Core::ICore::mainWindow(), tr("Remove All Expression Evaluators"),
tr("Are you sure you want to remove all expression evaluators?"),
Core::ICore::settings(), QLatin1String("RemoveAllWatchers"));