X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fpopups%2Fchannels.cpp;h=bffd0dfefbb15e6182b6c4ed54ee5ae9ac3dbd27;hb=35750e4dc619d538f105ed024f3a72b630108234;hp=61a8aee071b382e9fc626a89ec08e2cda7975213;hpb=3cc9ad7b867853315473df611612c562d562ed8a;p=pulseview.git diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index 61a8aee..bffd0df 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -20,6 +20,14 @@ #include +#ifdef _WIN32 +// Windows: Avoid boost/thread namespace pollution (which includes windows.h). +#define NOGDI +#define NORESOURCE +#endif +#include +#include + #include #include #include @@ -28,6 +36,7 @@ #include "channels.hpp" #include +#include #include #include @@ -42,6 +51,7 @@ using std::map; using std::mutex; using std::set; using std::shared_ptr; +using std::unordered_set; using std::vector; using sigrok::Channel; @@ -64,14 +74,13 @@ Channels::Channels(Session &session, QWidget *parent) : // Create the layout setLayout(&layout_); - shared_ptr device = session_.device(); + const shared_ptr device = session_.device()->device(); assert(device); // Collect a set of signals map, shared_ptr > signal_map; - shared_lock lock(session_.signals_mutex()); - const vector< shared_ptr > &sigs(session_.signals()); + const unordered_set< shared_ptr > sigs(session_.signals()); for (const shared_ptr &sig : sigs) signal_map[sig->channel()] = sig; @@ -108,7 +117,7 @@ Channels::Channels(Session &session, QWidget *parent) : } // Create a group - populate_group(NULL, global_sigs); + populate_group(nullptr, global_sigs); // Create the enable/disable all buttons connect(&enable_all_channels_, SIGNAL(clicked()), @@ -198,7 +207,7 @@ QGridLayout* Channels::create_channel_group_grid( check_box_signal_map_[checkbox] = sig; - if(++col >= 8) + if (++col >= 8) col = 0, row++; }