From 9e186190fcd739507eb58d2fbd0c5a67faf69c31 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Wed, 22 Jun 2016 18:18:53 +0200 Subject: [PATCH] Improve debug output in PartitionBarsView. --- src/modules/partition/gui/PartitionBarsView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/gui/PartitionBarsView.cpp b/src/modules/partition/gui/PartitionBarsView.cpp index f1333da7c..776e79657 100644 --- a/src/modules/partition/gui/PartitionBarsView.cpp +++ b/src/modules/partition/gui/PartitionBarsView.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -66,7 +67,14 @@ PartitionBarsView::PartitionBarsView( QWidget* parent ) connect( this, &PartitionBarsView::clicked, this, [=]( const QModelIndex& index ) { - cDebug() << "Clicked row" << index.row(); + Partition* selectedPartition = + (Partition *)( index.data( PartitionModel::PartitionPtrRole ) + .value< void* >() ); + cDebug() << "Clicked row" << index.row() + << "\npath: " << selectedPartition->partitionPath() + << "\nfirstSector:" << selectedPartition->firstSector() + << "\nlastSector: " << selectedPartition->lastSector(); + } ); setMouseTracking( true ); }