diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-30 06:05:46 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-30 06:05:46 +0200 |
commit | 6cc6ca434f0ff63273c3fd3da80803f39c888e91 (patch) | |
tree | 6ee7c4c2b7ab37047c2aefb74cdd4beaa45ac261 /tools | |
parent | c4f59859a589b76419e9133110eda850223f03dd (diff) | |
parent | 7e8092fc70357b69835d8edc9e38f3286fe8727f (diff) | |
download | qt4-tools-6cc6ca434f0ff63273c3fd3da80803f39c888e91.tar.gz |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (47 commits)
QScript: More missing APIShim
QScriptEngine: Fix reentrency involving creation and desctructions of QScriptEngines
Work-around Symbian 10.1's broken egl.h
Add some #warnings to debug Symbian EGL build failure
Don't detect EGLImage presence by testing function pointers
Implement proper QStaticText support in QPaintBuffer
Make QStaticText layout lazy
Change QStaticText::setMaximumSize() to setTextWidth()
Respect QPainter::pen() in QPainter::drawStaticText()
QVarLenghtArray: add some API to be consistant to QVector
Don't try to resolve EGLImage function pointers if they are defined
Change ORs to ANDs when checking EGLImage extension defines
Protect EGLImage function definitions in #ifdef
Fix a bug in greek shaping causing infinite loops
Define QT_NO_EGL in configure.exe
improve mingw 64 bit support
Fix build on Windows
Round instead of ceil font metrics when ForceIntegerMetrics is enabled
cetest: remove source file duplicates from cetest.pro
Remove EGLImage create/destroy resolving from VG pixmap data
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 4 | ||||
-rw-r--r-- | tools/qdoc3/generator.cpp | 14 | ||||
-rw-r--r-- | tools/qdoc3/node.cpp | 10 | ||||
-rw-r--r-- | tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp | 21 | ||||
-rw-r--r-- | tools/qtestlib/wince/cetest/cetcpsyncconnection.h | 3 | ||||
-rw-r--r-- | tools/qtestlib/wince/cetest/cetest.pro | 5 | ||||
-rw-r--r-- | tools/qttracereplay/main.cpp | 99 |
7 files changed, 132 insertions, 24 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0b14cba13a..dfd1196113 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3041,6 +3041,10 @@ void Configure::generateConfigfiles() if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; if(dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; + if(dictionary["OPENGL_ES_CM"] == "no" && + dictionary["OPENGL_ES_2"] == "no" && + dictionary["OPENVG"] == "no") qconfigList += "QT_NO_EGL"; + if(dictionary["OPENGL_ES_CM"] == "yes" || dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES"; diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 62f191b355..3f955bfdc3 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -322,11 +322,11 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) bool quiet = false; if (node->type() == Node::Function) { -#if 0 +#if 0 const FunctionNode *func = (const FunctionNode *) node; if (func->isOverload() && func->metaness() != FunctionNode::Ctor) generateOverload(node, marker); -#endif +#endif } else if (node->type() == Node::Fake) { const FakeNode *fake = static_cast<const FakeNode *>(node); @@ -347,7 +347,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) if (func->reimplementedFrom() != 0) generateReimplementedFrom(func, marker); } - + if (!generateText(node->doc().body(), node, marker)) if (node->isReimp()) return; @@ -452,7 +452,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) // Now we put this at the top, before the other text. if (func->reimplementedFrom() != 0) generateReimplementedFrom(func, marker); -#endif +#endif } } @@ -544,7 +544,7 @@ void Generator::generateInheritedBy(const ClassNode *classe, example is being formatted. It outputs the list of source files comprising the example, and the list of images used by the example. The images are copied into a subtree of - \c{...doc/html/images/used-in-examples/...} + \c{...doc/html/images/used-in-examples/...} */ void Generator::generateFileList(const FakeNode* fake, CodeMarker* marker, @@ -946,7 +946,7 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker) } ++c; } - if (!exceptions) + if (!exceptions) text << "."; else if (threadSafeness == Node::Reentrant) { if (nonreentrant.isEmpty()) { @@ -1033,7 +1033,7 @@ void Generator::generateOverload(const Node *node, CodeMarker *marker) text << Atom::ParaLeft << "This function overloads "; QString t = node->name() + "()"; - text << Atom::AutoLink << t + text << Atom::AutoLink << t << Atom::ParaRight; generateText(text, node, marker); } diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index bd374439f8..37d6b31cfc 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -415,7 +415,7 @@ void InnerNode::normalizeOverloads() /*! */ -void InnerNode::removeFromRelated() +void InnerNode::removeFromRelated() { while (!related.isEmpty()) { Node *p = static_cast<Node *>(related.takeFirst()); @@ -456,7 +456,7 @@ const Node *InnerNode::findNode(const QString& name, Type type) const } /*! - Find the function node in this node that has the given \a name. + Find the function node in this node that has the given \a name. */ const FunctionNode *InnerNode::findFunctionNode(const QString& name) const { @@ -973,7 +973,7 @@ Parameter::Parameter(const Parameter& p) /*! Assigning Parameter \a p to this Parameter copies the - strings across. + strings across. */ Parameter& Parameter::operator=(const Parameter& p) { @@ -1319,7 +1319,7 @@ void QmlClassNode::clear() */ QString QmlClassNode::fileBase() const { -#if 0 +#if 0 if (Node::fileBase() == "item") qDebug() << "FILEBASE: qmlitem" << name(); return "qml_" + Node::fileBase(); @@ -1368,7 +1368,7 @@ QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent, /*! Constructor for the Qml property group node. \a parent is - always a QmlClassNode. + always a QmlClassNode. */ QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent, const QString& name, diff --git a/tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp b/tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp index 99219f3ff8..549419400e 100644 --- a/tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp +++ b/tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp @@ -198,3 +198,24 @@ bool CeTcpSyncConnection::fileCreationTime(const QString &fileName, FILETIME* de file.remove(); return result; } + +bool CeTcpSyncConnection::resetDevice() +{ + qWarning("CeTcpSyncConnection::resetDevice not implemented"); + return false; +} + +bool CeTcpSyncConnection::toggleDevicePower(int *returnValue) +{ + Q_UNUSED(returnValue); + qWarning("CeTcpSyncConnection::toggleDevicePower not implemented"); + return false; +} + +bool CeTcpSyncConnection::setDeviceAwake(bool activate, int *returnValue) +{ + Q_UNUSED(activate); + Q_UNUSED(returnValue); + qWarning("CeTcpSyncConnection::setDeviceAwake not implemented"); + return false; +} diff --git a/tools/qtestlib/wince/cetest/cetcpsyncconnection.h b/tools/qtestlib/wince/cetest/cetcpsyncconnection.h index 77539cc896..e603efc9ac 100644 --- a/tools/qtestlib/wince/cetest/cetcpsyncconnection.h +++ b/tools/qtestlib/wince/cetest/cetcpsyncconnection.h @@ -75,6 +75,9 @@ public: bool createDirectory(const QString&, bool deleteBefore=false); bool execute(QString program, QString arguments = QString(), int timeout = -1, int *returnValue = NULL); + bool resetDevice(); + bool toggleDevicePower(int *returnValue = NULL); + bool setDeviceAwake(bool activate, int *returnValue = NULL); private: bool connected; }; diff --git a/tools/qtestlib/wince/cetest/cetest.pro b/tools/qtestlib/wince/cetest/cetest.pro index 2773fe4484..43ed18e505 100644 --- a/tools/qtestlib/wince/cetest/cetest.pro +++ b/tools/qtestlib/wince/cetest/cetest.pro @@ -13,7 +13,8 @@ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED QT_NO_CODECS QT_LITE_UNICODE QT QT_NO_STL QT_NO_COMPRESS QT_NO_DATASTREAM \ QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_NO_THREAD \ QT_NO_SYSTEMLOCALE QT_NO_GEOM_VARIANT \ - QT_NODLL QT_NO_QOBJECT + QT_NODLL QT_NO_QOBJECT \ + QT_BUILD_QMAKE_NO_GENERATORS INCLUDEPATH = \ $$QT_SOURCE_TREE/tools/qtestlib/ce/cetest \ @@ -36,8 +37,6 @@ HEADERS += \ SOURCES += \ remoteconnection.cpp \ deployment.cpp \ - symbian/epocroot.cpp \ - windows/registry.cpp \ main.cpp LIBS += ole32.lib advapi32.lib diff --git a/tools/qttracereplay/main.cpp b/tools/qttracereplay/main.cpp index be7906b97d..101d5127e2 100644 --- a/tools/qttracereplay/main.cpp +++ b/tools/qttracereplay/main.cpp @@ -49,7 +49,7 @@ class ReplayWidget : public QWidget { Q_OBJECT public: - ReplayWidget(const QString &filename, int from, int to, bool single); + ReplayWidget(const QString &filename, int from, int to, bool single, int frame); void paintEvent(QPaintEvent *event); void resizeEvent(QResizeEvent *event); @@ -66,27 +66,96 @@ public: QTime timer; QList<uint> visibleUpdates; - QList<uint> iterationTimes; + + QVector<uint> iterationTimes; QString filename; int from; int to; bool single; + + int frame; + int currentCommand; }; void ReplayWidget::updateRect() { - if (!visibleUpdates.isEmpty()) + if (frame >= 0 && !updates.isEmpty()) + update(updates.at(frame)); + else if (!visibleUpdates.isEmpty()) update(updates.at(visibleUpdates.at(currentFrame))); } +const int singleFrameRepeatsPerCommand = 100; +const int singleFrameIterations = 4; + void ReplayWidget::paintEvent(QPaintEvent *) { QPainter p(this); + QTimer::singleShot(0, this, SLOT(updateRect())); + // p.setClipRegion(frames.at(currentFrame).updateRegion); + if (frame >= 0) { + int start = buffer.frameStartIndex(frame); + int end = buffer.frameEndIndex(frame); + + iterationTimes.resize(end - start); + + int saveRestoreStackDepth = buffer.processCommands(&p, start, start + currentCommand); + + for (int i = 0; i < saveRestoreStackDepth; ++i) + p.restore(); + + const int repeats = currentIteration >= 3 ? singleFrameRepeatsPerCommand : 1; + + ++currentFrame; + if (currentFrame == repeats) { + currentFrame = 0; + if (currentIteration >= 3) { + iterationTimes[currentCommand - 1] = qMin(iterationTimes[currentCommand - 1], uint(timer.elapsed())); + timer.restart(); + } + + if (currentIteration >= singleFrameIterations + 3) { + printf(" # | ms | description\n"); + printf("------+---------+------------------------------------------------------------\n"); + + qSort(iterationTimes); + + int sum = 0; + for (int i = 0; i < iterationTimes.size(); ++i) { + int delta = iterationTimes.at(i); + if (i > 0) + delta -= iterationTimes.at(i-1); + sum += delta; + qreal deltaF = delta / qreal(repeats); + printf("%.5d | %.5f | %s\n", i, deltaF, qPrintable(buffer.commandDescription(start + i))); + } + printf("Total | %.5f | Total frame time\n", sum / qreal(repeats)); + deleteLater(); + return; + } + + if (start + currentCommand >= end) { + currentCommand = 1; + ++currentIteration; + if (currentIteration == 3) { + timer.start(); + iterationTimes.fill(uint(-1)); + } + if (currentIteration >= 3 && currentIteration < singleFrameIterations + 3) + printf("Profiling iteration %d of %d\n", currentIteration - 2, singleFrameIterations); + } else { + ++currentCommand; + } + } + + return; + } + buffer.draw(&p, visibleUpdates.at(currentFrame)); ++currentFrame; @@ -138,11 +207,9 @@ void ReplayWidget::paintEvent(QPaintEvent *) } } } - - QTimer::singleShot(0, this, SLOT(updateRect())); } -void ReplayWidget::resizeEvent(QResizeEvent *event) +void ReplayWidget::resizeEvent(QResizeEvent *) { visibleUpdates.clear(); @@ -162,13 +229,15 @@ void ReplayWidget::resizeEvent(QResizeEvent *event) } -ReplayWidget::ReplayWidget(const QString &filename_, int from_, int to_, bool single_) +ReplayWidget::ReplayWidget(const QString &filename_, int from_, int to_, bool single_, int frame_) : currentFrame(0) , currentIteration(0) , filename(filename_) , from(from_) , to(to_) , single(single_) + , frame(frame_) + , currentCommand(1) { setWindowTitle(filename); QFile file(filename); @@ -216,7 +285,8 @@ int main(int argc, char **argv) printf("Usage:\n > %s [OPTIONS] [traceFile]\n", argv[0]); printf("OPTIONS\n" " --range=from-to to specify a frame range.\n" - " --singlerun to do only one run (without statistics)\n"); + " --singlerun to do only one run (without statistics)\n" + " --instrumentframe=frame to instrument a single frame\n"); return 1; } @@ -228,6 +298,8 @@ int main(int argc, char **argv) bool single = false; + int frame = -1; + int from = 0; int to = -1; for (int i = 1; i < app.arguments().size() - 1; ++i) { @@ -253,13 +325,22 @@ int main(int argc, char **argv) } } else if (arg == QLatin1String("--singlerun")) { single = true; + } else if (arg.startsWith(QLatin1String("--instrumentframe="))) { + QString rest = arg.mid(18); + bool ok = false; + int frameCandidate = rest.toInt(&ok); + if (ok) { + frame = frameCandidate; + } else { + printf("ERROR: malformed syntax in argument %s\n", qPrintable(arg)); + } } else { printf("Unrecognized argument: %s\n", qPrintable(arg)); return 1; } } - ReplayWidget *widget = new ReplayWidget(app.arguments().last(), from, to, single); + ReplayWidget *widget = new ReplayWidget(app.arguments().last(), from, to, single, frame); if (!widget->updates.isEmpty()) { widget->show(); |