From 47ebdcb8455191ffafcfcbf0b64878245494cbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 28 Aug 2009 14:30:50 +0200 Subject: Added some information to QGLFramebufferObject documentation Reviewed-by: Trond --- src/opengl/qglframebufferobject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 52363cb..0db5659 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -516,12 +516,12 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At framebuffer objects more portable. \endlist + When using a QPainter to paint to a QGLFramebufferObject you should take + care that the QGLFramebufferObject is created with the CombinedDepthStencil + attachment for QPainter to be able to render correctly. Note that you need to create a QGLFramebufferObject with more than one sample per pixel for primitives to be antialiased when drawing using a - QPainter, unless if the QPainter::HighQualityAntialiasing render hint is - set. The QPainter::HighQualityAntialiasing render hint will enable - antialiasing as long as the \c{GL_ARB_fragment_program} extension is - present. To create a multisample framebuffer object you should use one of + QPainter. To create a multisample framebuffer object you should use one of the constructors that take a QGLFramebufferObject parameter, and set the QGLFramebufferObject::samples() property to a non-zero value. -- cgit v0.12 From 9725ab222ffceb34b93af01631b273404ab784a9 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 28 Aug 2009 15:01:10 +0200 Subject: Doc: Added some information about the clipping applied in paint events. Task-number: 203483 Reviewed-by: Trust Me --- src/gui/kernel/qevent.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 9626193..8d98223 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1080,8 +1080,17 @@ Qt::FocusReason QFocusEvent::reason() const rect() that is the bounding rectangle of that region. Both are provided because many widgets can't make much use of region(), and rect() can be much faster than region().boundingRect(). + + \section1 Automatic Clipping + Painting is clipped to region() during the processing of a paint - event. + event. This clipping is performed by Qt's paint system and is + independent of any clipping that may be applied to a QPainter used to + draw on the paint device. + + As a result, the value returned by QPainter::clipRegion() on + a newly-constructed QPainter will not reflect the clip region that is + used by the paint system. \sa QPainter, QWidget::update(), QWidget::repaint(), QWidget::paintEvent() -- cgit v0.12 From 823601435d9a35fca6e6cf0d897b256c4591061b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 28 Aug 2009 15:04:19 +0200 Subject: Doc: Fixed the build instructions for the OCI plugin (for Oracle 10). Task-number: 234150 Reviewed-by: Trust Me --- doc/src/snippets/code/doc_src_sql-driver.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc index ab6f5e2..6e2a3fb 100644 --- a/doc/src/snippets/code/doc_src_sql-driver.qdoc +++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc @@ -98,7 +98,7 @@ make //! [7] cd $QTDIR/src/plugins/sqldrivers/oci -qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client/" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib" oci.pro +qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client/" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib -lclntsh" oci.pro make //! [7] -- cgit v0.12 From 2be1a64592aee5dfbaf7c9834e188d38c1c602e5 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 28 Aug 2009 14:39:38 +0200 Subject: Fixed runtime warning in tst_QGraphicsProxyWidget::childPos. ungrabKeyboard was called on an item without checking whether it was a keyboard grabber. Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsscene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 7dbc996..7fd471b 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -673,8 +673,8 @@ void QGraphicsScenePrivate::removePopup(QGraphicsWidget *widget, bool itemIsDyin if (focusItem && popupWidgets.isEmpty()) { QFocusEvent event(QEvent::FocusIn, Qt::PopupFocusReason); sendEvent(focusItem, &event); - } else { - ungrabKeyboard((QGraphicsItem *)widget, itemIsDying); + } else if (keyboardGrabberItems.contains(static_cast(widget))) { + ungrabKeyboard(static_cast(widget), itemIsDying); } if (!itemIsDying && widget->isVisible()) { widget->hide(); -- cgit v0.12 From e1ef9b44e1a36afdeea33f9c59fb126d267c3301 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 28 Aug 2009 15:02:25 +0200 Subject: Whitespaces & indentation cleanup in qobject Reviewed-by: trustme --- src/corelib/kernel/qobject.cpp | 49 +++++++++++++++++++++--------------------- src/corelib/kernel/qobject.h | 4 ++-- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8abe28e..e080bd6 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -291,7 +291,7 @@ bool QObjectPrivate::isSender(const QObject *receiver, const char *signal) const QMutexLocker locker(signalSlotLock(q)); if (connectionLists) { if (signal_index < connectionLists->count()) { - const QObjectPrivate::Connection *c = + const QObjectPrivate::Connection *c = connectionLists->at(signal_index).first; while (c) { @@ -360,7 +360,7 @@ void QObjectPrivate::cleanConnectionLists() if (connectionLists->dirty && !connectionLists->inUse) { // remove broken connections for (int signal = -1; signal < connectionLists->count(); ++signal) { - QObjectPrivate::ConnectionList &connectionList = + QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal]; // Set to the last entry in the connection list that was *not* @@ -383,8 +383,8 @@ void QObjectPrivate::cleanConnectionLists() } } - // Correct the connection list's last pointer. As - // conectionList.last could equal last, this could be a noop + // Correct the connection list's last pointer. + // As conectionList.last could equal last, this could be a noop connectionList.last = last; } connectionLists->dirty = false; @@ -906,7 +906,7 @@ QObject::~QObject() if (d->connectionLists) { ++d->connectionLists->inUse; for (int signal = -1; signal < d->connectionLists->count(); ++signal) { - QObjectPrivate::ConnectionList &connectionList = + QObjectPrivate::ConnectionList &connectionList = (*d->connectionLists)[signal]; while (QObjectPrivate::Connection *c = connectionList.first) { @@ -1171,7 +1171,7 @@ static QObject *qChildHelper(const char *objName, const char *inheritsClass, more than one, the first one found is returned. */ QObject* QObject::child(const char *objName, const char *inheritsClass, - bool recursiveSearch) const + bool recursiveSearch) const { Q_D(const QObject); return qChildHelper(objName, inheritsClass, recursiveSearch, d->children); @@ -1390,7 +1390,7 @@ bool QObject::eventFilter(QObject * /* watched */, QEvent * /* event */) /*! If \a block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). - If \a block is false, no such blocking will occur. + If \a block is false, no such blocking will occur. The return value is the previous value of signalsBlocked(). @@ -1682,12 +1682,12 @@ void QObject::killTimer(int id) #ifdef QT3_SUPPORT static void objSearch(QObjectList &result, - const QObjectList &list, - const char *inheritsClass, - bool onlyWidgets, - const char *objName, - QRegExp *rx, - bool recurse) + const QObjectList &list, + const char *inheritsClass, + bool onlyWidgets, + const char *objName, + QRegExp *rx, + bool recurse) { for (int i = 0; i < list.size(); ++i) { QObject *obj = list.at(i); @@ -1757,9 +1757,9 @@ static void objSearch(QObjectList &result, */ QObjectList QObject::queryList(const char *inheritsClass, - const char *objName, - bool regexpMatch, - bool recursiveSearch) const + const char *objName, + bool regexpMatch, + bool recursiveSearch) const { Q_D(const QObject); QObjectList list; @@ -1911,7 +1911,7 @@ QObjectList QObject::queryList(const char *inheritsClass, \internal */ void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re, - const QMetaObject &mo, QList *list) + const QMetaObject &mo, QList *list) { if (!parent || !list) return; @@ -2519,7 +2519,7 @@ int QObject::receivers(const char *signal) const QMutexLocker locker(signalSlotLock(this)); if (d->connectionLists) { if (signal_index < d->connectionLists->count()) { - const QObjectPrivate::Connection *c = + const QObjectPrivate::Connection *c = d->connectionLists->at(signal_index).first; while (c) { receivers += c->receiver ? 1 : 0; @@ -3011,7 +3011,7 @@ bool QMetaObjectPrivate::connect(const QObject *sender, int signal_index, if (type & Qt::UniqueConnection) { QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists; if (connectionLists && connectionLists->count() > signal_index) { - const QObjectPrivate::Connection *c2 = + const QObjectPrivate::Connection *c2 = (*connectionLists)[signal_index].first; while (c2) { @@ -3082,7 +3082,7 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, Same as the QMetaObject::disconnect, but \a signal_index must be the result of QObjectPrivate::signalIndex */ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, - const QObject *receiver, int method_index) + const QObject *receiver, int method_index) { if (!sender) return false; @@ -3105,7 +3105,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, if (signal_index < 0) { // remove from all connection lists for (signal_index = -1; signal_index < connectionLists->count(); ++signal_index) { - QObjectPrivate::Connection *c = + QObjectPrivate::Connection *c = (*connectionLists)[signal_index].first; while (c) { if (c->receiver @@ -3134,7 +3134,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, } } } else if (signal_index < connectionLists->count()) { - QObjectPrivate::Connection *c = + QObjectPrivate::Connection *c = (*connectionLists)[signal_index].first; while (c) { if (c->receiver @@ -3491,7 +3491,8 @@ int QObjectPrivate::signalIndex(const char *signalName) const \a signal_index must be the index returned by QObjectPrivate::signalIndex; */ -bool QObjectPrivate::isSignalConnected(int signal_index) const { +bool QObjectPrivate::isSignalConnected(int signal_index) const +{ if (signal_index < (int)sizeof(connectedSignals) * 8 && !qt_signal_spy_callback_set.signal_begin_callback && !qt_signal_spy_callback_set.signal_end_callback) { @@ -3721,7 +3722,7 @@ void QObject::dumpObjectInfo() qDebug(" signal: %s", signal.signature()); // receivers - const QObjectPrivate::Connection *c = + const QObjectPrivate::Connection *c = d->connectionLists->at(signal_index).first; while (c) { if (!c->receiver) { diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index aa538bc..d85faee 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -381,7 +381,7 @@ inline QList qFindChildren(const QObject *o, const QRegExp &re) #endif // Q_MOC_RUN -template inline const char * qobject_interface_iid() +template inline const char * qobject_interface_iid() { return 0; } template inline T qobject_cast_helper(QObject *object, T) @@ -465,7 +465,7 @@ inline T qobject_cast(const QObject *object) } -template inline const char * qobject_interface_iid() +template inline const char * qobject_interface_iid() { return 0; } #ifndef Q_MOC_RUN -- cgit v0.12 From 5a56da702779d9775f02d17e85c701494036ccf8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 28 Aug 2009 15:15:41 +0200 Subject: doc: Fixed several qdoc errors. --- src/corelib/tools/qscopedpointer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index ef6cc39..5296bae 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -170,7 +170,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn bool QScopedPointer::operator==(const QScopedPointer &other) const + \fn bool QScopedPointer::operator==(const QScopedPointer &other) const Equality operator. Returns true if the scoped pointer \a other is pointing to the same object as this pointer, otherwise returns false. @@ -178,7 +178,7 @@ QT_BEGIN_NAMESPACE /*! - \fn bool QScopedPointer::operator!=(const QScopedPointer &other) const + \fn bool QScopedPointer::operator!=(const QScopedPointer &other) const Inequality operator. Returns true if the scoped pointer \a other is not pointing to the same object as this pointer, otherwise returns false. -- cgit v0.12