From df47c61d802f9149a95339515886c4d7ee99fa64 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Sun, 22 Aug 2010 23:45:27 +0200 Subject: Doc: changing template menus to better reflect links from the index page. --- tools/qdoc3/test/qt-html-templates.qdocconf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index a14e696..c70bcaf 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -39,15 +39,17 @@ HTML.postheader = "
\n" \ "
  • Modules
  • \n" \ "
  • Namespaces
  • \n" \ "
  • Global Declarations
  • \n" \ - "
  • QML elements
  • \n" \ + "
  • Licenses and Credits
  • \n" \ " \n" \ " \n" \ "
  • Qt Topics \n" \ " \n" \ "
  • \n" \ -- cgit v0.12 From 4063fedee8c9602c86fe4c2897968b52b3e5286f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 23 Aug 2010 09:58:13 +0200 Subject: Doc: update the documentation of NOTIFY signal to reflect reality Reviewed-by: Thorbjorn --- doc/src/objectmodel/properties.qdoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc index dca332e..3a8e3b4 100644 --- a/doc/src/objectmodel/properties.qdoc +++ b/doc/src/objectmodel/properties.qdoc @@ -79,10 +79,9 @@ mean \e {reset to the context specific cursor}. The \c RESET function must return void and take no parameters. - \o A \c NOTIFY signal is optional. If defined, the signal will be - emitted whenever the value of the property changes. The signal must - take one parameter, which must be of the same type as the property; the - parameter will take the new value of the property. + \o A \c NOTIFY signal is optional. If defined, it should specify one + existing signal in that class that is emitted whenever the value + of the property changes. \o The \c DESIGNABLE attribute indicates whether the property should be visible in the property editor of GUI design tool (e.g., -- cgit v0.12 From 42a9fe3042945937839eda3578655ca091422b28 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 23 Aug 2010 12:16:59 +0200 Subject: Doc: QtConcurrent::run. Make sure the example actually compiles QString::split has overload, and if you want to take the address of a function with overload, you need to cast it. If we really wanted to use QString::split, we would have to do QFuture future = QtConcurrent::run(string, static_cast(&QString::split), QString (", "), QString::KeepEmptyParts, Qt::CaseSensitive); So use QByteArray::split as an example instead Task-number: QTBUG-12897 Reviewed-by: David Boddie --- .../snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp | 10 ++++------ src/corelib/concurrent/qtconcurrentrun.cpp | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp index 8f74461..cea6553 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp @@ -73,16 +73,14 @@ QFuture future = QtConcurrent::run(someFunction, bytearray); QString result = future.result(); //! [3] - //! [4] -// call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread -QString string = ...; -QFuture future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive); +// call 'QList QByteArray::split(char sep) const' in a separate thread +QByteArray bytearray = "hello world; +QFuture > future = QtConcurrent::run(bytearray, &QByteArray::split), ','); ... -QStringList result = future.result(); +QList result = future.result(); //! [4] - //! [5] // call 'void QImage::invertPixels(InvertMode mode)' in a separate thread QImage image = ...; diff --git a/src/corelib/concurrent/qtconcurrentrun.cpp b/src/corelib/concurrent/qtconcurrentrun.cpp index 5a9c755..e80a204 100644 --- a/src/corelib/concurrent/qtconcurrentrun.cpp +++ b/src/corelib/concurrent/qtconcurrentrun.cpp @@ -99,7 +99,7 @@ functions; passing by pointer is useful for calling non-const member functions that modify the instance. - For example, calling QString::split() (a const member function) in a + For example, calling QByteArray::split() (a const member function) in a separate thread is done like this: \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 4 -- cgit v0.12 From a17e68fd66e9232f3d4e74543680b52277578f04 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 23 Aug 2010 12:29:03 +0300 Subject: QWidget metadata has not been set up yet in QWidgetPrivate::init. q->inherits("QGLWidget") gives incorrect result, so use QWidgetPrivate::isGLWidget variable instead. Reviewed-by: Jason Barron --- src/gui/kernel/qwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 8b8641f..3d2bfe2 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1275,9 +1275,9 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) //give potential windows a bigger "pre-initial" size; create_sys() will give them a new size later #ifdef Q_OS_SYMBIAN - if(q->inherits("QGLWidget")) { + if (isGLWidget) { // Don't waste GPU mem for unnecessary large egl surface - data.crect = parentWidget ? QRect(0,0,2,2) : QRect(0,0,2,2); + data.crect = QRect(0,0,2,2); } else { data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,360,640); } -- cgit v0.12 From 1d13522190346b20bf079ae48ce919c9e15a2c7a Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 23 Aug 2010 12:54:49 +0300 Subject: On Symbian QGLWidget::glDraw() must do nothing if widget isn't visible. Otherwise application crashes because rendering to invisible window surface will panic eventually. Reviewed-by: Trond --- src/opengl/qgl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 51187cf..9e69816 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4445,6 +4445,11 @@ void QGLWidget::glDraw() Q_D(QGLWidget); if (!isValid()) return; +#ifdef Q_OS_SYMBIAN + // Crashes on Symbian if trying to render to invisible surfaces + if (!isVisible() && d->glcx->device()->devType() == QInternal::Widget) + return; +#endif makeCurrent(); #ifndef QT_OPENGL_ES if (d->glcx->deviceIsPixmap()) -- cgit v0.12