pidgin/quail/quail-redux

7f0bee37a580
Parents 4b9959ebe8ea
Children 3503aaf3ec37
Use atomic for the socket notifier id, part 2
--- a/src/QuailEventLoop.cpp Wed Feb 26 18:14:19 2014 +0000
+++ b/src/QuailEventLoop.cpp Wed Feb 26 18:21:29 2014 +0000
@@ -32,7 +32,7 @@
static quail_event_loop* quail_app = 0;
quail_event_loop::quail_event_loop(QObject * parent)
- : QObject(parent), nextSourceId(0)
+ : QObject(parent), m_next_socket_id(0)
{
quail_app = this;
}
@@ -132,7 +132,7 @@
if (!bWrite && !bRead)
qWarning() << "quail_event_loop::quail_input_add:Unknown QSocketNotifier type";
- guint sourceId = (quint32)nextSourceId.fetchAndAddRelaxed(1);
+ guint sourceId = (quint32)m_next_socket_id.fetchAndAddRelaxed(1);
notifier->setProperty("sourceId", sourceId);
m_io.insert(sourceId, new QQuailInputNotifier(fd
, cond
--- a/src/QuailEventLoop.h Wed Feb 26 18:14:19 2014 +0000
+++ b/src/QuailEventLoop.h Wed Feb 26 18:21:29 2014 +0000
@@ -93,7 +93,7 @@
private:
QMap<int, QQuailTimer*> m_timers;
QMap<guint, QQuailInputNotifier*> m_io;
- QAtomicInt nextSourceId;
+ QAtomicInt m_next_socket_id;
QMutex m_timer_mutex;
};