polsih bracket
This commit is contained in:
		@@ -7,23 +7,19 @@
 | 
			
		||||
#include <QMutexLocker>
 | 
			
		||||
#include "eventqueue.h"
 | 
			
		||||
 | 
			
		||||
XFEventQueue::XFEventQueue()
 | 
			
		||||
{
 | 
			
		||||
XFEventQueue::XFEventQueue() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
XFEventQueue::~XFEventQueue()
 | 
			
		||||
{
 | 
			
		||||
XFEventQueue::~XFEventQueue() {
 | 
			
		||||
    newEvents_.wakeAll();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool XFEventQueue::empty() const
 | 
			
		||||
{
 | 
			
		||||
bool XFEventQueue::empty() const {
 | 
			
		||||
    return queue_.isEmpty();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool XFEventQueue::push(const XFEvent * pEvent, bool fromISR)
 | 
			
		||||
{
 | 
			
		||||
    (void)fromISR;
 | 
			
		||||
bool XFEventQueue::push(const XFEvent * pEvent, bool fromISR) {
 | 
			
		||||
    (void)fromISR; // Just for don't have the warning
 | 
			
		||||
    QMutexLocker locker(&mutex_);
 | 
			
		||||
    queue_.enqueue(pEvent);
 | 
			
		||||
    // Tell waiting thread(s) there is again an event present
 | 
			
		||||
@@ -31,19 +27,16 @@ bool XFEventQueue::push(const XFEvent * pEvent, bool fromISR)
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const XFEvent * XFEventQueue::front()
 | 
			
		||||
{
 | 
			
		||||
const XFEvent * XFEventQueue::front() {
 | 
			
		||||
    return queue_.front();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void XFEventQueue::pop()
 | 
			
		||||
{
 | 
			
		||||
void XFEventQueue::pop() {
 | 
			
		||||
    QMutexLocker locker(&mutex_);
 | 
			
		||||
    queue_.dequeue();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool XFEventQueue::pend()
 | 
			
		||||
{
 | 
			
		||||
bool XFEventQueue::pend() {
 | 
			
		||||
    QMutexLocker locker(&mutex_);
 | 
			
		||||
    // Wait for new events. Mutex needs to be in lock-state
 | 
			
		||||
    // prior to call wait()!
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user