From: Soeren Apel Date: Thu, 6 Sep 2018 07:25:13 +0000 (+0200) Subject: Fix #1270 by replacing insignificant characters before comparing X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c526a8fd78952bedc767f64009e0511b2f940f75;p=pulseview.git Fix #1270 by replacing insignificant characters before comparing --- diff --git a/pv/data/decodesignal.cpp b/pv/data/decodesignal.cpp index 405e06e1..9b40540c 100644 --- a/pv/data/decodesignal.cpp +++ b/pv/data/decodesignal.cpp @@ -303,14 +303,16 @@ void DecodeSignal::auto_assign_signals(const shared_ptr dec) if (ch.assigned_signal) continue; - const QString ch_name = ch.name.toLower(); + QString ch_name = ch.name.toLower(); + ch_name = ch_name.replace(QRegExp("[-_.]"), " "); shared_ptr match; for (shared_ptr s : session_.signalbases()) { if (!s->enabled()) continue; - const QString s_name = s->name().toLower(); + QString s_name = s->name().toLower(); + s_name = s_name.replace(QRegExp("[-_.]"), " "); if (s->logic_data() && ((ch_name.contains(s_name)) || (s_name.contains(ch_name)))) {