diff options
22 files changed, 208 insertions, 68 deletions
diff --git a/.qmake.conf b/.qmake.conf index a0d132328a..bb65e47d07 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,5 +2,5 @@ load(qt_build_config) CONFIG += qt_example_installs CONFIG += warning_clean -MODULE_VERSION = 5.2.1 +MODULE_VERSION = 5.2.2 diff --git a/examples/quick/models/abstractitemmodel/model.cpp b/examples/quick/models/abstractitemmodel/model.cpp index 724e2ed779..30eff6a7c0 100644 --- a/examples/quick/models/abstractitemmodel/model.cpp +++ b/examples/quick/models/abstractitemmodel/model.cpp @@ -67,6 +67,7 @@ void AnimalModel::addAnimal(const Animal &animal) } int AnimalModel::rowCount(const QModelIndex & parent) const { + Q_UNUSED(parent); return m_animals.count(); } diff --git a/src/qml/debugger/qqmlprofilerservice.cpp b/src/qml/debugger/qqmlprofilerservice.cpp index 3c066bd380..af2aea21ae 100644 --- a/src/qml/debugger/qqmlprofilerservice.cpp +++ b/src/qml/debugger/qqmlprofilerservice.cpp @@ -178,7 +178,7 @@ void QQmlProfilerService::sendProfilingData() bool QQmlProfilerService::startProfilingImpl() { bool success = false; - if (!profilingEnabled()) { + if (QQmlDebugService::isDebuggingEnabled() && !profilingEnabled()) { setProfilingEnabled(true); sendStartedProfilingMessageImpl(); success = true; diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 539bc5ddd6..ac18e56868 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -109,21 +109,28 @@ quintptr getStackLimit() # else void* stackBottom = 0; pthread_attr_t attr; - pthread_getattr_np(pthread_self(), &attr); - size_t stackSize = 0; - pthread_attr_getstack(&attr, &stackBottom, &stackSize); - pthread_attr_destroy(&attr); - -# if defined(Q_OS_ANDROID) - // Bionic pretends that the main thread has a tiny stack; work around it - if (gettid() == getpid()) { - rlimit limit; - getrlimit(RLIMIT_STACK, &limit); - stackBottom = reinterpret_cast<void*>(reinterpret_cast<quintptr>(stackBottom) + stackSize - limit.rlim_cur); + if (pthread_getattr_np(pthread_self(), &attr) == 0) { + size_t stackSize = 0; + pthread_attr_getstack(&attr, &stackBottom, &stackSize); + pthread_attr_destroy(&attr); + +# if defined(Q_OS_ANDROID) + // Bionic pretends that the main thread has a tiny stack; work around it + if (gettid() == getpid()) { + rlimit limit; + getrlimit(RLIMIT_STACK, &limit); + stackBottom = reinterpret_cast<void*>(reinterpret_cast<quintptr>(stackBottom) + stackSize - limit.rlim_cur); + } +# endif + + stackLimit = reinterpret_cast<quintptr>(stackBottom); + } else { + int dummy; + // this is inexact, as part of the stack is used when being called here, + // but let's simply default to 1MB from where the stack is right now + stackLimit = reinterpret_cast<qintptr>(&dummy) - 1024*1024; } -# endif - stackLimit = reinterpret_cast<quintptr>(stackBottom); # endif // This is wrong. StackLimit is the currently committed stack size, not the real end. // only way to get that limit is apparently by using VirtualQuery (Yuck) diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp index f67efaffb9..9923c8834c 100644 --- a/src/qml/jsruntime/qv4mm.cpp +++ b/src/qml/jsruntime/qv4mm.cpp @@ -234,12 +234,17 @@ MemoryManager::MemoryManager() # else void* stackBottom = 0; pthread_attr_t attr; - pthread_getattr_np(pthread_self(), &attr); - size_t stackSize = 0; - pthread_attr_getstack(&attr, &stackBottom, &stackSize); - pthread_attr_destroy(&attr); + if (pthread_getattr_np(pthread_self(), &attr) == 0) { + size_t stackSize = 0; + pthread_attr_getstack(&attr, &stackBottom, &stackSize); + pthread_attr_destroy(&attr); - m_d->stackTop = static_cast<quintptr *>(stackBottom) + stackSize/sizeof(quintptr); + m_d->stackTop = static_cast<quintptr *>(stackBottom) + stackSize/sizeof(quintptr); + } else { + // can't scan the native stack so have to rely on exact gc + m_d->stackTop = 0; + m_d->exactGC = true; + } # endif #elif OS(WINCE) if (false && g_stackBase) { diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 0409b92e89..67b7e789bd 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1432,7 +1432,9 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx) const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); - if (QQmlProfilerService::startProfiling()) { + if (!QQmlDebugService::isDebuggingEnabled()) { + logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX."); + } else if (QQmlProfilerService::startProfiling()) { QV8ProfilerService::instance()->startProfiling(title); logger.debug("Profiling started."); diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index c210c21288..bb6eec3706 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -365,7 +365,8 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD view->resize(200, 200); } view->show(); - QTest::qWaitForWindowExposed(view); + view->requestActivate(); + QTest::qWaitForWindowActive(view); if (view->isExposed()) QTestRootObject::instance()->setWindowShown(true); if (!QTestRootObject::instance()->hasQuit && QTestRootObject::instance()->hasTestCase()) diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc index abef6b765b..f1e13e127c 100644 --- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc +++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc @@ -110,20 +110,7 @@ by the other approaches. A QAbstractItemModel can also automatically notify a QML view when the model data changes. The roles of a QAbstractItemModel subclass can be exposed to QML by -reimplementing QAbstractItemModel::roleNames(). The default role names -set by Qt are: - -\table -\header -\li Qt Role -\li QML Role Name -\row -\li Qt::DisplayRole -\li display -\row -\li Qt::DecorationRole -\li decoration -\endtable +reimplementing QAbstractItemModel::roleNames(). Here is an application with a QAbstractListModel subclass named \c AnimalModel, which exposes the \e type and \e sizes roles. It reimplements diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 9f2f90a2a7..06749be819 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -892,12 +892,12 @@ void QQuickListViewPrivate::createHighlight() highlightWidthAnimator = new QSmoothedAnimation; highlightWidthAnimator->velocity = highlightResizeVelocity; highlightWidthAnimator->userDuration = highlightResizeDuration; - highlightWidthAnimator->target = QQmlProperty(item, "width"); + highlightWidthAnimator->target = QQmlProperty(item, QStringLiteral("width")); highlightHeightAnimator = new QSmoothedAnimation; highlightHeightAnimator->velocity = highlightResizeVelocity; highlightHeightAnimator->userDuration = highlightResizeDuration; - highlightHeightAnimator->target = QQmlProperty(item, "height"); + highlightHeightAnimator->target = QQmlProperty(item, QStringLiteral("height")); highlight = newHighlight; changed = true; diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index b1464a26cc..e9d883f248 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -826,6 +826,9 @@ static void qsg_wipeBuffer(Buffer *buffer, QOpenGLFunctions *funcs) static void qsg_wipeBatch(Batch *batch, QOpenGLFunctions *funcs) { qsg_wipeBuffer(&batch->vbo, funcs); +#ifdef QSG_SEPARATE_INDEX_BUFFER + qsg_wipeBuffer(&batch->ibo, funcs); +#endif delete batch; } @@ -878,12 +881,13 @@ void Renderer::map(Buffer *buffer, int byteSize) } } -void Renderer::unmap(Buffer *buffer) +void Renderer::unmap(Buffer *buffer, bool isIndexBuf) { if (buffer->id == 0) glGenBuffers(1, &buffer->id); - glBindBuffer(GL_ARRAY_BUFFER, buffer->id); - glBufferData(GL_ARRAY_BUFFER, buffer->size, buffer->data, m_bufferStrategy); + GLenum target = isIndexBuf ? GL_ELEMENT_ARRAY_BUFFER : GL_ARRAY_BUFFER; + glBindBuffer(target, buffer->id); + glBufferData(target, buffer->size, buffer->data, m_bufferStrategy); } BatchRootInfo *Renderer::batchRootInfo(Node *node) @@ -1754,10 +1758,19 @@ void Renderer::uploadBatch(Batch *b) non-merged. */ int bufferSize = b->vertexCount * g->sizeOfVertex(); - if (b->merged) - bufferSize += b->vertexCount * sizeof(float) + b->indexCount * sizeof(quint16); - else - bufferSize += unmergedIndexSize; + int ibufferSize = 0; + if (b->merged) { + bufferSize += b->vertexCount * sizeof(float); + ibufferSize = b->indexCount * sizeof(quint16); + } else { + ibufferSize = unmergedIndexSize; + } + +#ifdef QSG_SEPARATE_INDEX_BUFFER + map(&b->ibo, ibufferSize); +#else + bufferSize += ibufferSize; +#endif map(&b->vbo, bufferSize); if (Q_UNLIKELY(debug_upload)) qDebug() << " - batch" << b << " first:" << b->first << " root:" @@ -1767,21 +1780,35 @@ void Renderer::uploadBatch(Batch *b) if (b->merged) { char *vertexData = b->vbo.data; char *zData = vertexData + b->vertexCount * g->sizeOfVertex(); +#ifdef QSG_SEPARATE_INDEX_BUFFER + char *indexData = b->ibo.data; +#else char *indexData = zData + b->vertexCount * sizeof(float); +#endif quint16 iOffset = 0; e = b->first; int verticesInSet = 0; int indicesInSet = 0; b->drawSets.reset(); - b->drawSets << DrawSet(0, zData - vertexData, indexData - vertexData); +#ifdef QSG_SEPARATE_INDEX_BUFFER + int drawSetIndices = 0; +#else + int drawSetIndices = indexData - vertexData; +#endif + b->drawSets << DrawSet(0, zData - vertexData, drawSetIndices); while (e) { verticesInSet += e->node->geometry()->vertexCount(); if (verticesInSet > 0xffff) { b->drawSets.last().indexCount = indicesInSet; +#ifdef QSG_SEPARATE_INDEX_BUFFER + drawSetIndices = indexData - b->ibo.data; +#else + drawSetIndices = indexData - b->vbo.data; +#endif b->drawSets << DrawSet(vertexData - b->vbo.data, zData - b->vbo.data, - indexData - b->vbo.data); + drawSetIndices); iOffset = 0; verticesInSet = e->node->geometry()->vertexCount(); indicesInSet = 0; @@ -1792,7 +1819,11 @@ void Renderer::uploadBatch(Batch *b) b->drawSets.last().indexCount = indicesInSet; } else { char *vboData = b->vbo.data; +#ifdef QSG_SEPARATE_INDEX_BUFFER + char *iboData = b->ibo.data; +#else char *iboData = vboData + b->vertexCount * g->sizeOfVertex(); +#endif Element *e = b->first; while (e) { QSGGeometry *g = e->node->geometry(); @@ -1859,6 +1890,9 @@ void Renderer::uploadBatch(Batch *b) } unmap(&b->vbo); +#ifdef QSG_SEPARATE_INDEX_BUFFER + unmap(&b->ibo, true); +#endif if (Q_UNLIKELY(debug_upload)) qDebug() << " --- vertex/index buffers unmapped, batch upload completed..."; @@ -1983,11 +2017,16 @@ void Renderer::renderMergedBatch(const Batch *batch) glBindBuffer(GL_ARRAY_BUFFER, batch->vbo.id); char *indexBase = 0; +#ifdef QSG_SEPARATE_INDEX_BUFFER + const Buffer *indexBuf = &batch->ibo; +#else + const Buffer *indexBuf = &batch->vbo; +#endif if (m_context->hasBrokenIndexBufferObjects()) { - indexBase = batch->vbo.data; + indexBase = indexBuf->data; glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } else { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, batch->vbo.id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuf->id); } @@ -2057,12 +2096,17 @@ void Renderer::renderUnmergedBatch(const Batch *batch) glBindBuffer(GL_ARRAY_BUFFER, batch->vbo.id); char *indexBase = 0; +#ifdef QSG_SEPARATE_INDEX_BUFFER + const Buffer *indexBuf = &batch->ibo; +#else + const Buffer *indexBuf = &batch->vbo; +#endif if (batch->indexCount) { if (m_context->hasBrokenIndexBufferObjects()) { - indexBase = batch->vbo.data; + indexBase = indexBuf->data; glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } else { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, batch->vbo.id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuf->id); } } @@ -2083,7 +2127,11 @@ void Renderer::renderUnmergedBatch(const Batch *batch) } int vOffset = 0; +#ifdef QSG_SEPARATE_INDEX_BUFFER + char *iOffset = indexBase; +#else char *iOffset = indexBase + batch->vertexCount * gn->geometry()->sizeOfVertex(); +#endif QMatrix4x4 rootMatrix = batch->root ? matrixForRoot(batch->root) : QMatrix4x4(); diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 5404b669a0..001c3b21ab 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -276,6 +276,9 @@ struct Batch mutable uint uploadedThisFrame : 1; // solely for debugging purposes Buffer vbo; +#ifdef QSG_SEPARATE_INDEX_BUFFER + Buffer ibo; +#endif QDataBuffer<DrawSet> drawSets; }; @@ -411,7 +414,7 @@ private: void map(Buffer *buffer, int size); - void unmap(Buffer *buffer); + void unmap(Buffer *buffer, bool isIndexBuf = false); void buildRenderListsFromScratch(); void buildRenderListsForTaggedRoots(); @@ -495,6 +498,9 @@ Batch *Renderer::newBatch() } else { b = new Batch(); memset(&b->vbo, 0, sizeof(Buffer)); +#ifdef QSG_SEPARATE_INDEX_BUFFER + memset(&b->ibo, 0, sizeof(Buffer)); +#endif } b->init(); return b; diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri index 6f64c881a8..6868e10b90 100644 --- a/src/quick/scenegraph/scenegraph.pri +++ b/src/quick/scenegraph/scenegraph.pri @@ -1,5 +1,7 @@ !contains(QT_CONFIG, egl):DEFINES += QT_NO_EGL +# DEFINES += QSG_SEPARATE_INDEX_BUFFER + # Core API HEADERS += \ $$PWD/coreapi/qsgbatchrenderer_p.h \ diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 8809693647..30bc175346 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -8,13 +8,6 @@ SUBDIRS=\ qmldevtools.CONFIG = host_build -!mac { -SUBDIRS += \ - quick \ - particles \ - qmltest -} - installed_cmake.depends = cmake testcocoon: SUBDIRS -= headersclean diff --git a/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp index 8dfd25b58b..7fd1f47838 100644 --- a/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp +++ b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp @@ -87,7 +87,7 @@ void tst_QPacketProtocol::init() m_client->connectToHost(m_server->serverAddress(), m_server->serverPort()); QVERIFY(m_client->waitForConnected()); - QVERIFY(m_server->waitForNewConnection(5000)); + QVERIFY(m_server->waitForNewConnection(10000)); m_serverConn = m_server->nextPendingConnection(); } diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/data/controlFromJS.qml b/tests/auto/qml/debugger/qqmlprofilerservice/data/controlFromJS.qml new file mode 100644 index 0000000000..7bcabc33ac --- /dev/null +++ b/tests/auto/qml/debugger/qqmlprofilerservice/data/controlFromJS.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + Timer { + running: true + interval: 1 + onTriggered: { + console.profile(); + stopTimer.start(); + } + } + + Timer { + id: stopTimer + interval: 1000 + onTriggered: { + console.profileEnd(); + endTimer.start(); + } + } + + Timer { + id: endTimer + interval: 1000 + onTriggered: Qt.quit(); + } +} diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro index b2b325dc72..a83927e720 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro +++ b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro @@ -14,4 +14,5 @@ QT += core qml testlib gui-private DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 OTHER_FILES += \ - data/pixmapCacheTest.qml + data/pixmapCacheTest.qml \ + data/controlFromJS.qml diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 929b079a51..acbc62807b 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -180,6 +180,7 @@ private slots: void pixmapCacheData(); void scenegraphData(); void profileOnExit(); + void controlFromJS(); }; void QQmlProfilerClient::messageReceived(const QByteArray &message) @@ -494,6 +495,24 @@ void tst_QQmlProfilerService::profileOnExit() QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerClient::EndTrace); } +void tst_QQmlProfilerService::controlFromJS() +{ + connect(true, "controlFromJS.qml"); + QVERIFY(m_client); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); + + m_client->setTraceState(false); + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); + + // must start with "StartTrace" + QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerClient::Event); + QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerClient::StartTrace); + + // must end with "EndTrace" + QCOMPARE(m_client->traceMessages.last().messageType, (int)QQmlProfilerClient::Event); + QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerClient::EndTrace); +} + QTEST_MAIN(tst_QQmlProfilerService) #include "tst_qqmlprofilerservice.moc" diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index e6f31dcb83..a37d705284 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -115,8 +115,8 @@ void tst_qqmlconsole::profiling() QUrl testUrl = testFileUrl("profiling.qml"); // profiling() - QTest::ignoreMessage(QtDebugMsg, "Profiling started."); - QTest::ignoreMessage(QtDebugMsg, "Profiling ended."); + QTest::ignoreMessage(QtWarningMsg, "Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX."); + QTest::ignoreMessage(QtWarningMsg, "Profiling was not started."); QQmlComponent component(&engine, testUrl); QObject *object = component.create(); diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index 4f21231184..553663ac22 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -676,6 +676,7 @@ void tst_qqmlcontext::qobjectDerived() QQmlContext context(engine.rootContext()); QObject *o1 = component.create(&context); + Q_UNUSED(o1); QCOMPARE(command.count, 2); } diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp index d07fd7177d..7c84cdb5cf 100644 --- a/tests/auto/quick/nodes/tst_nodestest.cpp +++ b/tests/auto/quick/nodes/tst_nodestest.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the Qt scene graph research project. +** This file is part of the test suite of the Qt toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -97,6 +97,8 @@ void NodesTest::initTestCase() void NodesTest::cleanupTestCase() { + renderContext->invalidate(); + delete renderContext; context->doneCurrent(); delete context; delete surface; diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp index 8bdb9c9de5..7fa58036dd 100644 --- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@ -885,6 +885,7 @@ public: QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) { + Q_UNUSED(requestedSize); if (id == QLatin1String("first-image.png")) { QTest::qWait(50); int width = 100; diff --git a/tests/auto/quick/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp index a4ed1267ac..02c00ff073 100644 --- a/tests/auto/quick/qquickview/tst_qquickview.cpp +++ b/tests/auto/quick/qquickview/tst_qquickview.cpp @@ -186,10 +186,6 @@ void tst_QQuickView::resizemodeitem() delete view; } -static void silentErrorsMsgHandler(QtMsgType, const QMessageLogContext &, const QString &) -{ -} - void tst_QQuickView::errors() { QQuickView *view = new QQuickView; |