Try BCValue as smartptr

This commit is contained in:
2026-01-02 01:43:49 +01:00
parent 43f72d1be6
commit fc5ab611bd
11 changed files with 60 additions and 69 deletions

View File

@@ -44,9 +44,6 @@
#include <QPainter>
#include "bcanimateddelegate.h"
#include "bcvalue.h"
BCAnimatedDelegate::BCAnimatedDelegate(const BCValueList& valueList, QTableView* view)
@@ -59,9 +56,9 @@ BCAnimatedDelegate::BCAnimatedDelegate(const BCValueList& valueList, QTableView*
QString BCAnimatedDelegate::displayText(const QVariant& dataValue, const QLocale& locale) const
{
// Wir prüfen, ob im Variant unser Struct steckt
if (dataValue.canConvert<const BCValue*>())
if (dataValue.canConvert<const BCValue&>())
{
const BCValue& bc = *dataValue.value<const BCValue*>();
const BCValue& bc = dataValue.value<const BCValue/>();
//qDebug() << " --- YES: " << bc.label;
// Hier bauen wir den String zusammen, den man sieht,
// wenn KEIN Editor offen ist.