Changeset 1006


Ignore:
Timestamp:
Aug 19, 2011, 12:27:58 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: Export platform-specific qDebug() helpers.

This lets them be used in application code.

Location:
trunk/src/gui/kernel
Files:
2 edited

Legend:

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

    r938 r1006  
    26392639 *****************************************************************************/
    26402640
    2641 QDebug operator<<(QDebug debug, const QDebugHWND &d)
    2642 {
    2643     debug << qDebugFmtHex(d.hwnd) << qt_widget_from_hwnd(d.hwnd);
     2641Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QDebugHWND &d)
     2642{
     2643    QETWidget *w = (QETWidget *)qt_widget_from_hwnd(d.hwnd);
     2644    debug << qDebugFmtHex(d.hwnd) << w;
     2645    if (w && w->internalWinId() != w->frameWinId()) {
     2646        if (w->internalWinId() == d.hwnd)
     2647            debug.nospace() << "(frame " << qDebugFmtHex(w->frameWinId()) << ")";
     2648        else if (w->frameWinId() == d.hwnd)
     2649            debug.nospace() << "(client " << qDebugFmtHex(w->internalWinId()) << ")";
     2650    }
    26442651    return debug;
    26452652}
    26462653
    2647 QDebug operator<<(QDebug debug, const QDebugHRGN &d)
     2654QDebug operator<<(QDebug debug, const QDebugHRGN &d)
    26482655{
    26492656    RGNRECT ctl;
     
    26662673}
    26672674
    2668 QDebug operator<<(QDebug debug, const RECTL &rcl)
     2675QDebug operator<<(QDebug debug, const RECTL &rcl)
    26692676{
    26702677    debug.nospace() << "RECTL(" << rcl.xLeft << "," << rcl.yBottom
     
    26802687#define myDefFlagCut(var,fl,varstr,pos) myDefFlagEx(var,fl,varstr,#fl + pos)
    26812688
    2682 QDebug operator<<(QDebug debug, const SWP &swp)
     2689QDebug operator<<(QDebug debug, const SWP &swp)
    26832690{
    26842691    QByteArray fl;
     
    27072714}
    27082715
    2709 QDebug operator<<(QDebug debug, const QMSG &qmsg)
     2716QDebug operator<<(QDebug debug, const QMSG &qmsg)
    27102717{
    27112718    #define myCaseBegin(a) case a: { \
  • trunk/src/gui/kernel/qwindowdefs_pm.h

    r750 r1006  
    111111struct QDebugHWND { HWND hwnd; };
    112112inline QDebugHWND qDebugHWND(HWND hwnd) { QDebugHWND d = { hwnd }; return d; }
    113 QDebug operator<<(QDebug debug, const QDebugHWND &d);
     113QDebug operator<<(QDebug debug, const QDebugHWND &d);
    114114
    115115struct QDebugHRGN { HRGN hrgn; };
    116116inline QDebugHRGN qDebugHRGN(HRGN hrgn) { QDebugHRGN d = { hrgn }; return d; }
    117 QDebug operator<<(QDebug debug, const QDebugHRGN &d);
     117QDebug operator<<(QDebug debug, const QDebugHRGN &d);
    118118
    119119// the following declarations require OS/2 types not defined here,
     
    121121#if defined(QT_OS2_H)
    122122
    123 QDebug operator<<(QDebug debug, const RECTL &rcl);
    124 QDebug operator<<(QDebug debug, const SWP &swp);
    125 QDebug operator<<(QDebug debug, const QMSG &qmsg);
     123QDebug operator<<(QDebug debug, const RECTL &rcl);
     124QDebug operator<<(QDebug debug, const SWP &swp);
     125QDebug operator<<(QDebug debug, const QMSG &qmsg);
    126126
    127127#endif // defined(QT_OS2_H)
Note: See TracChangeset for help on using the changeset viewer.