summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.qdoc2
-rw-r--r--src/corelib/kernel/qobject.cpp49
-rw-r--r--src/corelib/kernel/qobject.h4
-rw-r--r--src/corelib/tools/qscopedpointer.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
-rw-r--r--src/gui/kernel/qevent.cpp11
-rw-r--r--src/opengl/qglframebufferobject.cpp8
7 files changed, 46 insertions, 36 deletions
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]
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<void*> *list)
+ const QMetaObject &mo, QList<void*> *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<T> qFindChildren(const QObject *o, const QRegExp &re)
#endif // Q_MOC_RUN
-template <class T> inline const char * qobject_interface_iid()
+template <class T> inline const char * qobject_interface_iid()
{ return 0; }
template <class T> inline T qobject_cast_helper(QObject *object, T)
@@ -465,7 +465,7 @@ inline T qobject_cast(const QObject *object)
}
-template <class T> inline const char * qobject_interface_iid()
+template <class T> inline const char * qobject_interface_iid()
{ return 0; }
#ifndef Q_MOC_RUN
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<T> &other) const
+ \fn bool QScopedPointer::operator==(const QScopedPointer<T, Cleanup> &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<T> &other) const
+ \fn bool QScopedPointer::operator!=(const QScopedPointer<T, Cleanup> &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.
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<QGraphicsItem *>(widget))) {
+ ungrabKeyboard(static_cast<QGraphicsItem *>(widget), itemIsDying);
}
if (!itemIsDying && widget->isVisible()) {
widget->hide();
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()
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.