Commit 019cf0f5 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixed fqdn in alarm view

parent 51470851
......@@ -234,7 +234,8 @@ void AlarmTreeWidget::m_insert_item(const QString& src, const QStringList &list,
QRegularExpression re("[tango://]*(.*):\\d+/(.*)");
QRegularExpressionMatch ma = re.match(s);
if(ma.capturedTexts().size() > 2) {
s = "[" + ma.capturedTexts().at(1).section('.', 0, 0) + "] " + ma.capturedTexts()[2];
QString s = ma.capturedTexts().at(1);
s.contains('.') ? s = "[" + s.section('.', 0, 0) + "] " + ma.capturedTexts()[2] : s = s;
}
item->setData(AlarmTreeWidgetItem::Device, Qt::UserRole, src.section('/', 0, src.count('/') - 1));
item->setText(AlarmTreeWidgetItem::Device, s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment