#include <pv/prop/enum.h>
#include <pv/prop/int.h>
-using namespace boost;
-using namespace std;
+using boost::bind;
+using boost::function;
+using boost::optional;
+using boost::shared_ptr;
+using std::make_pair;
+using std::pair;
+using std::string;
+using std::vector;
namespace pv {
namespace prop {
if (sr_config_list(_sdi->driver, _sdi, NULL, key, &gvar_list) != SR_OK)
gvar_list = NULL;
- const QString name(info->name);
+ const QString name = QString::fromUtf8(info->name);
switch(key)
{
QString s;
if (g_variant_is_of_type(gvar, G_VARIANT_TYPE("s")))
- s = QString(g_variant_get_string(gvar, NULL));
+ s = QString::fromUtf8(g_variant_get_string(gvar, NULL));
else
{
gchar *const text = g_variant_print(gvar, FALSE);
- s = QString(text);
+ s = QString::fromUtf8(text);
g_free(text);
}
{
uint64_t p, q;
g_variant_get(gvar, "(tt)", &p, &q);
- return QString(sr_period_string(p * q));
+ return QString::fromUtf8(sr_period_string(p * q));
}
QString DeviceOptions::print_vdiv(GVariant *const gvar)
{
uint64_t p, q;
g_variant_get(gvar, "(tt)", &p, &q);
- return QString(sr_voltage_string(p, q));
+ return QString::fromUtf8(sr_voltage_string(p, q));
}
QString DeviceOptions::print_voltage_threshold(GVariant *const gvar)
char buf[64];
g_variant_get(gvar, "(dd)", &lo, &hi);
snprintf(buf, sizeof(buf), "L<%.1fV H>%.1fV", lo, hi);
- return QString(buf);
+ return QString::fromUtf8(buf);
}
} // binding