@@ -537,7 +537,7 @@ void DecompilerWidget::showVariableTooltip(QHelpEvent *event, RzCodeAnnotation *
537537 } else {
538538 // TODO: track the value of the synthetic/untracked variables and show it in the tooltip.
539539 tooltipContent = QString (" <b>%1</b><br><i>(Synthetic/Untracked Variable)</i>" )
540- .arg (QString::fromUtf8 (annotation->variable .name ));
540+ .arg (QString::fromUtf8 (annotation->variable .name ));
541541 }
542542 QToolTip::showText (event->globalPos (), tooltipContent, ui->textEdit );
543543}
@@ -563,15 +563,19 @@ QString DecompilerWidget::formatVarValue(RzAnalysisVar *var)
563563 if (stackAddr != 0 ) {
564564 ut64 pointedAddr = 0 ;
565565 int ptrSize = core->analysis ->bits / 8 ;
566- int pointedAddr_state = rz_io_read_at_mapped (core->io , stackAddr, (ut8*)&pointedAddr, ptrSize);
566+ int pointedAddr_state =
567+ rz_io_read_at_mapped (core->io , stackAddr, (ut8 *)&pointedAddr, ptrSize);
567568 if (pointedAddr_state > 0 && pointedAddr != 0 ) {
568569 ut8 buf[256 ];
569- int str_state = rz_io_read_at_mapped (core->io , pointedAddr, buf, sizeof (buf) - 1 );
570+ int str_state =
571+ rz_io_read_at_mapped (core->io , pointedAddr, buf, sizeof (buf) - 1 );
570572 if (str_state != 0 ) {
571- buf[sizeof (buf)- 1 ] = 0 ;
573+ buf[sizeof (buf) - 1 ] = 0 ;
572574 if (isprint (buf[0 ]) || buf[0 ] == ' \0 ' ) {
573- displayValue += QString (" <br><font color='#f1c40f'>value: \" %1\" </font>" )
574- .arg (QString::fromUtf8 (reinterpret_cast <const char *>(buf)));
575+ displayValue +=
576+ QString (" <br><font color='#f1c40f'>value: \" %1\" </font>" )
577+ .arg (QString::fromUtf8 (
578+ reinterpret_cast <const char *>(buf)));
575579 }
576580 }
577581 }
@@ -580,23 +584,23 @@ QString DecompilerWidget::formatVarValue(RzAnalysisVar *var)
580584 }
581585 rz_mem_free (rawVal);
582586 return QString (" <b>%1</b> (%2)<br>Value: %3" )
583- .arg (QString::fromUtf8 (var->name ), typeStr, displayValue);
587+ .arg (QString::fromUtf8 (var->name ), typeStr, displayValue);
584588}
585589
586590bool DecompilerWidget::eventFilter (QObject *obj, QEvent *event)
587591{
588- if (event->type () == QEvent::ToolTip &&
589- Config ()->getShowVarTooltips () &&
590- (obj == ui->textEdit || obj == ui->textEdit ->viewport ())) {
592+ if (event->type () == QEvent::ToolTip && Config ()->getShowVarTooltips ()
593+ && (obj == ui->textEdit || obj == ui->textEdit ->viewport ())) {
591594 QHelpEvent *helpEvent = static_cast <QHelpEvent *>(event);
592595 QTextCursor cursor = ui->textEdit ->cursorForPosition (helpEvent->pos ());
593596 size_t pos = cursor.position ();
594597 void *iter;
595- rz_vector_foreach (&this ->code ->annotations , iter) {
598+ rz_vector_foreach (&this ->code ->annotations , iter)
599+ {
596600 RzCodeAnnotation *annotation = (RzCodeAnnotation *)iter;
597601 if (pos >= annotation->start && pos < annotation->end ) {
598- if (annotation->type == RZ_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE ||
599- annotation->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER) {
602+ if (annotation->type == RZ_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE
603+ || annotation->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER) {
600604 showVariableTooltip (helpEvent, annotation);
601605 return true ;
602606 }
0 commit comments