Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/styles/qwindowsstyle.cpp

    r7 r8  
    8585enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight };
    8686
     87#ifndef QT_NO_MENUDATA
    8788// A friendly class providing access to QMenuData's protected member.
    8889class FriendlyMenuData : public QMenuData
     
    9091    friend class QWindowsStyle;
    9192};
     93#endif
    9294
    9395// Private class
     
    158160        break;
    159161    case QEvent::KeyRelease:
     162#ifndef QT_NO_MENUDATA
    160163        if (((QKeyEvent*)e)->key() == Key_Alt) {
    161164            widget = widget->topLevelWidget();
     
    172175            }
    173176        }
     177#endif
    174178        break;
    175179    case QEvent::FocusIn:
    176180    case QEvent::FocusOut:
     181#ifndef QT_NO_MENUBAR
    177182        {
    178183            // Menubars toggle based on focus
     
    181186                menuBarTimer = menuBar->startTimer(0);
    182187        }
     188#endif
    183189        break;
    184190    case QEvent::Close:
     
    188194        break;
    189195    case QEvent::Timer:
     196#ifndef QT_NO_MENUBAR
    190197        {
    191198            QMenuBar *menuBar = ::qt_cast<QMenuBar*>(o);
     
    198205            }
    199206        }
     207#endif
    200208        break;
    201209    default:
     
    841849            const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
    842850            QMenuItem *mi = opt.menuItem();
     851           
     852            // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we
     853            // must erase areas not covered by menu items (this is requested by
     854            // QPopupMenu using 0 as the menu item argument).
     855            // [Win32 version feels ok without this, because it doesn't actually
     856            // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always
     857            // erases the background before WM_PAINT and after every resize].
     858#if !defined (Q_WS_PM)
    843859            if ( !mi )
    844860                break;
    845 
     861#endif
     862           
    846863            int tab = opt.tabWidth();
    847864            int maxpmw = opt.maxIconWidth();
Note: See TracChangeset for help on using the changeset viewer.