diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-10 18:23:46 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-10 18:23:46 +0100 | 
| commit | 26fa71fc2fdef236d4f31ab2501ea041178071e6 (patch) | |
| tree | 580f1444d0ef157d156548840e88fb3a5be5dc6d /cv | |
| parent | 2eac169518ab341d1b99b1ac6c2a88ab4e850ce5 (diff) | |
cv: fix evil typo
the "> 0" comparison was comparing the enum, not the function retval.
Diffstat (limited to 'cv')
| -rw-r--r-- | cv/video-property-page.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/cv/video-property-page.cpp b/cv/video-property-page.cpp index f7126a85..8589f11a 100644 --- a/cv/video-property-page.cpp +++ b/cv/video-property-page.cpp @@ -49,7 +49,9 @@ struct prop_settings_worker final : QThread  prop_settings_worker::prop_settings_worker(int idx)  { -    if (cap.get(cv::CAP_PROP_SETTINGS) < 0) +    int ret = cap.get(cv::CAP_PROP_SETTINGS); + +    if (ret < 0)          run_in_thread_async(qApp, []() {              QMessageBox msg;              msg.setTextFormat(Qt::RichText); @@ -63,7 +65,7 @@ prop_settings_worker::prop_settings_worker(int idx)              msg.setIcon(QMessageBox::Warning);              msg.exec();          }); -    else if (cap.get(cv::CAP_PROP_SETTINGS > 0)) +    else if (ret > 0)          run_in_thread_async(qApp, []() {              QMessageBox::warning(nullptr,                                   "Camera properties", | 
