[vlc-commits] qt: use QAtomicInt

Rémi Denis-Courmont git at videolan.org
Thu Jun 25 23:09:28 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 26 00:06:44 2015 +0300| [d2571e643edb0f1cb217805ef8d5ac172d59a864] | committer: Rémi Denis-Courmont

qt: use QAtomicInt

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2571e643edb0f1cb217805ef8d5ac172d59a864
---

 modules/gui/qt4/dialogs/messages.cpp |    4 ++--
 modules/gui/qt4/dialogs/messages.hpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index 21c1110..d23007f 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -146,7 +146,7 @@ MessagesDialog::~MessagesDialog()
 
 void MessagesDialog::changeVerbosity( int i_verbosity )
 {
-    atomic_store( &this->verbosity, i_verbosity );
+    verbosity = i_verbosity;
 }
 
 void MessagesDialog::updateConfig()
@@ -340,7 +340,7 @@ void MessagesDialog::MsgCallback( void *self, int type, const vlc_log_t *item,
 {
     MessagesDialog *dialog = (MessagesDialog *)self;
     char *str;
-    int verbosity = atomic_load( &dialog->verbosity );
+    int verbosity = dialog->verbosity;
 
     if( verbosity < 0 || verbosity < (type - VLC_MSG_ERR)
      || unlikely(vasprintf( &str, format, ap ) == -1) )
diff --git a/modules/gui/qt4/dialogs/messages.hpp b/modules/gui/qt4/dialogs/messages.hpp
index a8d5804..0491a8f 100644
--- a/modules/gui/qt4/dialogs/messages.hpp
+++ b/modules/gui/qt4/dialogs/messages.hpp
@@ -28,8 +28,8 @@
 #include "util/singleton.hpp"
 #include "ui/messages_panel.h"
 #include <stdarg.h>
-#include <vlc_atomic.h>
 #include <QMutex>
+#include <QAtomicInt>
 
 class QPushButton;
 class QTreeWidget;
@@ -49,7 +49,7 @@ private:
     void sinkMessage( const MsgEvent * );
     bool matchFilter( const QString& );
 
-    atomic_int verbosity;
+    QAtomicInt verbosity;
     static void MsgCallback( void *, int, const vlc_log_t *, const char *,
                              va_list );
 



More information about the vlc-commits mailing list