summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp4
-rw-r--r--tools/qdoc3/generator.cpp14
-rw-r--r--tools/qdoc3/node.cpp10
-rw-r--r--tools/qtestlib/wince/cetest/cetcpsyncconnection.cpp21
-rw-r--r--tools/qtestlib/wince/cetest/cetcpsyncconnection.h3
-rw-r--r--tools/qtestlib/wince/cetest/cetest.pro5
-rw-r--r--tools/qttracereplay/main.cpp99
7 files changed, 132 insertions, 24 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 0b14cba..dfd1196 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 62f191b..3f955bf 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 bd37443..37d6b31 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 99219f3..5494194 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 77539cc..e603efc 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 2773fe4..43ed18e 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 be7906b..101d512 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();