Commit d2571e64 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

qt: use QAtomicInt

parent b5bfeaef
...@@ -146,7 +146,7 @@ MessagesDialog::~MessagesDialog() ...@@ -146,7 +146,7 @@ MessagesDialog::~MessagesDialog()
void MessagesDialog::changeVerbosity( int i_verbosity ) void MessagesDialog::changeVerbosity( int i_verbosity )
{ {
atomic_store( &this->verbosity, i_verbosity ); verbosity = i_verbosity;
} }
void MessagesDialog::updateConfig() void MessagesDialog::updateConfig()
...@@ -340,7 +340,7 @@ void MessagesDialog::MsgCallback( void *self, int type, const vlc_log_t *item, ...@@ -340,7 +340,7 @@ void MessagesDialog::MsgCallback( void *self, int type, const vlc_log_t *item,
{ {
MessagesDialog *dialog = (MessagesDialog *)self; MessagesDialog *dialog = (MessagesDialog *)self;
char *str; char *str;
int verbosity = atomic_load( &dialog->verbosity ); int verbosity = dialog->verbosity;
if( verbosity < 0 || verbosity < (type - VLC_MSG_ERR) if( verbosity < 0 || verbosity < (type - VLC_MSG_ERR)
|| unlikely(vasprintf( &str, format, ap ) == -1) ) || unlikely(vasprintf( &str, format, ap ) == -1) )
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "util/singleton.hpp" #include "util/singleton.hpp"
#include "ui/messages_panel.h" #include "ui/messages_panel.h"
#include <stdarg.h> #include <stdarg.h>
#include <vlc_atomic.h>
#include <QMutex> #include <QMutex>
#include <QAtomicInt>
class QPushButton; class QPushButton;
class QTreeWidget; class QTreeWidget;
...@@ -49,7 +49,7 @@ private: ...@@ -49,7 +49,7 @@ private:
void sinkMessage( const MsgEvent * ); void sinkMessage( const MsgEvent * );
bool matchFilter( const QString& ); bool matchFilter( const QString& );
atomic_int verbosity; QAtomicInt verbosity;
static void MsgCallback( void *, int, const vlc_log_t *, const char *, static void MsgCallback( void *, int, const vlc_log_t *, const char *,
va_list ); va_list );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment