diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-22 15:37:19 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-22 15:37:19 (GMT) |
commit | d63f3c4c3940b4293c8763d5bfc01ed430075efb (patch) | |
tree | ab648417305e42ffb65f86d272ffccb023a152f1 /src | |
parent | 3597a5b82610752cf95372a5a5f7b33afc8d30b9 (diff) | |
parent | 7a208874ae5d69d2b70b08f03675ef8f0c843a7f (diff) | |
download | Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.zip Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.tar.gz Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.tar.bz2 |
Merge branch '4.5'
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus/qdbusmarshaller.cpp | 13 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 35 | ||||
-rw-r--r-- | src/gui/painting/qpdf.cpp | 9 |
3 files changed, 24 insertions, 33 deletions
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp index bb7fa6b..7207b4c 100644 --- a/src/dbus/qdbusmarshaller.cpp +++ b/src/dbus/qdbusmarshaller.cpp @@ -397,16 +397,6 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg) case DBUS_TYPE_DOUBLE: qIterAppend(&iterator, ba, *signature, arg.constData()); return true; - - case DBUS_TYPE_STRING: - case DBUS_TYPE_OBJECT_PATH: - case DBUS_TYPE_SIGNATURE: { - const QByteArray data = - reinterpret_cast<const QString *>(arg.constData())->toUtf8(); - const char *rawData = data.constData(); - qIterAppend(&iterator, ba, *signature, &rawData); - return true; - } #else case DBUS_TYPE_BYTE: append( qvariant_cast<uchar>(arg) ); @@ -435,6 +425,8 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg) case DBUS_TYPE_DOUBLE: append( arg.toDouble() ); return true; +#endif + case DBUS_TYPE_STRING: append( arg.toString() ); return true; @@ -444,7 +436,6 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg) case DBUS_TYPE_SIGNATURE: append( qvariant_cast<QDBusSignature>(arg) ); return true; -#endif // compound types: case DBUS_TYPE_VARIANT: diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 76138f8..4016563 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3246,48 +3246,43 @@ int QApplication::x11ProcessEvent(XEvent* event) #ifdef ALIEN_DEBUG //qDebug() << "QApplication::x11ProcessEvent:" << event->type; #endif - Time time = 0, userTime = 0; switch (event->type) { case ButtonPress: pressed_window = event->xbutton.window; - userTime = event->xbutton.time; + X11->userTime = event->xbutton.time; // fallthrough intended case ButtonRelease: - time = event->xbutton.time; + X11->time = event->xbutton.time; break; case MotionNotify: - time = event->xmotion.time; + X11->time = event->xmotion.time; break; case XKeyPress: - userTime = event->xkey.time; + X11->userTime = event->xkey.time; // fallthrough intended case XKeyRelease: - time = event->xkey.time; + X11->time = event->xkey.time; break; case PropertyNotify: - time = event->xproperty.time; + X11->time = event->xproperty.time; break; case EnterNotify: case LeaveNotify: - time = event->xcrossing.time; + X11->time = event->xcrossing.time; break; case SelectionClear: - time = event->xselectionclear.time; + X11->time = event->xselectionclear.time; break; default: -#ifndef QT_NO_XFIXES - if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { - XFixesSelectionNotifyEvent *req = - reinterpret_cast<XFixesSelectionNotifyEvent *>(event); - time = req->selection_timestamp; - } -#endif break; } - if (time > X11->time) - X11->time = time; - if (userTime > X11->userTime) - X11->userTime = userTime; +#ifndef QT_NO_XFIXES + if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { + XFixesSelectionNotifyEvent *req = + reinterpret_cast<XFixesSelectionNotifyEvent *>(event); + X11->time = req->selection_timestamp; + } +#endif QETWidget *widget = (QETWidget*)QWidget::find((WId)event->xany.window); diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 178d519..6735ee6 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -968,8 +968,7 @@ QPdfBaseEngine::QPdfBaseEngine(QPdfBaseEnginePrivate &dd, PaintEngineFeatures f) void QPdfBaseEngine::drawPoints (const QPointF *points, int pointCount) { - Q_D(QPdfBaseEngine); - if (!points || !d->hasPen) + if (!points) return; QPainterPath p; @@ -999,6 +998,12 @@ void QPdfBaseEngine::drawRects (const QRectF *rects, int rectCount) return; Q_D(QPdfBaseEngine); + if (d->useAlphaEngine) { + QAlphaPaintEngine::drawRects(rects, rectCount); + if (!continueCall()) + return; + } + if (d->clipEnabled && d->allClipped) return; if (!d->hasPen && !d->hasBrush) |