Ignore:
Timestamp:
Apr 2, 2006, 12:41:47 AM (19 years ago)
Author:
dmik
Message:

Implemented the OS/2 version of the QSessionManager class (see ticket:15 for more details); QT_NO_SESSIONMANAGER is no more defined by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/qeventloop_pm.cpp

    r8 r77  
    5151extern bool qt_pmEventFilter( QMSG* msg, MRESULT &result );
    5252
     53#if !defined (QT_NO_SESSIONMANAGER)
     54extern bool qt_app_canQuit(); // defined in qapplication_pm.cpp
     55#endif
     56
    5357static HAB qt_gui_hab = 0;
    5458static HMQ qt_gui_queue = 0;
    55 //@@TODO (dmik): later
    56 //// Simpler timers are needed when Qt does not have the event loop,
    57 //// such as for plugins.
     59
     60/// @todo (dmik) later
     61//  Simpler timers are needed when Qt does not have the event loop,
     62//  such as for plugins.
    5863//#ifndef Q_OS_TEMP
    5964//Q_EXPORT bool qt_win_use_simple_timers = TRUE;
     
    433438// recursive mutex to serialize access to socket notifier data
    434439static QMutex ss_mutex( TRUE );
    435 // flag to indicate a presence of sockets to do select() (we use QSemaphore
     440// flag to indicate the presence of sockets to do select() (we use QSemaphore
    436441// instead of QWaitCondition because we need the "level-triggered" semantics,
    437 // the "edge-triggered" one can produce deadlocks)
     442// the "edge-triggered" semantics can produce deadlocks)
    438443static QSemaphore ss_flag( 1 );
    439444
     
    786791            locker.mutex()->unlock();
    787792#endif // QT_THREAD_SUPPORT
    788             if ( !WinGetMsg( 0, &msg, 0, 0, 0 ) ) {
     793            if ( !WinGetMsg( 0, &msg, 0, 0, 0 ) ) {     // WM_QUIT received
     794#if !defined (QT_NO_SESSIONMANAGER)
     795                if ( qt_app_canQuit() ) {
     796#endif                   
    789797#ifdef QT_THREAD_SUPPORT
    790                 locker.mutex()->lock();
    791 #endif // QT_THREAD_SUPPORT
    792                 exit( 0 );                              // WM_QUIT received
    793                 return FALSE;
     798                    locker.mutex()->lock();
     799#endif // QT_THREAD_SUPPORT
     800                    exit( 0 );
     801                    return FALSE;
     802#if !defined (QT_NO_SESSIONMANAGER)
     803                } else {
     804                    WinCancelShutdown( d->hmq, FALSE );
     805                }
     806#endif                   
    794807            }
    795808#ifdef QT_THREAD_SUPPORT
Note: See TracChangeset for help on using the changeset viewer.