Debugger: Use Utils::Text::Position instead of int line number

The column is currently unused.

Change-Id: Iabc57c8d21e807187783071efe9a82e9c1877181
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2023-06-06 15:44:59 +02:00
parent a3fb6a3a1c
commit 0d4a546397
17 changed files with 101 additions and 92 deletions

View File

@@ -603,8 +603,8 @@ public:
} else {
//: Message tracepoint: %1 file, %2 line %3 function hit.
message = Tr::tr("%1:%2 %3() hit").arg(data.fileName.fileName()).
arg(data.lineNumber).
arg(cppFunctionAt(data.fileName, data.lineNumber));
arg(data.textPosition.line).
arg(cppFunctionAt(data.fileName, data.textPosition.line));
}
QInputDialog dialog; // Create wide input dialog.
dialog.setWindowFlags(dialog.windowFlags() & ~(Qt::MSWindowsFixedSizeDialogHint));
@@ -1881,7 +1881,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
if (engine->hasCapability(RunToLineCapability)) {
auto act = menu->addAction(args.address
? Tr::tr("Run to Address 0x%1").arg(args.address, 0, 16)
: Tr::tr("Run to Line %1").arg(args.lineNumber));
: Tr::tr("Run to Line %1").arg(args.textPosition.line));
connect(act, &QAction::triggered, this, [args, engine] {
QTC_ASSERT(engine, return);
engine->executeRunToLine(args);
@@ -1890,7 +1890,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
if (engine->hasCapability(JumpToLineCapability)) {
auto act = menu->addAction(args.address
? Tr::tr("Jump to Address 0x%1").arg(args.address, 0, 16)
: Tr::tr("Jump to Line %1").arg(args.lineNumber));
: Tr::tr("Jump to Line %1").arg(args.textPosition.line));
connect(act, &QAction::triggered, this, [args, engine] {
QTC_ASSERT(engine, return);
engine->executeJumpToLine(args);