Commit 4e8e75d8 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

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: default avatarhjk <hjk@theqtcompany.com>
parent 3a9b34f2
......@@ -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;
}
......
......@@ -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.
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -92,7 +92,7 @@ public:
// DebuggerItemModel
// --------------------------------------------------------------------------
class DebuggerItemModel : public Utils::TreeModel
class DebuggerItemModel : public TreeModel
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)
......
This diff is collapsed.
......@@ -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.
......
......@@ -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();
......
......@@ -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()
......
......@@ -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()
......
......@@ -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;
......
......@@ -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.
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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)));