X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.cpp;h=9cd712508d463e0711ede42b79d399c219a1e956;hb=df5396800830d41a83a837b95b0f3787571905cf;hp=f8fbe67f79bb1bf2260f7e3749e0044c2b139abd;hpb=68162c2925e3c5a3c7d0b4d3d100184e5c649eba;p=pulseview.git diff --git a/pv/dialogs/connect.cpp b/pv/dialogs/connect.cpp index f8fbe67..9cd7125 100644 --- a/pv/dialogs/connect.cpp +++ b/pv/dialogs/connect.cpp @@ -31,7 +31,8 @@ extern "C" { #include } -using namespace std; +using std::list; +using std::string; extern sr_context *sr_ctx; @@ -163,7 +164,7 @@ void Connect::scan_pressed() BOOST_FOREACH(sr_dev_inst *const sdi, devices) { const string title = DeviceManager::format_device_title(sdi); - QString text(title.c_str()); + QString text = QString::fromUtf8(title.c_str()); if (sdi->probes) { text += QString(" with %1 probes").arg( g_slist_length(sdi->probes)); @@ -176,7 +177,7 @@ void Connect::scan_pressed() } _device_list.setCurrentRow(0); - _button_box.button(QDialogButtonBox::Ok)->setDisabled(false); + _button_box.button(QDialogButtonBox::Ok)->setDisabled(_device_list.count() == 0); } void Connect::device_selected(int index)