aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck/cppcheckdiagnosticview.cpp
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2025-06-13 11:08:09 +0200
committerDavid Schulz <[email protected]>2025-06-17 07:38:25 +0000
commitfdbc5ceb9034b1f43542c67d6227faf04c81bcac (patch)
tree5cc9a4c4cee231a61bcf130b0ddc111d61187526 /src/plugins/cppcheck/cppcheckdiagnosticview.cpp
parent700297aef855449feae50b2331f0b686788c076a (diff)
Debugger: Fix column offset for Links that replaced DiagnosticsLocation
Amends a40e803503e4186823e2ca4585c8a4555e89d9c2 The DiagnosticsLocation used 1 based column offset, but the column offset in Link is 0. This removes the need to substract 1 from column before passing the Link to openEditorAt. Change-Id: I81905eff4881320e197d55f5b1a27aa7a3b74864 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/cppcheck/cppcheckdiagnosticview.cpp')
-rw-r--r--src/plugins/cppcheck/cppcheckdiagnosticview.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/cppcheck/cppcheckdiagnosticview.cpp b/src/plugins/cppcheck/cppcheckdiagnosticview.cpp
index be2ed950538..da6730de63a 100644
--- a/src/plugins/cppcheck/cppcheckdiagnosticview.cpp
+++ b/src/plugins/cppcheck/cppcheckdiagnosticview.cpp
@@ -81,10 +81,8 @@ void DiagnosticView::openEditorForCurrentIndex()
{
const QVariant v = model()->data(currentIndex(), Debugger::DetailedErrorView::LocationRole);
Link loc = v.value<Link>();
- if (loc.hasValidTarget()) {
- --loc.targetColumn; // FIXME: Move adjustment to model side.
+ if (loc.hasValidTarget())
Core::EditorManager::openEditorAt(loc);
- }
}
void DiagnosticView::mouseDoubleClickEvent(QMouseEvent *event)