Ignore:
Timestamp:
Nov 30, 2009, 10:40:50 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui/kernel: Don't assert if qt_display_ps() is called from a non GUI thread, it should be safe now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qapplication_pm.cpp

    r353 r364  
    329329void qt_init(QApplicationPrivate *priv, int)
    330330{
    331 
    332331    int argc = priv->argc;
    333332    char **argv = priv->argv;
     
    354353    }
    355354
     355
     356
    356357    // initialize key mapper
    357358    QKeyMapper::changeKeyboard();
     
    389390    QColormap::cleanup();
    390391
    391     if (displayPS) {
    392         WinReleasePS(displayPS);
    393         displayPS = 0;
    394     }
     392    WinReleasePS(displayPS);
     393    displayPS = 0;
    395394
    396395#ifdef QT_LOG_BLITSPEED
     
    411410Q_GUI_EXPORT HPS qt_display_ps()
    412411{
    413     Q_ASSERT(qApp && qApp->thread() == QThread::currentThread());
    414     if (!displayPS)
    415         displayPS = WinGetScreenPS(HWND_DESKTOP);
     412    Q_ASSERT(qApp);
     413    if (!)
     414        ;
    416415    return displayPS;
    417416}
Note: See TracChangeset for help on using the changeset viewer.