diff options
Diffstat (limited to 'src')
55 files changed, 163 insertions, 80 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index a8de17b..e1fc804 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1289,6 +1289,8 @@ static QString readSymLink(const QString &link) qFree(rdb); CloseHandle(handle); } +#else + Q_UNUSED(link); #endif // Q_OS_WINCE return result; } diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 2117a2d..ddfc44f 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2459,7 +2459,7 @@ QObject *QObject::sender() const { Q_D(const QObject); - QMutexLocker(signalSlotLock(this)); + QMutexLocker locker(signalSlotLock(this)); if (!d->currentSender) return 0; diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h index 175bd99..6ce5cda 100644 --- a/src/gui/effects/qgraphicseffect_p.h +++ b/src/gui/effects/qgraphicseffect_p.h @@ -164,7 +164,7 @@ class QGraphicsOpacityEffectPrivate : public QGraphicsEffectPrivate { Q_DECLARE_PUBLIC(QGraphicsOpacityEffect) public: - QGraphicsOpacityEffectPrivate() : opacity(0.7) {} + QGraphicsOpacityEffectPrivate() : opacity(qreal(0.7)) {} ~QGraphicsOpacityEffectPrivate() {} qreal opacity; diff --git a/src/gui/embedded/qkbd_defaultmap_qws_p.h b/src/gui/embedded/qkbd_defaultmap_qws_p.h index 2903492..a6c2d25 100644 --- a/src/gui/embedded/qkbd_defaultmap_qws_p.h +++ b/src/gui/embedded/qkbd_defaultmap_qws_p.h @@ -53,6 +53,8 @@ // We mean it. // +// no QT_BEGIN_NAMESPACE, since we include it internally... + const QWSKeyboard::Mapping QWSKbPrivate::s_keymap_default[] = { { 1, 0xffff, 0x01000000, 0x00, 0x00, 0x0000 }, { 2, 0x0031, 0x00000031, 0x00, 0x00, 0x0000 }, diff --git a/src/gui/embedded/qkbd_qws_p.h b/src/gui/embedded/qkbd_qws_p.h index df7ce1b..5af8f7c 100644 --- a/src/gui/embedded/qkbd_qws_p.h +++ b/src/gui/embedded/qkbd_qws_p.h @@ -55,6 +55,8 @@ #include <QDataStream> +QT_BEGIN_NAMESPACE + namespace QWSKeyboard { const quint32 FileMagic = 0x514d4150; // 'QMAP' @@ -127,4 +129,6 @@ inline QDataStream &operator<<(QDataStream &ds, const QWSKeyboard::Composing &c) } #endif // QT_NO_DATASTREAM +QT_END_NAMESPACE + #endif // QWSKEYBOARD_H diff --git a/src/gui/embedded/qkbdqnx_qws.cpp b/src/gui/embedded/qkbdqnx_qws.cpp index 4f0b9de..6e147dd 100644 --- a/src/gui/embedded/qkbdqnx_qws.cpp +++ b/src/gui/embedded/qkbdqnx_qws.cpp @@ -49,6 +49,9 @@ #include "qplatformdefs.h" #include <errno.h> + +QT_BEGIN_NAMESPACE + /*! \class QWSQnxKeyboardHandler \preliminary @@ -229,3 +232,5 @@ void QWSQnxKeyboardHandler::socketActivated() // (on QNX, isPress is not set when the key event is repeated). processKeyEvent(unicode, key, modifiers, isPress || isRepeat, isRepeat); } + +QT_END_NAMESPACE diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp index c32e9b5..9f2d3b8 100644 --- a/src/gui/embedded/qlock.cpp +++ b/src/gui/embedded/qlock.cpp @@ -41,10 +41,11 @@ #include "qlock_p.h" -QT_BEGIN_NAMESPACE #ifdef QT_NO_QWS_MULTIPROCESS +QT_BEGIN_NAMESPACE + /* no multiprocess - use a dummy */ QLock::QLock(const QString & /*filename*/, char /*id*/, bool /*create*/) @@ -77,6 +78,8 @@ bool QLock::locked() const return data; } +QT_END_NAMESPACE + #else // QT_NO_QWS_MULTIPROCESS #include "qwssignalhandler_p.h" @@ -110,6 +113,9 @@ union semun { #include <private/qcore_unix_p.h> // overrides QT_OPEN + +QT_BEGIN_NAMESPACE + #define MAX_LOCKS 200 // maximum simultaneous read locks class QLockData @@ -324,6 +330,7 @@ bool QLock::locked() const return (data->count > 0); } +QT_END_NAMESPACE + #endif // QT_NO_QWS_MULTIPROCESS -QT_END_NAMESPACE diff --git a/src/gui/embedded/qmousetslib_qws.h b/src/gui/embedded/qmousetslib_qws.h index 4dd39b5..71672f0 100644 --- a/src/gui/embedded/qmousetslib_qws.h +++ b/src/gui/embedded/qmousetslib_qws.h @@ -73,8 +73,8 @@ protected: }; -QT_END_NAMESPACE #endif // QT_NO_QWS_MOUSE_TSLIB +QT_END_NAMESPACE QT_END_HEADER #endif // QMOUSETSLIB_QWS_H diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h index 275e83f..307c2fd 100644 --- a/src/gui/embedded/qscreen_qws.h +++ b/src/gui/embedded/qscreen_qws.h @@ -50,6 +50,8 @@ #include <QtGui/qimage.h> #include <QtGui/qregion.h> +struct fb_cmap; + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -169,8 +171,6 @@ private: #endif // QT_NO_QWS_CURSOR -struct fb_cmap; - // A (used) chunk of offscreen memory class QPoolEntry diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp index 69e5808..1679ef2 100644 --- a/src/gui/embedded/qscreenlinuxfb_qws.cpp +++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp @@ -291,8 +291,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec) d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDONLY); } - fb_fix_screeninfo finfo; - fb_var_screeninfo vinfo; + ::fb_fix_screeninfo finfo; + ::fb_var_screeninfo vinfo; //####################### // Shut up Valgrind memset(&vinfo, 0, sizeof(vinfo)); @@ -429,7 +429,7 @@ bool QLinuxFbScreen::connect(const QString &displaySpec) if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) { screencols= (vinfo.bits_per_pixel==8) ? 256 : 16; int loopc; - fb_cmap startcmap; + ::fb_cmap startcmap; startcmap.start=0; startcmap.len=screencols; startcmap.red=(unsigned short int *) diff --git a/src/gui/embedded/qscreenlinuxfb_qws.h b/src/gui/embedded/qscreenlinuxfb_qws.h index eb47848..e3c712a 100644 --- a/src/gui/embedded/qscreenlinuxfb_qws.h +++ b/src/gui/embedded/qscreenlinuxfb_qws.h @@ -44,6 +44,11 @@ #include <QtGui/qscreen_qws.h> +struct fb_cmap; +struct fb_var_screeninfo; +struct fb_fix_screeninfo; + + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -70,9 +75,6 @@ public: }; -struct fb_cmap; -struct fb_var_screeninfo; -struct fb_fix_screeninfo; class QLinuxFbScreenPrivate; class Q_GUI_EXPORT QLinuxFbScreen : public QScreen diff --git a/src/gui/embedded/qscreenproxy_qws.cpp b/src/gui/embedded/qscreenproxy_qws.cpp index b566dc0..b87fdd1 100644 --- a/src/gui/embedded/qscreenproxy_qws.cpp +++ b/src/gui/embedded/qscreenproxy_qws.cpp @@ -45,6 +45,7 @@ #include <qregexp.h> +QT_BEGIN_NAMESPACE #ifndef QT_NO_QWS_CURSOR /*! @@ -629,4 +630,6 @@ QRegion QProxyScreen::region() const return QScreen::region(); } +QT_END_NAMESPACE + #endif // QT_NO_QWS_PROXYSCREEN diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp index 70f6d6b..77fe13e 100644 --- a/src/gui/embedded/qscreenqnx_qws.cpp +++ b/src/gui/embedded/qscreenqnx_qws.cpp @@ -44,6 +44,8 @@ #include <gf/gf.h> +QT_BEGIN_NAMESPACE + // This struct holds all the pointers to QNX's internals struct QQnxScreenContext { @@ -445,3 +447,4 @@ void QQnxScreen::exposeRegion(QRegion r, int changing) gf_draw_end(d->context); } +QT_END_NAMESPACE diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp index 2f5f39a..811943a 100644 --- a/src/gui/embedded/qsoundqss_qws.cpp +++ b/src/gui/embedded/qsoundqss_qws.cpp @@ -67,10 +67,10 @@ #include <qdebug.h> -QT_BEGIN_NAMESPACE - extern int errno; +QT_BEGIN_NAMESPACE + #define QT_QWS_SOUND_16BIT 1 // or 0, or undefined for always 0 #define QT_QWS_SOUND_STEREO 1 // or 0, or undefined for always 0 diff --git a/src/gui/embedded/qwsutils_qws.h b/src/gui/embedded/qwsutils_qws.h index 23e0104..fe959ef 100644 --- a/src/gui/embedded/qwsutils_qws.h +++ b/src/gui/embedded/qwsutils_qws.h @@ -44,6 +44,12 @@ #include <QtCore/QIODevice> +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + #ifndef QT_NO_SXE #define QWS_SOCK_BASE QUnixSocket #define QWS_SOCK_SERVER_BASE QUnixSocketServer @@ -58,12 +64,6 @@ class QTcpServer; class QWSSocket; class QWSServerSocket; -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Gui) - /******************************************************************** * * Convenient socket functions diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 11f6f53..bf5d832 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicslayout_p.h b/src/gui/graphicsview/qgraphicslayout_p.h index 2ad853b..0e43b55 100644 --- a/src/gui/graphicsview/qgraphicslayout_p.h +++ b/src/gui/graphicsview/qgraphicslayout_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicslayoutitem_p.h b/src/gui/graphicsview/qgraphicslayoutitem_p.h index 5bda3ca..4d9a8c9 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem_p.h +++ b/src/gui/graphicsview/qgraphicslayoutitem_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h index e2be89c..04fe40a 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget_p.h +++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index 4b8791e..ffef1c7 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h index 27c499d..5cc8449 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h @@ -44,8 +44,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h index d922036..00e5f89 100644 --- a/src/gui/graphicsview/qgraphicssceneindex_p.h +++ b/src/gui/graphicsview/qgraphicssceneindex_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicstransform_p.h b/src/gui/graphicsview/qgraphicstransform_p.h index 2c563e4..c9b95fd 100644 --- a/src/gui/graphicsview/qgraphicstransform_p.h +++ b/src/gui/graphicsview/qgraphicstransform_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index bdf5ddd..a40dfdc 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h index 0e1fe46..1ee79e1 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.h +++ b/src/gui/graphicsview/qgraphicswidget_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp index dbd8d4f..30a7d5d 100644 --- a/src/gui/graphicsview/qsimplex_p.cpp +++ b/src/gui/graphicsview/qsimplex_p.cpp @@ -293,7 +293,7 @@ int QSimplex::findPivotColumn() int QSimplex::pivotRowForColumn(int column) { - qreal min = 999999999999.0; // ### + qreal min = qreal(999999999999.0); // ### int minIndex = -1; for (int i = 1; i < rows; ++i) { diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp index e549900..a6c70a7 100644 --- a/src/gui/image/qpixmap_qws.cpp +++ b/src/gui/image/qpixmap_qws.cpp @@ -48,6 +48,9 @@ #include <private/qdrawhelper_p.h> #include <private/qpixmap_raster_p.h> + +QT_BEGIN_NAMESPACE + QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) { QWidget *widget = QWidget::find(window); @@ -148,3 +151,5 @@ int QPixmap::qwsBytesPerLine() const return 0; } + +QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qwsinputcontext_qws.cpp b/src/gui/inputmethod/qwsinputcontext_qws.cpp index 5d92e1c..371ff1d 100644 --- a/src/gui/inputmethod/qwsinputcontext_qws.cpp +++ b/src/gui/inputmethod/qwsinputcontext_qws.cpp @@ -111,8 +111,8 @@ void QWSInputContext::setFocusWidget( QWidget *w ) void QWSInputContext::widgetDestroyed(QWidget *w) { - if (w == ::activeWidget) - ::activeWidget = 0; + if (w == QT_PREPEND_NAMESPACE(activeWidget)) + QT_PREPEND_NAMESPACE(activeWidget) = 0; QInputContext::widgetDestroyed(w); } @@ -138,13 +138,13 @@ void QWSInputContext::mouseHandler( int x, QMouseEvent *event) QWidget *QWSInputContext::activeWidget() { - return ::activeWidget; + return QT_PREPEND_NAMESPACE(activeWidget); } bool QWSInputContext::isComposing() const { - return ::activeWidget != 0; + return QT_PREPEND_NAMESPACE(activeWidget) != 0; } bool QWSInputContext::translateIMQueryEvent(QWidget *w, const QWSIMQueryEvent *e) @@ -182,8 +182,8 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e) stream >> preedit; stream >> commit; - if (preedit.isEmpty() && ::activeWidget) - w = ::activeWidget; + if (preedit.isEmpty() && QT_PREPEND_NAMESPACE(activeWidget)) + w = QT_PREPEND_NAMESPACE(activeWidget); QInputContext *qic = w->inputContext(); if (!qic) @@ -213,9 +213,9 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e) #endif if (preedit.isEmpty()) - ::activeWidget = 0; + QT_PREPEND_NAMESPACE(activeWidget) = 0; else - ::activeWidget = w; + QT_PREPEND_NAMESPACE(activeWidget) = w; QInputMethodEvent ime(preedit, attrs); diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index f7a7ab0..5340ae9 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -72,6 +72,7 @@ //#include "qwsregionmanager_qws.h" #include "qwindowsystem_qws.h" #include "private/qwindowsystem_p.h" +#include "qdecorationfactory_qws.h" #include "qwsdisplay_qws.h" #include "private/qwsdisplay_qws_p.h" @@ -122,6 +123,8 @@ #endif #endif +QT_BEGIN_NAMESPACE + #ifndef QT_NO_DIRECTPAINTER class QDirectPainter; extern void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type); @@ -161,13 +164,9 @@ int qt_servershmid = -1; bool qws_overrideCursor = false; #ifndef QT_NO_QWS_MANAGER -#include "qdecorationfactory_qws.h" extern Q_GUI_EXPORT QWSServer *qwsServer; -QT_BEGIN_NAMESPACE - -QT_USE_NAMESPACE static QDecoration *qws_decoration = 0; #endif @@ -2371,7 +2370,7 @@ void qt_cleanup() QString QApplicationPrivate::appName() const // get application name { - return ::appName; + return QT_PREPEND_NAMESPACE(appName); } /***************************************************************************** diff --git a/src/gui/kernel/qsound_qws.cpp b/src/gui/kernel/qsound_qws.cpp index fa32dcd..83e9c5e 100644 --- a/src/gui/kernel/qsound_qws.cpp +++ b/src/gui/kernel/qsound_qws.cpp @@ -53,16 +53,16 @@ #include "qhash.h" #include "qfileinfo.h" -#ifdef MEDIA_SERVER #include "qbytearray.h" #include "quuid.h" #include "qdatastream.h" #include "qcopchannel_qws.h" #include "qbuffer.h" + QT_BEGIN_NAMESPACE -QT_USE_NAMESPACE +#ifdef MEDIA_SERVER #define SERVER_CHANNEL "QPE/MediaServer" diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 6ffac2c..7e88e9f 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -971,7 +971,10 @@ struct QWidgetExceptionCleaner /* this cleans up when the constructor throws an exception */ static inline void cleanup(QWidget *that, QWidgetPrivate *d) { -#ifndef QT_NO_EXCEPTIONS +#ifdef QT_NO_EXCEPTIONS + Q_UNUSED(that); + Q_UNUSED(d); +#else QWidgetPrivate::allWidgets->remove(that); if (d->focus_next != that) { if (d->focus_next) diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index e05a502..05dea6e 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -66,9 +66,10 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_QWS_QPF2 -QT_BEGIN_INCLUDE_NAMESPACE #include "qpfutil.cpp" +QT_BEGIN_INCLUDE_NAMESPACE + #if defined(Q_WS_QWS) # include "private/qwscommand_qws_p.h" # include "qwsdisplay_qws.h" diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index adea742..0db6279 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -349,7 +349,7 @@ Q_SIGNALS: protected: virtual void timerEvent(QTimerEvent *event); -private slots: +private Q_SLOTS: void _q_clipboardChanged(); void _q_deleteSelected(); diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index f36a995..059aaf1 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -2002,7 +2002,7 @@ QMenu *QLineEdit::createStandardContextMenu() action = popup->addAction(QLineEdit::tr("Delete")); action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); - connect(action, SIGNAL(triggered()), SLOT(_q_deleteSelected())); + connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); popup->addSeparator(); diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h index 03d4376..cd37ad0 100644 --- a/src/gui/widgets/qlineedit.h +++ b/src/gui/widgets/qlineedit.h @@ -267,7 +267,6 @@ private: Q_DISABLE_COPY(QLineEdit) Q_DECLARE_PRIVATE(QLineEdit) Q_PRIVATE_SLOT(d_func(), void _q_handleWindowActivate()) - Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected()) Q_PRIVATE_SLOT(d_func(), void _q_textEdited(const QString &)) Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged(int, int)) #ifndef QT_NO_COMPLETER diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index cec34da..4218630 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -93,10 +93,6 @@ void QLineEditPrivate::_q_completionHighlighted(QString newText) #endif // QT_NO_COMPLETER -void QLineEditPrivate::_q_clipboardChanged() -{ -} - void QLineEditPrivate::_q_handleWindowActivate() { Q_Q(QLineEdit); @@ -104,10 +100,6 @@ void QLineEditPrivate::_q_handleWindowActivate() control->deselect(); } -void QLineEditPrivate::_q_deleteSelected() -{ -} - void QLineEditPrivate::_q_textEdited(const QString &text) { Q_Q(QLineEdit); diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h index 3521dcb..260bc19 100644 --- a/src/gui/widgets/qlineedit_p.h +++ b/src/gui/widgets/qlineedit_p.h @@ -122,9 +122,7 @@ public: QRect adjustedContentsRect() const; - void _q_clipboardChanged(); void _q_handleWindowActivate(); - void _q_deleteSelected(); void _q_textEdited(const QString &); void _q_cursorPositionChanged(int, int); #ifdef QT_KEYPAD_NAVIGATION diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index f0f425f..4734d22 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -368,7 +368,9 @@ QRect QMenuPrivate::actionRect(QAction *act) const return actionRects.at(index); } +#if defined(Q_WS_MAC) static const qreal MenuFadeTimeInSec = 0.150; +#endif void QMenuPrivate::hideUpToMenuBar() { diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 47a8042..8e28abe 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -607,6 +607,13 @@ static inline void syncNSMenuItemVisiblity(NSMenuItem *menuItem, bool actionVisi [menuItem setHidden:!actionVisibility]; } +static inline void syncNSMenuItemEnabled(NSMenuItem *menuItem, bool enabled) +{ + [menuItem setEnabled:NO]; + [menuItem setEnabled:YES]; + [menuItem setEnabled:enabled]; +} + static inline void syncMenuBarItemsVisiblity(const QMenuBarPrivate::QMacMenuBarPrivate *mac_menubar) { const QList<QMacMenuAction *> &menubarActions = mac_menubar->actionItems; @@ -659,12 +666,12 @@ void qt_mac_set_modal_state_helper_recursive(OSMenuRef menu, OSMenuRef merge, bo // The item should follow what the QAction has. if ([item tag]) { QAction *action = reinterpret_cast<QAction *>([item tag]); - [item setEnabled:action->isEnabled()]; + syncNSMenuItemEnabled(item, action->isEnabled()); } else { - [item setEnabled:YES]; + syncNSMenuItemEnabled(item, YES); } } else { - [item setEnabled:NO]; + syncNSMenuItemEnabled(item, NO); } } } diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index e025876..4ea18f8 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -379,7 +379,7 @@ void QPlainTextDocumentLayout::layoutBlock(const QTextBlock &block) tl->beginLayout(); qreal availableWidth = d->width; if (availableWidth <= 0) { - availableWidth = INT_MAX; // similar to text edit with pageSize.width == 0 + availableWidth = qreal(INT_MAX); // similar to text edit with pageSize.width == 0 } availableWidth -= 2*margin + extraMargin; while (1) { diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index f155770..d903f81 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -52,6 +52,8 @@ #include "qaudiodeviceinfo_alsa_p.h" +QT_BEGIN_NAMESPACE + QAudioDeviceInfoPrivate::QAudioDeviceInfoPrivate(QByteArray dev, QAudio::Mode mode) { handle = 0; @@ -391,4 +393,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultOutputDevice() return QByteArray("default"); } - +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h index ca8179f..5f17b71 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h @@ -65,6 +65,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -109,5 +111,7 @@ private: snd_pcm_hw_params_t *params; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp index 58e7f8b..21b0e9c 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp @@ -55,6 +55,8 @@ #include <mmsystem.h> #include "qaudiodeviceinfo_win32_p.h" +QT_BEGIN_NAMESPACE + // For mingw toolchain mmsystem.h only defines half the defines, so add if needed. #ifndef WAVE_FORMAT_44M08 #define WAVE_FORMAT_44M08 0x00000100 @@ -376,3 +378,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultInputDevice() return QByteArray("default"); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h index 9e0d1ea..f5f575b 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h @@ -63,6 +63,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -105,4 +107,6 @@ private: QList<QAudioFormat::SampleType> typez; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp index 595c9df..0b3d337 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.cpp +++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp @@ -53,6 +53,8 @@ #include <QtCore/qcoreapplication.h> #include "qaudioinput_alsa_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -686,3 +688,4 @@ void InputPrivate::trigger() emit readyRead(); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h index 3f7c85e..400157e 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.h +++ b/src/multimedia/audio/qaudioinput_alsa_p.h @@ -67,6 +67,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class InputPrivate; class QAudioInputPrivate : public QAbstractAudioInput @@ -148,4 +150,6 @@ private: QAudioInputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index 6da80ee..fd6984f 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -53,6 +53,8 @@ #include "qaudioinput_win32_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 static CRITICAL_SECTION waveInCriticalSection; @@ -539,3 +541,4 @@ void InputPrivate::trigger() emit readyRead(); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h index 7f7b823..f14ce96 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.h +++ b/src/multimedia/audio/qaudioinput_win32_p.h @@ -68,6 +68,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class QAudioInputPrivate : public QAbstractAudioInput { Q_OBJECT @@ -149,4 +151,6 @@ private: QAudioInputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp index 5997d31..a5ac177 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp +++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp @@ -53,6 +53,8 @@ #include <QtCore/qcoreapplication.h> #include "qaudiooutput_alsa_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -704,3 +706,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len) return written; } + +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.h b/src/multimedia/audio/qaudiooutput_alsa_p.h index 295927b..068428d 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.h +++ b/src/multimedia/audio/qaudiooutput_alsa_p.h @@ -66,6 +66,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class OutputPrivate; class QAudioOutputPrivate : public QAbstractAudioOutput @@ -156,4 +158,6 @@ private: QAudioOutputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp index bace4a6..99229df 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.cpp +++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp @@ -54,6 +54,8 @@ //#define DEBUG_AUDIO 1 +QT_BEGIN_NAMESPACE + static CRITICAL_SECTION waveOutCriticalSection; QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -502,3 +504,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len) } return written; } + +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h index c6c025f..3906d9d 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.h +++ b/src/multimedia/audio/qaudiooutput_win32_p.h @@ -67,6 +67,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class QAudioOutputPrivate : public QAbstractAudioOutput { Q_OBJECT @@ -149,4 +151,6 @@ private: QAudioOutputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/video/qimagevideobuffer.cpp b/src/multimedia/video/qimagevideobuffer.cpp index d63f145..6af0c41 100644 --- a/src/multimedia/video/qimagevideobuffer.cpp +++ b/src/multimedia/video/qimagevideobuffer.cpp @@ -46,6 +46,8 @@ #include <qimage.h> #include <qvariant.h> +QT_BEGIN_NAMESPACE + class QImageVideoBufferPrivate : public QAbstractVideoBufferPrivate { public: @@ -100,3 +102,5 @@ void QImageVideoBuffer::unmap() d->mapMode = NotMapped; } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 2901c1e..136a078 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1499,7 +1499,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) if (op == Qt::ReplaceClip && !d->hasClipOperations()) op = Qt::IntersectClip; - if (!path.isEmpty() && op == Qt::IntersectClip && (path.hints() & QVectorPath::RectangleHint)) { + if (!path.isEmpty() && op == Qt::IntersectClip && (path.shape() == QVectorPath::RectangleHint)) { const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); QRectF rect(points[0], points[2]); diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 7709c28..ac6ba37 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -7406,7 +7406,9 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri } else { n = doc->createElement(qName); } - n->setLocation(locator->lineNumber(), locator->columnNumber()); + + if (n) + n->setLocation(locator->lineNumber(), locator->columnNumber()); node->appendChild(n); node = n; @@ -7426,7 +7428,7 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri bool QDomHandler::endElement(const QString&, const QString&, const QString&) { - if (node == doc) + if (!node || node == doc) return false; node = node->parent(); |