From: Jens Steinhauser Date: Wed, 26 Nov 2014 17:32:38 +0000 (+0100) Subject: Signal: Save and load signal names as UTF-8 strings. X-Git-Tag: pulseview-0.3.0~404 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f69678269730c1e0ee8319fba774a98043fec0e8;p=pulseview.git Signal: Save and load signal names as UTF-8 strings. This fixes bug #498. --- diff --git a/pv/view/signal.cpp b/pv/view/signal.cpp index afd9ca74..dad8f1ed 100644 --- a/pv/view/signal.cpp +++ b/pv/view/signal.cpp @@ -60,7 +60,7 @@ const char *const ChannelNames[] = { Signal::Signal(pv::Session &session, std::shared_ptr channel) : - Trace(channel->name().c_str()), + Trace(QString::fromUtf8(channel->name().c_str())), session_(session), channel_(channel), name_widget_(NULL), @@ -78,7 +78,7 @@ void Signal::set_name(QString name) // Store the channel name in sigrok::Channel so that it // will end up in the .sr file upon save. - channel_->set_name(name.toStdString()); + channel_->set_name(name.toUtf8().constData()); } bool Signal::enabled() const