Debugger: Avoid a few clang warnings

Change of signedness and/or size.

Change-Id: I126d36d406afbba4b7383bf8326d845db79cdde7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-12-10 11:05:00 +01:00
parent b1a29dedfc
commit 0e49f11ca3
2 changed files with 7 additions and 7 deletions

View File

@@ -1289,7 +1289,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
*errorMessage = msgParameterMissing(*it); *errorMessage = msgParameterMissing(*it);
return false; return false;
} }
const qulonglong pid = it->toULongLong(); const qint64 pid = it->toLongLong();
const QStringList args = it->split(','); const QStringList args = it->split(',');
Kit *kit = nullptr; Kit *kit = nullptr;
@@ -1372,7 +1372,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
*errorMessage = msgParameterMissing(*it); *errorMessage = msgParameterMissing(*it);
return false; return false;
} }
qint64 pid = it->section(':', 1, 1).toULongLong(); qint64 pid = it->section(':', 1, 1).toLongLong();
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE); auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(findUniversalCdbKit()); runControl->setKit(findUniversalCdbKit());
auto debugger = new DebuggerRunTool(runControl); auto debugger = new DebuggerRunTool(runControl);
@@ -1612,7 +1612,7 @@ void DebuggerPluginPrivate::startRemoteCdbSession()
class RemoteAttachRunner : public DebuggerRunTool class RemoteAttachRunner : public DebuggerRunTool
{ {
public: public:
RemoteAttachRunner(RunControl *runControl, int pid) RemoteAttachRunner(RunControl *runControl, ProcessHandle pid)
: DebuggerRunTool(runControl) : DebuggerRunTool(runControl)
{ {
setId("AttachToRunningProcess"); setId("AttachToRunningProcess");
@@ -1620,7 +1620,7 @@ public:
auto gdbServer = new GdbServerRunner(runControl, portsGatherer()); auto gdbServer = new GdbServerRunner(runControl, portsGatherer());
gdbServer->setUseMulti(false); gdbServer->setUseMulti(false);
gdbServer->setAttachPid(ProcessHandle(pid)); gdbServer->setAttachPid(pid);
addStartDependency(gdbServer); addStartDependency(gdbServer);
@@ -1661,7 +1661,7 @@ void DebuggerPluginPrivate::attachToRunningApplication()
runControl->setKit(kit); runControl->setKit(kit);
//: %1: PID //: %1: PID
runControl->setDisplayName(tr("Process %1").arg(process.pid)); runControl->setDisplayName(tr("Process %1").arg(process.pid));
auto debugger = new RemoteAttachRunner(runControl, process.pid); auto debugger = new RemoteAttachRunner(runControl, ProcessHandle(process.pid));
debugger->startRunControl(); debugger->startRunControl();
} }
} }
@@ -1883,7 +1883,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
} }
// Run to, jump to line below in stopped state. // Run to, jump to line below in stopped state.
for (const QPointer<DebuggerEngine> engine : EngineManager::engines()) { for (const QPointer<DebuggerEngine> &engine : EngineManager::engines()) {
if (engine->state() == InferiorStopOk && args.isValid()) { if (engine->state() == InferiorStopOk && args.isValid()) {
menu->addSeparator(); menu->addSeparator();
if (engine->hasCapability(RunToLineCapability)) { if (engine->hasCapability(RunToLineCapability)) {

View File

@@ -41,7 +41,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessItem
public: public:
bool operator<(const DeviceProcessItem &other) const; bool operator<(const DeviceProcessItem &other) const;
int pid = 0; qint64 pid = 0;
QString cmdLine; QString cmdLine;
QString exe; QString exe;
}; };