From c8508a0c62efac393d85a13419394a0fb4aea463 Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Tue, 25 Mar 2025 12:26:18 +0100 Subject: [PATCH] Read config TICKET_TEMPLATES: read list- or string-value --- src/ATBAPP/ATBDeviceControllerPlugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index b50e05a..c7a7c56 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -156,7 +156,12 @@ void ATBDeviceControllerPlugin::initTicketTemplateList(const QSettings * setting //qCritical() << " processing TICKET_VARIANT::" << ticketVariant_char; QString configKey = QString("TICKET_TEMPLATES/") + ticketVariant_char; - templateListString = settings->value(configKey, "").toString(); + QVariant raw_templateList = settings->value(configKey, ""); + if (raw_templateList.type() == QVariant::StringList) { + templateListString = raw_templateList.toStringList().join(","); + } else { + templateListString = raw_templateList.toString(); + } // DEBUG //qCritical() << " configKey: " << configKey;