| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) |    2  * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions |    5  * modification, are permitted provided that the following conditions | 
|    6  * are met: |    6  * are met: | 
|    7  * 1. Redistributions of source code must retain the above copyright |    7  * 1. Redistributions of source code must retain the above copyright | 
|    8  *    notice, this list of conditions and the following disclaimer. |    8  *    notice, this list of conditions and the following disclaimer. | 
|    9  * 2. Redistributions in binary form must reproduce the above copyright |    9  * 2. Redistributions in binary form must reproduce the above copyright | 
|   10  *    notice, this list of conditions and the following disclaimer in the |   10  *    notice, this list of conditions and the following disclaimer in the | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   53     if (m_isClosed) |   53     if (m_isClosed) | 
|   54         return false; |   54         return false; | 
|   55  |   55  | 
|   56     if (event->target() == m_owner) |   56     if (event->target() == m_owner) | 
|   57         event->setTarget(nullptr); |   57         event->setTarget(nullptr); | 
|   58  |   58  | 
|   59     TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event.ge
     t(), "type", event->type().ascii()); |   59     TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event.ge
     t(), "type", event->type().ascii()); | 
|   60     m_pendingEvents.append(event); |   60     m_pendingEvents.append(event); | 
|   61  |   61  | 
|   62     if (!m_timer.isActive()) |   62     if (!m_timer.isActive()) | 
|   63         m_timer.startOneShot(0); |   63         m_timer.startOneShot(0, FROM_HERE); | 
|   64  |   64  | 
|   65     return true; |   65     return true; | 
|   66 } |   66 } | 
|   67  |   67  | 
|   68 bool GenericEventQueue::cancelEvent(Event* event) |   68 bool GenericEventQueue::cancelEvent(Event* event) | 
|   69 { |   69 { | 
|   70     bool found = m_pendingEvents.contains(event); |   70     bool found = m_pendingEvents.contains(event); | 
|   71  |   71  | 
|   72     if (found) { |   72     if (found) { | 
|   73         m_pendingEvents.remove(m_pendingEvents.find(event)); |   73         m_pendingEvents.remove(m_pendingEvents.find(event)); | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  115     } |  115     } | 
|  116     m_pendingEvents.clear(); |  116     m_pendingEvents.clear(); | 
|  117 } |  117 } | 
|  118  |  118  | 
|  119 bool GenericEventQueue::hasPendingEvents() const |  119 bool GenericEventQueue::hasPendingEvents() const | 
|  120 { |  120 { | 
|  121     return m_pendingEvents.size(); |  121     return m_pendingEvents.size(); | 
|  122 } |  122 } | 
|  123  |  123  | 
|  124 } |  124 } | 
| OLD | NEW |