From 7bc18035816a2eac15dfac4d987eb9bf43f90ef6 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Mon, 28 Dec 2009 13:47:46 +0200 Subject: Daylight savings time for Symbian take 2 Second try to make this work for all S60 platforms --- src/corelib/corelib.pro | 2 ++ src/corelib/tools/qdatetime.cpp | 60 +++++++++++++++++++++------------- tests/auto/qdatetime/tst_qdatetime.cpp | 7 ++++ 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 9a15bf1..7f33791 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -35,4 +35,6 @@ symbian: { # Workaroud for problems with paging this dll MMP_RULES -= PAGED MMP_RULES *= UNPAGED + # Timezone server + LIBS += -ltzclient } diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index db6435e..240f0cf 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -75,6 +75,7 @@ #if defined(Q_OS_SYMBIAN) #include +#include #endif QT_BEGIN_NAMESPACE @@ -3721,23 +3722,32 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); - TTimeIntervalSeconds utcOffset = User::UTCOffset(); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - utcTTime = utcTTime + utcOffset; - TDateTime utcDateTime = utcTTime.DateTime(); - res.tm_sec = utcDateTime.Second(); - res.tm_min = utcDateTime.Minute(); - res.tm_hour = utcDateTime.Hour(); - res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = utcDateTime.Month(); - res.tm_year = utcDateTime.Year() - 1900; - res.tm_isdst = 0; - brokenDown = &res; + TRAP(err, + RTz tz; + User::LeaveIfError(tz.Connect()); + CleanupClosePushL(tz); + res.tm_isdst = tz.IsDaylightSavingOnL(*tz.GetTimeZoneIdL(),utcTTime); + User::LeaveIfError(tz.ConvertToLocalTime(utcTTime)); + CleanupStack::PopAndDestroy(&tz)); + if (KErrNone == err) { + TDateTime localDateTime = utcTTime.DateTime(); + res.tm_sec = localDateTime.Second(); + res.tm_min = localDateTime.Minute(); + res.tm_hour = localDateTime.Hour(); + res.tm_mday = localDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = localDateTime.Month(); + res.tm_year = localDateTime.Year() - 1900; + // Symbian's timezone server doesn't know how to handle DST before year 1997 + if (res.tm_year < 97) + res.tm_isdst = -1; + brokenDown = &res; + } } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of localtime() where available @@ -3812,23 +3822,27 @@ static void localToUtc(QDate &date, QTime &time, int isdst) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); - TTimeIntervalSeconds utcOffset = TTimeIntervalSeconds(0 - User::UTCOffset().Int()); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { - TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - utcTTime = utcTTime + utcOffset; - TDateTime utcDateTime = utcTTime.DateTime(); - res.tm_sec = utcDateTime.Second(); - res.tm_min = utcDateTime.Minute(); - res.tm_hour = utcDateTime.Hour(); - res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = utcDateTime.Month(); - res.tm_year = utcDateTime.Year() - 1900; - res.tm_isdst = (int)isdst; - brokenDown = &res; + TTime localTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; + RTz tz; + if (KErrNone == tz.Connect()) { + if (KErrNone == tz.ConvertToUniversalTime(localTTime)) { + TDateTime utcDateTime = localTTime.DateTime(); + res.tm_sec = utcDateTime.Second(); + res.tm_min = utcDateTime.Minute(); + res.tm_hour = utcDateTime.Hour(); + res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = utcDateTime.Month(); + res.tm_year = utcDateTime.Year() - 1900; + res.tm_isdst = (int)isdst; + brokenDown = &res; + } + tz.Close(); + } } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of gmtime() where available diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index 1140402..32fa398 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -147,9 +147,16 @@ Q_DECLARE_METATYPE(QTime) tst_QDateTime::tst_QDateTime() { +#ifdef Q_OS_SYMBIAN + // Symbian's timezone server cannot handle DST correctly for dates before year 1997 + uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t(); + uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t(); + europeanTimeZone = (x1 == 946681200 && x2 == 959810400); +#else uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t(); uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t(); europeanTimeZone = (x1 == 631148400 && x2 == 644191200); +#endif } tst_QDateTime::~tst_QDateTime() -- cgit v0.12 From fdf463ba74b2e00ba5f9db10f43585e8b15054f7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Jan 2010 17:39:25 +0100 Subject: Remove erroneous warning in QFileInfo::absolutePath() --- src/corelib/io/qfileinfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index b4437db..e90529e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -573,10 +573,13 @@ QString QFileInfo::canonicalFilePath() const QString QFileInfo::absolutePath() const { Q_D(const QFileInfo); - if (d->data->fileName.isEmpty()) + + if (!d->data->fileEngine) { + return QLatin1String(""); + } else if (d->data->fileName.isEmpty()) { qWarning("QFileInfo::absolutePath: Constructed with empty filename"); - if(!d->data->fileEngine) return QLatin1String(""); + } return d->getFileName(QAbstractFileEngine::AbsolutePathName); } -- cgit v0.12 From d5a3866d20507967e14ed34930f08ce6248000e5 Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Wed, 3 Feb 2010 10:14:26 +0100 Subject: Adding my changes. --- dist/changes-4.6.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 4f46a1f..0548e98 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -128,7 +128,10 @@ Qt for Windows Qt for Mac OS X --------------- - - + - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. + - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. + - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. + Qt for Embedded Linux --------------------- -- cgit v0.12 From 4f97685cef49fea0ea0614b6972241c497b4b1a2 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 29 Jan 2010 11:12:48 +0100 Subject: QNAM HTTP: Fix bug related to re-sending a request Thanks Nils Jeisecke for report and proposed fix. Task-number: QTBUG-7713 Reviewed-by: thiago --- src/network/access/qhttpnetworkconnection.cpp | 8 ++++++- .../access/qhttpnetworkconnectionchannel.cpp | 27 ++++++++++++++-------- .../access/qhttpnetworkconnectionchannel_p.h | 2 ++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index fff7097..cc6a1c8 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -688,8 +688,14 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() if (channels[i].resendCurrent) { channels[i].resendCurrent = false; channels[i].state = QHttpNetworkConnectionChannel::IdleState; - if (channels[i].reply) + if (channels[i].reply) { + + // if this is not possible, error will be emitted and connection terminated + if (!channels[i].resetUploadData()) + continue; + channels[i].sendRequest(); + } } } diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index b80ae9a..70a301d 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -674,15 +674,8 @@ void QHttpNetworkConnectionChannel::handleStatus() case 407: // proxy auth required if (connection->d_func()->handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend)) { if (resend) { - QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice(); - if (uploadByteDevice) { - if (uploadByteDevice->reset()) { - written = 0; - } else { - connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ContentReSendError); - break; - } - } + if (!resetUploadData()) + break; reply->d_func()->eraseData(); @@ -712,6 +705,22 @@ void QHttpNetworkConnectionChannel::handleStatus() } } +bool QHttpNetworkConnectionChannel::resetUploadData() +{ + QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice(); + if (!uploadByteDevice) + return true; + + if (uploadByteDevice->reset()) { + written = 0; + return true; + } else { + connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ContentReSendError); + return false; + } +} + + void QHttpNetworkConnectionChannel::pipelineInto(HttpMessagePair &pair) { // this is only called for simple GET diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index c30c236..75ab50d 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -151,6 +151,8 @@ public: void allDone(); // reply header + body have been read void handleStatus(); // called from allDone() + bool resetUploadData(); // return true if resetting worked or there is no upload data + void pipelineInto(HttpMessagePair &pair); void requeueCurrentlyPipelinedRequests(); void detectPipeliningSupport(); -- cgit v0.12 From a9ffa944f8599db0559e9d07509a3778f49bbc2a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 3 Feb 2010 11:36:14 +0100 Subject: Updated my changelog entry Reviewed-by: trustme --- dist/changes-4.6.2 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 0548e98..d768988 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -40,8 +40,8 @@ Optimizations QtCore ------ - - foo - * bar + - QXmlStreamWriter + * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. QtGui ----- @@ -49,6 +49,9 @@ QtGui - foo * bar + * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a + dangling gesture manager pointer. + QtDBus ------ @@ -118,7 +121,9 @@ Qt for Linux/X11 ---------------- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap in Qt/X11. - - + + * Fixed a crash when an input method tries to create a widget after the + application is destroyed. Qt for Windows -------------- -- cgit v0.12 From 48d040b3536dbce06f54c90da489a5308bee3870 Mon Sep 17 00:00:00 2001 From: Bastian Bense Date: Wed, 3 Feb 2010 11:57:38 +0100 Subject: Cleared up QEvent documentation for QGraphicsSceneDragDropEvent events. Added the "(QGraphicsSceneDragDropEvent)" behind the documentation of the QGraphicsSceneDrag*-type events. Without this hint it gives the impression that you can't access the data being dragged within eventFilter()s. Task-number: QTBUG-7547 Reviewed-by: Benjamin Poulain --- src/corelib/kernel/qcoreevent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 3f69b4f..3500b63 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -133,10 +133,10 @@ QT_BEGIN_NAMESPACE \value GrabKeyboard Item gains keyboard grab (QGraphicsItem only). \value GrabMouse Item gains mouse grab (QGraphicsItem only). \value GraphicsSceneContextMenu Context popup menu over a graphics scene (QGraphicsSceneContextMenuEvent). - \value GraphicsSceneDragEnter The cursor enters a graphics scene during a drag and drop operation. - \value GraphicsSceneDragLeave The cursor leaves a graphics scene during a drag and drop operation. - \value GraphicsSceneDragMove A drag and drop operation is in progress over a scene. - \value GraphicsSceneDrop A drag and drop operation is completed over a scene. + \value GraphicsSceneDragEnter The cursor enters a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDragLeave The cursor leaves a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDragMove A drag and drop operation is in progress over a scene (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDrop A drag and drop operation is completed over a scene (QGraphicsSceneDragDropEvent). \value GraphicsSceneHelp The user requests help for a graphics scene (QHelpEvent). \value GraphicsSceneHoverEnter The mouse cursor enters a hover item in a graphics scene (QGraphicsSceneHoverEvent). \value GraphicsSceneHoverLeave The mouse cursor leaves a hover item in a graphics scene (QGraphicsSceneHoverEvent). -- cgit v0.12 From 7cfece145418864b415a91d5b872e65660eb3090 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Feb 2010 10:34:46 +0100 Subject: QTcpServer: Clarify thread affinity of incoming QTcpSocket We had some bugreports and support requests related to misunderstandings about this. Reviewed-by: Peter Hartmann Reviewed-by: David Boddie --- src/network/socket/qtcpserver.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 47a998c..404eee7 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -513,6 +513,10 @@ bool QTcpServer::hasPendingConnections() const 0 is returned if this function is called when there are no pending connections. + \note The returned QTcpSocket object cannot be used from another + thread. If you want to use an incoming connection from another thread, + you need to override incomingConnection(). + \sa hasPendingConnections() */ QTcpSocket *QTcpServer::nextPendingConnection() @@ -543,6 +547,11 @@ QTcpSocket *QTcpServer::nextPendingConnection() may not be usable with native socket functions, and should only be used with QTcpSocket::setSocketDescriptor(). + \note If you want to handle an incoming connection as a new QTcpSocket + object in another thread you have to pass the socketDescriptor + to the other thread and create the QTcpSocket object there and + use its setSocketDescriptor() method. + \sa newConnection(), nextPendingConnection() */ void QTcpServer::incomingConnection(int socketDescriptor) -- cgit v0.12 From 05a1573eddc6dc404631c9d16474c81aa4cea569 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Feb 2010 14:56:15 +0100 Subject: Fixed QFileInfo::absolutePath() warning when running "qmake -project" Task-number: QTBUG-7176 Reviewed-by: Benjamin Poulain --- qmake/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index c2e033e..4ce8ba4 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3067,7 +3067,7 @@ QStringList &QMakeProject::values(const QString &_var, QMap Date: Wed, 13 Jan 2010 17:05:45 +0100 Subject: Fix regression in clipped icon text on Windows This was really caused by a change done to the font engine in 4.6. We now return a pixel less for the font height in multiple widgets. Some of these should be addressed in a separate patch. This patch simply ensures that the text rect is not clipped, but will not alter the height of the widget. Task-number: QTBUG-7662 Reviewed-by: prasanth --- src/gui/styles/qcommonstyle.cpp | 2 +- tests/auto/qstyle/tst_qstyle.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 739a70b..74d3ec3 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1608,7 +1608,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { pr.setHeight(pmSize.height() + 6); - tr.adjust(0, pr.height() - 1, 0, -3); + tr.adjust(0, pr.height() - 1, 0, -2); pr.translate(shiftX, shiftY); if (!hasArrow) { proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm); diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index 51fde74..a76c82d 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -445,6 +446,8 @@ void tst_QStyle::testWindowsVistaStyle() if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA) testPainting(&vistastyle, "vista"); + else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP) + testPainting(&vistastyle, "xp"); #endif } @@ -460,6 +463,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap) void tst_QStyle::testPainting(QStyle *style, const QString &platform) { +qDebug("TEST PAINTING"); //Test Menu QString fileName = "images/" + platform + "/menu.png"; QMenu menu; @@ -538,6 +542,19 @@ void tst_QStyle::testPainting(QStyle *style, const QString &platform) pixmap = QPixmap::grabWidget(&mdiArea); mdiArea.hide(); comparePixmap(fileName, pixmap); + + // QToolButton + fileName = "images/" + platform + "/toolbutton.png"; + QToolButton tb; + tb.setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + tb.setText("AaQqPpXx"); + tb.setIcon(style->standardPixmap(QStyle::SP_DirHomeIcon)); + tb.setStyle(style); + tb.show(); + pixmap = QPixmap::grabWidget(&tb); + tb.hide(); + comparePixmap(fileName, pixmap); + } void tst_QStyle::testMacStyle() -- cgit v0.12 From 4248244704211a45a20a39f390ec00c9687a8d1c Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 21 Jan 2010 07:57:25 +0100 Subject: Fix how we select antialiasing method for text under Mac OS X Reviewed-by: Eskil --- src/gui/kernel/qapplication_mac.mm | 42 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 688e51f..7cdd50a 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -227,8 +227,29 @@ void onApplicationChangedActivation( bool activated ); static void qt_mac_read_fontsmoothing_settings() { - NSInteger appleFontSmoothing = [[NSUserDefaults standardUserDefaults] integerForKey:@"AppleFontSmoothing"]; - qt_applefontsmoothing_enabled = (appleFontSmoothing > 0); + qt_applefontsmoothing_enabled = true; + int w = 10, h = 10; + QImage image(w, h, QImage::Format_RGB32); + image.fill(0xffffffff); + QPainter p(&image); + p.drawText(0, h, "X\\"); + p.end(); + + const int *bits = (const int *) ((const QImage &) image).bits(); + int bpl = image.bytesPerLine() / 4; + for (int y=0; ylastUpdateWidget = widget; } else if (it->lastUpdateWidget == widget) { - // Update the gl wigets that the widget intersected the last time around, - // and that we are not intersecting now. This prevents paint errors when the + // Update the gl wigets that the widget intersected the last time around, + // and that we are not intersecting now. This prevents paint errors when the // intersecting widget leaves a gl widget. qt_post_window_change_event(glWidget); - it->lastUpdateWidget = 0; + it->lastUpdateWidget = 0; } } #else @@ -808,8 +829,8 @@ Q_GUI_EXPORT void qt_event_request_window_change(QWidget *widget) // Post a kEventQtRequestWindowChange event. This event is semi-public, // don't remove this line! qt_event_request_window_change(); - - // Post update request on gl widgets unconditionally. + + // Post update request on gl widgets unconditionally. if (qt_widget_private(widget)->isGLWidget == true) { qt_post_window_change_event(widget); return; @@ -1214,8 +1235,6 @@ void qt_init(QApplicationPrivate *priv, int) if (QApplication::desktopSettingsAware()) QApplicationPrivate::qt_mac_apply_settings(); - qt_mac_read_fontsmoothing_settings(); - // Cocoa application delegate #ifdef QT_MAC_USE_COCOA NSApplication *cocoaApp = [NSApplication sharedApplication]; @@ -1253,6 +1272,7 @@ void qt_init(QApplicationPrivate *priv, int) } priv->native_modal_dialog_active = false; + qt_mac_read_fontsmoothing_settings(); } void qt_release_apple_event_handler() @@ -1705,7 +1725,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event // kEventMouseWheelMoved events if we dont eat this event // (actually two events; one for horizontal and one for vertical). // As a results of this, and to make sure we dont't receive duplicate events, - // we try to detect when this happend by checking the 'compatibilityEvent'. + // we try to detect when this happend by checking the 'compatibilityEvent'. SInt32 mdelt = 0; GetEventParameter(event, kEventParamMouseWheelSmoothHorizontalDelta, typeSInt32, 0, sizeof(mdelt), 0, &mdelt); @@ -2576,7 +2596,7 @@ void QApplicationPrivate::closePopup(QWidget *popup) if (QApplicationPrivate::popupWidgets->isEmpty()) { // this was the last popup delete QApplicationPrivate::popupWidgets; QApplicationPrivate::popupWidgets = 0; - + // Special case for Tool windows: since they are activated and deactived together // with a normal window they never become the QApplicationPrivate::active_window. QWidget *appFocusWidget = QApplication::focusWidget(); -- cgit v0.12 From aa2d3eb0f05dc87347e30fc0a6c843fc3d1b4855 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 21 Jan 2010 08:49:12 +0100 Subject: Don't use a mutex lock in QPainter::redirection unless strictly required --- src/gui/painting/qpainter.cpp | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index a9dcea0..764ec68 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7385,10 +7385,15 @@ struct QPaintDeviceRedirection typedef QList QPaintDeviceRedirectionList; Q_GLOBAL_STATIC(QPaintDeviceRedirectionList, globalRedirections) Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) +Q_GLOBAL_STATIC(QAtomicInt, globalRedirectionAtomic) /*! \threadsafe + \obsolete + + Please use QWidget::render() instead. + Redirects all paint commands for the given paint \a device, to the \a replacement device. The optional point \a offset defines an offset within the source device. @@ -7398,9 +7403,10 @@ Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) device's painter (if any) before redirecting. Call restoreRedirected() to restore the previous redirection. - In general, you'll probably find that calling - QPixmap::grabWidget() or QPixmap::grabWindow() is an easier - solution. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. \sa redirected(), restoreRedirected() */ @@ -7432,14 +7438,24 @@ void QPainter::setRedirected(const QPaintDevice *device, Q_ASSERT(redirections != 0); *redirections += QPaintDeviceRedirection(device, rdev ? rdev : replacement, offset + roffset, hadInternalWidgetRedirection ? redirections->size() - 1 : -1); + globalRedirectionAtomic()->ref(); } /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Restores the previous redirection for the given \a device after a call to setRedirected(). + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa redirected() */ void QPainter::restoreRedirected(const QPaintDevice *device) @@ -7450,6 +7466,7 @@ void QPainter::restoreRedirected(const QPaintDevice *device) Q_ASSERT(redirections != 0); for (int i = redirections->size()-1; i >= 0; --i) { if (redirections->at(i) == device) { + globalRedirectionAtomic()->deref(); const int internalWidgetRedirectionIndex = redirections->at(i).internalWidgetRedirectionIndex; redirections->removeAt(i); // Restore the internal widget redirection, i.e. remove it from the global @@ -7471,21 +7488,34 @@ void QPainter::restoreRedirected(const QPaintDevice *device) /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Returns the replacement for given \a device. The optional out parameter \a offset returns the offset within the replaced device. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa setRedirected(), restoreRedirected() */ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { Q_ASSERT(device != 0); + if (*globalRedirectionAtomic() == 0) + return 0; + if (device->devType() == QInternal::Widget) { const QWidgetPrivate *widgetPrivate = static_cast(device)->d_func(); if (widgetPrivate->redirectDev) return widgetPrivate->redirected(offset); } + QMutexLocker locker(globalRedirectionsMutex()); QPaintDeviceRedirectionList *redirections = globalRedirections(); Q_ASSERT(redirections != 0); @@ -7503,6 +7533,9 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { + if (*globalRedirectionAtomic() == 0) + return; + QMutex *mutex = 0; QT_TRY { mutex = globalRedirectionsMutex(); -- cgit v0.12 From 848ae6da25e567e9f64bc98dcbf868912448d136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 21 Jan 2010 10:32:14 +0100 Subject: Doc fixes: Remove some lies from QEasingCurve. Task-number: QTBUG-7418 --- src/corelib/tools/qeasingcurve.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 0ef92d9..b6a2df4 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -125,7 +125,7 @@ \value OutCubic \inlineimage qeasingcurve-outcubic.png \br Easing curve for a cubic (t^3) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutCubic \inlineimage qeasingcurve-inoutcubic.png \br Easing curve for a cubic (t^3) function: @@ -141,7 +141,7 @@ \value OutQuart \inlineimage qeasingcurve-outquart.png \br Easing curve for a cubic (t^4) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutQuart \inlineimage qeasingcurve-inoutquart.png \br Easing curve for a cubic (t^4) function: @@ -157,7 +157,7 @@ \value OutQuint \inlineimage qeasingcurve-outquint.png \br Easing curve for a cubic (t^5) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutQuint \inlineimage qeasingcurve-inoutquint.png \br Easing curve for a cubic (t^5) function: -- cgit v0.12 From 1729c2baea4e39f97d71b77f4c25af131f23221c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 08:59:48 +0100 Subject: Remove unnecessary depth uniform from GL2 engine's GLSL Reviewed-By: Samuel --- src/opengl/gl2paintengineex/qglengineshadersource_p.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index d9a61e9..6e98b02 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -64,23 +64,19 @@ QT_MODULE(OpenGL) static const char* const qglslMainVertexShader = "\ - uniform highp float depth;\ void setPosition();\ void main(void)\ {\ setPosition();\ - gl_Position.z = depth * gl_Position.w;\ }"; static const char* const qglslMainWithTexCoordsVertexShader = "\ attribute highp vec2 textureCoordArray; \ varying highp vec2 textureCoords; \ - uniform highp float depth;\ void setPosition();\ void main(void) \ {\ setPosition();\ - gl_Position.z = depth * gl_Position.w;\ textureCoords = textureCoordArray; \ }"; @@ -89,12 +85,10 @@ static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ attribute lowp float opacityArray; \ varying highp vec2 textureCoords; \ varying lowp float opacity; \ - uniform highp float depth; \ void setPosition(); \ void main(void) \ { \ setPosition(); \ - gl_Position.z = depth * gl_Position.w; \ textureCoords = textureCoordArray; \ opacity = opacityArray; \ }"; -- cgit v0.12 From 3a8236a01f89882d91e22a336f1e7134d3a84b68 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 10:18:32 +0100 Subject: Use an attribute value for the PMV matrix rather than a uniform This has several advantages: First, updating an attribute value seems to be cheaper than updating a uniform. Second, vertex atribute values are independent of shader program, which means they persist across changing of the shader program. This makes code simpler and reduces GL state changes. Note: Credit goes to Samuel for finding this little gem. :-) For the 25920 solid QGraphicsRectItem test case, this gives 10% improvement on desktop and 27% on the SGX. Reviewed-By: Kim --- .../gl2paintengineex/qglengineshadermanager.cpp | 7 ++++- .../gl2paintengineex/qglengineshadermanager_p.h | 5 +++- .../gl2paintengineex/qglengineshadersource_p.h | 34 +++++++++++++++++----- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 25 ++++------------ .../gl2paintengineex/qpaintengineex_opengl2_p.h | 2 -- 5 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 556b888..9fd9e18 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -324,6 +324,11 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS newProg->program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR); if (newProg->useOpacityAttribute) newProg->program->bindAttributeLocation("opacityArray", QT_OPACITY_ATTR); + if (newProg->usePmvMatrix) { + newProg->program->bindAttributeLocation("pmvMatrix1", QT_PMV_MATRIX_1_ATTR); + newProg->program->bindAttributeLocation("pmvMatrix2", QT_PMV_MATRIX_2_ATTR); + newProg->program->bindAttributeLocation("pmvMatrix3", QT_PMV_MATRIX_3_ATTR); + } newProg->program->link(); if (!newProg->program->isLinked()) { @@ -424,7 +429,6 @@ GLuint QGLEngineShaderManager::getUniformLocation(Uniform id) "patternColor", "globalOpacity", "depth", - "pmvMatrix", "maskTexture", "fragmentColor", "linearData", @@ -743,6 +747,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg() } requiredProgram.useTextureCoords = texCoords; requiredProgram.useOpacityAttribute = (opacityMode == AttributeOpacity); + requiredProgram.usePmvMatrix = true; // At this point, requiredProgram is fully populated so try to find the program in the cache currentShaderProg = sharedShaders->findProgramInCache(requiredProgram); diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index c52e5c0..3ab4ebe 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -253,6 +253,9 @@ struct QGLEngineCachedShaderProg static const GLuint QT_VERTEX_COORDS_ATTR = 0; static const GLuint QT_TEXTURE_COORDS_ATTR = 1; static const GLuint QT_OPACITY_ATTR = 2; +static const GLuint QT_PMV_MATRIX_1_ATTR = 3; +static const GLuint QT_PMV_MATRIX_2_ATTR = 4; +static const GLuint QT_PMV_MATRIX_3_ATTR = 5; class QGLEngineShaderProg; @@ -397,6 +400,7 @@ public: bool useTextureCoords; bool useOpacityAttribute; + bool usePmvMatrix; bool operator==(const QGLEngineShaderProg& other) { // We don't care about the program @@ -431,7 +435,6 @@ public: PatternColor, GlobalOpacity, Depth, - PmvMatrix, MaskTexture, FragmentColor, LinearData, diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index 6e98b02..b471b81 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -97,9 +97,12 @@ static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ // shader are also perspective corrected. static const char* const qglslPositionOnlyVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ void setPosition(void)\ {\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \ }"; @@ -114,12 +117,15 @@ static const char* const qglslUntransformedPositionVertexShader = "\ // Pattern Brush - This assumes the texture size is 8x8 and thus, the inverted size is 0.125 static const char* const qglslPositionWithPatternBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec2 invertedTextureSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 patternTexCoords; \ void setPosition(void) { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -144,12 +150,15 @@ static const char* const qglslPatternBrushSrcFragmentShader = "\ // Linear Gradient Brush static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec3 linearData; \ uniform highp mat3 brushTransform; \ varying mediump float index; \ void setPosition() { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -174,12 +183,15 @@ static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ // Conical Gradient Brush static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 A; \ - void setPosition(void)\ - {\ + void setPosition(void) \ + { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -210,7 +222,9 @@ static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ // Radial Gradient Brush static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ uniform highp vec2 fmp; \ @@ -218,6 +232,7 @@ static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ varying highp vec2 A; \ void setPosition(void) \ {\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -247,12 +262,15 @@ static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ // Texture Brush static const char* const qglslPositionWithTextureBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec2 invertedTextureSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 textureCoords; \ void setPosition(void) { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index caa679b..b282676 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -168,12 +168,6 @@ void QGL2PaintEngineExPrivate::useSimpleShader() if (matrixDirty) updateMatrix(); - - if (simpleShaderMatrixUniformDirty) { - const GLuint location = shaderManager->simpleProgram()->uniformLocation("pmvMatrix"); - glUniformMatrix3fv(location, 1, GL_FALSE, (GLfloat*)pmvMatrix); - simpleShaderMatrixUniformDirty = false; - } } void QGL2PaintEngineExPrivate::updateBrushTexture() @@ -392,9 +386,11 @@ void QGL2PaintEngineExPrivate::updateMatrix() matrixDirty = false; - // The actual data has been updated so both shader program's uniforms need updating - simpleShaderMatrixUniformDirty = true; - shaderMatrixUniformDirty = true; + // Set the PMV matrix attribute. As we use an attributes rather than uniforms, we only + // need to do this once for every matrix change and persists across all shader programs. + glVertexAttrib3fv(QT_PMV_MATRIX_1_ATTR, pmvMatrix[0]); + glVertexAttrib3fv(QT_PMV_MATRIX_2_ATTR, pmvMatrix[1]); + glVertexAttrib3fv(QT_PMV_MATRIX_3_ATTR, pmvMatrix[2]); dasher.setInvScale(inverseScale); stroker.setInvScale(inverseScale); @@ -932,18 +928,12 @@ bool QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque) if (changed) { // The shader program has changed so mark all uniforms as dirty: brushUniformsDirty = true; - shaderMatrixUniformDirty = true; opacityUniformDirty = true; } if (brushUniformsDirty && mode != ImageDrawingMode && mode != ImageArrayDrawingMode) updateBrushUniforms(); - if (shaderMatrixUniformDirty) { - glUniformMatrix3fv(location(QGLEngineShaderManager::PmvMatrix), 1, GL_FALSE, (GLfloat*)pmvMatrix); - shaderMatrixUniformDirty = false; - } - if (opacityMode == QGLEngineShaderManager::UniformOpacity && opacityUniformDirty) { shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::GlobalOpacity), (GLfloat)q->state()->opacity); opacityUniformDirty = false; @@ -1955,11 +1945,8 @@ void QGL2PaintEngineEx::setState(QPainterState *new_state) if (old_state == s || old_state->renderHintsChanged) renderHintsChanged(); - if (old_state == s || old_state->matrixChanged) { + if (old_state == s || old_state->matrixChanged) d->matrixDirty = true; - d->simpleShaderMatrixUniformDirty = true; - d->shaderMatrixUniformDirty = true; - } if (old_state == s || old_state->compositionModeChanged) d->compositionModeDirty = true; diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ce1b538..8fa0eff 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -252,8 +252,6 @@ public: bool compositionModeDirty; bool brushTextureDirty; bool brushUniformsDirty; - bool simpleShaderMatrixUniformDirty; - bool shaderMatrixUniformDirty; bool opacityUniformDirty; bool stencilClean; // Has the stencil not been used for clipping so far? -- cgit v0.12 From 87ca0fa9389b7ef77e179b6db7ddc970b7228d6c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 12:47:18 +0100 Subject: Purely cosmetic (formatting) changes to GL2 engine's GLSL This makes GLSL dumps _significantly_ easier to read. Reviewed-By: TrustMe --- .../gl2paintengineex/qglengineshadersource_p.h | 690 +++++++++++---------- 1 file changed, 357 insertions(+), 333 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index b471b81..ee04166 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -63,222 +63,229 @@ QT_BEGIN_NAMESPACE QT_MODULE(OpenGL) -static const char* const qglslMainVertexShader = "\ - void setPosition();\ - void main(void)\ - {\ - setPosition();\ - }"; - -static const char* const qglslMainWithTexCoordsVertexShader = "\ - attribute highp vec2 textureCoordArray; \ - varying highp vec2 textureCoords; \ - void setPosition();\ - void main(void) \ - {\ - setPosition();\ - textureCoords = textureCoordArray; \ - }"; - -static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ - attribute highp vec2 textureCoordArray; \ - attribute lowp float opacityArray; \ - varying highp vec2 textureCoords; \ - varying lowp float opacity; \ - void setPosition(); \ - void main(void) \ - { \ - setPosition(); \ - textureCoords = textureCoordArray; \ - opacity = opacityArray; \ - }"; +static const char* const qglslMainVertexShader = "\n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + }\n"; + +static const char* const qglslMainWithTexCoordsVertexShader = "\n\ + attribute highp vec2 textureCoordArray; \n\ + varying highp vec2 textureCoords; \n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + textureCoords = textureCoordArray; \n\ + }\n"; + +static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\n\ + attribute highp vec2 textureCoordArray; \n\ + attribute lowp float opacityArray; \n\ + varying highp vec2 textureCoords; \n\ + varying lowp float opacity; \n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + textureCoords = textureCoordArray; \n\ + opacity = opacityArray; \n\ + }\n"; // NOTE: We let GL do the perspective correction so texture lookups in the fragment // shader are also perspective corrected. -static const char* const qglslPositionOnlyVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - void setPosition(void)\ - {\ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \ - }"; - -static const char* const qglslUntransformedPositionVertexShader = "\ - attribute highp vec4 vertexCoordsArray;\ - void setPosition(void)\ - {\ - gl_Position = vertexCoordsArray;\ - }"; +static const char* const qglslPositionOnlyVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \n\ + }\n"; + +static const char* const qglslUntransformedPositionVertexShader = "\n\ + attribute highp vec4 vertexCoordsArray; \n\ + void setPosition(void) \n\ + { \n\ + gl_Position = vertexCoordsArray; \n\ + }\n"; // Pattern Brush - This assumes the texture size is 8x8 and thus, the inverted size is 0.125 -static const char* const qglslPositionWithPatternBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec2 invertedTextureSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 patternTexCoords; \ - void setPosition(void) { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1.0); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - patternTexCoords.xy = (hTexCoords.xy * 0.125) * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithPatternBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec2 invertedTextureSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 patternTexCoords; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1.0); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + patternTexCoords.xy = (hTexCoords.xy * 0.125) * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithPatternBrushVertexShader = qglslPositionWithPatternBrushVertexShader; -static const char* const qglslPatternBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture;\ - uniform lowp vec4 patternColor; \ - varying highp vec2 patternTexCoords;\ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \ +static const char* const qglslPatternBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + uniform lowp vec4 patternColor; \n\ + varying highp vec2 patternTexCoords;\n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \n\ }\n"; // Linear Gradient Brush -static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec3 linearData; \ - uniform highp mat3 brushTransform; \ - varying mediump float index; \ - void setPosition() { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - index = (dot(linearData.xy, hTexCoords.xy) * linearData.z) * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec3 linearData; \n\ + uniform highp mat3 brushTransform; \n\ + varying mediump float index; \n\ + void setPosition() \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + index = (dot(linearData.xy, hTexCoords.xy) * linearData.z) * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithLinearGradientBrushVertexShader = qglslPositionWithLinearGradientBrushVertexShader; -static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture; \ - varying mediump float index; \ - lowp vec4 srcPixel() { \ - mediump vec2 val = vec2(index, 0.5); \ - return texture2D(brushTexture, val); \ +static const char* const qglslLinearGradientBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + varying mediump float index; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + mediump vec2 val = vec2(index, 0.5); \n\ + return texture2D(brushTexture, val); \n\ }\n"; // Conical Gradient Brush -static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 A; \ - void setPosition(void) \ - { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - A = hTexCoords.xy * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 A; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + A = hTexCoords.xy * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithConicalGradientBrushVertexShader = qglslPositionWithConicalGradientBrushVertexShader; static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ #define INVERSE_2PI 0.1591549430918953358 \n\ - uniform lowp sampler2D brushTexture; \n\ - uniform mediump float angle; \ - varying highp vec2 A; \ - lowp vec4 srcPixel() { \ - highp float t; \ - if (abs(A.y) == abs(A.x)) \ - t = (atan(-A.y + 0.002, A.x) + angle) * INVERSE_2PI; \ - else \ - t = (atan(-A.y, A.x) + angle) * INVERSE_2PI; \ - return texture2D(brushTexture, vec2(t - floor(t), 0.5)); \ - }"; + uniform lowp sampler2D brushTexture; \n\ + uniform mediump float angle; \n\ + varying highp vec2 A; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + highp float t; \n\ + if (abs(A.y) == abs(A.x)) \n\ + t = (atan(-A.y + 0.002, A.x) + angle) * INVERSE_2PI; \n\ + else \n\ + t = (atan(-A.y, A.x) + angle) * INVERSE_2PI; \n\ + return texture2D(brushTexture, vec2(t - floor(t), 0.5)); \n\ + }\n"; // Radial Gradient Brush -static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp mat3 brushTransform; \ - uniform highp vec2 fmp; \ - varying highp float b; \ - varying highp vec2 A; \ - void setPosition(void) \ - {\ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - A = hTexCoords.xy * invertedHTexCoordsZ; \ - b = 2.0 * dot(A, fmp); \ - }"; +static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray;\n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp mat3 brushTransform; \n\ + uniform highp vec2 fmp; \n\ + varying highp float b; \n\ + varying highp vec2 A; \n\ + void setPosition(void) \n\ + {\n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + A = hTexCoords.xy * invertedHTexCoordsZ; \n\ + b = 2.0 * dot(A, fmp); \n\ + }\n"; static const char* const qglslAffinePositionWithRadialGradientBrushVertexShader = qglslPositionWithRadialGradientBrushVertexShader; -static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture; \ - uniform highp float fmp2_m_radius2; \ - uniform highp float inverse_2_fmp2_m_radius2; \ - varying highp float b; \ - varying highp vec2 A; \ - lowp vec4 srcPixel() { \ - highp float c = -dot(A, A); \ - highp vec2 val = vec2((-b + sqrt(b*b - 4.0*fmp2_m_radius2*c)) * inverse_2_fmp2_m_radius2, 0.5); \ - return texture2D(brushTexture, val); \ - }"; +static const char* const qglslRadialGradientBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + uniform highp float fmp2_m_radius2; \n\ + uniform highp float inverse_2_fmp2_m_radius2; \n\ + varying highp float b; \n\ + varying highp vec2 A; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + highp float c = -dot(A, A); \n\ + highp vec2 val = vec2((-b + sqrt(b*b - 4.0*fmp2_m_radius2*c)) * inverse_2_fmp2_m_radius2, 0.5); \n\ + return texture2D(brushTexture, val); \n\ + }\n"; // Texture Brush -static const char* const qglslPositionWithTextureBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec2 invertedTextureSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 textureCoords; \ - void setPosition(void) { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - textureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \ - }"; +static const char* const qglslPositionWithTextureBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec2 invertedTextureSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 textureCoords; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + textureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \n\ + }\n"; static const char* const qglslAffinePositionWithTextureBrushVertexShader = qglslPositionWithTextureBrushVertexShader; @@ -287,148 +294,165 @@ static const char* const qglslAffinePositionWithTextureBrushVertexShader // OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, // we emulate GL_REPEAT by only taking the fractional part of the texture coords. // TODO: Special case POT textures which don't need this emulation -static const char* const qglslTextureBrushSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(brushTexture, fract(textureCoords)); \ - }"; +static const char* const qglslTextureBrushSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() { \n\ + return texture2D(brushTexture, fract(textureCoords)); \n\ + }\n"; #else -static const char* const qglslTextureBrushSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(brushTexture, textureCoords); \ - }"; +static const char* const qglslTextureBrushSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return texture2D(brushTexture, textureCoords); \n\ + }\n"; #endif -static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp vec4 patternColor; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(brushTexture, textureCoords).r); \ - }"; +static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp vec4 patternColor; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(brushTexture, textureCoords).r); \n\ + }\n"; // Solid Fill Brush -static const char* const qglslSolidBrushSrcFragmentShader = "\ - uniform lowp vec4 fragmentColor; \ - lowp vec4 srcPixel() { \ - return fragmentColor; \ - }"; - -static const char* const qglslImageSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(imageTexture, textureCoords); \ - }"; - -static const char* const qglslCustomSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \ - lowp vec4 srcPixel() { \ - return customShader(imageTexture, textureCoords); \ - }"; - -static const char* const qglslImageSrcWithPatternFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp vec4 patternColor; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \ - }\n"; - -static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - lowp vec4 sample = texture2D(imageTexture, textureCoords); \ - sample.rgb = sample.rgb * sample.a; \ - return sample; \ - }"; - -static const char* const qglslShockingPinkSrcFragmentShader = "\ - lowp vec4 srcPixel() { \ - return vec4(0.98, 0.06, 0.75, 1.0); \ - }"; - -static const char* const qglslMainFragmentShader_ImageArrays = "\ - varying lowp float opacity; \ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel() * opacity; \ - }"; - -static const char* const qglslMainFragmentShader_CMO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(compose(srcPixel()*globalOpacity))); \ - }"; - -static const char* const qglslMainFragmentShader_CM = "\ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(compose(srcPixel())); \ - }"; - -static const char* const qglslMainFragmentShader_MO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(srcPixel()*globalOpacity); \ - }"; - -static const char* const qglslMainFragmentShader_M = "\ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(srcPixel()); \ - }"; - -static const char* const qglslMainFragmentShader_CO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = compose(srcPixel()*globalOpacity); \ - }"; - -static const char* const qglslMainFragmentShader_C = "\ - lowp vec4 srcPixel(); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = compose(srcPixel()); \ - }"; - -static const char* const qglslMainFragmentShader_O = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel()*globalOpacity; \ - }"; - -static const char* const qglslMainFragmentShader = "\ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel(); \ - }"; - -static const char* const qglslMaskFragmentShader = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src * mask.a; \ - }"; +static const char* const qglslSolidBrushSrcFragmentShader = "\n\ + uniform lowp vec4 fragmentColor; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return fragmentColor; \n\ + }\n"; + +static const char* const qglslImageSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return texture2D(imageTexture, textureCoords); \n\ + }\n"; + +static const char* const qglslCustomSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return customShader(imageTexture, textureCoords); \n\ + }\n"; + +static const char* const qglslImageSrcWithPatternFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp vec4 patternColor; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \n\ + }\n"; + +static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + lowp vec4 sample = texture2D(imageTexture, textureCoords); \n\ + sample.rgb = sample.rgb * sample.a; \n\ + return sample; \n\ + }\n"; + +static const char* const qglslShockingPinkSrcFragmentShader = "\n\ + lowp vec4 srcPixel() \n\ + { \n\ + return vec4(0.98, 0.06, 0.75, 1.0); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_ImageArrays = "\n\ + varying lowp float opacity; \n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel() * opacity; \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CMO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(compose(srcPixel()*globalOpacity))); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CM = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(compose(srcPixel())); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_MO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(srcPixel()*globalOpacity); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_M = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(srcPixel()); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = compose(srcPixel()*globalOpacity); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_C = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = compose(srcPixel()); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_O = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel()*globalOpacity; \n\ + }\n"; + +static const char* const qglslMainFragmentShader = "\n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel(); \n\ + }\n"; + +static const char* const qglslMaskFragmentShader = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + {\n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src * mask.a; \n\ + }\n"; // For source over with subpixel antialiasing, the final color is calculated per component as follows // (.a is alpha component, .c is red, green or blue component): @@ -445,23 +469,23 @@ static const char* const qglslMaskFragmentShader = "\ // dest.c = dest.c * (1 - mask.c) + src.c * alpha // -static const char* const qglslRgbMaskFragmentShaderPass1 = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src.a * mask; \ - }"; - -static const char* const qglslRgbMaskFragmentShaderPass2 = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src * mask; \ - }"; +static const char* const qglslRgbMaskFragmentShaderPass1 = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + { \n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src.a * mask; \n\ + }\n"; + +static const char* const qglslRgbMaskFragmentShaderPass2 = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + { \n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src * mask; \n\ + }\n"; /* Left to implement: -- cgit v0.12 From 06ee48f7ad7f5ab8bdbaed765d301fa2c0b417fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 21 Jan 2010 15:54:18 +0100 Subject: Make sure cursor is painted at the correct position when we are using IM. When the line edit was refactored into a line control this regression was introduced. This regression was introduced by change fb7d86cf23227302d48db279ec589221d11a1f6a. Task-number: QTBUG-4789 Reviewed-by: Alan Alpert --- src/gui/widgets/qlinecontrol.cpp | 5 ++++- src/gui/widgets/qlinecontrol_p.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 414c2ed..b0a64ea 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -524,8 +524,11 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl m_textLayout.draw(painter, offset, selections, clip); if (flags & DrawCursor){ + int cursor = m_cursor; + if (m_preeditCursor != -1) + cursor += m_preeditCursor; if(!m_blinkPeriod || m_blinkStatus) - m_textLayout.drawCursor(painter, offset, m_cursor, m_cursorWidth); + m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth); } } diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index 301ff72..d6f2705 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -549,7 +549,10 @@ inline qreal QLineControl::cursorToX(int cursor) const inline qreal QLineControl::cursorToX() const { - return cursorToX(m_cursor); + int cursor = m_cursor; + if (m_preeditCursor != -1) + cursor += m_preeditCursor; + return cursorToX(cursor); } inline bool QLineControl::isReadOnly() const -- cgit v0.12 From 474e0dce59e827e4dd502bf12e7817b2602fb2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 13 Jan 2010 16:44:57 +0100 Subject: Improve performance of QGraphicsItem::setParentItem. The biggest optimization here is "updateAncestorFlags()". It's much faster to update all the flags rather than trying to enable/disable certain flags according to the current state. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 67 ++++++++++++++++++++++----------- src/gui/graphicsview/qgraphicsitem_p.h | 9 +++-- src/gui/graphicsview/qgraphicsscene.cpp | 21 ++++++----- 3 files changed, 62 insertions(+), 35 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1361a89..541df7c 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -798,8 +798,36 @@ void QGraphicsItemPrivate::updateAncestorFlag(QGraphicsItem::GraphicsItemFlag ch return; } - foreach (QGraphicsItem *child, children) - child->d_ptr->updateAncestorFlag(childFlag, flag, enabled, false); + for (int i = 0; i < children.size(); ++i) + children.at(i)->d_ptr->updateAncestorFlag(childFlag, flag, enabled, false); +} + +void QGraphicsItemPrivate::updateAncestorFlags() +{ + int flags = 0; + if (parent) { + // Inherit the parent's ancestor flags. + QGraphicsItemPrivate *pd = parent->d_ptr.data(); + flags = pd->ancestorFlags; + + // Add in flags from the parent. + if (pd->filtersDescendantEvents) + flags |= AncestorFiltersChildEvents; + if (pd->handlesChildEvents) + flags |= AncestorHandlesChildEvents; + if (pd->flags & QGraphicsItem::ItemClipsChildrenToShape) + flags |= AncestorClipsChildren; + if (pd->flags & QGraphicsItem::ItemIgnoresTransformations) + flags |= AncestorIgnoresTransformations; + } + + if (ancestorFlags == flags) + return; // No change; stop propagation. + ancestorFlags = flags; + + // Propagate to children recursively. + for (int i = 0; i < children.size(); ++i) + children.at(i)->d_ptr->updateAncestorFlags(); } /*! @@ -1002,7 +1030,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (scene) { // Deliver the change to the index - scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); + if (scene->d_func()->indexMethod != QGraphicsScene::NoIndex) + scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); // Disable scene pos notifications for old ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) @@ -1042,7 +1071,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *p = parent; QGraphicsItem *parentFocusScopeItem = 0; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) { // If this item's focus scope's focus scope item points // to this item or a descendent, then clear it. QGraphicsItem *fsi = p->d_ptr->focusScopeItem; @@ -1063,11 +1092,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *ancestorScope = 0; QGraphicsItem *p = subFocusItem->d_ptr->parent; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) ancestorScope = p; - if (p->isPanel()) + if (p->d_ptr->flags & QGraphicsItem::ItemIsPanel) break; - p = p->parentItem(); + p = p->d_ptr->parent; } if (ancestorScope) newFocusScopeItem = ancestorScope; @@ -1075,7 +1104,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *p = newParent; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) { p->d_ptr->focusScopeItem = newFocusScopeItem; // Ensure the new item is no longer the subFocusItem. The // only way to set focus on a child of a focus scope is @@ -1111,30 +1140,24 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } // Inherit ancestor flags from the new parent. - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2)); - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1)); - updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape); - updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations); + updateAncestorFlags(); // Update item visible / enabled. - if (parent->isVisible() != visible) { - if (!parent->isVisible() || !explicitlyHidden) - setVisibleHelper(parent->isVisible(), /* explicit = */ false, /* update = */ !implicitUpdate); + if (parent->d_ptr->visible != visible) { + if (!parent->d_ptr->visible || !explicitlyHidden) + setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ !implicitUpdate); } if (parent->isEnabled() != enabled) { - if (!parent->isEnabled() || !explicitlyDisabled) - setEnabledHelper(parent->isEnabled(), /* explicit = */ false, /* update = */ !implicitUpdate); + if (!parent->d_ptr->enabled || !explicitlyDisabled) + setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ !implicitUpdate); } // Auto-activate if visible and the parent is active. - if (q->isVisible() && parent->isActive()) + if (visible && parent->isActive()) q->setActive(true); } else { // Inherit ancestor flags from the new parent. - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2)); - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1)); - updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape); - updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations); + updateAncestorFlags(); if (!inDestructor) { // Update item visible / enabled. diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 2d34b80..cfdd382 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -153,7 +153,7 @@ public: dirtyChildren(0), localCollisionHack(0), inSetPosHelper(0), - needSortChildren(1), // ### can be 0 by default? + needSortChildren(0), allChildrenDirty(0), fullUpdatePending(0), flags(0), @@ -197,6 +197,7 @@ public: void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag = NoFlag, bool enabled = false, bool root = true); + void updateAncestorFlags(); void setIsMemberOfGroup(bool enabled); void remapItemPos(QEvent *event, QGraphicsItem *item); QPointF genericMapFromScene(const QPointF &pos, const QWidget *viewport) const; @@ -721,11 +722,13 @@ inline QTransform QGraphicsItemPrivate::transformToParent() const inline void QGraphicsItemPrivate::ensureSortedChildren() { if (needSortChildren) { - qSort(children.begin(), children.end(), qt_notclosestLeaf); needSortChildren = 0; sequentialOrdering = 1; + if (children.isEmpty()) + return; + qSort(children.begin(), children.end(), qt_notclosestLeaf); for (int i = 0; i < children.size(); ++i) { - if (children[i]->d_ptr->siblingIndex != i) { + if (children.at(i)->d_ptr->siblingIndex != i) { sequentialOrdering = 0; break; } diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index cea723c..49925e1 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2482,12 +2482,12 @@ void QGraphicsScene::addItem(QGraphicsItem *item) qWarning("QGraphicsScene::addItem: cannot add null item"); return; } - if (item->scene() == this) { + if (item->d_ptr->scene == this) { qWarning("QGraphicsScene::addItem: item has already been added to this scene"); return; } // Remove this item from its existing scene - if (QGraphicsScene *oldScene = item->scene()) + if (QGraphicsScene *oldScene = item->d_ptr->scene) oldScene->removeItem(item); // Notify the item that its scene is changing, and allow the item to @@ -2496,15 +2496,15 @@ void QGraphicsScene::addItem(QGraphicsItem *item) qVariantFromValue(this))); QGraphicsScene *targetScene = qVariantValue(newSceneVariant); if (targetScene != this) { - if (targetScene && item->scene() != targetScene) + if (targetScene && item->d_ptr->scene != targetScene) targetScene->addItem(item); return; } // Detach this item from its parent if the parent's scene is different // from this scene. - if (QGraphicsItem *itemParent = item->parentItem()) { - if (itemParent->scene() != this) + if (QGraphicsItem *itemParent = item->d_ptr->parent) { + if (itemParent->d_ptr->scene != this) item->setParentItem(0); } @@ -2534,7 +2534,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) d->enableMouseTrackingOnViews(); } #ifndef QT_NO_CURSOR - if (d->allItemsUseDefaultCursor && item->hasCursor()) { + if (d->allItemsUseDefaultCursor && item->d_ptr->hasCursor) { d->allItemsUseDefaultCursor = false; if (d->allItemsIgnoreHoverEvents) // already enabled otherwise d->enableMouseTrackingOnViews(); @@ -2542,7 +2542,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) #endif //QT_NO_CURSOR // Enable touch events if the item accepts touch events. - if (d->allItemsIgnoreTouchEvents && item->acceptTouchEvents()) { + if (d->allItemsIgnoreTouchEvents && item->d_ptr->acceptTouchEvents) { d->allItemsIgnoreTouchEvents = false; d->enableTouchEventsOnViews(); } @@ -2575,8 +2575,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item) } // Add all children recursively - foreach (QGraphicsItem *child, item->children()) - addItem(child); + item->d_ptr->ensureSortedChildren(); + for (int i = 0; i < item->d_ptr->children.size(); ++i) + addItem(item->d_ptr->children.at(i)); // Resolve font and palette. item->d_ptr->resolveFont(d->font.resolve()); @@ -2619,7 +2620,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) } } - if (item->flags() & QGraphicsItem::ItemSendsScenePositionChanges) + if (item->d_ptr->flags & QGraphicsItem::ItemSendsScenePositionChanges) d->registerScenePosItem(item); // Ensure that newly added items that have subfocus set, gain -- cgit v0.12 From dc3005761d332f86d59257e2c6bb8aac70222b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 14 Jan 2010 11:43:05 +0100 Subject: Optimize QGraphicsScenePrivate::itemAcceptsHoverEvents_helper Make sure we do cheap tests before the more expensive ones. This function is called from QGraphicsScene::addItem. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsscene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 49925e1..fa9f794 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -3767,10 +3767,10 @@ void QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent *helpEvent) bool QGraphicsScenePrivate::itemAcceptsHoverEvents_helper(const QGraphicsItem *item) const { - return (!item->isBlockedByModalPanel() && - (item->acceptHoverEvents() - || (item->isWidget() - && static_cast(item)->d_func()->hasDecoration()))); + return (item->d_ptr->acceptsHover + || (item->d_ptr->isWidget + && static_cast(item)->d_func()->hasDecoration())) + && !item->isBlockedByModalPanel(); } /*! -- cgit v0.12 From 0dd05278e91ca1b0f4ffd32195584a57064ed24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 14 Jan 2010 16:13:37 +0100 Subject: Optimize QGraphicsItem::setFlags. We don't have to do a full blown QGraphicsItem::setFlag call from QGraphicsItem::setFlags, only to change the ItemStacksBehindParent bits. We can do it directly (with care). Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 541df7c..8d77fcb 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1630,7 +1630,7 @@ bool QGraphicsItem::isWidget() const */ bool QGraphicsItem::isWindow() const { - return isWidget() && (static_cast(this)->windowType() & Qt::Window); + return d_ptr->isWidget && (static_cast(this)->windowType() & Qt::Window); } /*! @@ -1667,9 +1667,9 @@ QGraphicsItem::GraphicsItemFlags QGraphicsItem::flags() const void QGraphicsItem::setFlag(GraphicsItemFlag flag, bool enabled) { if (enabled) - setFlags(flags() | flag); + setFlags(GraphicsItemFlags(d_ptr->flags) | flag); else - setFlags(flags() & ~flag); + setFlags(GraphicsItemFlags(d_ptr->flags) & ~flag); } /*! @@ -1716,7 +1716,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) flags = GraphicsItemFlags(itemChange(ItemFlagsChange, quint32(flags)).toUInt()); if (quint32(d_ptr->flags) == quint32(flags)) return; - if (d_ptr->scene) + if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, quint32(flags)); // Flags that alter the geometry of the item (or its children). @@ -1726,7 +1726,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->paintedViewBoundingRectsNeedRepaint = 1; // Keep the old flags to compare the diff. - GraphicsItemFlags oldFlags = this->flags(); + GraphicsItemFlags oldFlags = GraphicsItemFlags(d_ptr->flags); // Update flags. d_ptr->flags = flags; @@ -1755,7 +1755,23 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->updateAncestorFlag(ItemIgnoresTransformations); } + if ((flags & ItemNegativeZStacksBehindParent) != (oldFlags & ItemNegativeZStacksBehindParent)) { + // NB! We change the flags directly here, so we must also update d_ptr->flags. + // Note that this has do be done before the ItemStacksBehindParent check + // below; otherwise we will loose the change. + + // Update stack-behind. + if (d_ptr->z < qreal(0.0)) + flags |= ItemStacksBehindParent; + else + flags &= ~ItemStacksBehindParent; + d_ptr->flags = flags; + } + if ((flags & ItemStacksBehindParent) != (oldFlags & ItemStacksBehindParent)) { + // NB! This check has to come after the ItemNegativeZStacksBehindParent + // check above. Be careful. + // Ensure child item sorting is up to date when toggling this flag. if (d_ptr->parent) d_ptr->parent->d_ptr->needSortChildren = 1; @@ -1769,10 +1785,6 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->scene->d_func()->updateInputMethodSensitivityInViews(); } - if ((flags & ItemNegativeZStacksBehindParent) != (oldFlags & ItemNegativeZStacksBehindParent)) { - // Update stack-behind. - setFlag(ItemStacksBehindParent, d_ptr->z < qreal(0.0)); - } if ((d_ptr->panelModality != NonModal) && d_ptr->scene -- cgit v0.12 From b5754f5bd28ed01979e94983ae0480e913649d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 19 Jan 2010 13:18:55 +0100 Subject: Pass value as const void *const to QGraphicsSceneIndex::itemChange. We need this change in order to bypass some of the QVariant itemChange notifications from QGraphicsItem::setParentItem. All this is internal stuff and we know what we do, so I don't consider the change too ugly. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 8 ++++---- src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp | 10 +++++----- src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h | 2 +- src/gui/graphicsview/qgraphicssceneindex.cpp | 2 +- src/gui/graphicsview/qgraphicssceneindex_p.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 8d77fcb..5c7ea76 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1031,7 +1031,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (scene) { // Deliver the change to the index if (scene->d_func()->indexMethod != QGraphicsScene::NoIndex) - scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); + scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParent); // Disable scene pos notifications for old ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) @@ -1717,7 +1717,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) if (quint32(d_ptr->flags) == quint32(flags)) return; if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) - d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, quint32(flags)); + d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, &flags); // Flags that alter the geometry of the item (or its children). const quint32 geomChangeFlagsMask = (ItemClipsChildrenToShape | ItemClipsToShape | ItemIgnoresTransformations | ItemIsSelectable); @@ -4299,9 +4299,9 @@ void QGraphicsItem::setZValue(qreal z) if (newZ == d_ptr->z) return; - if (d_ptr->scene) { + if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) { // Z Value has changed, we have to notify the index. - d_ptr->scene->d_func()->index->itemChange(this, ItemZValueChange, newZVariant); + d_ptr->scene->d_func()->index->itemChange(this, ItemZValueChange, &newZ); } d_ptr->z = newZ; diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp index 2e92b87..2a91348 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp @@ -635,16 +635,17 @@ void QGraphicsSceneBspTreeIndex::updateSceneRect(const QRectF &rect) This method react to the \a change of the \a item and use the \a value to update the BSP tree if necessary. */ -void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value) +void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) { Q_D(QGraphicsSceneBspTreeIndex); switch (change) { case QGraphicsItem::ItemFlagsChange: { // Handle ItemIgnoresTransformations + QGraphicsItem::GraphicsItemFlags newFlags = *static_cast(value); bool ignoredTransform = item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations; - bool willIgnoreTransform = value.toUInt() & QGraphicsItem::ItemIgnoresTransformations; + bool willIgnoreTransform = newFlags & QGraphicsItem::ItemIgnoresTransformations; bool clipsChildren = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape; - bool willClipChildren = value.toUInt() & QGraphicsItem::ItemClipsChildrenToShape; + bool willClipChildren = newFlags & QGraphicsItem::ItemClipsChildrenToShape; if ((ignoredTransform != willIgnoreTransform) || (clipsChildren != willClipChildren)) { QGraphicsItem *thatItem = const_cast(item); // Remove item and its descendants from the index and append @@ -661,7 +662,7 @@ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphics case QGraphicsItem::ItemParentChange: { d->invalidateSortCache(); // Handle ItemIgnoresTransformations - QGraphicsItem *newParent = qVariantValue(value); + const QGraphicsItem *newParent = static_cast(value); bool ignoredTransform = item->d_ptr->itemIsUntransformable(); bool willIgnoreTransform = (item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations) || (newParent && newParent->d_ptr->itemIsUntransformable()); @@ -682,7 +683,6 @@ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphics default: break; } - return QGraphicsSceneIndex::itemChange(item, change, value); } /*! \reimp diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h index 119571b..f671fd9 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h @@ -97,7 +97,7 @@ protected: void removeItem(QGraphicsItem *item); void prepareBoundingRectChange(const QGraphicsItem *item); - void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value); + void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value); private : Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex) diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index bc8a7dc..043c4eb 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -624,7 +624,7 @@ void QGraphicsSceneIndex::deleteItem(QGraphicsItem *item) \sa QGraphicsItem::GraphicsItemChange */ -void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value) +void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) { Q_UNUSED(item); Q_UNUSED(change); diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h index def58f0..597a229 100644 --- a/src/gui/graphicsview/qgraphicssceneindex_p.h +++ b/src/gui/graphicsview/qgraphicssceneindex_p.h @@ -110,7 +110,7 @@ protected: virtual void removeItem(QGraphicsItem *item) = 0; virtual void deleteItem(QGraphicsItem *item); - virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const QVariant &value); + virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const void *const value); virtual void prepareBoundingRectChange(const QGraphicsItem *item); QGraphicsSceneIndex(QGraphicsSceneIndexPrivate &dd, QGraphicsScene *scene); -- cgit v0.12 From 3c215a1644adcca32cfc451456b6891f9c8519fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 19 Jan 2010 13:30:55 +0100 Subject: Only send QGraphicsItem::ParentChange(d) notifications from setParentItem. QmlGraphicsItem doesn't need any parent change notifactions so we can call the helper class (QGraphicsItemPrivate::setParentItemHelper) direclty from QmlGraphicsItem::setParentItem. This avoids a lot of unnecessary instructions related to QVariant constructions as well as virtual function calls. I've made the variant pointers explicit in the declaration of setParentItemHelper so that we don't accidentally call setParentItemHelper from places where we need parent change notifications. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 43 +++++++++++++++++++-------------- src/gui/graphicsview/qgraphicsitem_p.h | 3 ++- src/gui/graphicsview/qgraphicsscene.cpp | 2 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 5c7ea76..d43176b 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1012,19 +1012,10 @@ QVariant QGraphicsItemPrivate::inputMethodQueryHelper(Qt::InputMethodQuery query prepareGeometryChange) if the item is in its destructor, i.e. inDestructor is 1. */ -void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) +void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const QVariant *newParentVariant, + const QVariant *thisPointerVariant) { Q_Q(QGraphicsItem); - if (newParent == q) { - qWarning("QGraphicsItem::setParentItem: cannot assign %p as a parent of itself", this); - return; - } - if (newParent == parent) - return; - - const QVariant newParentVariant(q->itemChange(QGraphicsItem::ItemParentChange, - qVariantFromValue(newParent))); - newParent = qVariantValue(newParentVariant); if (newParent == parent) return; @@ -1049,11 +1040,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (!inDestructor) q_ptr->prepareGeometryChange(); - const QVariant thisPointerVariant(qVariantFromValue(q)); if (parent) { // Remove from current parent parent->d_ptr->removeChild(q); - parent->itemChange(QGraphicsItem::ItemChildRemovedChange, thisPointerVariant); + if (thisPointerVariant) + parent->itemChange(QGraphicsItem::ItemChildRemovedChange, *thisPointerVariant); } // Update toplevelitem list. If this item is being deleted, its parent @@ -1129,7 +1120,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } parent->d_ptr->addChild(q); - parent->itemChange(QGraphicsItem::ItemChildAddedChange, thisPointerVariant); + if (thisPointerVariant) + parent->itemChange(QGraphicsItem::ItemChildAddedChange, *thisPointerVariant); if (scene) { if (!implicitUpdate) scene->d_func()->markDirty(q_ptr); @@ -1184,7 +1176,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } // Deliver post-change notification - q->itemChange(QGraphicsItem::ItemParentHasChanged, newParentVariant); + if (newParentVariant) + q->itemChange(QGraphicsItem::ItemParentHasChanged, *newParentVariant); if (isObject) emit static_cast(q)->parentChanged(); @@ -1373,7 +1366,7 @@ QGraphicsItem::~QGraphicsItem() d_ptr->scene->d_func()->removeItemHelper(this); } else { d_ptr->resetFocusProxy(); - d_ptr->setParentItemHelper(0); + setParentItem(0); } #ifndef QT_NO_GRAPHICSEFFECT @@ -1578,9 +1571,23 @@ const QGraphicsObject *QGraphicsItem::toGraphicsObject() const \sa parentItem(), childItems() */ -void QGraphicsItem::setParentItem(QGraphicsItem *parent) +void QGraphicsItem::setParentItem(QGraphicsItem *newParent) { - d_ptr->setParentItemHelper(parent); + if (newParent == this) { + qWarning("QGraphicsItem::setParentItem: cannot assign %p as a parent of itself", this); + return; + } + if (newParent == d_ptr->parent) + return; + + const QVariant newParentVariant(itemChange(QGraphicsItem::ItemParentChange, + qVariantFromValue(newParent))); + newParent = qVariantValue(newParentVariant); + if (newParent == d_ptr->parent) + return; + + const QVariant thisPointerVariant(qVariantFromValue(this)); + d_ptr->setParentItemHelper(newParent, &newParentVariant, &thisPointerVariant); } /*! diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index cfdd382..ac10aa7 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -230,7 +230,8 @@ public: void resolveDepth(); void addChild(QGraphicsItem *child); void removeChild(QGraphicsItem *child); - void setParentItemHelper(QGraphicsItem *parent); + void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant, + const QVariant *thisPointerVariant); void childrenBoundingRectHelper(QTransform *x, QRectF *rect); void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems = false) const; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index fa9f794..088a6b9 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -599,7 +599,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) if (parentItem->scene()) { Q_ASSERT_X(parentItem->scene() == q, "QGraphicsScene::removeItem", "Parent item's scene is different from this item's scene"); - item->d_ptr->setParentItemHelper(0); + item->setParentItem(0); } } else { unregisterTopLevelItem(item); -- cgit v0.12 From 57c7df82ffbace8924c7ac8875ef4343783a2376 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 21 Jan 2010 08:49:12 +0100 Subject: Don't use a mutex lock in QPainter::redirection unless strictly required Reviewed-by: Trond --- src/gui/painting/qpainter.cpp | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 31132d9..1258d6b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7382,10 +7382,15 @@ struct QPaintDeviceRedirection typedef QList QPaintDeviceRedirectionList; Q_GLOBAL_STATIC(QPaintDeviceRedirectionList, globalRedirections) Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) +Q_GLOBAL_STATIC(QAtomicInt, globalRedirectionAtomic) /*! \threadsafe + \obsolete + + Please use QWidget::render() instead. + Redirects all paint commands for the given paint \a device, to the \a replacement device. The optional point \a offset defines an offset within the source device. @@ -7395,9 +7400,10 @@ Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) device's painter (if any) before redirecting. Call restoreRedirected() to restore the previous redirection. - In general, you'll probably find that calling - QPixmap::grabWidget() or QPixmap::grabWindow() is an easier - solution. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. \sa redirected(), restoreRedirected() */ @@ -7429,14 +7435,24 @@ void QPainter::setRedirected(const QPaintDevice *device, Q_ASSERT(redirections != 0); *redirections += QPaintDeviceRedirection(device, rdev ? rdev : replacement, offset + roffset, hadInternalWidgetRedirection ? redirections->size() - 1 : -1); + globalRedirectionAtomic()->ref(); } /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Restores the previous redirection for the given \a device after a call to setRedirected(). + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa redirected() */ void QPainter::restoreRedirected(const QPaintDevice *device) @@ -7447,6 +7463,7 @@ void QPainter::restoreRedirected(const QPaintDevice *device) Q_ASSERT(redirections != 0); for (int i = redirections->size()-1; i >= 0; --i) { if (redirections->at(i) == device) { + globalRedirectionAtomic()->deref(); const int internalWidgetRedirectionIndex = redirections->at(i).internalWidgetRedirectionIndex; redirections->removeAt(i); // Restore the internal widget redirection, i.e. remove it from the global @@ -7468,21 +7485,34 @@ void QPainter::restoreRedirected(const QPaintDevice *device) /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Returns the replacement for given \a device. The optional out parameter \a offset returns the offset within the replaced device. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa setRedirected(), restoreRedirected() */ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { Q_ASSERT(device != 0); + if (*globalRedirectionAtomic() == 0) + return 0; + if (device->devType() == QInternal::Widget) { const QWidgetPrivate *widgetPrivate = static_cast(device)->d_func(); if (widgetPrivate->redirectDev) return widgetPrivate->redirected(offset); } + QMutexLocker locker(globalRedirectionsMutex()); QPaintDeviceRedirectionList *redirections = globalRedirections(); Q_ASSERT(redirections != 0); @@ -7500,6 +7530,9 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { + if (*globalRedirectionAtomic() == 0) + return; + QMutex *mutex = 0; QT_TRY { mutex = globalRedirectionsMutex(); -- cgit v0.12 From 03c77ad02d5a3c69f4edfdfd2f3ef7cd7dc67aaa Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 08:31:32 +0100 Subject: Fix documentation bug in QColor --- src/gui/painting/qcolor.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index f51dc36..d6d288e 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -934,8 +934,7 @@ void QColor::setRgb(int r, int g, int b, int a) /*! \fn QRgb QColor::rgba() const - Returns the RGB value of the color. Unlike rgb(), the alpha is not - stripped. + Returns the RGB value of the color, including its alpha. For an invalid color, the alpha value of the returned color is unspecified. @@ -950,8 +949,7 @@ QRgb QColor::rgba() const } /*! - Sets the RGBA value to \a rgba. Unlike setRgb(QRgb rgb), this function does - not ignore the alpha. + Sets the RGB value to \a rgba, including its alpha. \sa rgba(), rgb() */ @@ -968,8 +966,7 @@ void QColor::setRgba(QRgb rgba) /*! \fn QRgb QColor::rgb() const - Returns the RGB value of the color. The alpha is stripped for - compatibility. + Returns the RGB value of the color. The alpha value is opaque. \sa getRgb(), rgba() */ @@ -983,7 +980,7 @@ QRgb QColor::rgb() const /*! \overload - Sets the RGB value to \a rgb, ignoring the alpha. + Sets the RGB value to \a rgb. The alpha value is set to opaque. */ void QColor::setRgb(QRgb rgb) { -- cgit v0.12 From 820f55c3274c07a42ea01a96ad5405db343891d2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 22 Jan 2010 09:18:28 +0100 Subject: Fix the parallel build of QtWebKit Added the missing dependency to xmlpatterns, to ensure it's built before QtWebKit if available. Reviewed-by: Tom --- src/src.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/src.pro b/src/src.pro index 8dec49b..f2070ae 100644 --- a/src/src.pro +++ b/src/src.pro @@ -106,6 +106,7 @@ src_declarative.target = sub-declarative contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network src_xml contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon + contains(QT_CONFIG, xmlpatterns): src_webkit.depends += src_xmlpatterns contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit #exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore } -- cgit v0.12 From fa41110be15ce458bd2b49bda03b147775d2ab01 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 22 Jan 2010 10:13:53 +0100 Subject: removed a debug trace --- src/corelib/animation/qabstractanimation.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 2b4ab47..cedb43f 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -299,8 +299,6 @@ void QUnifiedTimer::registerRunningAnimation(QAbstractAnimation *animation) return; if (QAbstractAnimationPrivate::get(animation)->isPause) { - if (animation->duration() == -1) - qDebug() << "toto"; runningPauseAnimations << animation; } else runningLeafAnimations++; -- cgit v0.12 From ec44f83c4c7fa77e609a2458c4a5e26054fd5e85 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 22 Jan 2010 11:10:35 +0100 Subject: Fix rendering with simple shader in GL2 engine Need to bind the PMV matrix's attributes to their indexes in the simple shader, which is created in a seperate code path to all the other shaders. This should fix the qgl autotest failures. Reviewed-By: TrustMe --- src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 9fd9e18..8183f08 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -184,6 +184,9 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) simpleShaderProg->addShader(vertexShader); simpleShaderProg->addShader(fragShader); simpleShaderProg->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix1", QT_PMV_MATRIX_1_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix2", QT_PMV_MATRIX_2_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix3", QT_PMV_MATRIX_3_ATTR); simpleShaderProg->link(); if (!simpleShaderProg->isLinked()) { qCritical() << "Errors linking simple shader:" -- cgit v0.12 From 5236f93d78d0a09f80819d364867793dd73112e9 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 22 Jan 2010 11:30:05 +0100 Subject: Add a reference to adjustSize() from the size property Task-number: QTBUG-7401 Reviewed-by: TrustMe --- src/gui/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 81a9a80..5fedb31 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -3344,7 +3344,7 @@ QPoint QWidget::pos() const \note Setting the size to \c{QSize(0, 0)} will cause the widget to not appear on screen. This also applies to windows. - \sa pos, geometry, minimumSize, maximumSize, resizeEvent() + \sa pos, geometry, minimumSize, maximumSize, resizeEvent(), adjustSize() */ /*! -- cgit v0.12 From 2ab883ca32df15f649b98120278707e078668c05 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 12:39:18 +0100 Subject: Fix y-inverted pixmaps properly. There is a lot of code depending on that pixmaps are flipped upside down in the gl graphicssystem, so toggling this requires extensive testing. Since we're anyway questioning the relevance of this feature (compared to raster + GL viewport) its simply not worth the effort to fix it properly right now. Revert "Fixed y-inverted pixmaps on N900." This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01. --- src/opengl/qpixmapdata_gl.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 6d47687..aa80664 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -252,10 +252,6 @@ QGLPixmapData::QGLPixmapData(PixelType type) { setSerialNumber(++qt_gl_pixmap_serial); m_glDevice.setPixmapData(this); - - // Set InteralBindOptions minus the memory managed, since this - // QGLTexture is not managed as part of the internal texture cache - m_texture.options = QGLContext::PremultipliedAlphaBindOption; } QGLPixmapData::~QGLPixmapData() @@ -344,18 +340,18 @@ void QGLPixmapData::ensureCreated() const } if (!m_source.isNull()) { - glBindTexture(target, m_texture.id); if (external_format == GL_RGB) { - const QImage tx = m_source.convertToFormat(QImage::Format_RGB888); + const QImage tx = m_source.convertToFormat(QImage::Format_RGB888).mirrored(false, true); + + glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); } else { const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format); + + glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); - // convertToGLFormat will flip the Y axis, so it needs to - // be drawn upside down - m_texture.options |= QGLContext::InvertedYBindOption; } if (useFramebufferObjects()) -- cgit v0.12 From b4eb07f77f2b5793151a9aa9fb60fd3ef96c21da Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 21 Jan 2010 18:17:13 +0100 Subject: Use HighlightAllOccurrences to have highlighting after full text search. Also use HighlightAllOccurrences to have highlighting during type and search. Some more refactoring. Task-number: QTBUG-3335 Reviewed-by: ck --- tools/assistant/tools/assistant/centralwidget.cpp | 95 +++++++++++++++-------- tools/assistant/tools/assistant/centralwidget.h | 8 +- 2 files changed, 67 insertions(+), 36 deletions(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index 0b177ae..c8f41e4 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -358,7 +358,7 @@ void CentralWidget::zoomOut() void CentralWidget::findNext() { - find(findWidget->editFind->text(), true, false); + find(findWidget->editFind->text(), true); } void CentralWidget::nextPage() @@ -389,7 +389,7 @@ void CentralWidget::previousPage() void CentralWidget::findPrevious() { - find(findWidget->editFind->text(), false, true); + find(findWidget->editFind->text(), false); } void CentralWidget::closeTab() @@ -697,7 +697,7 @@ HelpViewer *CentralWidget::newEmptyTab() void CentralWidget::findCurrentText(const QString &text) { - find(text, false, false); + find(text, true); } void CentralWidget::connectSignals() @@ -896,19 +896,35 @@ void CentralWidget::keyPressEvent(QKeyEvent *e) QWidget::keyPressEvent(e); } -void CentralWidget::find(const QString &ttf, bool forward, bool backward) +void CentralWidget::find(const QString &ttf, bool forward) { QPalette p = findWidget->editFind->palette(); p.setColor(QPalette::Active, QPalette::Base, Qt::white); - if (!ttf.isEmpty()) { - HelpViewer *viewer = currentHelpViewer(); + bool found = false; - bool found = false; +#if defined(QT_NO_WEBKIT) + found = findInTextBrowser(ttf, forward); +#else + found = findInWebPage(ttf, forward); +#endif + + if (!found && !ttf.isEmpty()) + p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); + + if (!findWidget->isVisible()) + findWidget->show(); + findWidget->editFind->setPalette(p); +} + +bool CentralWidget::findInWebPage(const QString &ttf, bool forward) +{ #if !defined(QT_NO_WEBKIT) - if (viewer) { - QWebPage::FindFlags options; - if (backward) + if (HelpViewer *viewer = currentHelpViewer()) { + bool found = false; + QWebPage::FindFlags options; + if (!ttf.isEmpty()) { + if (!forward) options |= QWebPage::FindBackward; if (findWidget->checkCase->isChecked()) @@ -923,30 +939,27 @@ void CentralWidget::find(const QString &ttf, bool forward, bool backward) if (found) findWidget->labelWrapped->show(); } - } else if (tabWidget->currentWidget() == m_searchWidget) { - QTextBrowser *browser = qFindChild(m_searchWidget); - found = findInTextBrowser(browser, ttf, forward, backward); } -#else - QTextBrowser *browser = qobject_cast(viewer); - if (tabWidget->currentWidget() == m_searchWidget) - browser = qFindChild(m_searchWidget); - found = findInTextBrowser(browser, ttf, forward, backward); -#endif - - if (!found) - p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); + // force highlighting of all other matches, also when empty (clear) + options = QWebPage::HighlightAllOccurrences; + viewer->findText(QLatin1String(""), options); + viewer->findText(ttf, options); + return found; } - if (!findWidget->isVisible()) - findWidget->show(); - findWidget->editFind->setPalette(p); + // this needs to stay, case for active search results page + return findInTextBrowser(ttf, forward); +#endif + return false; } -bool CentralWidget::findInTextBrowser(QTextBrowser* browser, const QString &ttf, - bool forward, bool backward) +bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward) { - if (!browser) + QTextBrowser *browser = qobject_cast(currentHelpViewer()); + if (tabWidget->currentWidget() == m_searchWidget) + browser = qFindChild(m_searchWidget); + + if (!browser || ttf.isEmpty()) return false; QTextDocument *doc = browser->document(); @@ -962,7 +975,7 @@ bool CentralWidget::findInTextBrowser(QTextBrowser* browser, const QString &ttf, QTextCursor::MoveAnchor); } - if (backward) + if (!forward) options |= QTextDocument::FindBackward; if (findWidget->checkCase->isChecked()) @@ -1074,20 +1087,29 @@ void CentralWidget::setSourceFromSearch(const QUrl &url) { setSource(url); - highlightSearchTerms(); +#if defined(QT_NO_WEBKIT) + highlightSearchTerms() +#else + connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, + SLOT(highlightSearchTerms())); +#endif } void CentralWidget::setSourceFromSearchInNewTab(const QUrl &url) { setSourceInNewTab(url); - highlightSearchTerms(); +#if defined(QT_NO_WEBKIT) + highlightSearchTerms() +#else + connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, + SLOT(highlightSearchTerms())); +#endif } void CentralWidget::highlightSearchTerms() { -#if defined(QT_NO_WEBKIT) HelpViewer *viewer = currentHelpViewer(); if (!viewer) return; @@ -1109,6 +1131,7 @@ CentralWidget::highlightSearchTerms() } } +#if defined(QT_NO_WEBKIT) viewer->viewport()->setUpdatesEnabled(false); QTextCharFormat marker; @@ -1140,6 +1163,14 @@ CentralWidget::highlightSearchTerms() viewer->setTextCursor(firstHit); viewer->viewport()->setUpdatesEnabled(true); +#else + viewer->findText("", QWebPage::HighlightAllOccurrences); + // clears existing selections + foreach (const QString& term, terms) + viewer->findText(term, QWebPage::HighlightAllOccurrences); + + disconnect(viewer, SIGNAL(loadFinished(bool)), this, + SLOT(highlightSearchTerms())); #endif } diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h index 6c23190..9e32985 100644 --- a/tools/assistant/tools/assistant/centralwidget.h +++ b/tools/assistant/tools/assistant/centralwidget.h @@ -182,16 +182,16 @@ private slots: void printPreview(QPrinter *printer); void setSourceFromSearch(const QUrl &url); void setSourceFromSearchInNewTab(const QUrl &url); + void highlightSearchTerms(); private: void connectSignals(); bool eventFilter(QObject *object, QEvent *e); - void find(const QString &ttf, bool forward, bool backward); - bool findInTextBrowser(QTextBrowser* browser, const QString &ttf, - bool forward, bool backward); + void find(const QString &ttf, bool forward); + bool findInWebPage(const QString &ttf, bool forward); + bool findInTextBrowser(const QString &ttf, bool forward); void initPrinter(); QString quoteTabTitle(const QString &title) const; - void highlightSearchTerms(); void setLastShownPages(); void getBrowserFontFor(QWidget* viewer, QFont *font); -- cgit v0.12 From cbfe5019e135b85df37b3f38f79bef4dbe397cf6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 22 Jan 2010 13:55:31 +0100 Subject: revert parts of 10392eef4fd4f9 We can't call QCOMPARE from within a nested function, because the return statement will just exit that function. VERIFY_COLOR can't be turned into a function this way. --- tests/auto/qwidget/tst_qwidget.cpp | 50 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ee4e726..ea90ae3 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -5439,26 +5439,24 @@ public: QRegion r; }; -template -void verifyColor(R const& region, C const& color) -{ - const QRegion r = QRegion(region); - for (int i = 0; i < r.rects().size(); ++i) { - const QRect rect = r.rects().at(i); - for (int t = 0; t < 5; t++) { - const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), - rect.left(), rect.top(), - rect.width(), rect.height()); - QCOMPARE(pixmap.size(), rect.size()); - QPixmap expectedPixmap(pixmap); /* ensure equal formats */ - expectedPixmap.fill(color); - if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) - { QTest::qWait(200); continue; } - QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); - QCOMPARE(pixmap, expectedPixmap); - break; - } - } +#define VERIFY_COLOR(region, color) { \ + const QRegion r = QRegion(region); \ + for (int i = 0; i < r.rects().size(); ++i) { \ + const QRect rect = r.rects().at(i); \ + for (int t = 0; t < 5; t++) { \ + const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), \ + rect.left(), rect.top(), \ + rect.width(), rect.height()); \ + QCOMPARE(pixmap.size(), rect.size()); \ + QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \ + expectedPixmap.fill(color); \ + if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) \ + { QTest::qWait(200); continue; } \ + QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); \ + QCOMPARE(pixmap, expectedPixmap); \ + break; \ + } \ + } \ } void tst_QWidget::moveChild_data() @@ -5499,9 +5497,9 @@ void tst_QWidget::moveChild() #endif QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry()); QTRY_COMPARE(child.r, QRegion(child.rect())); - verifyColor(child.geometry().translated(tlwOffset), + VERIFY_COLOR(child.geometry().translated(tlwOffset), child.color); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), parent.color); parent.reset(); child.reset(); @@ -5520,9 +5518,9 @@ void tst_QWidget::moveChild() // should be scrolled in backingstore QCOMPARE(child.r, QRegion()); #endif - verifyColor(child.geometry().translated(tlwOffset), + VERIFY_COLOR(child.geometry().translated(tlwOffset), child.color); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), parent.color); } @@ -5553,8 +5551,8 @@ void tst_QWidget::showAndMoveChild() child.move(desktopDimensions.width()/2, desktopDimensions.height()/2); qApp->processEvents(); - verifyColor(child.geometry().translated(tlwOffset), Qt::blue); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red); + VERIFY_COLOR(child.geometry().translated(tlwOffset), Qt::blue); + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red); } void tst_QWidget::subtractOpaqueSiblings() -- cgit v0.12 From c8f4319b3a2ddacacd3bca67861a41e22dd1ada0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 22 Jan 2010 13:56:21 +0100 Subject: Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. Modal Mac/Carbon dialogs do not have the close, minimize and resize window title buttons enabled, which makes it very hard to close modal dialogs. Task-number: QTBUG-7481 Reviewed-by: Kim --- src/gui/dialogs/qprintpreviewdialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 42be780..6723b53 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -207,6 +207,9 @@ public: QActionGroup *printerGroup; QAction *printAction; QAction *pageSetupAction; +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + QAction *closeAction; +#endif QPointer receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -287,6 +290,9 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer) toolbar->addSeparator(); toolbar->addAction(pageSetupAction); toolbar->addAction(printAction); +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + toolbar->addAction(closeAction); +#endif // Cannot use the actions' triggered signal here, since it doesn't autorepeat QToolButton *zoomInButton = static_cast(toolbar->widgetForAction(zoomInAction)); @@ -406,6 +412,10 @@ void QPrintPreviewDialogPrivate::setupActions() qt_setupActionIcon(pageSetupAction, QLatin1String("page-setup")); QObject::connect(printAction, SIGNAL(triggered(bool)), q, SLOT(_q_print())); QObject::connect(pageSetupAction, SIGNAL(triggered(bool)), q, SLOT(_q_pageSetup())); +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + closeAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Close")); + QObject::connect(closeAction, SIGNAL(triggered(bool)), q, SLOT(reject())); +#endif // Initial state: fitPageAction->setChecked(true); -- cgit v0.12 From c50788df123d848b8212376884376cc216c31015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 22 Jan 2010 14:25:18 +0100 Subject: Fix NSCFNumber autorelease warning on Mac. Task: QTBUG-7385 Revby: Lorn Potter --- src/gui/kernel/qapplication_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 6aebef5..847c58d 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -227,6 +227,10 @@ void onApplicationChangedActivation( bool activated ); static void qt_mac_read_fontsmoothing_settings() { +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool2; +#endif + NSInteger appleFontSmoothing = [[NSUserDefaults standardUserDefaults] integerForKey:@"AppleFontSmoothing"]; qt_applefontsmoothing_enabled = (appleFontSmoothing > 0); } -- cgit v0.12 From 6968a9b9281ef191c566a8e44447fc299cbdd4b7 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 14:47:15 +0100 Subject: Fix QPainter::redirection() to pass autotest. Reviewed-by: Trond --- src/gui/painting/qpainter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1258d6b..cde6a2d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7503,15 +7503,14 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { Q_ASSERT(device != 0); - if (*globalRedirectionAtomic() == 0) - return 0; - if (device->devType() == QInternal::Widget) { const QWidgetPrivate *widgetPrivate = static_cast(device)->d_func(); if (widgetPrivate->redirectDev) return widgetPrivate->redirected(offset); } + if (*globalRedirectionAtomic() == 0) + return 0; QMutexLocker locker(globalRedirectionsMutex()); QPaintDeviceRedirectionList *redirections = globalRedirections(); -- cgit v0.12 From df01c399c0d9f3412c872ad9ccb7342af0a44ea2 Mon Sep 17 00:00:00 2001 From: Thorvald Natvig Date: Fri, 22 Jan 2010 14:33:03 +0100 Subject: Fix QUrl::toAce for domains with dot at end Merge-request: 436 Reviewed-by: Thiago Macieira --- src/corelib/io/qurl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index a131d6c..ba1110d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3241,8 +3241,11 @@ static QString qt_ACE_do(const QString &domain, AceOperation op) while (1) { int idx = nextDotDelimiter(domain, lastIdx); int labelLength = idx - lastIdx; - if (labelLength == 0) + if (labelLength == 0) { + if (idx == domain.length() && idx > 0) + break; return QString(); // two delimiters in a row -- empty label not allowed + } // RFC 3490 says, about the ToASCII operation: // 3. If the UseSTD3ASCIIRules flag is set, then perform these checks: -- cgit v0.12 From 670f90b3068d530f14000eb816dd9ff38f9fb005 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 22 Jan 2010 15:00:27 +0100 Subject: Autotest: add a test for allowing hostnames ending in dot Also, since domain is never empty, the idx > 0 test is unnecessary. --- src/corelib/io/qurl.cpp | 2 +- tests/auto/qurl/tst_qurl.cpp | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index ba1110d..076cc33 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3242,7 +3242,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op) int idx = nextDotDelimiter(domain, lastIdx); int labelLength = idx - lastIdx; if (labelLength == 0) { - if (idx == domain.length() && idx > 0) + if (idx == domain.length()) break; return QString(); // two delimiters in a row -- empty label not allowed } diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 33812fe..f108f4c 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -165,6 +165,8 @@ private slots: void ace_testsuite(); void std3violations_data(); void std3violations(); + void std3deviations_data(); + void std3deviations(); void tldRestrictions_data(); void tldRestrictions(); void emptyQueryOrFragment(); @@ -3238,6 +3240,8 @@ void tst_QUrl::std3violations_data() QTest::newRow("bang") << "foo!" << false; QTest::newRow("plus") << "foo+bar" << false; QTest::newRow("dot") << "foo.bar"; + QTest::newRow("startingdot") << ".bar" << false; + QTest::newRow("startingdot2") << ".example.com" << false; QTest::newRow("slash") << "foo/bar" << true; QTest::newRow("colon") << "foo:80" << true; QTest::newRow("question") << "foo?bar" << true; @@ -3282,6 +3286,24 @@ void tst_QUrl::std3violations() QVERIFY(!url.isValid()); } +void tst_QUrl::std3deviations_data() +{ + QTest::addColumn("source"); + + QTest::newRow("ending-dot") << "example.com."; + QTest::newRow("ending-dot3002") << QString("example.com") + QChar(0x3002); +} + +void tst_QUrl::std3deviations() +{ + QFETCH(QString, source); + QVERIFY(!QUrl::toAce(source).isEmpty()); + + QUrl url; + url.setHost(source); + QVERIFY(!url.host().isEmpty()); +} + void tst_QUrl::tldRestrictions_data() { QTest::addColumn("tld"); -- cgit v0.12 From f4ad659dde0c4b0b61dcc2bc5a69441f13c013b7 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Fri, 22 Jan 2010 15:03:42 +0100 Subject: minor optimization avoid needless atomic operations Merge-request: 442 Reviewed-by: Thiago Macieira --- src/dbus/qdbusmarshaller.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp index f156e04..8ec328e 100644 --- a/src/dbus/qdbusmarshaller.cpp +++ b/src/dbus/qdbusmarshaller.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qdbusargument_p.h" +#include "qdbusmetatype_p.h" #include "qdbusutil_p.h" QT_BEGIN_NAMESPACE @@ -167,7 +168,7 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg) QByteArray tmpSignature; const char *signature = 0; - if (int(id) == qMetaTypeId()) { + if (int(id) == QDBusMetaTypeId::argument) { // take the signature from the QDBusArgument object we're marshalling tmpSignature = qvariant_cast(value).currentSignature().toLatin1(); @@ -353,7 +354,7 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg) } // intercept QDBusArgument parameters here - if (id == qMetaTypeId()) { + if (id == QDBusMetaTypeId::argument) { QDBusArgument dbusargument = qvariant_cast(arg); QDBusArgumentPrivate *d = QDBusArgumentPrivate::d(dbusargument); if (!d->message) -- cgit v0.12 From 5ea0be16612625aa75fbd6e519a3cbc7971c65c4 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Fri, 22 Jan 2010 15:03:42 +0100 Subject: fix copy-paste error Merge-request: 442 Reviewed-by: Thiago Macieira --- src/dbus/qdbusargument.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp index 3466d90..7defc9a 100644 --- a/src/dbus/qdbusargument.cpp +++ b/src/dbus/qdbusargument.cpp @@ -535,7 +535,6 @@ QDBusArgument &QDBusArgument::operator<<(const QByteArray &arg) /*! \internal - Returns the type signature of the D-Bus type this QDBusArgument \since 4.5 Appends the variant \a v. -- cgit v0.12 From fa51e0a61fac98b20e55cb8734556d10acdbd1bc Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 22 Jan 2010 16:23:02 +0100 Subject: Doc: Fixed installation information for Qt for Embedded Linux. Reviewed-by: Trust Me --- doc/src/platforms/emb-install.qdoc | 4 +++- doc/src/snippets/code/doc_src_emb-install.qdoc | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/src/platforms/emb-install.qdoc b/doc/src/platforms/emb-install.qdoc index c13fbef..623ba89 100644 --- a/doc/src/platforms/emb-install.qdoc +++ b/doc/src/platforms/emb-install.qdoc @@ -84,7 +84,9 @@ Before building the \l{Qt for Embedded Linux} library, run the \c ./configure script to configure the library for your development architecture. You can list all of the configuration system's - options by typing \c {./configure -help}. + options by typing + + \snippet doc/src/snippets/code/doc_src_emb-install.qdoc embedded help Note that by default, \l{Qt for Embedded Linux} is configured for installation in the \c{/usr/local/Trolltech/QtEmbedded-%VERSION%} diff --git a/doc/src/snippets/code/doc_src_emb-install.qdoc b/doc/src/snippets/code/doc_src_emb-install.qdoc index 60775d2..f24f087 100644 --- a/doc/src/snippets/code/doc_src_emb-install.qdoc +++ b/doc/src/snippets/code/doc_src_emb-install.qdoc @@ -41,18 +41,22 @@ //! [0] cd -gunzip qt-embedded-linux-commercial-src-%VERSION%.tar.gz -tar xf qt-embedded-linux-commercial-src-%VERSION%.tar +gunzip qt-everywhere-opensource-src-%VERSION%.tar.gz +tar xf qt-everywhere-opensource-src-%VERSION%.tar //! [0] //! [1] -~/qt-embedded-linux-commercial-src-%VERSION% +~/qt-everywhere-opensource-src-%VERSION% //! [1] +//! [embedded help] +./configure -embedded -help +//! [embedded help] + //! [2] -cd ~/qt-embedded-linux-commercial-src-%VERSION% +cd ~/qt-everywhere-opensource-src-%VERSION% ./configure -embedded [architecture] //! [2] -- cgit v0.12 From d8547cb670cee0e06f49697c7b36d447e27e455e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 22 Jan 2010 16:24:36 +0100 Subject: Doc: Added a warning about the Accelerated Graphics Driver example. Task-number: QTBUG-7403 Reviewed-by: Trust Me --- doc/src/examples/svgalib.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc index 9142112..cf6512c 100644 --- a/doc/src/examples/svgalib.qdoc +++ b/doc/src/examples/svgalib.qdoc @@ -43,6 +43,9 @@ \example qws/svgalib \title Accelerated Graphics Driver Example + \warning This example was designed to work with Qt 4.4 and will not work + with current versions of Qt. It will be removed from Qt 4.7. + The Accelerated Graphics Driver example shows how you can write your own accelerated graphics driver and \l {add your graphics driver to Qt for Embedded Linux}. In \l{Qt for Embedded Linux}, -- cgit v0.12 From 1e7d6f3c5adb066f00cf50cc39b8646668174091 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 22 Jan 2010 16:28:27 +0100 Subject: Doc: Fixed broken link. Reviewed-by: Trust Me --- doc/src/windows-and-dialogs/mainwindow.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc index ea8411f..6adfa75 100644 --- a/doc/src/windows-and-dialogs/mainwindow.qdoc +++ b/doc/src/windows-and-dialogs/mainwindow.qdoc @@ -51,7 +51,7 @@ \nextpage The Application Main Window - A \l{Widgets}{widget} that is not embedded in a parent widget is called a window. + A \l{Widgets Tutorial}{widget} that is not embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable window flags). In Qt, QMainWindow and the various subclasses of QDialog are the most common window types. -- cgit v0.12 From 3e51b6c872e86a5e68a8e59770fc1bc32b84da0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 22 Jan 2010 12:46:32 +0100 Subject: QGraphicsWidget is painted twice on the inital show. Problem occured when doing something in the polishEvent() which eventually ended up as an update(). The problem was that in QGraphicsScene::addItem we scheduled a polish event after scheduling an update, resulting in update requests being processed before polish requests. Auto-test included. Task-number: QTBUG-6956 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem_p.h | 2 ++ src/gui/graphicsview/qgraphicsscene.cpp | 22 +++++++++++++------ src/gui/graphicsview/qgraphicsscene_p.h | 2 +- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 25 ++++++++++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index ac10aa7..bdd8863 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -178,6 +178,7 @@ public: sequentialOrdering(1), updateDueToGraphicsEffect(0), scenePosDescendants(0), + pendingPolish(0), globalStackingOrder(-1), q_ptr(0) { @@ -486,6 +487,7 @@ public: quint32 sequentialOrdering : 1; quint32 updateDueToGraphicsEffect : 1; quint32 scenePosDescendants : 1; + quint32 pendingPolish : 1; // Optional stacking order int globalStackingOrder; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 088a6b9..7e182d0 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -429,12 +429,13 @@ void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item) */ void QGraphicsScenePrivate::_q_polishItems() { - QSet::Iterator it = unpolishedItems.begin(); + QVector::Iterator it = unpolishedItems.begin(); const QVariant booleanTrueVariant(true); while (!unpolishedItems.isEmpty()) { QGraphicsItem *item = *it; it = unpolishedItems.erase(it); unpolishedItemsModified = false; + item->d_ptr->pendingPolish = false; if (!item->d_ptr->explicitlyHidden) { item->itemChange(QGraphicsItem::ItemVisibleChange, booleanTrueVariant); item->itemChange(QGraphicsItem::ItemVisibleHasChanged, booleanTrueVariant); @@ -638,8 +639,14 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) selectedItems.remove(item); hoverItems.removeAll(item); cachedItemsUnderMouse.removeAll(item); - unpolishedItems.remove(item); - unpolishedItemsModified = true; + if (item->d_ptr->pendingPolish) { + const int unpolishedIndex = unpolishedItems.indexOf(item); + if (unpolishedIndex != -1) { + unpolishedItems.remove(unpolishedIndex); + unpolishedItemsModified = true; + } + item->d_ptr->pendingPolish = false; + } resetDirtyItem(item); //We remove all references of item from the sceneEventFilter arrays @@ -2501,6 +2508,11 @@ void QGraphicsScene::addItem(QGraphicsItem *item) return; } + if (d->unpolishedItems.isEmpty()) + QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); + d->unpolishedItems.append(item); + item->d_ptr->pendingPolish = true; + // Detach this item from its parent if the parent's scene is different // from this scene. if (QGraphicsItem *itemParent = item->d_ptr->parent) { @@ -2583,10 +2595,6 @@ void QGraphicsScene::addItem(QGraphicsItem *item) item->d_ptr->resolveFont(d->font.resolve()); item->d_ptr->resolvePalette(d->palette.resolve()); - if (d->unpolishedItems.isEmpty()) - QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); - d->unpolishedItems.insert(item); - d->unpolishedItemsModified = true; // Reenable selectionChanged() for individual items --d->selectionChanging; diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index d10811c..a3e36d0 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -108,7 +108,7 @@ public: QPainterPath selectionArea; int selectionChanging; QSet selectedItems; - QSet unpolishedItems; + QVector unpolishedItems; QList topLevelItems; bool needSortTopLevelItems; bool unpolishedItemsModified; diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 909ea54..d3132fe 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -163,6 +163,7 @@ private slots: void addChildInpolishEvent(); void polishEvent(); void polishEvent2(); + void initialShow(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2856,6 +2857,30 @@ void tst_QGraphicsWidget::polishEvent2() QVERIFY(widget->events.contains(QEvent::Polish)); } +void tst_QGraphicsWidget::initialShow() +{ + class MyGraphicsWidget : public QGraphicsWidget + { public: + MyGraphicsWidget() : repaints(0) {} + int repaints; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; } + void polishEvent() { update(); } + }; + + QGraphicsScene scene; + MyGraphicsWidget *widget = new MyGraphicsWidget; + + QGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + + QTest::qWait(100); + scene.addItem(widget); + QTest::qWait(100); + + QCOMPARE(widget->repaints, 1); +} + void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() { QGraphicsScene scene; -- cgit v0.12 From 5f4af1b5b5a96875b42750a778dcf6695a844623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 22 Jan 2010 17:25:38 +0100 Subject: Potential crash when adding items from QGraphicsWidget::polishEvent(). These were processed immediately, so there was a fair chance that we could end up doing a virtual function call on items that were not fully constructed. This patch is also an optimization, since we never remove anything from the vector. Auto-test included. Reviewed-by: Jan-Arve --- src/gui/graphicsview/qgraphicsscene.cpp | 42 ++++++++++++++--------- src/gui/graphicsview/qgraphicsscene_p.h | 1 - tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 43 ++++++++++++++++++++++-- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 7e182d0..ae48bee 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -292,7 +292,6 @@ QGraphicsScenePrivate::QGraphicsScenePrivate() processDirtyItemsEmitted(false), selectionChanging(0), needSortTopLevelItems(true), - unpolishedItemsModified(true), holesInTopLevelSiblingIndex(false), topLevelSequentialOrdering(true), scenePosDescendantsUpdatePending(false), @@ -429,23 +428,38 @@ void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item) */ void QGraphicsScenePrivate::_q_polishItems() { - QVector::Iterator it = unpolishedItems.begin(); + if (unpolishedItems.isEmpty()) + return; + const QVariant booleanTrueVariant(true); - while (!unpolishedItems.isEmpty()) { - QGraphicsItem *item = *it; - it = unpolishedItems.erase(it); - unpolishedItemsModified = false; - item->d_ptr->pendingPolish = false; - if (!item->d_ptr->explicitlyHidden) { + QGraphicsItem *item = 0; + QGraphicsItemPrivate *itemd = 0; + const int oldUnpolishedCount = unpolishedItems.count(); + + for (int i = 0; i < oldUnpolishedCount; ++i) { + item = unpolishedItems.at(i); + if (!item) + continue; + itemd = item->d_ptr.data(); + itemd->pendingPolish = false; + if (!itemd->explicitlyHidden) { item->itemChange(QGraphicsItem::ItemVisibleChange, booleanTrueVariant); item->itemChange(QGraphicsItem::ItemVisibleHasChanged, booleanTrueVariant); } - if (item->isWidget()) { + if (itemd->isWidget) { QEvent event(QEvent::Polish); QApplication::sendEvent((QGraphicsWidget *)item, &event); } - if (unpolishedItemsModified) - it = unpolishedItems.begin(); + } + + if (unpolishedItems.count() == oldUnpolishedCount) { + // No new items were added to the vector. + unpolishedItems.clear(); + } else { + // New items were appended; keep them and remove the old ones. + unpolishedItems.remove(0, oldUnpolishedCount); + unpolishedItems.squeeze(); + QMetaObject::invokeMethod(q_ptr, "_q_polishItems", Qt::QueuedConnection); } } @@ -641,10 +655,8 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) cachedItemsUnderMouse.removeAll(item); if (item->d_ptr->pendingPolish) { const int unpolishedIndex = unpolishedItems.indexOf(item); - if (unpolishedIndex != -1) { - unpolishedItems.remove(unpolishedIndex); - unpolishedItemsModified = true; - } + if (unpolishedIndex != -1) + unpolishedItems[unpolishedIndex] = 0; item->d_ptr->pendingPolish = false; } resetDirtyItem(item); diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index a3e36d0..54d8130 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -111,7 +111,6 @@ public: QVector unpolishedItems; QList topLevelItems; bool needSortTopLevelItems; - bool unpolishedItemsModified; bool holesInTopLevelSiblingIndex; bool topLevelSequentialOrdering; diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index c08a628e..547e7f5 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -270,6 +270,7 @@ private slots: void initialFocus_data(); void initialFocus(); void polishItems(); + void polishItems2(); void isActive(); void siblingIndexAlwaysValid(); @@ -3942,14 +3943,23 @@ void tst_QGraphicsScene::initialFocus() class PolishItem : public QGraphicsTextItem { public: - PolishItem(QGraphicsItem *parent = 0) : QGraphicsTextItem(parent) { } + PolishItem(QGraphicsItem *parent = 0) + : QGraphicsTextItem(parent), polished(false), deleteChildrenInPolish(true), addChildrenInPolish(false) { } + bool polished; + bool deleteChildrenInPolish; + bool addChildrenInPolish; protected: QVariant itemChange(GraphicsItemChange change, const QVariant& value) { if (change == ItemVisibleChange) { - if (value.toBool()) + polished = true; + if (deleteChildrenInPolish) qDeleteAll(childItems()); + if (addChildrenInPolish) { + for (int i = 0; i < 10; ++i) + new PolishItem(this); + } } return QGraphicsItem::itemChange(change, value); } @@ -3966,6 +3976,35 @@ void tst_QGraphicsScene::polishItems() QMetaObject::invokeMethod(&scene,"_q_polishItems"); } +void tst_QGraphicsScene::polishItems2() +{ + QGraphicsScene scene; + PolishItem *item = new PolishItem; + item->addChildrenInPolish = true; + item->deleteChildrenInPolish = true; + // These children should be deleted in the polish. + for (int i = 0; i < 20; ++i) + new PolishItem(item); + scene.addItem(item); + + // Wait for the polish event to be delivered. + QVERIFY(!item->polished); + QApplication::processEvents(); + QVERIFY(item->polished); + + // We deleted the children we added above, but we also + // added 10 new children. These should be polished in the next + // event loop iteration. + QList children = item->childItems(); + QCOMPARE(children.count(), 10); + foreach (QGraphicsItem *child, children) + QVERIFY(!static_cast(child)->polished); + + QApplication::processEvents(); + foreach (QGraphicsItem *child, children) + QVERIFY(static_cast(child)->polished); +} + void tst_QGraphicsScene::isActive() { QGraphicsScene scene1; -- cgit v0.12 From e5e6d9e7fe8f5c3baa5caf609198db1184f59ef9 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 22 Jan 2010 13:15:21 -0800 Subject: Implement QDirectFBPixmapData::scroll This is a very operation in DirectFB and saves a fair bit of overhead. Reviewed-by: Donald Carr --- .../gfxdrivers/directfb/qdirectfbpixmap.cpp | 31 +++++++++++++++++++--- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 1cbfdaf..f27440e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -552,6 +552,34 @@ QImage *QDirectFBPixmapData::buffer() return &lockedImage; } + +bool QDirectFBPixmapData::scroll(int dx, int dy, const QRect &rect) +{ + if (!dfbSurface) { + return false; + } + unlockSurface(); + DFBResult result = dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + result = dfbSurface->SetPorterDuff(dfbSurface, DSPD_NONE); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + + const DFBRectangle source = { rect.x(), rect.y(), rect.width(), rect.height() }; + result = dfbSurface->Blit(dfbSurface, dfbSurface, &source, source.x + dx, source.y + dy); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + + return true; +} + void QDirectFBPixmapData::invalidate() { if (dfbSurface) { @@ -568,6 +596,3 @@ void QDirectFBPixmapData::invalidate() QT_END_NAMESPACE #endif // QT_NO_QWS_DIRECTFB - - - diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index f9b14a9..da6edc6 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -81,6 +81,7 @@ public: virtual QImage toImage() const; virtual QPaintEngine *paintEngine() const; virtual QImage *buffer(); + virtual bool scroll(int dx, int dy, const QRect &rect); // Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice virtual int metric(QPaintDevice::PaintDeviceMetric m) const { return QDirectFBPaintDevice::metric(m); } -- cgit v0.12 From 517631a6021a480e4098e39e7d6f65d91c35559d Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 22 Jan 2010 17:36:05 +0100 Subject: Another ASSERT while deleting spans That rare case when we are deleting the last span was not being taken care of. Unbelievable but true. Auto-test included. Reviewed-by: Thierry Reviewed-by: leo Task-number: QTBUG-6004 --- src/gui/itemviews/qtableview.cpp | 4 +++- tests/auto/qtableview/tst_qtableview.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 7eefb0b..3111896 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -114,7 +114,9 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } } else if (old_height > span->height()) { //remove the span from all the subspans lists that intersect the columns not covered anymore - Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0)); + Index::iterator it_y = index.lowerBound(-span->bottom()); + if (it_y == index.end()) + it_y = index.find(-span->top()); // This is the only span remaining and we are deleting it. Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->top() + old_height -1) { if (-it_y.key() > span->bottom()) { diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 7a5e68f..430712c 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -3024,6 +3024,14 @@ void tst_QTableView::spans_data() << QPoint(0, 0) << 1 << 1; + + QTest::newRow("QTBUG-6004 (follow-up): No failing Q_ASSERT, then it passes.") + << 10 << 10 + << (SpanList() << QRect(2, 2, 1, 3) << QRect(2, 2, 1, 1)) + << false + << QPoint(0, 0) + << 1 + << 1; } void tst_QTableView::spans() -- cgit v0.12 From 797fff07e03e1ff07fe544bbf0cfa44c35099c09 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 25 Jan 2010 10:57:22 +0100 Subject: Cosmetic: move the "Alsa support..." line to a more appropriate place --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 81872f9..4a94f93 100755 --- a/configure +++ b/configure @@ -7557,6 +7557,8 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then OPENSSL_LINKAGE="(linked)" fi echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE" +echo "Alsa support ........ $CFG_ALSA" +echo [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC" @@ -7581,8 +7583,6 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries." echo fi -echo "alsa support ........ $CFG_ALSA" -echo sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'` PROCS=1 -- cgit v0.12 From 855ce69f17f570bc91e02bfb34d9e3f1699b3b18 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 25 Jan 2010 12:29:25 +0100 Subject: QNativeSocketEngine_win: Don't mess with linger settings Reviewed-by: thiago --- src/network/socket/qnativesocketengine_win.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 7088a57..bbe9fde 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -1199,8 +1199,10 @@ void QNativeSocketEnginePrivate::nativeClose() #if defined (QTCPSOCKETENGINE_DEBUG) qDebug("QNativeSocketEnginePrivate::nativeClose()"); #endif - linger l = {1, 0}; - ::setsockopt(socketDescriptor, SOL_SOCKET, SO_DONTLINGER, (char*)&l, sizeof(l)); + // We were doing a setsockopt here before with SO_DONTLINGER. (However with kind of wrong + // usage of parameters, it wants a BOOL but we used a struct and pretended it to be bool). + // We don't think setting this option should be done here, if a user wants it she/he can + // do it manually with socketDescriptor()/setSocketDescriptor(); ::closesocket(socketDescriptor); } -- cgit v0.12 From c56ede1d6f5082cd10c310d473779cfea3363fe6 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Mon, 25 Jan 2010 13:17:21 +0100 Subject: Crash when deleting QMainWindow with native toolbar on Cocoa. The crash happens while processing a paint message received by the NSToolbar after the corresponding QToolbar has been destroyed. So while cleaning up the toolbar, the view needs to be detached from the custom toolbar item. Task-number: QTBUG-7305 Reviewed-by: Carlos Manuel Duclos Vergara --- src/gui/widgets/qmainwindowlayout_mac.mm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm index ee79f5a..d92168a 100644 --- a/src/gui/widgets/qmainwindowlayout_mac.mm +++ b/src/gui/widgets/qmainwindowlayout_mac.mm @@ -472,14 +472,20 @@ void QMainWindowLayout::removeFromMacToolbar(QToolBar *toolbar) void QMainWindowLayout::cleanUpMacToolbarItems() { - for (int i = 0; i < toolbarItemsCopy.size(); ++i) +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; +#endif + for (int i = 0; i < toolbarItemsCopy.size(); ++i) { +#ifdef QT_MAC_USE_COCOA + NSToolbarItem *item = static_cast(toolbarItemsCopy.at(i)); + [item setView:0]; +#endif CFRelease(toolbarItemsCopy.at(i)); + } toolbarItemsCopy.clear(); unifiedToolbarHash.clear(); #ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - OSWindowRef window = qt_mac_window_for(layoutState.mainWindow); NSToolbar *macToolbar = [window toolbar]; if (macToolbar) { -- cgit v0.12 From 6a3889146985e9e95b8a54e31003be8265e2469e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 15 Jan 2010 13:23:51 +0100 Subject: Small optimization in raster paint engine. Don't repeatedly update the pen / brush if no pen / brush is set. Reviewed-by: Gunnar Sletta --- src/gui/painting/qpaintengine_raster_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index b937f66..a1c73cc 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -264,13 +264,13 @@ private: #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE inline void ensureBrush(const QBrush &brush) { - if (!qbrush_fast_equals(state()->lastBrush, brush) || state()->fillFlags) + if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) updateBrush(brush); } inline void ensureBrush() { ensureBrush(state()->brush); } inline void ensurePen(const QPen &pen) { - if (!qpen_fast_equals(state()->lastPen, pen) || state()->strokeFlags) + if (!qpen_fast_equals(state()->lastPen, pen) || (pen.style() != Qt::NoPen && state()->strokeFlags)) updatePen(pen); } inline void ensurePen() { ensurePen(state()->pen); } -- cgit v0.12 From 235ea60ba2c8552038cf9ddc62d473ee865e2b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 Jan 2010 15:04:07 +0100 Subject: Made the trace replayer handle limited resolution cases better. Simply skip the updates that are outside the replay widget's bounds. Reviewed-by: Gunnar Sletta --- tools/qttracereplay/main.cpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/qttracereplay/main.cpp b/tools/qttracereplay/main.cpp index 85e9b12..a932d72 100644 --- a/tools/qttracereplay/main.cpp +++ b/tools/qttracereplay/main.cpp @@ -52,6 +52,7 @@ public: ReplayWidget(const QString &filename); void paintEvent(QPaintEvent *event); + void resizeEvent(QResizeEvent *event); public slots: void updateRect(); @@ -64,14 +65,15 @@ public: int currentIteration; QTime timer; + QList visibleUpdates; QList iterationTimes; QString filename; }; void ReplayWidget::updateRect() { - if (!updates.isEmpty()) - update(updates.at(currentFrame)); + if (!visibleUpdates.isEmpty()) + update(updates.at(visibleUpdates.at(currentFrame))); } void ReplayWidget::paintEvent(QPaintEvent *) @@ -80,10 +82,10 @@ void ReplayWidget::paintEvent(QPaintEvent *) // p.setClipRegion(frames.at(currentFrame).updateRegion); - buffer.draw(&p, currentFrame); + buffer.draw(&p, visibleUpdates.at(currentFrame)); ++currentFrame; - if (currentFrame >= buffer.numFrames()) { + if (currentFrame >= visibleUpdates.size()) { currentFrame = 0; ++currentIteration; @@ -119,7 +121,7 @@ void ReplayWidget::paintEvent(QPaintEvent *) if (iterationTimes.size() >= 10 || stddev < 4) { printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %d, stddev: %f %%, max(fps): %f\n", qPrintable(filename), - iterationTimes.size(), updates.size(), min, median, stddev, 1000. * updates.size() / min); + iterationTimes.size(), visibleUpdates.size(), min, median, stddev, 1000. * visibleUpdates.size() / min); deleteLater(); return; } @@ -130,6 +132,21 @@ void ReplayWidget::paintEvent(QPaintEvent *) QTimer::singleShot(0, this, SLOT(updateRect())); } +void ReplayWidget::resizeEvent(QResizeEvent *event) +{ + visibleUpdates.clear(); + + QRect bounds = rect(); + for (int i = 0; i < updates.size(); ++i) { + if (updates.at(i).intersects(bounds)) + visibleUpdates << i; + } + + if (visibleUpdates.size() != updates.size()) + printf("Warning: skipped %d frames due to limited resolution\n", updates.size() - visibleUpdates.size()); + +} + ReplayWidget::ReplayWidget(const QString &filename_) : currentFrame(0) , currentIteration(0) @@ -138,7 +155,6 @@ ReplayWidget::ReplayWidget(const QString &filename_) setWindowTitle(filename); QFile file(filename); - QRect bounds; if (!file.open(QIODevice::ReadOnly)) { printf("Failed to load input file '%s'\n", qPrintable(filename_)); return; -- cgit v0.12 From e5be6baa698f4779b6af97175015856d146bc479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Jan 2010 13:46:52 +0100 Subject: Fixed child items with graphics effects not inheriting opacity. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to invalidate the graphics source pixmap cache for both child items and parent items when changing the opacity of a graphics item. Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 23 +++++++++++++-- src/gui/graphicsview/qgraphicsitem_p.h | 6 +++- tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 34 ++++++++++++++++++++-- 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index d43176b..b8d392d 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2565,7 +2565,9 @@ void QGraphicsItem::setOpacity(qreal opacity) // Update. if (d_ptr->scene) { #ifndef QT_NO_GRAPHICSEFFECT - d_ptr->invalidateGraphicsEffectsRecursively(); + d_ptr->invalidateParentGraphicsEffectsRecursively(); + if (!(d_ptr->flags & ItemDoesntPropagateOpacityToChildren)) + d_ptr->invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::OpacityChanged); #endif //QT_NO_GRAPHICSEFFECT d_ptr->scene->d_func()->markDirty(this, QRectF(), /*invalidateChildren=*/true, @@ -5075,7 +5077,7 @@ int QGraphicsItemPrivate::depth() const \internal */ #ifndef QT_NO_GRAPHICSEFFECT -void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively() +void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively() { QGraphicsItemPrivate *itemPrivate = this; do { @@ -5087,6 +5089,21 @@ void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively() } } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0)); } + +void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::InvalidateReason reason) +{ + for (int i = 0; i < children.size(); ++i) { + QGraphicsItemPrivate *childPrivate = children.at(i)->d_ptr.data(); + if (reason == OpacityChanged && (childPrivate->flags & QGraphicsItem::ItemIgnoresParentOpacity)) + continue; + if (childPrivate->graphicsEffect) { + childPrivate->notifyInvalidated = 1; + static_cast(childPrivate->graphicsEffect->d_func()->source->d_func())->invalidateCache(); + } + + childPrivate->invalidateChildGraphicsEffectsRecursively(reason); + } +} #endif //QT_NO_GRAPHICSEFFECT /*! @@ -5331,7 +5348,7 @@ void QGraphicsItem::update(const QRectF &rect) // Make sure we notify effects about invalidated source. #ifndef QT_NO_GRAPHICSEFFECT - d_ptr->invalidateGraphicsEffectsRecursively(); + d_ptr->invalidateParentGraphicsEffectsRecursively(); #endif //QT_NO_GRAPHICSEFFECT if (CacheMode(d_ptr->cacheMode) != NoCache) { diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index bdd8863..ff6e8bd 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -225,7 +225,11 @@ public: bool ignoreDirtyBit = false, bool ignoreOpacity = false) const; int depth() const; #ifndef QT_NO_GRAPHICSEFFECT - void invalidateGraphicsEffectsRecursively(); + enum InvalidateReason { + OpacityChanged + }; + void invalidateParentGraphicsEffectsRecursively(); + void invalidateChildGraphicsEffectsRecursively(InvalidateReason reason); #endif //QT_NO_GRAPHICSEFFECT void invalidateDepthRecursively(); void resolveDepth(); diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index 51e2a57..795431b 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -71,6 +71,7 @@ private slots: void colorize(); void drawPixmapItem(); void deviceCoordinateTranslateCaching(); + void inheritOpacity(); }; void tst_QGraphicsEffect::initTestCase() @@ -79,8 +80,8 @@ void tst_QGraphicsEffect::initTestCase() class CustomItem : public QGraphicsRectItem { public: - CustomItem(qreal x, qreal y, qreal width, qreal height) - : QGraphicsRectItem(x, y, width, height), numRepaints(0), + CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = 0) + : QGraphicsRectItem(x, y, width, height, parent), numRepaints(0), m_painter(0), m_styleOption(0) {} @@ -560,6 +561,35 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching() QVERIFY(item->numRepaints == numRepaints); } +void tst_QGraphicsEffect::inheritOpacity() +{ + QGraphicsScene scene; + QGraphicsRectItem *rectItem = new QGraphicsRectItem(0, 0, 10, 10); + CustomItem *item = new CustomItem(0, 0, 10, 10, rectItem); + + scene.addItem(rectItem); + + item->setGraphicsEffect(new DeviceEffect); + item->setPen(Qt::NoPen); + item->setBrush(Qt::red); + + rectItem->setOpacity(0.5); + + QGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + + QTRY_VERIFY(item->numRepaints >= 1); + + int numRepaints = item->numRepaints; + + rectItem->setOpacity(1); + QTest::qWait(50); + + // item should have been rerendered due to opacity changing + QTRY_VERIFY(item->numRepaints > numRepaints); +} + QTEST_MAIN(tst_QGraphicsEffect) #include "tst_qgraphicseffect.moc" -- cgit v0.12 From a85f708449a5fb61740ec12abd4cb9df3a5265ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 25 Jan 2010 11:52:14 +0100 Subject: Added optimization flag to QGraphicsItemPrivate. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid traversing the whole child hierarchy when opacity changes unless there are children with graphics effects. Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 22 ++++++++++++++++++++++ src/gui/graphicsview/qgraphicsitem_p.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b8d392d..66493b7 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1075,6 +1075,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q p = p->d_ptr->parent; } + // Update graphics effect optimization flag + if (newParent && (graphicsEffect || mayHaveChildWithGraphicsEffect)) + newParent->d_ptr->updateChildWithGraphicsEffectFlagRecursively(); + // Update focus scope item ptr in new scope. QGraphicsItem *newFocusScopeItem = subFocusItem ? subFocusItem : parentFocusScopeItem; if (newFocusScopeItem && newParent) { @@ -2612,6 +2616,8 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect) if (d_ptr->graphicsEffect) { delete d_ptr->graphicsEffect; d_ptr->graphicsEffect = 0; + } else if (d_ptr->parent) { + d_ptr->parent->d_ptr->updateChildWithGraphicsEffectFlagRecursively(); } if (effect) { @@ -2625,6 +2631,19 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect) } #endif //QT_NO_GRAPHICSEFFECT +void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively() +{ +#ifndef QT_NO_GRAPHICSEFFECT + QGraphicsItemPrivate *itemPrivate = this; + do { + // parent chain already notified? + if (itemPrivate->mayHaveChildWithGraphicsEffect) + return; + itemPrivate->mayHaveChildWithGraphicsEffect = 1; + } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0)); +#endif +} + /*! \internal \since 4.6 @@ -5092,6 +5111,9 @@ void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively() void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::InvalidateReason reason) { + if (!mayHaveChildWithGraphicsEffect) + return; + for (int i = 0; i < children.size(); ++i) { QGraphicsItemPrivate *childPrivate = children.at(i)->d_ptr.data(); if (reason == OpacityChanged && (childPrivate->flags & QGraphicsItem::ItemIgnoresParentOpacity)) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index ff6e8bd..986a977 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -179,6 +179,7 @@ public: updateDueToGraphicsEffect(0), scenePosDescendants(0), pendingPolish(0), + mayHaveChildWithGraphicsEffect(0), globalStackingOrder(-1), q_ptr(0) { @@ -196,6 +197,7 @@ public: return item->d_ptr.data(); } + void updateChildWithGraphicsEffectFlagRecursively(); void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag = NoFlag, bool enabled = false, bool root = true); void updateAncestorFlags(); @@ -492,6 +494,7 @@ public: quint32 updateDueToGraphicsEffect : 1; quint32 scenePosDescendants : 1; quint32 pendingPolish : 1; + quint32 mayHaveChildWithGraphicsEffect : 1; // Optional stacking order int globalStackingOrder; -- cgit v0.12 From 91ccf28292f7fb78e0192c281bde2818a9be3a97 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 25 Jan 2010 13:11:46 +0100 Subject: QFileNetworkReply: Use a QFileEngine Slight performance increase. Reviewed-by: Peter Hartmann --- src/network/access/qfilenetworkreply.cpp | 50 +++++++++++++++++++++----------- src/network/access/qfilenetworkreply_p.h | 7 +++-- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp index 8c5065c..4ac9a8c 100644 --- a/src/network/access/qfilenetworkreply.cpp +++ b/src/network/access/qfilenetworkreply.cpp @@ -49,10 +49,15 @@ QT_BEGIN_NAMESPACE QFileNetworkReplyPrivate::QFileNetworkReplyPrivate() - : QNetworkReplyPrivate(), realFileSize(0) + : QNetworkReplyPrivate(), fileEngine(0), fileSize(0), filePos(0) { } +QFileNetworkReplyPrivate::~QFileNetworkReplyPrivate() +{ + delete fileEngine; +} + QFileNetworkReply::~QFileNetworkReply() { } @@ -94,9 +99,8 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req if (fileName.isEmpty()) { fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); } - d->realFile.setFileName(fileName); - QFileInfo fi(d->realFile); + QFileInfo fi(fileName); if (fi.isDir()) { QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Cannot open %1: Path is a directory").arg(url.toString()); setError(QNetworkReply::ContentOperationNotPermittedError, msg); @@ -106,14 +110,15 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req return; } - bool opened = d->realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered); + d->fileEngine = QAbstractFileEngine::create(fileName); + bool opened = d->fileEngine->open(QIODevice::ReadOnly | QIODevice::Unbuffered); // could we open the file? if (!opened) { QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Error opening %1: %2") - .arg(d->realFile.fileName(), d->realFile.errorString()); + .arg(fileName, d->fileEngine->errorString()); - if (d->realFile.exists()) { + if (fi.exists()) { setError(QNetworkReply::ContentAccessDenied, msg); QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentAccessDenied)); @@ -126,13 +131,13 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req return; } - d->realFileSize = fi.size(); + d->fileSize = fi.size(); setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified()); - setHeader(QNetworkRequest::ContentLengthHeader, d->realFileSize); + setHeader(QNetworkRequest::ContentLengthHeader, d->fileSize); QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "downloadProgress", Qt::QueuedConnection, - Q_ARG(qint64, d->realFileSize), Q_ARG(qint64, d->realFileSize)); + Q_ARG(qint64, d->fileSize), Q_ARG(qint64, d->fileSize)); QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); } @@ -146,20 +151,25 @@ void QFileNetworkReply::close() { Q_D(QFileNetworkReply); QNetworkReply::close(); - d->realFile.close(); + if (d->fileEngine) + d->fileEngine->close(); } void QFileNetworkReply::abort() { Q_D(QFileNetworkReply); QNetworkReply::close(); - d->realFile.close(); + if (d->fileEngine) + d->fileEngine->close(); } qint64 QFileNetworkReply::bytesAvailable() const { Q_D(const QFileNetworkReply); - return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable(); + if (!d->fileEngine) + return 0; + + return QNetworkReply::bytesAvailable() + d->fileSize - d->filePos; } bool QFileNetworkReply::isSequential () const @@ -170,7 +180,7 @@ bool QFileNetworkReply::isSequential () const qint64 QFileNetworkReply::size() const { Q_D(const QFileNetworkReply); - return d->realFileSize; + return d->fileSize; } /*! @@ -179,11 +189,17 @@ qint64 QFileNetworkReply::size() const qint64 QFileNetworkReply::readData(char *data, qint64 maxlen) { Q_D(QFileNetworkReply); - qint64 ret = d->realFile.read(data, maxlen); - if (ret == 0 && bytesAvailable() == 0) + if (!d->fileEngine) + return -1; + + qint64 ret = d->fileEngine->read(data, maxlen); + if (ret == 0 && bytesAvailable() == 0) { return -1; // everything had been read - else - return ret; + } else if (ret > 0) { + d->filePos += ret; + } + + return ret; } diff --git a/src/network/access/qfilenetworkreply_p.h b/src/network/access/qfilenetworkreply_p.h index 125fa2e..710ec9f 100644 --- a/src/network/access/qfilenetworkreply_p.h +++ b/src/network/access/qfilenetworkreply_p.h @@ -57,6 +57,7 @@ #include "qnetworkreply_p.h" #include "qnetworkaccessmanager.h" #include +#include QT_BEGIN_NAMESPACE @@ -85,9 +86,11 @@ class QFileNetworkReplyPrivate: public QNetworkReplyPrivate { public: QFileNetworkReplyPrivate(); + ~QFileNetworkReplyPrivate(); - QFile realFile; - qint64 realFileSize; + QAbstractFileEngine *fileEngine; + qint64 fileSize; + qint64 filePos; virtual bool isFinished() const; -- cgit v0.12 From 206fffb5927bae05a8d8b81c810c33a1c7a70a69 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 25 Jan 2010 12:56:15 +0100 Subject: 'test -e' is a bashism. It's not available in traditional sh. Task-number: QTBUG-7549 Reviewed-By: Markus Goetz --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4a94f93..dc23392 100755 --- a/configure +++ b/configure @@ -115,7 +115,7 @@ getQMakeConf1() inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"` current_dir=`dirname "$1"` conf_file="$current_dir/$inc_file" - if [ ! -e "$conf_file" ]; then + if [ ! -f "$conf_file" ]; then echo "WARNING: Unable to find file $conf_file" >&2 continue fi @@ -2278,7 +2278,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then fi # symlink fonts to be able to run application from build directory -if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then +if [ "$PLATFORM_QWS" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then if [ "$PLATFORM" = "$XPLATFORM" ]; then mkdir -p "${outpath}/lib" ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" -- cgit v0.12 From efce7393cb8c6d7df52539dd7b7ac616cf46036c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jan 2010 14:55:28 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 0bc66e2d86149e0fb6a33428e4f23ebfe83bfde4 ) Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-01-25 Janne Koskinen Reviewed by Simon Hausmann. [Qt] Phone backup support for QtWebkit for Symbian devices. https://bugs.webkit.org/show_bug.cgi?id=34077 * symbian/backup_registration.xml: Added. --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 21 +++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 17 +++++++---------- .../webkit/WebCore/platform/qt/PopupMenuQt.cpp | 4 ++-- src/3rdparty/webkit/WebKit/qt/ChangeLog | 9 +++++++++ .../WebKit/qt/symbian/backup_registration.xml | 5 +++++ 6 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 src/3rdparty/webkit/WebKit/qt/symbian/backup_registration.xml diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 6fe71d6..a055668 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 + 0bc66e2d86149e0fb6a33428e4f23ebfe83bfde4 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 8e1c965..fd5606b 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,24 @@ +2010-01-25 Janne Koskinen + + Reviewed by Simon Hausmann. + + [Qt] Phone backup support for QtWebkit for Symbian devices. + https://bugs.webkit.org/show_bug.cgi?id=34077 + + * WebCore.pro: + +2010-01-21 Thiago Macieira + + Reviewed by Simon Hausmann. + + [Qt] Fix incorrect dependency to QtXmlPatterns in generated include/QtWebKit/QtWebKit header + + The generated file includes QtXmlPatterns/QtXmlPatterns, which is neither used/required by + the public QtWebKit API nor will it be available if Qt is configured with -no-xmlpatterns. + + * WebCore.pro: Trick syncqt to believe that xmlpatterns is not a dependency, so that it's not + included in the generated file. It'll still be used and linked to with this trick. + 2010-01-17 Srinidhi Shreedhara Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 04aba62..bf4d6f9 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -18,7 +18,10 @@ symbian: { " " webkitlibs.pkg_prerules = vendorinfo - DEPLOYMENT += webkitlibs + webkitbackup.sources = ../WebKit/qt/symbian/backup_registration.xml + webkitbackup.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) + + DEPLOYMENT += webkitlibs webkitbackup TARGET.UID3 = 0x200267C2 # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. @@ -2780,7 +2783,7 @@ unix:!mac:CONFIG += link_pkgconfig contains(DEFINES, ENABLE_XSLT=1) { FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1 - QT += xmlpatterns + tobe|!tobe: QT += xmlpatterns SOURCES += \ bindings/js/JSXSLTProcessorConstructor.cpp \ @@ -3415,14 +3418,8 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 symbian { shared { - contains(MMP_RULES, defBlock) { - MMP_RULES -= defBlock - - MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ../WebKit/qt/symbian/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ../WebKit/qt/symbian/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" + contains(CONFIG, def_files) { + defFilePath=../WebKit/qt/symbian } } } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index 989b34c..1bd5976 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -100,9 +101,8 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index) if (QGraphicsView* view = qobject_cast(client->ownerWidget())) { if (!m_proxy) { - m_proxy = new QGraphicsProxyWidget; + m_proxy = new QGraphicsProxyWidget(qobject_cast(client->pluginParent())); m_proxy->setWidget(m_popup); - view->scene()->addItem(m_proxy); } else m_proxy->setVisible(true); m_proxy->setGeometry(rect); diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index ee555f3..09acd47 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,12 @@ +2010-01-25 Janne Koskinen + + Reviewed by Simon Hausmann. + + [Qt] Phone backup support for QtWebkit for Symbian devices. + https://bugs.webkit.org/show_bug.cgi?id=34077 + + * symbian/backup_registration.xml: Added. + 2009-11-19 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/backup_registration.xml b/src/3rdparty/webkit/WebKit/qt/symbian/backup_registration.xml new file mode 100644 index 0000000..e026140 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/symbian/backup_registration.xml @@ -0,0 +1,5 @@ + + + + + -- cgit v0.12 From df4d9f46e370a35c3178d95cae2a873e8a23ddb5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jan 2010 15:07:14 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1 ) Changes in WebKit/qt since the last update: Fix from Girish --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index a055668..221c020 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 0bc66e2d86149e0fb6a33428e4f23ebfe83bfde4 + a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1 diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index 1bd5976..714cac9 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -58,8 +58,10 @@ PopupMenu::PopupMenu(PopupMenuClient* client) PopupMenu::~PopupMenu() { - delete m_popup; - delete m_proxy; + // If we create a proxy, then the deletion of the proxy and the + // combo will be done by the proxy's parent (QGraphicsWebView) + if (!m_proxy) + delete m_popup; } void PopupMenu::clear() -- cgit v0.12 From f405a89621b4bfe957d7e0e4d321a9ea0931d34b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 25 Jan 2010 14:56:27 +0100 Subject: Cocoa: Usage of QMacCocoaAutoReleasePool makes CPU peak The reason was that QMacCocoaAutoReleasePool included a a call to NSApplicationLoad(). This call should only be made for carbon based application anyway, so we just ifdef it out (event how clumsy the placing of the call is). The CPU problem came because after the call, [NSApp isRunning] would return true, an as such, confuse the event dispatcher later on. Reviewed-by: MortenS --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 13 +++++++++++++ src/gui/util/qsystemtrayicon_mac.mm | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e36ab9b..e85a716 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1278,4 +1278,17 @@ void qt_cocoaChangeOverrideCursor(const QCursor &cursor) } #endif +QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool() +{ +#ifndef QT_MAC_USE_COCOA + NSApplicationLoad(); +#endif + pool = (void*)[[NSAutoreleasePool alloc] init]; +} + +QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool() +{ + [(NSAutoreleasePool*)pool release]; +} + QT_END_NAMESPACE diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index ae805f6..0265a83 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -569,16 +569,3 @@ private: } @end - -/* Done here because this is the only .mm for now! -Sam */ -QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool() -{ - NSApplicationLoad(); - pool = (void*)[[NSAutoreleasePool alloc] init]; -} - -QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool() -{ - [(NSAutoreleasePool*)pool release]; -} - -- cgit v0.12 From 8cdab74082019c0b8a57883a11aa5093a644abdd Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 25 Jan 2010 15:22:11 +0100 Subject: Qt/Cocoa Event Dispatcher Problem in modal dialogs The problem is that we didn't check if the event dispatcher was interrupted before starting to wait for more events. This patch will do the interrupt test after processing modal session events, and just before starting to wait. This will fix applications that expects e.g an event loop to exit immidiatly upon a signal from a timer (without the need for the user to generate e.g. a mouse event to stop the wait). Task-number: QTBUG-7503 Reviewed-by: cduclos --- src/gui/kernel/qeventdispatcher_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index eda75db..c7c7caf 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -569,7 +569,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) // in cocoa. [NSApp run] should be called at least once for any cocoa app. if (NSModalSession session = d->currentModalSession()) { QBoolBlocker execGuard(d->currentExecIsNSAppRun, false); - while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse) + while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt) qt_mac_waitForMoreModalSessionEvents(); if (!d->interrupt && session == d->currentModalSessionCached) { // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event -- cgit v0.12 From ef89c6a9f39924a3c8366ad9522b42e7b1915b01 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 25 Jan 2010 14:18:03 +0100 Subject: QNativeSocketEngine: Also handle unknown errors from socket engine Task-number: QTBUG-7316 Task-number: QTBUG-7317 Reviewed-by: thiago --- src/network/socket/qnativesocketengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 6e1df93..9e7bb27 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -778,6 +778,11 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxSize) QNativeSocketEnginePrivate::RemoteHostClosedErrorString); close(); return -1; + } else if (readBytes == -1) { + d->setError(QAbstractSocket::NetworkError, + QNativeSocketEnginePrivate::ReadErrorString); + close(); + return -1; } return readBytes; } -- cgit v0.12 From 2109c57ef1fe2d8bbea2ed53c0f76c036843352d Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 25 Jan 2010 15:12:51 +0100 Subject: QNativeSocketEngine: Set OS error strings on failed read() Reviewed-by: thiago --- src/network/socket/qnativesocketengine.cpp | 7 +++++-- src/network/socket/qnativesocketengine_unix.cpp | 2 +- src/network/socket/qnativesocketengine_win.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 9e7bb27..a890b3b 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -779,8 +779,11 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxSize) close(); return -1; } else if (readBytes == -1) { - d->setError(QAbstractSocket::NetworkError, - QNativeSocketEnginePrivate::ReadErrorString); + if (!d->hasSetSocketError) { + d->hasSetSocketError = true; + d->socketError = QAbstractSocket::NetworkError; + d->socketErrorString = qt_error_string(); + } close(); return -1; } diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index d3b0fe5..9a2c349 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -903,7 +903,7 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize) case EBADF: case EINVAL: case EIO: - setError(QAbstractSocket::NetworkError, ReadErrorString); + //error string is now set in read(), not here in nativeRead() break; #ifdef Q_OS_SYMBIAN case EPIPE: diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index bbe9fde..8177b4f 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -1068,7 +1068,7 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxLength) break; case WSAEBADF: case WSAEINVAL: - setError(QAbstractSocket::NetworkError, ReadErrorString); + //error string is now set in read(), not here in nativeRead() break; case WSAECONNRESET: case WSAECONNABORTED: -- cgit v0.12 From 8ef52111099e1a588d872305d07f0f9e514fe2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 25 Jan 2010 17:30:26 +0100 Subject: Updated docs regarding QGLWidget::renderText() limitations. Reviewed-by: Trust Me --- src/opengl/qgl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 3f32cf3..48e43b2 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4393,6 +4393,13 @@ static void qt_gl_draw_text(QPainter *p, int x, int y, const QString &str, \note This function temporarily disables depth-testing when the text is drawn. + \note This function can only be used inside a + QPainter::beginNativePainting()/QPainter::endNativePainting() block + if the default OpenGL paint engine is QPaintEngine::OpenGL. To make + QPaintEngine::OpenGL the default GL engine, call + QGL::setPreferredPaintEngine(QPaintEngine::OpenGL) before the + QApplication constructor. + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. */ -- cgit v0.12 From 0c822ea63a8b2b0c32c68a49de81e0c02548f059 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Jan 2010 09:54:09 +0100 Subject: Don't use QDebug references. Instead, pass by value. If you use refs, then you can't use this operator as the first argument, since qDebug() returns QDebug by-value (an rvalue temporary). That cannot be bound to a non-const ref. Task-number: QTBUG-7593 --- examples/tools/customtype/message.cpp | 2 +- examples/tools/customtype/message.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tools/customtype/message.cpp b/examples/tools/customtype/message.cpp index 4ef041a..d27159e 100644 --- a/examples/tools/customtype/message.cpp +++ b/examples/tools/customtype/message.cpp @@ -64,7 +64,7 @@ Message::Message(const QString &body, const QStringList &headers) } //! [custom type streaming operator] -QDebug &operator<<(QDebug &dbg, const Message &message) +QDebug operator<<(QDebug dbg, const Message &message) { QStringList pieces = message.body().split("\r\n", QString::SkipEmptyParts); if (pieces.isEmpty()) diff --git a/examples/tools/customtype/message.h b/examples/tools/customtype/message.h index 361f803..4ef48d4 100644 --- a/examples/tools/customtype/message.h +++ b/examples/tools/customtype/message.h @@ -70,7 +70,7 @@ Q_DECLARE_METATYPE(Message); //! [custom type meta-type declaration] //! [custom type streaming operator] -QDebug &operator<<(QDebug &dbg, const Message &message); +QDebug operator<<(QDebug dbg, const Message &message); //! [custom type streaming operator] #endif -- cgit v0.12 From f92e9c32160ca32b93173dafad2734963528446d Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Mon, 25 Jan 2010 16:10:21 +0100 Subject: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. The problem here is the fact that we "trusted" the user when the widget type was specified. The fix consists in checking the result of the conversions, if the conversion was successful (i.e. the widget was of the type specified by the user) then we proceed as usual. If the conversion was not successful (i.e. wrong widget type) then we ask the style for a sensible size. I modified this for QPushButton, QSlider and QToolButton. Task-number: qtbug-7522 Reviewed-by: jbache --- src/gui/styles/qmacstyle_mac.mm | 176 ++++++++++++++++++++++++---------------- 1 file changed, 104 insertions(+), 72 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 97d69b2..f4af579 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -667,32 +667,47 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg switch (ct) { case QStyle::CT_PushButton: { - const QPushButton *psh = static_cast(widg); - QString buttonText = qt_mac_removeMnemonics(psh->text()); - if (buttonText.contains(QLatin1Char('\n'))) - ret = QSize(-1, -1); - else if (sz == QAquaSizeLarge) - ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricPushButtonHeight)); - else if (sz == QAquaSizeSmall) - ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricSmallPushButtonHeight)); - else if (sz == QAquaSizeMini) - ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricMiniPushButtonHeight)); - - if (!psh->icon().isNull()){ - // If the button got an icon, and the icon is larger than the - // button, we can't decide on a default size - ret.setWidth(-1); - if (ret.height() < psh->iconSize().height()) - ret.setHeight(-1); - } - else if (buttonText == QLatin1String("OK") || buttonText == QLatin1String("Cancel")){ - // Aqua Style guidelines restrict the size of OK and Cancel buttons to 68 pixels. - // However, this doesn't work for German, therefore only do it for English, - // I suppose it would be better to do some sort of lookups for languages - // that like to have really long words. - ret.setWidth(77 - 8); - } - + const QPushButton *psh = qobject_cast(widg); + // If this comparison is false, then the widget was not a push button. + // This is bad and there's very little we can do since we were requested to find a + // sensible size for a widget that pretends to be a QPushButton but is not. + if(psh) { + QString buttonText = qt_mac_removeMnemonics(psh->text()); + if (buttonText.contains(QLatin1Char('\n'))) + ret = QSize(-1, -1); + else if (sz == QAquaSizeLarge) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricPushButtonHeight)); + else if (sz == QAquaSizeSmall) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricSmallPushButtonHeight)); + else if (sz == QAquaSizeMini) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricMiniPushButtonHeight)); + + if (!psh->icon().isNull()){ + // If the button got an icon, and the icon is larger than the + // button, we can't decide on a default size + ret.setWidth(-1); + if (ret.height() < psh->iconSize().height()) + ret.setHeight(-1); + } + else if (buttonText == QLatin1String("OK") || buttonText == QLatin1String("Cancel")){ + // Aqua Style guidelines restrict the size of OK and Cancel buttons to 68 pixels. + // However, this doesn't work for German, therefore only do it for English, + // I suppose it would be better to do some sort of lookups for languages + // that like to have really long words. + ret.setWidth(77 - 8); + } + } else { + // The only sensible thing to do is to return whatever the style suggests... + if (sz == QAquaSizeLarge) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricPushButtonHeight)); + else if (sz == QAquaSizeSmall) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricSmallPushButtonHeight)); + else if (sz == QAquaSizeMini) + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricMiniPushButtonHeight)); + else + // Since there's no default size we return the large size... + ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricPushButtonHeight)); + } #if 0 //Not sure we are applying the rules correctly for RadioButtons/CheckBoxes --Sam } else if (ct == QStyle::CT_RadioButton) { QRadioButton *rdo = static_cast(widg); @@ -749,23 +764,30 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg if (sz == QAquaSizeSmall) { int width = 0, height = 0; if (szHint == QSize(-1, -1)) { //just 'guess'.. - const QToolButton *bt = static_cast(widg); - if (!bt->icon().isNull()) { - QSize iconSize = bt->iconSize(); - QSize pmSize = bt->icon().actualSize(QSize(32, 32), QIcon::Normal); - width = qMax(width, qMax(iconSize.width(), pmSize.width())); - height = qMax(height, qMax(iconSize.height(), pmSize.height())); - } - if (!bt->text().isNull() && bt->toolButtonStyle() != Qt::ToolButtonIconOnly) { - int text_width = bt->fontMetrics().width(bt->text()), - text_height = bt->fontMetrics().height(); - if (bt->toolButtonStyle() == Qt::ToolButtonTextUnderIcon) { - width = qMax(width, text_width); - height += text_height; - } else { - width += text_width; - width = qMax(height, text_height); + const QToolButton *bt = qobject_cast(widg); + // If this conversion fails then the widget was not what it claimed to be. + if(bt) { + if (!bt->icon().isNull()) { + QSize iconSize = bt->iconSize(); + QSize pmSize = bt->icon().actualSize(QSize(32, 32), QIcon::Normal); + width = qMax(width, qMax(iconSize.width(), pmSize.width())); + height = qMax(height, qMax(iconSize.height(), pmSize.height())); + } + if (!bt->text().isNull() && bt->toolButtonStyle() != Qt::ToolButtonIconOnly) { + int text_width = bt->fontMetrics().width(bt->text()), + text_height = bt->fontMetrics().height(); + if (bt->toolButtonStyle() == Qt::ToolButtonTextUnderIcon) { + width = qMax(width, text_width); + height += text_height; + } else { + width += text_width; + width = qMax(height, text_height); + } } + } else { + // Let's return the size hint... + width = szHint.width(); + height = szHint.height(); } } else { width = szHint.width(); @@ -778,37 +800,47 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg break; case QStyle::CT_Slider: { int w = -1; - const QSlider *sld = static_cast(widg); - if (sz == QAquaSizeLarge) { - if (sld->orientation() == Qt::Horizontal) { - w = qt_mac_aqua_get_metric(kThemeMetricHSliderHeight); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricHSliderTickHeight); - } else { - w = qt_mac_aqua_get_metric(kThemeMetricVSliderWidth); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricVSliderTickWidth); - } - } else if (sz == QAquaSizeSmall) { - if (sld->orientation() == Qt::Horizontal) { - w = qt_mac_aqua_get_metric(kThemeMetricSmallHSliderHeight); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricSmallHSliderTickHeight); - } else { - w = qt_mac_aqua_get_metric(kThemeMetricSmallVSliderWidth); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricSmallVSliderTickWidth); - } - } else if (sz == QAquaSizeMini) { - if (sld->orientation() == Qt::Horizontal) { - w = qt_mac_aqua_get_metric(kThemeMetricMiniHSliderHeight); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricMiniHSliderTickHeight); - } else { - w = qt_mac_aqua_get_metric(kThemeMetricMiniVSliderWidth); - if (sld->tickPosition() != QSlider::NoTicks) - w += qt_mac_aqua_get_metric(kThemeMetricMiniVSliderTickWidth); + const QSlider *sld = qobject_cast(widg); + // If this conversion fails then the widget was not what it claimed to be. + if(sld) { + if (sz == QAquaSizeLarge) { + if (sld->orientation() == Qt::Horizontal) { + w = qt_mac_aqua_get_metric(kThemeMetricHSliderHeight); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricHSliderTickHeight); + } else { + w = qt_mac_aqua_get_metric(kThemeMetricVSliderWidth); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricVSliderTickWidth); + } + } else if (sz == QAquaSizeSmall) { + if (sld->orientation() == Qt::Horizontal) { + w = qt_mac_aqua_get_metric(kThemeMetricSmallHSliderHeight); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricSmallHSliderTickHeight); + } else { + w = qt_mac_aqua_get_metric(kThemeMetricSmallVSliderWidth); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricSmallVSliderTickWidth); + } + } else if (sz == QAquaSizeMini) { + if (sld->orientation() == Qt::Horizontal) { + w = qt_mac_aqua_get_metric(kThemeMetricMiniHSliderHeight); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricMiniHSliderTickHeight); + } else { + w = qt_mac_aqua_get_metric(kThemeMetricMiniVSliderWidth); + if (sld->tickPosition() != QSlider::NoTicks) + w += qt_mac_aqua_get_metric(kThemeMetricMiniVSliderTickWidth); + } } + } else { + // This is tricky, we were requested to find a size for a slider which is not + // a slider. We don't know if this is vertical or horizontal or if we need to + // have tick marks or not. + // For this case we will return an horizontal slider without tick marks. + w = qt_mac_aqua_get_metric(kThemeMetricHSliderHeight); + w += qt_mac_aqua_get_metric(kThemeMetricHSliderTickHeight); } if (sld->orientation() == Qt::Horizontal) ret.setHeight(w); -- cgit v0.12 From 0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 26 Jan 2010 10:55:31 +0100 Subject: Fixed an infinite loop that could occur when reading invalid BMP images. Task-number: QTBUG-7530 Reviewed-by: Kim --- src/gui/image/qbmphandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 854be2e..42e19b8 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -144,7 +144,7 @@ static QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi) static int calc_shift(int mask) { int result = 0; - while (!(mask & 1)) { + while (mask && !(mask & 1)) { result++; mask >>= 1; } -- cgit v0.12 From 88719423de4fc3d36a5aab1eb13744984c8f5194 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 26 Jan 2010 13:42:48 +0100 Subject: Cocoa: qfiledialog test spits out memory warnings We need an auto release pool! (cherry picked from commit 7ad08868de4b3e481a51a3431504fcf42a4bbf6d) --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e85a716..e06a810 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -143,6 +143,9 @@ extern QPointer qt_button_down; //qapplication_mac.cpp void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; +#endif OSWindowRef wnd = static_cast(window); if (wnd) { QWidget *widget; -- cgit v0.12 From 5ccd8ceb06a9be29f773d170d5dd8c67a8d6c86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 26 Jan 2010 14:14:47 +0100 Subject: Stabilize tst_QGraphicsScene::polishItems2 (new test) We are only interested in getting the posted MetaCall events delivered, so we can get away with sendPostedEvents() instead of processEvents(). Makes the test also pass on Mac g++ carbon 32. --- tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 547e7f5..6743fbe 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -3989,7 +3989,7 @@ void tst_QGraphicsScene::polishItems2() // Wait for the polish event to be delivered. QVERIFY(!item->polished); - QApplication::processEvents(); + QApplication::sendPostedEvents(&scene, QEvent::MetaCall); QVERIFY(item->polished); // We deleted the children we added above, but we also @@ -4000,7 +4000,7 @@ void tst_QGraphicsScene::polishItems2() foreach (QGraphicsItem *child, children) QVERIFY(!static_cast(child)->polished); - QApplication::processEvents(); + QApplication::sendPostedEvents(&scene, QEvent::MetaCall); foreach (QGraphicsItem *child, children) QVERIFY(static_cast(child)->polished); } -- cgit v0.12 From 67a39e0eb04069e216b76672f45e7709fb076577 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Jan 2010 14:59:14 +0100 Subject: Autotest: make the test valid for multiple Qt versions Reviewed-by: TrustMe --- tests/auto/selftests/expected_xunit.txt | 4 ++-- tests/auto/selftests/tst_selftests.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt index 5ec4668..3c014e3 100644 --- a/tests/auto/selftests/expected_xunit.txt +++ b/tests/auto/selftests/expected_xunit.txt @@ -1,8 +1,8 @@ - - + + diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index 89ece0f..0b9cee0 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -248,7 +248,7 @@ void tst_Selftests::doRunSubTest(QString &subdir, QStringList &arguments ) continue; const QString output(QString::fromLatin1(line)); - const QString expected(QString::fromLatin1(exp.at(i))); + const QString expected(QString::fromLatin1(exp.at(i)).replace("", QT_VERSION_STR)); if (line.contains("ASSERT") && output != expected) QEXPECT_FAIL("assert", "QTestLib prints out the absolute path.", Continue); -- cgit v0.12 From 5241ca84e0884e9d0814094eb6949ae27b19c6f9 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 8 Jan 2010 16:31:01 +0100 Subject: Fixes visibility update missing when doing setParentItem on graphicsitem Calling setParentItem is causing the previous opacity/visible updates to be discarded because the dirty flags were not propagated to the new parent. Also removed some unnecessary 'markDirty' and 'update' calls. Task-number: QTBUG-6738 Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 30 ++------- src/gui/graphicsview/qgraphicsitem_p.h | 33 ++++++++++ src/gui/graphicsview/qgraphicsscene.cpp | 14 +---- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 86 ++++++++++++++++++++++++++ 4 files changed, 127 insertions(+), 36 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 66493b7..dc20faf 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1113,11 +1113,9 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q } if ((parent = newParent)) { - bool implicitUpdate = false; if (parent->d_func()->scene && parent->d_func()->scene != scene) { // Move this item to its new parent's scene parent->d_func()->scene->addItem(q); - implicitUpdate = true; } else if (!parent->d_func()->scene && scene) { // Remove this item from its former scene scene->removeItem(q); @@ -1127,25 +1125,25 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q if (thisPointerVariant) parent->itemChange(QGraphicsItem::ItemChildAddedChange, *thisPointerVariant); if (scene) { - if (!implicitUpdate) - scene->d_func()->markDirty(q_ptr); - // Re-enable scene pos notifications for new ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) scene->d_func()->setScenePosItemEnabled(q, true); } + // Propagate dirty flags to the new parent + markParentDirty(/*updateBoundingRect=*/true); + // Inherit ancestor flags from the new parent. updateAncestorFlags(); // Update item visible / enabled. if (parent->d_ptr->visible != visible) { if (!parent->d_ptr->visible || !explicitlyHidden) - setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ !implicitUpdate); + setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ false); } if (parent->isEnabled() != enabled) { if (!parent->d_ptr->enabled || !explicitlyDisabled) - setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ !implicitUpdate); + setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ false); } // Auto-activate if visible and the parent is active. @@ -1161,10 +1159,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q setVisibleHelper(true, /* explicit = */ false); if (!enabled && !explicitlyDisabled) setEnabledHelper(true, /* explicit = */ false); - - // If the item is being deleted, the whole scene will be updated. - if (scene) - scene->d_func()->markDirty(q_ptr); } } @@ -7263,19 +7257,7 @@ void QGraphicsItem::prepareGeometryChange() } } - QGraphicsItem *parent = this; - while ((parent = parent->d_ptr->parent)) { - QGraphicsItemPrivate *parentp = parent->d_ptr.data(); - parentp->dirtyChildrenBoundingRect = 1; - // ### Only do this if the parent's effect applies to the entire subtree. - parentp->notifyBoundingRectChanged = 1; -#ifndef QT_NO_GRAPHICSEFFECT - if (parentp->scene && parentp->graphicsEffect) { - parentp->notifyInvalidated = 1; - static_cast(parentp->graphicsEffect->d_func()->source->d_func())->invalidateCache(); - } -#endif - } + d_ptr->markParentDirty(/*updateBoundingRect=*/true); } /*! diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 986a977..5ad6cd5 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -406,6 +406,8 @@ public: return !visible || (childrenCombineOpacity() && isFullyTransparent()); } + inline void markParentDirty(bool updateBoundingRect = false); + void setFocusHelper(Qt::FocusReason focusReason, bool climb); void setSubFocus(QGraphicsItem *rootItem = 0); void clearSubFocus(QGraphicsItem *rootItem = 0); @@ -754,6 +756,37 @@ inline bool QGraphicsItemPrivate::insertionOrder(QGraphicsItem *a, QGraphicsItem return a->d_ptr->siblingIndex < b->d_ptr->siblingIndex; } +/*! + \internal +*/ +inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect) +{ + QGraphicsItemPrivate *parentp = this; + while (parentp->parent) { + parentp = parentp->parent->d_ptr.data(); + parentp->dirtyChildren = 1; + + if (updateBoundingRect) { + parentp->dirtyChildrenBoundingRect = 1; + // ### Only do this if the parent's effect applies to the entire subtree. + parentp->notifyBoundingRectChanged = 1; + } +#ifndef QT_NO_GRAPHICSEFFECT + if (parentp->graphicsEffect) { + if (updateBoundingRect) { + parentp->notifyInvalidated = 1; + static_cast(parentp->graphicsEffect->d_func() + ->source->d_func())->invalidateCache(); + } + if (parentp->graphicsEffect->isEnabled()) { + parentp->dirty = 1; + parentp->fullUpdatePending = 1; + } + } +#endif + } +} + QT_END_NAMESPACE #endif // QT_NO_GRAPHICSVIEW diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index ae48bee..9219773 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1955,7 +1955,7 @@ QList QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSe \since 4.3 This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode). - + This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead. @@ -4903,17 +4903,7 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b if (ignoreOpacity) item->d_ptr->ignoreOpacity = 1; - QGraphicsItem *p = item->d_ptr->parent; - while (p) { - p->d_ptr->dirtyChildren = 1; -#ifndef QT_NO_GRAPHICSEFFECT - if (p->d_ptr->graphicsEffect && p->d_ptr->graphicsEffect->isEnabled()) { - p->d_ptr->dirty = 1; - p->d_ptr->fullUpdatePending = 1; - } -#endif //QT_NO_GRAPHICSEFFECT - p = p->d_ptr->parent; - } + item->d_ptr->markParentDirty(); } static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item, diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 8e43bce..14b9ef0 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -316,6 +316,7 @@ private slots: void childrenBoundingRectTransformed(); void childrenBoundingRect2(); void childrenBoundingRect3(); + void childrenBoundingRect4(); void group(); void setGroup(); void setGroup2(); @@ -417,6 +418,7 @@ private slots: void task197802_childrenVisibility(); void QTBUG_4233_updateCachedWithSceneRect(); void QTBUG_5418_textItemSetDefaultColor(); + void QTBUG_6738_missingUpdateWithSetParent(); private: QList paintedItems; @@ -3257,6 +3259,32 @@ void tst_QGraphicsItem::childrenBoundingRect3() QCOMPARE(subTreeRect.height(), qreal(251.7766952966369)); } +void tst_QGraphicsItem::childrenBoundingRect4() +{ + QGraphicsScene scene; + + QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 10, 10)); + QGraphicsRectItem *rect2 = scene.addRect(QRectF(0, 0, 20, 20)); + QGraphicsRectItem *rect3 = scene.addRect(QRectF(0, 0, 30, 30)); + rect2->setParentItem(rect); + rect3->setParentItem(rect); + + QGraphicsView view(&scene); + view.show(); + + QTest::qWaitForWindowShown(&view); + + // Try to mess up the cached bounding rect. + rect->childrenBoundingRect(); + rect2->childrenBoundingRect(); + + rect3->setOpacity(0.0); + rect3->setParentItem(rect2); + + QCOMPARE(rect->childrenBoundingRect(), rect3->boundingRect()); + QCOMPARE(rect2->childrenBoundingRect(), rect3->boundingRect()); +} + void tst_QGraphicsItem::group() { QGraphicsScene scene; @@ -9869,5 +9897,63 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() QCOMPARE(i->painted, 0); //same color as before should not trigger an update (QTBUG-6242) } +void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() +{ + // In all 3 test cases below the reparented item should disappear + EventTester *parent = new EventTester; + EventTester *child = new EventTester(parent); + EventTester *child2 = new EventTester(parent); + EventTester *child3 = new EventTester(parent); + EventTester *child4 = new EventTester(parent); + + child->setPos(10, 10); + child2->setPos(20, 20); + child3->setPos(30, 30); + child4->setPos(40, 40); + + QGraphicsScene scene; + scene.addItem(parent); + + class MyGraphicsView : public QGraphicsView + { public: + int repaints; + QRegion paintedRegion; + MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} + void paintEvent(QPaintEvent *e) + { + ++repaints; + paintedRegion += e->region(); + QGraphicsView::paintEvent(e); + } + void reset() { repaints = 0; paintedRegion = QRegion(); } + }; + + MyGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(view.repaints > 0); + + // test case #1 + view.reset(); + child2->setVisible(false); + child2->setParentItem(child); + + QTRY_VERIFY(view.repaints == 1); + + // test case #2 + view.reset(); + child3->setOpacity(0.0); + child3->setParentItem(child); + + QTRY_VERIFY(view.repaints == 1); + + // test case #3 + view.reset(); + child4->setParentItem(child); + child4->setVisible(false); + + QTRY_VERIFY(view.repaints == 1); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From f98901601fee4947fd0248f113b3a39a142292d5 Mon Sep 17 00:00:00 2001 From: Iain Date: Mon, 25 Jan 2010 10:23:31 +0000 Subject: Updates to new Symbian DEF file system Fix bug in qbase.pri, where it tested QT_CONFIG instead of CONFIG to see if DEF files were enabled, when setting the DEF file path Fix bug in configure.exe implementation, where SYMBIAN_DEFFILES was defined when testing for its value, due to incorrect use of QMap::operator[] Tidy up configure.exe help for new def files option Task-number: QTBUG-6556 Reviewed-by: Jason Barron Reviewed-by: Janne Koskinen --- configure.exe | Bin 1178624 -> 1178112 bytes src/qbase.pri | 2 +- tools/configure/configureapp.cpp | 16 +++++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure.exe b/configure.exe index 03cbf37..ed2b0b2 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/src/qbase.pri b/src/qbase.pri index 3307ae3..710a2b6 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -103,7 +103,7 @@ symbian { # of Qt, and the only compatibility will be between this build of Qt and anything # built in this exact environment. *Never* use this when building a version # for release. - contains(QT_CONFIG, def_files) { + contains(CONFIG, def_files) { defFilePath=../s60installs } } diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 3f105b5..7751143 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1829,9 +1829,9 @@ bool Configure::displayHelp() desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt."); desc( "-fpu ", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2"); desc("S60", "no", "-no-s60", "Do not compile in S60 support."); - desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework\n"); - desc("SYMBIAN_DEFFILES", "no", "no-usedeffiles", "Disable the usage of DEF files."); - desc("SYMBIAN_DEFFILES", "yes", "usedeffiles", "Enable the usage of DEF files.\n"); + desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework"); + desc("SYMBIAN_DEFFILES", "no", "-no-usedeffiles", "Disable the usage of DEF files."); + desc("SYMBIAN_DEFFILES", "yes", "-usedeffiles", "Enable the usage of DEF files.\n"); return true; } return false; @@ -2753,10 +2753,12 @@ void Configure::generateCachefile() if ( dictionary["PLUGIN_MANIFESTS"] == "no" ) configStream << " no_plugin_manifest"; - if ( dictionary["SYMBIAN_DEFFILES"] == "yes" ) { - configStream << " def_files"; - } else if ( dictionary["SYMBIAN_DEFFILES"] == "no" ) { - configStream << " def_files_disabled"; + if ( dictionary.contains("SYMBIAN_DEFFILES") ) { + if(dictionary["SYMBIAN_DEFFILES"] == "yes" ) { + configStream << " def_files"; + } else if ( dictionary["SYMBIAN_DEFFILES"] == "no" ) { + configStream << " def_files_disabled"; + } } configStream << endl; configStream << "QT_ARCH = " << dictionary[ "ARCHITECTURE" ] << endl; -- cgit v0.12 From 56e36ce9d4e1ec81e41f6f74f4e5cd39070b1f8f Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 26 Jan 2010 19:11:25 +0100 Subject: Fix broken build of simulated QS60Style The QProgressBar animating code is not meant for the simulated style. ifdef it out. Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp --- src/gui/styles/qs60style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 3f4f190..24b2d34 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2964,11 +2964,13 @@ void QS60Style::unpolish(QWidget *widget) if (widget) widget->setPalette(QPalette()); -#ifndef QT_NO_PROGRESSBAR +#if defined(Q_WS_S60) && !defined(QT_NO_PROGRESSBAR) if (QProgressBar *bar = qobject_cast(widget)) { widget->removeEventFilter(this); d->m_bars.removeAll(bar); } +#else + Q_UNUSED(d) #endif QCommonStyle::unpolish(widget); } -- cgit v0.12 From c7636e37e62b8df54cad331989be3173ba4ca27d Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 26 Jan 2010 19:28:36 +0100 Subject: Remove warnings MSVC revealed some issues that are worth a warning. Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp --- src/gui/styles/qs60style.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 24b2d34..ecb3242 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1985,7 +1985,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, */ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const { - Q_D(const QS60Style); const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; bool commonStyleDraws = false; @@ -2021,8 +2020,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff; painter->save(); - QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); - QColor windowTextColor = option->palette.windowText().color(); + const QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); + const QColor windowTextColor = option->palette.windowText().color(); if (themeColor != windowTextColor) painter->setPen(windowTextColor); @@ -2069,8 +2068,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti buttonRect.adjust(0, -newY, -1, -newY); painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); - QColor buttonTextColor = option->palette.buttonText().color(); + const QColor themeColor = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); + const QColor buttonTextColor = option->palette.buttonText().color(); if (themeColor != buttonTextColor) painter->setPen(buttonTextColor); else @@ -3002,9 +3001,8 @@ void QS60Style::unpolish(QApplication *application) */ bool QS60Style::event(QEvent *e) { - Q_D(QS60Style); - #ifdef QT_KEYPAD_NAVIGATION + Q_D(QS60Style); const QEvent::Type eventType = e->type(); if ((eventType == QEvent::FocusIn || eventType == QEvent::FocusOut || -- cgit v0.12 From 9eea7172d4d4984a111f009a60f5eaa0568fcf89 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 26 Jan 2010 19:31:01 +0100 Subject: Remove unneeded resources from QtGui QtGui contains loads of resources. 337,160 bytes just for qstyle. And since this is nearly exclusively full of PNG files, it won't really be compressed in the qt.sis package. And it will eat unneccessary Ram. This patch removes about 260,000 bytes of resources. We only want the 32-pixel big icons. No 16- and 129- pixel versions. Task-number: QTBUG-7277 Reviewed-by: Sami Merila modified: src/gui/kernel/qapplication.cpp new file: src/gui/styles/qstyle_s60.qrc modified: src/gui/styles/styles.pri --- src/gui/kernel/qapplication.cpp | 4 +- src/gui/styles/qstyle_s60.qrc | 137 ++++++++++++++++++++++++++++++++++++++++ src/gui/styles/styles.pri | 8 ++- 3 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 src/gui/styles/qstyle_s60.qrc diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 12fe797..4fe3900 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -121,8 +121,10 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp static void initResources() { -#ifdef Q_WS_WINCE +#if defined(Q_WS_WINCE) Q_INIT_RESOURCE(qstyle_wince); +#elif defined(Q_OS_SYMBIAN) + Q_INIT_RESOURCE(qstyle_s60); #else Q_INIT_RESOURCE(qstyle); #endif diff --git a/src/gui/styles/qstyle_s60.qrc b/src/gui/styles/qstyle_s60.qrc new file mode 100644 index 0000000..dbee38b --- /dev/null +++ b/src/gui/styles/qstyle_s60.qrc @@ -0,0 +1,137 @@ + + + +images/filelink-32.png + + +images/file-32.png + + +images/newdirectory-32.png + + +images/parentdir-32.png + + + + + + + + + + + +images/harddrive-32.png + + + + + + + + + + +images/desktop-32.png + +images/dirclosed-32.png + + +images/dirlink-32.png + + +images/diropen-32.png + + +images/left-32.png + + +images/right-32.png + + +images/up-32.png + + +images/down-32.png + + +images/filecontents-32.png + + +images/fileinfo-32.png + + +images/viewdetailed-32.png + + +images/viewlist-32.png + +images/fontbitmap-16.png +images/fonttruetype-16.png + + +images/standardbutton-apply-32.png + + +images/standardbutton-cancel-32.png + + +images/standardbutton-clear-32.png + + +images/standardbutton-close-32.png + + +images/standardbutton-delete-32.png + + +images/standardbutton-help-32.png + + +images/standardbutton-no-32.png + + +images/standardbutton-ok-32.png + + +images/standardbutton-open-32.png + + +images/standardbutton-save-32.png + + +images/standardbutton-yes-32.png +images/standardbutton-closetab-16.png +images/standardbutton-closetab-down-16.png +images/standardbutton-closetab-hover-16.png + +images/refresh-32.png + +images/stop-32.png + +images/media-stop-32.png + +images/media-play-32.png + +images/media-pause-32.png + +images/media-seek-forward-32.png + +images/media-seek-backward-32.png + +images/media-skip-forward-32.png + +images/media-skip-backward-32.png +images/media-volume-16.png +images/media-volume-muted-16.png + + + diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri index f30f5af..676f59e 100644 --- a/src/gui/styles/styles.pri +++ b/src/gui/styles/styles.pri @@ -23,10 +23,12 @@ SOURCES += \ styles/qstylesheetstyle.cpp \ styles/qstylesheetstyle_default.cpp -!wince* { - RESOURCES += styles/qstyle.qrc +wince* { + RESOURCES += styles/qstyle_wince.qrc +} else:symbian { + RESOURCES += styles/qstyle_s60.qrc } else { - RESOURCES += styles/qstyle_wince.qrc + RESOURCES += styles/qstyle.qrc } contains( styles, all ) { -- cgit v0.12 From ff344c1844f729fd8f9d594a71eb0074dac09c60 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Jan 2010 21:11:36 +0100 Subject: Do the refcounting of services watched properly. Issue found while debugging KDE applications. --- src/dbus/qdbusintegrator.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 30fa0b6..fe8693c 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1660,9 +1660,6 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError } QString busService = QLatin1String(DBUS_SERVICE_DBUS); - WatchedServicesHash::mapped_type &bus = watchedServices[busService]; - bus.refcount = 1; - bus.owner = getNameOwnerNoCache(busService); connectSignal(busService, QString(), QString(), QLatin1String("NameAcquired"), QStringList(), QString(), this, SLOT(registerService(QString))); connectSignal(busService, QString(), QString(), QLatin1String("NameLost"), QStringList(), QString(), @@ -2046,10 +2043,7 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook // Do we need to watch for this name? if (shouldWatchService(hook.service)) { WatchedServicesHash::mapped_type &data = watchedServices[hook.service]; - if (data.refcount) { - // already watching - ++data.refcount; - } else { + if (++data.refcount == 1) { // we need to watch for this service changing QString dbusServerService = QLatin1String(DBUS_SERVICE_DBUS); connectSignal(dbusServerService, QString(), QLatin1String(DBUS_INTERFACE_DBUS), @@ -2105,19 +2099,6 @@ QDBusConnectionPrivate::disconnectSignal(SignalHookHash::Iterator &it) { const SignalHook &hook = it.value(); - WatchedServicesHash::Iterator sit = watchedServices.find(hook.service); - if (sit != watchedServices.end()) { - if (sit.value().refcount == 1) { - watchedServices.erase(sit); - QString dbusServerService = QLatin1String(DBUS_SERVICE_DBUS); - disconnectSignal(dbusServerService, QString(), QLatin1String(DBUS_INTERFACE_DBUS), - QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), - this, SLOT(_q_serviceOwnerChanged(QString,QString,QString))); - } else { - --sit.value().refcount; - } - } - bool erase = false; MatchRefCountHash::iterator i = matchRefCounts.find(hook.matchRule); if (i == matchRefCounts.end()) { @@ -2136,6 +2117,20 @@ QDBusConnectionPrivate::disconnectSignal(SignalHookHash::Iterator &it) if (connection && erase) { qDBusDebug("Removing rule: %s", hook.matchRule.constData()); q_dbus_bus_remove_match(connection, hook.matchRule, NULL); + + // Successfully disconnected the signal + // Were we watching for this name? + WatchedServicesHash::Iterator sit = watchedServices.find(hook.service); + if (sit != watchedServices.end()) { + if (--sit.value().refcount == 0) { + watchedServices.erase(sit); + QString dbusServerService = QLatin1String(DBUS_SERVICE_DBUS); + disconnectSignal(dbusServerService, QString(), QLatin1String(DBUS_INTERFACE_DBUS), + QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), + this, SLOT(_q_serviceOwnerChanged(QString,QString,QString))); + } + } + } return signalHooks.erase(it); -- cgit v0.12 From e631e7bde04aea81292a950cb00a93764714c093 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Jan 2010 21:41:17 +0100 Subject: When checking to see if a signal is connected, compare the match-arguments too --- src/dbus/qdbusintegrator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index fe8693c..44abf7b 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -2001,7 +2001,8 @@ bool QDBusConnectionPrivate::connectSignal(const QString &service, entry.path == hook.path && entry.signature == hook.signature && entry.obj == hook.obj && - entry.midx == hook.midx) { + entry.midx == hook.midx && + entry.argumentMatch == hook.argumentMatch) { // no need to compare the parameters if it's the same slot return true; // already there } @@ -2083,7 +2084,8 @@ bool QDBusConnectionPrivate::disconnectSignal(const QString &service, entry.path == hook.path && entry.signature == hook.signature && entry.obj == hook.obj && - entry.midx == hook.midx) { + entry.midx == hook.midx && + entry.argumentMatch == hook.argumentMatch) { // no need to compare the parameters if it's the same slot disconnectSignal(it); return true; // it was there -- cgit v0.12 From 416cf8a5a9384f942282a2c715ec4832eeba001d Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 27 Jan 2010 09:34:39 +1000 Subject: Compile with no-webkit - add missing semi-colons. Reviewed-by: Sarah Smith --- tools/assistant/tools/assistant/centralwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index c8f41e4..055fa1c 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -1088,7 +1088,7 @@ CentralWidget::setSourceFromSearch(const QUrl &url) { setSource(url); #if defined(QT_NO_WEBKIT) - highlightSearchTerms() + highlightSearchTerms(); #else connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, SLOT(highlightSearchTerms())); @@ -1100,7 +1100,7 @@ CentralWidget::setSourceFromSearchInNewTab(const QUrl &url) { setSourceInNewTab(url); #if defined(QT_NO_WEBKIT) - highlightSearchTerms() + highlightSearchTerms(); #else connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, SLOT(highlightSearchTerms())); -- cgit v0.12 From aebc34877fb17405e8e5915760012a82d0178b97 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Jan 2010 09:52:26 +0100 Subject: doc: Corrected some bad grammar. Task-number: QTBUG-7640 --- src/gui/widgets/qmenu.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 5031d88..8ce7cc0 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -1588,10 +1588,9 @@ QAction *QMenu::insertSeparator(QAction *before) } /*! - This will set the default action to \a act. The default action may - have a visual queue depending on the current QStyle. A default - action is usually meant to indicate what will defaultly happen on a - drop, as shown in a context menu. + This sets the default action to \a act. The default action may have + a visual cue, depending on the current QStyle. A default action + usually indicates what will happen by default when a drop occurs. \sa defaultAction() */ -- cgit v0.12 From a2c153f01c9b12eb6f1d46ffaf5533bb7b3695e2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Jan 2010 10:16:21 +0100 Subject: doc: Specified default values for constructors. Task-number: QTBUG-7628 --- src/gui/text/qtextoption.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp index 0c8aeec..c1e254c 100644 --- a/src/gui/text/qtextoption.cpp +++ b/src/gui/text/qtextoption.cpp @@ -52,6 +52,9 @@ struct QTextOptionPrivate /*! Constructs a text option with default properties for text. + The text alignment property is set to Qt::AlignLeft. The + word wrap property is set to QTextOption::WordWrap. The + using of design metrics flag is set to false. */ QTextOption::QTextOption() : align(Qt::AlignLeft), @@ -67,6 +70,8 @@ QTextOption::QTextOption() /*! Constructs a text option with the given \a alignment for text. + The word wrap property is set to QTextOption::WordWrap. The using + of design metrics flag is set to false. */ QTextOption::QTextOption(Qt::Alignment alignment) : align(alignment), -- cgit v0.12 From fc7b48c2d2fb5926fa0b50f378fadc583564b7b8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Jan 2010 10:20:13 +0100 Subject: doc: Corrected misspelled word. Task-number: QTBUG-7626 --- src/corelib/tools/qsharedpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 21816b9..1b4b356 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -130,7 +130,7 @@ multiple- or virtual-inheritance (that is, in cases where two different pointer addresses can refer to the same object). In that case, if a pointer is cast to a different type and its value changes, - QSharedPointer's pointer tracking mechanism mail fail to detect that the + QSharedPointer's pointer tracking mechanism may fail to detect that the object being tracked is the same. \omit -- cgit v0.12 From 634eac05a6475280f2a1cc6e41e23c0c35628247 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Jan 2010 10:40:40 +0100 Subject: doc: Included a note showing the actual value of UserType. Task-number: QTBUG-7606 --- src/gui/graphicsview/qgraphicsitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1361a89..1ea69fb 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -276,6 +276,8 @@ and declaring a Type enum value. Example: \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 1 + + \note UserType = 65536 */ /*! -- cgit v0.12 From be0807cf52a11f0bc4dc5b06c9a91bc2980667d3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 27 Jan 2010 10:41:48 +0100 Subject: Designer: Add lower/raise to context menu. Task-number: QTCREATORBUG-592 --- tools/designer/src/components/formeditor/formwindow.cpp | 5 +++++ tools/designer/src/components/formeditor/formwindow.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp index 2d013c9..9fd084d 100644 --- a/tools/designer/src/components/formeditor/formwindow.cpp +++ b/tools/designer/src/components/formeditor/formwindow.cpp @@ -2219,6 +2219,11 @@ QMenu *FormWindow::createPopupMenu(QWidget *w) QToolBoxHelper::addToolBoxContextMenuActions(toolBox, popup); } + if (manager->actionLower()->isEnabled()) { + popup->addAction(manager->actionLower()); + popup->addAction(manager->actionRaise()); + popup->addSeparator(); + } popup->addAction(manager->actionCut()); popup->addAction(manager->actionCopy()); } diff --git a/tools/designer/src/components/formeditor/formwindow.h b/tools/designer/src/components/formeditor/formwindow.h index eed7417..3eee476 100644 --- a/tools/designer/src/components/formeditor/formwindow.h +++ b/tools/designer/src/components/formeditor/formwindow.h @@ -278,8 +278,6 @@ private: void checkPreviewGeometry(QRect &r); - void finishContextMenu(QWidget *w, QWidget *menuParent, QContextMenuEvent *e); - bool handleContextMenu(QWidget *widget, QWidget *managedWidget, QContextMenuEvent *e); bool handleMouseButtonDblClickEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e); bool handleMousePressEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e); -- cgit v0.12 From 44e3b8862cb0927637d841d276850fbac1681745 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 27 Jan 2010 11:35:32 +0100 Subject: Don't crash when comparing JSCore value without engine to non-JSCore value Task-number: None, discovering while doing test refactoring Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptvalue.cpp | 13 +++++++++---- tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 1db2e1b..5bfe46a 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1148,10 +1148,15 @@ bool QScriptValue::strictlyEquals(const QScriptValue &other) const } if (d->type != other.d_ptr->type) { - if (d->type == QScriptValuePrivate::JavaScriptCore) - return JSC::JSValue::strictEqual(d->jscValue, d->engine->scriptValueToJSCValue(other)); - else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore) - return JSC::JSValue::strictEqual(other.d_ptr->engine->scriptValueToJSCValue(*this), other.d_ptr->jscValue); + if (d->type == QScriptValuePrivate::JavaScriptCore) { + QScriptEnginePrivate *eng_p = d->engine ? d->engine : other.d_ptr->engine; + if (eng_p) + return JSC::JSValue::strictEqual(d->jscValue, eng_p->scriptValueToJSCValue(other)); + } else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore) { + QScriptEnginePrivate *eng_p = other.d_ptr->engine ? other.d_ptr->engine : d->engine; + if (eng_p) + return JSC::JSValue::strictEqual(eng_p->scriptValueToJSCValue(*this), other.d_ptr->jscValue); + } return false; } diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index b384a55..2aeabf0 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -3091,6 +3091,20 @@ void tst_QScriptValue::strictlyEquals() QVERIFY(!falskt.strictlyEquals(null)); QVERIFY(!falskt.strictlyEquals(QScriptValue())); + QVERIFY(!QScriptValue(false).strictlyEquals(123)); + QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).strictlyEquals(123)); + QVERIFY(!QScriptValue(QScriptValue::NullValue).strictlyEquals(123)); + QVERIFY(!QScriptValue(false).strictlyEquals("ciao")); + QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).strictlyEquals("ciao")); + QVERIFY(!QScriptValue(QScriptValue::NullValue).strictlyEquals("ciao")); + QVERIFY(QScriptValue(&eng, "ciao").strictlyEquals("ciao")); + QVERIFY(QScriptValue("ciao").strictlyEquals(QScriptValue(&eng, "ciao"))); + QVERIFY(!QScriptValue("ciao").strictlyEquals(123)); + QVERIFY(!QScriptValue("ciao").strictlyEquals(QScriptValue(&eng, 123))); + QVERIFY(!QScriptValue(123).strictlyEquals("ciao")); + QVERIFY(!QScriptValue(123).strictlyEquals(QScriptValue(&eng, "ciao"))); + QVERIFY(!QScriptValue(&eng, 123).strictlyEquals("ciao")); + QScriptValue obj1 = eng.newObject(); QScriptValue obj2 = eng.newObject(); QCOMPARE(obj1.strictlyEquals(obj2), false); -- cgit v0.12 From 878bf8b1dde10e28d9acd91002fd7b4e2a7a64e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 27 Jan 2010 11:58:34 +0100 Subject: Compiler warning. --- src/gui/effects/qgraphicseffect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp index ad23df3..10ef5ea 100644 --- a/src/gui/effects/qgraphicseffect.cpp +++ b/src/gui/effects/qgraphicseffect.cpp @@ -383,9 +383,9 @@ void QGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) cons { if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect && (reason == EffectRectChanged - || reason == TransformChanged - && m_cachedSystem == Qt::LogicalCoordinates)) + || (reason == TransformChanged && m_cachedSystem == Qt::LogicalCoordinates))) { return; + } QPixmapCache::remove(m_cacheKey); } -- cgit v0.12 From ac1a7e4469050aa70d065e3c7def9b3fe7aca4a8 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 27 Jan 2010 13:35:35 +0200 Subject: Polishing QS60Style by removing compiler warning Removes one compiler warning caused by animation support additions (member variables are initialized in incorrect order in default constructor). Also, removing unnecessary struct variable and one unnecessary scope definition. Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 2 +- src/gui/styles/qs60style_p.h | 9 ++++----- src/gui/styles/qs60style_s60.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index ecb3242..47ba088 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -985,7 +985,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom //Handle graphics const QRect sliderHandle = subControlRect(control, optionSlider, SC_SliderHandle, widget); QS60StylePrivate::SkinElements handleElement; - if (optionSlider->state & QStyle::State_Sunken) + if (optionSlider->state & State_Sunken) handleElement = horizontal ? QS60StylePrivate::SE_SliderHandleSelectedHorizontal : QS60StylePrivate::SE_SliderHandleSelectedVertical; else diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 2cd238f..eae2291 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -74,7 +74,6 @@ typedef struct { unsigned short width; int major_version; int minor_version; - bool mirroring; // TODO: (nice to have) Use Qt::LayoutDirection const char* layoutName; } layoutHeader; @@ -353,12 +352,12 @@ public: int timerId() const {return m_currentData->m_timerId;} int currentFrame() const {return m_currentData->m_currentFrame;} - void setFrameCount(const int &frameCount) {m_currentData->m_frames = frameCount;} - void setInterval(const int &interval) {m_currentData->m_interval = interval;} + void setFrameCount(int frameCount) {m_currentData->m_frames = frameCount;} + void setInterval(int interval) {m_currentData->m_interval = interval;} void setAnimationObject(CAknBitmapAnimation* animation); void setResourceBased(bool resourceBased) {m_currentData->m_resourceBased = resourceBased;} - void setTimerId(const int &timerId) {m_currentData->m_timerId = timerId;} - void setCurrentFrame(const int ¤tFrame) {m_currentData->m_currentFrame = currentFrame;} + void setTimerId(int timerId) {m_currentData->m_timerId = timerId;} + void setCurrentFrame(int currentFrame) {m_currentData->m_currentFrame = currentFrame;} void resetToDefaults(); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index a3bb169..872bc2b 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -105,7 +105,7 @@ AnimationData::AnimationData(const QS60StyleEnums::SkinParts part, int frames, i } AnimationDataV2::AnimationDataV2(const AnimationData &data) : AnimationData(data.m_id, data.m_frames, data.m_interval), - m_resourceBased(false), m_animation(0), m_timerId(0) + m_animation(0), m_currentFrame(0), m_resourceBased(false), m_timerId(0) { } AnimationDataV2::~AnimationDataV2() -- cgit v0.12 From b8d29f8ee076beee45cb45e8dfca8f4706d11ebd Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 27 Jan 2010 12:34:55 +0100 Subject: Cocoa: qaccessibility test crashes The reason is that the test first creates a menu bar with an exit item The exit item gets merged into the appmenu (together with a QAction) Then we destroy the menu bar, but leave the exit item in the appmenu untouched. Then we create a new menubar _without_ an exit item macUpdateMenubar will then, at one point, try to access the old exit item's QAction, wich is destroyed a long time ago; crash! This patch will make sure we clear out all actions in the menu bars appmenu when the menubar gets destroyed. Reviewed-by: Prasanth --- src/gui/kernel/qcocoamenuloader_mac.mm | 6 ++++++ src/gui/kernel/qcocoamenuloader_mac_p.h | 1 + src/gui/widgets/qmenu_mac.mm | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index 9f90cec..18b3772 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -110,6 +110,12 @@ QT_USE_NAMESPACE } } +- (void)removeActionsFromAppMenu +{ + for (NSMenuItem *item in [appMenu itemArray]) + [item setTag:nil]; +} + - (void)dealloc { [lastAppSpecificItem release]; diff --git a/src/gui/kernel/qcocoamenuloader_mac_p.h b/src/gui/kernel/qcocoamenuloader_mac_p.h index 432a7a6..81c136e 100644 --- a/src/gui/kernel/qcocoamenuloader_mac_p.h +++ b/src/gui/kernel/qcocoamenuloader_mac_p.h @@ -70,6 +70,7 @@ } - (void)ensureAppMenuInMenu:(NSMenu *)menu; +- (void)removeActionsFromAppMenu; - (NSMenu *)applicationMenu; - (NSMenu *)menu; - (NSMenuItem *)quitMenuItem; diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index cd7f9bd..31bda9a 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1830,6 +1830,10 @@ void QMenuBarPrivate::macDestroyMenuBar() mac_menubar = 0; if (qt_mac_current_menubar.qmenubar == q) { +#ifdef QT_MAC_USE_COCOA + QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); + [loader removeActionsFromAppMenu]; +#endif extern void qt_event_request_menubarupdate(); //qapplication_mac.cpp qt_event_request_menubarupdate(); } -- cgit v0.12 From 15f690e6890caae8d0c000bcc34103b1841307eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 27 Jan 2010 12:46:23 +0100 Subject: Added a warning to QGLWidget::renderText(). renderText() can't be used while a GL 2 paint engine is active on the same device, because it will clash with the GL 1 engine and wreck havoc. We simply don't support that scenario. Task-number: QTBUG-7592 Reviewed-by: Samuel --- src/opengl/qgl.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 48e43b2..2a60708 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4419,8 +4419,17 @@ void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font, bool auto_swap = autoBufferSwap(); QPaintEngine::Type oldEngineType = qgl_engine_selector()->preferredPaintEngine(); - qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); + QPaintEngine *engine = paintEngine(); + if (engine && (oldEngineType == QPaintEngine::OpenGL2) && engine->isActive()) { + qWarning("QGLWidget::renderText(): Calling renderText() while a GL 2 paint engine is" + " active on the same device is not allowed."); + return; + } + + // this changes what paintEngine() returns + qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); + engine = paintEngine(); QPainter *p; bool reuse_painter = false; if (engine->isActive()) { @@ -4513,8 +4522,17 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con win_y = height - win_y; // y is inverted QPaintEngine::Type oldEngineType = qgl_engine_selector()->preferredPaintEngine(); - qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); QPaintEngine *engine = paintEngine(); + + if (engine && (oldEngineType == QPaintEngine::OpenGL2) && engine->isActive()) { + qWarning("QGLWidget::renderText(): Calling renderText() while a GL 2 paint engine is" + " active on the same device is not allowed."); + return; + } + + // this changes what paintEngine() returns + qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); + engine = paintEngine(); QPainter *p; bool reuse_painter = false; bool use_depth_testing = glIsEnabled(GL_DEPTH_TEST); -- cgit v0.12 From 9a2a6531c91d63ad55f65ad6a2b0fdaf7d739bfe Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 27 Jan 2010 13:18:16 +0100 Subject: Carbon: deleting a QMenu while it's open will cause a crash This patch closes the menu bar if it's open when it gets destroyed Task-number: QTBUG-6597 Reviewed-by: cduclos --- src/gui/widgets/qmenu_mac.mm | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 31bda9a..7e4bbb5 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -175,6 +175,22 @@ static quint32 constructModifierMask(quint32 accel_key) return ret; } +static void cancelAllMenuTracking() +{ +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + NSMenu *mainMenu = [NSApp mainMenu]; + [mainMenu cancelTracking]; + for (NSMenuItem *item in [mainMenu itemArray]) { + if ([item submenu]) { + [[item submenu] cancelTracking]; + } + } +#else + CancelMenuTracking(AcquireRootMenu(), true, 0); +#endif +} + static bool actualMenuItemVisibility(const QMenuBarPrivate::QMacMenuBarPrivate *mbp, const QMacMenuAction *action) { @@ -1833,6 +1849,8 @@ void QMenuBarPrivate::macDestroyMenuBar() #ifdef QT_MAC_USE_COCOA QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); [loader removeActionsFromAppMenu]; +#else + cancelAllMenuTracking(); #endif extern void qt_event_request_menubarupdate(); //qapplication_mac.cpp qt_event_request_menubarupdate(); @@ -1937,20 +1955,6 @@ static bool qt_mac_should_disable_menu(QMenuBar *menuBar, QWidget *modalWidget) return qt_mac_is_ancestor(menuBar->parentWidget(), modalWidget); } -static void cancelAllMenuTracking() -{ -#ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - NSMenu *mainMenu = [NSApp mainMenu]; - [mainMenu cancelTracking]; - for (NSMenuItem *item in [mainMenu itemArray]) { - if ([item submenu]) { - [[item submenu] cancelTracking]; - } - } -#endif -} - /*! \internal -- cgit v0.12 From c64635b53a014da36203c576954042916cf87a7c Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 27 Jan 2010 12:09:17 +0100 Subject: Avoid call markParentDirty twice in prepareGeometryChange Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 4 +++- src/gui/graphicsview/qgraphicsscene.cpp | 6 ++++-- src/gui/graphicsview/qgraphicsscene_p.h | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index dc20faf..561bd42 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7240,7 +7240,9 @@ void QGraphicsItem::prepareGeometryChange() QGraphicsScenePrivate *scenePrivate = d_ptr->scene->d_func(); scenePrivate->index->prepareBoundingRectChange(this); - scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true); + scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true, /*force=*/false, + /*ignoreOpacity=*/ false, /*removingItemFromScene=*/ false, + /*updateBoundingRect=*/true); // For compatibility reasons, we have to update the item's old geometry // if someone is connected to the changed signal or the scene has no views. diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 9219773..54d47fa 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4832,7 +4832,8 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q } void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, bool invalidateChildren, - bool force, bool ignoreOpacity, bool removingItemFromScene) + bool force, bool ignoreOpacity, bool removingItemFromScene, + bool updateBoundingRect) { Q_ASSERT(item); if (updateAll) @@ -4903,7 +4904,8 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b if (ignoreOpacity) item->d_ptr->ignoreOpacity = 1; - item->d_ptr->markParentDirty(); + if (!updateBoundingRect) + item->d_ptr->markParentDirty(); } static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item, diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index 54d8130..04ffe0f 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -222,7 +222,8 @@ public: QRegion *, QWidget *, qreal, const QTransform *const, bool, bool); void markDirty(QGraphicsItem *item, const QRectF &rect = QRectF(), bool invalidateChildren = false, - bool force = false, bool ignoreOpacity = false, bool removingItemFromScene = false); + bool force = false, bool ignoreOpacity = false, bool removingItemFromScene = false, + bool updateBoundingRect = false); void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false, qreal parentOpacity = qreal(1.0)); -- cgit v0.12 From 0b2bde7af1ec6cec5c1bc674c9049b12fe0deb20 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 27 Jan 2010 14:43:54 +0200 Subject: Added support for embedded sis name/uid patching for Symbian Patch_capabilities.pl script now also patches any embedded sis file entries in pkg to embed corresponding *_selfsigned.sis instead. Also the script now removes dependencies to other packages from patched pkg to reduce unnecessary warnings about missing dependencies when said dependencies were installed via patched sises. Reviewed-by: Janne Koskinen --- bin/patch_capabilities.pl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index b6bf5c3..9daa13e 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -111,12 +111,31 @@ if (@ARGV) # Parse each line. while () { + # Patch pkg UID my $line = $_; my $newLine = $line; - if ( $line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/) + if ($line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/) { $newLine =~ s/\(0x./\(0xE/; } + + # Patch embedded sis name and UID + if ($line =~ m/^@.*\.sis.*\(0x[0-9|a-f|A-F]*\).*$/) + { + $newLine =~ s/\(0x./\(0xE/; + if ($line !~ m/^.*_selfsigned.sis.*$/) + { + $newLine =~ s/\.sis/_selfsigned\.sis/i; + } + } + + # Remove all dependencies to other packages to reduce unnecessary error messages + # from depended packages that are also patched and therefore have different UID. + if ($line =~ m/^\(0x[0-9|a-f|A-F]*\).*\{.*\}$/) + { + $newLine = "" + } + print NEW_PKG $newLine; chomp ($line); -- cgit v0.12 From c513782f7cbad45b7c91e069ae81552a4bbb2a5f Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 27 Jan 2010 14:55:54 +0200 Subject: Added a selfsigned version of sqlite3.sis Reviewed-by: TrustMe --- src/s60installs/sqlite3_selfsigned.sis | Bin 0 -> 285088 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/s60installs/sqlite3_selfsigned.sis diff --git a/src/s60installs/sqlite3_selfsigned.sis b/src/s60installs/sqlite3_selfsigned.sis new file mode 100644 index 0000000..a025ac5 Binary files /dev/null and b/src/s60installs/sqlite3_selfsigned.sis differ -- cgit v0.12 From 41ff82566a360a478766ee16e72958f5441947fc Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 27 Jan 2010 14:17:59 +0100 Subject: Removing unneeded code from QFontEngine::getGlyphPositions() Two QVarLengthArray resizes and one local int variable less. Reviewed-by: Simon Hausmann modified: src/gui/text/qfontengine.cpp --- src/gui/text/qfontengine.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 9343cb7..c000457 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -357,9 +357,6 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform ++i; } } else { - positions.resize(glyphs.numGlyphs); - glyphs_out.resize(glyphs.numGlyphs); - int i = 0; while (i < glyphs.numGlyphs) { if (!glyphs.attributes[i].dontPrint) { QFixed gpos_x = xpos + glyphs.offsets[i].x; -- cgit v0.12 From 9d207f042ea135eda6bcd91c47d581914470fa6d Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Wed, 27 Jan 2010 14:44:59 +0100 Subject: Mac: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. The problem here was the way we entered Full Screen Mode. We were using "kUIModeAllSuppressed" which does the following according to the manual: kUIModeAllSuppressed All system UI elements (including the menu bar) are hidden. However, these elements may automatically show themselves in response to mouse movements or other user activity. I changed it to "kUIModeAllHidden", which does the following: All system UI elements (including the menu bar) are hidden. To prevent a change of behavior I added the following option to the SetSystemUIMode: kUIOptionAutoShowMenuBar This flag specifies that the menu bar automatically shows itself when the user moves the mouse into the screen area that would ordinarily be occupied by the menu bar. Only valid for the presentation mode kUIModeAllHidden. Task-number: QTBUG-7625 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 3dbc843..ebfab21 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -404,7 +404,7 @@ inline static void qt_mac_set_fullscreen_mode(bool b) return; qt_mac_app_fullscreen = b; if (b) { - SetSystemUIMode(kUIModeAllSuppressed, 0); + SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); } else { SetSystemUIMode(kUIModeNormal, 0); } -- cgit v0.12 From 78bb23107d9fcde431cd2ba83c1a9e9886b6d51a Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 27 Jan 2010 15:56:24 +0200 Subject: QComboBox drawn incorrectly in RightToLeft mode QS60Style does not regard layout orientation when calculating subrects for QComboBox. This leads to a situation where button is not visible on UI with RightToLeft orientation. Task-number: QTBUG-7584 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 47ba088..78279d1 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2620,29 +2620,31 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple // lets use spinbox frame here as well, as no combobox specific value available. const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0; const int buttonWidth = qMax(cmb->rect.height(), buttonIconSize); - const int xposMod = (cmb->rect.x()) + width - buttonMargin - buttonWidth; - const int ypos = cmb->rect.y(); QSize buttonSize; buttonSize.setWidth(buttonWidth + 2 * buttonMargin); buttonSize.setHeight(qMax(8, (cmb->rect.height() >> 1) - frameThickness)); //buttons should be squares buttonSize = buttonSize.expandedTo(QApplication::globalStrut()); switch (scontrol) { - case SC_ComboBoxArrow: + case SC_ComboBoxArrow: { + const int xposMod = cmb->rect.x() + width - buttonMargin - buttonWidth; + const int ypos = cmb->rect.y(); ret.setRect(xposMod, ypos + buttonMargin, buttonWidth, height - 2 * buttonMargin); + } break; case SC_ComboBoxEditField: { - const int withFrameX = cmb->rect.x() + cmb->rect.width() - frameThickness - buttonSize.width(); + const int withFrameX = cmb->rect.x() + width - frameThickness - buttonSize.width(); ret = QRect( frameThickness, frameThickness, withFrameX - frameThickness, - cmb->rect.height() - 2 * frameThickness); + height - 2 * frameThickness); } break; default: break; } + ret = visualRect(cmb->direction, cmb->rect, ret); } break; case CC_GroupBox: -- cgit v0.12 From d74f8fd8d7d378bbf23872ddc24ddfbfd948e295 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 15:59:24 +0100 Subject: fix bogus warning message --- tools/linguist/lrelease/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp index 7834b06..c418bcc 100644 --- a/tools/linguist/lrelease/main.cpp +++ b/tools/linguist/lrelease/main.cpp @@ -260,10 +260,7 @@ int main(int argc, char **argv) return 1; } } else { - qWarning("error: lrelease encountered project file functionality that is currently not supported.\n" - "You might want to consider using TS files as input instead of a project file.\n" - "Try the following syntax:\n" - " lrelease [options] ts-files [-qm qm-file]\n"); + qWarning("lrelease error: cannot read project file %s.", qPrintable(inputFile)); } } else { if (outputFile.isEmpty()) { -- cgit v0.12 From d97a3e97f54d1e1d028fd7bc2b46171c6b0be966 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Jan 2010 19:28:51 +0100 Subject: do not sort the TS files really no point in doing so ... --- tools/linguist/lupdate/main.cpp | 1 - tools/linguist/shared/proreader.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 2129265..0db2b25 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -525,7 +525,6 @@ int main(int argc, char **argv) if (!cd.error().isEmpty()) printOut(cd.error()); - tsFiles.sort(); tsFiles.removeDuplicates(); if (!tsFiles.isEmpty()) diff --git a/tools/linguist/shared/proreader.cpp b/tools/linguist/shared/proreader.cpp index 4a621a8..f249f24 100644 --- a/tools/linguist/shared/proreader.cpp +++ b/tools/linguist/shared/proreader.cpp @@ -95,9 +95,8 @@ void evaluateProFile(const ProFileEvaluator &visitor, QHashinsert("SOURCES", sourceFiles); -- cgit v0.12 From 20c871370727630b83adce1e96ac0437802c433a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Jan 2010 19:36:38 +0100 Subject: still complain if only ts files where specified on the cmdline --- tools/linguist/lupdate/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 0db2b25..301f217 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -367,8 +367,6 @@ int main(int argc, char **argv) return 1; } - numFiles++; - codecForTr.clear(); codecForSource.clear(); @@ -395,6 +393,7 @@ int main(int argc, char **argv) } else if (arg.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive) || arg.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) { proFiles << arg; + numFiles++; } else { QFileInfo fi(arg); if (!fi.exists()) { @@ -439,9 +438,15 @@ int main(int argc, char **argv) } else { sourceFiles << QDir::cleanPath(fi.absoluteFilePath());; } + numFiles++; } } // for args + if (numFiles == 0) { + printUsage(); + return 1; + } + foreach (const QString &proFile, proFiles) projectRoots.insert(QDir::cleanPath(QFileInfo(proFile).absolutePath()) + QLatin1Char('/')); @@ -533,10 +538,5 @@ int main(int argc, char **argv) firstPass = false; } - if (numFiles == 0) { - printUsage(); - return 1; - } - return fail ? 1 : 0; } -- cgit v0.12 From 03e114b11ee5cd51e0b9151e0c728fe370578d53 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 17:15:43 +0100 Subject: complain if both sources and projects are given on the cmdline --- tools/linguist/lupdate/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 301f217..c5051cd 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -442,6 +442,10 @@ int main(int argc, char **argv) } } // for args + if (!proFiles.isEmpty() && !sourceFiles.isEmpty()) { + qWarning("lupdate error: Both project and source files specified.\n"); + return 1; + } if (numFiles == 0) { printUsage(); return 1; -- cgit v0.12 From b0a454fd09e0cbf74304aabd160ea25c2c83b4b9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 19:19:33 +0100 Subject: unshare pro post-processing code lrelease needs only the TRANSLATIONS value anyway, so there is hardly anything to share for real --- tools/linguist/lrelease/main.cpp | 40 ++++++----- tools/linguist/lupdate/main.cpp | 60 +++++++++++++---- tools/linguist/shared/proparser.pri | 2 - tools/linguist/shared/proreader.cpp | 130 ------------------------------------ tools/linguist/shared/proreader.h | 57 ---------------- 5 files changed, 73 insertions(+), 216 deletions(-) delete mode 100644 tools/linguist/shared/proreader.cpp delete mode 100644 tools/linguist/shared/proreader.h diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp index c418bcc..266474e 100644 --- a/tools/linguist/lrelease/main.cpp +++ b/tools/linguist/lrelease/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "translator.h" -#include "proreader.h" +#include "profileevaluator.h" #ifndef QT_BOOTSTRAPPED #include @@ -246,21 +246,31 @@ int main(int argc, char **argv) foreach (const QString &inputFile, inputFiles) { if (inputFile.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive) || inputFile.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) { - QHash varMap; - bool ok = evaluateProFile(inputFile, cd.isVerbose(), &varMap); - if (ok) { - QStringList translations = varMap.value("TRANSLATIONS"); - if (translations.isEmpty()) { - qWarning("lrelease warning: Met no 'TRANSLATIONS' entry in" - " project file '%s'\n", - qPrintable(inputFile)); - } else { - foreach (const QString &trans, translations) - if (!releaseTsFile(trans, cd, removeIdentical)) - return 1; - } + QFileInfo fi(inputFile); + ProFile pro(fi.absoluteFilePath()); + + ProFileEvaluator visitor; + visitor.setVerbose(cd.isVerbose()); + + if (!visitor.queryProFile(&pro)) { + qWarning("lrelease error: cannot read project file '%s'.", qPrintable(inputFile)); + continue; + } + if (!visitor.accept(&pro)) { + qWarning("lrelease error: cannot process project file '%s'.", qPrintable(inputFile)); + continue; + } + + QStringList translations = visitor.values(QLatin1String("TRANSLATIONS")); + if (translations.isEmpty()) { + qWarning("lrelease warning: Met no 'TRANSLATIONS' entry in" + " project file '%s'\n", + qPrintable(inputFile)); } else { - qWarning("lrelease error: cannot read project file %s.", qPrintable(inputFile)); + QDir proDir(fi.absolutePath()); + foreach (const QString &trans, translations) + if (!releaseTsFile(QFileInfo(proDir, trans).filePath(), cd, removeIdentical)) + return 1; } } else { if (outputFile.isEmpty()) { diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index c5051cd..44717bf 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -43,7 +43,6 @@ #include #include -#include #include #include @@ -214,6 +213,42 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil } } +static QStringList getSources(const char *var, const char *vvar, const QStringList &baseVPaths, + const QString &projectDir, const ProFileEvaluator &visitor) +{ + QStringList vPaths = visitor.absolutePathValues(QLatin1String(vvar), projectDir); + vPaths += baseVPaths; + vPaths.removeDuplicates(); + return visitor.absoluteFileValues(QLatin1String(var), projectDir, vPaths, 0); +} + +static QStringList getSources(const ProFileEvaluator &visitor, const QString &projectDir) +{ + QStringList baseVPaths; + baseVPaths += visitor.absolutePathValues(QLatin1String("VPATH"), projectDir); + baseVPaths << projectDir; // QMAKE_ABSOLUTE_SOURCE_PATH + baseVPaths += visitor.absolutePathValues(QLatin1String("DEPENDPATH"), projectDir); + baseVPaths.removeDuplicates(); + + QStringList sourceFiles; + + // app/lib template + sourceFiles += getSources("SOURCES", "VPATH_SOURCES", baseVPaths, projectDir, visitor); + + sourceFiles += getSources("FORMS", "VPATH_FORMS", baseVPaths, projectDir, visitor); + sourceFiles += getSources("FORMS3", "VPATH_FORMS3", baseVPaths, projectDir, visitor); + + QStringList vPathsInc = baseVPaths; + vPathsInc += visitor.absolutePathValues(QLatin1String("INCLUDEPATH"), projectDir); + vPathsInc.removeDuplicates(); + sourceFiles += visitor.absoluteFileValues(QLatin1String("HEADERS"), projectDir, vPathsInc, 0); + + sourceFiles.removeDuplicates(); + sourceFiles.sort(); + + return sourceFiles; +} + int main(int argc, char **argv) { QCoreApplication app(argc, argv); @@ -467,7 +502,6 @@ int main(int argc, char **argv) QStringList tsFiles = tsFileNames; if (proFiles.count() > 0) { QFileInfo pfi(proFiles.takeFirst()); - QHash variables; ProFileEvaluator visitor; visitor.setVerbose(options & Verbose); @@ -494,19 +528,19 @@ int main(int argc, char **argv) cd.m_includePath += visitor.values(QLatin1String("INCLUDEPATH")); - evaluateProFile(visitor, &variables, pfi.absolutePath()); - - sourceFiles = variables.value("SOURCES"); + sourceFiles = getSources(visitor, pfi.absolutePath()); - QStringList tmp = variables.value("CODECFORTR"); - if (!tmp.isEmpty() && !tmp.first().isEmpty()) { - codecForTr = tmp.first().toLatin1(); + QStringList tmp = visitor.values(QLatin1String("CODEC")) + + visitor.values(QLatin1String("DEFAULTCODEC")) + + visitor.values(QLatin1String("CODECFORTR")); + if (!tmp.isEmpty()) { + codecForTr = tmp.last().toLatin1(); fetchedTor.setCodecName(codecForTr); cd.m_outputCodec = codecForTr; } - tmp = variables.value("CODECFORSRC"); - if (!tmp.isEmpty() && !tmp.first().isEmpty()) { - codecForSource = tmp.first().toLatin1(); + tmp = visitor.values(QLatin1String("CODECFORSRC")); + if (!tmp.isEmpty()) { + codecForSource = tmp.last().toLatin1(); if (!QTextCodec::codecForName(codecForSource)) qWarning("lupdate warning: Codec for source '%s' is invalid. Falling back to codec for tr().", codecForSource.constData()); @@ -514,7 +548,9 @@ int main(int argc, char **argv) cd.m_codecForSource = codecForSource; } - tsFiles += variables.value("TRANSLATIONS"); + QDir proDir(pfi.absolutePath()); + foreach (const QString &tsFile, visitor.values(QLatin1String("TRANSLATIONS"))) + tsFiles << QFileInfo(proDir, tsFile).filePath(); } QStringList sourceFilesCpp; diff --git a/tools/linguist/shared/proparser.pri b/tools/linguist/shared/proparser.pri index 99d32e7..372247e 100644 --- a/tools/linguist/shared/proparser.pri +++ b/tools/linguist/shared/proparser.pri @@ -2,13 +2,11 @@ INCLUDEPATH *= $$PWD HEADERS += \ - $$PWD/proreader.h \ $$PWD/abstractproitemvisitor.h \ $$PWD/proitems.h \ $$PWD/profileevaluator.h \ $$PWD/proparserutils.h SOURCES += \ - $$PWD/proreader.cpp \ $$PWD/proitems.cpp \ $$PWD/profileevaluator.cpp diff --git a/tools/linguist/shared/proreader.cpp b/tools/linguist/shared/proreader.cpp deleted file mode 100644 index f249f24..0000000 --- a/tools/linguist/shared/proreader.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Linguist of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "profileevaluator.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -static QStringList getSources(const char *var, const char *vvar, const QStringList &baseVPaths, - const QString &projectDir, const ProFileEvaluator &visitor) -{ - QStringList vPaths = - visitor.absolutePathValues(QLatin1String(vvar), projectDir); - vPaths += baseVPaths; - vPaths.removeDuplicates(); - return visitor.absoluteFileValues(QLatin1String(var), projectDir, vPaths, 0); -} - -void evaluateProFile(const ProFileEvaluator &visitor, QHash *varMap, - const QString &projectDir) -{ - QStringList baseVPaths; - baseVPaths += visitor.absolutePathValues(QLatin1String("VPATH"), projectDir); - baseVPaths << projectDir; // QMAKE_ABSOLUTE_SOURCE_PATH - baseVPaths += visitor.absolutePathValues(QLatin1String("DEPENDPATH"), projectDir); - baseVPaths.removeDuplicates(); - - QStringList sourceFiles; - QString codecForTr; - QString codecForSource; - QStringList tsFileNames; - - // app/lib template - sourceFiles += getSources("SOURCES", "VPATH_SOURCES", baseVPaths, projectDir, visitor); - - sourceFiles += getSources("FORMS", "VPATH_FORMS", baseVPaths, projectDir, visitor); - sourceFiles += getSources("FORMS3", "VPATH_FORMS3", baseVPaths, projectDir, visitor); - - QStringList vPathsInc = baseVPaths; - vPathsInc += visitor.absolutePathValues(QLatin1String("INCLUDEPATH"), projectDir); - vPathsInc.removeDuplicates(); - sourceFiles += visitor.absoluteFileValues(QLatin1String("HEADERS"), projectDir, vPathsInc, 0); - - QDir proDir(projectDir); - foreach (const QString &tsFile, visitor.values(QLatin1String("TRANSLATIONS"))) - tsFileNames << QFileInfo(proDir, tsFile).filePath(); - - QStringList trcodec = visitor.values(QLatin1String("CODEC")) - + visitor.values(QLatin1String("DEFAULTCODEC")) - + visitor.values(QLatin1String("CODECFORTR")); - if (!trcodec.isEmpty()) - codecForTr = trcodec.last(); - - QStringList srccodec = visitor.values(QLatin1String("CODECFORSRC")); - if (!srccodec.isEmpty()) - codecForSource = srccodec.last(); - - sourceFiles.removeDuplicates(); - sourceFiles.sort(); - tsFileNames.removeDuplicates(); - - varMap->insert("SOURCES", sourceFiles); - varMap->insert("CODECFORTR", QStringList() << codecForTr); - varMap->insert("CODECFORSRC", QStringList() << codecForSource); - varMap->insert("TRANSLATIONS", tsFileNames); -} - -bool evaluateProFile(const QString &fileName, bool verbose, QHash *varMap) -{ - QFileInfo fi(fileName); - if (!fi.exists()) - return false; - - ProFile pro(fi.absoluteFilePath()); - - ProFileEvaluator visitor; - visitor.setVerbose(verbose); - - if (!visitor.queryProFile(&pro)) - return false; - - if (!visitor.accept(&pro)) - return false; - - evaluateProFile(visitor, varMap, fi.absolutePath()); - - return true; -} - -QT_END_NAMESPACE diff --git a/tools/linguist/shared/proreader.h b/tools/linguist/shared/proreader.h deleted file mode 100644 index 70421d7..0000000 --- a/tools/linguist/shared/proreader.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Linguist of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef PROREADER_H -#define PROREADER_H - -#include - -QT_BEGIN_NAMESPACE - -class ProFileEvaluator; - -void evaluateProFile(const ProFileEvaluator &visitor, QHash *varMap, - const QString &projectDir); -bool evaluateProFile(const QString &fileName, bool verbose, QHash *varMap); - -QT_END_NAMESPACE - -#endif // PROREADER_H -- cgit v0.12 From bcd35f48a93591a1d2524490ebba9887075ee92e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 20:41:40 +0100 Subject: fix printing output from failed command --- tests/auto/linguist/lupdate/tst_lupdate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 568be37..6095140 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -287,7 +287,7 @@ void tst_lupdate::good() "\"lupdate " + lupdatecmd.toLatin1() + "\" crashed\n" + output); QVERIFY2(!proc.exitCode(), "\"lupdate " + lupdatecmd.toLatin1() + "\" exited with code " + - QByteArray::number(proc.exitCode()) + "\n" + proc.readAll()); + QByteArray::number(proc.exitCode()) + "\n" + output); // If the file expectedoutput.txt exists, compare the // console output with the content of that file -- cgit v0.12 From 6874f4381278d17ad62298e145f366d4e0f038bd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 19:49:13 +0100 Subject: support multiple output files --- tests/auto/linguist/lupdate/tst_lupdate.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 6095140..b68eadc 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -245,10 +245,9 @@ void tst_lupdate::good() qDebug() << "Checking..."; - QString generatedtsfile(dir + QLatin1String("/project.ts")); - - // look for a command + QStringList generatedtsfiles(dir + QLatin1String("/project.ts")); QString lupdatecmd; + QFile file(dir + "/lupdatecmd"); if (file.exists()) { QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(file.fileName())); @@ -262,16 +261,21 @@ void tst_lupdate::good() break; } else if (cmdstring.startsWith("TRANSLATION:")) { cmdstring.remove(0, 12); - generatedtsfile = dir + QLatin1Char('/') + cmdstring.trimmed(); + generatedtsfiles.clear(); + foreach (const QByteArray &s, cmdstring.split(' ')) + if (!s.isEmpty()) + generatedtsfiles << dir + QLatin1Char('/') + s; } } file.close(); } - QFile::remove(generatedtsfile); - QString beforetsfile = generatedtsfile + QLatin1String(".before"); - if (QFile::exists(beforetsfile)) - QVERIFY2(QFile::copy(beforetsfile, generatedtsfile), qPrintable(beforetsfile)); + foreach (const QString &ts, generatedtsfiles) { + QFile::remove(ts); + QString beforetsfile = ts + QLatin1String(".before"); + if (QFile::exists(beforetsfile)) + QVERIFY2(QFile::copy(beforetsfile, ts), qPrintable(beforetsfile)); + } if (lupdatecmd.isEmpty()) lupdatecmd = QLatin1String("project.pro"); @@ -299,8 +303,8 @@ void tst_lupdate::good() return; } - QString expectedFile = generatedtsfile + QLatin1String(".result"); - doCompare(generatedtsfile, expectedFile, false); + foreach (const QString &ts, generatedtsfiles) + doCompare(ts, ts + QLatin1String(".result"), false); } void tst_lupdate::commandline_data() -- cgit v0.12 From 7c824cff70d528644b992595f3195f9fd2474fc2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 20:09:59 +0100 Subject: add ability to set working dir for test --- tests/auto/linguist/lupdate/tst_lupdate.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index b68eadc..b45383f 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -245,7 +245,8 @@ void tst_lupdate::good() qDebug() << "Checking..."; - QStringList generatedtsfiles(dir + QLatin1String("/project.ts")); + QString workDir = dir; + QStringList generatedtsfiles(QLatin1String("project.ts")); QString lupdatecmd; QFile file(dir + "/lupdatecmd"); @@ -264,17 +265,21 @@ void tst_lupdate::good() generatedtsfiles.clear(); foreach (const QByteArray &s, cmdstring.split(' ')) if (!s.isEmpty()) - generatedtsfiles << dir + QLatin1Char('/') + s; + generatedtsfiles << s; + } else if (cmdstring.startsWith("cd ")) { + cmdstring.remove(0, 3); + workDir = QDir::cleanPath(dir + QLatin1Char('/') + cmdstring); } } file.close(); } foreach (const QString &ts, generatedtsfiles) { - QFile::remove(ts); - QString beforetsfile = ts + QLatin1String(".before"); + QString genTs = workDir + QLatin1Char('/') + ts; + QFile::remove(genTs); + QString beforetsfile = dir + QLatin1Char('/') + ts + QLatin1String(".before"); if (QFile::exists(beforetsfile)) - QVERIFY2(QFile::copy(beforetsfile, ts), qPrintable(beforetsfile)); + QVERIFY2(QFile::copy(beforetsfile, genTs), qPrintable(beforetsfile)); } if (lupdatecmd.isEmpty()) @@ -282,7 +287,7 @@ void tst_lupdate::good() lupdatecmd.prepend("-silent "); QProcess proc; - proc.setWorkingDirectory(dir); + proc.setWorkingDirectory(workDir); proc.setProcessChannelMode(QProcess::MergedChannels); proc.start(m_cmdLupdate + ' ' + lupdatecmd, QIODevice::ReadWrite | QIODevice::Text); QVERIFY2(proc.waitForFinished(5000), qPrintable(lupdatecmd)); @@ -304,7 +309,8 @@ void tst_lupdate::good() } foreach (const QString &ts, generatedtsfiles) - doCompare(ts, ts + QLatin1String(".result"), false); + doCompare(workDir + QLatin1Char('/') + ts, + dir + QLatin1Char('/') + ts + QLatin1String(".result"), false); } void tst_lupdate::commandline_data() -- cgit v0.12 From df9a6a9bf9d7bf3609ac034e705d076b82572333 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 20:16:59 +0100 Subject: absorb cmdline tests into "good" structure --- tests/auto/linguist/lupdate/.gitignore | 1 - .../testdata/good/cmdline_deeppath/lupdatecmd | 2 + .../good/cmdline_deeppath/project.ts.result | 27 +++++ .../testdata/good/cmdline_recurse/lupdatecmd | 2 + .../good/cmdline_recurse/project.ts.result | 115 +++++++++++++++++++++ .../lupdate/testdata/recursivescan/bar.ts.result | 27 ----- .../lupdate/testdata/recursivescan/foo.ts.result | 115 --------------------- tests/auto/linguist/lupdate/tst_lupdate.cpp | 41 -------- 8 files changed, 146 insertions(+), 184 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result delete mode 100644 tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result delete mode 100644 tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result diff --git a/tests/auto/linguist/lupdate/.gitignore b/tests/auto/linguist/lupdate/.gitignore index 389f2dc..3572c82 100644 --- a/tests/auto/linguist/lupdate/.gitignore +++ b/tests/auto/linguist/lupdate/.gitignore @@ -1,4 +1,3 @@ tst_lupdate testdata/good/*/project.ts testdata/good/*/*/project.ts -testdata/recursivescan/*.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd new file mode 100644 index 0000000..301d839 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd @@ -0,0 +1,2 @@ +cd ../../recursivescan +lupdate sub/finddialog.cpp -ts project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result new file mode 100644 index 0000000..5c3c21c --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result @@ -0,0 +1,27 @@ + + + + + FindDialog + + + Enter the text you want to find. + + + + + Search reached end of the document + + + + + Search reached start of the document + + + + + Text not found + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd new file mode 100644 index 0000000..1814e67 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd @@ -0,0 +1,2 @@ +cd ../../recursivescan +lupdate . -ts project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result new file mode 100644 index 0000000..95a34fa --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result @@ -0,0 +1,115 @@ + + + + + FindDialog + + + Qt Assistant - Finn text + + + + + Finn tekst + + + + + Enter the text you want to find. + + + + + Search reached end of the document + + + + + Search reached start of the document + + + + + Text not found + + + + + QObject + + + +newline at the start + + + + + newline at the end + + + + + + newline and space at the end + + + + + + space and newline at the end + + + + + + Tab at the start and newline at the end + + + + + + + newline and tab at the start + + + + + space and tab at the start + + + + + space_first + + + + + space_last + + + + + text/c++ + + + test + + + + + text/cpp + + + test + + + + + text/cxx + + + test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result deleted file mode 100644 index 5c3c21c..0000000 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result +++ /dev/null @@ -1,27 +0,0 @@ - - - - - FindDialog - - - Enter the text you want to find. - - - - - Search reached end of the document - - - - - Search reached start of the document - - - - - Text not found - - - - diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result deleted file mode 100644 index 95a34fa..0000000 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result +++ /dev/null @@ -1,115 +0,0 @@ - - - - - FindDialog - - - Qt Assistant - Finn text - - - - - Finn tekst - - - - - Enter the text you want to find. - - - - - Search reached end of the document - - - - - Search reached start of the document - - - - - Text not found - - - - - QObject - - - -newline at the start - - - - - newline at the end - - - - - - newline and space at the end - - - - - - space and newline at the end - - - - - - Tab at the start and newline at the end - - - - - - - newline and tab at the start - - - - - space and tab at the start - - - - - space_first - - - - - space_last - - - - - text/c++ - - - test - - - - - text/cpp - - - test - - - - - text/cxx - - - test - - - - diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index b45383f..c179462 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -59,8 +59,6 @@ public: private slots: void good_data(); void good(); - void commandline_data(); - void commandline(); #if CHECK_SIMTEXTH void simtexth(); void simtexth_data(); @@ -313,45 +311,6 @@ void tst_lupdate::good() dir + QLatin1Char('/') + ts + QLatin1String(".result"), false); } -void tst_lupdate::commandline_data() -{ - QTest::addColumn("currentPath"); - QTest::addColumn("commandline"); - QTest::addColumn("generatedtsfile"); - QTest::addColumn("expectedtsfile"); - - QTest::newRow("Recursive scan") << QString("recursivescan") - << QString(". -ts foo.ts") << QString("foo.ts") << QString("foo.ts.result"); - QTest::newRow("Deep path argument") << QString("recursivescan") - << QString("sub/finddialog.cpp -ts bar.ts") << QString("bar.ts") << QString("bar.ts.result"); -} - -void tst_lupdate::commandline() -{ - QFETCH(QString, currentPath); - QFETCH(QString, commandline); - QFETCH(QString, generatedtsfile); - QFETCH(QString, expectedtsfile); - - QString generated = - m_basePath + currentPath + QLatin1Char('/') + generatedtsfile; - QFile gen(generated); - if (gen.exists()) - QVERIFY(gen.remove()); - QProcess proc; - proc.setWorkingDirectory(m_basePath + currentPath); - proc.setProcessChannelMode(QProcess::MergedChannels); - proc.start(m_cmdLupdate + " -silent " + commandline, QIODevice::ReadWrite | QIODevice::Text); - QVERIFY2(proc.waitForFinished(5000), qPrintable(commandline)); - QVERIFY2(proc.exitStatus() == QProcess::NormalExit, - "\"lupdate -silent " + commandline.toLatin1() + "\" crashed\n" + proc.readAll()); - QVERIFY2(!proc.exitCode(), - "\"lupdate -silent " + commandline.toLatin1() + "\" exited with code " + - QByteArray::number(proc.exitCode()) + "\n" + proc.readAll()); - - doCompare(generated, m_basePath + currentPath + QLatin1Char('/') + expectedtsfile, false); -} - #if CHECK_SIMTEXTH void tst_lupdate::simtexth() { -- cgit v0.12 From b62b87d6ae3ced4466c1a1b085b51cec757e24f5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jan 2010 21:00:05 +0100 Subject: sanitize lupdate's behavior regarding SUBDIRS projects previously, the semantics of nesting projects were pretty bizarre: the list of TS files grew ever as the subdirs were visited. the source files otoh were cleared for every project. this meant that some TS files were updated over and over again, each time with different data. this is obviously total nonsense, so there is no compatibilty to keep. so here come the new semantics: - each project is scanned separately. it has separate include paths and may override the inherited CODECFORSRC. - the messages from all sub-projects are merged - if a sub-project has a TRANSLATIONS entry, it is "detached" from its parent project, thus starting an own merged translator. it is also possible to name an empty set of TS files to simply exclude the sub-project. - CODECFORTR can be specified in each project with TRANSLATIONS - if TS files are specified on the command line, they override TRANSLATIONS from the top level project and stop processing of detached projects alltogether. if multiple top-level projects are specified, they are all merged. this is somewhat slower, as now includes are re-scanned per project, while previously all sources were simply accumulated and scanned as one project. this can be fixed retroactively if needed. --- tests/auto/linguist/lupdate/.gitignore | 5 +- .../testdata/good/recurse_full/expectedoutput.txt | 0 .../lupdate/testdata/good/recurse_full/lupdatecmd | 2 + .../testdata/good/recurse_full/project.ts.result | 20 ++ .../good/recurse_full/project_sub.ts.result | 13 + .../good/recurse_full_ts/expectedoutput.txt | 2 + .../testdata/good/recurse_full_ts/lupdatecmd | 3 + .../good/recurse_full_ts/project.ts.result | 20 ++ .../good/recurse_full_ts/project_sub.ts.before | 0 .../good/recurse_full_ts/project_sub.ts.result | 0 .../good/recurse_full_ts_join/expectedoutput.txt | 0 .../testdata/good/recurse_full_ts_join/lupdatecmd | 2 + .../good/recurse_full_ts_join/project.ts.result | 20 ++ .../testdata/good/recurse_part/expectedoutput.txt | 1 + .../lupdate/testdata/good/recurse_part/lupdatecmd | 2 + .../testdata/good/recurse_part/project.ts.before | 0 .../testdata/good/recurse_part/project.ts.result | 0 .../good/recurse_part/project_sub.ts.result | 13 + .../good/recurse_part_ts/expectedoutput.txt | 1 + .../testdata/good/recurse_part_ts/lupdatecmd | 3 + .../good/recurse_part_ts/project.ts.result | 20 ++ .../good/recurse_part_ts/project_sub.ts.before | 0 .../good/recurse_part_ts/project_sub.ts.result | 0 .../lupdate/testdata/good/reloutput/lupdatecmd | 1 - .../lupdate/testdata/subdirs_full/project.pro | 4 + .../lupdate/testdata/subdirs_full/subdir1/main.cpp | 46 ++++ .../testdata/subdirs_full/subdir1/subdir1.pro | 1 + .../testdata/subdirs_full/subdir2/subdir2.pro | 2 + .../testdata/subdirs_full/subdir2/subsub1/main.cpp | 46 ++++ .../subdirs_full/subdir2/subsub1/subsub1.pro | 1 + .../testdata/subdirs_full/subdir2/subsub2/main.cpp | 46 ++++ .../subdirs_full/subdir2/subsub2/subsub2.pro | 4 + .../lupdate/testdata/subdirs_part/project.pro | 2 + .../lupdate/testdata/subdirs_part/subdir1/main.cpp | 46 ++++ .../testdata/subdirs_part/subdir1/subdir1.pro | 1 + .../testdata/subdirs_part/subdir2/subdir2.pro | 2 + .../testdata/subdirs_part/subdir2/subsub1/main.cpp | 46 ++++ .../subdirs_part/subdir2/subsub1/subsub1.pro | 1 + .../testdata/subdirs_part/subdir2/subsub2/main.cpp | 46 ++++ .../subdirs_part/subdir2/subsub2/subsub2.pro | 4 + tools/linguist/lupdate/main.cpp | 264 +++++++++++++-------- 41 files changed, 592 insertions(+), 98 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before create mode 100644 tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro diff --git a/tests/auto/linguist/lupdate/.gitignore b/tests/auto/linguist/lupdate/.gitignore index 3572c82..a11e8d1 100644 --- a/tests/auto/linguist/lupdate/.gitignore +++ b/tests/auto/linguist/lupdate/.gitignore @@ -1,3 +1,4 @@ tst_lupdate -testdata/good/*/project.ts -testdata/good/*/*/project.ts +testdata/*/*.ts +testdata/*/*/*.ts +testdata/*/*/*/*.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd new file mode 100644 index 0000000..40987e2 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd @@ -0,0 +1,2 @@ +TRANSLATION: project.ts project_sub.ts +cd ../../subdirs_full diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result new file mode 100644 index 0000000..7d9a6f4 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result @@ -0,0 +1,20 @@ + + + + + subdir1 + + + minimal test + + + + + subsub1 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result new file mode 100644 index 0000000..cddb963 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result @@ -0,0 +1,13 @@ + + + +ISO-8859-2 + + subsub2 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt new file mode 100644 index 0000000..fd7a158 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt @@ -0,0 +1,2 @@ +lupdate warning: TS files from command line will override TRANSLATIONS in project\.pro\. +lupdate warning: TS files from command line prevent recursing into .*/subdir2/subsub2/subsub2\.pro\. diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd new file mode 100644 index 0000000..33296c3 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd @@ -0,0 +1,3 @@ +TRANSLATION: project.ts project_sub.ts +cd ../../subdirs_full +lupdate project.pro -ts project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result new file mode 100644 index 0000000..7d9a6f4 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result @@ -0,0 +1,20 @@ + + + + + subdir1 + + + minimal test + + + + + subsub1 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd new file mode 100644 index 0000000..628acc0 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd @@ -0,0 +1,2 @@ +cd ../../subdirs_full +lupdate subdir1/subdir1.pro subdir2/subsub1/subsub1.pro -ts project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result new file mode 100644 index 0000000..7d9a6f4 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result @@ -0,0 +1,20 @@ + + + + + subdir1 + + + minimal test + + + + + subsub1 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt new file mode 100644 index 0000000..808db18 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt @@ -0,0 +1 @@ +lupdate warning: no TS files specified\. Only diagnostics will be produced for 'project\.pro'\. diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd new file mode 100644 index 0000000..3e15bc7 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd @@ -0,0 +1,2 @@ +TRANSLATION: project.ts project_sub.ts +cd ../../subdirs_part diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result new file mode 100644 index 0000000..cddb963 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result @@ -0,0 +1,13 @@ + + + +ISO-8859-2 + + subsub2 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt new file mode 100644 index 0000000..b904390 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt @@ -0,0 +1 @@ +lupdate warning: TS files from command line prevent recursing into .*/subdir2/subsub2/subsub2\.pro\. diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd new file mode 100644 index 0000000..41bfcec --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd @@ -0,0 +1,3 @@ +TRANSLATION: project.ts project_sub.ts +cd ../../subdirs_part +lupdate project.pro -ts project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result new file mode 100644 index 0000000..7d9a6f4 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result @@ -0,0 +1,20 @@ + + + + + subdir1 + + + minimal test + + + + + subsub1 + + + minimal test + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd index da6103f..90f609b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd +++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd @@ -1,2 +1 @@ TRANSLATION: translations/project.ts -lupdate project.pro -ts translations/project.ts diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro new file mode 100644 index 0000000..1f744a7 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = subdir1 subdir2/subdir2.pro + +TRANSLATIONS = project.ts diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp new file mode 100644 index 0000000..0f1dc70 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subdir1","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro new file mode 100644 index 0000000..f8d03df --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = subsub1 subsub2 diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp new file mode 100644 index 0000000..8c82c80 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subsub1","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp new file mode 100644 index 0000000..ff85936 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subsub2","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro new file mode 100644 index 0000000..3499222 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro @@ -0,0 +1,4 @@ +SOURCES += main.cpp + +TRANSLATIONS = ../../project_sub.ts +CODECFORTR = ISO-8859-2 diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro new file mode 100644 index 0000000..d803c37 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = subdir1 subdir2/subdir2.pro diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp new file mode 100644 index 0000000..0f1dc70 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subdir1","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro new file mode 100644 index 0000000..f8d03df --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = subsub1 subsub2 diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp new file mode 100644 index 0000000..8c82c80 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subsub1","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp new file mode 100644 index 0000000..ff85936 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +QString foo() +{ + QCoreApplication::translate("subsub2","minimal test"); +} diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro new file mode 100644 index 0000000..3499222 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro @@ -0,0 +1,4 @@ +SOURCES += main.cpp + +TRANSLATIONS = ../../project_sub.ts +CODECFORTR = ISO-8859-2 diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 44717bf..6d91aa3 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -117,14 +117,17 @@ static void printUsage() " -disable-heuristic {sametext|similartext|number}\n" " Disable the named merge heuristic. Can be specified multiple times.\n" " -pro \n" - " Name of a .pro file. Useful for files with .pro\n" - " file syntax but different file suffix\n" + " Name of a .pro file. Useful for files with .pro file syntax but\n" + " different file suffix. Projects are recursed into and merged.\n" " -source-language [_]\n" " Specify the language of the source strings for new files.\n" " Defaults to POSIX if not specified.\n" " -target-language [_]\n" " Specify the language of the translations for new files.\n" " Guessed from the file name if not specified.\n" + " -ts ...\n" + " Specify the output file(s). This will override the TRANSLATIONS\n" + " and nullify the CODECFORTR from possibly specified project files.\n" " -version\n" " Display the version of lupdate and exit.\n" ).arg(m_defaultExtensions)); @@ -249,16 +252,151 @@ static QStringList getSources(const ProFileEvaluator &visitor, const QString &pr return sourceFiles; } +static void processSources(Translator &fetchedTor, + const QStringList &sourceFiles, ConversionData &cd) +{ + QStringList sourceFilesCpp; + for (QStringList::const_iterator it = sourceFiles.begin(); it != sourceFiles.end(); ++it) { + if (it->endsWith(QLatin1String(".java"), Qt::CaseInsensitive)) + loadJava(fetchedTor, *it, cd); + else if (it->endsWith(QLatin1String(".ui"), Qt::CaseInsensitive) + || it->endsWith(QLatin1String(".jui"), Qt::CaseInsensitive)) + loadUI(fetchedTor, *it, cd); + else if (it->endsWith(QLatin1String(".js"), Qt::CaseInsensitive) + || it->endsWith(QLatin1String(".qs"), Qt::CaseInsensitive)) + loadQScript(fetchedTor, *it, cd); + else + sourceFilesCpp << *it; + } + loadCPP(fetchedTor, sourceFilesCpp, cd); + if (!cd.error().isEmpty()) + printOut(cd.error()); +} + +static void processProjects( + bool topLevel, bool nestComplain, const QStringList &proFiles, + UpdateOptions options, const QByteArray &codecForSource, + const QString &targetLanguage, const QString &sourceLanguage, + Translator *parentTor, bool *fail); + +static void processProject( + bool nestComplain, const QFileInfo &pfi, ProFileEvaluator &visitor, + UpdateOptions options, const QByteArray &_codecForSource, + const QString &targetLanguage, const QString &sourceLanguage, + Translator *fetchedTor, bool *fail) +{ + QByteArray codecForSource = _codecForSource; + QStringList tmp = visitor.values(QLatin1String("CODECFORSRC")); + if (!tmp.isEmpty()) { + codecForSource = tmp.last().toLatin1(); + if (!QTextCodec::codecForName(codecForSource)) { + qWarning("lupdate warning: Codec for source '%s' is invalid. " + "Falling back to codec for tr().", codecForSource.constData()); + codecForSource.clear(); + } + } + if (visitor.templateType() == ProFileEvaluator::TT_Subdirs) { + QStringList subProFiles; + QDir proDir(pfi.absoluteDir()); + foreach (const QString &subdir, visitor.values(QLatin1String("SUBDIRS"))) { + QString subPro = QDir::cleanPath(proDir.absoluteFilePath(subdir)); + QFileInfo subInfo(subPro); + if (subInfo.isDir()) + subProFiles << (subPro + QLatin1Char('/') + + subInfo.fileName() + QLatin1String(".pro")); + else + subProFiles << subPro; + } + processProjects(false, nestComplain, subProFiles, options, codecForSource, + targetLanguage, sourceLanguage, fetchedTor, fail); + } else { + ConversionData cd; + cd.m_noUiLines = options & NoUiLines; + cd.m_codecForSource = codecForSource; + cd.m_includePath = visitor.values(QLatin1String("INCLUDEPATH")); + QStringList sourceFiles = getSources(visitor, pfi.absolutePath()); + QSet projectRoots; + projectRoots.insert(QDir::cleanPath(pfi.absolutePath()) + QLatin1Char('/')); + cd.m_projectRoots = projectRoots; + processSources(*fetchedTor, sourceFiles, cd); + } +} + +static void processProjects( + bool topLevel, bool nestComplain, const QStringList &proFiles, + UpdateOptions options, const QByteArray &codecForSource, + const QString &targetLanguage, const QString &sourceLanguage, + Translator *parentTor, bool *fail) +{ + foreach (const QString &proFile, proFiles) { + ProFileEvaluator visitor; + visitor.setVerbose(options & Verbose); + + QFileInfo pfi(proFile); + ProFile pro(pfi.absoluteFilePath()); + if (!visitor.queryProFile(&pro) || !visitor.accept(&pro)) { + if (topLevel) + *fail = true; + continue; + } + + if (visitor.contains(QLatin1String("TRANSLATIONS"))) { + if (parentTor) { + if (topLevel) { + std::cerr << "lupdate warning: TS files from command line " + "will override TRANSLATIONS in " << qPrintable(proFile) << ".\n"; + goto noTrans; + } else if (nestComplain) { + std::cerr << "lupdate warning: TS files from command line " + "prevent recursing into " << qPrintable(proFile) << ".\n"; + continue; + } + } + QStringList tsFiles; + QDir proDir(pfi.absolutePath()); + foreach (const QString &tsFile, visitor.values(QLatin1String("TRANSLATIONS"))) + tsFiles << QFileInfo(proDir, tsFile).filePath(); + if (tsFiles.isEmpty()) { + // This might mean either a buggy PRO file or an intentional detach - + // we can't know without seeing the actual RHS of the assignment ... + // Just assume correctness and be silent. + continue; + } + Translator tor; + QByteArray codecForTr; + QStringList tmp = visitor.values(QLatin1String("CODEC")) + + visitor.values(QLatin1String("DEFAULTCODEC")) + + visitor.values(QLatin1String("CODECFORTR")); + if (!tmp.isEmpty()) { + codecForTr = tmp.last().toLatin1(); + tor.setCodecName(codecForTr); + } + processProject(false, pfi, visitor, options, codecForSource, + targetLanguage, sourceLanguage, &tor, fail); + updateTsFiles(tor, tsFiles, codecForTr, sourceLanguage, targetLanguage, options, fail); + continue; + } + noTrans: + if (!parentTor) { + if (topLevel) + std::cerr << "lupdate warning: no TS files specified. Only diagnostics " + "will be produced for '" << qPrintable(proFile) << "'.\n"; + Translator tor; + processProject(nestComplain, pfi, visitor, options, codecForSource, + targetLanguage, sourceLanguage, &tor, fail); + } else { + processProject(nestComplain, pfi, visitor, options, codecForSource, + targetLanguage, sourceLanguage, parentTor, fail); + } + } +} + int main(int argc, char **argv) { QCoreApplication app(argc, argv); m_defaultExtensions = QLatin1String("ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx"); QStringList args = app.arguments(); - QString defaultContext; // This was QLatin1String("@default") before. - Translator fetchedTor; - QByteArray codecForTr; - QByteArray codecForSource; QStringList tsFileNames; QStringList proFiles; QMultiHash allCSources; @@ -402,9 +540,6 @@ int main(int argc, char **argv) return 1; } - codecForTr.clear(); - codecForSource.clear(); - if (metTsFlag) { bool found = false; foreach (const Translator::FileFormat &fmt, Translator::registeredFileFormats()) { @@ -477,106 +612,45 @@ int main(int argc, char **argv) } } // for args - if (!proFiles.isEmpty() && !sourceFiles.isEmpty()) { - qWarning("lupdate error: Both project and source files specified.\n"); - return 1; - } if (numFiles == 0) { printUsage(); return 1; } - foreach (const QString &proFile, proFiles) - projectRoots.insert(QDir::cleanPath(QFileInfo(proFile).absolutePath()) + QLatin1Char('/')); + if (!targetLanguage.isEmpty() && tsFileNames.count() != 1) + std::cerr << "lupdate warning: -target-language usually only " + "makes sense with exactly one TS file.\n"; - bool firstPass = true; bool fail = false; - while (firstPass || !proFiles.isEmpty()) { + if (proFiles.isEmpty()) { + if (tsFileNames.isEmpty()) + std::cerr << "lupdate warning: no TS files specified. " + "Only diagnostics will be produced.\n"; + + Translator fetchedTor; ConversionData cd; - cd.m_defaultContext = defaultContext; cd.m_noUiLines = options & NoUiLines; cd.m_projectRoots = projectRoots; cd.m_includePath = includePath; cd.m_allCSources = allCSources; - - QStringList tsFiles = tsFileNames; - if (proFiles.count() > 0) { - QFileInfo pfi(proFiles.takeFirst()); - - ProFileEvaluator visitor; - visitor.setVerbose(options & Verbose); - - ProFile pro(pfi.absoluteFilePath()); - if (!visitor.queryProFile(&pro)) - return 2; - if (!visitor.accept(&pro)) - return 2; - - if (visitor.templateType() == ProFileEvaluator::TT_Subdirs) { - QDir proDir(pfi.absoluteDir()); - foreach (const QString &subdir, visitor.values(QLatin1String("SUBDIRS"))) { - QString subPro = QDir::cleanPath(proDir.absoluteFilePath(subdir)); - QFileInfo subInfo(subPro); - if (subInfo.isDir()) - proFiles << (subPro + QLatin1Char('/') - + subInfo.fileName() + QLatin1String(".pro")); - else - proFiles << subPro; - } - continue; - } - - cd.m_includePath += visitor.values(QLatin1String("INCLUDEPATH")); - - sourceFiles = getSources(visitor, pfi.absolutePath()); - - QStringList tmp = visitor.values(QLatin1String("CODEC")) - + visitor.values(QLatin1String("DEFAULTCODEC")) - + visitor.values(QLatin1String("CODECFORTR")); - if (!tmp.isEmpty()) { - codecForTr = tmp.last().toLatin1(); - fetchedTor.setCodecName(codecForTr); - cd.m_outputCodec = codecForTr; - } - tmp = visitor.values(QLatin1String("CODECFORSRC")); - if (!tmp.isEmpty()) { - codecForSource = tmp.last().toLatin1(); - if (!QTextCodec::codecForName(codecForSource)) - qWarning("lupdate warning: Codec for source '%s' is invalid. Falling back to codec for tr().", - codecForSource.constData()); - else - cd.m_codecForSource = codecForSource; - } - - QDir proDir(pfi.absolutePath()); - foreach (const QString &tsFile, visitor.values(QLatin1String("TRANSLATIONS"))) - tsFiles << QFileInfo(proDir, tsFile).filePath(); + processSources(fetchedTor, sourceFiles, cd); + updateTsFiles(fetchedTor, tsFileNames, QByteArray(), + sourceLanguage, targetLanguage, options, &fail); + } else { + if (!sourceFiles.isEmpty() || !includePath.isEmpty()) { + qWarning("lupdate error: Both project and source files / include paths specified.\n"); + return 1; } - - QStringList sourceFilesCpp; - for (QStringList::iterator it = sourceFiles.begin(); it != sourceFiles.end(); ++it) { - if (it->endsWith(QLatin1String(".java"), Qt::CaseInsensitive)) - loadJava(fetchedTor, *it, cd); - else if (it->endsWith(QLatin1String(".ui"), Qt::CaseInsensitive) - || it->endsWith(QLatin1String(".jui"), Qt::CaseInsensitive)) - loadUI(fetchedTor, *it, cd); - else if (it->endsWith(QLatin1String(".js"), Qt::CaseInsensitive) - || it->endsWith(QLatin1String(".qs"), Qt::CaseInsensitive)) - loadQScript(fetchedTor, *it, cd); - else - sourceFilesCpp << *it; + if (!tsFileNames.isEmpty()) { + Translator fetchedTor; + processProjects(true, true, proFiles, options, QByteArray(), + targetLanguage, sourceLanguage, &fetchedTor, &fail); + updateTsFiles(fetchedTor, tsFileNames, QByteArray(), + sourceLanguage, targetLanguage, options, &fail); + } else { + processProjects(true, false, proFiles, options, QByteArray(), + targetLanguage, sourceLanguage, 0, &fail); } - loadCPP(fetchedTor, sourceFilesCpp, cd); - if (!cd.error().isEmpty()) - printOut(cd.error()); - - tsFiles.removeDuplicates(); - - if (!tsFiles.isEmpty()) - updateTsFiles(fetchedTor, tsFiles, codecForTr, sourceLanguage, targetLanguage, options, &fail); - - firstPass = false; } - return fail ? 1 : 0; } -- cgit v0.12 From 2a8fd7584590016dbe22fb74f440e71a2578dc81 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 27 Jan 2010 16:02:38 +0100 Subject: add -codecfortr option this has always been kind of an omission ... --- tools/linguist/lupdate/main.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 6d91aa3..fd9c696 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -128,6 +128,8 @@ static void printUsage() " -ts ...\n" " Specify the output file(s). This will override the TRANSLATIONS\n" " and nullify the CODECFORTR from possibly specified project files.\n" + " -codecfortr \n" + " Specify the codec assumed for tr() calls. Effective only with -ts.\n" " -version\n" " Display the version of lupdate and exit.\n" ).arg(m_defaultExtensions)); @@ -405,6 +407,7 @@ int main(int argc, char **argv) QStringList includePath; QString targetLanguage; QString sourceLanguage; + QByteArray codecForTr; UpdateOptions options = Verbose | // verbose is on by default starting with Qt 4.2 @@ -503,6 +506,14 @@ int main(int argc, char **argv) } else if (arg == QLatin1String("-version")) { printOut(QObject::tr("lupdate version %1\n").arg(QLatin1String(QT_VERSION_STR))); return 0; + } else if (arg == QLatin1String("-codecfortr")) { + ++i; + if (i == argc) { + qWarning("The -codecfortr option should be followed by a codec name."); + return 1; + } + codecForTr = args[i].toLatin1(); + continue; } else if (arg == QLatin1String("-ts")) { metTsFlag = true; continue; @@ -620,6 +631,8 @@ int main(int argc, char **argv) if (!targetLanguage.isEmpty() && tsFileNames.count() != 1) std::cerr << "lupdate warning: -target-language usually only " "makes sense with exactly one TS file.\n"; + if (!codecForTr.isEmpty() && tsFileNames.isEmpty()) + std::cerr << "lupdate warning: -codecfortr has no effect without -ts.\n"; bool fail = false; if (proFiles.isEmpty()) { @@ -633,8 +646,9 @@ int main(int argc, char **argv) cd.m_projectRoots = projectRoots; cd.m_includePath = includePath; cd.m_allCSources = allCSources; + fetchedTor.setCodecName(codecForTr); processSources(fetchedTor, sourceFiles, cd); - updateTsFiles(fetchedTor, tsFileNames, QByteArray(), + updateTsFiles(fetchedTor, tsFileNames, codecForTr, sourceLanguage, targetLanguage, options, &fail); } else { if (!sourceFiles.isEmpty() || !includePath.isEmpty()) { @@ -643,9 +657,10 @@ int main(int argc, char **argv) } if (!tsFileNames.isEmpty()) { Translator fetchedTor; + fetchedTor.setCodecName(codecForTr); processProjects(true, true, proFiles, options, QByteArray(), targetLanguage, sourceLanguage, &fetchedTor, &fail); - updateTsFiles(fetchedTor, tsFileNames, QByteArray(), + updateTsFiles(fetchedTor, tsFileNames, codecForTr, sourceLanguage, targetLanguage, options, &fail); } else { processProjects(true, false, proFiles, options, QByteArray(), -- cgit v0.12 From 3a49c547d13e07fdb0659ffffcc2d980a5657214 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 21 Jan 2010 07:57:25 +0100 Subject: Fix how we select antialiasing method for text under Mac OS X Reviewed-by: Eskil --- src/gui/kernel/qapplication_mac.mm | 46 +++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 847c58d..e8b821af 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -227,12 +227,29 @@ void onApplicationChangedActivation( bool activated ); static void qt_mac_read_fontsmoothing_settings() { -#ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool2; -#endif - - NSInteger appleFontSmoothing = [[NSUserDefaults standardUserDefaults] integerForKey:@"AppleFontSmoothing"]; - qt_applefontsmoothing_enabled = (appleFontSmoothing > 0); + qt_applefontsmoothing_enabled = true; + int w = 10, h = 10; + QImage image(w, h, QImage::Format_RGB32); + image.fill(0xffffffff); + QPainter p(&image); + p.drawText(0, h, "X\\"); + p.end(); + + const int *bits = (const int *) ((const QImage &) image).bits(); + int bpl = image.bytesPerLine() / 4; + for (int y=0; ylastUpdateWidget = widget; } else if (it->lastUpdateWidget == widget) { - // Update the gl wigets that the widget intersected the last time around, - // and that we are not intersecting now. This prevents paint errors when the + // Update the gl wigets that the widget intersected the last time around, + // and that we are not intersecting now. This prevents paint errors when the // intersecting widget leaves a gl widget. qt_post_window_change_event(glWidget); - it->lastUpdateWidget = 0; + it->lastUpdateWidget = 0; } } #else @@ -812,8 +829,8 @@ Q_GUI_EXPORT void qt_event_request_window_change(QWidget *widget) // Post a kEventQtRequestWindowChange event. This event is semi-public, // don't remove this line! qt_event_request_window_change(); - - // Post update request on gl widgets unconditionally. + + // Post update request on gl widgets unconditionally. if (qt_widget_private(widget)->isGLWidget == true) { qt_post_window_change_event(widget); return; @@ -1218,8 +1235,6 @@ void qt_init(QApplicationPrivate *priv, int) if (QApplication::desktopSettingsAware()) QApplicationPrivate::qt_mac_apply_settings(); - qt_mac_read_fontsmoothing_settings(); - // Cocoa application delegate #ifdef QT_MAC_USE_COCOA NSApplication *cocoaApp = [NSApplication sharedApplication]; @@ -1257,6 +1272,7 @@ void qt_init(QApplicationPrivate *priv, int) } priv->native_modal_dialog_active = false; + qt_mac_read_fontsmoothing_settings(); } void qt_release_apple_event_handler() @@ -1709,7 +1725,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event // kEventMouseWheelMoved events if we dont eat this event // (actually two events; one for horizontal and one for vertical). // As a results of this, and to make sure we dont't receive duplicate events, - // we try to detect when this happend by checking the 'compatibilityEvent'. + // we try to detect when this happend by checking the 'compatibilityEvent'. SInt32 mdelt = 0; GetEventParameter(event, kEventParamMouseWheelSmoothHorizontalDelta, typeSInt32, 0, sizeof(mdelt), 0, &mdelt); @@ -2580,7 +2596,7 @@ void QApplicationPrivate::closePopup(QWidget *popup) if (QApplicationPrivate::popupWidgets->isEmpty()) { // this was the last popup delete QApplicationPrivate::popupWidgets; QApplicationPrivate::popupWidgets = 0; - + // Special case for Tool windows: since they are activated and deactived together // with a normal window they never become the QApplicationPrivate::active_window. QWidget *appFocusWidget = QApplication::focusWidget(); -- cgit v0.12 From d77cb228d7f693043970bdc247447fc5a61cbffc Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 21 Jan 2010 08:49:12 +0100 Subject: Don't use a mutex lock in QPainter::redirection unless strictly required --- src/gui/painting/qpainter.cpp | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 31132d9..1258d6b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7382,10 +7382,15 @@ struct QPaintDeviceRedirection typedef QList QPaintDeviceRedirectionList; Q_GLOBAL_STATIC(QPaintDeviceRedirectionList, globalRedirections) Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) +Q_GLOBAL_STATIC(QAtomicInt, globalRedirectionAtomic) /*! \threadsafe + \obsolete + + Please use QWidget::render() instead. + Redirects all paint commands for the given paint \a device, to the \a replacement device. The optional point \a offset defines an offset within the source device. @@ -7395,9 +7400,10 @@ Q_GLOBAL_STATIC(QMutex, globalRedirectionsMutex) device's painter (if any) before redirecting. Call restoreRedirected() to restore the previous redirection. - In general, you'll probably find that calling - QPixmap::grabWidget() or QPixmap::grabWindow() is an easier - solution. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. \sa redirected(), restoreRedirected() */ @@ -7429,14 +7435,24 @@ void QPainter::setRedirected(const QPaintDevice *device, Q_ASSERT(redirections != 0); *redirections += QPaintDeviceRedirection(device, rdev ? rdev : replacement, offset + roffset, hadInternalWidgetRedirection ? redirections->size() - 1 : -1); + globalRedirectionAtomic()->ref(); } /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Restores the previous redirection for the given \a device after a call to setRedirected(). + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa redirected() */ void QPainter::restoreRedirected(const QPaintDevice *device) @@ -7447,6 +7463,7 @@ void QPainter::restoreRedirected(const QPaintDevice *device) Q_ASSERT(redirections != 0); for (int i = redirections->size()-1; i >= 0; --i) { if (redirections->at(i) == device) { + globalRedirectionAtomic()->deref(); const int internalWidgetRedirectionIndex = redirections->at(i).internalWidgetRedirectionIndex; redirections->removeAt(i); // Restore the internal widget redirection, i.e. remove it from the global @@ -7468,21 +7485,34 @@ void QPainter::restoreRedirected(const QPaintDevice *device) /*! \threadsafe + \obsolete + + Using QWidget::render() obsoletes the use of this function. + Returns the replacement for given \a device. The optional out parameter \a offset returns the offset within the replaced device. + \warning Making use of redirections in the QPainter API implies + that QPainter::begin() and QPaintDevice destructors need to hold + a mutex for a short period. This can impact performance. Use of + QWidget::render is strongly encouraged. + \sa setRedirected(), restoreRedirected() */ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { Q_ASSERT(device != 0); + if (*globalRedirectionAtomic() == 0) + return 0; + if (device->devType() == QInternal::Widget) { const QWidgetPrivate *widgetPrivate = static_cast(device)->d_func(); if (widgetPrivate->redirectDev) return widgetPrivate->redirected(offset); } + QMutexLocker locker(globalRedirectionsMutex()); QPaintDeviceRedirectionList *redirections = globalRedirections(); Q_ASSERT(redirections != 0); @@ -7500,6 +7530,9 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { + if (*globalRedirectionAtomic() == 0) + return; + QMutex *mutex = 0; QT_TRY { mutex = globalRedirectionsMutex(); -- cgit v0.12 From 9dc8d0eeaaae09a86eb869b79f76ad7c66b6f563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 21 Jan 2010 10:32:14 +0100 Subject: Doc fixes: Remove some lies from QEasingCurve. Task-number: QTBUG-7418 --- src/corelib/tools/qeasingcurve.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 0ef92d9..b6a2df4 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -125,7 +125,7 @@ \value OutCubic \inlineimage qeasingcurve-outcubic.png \br Easing curve for a cubic (t^3) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutCubic \inlineimage qeasingcurve-inoutcubic.png \br Easing curve for a cubic (t^3) function: @@ -141,7 +141,7 @@ \value OutQuart \inlineimage qeasingcurve-outquart.png \br Easing curve for a cubic (t^4) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutQuart \inlineimage qeasingcurve-inoutquart.png \br Easing curve for a cubic (t^4) function: @@ -157,7 +157,7 @@ \value OutQuint \inlineimage qeasingcurve-outquint.png \br Easing curve for a cubic (t^5) function: - decelerating from zero velocity. + decelerating to zero velocity. \value InOutQuint \inlineimage qeasingcurve-inoutquint.png \br Easing curve for a cubic (t^5) function: -- cgit v0.12 From 8315b169f152c81bbad88c1c093283c00b94f43f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 08:59:48 +0100 Subject: Remove unnecessary depth uniform from GL2 engine's GLSL Reviewed-By: Samuel --- src/opengl/gl2paintengineex/qglengineshadersource_p.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index d9a61e9..6e98b02 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -64,23 +64,19 @@ QT_MODULE(OpenGL) static const char* const qglslMainVertexShader = "\ - uniform highp float depth;\ void setPosition();\ void main(void)\ {\ setPosition();\ - gl_Position.z = depth * gl_Position.w;\ }"; static const char* const qglslMainWithTexCoordsVertexShader = "\ attribute highp vec2 textureCoordArray; \ varying highp vec2 textureCoords; \ - uniform highp float depth;\ void setPosition();\ void main(void) \ {\ setPosition();\ - gl_Position.z = depth * gl_Position.w;\ textureCoords = textureCoordArray; \ }"; @@ -89,12 +85,10 @@ static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ attribute lowp float opacityArray; \ varying highp vec2 textureCoords; \ varying lowp float opacity; \ - uniform highp float depth; \ void setPosition(); \ void main(void) \ { \ setPosition(); \ - gl_Position.z = depth * gl_Position.w; \ textureCoords = textureCoordArray; \ opacity = opacityArray; \ }"; -- cgit v0.12 From 94e9dba9289f129598a92f817f835b0205188c6c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 10:18:32 +0100 Subject: Use an attribute value for the PMV matrix rather than a uniform This has several advantages: First, updating an attribute value seems to be cheaper than updating a uniform. Second, vertex atribute values are independent of shader program, which means they persist across changing of the shader program. This makes code simpler and reduces GL state changes. Note: Credit goes to Samuel for finding this little gem. :-) For the 25920 solid QGraphicsRectItem test case, this gives 10% improvement on desktop and 27% on the SGX. Reviewed-By: Kim --- .../gl2paintengineex/qglengineshadermanager.cpp | 7 ++++- .../gl2paintengineex/qglengineshadermanager_p.h | 5 +++- .../gl2paintengineex/qglengineshadersource_p.h | 34 +++++++++++++++++----- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 25 ++++------------ .../gl2paintengineex/qpaintengineex_opengl2_p.h | 2 -- 5 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 556b888..9fd9e18 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -324,6 +324,11 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS newProg->program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR); if (newProg->useOpacityAttribute) newProg->program->bindAttributeLocation("opacityArray", QT_OPACITY_ATTR); + if (newProg->usePmvMatrix) { + newProg->program->bindAttributeLocation("pmvMatrix1", QT_PMV_MATRIX_1_ATTR); + newProg->program->bindAttributeLocation("pmvMatrix2", QT_PMV_MATRIX_2_ATTR); + newProg->program->bindAttributeLocation("pmvMatrix3", QT_PMV_MATRIX_3_ATTR); + } newProg->program->link(); if (!newProg->program->isLinked()) { @@ -424,7 +429,6 @@ GLuint QGLEngineShaderManager::getUniformLocation(Uniform id) "patternColor", "globalOpacity", "depth", - "pmvMatrix", "maskTexture", "fragmentColor", "linearData", @@ -743,6 +747,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg() } requiredProgram.useTextureCoords = texCoords; requiredProgram.useOpacityAttribute = (opacityMode == AttributeOpacity); + requiredProgram.usePmvMatrix = true; // At this point, requiredProgram is fully populated so try to find the program in the cache currentShaderProg = sharedShaders->findProgramInCache(requiredProgram); diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index c52e5c0..3ab4ebe 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -253,6 +253,9 @@ struct QGLEngineCachedShaderProg static const GLuint QT_VERTEX_COORDS_ATTR = 0; static const GLuint QT_TEXTURE_COORDS_ATTR = 1; static const GLuint QT_OPACITY_ATTR = 2; +static const GLuint QT_PMV_MATRIX_1_ATTR = 3; +static const GLuint QT_PMV_MATRIX_2_ATTR = 4; +static const GLuint QT_PMV_MATRIX_3_ATTR = 5; class QGLEngineShaderProg; @@ -397,6 +400,7 @@ public: bool useTextureCoords; bool useOpacityAttribute; + bool usePmvMatrix; bool operator==(const QGLEngineShaderProg& other) { // We don't care about the program @@ -431,7 +435,6 @@ public: PatternColor, GlobalOpacity, Depth, - PmvMatrix, MaskTexture, FragmentColor, LinearData, diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index 6e98b02..b471b81 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -97,9 +97,12 @@ static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ // shader are also perspective corrected. static const char* const qglslPositionOnlyVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ void setPosition(void)\ {\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \ }"; @@ -114,12 +117,15 @@ static const char* const qglslUntransformedPositionVertexShader = "\ // Pattern Brush - This assumes the texture size is 8x8 and thus, the inverted size is 0.125 static const char* const qglslPositionWithPatternBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec2 invertedTextureSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 patternTexCoords; \ void setPosition(void) { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -144,12 +150,15 @@ static const char* const qglslPatternBrushSrcFragmentShader = "\ // Linear Gradient Brush static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec3 linearData; \ uniform highp mat3 brushTransform; \ varying mediump float index; \ void setPosition() { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -174,12 +183,15 @@ static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ // Conical Gradient Brush static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 A; \ - void setPosition(void)\ - {\ + void setPosition(void) \ + { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -210,7 +222,9 @@ static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ // Radial Gradient Brush static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray;\ - uniform highp mat3 pmvMatrix;\ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ uniform highp vec2 fmp; \ @@ -218,6 +232,7 @@ static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ varying highp vec2 A; \ void setPosition(void) \ {\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ @@ -247,12 +262,15 @@ static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ // Texture Brush static const char* const qglslPositionWithTextureBrushVertexShader = "\ attribute highp vec2 vertexCoordsArray; \ - uniform highp mat3 pmvMatrix; \ + attribute highp vec3 pmvMatrix1; \ + attribute highp vec3 pmvMatrix2; \ + attribute highp vec3 pmvMatrix3; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec2 invertedTextureSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 textureCoords; \ void setPosition(void) { \ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ gl_Position.xy = transformedPos.xy / transformedPos.z; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index caa679b..b282676 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -168,12 +168,6 @@ void QGL2PaintEngineExPrivate::useSimpleShader() if (matrixDirty) updateMatrix(); - - if (simpleShaderMatrixUniformDirty) { - const GLuint location = shaderManager->simpleProgram()->uniformLocation("pmvMatrix"); - glUniformMatrix3fv(location, 1, GL_FALSE, (GLfloat*)pmvMatrix); - simpleShaderMatrixUniformDirty = false; - } } void QGL2PaintEngineExPrivate::updateBrushTexture() @@ -392,9 +386,11 @@ void QGL2PaintEngineExPrivate::updateMatrix() matrixDirty = false; - // The actual data has been updated so both shader program's uniforms need updating - simpleShaderMatrixUniformDirty = true; - shaderMatrixUniformDirty = true; + // Set the PMV matrix attribute. As we use an attributes rather than uniforms, we only + // need to do this once for every matrix change and persists across all shader programs. + glVertexAttrib3fv(QT_PMV_MATRIX_1_ATTR, pmvMatrix[0]); + glVertexAttrib3fv(QT_PMV_MATRIX_2_ATTR, pmvMatrix[1]); + glVertexAttrib3fv(QT_PMV_MATRIX_3_ATTR, pmvMatrix[2]); dasher.setInvScale(inverseScale); stroker.setInvScale(inverseScale); @@ -932,18 +928,12 @@ bool QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque) if (changed) { // The shader program has changed so mark all uniforms as dirty: brushUniformsDirty = true; - shaderMatrixUniformDirty = true; opacityUniformDirty = true; } if (brushUniformsDirty && mode != ImageDrawingMode && mode != ImageArrayDrawingMode) updateBrushUniforms(); - if (shaderMatrixUniformDirty) { - glUniformMatrix3fv(location(QGLEngineShaderManager::PmvMatrix), 1, GL_FALSE, (GLfloat*)pmvMatrix); - shaderMatrixUniformDirty = false; - } - if (opacityMode == QGLEngineShaderManager::UniformOpacity && opacityUniformDirty) { shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::GlobalOpacity), (GLfloat)q->state()->opacity); opacityUniformDirty = false; @@ -1955,11 +1945,8 @@ void QGL2PaintEngineEx::setState(QPainterState *new_state) if (old_state == s || old_state->renderHintsChanged) renderHintsChanged(); - if (old_state == s || old_state->matrixChanged) { + if (old_state == s || old_state->matrixChanged) d->matrixDirty = true; - d->simpleShaderMatrixUniformDirty = true; - d->shaderMatrixUniformDirty = true; - } if (old_state == s || old_state->compositionModeChanged) d->compositionModeDirty = true; diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ce1b538..8fa0eff 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -252,8 +252,6 @@ public: bool compositionModeDirty; bool brushTextureDirty; bool brushUniformsDirty; - bool simpleShaderMatrixUniformDirty; - bool shaderMatrixUniformDirty; bool opacityUniformDirty; bool stencilClean; // Has the stencil not been used for clipping so far? -- cgit v0.12 From e001ce29fa3aece2c8eb312be68a33560184c9be Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 20 Jan 2010 12:47:18 +0100 Subject: Purely cosmetic (formatting) changes to GL2 engine's GLSL This makes GLSL dumps _significantly_ easier to read. Reviewed-By: TrustMe --- .../gl2paintengineex/qglengineshadersource_p.h | 690 +++++++++++---------- 1 file changed, 357 insertions(+), 333 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index b471b81..ee04166 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -63,222 +63,229 @@ QT_BEGIN_NAMESPACE QT_MODULE(OpenGL) -static const char* const qglslMainVertexShader = "\ - void setPosition();\ - void main(void)\ - {\ - setPosition();\ - }"; - -static const char* const qglslMainWithTexCoordsVertexShader = "\ - attribute highp vec2 textureCoordArray; \ - varying highp vec2 textureCoords; \ - void setPosition();\ - void main(void) \ - {\ - setPosition();\ - textureCoords = textureCoordArray; \ - }"; - -static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\ - attribute highp vec2 textureCoordArray; \ - attribute lowp float opacityArray; \ - varying highp vec2 textureCoords; \ - varying lowp float opacity; \ - void setPosition(); \ - void main(void) \ - { \ - setPosition(); \ - textureCoords = textureCoordArray; \ - opacity = opacityArray; \ - }"; +static const char* const qglslMainVertexShader = "\n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + }\n"; + +static const char* const qglslMainWithTexCoordsVertexShader = "\n\ + attribute highp vec2 textureCoordArray; \n\ + varying highp vec2 textureCoords; \n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + textureCoords = textureCoordArray; \n\ + }\n"; + +static const char* const qglslMainWithTexCoordsAndOpacityVertexShader = "\n\ + attribute highp vec2 textureCoordArray; \n\ + attribute lowp float opacityArray; \n\ + varying highp vec2 textureCoords; \n\ + varying lowp float opacity; \n\ + void setPosition(); \n\ + void main(void) \n\ + { \n\ + setPosition(); \n\ + textureCoords = textureCoordArray; \n\ + opacity = opacityArray; \n\ + }\n"; // NOTE: We let GL do the perspective correction so texture lookups in the fragment // shader are also perspective corrected. -static const char* const qglslPositionOnlyVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - void setPosition(void)\ - {\ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \ - }"; - -static const char* const qglslUntransformedPositionVertexShader = "\ - attribute highp vec4 vertexCoordsArray;\ - void setPosition(void)\ - {\ - gl_Position = vertexCoordsArray;\ - }"; +static const char* const qglslPositionOnlyVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \n\ + }\n"; + +static const char* const qglslUntransformedPositionVertexShader = "\n\ + attribute highp vec4 vertexCoordsArray; \n\ + void setPosition(void) \n\ + { \n\ + gl_Position = vertexCoordsArray; \n\ + }\n"; // Pattern Brush - This assumes the texture size is 8x8 and thus, the inverted size is 0.125 -static const char* const qglslPositionWithPatternBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec2 invertedTextureSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 patternTexCoords; \ - void setPosition(void) { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1.0); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - patternTexCoords.xy = (hTexCoords.xy * 0.125) * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithPatternBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec2 invertedTextureSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 patternTexCoords; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1.0); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + patternTexCoords.xy = (hTexCoords.xy * 0.125) * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithPatternBrushVertexShader = qglslPositionWithPatternBrushVertexShader; -static const char* const qglslPatternBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture;\ - uniform lowp vec4 patternColor; \ - varying highp vec2 patternTexCoords;\ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \ +static const char* const qglslPatternBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + uniform lowp vec4 patternColor; \n\ + varying highp vec2 patternTexCoords;\n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \n\ }\n"; // Linear Gradient Brush -static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec3 linearData; \ - uniform highp mat3 brushTransform; \ - varying mediump float index; \ - void setPosition() { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - index = (dot(linearData.xy, hTexCoords.xy) * linearData.z) * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec3 linearData; \n\ + uniform highp mat3 brushTransform; \n\ + varying mediump float index; \n\ + void setPosition() \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + index = (dot(linearData.xy, hTexCoords.xy) * linearData.z) * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithLinearGradientBrushVertexShader = qglslPositionWithLinearGradientBrushVertexShader; -static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture; \ - varying mediump float index; \ - lowp vec4 srcPixel() { \ - mediump vec2 val = vec2(index, 0.5); \ - return texture2D(brushTexture, val); \ +static const char* const qglslLinearGradientBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + varying mediump float index; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + mediump vec2 val = vec2(index, 0.5); \n\ + return texture2D(brushTexture, val); \n\ }\n"; // Conical Gradient Brush -static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 A; \ - void setPosition(void) \ - { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - A = hTexCoords.xy * invertedHTexCoordsZ; \ - }"; +static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 A; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + A = hTexCoords.xy * invertedHTexCoordsZ; \n\ + }\n"; static const char* const qglslAffinePositionWithConicalGradientBrushVertexShader = qglslPositionWithConicalGradientBrushVertexShader; static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ #define INVERSE_2PI 0.1591549430918953358 \n\ - uniform lowp sampler2D brushTexture; \n\ - uniform mediump float angle; \ - varying highp vec2 A; \ - lowp vec4 srcPixel() { \ - highp float t; \ - if (abs(A.y) == abs(A.x)) \ - t = (atan(-A.y + 0.002, A.x) + angle) * INVERSE_2PI; \ - else \ - t = (atan(-A.y, A.x) + angle) * INVERSE_2PI; \ - return texture2D(brushTexture, vec2(t - floor(t), 0.5)); \ - }"; + uniform lowp sampler2D brushTexture; \n\ + uniform mediump float angle; \n\ + varying highp vec2 A; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + highp float t; \n\ + if (abs(A.y) == abs(A.x)) \n\ + t = (atan(-A.y + 0.002, A.x) + angle) * INVERSE_2PI; \n\ + else \n\ + t = (atan(-A.y, A.x) + angle) * INVERSE_2PI; \n\ + return texture2D(brushTexture, vec2(t - floor(t), 0.5)); \n\ + }\n"; // Radial Gradient Brush -static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray;\ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp mat3 brushTransform; \ - uniform highp vec2 fmp; \ - varying highp float b; \ - varying highp vec2 A; \ - void setPosition(void) \ - {\ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - A = hTexCoords.xy * invertedHTexCoordsZ; \ - b = 2.0 * dot(A, fmp); \ - }"; +static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray;\n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp mat3 brushTransform; \n\ + uniform highp vec2 fmp; \n\ + varying highp float b; \n\ + varying highp vec2 A; \n\ + void setPosition(void) \n\ + {\n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + A = hTexCoords.xy * invertedHTexCoordsZ; \n\ + b = 2.0 * dot(A, fmp); \n\ + }\n"; static const char* const qglslAffinePositionWithRadialGradientBrushVertexShader = qglslPositionWithRadialGradientBrushVertexShader; -static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ - uniform lowp sampler2D brushTexture; \ - uniform highp float fmp2_m_radius2; \ - uniform highp float inverse_2_fmp2_m_radius2; \ - varying highp float b; \ - varying highp vec2 A; \ - lowp vec4 srcPixel() { \ - highp float c = -dot(A, A); \ - highp vec2 val = vec2((-b + sqrt(b*b - 4.0*fmp2_m_radius2*c)) * inverse_2_fmp2_m_radius2, 0.5); \ - return texture2D(brushTexture, val); \ - }"; +static const char* const qglslRadialGradientBrushSrcFragmentShader = "\n\ + uniform lowp sampler2D brushTexture; \n\ + uniform highp float fmp2_m_radius2; \n\ + uniform highp float inverse_2_fmp2_m_radius2; \n\ + varying highp float b; \n\ + varying highp vec2 A; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + highp float c = -dot(A, A); \n\ + highp vec2 val = vec2((-b + sqrt(b*b - 4.0*fmp2_m_radius2*c)) * inverse_2_fmp2_m_radius2, 0.5); \n\ + return texture2D(brushTexture, val); \n\ + }\n"; // Texture Brush -static const char* const qglslPositionWithTextureBrushVertexShader = "\ - attribute highp vec2 vertexCoordsArray; \ - attribute highp vec3 pmvMatrix1; \ - attribute highp vec3 pmvMatrix2; \ - attribute highp vec3 pmvMatrix3; \ - uniform mediump vec2 halfViewportSize; \ - uniform highp vec2 invertedTextureSize; \ - uniform highp mat3 brushTransform; \ - varying highp vec2 textureCoords; \ - void setPosition(void) { \ - highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \ - vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \ - gl_Position.xy = transformedPos.xy / transformedPos.z; \ - mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ - mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ - mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \ - gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \ - textureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \ - }"; +static const char* const qglslPositionWithTextureBrushVertexShader = "\n\ + attribute highp vec2 vertexCoordsArray; \n\ + attribute highp vec3 pmvMatrix1; \n\ + attribute highp vec3 pmvMatrix2; \n\ + attribute highp vec3 pmvMatrix3; \n\ + uniform mediump vec2 halfViewportSize; \n\ + uniform highp vec2 invertedTextureSize; \n\ + uniform highp mat3 brushTransform; \n\ + varying highp vec2 textureCoords; \n\ + void setPosition(void) \n\ + { \n\ + highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); \n\ + vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); \n\ + gl_Position.xy = transformedPos.xy / transformedPos.z; \n\ + mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \n\ + mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \n\ + mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ + gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ + textureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \n\ + }\n"; static const char* const qglslAffinePositionWithTextureBrushVertexShader = qglslPositionWithTextureBrushVertexShader; @@ -287,148 +294,165 @@ static const char* const qglslAffinePositionWithTextureBrushVertexShader // OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, // we emulate GL_REPEAT by only taking the fractional part of the texture coords. // TODO: Special case POT textures which don't need this emulation -static const char* const qglslTextureBrushSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(brushTexture, fract(textureCoords)); \ - }"; +static const char* const qglslTextureBrushSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() { \n\ + return texture2D(brushTexture, fract(textureCoords)); \n\ + }\n"; #else -static const char* const qglslTextureBrushSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(brushTexture, textureCoords); \ - }"; +static const char* const qglslTextureBrushSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return texture2D(brushTexture, textureCoords); \n\ + }\n"; #endif -static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp vec4 patternColor; \ - uniform lowp sampler2D brushTexture; \ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(brushTexture, textureCoords).r); \ - }"; +static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp vec4 patternColor; \n\ + uniform lowp sampler2D brushTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(brushTexture, textureCoords).r); \n\ + }\n"; // Solid Fill Brush -static const char* const qglslSolidBrushSrcFragmentShader = "\ - uniform lowp vec4 fragmentColor; \ - lowp vec4 srcPixel() { \ - return fragmentColor; \ - }"; - -static const char* const qglslImageSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - return texture2D(imageTexture, textureCoords); \ - }"; - -static const char* const qglslCustomSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \ - lowp vec4 srcPixel() { \ - return customShader(imageTexture, textureCoords); \ - }"; - -static const char* const qglslImageSrcWithPatternFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp vec4 patternColor; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \ - }\n"; - -static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ - uniform lowp sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ - lowp vec4 sample = texture2D(imageTexture, textureCoords); \ - sample.rgb = sample.rgb * sample.a; \ - return sample; \ - }"; - -static const char* const qglslShockingPinkSrcFragmentShader = "\ - lowp vec4 srcPixel() { \ - return vec4(0.98, 0.06, 0.75, 1.0); \ - }"; - -static const char* const qglslMainFragmentShader_ImageArrays = "\ - varying lowp float opacity; \ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel() * opacity; \ - }"; - -static const char* const qglslMainFragmentShader_CMO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(compose(srcPixel()*globalOpacity))); \ - }"; - -static const char* const qglslMainFragmentShader_CM = "\ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(compose(srcPixel())); \ - }"; - -static const char* const qglslMainFragmentShader_MO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(srcPixel()*globalOpacity); \ - }"; - -static const char* const qglslMainFragmentShader_M = "\ - lowp vec4 srcPixel(); \ - lowp vec4 applyMask(lowp vec4); \ - void main() { \ - gl_FragColor = applyMask(srcPixel()); \ - }"; - -static const char* const qglslMainFragmentShader_CO = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = compose(srcPixel()*globalOpacity); \ - }"; - -static const char* const qglslMainFragmentShader_C = "\ - lowp vec4 srcPixel(); \ - lowp vec4 compose(lowp vec4); \ - void main() { \ - gl_FragColor = compose(srcPixel()); \ - }"; - -static const char* const qglslMainFragmentShader_O = "\ - uniform lowp float globalOpacity; \ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel()*globalOpacity; \ - }"; - -static const char* const qglslMainFragmentShader = "\ - lowp vec4 srcPixel(); \ - void main() { \ - gl_FragColor = srcPixel(); \ - }"; - -static const char* const qglslMaskFragmentShader = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src * mask.a; \ - }"; +static const char* const qglslSolidBrushSrcFragmentShader = "\n\ + uniform lowp vec4 fragmentColor; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return fragmentColor; \n\ + }\n"; + +static const char* const qglslImageSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return texture2D(imageTexture, textureCoords); \n\ + }\n"; + +static const char* const qglslCustomSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return customShader(imageTexture, textureCoords); \n\ + }\n"; + +static const char* const qglslImageSrcWithPatternFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp vec4 patternColor; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \n\ + }\n"; + +static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\n\ + varying highp vec2 textureCoords; \n\ + uniform lowp sampler2D imageTexture; \n\ + lowp vec4 srcPixel() \n\ + { \n\ + lowp vec4 sample = texture2D(imageTexture, textureCoords); \n\ + sample.rgb = sample.rgb * sample.a; \n\ + return sample; \n\ + }\n"; + +static const char* const qglslShockingPinkSrcFragmentShader = "\n\ + lowp vec4 srcPixel() \n\ + { \n\ + return vec4(0.98, 0.06, 0.75, 1.0); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_ImageArrays = "\n\ + varying lowp float opacity; \n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel() * opacity; \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CMO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(compose(srcPixel()*globalOpacity))); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CM = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(compose(srcPixel())); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_MO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(srcPixel()*globalOpacity); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_M = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 applyMask(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = applyMask(srcPixel()); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_CO = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = compose(srcPixel()*globalOpacity); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_C = "\n\ + lowp vec4 srcPixel(); \n\ + lowp vec4 compose(lowp vec4); \n\ + void main() \n\ + { \n\ + gl_FragColor = compose(srcPixel()); \n\ + }\n"; + +static const char* const qglslMainFragmentShader_O = "\n\ + uniform lowp float globalOpacity; \n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel()*globalOpacity; \n\ + }\n"; + +static const char* const qglslMainFragmentShader = "\n\ + lowp vec4 srcPixel(); \n\ + void main() \n\ + { \n\ + gl_FragColor = srcPixel(); \n\ + }\n"; + +static const char* const qglslMaskFragmentShader = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + {\n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src * mask.a; \n\ + }\n"; // For source over with subpixel antialiasing, the final color is calculated per component as follows // (.a is alpha component, .c is red, green or blue component): @@ -445,23 +469,23 @@ static const char* const qglslMaskFragmentShader = "\ // dest.c = dest.c * (1 - mask.c) + src.c * alpha // -static const char* const qglslRgbMaskFragmentShaderPass1 = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src.a * mask; \ - }"; - -static const char* const qglslRgbMaskFragmentShaderPass2 = "\ - varying highp vec2 textureCoords;\ - uniform lowp sampler2D maskTexture;\ - lowp vec4 applyMask(lowp vec4 src) \ - {\ - lowp vec4 mask = texture2D(maskTexture, textureCoords); \ - return src * mask; \ - }"; +static const char* const qglslRgbMaskFragmentShaderPass1 = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + { \n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src.a * mask; \n\ + }\n"; + +static const char* const qglslRgbMaskFragmentShaderPass2 = "\n\ + varying highp vec2 textureCoords;\n\ + uniform lowp sampler2D maskTexture;\n\ + lowp vec4 applyMask(lowp vec4 src) \n\ + { \n\ + lowp vec4 mask = texture2D(maskTexture, textureCoords); \n\ + return src * mask; \n\ + }\n"; /* Left to implement: -- cgit v0.12 From 9fa39653a42e1e29f83ce272de746bf1441c3800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 21 Jan 2010 15:54:18 +0100 Subject: Make sure cursor is painted at the correct position when we are using IM. When the line edit was refactored into a line control this regression was introduced. This regression was introduced by change fb7d86cf23227302d48db279ec589221d11a1f6a. Task-number: QTBUG-4789 Reviewed-by: Alan Alpert --- src/gui/widgets/qlinecontrol.cpp | 5 ++++- src/gui/widgets/qlinecontrol_p.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 414c2ed..b0a64ea 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -524,8 +524,11 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl m_textLayout.draw(painter, offset, selections, clip); if (flags & DrawCursor){ + int cursor = m_cursor; + if (m_preeditCursor != -1) + cursor += m_preeditCursor; if(!m_blinkPeriod || m_blinkStatus) - m_textLayout.drawCursor(painter, offset, m_cursor, m_cursorWidth); + m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth); } } diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index 301ff72..d6f2705 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -549,7 +549,10 @@ inline qreal QLineControl::cursorToX(int cursor) const inline qreal QLineControl::cursorToX() const { - return cursorToX(m_cursor); + int cursor = m_cursor; + if (m_preeditCursor != -1) + cursor += m_preeditCursor; + return cursorToX(cursor); } inline bool QLineControl::isReadOnly() const -- cgit v0.12 From 1ace126b121bdec0a54aef808cca749e2ef04acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 13 Jan 2010 16:44:57 +0100 Subject: Improve performance of QGraphicsItem::setParentItem. The biggest optimization here is "updateAncestorFlags()". It's much faster to update all the flags rather than trying to enable/disable certain flags according to the current state. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 67 ++++++++++++++++++++++----------- src/gui/graphicsview/qgraphicsitem_p.h | 9 +++-- src/gui/graphicsview/qgraphicsscene.cpp | 21 ++++++----- 3 files changed, 62 insertions(+), 35 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1ea69fb..9008be3 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -800,8 +800,36 @@ void QGraphicsItemPrivate::updateAncestorFlag(QGraphicsItem::GraphicsItemFlag ch return; } - foreach (QGraphicsItem *child, children) - child->d_ptr->updateAncestorFlag(childFlag, flag, enabled, false); + for (int i = 0; i < children.size(); ++i) + children.at(i)->d_ptr->updateAncestorFlag(childFlag, flag, enabled, false); +} + +void QGraphicsItemPrivate::updateAncestorFlags() +{ + int flags = 0; + if (parent) { + // Inherit the parent's ancestor flags. + QGraphicsItemPrivate *pd = parent->d_ptr.data(); + flags = pd->ancestorFlags; + + // Add in flags from the parent. + if (pd->filtersDescendantEvents) + flags |= AncestorFiltersChildEvents; + if (pd->handlesChildEvents) + flags |= AncestorHandlesChildEvents; + if (pd->flags & QGraphicsItem::ItemClipsChildrenToShape) + flags |= AncestorClipsChildren; + if (pd->flags & QGraphicsItem::ItemIgnoresTransformations) + flags |= AncestorIgnoresTransformations; + } + + if (ancestorFlags == flags) + return; // No change; stop propagation. + ancestorFlags = flags; + + // Propagate to children recursively. + for (int i = 0; i < children.size(); ++i) + children.at(i)->d_ptr->updateAncestorFlags(); } /*! @@ -1004,7 +1032,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (scene) { // Deliver the change to the index - scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); + if (scene->d_func()->indexMethod != QGraphicsScene::NoIndex) + scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); // Disable scene pos notifications for old ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) @@ -1044,7 +1073,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *p = parent; QGraphicsItem *parentFocusScopeItem = 0; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) { // If this item's focus scope's focus scope item points // to this item or a descendent, then clear it. QGraphicsItem *fsi = p->d_ptr->focusScopeItem; @@ -1065,11 +1094,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *ancestorScope = 0; QGraphicsItem *p = subFocusItem->d_ptr->parent; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) ancestorScope = p; - if (p->isPanel()) + if (p->d_ptr->flags & QGraphicsItem::ItemIsPanel) break; - p = p->parentItem(); + p = p->d_ptr->parent; } if (ancestorScope) newFocusScopeItem = ancestorScope; @@ -1077,7 +1106,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) QGraphicsItem *p = newParent; while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { + if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) { p->d_ptr->focusScopeItem = newFocusScopeItem; // Ensure the new item is no longer the subFocusItem. The // only way to set focus on a child of a focus scope is @@ -1113,30 +1142,24 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } // Inherit ancestor flags from the new parent. - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2)); - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1)); - updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape); - updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations); + updateAncestorFlags(); // Update item visible / enabled. - if (parent->isVisible() != visible) { - if (!parent->isVisible() || !explicitlyHidden) - setVisibleHelper(parent->isVisible(), /* explicit = */ false, /* update = */ !implicitUpdate); + if (parent->d_ptr->visible != visible) { + if (!parent->d_ptr->visible || !explicitlyHidden) + setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ !implicitUpdate); } if (parent->isEnabled() != enabled) { - if (!parent->isEnabled() || !explicitlyDisabled) - setEnabledHelper(parent->isEnabled(), /* explicit = */ false, /* update = */ !implicitUpdate); + if (!parent->d_ptr->enabled || !explicitlyDisabled) + setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ !implicitUpdate); } // Auto-activate if visible and the parent is active. - if (q->isVisible() && parent->isActive()) + if (visible && parent->isActive()) q->setActive(true); } else { // Inherit ancestor flags from the new parent. - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2)); - updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1)); - updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape); - updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations); + updateAncestorFlags(); if (!inDestructor) { // Update item visible / enabled. diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 2d34b80..cfdd382 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -153,7 +153,7 @@ public: dirtyChildren(0), localCollisionHack(0), inSetPosHelper(0), - needSortChildren(1), // ### can be 0 by default? + needSortChildren(0), allChildrenDirty(0), fullUpdatePending(0), flags(0), @@ -197,6 +197,7 @@ public: void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag = NoFlag, bool enabled = false, bool root = true); + void updateAncestorFlags(); void setIsMemberOfGroup(bool enabled); void remapItemPos(QEvent *event, QGraphicsItem *item); QPointF genericMapFromScene(const QPointF &pos, const QWidget *viewport) const; @@ -721,11 +722,13 @@ inline QTransform QGraphicsItemPrivate::transformToParent() const inline void QGraphicsItemPrivate::ensureSortedChildren() { if (needSortChildren) { - qSort(children.begin(), children.end(), qt_notclosestLeaf); needSortChildren = 0; sequentialOrdering = 1; + if (children.isEmpty()) + return; + qSort(children.begin(), children.end(), qt_notclosestLeaf); for (int i = 0; i < children.size(); ++i) { - if (children[i]->d_ptr->siblingIndex != i) { + if (children.at(i)->d_ptr->siblingIndex != i) { sequentialOrdering = 0; break; } diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index cea723c..49925e1 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2482,12 +2482,12 @@ void QGraphicsScene::addItem(QGraphicsItem *item) qWarning("QGraphicsScene::addItem: cannot add null item"); return; } - if (item->scene() == this) { + if (item->d_ptr->scene == this) { qWarning("QGraphicsScene::addItem: item has already been added to this scene"); return; } // Remove this item from its existing scene - if (QGraphicsScene *oldScene = item->scene()) + if (QGraphicsScene *oldScene = item->d_ptr->scene) oldScene->removeItem(item); // Notify the item that its scene is changing, and allow the item to @@ -2496,15 +2496,15 @@ void QGraphicsScene::addItem(QGraphicsItem *item) qVariantFromValue(this))); QGraphicsScene *targetScene = qVariantValue(newSceneVariant); if (targetScene != this) { - if (targetScene && item->scene() != targetScene) + if (targetScene && item->d_ptr->scene != targetScene) targetScene->addItem(item); return; } // Detach this item from its parent if the parent's scene is different // from this scene. - if (QGraphicsItem *itemParent = item->parentItem()) { - if (itemParent->scene() != this) + if (QGraphicsItem *itemParent = item->d_ptr->parent) { + if (itemParent->d_ptr->scene != this) item->setParentItem(0); } @@ -2534,7 +2534,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) d->enableMouseTrackingOnViews(); } #ifndef QT_NO_CURSOR - if (d->allItemsUseDefaultCursor && item->hasCursor()) { + if (d->allItemsUseDefaultCursor && item->d_ptr->hasCursor) { d->allItemsUseDefaultCursor = false; if (d->allItemsIgnoreHoverEvents) // already enabled otherwise d->enableMouseTrackingOnViews(); @@ -2542,7 +2542,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) #endif //QT_NO_CURSOR // Enable touch events if the item accepts touch events. - if (d->allItemsIgnoreTouchEvents && item->acceptTouchEvents()) { + if (d->allItemsIgnoreTouchEvents && item->d_ptr->acceptTouchEvents) { d->allItemsIgnoreTouchEvents = false; d->enableTouchEventsOnViews(); } @@ -2575,8 +2575,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item) } // Add all children recursively - foreach (QGraphicsItem *child, item->children()) - addItem(child); + item->d_ptr->ensureSortedChildren(); + for (int i = 0; i < item->d_ptr->children.size(); ++i) + addItem(item->d_ptr->children.at(i)); // Resolve font and palette. item->d_ptr->resolveFont(d->font.resolve()); @@ -2619,7 +2620,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) } } - if (item->flags() & QGraphicsItem::ItemSendsScenePositionChanges) + if (item->d_ptr->flags & QGraphicsItem::ItemSendsScenePositionChanges) d->registerScenePosItem(item); // Ensure that newly added items that have subfocus set, gain -- cgit v0.12 From 15e00f91133874455df32ac1d5799fccdab5cd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 14 Jan 2010 11:43:05 +0100 Subject: Optimize QGraphicsScenePrivate::itemAcceptsHoverEvents_helper Make sure we do cheap tests before the more expensive ones. This function is called from QGraphicsScene::addItem. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsscene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 49925e1..fa9f794 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -3767,10 +3767,10 @@ void QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent *helpEvent) bool QGraphicsScenePrivate::itemAcceptsHoverEvents_helper(const QGraphicsItem *item) const { - return (!item->isBlockedByModalPanel() && - (item->acceptHoverEvents() - || (item->isWidget() - && static_cast(item)->d_func()->hasDecoration()))); + return (item->d_ptr->acceptsHover + || (item->d_ptr->isWidget + && static_cast(item)->d_func()->hasDecoration())) + && !item->isBlockedByModalPanel(); } /*! -- cgit v0.12 From 33fb442f7e95c0bf5af800f5b96fc3d78bffdd98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 14 Jan 2010 16:13:37 +0100 Subject: Optimize QGraphicsItem::setFlags. We don't have to do a full blown QGraphicsItem::setFlag call from QGraphicsItem::setFlags, only to change the ItemStacksBehindParent bits. We can do it directly (with care). Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 9008be3..8196829 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1632,7 +1632,7 @@ bool QGraphicsItem::isWidget() const */ bool QGraphicsItem::isWindow() const { - return isWidget() && (static_cast(this)->windowType() & Qt::Window); + return d_ptr->isWidget && (static_cast(this)->windowType() & Qt::Window); } /*! @@ -1669,9 +1669,9 @@ QGraphicsItem::GraphicsItemFlags QGraphicsItem::flags() const void QGraphicsItem::setFlag(GraphicsItemFlag flag, bool enabled) { if (enabled) - setFlags(flags() | flag); + setFlags(GraphicsItemFlags(d_ptr->flags) | flag); else - setFlags(flags() & ~flag); + setFlags(GraphicsItemFlags(d_ptr->flags) & ~flag); } /*! @@ -1718,7 +1718,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) flags = GraphicsItemFlags(itemChange(ItemFlagsChange, quint32(flags)).toUInt()); if (quint32(d_ptr->flags) == quint32(flags)) return; - if (d_ptr->scene) + if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, quint32(flags)); // Flags that alter the geometry of the item (or its children). @@ -1728,7 +1728,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->paintedViewBoundingRectsNeedRepaint = 1; // Keep the old flags to compare the diff. - GraphicsItemFlags oldFlags = this->flags(); + GraphicsItemFlags oldFlags = GraphicsItemFlags(d_ptr->flags); // Update flags. d_ptr->flags = flags; @@ -1757,7 +1757,23 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->updateAncestorFlag(ItemIgnoresTransformations); } + if ((flags & ItemNegativeZStacksBehindParent) != (oldFlags & ItemNegativeZStacksBehindParent)) { + // NB! We change the flags directly here, so we must also update d_ptr->flags. + // Note that this has do be done before the ItemStacksBehindParent check + // below; otherwise we will loose the change. + + // Update stack-behind. + if (d_ptr->z < qreal(0.0)) + flags |= ItemStacksBehindParent; + else + flags &= ~ItemStacksBehindParent; + d_ptr->flags = flags; + } + if ((flags & ItemStacksBehindParent) != (oldFlags & ItemStacksBehindParent)) { + // NB! This check has to come after the ItemNegativeZStacksBehindParent + // check above. Be careful. + // Ensure child item sorting is up to date when toggling this flag. if (d_ptr->parent) d_ptr->parent->d_ptr->needSortChildren = 1; @@ -1771,10 +1787,6 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) d_ptr->scene->d_func()->updateInputMethodSensitivityInViews(); } - if ((flags & ItemNegativeZStacksBehindParent) != (oldFlags & ItemNegativeZStacksBehindParent)) { - // Update stack-behind. - setFlag(ItemStacksBehindParent, d_ptr->z < qreal(0.0)); - } if ((d_ptr->panelModality != NonModal) && d_ptr->scene -- cgit v0.12 From dd29275d302ca10b9b07c4cc246402036b854830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 19 Jan 2010 13:18:55 +0100 Subject: Pass value as const void *const to QGraphicsSceneIndex::itemChange. We need this change in order to bypass some of the QVariant itemChange notifications from QGraphicsItem::setParentItem. All this is internal stuff and we know what we do, so I don't consider the change too ugly. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 8 ++++---- src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp | 10 +++++----- src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h | 2 +- src/gui/graphicsview/qgraphicssceneindex.cpp | 2 +- src/gui/graphicsview/qgraphicssceneindex_p.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 8196829..d66e9b6 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1033,7 +1033,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (scene) { // Deliver the change to the index if (scene->d_func()->indexMethod != QGraphicsScene::NoIndex) - scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant); + scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParent); // Disable scene pos notifications for old ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) @@ -1719,7 +1719,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) if (quint32(d_ptr->flags) == quint32(flags)) return; if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) - d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, quint32(flags)); + d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, &flags); // Flags that alter the geometry of the item (or its children). const quint32 geomChangeFlagsMask = (ItemClipsChildrenToShape | ItemClipsToShape | ItemIgnoresTransformations | ItemIsSelectable); @@ -4301,9 +4301,9 @@ void QGraphicsItem::setZValue(qreal z) if (newZ == d_ptr->z) return; - if (d_ptr->scene) { + if (d_ptr->scene && d_ptr->scene->d_func()->indexMethod != QGraphicsScene::NoIndex) { // Z Value has changed, we have to notify the index. - d_ptr->scene->d_func()->index->itemChange(this, ItemZValueChange, newZVariant); + d_ptr->scene->d_func()->index->itemChange(this, ItemZValueChange, &newZ); } d_ptr->z = newZ; diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp index 2e92b87..2a91348 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp @@ -635,16 +635,17 @@ void QGraphicsSceneBspTreeIndex::updateSceneRect(const QRectF &rect) This method react to the \a change of the \a item and use the \a value to update the BSP tree if necessary. */ -void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value) +void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) { Q_D(QGraphicsSceneBspTreeIndex); switch (change) { case QGraphicsItem::ItemFlagsChange: { // Handle ItemIgnoresTransformations + QGraphicsItem::GraphicsItemFlags newFlags = *static_cast(value); bool ignoredTransform = item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations; - bool willIgnoreTransform = value.toUInt() & QGraphicsItem::ItemIgnoresTransformations; + bool willIgnoreTransform = newFlags & QGraphicsItem::ItemIgnoresTransformations; bool clipsChildren = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape; - bool willClipChildren = value.toUInt() & QGraphicsItem::ItemClipsChildrenToShape; + bool willClipChildren = newFlags & QGraphicsItem::ItemClipsChildrenToShape; if ((ignoredTransform != willIgnoreTransform) || (clipsChildren != willClipChildren)) { QGraphicsItem *thatItem = const_cast(item); // Remove item and its descendants from the index and append @@ -661,7 +662,7 @@ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphics case QGraphicsItem::ItemParentChange: { d->invalidateSortCache(); // Handle ItemIgnoresTransformations - QGraphicsItem *newParent = qVariantValue(value); + const QGraphicsItem *newParent = static_cast(value); bool ignoredTransform = item->d_ptr->itemIsUntransformable(); bool willIgnoreTransform = (item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations) || (newParent && newParent->d_ptr->itemIsUntransformable()); @@ -682,7 +683,6 @@ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphics default: break; } - return QGraphicsSceneIndex::itemChange(item, change, value); } /*! \reimp diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h index 119571b..f671fd9 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h @@ -97,7 +97,7 @@ protected: void removeItem(QGraphicsItem *item); void prepareBoundingRectChange(const QGraphicsItem *item); - void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value); + void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value); private : Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex) diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index bc8a7dc..043c4eb 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -624,7 +624,7 @@ void QGraphicsSceneIndex::deleteItem(QGraphicsItem *item) \sa QGraphicsItem::GraphicsItemChange */ -void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value) +void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) { Q_UNUSED(item); Q_UNUSED(change); diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h index def58f0..597a229 100644 --- a/src/gui/graphicsview/qgraphicssceneindex_p.h +++ b/src/gui/graphicsview/qgraphicssceneindex_p.h @@ -110,7 +110,7 @@ protected: virtual void removeItem(QGraphicsItem *item) = 0; virtual void deleteItem(QGraphicsItem *item); - virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const QVariant &value); + virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const void *const value); virtual void prepareBoundingRectChange(const QGraphicsItem *item); QGraphicsSceneIndex(QGraphicsSceneIndexPrivate &dd, QGraphicsScene *scene); -- cgit v0.12 From de9b91a5363ae27de50de7475e958f4858f6dd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 19 Jan 2010 13:30:55 +0100 Subject: Only send QGraphicsItem::ParentChange(d) notifications from setParentItem. QmlGraphicsItem doesn't need any parent change notifactions so we can call the helper class (QGraphicsItemPrivate::setParentItemHelper) direclty from QmlGraphicsItem::setParentItem. This avoids a lot of unnecessary instructions related to QVariant constructions as well as virtual function calls. I've made the variant pointers explicit in the declaration of setParentItemHelper so that we don't accidentally call setParentItemHelper from places where we need parent change notifications. Task-number: QTBUG-6877 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 43 +++++++++++++++++++-------------- src/gui/graphicsview/qgraphicsitem_p.h | 3 ++- src/gui/graphicsview/qgraphicsscene.cpp | 2 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index d66e9b6..1139be0 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1014,19 +1014,10 @@ QVariant QGraphicsItemPrivate::inputMethodQueryHelper(Qt::InputMethodQuery query prepareGeometryChange) if the item is in its destructor, i.e. inDestructor is 1. */ -void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) +void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const QVariant *newParentVariant, + const QVariant *thisPointerVariant) { Q_Q(QGraphicsItem); - if (newParent == q) { - qWarning("QGraphicsItem::setParentItem: cannot assign %p as a parent of itself", this); - return; - } - if (newParent == parent) - return; - - const QVariant newParentVariant(q->itemChange(QGraphicsItem::ItemParentChange, - qVariantFromValue(newParent))); - newParent = qVariantValue(newParentVariant); if (newParent == parent) return; @@ -1051,11 +1042,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) if (!inDestructor) q_ptr->prepareGeometryChange(); - const QVariant thisPointerVariant(qVariantFromValue(q)); if (parent) { // Remove from current parent parent->d_ptr->removeChild(q); - parent->itemChange(QGraphicsItem::ItemChildRemovedChange, thisPointerVariant); + if (thisPointerVariant) + parent->itemChange(QGraphicsItem::ItemChildRemovedChange, *thisPointerVariant); } // Update toplevelitem list. If this item is being deleted, its parent @@ -1131,7 +1122,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } parent->d_ptr->addChild(q); - parent->itemChange(QGraphicsItem::ItemChildAddedChange, thisPointerVariant); + if (thisPointerVariant) + parent->itemChange(QGraphicsItem::ItemChildAddedChange, *thisPointerVariant); if (scene) { if (!implicitUpdate) scene->d_func()->markDirty(q_ptr); @@ -1186,7 +1178,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } // Deliver post-change notification - q->itemChange(QGraphicsItem::ItemParentHasChanged, newParentVariant); + if (newParentVariant) + q->itemChange(QGraphicsItem::ItemParentHasChanged, *newParentVariant); if (isObject) emit static_cast(q)->parentChanged(); @@ -1375,7 +1368,7 @@ QGraphicsItem::~QGraphicsItem() d_ptr->scene->d_func()->removeItemHelper(this); } else { d_ptr->resetFocusProxy(); - d_ptr->setParentItemHelper(0); + setParentItem(0); } #ifndef QT_NO_GRAPHICSEFFECT @@ -1580,9 +1573,23 @@ const QGraphicsObject *QGraphicsItem::toGraphicsObject() const \sa parentItem(), childItems() */ -void QGraphicsItem::setParentItem(QGraphicsItem *parent) +void QGraphicsItem::setParentItem(QGraphicsItem *newParent) { - d_ptr->setParentItemHelper(parent); + if (newParent == this) { + qWarning("QGraphicsItem::setParentItem: cannot assign %p as a parent of itself", this); + return; + } + if (newParent == d_ptr->parent) + return; + + const QVariant newParentVariant(itemChange(QGraphicsItem::ItemParentChange, + qVariantFromValue(newParent))); + newParent = qVariantValue(newParentVariant); + if (newParent == d_ptr->parent) + return; + + const QVariant thisPointerVariant(qVariantFromValue(this)); + d_ptr->setParentItemHelper(newParent, &newParentVariant, &thisPointerVariant); } /*! diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index cfdd382..ac10aa7 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -230,7 +230,8 @@ public: void resolveDepth(); void addChild(QGraphicsItem *child); void removeChild(QGraphicsItem *child); - void setParentItemHelper(QGraphicsItem *parent); + void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant, + const QVariant *thisPointerVariant); void childrenBoundingRectHelper(QTransform *x, QRectF *rect); void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems = false) const; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index fa9f794..088a6b9 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -599,7 +599,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) if (parentItem->scene()) { Q_ASSERT_X(parentItem->scene() == q, "QGraphicsScene::removeItem", "Parent item's scene is different from this item's scene"); - item->d_ptr->setParentItemHelper(0); + item->setParentItem(0); } } else { unregisterTopLevelItem(item); -- cgit v0.12 From 51f8dd863b037415f84d53884f1576171c11566d Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 08:31:32 +0100 Subject: Fix documentation bug in QColor --- src/gui/painting/qcolor.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index f51dc36..d6d288e 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -934,8 +934,7 @@ void QColor::setRgb(int r, int g, int b, int a) /*! \fn QRgb QColor::rgba() const - Returns the RGB value of the color. Unlike rgb(), the alpha is not - stripped. + Returns the RGB value of the color, including its alpha. For an invalid color, the alpha value of the returned color is unspecified. @@ -950,8 +949,7 @@ QRgb QColor::rgba() const } /*! - Sets the RGBA value to \a rgba. Unlike setRgb(QRgb rgb), this function does - not ignore the alpha. + Sets the RGB value to \a rgba, including its alpha. \sa rgba(), rgb() */ @@ -968,8 +966,7 @@ void QColor::setRgba(QRgb rgba) /*! \fn QRgb QColor::rgb() const - Returns the RGB value of the color. The alpha is stripped for - compatibility. + Returns the RGB value of the color. The alpha value is opaque. \sa getRgb(), rgba() */ @@ -983,7 +980,7 @@ QRgb QColor::rgb() const /*! \overload - Sets the RGB value to \a rgb, ignoring the alpha. + Sets the RGB value to \a rgb. The alpha value is set to opaque. */ void QColor::setRgb(QRgb rgb) { -- cgit v0.12 From e6cd01d47cd7da1b34e36b0bc3de7e94429f6d58 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 22 Jan 2010 10:13:53 +0100 Subject: removed a debug trace --- src/corelib/animation/qabstractanimation.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 2b4ab47..cedb43f 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -299,8 +299,6 @@ void QUnifiedTimer::registerRunningAnimation(QAbstractAnimation *animation) return; if (QAbstractAnimationPrivate::get(animation)->isPause) { - if (animation->duration() == -1) - qDebug() << "toto"; runningPauseAnimations << animation; } else runningLeafAnimations++; -- cgit v0.12 From 3e03a6330de1bf4b96fc990d2204826ffd5d2bb4 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 22 Jan 2010 11:10:35 +0100 Subject: Fix rendering with simple shader in GL2 engine Need to bind the PMV matrix's attributes to their indexes in the simple shader, which is created in a seperate code path to all the other shaders. This should fix the qgl autotest failures. Reviewed-By: TrustMe --- src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 9fd9e18..8183f08 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -184,6 +184,9 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) simpleShaderProg->addShader(vertexShader); simpleShaderProg->addShader(fragShader); simpleShaderProg->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix1", QT_PMV_MATRIX_1_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix2", QT_PMV_MATRIX_2_ATTR); + simpleShaderProg->bindAttributeLocation("pmvMatrix3", QT_PMV_MATRIX_3_ATTR); simpleShaderProg->link(); if (!simpleShaderProg->isLinked()) { qCritical() << "Errors linking simple shader:" -- cgit v0.12 From 0f59e2a256266e9981a56945103ffd2a850f0d95 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 12:39:18 +0100 Subject: Fix y-inverted pixmaps properly. There is a lot of code depending on that pixmaps are flipped upside down in the gl graphicssystem, so toggling this requires extensive testing. Since we're anyway questioning the relevance of this feature (compared to raster + GL viewport) its simply not worth the effort to fix it properly right now. Revert "Fixed y-inverted pixmaps on N900." This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01. --- src/opengl/qpixmapdata_gl.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 6d47687..aa80664 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -252,10 +252,6 @@ QGLPixmapData::QGLPixmapData(PixelType type) { setSerialNumber(++qt_gl_pixmap_serial); m_glDevice.setPixmapData(this); - - // Set InteralBindOptions minus the memory managed, since this - // QGLTexture is not managed as part of the internal texture cache - m_texture.options = QGLContext::PremultipliedAlphaBindOption; } QGLPixmapData::~QGLPixmapData() @@ -344,18 +340,18 @@ void QGLPixmapData::ensureCreated() const } if (!m_source.isNull()) { - glBindTexture(target, m_texture.id); if (external_format == GL_RGB) { - const QImage tx = m_source.convertToFormat(QImage::Format_RGB888); + const QImage tx = m_source.convertToFormat(QImage::Format_RGB888).mirrored(false, true); + + glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); } else { const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format); + + glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); - // convertToGLFormat will flip the Y axis, so it needs to - // be drawn upside down - m_texture.options |= QGLContext::InvertedYBindOption; } if (useFramebufferObjects()) -- cgit v0.12 From 98e2e1d674669bdfb773ddc8b8281eeb935a14e1 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 22 Jan 2010 13:55:31 +0100 Subject: revert parts of 10392eef4fd4f9 We can't call QCOMPARE from within a nested function, because the return statement will just exit that function. VERIFY_COLOR can't be turned into a function this way. --- tests/auto/qwidget/tst_qwidget.cpp | 50 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ee4e726..ea90ae3 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -5439,26 +5439,24 @@ public: QRegion r; }; -template -void verifyColor(R const& region, C const& color) -{ - const QRegion r = QRegion(region); - for (int i = 0; i < r.rects().size(); ++i) { - const QRect rect = r.rects().at(i); - for (int t = 0; t < 5; t++) { - const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), - rect.left(), rect.top(), - rect.width(), rect.height()); - QCOMPARE(pixmap.size(), rect.size()); - QPixmap expectedPixmap(pixmap); /* ensure equal formats */ - expectedPixmap.fill(color); - if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) - { QTest::qWait(200); continue; } - QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); - QCOMPARE(pixmap, expectedPixmap); - break; - } - } +#define VERIFY_COLOR(region, color) { \ + const QRegion r = QRegion(region); \ + for (int i = 0; i < r.rects().size(); ++i) { \ + const QRect rect = r.rects().at(i); \ + for (int t = 0; t < 5; t++) { \ + const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), \ + rect.left(), rect.top(), \ + rect.width(), rect.height()); \ + QCOMPARE(pixmap.size(), rect.size()); \ + QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \ + expectedPixmap.fill(color); \ + if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) \ + { QTest::qWait(200); continue; } \ + QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); \ + QCOMPARE(pixmap, expectedPixmap); \ + break; \ + } \ + } \ } void tst_QWidget::moveChild_data() @@ -5499,9 +5497,9 @@ void tst_QWidget::moveChild() #endif QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry()); QTRY_COMPARE(child.r, QRegion(child.rect())); - verifyColor(child.geometry().translated(tlwOffset), + VERIFY_COLOR(child.geometry().translated(tlwOffset), child.color); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), parent.color); parent.reset(); child.reset(); @@ -5520,9 +5518,9 @@ void tst_QWidget::moveChild() // should be scrolled in backingstore QCOMPARE(child.r, QRegion()); #endif - verifyColor(child.geometry().translated(tlwOffset), + VERIFY_COLOR(child.geometry().translated(tlwOffset), child.color); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), parent.color); } @@ -5553,8 +5551,8 @@ void tst_QWidget::showAndMoveChild() child.move(desktopDimensions.width()/2, desktopDimensions.height()/2); qApp->processEvents(); - verifyColor(child.geometry().translated(tlwOffset), Qt::blue); - verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red); + VERIFY_COLOR(child.geometry().translated(tlwOffset), Qt::blue); + VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red); } void tst_QWidget::subtractOpaqueSiblings() -- cgit v0.12 From c8d6b751955d2857385a44aafd1ecade8d4d3c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 22 Jan 2010 13:56:21 +0100 Subject: Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. Modal Mac/Carbon dialogs do not have the close, minimize and resize window title buttons enabled, which makes it very hard to close modal dialogs. Task-number: QTBUG-7481 Reviewed-by: Kim --- src/gui/dialogs/qprintpreviewdialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 42be780..6723b53 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -207,6 +207,9 @@ public: QActionGroup *printerGroup; QAction *printAction; QAction *pageSetupAction; +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + QAction *closeAction; +#endif QPointer receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -287,6 +290,9 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer) toolbar->addSeparator(); toolbar->addAction(pageSetupAction); toolbar->addAction(printAction); +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + toolbar->addAction(closeAction); +#endif // Cannot use the actions' triggered signal here, since it doesn't autorepeat QToolButton *zoomInButton = static_cast(toolbar->widgetForAction(zoomInAction)); @@ -406,6 +412,10 @@ void QPrintPreviewDialogPrivate::setupActions() qt_setupActionIcon(pageSetupAction, QLatin1String("page-setup")); QObject::connect(printAction, SIGNAL(triggered(bool)), q, SLOT(_q_print())); QObject::connect(pageSetupAction, SIGNAL(triggered(bool)), q, SLOT(_q_pageSetup())); +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + closeAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Close")); + QObject::connect(closeAction, SIGNAL(triggered(bool)), q, SLOT(reject())); +#endif // Initial state: fitPageAction->setChecked(true); -- cgit v0.12 From ef427d48fa684578ecb69e4e1ce2072f12362682 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 22 Jan 2010 14:47:15 +0100 Subject: Fix QPainter::redirection() to pass autotest. Reviewed-by: Trond --- src/gui/painting/qpainter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1258d6b..cde6a2d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7503,15 +7503,14 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { Q_ASSERT(device != 0); - if (*globalRedirectionAtomic() == 0) - return 0; - if (device->devType() == QInternal::Widget) { const QWidgetPrivate *widgetPrivate = static_cast(device)->d_func(); if (widgetPrivate->redirectDev) return widgetPrivate->redirected(offset); } + if (*globalRedirectionAtomic() == 0) + return 0; QMutexLocker locker(globalRedirectionsMutex()); QPaintDeviceRedirectionList *redirections = globalRedirections(); -- cgit v0.12 From 4bcc8a24129b69efa1217dd033f0af949df0bcb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 22 Jan 2010 12:46:32 +0100 Subject: QGraphicsWidget is painted twice on the inital show. Problem occured when doing something in the polishEvent() which eventually ended up as an update(). The problem was that in QGraphicsScene::addItem we scheduled a polish event after scheduling an update, resulting in update requests being processed before polish requests. Auto-test included. Task-number: QTBUG-6956 Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem_p.h | 2 ++ src/gui/graphicsview/qgraphicsscene.cpp | 22 +++++++++++++------ src/gui/graphicsview/qgraphicsscene_p.h | 2 +- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 25 ++++++++++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index ac10aa7..bdd8863 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -178,6 +178,7 @@ public: sequentialOrdering(1), updateDueToGraphicsEffect(0), scenePosDescendants(0), + pendingPolish(0), globalStackingOrder(-1), q_ptr(0) { @@ -486,6 +487,7 @@ public: quint32 sequentialOrdering : 1; quint32 updateDueToGraphicsEffect : 1; quint32 scenePosDescendants : 1; + quint32 pendingPolish : 1; // Optional stacking order int globalStackingOrder; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 088a6b9..7e182d0 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -429,12 +429,13 @@ void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item) */ void QGraphicsScenePrivate::_q_polishItems() { - QSet::Iterator it = unpolishedItems.begin(); + QVector::Iterator it = unpolishedItems.begin(); const QVariant booleanTrueVariant(true); while (!unpolishedItems.isEmpty()) { QGraphicsItem *item = *it; it = unpolishedItems.erase(it); unpolishedItemsModified = false; + item->d_ptr->pendingPolish = false; if (!item->d_ptr->explicitlyHidden) { item->itemChange(QGraphicsItem::ItemVisibleChange, booleanTrueVariant); item->itemChange(QGraphicsItem::ItemVisibleHasChanged, booleanTrueVariant); @@ -638,8 +639,14 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) selectedItems.remove(item); hoverItems.removeAll(item); cachedItemsUnderMouse.removeAll(item); - unpolishedItems.remove(item); - unpolishedItemsModified = true; + if (item->d_ptr->pendingPolish) { + const int unpolishedIndex = unpolishedItems.indexOf(item); + if (unpolishedIndex != -1) { + unpolishedItems.remove(unpolishedIndex); + unpolishedItemsModified = true; + } + item->d_ptr->pendingPolish = false; + } resetDirtyItem(item); //We remove all references of item from the sceneEventFilter arrays @@ -2501,6 +2508,11 @@ void QGraphicsScene::addItem(QGraphicsItem *item) return; } + if (d->unpolishedItems.isEmpty()) + QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); + d->unpolishedItems.append(item); + item->d_ptr->pendingPolish = true; + // Detach this item from its parent if the parent's scene is different // from this scene. if (QGraphicsItem *itemParent = item->d_ptr->parent) { @@ -2583,10 +2595,6 @@ void QGraphicsScene::addItem(QGraphicsItem *item) item->d_ptr->resolveFont(d->font.resolve()); item->d_ptr->resolvePalette(d->palette.resolve()); - if (d->unpolishedItems.isEmpty()) - QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); - d->unpolishedItems.insert(item); - d->unpolishedItemsModified = true; // Reenable selectionChanged() for individual items --d->selectionChanging; diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index d10811c..a3e36d0 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -108,7 +108,7 @@ public: QPainterPath selectionArea; int selectionChanging; QSet selectedItems; - QSet unpolishedItems; + QVector unpolishedItems; QList topLevelItems; bool needSortTopLevelItems; bool unpolishedItemsModified; diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 909ea54..d3132fe 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -163,6 +163,7 @@ private slots: void addChildInpolishEvent(); void polishEvent(); void polishEvent2(); + void initialShow(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2856,6 +2857,30 @@ void tst_QGraphicsWidget::polishEvent2() QVERIFY(widget->events.contains(QEvent::Polish)); } +void tst_QGraphicsWidget::initialShow() +{ + class MyGraphicsWidget : public QGraphicsWidget + { public: + MyGraphicsWidget() : repaints(0) {} + int repaints; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; } + void polishEvent() { update(); } + }; + + QGraphicsScene scene; + MyGraphicsWidget *widget = new MyGraphicsWidget; + + QGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + + QTest::qWait(100); + scene.addItem(widget); + QTest::qWait(100); + + QCOMPARE(widget->repaints, 1); +} + void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() { QGraphicsScene scene; -- cgit v0.12 From 9f8272b979be69574ae7e5211219363b03d23316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 22 Jan 2010 17:25:38 +0100 Subject: Potential crash when adding items from QGraphicsWidget::polishEvent(). These were processed immediately, so there was a fair chance that we could end up doing a virtual function call on items that were not fully constructed. This patch is also an optimization, since we never remove anything from the vector. Auto-test included. Reviewed-by: Jan-Arve --- src/gui/graphicsview/qgraphicsscene.cpp | 42 ++++++++++++++--------- src/gui/graphicsview/qgraphicsscene_p.h | 1 - tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 43 ++++++++++++++++++++++-- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 7e182d0..ae48bee 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -292,7 +292,6 @@ QGraphicsScenePrivate::QGraphicsScenePrivate() processDirtyItemsEmitted(false), selectionChanging(0), needSortTopLevelItems(true), - unpolishedItemsModified(true), holesInTopLevelSiblingIndex(false), topLevelSequentialOrdering(true), scenePosDescendantsUpdatePending(false), @@ -429,23 +428,38 @@ void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item) */ void QGraphicsScenePrivate::_q_polishItems() { - QVector::Iterator it = unpolishedItems.begin(); + if (unpolishedItems.isEmpty()) + return; + const QVariant booleanTrueVariant(true); - while (!unpolishedItems.isEmpty()) { - QGraphicsItem *item = *it; - it = unpolishedItems.erase(it); - unpolishedItemsModified = false; - item->d_ptr->pendingPolish = false; - if (!item->d_ptr->explicitlyHidden) { + QGraphicsItem *item = 0; + QGraphicsItemPrivate *itemd = 0; + const int oldUnpolishedCount = unpolishedItems.count(); + + for (int i = 0; i < oldUnpolishedCount; ++i) { + item = unpolishedItems.at(i); + if (!item) + continue; + itemd = item->d_ptr.data(); + itemd->pendingPolish = false; + if (!itemd->explicitlyHidden) { item->itemChange(QGraphicsItem::ItemVisibleChange, booleanTrueVariant); item->itemChange(QGraphicsItem::ItemVisibleHasChanged, booleanTrueVariant); } - if (item->isWidget()) { + if (itemd->isWidget) { QEvent event(QEvent::Polish); QApplication::sendEvent((QGraphicsWidget *)item, &event); } - if (unpolishedItemsModified) - it = unpolishedItems.begin(); + } + + if (unpolishedItems.count() == oldUnpolishedCount) { + // No new items were added to the vector. + unpolishedItems.clear(); + } else { + // New items were appended; keep them and remove the old ones. + unpolishedItems.remove(0, oldUnpolishedCount); + unpolishedItems.squeeze(); + QMetaObject::invokeMethod(q_ptr, "_q_polishItems", Qt::QueuedConnection); } } @@ -641,10 +655,8 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) cachedItemsUnderMouse.removeAll(item); if (item->d_ptr->pendingPolish) { const int unpolishedIndex = unpolishedItems.indexOf(item); - if (unpolishedIndex != -1) { - unpolishedItems.remove(unpolishedIndex); - unpolishedItemsModified = true; - } + if (unpolishedIndex != -1) + unpolishedItems[unpolishedIndex] = 0; item->d_ptr->pendingPolish = false; } resetDirtyItem(item); diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index a3e36d0..54d8130 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -111,7 +111,6 @@ public: QVector unpolishedItems; QList topLevelItems; bool needSortTopLevelItems; - bool unpolishedItemsModified; bool holesInTopLevelSiblingIndex; bool topLevelSequentialOrdering; diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index c08a628e..547e7f5 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -270,6 +270,7 @@ private slots: void initialFocus_data(); void initialFocus(); void polishItems(); + void polishItems2(); void isActive(); void siblingIndexAlwaysValid(); @@ -3942,14 +3943,23 @@ void tst_QGraphicsScene::initialFocus() class PolishItem : public QGraphicsTextItem { public: - PolishItem(QGraphicsItem *parent = 0) : QGraphicsTextItem(parent) { } + PolishItem(QGraphicsItem *parent = 0) + : QGraphicsTextItem(parent), polished(false), deleteChildrenInPolish(true), addChildrenInPolish(false) { } + bool polished; + bool deleteChildrenInPolish; + bool addChildrenInPolish; protected: QVariant itemChange(GraphicsItemChange change, const QVariant& value) { if (change == ItemVisibleChange) { - if (value.toBool()) + polished = true; + if (deleteChildrenInPolish) qDeleteAll(childItems()); + if (addChildrenInPolish) { + for (int i = 0; i < 10; ++i) + new PolishItem(this); + } } return QGraphicsItem::itemChange(change, value); } @@ -3966,6 +3976,35 @@ void tst_QGraphicsScene::polishItems() QMetaObject::invokeMethod(&scene,"_q_polishItems"); } +void tst_QGraphicsScene::polishItems2() +{ + QGraphicsScene scene; + PolishItem *item = new PolishItem; + item->addChildrenInPolish = true; + item->deleteChildrenInPolish = true; + // These children should be deleted in the polish. + for (int i = 0; i < 20; ++i) + new PolishItem(item); + scene.addItem(item); + + // Wait for the polish event to be delivered. + QVERIFY(!item->polished); + QApplication::processEvents(); + QVERIFY(item->polished); + + // We deleted the children we added above, but we also + // added 10 new children. These should be polished in the next + // event loop iteration. + QList children = item->childItems(); + QCOMPARE(children.count(), 10); + foreach (QGraphicsItem *child, children) + QVERIFY(!static_cast(child)->polished); + + QApplication::processEvents(); + foreach (QGraphicsItem *child, children) + QVERIFY(static_cast(child)->polished); +} + void tst_QGraphicsScene::isActive() { QGraphicsScene scene1; -- cgit v0.12 From 3ec5241a21d233cac879e535719fb546f391add3 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 22 Jan 2010 13:15:21 -0800 Subject: Implement QDirectFBPixmapData::scroll This is a very operation in DirectFB and saves a fair bit of overhead. Reviewed-by: Donald Carr --- .../gfxdrivers/directfb/qdirectfbpixmap.cpp | 31 +++++++++++++++++++--- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 1cbfdaf..f27440e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -552,6 +552,34 @@ QImage *QDirectFBPixmapData::buffer() return &lockedImage; } + +bool QDirectFBPixmapData::scroll(int dx, int dy, const QRect &rect) +{ + if (!dfbSurface) { + return false; + } + unlockSurface(); + DFBResult result = dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + result = dfbSurface->SetPorterDuff(dfbSurface, DSPD_NONE); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + + const DFBRectangle source = { rect.x(), rect.y(), rect.width(), rect.height() }; + result = dfbSurface->Blit(dfbSurface, dfbSurface, &source, source.x + dx, source.y + dy); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); + return false; + } + + return true; +} + void QDirectFBPixmapData::invalidate() { if (dfbSurface) { @@ -568,6 +596,3 @@ void QDirectFBPixmapData::invalidate() QT_END_NAMESPACE #endif // QT_NO_QWS_DIRECTFB - - - diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index f9b14a9..da6edc6 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -81,6 +81,7 @@ public: virtual QImage toImage() const; virtual QPaintEngine *paintEngine() const; virtual QImage *buffer(); + virtual bool scroll(int dx, int dy, const QRect &rect); // Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice virtual int metric(QPaintDevice::PaintDeviceMetric m) const { return QDirectFBPaintDevice::metric(m); } -- cgit v0.12 From 9098631b8a3927ebdf945ccdbaf20b9a7616636d Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 22 Jan 2010 17:36:05 +0100 Subject: Another ASSERT while deleting spans That rare case when we are deleting the last span was not being taken care of. Unbelievable but true. Auto-test included. Reviewed-by: Thierry Reviewed-by: leo Task-number: QTBUG-6004 --- src/gui/itemviews/qtableview.cpp | 4 +++- tests/auto/qtableview/tst_qtableview.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 7eefb0b..3111896 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -114,7 +114,9 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } } else if (old_height > span->height()) { //remove the span from all the subspans lists that intersect the columns not covered anymore - Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0)); + Index::iterator it_y = index.lowerBound(-span->bottom()); + if (it_y == index.end()) + it_y = index.find(-span->top()); // This is the only span remaining and we are deleting it. Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->top() + old_height -1) { if (-it_y.key() > span->bottom()) { diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 7a5e68f..430712c 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -3024,6 +3024,14 @@ void tst_QTableView::spans_data() << QPoint(0, 0) << 1 << 1; + + QTest::newRow("QTBUG-6004 (follow-up): No failing Q_ASSERT, then it passes.") + << 10 << 10 + << (SpanList() << QRect(2, 2, 1, 3) << QRect(2, 2, 1, 1)) + << false + << QPoint(0, 0) + << 1 + << 1; } void tst_QTableView::spans() -- cgit v0.12 From 3741fd9aed480f5db37502cc57634fec97432e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 15 Jan 2010 13:23:51 +0100 Subject: Small optimization in raster paint engine. Don't repeatedly update the pen / brush if no pen / brush is set. Reviewed-by: Gunnar Sletta --- src/gui/painting/qpaintengine_raster_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index b937f66..a1c73cc 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -264,13 +264,13 @@ private: #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE inline void ensureBrush(const QBrush &brush) { - if (!qbrush_fast_equals(state()->lastBrush, brush) || state()->fillFlags) + if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) updateBrush(brush); } inline void ensureBrush() { ensureBrush(state()->brush); } inline void ensurePen(const QPen &pen) { - if (!qpen_fast_equals(state()->lastPen, pen) || state()->strokeFlags) + if (!qpen_fast_equals(state()->lastPen, pen) || (pen.style() != Qt::NoPen && state()->strokeFlags)) updatePen(pen); } inline void ensurePen() { ensurePen(state()->pen); } -- cgit v0.12 From 00371f6b694c98e44799a15058002ab58ab389d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 Jan 2010 15:04:07 +0100 Subject: Made the trace replayer handle limited resolution cases better. Simply skip the updates that are outside the replay widget's bounds. Reviewed-by: Gunnar Sletta --- tools/qttracereplay/main.cpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/qttracereplay/main.cpp b/tools/qttracereplay/main.cpp index 85e9b12..a932d72 100644 --- a/tools/qttracereplay/main.cpp +++ b/tools/qttracereplay/main.cpp @@ -52,6 +52,7 @@ public: ReplayWidget(const QString &filename); void paintEvent(QPaintEvent *event); + void resizeEvent(QResizeEvent *event); public slots: void updateRect(); @@ -64,14 +65,15 @@ public: int currentIteration; QTime timer; + QList visibleUpdates; QList iterationTimes; QString filename; }; void ReplayWidget::updateRect() { - if (!updates.isEmpty()) - update(updates.at(currentFrame)); + if (!visibleUpdates.isEmpty()) + update(updates.at(visibleUpdates.at(currentFrame))); } void ReplayWidget::paintEvent(QPaintEvent *) @@ -80,10 +82,10 @@ void ReplayWidget::paintEvent(QPaintEvent *) // p.setClipRegion(frames.at(currentFrame).updateRegion); - buffer.draw(&p, currentFrame); + buffer.draw(&p, visibleUpdates.at(currentFrame)); ++currentFrame; - if (currentFrame >= buffer.numFrames()) { + if (currentFrame >= visibleUpdates.size()) { currentFrame = 0; ++currentIteration; @@ -119,7 +121,7 @@ void ReplayWidget::paintEvent(QPaintEvent *) if (iterationTimes.size() >= 10 || stddev < 4) { printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %d, stddev: %f %%, max(fps): %f\n", qPrintable(filename), - iterationTimes.size(), updates.size(), min, median, stddev, 1000. * updates.size() / min); + iterationTimes.size(), visibleUpdates.size(), min, median, stddev, 1000. * visibleUpdates.size() / min); deleteLater(); return; } @@ -130,6 +132,21 @@ void ReplayWidget::paintEvent(QPaintEvent *) QTimer::singleShot(0, this, SLOT(updateRect())); } +void ReplayWidget::resizeEvent(QResizeEvent *event) +{ + visibleUpdates.clear(); + + QRect bounds = rect(); + for (int i = 0; i < updates.size(); ++i) { + if (updates.at(i).intersects(bounds)) + visibleUpdates << i; + } + + if (visibleUpdates.size() != updates.size()) + printf("Warning: skipped %d frames due to limited resolution\n", updates.size() - visibleUpdates.size()); + +} + ReplayWidget::ReplayWidget(const QString &filename_) : currentFrame(0) , currentIteration(0) @@ -138,7 +155,6 @@ ReplayWidget::ReplayWidget(const QString &filename_) setWindowTitle(filename); QFile file(filename); - QRect bounds; if (!file.open(QIODevice::ReadOnly)) { printf("Failed to load input file '%s'\n", qPrintable(filename_)); return; -- cgit v0.12 From d867c403dfbc284e2f564939622854900ab66919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Jan 2010 13:46:52 +0100 Subject: Fixed child items with graphics effects not inheriting opacity. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to invalidate the graphics source pixmap cache for both child items and parent items when changing the opacity of a graphics item. Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 23 +++++++++++++-- src/gui/graphicsview/qgraphicsitem_p.h | 6 +++- tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 34 ++++++++++++++++++++-- 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1139be0..f4767b8 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2567,7 +2567,9 @@ void QGraphicsItem::setOpacity(qreal opacity) // Update. if (d_ptr->scene) { #ifndef QT_NO_GRAPHICSEFFECT - d_ptr->invalidateGraphicsEffectsRecursively(); + d_ptr->invalidateParentGraphicsEffectsRecursively(); + if (!(d_ptr->flags & ItemDoesntPropagateOpacityToChildren)) + d_ptr->invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::OpacityChanged); #endif //QT_NO_GRAPHICSEFFECT d_ptr->scene->d_func()->markDirty(this, QRectF(), /*invalidateChildren=*/true, @@ -5077,7 +5079,7 @@ int QGraphicsItemPrivate::depth() const \internal */ #ifndef QT_NO_GRAPHICSEFFECT -void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively() +void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively() { QGraphicsItemPrivate *itemPrivate = this; do { @@ -5089,6 +5091,21 @@ void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively() } } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0)); } + +void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::InvalidateReason reason) +{ + for (int i = 0; i < children.size(); ++i) { + QGraphicsItemPrivate *childPrivate = children.at(i)->d_ptr.data(); + if (reason == OpacityChanged && (childPrivate->flags & QGraphicsItem::ItemIgnoresParentOpacity)) + continue; + if (childPrivate->graphicsEffect) { + childPrivate->notifyInvalidated = 1; + static_cast(childPrivate->graphicsEffect->d_func()->source->d_func())->invalidateCache(); + } + + childPrivate->invalidateChildGraphicsEffectsRecursively(reason); + } +} #endif //QT_NO_GRAPHICSEFFECT /*! @@ -5333,7 +5350,7 @@ void QGraphicsItem::update(const QRectF &rect) // Make sure we notify effects about invalidated source. #ifndef QT_NO_GRAPHICSEFFECT - d_ptr->invalidateGraphicsEffectsRecursively(); + d_ptr->invalidateParentGraphicsEffectsRecursively(); #endif //QT_NO_GRAPHICSEFFECT if (CacheMode(d_ptr->cacheMode) != NoCache) { diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index bdd8863..ff6e8bd 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -225,7 +225,11 @@ public: bool ignoreDirtyBit = false, bool ignoreOpacity = false) const; int depth() const; #ifndef QT_NO_GRAPHICSEFFECT - void invalidateGraphicsEffectsRecursively(); + enum InvalidateReason { + OpacityChanged + }; + void invalidateParentGraphicsEffectsRecursively(); + void invalidateChildGraphicsEffectsRecursively(InvalidateReason reason); #endif //QT_NO_GRAPHICSEFFECT void invalidateDepthRecursively(); void resolveDepth(); diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index 51e2a57..795431b 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -71,6 +71,7 @@ private slots: void colorize(); void drawPixmapItem(); void deviceCoordinateTranslateCaching(); + void inheritOpacity(); }; void tst_QGraphicsEffect::initTestCase() @@ -79,8 +80,8 @@ void tst_QGraphicsEffect::initTestCase() class CustomItem : public QGraphicsRectItem { public: - CustomItem(qreal x, qreal y, qreal width, qreal height) - : QGraphicsRectItem(x, y, width, height), numRepaints(0), + CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = 0) + : QGraphicsRectItem(x, y, width, height, parent), numRepaints(0), m_painter(0), m_styleOption(0) {} @@ -560,6 +561,35 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching() QVERIFY(item->numRepaints == numRepaints); } +void tst_QGraphicsEffect::inheritOpacity() +{ + QGraphicsScene scene; + QGraphicsRectItem *rectItem = new QGraphicsRectItem(0, 0, 10, 10); + CustomItem *item = new CustomItem(0, 0, 10, 10, rectItem); + + scene.addItem(rectItem); + + item->setGraphicsEffect(new DeviceEffect); + item->setPen(Qt::NoPen); + item->setBrush(Qt::red); + + rectItem->setOpacity(0.5); + + QGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + + QTRY_VERIFY(item->numRepaints >= 1); + + int numRepaints = item->numRepaints; + + rectItem->setOpacity(1); + QTest::qWait(50); + + // item should have been rerendered due to opacity changing + QTRY_VERIFY(item->numRepaints > numRepaints); +} + QTEST_MAIN(tst_QGraphicsEffect) #include "tst_qgraphicseffect.moc" -- cgit v0.12 From 6a1a7d4ff16b87275a06c83e5316f778c974dba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 25 Jan 2010 11:52:14 +0100 Subject: Added optimization flag to QGraphicsItemPrivate. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid traversing the whole child hierarchy when opacity changes unless there are children with graphics effects. Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 22 ++++++++++++++++++++++ src/gui/graphicsview/qgraphicsitem_p.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index f4767b8..f81cb23 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1077,6 +1077,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q p = p->d_ptr->parent; } + // Update graphics effect optimization flag + if (newParent && (graphicsEffect || mayHaveChildWithGraphicsEffect)) + newParent->d_ptr->updateChildWithGraphicsEffectFlagRecursively(); + // Update focus scope item ptr in new scope. QGraphicsItem *newFocusScopeItem = subFocusItem ? subFocusItem : parentFocusScopeItem; if (newFocusScopeItem && newParent) { @@ -2614,6 +2618,8 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect) if (d_ptr->graphicsEffect) { delete d_ptr->graphicsEffect; d_ptr->graphicsEffect = 0; + } else if (d_ptr->parent) { + d_ptr->parent->d_ptr->updateChildWithGraphicsEffectFlagRecursively(); } if (effect) { @@ -2627,6 +2633,19 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect) } #endif //QT_NO_GRAPHICSEFFECT +void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively() +{ +#ifndef QT_NO_GRAPHICSEFFECT + QGraphicsItemPrivate *itemPrivate = this; + do { + // parent chain already notified? + if (itemPrivate->mayHaveChildWithGraphicsEffect) + return; + itemPrivate->mayHaveChildWithGraphicsEffect = 1; + } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0)); +#endif +} + /*! \internal \since 4.6 @@ -5094,6 +5113,9 @@ void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively() void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::InvalidateReason reason) { + if (!mayHaveChildWithGraphicsEffect) + return; + for (int i = 0; i < children.size(); ++i) { QGraphicsItemPrivate *childPrivate = children.at(i)->d_ptr.data(); if (reason == OpacityChanged && (childPrivate->flags & QGraphicsItem::ItemIgnoresParentOpacity)) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index ff6e8bd..986a977 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -179,6 +179,7 @@ public: updateDueToGraphicsEffect(0), scenePosDescendants(0), pendingPolish(0), + mayHaveChildWithGraphicsEffect(0), globalStackingOrder(-1), q_ptr(0) { @@ -196,6 +197,7 @@ public: return item->d_ptr.data(); } + void updateChildWithGraphicsEffectFlagRecursively(); void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag = NoFlag, bool enabled = false, bool root = true); void updateAncestorFlags(); @@ -492,6 +494,7 @@ public: quint32 updateDueToGraphicsEffect : 1; quint32 scenePosDescendants : 1; quint32 pendingPolish : 1; + quint32 mayHaveChildWithGraphicsEffect : 1; // Optional stacking order int globalStackingOrder; -- cgit v0.12 From 38b0bc95448f65404f56c6dfebc54dc5f33c11a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 25 Jan 2010 17:30:26 +0100 Subject: Updated docs regarding QGLWidget::renderText() limitations. Reviewed-by: Trust Me --- src/opengl/qgl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 3f32cf3..48e43b2 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4393,6 +4393,13 @@ static void qt_gl_draw_text(QPainter *p, int x, int y, const QString &str, \note This function temporarily disables depth-testing when the text is drawn. + \note This function can only be used inside a + QPainter::beginNativePainting()/QPainter::endNativePainting() block + if the default OpenGL paint engine is QPaintEngine::OpenGL. To make + QPaintEngine::OpenGL the default GL engine, call + QGL::setPreferredPaintEngine(QPaintEngine::OpenGL) before the + QApplication constructor. + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. */ -- cgit v0.12 From cb9ff7135854b16fdebb637b28284d1e1883044c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 26 Jan 2010 10:55:31 +0100 Subject: Fixed an infinite loop that could occur when reading invalid BMP images. Task-number: QTBUG-7530 Reviewed-by: Kim --- src/gui/image/qbmphandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 854be2e..42e19b8 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -144,7 +144,7 @@ static QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi) static int calc_shift(int mask) { int result = 0; - while (!(mask & 1)) { + while (mask && !(mask & 1)) { result++; mask >>= 1; } -- cgit v0.12 From 0c85477397531cd624b8558bfa2cc6b3ccc9572c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 26 Jan 2010 14:14:47 +0100 Subject: Stabilize tst_QGraphicsScene::polishItems2 (new test) We are only interested in getting the posted MetaCall events delivered, so we can get away with sendPostedEvents() instead of processEvents(). Makes the test also pass on Mac g++ carbon 32. --- tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 547e7f5..6743fbe 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -3989,7 +3989,7 @@ void tst_QGraphicsScene::polishItems2() // Wait for the polish event to be delivered. QVERIFY(!item->polished); - QApplication::processEvents(); + QApplication::sendPostedEvents(&scene, QEvent::MetaCall); QVERIFY(item->polished); // We deleted the children we added above, but we also @@ -4000,7 +4000,7 @@ void tst_QGraphicsScene::polishItems2() foreach (QGraphicsItem *child, children) QVERIFY(!static_cast(child)->polished); - QApplication::processEvents(); + QApplication::sendPostedEvents(&scene, QEvent::MetaCall); foreach (QGraphicsItem *child, children) QVERIFY(static_cast(child)->polished); } -- cgit v0.12 From c55229b3fc8dfb92abdaa633609aae75fa10e06d Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 8 Jan 2010 16:31:01 +0100 Subject: Fixes visibility update missing when doing setParentItem on graphicsitem Calling setParentItem is causing the previous opacity/visible updates to be discarded because the dirty flags were not propagated to the new parent. Also removed some unnecessary 'markDirty' and 'update' calls. Task-number: QTBUG-6738 Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 30 ++------- src/gui/graphicsview/qgraphicsitem_p.h | 33 ++++++++++ src/gui/graphicsview/qgraphicsscene.cpp | 14 +---- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 86 ++++++++++++++++++++++++++ 4 files changed, 127 insertions(+), 36 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index f81cb23..2089206 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1115,11 +1115,9 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q } if ((parent = newParent)) { - bool implicitUpdate = false; if (parent->d_func()->scene && parent->d_func()->scene != scene) { // Move this item to its new parent's scene parent->d_func()->scene->addItem(q); - implicitUpdate = true; } else if (!parent->d_func()->scene && scene) { // Remove this item from its former scene scene->removeItem(q); @@ -1129,25 +1127,25 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q if (thisPointerVariant) parent->itemChange(QGraphicsItem::ItemChildAddedChange, *thisPointerVariant); if (scene) { - if (!implicitUpdate) - scene->d_func()->markDirty(q_ptr); - // Re-enable scene pos notifications for new ancestors if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges)) scene->d_func()->setScenePosItemEnabled(q, true); } + // Propagate dirty flags to the new parent + markParentDirty(/*updateBoundingRect=*/true); + // Inherit ancestor flags from the new parent. updateAncestorFlags(); // Update item visible / enabled. if (parent->d_ptr->visible != visible) { if (!parent->d_ptr->visible || !explicitlyHidden) - setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ !implicitUpdate); + setVisibleHelper(parent->d_ptr->visible, /* explicit = */ false, /* update = */ false); } if (parent->isEnabled() != enabled) { if (!parent->d_ptr->enabled || !explicitlyDisabled) - setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ !implicitUpdate); + setEnabledHelper(parent->d_ptr->enabled, /* explicit = */ false, /* update = */ false); } // Auto-activate if visible and the parent is active. @@ -1163,10 +1161,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q setVisibleHelper(true, /* explicit = */ false); if (!enabled && !explicitlyDisabled) setEnabledHelper(true, /* explicit = */ false); - - // If the item is being deleted, the whole scene will be updated. - if (scene) - scene->d_func()->markDirty(q_ptr); } } @@ -7265,19 +7259,7 @@ void QGraphicsItem::prepareGeometryChange() } } - QGraphicsItem *parent = this; - while ((parent = parent->d_ptr->parent)) { - QGraphicsItemPrivate *parentp = parent->d_ptr.data(); - parentp->dirtyChildrenBoundingRect = 1; - // ### Only do this if the parent's effect applies to the entire subtree. - parentp->notifyBoundingRectChanged = 1; -#ifndef QT_NO_GRAPHICSEFFECT - if (parentp->scene && parentp->graphicsEffect) { - parentp->notifyInvalidated = 1; - static_cast(parentp->graphicsEffect->d_func()->source->d_func())->invalidateCache(); - } -#endif - } + d_ptr->markParentDirty(/*updateBoundingRect=*/true); } /*! diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 986a977..5ad6cd5 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -406,6 +406,8 @@ public: return !visible || (childrenCombineOpacity() && isFullyTransparent()); } + inline void markParentDirty(bool updateBoundingRect = false); + void setFocusHelper(Qt::FocusReason focusReason, bool climb); void setSubFocus(QGraphicsItem *rootItem = 0); void clearSubFocus(QGraphicsItem *rootItem = 0); @@ -754,6 +756,37 @@ inline bool QGraphicsItemPrivate::insertionOrder(QGraphicsItem *a, QGraphicsItem return a->d_ptr->siblingIndex < b->d_ptr->siblingIndex; } +/*! + \internal +*/ +inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect) +{ + QGraphicsItemPrivate *parentp = this; + while (parentp->parent) { + parentp = parentp->parent->d_ptr.data(); + parentp->dirtyChildren = 1; + + if (updateBoundingRect) { + parentp->dirtyChildrenBoundingRect = 1; + // ### Only do this if the parent's effect applies to the entire subtree. + parentp->notifyBoundingRectChanged = 1; + } +#ifndef QT_NO_GRAPHICSEFFECT + if (parentp->graphicsEffect) { + if (updateBoundingRect) { + parentp->notifyInvalidated = 1; + static_cast(parentp->graphicsEffect->d_func() + ->source->d_func())->invalidateCache(); + } + if (parentp->graphicsEffect->isEnabled()) { + parentp->dirty = 1; + parentp->fullUpdatePending = 1; + } + } +#endif + } +} + QT_END_NAMESPACE #endif // QT_NO_GRAPHICSVIEW diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index ae48bee..9219773 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1955,7 +1955,7 @@ QList QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSe \since 4.3 This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode). - + This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead. @@ -4903,17 +4903,7 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b if (ignoreOpacity) item->d_ptr->ignoreOpacity = 1; - QGraphicsItem *p = item->d_ptr->parent; - while (p) { - p->d_ptr->dirtyChildren = 1; -#ifndef QT_NO_GRAPHICSEFFECT - if (p->d_ptr->graphicsEffect && p->d_ptr->graphicsEffect->isEnabled()) { - p->d_ptr->dirty = 1; - p->d_ptr->fullUpdatePending = 1; - } -#endif //QT_NO_GRAPHICSEFFECT - p = p->d_ptr->parent; - } + item->d_ptr->markParentDirty(); } static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item, diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 8e43bce..14b9ef0 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -316,6 +316,7 @@ private slots: void childrenBoundingRectTransformed(); void childrenBoundingRect2(); void childrenBoundingRect3(); + void childrenBoundingRect4(); void group(); void setGroup(); void setGroup2(); @@ -417,6 +418,7 @@ private slots: void task197802_childrenVisibility(); void QTBUG_4233_updateCachedWithSceneRect(); void QTBUG_5418_textItemSetDefaultColor(); + void QTBUG_6738_missingUpdateWithSetParent(); private: QList paintedItems; @@ -3257,6 +3259,32 @@ void tst_QGraphicsItem::childrenBoundingRect3() QCOMPARE(subTreeRect.height(), qreal(251.7766952966369)); } +void tst_QGraphicsItem::childrenBoundingRect4() +{ + QGraphicsScene scene; + + QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 10, 10)); + QGraphicsRectItem *rect2 = scene.addRect(QRectF(0, 0, 20, 20)); + QGraphicsRectItem *rect3 = scene.addRect(QRectF(0, 0, 30, 30)); + rect2->setParentItem(rect); + rect3->setParentItem(rect); + + QGraphicsView view(&scene); + view.show(); + + QTest::qWaitForWindowShown(&view); + + // Try to mess up the cached bounding rect. + rect->childrenBoundingRect(); + rect2->childrenBoundingRect(); + + rect3->setOpacity(0.0); + rect3->setParentItem(rect2); + + QCOMPARE(rect->childrenBoundingRect(), rect3->boundingRect()); + QCOMPARE(rect2->childrenBoundingRect(), rect3->boundingRect()); +} + void tst_QGraphicsItem::group() { QGraphicsScene scene; @@ -9869,5 +9897,63 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() QCOMPARE(i->painted, 0); //same color as before should not trigger an update (QTBUG-6242) } +void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() +{ + // In all 3 test cases below the reparented item should disappear + EventTester *parent = new EventTester; + EventTester *child = new EventTester(parent); + EventTester *child2 = new EventTester(parent); + EventTester *child3 = new EventTester(parent); + EventTester *child4 = new EventTester(parent); + + child->setPos(10, 10); + child2->setPos(20, 20); + child3->setPos(30, 30); + child4->setPos(40, 40); + + QGraphicsScene scene; + scene.addItem(parent); + + class MyGraphicsView : public QGraphicsView + { public: + int repaints; + QRegion paintedRegion; + MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} + void paintEvent(QPaintEvent *e) + { + ++repaints; + paintedRegion += e->region(); + QGraphicsView::paintEvent(e); + } + void reset() { repaints = 0; paintedRegion = QRegion(); } + }; + + MyGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(view.repaints > 0); + + // test case #1 + view.reset(); + child2->setVisible(false); + child2->setParentItem(child); + + QTRY_VERIFY(view.repaints == 1); + + // test case #2 + view.reset(); + child3->setOpacity(0.0); + child3->setParentItem(child); + + QTRY_VERIFY(view.repaints == 1); + + // test case #3 + view.reset(); + child4->setParentItem(child); + child4->setVisible(false); + + QTRY_VERIFY(view.repaints == 1); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From ac0462a6f077316fffd555f45522e38a1e6f53d2 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 27 Jan 2010 09:34:39 +1000 Subject: Compile with no-webkit - add missing semi-colons. Reviewed-by: Sarah Smith --- tools/assistant/tools/assistant/centralwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index c8f41e4..055fa1c 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -1088,7 +1088,7 @@ CentralWidget::setSourceFromSearch(const QUrl &url) { setSource(url); #if defined(QT_NO_WEBKIT) - highlightSearchTerms() + highlightSearchTerms(); #else connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, SLOT(highlightSearchTerms())); @@ -1100,7 +1100,7 @@ CentralWidget::setSourceFromSearchInNewTab(const QUrl &url) { setSourceInNewTab(url); #if defined(QT_NO_WEBKIT) - highlightSearchTerms() + highlightSearchTerms(); #else connect(currentHelpViewer(), SIGNAL(loadFinished(bool)), this, SLOT(highlightSearchTerms())); -- cgit v0.12 From e08030924344cf8ce22cd399f33c6ff01e1e07ee Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 27 Jan 2010 10:41:48 +0100 Subject: Designer: Add lower/raise to context menu. Task-number: QTCREATORBUG-592 --- tools/designer/src/components/formeditor/formwindow.cpp | 5 +++++ tools/designer/src/components/formeditor/formwindow.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp index 2d013c9..9fd084d 100644 --- a/tools/designer/src/components/formeditor/formwindow.cpp +++ b/tools/designer/src/components/formeditor/formwindow.cpp @@ -2219,6 +2219,11 @@ QMenu *FormWindow::createPopupMenu(QWidget *w) QToolBoxHelper::addToolBoxContextMenuActions(toolBox, popup); } + if (manager->actionLower()->isEnabled()) { + popup->addAction(manager->actionLower()); + popup->addAction(manager->actionRaise()); + popup->addSeparator(); + } popup->addAction(manager->actionCut()); popup->addAction(manager->actionCopy()); } diff --git a/tools/designer/src/components/formeditor/formwindow.h b/tools/designer/src/components/formeditor/formwindow.h index eed7417..3eee476 100644 --- a/tools/designer/src/components/formeditor/formwindow.h +++ b/tools/designer/src/components/formeditor/formwindow.h @@ -278,8 +278,6 @@ private: void checkPreviewGeometry(QRect &r); - void finishContextMenu(QWidget *w, QWidget *menuParent, QContextMenuEvent *e); - bool handleContextMenu(QWidget *widget, QWidget *managedWidget, QContextMenuEvent *e); bool handleMouseButtonDblClickEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e); bool handleMousePressEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e); -- cgit v0.12 From f300f5cfdf3b32e687191b071c30e14ac2721fc8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 27 Jan 2010 17:25:41 +0100 Subject: add directories with sources to list of project roots if the pro file for the translations lives in a sibling tree of the actual source tree, messages from included headers wouldn't have been collected, as they were not considered part of the project. Task-number: QTBUG-7495 --- .../lupdate/testdata/good/from_subdir/lupdatecmd | 1 + .../testdata/good/from_subdir/project.ts.result | 17 ++++++++ .../lupdate/testdata/good/from_subdir/src/main.cpp | 50 ++++++++++++++++++++++ .../lupdate/testdata/good/from_subdir/src/main.h | 45 +++++++++++++++++++ .../good/from_subdir/translations/translations.pro | 7 +++ tools/linguist/lupdate/main.cpp | 15 +++++-- 6 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd create mode 100644 tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h create mode 100644 tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd new file mode 100644 index 0000000..8a5b4ad --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd @@ -0,0 +1 @@ +lupdate translations/translations.pro diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result new file mode 100644 index 0000000..7167cf3 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result @@ -0,0 +1,17 @@ + + + + + QApplication + + + string in main.cpp + + + + + string in main.h + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp new file mode 100644 index 0000000..1a24ab2 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// IMPORTANT!!!! If you want to add testdata to this file, +// always add it to the end in order to not change the linenumbers of translations!!! + +#include "main.h" + +int main(char **argv, int argc) +{ + return QApplication::tr("string in main.cpp"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h new file mode 100644 index 0000000..cc07d7c --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// IMPORTANT!!!! If you want to add testdata to this file, +// always add it to the end in order to not change the linenumbers of translations!!! + +QT_TRANSLATE_NOOP("QApplication", "string in main.h") diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro b/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro new file mode 100644 index 0000000..1815c37 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro @@ -0,0 +1,7 @@ +VPATH = ../src +INCLUDEPATH = ../src + +SOURCES += main.cpp +HEADERS += main.h + +TRANSLATIONS += ../project.ts diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index fd9c696..a50c97a 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -317,9 +317,18 @@ static void processProject( cd.m_codecForSource = codecForSource; cd.m_includePath = visitor.values(QLatin1String("INCLUDEPATH")); QStringList sourceFiles = getSources(visitor, pfi.absolutePath()); - QSet projectRoots; - projectRoots.insert(QDir::cleanPath(pfi.absolutePath()) + QLatin1Char('/')); - cd.m_projectRoots = projectRoots; + QSet sourceDirs; + sourceDirs.insert(QDir::cleanPath(pfi.absolutePath()) + QLatin1Char('/')); + foreach (const QString &sf, sourceFiles) + sourceDirs.insert(sf.left(sf.lastIndexOf(QLatin1Char('/')) + 1)); + QStringList rootList = sourceDirs.toList(); + rootList.sort(); + for (int prev = 0, curr = 1; curr < rootList.length(); ) + if (rootList.at(curr).startsWith(rootList.at(prev))) + rootList.removeAt(curr); + else + prev = curr++; + cd.m_projectRoots = QSet::fromList(rootList); processSources(*fetchedTor, sourceFiles, cd); } } -- cgit v0.12 From 3093340cd24874bf79072d1cb6aaefa3ddc1d939 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 27 Jan 2010 18:15:55 +0100 Subject: Fix QSettings default paths not being initialized when setPath() is called This only coincidently worked on Linux, because it creates a QSettings object to read system settings before any user data was executed, thus initializing the static default path data. However, if only the SystemPath was modified, the UserPath never got initialized on non-Linux platforms, causing settings for the users below $PWD. Also, it removes unncessary checks and mutex locks, which should give a slight speed up. Reviewed-By: dt --- src/corelib/io/qsettings.cpp | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 2c31509..64015ce 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1091,30 +1091,23 @@ static inline int pathHashKey(QSettings::Format format, QSettings::Scope scope) return int((uint(format) << 1) | uint(scope == QSettings::SystemScope)); } -static QString getPath(QSettings::Format format, QSettings::Scope scope) +static void initDefaultPaths(QMutexLocker *locker) { - Q_ASSERT((int)QSettings::NativeFormat == 0); - Q_ASSERT((int)QSettings::IniFormat == 1); - + PathHash *pathHash = pathHashFunc(); QString homePath = QDir::homePath(); QString systemPath; - QMutexLocker locker(globalMutex()); - PathHash *pathHash = pathHashFunc(); - bool loadSystemPath = pathHash->isEmpty(); - locker.unlock(); - - if (loadSystemPath) { - /* - QLibraryInfo::location() uses QSettings, so in order to - avoid a dead-lock, we can't hold the global mutex while - calling it. - */ - systemPath = QLibraryInfo::location(QLibraryInfo::SettingsPath); - systemPath += QLatin1Char('/'); - } + locker->unlock(); + + /* + QLibraryInfo::location() uses QSettings, so in order to + avoid a dead-lock, we can't hold the global mutex while + calling it. + */ + systemPath = QLibraryInfo::location(QLibraryInfo::SettingsPath); + systemPath += QLatin1Char('/'); - locker.relock(); + locker->relock(); if (pathHash->isEmpty()) { /* Lazy initialization of pathHash. We initialize the @@ -1155,6 +1148,17 @@ static QString getPath(QSettings::Format format, QSettings::Scope scope) #endif #endif } +} + +static QString getPath(QSettings::Format format, QSettings::Scope scope) +{ + Q_ASSERT((int)QSettings::NativeFormat == 0); + Q_ASSERT((int)QSettings::IniFormat == 1); + + QMutexLocker locker(globalMutex()); + PathHash *pathHash = pathHashFunc(); + if (pathHash->isEmpty()) + initDefaultPaths(&locker); QString result = pathHash->value(pathHashKey(format, scope)); if (!result.isEmpty()) @@ -3455,6 +3459,8 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) { QMutexLocker locker(globalMutex()); PathHash *pathHash = pathHashFunc(); + if (pathHash->isEmpty()) + initDefaultPaths(&locker); pathHash->insert(pathHashKey(format, scope), path + QDir::separator()); } -- cgit v0.12 From a4538a2532582f4bb1b6e85ed1e125f9c68bb251 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 27 Jan 2010 18:48:26 +0100 Subject: don't falsely complain about mismatched codecfortr normalize the user input first --- .../testdata/good/codecfortr3/expectedoutput.txt | 1 + .../lupdate/testdata/good/codecfortr3/main.cpp | 45 ++++++++++++++++++++++ .../lupdate/testdata/good/codecfortr3/project.pro | 4 ++ .../testdata/good/codecfortr3/project.ts.before | 13 +++++++ .../testdata/good/codecfortr3/project.ts.result | 12 ++++++ .../testdata/good/codecfortr4/expectedoutput.txt | 0 .../lupdate/testdata/good/codecfortr4/main.cpp | 45 ++++++++++++++++++++++ .../lupdate/testdata/good/codecfortr4/project.pro | 4 ++ .../testdata/good/codecfortr4/project.ts.before | 13 +++++++ .../testdata/good/codecfortr4/project.ts.result | 13 +++++++ tools/linguist/lupdate/main.cpp | 26 ++++++------- tools/linguist/shared/translator.h | 1 + 12 files changed, 164 insertions(+), 13 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before create mode 100644 tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt new file mode 100644 index 0000000..feecdda --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt @@ -0,0 +1 @@ +lupdate warning: Codec for tr\(\) 'ISO-8859-1' disagrees with existing file's codec 'UTF-8'\. Expect trouble\. diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp new file mode 100644 index 0000000..e4210c5 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int argc, char **argv) +{ + QObject::tr("hi"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro new file mode 100644 index 0000000..00a4dc4 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro @@ -0,0 +1,4 @@ +SOURCES += main.cpp + +TRANSLATIONS = project.ts +CODECFORTR = latin1 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before new file mode 100644 index 0000000..07ad79b --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before @@ -0,0 +1,13 @@ + + + +UTF-8 + + QObject + + + hi + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result new file mode 100644 index 0000000..b6899c1 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result @@ -0,0 +1,12 @@ + + + + + QObject + + + hi + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp new file mode 100644 index 0000000..e4210c5 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int argc, char **argv) +{ + QObject::tr("hi"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro new file mode 100644 index 0000000..4fddb02 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro @@ -0,0 +1,4 @@ +SOURCES += main.cpp + +TRANSLATIONS = project.ts +CODECFORTR = latin2 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before new file mode 100644 index 0000000..e18e34e --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before @@ -0,0 +1,13 @@ + + + +ISO-8859-2 + + QObject + + + hi + + + + diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result new file mode 100644 index 0000000..e18e34e --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result @@ -0,0 +1,13 @@ + + + +ISO-8859-2 + + QObject + + + hi + + + + diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index a50c97a..b2bfd7c 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -136,7 +136,7 @@ static void printUsage() } static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFileNames, - const QByteArray &codecForTr, const QString &sourceLanguage, const QString &targetLanguage, + bool setCodec, const QString &sourceLanguage, const QString &targetLanguage, UpdateOptions options, bool *fail) { QDir dir; @@ -154,10 +154,10 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil } tor.resolveDuplicates(); cd.clearErrors(); - if (!codecForTr.isEmpty() && codecForTr != tor.codecName()) + if (setCodec && fetchedTor.codec() != tor.codec()) qWarning("lupdate warning: Codec for tr() '%s' disagrees with " "existing file's codec '%s'. Expect trouble.", - codecForTr.constData(), tor.codecName().constData()); + fetchedTor.codecName().constData(), tor.codecName().constData()); if (!targetLanguage.isEmpty() && targetLanguage != tor.languageCode()) qWarning("lupdate warning: Specified target language '%s' disagrees with " "existing file's language '%s'. Ignoring.", @@ -167,8 +167,8 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil "existing file's language '%s'. Ignoring.", qPrintable(sourceLanguage), qPrintable(tor.sourceLanguageCode())); } else { - if (!codecForTr.isEmpty()) - tor.setCodecName(codecForTr); + if (setCodec) + tor.setCodec(fetchedTor.codec()); if (!targetLanguage.isEmpty()) tor.setLanguageCode(targetLanguage); else @@ -190,8 +190,8 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil if (tor.locationsType() == Translator::NoLocations) // Could be set from file theseOptions |= NoLocations; Translator out = merge(tor, fetchedTor, theseOptions, err); - if (!codecForTr.isEmpty()) - out.setCodecName(codecForTr); + if (setCodec) + out.setCodec(fetchedTor.codec()); if ((options & Verbose) && !err.isEmpty()) { printOut(err); @@ -374,17 +374,17 @@ static void processProjects( continue; } Translator tor; - QByteArray codecForTr; + bool setCodec = false; QStringList tmp = visitor.values(QLatin1String("CODEC")) + visitor.values(QLatin1String("DEFAULTCODEC")) + visitor.values(QLatin1String("CODECFORTR")); if (!tmp.isEmpty()) { - codecForTr = tmp.last().toLatin1(); - tor.setCodecName(codecForTr); + tor.setCodecName(tmp.last().toLatin1()); + setCodec = true; } processProject(false, pfi, visitor, options, codecForSource, targetLanguage, sourceLanguage, &tor, fail); - updateTsFiles(tor, tsFiles, codecForTr, sourceLanguage, targetLanguage, options, fail); + updateTsFiles(tor, tsFiles, setCodec, sourceLanguage, targetLanguage, options, fail); continue; } noTrans: @@ -657,7 +657,7 @@ int main(int argc, char **argv) cd.m_allCSources = allCSources; fetchedTor.setCodecName(codecForTr); processSources(fetchedTor, sourceFiles, cd); - updateTsFiles(fetchedTor, tsFileNames, codecForTr, + updateTsFiles(fetchedTor, tsFileNames, !codecForTr.isEmpty(), sourceLanguage, targetLanguage, options, &fail); } else { if (!sourceFiles.isEmpty() || !includePath.isEmpty()) { @@ -669,7 +669,7 @@ int main(int argc, char **argv) fetchedTor.setCodecName(codecForTr); processProjects(true, true, proFiles, options, QByteArray(), targetLanguage, sourceLanguage, &fetchedTor, &fail); - updateTsFiles(fetchedTor, tsFileNames, codecForTr, + updateTsFiles(fetchedTor, tsFileNames, !codecForTr.isEmpty(), sourceLanguage, targetLanguage, options, &fail); } else { processProjects(true, false, proFiles, options, QByteArray(), diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h index 0fcd598..0b88c07 100644 --- a/tools/linguist/shared/translator.h +++ b/tools/linguist/shared/translator.h @@ -153,6 +153,7 @@ public: void reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose); void setCodecName(const QByteArray &name); + void setCodec(QTextCodec *codec) { m_codec = codec; } QByteArray codecName() const; QTextCodec *codec() const { return m_codec; } -- cgit v0.12 From 6b6b206ed8634323570712e003fc159fbf5f8303 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 28 Jan 2010 08:18:34 +1000 Subject: Better support for user-generated binary shaders If the user provided their own shader with glShaderBinary(), QGLShaderProgram::addShader() would refuse to add it because it wasn't marked as "compiled". According to the OpenGL/ES 2.0 specification: "It is permissible to attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled." Based on this, the compile check has been removed from addShader() which should make supporting binary shaders easier. Similarly, link() and programId() have been modified to support applications that use glProgramBinaryOES() to specify program binaries. Task-number: QTBUG-7490 Reviewed-by: Tom Cooksey --- src/opengl/qglshaderprogram.cpp | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 5e2f1f5..79484fa 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -106,6 +106,19 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 2 + \section1 Binary shaders and programs + + Binary shaders may be specified using \c{glShaderBinary()} on + the return value from QGLShader::shaderId(). The QGLShader instance + containing the binary can then be added to the shader program with + addShader() and linked in the usual fashion with link(). + + Binary programs may be specified using \c{glProgramBinaryOES()} + on the return value from programId(). Then the application should + call link(), which will notice that the program has already been + specified and linked, allowing other operations to be performed + on the shader program. + \sa QGLShader */ @@ -632,8 +645,6 @@ bool QGLShaderProgram::addShader(QGLShader *shader) qWarning("QGLShaderProgram::addShader: Program and shader are not associated with same context."); return false; } - if (!shader->d_func()->compiled) - return false; if (!shader->d_func()->shaderGuard.id()) return false; glAttachShader(d->programGuard.id(), shader->d_func()->shaderGuard.id()); @@ -820,8 +831,20 @@ bool QGLShaderProgram::link() GLuint program = d->programGuard.id(); if (!program) return false; + GLint value; + if (d->shaders.isEmpty()) { + // If there are no explicit shaders, then it is possible that the + // application added a program binary with glProgramBinaryOES(), + // or otherwise populated the shaders itself. Check to see if the + // program is already linked and bail out if so. + value = 0; + glGetProgramiv(program, GL_LINK_STATUS, &value); + d->linked = (value != 0); + if (d->linked) + return true; + } glLinkProgram(program); - GLint value = 0; + value = 0; glGetProgramiv(program, GL_LINK_STATUS, &value); d->linked = (value != 0); value = 0; @@ -928,6 +951,15 @@ void QGLShaderProgram::release() GLuint QGLShaderProgram::programId() const { Q_D(const QGLShaderProgram); + GLuint id = d->programGuard.id(); + if (id) + return id; + + // Create the identifier if we don't have one yet. This is for + // applications that want to create the attached shader configuration + // themselves, particularly those using program binaries. + if (!const_cast(this)->init()) + return 0; return d->programGuard.id(); } -- cgit v0.12 From f3604bd0abc1ca0768c565e7753ce8e2fda0f2ba Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 28 Jan 2010 11:39:02 +1000 Subject: Add additional text and painting benchmarks. These benchmarks have been moved in from the kinetic-declarativeui branch as they are not QML specific. --- tests/benchmarks/qpainter/tst_qpainter.cpp | 503 +++++++++++++++++++++++++++++ tests/benchmarks/qtext/main.cpp | 205 ++++++++++++ 2 files changed, 708 insertions(+) diff --git a/tests/benchmarks/qpainter/tst_qpainter.cpp b/tests/benchmarks/qpainter/tst_qpainter.cpp index 7c6634e..39b2244 100644 --- a/tests/benchmarks/qpainter/tst_qpainter.cpp +++ b/tests/benchmarks/qpainter/tst_qpainter.cpp @@ -45,6 +45,10 @@ #include #include #include +#include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif Q_DECLARE_METATYPE(QLine) Q_DECLARE_METATYPE(QRect) @@ -178,6 +182,35 @@ private slots: void clipAndFill_data(); void clipAndFill(); + void drawRoundedRect(); + void drawScaledRoundedRect(); + void drawTransformedRoundedRect(); + + void drawScaledAntialiasedRoundedRect_data(); + void drawTransformedAntialiasedRoundedRect_data(); + void drawAntialiasedRoundedRect(); + void drawScaledAntialiasedRoundedRect(); + void drawTransformedAntialiasedRoundedRect(); + + void drawScaledImageRoundedRect_data(); + void drawTransformedImageRoundedRect_data(); + void drawImageRoundedRect(); + void drawScaledImageRoundedRect(); + void drawTransformedImageRoundedRect(); + + void drawScaledBorderPixmapRoundedRect_data(); + void drawTransformedBorderPixmapRoundedRect_data(); + void drawBorderPixmapRoundedRect(); + void drawScaledBorderPixmapRoundedRect(); + void drawTransformedBorderPixmapRoundedRect(); + + void drawTransformedTransparentImage_data(); + void drawTransformedSemiTransparentImage_data(); + void drawTransformedFilledImage_data(); + void drawTransformedTransparentImage(); + void drawTransformedSemiTransparentImage(); + void drawTransformedFilledImage(); + private: void setupBrushes(); void createPrimitives(); @@ -185,6 +218,8 @@ private: void drawPrimitives_data_helper(bool fancypens); void fillPrimitives_helper(QPainter *painter, PrimitiveType type, PrimitiveSet *s); + QTransform transformForAngle(qreal angle); + QPaintDevice *surface() { return new QPixmap(1024, 1024); @@ -1123,6 +1158,474 @@ void tst_QPainter::clipAndFill() } } +QTransform tst_QPainter::transformForAngle(qreal angle) +{ + const qreal inv_dist_to_plane = 1. / 1024.; + + QTransform transform; + + QTransform rotTrans; + rotTrans.translate(-40, 0); + QTransform rotTrans2; + rotTrans2.translate(40, 0); + + qreal rad = angle * 2. * M_PI / 360.; + qreal c = ::cos(rad); + qreal s = ::sin(rad); + + qreal x = 0; + qreal y = 80; + qreal z = 0; + + qreal len = x * x + y * y + z * z; + if (len != 1.) { + len = ::sqrt(len); + x /= len; + y /= len; + z /= len; + } + + QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*inv_dist_to_plane, + y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*inv_dist_to_plane, + 0, 0, 1); + + transform *= rotTrans; + transform *= rot; + transform *= rotTrans2; + + return transform; +} + +void tst_QPainter::drawRoundedRect() +{ + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); + } +} + +void tst_QPainter::drawScaledRoundedRect() +{ + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + p.scale(3, 3); + + QBENCHMARK { + p.drawRoundedRect(10, 10, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawTransformedRoundedRect() +{ + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawRoundedRect(100, 100, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawAntialiasedRoundedRect() +{ + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); + } +} + +void tst_QPainter::drawScaledAntialiasedRoundedRect_data() +{ + QTest::addColumn("scale"); + + for (float i = 0; i < 3; i += .1) + QTest::newRow(QString(QLatin1String("scale=%1")).arg(i).toLatin1()) << i; +} + +void tst_QPainter::drawScaledAntialiasedRoundedRect() +{ + QFETCH(float, scale); + + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + p.scale(scale, scale); + + QBENCHMARK { + p.drawRoundedRect(10, 10, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawTransformedAntialiasedRoundedRect_data() +{ + QTest::addColumn("transform"); + + for (float angle = 0; angle < 360; angle += 10) + QTest::newRow(QString(QLatin1String("angle=%1")).arg(angle).toLatin1()) << transformForAngle(angle); +} + +void tst_QPainter::drawTransformedAntialiasedRoundedRect() +{ + QFETCH(QTransform, transform); + + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.setWorldTransform(transform); + p.drawRoundedRect(100, 100, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawImageRoundedRect() +{ + //setup image + const int radius = 10; + QImage rectImage(81, 81, QImage::Format_ARGB32_Premultiplied); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.drawImage(0,0, rectImage); + } +} + +void tst_QPainter::drawScaledImageRoundedRect_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawScaledImageRoundedRect() +{ + QFETCH(int, imageType); + + //setup image + const int radius = 10; + QImage rectImage(81, 81, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + p.scale(3, 3); + + QBENCHMARK { + p.drawImage(0,0, rectImage); + } +} + +void tst_QPainter::drawTransformedImageRoundedRect_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedImageRoundedRect() +{ + QFETCH(int, imageType); + + //setup image + const int radius = 10; + QImage rectImage(81, 81, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(100,100, rectImage); + } +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawBorderPixmapRoundedRect() +{ + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, QImage::Format_ARGB32_Premultiplied); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawScaledBorderPixmapRoundedRect_data() +{ + QTest::addColumn("scale"); + QTest::addColumn("imageType"); + + for (float i = 0; i < 3; i += .1) + QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB32_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB32_Premultiplied; + //for (float i = 0; i < 3; i += .1) + // QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied; +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawScaledBorderPixmapRoundedRect() +{ + QFETCH(float, scale); + QFETCH(int, imageType); + + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + p.scale(scale, scale); + + QBENCHMARK { + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawTransformedBorderPixmapRoundedRect_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("imageType"); + + for (float angle = 0; angle < 360; angle += 10) + QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB32_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB32_Premultiplied; + //for (float angle = 0; angle < 360; angle += 10) + // QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB8565_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB8565_Premultiplied; + +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawTransformedBorderPixmapRoundedRect() +{ + QFETCH(QTransform, transform); + QFETCH(int, imageType); + + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(transform); + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawTransformedTransparentImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedTransparentImage() +{ + QFETCH(int, imageType); + + //setup image + QImage transImage(200, 200, (QImage::Format)imageType); + transImage.fill(0); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, transImage); + } +} + +void tst_QPainter::drawTransformedSemiTransparentImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedSemiTransparentImage() +{ + QFETCH(int, imageType); + + //setup image + QImage transImage(200, 200, (QImage::Format)imageType); + transImage.fill(QColor(0,0,0, 128).rgba()); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, transImage); + } +} + +void tst_QPainter::drawTransformedFilledImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedFilledImage() +{ + QFETCH(int, imageType); + + //setup image + QImage filledImage(200, 200, (QImage::Format)imageType); + filledImage.fill(QColor(0,0,0).rgb()); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, filledImage); + } +} QTEST_MAIN(tst_QPainter) diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp index 4bd2bee..9854a9f 100644 --- a/tests/benchmarks/qtext/main.cpp +++ b/tests/benchmarks/qtext/main.cpp @@ -44,7 +44,10 @@ #include #include #include +#include +#include #include +#include #include #include @@ -56,6 +59,7 @@ class tst_QText: public QObject public: tst_QText() { m_lorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."); + m_shortLorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."); } private slots: @@ -69,8 +73,26 @@ private slots: void odfWriting_text(); void odfWriting_images(); + void constructControl(); + void constructDocument(); + + void layout(); + void paintLayoutToPixmap(); + void paintLayoutToPixmap_painterFill(); + + void document(); + void paintDocToPixmap(); + void paintDocToPixmap_painterFill(); + + void control(); + void paintControlToPixmap(); + void paintControlToPixmap_painterFill(); + private: + QSize setupTextLayout(QTextLayout *layout); + QString m_lorem; + QString m_shortLorem; }; void tst_QText::loadHtml_data() @@ -195,6 +217,189 @@ void tst_QText::odfWriting_images() delete doc; } +QSize tst_QText::setupTextLayout(QTextLayout *layout) +{ + bool wrap = true; + int wrapWidth = 300; + layout->setCacheEnabled(true); + + int height = 0; + qreal widthUsed = 0; + qreal lineWidth = 0; + + //set manual width + if (wrap) + lineWidth = wrapWidth; + + layout->beginLayout(); + + while (1) { + QTextLine line = layout->createLine(); + if (!line.isValid()) + break; + + if (wrap) + line.setLineWidth(lineWidth); + } + layout->endLayout(); + + for (int i = 0; i < layout->lineCount(); ++i) { + QTextLine line = layout->lineAt(i); + widthUsed = qMax(widthUsed, line.naturalTextWidth()); + line.setPosition(QPointF(0, height)); + height += int(line.height()); + } + return QSize(qCeil(widthUsed), height); +} + +void tst_QText::constructControl() +{ + QTextControl *control = new QTextControl; + delete control; + + QBENCHMARK { + QTextControl *control = new QTextControl; + delete control; + } +} + +void tst_QText::constructDocument() +{ + QTextDocument *doc = new QTextDocument; + delete doc; + + QBENCHMARK { + QTextDocument *doc = new QTextDocument; + delete doc; + } +} + +void tst_QText::layout() +{ + QTextLayout layout(m_shortLorem); + setupTextLayout(&layout); + + QBENCHMARK { + QTextLayout layout(m_shortLorem); + setupTextLayout(&layout); + } +} + +void tst_QText::paintLayoutToPixmap() +{ + QTextLayout layout(m_shortLorem); + QSize size = setupTextLayout(&layout); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + layout.draw(&p, QPointF(0, 0)); + } +} + +void tst_QText::paintLayoutToPixmap_painterFill() +{ + QTextLayout layout(m_shortLorem); + QSize size = setupTextLayout(&layout); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + layout.draw(&p, QPointF(0, 0)); + } +} + +void tst_QText::document() +{ + QTextDocument *doc = new QTextDocument; + + QBENCHMARK { + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + } +} + +void tst_QText::paintDocToPixmap() +{ + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + doc->drawContents(&p); + } +} + +void tst_QText::paintDocToPixmap_painterFill() +{ + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + doc->drawContents(&p); + } +} + +void tst_QText::control() +{ + QTextControl *control = new QTextControl(m_shortLorem); + + QBENCHMARK { + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + } +} + +void tst_QText::paintControlToPixmap() +{ + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); + } +} + +void tst_QText::paintControlToPixmap_painterFill() +{ + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); + } +} + QTEST_MAIN(tst_QText) #include "main.moc" -- cgit v0.12 From aa854adabedbe5ff95d02c0371ae90d85921061c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 28 Jan 2010 08:48:02 +0100 Subject: doc: Document the "Type" enum value as a const in variable. Task-number: QTBUG-7605 --- doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp | 11 +++++++++++ src/gui/graphicsview/qgraphicsitem.cpp | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp index 483c675..4f27661 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp @@ -260,3 +260,14 @@ class CustomItem : public QGraphicsItem ... }; //! [QGraphicsItem type] + +//! [18] +class QGraphicsPathItem : public QAbstractGraphicsShapeItem +{ + public: + enum { Type = 2 }; + int type() const { return Type; } + ... +}; +//! [18] + diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1ea69fb..b633b41 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -268,6 +268,17 @@ */ /*! + \variable QGraphicsItem::Type + + The type value returned by the virtual type() function in standard + graphics item classes in Qt. All such standard graphics item + classes in Qt are associated with a unique value for Type, + e.g. the value returned by QGraphicsPathItem::type() is 2. + + \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 18 +*/ + +/*! \variable QGraphicsItem::UserType The lowest permitted type value for custom items (subclasses -- cgit v0.12 From 902229bfffd709fb3294ac92180f1b171dc37eb8 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 28 Jan 2010 10:46:01 +0100 Subject: don't build unneeded QtDesigner parts on Windows CE We just build uitools like on Symbian. The following subdirs have been removed from tools/designer/src/src.pro tools/designer/src/lib tools/designer/src/components Reviewed-by: mauricek --- tools/designer/src/src.pro | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/designer/src/src.pro b/tools/designer/src/src.pro index e1710b8..78665b7 100644 --- a/tools/designer/src/src.pro +++ b/tools/designer/src/src.pro @@ -9,6 +9,4 @@ SUBDIRS = \ CONFIG(shared,shared|static):SUBDIRS += plugins -wince*: SUBDIRS -= designer plugins -symbian: SUBDIRS = uitools -contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= lib components \ No newline at end of file +symbian|wince*: SUBDIRS = uitools -- cgit v0.12 From d43178ccaa38b87698e2f5a9fa0f2fb4e5f9f0ad Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Thu, 28 Jan 2010 11:28:53 +0100 Subject: Using RunFast mode for RVCT Now when we detect, by looking into ARMFPU, that either vfpv2 or softvfp+vfpv2 option is used, we will force using "-fpmode = fast" switch as well. This should give not just some performance improvement, but improve execution stability when vfpv2 used. Task-number: QTBUG-4893 Reviewed-by: Jason Barron --- mkspecs/common/symbian/symbian.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index a2933e9..b5d12fb 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -147,3 +147,19 @@ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis MMP_RULES -= PAGED } } + +QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast +# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE = + +symbian { + armfpu = $$find(MMP_RULES, "ARMFPU") + !isEmpty(armfpu) { + vfpv2 = $$find(MMP_RULES, "vfpv2") + !isEmpty(vfpv2) { + # we will respect fpu setting obtained from configure, but, + # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode + QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC} + # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE} + } + } +} -- cgit v0.12 From 297e84fcfed524687455d3d94161bf2a32f62d37 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 28 Jan 2010 11:05:06 +0000 Subject: Update default FPU flags on Symbian to be softvfp+vfpv2 Reviewed-by: Aleksandar Sasha Babic --- configure.exe | Bin 1178112 -> 1178112 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index ed2b0b2..e64af40 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 7751143..8342fbe 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1482,7 +1482,7 @@ void Configure::applySpecSpecifics() dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; dictionary[ "QT_INSTALL_PREFIX" ] = ""; dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; - dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; + dictionary[ "ARM_FPU_TYPE" ] = "softvfp+vfpv2"; dictionary[ "SQL_SQLITE" ] = "yes"; dictionary[ "SQL_SQLITE_LIB" ] = "system"; -- cgit v0.12 From f5c16c649137856b84d769932a9356365f3250f9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 28 Jan 2010 12:21:16 +0100 Subject: doc: Fixed the last qdoc errors. --- src/gui/graphicsview/qgraphicsitem.cpp | 17 +++++++++-------- src/gui/styles/qs60style.cpp | 4 ++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 10d31ea..d9b9416 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1570,17 +1570,18 @@ const QGraphicsObject *QGraphicsItem::toGraphicsObject() const } /*! - Sets this item's parent item to \a parent. If this item already has a - parent, it is first removed from the previous parent. If \a parent is 0, - this item will become a top-level item. + Sets this item's parent item to \a newParent. If this item already + has a parent, it is first removed from the previous parent. If \a + newParent is 0, this item will become a top-level item. - Note that this implicitly adds this graphics item to the scene of - the parent. You should not \l{QGraphicsScene::addItem()}{add} the - item to the scene yourself. + Note that this implicitly adds this graphics item to the scene of + the parent. You should not \l{QGraphicsScene::addItem()}{add} the + item to the scene yourself. - Calling this function on an item that is an ancestor of \a parent have undefined behaviour. + Calling this function on an item that is an ancestor of \a newParent + have undefined behaviour. - \sa parentItem(), childItems() + \sa parentItem(), childItems() */ void QGraphicsItem::setParentItem(QGraphicsItem *newParent) { diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index ecb3242..f657fff 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3166,6 +3166,10 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event) return QStyle::eventFilter(object, event); } +/*! + \internal + Handle the timer \a event. +*/ void QS60Style::timerEvent(QTimerEvent *event) { #ifdef Q_WS_S60 -- cgit v0.12 From 7c2000060bbc152ae32594f3d4dd60bd3351dab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 28 Jan 2010 13:29:54 +0100 Subject: Fixed an endless loop if printing web pages. Entering a page range which is valid, but outside of the printable range would result in an infinite loop. Task-number: QTBUG-6051 Reviewed-by: Simon Hausmann --- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 29bde0d..e4c2afc 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -1369,6 +1369,11 @@ void QWebFrame::print(QPrinter *printer) const // paranoia check fromPage = qMax(1, fromPage); toPage = qMin(printContext.pageCount(), toPage); + if (toPage < fromPage) { + // if the user entered a page range outside the actual number + // of printable pages, just return + return; + } if (printer->pageOrder() == QPrinter::LastPageFirst) { int tmp = fromPage; -- cgit v0.12 From 7060118fe35b358ce6739734d03a285708127b60 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 28 Jan 2010 13:24:01 +0100 Subject: Shortening and fixing previous fix for QTBUG-6371 Shortening: Use much mor code from CommonStyle Fixing: Subtract PM_Layout[Left|Right]Margin from desktop width. This fix is anyways not relly useful. It heals some Ui designs with sizeconstrains which do not fit into mobile screens. But it will fail In following situations: Widget, and a too-long combobox in a horizontal Layout. The combobox would be cropped to Desktop width but the widget(s) left and/or right of the Combobox are not considered. So, that the Ui still is too wide. The correct fix will be for set the size policy of the combobox to something less greedy. Task-number: QTBUG-6371 Reviewed-by: Sami Merila modified: gui/styles/qs60style.cpp --- src/gui/styles/qs60style.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 78279d1..8dfe867 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2400,21 +2400,13 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, break; #ifndef QT_NO_COMBOBOX case CT_ComboBox: - if (const QStyleOptionComboBox *cmb = qstyleoption_cast(opt)) { - const int frameWidth = cmb->frame ? pixelMetric(PM_ComboBoxFrameWidth, opt, widget) * 2 : 0; - const int textMargins = 2*(pixelMetric(PM_FocusFrameHMargin) + 1); - const int smallestExtraWidth = 23; - // QItemDelegate::sizeHint expands the textMargins two times, thus the 2*textMargins... - const int extra = - qMax(smallestExtraWidth, 2*textMargins + pixelMetric(PM_ScrollBarExtent, opt, widget)); - sz = QSize(sz.width() + frameWidth + extra, sz.height() + frameWidth); - int maxScreenWidth = QApplication::desktop()->availableGeometry().size().width(); - if (sz.width() > maxScreenWidth) { - maxScreenWidth = maxScreenWidth - (extra + frameWidth); - sz.setWidth(maxScreenWidth); - } - } - break; + // Fixing Ui design issues with too wide QComboBoxes and greedy SizeHints + // Make sure, that the combobox says within the screen. + const QSize desktopContentSize = QApplication::desktop()->availableGeometry().size() + -QSize(pixelMetric(PM_LayoutLeftMargin) + pixelMetric(PM_LayoutRightMargin), 0); + sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget). + boundedTo(desktopContentSize); + break; #endif default: sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); -- cgit v0.12 From 08c1c9ef6f30706cd574eded656f4d65a1b18db5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 28 Jan 2010 14:06:48 +0200 Subject: Added support for ifdeffing for manufacturer in generated pkg files DEPLOYMENT.manufacturers variable can be used to define manufacturer identifiers. DEPLOYMENT.manufacturers.fail_note variable can be used to define a file that contains the text to be shown in case of failed manufacturer check. Task-number: QTBUG-7695 Reviewed-by: Janne Koskinen --- bin/patch_capabilities.pl | 25 +++++++++++++++++++++- qmake/generators/symbian/symmake.cpp | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 9daa13e..8afe776 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -108,6 +108,8 @@ if (@ARGV) open (NEW_PKG, ">>".$tempPkgFileName); open (PKG, "<".$pkgFileName); + my $manufacturerElseBlock = 0; + # Parse each line. while () { @@ -133,7 +135,28 @@ if (@ARGV) # from depended packages that are also patched and therefore have different UID. if ($line =~ m/^\(0x[0-9|a-f|A-F]*\).*\{.*\}$/) { - $newLine = "" + $newLine = "\n" + } + + # Remove manufacturer ifdef + if ($line =~ m/^.*\(MANUFACTURER\)\=\(.*\).*$/) + { + $newLine = "\n"; + } + + if ($line =~ m/^ELSEIF.*MANUFACTURER$/) + { + $manufacturerElseBlock = 1; + } + + if ($manufacturerElseBlock eq 1) + { + $newLine = "\n"; + } + + if ($line =~ m/^ENDIF.*MANUFACTURER$/) + { + $manufacturerElseBlock = 0; } print NEW_PKG $newLine; diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 20e2d0e..a23ec60 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -94,6 +94,11 @@ #define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename)); +#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt" +#define DEFAULT_MANUFACTURER_NOTE \ + "The package is not supported for devices from this manufacturer. Please try the selfsigned " \ + "version of the package instead." + QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir) { static QString epocRootStr; @@ -354,6 +359,17 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme t << endl; } + // Begin Manufacturer block + if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) { + QString manufacturerStr("IF "); + foreach(QString manufacturer, project->values("DEPLOYMENT.manufacturers")) { + manufacturerStr.append(QString("(MANUFACTURER)=(%1) OR \n ").arg(manufacturer)); + } + // Remove the final OR + manufacturerStr.chop(8); + t << manufacturerStr << endl; + } + // Install paths on the phone *** should be dynamic at some point QString installPathBin = "!:\\sys\\bin"; QString installPathResource = "!:\\resource\\apps"; @@ -428,6 +444,30 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme t << endl; } } + + // Close Manufacturer block + if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) { + QString manufacturerFailNoteFile; + if (project->values("DEPLOYMENT.manufacturers.fail_note").isEmpty()) { + manufacturerFailNoteFile = QString("%1_" MANUFACTURER_NOTE_FILE).arg(uid3); + QFile ft(manufacturerFailNoteFile); + if (ft.open(QIODevice::WriteOnly)) { + generatedFiles << ft.fileName(); + QTextStream t2(&ft); + + t2 << QString(DEFAULT_MANUFACTURER_NOTE) << endl; + } else { + PRINT_FILE_CREATE_ERROR(manufacturerFailNoteFile) + } + } else { + manufacturerFailNoteFile = project->values("DEPLOYMENT.manufacturers.fail_note").join(""); + } + + t << "ELSEIF NOT(0) ; MANUFACTURER" << endl + << "\"" << fileInfo(manufacturerFailNoteFile).absoluteFilePath() << "\"" + << " - \"\", FILETEXT, TEXTEXIT" << endl + << "ENDIF ; MANUFACTURER" << endl; + } } bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStringList& src) -- cgit v0.12 From b4d60000981e298b7e40605a284f2b8b9b18fff5 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 28 Jan 2010 15:38:55 +0100 Subject: Fix header labels on mac with rtl The removed code simply reduces the size of the rect when running with RightToLeft without compensating anywhere else. It seems to be a leftover from a previously removed piece of code. Reviewed-by: richard Task-number: QTBUG-6882 --- src/gui/styles/qmacstyle_mac.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index f4af579..7a680f2 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -4341,8 +4341,6 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, rect.setY(0); rect.setHeight(widget->height()); } - if (opt->direction == Qt::RightToLeft) - rect.adjust(15, 0, -20, 0); } break; case SE_ProgressBarGroove: -- cgit v0.12 From 01952109596f7563b43b12554fda0e4abc9a51ef Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 28 Jan 2010 16:24:08 +0100 Subject: Avoided the loss of preedit text when losing focus on Symbian. It's annoying to lose preedit (e.g. underlined) text everytime a focus switch occurs, especially because it can sometimes happen while inside the FEP menus, such as "Insert symbol". Fixed by committing the text in reset() implementation, rather than discarding it. Task: QTBUG-7439 RevBy: Sami Merila --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 793bcde..e5ab300 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -101,11 +101,7 @@ QCoeFepInputContext::~QCoeFepInputContext() void QCoeFepInputContext::reset() { - commitTemporaryPreeditString(); - - CCoeFep* fep = CCoeEnv::Static()->Fep(); - if (fep) - fep->CancelTransaction(); + commitCurrentString(false); } void QCoeFepInputContext::ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType) @@ -290,7 +286,6 @@ void QCoeFepInputContext::commitTemporaryPreeditString() return; commitCurrentString(false); - m_hasTempPreeditString = false; } void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event) @@ -765,6 +760,7 @@ void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) m_preeditString.clear(); sendEvent(event); + m_hasTempPreeditString = false; m_longPress = 0; if (!triggeredBySymbian) { -- cgit v0.12 From 1a6e9a69235458e55b2e726e51d2797434780384 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 28 Jan 2010 16:46:51 +0100 Subject: Core classes, examples, demos: Some changes from string to char Reviewed-by: Peter Hartmann --- examples/network/network-chat/chatdialog.cpp | 2 +- examples/network/network-chat/client.cpp | 4 ++-- examples/network/network-chat/connection.cpp | 6 +++--- examples/network/network-chat/peermanager.cpp | 2 +- examples/network/qftp/ftpwindow.cpp | 3 ++- examples/network/securesocketclient/sslclient.cpp | 2 +- examples/network/torrent/trackerclient.cpp | 2 +- src/corelib/io/qfsfileengine_unix.cpp | 2 +- src/network/access/qnetworkaccesshttpbackend.cpp | 2 +- src/network/ssl/qsslcertificate.cpp | 4 ++-- 10 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp index d8bcb30..da65270 100644 --- a/examples/network/network-chat/chatdialog.cpp +++ b/examples/network/network-chat/chatdialog.cpp @@ -79,7 +79,7 @@ void ChatDialog::appendMessage(const QString &from, const QString &message) QTextCursor cursor(textEdit->textCursor()); cursor.movePosition(QTextCursor::End); QTextTable *table = cursor.insertTable(1, 2, tableFormat); - table->cellAt(0, 0).firstCursorPosition().insertText("<" + from + "> "); + table->cellAt(0, 0).firstCursorPosition().insertText('<' + from + "> "); table->cellAt(0, 1).firstCursorPosition().insertText(message); QScrollBar *bar = textEdit->verticalScrollBar(); bar->setValue(bar->maximum()); diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp index 2b8725c..f516783 100644 --- a/examples/network/network-chat/client.cpp +++ b/examples/network/network-chat/client.cpp @@ -69,8 +69,8 @@ void Client::sendMessage(const QString &message) QString Client::nickName() const { - return QString(peerManager->userName()) + "@" + QHostInfo::localHostName() - + ":" + QString::number(server.serverPort()); + return QString(peerManager->userName()) + '@' + QHostInfo::localHostName() + + ':' + QString::number(server.serverPort()); } bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp index 1df8a2d..5c636b9 100644 --- a/examples/network/network-chat/connection.cpp +++ b/examples/network/network-chat/connection.cpp @@ -83,7 +83,7 @@ bool Connection::sendMessage(const QString &message) return false; QByteArray msg = message.toUtf8(); - QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg; + QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + ' ' + msg; return write(data) == data.size(); } @@ -118,7 +118,7 @@ void Connection::processReadyRead() return; } - username = QString(buffer) + "@" + peerAddress().toString() + ":" + username = QString(buffer) + '@' + peerAddress().toString() + ':' + QString::number(peerPort()); currentDataType = Undefined; numBytesForCurrentDataType = 0; @@ -162,7 +162,7 @@ void Connection::sendPing() void Connection::sendGreetingMessage() { QByteArray greeting = greetingMessage.toUtf8(); - QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + " " + greeting; + QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + ' ' + greeting; if (write(data) == data.size()) isGreetingMessageSent = true; } diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp index 5ad2dc7..430031b 100644 --- a/examples/network/network-chat/peermanager.cpp +++ b/examples/network/network-chat/peermanager.cpp @@ -61,7 +61,7 @@ PeerManager::PeerManager(Client *client) foreach (QString string, envVariables) { int index = environment.indexOf(QRegExp(string)); if (index != -1) { - QStringList stringList = environment.at(index).split("="); + QStringList stringList = environment.at(index).split('='); if (stringList.size() == 2) { username = stringList.at(1).toUtf8(); break; diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp index ae3a2b6..3fd62f8 100644 --- a/examples/network/qftp/ftpwindow.cpp +++ b/examples/network/qftp/ftpwindow.cpp @@ -324,7 +324,8 @@ void FtpWindow::processItem(QTreeWidgetItem *item, int /*column*/) if (isDirectory.value(name)) { fileList->clear(); isDirectory.clear(); - currentPath += "/" + name; + currentPath += '/'; + currentPath += name; ftp->cd(name); ftp->list(); cdToParentButton->setEnabled(true); diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp index 1422f1c..0d6a581 100644 --- a/examples/network/securesocketclient/sslclient.cpp +++ b/examples/network/securesocketclient/sslclient.cpp @@ -177,7 +177,7 @@ void SslClient::socketReadyRead() void SslClient::sendData() { QString input = form->sessionInput->text(); - appendString(input + "\n"); + appendString(input + '\n'); socket->write(input.toUtf8() + "\r\n"); form->sessionInput->clear(); } diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp index 4f23d54..2397737 100644 --- a/examples/network/torrent/trackerclient.cpp +++ b/examples/network/torrent/trackerclient.cpp @@ -105,7 +105,7 @@ void TrackerClient::fetchPeerList() QString passkey = "?"; if (fullUrl.contains("?passkey")) { passkey = metaInfo.announceUrl().mid(fullUrl.indexOf("?passkey"), -1); - passkey += "&"; + passkey += '&'; } // Percent encode the hash diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 722d6d3..9179485 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -98,7 +98,7 @@ static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QS if (!fileName.isEmpty() && QT_STAT(QFile::encodeName(fileName), &statBuf) == 0 && (statBuf.st_mode & S_IFMT) == S_IFREG) { - mode += "+"; + mode += '+'; } else { mode = "wb+"; } diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index 58123b2..61a95fe 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -753,7 +753,7 @@ void QNetworkAccessHttpBackend::replyHeaderChanged() QByteArray value = rawHeader(it->first); if (!value.isEmpty()) { if (qstricmp(it->first.constData(), "set-cookie") == 0) - value += "\n"; + value += '\n'; else value += ", "; } diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 9a9b1b5..fd647e2 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -634,11 +634,11 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi QByteArray tmp; for (int i = 0; i <= array.size() - 64; i += 64) { tmp += QByteArray::fromRawData(array.data() + i, 64); - tmp += "\n"; + tmp += '\n'; } if (int remainder = array.size() % 64) { tmp += QByteArray::fromRawData(array.data() + array.size() - remainder, remainder); - tmp += "\n"; + tmp += '\n'; } return BEGINCERTSTRING "\n" + tmp + ENDCERTSTRING "\n"; -- cgit v0.12 From dfc530e1dd9040e3a8516108a9973af73d092246 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 28 Jan 2010 16:50:59 +0100 Subject: googlesuggest example: Add newline to end of file Reviewed-by: TrustMe --- examples/network/googlesuggest/googlesuggest.cpp | 3 ++- examples/network/googlesuggest/searchbox.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp index 79bc448..0c85773 100644 --- a/examples/network/googlesuggest/googlesuggest.cpp +++ b/examples/network/googlesuggest/googlesuggest.cpp @@ -231,4 +231,5 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply) networkReply->deleteLater(); } -//! [9] \ No newline at end of file +//! [9] + diff --git a/examples/network/googlesuggest/searchbox.cpp b/examples/network/googlesuggest/searchbox.cpp index 69dc20e..8ef6f00 100644 --- a/examples/network/googlesuggest/searchbox.cpp +++ b/examples/network/googlesuggest/searchbox.cpp @@ -69,4 +69,5 @@ void SearchBox::doSearch() QString url = QString(GSEARCH_URL).arg(text()); QDesktopServices::openUrl(QUrl(url)); } -//! [2] \ No newline at end of file +//! [2] + -- cgit v0.12 From 7d66d263b93164ddc501050d07ddcc198921da8c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 28 Jan 2010 16:58:25 +0100 Subject: Designer: Fix source code scanning issues. Fix spelling errors, foreach()/QString usage, explicit constructors. Reviewed-By: Joerg Bornemann --- .../src/components/formeditor/qdesigner_resource.cpp | 4 ++-- .../components/propertyeditor/designerpropertymanager.h | 2 +- tools/designer/src/designer/qdesigner_actions.cpp | 4 ++-- tools/designer/src/designer/qdesigner_server.cpp | 6 ++---- tools/designer/src/designer/qdesigner_server.h | 2 +- tools/designer/src/lib/shared/actioneditor.cpp | 2 +- tools/designer/src/lib/shared/actionrepository.cpp | 2 +- tools/designer/src/lib/shared/connectionedit_p.h | 2 +- tools/designer/src/lib/shared/filterwidget_p.h | 2 +- tools/designer/src/lib/shared/iconloader.cpp | 2 +- tools/designer/src/lib/shared/iconselector_p.h | 2 +- tools/designer/src/lib/shared/plugindialog.cpp | 4 ++-- tools/designer/src/lib/shared/qdesigner_introspection.cpp | 2 +- .../designer/src/lib/shared/qdesigner_objectinspector_p.h | 2 +- .../designer/src/lib/shared/qdesigner_promotiondialog_p.h | 14 +++++++------- tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h | 2 +- tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 2 +- tools/designer/src/lib/shared/qdesigner_utils_p.h | 8 ++++---- tools/designer/src/lib/shared/qdesigner_widgetbox_p.h | 2 +- tools/designer/src/lib/shared/qtresourceview_p.h | 4 ++-- tools/designer/src/lib/shared/richtexteditor_p.h | 2 +- tools/designer/src/lib/shared/shared_settings.cpp | 2 +- tools/designer/src/lib/shared/textpropertyeditor_p.h | 2 +- tools/designer/src/lib/shared/widgetdatabase_p.h | 6 +++--- tools/designer/src/lib/uilib/abstractformbuilder.cpp | 2 +- tools/designer/src/lib/uilib/formbuilder.cpp | 2 +- tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h | 2 +- tools/designer/src/plugins/activeqt/qdesigneraxwidget.h | 2 +- .../src/plugins/widgets/q3iconview/q3iconview_extrainfo.h | 2 +- .../src/plugins/widgets/q3iconview/q3iconview_plugin.h | 2 +- .../src/plugins/widgets/q3listbox/q3listbox_extrainfo.h | 2 +- .../src/plugins/widgets/q3listbox/q3listbox_plugin.h | 2 +- .../src/plugins/widgets/q3listview/q3listview_extrainfo.h | 2 +- .../src/plugins/widgets/q3listview/q3listview_plugin.h | 2 +- .../src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h | 2 +- .../src/plugins/widgets/q3table/q3table_extrainfo.h | 2 +- .../src/plugins/widgets/q3textedit/q3textedit_extrainfo.h | 2 +- .../src/plugins/widgets/q3textedit/q3textedit_plugin.h | 2 +- .../src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h | 2 +- .../src/plugins/widgets/q3widgets/q3widget_plugins.h | 12 ++++++------ .../src/plugins/widgets/q3wizard/q3wizard_container.h | 2 +- .../src/plugins/widgets/q3wizard/q3wizard_plugin.h | 2 +- tools/shared/findwidget/texteditfindwidget.h | 2 +- tools/shared/fontpanel/fontpanel.cpp | 2 +- tools/shared/qtgradienteditor/qtgradientutils.cpp | 2 +- tools/shared/qttoolbardialog/qttoolbardialog.h | 4 ++-- 46 files changed, 68 insertions(+), 70 deletions(-) diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp index b005e42..b659179 100644 --- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp +++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp @@ -1446,7 +1446,7 @@ void QDesignerResource::applyTabStops(QWidget *widget, DomTabStops *tabStops) return; QList tabOrder; - foreach (QString widgetName, tabStops->elementTabStop()) { + foreach (const QString &widgetName, tabStops->elementTabStop()) { if (QWidget *w = qFindChild(widget, widgetName)) { tabOrder.append(w); } @@ -2418,7 +2418,7 @@ DomResources *QDesignerResource::saveResources(const QStringList &qrcPaths) QList dom_include; if (resourceSet) { const QStringList activePaths = resourceSet->activeQrcPaths(); - foreach (QString path, activePaths) { + foreach (const QString &path, activePaths) { if (qrcPaths.contains(path)) { DomResource *dom_res = new DomResource; QString conv_path = path; diff --git a/tools/designer/src/components/propertyeditor/designerpropertymanager.h b/tools/designer/src/components/propertyeditor/designerpropertymanager.h index 0ec5241..11f900b 100644 --- a/tools/designer/src/components/propertyeditor/designerpropertymanager.h +++ b/tools/designer/src/components/propertyeditor/designerpropertymanager.h @@ -102,7 +102,7 @@ class DesignerPropertyManager : public QtVariantPropertyManager { Q_OBJECT public: - DesignerPropertyManager(QDesignerFormEditorInterface *core, QObject *parent = 0); + explicit DesignerPropertyManager(QDesignerFormEditorInterface *core, QObject *parent = 0); ~DesignerPropertyManager(); virtual QStringList attributes(int propertyType) const; diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp index fbaf461..887ba98 100644 --- a/tools/designer/src/designer/qdesigner_actions.cpp +++ b/tools/designer/src/designer/qdesigner_actions.cpp @@ -580,7 +580,7 @@ bool QDesignerActions::openForm(QWidget *parent) return false; bool atLeastOne = false; - foreach (QString fileName, fileNames) { + foreach (const QString &fileName, fileNames) { if (readInForm(fileName) && !atLeastOne) atLeastOne = true; } @@ -869,7 +869,7 @@ bool QDesignerActions::writeOutForm(QDesignerFormWindowInterface *fw, const QStr if (f.fileName() != fileName) { removeBackup(backupFile); fi.setFile(fileName); - backupFile = QString(); + backupFile.clear(); if (fi.exists()) backupFile = createBackup(fileName); } diff --git a/tools/designer/src/designer/qdesigner_server.cpp b/tools/designer/src/designer/qdesigner_server.cpp index 8016dff..de1532c 100644 --- a/tools/designer/src/designer/qdesigner_server.cpp +++ b/tools/designer/src/designer/qdesigner_server.cpp @@ -83,7 +83,7 @@ void QDesignerServer::sendOpenRequest(int port, const QStringList &files) sSocket->connectToHost(QHostAddress::LocalHost, port); if(sSocket->waitForConnected(3000)) { - foreach(QString file, files) + foreach(const QString &file, files) { QFileInfo fi(file); sSocket->write(fi.absoluteFilePath().toUtf8() + '\n'); @@ -96,9 +96,8 @@ void QDesignerServer::sendOpenRequest(int port, const QStringList &files) void QDesignerServer::readFromClient() { - QString file = QString(); while (m_socket->canReadLine()) { - file = QString::fromUtf8(m_socket->readLine()); + QString file = QString::fromUtf8(m_socket->readLine()); if (!file.isNull()) { file.remove(QLatin1Char('\n')); file.remove(QLatin1Char('\r')); @@ -143,7 +142,6 @@ QDesignerClient::~QDesignerClient() void QDesignerClient::readFromSocket() { - QString file = QString(); while (m_socket->canReadLine()) { QString file = QString::fromUtf8(m_socket->readLine()); if (!file.isNull()) { diff --git a/tools/designer/src/designer/qdesigner_server.h b/tools/designer/src/designer/qdesigner_server.h index 08bce68..d522056 100644 --- a/tools/designer/src/designer/qdesigner_server.h +++ b/tools/designer/src/designer/qdesigner_server.h @@ -53,7 +53,7 @@ class QDesignerServer: public QObject { Q_OBJECT public: - QDesignerServer(QObject *parent = 0); + explicit QDesignerServer(QObject *parent = 0); virtual ~QDesignerServer(); quint16 serverPort() const; diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp index 624b8bb..26ac8a8 100644 --- a/tools/designer/src/lib/shared/actioneditor.cpp +++ b/tools/designer/src/lib/shared/actioneditor.cpp @@ -428,7 +428,7 @@ void ActionEditor::unmanageAction(QAction *action) m_actionView->model()->remove(row); } -// Set an intial property and mark it as changed in the sheet +// Set an initial property and mark it as changed in the sheet static void setInitialProperty(QDesignerPropertySheetExtension *sheet, const QString &name, const QVariant &value) { const int index = sheet->indexOf(name); diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp index 64cf9c4..e3ff2c1 100644 --- a/tools/designer/src/lib/shared/actionrepository.cpp +++ b/tools/designer/src/lib/shared/actionrepository.cpp @@ -244,7 +244,7 @@ QMimeData *ActionModel::mimeData(const QModelIndexList &indexes ) const ActionRepositoryMimeData::ActionList actionList; QSet actions; - foreach (const QModelIndex &index, indexes) + foreach (const QModelIndex &index, indexes) if (QStandardItem *item = itemFromIndex(index)) if (QAction *action = actionOfItem(item)) actions.insert(action); diff --git a/tools/designer/src/lib/shared/connectionedit_p.h b/tools/designer/src/lib/shared/connectionedit_p.h index 4f0148d..37dfe75 100644 --- a/tools/designer/src/lib/shared/connectionedit_p.h +++ b/tools/designer/src/lib/shared/connectionedit_p.h @@ -87,7 +87,7 @@ public: class EndPoint { public: enum Type { Source, Target }; - EndPoint(Connection *_con = 0, Type _type = Source) : con(_con), type(_type) {} + explicit EndPoint(Connection *_con = 0, Type _type = Source) : con(_con), type(_type) {} bool isNull() const { return con == 0; } bool operator == (const EndPoint &other) const { return con == other.con && type == other.type; } bool operator != (const EndPoint &other) const { return !operator == (other); } diff --git a/tools/designer/src/lib/shared/filterwidget_p.h b/tools/designer/src/lib/shared/filterwidget_p.h index fdb199d..025d708 100644 --- a/tools/designer/src/lib/shared/filterwidget_p.h +++ b/tools/designer/src/lib/shared/filterwidget_p.h @@ -66,7 +66,7 @@ class QPushButton; namespace qdesigner_internal { /* A line edit that displays a grayed hintText (like "Type Here to Filter") - * when not focussed and empty. When connecting to the changed signals and + * when not focused and empty. When connecting to the changed signals and * querying text, one has to be aware that the text is set to that hint * text if isShowingHintText() returns true (that is, does not contain * valid user input). This widget should never have initial focus diff --git a/tools/designer/src/lib/shared/iconloader.cpp b/tools/designer/src/lib/shared/iconloader.cpp index 2c97f62..df0bb7e 100644 --- a/tools/designer/src/lib/shared/iconloader.cpp +++ b/tools/designer/src/lib/shared/iconloader.cpp @@ -60,7 +60,7 @@ QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name) #endif << (QString::fromUtf8(":/trolltech/formeditor/images/designer_") + name); - foreach (QString f, candidates) { + foreach (const QString &f, candidates) { if (QFile::exists(f)) return QIcon(f); } diff --git a/tools/designer/src/lib/shared/iconselector_p.h b/tools/designer/src/lib/shared/iconselector_p.h index 63d4ad7..3373f80 100644 --- a/tools/designer/src/lib/shared/iconselector_p.h +++ b/tools/designer/src/lib/shared/iconselector_p.h @@ -76,7 +76,7 @@ class QDESIGNER_SHARED_EXPORT LanguageResourceDialog : public QDialog { Q_OBJECT - LanguageResourceDialog(QDesignerResourceBrowserInterface *rb, QWidget *parent = 0); + explicit LanguageResourceDialog(QDesignerResourceBrowserInterface *rb, QWidget *parent = 0); public: virtual ~LanguageResourceDialog(); diff --git a/tools/designer/src/lib/shared/plugindialog.cpp b/tools/designer/src/lib/shared/plugindialog.cpp index c79dcf2..3e88043 100644 --- a/tools/designer/src/lib/shared/plugindialog.cpp +++ b/tools/designer/src/lib/shared/plugindialog.cpp @@ -105,7 +105,7 @@ void PluginDialog::populateTreeWidget() QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Loaded Plugins")); QFont boldFont = topLevelItem->font(0); - foreach (QString fileName, fileNames) { + foreach (const QString &fileName, fileNames) { QPluginLoader loader(fileName); const QFileInfo fileInfo(fileName); @@ -127,7 +127,7 @@ void PluginDialog::populateTreeWidget() if (!notLoadedPlugins.isEmpty()) { QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Failed Plugins")); const QFont boldFont = topLevelItem->font(0); - foreach (const QString plugin, notLoadedPlugins) { + foreach (const QString &plugin, notLoadedPlugins) { const QString failureReason = pluginManager->failureReason(plugin); QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, plugin, boldFont); setItem(pluginItem, failureReason, failureReason, QString(), QIcon()); diff --git a/tools/designer/src/lib/shared/qdesigner_introspection.cpp b/tools/designer/src/lib/shared/qdesigner_introspection.cpp index 170a111..7bc60d4 100644 --- a/tools/designer/src/lib/shared/qdesigner_introspection.cpp +++ b/tools/designer/src/lib/shared/qdesigner_introspection.cpp @@ -63,7 +63,7 @@ static QStringList byteArrayListToStringList(const QList &l) static inline QString charToQString(const char *c) { if (!c) - return QString::null; + return QString(); return QString::fromUtf8(c); } diff --git a/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h b/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h index 354ef2a..f4b6672 100644 --- a/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h +++ b/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h @@ -85,7 +85,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerObjectInspector: public QDesignerObjectIn { Q_OBJECT public: - QDesignerObjectInspector(QWidget *parent = 0, Qt::WindowFlags flags = 0); + explicit QDesignerObjectInspector(QWidget *parent = 0, Qt::WindowFlags flags = 0); // Select a qobject unmanaged by form window virtual bool selectObject(QObject *o) = 0; diff --git a/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h b/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h index d1e407d..1e63d81 100644 --- a/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h +++ b/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h @@ -80,9 +80,9 @@ namespace qdesigner_internal { class NewPromotedClassPanel : public QGroupBox { Q_OBJECT public: - NewPromotedClassPanel(const QStringList &baseClasses, - int selectedBaseClass = -1, - QWidget *parent = 0); + explicit NewPromotedClassPanel(const QStringList &baseClasses, + int selectedBaseClass = -1, + QWidget *parent = 0); signals: void newPromotedClass(const PromotionParameters &, bool *ok); @@ -114,10 +114,10 @@ namespace qdesigner_internal { public: enum Mode { ModeEdit, ModeEditChooseClass }; - QDesignerPromotionDialog(QDesignerFormEditorInterface *core, - QWidget *parent = 0, - const QString &promotableWidgetClassName = QString(), - QString *promoteTo = 0); + explicit QDesignerPromotionDialog(QDesignerFormEditorInterface *core, + QWidget *parent = 0, + const QString &promotableWidgetClassName = QString(), + QString *promoteTo = 0); // Return an alphabetically ordered list of base class names for adding new classes. static const QStringList &baseClassNames(const QDesignerPromotionInterface *promotion); diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h index c618bd7..cdd53f0 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h +++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h @@ -69,7 +69,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerPropertyEditor: public QDesignerPropertyE { Q_OBJECT public: - QDesignerPropertyEditor(QWidget *parent = 0, Qt::WindowFlags flags = 0); + explicit QDesignerPropertyEditor(QWidget *parent = 0, Qt::WindowFlags flags = 0); // A pair . typedef QPair StringPropertyParameters; diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp index 1cee074..02a2f6d 100644 --- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp +++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp @@ -440,7 +440,7 @@ QAction *ToolBarEventFilter::actionAt(const QToolBar *tb, const QPoint &pos) return tb->actions().at(index); } -//that's a trick to get acces to the initStyleOption which is a protected member +//that's a trick to get access to the initStyleOption which is a protected member class FriendlyToolBar : public QToolBar { public: friend class ToolBarEventFilter; diff --git a/tools/designer/src/lib/shared/qdesigner_utils_p.h b/tools/designer/src/lib/shared/qdesigner_utils_p.h index 502703d..fac0697 100644 --- a/tools/designer/src/lib/shared/qdesigner_utils_p.h +++ b/tools/designer/src/lib/shared/qdesigner_utils_p.h @@ -298,7 +298,7 @@ class QDESIGNER_SHARED_EXPORT DesignerIconCache : public QObject { Q_OBJECT public: - DesignerIconCache(DesignerPixmapCache *pixmapCache, QObject *parent = 0); + explicit DesignerIconCache(DesignerPixmapCache *pixmapCache, QObject *parent = 0); QIcon icon(const PropertySheetIconValue &value) const; void clear(); signals: @@ -313,7 +313,7 @@ private: class QDESIGNER_SHARED_EXPORT PropertySheetStringValue { public: - PropertySheetStringValue(const QString &value = QString(), + explicit PropertySheetStringValue(const QString &value = QString(), bool translatable = true, const QString &disambiguation = QString(), const QString &comment = QString()); @@ -345,11 +345,11 @@ private: class QDESIGNER_SHARED_EXPORT PropertySheetKeySequenceValue { public: - PropertySheetKeySequenceValue(const QKeySequence &value = QKeySequence(), + explicit PropertySheetKeySequenceValue(const QKeySequence &value = QKeySequence(), bool translatable = true, const QString &disambiguation = QString(), const QString &comment = QString()); - PropertySheetKeySequenceValue(const QKeySequence::StandardKey &standardKey, + explicit PropertySheetKeySequenceValue(const QKeySequence::StandardKey &standardKey, bool translatable = true, const QString &disambiguation = QString(), const QString &comment = QString()); diff --git a/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h b/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h index cf944b9..13b7f74 100644 --- a/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h +++ b/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h @@ -70,7 +70,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerWidgetBox : public QDesignerWidgetBoxInte public: enum LoadMode { LoadMerge, LoadReplace, LoadCustomWidgetsOnly }; - QDesignerWidgetBox(QWidget *parent = 0, Qt::WindowFlags flags = 0); + explicit QDesignerWidgetBox(QWidget *parent = 0, Qt::WindowFlags flags = 0); LoadMode loadMode() const; void setLoadMode(LoadMode lm); diff --git a/tools/designer/src/lib/shared/qtresourceview_p.h b/tools/designer/src/lib/shared/qtresourceview_p.h index 26c4754..8da2975 100644 --- a/tools/designer/src/lib/shared/qtresourceview_p.h +++ b/tools/designer/src/lib/shared/qtresourceview_p.h @@ -68,7 +68,7 @@ class QDESIGNER_SHARED_EXPORT QtResourceView : public QWidget { Q_OBJECT public: - QtResourceView(QDesignerFormEditorInterface *core, QWidget *parent = 0); + explicit QtResourceView(QDesignerFormEditorInterface *core, QWidget *parent = 0); ~QtResourceView(); void setDragEnabled(bool dragEnabled); @@ -120,7 +120,7 @@ class QDESIGNER_SHARED_EXPORT QtResourceViewDialog : public QDialog { Q_OBJECT public: - QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0); + explicit QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0); virtual ~QtResourceViewDialog(); QString selectedResource() const; diff --git a/tools/designer/src/lib/shared/richtexteditor_p.h b/tools/designer/src/lib/shared/richtexteditor_p.h index 4157d2c..44023ef 100644 --- a/tools/designer/src/lib/shared/richtexteditor_p.h +++ b/tools/designer/src/lib/shared/richtexteditor_p.h @@ -72,7 +72,7 @@ class QDESIGNER_SHARED_EXPORT RichTextEditorDialog : public QDialog { Q_OBJECT public: - RichTextEditorDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0); + explicit RichTextEditorDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0); ~RichTextEditorDialog(); int showDialog(); diff --git a/tools/designer/src/lib/shared/shared_settings.cpp b/tools/designer/src/lib/shared/shared_settings.cpp index d6fd4bc..281b5c6 100644 --- a/tools/designer/src/lib/shared/shared_settings.cpp +++ b/tools/designer/src/lib/shared/shared_settings.cpp @@ -161,7 +161,7 @@ QStringList QDesignerSharedSettings::additionalFormTemplatePaths() const { // get template paths excluding internal ones QStringList rc = formTemplatePaths(); - foreach (QString internalTemplatePath, defaultFormTemplatePaths()) { + foreach (const QString &internalTemplatePath, defaultFormTemplatePaths()) { const int index = rc.indexOf(internalTemplatePath); if (index != -1) rc.removeAt(index); diff --git a/tools/designer/src/lib/shared/textpropertyeditor_p.h b/tools/designer/src/lib/shared/textpropertyeditor_p.h index 5b913ac..48f7898 100644 --- a/tools/designer/src/lib/shared/textpropertyeditor_p.h +++ b/tools/designer/src/lib/shared/textpropertyeditor_p.h @@ -90,7 +90,7 @@ namespace qdesigner_internal { UpdateOnFinished }; - TextPropertyEditor(QWidget *parent = 0, EmbeddingMode embeddingMode = EmbeddingNone, TextPropertyValidationMode validationMode = ValidationMultiLine); + explicit TextPropertyEditor(QWidget *parent = 0, EmbeddingMode embeddingMode = EmbeddingNone, TextPropertyValidationMode validationMode = ValidationMultiLine); TextPropertyValidationMode textPropertyValidationMode() const { return m_validationMode; } void setTextPropertyValidationMode(TextPropertyValidationMode vm); diff --git a/tools/designer/src/lib/shared/widgetdatabase_p.h b/tools/designer/src/lib/shared/widgetdatabase_p.h index 0e99999..873e79b 100644 --- a/tools/designer/src/lib/shared/widgetdatabase_p.h +++ b/tools/designer/src/lib/shared/widgetdatabase_p.h @@ -74,8 +74,8 @@ namespace qdesigner_internal { class QDESIGNER_SHARED_EXPORT WidgetDataBaseItem: public QDesignerWidgetDataBaseItemInterface { public: - WidgetDataBaseItem(const QString &name = QString(), - const QString &group = QString()); + explicit WidgetDataBaseItem(const QString &name = QString(), + const QString &group = QString()); QString name() const; void setName(const QString &name); @@ -159,7 +159,7 @@ class QDESIGNER_SHARED_EXPORT WidgetDataBase: public QDesignerWidgetDataBaseInte { Q_OBJECT public: - WidgetDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0); + explicit WidgetDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0); virtual ~WidgetDataBase(); virtual QDesignerFormEditorInterface *core() const; diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp index 1d2d6f8..a0c9e83 100644 --- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp @@ -364,7 +364,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge const QStringList zOrderNames = ui_widget->elementZOrder(); if (!zOrderNames.isEmpty()) { QList zOrder = qVariantValue(w->property("_q_zOrder")); - foreach (QString widgetName, zOrderNames) { + foreach (const QString &widgetName, zOrderNames) { if (QWidget *child = qFindChild(w, widgetName)) { if (child->parentWidget() == w) { zOrder.removeAll(child); diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp index cc8483f..c97daac 100644 --- a/tools/designer/src/lib/uilib/formbuilder.cpp +++ b/tools/designer/src/lib/uilib/formbuilder.cpp @@ -494,7 +494,7 @@ void QFormBuilder::updateCustomWidgets() { m_customWidgets.clear(); - foreach (QString path, m_pluginPaths) { + foreach (const QString &path, m_pluginPaths) { const QDir dir(path); const QStringList candidates = dir.entryList(QDir::Files); diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h b/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h index c48449c..9f3c252 100644 --- a/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h +++ b/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h @@ -77,7 +77,7 @@ class QAxWidgetExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - QAxWidgetExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit QAxWidgetExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h b/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h index 1308fe2..50132a6 100644 --- a/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h +++ b/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h @@ -105,7 +105,7 @@ private: class QDesignerAxPluginWidget : public QDesignerAxWidget { - // No Q_OBJECT here! - meta functionality is overriden + // No Q_OBJECT here! - meta functionality is overridden public: explicit QDesignerAxPluginWidget(QWidget *parent); virtual ~QDesignerAxPluginWidget(); diff --git a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h index 49a8a40..4f2b3b2 100644 --- a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h @@ -81,7 +81,7 @@ class Q3IconViewExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3IconViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3IconViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h index 19213d8..e20e344 100644 --- a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h +++ b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h @@ -51,7 +51,7 @@ class Q3IconViewPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3IconViewPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3IconViewPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h index 7e291b6..bfb6738 100644 --- a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h @@ -79,7 +79,7 @@ class Q3ListBoxExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3ListBoxExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3ListBoxExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h index 66002f5..68d6913 100644 --- a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h +++ b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h @@ -51,7 +51,7 @@ class Q3ListBoxPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ListBoxPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ListBoxPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h b/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h index f14f256..e5222ed 100644 --- a/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h @@ -82,7 +82,7 @@ class Q3ListViewExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3ListViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3ListViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h b/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h index 7127a57..f9c82a2 100644 --- a/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h +++ b/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h @@ -51,7 +51,7 @@ class Q3ListViewPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ListViewPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ListViewPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h b/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h index de2a75e..4ac7daa 100644 --- a/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h +++ b/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h @@ -51,7 +51,7 @@ class Q3MainWindowPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3MainWindowPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3MainWindowPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h b/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h index 40222bd..4de8b71 100644 --- a/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h @@ -79,7 +79,7 @@ class Q3TableExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3TableExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3TableExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h index 94f663a..beeaf3b 100644 --- a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h @@ -79,7 +79,7 @@ class Q3TextEditExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3TextEditExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3TextEditExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h index 28e0386..77bfb58 100644 --- a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h +++ b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h @@ -51,7 +51,7 @@ class Q3TextEditPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3TextEditPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3TextEditPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h index f3ed995..22562b1 100644 --- a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h +++ b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h @@ -78,7 +78,7 @@ class Q3ToolBarExtraInfoFactory: public QExtensionFactory { Q_OBJECT public: - Q3ToolBarExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); + explicit Q3ToolBarExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0); protected: virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; diff --git a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h index c79390c..c750cfe 100644 --- a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h +++ b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h @@ -51,7 +51,7 @@ class Q3ButtonGroupPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ButtonGroupPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ButtonGroupPlugin(const QIcon &icon, QObject *parent = 0); virtual ~Q3ButtonGroupPlugin(); virtual QString name() const; @@ -80,7 +80,7 @@ class Q3ComboBoxPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ComboBoxPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ComboBoxPlugin(const QIcon &icon, QObject *parent = 0); virtual ~Q3ComboBoxPlugin(); virtual QString name() const; @@ -109,7 +109,7 @@ class Q3DateEditPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3DateEditPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3DateEditPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; @@ -157,7 +157,7 @@ class Q3FramePlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3FramePlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3FramePlugin(const QIcon &icon, QObject *parent = 0); virtual ~Q3FramePlugin(); virtual QString name() const; @@ -215,7 +215,7 @@ class Q3ProgressBarPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ProgressBarPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ProgressBarPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; @@ -263,7 +263,7 @@ class Q3TimeEditPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3TimeEditPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3TimeEditPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h index 524f3fd..e8cf4fa 100644 --- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h +++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h @@ -59,7 +59,7 @@ class Q3WizardHelper : public QObject { Q_OBJECT public: - Q3WizardHelper(Q3Wizard *wizard); + explicit Q3WizardHelper(Q3Wizard *wizard); private slots: void slotCurrentChanged(); private: diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h index 1837769..c9fff40 100644 --- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h +++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h @@ -51,7 +51,7 @@ class Q3WizardPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3WizardPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3WizardPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/shared/findwidget/texteditfindwidget.h b/tools/shared/findwidget/texteditfindwidget.h index 3034a42..a051f0e 100644 --- a/tools/shared/findwidget/texteditfindwidget.h +++ b/tools/shared/findwidget/texteditfindwidget.h @@ -53,7 +53,7 @@ class TextEditFindWidget : public AbstractFindWidget Q_OBJECT public: - TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); + explicit TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); QTextEdit *textEdit() const { return m_textEdit; } diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp index 0b6f394..ad297df 100644 --- a/tools/shared/fontpanel/fontpanel.cpp +++ b/tools/shared/fontpanel/fontpanel.cpp @@ -217,7 +217,7 @@ void FontPanel::updateFamily(const QString &family) const QString normalStyle = QLatin1String("Normal"); if (hasStyles) { - foreach (QString style, styles) { + foreach (const QString &style, styles) { // try to maintain selection or select 'normal' preferably const int newIndex = m_styleComboBox->count(); m_styleComboBox->addItem(style); diff --git a/tools/shared/qtgradienteditor/qtgradientutils.cpp b/tools/shared/qtgradienteditor/qtgradientutils.cpp index 9fa0324..083ba89 100644 --- a/tools/shared/qtgradienteditor/qtgradientutils.cpp +++ b/tools/shared/qtgradienteditor/qtgradientutils.cpp @@ -395,7 +395,7 @@ static QStringList styleSheetParameters(const QGradient &gradient) static QStringList styleSheetStops(const QGradient &gradient) { QStringList result; - foreach (QGradientStop stop, gradient.stops()) { + foreach (const QGradientStop &stop, gradient.stops()) { const QColor color = stop.second; const QString stopDescription = QLatin1String("stop:") + QString::number(stop.first) + QLatin1String(" rgba(") diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.h b/tools/shared/qttoolbardialog/qttoolbardialog.h index a1c099a..e182368 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.h +++ b/tools/shared/qttoolbardialog/qttoolbardialog.h @@ -68,7 +68,7 @@ class QtToolBarManager : public QObject Q_OBJECT public: - QtToolBarManager(QObject *parent = 0); + explicit QtToolBarManager(QObject *parent = 0); ~QtToolBarManager(); void setMainWindow(QMainWindow *mainWindow); @@ -100,7 +100,7 @@ class QtToolBarDialog : public QDialog Q_OBJECT public: - QtToolBarDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); + explicit QtToolBarDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); ~QtToolBarDialog(); void setToolBarManager(QtToolBarManager *toolBarManager); -- cgit v0.12 From d381bb257f210432725221952d0a295decd56d91 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 28 Jan 2010 17:02:59 +0100 Subject: Fix some foreach usage to use const refs Reviewed-by: joao --- src/network/access/qhttpnetworkheader.cpp | 2 +- src/network/access/qnetworkrequest.cpp | 2 +- src/network/kernel/qnetworkinterface.cpp | 4 ++-- src/network/ssl/qsslsocket.cpp | 2 +- src/network/ssl/qsslsocket_openssl.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp index c2cc69c..669f9cf 100644 --- a/src/network/access/qhttpnetworkheader.cpp +++ b/src/network/access/qhttpnetworkheader.cpp @@ -80,7 +80,7 @@ QByteArray QHttpNetworkHeaderPrivate::headerField(const QByteArray &name, const QByteArray result; bool first = true; - foreach (QByteArray value, allValues) { + foreach (const QByteArray &value, allValues) { if (!first) result += ", "; first = false; diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 6dcd05d..a2bef67 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -649,7 +649,7 @@ static QVariant parseCookieHeader(const QByteArray &raw) { QList result; QList cookieList = raw.split(';'); - foreach (QByteArray cookie, cookieList) { + foreach (const QByteArray &cookie, cookieList) { QList parsed = QNetworkCookie::parseCookies(cookie.trimmed()); if (parsed.count() != 1) return QVariant(); // invalid Cookie: header diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 367e3c4..1115c63 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -541,7 +541,7 @@ QList QNetworkInterface::allInterfaces() { QList > privs = manager()->allInterfaces(); QList result; - foreach (QSharedDataPointer p, privs) { + foreach (const QSharedDataPointer &p, privs) { QNetworkInterface item; item.d = p; result << item; @@ -560,7 +560,7 @@ QList QNetworkInterface::allAddresses() { QList > privs = manager()->allInterfaces(); QList result; - foreach (const QSharedDataPointer p, privs) { + foreach (const QSharedDataPointer &p, privs) { foreach (const QNetworkAddressEntry &entry, p->addressEntries) result += entry.ip(); } diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 6947aa7..9623570 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1109,7 +1109,7 @@ void QSslSocket::setCiphers(const QString &ciphers) { Q_D(QSslSocket); d->configuration.ciphers.clear(); - foreach (QString cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) { + foreach (const QString &cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) { for (int i = 0; i < 3; ++i) { // ### Crude QSslCipher cipher(cipherName, QSsl::SslProtocol(i)); diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 892d330..ce2aee1 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -818,7 +818,7 @@ bool QSslSocketBackendPrivate::startHandshake() QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard); if (!regexp.exactMatch(peerName)) { bool matched = false; - foreach (QString altName, configuration.peerCertificate + foreach (const QString &altName, configuration.peerCertificate .alternateSubjectNames().values(QSsl::DnsEntry)) { regexp.setPattern(altName); if (regexp.exactMatch(peerName)) { -- cgit v0.12 From 0585997b7dbe25ece9f60684171c16206d10d65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 28 Jan 2010 16:34:21 +0100 Subject: Fix a regression: icons with slightly wrong ICO header did not load. Regression was introduced by commit fd9cdaa55da455b90eacec571aeb2c84fa55f7e0. Also fix a completely broken autotest that didn't actually test anything. Task-number: QTBUG-7688 Reviewed-by: Alexis --- src/plugins/imageformats/ico/qicohandler.cpp | 4 ++++ tests/auto/qimagereader/baseline/35floppy.ico | Bin 4286 -> 0 bytes tests/auto/qimagereader/baseline/35floppy.png | Bin 0 -> 329 bytes tests/auto/qimagereader/baseline/connect.png | Bin 0 -> 12943 bytes tests/auto/qimagereader/baseline/kde_favicon.ico | Bin 1150 -> 0 bytes tests/auto/qimagereader/baseline/kde_favicon.png | Bin 0 -> 514 bytes tests/auto/qimagereader/baseline/semitransparent.ico | Bin 9662 -> 0 bytes tests/auto/qimagereader/baseline/semitransparent.png | Bin 0 -> 545 bytes tests/auto/qimagereader/tst_qimagereader.cpp | 13 ++++++++++--- 9 files changed, 14 insertions(+), 3 deletions(-) delete mode 100644 tests/auto/qimagereader/baseline/35floppy.ico create mode 100644 tests/auto/qimagereader/baseline/35floppy.png create mode 100644 tests/auto/qimagereader/baseline/connect.png delete mode 100644 tests/auto/qimagereader/baseline/kde_favicon.ico create mode 100644 tests/auto/qimagereader/baseline/kde_favicon.png delete mode 100644 tests/auto/qimagereader/baseline/semitransparent.ico create mode 100644 tests/auto/qimagereader/baseline/semitransparent.png diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index 4f49476..b2351fa 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -556,7 +556,11 @@ QImage ICOReader::iconAt(int index) else // # colors used icoAttrib.ncolors = header.biClrUsed ? header.biClrUsed : 1 << icoAttrib.nbits; icoAttrib.w = iconEntry.bWidth; + if (icoAttrib.w == 0) + icoAttrib.w = header.biWidth; icoAttrib.h = iconEntry.bHeight; + if (icoAttrib.h == 0) + icoAttrib.h = header.biHeight/2; QImage::Format format = QImage::Format_ARGB32; if (icoAttrib.nbits == 24) diff --git a/tests/auto/qimagereader/baseline/35floppy.ico b/tests/auto/qimagereader/baseline/35floppy.ico deleted file mode 100644 index 59fd37e..0000000 Binary files a/tests/auto/qimagereader/baseline/35floppy.ico and /dev/null differ diff --git a/tests/auto/qimagereader/baseline/35floppy.png b/tests/auto/qimagereader/baseline/35floppy.png new file mode 100644 index 0000000..56b9b44 Binary files /dev/null and b/tests/auto/qimagereader/baseline/35floppy.png differ diff --git a/tests/auto/qimagereader/baseline/connect.png b/tests/auto/qimagereader/baseline/connect.png new file mode 100644 index 0000000..9544bb9 Binary files /dev/null and b/tests/auto/qimagereader/baseline/connect.png differ diff --git a/tests/auto/qimagereader/baseline/kde_favicon.ico b/tests/auto/qimagereader/baseline/kde_favicon.ico deleted file mode 100644 index 15bcdbb..0000000 Binary files a/tests/auto/qimagereader/baseline/kde_favicon.ico and /dev/null differ diff --git a/tests/auto/qimagereader/baseline/kde_favicon.png b/tests/auto/qimagereader/baseline/kde_favicon.png new file mode 100644 index 0000000..e19287b Binary files /dev/null and b/tests/auto/qimagereader/baseline/kde_favicon.png differ diff --git a/tests/auto/qimagereader/baseline/semitransparent.ico b/tests/auto/qimagereader/baseline/semitransparent.ico deleted file mode 100644 index dd23de9..0000000 Binary files a/tests/auto/qimagereader/baseline/semitransparent.ico and /dev/null differ diff --git a/tests/auto/qimagereader/baseline/semitransparent.png b/tests/auto/qimagereader/baseline/semitransparent.png new file mode 100644 index 0000000..a3ad780 Binary files /dev/null and b/tests/auto/qimagereader/baseline/semitransparent.png differ diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 72c5c8b..e7cfe68 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1633,7 +1633,8 @@ void tst_QImageReader::pixelCompareWithBaseline_data() QTest::newRow("floppy (16px,32px - 16 colors)") << "35floppy.ico"; QTest::newRow("semitransparent") << "semitransparent.ico"; - QTest::newRow("slightlybroken") << "kde_favicon.ico"; + QTest::newRow("slightlybrokenBMPHeader") << "kde_favicon.ico"; + QTest::newRow("sightlybrokenIconHeader") << "connect.ico"; } void tst_QImageReader::pixelCompareWithBaseline() @@ -1641,14 +1642,20 @@ void tst_QImageReader::pixelCompareWithBaseline() QFETCH(QString, fileName); QImage icoImg; + const QString inputFileName(QString::fromAscii("images/%1").arg(fileName)); + QFileInfo fi(inputFileName); + // might fail if the plugin does not exist, which is ok. - if (icoImg.load(QString::fromAscii("images/%1").arg(fileName))) { - QString baselineFileName = QString::fromAscii("baseline/%1").arg(fileName); + if (icoImg.load(inputFileName)) { + icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied); + const QString baselineFileName(QString::fromAscii("baseline/%1.png").arg(fi.baseName())); #if 0 icoImg.save(baselineFileName); #else QImage baseImg; QVERIFY(baseImg.load(baselineFileName)); + baseImg = baseImg.convertToFormat(QImage::Format_ARGB32_Premultiplied); + QCOMPARE(int(baseImg.format()), int(icoImg.format())); QCOMPARE(baseImg, icoImg); #endif } -- cgit v0.12 From bc1bf5fa40b56bf2787fbdf10d1612ca5803167e Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 28 Jan 2010 17:16:26 +0100 Subject: Call cheaper clear() instead of assigning new QString() Reviewed-by: joao Reviewed-by: Peter Hartmann --- src/network/kernel/qauthenticator.cpp | 4 ++-- src/network/socket/qlocalserver.cpp | 10 +++++----- src/network/socket/qlocalsocket_tcp.cpp | 10 +++++----- src/network/socket/qlocalsocket_unix.cpp | 14 +++++++------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 193a043..e4023c8 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -270,7 +270,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, break; case Ntlm: // #### extract from header - realm = QString(); + realm.clear(); break; case DigestMd5: { realm = QString::fromLatin1(options.value("realm")); @@ -281,7 +281,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, break; } default: - realm = QString(); + realm.clear(); challenge = QByteArray(); phase = Invalid; } diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp index ede3c89..ef7fc02 100644 --- a/src/network/socket/qlocalserver.cpp +++ b/src/network/socket/qlocalserver.cpp @@ -122,9 +122,9 @@ void QLocalServer::close() qDeleteAll(d->pendingConnections); d->pendingConnections.clear(); d->closeServer(); - d->serverName = QString(); - d->fullServerName = QString(); - d->errorString = QString(); + d->serverName.clear(); + d->fullServerName.clear(); + d->errorString.clear(); d->error = QAbstractSocket::UnknownSocketError; } @@ -226,8 +226,8 @@ bool QLocalServer::listen(const QString &name) } if (!d->listen(name)) { - d->serverName = QString(); - d->fullServerName = QString(); + d->serverName.clear(); + d->fullServerName.clear(); return false; } diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp index 9f574d4..5b5e84f 100644 --- a/src/network/socket/qlocalsocket_tcp.cpp +++ b/src/network/socket/qlocalsocket_tcp.cpp @@ -102,8 +102,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState) switch(newState) { case QAbstractSocket::UnconnectedState: state = QLocalSocket::UnconnectedState; - serverName = QString(); - fullServerName = QString(); + serverName.clear(); + fullServerName.clear(); break; case QAbstractSocket::ConnectingState: state = QLocalSocket::ConnectingState; @@ -218,7 +218,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode) || state() == ConnectingState) return; - d->errorString = QString(); + d->errorString.clear(); d->state = ConnectingState; emit stateChanged(d->state); @@ -333,8 +333,8 @@ void QLocalSocket::close() { Q_D(QLocalSocket); d->tcpSocket->close(); - d->serverName = QString(); - d->fullServerName = QString(); + d->serverName.clear(); + d->fullServerName.clear(); QIODevice::close(); } diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp index 73c2465..1ca11d8 100644 --- a/src/network/socket/qlocalsocket_unix.cpp +++ b/src/network/socket/qlocalsocket_unix.cpp @@ -109,8 +109,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState) switch(newState) { case QAbstractSocket::UnconnectedState: state = QLocalSocket::UnconnectedState; - serverName = QString(); - fullServerName = QString(); + serverName.clear(); + fullServerName.clear(); break; case QAbstractSocket::ConnectingState: state = QLocalSocket::ConnectingState; @@ -225,7 +225,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode) || state() == ConnectingState) return; - d->errorString = QString(); + d->errorString.clear(); d->unixSocket.setSocketState(QAbstractSocket::ConnectingState); d->state = ConnectingState; emit stateChanged(d->state); @@ -341,7 +341,7 @@ void QLocalSocketPrivate::_q_connectToSocket() errorOccurred(QLocalSocket::UnknownSocketError, function); } connectingSocket = -1; - connectingName = QString(); + connectingName.clear(); connectingOpenMode = 0; } @@ -438,10 +438,10 @@ void QLocalSocket::close() if (d->connectingSocket != -1) ::close(d->connectingSocket); d->connectingSocket = -1; - d->connectingName = QString(); + d->connectingName.clear(); d->connectingOpenMode = 0; - d->serverName = QString(); - d->fullServerName = QString(); + d->serverName.clear(); + d->fullServerName.clear(); QIODevice::close(); } -- cgit v0.12 From 1771526b2e13607f9e5e3cef15622f74349f4e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 28 Jan 2010 17:50:49 +0100 Subject: Warn if the plugin seems to not exist instead of simply passing. follow-up to 0585997b7dbe25ece9f60684171c16206d10d65f Task-number: related to QTBUG-7688 Reviewed-by: TRUSTME --- tests/auto/qimagereader/tst_qimagereader.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index e7cfe68..b1a5d26 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1641,10 +1641,16 @@ void tst_QImageReader::pixelCompareWithBaseline() { QFETCH(QString, fileName); + static int enteredCount = 0; // Used for better error diagnostics if something fails. We + static int loadFailCount = 0; // don't know if the reason load() fails is that the plugin + // does not exist or because of a bug in the plugin. But if at + // least one file succeeded we know that the plugin was built. + // The other failures are then real failures. QImage icoImg; const QString inputFileName(QString::fromAscii("images/%1").arg(fileName)); QFileInfo fi(inputFileName); + ++enteredCount; // might fail if the plugin does not exist, which is ok. if (icoImg.load(inputFileName)) { icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied); @@ -1658,6 +1664,13 @@ void tst_QImageReader::pixelCompareWithBaseline() QCOMPARE(int(baseImg.format()), int(icoImg.format())); QCOMPARE(baseImg, icoImg); #endif + } else { + ++loadFailCount; + if (enteredCount != loadFailCount) { + QFAIL("Plugin is built, but some did not load properly"); + } else { + qWarning("loading failed, check if ico plugin is built"); + } } } -- cgit v0.12 From 2ffe2fafcd8ed7c2b6267a016401af86ed57b540 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 28 Jan 2010 18:24:39 +0100 Subject: Doc: Put the correct images with the D-Bus and Embedded Linux sections. Reviewed-by: Trust Me --- doc/src/getting-started/examples.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 6b4ec61..0c18773 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -406,7 +406,7 @@ \clearfloat \section1 \l{D-Bus Examples}{D-Bus} \beginfloatleft - \l{D-Bus Examples}{\inlineimage qt-embedded-examples.png + \l{D-Bus Examples}{\inlineimage dbus-examples.png } \endfloat @@ -416,7 +416,7 @@ \clearfloat \section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux} \beginfloatleft - \l{Qt for Embedded Linux Examples}{\inlineimage dbus-examples.png + \l{Qt for Embedded Linux Examples}{\inlineimage qt-embedded-examples.png } \endfloat -- cgit v0.12 From fefbe54d8c511951da79569770275451199cd877 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 28 Jan 2010 18:20:05 +0100 Subject: Remove left over forward declarations Commit d8ad9ac86dac9489b553e6416329308ae7d823d0 fixing QTBUG-6408 made some of the forward declared classes unnecessary. Task-number: QTBUG-6408 Reviewed-by: Alessandro Portale --- src/gui/text/qfontengine_s60_p.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index ff819e2..4748497 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -58,9 +58,6 @@ #include "qsize.h" #include -class CFbsBitmap; -class CFbsBitmapDevice; -class CFbsBitGc; class CFont; QT_BEGIN_NAMESPACE -- cgit v0.12 From 9c2ee0daafd159058d0804d4fc65a8ef1a4ed852 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 29 Jan 2010 12:46:07 +1000 Subject: Fixed `make test' for xmlpatternsxqts. As far as I can tell, setting lib.file here is unnecessary, and it happens to break `make test'. The reason is that, on the first pass, qmake will generate Makefile.lib; then, when `make' is run, it will generate Makefile, and any additional parameters originally passed to qmake will be omitted. --- tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro index 39267c8..3f49ccc 100644 --- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro +++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs contains(QT_CONFIG,xmlpatterns) { SUBDIRS += lib - !wince*:lib.file = lib/lib.pro test.depends = lib } SUBDIRS += test -- cgit v0.12 From 9e376b07ff206c39af731f112b1e6de28b438e97 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 29 Jan 2010 13:59:36 +1000 Subject: Add QFontMetrics benchmark. --- tests/benchmarks/benchmarks.pro | 1 + tests/benchmarks/qfontmetrics/main.cpp | 112 +++++++++++++++++++++++++ tests/benchmarks/qfontmetrics/qfontmetrics.pro | 5 ++ 3 files changed, 118 insertions(+) create mode 100644 tests/benchmarks/qfontmetrics/main.cpp create mode 100644 tests/benchmarks/qfontmetrics/qfontmetrics.pro diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index 1c78f1f..7a27cc9 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -5,6 +5,7 @@ SUBDIRS = containers-associative \ qbytearray \ qfileinfo \ qfile_vs_qnetworkaccessmanager \ + qfontmetrics \ qhostinfo \ qpainter \ qtestlib-simple events \ diff --git a/tests/benchmarks/qfontmetrics/main.cpp b/tests/benchmarks/qfontmetrics/main.cpp new file mode 100644 index 0000000..d3f85ef --- /dev/null +++ b/tests/benchmarks/qfontmetrics/main.cpp @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include + +//this test benchmarks the once-off (per font configuration) cost +//associated with using QFontMetrics +class tst_QFontMetrics : public QObject +{ + Q_OBJECT +public: + tst_QFontMetrics() {} +private slots: + void fontmetrics_create(); + void fontmetrics_create_once_loaded(); + + void fontmetrics_height(); + void fontmetrics_height_once_loaded(); + +private: + void testQFontMetrics(const QFontMetrics &fm); +}; + +void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm ) +{ + int fontHeight = fm.height(); +} + +void tst_QFontMetrics::fontmetrics_create() +{ + QBENCHMARK { + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + } +} + +void tst_QFontMetrics::fontmetrics_create_once_loaded() +{ + QBENCHMARK { + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + } +} + +void tst_QFontMetrics::fontmetrics_height() +{ + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + + QBENCHMARK { testQFontMetrics(bfm); } +} + +void tst_QFontMetrics::fontmetrics_height_once_loaded() +{ + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + QBENCHMARK { testQFontMetrics(bfm); } +} + +QTEST_MAIN(tst_QFontMetrics) + +#include "main.moc" diff --git a/tests/benchmarks/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/qfontmetrics/qfontmetrics.pro new file mode 100644 index 0000000..b6c7b92 --- /dev/null +++ b/tests/benchmarks/qfontmetrics/qfontmetrics.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_QFontMetrics + +SOURCES += main.cpp -- cgit v0.12 From d98d31ca34a84a03dbac20fbf1dc88c0f8fd93cb Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Fri, 29 Jan 2010 11:41:28 +0100 Subject: Doc fix. No need to put something deprecated if it's not. Reviewed-by:TrustMe --- src/gui/dialogs/qfiledialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 21650bb..089e04a 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -229,11 +229,10 @@ Q_GUI_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook \value ReadOnly Indicates that the model is readonly. \value HideNameFilterDetails Indicates if the is hidden or not. - This value is obsolete and does nothing since Qt 4.5: \value DontUseSheet In previous versions of Qt, the static functions would create a sheet by default if the static function - was given a parent. This is no longer supported in Qt 4.5, The + was given a parent. This is no longer supported and does nothing in Qt 4.5, The static functions will always be an application modal dialog. If you want to use sheets, use QFileDialog::open() instead. -- cgit v0.12 From 36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 29 Jan 2010 10:49:14 +0100 Subject: Carbon: crash problem in QWidgetPrivate::hide_sys The crash occurs because we at one point try to assign a widget that is marked as 'about to be deleted' to a QPointer, after clearguards has been called. The correct fix is to avoid such an assignment in the first place. Task-number: QTBUG-4227 Reviewed-by: Prasanth (cherry picked from commit f842ec12706b70f94ab5f634dc2aa025ba2cf3f2) --- src/gui/kernel/qwidget_mac.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index ebfab21..7396ae3 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3510,6 +3510,8 @@ void QWidgetPrivate::hide_sys() if (!QWidget::mouseGrabber()){ QWidget *enterWidget = QApplication::widgetAt(QCursor::pos()); + if (enterWidget->data->in_destructor) + enterWidget = 0; QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover); qt_mouseover = enterWidget; } -- cgit v0.12 From b9da3c5129b8c24e89db1f349587c6b72bfe5876 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 29 Jan 2010 11:47:02 +0100 Subject: Carbon: crash problem in QWidgetPrivate::hide_sys, v2 See change: f842ec12706. Needed some ekstra checks for the cocoa port as well. Task-number: QTBUG-4227 Reviewed-by: Prasanth (cherry picked from commit ebf9c943b789bb4ce1e1222ed17cc37bd0b1f1fe) --- src/gui/kernel/qcocoaview_mac.mm | 2 ++ src/gui/kernel/qwidget_mac.mm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index f61d2fe..d255604 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -644,6 +644,8 @@ extern "C" { - (void)mouseEntered:(NSEvent *)event { + if (qwidgetprivate->data.in_destructor) + return; QEvent enterEvent(QEvent::Enter); NSPoint windowPoint = [event locationInWindow]; NSPoint globalPoint = [[event window] convertBaseToScreen:windowPoint]; diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 7396ae3..78c1562 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3510,7 +3510,7 @@ void QWidgetPrivate::hide_sys() if (!QWidget::mouseGrabber()){ QWidget *enterWidget = QApplication::widgetAt(QCursor::pos()); - if (enterWidget->data->in_destructor) + if (enterWidget && enterWidget->data->in_destructor) enterWidget = 0; QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover); qt_mouseover = enterWidget; -- cgit v0.12 From ecd6cdbe4389de8cf8cc65a09050b257ff921686 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 29 Jan 2010 14:28:34 +0100 Subject: Fix autotest memory leak --- tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 2aeabf0..ef960d0 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -2907,7 +2907,7 @@ void tst_QScriptValue::equals() QScriptValue qobj1 = eng.newQObject(this); QScriptValue qobj2 = eng.newQObject(this); QScriptValue qobj3 = eng.newQObject(0); - QScriptValue qobj4 = eng.newQObject(new QObject()); + QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership); QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers -- cgit v0.12 From 4919286e4e9de496514f28432a81deb91d530fd1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 29 Jan 2010 14:59:39 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ca7b2e1e1ca558050cf49dd8f7c9b35e4b9d4df5 ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-01-28 Trond Kjernåsen Reviewed by Simon Hausmann. [Qt] Fix for endless print loop when printing web pages * Api/qwebframe.cpp: (QWebFrame::print): 2010-01-26 Simon Hausmann Reviewed by Kenneth Rohde Christiansen. [Qt] Show comboboxes on Maemo 5 https://bugs.webkit.org/show_bug.cgi?id=34088 Don't try to show the combobox by simulating a mouse event from QCursor::pos() to get the combobox position right. The position on Maemo 5 is independent from the mouse and there's no QCursor::pos(). * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopup::show): 2010-01-26 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] JavaScript prompt is currently broken https://bugs.webkit.org/show_bug.cgi?id=30914 In r52152 a patch was landed to convert a null QString to an empty WebCore::String in case the prompt was accepted but the default implementation returned the null QString. The patch tried to avoid assign to result twice and was not checking the QString if it is null but the default value. This lead to always returning an empty string on successful prompts. Fix it by checking the variable 'x' for isNull. The manual test case used didn't cover the case of non empty input, replace it with an automatic test case that should cover all cases. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug. * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case (JSPromptPage::JSPromptPage): (JSPromptPage::javaScriptPrompt): (tst_QWebPage::testJSPrompt): --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 44 ++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 22 +------ .../webkit/WebCore/generated/JSDOMWindow.h | 3 - .../webkit/WebCore/platform/ScrollView.cpp | 10 +--- src/3rdparty/webkit/WebCore/platform/ScrollView.h | 10 ---- .../webkit/WebCore/platform/qt/QWebPopup.cpp | 7 +++ .../webkit/WebCore/platform/qt/ScrollViewQt.cpp | 13 ---- .../webkit/WebCore/plugins/qt/PluginViewQt.cpp | 7 ++- src/3rdparty/webkit/WebKit/qt/ChangeLog | 51 ++++++++++++++++ .../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 2 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 69 ++++++++++++++++++++++ 13 files changed, 183 insertions(+), 59 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 221c020..128df75 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1 + ca7b2e1e1ca558050cf49dd8f7c9b35e4b9d4df5 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index fd5606b..40a2149 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,47 @@ +2010-01-14 Andreas Kling + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable scrolling optimization for pages with embedded widgets + + https://bugs.webkit.org/show_bug.cgi?id=33373 + + Added a basic manual test for scrolling of embedded QWidgets. + + * manual-tests/qt/qtplugin-scrolling.html: Added. + * platform/ScrollView.cpp: + (WebCore::ScrollView::scrollContents): + (WebCore::ScrollView::setParent): + * platform/ScrollView.h: + * platform/qt/ScrollViewQt.cpp: + (WebCore::ScrollView::platformInit): + (WebCore::ScrollView::platformAddChild): + (WebCore::ScrollView::platformRemoveChild): + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::updatePluginWidget): + (WebCore::PluginView::invalidateRect): + +2010-01-29 Laszlo Gombos + + Reviewed by Simon Hausmann. + + [Qt] Turn off websocket support by default for Qt 4.6.x + https://bugs.webkit.org/show_bug.cgi?id=34284 + + * WebCore.pro: + +2010-01-26 Holger Hans Peter Freyther + + Reviewed by Simon Hausmann. + + [Qt] JavaScript prompt is currently broken. + https://bugs.webkit.org/show_bug.cgi?id=30914 + + Remove the manual test case in favor of an automated + test case in WebKit/qt/tests/qwebpage. + + * manual-tests/qt/java-script-prompt.html: Removed. + 2010-01-25 Janne Koskinen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index bf4d6f9..f364d3b 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -186,7 +186,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) { } # Web Socket support. -!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1 +!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=0 # XSLT support with QtXmlPatterns !contains(DEFINES, ENABLE_XSLT=.) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp index 12edc42..d270e37 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp @@ -216,7 +216,6 @@ #include "JSWebKitCSSTransformValue.h" #include "JSWebKitPoint.h" #include "JSWebKitTransitionEvent.h" -#include "JSWebSocket.h" #include "JSWheelEvent.h" #include "JSWorker.h" #include "JSXMLHttpRequest.h" @@ -247,7 +246,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow); /* Hash table */ -static const HashTableValue JSDOMWindowTableValues[297] = +static const HashTableValue JSDOMWindowTableValues[296] = { { "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 }, { "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 }, @@ -540,7 +539,6 @@ static const HashTableValue JSDOMWindowTableValues[297] = { "MessageChannel", DontDelete, (intptr_t)jsDOMWindowMessageChannelConstructor, (intptr_t)setJSDOMWindowMessageChannelConstructor }, { "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor }, { "SharedWorker", DontDelete, (intptr_t)jsDOMWindowSharedWorkerConstructor, (intptr_t)setJSDOMWindowSharedWorkerConstructor }, - { "WebSocket", DontDelete, (intptr_t)jsDOMWindowWebSocketConstructor, (intptr_t)setJSDOMWindowWebSocketConstructor }, { "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor }, { "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor }, { "MimeType", DontDelete, (intptr_t)jsDOMWindowMimeTypeConstructor, (intptr_t)setJSDOMWindowMimeTypeConstructor }, @@ -588,7 +586,7 @@ static JSC_CONST_HASHTABLE HashTable JSDOMWindowTable = #if ENABLE(PERFECT_HASH_SIZE) { 65535, JSDOMWindowTableValues, 0 }; #else - { 1068, 1023, JSDOMWindowTableValues, 0 }; + { 1067, 1023, JSDOMWindowTableValues, 0 }; #endif /* Hash table for prototype */ @@ -3275,14 +3273,6 @@ JSValue jsDOMWindowSharedWorkerConstructor(ExecState* exec, const Identifier&, c return castedThis->sharedWorker(exec); } -JSValue jsDOMWindowWebSocketConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - JSDOMWindow* castedThis = static_cast(asObject(slot.slotBase())); - if (!castedThis->allowsAccessFrom(exec)) - return jsUndefined(); - return castedThis->webSocket(exec); -} - JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSDOMWindow* castedThis = static_cast(asObject(slot.slotBase())); @@ -5678,14 +5668,6 @@ void setJSDOMWindowSharedWorkerConstructor(ExecState* exec, JSObject* thisObject static_cast(thisObject)->putDirect(Identifier(exec, "SharedWorker"), value); } -void setJSDOMWindowWebSocketConstructor(ExecState* exec, JSObject* thisObject, JSValue value) -{ - if (!static_cast(thisObject)->allowsAccessFrom(exec)) - return; - // Shadowing a built-in constructor - static_cast(thisObject)->putDirect(Identifier(exec, "WebSocket"), value); -} - void setJSDOMWindowPluginConstructor(ExecState* exec, JSObject* thisObject, JSValue value) { if (!static_cast(thisObject)->allowsAccessFrom(exec)) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h index afc8106..5a087e7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h @@ -82,7 +82,6 @@ public: JSC::JSValue messageChannel(JSC::ExecState*) const; JSC::JSValue worker(JSC::ExecState*) const; JSC::JSValue sharedWorker(JSC::ExecState*) const; - JSC::JSValue webSocket(JSC::ExecState*) const; JSC::JSValue audio(JSC::ExecState*) const; // Custom functions @@ -679,8 +678,6 @@ JSC::JSValue jsDOMWindowWorkerConstructor(JSC::ExecState*, const JSC::Identifier void setJSDOMWindowWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowSharedWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowSharedWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); -JSC::JSValue jsDOMWindowWebSocketConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); -void setJSDOMWindowWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowPluginConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowPluginArrayConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp index ee8726a..e67daf9 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp +++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp @@ -507,7 +507,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta) hostWindow()->repaint(panScrollIconDirtyRect, true); } - if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window + if (canBlitOnScroll()) { // The main frame can just blit the WebView window // FIXME: Find a way to blit subframes without blitting overlapping content hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect); } else { @@ -597,14 +597,6 @@ void ScrollView::setParent(ScrollView* parentView) if (m_scrollbarsAvoidingResizer && parent()) parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer); -#if PLATFORM(QT) - if (m_widgetsPreventingBlitting && parent()) - parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting); - - if (m_widgetsPreventingBlitting && parentView) - parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting); -#endif - Widget::setParent(parentView); if (m_scrollbarsAvoidingResizer && parent()) diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h index 1950a54..5dacff5 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h +++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h @@ -305,16 +305,6 @@ private: NSScrollView* scrollView() const; #endif -#if PLATFORM(QT) -public: - void adjustWidgetsPreventingBlittingCount(int delta); -private: - bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; } - unsigned m_widgetsPreventingBlitting; -#else - bool rootPreventsBlitting() const { return false; } -#endif - #if PLATFORM(GTK) public: void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp index f7ebbc7..f6a8167 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp @@ -44,9 +44,16 @@ QWebPopup::QWebPopup(PopupMenuClient* client) void QWebPopup::exec() { + // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates + // as comboboxes with Qt on Maemo 5 come up in their full width on the screen. + // On the other platforms it's okay to use QCursor::pos(). +#if defined(Q_WS_MAEMO_5) + showPopup(); +#else QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); QCoreApplication::sendEvent(this, &event); +#endif } void QWebPopup::showPopup() diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp index ccbd751..17ad253 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp @@ -36,32 +36,19 @@ namespace WebCore { void ScrollView::platformInit() { - m_widgetsPreventingBlitting = 0; } void ScrollView::platformDestroy() { } -// Windowed plugins are using native windows and are thus preventing -// us from doing any kind of scrolling optimization. - -void ScrollView::adjustWidgetsPreventingBlittingCount(int delta) -{ - m_widgetsPreventingBlitting += delta; - if (parent()) - parent()->adjustWidgetsPreventingBlittingCount(delta); -} - void ScrollView::platformAddChild(Widget*) { - adjustWidgetsPreventingBlittingCount(1); } void ScrollView::platformRemoveChild(Widget* child) { child->hide(); - adjustWidgetsPreventingBlittingCount(-1); } } diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp index e61736b..476ab8a 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp @@ -126,6 +126,10 @@ void PluginView::updatePluginWidget() // scroll, we need to move/resize immediately. if (!m_windowRect.intersects(frameView->frameRect())) setNPWindowIfNeeded(); + + // Make sure we get repainted afterwards. This is necessary for downward + // scrolling to move the plugin widget properly. + invalidate(); } void PluginView::setFocus() @@ -657,7 +661,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value) void PluginView::invalidateRect(const IntRect& rect) { if (m_isWindowed) { - platformWidget()->update(rect); + if (platformWidget()) + platformWidget()->update(rect); return; } diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 09acd47..697570f 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,54 @@ +2010-01-28 Trond Kjernåsen + + Reviewed by Simon Hausmann. + + [Qt] Fix for endless print loop when printing web pages + + * Api/qwebframe.cpp: + (QWebFrame::print): + +2010-01-26 Simon Hausmann + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Show comboboxes on Maemo 5 + https://bugs.webkit.org/show_bug.cgi?id=34088 + + Don't try to show the combobox by simulating a mouse event from QCursor::pos() to + get the combobox position right. The position on Maemo 5 is independent from the mouse + and there's no QCursor::pos(). + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + +2010-01-26 Holger Hans Peter Freyther + + Reviewed by Simon Hausmann. + + [Qt] JavaScript prompt is currently broken + https://bugs.webkit.org/show_bug.cgi?id=30914 + + In r52152 a patch was landed to convert a null QString + to an empty WebCore::String in case the prompt was accepted + but the default implementation returned the null QString. + + The patch tried to avoid assign to result twice and + was not checking the QString if it is null but the default + value. This lead to always returning an empty string on + successful prompts. Fix it by checking the variable 'x' + for isNull. + + The manual test case used didn't cover the case of non + empty input, replace it with an automatic test case that + should cover all cases. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug. + * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case + (JSPromptPage::JSPromptPage): + (JSPromptPage::javaScriptPrompt): + (tst_QWebPage::testJSPrompt): + 2010-01-25 Janne Koskinen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index c5d2792..0c5df4a 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -281,7 +281,7 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914. - if (rc && result.isNull()) + if (rc && x.isNull()) result = String(""); else result = x; diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index ee1969d..0e04acc 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -1,6 +1,7 @@ /* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2009 Girish Ramakrishnan + Copyright (C) 2010 Holger Hans Peter Freyther This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -154,6 +155,7 @@ private slots: void screenshot(); void originatingObjectInNetworkRequests(); + void testJSPrompt(); private: QWebView* m_view; @@ -1781,5 +1783,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests() #endif } +/** + * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914 + * + * From JS we test the following conditions. + * + * OK + QString() => SUCCESS, empty string (but not null) + * OK + "text" => SUCCESS, "text" + * CANCEL + QString() => CANCEL, null string + * CANCEL + "text" => CANCEL, null string + */ +class JSPromptPage : public QWebPage { + Q_OBJECT +public: + JSPromptPage() + {} + + bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result) + { + if (msg == QLatin1String("test1")) { + *result = QString(); + return true; + } else if (msg == QLatin1String("test2")) { + *result = QLatin1String("text"); + return true; + } else if (msg == QLatin1String("test3")) { + *result = QString(); + return false; + } else if (msg == QLatin1String("test4")) { + *result = QLatin1String("text"); + return false; + } + + qFatal("Unknown msg."); + return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result); + } +}; + +void tst_QWebPage::testJSPrompt() +{ + JSPromptPage page; + bool res; + + // OK + QString() + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test1');" + "retval=='' && retval.length == 0;").toBool(); + QVERIFY(res); + + // OK + "text" + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test2');" + "retval=='text' && retval.length == 4;").toBool(); + QVERIFY(res); + + // Cancel + QString() + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test3');" + "retval===null;").toBool(); + QVERIFY(res); + + // Cancel + "text" + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test4');" + "retval===null;").toBool(); + QVERIFY(res); +} + QTEST_MAIN(tst_QWebPage) #include "tst_qwebpage.moc" -- cgit v0.12 From 9e95ce2a68ef167e17dccc5789cbf3bf74712280 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 29 Jan 2010 11:39:06 +0100 Subject: Fix GL texture leaks when pixmaps are deleted This fixes quite a lot of issues: * QtOpenGL only registered qpixmap destruction hooks on X11 and those only cleanup the EGL/GLX surface, not the texture object. * The QPixmap destruction hooks were only being called from the QPixmap destructor. However, this means when a QPixmap is assigned to another QPixmap, the hooks don't get called. Task-number: QTBUG-7647 Reviewed-By: Samuel Reviewed-By: Trond --- src/gui/image/qimagepixmapcleanuphooks.cpp | 20 +-- src/gui/image/qimagepixmapcleanuphooks_p.h | 23 +-- src/gui/image/qpixmap.cpp | 12 +- src/gui/image/qpixmap_x11.cpp | 7 + src/gui/image/qpixmapdata.cpp | 11 ++ src/gui/image/qpixmapdata_p.h | 8 + src/opengl/qgl.cpp | 32 ++-- src/opengl/qgl_p.h | 9 +- src/opengl/qglpixmapfilter.cpp | 22 +-- tests/auto/qgl/qgl.pro | 4 +- tests/auto/qgl/qgl.qrc | 5 + tests/auto/qgl/tst_qgl.cpp | 240 +++++++++++++++++++++++++++++ 12 files changed, 326 insertions(+), 67 deletions(-) create mode 100644 tests/auto/qgl/qgl.qrc diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index 61d538f..ace4bb6 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -62,12 +62,12 @@ QImagePixmapCleanupHooks *QImagePixmapCleanupHooks::instance() return qt_image_and_pixmap_cleanup_hooks(); } -void QImagePixmapCleanupHooks::addPixmapModificationHook(_qt_pixmap_cleanup_hook_pm hook) +void QImagePixmapCleanupHooks::addPixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd hook) { pixmapModificationHooks.append(hook); } -void QImagePixmapCleanupHooks::addPixmapDestructionHook(_qt_pixmap_cleanup_hook_pm hook) +void QImagePixmapCleanupHooks::addPixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd hook) { pixmapDestructionHooks.append(hook); } @@ -78,12 +78,12 @@ void QImagePixmapCleanupHooks::addImageHook(_qt_image_cleanup_hook_64 hook) imageHooks.append(hook); } -void QImagePixmapCleanupHooks::removePixmapModificationHook(_qt_pixmap_cleanup_hook_pm hook) +void QImagePixmapCleanupHooks::removePixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd hook) { pixmapModificationHooks.removeAll(hook); } -void QImagePixmapCleanupHooks::removePixmapDestructionHook(_qt_pixmap_cleanup_hook_pm hook) +void QImagePixmapCleanupHooks::removePixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd hook) { pixmapDestructionHooks.removeAll(hook); } @@ -93,24 +93,24 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook) imageHooks.removeAll(hook); } -void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) +void QImagePixmapCleanupHooks::executePixmapDataModificationHooks(QPixmapData* pmd) { QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) - h->pixmapModificationHooks[i](pm); + h->pixmapModificationHooks[i](pmd); if (qt_pixmap_cleanup_hook_64) - qt_pixmap_cleanup_hook_64(pm->cacheKey()); + qt_pixmap_cleanup_hook_64(pmd->cacheKey()); } -void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) +void QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(QPixmapData* pmd) { QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); for (int i = 0; i < h->pixmapDestructionHooks.count(); ++i) - h->pixmapDestructionHooks[i](pm); + h->pixmapDestructionHooks[i](pmd); if (qt_pixmap_cleanup_hook_64) - qt_pixmap_cleanup_hook_64(pm->cacheKey()); + qt_pixmap_cleanup_hook_64(pmd->cacheKey()); } void QImagePixmapCleanupHooks::executeImageHooks(qint64 key) diff --git a/src/gui/image/qimagepixmapcleanuphooks_p.h b/src/gui/image/qimagepixmapcleanuphooks_p.h index 7176044..88dd3a6 100644 --- a/src/gui/image/qimagepixmapcleanuphooks_p.h +++ b/src/gui/image/qimagepixmapcleanuphooks_p.h @@ -58,7 +58,8 @@ QT_BEGIN_NAMESPACE typedef void (*_qt_image_cleanup_hook_64)(qint64); -typedef void (*_qt_pixmap_cleanup_hook_pm)(QPixmap*); +typedef void (*_qt_pixmap_cleanup_hook_pmd)(QPixmapData*); + class QImagePixmapCleanupHooks; @@ -71,27 +72,27 @@ public: static void enableCleanupHooks(const QPixmap &pixmap); static void enableCleanupHooks(QPixmapData *pixmapData); - // Gets called when a pixmap is about to be modified: - void addPixmapModificationHook(_qt_pixmap_cleanup_hook_pm); + // Gets called when a pixmap data is about to be modified: + void addPixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd); - // Gets called when a pixmap is about to be destroyed: - void addPixmapDestructionHook(_qt_pixmap_cleanup_hook_pm); + // Gets called when a pixmap data is about to be destroyed: + void addPixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd); // Gets called when an image is about to be modified or destroyed: void addImageHook(_qt_image_cleanup_hook_64); - void removePixmapModificationHook(_qt_pixmap_cleanup_hook_pm); - void removePixmapDestructionHook(_qt_pixmap_cleanup_hook_pm); + void removePixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd); + void removePixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd); void removeImageHook(_qt_image_cleanup_hook_64); - static void executePixmapModificationHooks(QPixmap*); - static void executePixmapDestructionHooks(QPixmap*); + static void executePixmapDataModificationHooks(QPixmapData*); + static void executePixmapDataDestructionHooks(QPixmapData*); static void executeImageHooks(qint64 key); private: QList<_qt_image_cleanup_hook_64> imageHooks; - QList<_qt_pixmap_cleanup_hook_pm> pixmapModificationHooks; - QList<_qt_pixmap_cleanup_hook_pm> pixmapDestructionHooks; + QList<_qt_pixmap_cleanup_hook_pmd> pixmapModificationHooks; + QList<_qt_pixmap_cleanup_hook_pmd> pixmapDestructionHooks; }; QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index f823fdc..d1e5c40 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -320,8 +320,6 @@ QPixmap::QPixmap(const char * const xpm[]) QPixmap::~QPixmap() { Q_ASSERT(!data || data->ref >= 1); // Catch if ref-counting changes again - if (data && data->is_cached && data->ref == 1) // ref will be decrememnted after destructor returns - QImagePixmapCleanupHooks::executePixmapDestructionHooks(this); } /*! @@ -1025,12 +1023,8 @@ qint64 QPixmap::cacheKey() const if (isNull()) return 0; - int classKey = data->classId(); - if (classKey >= 1024) - classKey = -(classKey >> 10); - return ((((qint64) classKey) << 56) - | (((qint64) data->serialNumber()) << 32) - | ((qint64) (data->detach_no))); + Q_ASSERT(data); + return data->cacheKey(); } static void sendResizeEvents(QWidget *target) @@ -1943,7 +1937,7 @@ void QPixmap::detach() } if (data->is_cached && data->ref == 1) - QImagePixmapCleanupHooks::executePixmapModificationHooks(this); + QImagePixmapCleanupHooks::executePixmapDataModificationHooks(data.data()); #if defined(Q_WS_MAC) QMacPixmapData *macData = id == QPixmapData::MacClass ? static_cast(data.data()) : 0; diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 0e66e09..169a2ec 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -68,6 +68,7 @@ #include "qx11info_x11.h" #include #include +#include #include @@ -1228,6 +1229,12 @@ void QX11PixmapData::fill(const QColor &fillColor) QX11PixmapData::~QX11PixmapData() { + // Cleanup hooks have to be called before the handles are freed + if (is_cached) { + QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this); + is_cached = false; + } + release(); } diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp index 65032da..ea4fe6b 100644 --- a/src/gui/image/qpixmapdata.cpp +++ b/src/gui/image/qpixmapdata.cpp @@ -45,6 +45,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -80,6 +81,16 @@ QPixmapData::QPixmapData(PixelType pixelType, int objectId) QPixmapData::~QPixmapData() { + // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will + // then set is_cached to false. For example, on X11 QtOpenGL needs to delete the GLXPixmap + // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted, + // otherwise some drivers will leak the GL surface. In this case, QX11PixmapData will + // call the cleanup hooks itself before deleting the native pixmap and set is_cached to + // false. + if (is_cached) { + QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this); + is_cached = false; + } } QPixmapData *QPixmapData::createCompatiblePixmapData() const diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h index 1125515..827fa18 100644 --- a/src/gui/image/qpixmapdata_p.h +++ b/src/gui/image/qpixmapdata_p.h @@ -117,6 +117,14 @@ public: inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); } inline int depth() const { return d; } inline bool isNull() const { return is_null; } + inline qint64 cacheKey() const { + int classKey = id; + if (classKey >= 1024) + classKey = -(classKey >> 10); + return ((((qint64) classKey) << 56) + | (((qint64) ser_no) << 32) + | ((qint64) detach_no)); + } #if defined(Q_OS_SYMBIAN) virtual void* toNativeType(NativeType type); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 2a60708..dd977cb 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1590,10 +1590,8 @@ QGLTextureCache::QGLTextureCache() Q_ASSERT(qt_gl_texture_cache == 0); qt_gl_texture_cache = this; - QImagePixmapCleanupHooks::instance()->addPixmapModificationHook(cleanupTextures); -#ifdef Q_WS_X11 - QImagePixmapCleanupHooks::instance()->addPixmapDestructionHook(cleanupPixmapSurfaces); -#endif + QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(cleanupTextures); + QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(cleanupBeforePixmapDestruction); QImagePixmapCleanupHooks::instance()->addImageHook(imageCleanupHook); } @@ -1601,10 +1599,8 @@ QGLTextureCache::~QGLTextureCache() { qt_gl_texture_cache = 0; - QImagePixmapCleanupHooks::instance()->removePixmapModificationHook(cleanupTextures); -#ifdef Q_WS_X11 - QImagePixmapCleanupHooks::instance()->removePixmapDestructionHook(cleanupPixmapSurfaces); -#endif + QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTextures); + QImagePixmapCleanupHooks::instance()->removePixmapDataDestructionHook(cleanupBeforePixmapDestruction); QImagePixmapCleanupHooks::instance()->removeImageHook(imageCleanupHook); } @@ -1672,30 +1668,30 @@ void QGLTextureCache::imageCleanupHook(qint64 cacheKey) } -void QGLTextureCache::cleanupTextures(QPixmap* pixmap) +void QGLTextureCache::cleanupTextures(QPixmapData* pmd) { // ### remove when the GL texture cache becomes thread-safe if (qApp->thread() == QThread::currentThread()) { - const qint64 cacheKey = pixmap->cacheKey(); + const qint64 cacheKey = pmd->cacheKey(); QGLTexture *texture = instance()->getTexture(cacheKey); if (texture && texture->options & QGLContext::MemoryManagedBindOption) instance()->remove(cacheKey); } } -#if defined(Q_WS_X11) -void QGLTextureCache::cleanupPixmapSurfaces(QPixmap* pixmap) +void QGLTextureCache::cleanupBeforePixmapDestruction(QPixmapData* pmd) { // Remove any bound textures first: - cleanupTextures(pixmap); + cleanupTextures(pmd); + Q_ASSERT(instance()->getTexture(pmd->cacheKey()) == 0); - QPixmapData *pd = pixmap->data_ptr().data(); - if (pd->classId() == QPixmapData::X11Class) { - Q_ASSERT(pd->ref == 1); // Make sure reference counting isn't broken - QGLContextPrivate::destroyGlSurfaceForPixmap(pd); +#if defined(Q_WS_X11) + if (pmd->classId() == QPixmapData::X11Class) { + Q_ASSERT(pmd->ref == 0); // Make sure reference counting isn't broken + QGLContextPrivate::destroyGlSurfaceForPixmap(pmd); } -} #endif +} void QGLTextureCache::deleteIfEmpty() { diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 0104f07..713b067 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -522,7 +522,7 @@ public: QSize bindCompressedTexturePVR(const char *buf, int len); }; -class QGLTextureCache { +class Q_AUTOTEST_EXPORT QGLTextureCache { public: QGLTextureCache(); ~QGLTextureCache(); @@ -539,11 +539,8 @@ public: static QGLTextureCache *instance(); static void deleteIfEmpty(); static void imageCleanupHook(qint64 cacheKey); - static void cleanupTextures(QPixmap* pixmap); -#ifdef Q_WS_X11 - // X11 needs to catch pixmap data destruction to delete EGL/GLX pixmap surfaces - static void cleanupPixmapSurfaces(QPixmap* pixmap); -#endif + static void cleanupTextures(QPixmapData* pixmap); + static void cleanupBeforePixmapDestruction(QPixmapData* pixmap); private: QCache m_cache; diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 11011ee..37bb7c0 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -319,14 +319,14 @@ public: ~QGLBlurTextureCache(); QGLBlurTextureInfo *takeBlurTextureInfo(const QPixmap &pixmap); - bool hasBlurTextureInfo(const QPixmap &pixmap) const; + bool hasBlurTextureInfo(quint64 cacheKey) const; void insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTextureInfo *info); - void clearBlurTextureInfo(const QPixmap &pixmap); + void clearBlurTextureInfo(quint64 cacheKey); void timerEvent(QTimerEvent *event); private: - static void pixmapDestroyed(QPixmap *pixmap); + static void pixmapDestroyed(QPixmapData *pixmap); QCache cache; @@ -379,21 +379,21 @@ QGLBlurTextureInfo *QGLBlurTextureCache::takeBlurTextureInfo(const QPixmap &pixm return cache.take(pixmap.cacheKey()); } -void QGLBlurTextureCache::clearBlurTextureInfo(const QPixmap &pixmap) +void QGLBlurTextureCache::clearBlurTextureInfo(quint64 cacheKey) { - cache.remove(pixmap.cacheKey()); + cache.remove(cacheKey); } -bool QGLBlurTextureCache::hasBlurTextureInfo(const QPixmap &pixmap) const +bool QGLBlurTextureCache::hasBlurTextureInfo(quint64 cacheKey) const { - return cache.contains(pixmap.cacheKey()); + return cache.contains(cacheKey); } void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTextureInfo *info) { static bool hookAdded = false; if (!hookAdded) { - QImagePixmapCleanupHooks::instance()->addPixmapDestructionHook(pixmapDestroyed); + QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed); hookAdded = true; } @@ -406,11 +406,11 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe timerId = startTimer(8000); } -void QGLBlurTextureCache::pixmapDestroyed(QPixmap *pixmap) +void QGLBlurTextureCache::pixmapDestroyed(QPixmapData *pmd) { foreach (QGLBlurTextureCache *cache, blurTextureCaches) { - if (cache->hasBlurTextureInfo(*pixmap)) - cache->clearBlurTextureInfo(*pixmap); + if (cache->hasBlurTextureInfo(pmd->cacheKey())) + cache->clearBlurTextureInfo(pmd->cacheKey()); } } diff --git a/tests/auto/qgl/qgl.pro b/tests/auto/qgl/qgl.pro index 420c4bb..9116f39 100644 --- a/tests/auto/qgl/qgl.pro +++ b/tests/auto/qgl/qgl.pro @@ -6,6 +6,6 @@ load(qttest_p4) requires(contains(QT_CONFIG,opengl)) QT += opengl -SOURCES += tst_qgl.cpp - +SOURCES += tst_qgl.cpp +RESOURCES = qgl.qrc diff --git a/tests/auto/qgl/qgl.qrc b/tests/auto/qgl/qgl.qrc new file mode 100644 index 0000000..653794a --- /dev/null +++ b/tests/auto/qgl/qgl.qrc @@ -0,0 +1,5 @@ + + + ../qpixmap/images/designer.png + + diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index cf4616e..d37d727 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -56,6 +56,7 @@ #ifdef QT_BUILD_INTERNAL #include +#include #endif //TESTED_CLASS= @@ -91,6 +92,8 @@ private slots: void clipTest(); void destroyFBOAfterContext(); void shareRegister(); + void qglContextDefaultBindTexture(); + void textureCleanup(); }; tst_QGL::tst_QGL() @@ -1938,5 +1941,242 @@ void tst_QGL::shareRegister() #endif } +// Tests QGLContext::bindTexture with default options +void tst_QGL::qglContextDefaultBindTexture() +{ +#ifdef QT_BUILD_INTERNAL + QGLWidget w; + w.makeCurrent(); + + QGLContext *ctx = const_cast(w.context()); + + QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32); + boundImage->fill(0xFFFFFFFF); + QPixmap *boundPixmap = new QPixmap(256, 256); + boundPixmap->fill(Qt::red); + + // Check that calling QGLContext::bindTexture with default args adds textures to cache + int startCacheItemCount = QGLTextureCache::instance()->size(); + GLuint boundImageTextureId = ctx->bindTexture(*boundImage); + GLuint boundPixmapTextureId = ctx->bindTexture(*boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Make sure the texture IDs returned are valid: + QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_TRUE); + QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_TRUE); + + // Make sure the textures are still there after we delete the image/pixmap: + delete boundImage; + boundImage = 0; + delete boundPixmap; + boundPixmap = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Make sure the textures are deleted from the cache after calling QGLContext::deleteTexture() + ctx->deleteTexture(boundImageTextureId); + ctx->deleteTexture(boundPixmapTextureId); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + // Finally, make sure QGLContext::deleteTexture also deleted the texture IDs: + QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_FALSE); + QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_FALSE); +#endif +} + +void tst_QGL::textureCleanup() +{ +#ifdef QT_BUILD_INTERNAL + QGLWidget w; + w.resize(200,200); + w.show(); + w.makeCurrent(); + + // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache + // when the pixmap cache is cleared + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QPixmap boundPixmap(":designer.png"); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Check that the texture doesn't get removed from the cache when the pixmap is cleared + // as it should still be in the cache: + boundPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + QPixmapCache::clear(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache + // when they are explicitly removed from the pixmap cache + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QPixmap boundPixmap(128, 128); + QString cacheKey = QString::fromLatin1("myPixmap"); + QPixmapCache::insert(cacheKey, boundPixmap); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Check that the texture doesn't get removed from the cache when the pixmap is cleared + // as it should still be in the cache: + boundPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Finally, we check that the texture cache entry is removed when we remove the + // pixmap cache entry, which should hold the last reference: + QPixmapCache::remove(cacheKey); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are deleted + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32); + boundImage->fill(0xFFFFFFFF); + QPixmap *boundPixmap = new QPixmap(256, 256); + boundPixmap->fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, *boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, *boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + delete boundImage; + boundImage = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + delete boundPixmap; + boundPixmap = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are assigned to + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + boundImage = QImage(64, 64, QImage::Format_RGB32); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + boundPixmap = QPixmap(64, 64); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are modified (detached) + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + boundImage.fill(0x00000000); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + boundPixmap.fill(Qt::blue); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check that images/pixmaps aren't removed from the cache if a shallow copy has been made + QImage copyOfImage; + QPixmap copyOfPixmap; + int startCacheItemCount = QGLTextureCache::instance()->size(); + { + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + copyOfImage = boundImage; + copyOfPixmap = boundPixmap; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + } // boundImage & boundPixmap would have been deleted when they went out of scope + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + copyOfImage = QImage(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + copyOfPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); +#endif +} + QTEST_MAIN(tst_QGL) #include "tst_qgl.moc" -- cgit v0.12 From cefda8e4491ff82c96fceea2091f69160f8ae584 Mon Sep 17 00:00:00 2001 From: ck Date: Fri, 29 Jan 2010 16:07:29 +0100 Subject: Assistant: Fix unintended tr context change. Bug was introduced by af30aeb6a1ebb7307f06c122c0c93d152f4d958c Contributed-by: Ritt Konstantin --- tools/assistant/lib/qhelpsearchquerywidget.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp index b614cb4..f2bb816 100644 --- a/tools/assistant/lib/qhelpsearchquerywidget.cpp +++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp @@ -122,17 +122,17 @@ private: void retranslate() { - simpleSearchLabel->setText(tr("Search for:")); - prevQueryButton->setToolTip(tr("Previous search")); - nextQueryButton->setToolTip(tr("Next search")); - searchButton->setText(tr("Search")); + simpleSearchLabel->setText(QHelpSearchQueryWidget::tr("Search for:")); + prevQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Previous search")); + nextQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Next search")); + searchButton->setText(QHelpSearchQueryWidget::tr("Search")); #ifdef QT_CLUCENE_SUPPORT - advancedSearchLabel->setText(tr("Advanced search")); - similarLabel->setText(tr("words similar to:")); - withoutLabel->setText(tr("without the words:")); - exactLabel->setText(tr("with exact phrase:")); - allLabel->setText(tr("with all of the words:")); - atLeastLabel->setText(tr("with at least one of the words:")); + advancedSearchLabel->setText(QHelpSearchQueryWidget::tr("Advanced search")); + similarLabel->setText(QHelpSearchQueryWidget::tr("words similar to:")); + withoutLabel->setText(QHelpSearchQueryWidget::tr("without the words:")); + exactLabel->setText(QHelpSearchQueryWidget::tr("with exact phrase:")); + allLabel->setText(QHelpSearchQueryWidget::tr("with all of the words:")); + atLeastLabel->setText(QHelpSearchQueryWidget::tr("with at least one of the words:")); #endif } -- cgit v0.12 From 4a5e81f5320daa82352b13e670718998b0d2d23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 29 Jan 2010 16:14:00 +0100 Subject: Fixed a crash when QPixmaps are destroyed after the ~QApplication. Destroying QPixmaps after the QApp destructor will leak native pixmap objects on X11, and it's a general rule that all GUI objects must be destroyed before the QApp destuctor is called. Task-number: QTBUG-7746 Reviewed-by: Kim --- src/gui/image/qpixmap_x11.cpp | 7 ++++++- src/gui/painting/qpainter.cpp | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 169a2ec..e1e8a0d 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1243,8 +1243,13 @@ void QX11PixmapData::release() delete pengine; pengine = 0; - if (!X11) + if (!X11) { +#ifndef QT_NO_DEBUG + qWarning("~QX11PixmapData(): QPixmap objects must be destroyed before the QApplication" + " object, otherwise the native pixmap object will be leaked."); +#endif return; + } if (x11_mask) { #ifndef QT_NO_XRENDER diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index cde6a2d..bf12c6b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7509,7 +7509,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) return widgetPrivate->redirected(offset); } - if (*globalRedirectionAtomic() == 0) + if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0) return 0; QMutexLocker locker(globalRedirectionsMutex()); @@ -7529,7 +7529,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { - if (*globalRedirectionAtomic() == 0) + if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0) return; QMutex *mutex = 0; -- cgit v0.12 From af8b3c9d911a7ad6722bfa587b8a2f48c4254de3 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 29 Jan 2010 17:32:51 +0200 Subject: List item margins are too small due to invalid pixel metric value Pixel metric values for PM_FocusFrameVMargin and PM_FocusFrameHMargin were based on AVKON grid layout. Apparently, AVKON has a major difference for text margin in lists and grids. List values are almost double of what is used in the grids. Original values were poor fit for list usability, it made the text items very close to each anothre. Task-number: QTBUG-7258 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 16 ++++++++-------- util/s60pixelmetrics/pixel_metrics.cpp | 21 ++++++++++++++------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index a40a84c..fc435e8 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -92,10 +92,10 @@ static const qreal goldenRatio = 1.618; const layoutHeader QS60StylePrivate::m_layoutHeaders[] = { // *** generated layout data *** -{240,320,1,15,"QVGA Landscape"}, -{320,240,1,15,"QVGA Portrait"}, -{360,640,1,15,"NHD Landscape"}, -{640,360,1,15,"NHD Portrait"}, +{240,320,1,16,"QVGA Landscape"}, +{320,240,1,16,"QVGA Portrait"}, +{360,640,1,16,"NHD Landscape"}, +{640,360,1,16,"NHD Portrait"}, {352,800,1,12,"E90 Landscape"} // *** End of generated data *** }; @@ -104,10 +104,10 @@ const int QS60StylePrivate::m_numberOfLayouts = const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** -{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,3,3,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,4,4,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,5,5,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,5,5,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, {7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,-909,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1} // *** End of generated data *** }; diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp index 705c0ec..93873fb 100644 --- a/util/s60pixelmetrics/pixel_metrics.cpp +++ b/util/s60pixelmetrics/pixel_metrics.cpp @@ -50,7 +50,7 @@ // so that we can keep dynamic and static values inline. // Please adjust version data if correcting dynamic PM calculations. const TInt KPMMajorVersion = 1; -const TInt KPMMinorVersion = 15; +const TInt KPMMinorVersion = 16; TPixelMetricsVersion PixelMetrics::Version() { @@ -855,19 +855,26 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) case QStyle::PM_FocusFrameHMargin: case QStyle::PM_FocusFrameVMargin: { - TAknLayoutRect gridRect; - gridRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::grid_highlight_pane(0)); - TAknLayoutRect gridRectCenter; - gridRectCenter.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::cell_highlight_pane_g1()); + TAknLayoutRect listScrollPane; + listScrollPane.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::listscroll_gen_pane(0)); + TAknLayoutRect listGenPane; + listGenPane.LayoutRect(listScrollPane.Rect(), AknLayoutScalable_Avkon::list_gen_pane(0)); + TAknLayoutRect listSinglePane; + listSinglePane.LayoutRect(listGenPane.Rect(), AknLayoutScalable_Avkon::list_single_pane(0)); + TAknLayoutText listSinglePaneText; + listSinglePaneText.LayoutText(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_single_pane_t1(0)); + TAknLayoutRect highlightRect; + highlightRect.LayoutRect(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_highlight_pane_cp1().LayoutLine()); // The difference of center piece from border tell the frame width. if ( value == QStyle::PM_FocusFrameHMargin) { - value = gridRect.Rect().iBr.iX - gridRectCenter.Rect().iBr.iX; + //use topleft for horizontal as S60 uses different values for right and left borders + value = listSinglePaneText.TextRect().iTl.iX - highlightRect.Rect().iTl.iX; } else { - value = gridRect.Rect().iBr.iY - gridRectCenter.Rect().iBr.iY; + value = highlightRect.Rect().iBr.iY - listSinglePaneText.TextRect().iBr.iY; } } break; -- cgit v0.12 From 519760c4256997f26c039cb4b047c6207470b54f Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Thu, 28 Jan 2010 18:09:39 +0100 Subject: Adds convenience functions QGraphicsItemPrivate::isOpacityNull This should unify the error constant used along the code and enforce qreal to avoid unnecessary double conversions. Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem_p.h | 10 ++++++++-- src/gui/graphicsview/qgraphicsscene.cpp | 7 ++++--- src/gui/graphicsview/qgraphicssceneindex.cpp | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 5ad6cd5..b3ca3b5 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -358,14 +358,20 @@ public: return o; } + inline bool isOpacityNull() const + { return (opacity < qreal(0.001)); } + + static inline bool isOpacityNull(qreal opacity) + { return (opacity < qreal(0.001)); } + inline bool isFullyTransparent() const { - if (opacity < 0.001) + if (isOpacityNull()) return true; if (!parent) return false; - return calcEffectiveOpacity() < 0.001; + return isOpacityNull(calcEffectiveOpacity()); } inline qreal effectiveOpacity() const { diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 54d47fa..842d368 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4630,7 +4630,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter * return; // Item has neither contents nor children!(?) const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity); - const bool itemIsFullyTransparent = (opacity < 0.0001); + const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity); if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity())) return; @@ -4750,7 +4750,7 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q qreal opacity, const QTransform *effectTransform, bool wasDirtyParentSceneTransform, bool drawItem) { - const bool itemIsFullyTransparent = (opacity < 0.0001); + const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity); const bool itemClipsChildrenToShape = (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape); const bool itemHasChildren = !item->d_ptr->children.isEmpty(); @@ -4980,7 +4980,8 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool } const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity); - const bool itemIsFullyTransparent = !item->d_ptr->ignoreOpacity && opacity < 0.0001; + const bool itemIsFullyTransparent = !item->d_ptr->ignoreOpacity + && QGraphicsItemPrivate::isOpacityNull(opacity); if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity())) { resetDirtyItem(item, /*recursive=*/itemHasChildren); return; diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index 043c4eb..707c71f 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -279,7 +279,7 @@ void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRe return; const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity); - const bool itemIsFullyTransparent = (opacity < 0.0001); + const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity); const bool itemHasChildren = !item->d_ptr->children.isEmpty(); if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity())) return; @@ -554,7 +554,7 @@ QList QGraphicsSceneIndex::estimateTopLevelItems(const QRectF & /*! \fn QList QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const - + This pure virtual function all items in the index and sort them using \a order. */ -- cgit v0.12 From 3db33d41ad48953ec7c8d74db24d17fc3685895f Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 27 Jan 2010 13:47:25 +0100 Subject: Cleanup in graphicsitem autotest Unified multiple class definitions for MyGraphicsView and cleaned whitespaces. Reviewed-by: bnilsen --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 68 ++++++-------------------- 1 file changed, 16 insertions(+), 52 deletions(-) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 14b9ef0..a515481 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -251,6 +251,21 @@ public: QBrush brush; }; +class MyGraphicsView : public QGraphicsView +{ +public: + int repaints; + QRegion paintedRegion; + MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} + void paintEvent(QPaintEvent *e) + { + paintedRegion += e->region(); + ++repaints; + QGraphicsView::paintEvent(e); + } + void reset() { repaints = 0; paintedRegion = QRegion(); } +}; + class tst_QGraphicsItem : public QObject { Q_OBJECT @@ -3165,7 +3180,6 @@ void tst_QGraphicsItem::childrenBoundingRect() childChild->setPos(500, 500); child->rotate(90); - scene.addPolygon(parent->mapToScene(parent->boundingRect() | parent->childrenBoundingRect()))->setPen(QPen(Qt::red));; QGraphicsView view(&scene); @@ -6252,13 +6266,6 @@ void tst_QGraphicsItem::opacity2() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) { ++repaints; QGraphicsView::paintEvent(e); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); @@ -6336,20 +6343,6 @@ void tst_QGraphicsItem::opacityZeroUpdates() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - ++repaints; - paintedRegion += e->region(); - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); @@ -7076,21 +7069,6 @@ void tst_QGraphicsItem::deviceTransform() QCOMPARE(rect3->deviceTransform(deviceX).map(QPointF(50, 50)), mapResult3); } -class MyGraphicsView : public QGraphicsView -{ -public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - paintedRegion += e->region(); - ++repaints; - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } -}; - void tst_QGraphicsItem::update() { QGraphicsScene scene; @@ -9835,7 +9813,7 @@ void tst_QGraphicsItem::scenePosChange() QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0); } -void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() +void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() { struct Item : public QGraphicsTextItem { @@ -9914,20 +9892,6 @@ void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - ++repaints; - paintedRegion += e->region(); - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); -- cgit v0.12 From 08c649e6a81ab13d0c7db6aa1b480ed149e3f770 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 20 Jan 2010 15:11:58 +0100 Subject: Avoids missing opacity updates by not propagating the ignoreOpacity flag When doing a full update of a parent item, by setting one of these flags, QGraphicsItem::ItemIgnoresTransformations | ItemClipsChildrenToShape | ItemIsSelectable, the child items that were transparent would not be shown when setting their respective opacity to 1.0 We just need to set the ignoreOpacity flag when setting opacity to 0.0. This avoids propagating this flag to the child items when it's not needed. Task-number: QT-2653 Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 2 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 40 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index ed36f87..86780da 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2584,7 +2584,7 @@ void QGraphicsItem::setOpacity(qreal opacity) d_ptr->scene->d_func()->markDirty(this, QRectF(), /*invalidateChildren=*/true, /*force=*/false, - /*ignoreOpacity=*/true); + /*ignoreOpacity=*/d_ptr->isOpacityNull()); } if (d_ptr->isObject) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index a515481..dd8d555 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -434,6 +434,7 @@ private slots: void QTBUG_4233_updateCachedWithSceneRect(); void QTBUG_5418_textItemSetDefaultColor(); void QTBUG_6738_missingUpdateWithSetParent(); + void QT_2653_fullUpdateDiscardingOpacityUpdate(); private: QList paintedItems; @@ -9919,5 +9920,44 @@ void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() QTRY_VERIFY(view.repaints == 1); } +void tst_QGraphicsItem::QT_2653_fullUpdateDiscardingOpacityUpdate() +{ + QGraphicsScene scene(0, 0, 200, 200); + MyGraphicsView view(&scene); + + EventTester *parentGreen = new EventTester(); + parentGreen->setGeometry(QRectF(20, 20, 100, 100)); + parentGreen->brush = Qt::green; + + EventTester *childYellow = new EventTester(parentGreen); + childYellow->setGeometry(QRectF(10, 10, 50, 50)); + childYellow->brush = Qt::yellow; + + scene.addItem(parentGreen); + + childYellow->setOpacity(0.0); + parentGreen->setOpacity(0.0); + + // set any of the flags below to trigger a fullUpdate to reproduce the bug: + // ItemIgnoresTransformations, ItemClipsChildrenToShape, ItemIsSelectable + parentGreen->setFlag(QGraphicsItem::ItemIgnoresTransformations); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.reset(); + + parentGreen->setOpacity(1.0); + + QTRY_COMPARE(view.repaints, 1); + + view.reset(); + childYellow->repaints = 0; + + childYellow->setOpacity(1.0); + + QTRY_COMPARE(view.repaints, 1); + QTRY_COMPARE(childYellow->repaints, 1); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From 37f1aec1a4e71a7102e8cd2e2908c8d3be7e29f5 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Thu, 28 Jan 2010 15:43:12 +0100 Subject: Fixes missing update when setting opacity on an item that had opacity 0.0 We need to set the paintedViewBoundingRectsNeedRepaint flag when an item becomes visible again because when the item has opacity 0.0 the paintedViewBoundingRects struct can get set as outside of viewport, so the next time the item is set to visible again we need to diregard this cached data (otherwise the item will not be updated). Task-number: QTBUG-7714 Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 3 ++ tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 39 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 86780da..b4e19d1 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2569,6 +2569,7 @@ void QGraphicsItem::setOpacity(qreal opacity) if (newOpacity == d_ptr->opacity) return; + bool wasFullyTransparent = d_ptr->isOpacityNull(); d_ptr->opacity = newOpacity; // Notify change. @@ -2585,6 +2586,8 @@ void QGraphicsItem::setOpacity(qreal opacity) /*invalidateChildren=*/true, /*force=*/false, /*ignoreOpacity=*/d_ptr->isOpacityNull()); + if (wasFullyTransparent) + d_ptr->paintedViewBoundingRectsNeedRepaint = 1; } if (d_ptr->isObject) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index dd8d555..ae038e7 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -434,6 +434,7 @@ private slots: void QTBUG_4233_updateCachedWithSceneRect(); void QTBUG_5418_textItemSetDefaultColor(); void QTBUG_6738_missingUpdateWithSetParent(); + void QTBUG_7714_fullUpdateDiscardingOpacityUpdate2(); void QT_2653_fullUpdateDiscardingOpacityUpdate(); private: @@ -9959,5 +9960,43 @@ void tst_QGraphicsItem::QT_2653_fullUpdateDiscardingOpacityUpdate() QTRY_COMPARE(childYellow->repaints, 1); } +void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() +{ + QGraphicsScene scene(0, 0, 200, 200); + MyGraphicsView view(&scene); + MyGraphicsView origView(&scene); + + EventTester *parentGreen = new EventTester(); + parentGreen->setGeometry(QRectF(20, 20, 100, 100)); + parentGreen->brush = Qt::green; + + EventTester *childYellow = new EventTester(parentGreen); + childYellow->setGeometry(QRectF(10, 10, 50, 50)); + childYellow->brush = Qt::yellow; + + scene.addItem(parentGreen); + + origView.show(); + QTest::qWaitForWindowShown(&origView); + + parentGreen->setFlag(QGraphicsItem::ItemIgnoresTransformations); + + origView.reset(); + childYellow->setOpacity(0.0); + + QTRY_COMPARE(origView.repaints, 1); + + view.show(); + + QTest::qWaitForWindowShown(&view); + view.reset(); + origView.reset(); + + childYellow->setOpacity(1.0); + + QTRY_COMPARE(origView.repaints, 1); + QTRY_COMPARE(view.repaints, 1); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From 94e5195c84cbe0e7b37550af3eb1540b22bf2b4a Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 29 Jan 2010 16:17:06 +0000 Subject: Remove warning about Symbian DEF files when running configure for Windows Move SYMBIAN_DEFFILES definition in the dictionary into the Symbian specific section of configure Task-number: QTBUG-6556 Reviewed-by: Simon Hausmann --- configure.exe | Bin 1178112 -> 1178112 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index e64af40..b89999b 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8342fbe..599c13d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -317,7 +317,6 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "OPENSSL" ] = "auto"; dictionary[ "DBUS" ] = "auto"; dictionary[ "S60" ] = "yes"; - dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; dictionary[ "STYLE_WINDOWS" ] = "yes"; dictionary[ "STYLE_WINDOWSXP" ] = "auto"; @@ -1475,6 +1474,7 @@ void Configure::applySpecSpecifics() dictionary[ "XMLPATTERNS" ] = "yes"; dictionary[ "QT_GLIB" ] = "no"; dictionary[ "S60" ] = "yes"; + dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) // iconv_open seems to return -1 always, so something is probably missing from the platform. dictionary[ "QT_ICONV" ] = "no"; -- cgit v0.12 From f512c8a279518e992ae59c13c17453ac2769359e Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Fri, 29 Jan 2010 18:05:39 +0100 Subject: Fixing benchmark for Symbian The bidi.txt has to be deployed in proper way. Reviewed-by: TrustMe --- tests/benchmarks/qtext/main.cpp | 10 ++++++++++ tests/benchmarks/qtext/qtext.pro | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp index 9854a9f..d4f3165 100644 --- a/tests/benchmarks/qtext/main.cpp +++ b/tests/benchmarks/qtext/main.cpp @@ -51,6 +51,12 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Application private dir is default serach path for files, so SRCDIR can be set to empty +#define SRCDIR "" +#endif + Q_DECLARE_METATYPE(QTextDocument*) class tst_QText: public QObject @@ -129,7 +135,11 @@ void tst_QText::shaping_data() QTest::newRow("lorem") << m_lorem; QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet"); +#if !defined(Q_OS_SYMBIAN) QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt")); +#else + QFile file( SRCDIR "bidi.txt" ); +#endif QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); QVERIFY(data.count() > 1000); diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/qtext/qtext.pro index ce4f604..9e8860f 100644 --- a/tests/benchmarks/qtext/qtext.pro +++ b/tests/benchmarks/qtext/qtext.pro @@ -4,4 +4,11 @@ TARGET = tst_QText SOURCES += main.cpp -DEFINES += SRCDIR=\\\"$$PWD/\\\" +symbian* { + TARGET.CAPABILITY = ALL -TCB + addFiles.sources = bidi.txt + addFiles.path = . + DEPLOYMENT += addFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} \ No newline at end of file -- cgit v0.12 From 65493e69454f8914d0ae1607e5a071ea07bb7017 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 1 Feb 2010 14:42:47 +1000 Subject: audiodevices example: no devices available audio-backend option was not being written out to qconfig.pri Task-number:QTBUG-7782 Reviewed-by:Justin McPherson --- tools/configure/configureapp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 7751143..abf81bd 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2535,8 +2535,11 @@ void Configure::generateOutputVars() qtConfig += "phonon-backend"; } - if (dictionary["MULTIMEDIA"] == "yes") + if (dictionary["MULTIMEDIA"] == "yes") { qtConfig += "multimedia"; + if (dictionary["AUDIO_BACKEND"] == "yes") + qtConfig += "audio-backend"; + } if (dictionary["WEBKIT"] == "yes") qtConfig += "webkit"; -- cgit v0.12 From 465a63d00c2294641539af820435a9a4315f0251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Mon, 1 Feb 2010 09:03:48 +0100 Subject: Don't crash when running Qt on KDE with Oxygen style. It crashed on application exit because of the order of Q_GLOBAL_STATICs are not defined if the global statics are in different modules. Thus, the globalRedirectionAtomic was destroyed first, then the K_GLOBAL_STATIC(OxygenHelper, ...) got destroyed. Since the OxygeneHelper contained a QCache of pixmaps it would eventually call ~QPixmap() and reference the destroyed globalRedirectionAtomic.... Task-number: QTBUG-7734 Reviewed-by: gunnar --- src/gui/painting/qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index cde6a2d..0f28f7a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7529,7 +7529,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { - if (*globalRedirectionAtomic() == 0) + if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0) return; QMutex *mutex = 0; -- cgit v0.12 From 615aa8b5f3187811c0b9347aebbec491f3fcf7ca Mon Sep 17 00:00:00 2001 From: ulf Date: Mon, 1 Feb 2010 09:56:37 +0100 Subject: QPrintDialog::setPrinter(), QPrintDialog::printer(), QPrintDialog::addButton should be documented as QT3 support member Task-number: QTBUG-7786 Reviewed-by: Benjamin Poulain --- src/gui/dialogs/qprintdialog.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h index 390a4a0..ecd50c1 100644 --- a/src/gui/dialogs/qprintdialog.h +++ b/src/gui/dialogs/qprintdialog.h @@ -97,9 +97,9 @@ public: void done(int result); #if defined (Q_OS_UNIX) && defined (QT3_SUPPORT) - void setPrinter(QPrinter *, bool = false); - QPrinter *printer() const; - void addButton(QPushButton *button); + QT3_SUPPORT void setPrinter(QPrinter *, bool = false); + QT3_SUPPORT QPrinter *printer() const; + QT3_SUPPORT void addButton(QPushButton *button); #endif void setOption(PrintDialogOption option, bool on = true); -- cgit v0.12 From ca3ce9263eaef963d934d221bd1dec37e7bf0871 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 5 Nov 2009 13:32:39 +0100 Subject: Catch by reference rather than by value Catching by value causes GCC to use the compiler support function __cxa_get_exception_ptr. This is not available in the compiler support libraries on Symbian OS prior to Symbian^3. Catching by reference avoids this problem. Reviewed-by: mread --- src/corelib/io/qdebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 1c68716..bc68599 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -83,7 +83,7 @@ public: if(stream->message_output) { QT_TRY { qt_message_output(stream->type, stream->buffer.toLocal8Bit().data()); - } QT_CATCH(std::bad_alloc) { /* We're out of memory - give up. */ } + } QT_CATCH(std::bad_alloc&) { /* We're out of memory - give up. */ } } delete stream; } -- cgit v0.12 From a788f7e3a04ec741d59ef458a40e39d918dc1df0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 1 Feb 2010 10:28:00 +0100 Subject: Designer/uic/related examples: Fix source code scanning issues II. Fix spelling errors, foreach()/QString usage, explicit constructors. Reviewed-By: Joerg Bornemann --- examples/designer/taskmenuextension/tictactoedialog.h | 2 +- examples/uitools/textfinder/textfinder.cpp | 2 +- src/tools/uic/cpp/cppwriteinitialization.cpp | 6 +++--- src/tools/uic3/converter.cpp | 6 +++--- src/tools/uic3/main.cpp | 4 ++-- tools/designer/src/designer/qdesigner_server.h | 2 +- tools/designer/src/designer/versiondialog.cpp | 5 ++--- tools/designer/src/lib/shared/qdesigner_taskmenu.cpp | 2 +- tools/designer/src/plugins/widgets/q3table/q3table_plugin.h | 2 +- tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h | 2 +- tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h | 6 +++--- .../src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h | 2 +- tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h | 2 +- tools/shared/findwidget/abstractfindwidget.h | 2 +- tools/shared/findwidget/itemviewfindwidget.h | 2 +- 15 files changed, 23 insertions(+), 24 deletions(-) diff --git a/examples/designer/taskmenuextension/tictactoedialog.h b/examples/designer/taskmenuextension/tictactoedialog.h index aeaaaf4..3d810dd 100644 --- a/examples/designer/taskmenuextension/tictactoedialog.h +++ b/examples/designer/taskmenuextension/tictactoedialog.h @@ -55,7 +55,7 @@ class TicTacToeDialog : public QDialog Q_OBJECT public: - TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0); + explicit TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0); QSize sizeHint() const; diff --git a/examples/uitools/textfinder/textfinder.cpp b/examples/uitools/textfinder/textfinder.cpp index 855f11f..1b7c14b 100644 --- a/examples/uitools/textfinder/textfinder.cpp +++ b/examples/uitools/textfinder/textfinder.cpp @@ -116,7 +116,7 @@ void TextFinder::on_findButton_clicked() if (isFirstTime == false) document->undo(); - if (searchString == "") { + if (searchString.isEmpty()) { QMessageBox::information(this, tr("Empty Search Field"), "The search field is empty. Please enter a word and click Find."); } else { diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index d9aff1b..8099ffa 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -2787,8 +2787,8 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet map; // bool is dummy. The idea is to sort that (always generate in the same order) by putting a set into a map - foreach (QString str, directives) - map[str] = true; + foreach (const QString &str, directives) + map.insert(str, true); if (map.size() == 1) { outputStream << "#ifndef " << map.constBegin().key() << endl; @@ -2797,7 +2797,7 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet *prop if (prop->kind() == DomProperty::Set) { QStringList flags = prop->elementSet().split(QLatin1Char('|')); QStringList v; - foreach (QString fl, flags) { + foreach (const QString &fl, flags) { QString e = WidgetInfo::resolveEnumerator(className, fl); if (e.isEmpty()) { e = m_porting->renameEnumerator(className + QLatin1String("::") + fl); @@ -1283,7 +1283,7 @@ QString Ui3Reader::fixType(const QString &t) const QString newText = t; //split type name on <>*& and whitespace QStringList typeNames = t.split(QRegExp(QLatin1String("<|>|\\*|&| ")), QString::SkipEmptyParts); - foreach(QString typeName , typeNames) { + foreach(const QString &typeName , typeNames) { QString newName = fixClassName(typeName); if( newName != typeName ) { newText.replace(typeName, newName); diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp index 6acc94f..1ebb76a 100644 --- a/src/tools/uic3/main.cpp +++ b/src/tools/uic3/main.cpp @@ -338,10 +338,10 @@ int runUic3(int argc, char * argv[]) QStringList globalIncludes, localIncludes; ui3.computeDeps(e, globalIncludes, localIncludes, impl); - foreach (QString i, globalIncludes) + foreach (const QString &i, globalIncludes) printf("%s\n", i.toLatin1().constData()); - foreach (QString i, localIncludes) + foreach (const QString &i, localIncludes) printf("%s\n", i.toLatin1().constData()); if (impl) diff --git a/tools/designer/src/designer/qdesigner_server.h b/tools/designer/src/designer/qdesigner_server.h index d522056..90cc624 100644 --- a/tools/designer/src/designer/qdesigner_server.h +++ b/tools/designer/src/designer/qdesigner_server.h @@ -74,7 +74,7 @@ class QDesignerClient: public QObject { Q_OBJECT public: - QDesignerClient(quint16 port, QObject *parent = 0); + explicit QDesignerClient(quint16 port, QObject *parent = 0); virtual ~QDesignerClient(); private slots: diff --git a/tools/designer/src/designer/versiondialog.cpp b/tools/designer/src/designer/versiondialog.cpp index 51f546d..d9b03aa 100644 --- a/tools/designer/src/designer/versiondialog.cpp +++ b/tools/designer/src/designer/versiondialog.cpp @@ -113,15 +113,14 @@ void VersionLabel::mouseReleaseEvent(QMouseEvent *me) if (!secondStage) { m_path.lineTo(me->pos()); bool gotIt = true; - QPoint pt; - foreach(pt, hitPoints) { + foreach(const QPoint &pt, hitPoints) { if (!m_path.contains(pt)) { gotIt = false; break; } } if (gotIt) { - foreach(pt, missPoints) { + foreach(const QPoint &pt, missPoints) { if (m_path.contains(pt)) { gotIt = false; break; diff --git a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp index 608ecd7..cd95f5b 100644 --- a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp @@ -675,7 +675,7 @@ void QDesignerTaskMenu::navigateToSlot(QDesignerFormEditorInterface *core, const QString signalSignature = selectedItem->text(0); const QStringList parameterNames = qVariantValue(selectedItem->data(0, Qt::UserRole)); - // TODO: Check wether signal is connected to slot + // TODO: Check whether signal is connected to slot integr->emitNavigateToSlot(objectName, signalSignature, parameterNames); } } diff --git a/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h b/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h index 9c02467..0df5e0a 100644 --- a/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h +++ b/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h @@ -51,7 +51,7 @@ class Q3TablePlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3TablePlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3TablePlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h index 3b47f74..3a2ffe0 100644 --- a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h +++ b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h @@ -51,7 +51,7 @@ class Q3ToolBarPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3ToolBarPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3ToolBarPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h index c750cfe..f4695de 100644 --- a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h +++ b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h @@ -133,7 +133,7 @@ class Q3DateTimeEditPlugin: public QObject, public QDesignerCustomWidgetInterfac Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3DateTimeEditPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3DateTimeEditPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; @@ -186,7 +186,7 @@ class Q3GroupBoxPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3GroupBoxPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3GroupBoxPlugin(const QIcon &icon, QObject *parent = 0); virtual ~Q3GroupBoxPlugin(); virtual QString name() const; @@ -239,7 +239,7 @@ class Q3TextBrowserPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3TextBrowserPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3TextBrowserPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h b/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h index 56dd7fb..d61b4a1 100644 --- a/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h +++ b/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h @@ -51,7 +51,7 @@ class Q3WidgetStackPlugin: public QObject, public QDesignerCustomWidgetInterface Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: - Q3WidgetStackPlugin(const QIcon &icon, QObject *parent = 0); + explicit Q3WidgetStackPlugin(const QIcon &icon, QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h index e8cf4fa..f96ba74 100644 --- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h +++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h @@ -71,7 +71,7 @@ class Q3WizardExtraInfo: public QObject, public QDesignerExtraInfoExtension Q_OBJECT Q_INTERFACES(QDesignerExtraInfoExtension) public: - Q3WizardExtraInfo(Q3Wizard *wizard, QDesignerFormEditorInterface *core, QObject *parent); + explicit Q3WizardExtraInfo(Q3Wizard *wizard, QDesignerFormEditorInterface *core, QObject *parent); virtual QWidget *widget() const; virtual Q3Wizard *wizard() const; diff --git a/tools/shared/findwidget/abstractfindwidget.h b/tools/shared/findwidget/abstractfindwidget.h index 6cc7c94..089947d 100644 --- a/tools/shared/findwidget/abstractfindwidget.h +++ b/tools/shared/findwidget/abstractfindwidget.h @@ -70,7 +70,7 @@ public: }; Q_DECLARE_FLAGS(FindFlags, FindFlag) - AbstractFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); + explicit AbstractFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); virtual ~AbstractFindWidget(); bool eventFilter(QObject *object, QEvent *e); diff --git a/tools/shared/findwidget/itemviewfindwidget.h b/tools/shared/findwidget/itemviewfindwidget.h index 9d63d62..2d06df8 100644 --- a/tools/shared/findwidget/itemviewfindwidget.h +++ b/tools/shared/findwidget/itemviewfindwidget.h @@ -55,7 +55,7 @@ class ItemViewFindWidget : public AbstractFindWidget Q_OBJECT public: - ItemViewFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); + explicit ItemViewFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); QAbstractItemView *itemView() const { return m_itemView; } -- cgit v0.12 From b5298dcf3d29b253a31974762cc9227b25f94e93 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 5 Nov 2009 11:22:28 +0100 Subject: Add visibility-inlines-hidden for GCCE on Symbian OS Reviewed-by: axis --- mkspecs/common/symbian/symbian.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index b5d12fb..8760603 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -30,6 +30,7 @@ QMAKE_CXX = g++ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS.CW = QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden +QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -- cgit v0.12 From e63ea3587444e122242a137a699b5a717d3d26bd Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 1 Feb 2010 12:51:38 +0200 Subject: Fixed no-timeout case for QProcess::waitForFinished in Symbian QProcess::waitForFinished was panicking in Symbian when timeout of -1 was supplied. Fixed it to disable timeout and block until process exit, as docs indicate it should. Task-number: QTBUG-7667 Reviewed-by: Janne Anttila --- src/corelib/io/qprocess_symbian.cpp | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp index ddced73..75cde51 100644 --- a/src/corelib/io/qprocess_symbian.cpp +++ b/src/corelib/io/qprocess_symbian.cpp @@ -919,34 +919,41 @@ bool QProcessPrivate::waitForFinished(int msecs) Q_Q(QProcess); QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(%d)", msecs); - TRequestStatus timerStatus = 0; - TRequestStatus logonStatus = 0; + TRequestStatus timerStatus = KErrNone; + TRequestStatus logonStatus = KErrNone; bool timeoutOccurred = false; // Logon to process to observe its death if (qt_rprocess_running(symbianProcess)) { symbianProcess->Logon(logonStatus); - // Create timer - RTimer timer; - timer.CreateLocal(); - TTimeIntervalMicroSeconds32 interval(msecs*1000); - timer.After(timerStatus, interval); + if (msecs < 0) { + // If timeout is negative, there is no timeout + QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (just logon)..."); + User::WaitForRequest(logonStatus); + QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed"); + } else { + // Create timer + RTimer timer; + timer.CreateLocal(); + TTimeIntervalMicroSeconds32 interval(msecs*1000); + timer.After(timerStatus, interval); - QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting..."); - User::WaitForRequest(logonStatus, timerStatus); - QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed"); + QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (logon + timer)..."); + User::WaitForRequest(logonStatus, timerStatus); + QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed"); - if (timerStatus == KErrNone) - timeoutOccurred = true; + if (timerStatus == KErrNone) + timeoutOccurred = true; - timer.Cancel(); - timer.Close(); + timer.Cancel(); + timer.Close(); - symbianProcess->LogonCancel(logonStatus); + symbianProcess->LogonCancel(logonStatus); - // Eat cancel request completion so that it won't mess up main thread scheduling later - User::WaitForRequest(logonStatus, timerStatus); + // Eat cancel request completion so that it won't mess up main thread scheduling later + User::WaitForRequest(logonStatus, timerStatus); + } } else { QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(), qt_rprocess_running returned false"); } -- cgit v0.12 From d785467dbb97d4be9de66504dd6fb891da19abff Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 1 Feb 2010 12:49:37 +0100 Subject: fix crash in Phonon::DS9 backend When using a VideoWidget in a QGraphicsProxyWidget, then Phonon::DS9 crashed, if the VideoWidget didn't have a MediaSource. Reviewed-by: Thierry --- src/3rdparty/phonon/ds9/videowidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp index 091be16..95423c6 100644 --- a/src/3rdparty/phonon/ds9/videowidget.cpp +++ b/src/3rdparty/phonon/ds9/videowidget.cpp @@ -218,6 +218,9 @@ namespace Phonon if (toNative && m_noNativeRendererSupported) return current; //no switch here + if (!mediaObject()) + return current; + //firt we delete the renderer //initialization of the widgets for(int i = 0; i < FILTER_COUNT; ++i) { -- cgit v0.12 From 4beac591e47713121ad00ef3df744f7f4d11f2fd Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 1 Feb 2010 13:15:17 +0100 Subject: Only set the _WIN32_WINNT define if it is not set or less than 0x0400 By checking the define before setting it, it ensures that its not set to one that is actually lower than the value currently set to. Reviewed-by: kkoehne --- src/corelib/thread/qthread_win.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index b276f0a..37d5b87 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -40,7 +40,9 @@ ****************************************************************************/ //#define WINVER 0x0500 +#if _WIN32_WINNT < 0x0400 #define _WIN32_WINNT 0x0400 +#endif #include "qthread.h" -- cgit v0.12 From b67bd25be08b54c3e6e49b2b9429e54ff58db268 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 1 Feb 2010 13:17:51 +0100 Subject: Fix a problem with overlay icons in the fileiconprovider Adding SHGFI_OVERLAYINDEX will append a system overlay identifier to the hIcon member, giving us a unique cache id for overlayed icons. Without this we could end up with having random overlays on icons depending on which one we loaded first. Task-number: QTBUG-7663 Reviewed-by: prasanth --- src/gui/itemviews/qfileiconprovider.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index 360ed14..fcc61e5 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -65,6 +65,7 @@ #ifndef SHGFI_ADDOVERLAYS # define SHGFI_ADDOVERLAYS 0x000000020 +# define SHGFI_OVERLAYINDEX 0x000000040 #endif QT_BEGIN_NAMESPACE @@ -248,7 +249,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const //Get the small icon #ifndef Q_OS_WINCE val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, - sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS); + sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX); #else val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX); @@ -287,7 +288,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const //Get the big icon #ifndef Q_OS_WINCE val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, - sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS); + sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX); #else val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX); -- cgit v0.12 From 59d3c69f0294f930c81ac14269ba20d376d1c13c Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 1 Feb 2010 13:04:30 +0100 Subject: Fixing test to be runnable on Symbian devices. One of the cases is using too much memory so it had to be trimmed down. Reviewed-by: TrustMe --- tests/benchmarks/qscriptengine/qscriptengine.pro | 5 +++++ tests/benchmarks/qscriptengine/tst_qscriptengine.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/benchmarks/qscriptengine/qscriptengine.pro b/tests/benchmarks/qscriptengine/qscriptengine.pro index 22bbccd..df6dbb3 100644 --- a/tests/benchmarks/qscriptengine/qscriptengine.pro +++ b/tests/benchmarks/qscriptengine/qscriptengine.pro @@ -5,3 +5,8 @@ TARGET = tst_qscriptengine SOURCES += tst_qscriptengine.cpp QT += script + +symbian* { + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB + TARGET.EPOCSTACKSIZE = 0x14000 +} diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp index b42a355..6c6f0b1 100644 --- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp +++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp @@ -256,8 +256,13 @@ void tst_QScriptEngine::nativeCall() QScriptEngine eng; eng.globalObject().setProperty("fun", eng.newFunction(native_function)); QBENCHMARK{ +#if !defined(Q_OS_SYMBIAN) eng.evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n" " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); +#else + eng.evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n" + " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); +#endif } } -- cgit v0.12 From 60ce0571065f11d8a6bf4fe40c059bd6563d9b42 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 1 Feb 2010 13:13:46 +0100 Subject: Fixing benchmark to be runnable on Symbian device Deployment had to be done in proper way. Reviewed-by: TrustMe --- tests/benchmarks/qstring/main.cpp | 6 ++++++ tests/benchmarks/qstring/qstring.pro | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/qstring/main.cpp b/tests/benchmarks/qstring/main.cpp index 298c784..12826eb 100644 --- a/tests/benchmarks/qstring/main.cpp +++ b/tests/benchmarks/qstring/main.cpp @@ -42,6 +42,12 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Application private dir is default serach path for files, so SRCDIR can be set to empty +#define SRCDIR "" +#endif + class tst_QString: public QObject { Q_OBJECT diff --git a/tests/benchmarks/qstring/qstring.pro b/tests/benchmarks/qstring/qstring.pro index 6aad1c0..2e7c86a 100644 --- a/tests/benchmarks/qstring/qstring.pro +++ b/tests/benchmarks/qstring/qstring.pro @@ -5,8 +5,12 @@ SOURCES += main.cpp wince*:{ DEFINES += SRCDIR=\\\"\\\" +} else:symbian* { + addFiles.sources = utf-8.txt + addFiles.path = . + DEPLOYMENT += addFiles + TARGET.EPOCHEAPSIZE="0x100 0x1000000" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } - -- cgit v0.12 From 9904192f956a75a3e007e1aec99ab7db433048ce Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 1 Feb 2010 14:36:44 +0200 Subject: Fixed the URL of known issues wiki page in docs Changed the URL to be version independent. Task-number: QTBUG-7295 Reviewed-by: TrustMe --- doc/src/getting-started/known-issues.qdoc | 4 ++-- doc/src/platforms/platform-notes.qdoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc index 5503ab9..b73e15d 100644 --- a/doc/src/getting-started/known-issues.qdoc +++ b/doc/src/getting-started/known-issues.qdoc @@ -52,7 +52,7 @@ on the Qt website. An overview of known issues may also be found at: - \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues} + \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} {Known Issues Wiki}. \section1 Installation Issues @@ -160,6 +160,6 @@ \list \o Check known issues for Symbian at - \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues} {Known Issues Wiki}. + \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} {Known Issues Wiki}. \endlist */ diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 6ea3df4..e08bf1a 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -490,7 +490,7 @@ \section1 Known Issues Known issues can be found by visiting the - \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}{wiki page} with an + \l{http://qt.gitorious.org/qt/pages/QtKnownIssues}{wiki page} with an up-to-date list of known issues, and the list of bugs can be found by \l{http://bugreports.qt.nokia.com/browse/QTBUG/component/19171}{browsing} the S60 component in Qt's public task tracker, located at -- cgit v0.12 From c830656616977d417972e2497ff3135bc562a660 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jan 2010 21:32:20 +0100 Subject: optimize qhash() on any modern architecture, an 1 out of 16 times needlessly executed shift (even if a long one) and xor are less expensive than a pretty much randomly 1 out of 16 times differently taken conditional jump. so simply remove the conditional. ~15% faster on Core2. Reviewed-by: joao --- src/corelib/tools/qhash.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index d758325..6231471 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -68,8 +68,8 @@ static uint hash(const uchar *p, int n) while (n--) { h = (h << 4) + *p++; - if ((g = (h & 0xf0000000)) != 0) - h ^= g >> 23; + g = h & 0xf0000000; + h ^= g >> 23; h &= ~g; } return h; @@ -82,8 +82,8 @@ static uint hash(const QChar *p, int n) while (n--) { h = (h << 4) + (*p++).unicode(); - if ((g = (h & 0xf0000000)) != 0) - h ^= g >> 23; + g = h & 0xf0000000; + h ^= g >> 23; h &= ~g; } return h; -- cgit v0.12 From 0d772fe5d362861c0b59374a25ec4d0e0ba05181 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jan 2010 17:38:17 +0100 Subject: micro-optimization move up the headerdone setting, so the compiler can do tail-merging of the branches --- src/corelib/codecs/qutfcodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index f7d3b06..f88fa8d 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -326,6 +326,7 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert ch.setCell(*chars++); } if (!headerdone) { + headerdone = true; if (endian == DetectEndianness) { if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) { endian = LittleEndianness; @@ -344,7 +345,6 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert } else if (ch != QChar::ByteOrderMark) { *qch++ = ch; } - headerdone = true; } else { *qch++ = ch; } -- cgit v0.12 From 3c0370bd3d0ee83b84ea7c1cc579be51768df183 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jan 2010 17:41:13 +0100 Subject: remove pointless conditionals we already know that (endian == DetectEndianness) - we tested it 1 resp 3 lines above ... Reviewed-By: denis --- src/corelib/codecs/qutfcodec.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index f88fa8d..7655c51 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -328,10 +328,9 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert if (!headerdone) { headerdone = true; if (endian == DetectEndianness) { - if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) { + if (ch == QChar::ByteOrderSwapped) { endian = LittleEndianness; - } else if (ch == QChar::ByteOrderMark && endian != LittleEndianness) { - // ignore BOM + } else if (ch == QChar::ByteOrderMark) { endian = BigEndianness; } else { if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { -- cgit v0.12 From 984689f01ce31cade5452633dd43f676bdb75b73 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jan 2010 18:01:47 +0100 Subject: remove duplicated calculation of length --- src/corelib/tools/qlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index f1df9bd..c302857 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -208,7 +208,7 @@ void **QListData::append2(const QListData& l) int n = l.d->end - l.d->begin; if (n) { if (e + n > d->alloc) - realloc(grow(e + l.d->end - l.d->begin)); + realloc(grow(e + n)); d->end += n; } return d->array + e; -- cgit v0.12 From 45591e13862963fb29c13e0c5bfe39330883c579 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 29 Jan 2010 13:07:28 +0100 Subject: document QString::fromUtf16() slowness --- src/corelib/tools/qstring.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index b9dd4d1..44e4d16 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3857,6 +3857,12 @@ QString QString::fromUtf8(const char *str, int size) If \a size is -1 (default), \a unicode must be terminated with a 0. + This function checks for a Byte Order Mark (BOM). If it is missing, + host byte order is assumed. + + This function is comparatively slow. + Use QString(const ushort *, int) if possible. + QString makes a deep copy of the Unicode data. \sa utf16(), setUtf16() @@ -3923,6 +3929,9 @@ QString& QString::setUnicode(const QChar *unicode, int size) If \a unicode is 0, nothing is copied, but the string is still resized to \a size. + Note that unlike fromUtf16(), this function does not consider BOMs and + possibly differing byte ordering. + \sa utf16(), setUnicode() */ @@ -4669,6 +4678,8 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1, Returns the QString as a '\\0\'-terminated array of unsigned shorts. The result remains valid until the string is modified. + The returned string is in host byte order. + \sa unicode() */ -- cgit v0.12 From e0fda52fde32458c4a42f04bd62b5e37f14c4bfd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 29 Jan 2010 16:44:12 +0100 Subject: optimization: get rid of QString::fromUtf16() usage QString::fromUtf16() is slow - it does a BOM check and optionally byte swapping, which is utterly pointless when converting internal data structures which are raw utf16 in host byte order anyway. so replace it with QString::fromRawData() (for short-lived strings) or QString(const QChar *, int) (otherwise) if possible. Reviewed-by: axis Reviewed-by: mariusSO Reviewed-by: Bill King --- examples/network/qftp/sym_iap_util.h | 2 +- src/corelib/io/qprocess_unix.cpp | 2 +- src/corelib/kernel/qcore_symbian_p.cpp | 2 +- src/corelib/kernel/qcoreapplication.cpp | 3 ++- src/corelib/kernel/qtranslator.cpp | 2 +- src/corelib/tools/qstring.cpp | 4 ++-- src/gui/itemviews/qitemdelegate.cpp | 2 +- src/gui/kernel/qclipboard_s60.cpp | 3 ++- src/gui/kernel/qdnd_x11.cpp | 2 +- src/gui/kernel/qmime_mac.cpp | 4 ++-- src/sql/drivers/sqlite/qsql_sqlite.cpp | 4 ++-- src/sql/kernel/qsqlresult.cpp | 2 +- tools/linguist/shared/qm.cpp | 2 +- 13 files changed, 18 insertions(+), 16 deletions(-) diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h index 8079d2c..41e43a9 100644 --- a/examples/network/qftp/sym_iap_util.h +++ b/examples/network/qftp/sym_iap_util.h @@ -298,7 +298,7 @@ QString qt_TDesC2QStringL(const TDesC& aDescriptor) #ifdef QT_NO_UNICODE return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length()); #else - return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length()); + return QString((const QChar *)aDescriptor.Ptr(), aDescriptor.Length()); #endif } diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 0bf7d3f..5119ec0 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -783,7 +783,7 @@ bool QProcessPrivate::processStarted() // did we read an error message? if (i > 0) - q_func()->setErrorString(QString::fromUtf16(buf, i / sizeof(QChar))); + q_func()->setErrorString(QString((const QChar *)buf, i / sizeof(QChar))); return i <= 0; } diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp index 5d2a6a5..0257ac4 100644 --- a/src/corelib/kernel/qcore_symbian_p.cpp +++ b/src/corelib/kernel/qcore_symbian_p.cpp @@ -71,7 +71,7 @@ Q_CORE_EXPORT QString qt_TDesC2QString(const TDesC& aDescriptor) #ifdef QT_NO_UNICODE return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length()); #else - return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length()); + return QString(reinterpret_cast(aDescriptor.Ptr()), aDescriptor.Length()); #endif } diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 005dedc..5c65416 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2219,7 +2219,8 @@ QStringList QCoreApplication::libraryPaths() TFindFile finder(fs); TInt err = finder.FindByDir(tempPathPtr, tempPathPtr); while (err == KErrNone) { - QString foundDir = QString::fromUtf16(finder.File().Ptr(), finder.File().Length()); + QString foundDir(reinterpret_cast(finder.File().Ptr()), + finder.File().Length()); foundDir = QDir(foundDir).canonicalPath(); if (!app_libpaths->contains(foundDir)) app_libpaths->append(foundDir); diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index b7e6ea0..7d1e1d3 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -633,7 +633,7 @@ static QString getMessage(const uchar *m, const uchar *end, const char *context, end: if (!tn) return QString(); - QString str = QString::fromUtf16((const ushort *)tn, tn_length/2); + QString str = QString((const QChar *)tn, tn_length/2); if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) { for (int i = 0; i < str.length(); ++i) str[i] = QChar((str.at(i).unicode() >> 8) + ((str.at(i).unicode() << 8) & 0xff00)); diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 44e4d16..3388500 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -885,7 +885,7 @@ int QString::grow(int size) QString QString::fromWCharArray(const wchar_t *string, int size) { if (sizeof(wchar_t) == sizeof(QChar)) { - return fromUtf16((ushort *)string, size); + return QString((const QChar *)string, size); } else { return fromUcs4((uint *)string, size); } @@ -7751,7 +7751,7 @@ QString QStringRef::toString() const { return QString(); if (m_size && m_position == 0 && m_size == m_string->size()) return *m_string; - return QString::fromUtf16(reinterpret_cast(m_string->unicode() + m_position), m_size); + return QString(m_string->unicode() + m_position, m_size); } diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index 6fd26a7..9069ce4 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -1033,7 +1033,7 @@ static QString qPixmapSerial(quint64 i, bool enabled) i >>= 4; } - return QString::fromUtf16(ptr, int(&arr[sizeof(arr) / sizeof(ushort)] - ptr)); + return QString((const QChar *)ptr, int(&arr[sizeof(arr) / sizeof(ushort)] - ptr)); } /*! diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp index 71c355b..f07e066 100644 --- a/src/gui/kernel/qclipboard_s60.cpp +++ b/src/gui/kernel/qclipboard_s60.cpp @@ -164,7 +164,8 @@ void readFromStreamLX(QMimeData* aData,RReadStream& aStream) TCardinality mimeTypeSize; aStream >> mimeTypeSize; HBufC* mimeTypeBuf = HBufC::NewLC(aStream,mimeTypeSize); - QString mimeType = QString::fromUtf16(mimeTypeBuf->Des().Ptr(),mimeTypeBuf->Length()); + QString mimeType = QString(reinterpret_cast(mimeTypeBuf->Des().Ptr()), + mimeTypeBuf->Length()); CleanupStack::PopAndDestroy(mimeTypeBuf); // mime data TCardinality dataSize; diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index edab6a0..33968bd 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -617,7 +617,7 @@ QVariant QX11Data::xdndMimeConvertToFormat(Atom a, const QByteArray &data, const // so it should be safe to check that the second char is 0 // to verify that it is utf16 if (data.size() > 1 && data.at(1) == 0) - return QString::fromUtf16(reinterpret_cast(data.constData()), + return QString::fromRawData((const QChar *)data.constData(), data.size() / 2).split(QLatin1Char('\n')).first().toLatin1(); } } diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp index 0431f2f..071f80d 100644 --- a/src/gui/kernel/qmime_mac.cpp +++ b/src/gui/kernel/qmime_mac.cpp @@ -431,8 +431,8 @@ QVariant QMacPasteboardMimeUnicodeText::convertToMime(const QString &mimetype, Q firstData.size(), CFStringGetSystemEncoding(), false)); ret = QString(str); } else if (flavor == QLatin1String("public.utf16-plain-text")) { - ret = QString::fromUtf16(reinterpret_cast(firstData.constData()), - firstData.size() / sizeof(ushort)); + ret = QString(reinterpret_cast(firstData.constData()), + firstData.size() / sizeof(QChar)); } else { qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype)); } diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 9dbefaf..9fff552 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -245,9 +245,9 @@ bool QSQLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int i values[i + idx] = QVariant(QVariant::String); break; default: - values[i + idx] = QString::fromUtf16(static_cast( + values[i + idx] = QString(reinterpret_cast( sqlite3_column_text16(stmt, i)), - sqlite3_column_bytes16(stmt, i) / sizeof(ushort)); + sqlite3_column_bytes16(stmt, i) / sizeof(QChar)); break; } } diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 5f12b55..3d63f88 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -136,7 +136,7 @@ static QString qFieldSerial(int i) i >>= 4; } - return QString::fromUtf16(arr, int(ptr - arr) + 1); + return QString(reinterpret_cast(arr), int(ptr - arr) + 1); } static bool qIsAlnum(QChar ch) diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp index 8118576..de1284f 100644 --- a/tools/linguist/shared/qm.cpp +++ b/tools/linguist/shared/qm.cpp @@ -594,7 +594,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) return false; } m += 4; - QString str = QString::fromUtf16((const ushort *)m, len/2); + QString str = QString((const QChar *)m, len/2); if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) { for (int i = 0; i < str.length(); ++i) str[i] = QChar((str.at(i).unicode() >> 8) + -- cgit v0.12 From afe0f17eb5974adbedd1bc1f2fcd98459d92df47 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Mon, 1 Feb 2010 14:30:15 +0100 Subject: Fixed garbled 3D Qt logo in the overpainting example. Disable vertex attribute arrays in the GL2 paint engine when calling QPainter::beginNativePainting() and QPainter::end(). Task-number: QTBUG-7781 Reviewed-by: Trond --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b282676..35e95be 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -558,6 +558,9 @@ void QGL2PaintEngineExPrivate::resetGLState() glStencilMask(0xff); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); glStencilFunc(GL_ALWAYS, 0, 0xff); + glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR); + glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR); + glDisableVertexAttribArray(QT_OPACITY_ATTR); } void QGL2PaintEngineEx::endNativePainting() -- cgit v0.12 From b8102ec6d2f01a0aedf2ecd5bbf16d3a5f6c296e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 1 Feb 2010 14:52:17 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( afc4c208fe296f5a1dd0e73f2bd1273bd22d9b24 ) Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-01-28 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Do not set the combobox font on Maemo5 and S60; use the default instead. * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopup::populate): 2010-01-28 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Support kinetic scrolling on Maemo 5 https://bugs.webkit.org/show_bug.cgi?id=34267 Patch by Ralf Engels and Robert Griebl * Api/qwebview.cpp: (QWebViewKineticScroller::QWebViewKineticScroller): (QWebViewKineticScroller::eventFilter): (QWebViewKineticScroller::currentFrame): (QWebViewKineticScroller::scrollingFrameAt): (QWebViewKineticScroller::attachToWidget): (QWebViewKineticScroller::removeFromWidget): (QWebViewKineticScroller::positionRange): (QWebViewKineticScroller::position): (QWebViewKineticScroller::viewportSize): (QWebViewKineticScroller::setPosition): (QWebView::QWebView): 2010-01-29 Kenneth Rohde Christiansen Reviewed by Simon Hausmann Disable auto-uppercase and predictive text on Maemo5, just like the build-in MicroB Browser. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::setInputMethodState): --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 14 +++ src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp | 2 +- .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 18 ++-- .../webkit/WebCore/platform/qt/QWebPopup.cpp | 2 + src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 104 +++++++++++++++++++++ src/3rdparty/webkit/WebKit/qt/ChangeLog | 44 +++++++++ .../WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 7 +- 8 files changed, 181 insertions(+), 12 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 128df75..2a3c73b 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - ca7b2e1e1ca558050cf49dd8f7c9b35e4b9d4df5 + afc4c208fe296f5a1dd0e73f2bd1273bd22d9b24 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 40a2149..bded3d8 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2010-01-29 Oswald Buddenhagen + + Reviewed by Simon Hausmann. + + [Qt] Speed up the WebCore::String -> QString conversion + + Use QString(const QChar *, int len) constructor instead of QString::fromUtf16 to + avoid BOM checks and byteswapping. + + * bridge/qt/qt_class.cpp: + (JSC::Bindings::QtClass::fieldNamed): + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::convertValueToQVariant): + 2010-01-14 Andreas Kling Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp index c39b3af..09a1544 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp @@ -127,7 +127,7 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con QObject* obj = qtinst->getObject(); UString ustring = identifier.ustring(); - QString objName(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size())); + QString objName((const QChar*)ustring.rep()->data(), ustring.size()); QByteArray ba = objName.toAscii(); // First check for a cached field diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index 6887325..ee7aa1a 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -305,7 +305,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type return QString(); } else { UString ustring = value.toString(exec); - ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size())); + ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size())); if (type == String) dist = 0; else @@ -329,7 +329,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type QVariant v = convertValueToQVariant(exec, val, QMetaType::Void, &objdist, visitedObjects); if (objdist >= 0) { UString ustring = (*it).ustring(); - QString id = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString id = QString((const QChar*)ustring.rep()->data(), ustring.size()); result.insert(id, v); } } @@ -404,7 +404,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type for (int i = 0; i < len; ++i) { JSValue val = rtarray->getConcreteArray()->valueAt(exec, i); UString ustring = val.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); result.append(qstring); } @@ -418,7 +418,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type for (int i = 0; i < len; ++i) { JSValue val = array->get(exec, i); UString ustring = val.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); result.append(qstring); } @@ -427,7 +427,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type } else { // Make a single length array UString ustring = value.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); QStringList result; result.append(qstring); ret = QVariant(result); @@ -443,7 +443,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type dist = 0; } else { UString ustring = value.toString(exec); - ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()).toLatin1()); + ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()).toLatin1()); if (type == String) dist = 5; else @@ -485,7 +485,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type } } else if (type == String) { UString ustring = value.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); if (hint == QMetaType::QDateTime) { QDateTime dt = QDateTime::fromString(qstring, Qt::ISODate); @@ -534,7 +534,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type */ // Attempt to convert.. a bit risky UString ustring = value.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); // this is of the form '/xxxxxx/i' int firstSlash = qstring.indexOf(QLatin1Char('/')); @@ -554,7 +554,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type } } else if (type == String) { UString ustring = value.toString(exec); - QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size()); QRegExp re(qstring); if (re.isValid()) { diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp index f6a8167..48bca19 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp @@ -36,7 +36,9 @@ QWebPopup::QWebPopup(PopupMenuClient* client) { Q_ASSERT(m_client); +#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) setFont(m_client->menuStyle().font().font()); +#endif connect(this, SIGNAL(activated(int)), SLOT(activeChanged(int)), Qt::QueuedConnection); } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 1d4b46f..79538ff 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -57,6 +57,106 @@ void QWebViewPrivate::_q_pageDestroyed() view->setPage(0); } +#ifdef Q_WS_MAEMO_5 +#include "qabstractkineticscroller.h" + +class QWebViewKineticScroller : public QAbstractKineticScroller { +public: + QWebViewKineticScroller() : QAbstractKineticScroller() {} + // remember the frame where the button was pressed + bool eventFilter(QObject* o, QEvent* ev) + { + switch (ev->type()) { + case QEvent::MouseButtonPress: { + QWebFrame* hitFrame = scrollingFrameAt(static_cast(ev)->pos()); + if (hitFrame) + m_frame = hitFrame; + break; + } + default: + break; + } + return QAbstractKineticScroller::eventFilter(o, ev); + } + +protected: + QWebFrame* currentFrame() const + { + if (!m_frame.isNull()) + return m_frame.data(); + + QWebView* view = static_cast(widget()); + QWebFrame* frame = view->page()->mainFrame(); + return frame; + } + + // Returns the innermost frame at the given position that can scroll. + QWebFrame* scrollingFrameAt(const QPoint& pos) const + { + QWebView* view = static_cast(widget()); + QWebFrame* mainFrame = view->page()->mainFrame(); + QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame(); + QSize range = hitFrame->contentsSize() - hitFrame->geometry().size(); + + while (hitFrame && range.width() <= 1 && range.height() <= 1) + hitFrame = hitFrame->parentFrame(); + + return hitFrame; + } + + void attachToWidget() + { + QWebView* view = static_cast(widget()); + QWebFrame* mainFrame = view->page()->mainFrame(); + m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal); + m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical); + mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); + mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); + view->installEventFilter(this); + } + + void removeFromWidget() + { + QWebView* view = static_cast(widget()); + view->removeEventFilter(this); + QWebFrame* mainFrame = view->page()->mainFrame(); + mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy); + mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy); + } + + QRect positionRange() const + { + QRect r; + QWebFrame* frame = currentFrame(); + r.setSize(frame->contentsSize() - frame->geometry().size()); + return r; + } + + QPoint position() const + { + QWebFrame* frame = currentFrame(); + return frame->scrollPosition(); + } + + QSize viewportSize() const + { + return static_cast(widget())->page()->viewportSize(); + } + + void setPosition(const QPoint& point, const QPoint& /* overShootDelta */) + { + QWebFrame* frame = currentFrame(); + frame->setScrollPosition(point); + } + + QPointer m_frame; + Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy; + Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy; +}; + +#endif // Q_WS_MAEMO_5 + + /*! \class QWebView \since 4.4 @@ -153,6 +253,10 @@ QWebView::QWebView(QWidget *parent) setAttribute(Qt::WA_InputMethodEnabled); #endif +#if defined(Q_WS_MAEMO_5) + QAbstractKineticScroller* scroller = new QWebViewKineticScroller(); + scroller->setWidget(this); +#endif setAcceptDrops(true); setMouseTracking(true); diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 697570f..1026ac5 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,47 @@ +2010-01-28 Kenneth Rohde Christiansen + + Reviewed by Simon Hausmann. + + Do not set the combobox font on Maemo5 and S60; use the + default instead. + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::populate): + +2010-01-28 Andreas Kling + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Support kinetic scrolling on Maemo 5 + + https://bugs.webkit.org/show_bug.cgi?id=34267 + + Patch by Ralf Engels and + Robert Griebl + + * Api/qwebview.cpp: + (QWebViewKineticScroller::QWebViewKineticScroller): + (QWebViewKineticScroller::eventFilter): + (QWebViewKineticScroller::currentFrame): + (QWebViewKineticScroller::scrollingFrameAt): + (QWebViewKineticScroller::attachToWidget): + (QWebViewKineticScroller::removeFromWidget): + (QWebViewKineticScroller::positionRange): + (QWebViewKineticScroller::position): + (QWebViewKineticScroller::viewportSize): + (QWebViewKineticScroller::setPosition): + (QWebView::QWebView): + +2010-01-29 Kenneth Rohde Christiansen + + Reviewed by Simon Hausmann + + Disable auto-uppercase and predictive text on Maemo5, just like the + build-in MicroB Browser. + + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::setInputMethodState): + 2010-01-28 Trond Kjernåsen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 34241f0..2d1a1eb 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -615,7 +615,12 @@ void EditorClientQt::setInputMethodState(bool active) } } webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); -#endif +#ifdef Q_WS_MAEMO_5 + // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we. + webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true); + webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true); +#endif // Q_WS_MAEMO_5 +#endif // QT_VERSION check webPageClient->setInputMethodEnabled(active); } emit m_page->microFocusChanged(); -- cgit v0.12 From a70a97cceccced13429b88f99373650d39da2f75 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 1 Feb 2010 14:37:57 +0000 Subject: Deployed QtMultimedia.dll on Symbian Task-number: QT-2813 Reviewed-by: trustme --- src/s60installs/s60installs.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index aaecf6c..5318693 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -114,6 +114,10 @@ symbian: { graphicssystems_plugins.sources += qvggraphicssystem.dll } + contains(QT_CONFIG, multimedia) { + qtlibraries.sources += QtMultimedia.dll + } + BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" BLD_INF_RULES.prj_exports += "qtdemoapps.iby $$CORE_APP_LAYER_IBY_EXPORT_PATH(qtdemoapps.iby)" } -- cgit v0.12 From 00c4f1dbd8484ec887aea259021f5089334f45d7 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 1 Feb 2010 17:03:12 +0200 Subject: Documented limitations of add/setLibraryPath(s) on Symbian OS Symbian OS limits applications to loading libraries only from /sys/bin directory, so user defined library paths can only be useful for locating Qt extension plugin stubs. Task-number: QTBUG-7517 Reviewed-by: Janne Koskinen --- src/corelib/kernel/qcoreapplication.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 005dedc..e3137f0 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2267,6 +2267,10 @@ QStringList QCoreApplication::libraryPaths() \a paths. All existing paths will be deleted and the path list will consist of the paths given in \a paths. + In Symbian this function is only useful for setting paths for + finding Qt extension plugin stubs, since the OS can only + load libraries from the \c{/sys/bin} directory. + \sa libraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary */ void QCoreApplication::setLibraryPaths(const QStringList &paths) @@ -2290,6 +2294,10 @@ void QCoreApplication::setLibraryPaths(const QStringList &paths) is \c INSTALL/plugins, where \c INSTALL is the directory where Qt was installed. + In Symbian this function is only useful for adding paths for + finding Qt extension plugin stubs, since the OS can only + load libraries from the \c{/sys/bin} directory. + \sa removeLibraryPath(), libraryPaths(), setLibraryPaths() */ void QCoreApplication::addLibraryPath(const QString &path) -- cgit v0.12 From ff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 1 Feb 2010 17:41:13 +0100 Subject: Assistant: Use const references in foreach loops. Reviewed-by: kh1 --- examples/assistant/simpletextviewer/findfiledialog.cpp | 4 ++-- tools/assistant/lib/qhelpcollectionhandler.cpp | 10 +++++----- tools/assistant/lib/qhelpcontentwidget.cpp | 2 +- tools/assistant/lib/qhelpdbreader.cpp | 6 +++--- tools/assistant/lib/qhelpenginecore.cpp | 6 +++--- tools/assistant/lib/qhelpgenerator.cpp | 16 ++++++++-------- tools/assistant/lib/qhelpindexwidget.cpp | 8 ++++---- tools/assistant/lib/qhelpsearchindexreader_default.cpp | 16 ++++++++-------- tools/assistant/lib/qhelpsearchindexwriter_default.cpp | 10 +++++----- tools/assistant/lib/qhelpsearchquerywidget.cpp | 12 ++++++------ tools/assistant/lib/qhelpsearchresultwidget.cpp | 4 ++-- tools/assistant/tools/assistant/centralwidget.cpp | 2 +- 12 files changed, 48 insertions(+), 48 deletions(-) diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp index 939d90a..0f7bbae 100644 --- a/examples/assistant/simpletextviewer/findfiledialog.cpp +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp @@ -119,7 +119,7 @@ void FindFileDialog::update() void FindFileDialog::findFiles() { - QRegExp filePattern(fileNameComboBox->currentText() + "*"); + QRegExp filePattern(fileNameComboBox->currentText() + '*'); filePattern.setPatternSyntax(QRegExp::Wildcard); QDir directory(directoryComboBox->currentText()); @@ -127,7 +127,7 @@ void FindFileDialog::findFiles() QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks); QStringList matchingFiles; - foreach (QString file, allFiles) { + foreach (const QString &file, allFiles) { if (filePattern.exactMatch(file)) matchingFiles << file; } diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp index fe0c417..cb7e457 100644 --- a/tools/assistant/lib/qhelpcollectionhandler.cpp +++ b/tools/assistant/lib/qhelpcollectionhandler.cpp @@ -252,7 +252,7 @@ bool QHelpCollectionHandler::createTables(QSqlQuery *query) "Key TEXT PRIMARY KEY, " "Value BLOB )"); - foreach (QString q, tables) { + foreach (const QString &q, tables) { if (!query->exec(q)) return false; } @@ -323,7 +323,7 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName, idsToInsert.removeAll(m_query.value(1).toString()); } - foreach (QString id, idsToInsert) { + foreach (const QString &id, idsToInsert) { m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)")); m_query.bindValue(0, id); m_query.exec(); @@ -346,7 +346,7 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName, m_query.bindValue(0, nameId); m_query.exec(); - foreach (QString att, attributes) { + foreach (const QString &att, attributes) { m_query.prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)")); m_query.bindValue(0, nameId); m_query.bindValue(1, attributeMap[att]); @@ -400,7 +400,7 @@ bool QHelpCollectionHandler::registerDocumentation(const QString &fileName) return false; addFilterAttributes(reader.filterAttributes()); - foreach (QString filterName, reader.customFilters()) + foreach (const QString &filterName, reader.customFilters()) addCustomFilter(filterName, reader.filterAttributes(filterName)); optimizeDatabase(fileName); @@ -499,7 +499,7 @@ bool QHelpCollectionHandler::addFilterAttributes(const QStringList &attributes) while (m_query.next()) atts.insert(m_query.value(0).toString()); - foreach (QString s, attributes) { + foreach (const QString &s, attributes) { if (!atts.contains(s)) { m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)")); m_query.bindValue(0, s); diff --git a/tools/assistant/lib/qhelpcontentwidget.cpp b/tools/assistant/lib/qhelpcontentwidget.cpp index 3986afb..a80dc39 100644 --- a/tools/assistant/lib/qhelpcontentwidget.cpp +++ b/tools/assistant/lib/qhelpcontentwidget.cpp @@ -253,7 +253,7 @@ void QHelpContentProvider::run() const QStringList fileNames = m_helpEngine->orderedFileNameList; m_mutex.unlock(); - foreach (QString dbFileName, fileNames) { + foreach (const QString &dbFileName, fileNames) { m_mutex.lock(); if (m_abort) { m_abort = false; diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp index 904124b..6dd949a 100644 --- a/tools/assistant/lib/qhelpdbreader.cpp +++ b/tools/assistant/lib/qhelpdbreader.cpp @@ -515,7 +515,7 @@ QVariant QHelpDBReader::metaData(const QString &name) const QString QHelpDBReader::mergeList(const QStringList &list) const { QString str; - foreach (QString s, list) + foreach (const QString &s, list) str.append(QLatin1Char('\'') + quote(s) + QLatin1String("\', ")); if (str.endsWith(QLatin1String(", "))) str = str.left(str.length()-2); @@ -567,14 +567,14 @@ bool QHelpDBReader::createAttributesCache(const QStringList &attributes, bool needUpdate = !m_viewAttributes.count(); - foreach (QString s, attributes) + foreach (const QString &s, attributes) m_viewAttributes.remove(s); if (m_viewAttributes.count() || needUpdate) { m_viewAttributes.clear(); m_indicesCache = indexIds; } - foreach (QString s, attributes) + foreach (const QString &s, attributes) m_viewAttributes.insert(s); m_useAttributesCache = true; return true; diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp index 0911d59..b651aa3 100644 --- a/tools/assistant/lib/qhelpenginecore.cpp +++ b/tools/assistant/lib/qhelpenginecore.cpp @@ -362,7 +362,7 @@ QString QHelpEngineCore::documentationFileName(const QString &namespaceName) if (d->setup()) { const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations(); - foreach(const QHelpCollectionHandler::DocInfo info, docList) { + foreach(const QHelpCollectionHandler::DocInfo &info, docList) { if (info.namespaceName == namespaceName) { if (QDir::isAbsolutePath(info.fileName)) return QDir::cleanPath(info.fileName); @@ -386,7 +386,7 @@ QStringList QHelpEngineCore::registeredDocumentations() const if (!d->setup()) return list; const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations(); - foreach(const QHelpCollectionHandler::DocInfo info, docList) { + foreach(const QHelpCollectionHandler::DocInfo &info, docList) { list.append(info.namespaceName); } return list; @@ -531,7 +531,7 @@ QList QHelpEngineCore::files(const QString namespaceName, url.setAuthority(namespaceName); const QStringList files = reader->files(filterAttributes, extensionFilter); - foreach (const QString file, files) { + foreach (const QString &file, files) { url.setPath(QLatin1String("/") + file); res.append(url); } diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp index 324f67d..4b94ebf 100644 --- a/tools/assistant/lib/qhelpgenerator.cpp +++ b/tools/assistant/lib/qhelpgenerator.cpp @@ -203,7 +203,7 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData, addProgress(1.0); emit statusChanged(tr("Insert custom filters...")); - foreach (QHelpDataCustomFilter f, helpData->customFilters()) { + foreach (const QHelpDataCustomFilter &f, helpData->customFilters()) { if (!registerCustomFilter(f.name, f.filterAttributes, true)) { cleanupDB(); return false; @@ -367,7 +367,7 @@ bool QHelpGenerator::createTables() "Name Text, " "Value BLOB )"); - foreach (QString q, tables) { + foreach (const QString &q, tables) { if (!d->query->exec(q)) { d->error = tr("Cannot create tables!"); return false; @@ -629,7 +629,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName, idsToInsert.removeAll(d->query->value(1).toString()); } - foreach (QString id, idsToInsert) { + foreach (const QString &id, idsToInsert) { d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)")); d->query->bindValue(0, id); d->query->exec(); @@ -664,7 +664,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName, d->query->bindValue(0, nameId); d->query->exec(); - foreach (QString att, filterAttribs) { + foreach (const QString &att, filterAttribs) { d->query->prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)")); d->query->bindValue(0, nameId); d->query->bindValue(1, attributeMap[att]); @@ -687,7 +687,7 @@ bool QHelpGenerator::insertKeywords(const QList keywords, indexId = d->query->value(0).toInt() + 1; QList filterAtts; - foreach (QString filterAtt, filterAttributes) { + foreach (const QString &filterAtt, filterAttributes) { d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable WHERE Name=?")); d->query->bindValue(0, filterAtt); d->query->exec(); @@ -704,7 +704,7 @@ bool QHelpGenerator::insertKeywords(const QList keywords, int i = 0; d->query->exec(QLatin1String("BEGIN")); - foreach (QHelpDataIndexItem itm, keywords) { + foreach (const QHelpDataIndexItem &itm, keywords) { pos = itm.reference.indexOf(QLatin1Char('#')); fileName = itm.reference.left(pos); if (pos > -1) @@ -773,7 +773,7 @@ bool QHelpGenerator::insertContents(const QByteArray &ba, } // associate the filter attributes - foreach (QString filterAtt, filterAttributes) { + foreach (const QString &filterAtt, filterAttributes) { d->query->prepare(QLatin1String("INSERT INTO ContentsFilterTable (FilterAttributeId, ContentsId) " "SELECT Id, ? FROM FilterAttributeTable WHERE Name=?")); d->query->bindValue(0, contentId); @@ -798,7 +798,7 @@ bool QHelpGenerator::insertFilterAttributes(const QStringList &attributes) while (d->query->next()) atts.insert(d->query->value(0).toString()); - foreach (QString s, attributes) { + foreach (const QString &s, attributes) { if (!atts.contains(s)) { d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)")); d->query->bindValue(0, s); diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp index 6757805..270bcdd 100644 --- a/tools/assistant/lib/qhelpindexwidget.cpp +++ b/tools/assistant/lib/qhelpindexwidget.cpp @@ -162,7 +162,7 @@ void QHelpIndexProvider::run() QSet indicesSet; m_mutex.unlock(); - foreach (QString dbFileName, m_helpEngine->fileNameReaderMap.keys()) { + foreach (const QString &dbFileName, m_helpEngine->fileNameReaderMap.keys()) { m_mutex.lock(); if (m_abort) { m_mutex.unlock(); @@ -178,7 +178,7 @@ void QHelpIndexProvider::run() QStringList lst = reader.indicesForFilter(atts); if (!lst.isEmpty()) { m_mutex.lock(); - foreach (QString s, lst) + foreach (const QString &s, lst) indicesSet.insert(s); if (m_abort) { m_mutex.unlock(); @@ -317,7 +317,7 @@ QModelIndex QHelpIndexModel::filter(const QString &filter, const QString &wildca if (!wildcard.isEmpty()) { QRegExp regExp(wildcard, Qt::CaseInsensitive); regExp.setPatternSyntax(QRegExp::Wildcard); - foreach (QString index, d->indices) { + foreach (const QString &index, d->indices) { if (index.contains(regExp)) { lst.append(index); if (perfectMatch == -1 && index.startsWith(filter, Qt::CaseInsensitive)) { @@ -332,7 +332,7 @@ QModelIndex QHelpIndexModel::filter(const QString &filter, const QString &wildca } } } else { - foreach (QString index, d->indices) { + foreach (const QString &index, d->indices) { if (index.contains(filter, Qt::CaseInsensitive)) { lst.append(index); if (perfectMatch == -1 && index.startsWith(filter, Qt::CaseInsensitive)) { diff --git a/tools/assistant/lib/qhelpsearchindexreader_default.cpp b/tools/assistant/lib/qhelpsearchindexreader_default.cpp index 1bc5feb..d08efc3 100644 --- a/tools/assistant/lib/qhelpsearchindexreader_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexreader_default.cpp @@ -166,7 +166,7 @@ void Reader::filterFilesForAttributes(const QStringList &attributes) const QString fileName = it.key(); bool containsAll = true; QStringList split = fileName.split(QLatin1String("@")); - foreach (const QString attribute, attributes) { + foreach (const QString &attribute, attributes) { if (!split.contains(attribute, Qt::CaseInsensitive)) { containsAll = false; break; @@ -235,7 +235,7 @@ bool Reader::splitSearchTerm(const QString &searchTerm, QStringList *terms, void Reader::searchInIndex(const QStringList &terms) { - foreach (const QString term, terms) { + foreach (const QString &term, terms) { QVector documents; for(IndexTable::ConstIterator it = searchIndexTable.begin(); @@ -254,7 +254,7 @@ void Reader::searchInIndex(const QStringList &terms) DocumentInfo info; QString title, url; QVector documentsInfo; - foreach(const Document doc, documents) { + foreach(const Document &doc, documents) { info.docNumber = doc.docNumber; info.frequency = doc.frequency; info.documentUrl = documentList.at(doc.docNumber).at(1); @@ -519,7 +519,7 @@ void QHelpSearchIndexReaderDefault::run() mutex.unlock(); QString queryTerm; - foreach (const QHelpSearchQuery query, queryList) { + foreach (const QHelpSearchQuery &query, queryList) { if (query.fieldName == QHelpSearchQuery::DEFAULT) { queryTerm = query.wordList.at(0); break; @@ -541,7 +541,7 @@ void QHelpSearchIndexReaderDefault::run() // setup the reader m_reader.setIndexPath(indexPath); - foreach(const QString namespaceName, registeredDocs) { + foreach(const QString &namespaceName, registeredDocs) { mutex.lock(); if (m_cancel) { mutex.unlock(); @@ -553,7 +553,7 @@ void QHelpSearchIndexReaderDefault::run() const QList attributeSets = engine.filterAttributeSets(namespaceName); - foreach (QStringList attributes, attributeSets) { + foreach (const QStringList &attributes, attributeSets) { // read all index files m_reader.setIndexFile(namespaceName, attributes.join(QLatin1String("@"))); if (!m_reader.readIndex()) { @@ -577,7 +577,7 @@ void QHelpSearchIndexReaderDefault::run() QVector hits = m_reader.hits(); if (!hits.isEmpty()) { if (termSeq.isEmpty()) { - foreach (const DocumentInfo docInfo, hits) { + foreach (const DocumentInfo &docInfo, hits) { mutex.lock(); if (m_cancel) { mutex.unlock(); @@ -588,7 +588,7 @@ void QHelpSearchIndexReaderDefault::run() hitList.append(qMakePair(docInfo.documentTitle, docInfo.documentUrl)); } } else { - foreach (const DocumentInfo docInfo, hits) { + foreach (const DocumentInfo &docInfo, hits) { mutex.lock(); if (m_cancel) { mutex.unlock(); diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp index 108be97..70999e5 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp @@ -104,7 +104,7 @@ bool Writer::writeIndex() const return status; QDataStream docStream(&docFile); - foreach(const QStringList list, documentList) { + foreach(const QStringList &list, documentList) { docStream << list.at(0); docStream << list.at(1); } @@ -226,7 +226,7 @@ void QHelpSearchIndexWriter::run() QStringList namespaces; Writer writer(indexPath); - foreach(const QString namespaceName, registeredDocs) { + foreach(const QString &namespaceName, registeredDocs) { mutex.lock(); if (m_cancel) { mutex.unlock(); @@ -242,7 +242,7 @@ void QHelpSearchIndexWriter::run() const QList attributeSets = engine.filterAttributeSets(namespaceName); - foreach (QStringList attributes, attributeSets) { + foreach (const QStringList &attributes, attributeSets) { // cleanup maybe old or unfinished files writer.setIndexFile(namespaceName, attributes.join(QLatin1String("@"))); writer.removeIndex(); @@ -266,7 +266,7 @@ void QHelpSearchIndexWriter::run() int docNum = 0; const QStringList documentsList(documentsSet.toList()); - foreach(const QString url, documentsList) { + foreach(const QString &url, documentsList) { if (m_cancel) return; @@ -347,7 +347,7 @@ void QHelpSearchIndexWriter::run() const QList attributeSets = engine.filterAttributeSets(namespaceName); - foreach (QStringList attributes, attributeSets) { + foreach (const QStringList &attributes, attributeSets) { writer.setIndexFile(namespaceName, attributes.join(QLatin1String("@"))); writer.removeIndex(); } diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp index f2bb816..5782c12 100644 --- a/tools/assistant/lib/qhelpsearchquerywidget.cpp +++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp @@ -148,7 +148,7 @@ private: << QLatin1String("}") << QLatin1String("~"); // make sure we won't end up with an empty string - foreach (const QString escapeChar, escapableCharsList) { + foreach (const QString &escapeChar, escapableCharsList) { if (retValue.contains(escapeChar)) retValue.replace(escapeChar, QLatin1String("")); } @@ -156,7 +156,7 @@ private: return retValue; retValue = text; // now realy escape the string... - foreach (const QString escapeChar, escapableCharsList) { + foreach (const QString &escapeChar, escapableCharsList) { if (retValue.contains(escapeChar)) retValue.replace(escapeChar, escape + escapeChar); } @@ -317,7 +317,7 @@ private slots: QStringList lst = similarQuery->text().split(exp, QString::SkipEmptyParts); if (!lst.isEmpty()) { QStringList fuzzy; - foreach (const QString term, lst) + foreach (const QString &term, lst) fuzzy += buildTermList(escapeString(term)); queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY, fuzzy)); } @@ -325,7 +325,7 @@ private slots: lst = withoutQuery->text().split(exp, QString::SkipEmptyParts); if (!lst.isEmpty()) { QStringList without; - foreach (const QString term, lst) + foreach (const QString &term, lst) without.append(escapeString(term)); queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT, without)); } @@ -339,7 +339,7 @@ private slots: lst = allQuery->text().split(exp, QString::SkipEmptyParts); if (!lst.isEmpty()) { QStringList all; - foreach (const QString term, lst) + foreach (const QString &term, lst) all.append(escapeString(term)); queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all)); } @@ -347,7 +347,7 @@ private slots: lst = atLeastQuery->text().split(exp, QString::SkipEmptyParts); if (!lst.isEmpty()) { QStringList atLeast; - foreach (const QString term, lst) + foreach (const QString &term, lst) atLeast += buildTermList(escapeString(term)); queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST, atLeast)); } diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp index a3f5aed..ad540c6 100644 --- a/tools/assistant/lib/qhelpsearchresultwidget.cpp +++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp @@ -73,7 +73,7 @@ public: void showResultPage(const QList hits) { - foreach (const QHelpSearchEngine::SearchHit hit, hits) + foreach (const QHelpSearchEngine::SearchHit &hit, hits) new QTreeWidgetItem(this, QStringList(hit.first) << hit.second); } @@ -118,7 +118,7 @@ public: .arg(tr("The search results may not be complete since the " "documentation is still being indexed!")); - foreach (const QHelpSearchEngine::SearchHit hit, hits) { + foreach (const QHelpSearchEngine::SearchHit &hit, hits) { htmlFile += QString(QLatin1String("
%2
%1

")) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index 055fa1c..0e4096b 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -1118,7 +1118,7 @@ CentralWidget::highlightSearchTerms() QList queryList = searchEngine->query(); QStringList terms; - foreach (QHelpSearchQuery query, queryList) { + foreach (const QHelpSearchQuery &query, queryList) { switch (query.fieldName) { default: break; case QHelpSearchQuery::ALL: { -- cgit v0.12 From 4a22fb03ff1ab5d63e51dca791155b249321bedb Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 1 Feb 2010 17:57:17 +0100 Subject: Assistant: Fix spelling mistakes. --- tools/assistant/lib/fulltextsearch/qclucene-config_p.h | 2 +- tools/assistant/lib/qhelpenginecore.cpp | 2 +- tools/assistant/lib/qhelpsearchengine.cpp | 12 ++++++------ tools/assistant/lib/qhelpsearchindexreader_default.cpp | 6 +++--- tools/assistant/lib/qhelpsearchindexwriter_default.cpp | 6 +++--- tools/assistant/lib/qhelpsearchquerywidget.cpp | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h index 729ae72..0c70718 100644 --- a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h +++ b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h @@ -529,7 +529,7 @@ configure. /* Conditional Debugging */ /* #undef _CL__CND_DEBUG */ -/* debuging option */ +/* debugging option */ /* #undef _DEBUG */ /* Number of bits in a file offset, on hosts where this is settable. */ diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp index b651aa3..066e4d5 100644 --- a/tools/assistant/lib/qhelpenginecore.cpp +++ b/tools/assistant/lib/qhelpenginecore.cpp @@ -168,7 +168,7 @@ void QHelpEngineCorePrivate::errorReceived(const QString &msg) it is removed by calling removeCustomFilter(). customFilters() returns all defined filters. - The help engine also offers the possiblity to set and read values + The help engine also offers the possibility to set and read values in a persistant way comparable to ini files or Windows registry entries. For more information see setValue() or value(). diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp index c28947b..7c2635d 100644 --- a/tools/assistant/lib/qhelpsearchengine.cpp +++ b/tools/assistant/lib/qhelpsearchengine.cpp @@ -214,7 +214,7 @@ private: search term The QHelpSearchQuery class contains the field name and the associated search - term. Depending on the field the search term might get split up into seperate + term. Depending on the field the search term might get split up into separate terms to be parsed differently by the search engine. \sa QHelpSearchQueryWidget @@ -238,15 +238,15 @@ private: \value DEFAULT the default field provided by the search widget, several terms should be split and stored in the word list except search terms enclosed in quotes. - \value FUZZY a field only provided in use with clucene. Terms should be split in seperate + \value FUZZY a field only provided in use with clucene. Terms should be split in separate words and passed to the search engine. - \value WITHOUT a field only provided in use with clucene. Terms should be split in seperate + \value WITHOUT a field only provided in use with clucene. Terms should be split in separate words and passed to the search engine. - \value PHRASE a field only provided in use with clucene. Terms should not be split in seperate + \value PHRASE a field only provided in use with clucene. Terms should not be split in separate words. - \value ALL a field only provided in use with clucene. Terms should be split in seperate + \value ALL a field only provided in use with clucene. Terms should be split in separate words and passed to the search engine - \value ATLEAST a field only provided in use with clucene. Terms should be split in seperate + \value ATLEAST a field only provided in use with clucene. Terms should be split in separate words and passed to the search engine */ diff --git a/tools/assistant/lib/qhelpsearchindexreader_default.cpp b/tools/assistant/lib/qhelpsearchindexreader_default.cpp index d08efc3..d2241a5 100644 --- a/tools/assistant/lib/qhelpsearchindexreader_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexreader_default.cpp @@ -180,9 +180,9 @@ void Reader::filterFilesForAttributes(const QStringList &attributes) void Reader::setIndexFile(const QString &namespaceName, const QString &attributes) { - QString extention = namespaceName + QLatin1String("@") + attributes; - indexFile = indexPath + QLatin1String("/indexdb40.") + extention; - documentFile = indexPath + QLatin1String("/indexdoc40.") + extention; + QString extension = namespaceName + QLatin1String("@") + attributes; + indexFile = indexPath + QLatin1String("/indexdb40.") + extension; + documentFile = indexPath + QLatin1String("/indexdoc40.") + extension; } bool Reader::splitSearchTerm(const QString &searchTerm, QStringList *terms, diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp index 70999e5..6d09fb8 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp @@ -126,9 +126,9 @@ void Writer::removeIndex() const void Writer::setIndexFile(const QString &namespaceName, const QString &attributes) { - QString extention = namespaceName + QLatin1String("@") + attributes; - indexFile = indexPath + QLatin1String("/indexdb40.") + extention; - documentFile = indexPath + QLatin1String("/indexdoc40.") + extention; + QString extension = namespaceName + QLatin1String("@") + attributes; + indexFile = indexPath + QLatin1String("/indexdb40.") + extension; + documentFile = indexPath + QLatin1String("/indexdoc40.") + extension; } void Writer::insertInIndex(const QString &string, int docNum) diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp index 5782c12..3c3919e 100644 --- a/tools/assistant/lib/qhelpsearchquerywidget.cpp +++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp @@ -155,7 +155,7 @@ private: if (retValue.trimmed().isEmpty()) return retValue; - retValue = text; // now realy escape the string... + retValue = text; // now really escape the string... foreach (const QString &escapeChar, escapableCharsList) { if (retValue.contains(escapeChar)) retValue.replace(escapeChar, escape + escapeChar); @@ -533,7 +533,7 @@ QHelpSearchQueryWidget::~QHelpSearchQueryWidget() } /*! - Returns a list of querys to use in combination with the search engines + Returns a list of queries to use in combination with the search engines search(QList &query) function. */ QList QHelpSearchQueryWidget::query() const -- cgit v0.12 From bbe1a089c43f0b706d33bb08fbeae256b6e34d30 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 1 Feb 2010 18:10:50 +0100 Subject: Fix missing namespace. --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index fed1658..6cb76ee 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -42,6 +42,8 @@ #include "qtextureglyphcache_gl_p.h" #include "qpaintengineex_opengl2_p.h" +QT_BEGIN_NAMESPACE + #ifdef Q_WS_WIN extern Q_GUI_EXPORT bool qt_cleartype_enabled; #endif @@ -243,3 +245,5 @@ int QGLTextureGlyphCache::glyphMargin() const return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0; #endif } + +QT_END_NAMESPACE -- cgit v0.12 From 55ca7d36d35c8ecac27b6866f40a5f2de799debd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 9 Dec 2009 17:22:06 +0100 Subject: qmake: use isActiveConfig() instead of hand-crafting comparisons ensures consistent handling of CONFIG values. this is incompatible with 4.6.1, as it removes case-insentitivity from some of the config keys, but those pro files wouldn't be portable beyond symbian anyway, and symbian compatibility guarantees start with 4.6.2. Reviewed-by: mariusSO --- qmake/generators/symbian/symmake.cpp | 26 +++++++++++++------------- qmake/generators/symbian/symmake_abld.cpp | 2 +- qmake/generators/symbian/symmake_sbsv2.cpp | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 20e2d0e..63676d1 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -261,7 +261,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) writeMmpFile(mmpFilename, symbianLangCodes); if (targetType == TypeExe) { - if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { + if (!project->isActiveConfig("no_icon")) { writeRegRssFile(userRssRules); writeRssFile(numberOfIcons, iconFile); writeLocFile(symbianLangCodes); @@ -375,7 +375,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme .arg(exeFile) << endl; // deploy rsc & reg_rsc file - if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { + if (!project->isActiveConfig("no_icon")) { t << QString("\"%1epoc32/data/z/resource/apps/%2\" - \"%3\\%4\"") .arg(epocRoot()) .arg(fixedTarget + ".rsc") @@ -444,7 +444,7 @@ bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStri void SymbianMakefileGenerator::writeCustomDefFile() { - if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) { + if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) { // Create custom def file for plugin QFile ft(QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL)); @@ -509,9 +509,9 @@ void SymbianMakefileGenerator::init() targetType = TypeExe; else if ((project->values("TEMPLATE")).contains("lib")) { // Check CONFIG to see if we are to build staticlib or dll - if (project->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static")) + if (project->isActiveConfig("staticlib") || project->isActiveConfig("static")) targetType = TypeLib; - else if (project->values("CONFIG").contains("plugin")) + else if (project->isActiveConfig("plugin")) targetType = TypePlugin; else targetType = TypeDll; @@ -521,7 +521,7 @@ void SymbianMakefileGenerator::init() if (0 != project->values("TARGET.UID2").size()) { uid2 = project->first("TARGET.UID2"); - } else if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) { + } else if (project->isActiveConfig("stdbinary")) { uid2 = "0x20004C45"; } else { if (targetType == TypeExe) { @@ -788,7 +788,7 @@ void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symb } t << endl; - if (!project->values("CONFIG").contains("static") && !project->values("CONFIG").contains("staticlib")) { + if (!project->isActiveConfig("static") && !project->isActiveConfig("staticlib")) { writeMmpFileLibraryPart(t); } @@ -841,7 +841,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) if (targetType == TypeExe) { t << MMP_TARGET "\t\t" << fixedTarget << ".exe" << endl; if (!skipTargetType) { - if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) + if (project->isActiveConfig("stdbinary")) t << MMP_TARGETTYPE "\t\tSTDEXE" << endl; else t << MMP_TARGETTYPE "\t\tEXE" << endl; @@ -849,7 +849,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) } else if (targetType == TypeDll || targetType == TypePlugin) { t << MMP_TARGET "\t\t" << fixedTarget << ".dll" << endl; if (!skipTargetType) { - if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) + if (project->isActiveConfig("stdbinary")) t << MMP_TARGETTYPE "\t\tSTDDLL" << endl; else t << MMP_TARGETTYPE "\t\tDLL" << endl; @@ -857,7 +857,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) } else if (targetType == TypeLib) { t << MMP_TARGET "\t\t" << fixedTarget << ".lib" << endl; if (!skipTargetType) { - if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) + if (project->isActiveConfig("stdbinary")) t << MMP_TARGETTYPE "\t\tSTDLIB" << endl; else t << MMP_TARGETTYPE "\t\tLIB" << endl; @@ -893,7 +893,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) if (0 != project->values("TARGET.EPOCALLOWDLLDATA").size()) t << MMP_EPOCALLOWDLLDATA << endl; - if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) { + if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) { // Use custom def file for Qt plugins t << "DEFFILE " PLUGIN_COMMON_DEF_FILE_FOR_MMP << endl; } @@ -909,7 +909,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringList &symbianLangCodes) { if ((targetType == TypeExe) && - !project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { + !project->isActiveConfig("no_icon")) { QString locTarget = fixedTarget; locTarget.append(".rss"); @@ -1267,7 +1267,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy // Add project mmps and old style extension makefiles QString mmpTag; - if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive)) + if (project->isActiveConfig("symbian_test")) mmpTag = QLatin1String(BLD_INF_TAG_TESTMMPFILES); else mmpTag = QLatin1String(BLD_INF_TAG_MMPFILES); diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index d1e63cb..033bcbe 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -172,7 +172,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool releasePlatforms.removeAll("winscw"); // No release for emulator QString testClause; - if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive)) + if (project->isActiveConfig("symbian_test")) testClause = QLatin1String(" test"); else testClause = QLatin1String(""); diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 5adf30d..e081b19 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -106,7 +106,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo releasePlatforms.removeAll("winscw"); // No release for emulator QString testClause; - if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive)) + if (project->isActiveConfig("symbian_test")) testClause = QLatin1String(".test"); else testClause = QLatin1String(""); -- cgit v0.12 From ac323ef4e9d018aa9df41d8f7e81b58a3e373dbf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 9 Dec 2009 18:37:04 +0100 Subject: qmake: Remove macro and simplify string expression previously using it also fixes a warning Reviewed-by: mariusSO --- qmake/generators/symbian/symmake.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 63676d1..caee2db 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -54,7 +54,6 @@ #define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps" #define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def" #define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonU.def" -#define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1) #define BLD_INF_RULES_BASE "BLD_INF_RULES." #define BLD_INF_TAG_PLATFORMS "prj_platforms" @@ -227,7 +226,9 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) QString wrapperFileName("Makefile"); QString outputFileName = fileInfo(Option::output.fileName()).fileName(); if (outputFileName != BLD_INF_FILENAME) { - wrapperFileName.append(".").append((outputFileName.size() > BLD_INF_FILENAME_LEN && outputFileName.left(BLD_INF_FILENAME_LEN) == BLD_INF_FILENAME) ? outputFileName.mid(8) : outputFileName); + wrapperFileName.append(".").append(outputFileName.startsWith(BLD_INF_FILENAME) + ? outputFileName.mid(sizeof(BLD_INF_FILENAME)) + : outputFileName); isPrimaryMakefile = false; } -- cgit v0.12 From ec69e5ab5b74064feb88bc1f1096673227f51caa Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 9 Dec 2009 18:37:45 +0100 Subject: qmake: fix warnings missing braces, parens and spaces denoting empty loop bodies Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 3 ++- qmake/generators/makefiledeps.cpp | 34 +++++++++++++++++----------------- qmake/generators/symbian/symmake.cpp | 2 +- qmake/generators/win32/winmakefile.cpp | 3 ++- qmake/meta.cpp | 5 +++-- qmake/option.cpp | 4 ++-- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7424d1d..f1f2503 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1824,11 +1824,12 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cleans.append(files); } } - if(!cleans.isEmpty()) + if(!cleans.isEmpty()) { if (isForSymbian()) t << valGlue(cleans, "\n\t" + del_statement, " 2> NUL\n\t" + del_statement, " 2> NUL"); else t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, ""); + } if(!wrote_clean_cmds) { for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, (*input), diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index 40304a6..21e1273 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -397,7 +397,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) buffer = getBuffer(fst.st_size); for(int have_read = 0; (have_read = QT_READ(fd, buffer + buffer_len, fst.st_size - buffer_len)); - buffer_len += have_read); + buffer_len += have_read) ; QT_CLOSE(fd); } if(!buffer) @@ -418,22 +418,22 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) ++x; if(buffer_len >= x + 12 && !strncmp(buffer + x, "includehint", 11) && (*(buffer + x + 11) == ' ' || *(buffer + x + 11) == '>')) { - for(x += 11; *(buffer + x) != '>'; ++x); + for(x += 11; *(buffer + x) != '>'; ++x) ; int inc_len = 0; - for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len); + for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len) ; *(buffer + x + inc_len) = '\0'; inc = buffer + x; } else if(buffer_len >= x + 13 && !strncmp(buffer + x, "customwidget", 12) && (*(buffer + x + 12) == ' ' || *(buffer + x + 12) == '>')) { - for(x += 13; *(buffer + x) != '>'; ++x); //skip up to > + for(x += 13; *(buffer + x) != '>'; ++x) ; //skip up to > while(x < buffer_len) { - for(x++; *(buffer + x) != '<'; ++x); //skip up to < + for(x++; *(buffer + x) != '<'; ++x) ; //skip up to < x++; if(buffer_len >= x + 7 && !strncmp(buffer+x, "header", 6) && (*(buffer + x + 6) == ' ' || *(buffer + x + 6) == '>')) { - for(x += 7; *(buffer + x) != '>'; ++x); //skip up to > + for(x += 7; *(buffer + x) != '>'; ++x) ; //skip up to > int inc_len = 0; - for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len); + for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len) ; *(buffer + x + inc_len) = '\0'; inc = buffer + x; break; @@ -448,10 +448,10 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) for(x += 8; *(buffer + x) != '>'; ++x) { if(buffer_len >= x + 9 && *(buffer + x) == 'i' && !strncmp(buffer + x, "impldecl", 8)) { - for(x += 8; *(buffer + x) != '='; ++x); + for(x += 8; *(buffer + x) != '='; ++x) ; if(*(buffer + x) != '=') continue; - for(++x; *(buffer+x) == '\t' || *(buffer+x) == ' '; ++x); + for(++x; *(buffer+x) == '\t' || *(buffer+x) == ' '; ++x) ; char quote = 0; if(*(buffer+x) == '\'' || *(buffer+x) == '"') { quote = *(buffer + x); @@ -475,13 +475,13 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) } } int inc_len = 0; - for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len); + for(x += 1 ; *(buffer + x + inc_len) != '<'; ++inc_len) ; *(buffer + x + inc_len) = '\0'; inc = buffer + x; } } //read past new line now.. - for(; x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x); + for(; x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x) ; ++line_count; } else if(file->type == QMakeSourceFileInfo::TYPE_QRC) { } else if(file->type == QMakeSourceFileInfo::TYPE_C) { @@ -494,7 +494,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) ++x; if(buffer_len >= x) { if(*(buffer+x) == '/') { //c++ style comment - for(; x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x); + for(; x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x) ; beginning = 1; } else if(*(buffer+x) == '*') { //c style comment for(++x; x < buffer_len; ++x) { @@ -558,7 +558,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) *(buffer+x+keyword_len) != '_') { for(x+=keyword_len; //skip spaces after keyword x < buffer_len && (*(buffer+x) == ' ' || *(buffer+x) == '\t'); - x++); + x++) ; break; } else if(qmake_endOfLine(*(buffer+x+keyword_len))) { x += keyword_len-1; @@ -579,7 +579,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) x++; int inc_len; - for(inc_len = 0; *(buffer + x + inc_len) != term && !qmake_endOfLine(*(buffer + x + inc_len)); ++inc_len); + for(inc_len = 0; *(buffer + x + inc_len) != term && !qmake_endOfLine(*(buffer + x + inc_len)); ++inc_len) ; *(buffer + x + inc_len) = '\0'; inc = buffer + x; x += inc_len; @@ -594,7 +594,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) int msg_len; for(msg_len = 0; (term && *(buffer + x + msg_len) != term) && - !qmake_endOfLine(*(buffer + x + msg_len)); ++msg_len); + !qmake_endOfLine(*(buffer + x + msg_len)); ++msg_len) ; *(buffer + x + msg_len) = '\0'; debug_msg(0, "%s:%d %s -- %s", file->file.local().toLatin1().constData(), line_count, keyword, buffer+x); x += msg_len; @@ -706,7 +706,7 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file) buffer = getBuffer(fst.st_size); for(int have_read = buffer_len = 0; (have_read = QT_READ(fd, buffer + buffer_len, fst.st_size - buffer_len)); - buffer_len += have_read); + buffer_len += have_read) ; QT_CLOSE(fd); } @@ -720,7 +720,7 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file) ++x; if(buffer_len >= x) { if(*(buffer + x) == '/') { //c++ style comment - for(;x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x); + for(;x < buffer_len && !qmake_endOfLine(*(buffer + x)); ++x) ; } else if(*(buffer + x) == '*') { //c style comment for(++x; x < buffer_len; ++x) { if(*(buffer + x) == 't' || *(buffer + x) == 'q') { //ignore diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index caee2db..4d610af 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1515,7 +1515,7 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico if (!numberOfIcons.isEmpty()) { bool ok; numberOfIcons = numberOfIcons.simplified(); - int tmp = numberOfIcons.toInt(&ok); + numberOfIcons.toInt(&ok); if (!ok) { numberOfIcons.clear(); iconFile.clear(); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index efdf8ac..9d3b4c6 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -467,11 +467,12 @@ void Win32MakefileGenerator::processRcFileVar() resFile.replace(".rc", Option::res_ext); project->values("RES_FILE").prepend(fileInfo(resFile).fileName()); - if (!project->values("OBJECTS_DIR").isEmpty()) + if (!project->values("OBJECTS_DIR").isEmpty()) { if(project->isActiveConfig("staticlib")) project->values("RES_FILE").first().prepend(fileInfo(project->values("DESTDIR").first()).absoluteFilePath() + Option::dir_sep); else project->values("RES_FILE").first().prepend(project->values("OBJECTS_DIR").first() + Option::dir_sep); + } project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false); project->values("POST_TARGETDEPS") += project->values("RES_FILE"); project->values("CLEAN_FILES") += project->values("RES_FILE"); diff --git a/qmake/meta.cpp b/qmake/meta.cpp index 1c71d60..5b36682 100644 --- a/qmake/meta.cpp +++ b/qmake/meta.cpp @@ -119,10 +119,11 @@ QMakeMetaInfo::findLib(QString lib) } } } - if(ret.isNull()) + if(ret.isNull()) { debug_msg(2, "QMakeMetaInfo: Cannot find info file for %s", lib.toLatin1().constData()); - else + } else { debug_msg(2, "QMakeMetaInfo: Found info file %s for %s", ret.toLatin1().constData(), lib.toLatin1().constData()); + } return ret; } diff --git a/qmake/option.cpp b/qmake/option.cpp index 9577a28..5522a80 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -630,8 +630,8 @@ Option::fixString(QString string, uchar flags) string = string.replace('/', Option::dir_sep).replace('\\', Option::dir_sep); } - if (string.startsWith("\"") && string.endsWith("\"") || - string.startsWith("\'") && string.endsWith("\'")) + if ((string.startsWith("\"") && string.endsWith("\"")) || + (string.startsWith("\'") && string.endsWith("\'"))) string = string.mid(1, string.length()-2); //cache -- cgit v0.12 From 470b2de3e24b8eca056a31728a5e1039a9a25d79 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 Dec 2009 15:22:42 +0100 Subject: qmake: subdirs template: make distclean target use QMAKE_DISTCLEAN patch by David Faure Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f1f2503..69e1d8a 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2536,6 +2536,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListisActiveConfig("no_empty_targets")) { t << "\t" << "@cd ." << endl; } -- cgit v0.12 From 94f5f21ac88de0d940d6ac27d222f1ef8e66d939 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 1 Feb 2010 18:03:06 +0100 Subject: Assert failure when setting a widget focus proxy as its successor in tab order Now we check that and skip it from the tab list. Auto-test included. Reviewed-by: leo Task-number: QTBUG-7532 --- src/gui/kernel/qwidget.cpp | 2 ++ tests/auto/qwidget/tst_qwidget.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ffad38b..4054d2a 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6414,6 +6414,8 @@ void QWidget::setTabOrder(QWidget* first, QWidget *second) first = fp; } + if (fp == second) + return; if (QWidget *sp = second->focusProxy()) second = sp; diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ea90ae3..1fb323e 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -396,6 +396,8 @@ private slots: void focusProxyAndInputMethods(); void scrollWithoutBackingStore(); + void taskQTBUG_7532_tabOrderWithFocusProxy(); + private: bool ensureScreenSize(int width, int height); QWidget *testWidget; @@ -9783,5 +9785,17 @@ void tst_QWidget::scrollWithoutBackingStore() QCOMPARE(child.pos(),QPoint(25,25)); } +void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy() +{ + QWidget w; + w.setFocusPolicy(Qt::TabFocus); + QWidget *fp = new QWidget(&w); + fp->setFocusPolicy(Qt::TabFocus); + w.setFocusProxy(fp); + QWidget::setTabOrder(&w, fp); + + // No Q_ASSERT, then it's allright. +} + QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" -- cgit v0.12 From 9258959f4f81b9c3efa4418aa344a5be5f9d12ab Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Mon, 1 Feb 2010 19:55:07 +0100 Subject: Fix QTBUG_7714_fullUpdateDiscardingOpacityUpdate2 autotest in qws-linux The two views were displayed on top of each other, so some repaints were not triggered. --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index ae038e7..7b54a3b 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -9978,6 +9978,8 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() origView.show(); QTest::qWaitForWindowShown(&origView); + origView.setGeometry(origView.width() + 20, 20, + origView.width(), origView.height()); parentGreen->setFlag(QGraphicsItem::ItemIgnoresTransformations); -- cgit v0.12 From 5a64033f89e07505bb77d3c172597b8df3cbd762 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 1 Feb 2010 21:29:47 +0100 Subject: Fixed text rendering via scaled QPainter on rasterPaintEngine / Symbian Text rendering in Qt for Symbian looks very bad on a scaled QPainter. Instead of simply using a Symbian font with the right size it followed the code path that is usually used for "tricky transformation": Use the glyph outlines and rasterize them in Qt as QPainterPath. That's slow and especially ugly on Symbian since we do not (yet) get the glyph outlines from Symbian. This patch adds QFontEngineS60::setFontScale() so that QFontEngineS60 has one additional native font handle with the scaled size. The raster paint engine will call that function in case that the painter is scaled. Since we already have QFontEngineS60 specific code in the raster paint engine, this patch did not have to add #ifdefs. http://bugreports.qt.nokia.com/browse/QTBUG-7614 Task-number: QTBUG-7614 Reviewed-by: Jason Barron modified: gui/painting/qpaintengine_raster.cpp modified: gui/text/qfontengine_s60.cpp modified: gui/text/qfontengine_s60_p.h --- src/gui/painting/qpaintengine_raster.cpp | 9 ++++- src/gui/text/qfontengine_s60.cpp | 68 ++++++++++++++++++++++++-------- src/gui/text/qfontengine_s60_p.h | 10 ++++- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 3f2322e..bc56ed0 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3081,6 +3081,8 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti) QVarLengthArray glyphs; QTransform matrix = s->matrix; matrix.translate(p.x(), p.y()); + if (matrix.type() == QTransform::TxScale) + fe->setFontScale(matrix.m11()); ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); const QFixed aliasDelta = QFixed::fromReal(aliasedCoordinateDelta); @@ -3097,6 +3099,9 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti) alphaPenBlt(glyphBitmapBytes, glyphBitmapSize.iWidth, 8, x, y, glyphBitmapSize.iWidth, glyphBitmapSize.iHeight); } + if (matrix.type() == QTransform::TxScale) + fe->setFontScale(1.0); + return; } #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE @@ -3269,7 +3274,9 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte } #elif defined (Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) // Q_WS_WIN || Q_WS_MAC - if (s->matrix.type() <= QTransform::TxTranslate) { + if (s->matrix.type() <= QTransform::TxTranslate + || (s->matrix.type() == QTransform::TxScale + && (qFuzzyCompare(s->matrix.m11(), s->matrix.m22())))) { drawGlyphsS60(p, ti); return; } diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 4625667..9dd4af7 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -129,26 +129,62 @@ static inline unsigned int getChar(const QChar *str, int &i, const int len) return uc; } +CFont *QFontEngineS60::fontWithSize(qreal size) const +{ + CFont *result = 0; + TFontSpec fontSpec(qt_QString2TPtrC(QFontEngine::fontDef.family), TInt(size)); + fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap); + fontSpec.iFontStyle.SetPosture(QFontEngine::fontDef.style == QFont::StyleNormal?EPostureUpright:EPostureItalic); + fontSpec.iFontStyle.SetStrokeWeight(QFontEngine::fontDef.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal); + const TInt errorCode = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(result, fontSpec); + Q_ASSERT(result && (errorCode == 0)); + return result; +} + +void QFontEngineS60::setFontScale(qreal scale) +{ + if (qFuzzyCompare(scale, qreal(1))) { + if (!m_originalFont) + m_originalFont = fontWithSize(m_originalFontSizeInPixels); + m_activeFont = m_originalFont; + } else { + const qreal scaledFontSizeInPixels = m_originalFontSizeInPixels * scale; + if (!m_scaledFont || + (TInt(scaledFontSizeInPixels) != TInt(m_scaledFontSizeInPixels))) { + releaseFont(m_scaledFont); + m_scaledFontSizeInPixels = scaledFontSizeInPixels; + m_scaledFont = fontWithSize(m_scaledFontSizeInPixels); + } + m_activeFont = m_scaledFont; + } +} + +void QFontEngineS60::releaseFont(CFont *&font) +{ + if (font) { + S60->screenDevice()->ReleaseFont(font); + font = 0; + } +} + QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Extensions *extensions) : m_extensions(extensions) + , m_originalFont(0) + , m_originalFontSizeInPixels((request.pixelSize >= 0)? + request.pixelSize:pointsToPixels(request.pointSize)) + , m_scaledFont(0) + , m_scaledFontSizeInPixels(0) + , m_activeFont(0) { QFontEngine::fontDef = request; - m_fontSizeInPixels = (request.pixelSize >= 0)? - request.pixelSize:pointsToPixels(request.pointSize); - - TFontSpec fontSpec(qt_QString2TPtrC(request.family), m_fontSizeInPixels); - fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap); - fontSpec.iFontStyle.SetPosture(request.style == QFont::StyleNormal?EPostureUpright:EPostureItalic); - fontSpec.iFontStyle.SetStrokeWeight(request.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal); - const TInt errorCode = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(m_font, fontSpec); - Q_ASSERT(errorCode == 0); - + setFontScale(1.0); cache_cost = sizeof(QFontEngineS60); } QFontEngineS60::~QFontEngineS60() { - S60->screenDevice()->ReleaseFont(m_font); + releaseFont(m_originalFont); + releaseFont(m_scaledFont); } bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const @@ -251,12 +287,12 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph) QFixed QFontEngineS60::ascent() const { - return m_font->FontMaxAscent(); + return m_originalFont->FontMaxAscent(); } QFixed QFontEngineS60::descent() const { - return m_font->FontMaxDescent(); + return m_originalFont->FontMaxDescent(); } QFixed QFontEngineS60::leading() const @@ -266,7 +302,7 @@ QFixed QFontEngineS60::leading() const qreal QFontEngineS60::maxCharWidth() const { - return m_font->MaxCharWidthInPixels(); + return m_originalFont->MaxCharWidthInPixels(); } const char *QFontEngineS60::name() const @@ -302,11 +338,11 @@ void QFontEngineS60::getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metri const TUint specialCode = (TUint)glyph | 0x80000000; const CFont::TCharacterDataAvailability availability = - m_font->GetCharacterData(specialCode, metrics, bitmap, bitmapSize); + m_activeFont->GetCharacterData(specialCode, metrics, bitmap, bitmapSize); const glyph_t fallbackGlyph = '?'; if (availability != CFont::EAllCharacterData) { const CFont::TCharacterDataAvailability fallbackAvailability = - m_font->GetCharacterData(fallbackGlyph, metrics, bitmap, bitmapSize); + m_activeFont->GetCharacterData(fallbackGlyph, metrics, bitmap, bitmapSize); Q_ASSERT(fallbackAvailability == CFont::EAllCharacterData); } } diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index 4748497..78f8a9a 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -117,15 +117,21 @@ public: Type type() const; void getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metrics, const TUint8*& bitmap, TSize& bitmapSize) const; + void setFontScale(qreal scale); private: friend class QFontPrivate; QFixed glyphAdvance(HB_Glyph glyph) const; + CFont *fontWithSize(qreal size) const; + static void releaseFont(CFont *&font); - CFont* m_font; const QFontEngineS60Extensions *m_extensions; - qreal m_fontSizeInPixels; + CFont* m_originalFont; + const qreal m_originalFontSizeInPixels; + CFont* m_scaledFont; + qreal m_scaledFontSizeInPixels; + CFont* m_activeFont; }; class QFontEngineMultiS60 : public QFontEngineMulti -- cgit v0.12 From 669d23710f449617a327cf38b7d09867b28335ff Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 2 Feb 2010 14:38:11 +1000 Subject: Fixed maketestselftest failure with some MSVC versions. The generated `tests/auto/tmp' directory was causing this test to fail. --- tests/auto/maketestselftest/tst_maketestselftest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp index c674202..ef92c56 100644 --- a/tests/auto/maketestselftest/tst_maketestselftest.cpp +++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp @@ -92,6 +92,9 @@ void tst_MakeTestSelfTest::auto_dot_pro_data() QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot); foreach (const QString& subdir, subdirs) { + if (subdir == QString::fromLatin1("tmp")) { + continue; + } QTest::newRow(qPrintable(subdir)) << subdir; } } -- cgit v0.12 From 0db6060e54d8d5862ae0b7ffa4d3c187d30fd159 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 2 Feb 2010 15:25:15 +1000 Subject: Fixed compile of framecapture, simpleselector for symbian-abld winscw. `QT += network' is required to find the network headers. --- examples/webkit/framecapture/framecapture.pro | 2 +- examples/webkit/simpleselector/simpleselector.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/webkit/framecapture/framecapture.pro b/examples/webkit/framecapture/framecapture.pro index 6f2f093..11960b9 100644 --- a/examples/webkit/framecapture/framecapture.pro +++ b/examples/webkit/framecapture/framecapture.pro @@ -1,4 +1,4 @@ -QT += webkit +QT += webkit network HEADERS = framecapture.h SOURCES = main.cpp \ diff --git a/examples/webkit/simpleselector/simpleselector.pro b/examples/webkit/simpleselector/simpleselector.pro index acd0ae7..3ddd6db 100644 --- a/examples/webkit/simpleselector/simpleselector.pro +++ b/examples/webkit/simpleselector/simpleselector.pro @@ -1,4 +1,4 @@ -QT += webkit +QT += webkit network FORMS = window.ui HEADERS = window.h SOURCES = main.cpp \ -- cgit v0.12 From f5f62c0bede7b4558b35b595b3b9bc11e0232fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 18 Jan 2010 09:14:12 +0100 Subject: Improve raster graphics system performance on Mac. This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. Review: Richard Moe Gustavsen Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context. --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 20 ++++++++++++++++++++ src/gui/kernel/qcocoaview_mac.mm | 9 +++++---- src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- src/gui/kernel/qwidget.cpp | 15 ++++++++++++++- src/gui/kernel/qwidget_mac.mm | 19 +++++++++++++++++++ src/gui/painting/qwindowsurface_raster.cpp | 4 +--- 6 files changed, 60 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 1a265d0..7829a4e 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -51,6 +51,9 @@ NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). ****************************************************************************/ +#include +#include + QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QPointer qt_button_down; //qapplication_mac.cpp @@ -185,3 +188,20 @@ QT_END_NAMESPACE return [super frameViewClassForStyleMask:styleMask]; } +- (void)displayIfNeeded +{ + + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + if (qwidget == 0) { + [super displayIfNeeded]; + return; + } + + if (QApplicationPrivate::graphicsSystem() != 0) { + if (QWidgetBackingStore *bs = qt_widget_private(qwidget)->maybeBackingStore()) + bs->sync(qwidget, qwidget->rect()); + } + [super displayIfNeeded]; +} + + diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index d255604..2c35be2 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -520,10 +520,11 @@ extern "C" { - (void)drawRect:(NSRect)aRect { if (QApplicationPrivate::graphicsSystem() != 0) { - if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) - bs->markDirty(qwidget->rect(), qwidget); - qwidgetprivate->syncBackingStore(qwidget->rect()); - return; + if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) { + // Drawing is handled on the window level + // See qcocoasharedwindowmethods_mac_p. + return; + } } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; qwidgetprivate->hd = cg; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e06a810..65c04e5 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1162,7 +1162,7 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget) CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else - CGContextRef context = (CGContextRef)[[NSGraphicsContext graphicsContextWithWindow:qt_mac_window_for(widget)] graphicsPort]; + CGContextRef context = reinterpret_cast([[qt_mac_window_for(widget) graphicsContext] graphicsPort]); #endif return context; } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ffad38b..78a25ac 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1660,7 +1660,13 @@ void QWidgetPrivate::syncBackingStore() repaint_sys(dirty); dirty = QRegion(); } else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), QRegion()); +#else bs->sync(); +#endif } } @@ -1668,8 +1674,15 @@ void QWidgetPrivate::syncBackingStore(const QRegion ®ion) { if (paintOnScreen()) repaint_sys(region); - else if (QWidgetBackingStore *bs = maybeBackingStore()) + else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), region); +#else bs->sync(q_func(), region); +#endif + } } void QWidgetPrivate::setUpdatesEnabled_helper(bool enable) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 78c1562..b5888b4 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -565,6 +565,25 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif +#ifdef QT_MAC_USE_COCOA +void qt_mac_set_needs_display(QWidget *widget, QRegion region) +{ + NSView *theNSView = qt_mac_nativeview_for(widget); + if (region.isNull()) { + [theNSView setNeedsDisplay:YES]; + return; + } + + QVector rects = region.rects(); + for (int i = 0; i Date: Tue, 2 Feb 2010 09:04:39 +0100 Subject: Webkit: Fix missing namespace. --- src/3rdparty/webkit/WebCore/platform/PopupMenu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h index f2fffb5..c150a94 100644 --- a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h +++ b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h @@ -44,7 +44,9 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { class QWebPopup; } +QT_BEGIN_NAMESPACE class QGraphicsProxyWidget; +QT_END_NAMESPACE #elif PLATFORM(GTK) typedef struct _GtkMenu GtkMenu; typedef struct _GtkMenuItem GtkMenuItem; -- cgit v0.12 From 3c5222864bba1767003d5f4dd2cdcdc31b8df71c Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 2 Feb 2010 09:25:34 +0100 Subject: Added some missing documentation. --- src/corelib/plugin/qlibrary.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 7112043..f2c2384 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -539,6 +539,7 @@ bool QLibraryPrivate::loadPlugin() \row \i AIX \i \c .a \row \i HP-UX \i \c .sl, \c .so (HP-UXi) \row \i Mac OS X \i \c .dylib, \c .bundle, \c .so + \row \i Symbian \i \c .dll \endtable Trailing versioning numbers on Unix are ignored. -- cgit v0.12 From 7b7f13d7ee1d5f93ee63a635c875accce918896a Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 2 Feb 2010 09:26:41 +0100 Subject: Fixed def files on Symbian. --- src/s60installs/bwins/QtGuiu.def | 4 ++-- src/s60installs/eabi/QtGuiu.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index da65230..155e3e7 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -5527,7 +5527,7 @@ EXPORTS ?invalidateChildrenSceneTransform@QGraphicsItemPrivate@@QAEXXZ @ 5526 NONAME ; void QGraphicsItemPrivate::invalidateChildrenSceneTransform(void) ?invalidateDepthRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5527 NONAME ; void QGraphicsItemPrivate::invalidateDepthRecursively(void) ?invalidateFilter@QSortFilterProxyModel@@IAEXXZ @ 5528 NONAME ; void QSortFilterProxyModel::invalidateFilter(void) - ?invalidateGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5529 NONAME ; void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively(void) + ?invalidateGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5529 NONAME ABSENT ; void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively(void) ?invalidateGraphicsEffectsRecursively@QWidgetPrivate@@QAEXXZ @ 5530 NONAME ; void QWidgetPrivate::invalidateGraphicsEffectsRecursively(void) ?invalidateScene@QGraphicsView@@QAEXABVQRectF@@V?$QFlags@W4SceneLayer@QGraphicsScene@@@@@Z @ 5531 NONAME ; void QGraphicsView::invalidateScene(class QRectF const &, class QFlags) ?invalidateSizeCache@QWidgetItemV2@@AAEXXZ @ 5532 NONAME ; void QWidgetItemV2::invalidateSizeCache(void) @@ -9555,7 +9555,7 @@ EXPORTS ?setParent@QWidget@@QAEXPAV1@@Z @ 9554 NONAME ; void QWidget::setParent(class QWidget *) ?setParent@QWidget@@QAEXPAV1@V?$QFlags@W4WindowType@Qt@@@@@Z @ 9555 NONAME ; void QWidget::setParent(class QWidget *, class QFlags) ?setParentItem@QGraphicsItem@@QAEXPAV1@@Z @ 9556 NONAME ; void QGraphicsItem::setParentItem(class QGraphicsItem *) - ?setParentItemHelper@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9557 NONAME ; void QGraphicsItemPrivate::setParentItemHelper(class QGraphicsItem *) + ?setParentItemHelper@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9557 NONAME ABSENT ; void QGraphicsItemPrivate::setParentItemHelper(class QGraphicsItem *) ?setParentLayoutItem@QGraphicsLayoutItem@@QAEXPAV1@@Z @ 9558 NONAME ; void QGraphicsLayoutItem::setParentLayoutItem(class QGraphicsLayoutItem *) ?setParent_sys@QWidgetPrivate@@QAEXPAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z @ 9559 NONAME ; void QWidgetPrivate::setParent_sys(class QWidget *, class QFlags) ?setPasswordCharacter@QLineControl@@QAEXABVQChar@@@Z @ 9560 NONAME ; void QLineControl::setPasswordCharacter(class QChar const &) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 05f620c..a9a69aa 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -4671,7 +4671,7 @@ EXPORTS _ZN20QGraphicsItemPrivate18setTransformHelperERK10QTransform @ 4670 NONAME _ZN20QGraphicsItemPrivate18subFocusItemChangeEv @ 4671 NONAME _ZN20QGraphicsItemPrivate18updateAncestorFlagEN13QGraphicsItem16GraphicsItemFlagENS_12AncestorFlagEbb @ 4672 NONAME - _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItem @ 4673 NONAME + _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItem @ 4673 NONAME ABSENT _ZN20QGraphicsItemPrivate20removeExtraItemCacheEv @ 4674 NONAME _ZN20QGraphicsItemPrivate23appendGraphicsTransformEP18QGraphicsTransform @ 4675 NONAME _ZN20QGraphicsItemPrivate25movableAncestorIsSelectedEPK13QGraphicsItem @ 4676 NONAME @@ -11639,7 +11639,7 @@ EXPORTS _ZN19QGraphicsBlurEffect4drawEP8QPainter @ 11638 NONAME _ZN19QKeyEventTransition15setModifierMaskE6QFlagsIN2Qt16KeyboardModifierEE @ 11639 NONAME _ZN20QGraphicsItemPrivate18siblingOrderChangeEv @ 11640 NONAME - _ZN20QGraphicsItemPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11641 NONAME + _ZN20QGraphicsItemPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11641 NONAME ABSENT _ZN21QMouseEventTransition14setHitTestPathERK12QPainterPath @ 11642 NONAME _ZN21QMouseEventTransition15setModifierMaskE6QFlagsIN2Qt16KeyboardModifierEE @ 11643 NONAME _ZN22QGraphicsOpacityEffect4drawEP8QPainter @ 11644 NONAME -- cgit v0.12 From 787824cb4add4d45a0e90fd736a54e75fa048475 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 2 Feb 2010 10:18:15 +0100 Subject: Fixed missing textures in the boxes demo. The boxes demo assumed that the current GL colour was the default white, but the GL2 paint engine set it to black. Fixed by resetting the colour to white in resetGLState(). Task-number: QTBUG-7779 Reviewed-by: Trond --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 35e95be..406112a 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -561,6 +561,7 @@ void QGL2PaintEngineExPrivate::resetGLState() glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR); glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR); glDisableVertexAttribArray(QT_OPACITY_ATTR); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); // color may have been changed by glVertexAttrib() } void QGL2PaintEngineEx::endNativePainting() -- cgit v0.12 From e8b6c949c006393ab690aa3e890cd48defc97b77 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 2 Feb 2010 11:06:59 +0100 Subject: Document that QModelIndex::child does not work for the root item Reviewed-by: Thierry --- src/corelib/kernel/qabstractitemmodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index dbf422e..36e4af9 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1006,6 +1006,9 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, Returns the child of the model index that is stored in the given \a row and \a column. + \note This function does not work for an invalid model index which is often + used as the root index. + \sa parent(), sibling() */ -- cgit v0.12 From 54de7595a54e67efb60cdc9eb4c4ff15596c3763 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 Feb 2010 11:32:26 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( a733444d3be6605552471f047558927495ff62b7 ) Changes in WebKit/qt since the last update: Fix up cherry-pick of backup restoration fix --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 2a3c73b..f627d9e 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - afc4c208fe296f5a1dd0e73f2bd1273bd22d9b24 + a733444d3be6605552471f047558927495ff62b7 diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index f364d3b..7b0366d 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -6,6 +6,7 @@ symbian: { TARGET.EPOCALLOWDLLDATA=1 TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB TARGET.CAPABILITY = All -Tcb + TARGET.UID3 = 0x200267C2 webkitlibs.sources = QtWebKit.dll webkitlibs.path = /sys/bin @@ -23,7 +24,6 @@ symbian: { DEPLOYMENT += webkitlibs webkitbackup - TARGET.UID3 = 0x200267C2 # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" -- cgit v0.12 From 087d79578bf3e0c8cc6e53b5babb2e935a4b9c91 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Tue, 2 Feb 2010 11:27:23 +0100 Subject: Add a warning when there are duplicate aliases in a resource file. It can be confusing later on when the wrong resource is accessed, and can easily be avoided by an early notice. Task-number: QTBUG-7812 Reviewed-by: hjk --- src/tools/rcc/rcc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index e41cd55..1f6e58f 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -544,6 +544,8 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file) const QString filename = nodes.at(nodes.size()-1); RCCFileInfo *s = new RCCFileInfo(file); s->m_parent = parent; + if (parent->m_children.contains(filename)) + qWarning("potential duplicate alias detected: '%s'", qPrintable(filename)); parent->m_children.insertMulti(filename, s); return true; } -- cgit v0.12 From 11bfc79b0f832f6544843ed13ef0efbcf51b22e9 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 2 Feb 2010 12:38:57 +0200 Subject: New Symbian signed sqlite3.sis with backup_registration.xml Sqlite3.sis was repackaged with backup_registration.xml to support device backup/restore on Symbian Task-number: QTBUG-7518 Reviewed-by: TrustMe --- src/s60installs/sqlite3.sis | Bin 286192 -> 286452 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/s60installs/sqlite3.sis b/src/s60installs/sqlite3.sis index 1785365..11e069e 100644 Binary files a/src/s60installs/sqlite3.sis and b/src/s60installs/sqlite3.sis differ -- cgit v0.12 From e4835d58381cd33fe067b05bfd6301d2246e3e67 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 2 Feb 2010 11:46:54 +0100 Subject: Fix missing non-unified toolbar margins on Mac The tool bar appearance have regressed in 4.6 for applications that do not utilize the unified tool bar appearance. This fix restores the margin and spacing to their 4.5 appearance. Task-number: QTBUG-7831 Reviewed-by: morten --- src/gui/styles/qmacstyle_mac.mm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 7a680f2..c2e5871 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2411,7 +2411,10 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW ret = 0; break; case PM_ToolBarFrameWidth: - ret = 0; + ret = 1; + if (QMainWindow * mainWindow = qobject_cast(widget->parent())) + if (mainWindow->unifiedTitleAndToolBarOnMac()) + ret = 0; break; default: ret = QWindowsStyle::pixelMetric(metric, opt, widget); @@ -5715,12 +5718,16 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, break; case CT_ToolButton: if (widget && qobject_cast(widget->parentWidget())) { - sz.rwidth() += 4; - if (sz.height() <= 32) { - // Workaround strange HIToolBar bug when getting constraints. - sz.rheight() += 1; + if (QMainWindow * mainWindow = qobject_cast(widget->parent())) { + if (mainWindow->unifiedTitleAndToolBarOnMac()) { + sz.rwidth() += 4; + if (sz.height() <= 32) { + // Workaround strange HIToolBar bug when getting constraints. + sz.rheight() += 1; + } + return sz; + } } - return sz; } sz.rwidth() += 10; sz.rheight() += 10; -- cgit v0.12 From a8491158527e257142a4d7c5a7c86385f80a6d9e Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Tue, 2 Feb 2010 12:00:44 +0100 Subject: Revert "Using RunFast mode for RVCT" until compilation erro fixed. This reverts commit d43178ccaa38b87698e2f5a9fa0f2fb4e5f9f0ad. --- mkspecs/common/symbian/symbian.conf | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 8760603..b1ef354 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -148,19 +148,3 @@ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis MMP_RULES -= PAGED } } - -QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast -# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE = - -symbian { - armfpu = $$find(MMP_RULES, "ARMFPU") - !isEmpty(armfpu) { - vfpv2 = $$find(MMP_RULES, "vfpv2") - !isEmpty(vfpv2) { - # we will respect fpu setting obtained from configure, but, - # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode - QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC} - # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE} - } - } -} -- cgit v0.12 From 36c0ffcae4f209d6524e943b3edd09c2c5890536 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 2 Feb 2010 12:12:15 +0100 Subject: Remove PrintDialog frame on Mac On the mac, toplevel windows should not have a frame. This patch simply removes the frame on mac only. Reviewed-by: trond --- src/gui/widgets/qprintpreviewwidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp index 747a227..45b15ef 100644 --- a/src/gui/widgets/qprintpreviewwidget.cpp +++ b/src/gui/widgets/qprintpreviewwidget.cpp @@ -151,7 +151,11 @@ class GraphicsView : public QGraphicsView public: GraphicsView(QWidget* parent = 0) : QGraphicsView(parent) - {} + { +#ifdef Q_WS_MAC + setFrameStyle(QFrame::NoFrame); +#endif + } signals: void resized(); -- cgit v0.12 From 5c8be23e6b5fa732f4c799c783a8b22a85992211 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 Feb 2010 12:13:07 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 69dd29fbeb12d076741dce70ac6bc155101ccd6f ) Changes in WebKit/qt since the last update: --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 15 +++++++++++++++ .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 22 +++++++++++++--------- .../webkit/WebCore/platform/qt/RenderThemeQt.h | 2 +- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index f627d9e..c304876 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - a733444d3be6605552471f047558927495ff62b7 + 69dd29fbeb12d076741dce70ac6bc155101ccd6f diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index bded3d8..18d119a 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2010-02-01 Andreas Kling + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Use the fallback style on Maemo 5 + + https://bugs.webkit.org/show_bug.cgi?id=34376 + + * platform/qt/RenderThemeQt.cpp: + (WebCore::RenderThemeQt::RenderThemeQt): + (WebCore::RenderThemeQt::fallbackStyle): + (WebCore::RenderThemeQt::qStyle): + (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists): + * platform/qt/RenderThemeQt.h: + 2010-01-29 Oswald Buddenhagen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 501a28b..6a1eee8 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -125,7 +125,6 @@ PassRefPtr RenderTheme::themeForPage(Page* page) RenderThemeQt::RenderThemeQt(Page* page) : RenderTheme() , m_page(page) - , m_fallbackStyle(0) { QPushButton button; button.setAttribute(Qt::WA_MacSmallSize); @@ -135,6 +134,8 @@ RenderThemeQt::RenderThemeQt(Page* page) #ifdef Q_WS_MAC m_buttonFontPixelSize = fontInfo.pixelSize(); #endif + + m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); } RenderThemeQt::~RenderThemeQt() @@ -143,19 +144,17 @@ RenderThemeQt::~RenderThemeQt() } // for some widget painting, we need to fallback to Windows style -QStyle* RenderThemeQt::fallbackStyle() +QStyle* RenderThemeQt::fallbackStyle() const { - if (!m_fallbackStyle) - m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); - - if (!m_fallbackStyle) - m_fallbackStyle = QApplication::style(); - - return m_fallbackStyle; + return (m_fallbackStyle) ? m_fallbackStyle : QApplication::style(); } QStyle* RenderThemeQt::qStyle() const { +#ifdef Q_WS_MAEMO_5 + return fallbackStyle(); +#endif + if (m_page) { ChromeClientQt* client = static_cast(m_page->chrome()->client()); @@ -758,6 +757,10 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con if (result == RadioPart || result == CheckboxPart) option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off); +#ifdef Q_WS_MAEMO_5 + static QPalette lightGrayPalette(Qt::lightGray); + option.palette = lightGrayPalette; +#else // If the owner widget has a custom palette, use it Page* page = o->document()->page(); if (page) { @@ -766,6 +769,7 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con if (pageClient) option.palette = pageClient->palette(); } +#endif return result; } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h index 617c875..19337ac 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h @@ -138,7 +138,7 @@ private: void setPopupPadding(RenderStyle*) const; QStyle* qStyle() const; - QStyle* fallbackStyle(); + QStyle* fallbackStyle() const; Page* m_page; -- cgit v0.12 From 7ced77b654eb46af1221a55e315795c1be1753a0 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 2 Feb 2010 12:17:19 +0100 Subject: Fixed potential crash in mac style --- src/gui/styles/qmacstyle_mac.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index c2e5871..aab16cb 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2412,9 +2412,11 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW break; case PM_ToolBarFrameWidth: ret = 1; - if (QMainWindow * mainWindow = qobject_cast(widget->parent())) - if (mainWindow->unifiedTitleAndToolBarOnMac()) - ret = 0; + if (widget) { + if (QMainWindow * mainWindow = qobject_cast(widget->parent())) + if (mainWindow->unifiedTitleAndToolBarOnMac()) + ret = 0; + } break; default: ret = QWindowsStyle::pixelMetric(metric, opt, widget); -- cgit v0.12 From db5f673ccf5a56772ff83cad52beab7b14cd9520 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 2 Feb 2010 12:46:52 +0100 Subject: fix whitespace --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index dc23392..9a3ee32 100755 --- a/configure +++ b/configure @@ -3369,10 +3369,10 @@ Configure options: -debug-and-release . Compile and link two versions of Qt, with and without debugging turned on (Mac only). - -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting) + -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting) - -opensource......... Compile and link the Open-Source Edition of Qt. - -commercial......... Compile and link the Commercial Edition of Qt. + -opensource ........ Compile and link the Open-Source Edition of Qt. + -commercial ........ Compile and link the Commercial Edition of Qt. * -shared ............ Create and use shared Qt libraries. @@ -3765,7 +3765,7 @@ Qt/X11 only: Requires fontconfig/fontconfig.h, libfontconfig, freetype.h and libfreetype. - $XIN -no-xinput.......... Do not compile Xinput support. + $XIN -no-xinput ......... Do not compile Xinput support. $XIY -xinput ............ Compile Xinput support. This also enabled tablet support which requires IRIX with wacom.h and libXi or XFree86 with X11/extensions/XInput.h and libXi. -- cgit v0.12 From 64581bfcb285a2c51e5bb0facd9dc82fb53c6875 Mon Sep 17 00:00:00 2001 From: Iain Date: Tue, 2 Feb 2010 12:10:01 +0000 Subject: Revert "Update default FPU flags on Symbian to be softvfp+vfpv2" RVCT2.2 build 686 crashes when compiling the drawhelpers with VFPv2 enabled. Until compiler workaround found, back out the change. This reverts commit 297e84fcfed524687455d3d94161bf2a32f62d37. Conflicts: configure.exe --- configure.exe | Bin 1178112 -> 1178112 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index b89999b..21fdcfa 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 342e47b..8d1b640 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1482,7 +1482,7 @@ void Configure::applySpecSpecifics() dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; dictionary[ "QT_INSTALL_PREFIX" ] = ""; dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; - dictionary[ "ARM_FPU_TYPE" ] = "softvfp+vfpv2"; + dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; dictionary[ "SQL_SQLITE" ] = "yes"; dictionary[ "SQL_SQLITE_LIB" ] = "system"; -- cgit v0.12 From 3cecf1548ff6f6255bd3d6163758fe7950c0a2f9 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 2 Feb 2010 14:00:21 +0200 Subject: Introduce of QScriptValue autotest generator. The patch contain the QScriptValue autotest suite generator. Based on an input it can generate expected tests results and simple tests cases. The results are kept inside generated autotest implementation file (cpp), which could be included by main test file (tst_qscriptvalue.cpp). Generator gives great coverage for isXXX, toXXX, comparison methods. The generator should be used manually and it is not compiled by default. Reviewed-by: Kent Hansen --- tests/auto/qscriptvalue/testgen/data.txt | 116 ++++ tests/auto/qscriptvalue/testgen/gen.py | 203 +++++++ tests/auto/qscriptvalue/testgen/main.cpp | 40 ++ tests/auto/qscriptvalue/testgen/testgen.pro | 18 + tests/auto/qscriptvalue/testgen/testgenerator.cpp | 644 ++++++++++++++++++++++ tests/auto/qscriptvalue/testgen/testgenerator.h | 55 ++ 6 files changed, 1076 insertions(+) create mode 100644 tests/auto/qscriptvalue/testgen/data.txt create mode 100755 tests/auto/qscriptvalue/testgen/gen.py create mode 100644 tests/auto/qscriptvalue/testgen/main.cpp create mode 100644 tests/auto/qscriptvalue/testgen/testgen.pro create mode 100644 tests/auto/qscriptvalue/testgen/testgenerator.cpp create mode 100644 tests/auto/qscriptvalue/testgen/testgenerator.h diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt new file mode 100644 index 0000000..8e7026e --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/data.txt @@ -0,0 +1,116 @@ +# Data set for QScriptValue autotest. + +# Each line is a c++ code that should return a QScriptValue object. +# Lines that are empty or start with '#' will be ignored + +QScriptValue() + +#Unbound values +QScriptValue(QScriptValue::UndefinedValue) +QScriptValue(QScriptValue::NullValue) +QScriptValue(true) +QScriptValue(false) +QScriptValue(int(122)) +QScriptValue(uint(124)) +QScriptValue(0) +QScriptValue(0.0) +QScriptValue(123.0) +QScriptValue(6.37e-8) +QScriptValue(-6.37e-8) +QScriptValue(0x43211234) +QScriptValue(0x10000) +QScriptValue(0x10001) +QScriptValue(qSNaN()) +QScriptValue(qQNaN()) +QScriptValue(qInf()) +QScriptValue(-qInf()) +QScriptValue("NaN") +QScriptValue("Infinity") +QScriptValue("-Infinity") +QScriptValue("ciao") +QScriptValue(QString::fromLatin1("ciao")) +QScriptValue(QString("")) +QScriptValue(QString()) +QScriptValue(QString("0")) +QScriptValue(QString("123")) +QScriptValue(QString("12.4")) + +#Unbound values (bound to a null engine) +QScriptValue(0, QScriptValue::UndefinedValue) +QScriptValue(0, QScriptValue::NullValue) +QScriptValue(0, true) +QScriptValue(0, false) +QScriptValue(0, int(122)) +QScriptValue(0, uint(124)) +QScriptValue(0, 0) +QScriptValue(0, 0.0) +QScriptValue(0, 123.0) +QScriptValue(0, 6.37e-8) +QScriptValue(0, -6.37e-8) +QScriptValue(0, 0x43211234) +QScriptValue(0, 0x10000) +QScriptValue(0, 0x10001) +QScriptValue(0, qSNaN()) +QScriptValue(0, qQNaN()) +QScriptValue(0, qInf()) +QScriptValue(0, -qInf()) +QScriptValue(0, "NaN") +QScriptValue(0, "Infinity") +QScriptValue(0, "-Infinity") +QScriptValue(0, "ciao") +QScriptValue(0, QString::fromLatin1("ciao")) +QScriptValue(0, QString("")) +QScriptValue(0, QString()) +QScriptValue(0, QString("0")) +QScriptValue(0, QString("123")) +QScriptValue(0, QString("12.3")) + +#Bound values +QScriptValue(engine, QScriptValue::UndefinedValue) +QScriptValue(engine, QScriptValue::NullValue) +QScriptValue(engine, true) +QScriptValue(engine, false) +QScriptValue(engine, int(122)) +QScriptValue(engine, uint(124)) +QScriptValue(engine, 0) +QScriptValue(engine, 0.0) +QScriptValue(engine, 123.0) +QScriptValue(engine, 6.37e-8) +QScriptValue(engine, -6.37e-8) +QScriptValue(engine, 0x43211234) +QScriptValue(engine, 0x10000) +QScriptValue(engine, 0x10001) +QScriptValue(engine, qSNaN()) +QScriptValue(engine, qQNaN()) +QScriptValue(engine, qInf()) +QScriptValue(engine, -qInf()) +QScriptValue(engine, "NaN") +QScriptValue(engine, "Infinity") +QScriptValue(engine, "-Infinity") +QScriptValue(engine, "ciao") +QScriptValue(engine, QString::fromLatin1("ciao")) +QScriptValue(engine, QString("")) +QScriptValue(engine, QString()) +QScriptValue(engine, QString("0")) +QScriptValue(engine, QString("123")) +QScriptValue(engine, QString("1.23")) + +# evaluate +engine->evaluate("[]") +engine->evaluate("{}") +engine->evaluate("Object.prototype") +engine->evaluate("Date.prototype") +engine->evaluate("Array.prototype") +engine->evaluate("Function.prototype") +engine->evaluate("Error.prototype") +engine->evaluate("Object") +engine->evaluate("Array") +engine->evaluate("Number") +engine->evaluate("Function") +engine->evaluate("(function() { return 1; })") +engine->evaluate("(function() { return 'ciao'; })") +engine->evaluate("(function() { throw new Error('foo'); })") +engine->evaluate("/foo/") +engine->evaluate("new Object()") +engine->evaluate("new Array()") +engine->evaluate("new Error()") diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py new file mode 100755 index 0000000..fddb853 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -0,0 +1,203 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + +#This library is free software; you can redistribute it and/or +#modify it under the terms of the GNU Library General Public +#License as published by the Free Software Foundation; either +#version 2 of the License, or (at your option) any later version. + +#This library is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +#Library General Public License for more details. + +#You should have received a copy of the GNU Library General Public License +#along with this library; see the file COPYING.LIB. If not, write to +#the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +#Boston, MA 02110-1301, USA. + +from __future__ import with_statement +from string import Template + +class Options(): + """Option manager. It parse and check all paramteres, set internal variables.""" + def __init__(self, args): + import logging as log + log.basicConfig() + #comand line options parser + from optparse import OptionParser + #load some directory searching stuff + import os.path, sys + + opt = OptionParser("%prog [options] path_to_input_file path_to_output_file.") + + self._o, self._a = opt.parse_args(args) + + try: + if not (os.path.exists(self._a[0])): + raise Exception("Path doesn't exist") + if len(self._a) != 2: + raise IndexError("Only two files!") + self._o.ipath = self._a[0] + self._o.opath = self._a[1] + except IndexError: + log.error("Bad usage. Please try -h or --help") + sys.exit(1) + except Exception: + log.error("Path '" + self._a[0] + " or " + self._a[1] + "' don't exist") + sys.exit(2) + + def __getattr__(self, attr): + """map all options properties into this object (remove one level of indirection)""" + return getattr(self._o, attr) + + +mainTempl = Template("""/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +//////////////////////////////////////////////////////////////// +// THIS FILE IS AUTOGENERATED, ALL MODIFICATIONS WILL BE LAST // +//////////////////////////////////////////////////////////////// + +#include "testgenerator.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +typedef bool (QScriptValue::*ComparisionType) (const QScriptValue&) const; +static QVector compare(ComparisionType compare, QScriptValue value, const QScriptValueList& values) { + QVector result; + result.reserve(${count}); + + QScriptValueList::const_iterator i = values.constBegin(); + for (; i != values.constEnd(); ++i) { + result << (value.*compare)(*i); + } + return result; +} + +static void dump(QDataStream& out, QScriptValue& value, const QString& expression, const QScriptValueList& allValues) +{ + out << QString(expression); + + out << value.isValid(); + out << value.isBool(); + out << value.isBoolean(); + out << value.isNumber(); + out << value.isFunction(); + out << value.isNull(); + out << value.isString(); + out << value.isUndefined(); + out << value.isVariant(); + out << value.isQObject(); + out << value.isQMetaObject(); + out << value.isObject(); + out << value.isDate(); + out << value.isRegExp(); + out << value.isArray(); + out << value.isError(); + + out << value.toString(); + out << value.toNumber(); + out << value.toBool(); + out << value.toBoolean(); + out << value.toInteger(); + out << value.toInt32(); + out << value.toUInt32(); + out << value.toUInt16(); + + out << compare(&QScriptValue::equals, value, allValues); + out << compare(&QScriptValue::strictlyEquals, value, allValues); + out << compare(&QScriptValue::lessThan, value, allValues); + out << compare(&QScriptValue::instanceOf, value, allValues); + + out << qscriptvalue_cast(value); + out << qscriptvalue_cast(value); + out << qscriptvalue_cast(value); + out << qscriptvalue_cast(value); + out << qscriptvalue_cast(value); + out << qscriptvalue_cast(value); +} + +void TestGenerator::prepareData() +{ + QScriptEngine* engine = new QScriptEngine; + + QScriptValueList allValues; + allValues << ${values}; + QVector allDataTags; + allDataTags.reserve(${count}); + allDataTags << ${dataTags}; + QDataStream out(&m_tempFile); + out << allDataTags; + + for(unsigned i = 0; i < ${count}; ++i) + dump(out, allValues[i], allDataTags[i], allValues); + + delete engine; +} +""") +qsvTempl = Template(""" + { + QScriptValue value = ${expr}; + dump(out, value, "${expr_esc}", allValues); + }""") + + + +if __name__ == '__main__': + import sys + o = Options(sys.argv[1:]) + out = [] + qsv = [] + # load input file + with open(o.ipath) as f: + for row in f.readlines(): + qsv.append(row) + + #skip comments and empty lines + qsv = filter(lambda w: len(w.strip()) and not w.startswith('#'), qsv) + + escape = lambda w: w.replace('\\','\\\\').replace('"','\\"') + + for row in qsv: + row = row.replace('\n','') + row_esc = escape(row) + out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc)) + + result = mainTempl.substitute(dump= "".join(out) \ + , values = (11 * ' ' + '<< ').join(qsv) \ + , count = len(qsv) \ + , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv))) + + with open(o.opath, 'w') as f: + f.write(result) + + diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp new file mode 100644 index 0000000..389a725 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/main.cpp @@ -0,0 +1,40 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testgenerator.h" +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + + if (argc != 2) { + qWarning() << "./prog outputfile"; + exit(1); + } + + //Procced + TestGenerator gen(a.arguments()[1]); + gen.run(); + + return 0; +} diff --git a/tests/auto/qscriptvalue/testgen/testgen.pro b/tests/auto/qscriptvalue/testgen/testgen.pro new file mode 100644 index 0000000..47709a8 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgen.pro @@ -0,0 +1,18 @@ +QT += core script +TARGET = testgen +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app + +SOURCES += main.cpp \ + testgenerator.cpp +HEADERS += testgenerator.h + + +INPUT_DATASET = data.txt +dataset.name = Generating QScraiptValue autotest's dataset +dataset.output = autogenerated.cpp +dataset.commands = python gen.py data.txt autogenerated.cpp +dataset.input = INPUT_DATASET +dataset.variable_out = SOURCES +QMAKE_EXTRA_COMPILERS += dataset diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp new file mode 100644 index 0000000..199e84b --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp @@ -0,0 +1,644 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testgenerator.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +void TestGenerator::save(const QString& data) +{ + QTextStream out(&m_ofile); + out << data; +} + +static QString escape(QString txt) +{ + return txt.replace("\\","\\\\").replace("\"","\\\"").replace("\n","\\n"); +} + +template +QString prepareToInsert(T value) {return QString::fromAscii("\"") + escape(value) + "\"";} +template<> +QString prepareToInsert(qsreal value) +{ + if (qIsNaN(value)) + return "qQNaN()"; + if (qIsInf(value)) + return "qInf()"; + return QString::number(value, 'g', 16); +} +template<> +QString prepareToInsert(qint32 value) {return QString::number(value);} +template<> +QString prepareToInsert(quint32 value) {return QString::number(value);} +template<> +QString prepareToInsert(quint16 value) {return QString::number(value);} +template<> +QString prepareToInsert(bool value) {return value ? "true" : "false";} +template<> +QString prepareToInsert(QString value) {return QString::fromAscii("\"") + escape(value) + "\"";} + +template +QString typeName() {return QString();} +template<> +QString typeName() {return "qsreal";} +template<> +QString typeName() {return "qint32";} +template<> +QString typeName() {return "quint32";} +template<> +QString typeName() {return "quint16";} +template<> +QString typeName() {return "bool";} +template<> +QString typeName() {return "QString";} + +static QString generateIsXXXDef(const QString& name, const QList& list) +{ + static const QString templ("void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QSet %1;\n"\ + " if (%1.isEmpty()) {\n"\ + " %1%2\n"\ + " }\n"\ + " newRow(expr) << %1.contains(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(bool, expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"\ + "\n"); + + if (!list.size()) { + qWarning() << name << ": nothing to add!" ; + return QString(); + } + + QString result = templ; + QStringList set; + foreach(QString t, list) { + t = escape(t); + t.append('\"'); + t.prepend('\"'); + set.append(QString(" << ")); + set.append(t); + set.append("\n "); + } + set.append(";"); + return result.arg(name, set.join(QString())); +} + +template +static QString generateToXXXDef(const QString& name, const QList >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash %1;\n"\ + " if (%1.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << %1.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + QString result = templ; + + typename QList >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append(name); + set.append(".insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(name, typeName(), set.join(QString())); +} + + +template<> +QString generateToXXXDef(const QString& name, const QList >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash %1;\n"\ + " if (%1.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << %1.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + "%666" + " if (qIsInf(expected)) {\n"\ + " QVERIFY(qIsInf(value.%1()));\n"\ + " return;\n"\ + " }\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + QString result = templ; + + QList >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append(name); + set.append(".insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert(t.second)); + set.append(QString::fromAscii(");\n")); + } + // toInteger shouldn't return NaN, so it would be nice to catch the case. + QString hook; + if (name == "toNumber") { + hook = + " if (qIsNaN(expected)) {\n"\ + " QVERIFY(qIsNaN(value.toNumber()));\n"\ + " return;\n"\ + " }\n"; + } + return result.arg(name, typeName(), set.join(QString()), hook); +} + +template +static QString generateCastDef(const QList >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash value;\n"\ + " if (value.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << value.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + QString result = templ; + + typename QList >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append("value.insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(typeName(), set.join(QString())); +} + +template<> +QString generateCastDef(const QList >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash value;\n"\ + " if (value.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << value.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " if (qIsNaN(expected)) {\n" + " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" + " return;\n" + " }\n"\ + " if (qIsInf(expected)) {\n" + " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" + " return;\n" + " }\n" + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + QString result = templ; + + QList >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append("value.insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(typeName(), set.join(QString())); +} + +static QString generateCompareDef(const QString& comparisionType, const QList tags) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn(\"other\");\n"\ + " QTest::addColumn(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char *expr)\n"\ + "{\n"\ + " static QSet equals;\n"\ + " if (equals.isEmpty()) {\n"\ + "%2\n"\ + " }\n"\ + " QHash::const_iterator it;\n"\ + " for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\ + " QString tag = QString::fromLatin1(\"%20 <=> %21\").arg(expr).arg(it.key());\n"\ + " newRow(tag.toLatin1()) << it.value() << equals.contains(tag);\n"\ + " }\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char *, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(QScriptValue, other);\n"\ + " QFETCH(bool, expected);\n"\ + " QCOMPARE(value.%1(other), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + Q_ASSERT(comparisionType == "strictlyEquals" + || comparisionType == "equals" + || comparisionType == "lessThan" + || comparisionType == "instanceOf"); + QString result = templ; + + QStringList set; + foreach(const QString& tmp, tags) { + set.append(" equals.insert(\"" + escape(tmp) + "\");"); + } + return result.arg(comparisionType, set.join("\n")); +} + +static QString generateInitDef(const QVector& allDataTags) +{ + static const QString templ = "/*\n"\ + " Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)\n"\ + "\n"\ + " This library is free software; you can redistribute it and/or\n"\ + " modify it under the terms of the GNU Library General Public\n"\ + " License as published by the Free Software Foundation; either\n"\ + " version 2 of the License, or (at your option) any later version.\n"\ + "\n"\ + " This library is distributed in the hope that it will be useful,\n"\ + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"\ + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"\ + " Library General Public License for more details.\n"\ + "\n"\ + " You should have received a copy of the GNU Library General Public License\n"\ + " along with this library; see the file COPYING.LIB. If not, write to\n"\ + " the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"\ + " Boston, MA 02110-1301, USA.\n"\ + "*/\n"\ + "\n"\ + "#include \"tst_qscriptvalue.h\"\n\n"\ + "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\ + "\n"\ + "void tst_QScriptValue::initScriptValues()\n"\ + "{\n"\ + " m_values.clear();\n"\ + " if (engine) \n"\ + " delete engine;\n"\ + " engine = new QScriptEngine;\n"\ + "%1\n}\n\n"; + QString result = templ; + QStringList set; + foreach(const QString tag, allDataTags) { + set.append(" DEFINE_TEST_VALUE(" + tag + ");"); + } + + return result.arg(set.join("\n")); +} + +static void squashTags(QString dataTag, const QVector& results, QList& tags, QVector dataTags) +{ + for(int i = 0; i < results.count(); ++i) { + if (results.at(i)) + tags.append(dataTag + " <=> " + dataTags[i]); + } +} + + +QString TestGenerator::generateTest() +{ + // All data tags keept in one place. + QVector dataTags; + + // Data tags for values that return true in isXXX call + QList isValidList; + QList isBoolList; + QList isBooleanList; + QList isNumberList; + QList isFunctionList; + QList isNullList; + QList isStringList; + QList isUndefinedList; + QList isVariantList; + QList isQObjectList; + QList isQMetaObjectList; + QList isObjectList; + QList isDateList; + QList isRegExpList; + QList isArrayList; + QList isErrorList; + + // List of pairs data tag and value returned from toXXX call + QList > toStringList; + QList > toNumberList; + QList > toBoolList; + QList > toBooleanList; + QList > toIntegerList; + QList > toInt32List; + QList > toUInt32List; + QList > toUInt16List; + + // List of complex tags returning true + QList equalsList; + QList strictlyEqualsList; + QList lessThanList; + QList instanceOfList; + + QList > castStringList; + QList > castSRealList; + QList > castBoolList; + QList > castInt32List; + QList > castUInt32List; + QList > castUInt16List; + + // Load. + m_tempFile.seek(0); + QDataStream in(&m_tempFile); + in >> dataTags; + Q_ASSERT(in.status() == in.Ok); + + while(!in.atEnd()) + { + bool isValidRes; + bool isBoolRes; + bool isBooleanRes; + bool isNumberRes; + bool isFunctionRes; + bool isNullRes; + bool isStringRes; + bool isUndefinedRes; + bool isVariantRes; + bool isQObjectRes; + bool isQMetaObjectRes; + bool isObjectRes; + bool isDateRes; + bool isRegExpRes; + bool isArrayRes; + bool isErrorRes; + + QString toStringRes; + qsreal toNumberRes; + bool toBoolRes; + bool toBooleanRes; + qsreal toIntegerRes; + qint32 toInt32Res; + quint32 toUInt32Res; + quint16 toUInt16Res; + //toVariantRes; + //toDateTimeRes; + + QVector equalsRes; + QVector strictlyEqualsRes; + QVector lessThanRes; + QVector instanceOfRes; + + QString castStringRes; + qsreal castSRealRes; + bool castBoolRes; + qint32 castInt32Res; + quint32 castUInt32Res; + quint16 castUInt16Res; + + QString dataTag; + in >> dataTag; + in >> isValidRes; + in >> isBoolRes; + in >> isBooleanRes; + in >> isNumberRes; + in >> isFunctionRes; + in >> isNullRes; + in >> isStringRes; + in >> isUndefinedRes; + in >> isVariantRes; + in >> isQObjectRes; + in >> isQMetaObjectRes; + in >> isObjectRes; + in >> isDateRes; + in >> isRegExpRes; + in >> isArrayRes; + in >> isErrorRes; + + if (isValidRes) isValidList.append(dataTag); + if (isBoolRes) isBoolList.append(dataTag); + if (isBooleanRes) isBooleanList.append(dataTag); + if (isNumberRes) isNumberList.append(dataTag); + if (isFunctionRes) isFunctionList.append(dataTag); + if (isNullRes) isNullList.append(dataTag); + if (isStringRes) isStringList.append(dataTag); + if (isUndefinedRes) isUndefinedList.append(dataTag); + if (isVariantRes) isVariantList.append(dataTag); + if (isQObjectRes) isQObjectList.append(dataTag); + if (isQMetaObjectRes) isQMetaObjectList.append(dataTag); + if (isObjectRes) isObjectList.append(dataTag); + if (isDateRes) isDateList.append(dataTag); + if (isRegExpRes) isRegExpList.append(dataTag); + if (isArrayRes) isArrayList.append(dataTag); + if (isErrorRes) isErrorList.append(dataTag); + + in >> toStringRes; + in >> toNumberRes; + in >> toBoolRes; + in >> toBooleanRes; + in >> toIntegerRes; + in >> toInt32Res; + in >> toUInt32Res; + in >> toUInt16Res; + //in >> toVariantRes; + //in >> toDateTimeRes; + + toStringList.append(QPair(dataTag, toStringRes)); + toNumberList.append(QPair(dataTag, toNumberRes)); + toBoolList.append(QPair(dataTag, toBoolRes)); + toBooleanList.append(QPair(dataTag, toBooleanRes)); + toIntegerList.append(QPair(dataTag, toIntegerRes)); + toInt32List.append(QPair(dataTag, toInt32Res)); + toUInt32List.append(QPair(dataTag, toUInt32Res)); + toUInt16List.append(QPair(dataTag, toUInt16Res)); + + in >> equalsRes; + in >> strictlyEqualsRes; + in >> lessThanRes; + in >> instanceOfRes; + + squashTags(dataTag, equalsRes, equalsList, dataTags); + squashTags(dataTag, strictlyEqualsRes, strictlyEqualsList, dataTags); + squashTags(dataTag, lessThanRes, lessThanList, dataTags); + squashTags(dataTag, instanceOfRes, instanceOfList, dataTags); + + in >> castStringRes; + in >> castSRealRes; + in >> castBoolRes; + in >> castInt32Res; + in >> castUInt32Res; + in >> castUInt16Res; + + castStringList.append(QPair(dataTag, castStringRes)); + castSRealList.append(QPair(dataTag, castSRealRes)); + castBoolList.append(QPair(dataTag, castBoolRes)); + castInt32List.append(QPair(dataTag, castInt32Res)); + castUInt32List.append(QPair(dataTag, castUInt32Res)); + castUInt16List.append(QPair(dataTag, castUInt16Res)); + + Q_ASSERT(in.status() == in.Ok); + } + + Q_ASSERT(in.atEnd()); + + // Generate. + QStringList result; + result.append(generateInitDef(dataTags)); + result.append(generateIsXXXDef("isValid", isValidList)); + result.append(generateIsXXXDef("isBool", isBoolList)); + result.append(generateIsXXXDef("isBoolean", isBooleanList)); + result.append(generateIsXXXDef("isNumber", isNumberList)); + result.append(generateIsXXXDef("isFunction", isFunctionList)); + result.append(generateIsXXXDef("isNull", isNullList)); + result.append(generateIsXXXDef("isString", isStringList)); + result.append(generateIsXXXDef("isUndefined", isUndefinedList)); + result.append(generateIsXXXDef("isVariant", isVariantList)); + result.append(generateIsXXXDef("isQObject", isQObjectList)); + result.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList)); + result.append(generateIsXXXDef("isObject", isObjectList)); + result.append(generateIsXXXDef("isDate", isDateList)); + result.append(generateIsXXXDef("isRegExp", isRegExpList)); + result.append(generateIsXXXDef("isArray", isArrayList)); + result.append(generateIsXXXDef("isError", isErrorList)); + + result.append(generateToXXXDef("toString", toStringList)); + result.append(generateToXXXDef("toNumber", toNumberList)); + result.append(generateToXXXDef("toBool", toBoolList)); + result.append(generateToXXXDef("toBoolean", toBooleanList)); + result.append(generateToXXXDef("toInteger", toIntegerList)); + result.append(generateToXXXDef("toInt32", toInt32List)); + result.append(generateToXXXDef("toUInt32", toUInt32List)); + result.append(generateToXXXDef("toUInt16", toUInt16List)); + + result.append(generateCompareDef("equals", equalsList)); + result.append(generateCompareDef("strictlyEquals", strictlyEqualsList)); + result.append(generateCompareDef("lessThan", lessThanList)); + result.append(generateCompareDef("instanceOf", instanceOfList)); + + result.append(generateCastDef(castStringList)); + result.append(generateCastDef(castSRealList)); + result.append(generateCastDef(castBoolList)); + result.append(generateCastDef(castInt32List)); + result.append(generateCastDef(castUInt32List)); + result.append(generateCastDef(castUInt16List)); + + return result.join("\n"); +} + + + + + + + + + diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h new file mode 100644 index 0000000..d3a2196 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgenerator.h @@ -0,0 +1,55 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TESTGENERATOR_H +#define TESTGENERATOR_H + +#include +#include +#include + +class TestGenerator { +public: + TestGenerator(QString& outputpath) + : m_ofile(outputpath) + { + // Open output file + if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) { + qWarning() << "Can't open output file: " << outputpath; + exit(2); + } + m_tempFile.open(); + } + + void run() + { + prepareData(); + Q_ASSERT(m_tempFile.size()); + save(generateTest()); + } + + void prepareData(); + QString generateTest(); + void save(const QString& data); +private: + QFile m_ofile; + QTemporaryFile m_tempFile; +}; + +#endif // TESTGENERATOR_H -- cgit v0.12 From 88c4000c21be7af37bc490a2edd9d1f481b3a862 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 2 Feb 2010 13:20:10 +0100 Subject: Fixed compilation of the GL2 engine for OpenGL ES 2. glColor4f is not defined in OpenGL ES 2. Reviewed-by: Trond --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 406112a..07f3159 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -561,7 +561,9 @@ void QGL2PaintEngineExPrivate::resetGLState() glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR); glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR); glDisableVertexAttribArray(QT_OPACITY_ATTR); +#ifndef QT_OPENGL_ES_2 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); // color may have been changed by glVertexAttrib() +#endif } void QGL2PaintEngineEx::endNativePainting() -- cgit v0.12 From 7f31c6969ff27320b088e214b0ae6bf1ae36ecc3 Mon Sep 17 00:00:00 2001 From: Pavel Fric Date: Tue, 2 Feb 2010 14:42:06 +0100 Subject: Added Czech translations. Merge-request: 440 Reviewed-by: Oswald Buddenhagen --- tools/assistant/translations/qt_help.pro | 1 + tools/assistant/translations/translations.pro | 1 + tools/designer/translations/translations.pro | 1 + tools/linguist/linguist/linguist.pro | 1 + translations/assistant_cs.ts | 1074 +++ translations/designer_cs.ts | 7051 ++++++++++++++++ translations/linguist_cs.ts | 2023 +++++ translations/qt_cs.ts | 10362 ++++++++++++++++++++++++ translations/qt_help_cs.ts | 395 + translations/translations.pri | 2 +- 10 files changed, 20910 insertions(+), 1 deletion(-) create mode 100644 translations/assistant_cs.ts create mode 100644 translations/designer_cs.ts create mode 100644 translations/linguist_cs.ts create mode 100644 translations/qt_cs.ts create mode 100644 translations/qt_help_cs.ts diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro index db54ae6..1012f3f 100644 --- a/tools/assistant/translations/qt_help.pro +++ b/tools/assistant/translations/qt_help.pro @@ -41,6 +41,7 @@ HEADERS += ../lib/qhelpcollectionhandler_p.h \ TR_DIR = $$PWD/../../../translations TRANSLATIONS = \ + $$TR_DIR/qt_help_cs.ts \ $$TR_DIR/qt_help_da.ts \ $$TR_DIR/qt_help_de.ts \ $$TR_DIR/qt_help_ja.ts \ diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro index 95501ab..d29ffc3 100644 --- a/tools/assistant/translations/translations.pro +++ b/tools/assistant/translations/translations.pro @@ -42,6 +42,7 @@ HEADERS += ../tools/assistant/aboutdialog.h \ TR_DIR = $$PWD/../../../translations TRANSLATIONS = \ + $$TR_DIR/assistant_cs.ts \ $$TR_DIR/assistant_da.ts \ $$TR_DIR/assistant_de.ts \ $$TR_DIR/assistant_fr.ts \ diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro index 03c1415..a1b99fd 100644 --- a/tools/designer/translations/translations.pro +++ b/tools/designer/translations/translations.pro @@ -129,6 +129,7 @@ HEADERS += ../../shared/findwidget/abstractfindwidget.h \ TR_DIR = $$PWD/../../../translations TRANSLATIONS = \ + $$TR_DIR/designer_cs.ts \ $$TR_DIR/designer_de.ts \ $$TR_DIR/designer_fr.ts \ $$TR_DIR/designer_ja.ts \ diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro index c902aeb..693bc71 100644 --- a/tools/linguist/linguist/linguist.pro +++ b/tools/linguist/linguist/linguist.pro @@ -97,6 +97,7 @@ RESOURCES += linguist.qrc TR_DIR = $$PWD/../../../translations TRANSLATIONS = \ + $$TR_DIR/linguist_cs.ts \ $$TR_DIR/linguist_de.ts \ $$TR_DIR/linguist_fr.ts \ $$TR_DIR/linguist_ja.ts \ diff --git a/translations/assistant_cs.ts b/translations/assistant_cs.ts new file mode 100644 index 0000000..2156187 --- /dev/null +++ b/translations/assistant_cs.ts @@ -0,0 +1,1074 @@ + + + + + AboutDialog + + + &Close + &Zavřít + + + + AboutLabel + + + Warning + Varování + + + + Unable to launch external application. + + Chyba při spouštění vnější aplikace. + + + + + OK + OK + + + + BookmarkDialog + + + Add Bookmark + Přidat záložku + + + + Bookmark: + Záložka: + + + + Add in Folder: + Zřídit ve složce: + + + + New Folder + Nová složka + + + + + + + + Bookmarks + Záložky + + + + + + + + + + + Delete Folder + Smazat složku + + + + Rename Folder + Přejmenovat složku + + + + BookmarkManager + + + Bookmarks + Záložky + + + + Remove + Odstranit + + + + You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue? + Když smažete tuto složku, bude smazán i <br>celý její obsah. Opravdu chcete pokračovat? + + + + + New Folder + Nová složka + + + + BookmarkWidget + + + Filter: + Filtr: + + + + Remove + Odstranit + + + + Delete Folder + Smazat složku + + + + Rename Folder + Přejmenovat složku + + + + Show Bookmark + Ukázat záložku + + + + Show Bookmark in New Tab + Ukázat záložku v nové kartě + + + + Delete Bookmark + Smazat záložku + + + + Rename Bookmark + Přejmenovat záložku + + + + Add + Přidat + + + + CentralWidget + + + Add new page + Přidat novou stranu + + + + Close current page + Zavřít současnou stranu + + + + Print Document + Vytisknout dokument + + + + + unknown + Neznámý + + + + Add New Page + Přidat novou stranu + + + + Close This Page + Zavřít tuto stranu + + + + Close Other Pages + Zavřít jiné strany + + + + Add Bookmark for this Page... + Přidat záložku pro tuto stranu... + + + + Search + Hledat + + + + ContentWindow + + + Open Link + Otevřít adresu odkazu + + + + Open Link in New Tab + Otevřít odkaz v nové kartě + + + + FilterNameDialogClass + + + Add Filter Name + Přidat název filtru + + + + Filter Name: + Název filtru: + + + + FindWidget + + + Previous + Předchozí + + + + Next + Další + + + + Case Sensitive + Rozlišující velká a malá písmena + + + + Whole words + Celá slova + + + + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Konec strany + + + + FontPanel + + + Font + Písmo + + + + &Writing system + Způsob &psaní + + + + &Family + &Písmová rodina + + + + &Style + &Styl + + + + &Point size + &Bodová velikost + + + + HelpViewer + + + Help + Nápověda + + + + OK + OK + + + + <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> + <title>Chyba 404 ...</title><div align="center"><br><br><h1>Stranu se nepodařilo najít.</h1><br><h3>'%1'</h3></div> + + + + Copy &Link Location + &Kopírovat adresu odkazu + + + + Open Link in New Tab Ctrl+LMB + Otevřít odkaz v nové kartě Ctrl+LMB + + + + Open Link in New Tab + Otevřít odkaz v nové kartě + + + + Unable to launch external application. + + Chyba při spouštění vnější aplikace. + + + + + IndexWindow + + + &Look for: + &Hledat: + + + + Open Link + Otevřít adresu odkazu + + + + Open Link in New Tab + Otevřít odkaz v nové kartě + + + + InstallDialog + + + + Install Documentation + Nainstalovat dokumentaci + + + + Downloading documentation info... + Stahuje se informace o dokumentaci... + + + + Download canceled. + Stahování bylo zrušeno. + + + + + + Done. + Hotovo. + + + + The file %1 already exists. Do you want to overwrite it? + Soubor %1 již existuje. Chcete jej přepsat? + + + + Unable to save the file %1: %2. + Soubor %1 nelze uložit: %2. + + + + Downloading %1... + Stahuje se %1... + + + + + + Download failed: %1. + Stažení se nezdařilo: %1. + + + + Documentation info file is corrupt! + Soubor s informací o dokumentaci je poškozen! + + + + Download failed: Downloaded file is corrupted. + Stažení se nezdařilo: Stažený soubor je pravděpodobně poškozen. + + + + Installing documentation %1... + Instaluje dokumentace %1... + + + + Error while installing documentation: +%1 + Chyba při instalaci dokumentace: +%1 + + + + Available Documentation: + Dostupná dokumentace: + + + + Install + Instalovat + + + + Cancel + Zrušit + + + + Close + Zavřít + + + + Installation Path: + Cesta pro instalaci: + + + + ... + ... + + + + MainWindow + + + + Index + Rejstřík + + + + + Contents + Obsah + + + + + Bookmarks + Záložky + + + + Search + Hledat + + + + + + Qt Assistant + Qt Assistant + + + + + Unfiltered + Bez filtru + + + + Page Set&up... + &Nastavení strany... + + + + Print Preview... + Náhled tisku... + + + + &Print... + &Tisk... + + + + New &Tab + Nová &karta + + + + &Close Tab + &Zavřít kartu + + + + &Quit + &Ukončit + + + + &Copy selected Text + &Kopírovat vybraný text + + + + &Find in Text... + &Najít v textu... + + + + Find &Next + Hledat &dál + + + + Find &Previous + Najít &předchozí + + + + Preferences... + Nastavení... + + + + Zoom &in + &Zvětšit + + + + Zoom &out + &Zmenšit + + + + Normal &Size + Obvyklá &velikost + + + + Ctrl+0 + Ctrl+0 + + + + ALT+C + ALT+C + + + + ALT+I + ALT+I + + + + ALT+S + ALT+S + + + + &Home + &Začáteční strana + + + + &Back + &Zpět + + + + &Forward + &Dopředu + + + + Sync with Table of Contents + Seřídit stranu s kartou obsahu + + + + Next Page + Další strana + + + + Ctrl+Alt+Right + Ctrl+Alt+Right + + + + Previous Page + Předchozí strana + + + + Ctrl+Alt+Left + Ctrl+Alt+Left + + + + Add Bookmark... + Přidat záložku... + + + + About... + O... + + + + Navigation Toolbar + Navigační pruh + + + + Toolbars + Nástrojové pruhy + + + + Filter Toolbar + Filtrovací pruh + + + + Filtered by: + Filtr: + + + + Address Toolbar + Adresní pruh + + + + Address: + Adresa: + + + + Could not find the associated content item. + Nepodařilo se najít příslušnou položku obsahu. + + + + About %1 + O %1 + + + + Updating search index + Sestavuje se rejstřík hledání + + + + Looking for Qt Documentation... + Hledá se dokumentace ke Qt... + + + + &Window + &Okno + + + + Minimize + Zmenšit + + + + Ctrl+M + Ctrl+M + + + + Zoom + Zvětšení + + + + &File + &Soubor + + + + &Edit + &Úpravy + + + + &View + &Pohled + + + + &Go + &Jít na + + + + ALT+Home + ALT+Home + + + + &Bookmarks + &Záložky + + + + &Help + &Nápověda + + + + ALT+O + ALT+O + + + + CTRL+D + CTRL+D + + + + PreferencesDialog + + + + Add Documentation + Přidat dokumentaci + + + + Qt Compressed Help Files (*.qch) + Stlačené soubory s nápovědoun (*.qch) + + + + The specified file is not a valid Qt Help File! + Zadaný soubor není platným souborem nápovědy ke Qt. + + + + The namespace %1 is already registered! + Jmenný prostor %1 je již zaznamenám! + + + + Remove Documentation + Odstranit dokumentaci + + + + Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents. + Některé v současnosti otevřené dokumenty pocházejí z dokumentace, kterou se právě pokoušíte odstranit. Při odstraňování budou zavřeny. + + + + Cancel + Zrušit + + + + OK + OK + + + + Use custom settings + Použít nastavení stanovená uživatelem + + + + PreferencesDialogClass + + + Preferences + Nastavení + + + + Fonts + Písma + + + + Font settings: + Nastavení písem: + + + + Browser + Prohlížeč + + + + Application + Program + + + + Filters + Filtr + + + + Filter: + Filtr: + + + + Attributes: + Vlastnosti: + + + + 1 + 1 + + + + Add + Přidat + + + + Remove + Odstranit + + + + Documentation + Dokumentace + + + + Registered Documentation: + Zaznamenaná dokumentace: + + + + Add... + Přidat... + + + + Options + Volby + + + + Current Page + Nynější strana + + + + Restore to default + Obnovit výchozí nastavení + + + + Homepage + Začáteční stránka + + + + On help start: + Na začátek nápovědy: + + + + Show my home page + Ukázat moji domovskou stránku + + + + Show a blank page + Ukázat prázdnou stránku + + + + Show my tabs from last session + Ukázat mé karty z posledního sezení + + + + Blank Page + Prázdná strana + + + + QObject + + + The specified collection file does not exist! + Zadaný sbírkový soubor nelze najít! + + + + Missing collection file! + Chybějící sbírkový soubor! + + + + Invalid URL! + Neplatné URL! + + + + Missing URL! + Chybějící URL! + + + + + + Unknown widget: %1 + Neznámý prvek: %1 + + + + + + Missing widget! + Chybějící prvek! + + + + + The specified Qt help file does not exist! + Zadaný soubor s nápovědou ke Qt nelze najít! + + + + + Missing help file! + Chybějící soubor s nápovědou! + + + + Missing filter argument! + Chybějící argument pro filtr! + + + + Unknown option: %1 + Neznámá volba: %1 + + + + + Qt Assistant + Qt Assistant + + + + Could not register documentation file +%1 + +Reason: +%2 + Soubor s dokumentací %1 nelze zaznamenat + +Důvod: +%2 + + + + Documentation successfully registered. + Dokumentace byla úspěšně zaznamenána. + + + + Could not unregister documentation file +%1 + +Reason: +%2 + Zaznamenání souboru s dokumentací %1 nelze zrušit + +Grund: +%2 + + + + Documentation successfully unregistered. + Dokumentace byla úspěšně odstraněna. + + + + Cannot load sqlite database driver! + Databázový ovladač pro SQLite nelze nahrát! + + + + The specified collection file could not be read! + Zadaný sbírkový soubor nelze přečíst! + + + + RemoteControl + + + Debugging Remote Control + Ladí se dálkové ovládání + + + + Received Command: %1 %2 + Přijatý příkaz: %1 : %2 + + + + SearchWidget + + + &Copy + &Kopírovat + + + + Copy &Link Location + &Kopírovat adresu odkazu + + + + Open Link in New Tab + Otevřít odkaz v nové kartě + + + + Select All + Vybrat vše + + + + TopicChooser + + + Choose a topic for <b>%1</b>: + Vyberte námět pro <b>%1</b>: + + + + Choose Topic + Vybrat námět + + + + &Topics + &Náměty + + + + &Display + &Zobrazit + + + + &Close + &Zavřít + + + diff --git a/translations/designer_cs.ts b/translations/designer_cs.ts new file mode 100644 index 0000000..ea33a57 --- /dev/null +++ b/translations/designer_cs.ts @@ -0,0 +1,7051 @@ + + + + + AbstractFindWidget + + + &Previous + &Předchozí + + + + &Next + &Další + + + + &Case sensitive + &Rozlišující velká a malá písmena + + + + Whole &words + Celá &slova + + + + <img src=":/trolltech/shared/images/wrap.png">&nbsp;Search wrapped + <img src=":/trolltech/shared/images/wrap.png">&nbsp;Hledání dosáhlo konce + + + + AddLinkDialog + + + Insert Link + Vložit odkaz + + + + Title: + Název: + + + + URL: + URL: + + + + AppFontDialog + + + Additional Fonts + Dodatečná písma + + + + AppFontManager + + + '%1' is not a file. + '%1' není soubor. + + + + The font file '%1' does not have read permissions. + Soubor s písmem '%1' nemá oprávnění ke čtení. + + + + The font file '%1' is already loaded. + Soubor s písmem '%1' je již nahrán. + + + + The font file '%1' could not be loaded. + Soubor s písmem '%1' se nepodařilo nahrát. + + + + '%1' is not a valid font id. + '%1' není platným písmovým ID. + + + + There is no loaded font matching the id '%1'. + Není nahráno žádné písmo s ID '%1'. + + + + The font '%1' (%2) could not be unloaded. + Písmo '%1' (%2) se nepodařilo uvolnit z paměti. + + + + AppFontWidget + + + Fonts + Písma + + + + Add font files + Přidat soubory s písmy + + + + Remove current font file + Odstranit současný soubor s písmem + + + + Remove all font files + Odstranit všechny soubory s písmy + + + + Add Font Files + Přidat soubory s písmy + + + + Font files (*.ttf) + Soubory s písmy (*.ttf) + + + + Error Adding Fonts + Chyba při přidávání písem + + + + Error Removing Fonts + Chyba při odstraňování písem + + + + Remove Fonts + Odstranit písma + + + + Would you like to remove all fonts? + Chcete odstranit všechna písma? + + + + AppearanceOptionsWidget + + + Form + Formulář + + + + User Interface Mode + Okenní režim + + + + AssistantClient + + + Unable to send request: Assistant is not responding. + Chyba při posílání požadavku: Program Assistant neodpovídá. + + + + The binary '%1' does not exist. + Proveditelný soubor '%1' neexistuje. + + + + Unable to launch assistant (%1). + Program Assistant nelze spustit (%1). + + + + BrushPropertyManager + + + Style + Styl + + + + No brush + Žádný vzor + + + + Solid + Plný + + + + Dense 1 + Hustota 1 + + + + Dense 2 + Hustota 2 + + + + Dense 3 + Hustota 3 + + + + Dense 4 + Hustota 4 + + + + Dense 5 + Hustota 5 + + + + Dense 6 + Hustota 6 + + + + Dense 7 + Hustota 7 + + + + Horizontal + Vodorovný + + + + Vertical + Svislý + + + + Cross + Křížící se čáry + + + + Backward diagonal + Zpětné úhlopříčky + + + + Forward diagonal + Vpřed směřující úhlopříčky + + + + Crossing diagonal + Křížící se úhlopříčky + + + + Color + Barva + + + + [%1, %2] + [%1, %2] + + + + Command + + + + Change signal + Změnit signál + + + + + Change slot + Změnit zdířku + + + + Change signal-slot connection + Změnit spojení signál-zdířka + + + + Change sender + Změnit vysílač + + + + Change receiver + Změnit přijímač + + + + Add connection + Přidat spojení + + + + Adjust connection + Nastavit spojení + + + + Delete connections + Smazat spojení + + + + Change source + Změnit zdroj + + + + Change target + Změnit koncový bod + + + + Insert '%1' + Vložit '%1' + + + + Raise '%1' + '%1' dopředu + + + + Lower '%1' + '%1' dozadu + + + + Delete '%1' + Smazat '%1' + + + + Reparent '%1' + Přiřadit jiný prvek '%1' + + + + Promote to custom widget + Vytvořit zástupný symbol pro uživatelsky stanovený prvek + + + + Demote from custom widget + Odstranit zástupný symbol pro uživatelsky stanovenou třídu + + + + Lay out using grid + Rozmístit předměty tabulkově + + + + Lay out vertically + Rozmístit předměty svisle + + + + Lay out horizontally + Rozmístit předměty vodorovně + + + + Break layout + Zrušit rozvržení + + + + + + Move Page + Posunout stranu + + + + + + + Delete Page + Smazat stranu + + + + + Page + Strana + + + + page + Strana + + + + + + + Insert Page + Vložit stranu + + + + Change Tab order + Změnit pořadí karet + + + + Create Menu Bar + Vytvořit nabídkový pruh + + + + Delete Menu Bar + Smazat nabídkový pruh + + + + Create Status Bar + Vytvořit stavový pruh + + + + Delete Status Bar + Smazat stavový pruh + + + + Add Tool Bar + Přidat nástrojový pruh + + + + Add Dock Window + Přidat ukotvené okno + + + + Adjust Size of '%1' + Upravit velikost '%1' + + + + Change Form Layout Item Geometry + Změnit uspořádání prvku rozvržení formuláře + + + + Change Layout Item Geometry + Změnit uspořádání prvku rozvržení + + + + Change Table Contents + Změnit obsah tabulky + + + + Change Tree Contents + Změnit obsah stromu + + + + + Add action + Přidat činnost + + + + + Remove action + Odstranit činnost + + + + Add menu + Přidat nabídku + + + + Remove menu + Odstranit nabídku + + + + Create submenu + Vytvořit vedlejší nabídku + + + + Delete Tool Bar + Smazat nástrojový pruh + + + + Set action text + Nastavit text k činnosti + + + + Insert action + Vložit činnost + + + + + Move action + Posunout činnost + + + + Change Title + Změnit název + + + + Insert Menu + Vložit nabídku + + + + Change signals/slots + Změnit signály/zdířky + + + + Delete Subwindow + Smazat podokno + + + + Insert Subwindow + Vložit podokno + + + + subwindow + Podokno + + + + Subwindow + Podokno + + + + Change Z-order of '%1' + Změnit Z-pořadí '%1' + + + + Simplify Grid Layout + Zjednodušit tabulkové rozvržení + + + + Create button group + Seskupit tlačítka + + + + Break button group + Zrušit seskupení tlačítek + + + + Break button group '%1' + Zrušit seskupení '%1' + + + + Add buttons to group + Přidat tlačítka do seskupení + + + + Remove buttons from group + Odstranit tlačítka ze seskupení + + + + Morph %1/'%2' into %3 + MorphWidgetCommand description + Přeměnit %1/'%2' na %3 + + + + Change layout of '%1' from %2 to %3 + Změnit rozvržení '%1' z %2 na %3 + + + + + Add '%1' to '%2' + Command description for adding buttons to a QButtonGroup + Přidat '%1' k '%2' + + + + Remove '%1' from '%2' + Command description for removing buttons from a QButtonGroup + Odstranit '%1' z '%2' + + + + Change script + Změnit skript + + + + Changed '%1' of '%2' + Změněno '%1' z '%2' + + + + Changed '%1' of %n objects + Singular will never be shown + + Změněna vlastnost '%1' jednoho předmětu + Změněna vlastnost '%1' %n předmětů + Změněna vlastnost '%1' %n předmětů + + + + + Reset '%1' of '%2' + Znovu nastavit '%1' '%2' + + + + Reset '%1' of %n objects + Singular will never be shown + + Znovu nastavit '%1' jednoho předmětu + Znovu nastavit '%1' %n předmětů + Znovu nastavit '%1' %n předmětů + + + + + Add dynamic property '%1' to '%2' + Přidat dynamickou vlastnost '%1' do '%2' + + + + Add dynamic property '%1' to %n objects + Singular will never be shown + + Přidat dynamickou vlastnost '%1' do jednoho předmětu + Přidat dynamickou vlastnost '%1' do %n předmětů + Přidat dynamickou vlastnost '%1' do %n předmětů + + + + + Remove dynamic property '%1' from '%2' + Odstranit dynamickou vlastnost '%1' z '%2' + + + + Remove dynamic property '%1' from %n objects + + Odstranit dynamickou vlastnost '%1' z jednoho předmětu + Odstranit dynamickou vlastnost '%1' z %n předmětů + Odstranit dynamickou vlastnost '%1' z %n předmětů + + + + + ConnectDialog + + + Configure Connection + Upravit spojení + + + + GroupBox + GroupBox + + + + Edit... + Upravit... + + + + Show signals and slots inherited from QWidget + Ukázat signály a zdířky zděděné z QWidget + + + + ConnectionDelegate + + + <object> + <Předmět> + + + + <signal> + <Signál> + + + + <slot> + <Zdířka> + + + + DPI_Chooser + + + Standard (96 x 96) + Embedded device standard screen resolution + Obvyklé rozlišení (96 x 96) + + + + Greenphone (179 x 185) + Embedded device screen resolution + Greenphone (179 x 185) + + + + High (192 x 192) + Embedded device high definition screen resolution + Vysoké rozlišení (192 x 192) + + + + Designer + + + Qt Designer + Qt Designer + + + + Unable to launch %1. + %1 se nepodařilo spustit. + + + + %1 timed out. + Překročení času při provedení %1. + + + + This file contains top level spacers.<br>They have <b>NOT</b> been saved into the form. + Formulář obsahuje volně stojící prvky rozložení, které <b>NEBYLY</b> uloženy do formuláře. + + + + Perhaps you forgot to create a layout? + Přidal jste rozvržení? + + + + This file cannot be read because it was created using %1. + Soubor nelze přečíst, protože byl vytvořen %1. + + + + This file was created using Designer from Qt-%1 and cannot be read. + Soubor nelze přečíst, protože byl vytvořen programem Designer ve verzi %1. + + + + This file cannot be read because the extra info extension failed to load. + Soubor nelze přečíst (Chyba při nahrávání dat ExtraInfoExtension). + + + + The converted file could not be read. + Převedený soubor se nepodařilo přečíst. + + + + Invalid UI file: The root element <ui> is missing. + Chyba při čtení souboru s rozhraním: Kořenový prvek <ui> chybí. + + + + An error has occurred while reading the UI file at line %1, column %2: %3 + Chyba při čtení souboru s rozhraním, řádek %1, sloupec %2: %3 + + + + This file was created using Designer from Qt-%1 and will be converted to a new form by Qt Designer. + Soubor byl vytvořen programem Designer ve verzi %1 a bude převeden na nový formulář pomocí programu Qt Designer. + + + + The old form has not been touched, but you will have to save the form under a new name. + Starý formulář zůstává nezměněn. Nový formulář musí být uložen pod novým názvem. + + + + This file was created using Designer from Qt-%1 and could not be read: +%2 + Čtení Designerem %1 vytvořeného souboru se nezdařilo: +%2 + + + + Please run it through <b>uic3&nbsp;-convert</b> to convert it to Qt-4's ui format. + Přeměňte to, prosím, příkazem <b>uic3&nbsp;-convert</b> na formát rozhraní Qt 4. + + + + Custom Widgets + Uživatelsky stanovené prvky + + + + Promoted Widgets + Zástupný symbol pro uživatelsky stanovené prvky + + + + DesignerMetaEnum + + + %1 is not a valid enumeration value of '%2'. + %1 není platnou výčtovou hodnotou '%2'. + + + + '%1' could not be converted to an enumeration value of type '%2'. + '%1' se nepodařilo převést na výčtovou hodnotu typu '%2'. + + + + DesignerMetaFlags + + + '%1' could not be converted to a flag value of type '%2'. + '%1' se nepodařilo převést na příznakovou hodnotu typu '%2'. + + + + DeviceProfile + + + '%1' is not a number. + Reading a number for an embedded device profile + '%1' není platným číslem. + + + + An invalid tag <%1> was encountered. + Byl zjištěn neplatný prvek'%1'. + + + + DeviceProfileDialog + + + &Family + &Písmová rodina + + + + &Point Size + &Bodová velikost + + + + Style + Styl + + + + Device DPI + Rozlišení obrazovky + + + + Name + Název + + + + DeviceSkin + + + The image file '%1' could not be loaded. + Soubor s obrázkem '%1' se nepodařilo nahrát. + + + + The skin directory '%1' does not contain a configuration file. + Adresář se vzhledem '%1' neobsahuje žádný soubor s nastavením. + + + + The skin configuration file '%1' could not be opened. + Soubor s nastavením vzhledu '%1' se nepodařilo otevřít. + + + + Syntax error: %1 + Chyba ve skladbě: %1 + + + + The skin cursor image file '%1' does not exist. + Soubor s obrázkem pro vzhled ukazovátka '%1' neexistuje. + + + + Syntax error in area definition: %1 + Vymezení oblasti obsahuje chybu ve skladbě: %1 + + + + Mismatch in number of areas, expected %1, got %2. + Zadaný počet oblastí (%1) neodpovídá; byly nalezeny %2 oblasti. + + + + The skin configuration file '%1' could not be read: %2 + Soubor s nastavením vzhledu '%1' se nepodařilo přečíst: %2 + + + + The skin "up" image file '%1' does not exist. + Soubor s nastavením vzhledu '%1' (nahoru) neexistuje. + + + + The skin "down" image file '%1' does not exist. + Soubor s nastavením vzhledu '%1' (dolů) neexistuje. + + + + The skin "closed" image file '%1' does not exist. + Soubor s nastavením vzhledu '%1' (zavřeno) neexistuje. + + + + EmbeddedOptionsControl + + + <html><table><tr><td><b>Font</b></td><td>%1, %2</td></tr><tr><td><b>Style</b></td><td>%3</td></tr><tr><td><b>Resolution</b></td><td>%4 x %5</td></tr></table></html> + Format embedded device profile description + <html><table><tr><td><b>Font</b></td><td>%1, %2</td></tr><tr><td><b>Stil</b></td><td>%3</td></tr><tr><td><b>Rozlišení</b></td><td>%4 x %5</td></tr></table></html> + + + + EmbeddedOptionsPage + + + Embedded Design + Tab in preferences dialog + Vložený návrh + + + + Device Profiles + EmbeddedOptionsControl group box" + Profily zařízení + + + + FontPanel + + + Font + Písmo + + + + &Writing system + Způsob &psaní + + + + &Family + &Písmová rodina + + + + &Style + &Styl + + + + &Point size + &Bodová velikost + + + + FontPropertyManager + + + PreferDefault + Upřednostňovat výchozí + + + + NoAntialias + Žádné vyhlazování + + + + PreferAntialias + Upřednostňovat vyhlazování + + + + Antialiasing + Vyhlazování + + + + FormBuilder + + + Invalid stretch value for '%1': '%2' + Parsing layout stretch values + Neplatná hodnota roztažení pro '%1': '%2' + + + + Invalid minimum size for '%1': '%2' + Parsing grid layout minimum size values + Neplatná nejmenší velikost pro '%1': '%2' + + + + FormEditorOptionsPage + + + %1 % + %1 % + + + + Preview Zoom + Velikost zvětšení pro náhled + + + + Default Zoom + Výchozí zvětšení + + + + Forms + Tab in preferences dialog + Formuláře + + + + Default Grid + Výchozí mřížka pro nové formuláře + + + + FormLayoutRowDialog + + + Add Form Layout Row + Přidat řádek s rozvržením formuláře + + + + &Label text: + &Text popisku: + + + + Field &type: + &Typ datového pole: + + + + &Field name: + &Název pole: + + + + &Buddy: + &Kamarád: + + + + &Row: + &Řádek: + + + + Label &name: + &Název popisku: + + + + FormWindow + + + Unexpected element <%1> + Neplatný prvek <%1> + + + + Error while pasting clipboard contents at line %1, column %2: %3 + Chyba při vložení obsahu schránky, řádek %1, sloupec %2: %3 + + + + FormWindowSettings + + + Form Settings + Nastavení formuláře + + + + Layout &Default + &Výchozí rozvržení + + + + &Spacing: + &Odstup: + + + + &Margin: + &Okraj: + + + + &Layout Function + &Funkce rozvržení + + + + Ma&rgin: + Ok&raj: + + + + Spa&cing: + Odstu&p: + + + + Embedded Design + Vložený návrh + + + + &Author + &Autor + + + + &Include Hints + &Zahrnout rady + + + + &Pixmap Function + &Funkce pixmapy + + + + Grid + Mřížka + + + + IconSelector + + + All Pixmaps ( + Všechny soubory s pixmapami ( + + + + ItemPropertyBrowser + + + XX Icon Selected off + Sample string to determinate the width for the first column of the list item property browser + Vybraná ikona, z + + + + MainWindowBase + + + Main + Not currently used (main tool bar) + Hlavní pruh s nástroji + + + + File + Soubor + + + + Edit + Úpravy + + + + Tools + Nástroje + + + + Form + Formulář + + + + Qt Designer + Qt Designer + + + + NewForm + + + C&reate + &Vytvořit nový z předlohy + + + + Recent + Naposledy otevřený + + + + &Close + &Zavřít + + + + &Open... + &Otevřít... + + + + &Recent Forms + &Naposledy otevřené formuláře + + + + Read error + Chyba při čtení + + + + New Form + Nový formulář + + + + Show this Dialog on Startup + Ukázat tento dialog při spuštění + + + + A temporary form file could not be created in %1. + V adresáři %1 se nepodařilo vytvořit dočasný soubor s formulářem. + + + + The temporary form file %1 could not be written. + Dočasný soubor s formulářem %1 se nepodařilo zapsat. + + + + ObjectInspectorModel + + + Object + Předmět + + + + Class + Třída + + + + separator + Oddělovač + + + + <noname> + <nepojmenovaný> + + + + ObjectNameDialog + + + Change Object Name + Změnit název předmětu + + + + Object Name + Název předmětu + + + + PluginDialog + + + Plugin Information + Přídavné moduly + + + + 1 + 1 + + + + PreferencesDialog + + + Preferences + Nastavení + + + + PreviewConfigurationWidget + + + Form + Formulář + + + + Print/Preview Configuration + Nastavení tisku/náhledu + + + + Style + Styl + + + + Style sheet + Předlohový list + + + + ... + ... + + + + Device skin + Vzhled pro zařízení + + + + PromotionModel + + + Not used + Usage of promoted widgets + Nepoužívaný + + + + Q3WizardContainer + + + + Page + Strana + + + + QAbstractFormBuilder + + + Unexpected element <%1> + Neplatný prvek <%1> + + + + An error has occurred while reading the UI file at line %1, column %2: %3 + Chyba při čtení souboru s rozhraním, řádek %1, sloupec %2: %3 + + + + Invalid UI file: The root element <ui> is missing. + Chyba při čtení souboru s rozhraním: Kořenový prvek <ui> chybí. + + + + The creation of a widget of the class '%1' failed. + Nepodařilo se vytvořit žádný prvek třídy '%1'. + + + + Attempt to add child that is not of class QWizardPage to QWizard. + Pokus o přidání strany předmětu třídy QWizard, která není typu QWizardPage. + + + + Attempt to add a layout to a widget '%1' (%2) which already has a layout of non-box type %3. +This indicates an inconsistency in the ui-file. + Pokus o přidání rozvržení na prvek '%1' (%2), který již má rozvržení typu %3 hat. Ukazuje to na nesrovnalost v souboru s rozhraním. + + + + Empty widget item in %1 '%2'. + Prázdná položka prvku v %1 '%2'. + + + + Flags property are not supported yet. + Vlastnosti typu "příznak" nejsou podporovány. + + + + While applying tab stops: The widget '%1' could not be found. + Chyba při stanovení pořadí tabulátorů: Nepodařilo se nalézt žádný prvek s názvem '%1'. + + + + Invalid QButtonGroup reference '%1' referenced by '%2'. + Neplatný odkaz na skupinu tlačítek '%1', odkazováno '%2'. + + + + This version of the uitools library is linked without script support. + Tato verze knihovny uitools nepodporuje skripty. + + + + QAxWidgetPlugin + + + ActiveX control + Ovládací prvek ActiveX + + + + ActiveX control widget + Ovládací prvek ActiveX + + + + QAxWidgetTaskMenu + + + Set Control + Nastavit ovládací prvek + + + + Reset Control + Nastavit znovu ovládací prvek + + + + Licensed Control + Licencovaný ovládací prvek + + + + The control requires a design-time license + Ovládací prvek vyžaduje licenci k času návrhu + + + + QCoreApplication + + + %1 is not a promoted class. + %1 není zástupným symbolem pro uživatelsky stanovenou třídu. + + + + The base class %1 is invalid. + %1 není platnou základní třídou. + + + + The class %1 already exists. + Již existuje třída s názvem %1. + + + + Promoted Widgets + Zástupný symbol pro uživatelsky stanovené prvky + + + + The class %1 cannot be removed + Třída %1 nemůže být odstraněna + + + + The class %1 cannot be removed because it is still referenced. + Třída %1 nemůže být odstraněna, protože se stále používá. + + + + The class %1 cannot be renamed + Třída %1 nemůže být přejmenována + + + + The class %1 cannot be renamed to an empty name. + Název pro třídu nemůže zůstat prázdný (%1). + + + + There is already a class named %1. + Již existuje třída s názvem %1. + + + + Cannot set an empty include file. + Název pro hlavičkový soubor nemůže zůstat prázdný. + + + + Exception at line %1: %2 + Chyba výjimky na řádku %1: %2 + + + + Unknown error + Neznámá chyba + + + + An error occurred while running the script for %1: %2 +Script: %3 + Při provádění skriptu pro %1 se vyskytla chyba: %2Skript: %3 + + + + QDesigner + + + %1 - warning + %1 - Upozornění + + + + Qt Designer + Qt Designer + + + + This application cannot be used for the Console edition of Qt + Tato aplikace se nedá používat pro konzolové vydání Qt + + + + QDesignerActions + + + Edit Widgets + Upravit prvky + + + + &Quit + &Ukončit + + + + &Minimize + &Zmenšit + + + + Bring All to Front + Ukázat všechny formuláře + + + + Preferences... + Nastavení... + + + + Clear &Menu + Smazat &nabídku + + + + CTRL+SHIFT+S + CTRL+SHIFT+S + + + + CTRL+R + CTRL+R + + + + CTRL+M + CTRL+M + + + + Qt Designer &Help + &Nápověda k programu Qt Designer + + + + Current Widget Help + Nápověda k vybranému prvku + + + + What's New in Qt Designer? + Co je nového v programu Qt Designer? + + + + About Plugins + Přídavné moduly + + + + + About Qt Designer + O programu Qt Designer + + + + About Qt + O Qt + + + + + Open Form + Otevřít formulář + + + + + + Designer UI files (*.%1);;All Files (*) + Soubory rozhraní programu Designer (*.%1);;Všechny soubory (*) + + + + %1 already exists. +Do you want to replace it? + Soubor %1 již existuje. +Chcete jej nahradit? + + + + Saved %1. + Formulář %1 byl uložen. + + + + &Recent Forms + &Naposledy otevřené formuláře + + + + Designer + Designer + + + + Feature not implemented yet! + Tato funkce ještě není provedena! + + + + Read error + Chyba při čtení + + + + %1 +Do you want to update the file location or generate a new form? + %1 +Chcete zadat jiný název pro soubor, nebo vytvořit nový formulář? + + + + &Update + &Jiný název + + + + &New Form + &Nový formulář + + + + + Save Form? + Uložit formulář? + + + + Could not open file + Soubor se nepodařilo otevřít + + + + + The backup file %1 could not be written. + Ukládání na pozadí: Soubor se zálohou %1 se nepodařilo zapsat. + + + + The backup directory %1 could not be created. + Ukládání na pozadí: Adresář se zálohou %1 se nepodařilo. + + + + The temporary backup directory %1 could not be created. + Ukládání na pozadí: Dočasný adresář se zálohou %1 se nepodařilo. + + + + Please close all forms to enable the loading of additional fonts. + Zavřete, prosím, všechny formuláře kvůli umožnění nahrání dodatečných písem. + + + + Select New File + Vybrat nový soubor + + + + Could not write file + Soubor se nepodařilo zapsat + + + + &Close Preview + &Zavřít náhled + + + + Save &Image... + &Uložit obraz... + + + + &Print... + &Tisk... + + + + Additional Fonts... + Dodatečná písma... + + + + The file %1 could not be opened. +Reason: %2 +Would you like to retry or select a different file? + Soubor %1 se nepodařilo otevřít: +%2 +Chcete to zkusit ještě jednou, nebo vybrat jiný soubor? + + + + It was not possible to write the entire file %1 to disk. +Reason:%2 +Would you like to retry? + Soubor %1 se nepodařilo úplně zapsat na disk: +Důvod: %2 +Chcete to zkusit ještě jednou? + + + + Image files (*.%1) + Soubory s obrazem (*.%1) + + + + + Save Image + Uložit obraz + + + + The file %1 could not be written. + Soubor %1 se nepodařilo zapsat. + + + + &New... + &Nový... + + + + &Open... + &Otevřít... + + + + &Save + &Uložit + + + + Save &As... + Uložit &jako... + + + + Save A&ll + &Uložit vše + + + + Save As &Template... + Uložit jako &předlohu... + + + + + &Close + &Zavřít + + + + View &Code... + Ukázat &kód... + + + + + Save Form As + Uložit formulář jako + + + + Preview failed + Nepodařilo se vytvořit žádný náhled + + + + Code generation failed + Nepodařilo se vytvořit žádný kód + + + + + Assistant + Assistant + + + + Saved image %1. + Obraz byl uložen pod %1. + + + + Printed %1. + %1 byl vytištěn. + + + + ALT+CTRL+S + ALT+CTRL+S + + + + QDesignerAppearanceOptionsPage + + + Appearance + Tab in preferences dialog + Vzhled + + + + QDesignerAppearanceOptionsWidget + + + Docked Window + Režim ukotveného okna + + + + Multiple Top-Level Windows + Režim více oken + + + + Toolwindow Font + Písmo pro okno s nástroji + + + + QDesignerAxWidget + + + Reset control + Nastavit znovu ovládací prvek + + + + Set control + Nastavit ovládací prvek + + + + Control loaded + Ovládací prvek nahrán + + + + A COM exception occurred when executing a meta call of type %1, index %2 of "%3". + Při vyvolání postupu typu %1 se vyskytla výjimka COM, rejstřík %2 "%3". + + + + QDesignerFormBuilder + + + Script errors occurred: + Vyskytly se chyby ve skriptech: + + + + The preview failed to build. + Nepodařilo se vytvořit žádný náhled. + + + + Designer + Designer + + + + QDesignerFormWindow + + + %1 - %2[*] + %1 - %2[*] + + + + Save Form? + Uložit formulář? + + + + Do you want to save the changes to this document before closing? + Chcete v tomto formuláři uložit před zavřením změny? + + + + If you don't save, your changes will be lost. + Pokud neprovedete uložení, budou vaše změny ztraceny. + + + + QDesignerMenu + + + Type Here + Zadejte text + + + + Add Separator + Přidat oddělovač + + + + Insert separator + Vložit oddělovač + + + + Remove action '%1' + Odstranit činnost '%1' + + + + Remove separator + Odstranit oddělovač + + + + + Add separator + Přidat oddělovač + + + + Insert action + Vložit činnost + + + + QDesignerMenuBar + + + Type Here + Zadejte text + + + + Remove Menu '%1' + Odstranit nabídku '%1' + + + + Remove Menu Bar + Odstranit pruh s nabídkou + + + + Menu + Nabídka + + + + QDesignerPluginManager + + + An XML error was encountered when parsing the XML of the custom widget %1: %2 + Chyba při vyhodnocování XML uživatelsky stanoveného prvku %1: %2 + + + + A required attribute ('%1') is missing. + U prvku chybí vyžadovaná vlastnost ('%1'). + + + + An invalid property specification ('%1') was encountered. Supported types: %2 + '%1' není platným vymezením vlastnosti. Jsou podporovány následující typy: %2 + + + + '%1' is not a valid string property specification. + '%1' není platným vymezením vlastnosti řetězce znaků. + + + + The XML of the custom widget %1 does not contain any of the elements <widget> or <ui>. + Kód XML pro prvek %1 neobsahuje platný kořenový prvek (<widget>, nebo <ui>). + + + + The class attribute for the class %1 is missing. + Chybí vlastnost třídy pro třídu %1. + + + + The class attribute for the class %1 does not match the class name %2. + Vlastnost třídy pro třídu %1 neodpovídá názvu třídy (%2). + + + + QDesignerPropertySheet + + + Dynamic Properties + Dynamické vlastnosti + + + + QDesignerResource + + + The layout type '%1' is not supported, defaulting to grid. + Typ rozvržení '%1' není podporován; bylo vytvořeno mřížkové rozvržení. + + + + The container extension of the widget '%1' (%2) returned a widget not managed by Designer '%3' (%4) when queried for page #%5. +Container pages should only be added by specifying them in XML returned by the domXml() method of the custom widget. + Kontejnerové rozšíření prvku '%1' (%2) vrátilo pro stranu %5 prvek '%3' (%4), který není spravován programem Designer. +Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu domXML() uživatelsky stanoveného prvku. + + + + Unexpected element <%1> + Parsing clipboard contents + Neplatný prvek <%1> + + + + Error while pasting clipboard contents at line %1, column %2: %3 + Parsing clipboard contents + Chyba při vložení obsahu schránky, řádek %1, sloupec %2: %3 + + + + Error while pasting clipboard contents: The root element <ui> is missing. + Parsing clipboard contents + Chyba při vložení obsahu schránky: Kořenový prvek <ui> chybí. + + + + QDesignerSharedSettings + + + The template path %1 could not be created. + Adresář s předlohami %1 se nepodařilo zřídit. + + + + An error has been encountered while parsing device profile XML: %1 + Při čtení XML profilu zařízení se vyskytla chyba: %1 + + + + QDesignerToolWindow + + + Property Editor + Editor vlastností + + + + Action Editor + Editor činností + + + + Object Inspector + Ukazatel předmětů + + + + Resource Browser + Prohlížeč zdrojů + + + + Signal/Slot Editor + Editor signálů a zdířek + + + + Widget Box + Krabice s prvky + + + + QDesignerWorkbench + + + &File + &Soubor + + + + F&orm + F&ormulář + + + + Preview in + Náhled v + + + + &Window + &Okno + + + + &Help + &Nápověda + + + + Edit + Úpravy + + + + Toolbars + Nástrojové pruhy + + + + Save Forms? + Uložit formuláře? + + + + &View + &Pohled + + + + &Settings + &Nastavení + + + + Widget Box + Krabice s prvky + + + + If you do not review your documents, all your changes will be lost. + Změny budou ztraceny, pokud se na formuláře ještě jednou nepodíváte. + + + + Discard Changes + Zahodit změny + + + + Review Changes + Podívat se na změny + + + + Backup Information + Informace o ukládání na pozadí + + + + The last session of Designer was not terminated correctly. Backup files were left behind. Do you want to load them? + Designer zřejmě nebyl řádně ukončen; existují soubory z ukládání na pozadí. Chcete je nahrát? + + + + The file <b>%1</b> could not be opened. + Soubor <b>%1</b> se nepodařilo otevřít. + + + + The file <b>%1</b> is not a valid Designer UI file. + Soubor <b>%1</b> není platným souborem rozhraní programu Designer. + + + + There are %n forms with unsaved changes. Do you want to review these changes before quitting? + + Formulář byl změněn, ale změny nebyl uloženy. Chcete se na tyto změny podívat předtím, než program ukončíte? + %n formuláře byly změněny, ale změny nebyl uloženy. Chcete se na tyto změny podívat předtím, než program ukončíte? + %n formuláře byly změněny, ale změny nebyl uloženy. Chcete se na tyto změny podívat předtím, než program ukončíte? + + + + + QFormBuilder + + + An empty class name was passed on to %1 (object name: '%2'). + Empty class name passed to widget factory method + Postupu %1 byl předán prázdný název třídy (název předmětu '%2'). + + + + QFormBuilder was unable to create a custom widget of the class '%1'; defaulting to base class '%2'. + QFormBuilderu se nepodařilo vytvořit uživatelsky stanovený prvek třídy '%1'; byl vytvořen prvek základní třídy '%2'. + + + + QFormBuilder was unable to create a widget of the class '%1'. + QFormBuilderu se nepodařilo vytvořit předmět třídy '%1'. + + + + The layout type `%1' is not supported. + Rozvržení typu `%1' nejsou podporována. + + + + The set-type property %1 could not be read. + Vlastnost %1 se nepodařilo přečíst (typ: množství). + + + + The enumeration-type property %1 could not be read. + Vlastnost %1 se nepodařilo přečíst (typ: výčet). + + + + Reading properties of the type %1 is not supported yet. + Čtení vlastností typu %1 není podporováno. + + + + The property %1 could not be written. The type %2 is not supported yet. + Vlastnost %1 se nepodařilo zapsat, protože typ %2 není podporován. + + + + QStackedWidgetEventFilter + + + Previous Page + Předchozí strana + + + + Next Page + Další strana + + + + Delete + Smazat + + + + Before Current Page + Před nynější stranu + + + + After Current Page + Po nynější straně + + + + Change Page Order... + Změnit pořadí stran... + + + + Change Page Order + Změnit pořadí stran + + + + Page %1 of %2 + Strana %1 z %2 + + + + + Insert Page + Vložit stranu + + + + QStackedWidgetPreviewEventFilter + + + Go to previous page of %1 '%2' (%3/%4). + Jít na předchozí stranu %1 '%2' (%3/%4). + + + + Go to next page of %1 '%2' (%3/%4). + Jít na další stranu %1 '%2' (%3/%4). + + + + QTabWidgetEventFilter + + + Delete + Smazat + + + + Before Current Page + Před nynější stranu + + + + After Current Page + Po nynější straně + + + + Page %1 of %2 + Strana %1 z %2 + + + + + Insert Page + Vložit stranu + + + + QToolBoxHelper + + + Delete Page + Smazat stranu + + + + Before Current Page + Před nynější stranu + + + + After Current Page + Po nynější straně + + + + Change Page Order... + Změnit pořadí stran... + + + + Change Page Order + Změnit pořadí stran + + + + Page %1 of %2 + Strana %1 z %2 + + + + Insert Page + Vložit stranu + + + + QtBoolEdit + + + + + True + Pravdivý + + + + + False + Nepravdivý + + + + QtBoolPropertyManager + + + True + Pravdivý + + + + False + Nepravdivý + + + + QtCharEdit + + + Clear Char + Smazat znak + + + + QtColorEditWidget + + + ... + ... + + + + QtColorPropertyManager + + + Red + Červená + + + + Green + Zelená + + + + Blue + Modrá + + + + Alpha + Alfa + + + + QtCursorDatabase + + + Arrow + Šipka + + + + Up Arrow + Šipka nahoru + + + + Cross + Křížící se čáry + + + + Wait + Přesýpací hodiny + + + + IBeam + I trámec + + + + Size Vertical + Zvětšit svisle + + + + Size Horizontal + Zvětšit vodorovně + + + + Size Backslash + Zvětšit zpětné/obrácené lomítko + + + + Size Slash + Zvětšit lomítko + + + + Size All + Zvětšit vše + + + + Blank + Prázdný + + + + Split Vertical + Rozdělit svisle + + + + Split Horizontal + Rozdělit vodorovně + + + + Pointing Hand + Ukazující ruka + + + + Forbidden + Zakázáno + + + + Open Hand + Otevřená ruka + + + + Closed Hand + Zavřená ruka + + + + What's This + A co je toto + + + + Busy + Zaneprázdněn + + + + QtFontEditWidget + + + ... + ... + + + + Select Font + Vybrat písmo + + + + QtFontPropertyManager + + + Family + Písmová rodina + + + + Point Size + Bodová velikost + + + + Bold + Tučné + + + + Italic + Kurzíva + + + + Underline + Podtržení + + + + Strikeout + Přeškrtnuté + + + + Kerning + Podřezávání + + + + QtGradientDialog + + + Edit Gradient + Upravit přechod + + + + QtGradientEditor + + + Start X + Začáteční hodnota x + + + + Start Y + Začáteční hodnota y + + + + Final X + Koncová hodnota x + + + + Final Y + Koncová hodnota y + + + + + Central X + Střed x + + + + + Central Y + Střed y + + + + Focal X + Ohnisko x + + + + Focal Y + Ohnisko y + + + + Radius + Poloměr + + + + Angle + Úhel + + + + Linear + Přímočarý + + + + Radial + Paprskovitý + + + + Conical + Kuželovitý + + + + Pad + Doplnit + + + + Repeat + Opakovat + + + + Reflect + Zrcadlit + + + + Form + Formulář + + + + Gradient Editor + Úpravy přechodů + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + Gradient Stops Editor + Editor bodů zastavení přechodu + + + + This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions. + Tato oblast slouží pro úpravy bodů zastavení přechodu. Dvakrát klepněte na orientační bod kvůli jeho zdvojení. Dvakrát klepněte na plochu kvůli vytvoření nového orientačního bodu. Použijte tažení & upuštění pro posunutí bodu. Pravým tlačítkem myši se vyvolává nabídka s dalšími souvisejícími volbami. + + + + Zoom + Zvětšení + + + + Position + Poloha + + + + Hue + Barevný odstín + + + + H + H + + + + Saturation + Sytost + + + + S + S + + + + Sat + Sytost + + + + Value + Hodnota + + + + V + V + + + + Val + Hodnota + + + + Alpha + Alfa + + + + A + A + + + + Type + Typ + + + + Spread + Rozšiřování + + + + Color + Barva + + + + Current stop's color + Barva nynějšího zastavení + + + + HSV + HSV + + + + RGB + RGB + + + + Current stop's position + Poloha nynějšího zastavení + + + + % + % + + + + Zoom In + Přiblížit + + + + Zoom Out + Oddálit + + + + Toggle details extension + Zařadit další volby + + + + > + > + + + + Linear Type + Přímočarý typ + + + + ... + ... + + + + Radial Type + Paprskovitý typ + + + + Conical Type + Kuželovitý typ + + + + Pad Spread + Doplnit rozšiřování + + + + Repeat Spread + Opakovat rozšiřování + + + + Reflect Spread + Zrcadlit rozšiřování + + + + This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop. + tato oblast ukazuje náhled právě upravovaného přechodu. Zde můžete upravovat proměnné příznačné pro přechod, jako začáteční a koncový bod, poloměr etd. pomocí tažení a pouštění. + + + + Show HSV specification + Ukázat přesné vymezení HSV + + + + Show RGB specification + Ukázat přesné vymezení RGB + + + + Reset Zoom + Nastavit znovu zvětšení + + + + QtGradientStopsWidget + + + New Stop + Nové zastavení + + + + Delete + Smazat + + + + Flip All + Obrátit vše + + + + Select All + Vybrat vše + + + + Zoom In + Zvětšit + + + + Zoom Out + Zmenšit + + + + Reset Zoom + Nastavit znovu zvětšení + + + + QtGradientView + + + Grad + Přechod + + + + Remove Gradient + Odstranit přechod + + + + Are you sure you want to remove the selected gradient? + Opravdu chcete odstranit vybraný přechod? + + + + + New... + Nový... + + + + + Edit... + Upravit... + + + + + Rename + Přejmenovat + + + + + Remove + Odstranit + + + + Gradient View + Pohled na přechod + + + + QtGradientViewDialog + + + Select Gradient + Vybrat přechod + + + + QtKeySequenceEdit + + + Clear Shortcut + Smazat klávesové zkratky + + + + QtLocalePropertyManager + + + %1, %2 + %1, %2 + + + + Language + Jazyk + + + + Country + Země + + + + QtPointFPropertyManager + + + (%1, %2) + (%1, %2) + + + + X + X + + + + Y + Y + + + + QtPointPropertyManager + + + (%1, %2) + (%1, %2) + + + + X + X + + + + Y + Y + + + + QtPropertyBrowserUtils + + + [%1, %2, %3] (%4) + [%1, %2, %3] (%4) + + + + [%1, %2] + [%1, %2] + + + + QtRectFPropertyManager + + + [(%1, %2), %3 x %4] + [(%1, %2), %3 x %4] + + + + X + X + + + + Y + Y + + + + Width + Šířka + + + + Height + Výška + + + + QtRectPropertyManager + + + [(%1, %2), %3 x %4] + [(%1, %2), %3 x %4] + + + + X + X + + + + Y + Y + + + + Width + Šířka + + + + Height + Výška + + + + QtResourceEditorDialog + + + Edit Resources + Upravit zdroje + + + + New... + Nový... + + + + + New Resource File + Nový zdrojový soubor + + + + <p><b>Warning:</b> The file</p><p>%1</p><p>is outside of the current resource file's parent directory.</p> + <p><b>Upozornění:</b><p>Zvolený soubor: </p><p>%1</p><p>se nachází mimo adresář se nynějším zdrojovým souborem:</p> + + + + <p>To resolve the issue, press:</p><table><tr><th align="left">Copy</th><td>to copy the file to the resource file's parent directory.</td></tr><tr><th align="left">Copy As...</th><td>to copy the file into a subdirectory of the resource file's parent directory.</td></tr><tr><th align="left">Keep</th><td>to use its current location.</td></tr></table> + <p>Zvolte, prosím:</p><table><tr><th align="left">Kopírovat</th><td>pro zkopírování souboru do adresáře se zdrojovým souborem.</td></tr><tr><th align="left">Kopírovat jako...</th><td>pro zkopírování souboru do podadresáře se zdrojovým souborem.</td></tr><tr><th align="left">Zachovat</th><td>, aby se soubor používal ve svém nynějším adresáři.</td></tr></table> + + + + Could not copy +%1 +to +%2 + Kopírování se nezdařilo: +%1 +zu: +%2 + + + + A parse error occurred at line %1, column %2 of %3: +%4 + V souboru %3 se na řádku %1, v sloupci %2 vyskytla chyba: + %4 + + + + Open... + Otevřít... + + + + + Remove + Odstranit + + + + + Move Up + Posunout nahoru + + + + + Move Down + Posunout dolů + + + + + Add Prefix + Přidat předponu + + + + Add Files... + Přidat soubory... + + + + Change Prefix + Změnit předponu + + + + Change Language + Změnit jazyk + + + + Change Alias + Změnit přezdívku + + + + Clone Prefix... + Zdvojit předponu... + + + + Prefix / Path + Předpona/Cesta + + + + Language / Alias + Jazyk/Přezdívka + + + + <html><p><b>Warning:</b> There have been problems while reloading the resources:</p><pre>%1</pre></html> + <html><p><b>Varování:</b> Při opětovném nahrání souboru se vyskytly chyby:</p><pre>%1</pre></html> + + + + Resource Warning + Zdroje - Varování + + + + Dialog + Dialog + + + + New File + Nový soubor + + + + N + N + + + + Remove File + Odstranit soubor + + + + R + L + + + + I + I + + + + New Resource + Nový zdroj + + + + A + A + + + + Remove Resource or File + Odstranit zdroj nebo soubor + + + + %1 already exists. +Do you want to replace it? + Soubor %1 již existuje. +Chcete jej nahradit? + + + + The file does not appear to be a resource file; element '%1' was found where '%2' was expected. + Soubor zřejmě není zdrojovým souborem; Na místě, kde byl očekáván prvek '%2' byl nalezen prvek '%1'. + + + + %1 [read-only] + %1 [pouze pro čtení] + + + + + %1 [missing] + %1 [chybí] + + + + <no prefix> + <žádná předpona> + + + + + Resource files (*.qrc) + Zdrojové soubory (*.qrc) + + + + Import Resource File + Zavést zdrojový soubor + + + + newPrefix + nováPředpona + + + + Add Files + Přidat soubory + + + + Incorrect Path + Nesprávný údaj o cestě + + + + + + + Copy + Kopírovat + + + + Copy As... + Kopírovat jako... + + + + Keep + Zachovat + + + + Skip + Přeskočit + + + + Clone Prefix + Zdvojit předponu + + + + Enter the suffix which you want to add to the names of the cloned files. +This could for example be a language extension like "_de". + Zadejte, prosím, příponu, kterou chcete přidat k názvům zdvojených souborů. +Může to být například jazykové rozšíření "_cs". + + + + + Copy As + Kopírovat jako + + + + <p>The selected file:</p><p>%1</p><p>is outside of the current resource file's directory:</p><p>%2</p><p>Please select another path within this directory.<p> + <p>Vybraný soubor: </p><p>%1</p><p>se nachází mimo adresář se zdrojovým souborem:</p><p>%2</p><p>Zvolte, prosím, jinou cestu, která je obsažena v tomto adresáři.</p> + + + + Could not overwrite %1. + %1 se nepodařilo přepsat. + + + + Save Resource File + Uložit zdrojový soubor + + + + Could not write %1: %2 + Soubor %1 se nepodařilo zapsat: %2 + + + + Open Resource File + Otevřít zdrojový soubor + + + + QtResourceView + + + Size: %1 x %2 +%3 + Velikost: %1 x %2 +%3 + + + + Edit Resources... + Upravit zdroje... + + + + Reload + Nahrát znovu + + + + Copy Path + Kopírovat cestu + + + + QtResourceViewDialog + + + Select Resource + Vybrat zdroj + + + + QtSizeFPropertyManager + + + %1 x %2 + %1 x %2 + + + + Width + Šířka + + + + Height + Výška + + + + QtSizePolicyPropertyManager + + + + <Invalid> + <Neplatný> + + + + [%1, %2, %3, %4] + [%1, %2, %3, %4] + + + + Horizontal Policy + Vodorovné nastavení + + + + Vertical Policy + Svislé nastavení + + + + Horizontal Stretch + Vodorovné protažení + + + + Vertical Stretch + Svislé protažení + + + + QtSizePropertyManager + + + %1 x %2 + %1 x %2 + + + + Width + Šířka + + + + Height + Výška + + + + QtToolBarDialog + + + < S E P A R A T O R > + < O D D Ě L O V A Č > + + + + Customize Toolbars + Přizpůsobit nástrojové pruhy + + + + 1 + 1 + + + + Actions + Činnosti + + + + Toolbars + Nástrojové pruhy + + + + New + Nový + + + + Remove + Odstranit + + + + Rename + Přejmenovat + + + + Up + Nahoru + + + + <- + <- + + + + -> + -> + + + + Down + Dolů + + + + Current Toolbar Actions + Činnosti současného nástrojového pruhu + + + + Custom Toolbar + Uživatelsky stanovené nástrojové pruhy + + + + Add new toolbar + Přidat nový nástrojový pruh + + + + Remove selected toolbar + Odstranit vybraný nástrojový pruh + + + + Rename toolbar + Přejmenovat nástrojový pruh + + + + Move action up + Posunout činnost nahoru + + + + Remove action from toolbar + Odstranit činnost z nástrojového pruhu + + + + Add action to toolbar + Přidat činnost do nástrojového pruhu + + + + Move action down + Posunout činnost dolů + + + + QtTreePropertyBrowser + + + Property + Vlastnost + + + + Value + Hodnota + + + + SaveFormAsTemplate + + + Add path... + Přidat cestu... + + + + Template Exists + Předloha již existuje + + + + A template with the name %1 already exists. +Do you want overwrite the template? + Již existuje předloha s názvem %1. +Chcete tuto předlohu přepsat? + + + + Overwrite Template + Přepsat předlohu + + + + Open Error + Chyba při otevírání + + + + There was an error opening template %1 for writing. Reason: %2 + Předlohu %1 se nepodařilo otevřít pro zápis. Důvod: %2 + + + + Write Error + Chyba při zápisu + + + + There was an error writing the template %1 to disk. Reason: %2 + Předlohu %1 se nepodařilo zapsat do souboru na disku. Důvod: %2 + + + + Pick a directory to save templates in + Vyberte adresář pro ukládání předloh + + + + Save Form As Template + Uložit formulář jako předlohu + + + + &Category: + &Skupina: + + + + &Name: + &Název: + + + + ScriptErrorDialog + + + An error occurred while running the scripts for "%1": + + Při provádění skriptu "%1" se vyskytly chyby: + + + + + SelectSignalDialog + + + Go to slot + Jít na zdířku + + + + Select signal + Vybrat signál + + + + signal + Signál + + + + class + Třída + + + + SignalSlotConnection + + + SENDER(%1), SIGNAL(%2), RECEIVER(%3), SLOT(%4) + VYSÍLAČ(%1), SIGNÁL(%2), PŘIJÍMAČ(%3), ZDÍŘKA(%4) + + + + SignalSlotDialogClass + + + Signals and slots + Signály a zdířky + + + + Slots + Zdířky + + + + ... + ... + + + + Signals + Signály + + + + Add + Přidat + + + + Delete + Smazat + + + + Spacer + + + Horizontal Spacer '%1', %2 x %3 + Vodorovný vymezovač '%1', %2 x %3 + + + + Vertical Spacer '%1', %2 x %3 + Svislý vymezovač '%1', %2 x %3 + + + + TemplateOptionsPage + + + Template Paths + Tab in preferences dialog + Adresáře pro předlohy + + + + ToolBarManager + + + Configure Toolbars... + Nastavit nástrojové pruhy... + + + + Window + Okno + + + + Help + Nápověda + + + + Style + Styl + + + + Dock views + Kotvící okno + + + + Toolbars + Nástrojové pruhy + + + + VersionDialog + + + <h3>%1</h3><br/><br/>Version %2 + <h3>%1</h3><br/><br/>Verze %2 + + + + Qt Designer + Qt Designer + + + + <br/>Qt Designer is a graphical user interface designer for Qt applications.<br/> + <br/>Qt Designer je obrazový návrhář uživatelského rozhraní pro programy Qt.<br/> + + + + %1<br/>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + %1<br/>Autorské právo (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i). + + + + WidgetDataBase + + + The file contains a custom widget '%1' whose base class (%2) differs from the current entry in the widget database (%3). The widget database is left unchanged. + Soubor obsahuje uživatelsky stanovený prvek '%1', jehož základní třída (%2) se neshoduje se současným záznamem v databázi prvků (%3). databáze prvků se nemění. + + + + qdesigner_internal::ActionEditor + + + Actions + Činnosti + + + + New... + Nový... + + + + Delete + Smazat + + + + New action + Nová činnost + + + + Edit action + Upravit činnost + + + + Edit... + Upravit... + + + + Go to slot... + Jít na zdířku... + + + + Copy + Kopírovat + + + + Cut + Vyjmout + + + + Paste + Vložit + + + + Select all + Vybrat vše + + + + Icon View + Pohled s ikonami + + + + Detailed View + Podrobný pohled + + + + Remove actions + Odstranit činnosti + + + + Remove action '%1' + Odstranit činnost '%1' + + + + Used In + Používaný v + + + + Configure Action Editor + Nastavit editor činností + + + + qdesigner_internal::ActionModel + + + Name + Název + + + + Used + Používaný + + + + Text + Text + + + + Shortcut + Klávesová zkratka + + + + Checkable + Zaškrtnutelná + + + + ToolTip + Rada k nástroji + + + + qdesigner_internal::BrushManagerProxy + + + The element '%1' is missing the required attribute '%2'. + U prvku '%1' chybí vyžadovaná vlastnost '%2'.. + + + + Empty brush name encountered. + Chybějící název u vymezení štětce. + + + + An unexpected element '%1' was encountered. + Byl zjištěn neplatný prvek '%1'. + + + + An error occurred when reading the brush definition file '%1' at line line %2, column %3: %4 + Chyba při čtení souboru s vymezením štětce '%1' na řádku %2, sloupec %3: %4 + + + + An error occurred when reading the resource file '%1' at line %2, column %3: %4 + Chyba při čtení zdrojového souboru '%1' na řádku %2, sloupec %3: %4 + + + + qdesigner_internal::BuddyEditor + + + Add buddy + Přidat kamaráda + + + + Remove buddies + Odstranit kamarády + + + + Remove %n buddies + + Odstranit jednoho kamaráda + Odstranit %n kamarády + Odstranit %n kamarády + + + + + Add %n buddies + + Přidat jednoho kamaráda + Přidat %n kamarády + Přidat %n kamarády + + + + + Set automatically + Nastavit automaticky + + + + qdesigner_internal::BuddyEditorPlugin + + + Edit Buddies + Upravit kamarády + + + + qdesigner_internal::BuddyEditorTool + + + Edit Buddies + Upravit kamarády + + + + qdesigner_internal::ButtonGroupMenu + + + Select members + Vybrat členy + + + + Break + Zrušit + + + + qdesigner_internal::ButtonTaskMenu + + + Assign to button group + Přiřadit ke skupině tlačítek + + + + Button group + Skupina tlačítek + + + + New button group + Nová skupina tlačítek + + + + Change text... + Změnit text... + + + + None + Žádný + + + + Button group '%1' + Skupina tlačítek '%1' + + + + qdesigner_internal::CodeDialog + + + Save... + Uložit... + + + + Copy All + Kopírovat vše + + + + &Find in Text... + &Najít v textu... + + + + A temporary form file could not be created in %1. + V adresáři %1 se nepodařilo vytvořit dočasný soubor s formulářem. + + + + The temporary form file %1 could not be written. + Dočasný soubor s formulářem %1 se nepodařilo zapsat. + + + + %1 - [Code] + %1 - [Kód] + + + + Save Code + Uložit kód + + + + Header Files (*.%1) + Hlavičkové soubory (*.%1) + + + + The file %1 could not be opened: %2 + Soubor %1 se nepodařilo otevřít: %2 + + + + The file %1 could not be written: %2 + Soubor %1 se nepodařilo zapsat: %2 + + + + %1 - Error + %1 - Chyba + + + + qdesigner_internal::ColorAction + + + Text Color + Barva textu + + + + qdesigner_internal::ComboBoxTaskMenu + + + Edit Items... + Upravit záznamy... + + + + Change Combobox Contents + Změnit obsah skupinové krabice + + + + qdesigner_internal::CommandLinkButtonTaskMenu + + + Change description... + Změnit popis... + + + + qdesigner_internal::ConnectionEdit + + + Select All + Vybrat vše + + + + Delete + Smazat + + + + Deselect All + Zrušit výběr všeho + + + + qdesigner_internal::ConnectionModel + + + Sender + Vysílač + + + + Signal + Signál + + + + Receiver + Přijímač + + + + Slot + Zdířka + + + + <sender> + <Vysílač> + + + + <signal> + <Signál> + + + + <receiver> + <Přijímač> + + + + <slot> + <Zdířka> + + + + Signal and Slot Editor + Editor signálů a zdířek + + + + The connection already exists!<br>%1 + Toto spojení již existuje!<br>%1</br> + + + + qdesigner_internal::ContainerWidgetTaskMenu + + + Insert Page Before Current Page + Vložit stranu před nynější stranu + + + + Insert Page After Current Page + Vložit stranu po nynější straně + + + + Add Subwindow + Přidat podokno + + + + Delete + Smazat + + + + Insert + Vložit + + + + Subwindow + Podokno + + + + Page + Strana + + + + Page %1 of %2 + Strana %1 z %2 + + + + qdesigner_internal::DPI_Chooser + + + x + DPI X/Y separator + x + + + + System (%1 x %2) + System resolution + Systémové rozlišení (%1 x %2) + + + + User defined + Stanoveno uživatelem + + + + qdesigner_internal::DesignerPropertyManager + + + + AlignLeft + Zarovnat k levému okraji + + + + AlignHCenter + Zarovnat vodorovně na střed + + + + AlignRight + Zarovnat k pravému okraji + + + + AlignJustify + Zarovnat do bloku + + + + AlignTop + Zarovnat k hornímu okraji + + + + + AlignVCenter + Zarovnat svisle na střed + + + + AlignBottom + Zarovnat k dolnímu okraji + + + + %1, %2 + %1, %2 + + + + Customized (%n roles) + + Přizpůsobeno (role) + Přizpůsobeno (%n role) + Přizpůsobeno (%n role) + + + + + Inherited + Zděděno + + + + Horizontal + Vodorovný + + + + Vertical + Svislý + + + + Normal Off + Obvyklé, vypnuto + + + + Normal On + Obvyklé, zapnuto + + + + Disabled Off + Zakázáno, vypnuto + + + + Disabled On + Zakázáno, zapnuto + + + + Active Off + V činnosti, vypnuto + + + + Active On + V činnosti, zapnuto + + + + Selected Off + Vybráno, vypnuto + + + + Selected On + Vybráno, zapnuto + + + + + translatable + Překlad + + + + + disambiguation + Zabránění dvojznačnosti + + + + + comment + Poznámka + + + + qdesigner_internal::DeviceProfileDialog + + + Device Profiles (*.%1) + Profily zařízení (*.%1) + + + + Default + Výchozí + + + + Save Profile + Uložit profil + + + + Save Profile - Error + Chyba při ukládání profilu + + + + Unable to open the file '%1' for writing: %2 + Soubor '%1' se nepodařilo otevřít pro zápis: %2 + + + + Unable to open the file '%1' for reading: %2 + Soubor '%1' se nepodařilo otevřít pro čtení: %2 + + + + '%1' is not a valid profile: %2 + '%1' není platným profilem: %2 + + + + Open profile + Otevřít profil + + + + + Open Profile - Error + Chyba při otevírání profilu + + + + qdesigner_internal::Dialog + + + Dialog + Dialog + + + + StringList + Seznam řetězců znaků + + + + New String + Nový řetězec znaků + + + + &New + &Nový + + + + Delete String + Smazat řetězec znaků + + + + &Delete + &Smazat + + + + &Value: + &Hodnota: + + + + Move String Up + Posunout řetězec znaků nahoru + + + + Up + Nahoru + + + + Move String Down + Posunout řetězec znaků dolů + + + + Down + Dolů + + + + qdesigner_internal::EmbeddedOptionsControl + + + None + Žádný + + + + Add a profile + Přidat profil + + + + Edit the selected profile + Upravit vybraný profil + + + + Delete the selected profile + Smazat vybraný profil + + + + Add Profile + Přidat profil + + + + New profile + Nový profil + + + + Edit Profile + Upravit profil + + + + Delete Profile + Smazat profil + + + + Would you like to delete the profile '%1'? + Chcete smazat profil '%1'? + + + + Default + Výchozí + + + + qdesigner_internal::FilterWidget + + + <Filter> + <FIltr> + + + + qdesigner_internal::FormEditor + + + Resource File Changed + Zdrojový soubor byl změněn + + + + The file "%1" has changed outside Designer. Do you want to reload it? + Zdrojový soubor "%1" byl změněn mimo program Designer. Chcete jej znovu nahrát? + + + + qdesigner_internal::FormLayoutMenu + + + Add form layout row... + Přidat řádek s rozvržením formuláře... + + + + qdesigner_internal::FormWindow + + + Edit contents + Upravit obsah + + + + F2 + F2 + + + + Resize + Změnit velikost + + + + + Key Move + Posunout s pomocí klávesnice + + + + Paste error + Chyba při vložení + + + + Lay out + Rozvržení + + + + + Drop widget + Vložit prvek + + + + Paste %n action(s) + + Vložit jednu činnost + Vložit %n činnosti + Vložit %n činnosti + + + + + Insert widget '%1' + Vložit prvek '%1' + + + + Paste %n widget(s) + + Vložit jeden prvek + Vložit %n prvky + Vložit %n prvky + + + + + Paste (%1 widgets, %2 actions) + Vložit (%1 prvky, %2 činnosti) + + + + Cannot paste widgets. Designer could not find a container without a layout to paste into. + Prvky nelze vložit, protože se nepodařilo nalézt kontejner, který již nemá rozvržení. + + + + Break the layout of the container you want to paste into, select this container and then paste again. + Zrušte, prosím, rozvržení kontejneru, do kterého chcete vkládat. Vyberte jej znovu a proveďte vložení znovu. + + + + Select Ancestor + Vybrat nadřazený prvek + + + + A QMainWindow-based form does not contain a central widget. + Formulář založený na QMainWindow neobsahuje ústřední prvek. + + + + Raise widgets + Přenést prvky do popředí + + + + Lower widgets + Přenést prvky do pozadí + + + + qdesigner_internal::FormWindowBase + + + Delete + Smazat + + + + Delete '%1' + Smazat '%1' + + + + qdesigner_internal::FormWindowManager + + + Cu&t + Vyj&mout + + + + Cuts the selected widgets and puts them on the clipboard + Vyjme vybrané prvky a odloží je do schránky + + + + &Copy + &Kopírovat + + + + Copies the selected widgets to the clipboard + Zkopíruje vybrané prvky do schránky + + + + &Paste + &Vložit + + + + Pastes the clipboard's contents + Vloží obsah schránky + + + + &Delete + &Smazat + + + + Deletes the selected widgets + Smaže vybrané prvky + + + + Select &All + Vybrat &vše + + + + Selects all widgets + Vybere všechny prvky + + + + Bring to &Front + Přenést do &popředí + + + + + Raises the selected widgets + Přenese vybrané prvky do popředí + + + + Send to &Back + Přenést do po&zadí + + + + + Lowers the selected widgets + Přenese vybrané prvky do pozadí + + + + Adjust &Size + Přizpůsobit &velikost + + + + Adjusts the size of the selected widget + Spočítá velikost vybraného prvku z rozvržení a přizpůsobí velikost prvku + + + + Lay Out &Horizontally + Uspořádat předměty &vodorovně + + + + Lays out the selected widgets horizontally + Uspořádá vybrané předměty vodorovně + + + + Lay Out &Vertically + Uspořádat předměty &svisle + + + + Lays out the selected widgets vertically + Uspořádá vybrané předměty svisle + + + + Lay Out in a &Grid + Uspořádat předměty &tabulkově + + + + Lays out the selected widgets in a grid + Uspořádá vybrané předměty tabulkově + + + + Lay Out Horizontally in S&plitter + Uspořádat předměty vodorovně okolo &dělící příčky + + + + Lays out the selected widgets horizontally in a splitter + Uspořádá vybrané předměty vodorovně okolo dělící příčky + + + + Lay Out Vertically in Sp&litter + Uspořádat předměty svisle okolo dě&lící příčky + + + + Lays out the selected widgets vertically in a splitter + Uspořádá vybrané předměty svisle okolo dělící příčky + + + + &Break Layout + &Zrušit rozvržení + + + + Breaks the selected layout + Zruší vybrané rozvržení + + + + &Preview... + &Náhled... + + + + Preview current form + Náhled nynějšího formuláře + + + + Form &Settings... + &Nastavení formuláře... + + + + Break Layout + Zrušit rozvržení + + + + Adjust Size + Přizpůsobit velikost + + + + Could not create form preview + Title of warning message box + Nepodařilo se vytvořit náhled formuláře + + + + Form Settings - %1 + Nastavení formuláře - %1 + + + + Removes empty columns and rows + Odstraní prázdné řádky a sloupce + + + + Lay Out in a &Form Layout + Uspořádat předměty v &rozvržení formuláře + + + + Lays out the selected widgets in a form layout + Uspořádá vybrané předměty v dvousloupcovém rozvržení formuláře + + + + Si&mplify Grid Layout + Z&jednodušit tabulkové rozvržení + + + + qdesigner_internal::FormWindowSettings + + + None + Žádný + + + + Device Profile: %1 + Profil zařízení: %1 + + + + qdesigner_internal::GridPanel + + + Visible + Viditelný + + + + Snap + Zapadnout + + + + Reset + Nastavit znovu + + + + Form + Formulář + + + + Grid + Mřížka + + + + Grid &X + Mřížka &x + + + + Grid &Y + Mřížka &y + + + + qdesigner_internal::GroupBoxTaskMenu + + + Change title... + Změnit název... + + + + qdesigner_internal::HtmlTextEdit + + + Insert HTML entity + Vložit HTML znak + + + + qdesigner_internal::IconSelector + + + The pixmap file '%1' cannot be read. + Soubor s pixmapou '%1' nelze přečíst. + + + + The file '%1' does not appear to be a valid pixmap file: %2 + Soubor '%1' není platným souborem s pixmapou: %2 + + + + The file '%1' could not be read: %2 + Soubor %1 se nepodařilo přečít: %2 + + + + Pixmap Read Error + Chyba při čtení pixmapy + + + + ... + ... + + + + Normal Off + Obvyklé, vypnuto + + + + Normal On + Obvyklé, zapnuto + + + + Disabled Off + Zakázáno, vypnuto + + + + Disabled On + Zakázáno, zapnuto + + + + Active Off + V činnosti, vypnuto + + + + Active On + V činnosti, zapnuto + + + + Selected Off + Vybráno, vypnuto + + + + Selected On + Vybráno, zapnuto + + + + Choose Resource... + Vybrat zdroj... + + + + Choose File... + Vybrat soubor... + + + + Reset + Nastavit znovu + + + + Reset All + Nastavit znovu vše + + + + Choose a Pixmap + Vybrat pixmapu + + + + qdesigner_internal::ItemListEditor + + + Properties &<< + Vlastnosti &<< + + + + + Properties &>> + Vlastnosti &>> + + + + Items List + Seznam prvků + + + + New Item + Nový prvek + + + + &New + &Nový + + + + Delete Item + Smazat prvek + + + + &Delete + &Smazat + + + + Move Item Up + Posunout prvek nahoru + + + + U + U + + + + Move Item Down + Posunout prvek dolů + + + + D + D + + + + qdesigner_internal::LabelTaskMenu + + + Change rich text... + Změnit upravovatelný text... + + + + Change plain text... + Změnit prostý text... + + + + qdesigner_internal::LanguageResourceDialog + + + Choose Resource + Vybrat zdroj + + + + qdesigner_internal::LineEditTaskMenu + + + Change text... + Změnit text... + + + + qdesigner_internal::ListWidgetEditor + + + Edit List Widget + Upravit seznam prvků + + + + Edit Combobox + Upravit skupinovou krabici + + + + New Item + Nový prvek + + + + qdesigner_internal::ListWidgetTaskMenu + + + Edit Items... + Upravit prvky... + + + + Change List Contents + Změnit obsah seznamu + + + + qdesigner_internal::MdiContainerWidgetTaskMenu + + + Next Subwindow + Další podokno + + + + Previous Subwindow + Předchozí podokno + + + + Tile + Uspořádat jedno vedle druhého + + + + Cascade + Překrývat + + + + qdesigner_internal::MenuTaskMenu + + + Remove + Odstranit + + + + qdesigner_internal::MorphMenu + + + Morph into + Přeměnit prvek na + + + + qdesigner_internal::NewActionDialog + + + New Action... + Nová činnost... + + + + &Text: + &Text: + + + + Shortcut: + Klávesová zkratka: + + + + Checkable: + Zaškrtnutelná: + + + + ToolTip: + Rada k nástroji: + + + + ... + ... + + + + &Icon: + &Ikona: + + + + Object &name: + &Název předmětu: + + + + qdesigner_internal::NewDynamicPropertyDialog + + + Set Property Name + Nastavit název vlastnosti + + + + The current object already has a property named '%1'. +Please select another, unique one. + nynější předmět již má vlastnost s názvem '%1'. +Zvolte, prosím, jiný, jedinečný název. + + + + Create Dynamic Property + Vytvořit dynamickou vlastnost + + + + Property Name + Název vlastnosti + + + + Property Type + typ vlastnosti + + + + The '_q_' prefix is reserved for the Qt library. +Please select another name. + Předpona '_q_' je používána knihovnou Qt pro vnitřní účely. +Zvolte, prosím, jiný název. + + + + horizontalSpacer + Vodorovný vymezovač + + + + qdesigner_internal::NewFormWidget + + + Default size + Výchozí velikost + + + + QVGA portrait (240x320) + QVGA formát na výšku (240x320) + + + + QVGA landscape (320x240) + QVGA formát na šířku (320x240) + + + + VGA portrait (480x640) + VGA formát na výšku (480x640) + + + + VGA landscape (640x480) + VGA formát na šířku (640x480) + + + + Widgets + New Form Dialog Categories + Prvky + + + + Custom Widgets + Uživatelsky stanovené prvky + + + + None + Žádný + + + + Error loading form + Formulář se nepodařilo nahrát + + + + Unable to open the form template file '%1': %2 + Nepodařilo se otevřít předlohu s formulářem '%1': %2 + + + + Internal error: No template selected. + Vnitřní chyba: Není vybrána žádná předloha. + + + + 0 + 0 + + + + Choose a template for a preview + Vyberte předlohu pro náhled + + + + Embedded Design + Vložený návrh + + + + Device: + Zařízení: + + + + Screen Size: + Velikost obrazovky: + + + + qdesigner_internal::NewPromotedClassPanel + + + Add + Přidat + + + + New Promoted Class + Nová uživatelsky stanovená třída + + + + Base class name: + Název základní třídy: + + + + Promoted class name: + Název uživatelsky stanovené třídy: + + + + Header file: + Hlavičkový soubor: + + + + Global include + Celkový hlavičkový soubor + + + + Reset + Nastavit znovu + + + + qdesigner_internal::ObjectInspector + + + Change Current Page + Změnit nynější stranu + + + + &Find in Text... + &Najít v textu... + + + + qdesigner_internal::ObjectInspector::ObjectInspectorPrivate + + Change Current Page + Změnit nynější stranu + + + + qdesigner_internal::OrderDialog + + + Index %1 (%2) + Poloha %1 (%2) + + + + Change Page Order + Změnit pořadí stran + + + + Page Order + Pořadí stran + + + + Move page up + Posunout stranu nahoru + + + + Move page down + Posunout stranu dolů + + + + %1 %2 + %1 %2 + + + + qdesigner_internal::PaletteEditor + + + Edit Palette + Upravit paletu + + + + Tune Palette + Vyladit paletu + + + + Show Details + Ukázat podrobnosti + + + + Compute Details + Spočítat podrobnosti + + + + Quick + Jednoduchý + + + + Preview + Náhled + + + + Disabled + Zakázáno + + + + Inactive + Nečinný + + + + Active + V činnosti + + + + qdesigner_internal::PaletteEditorButton + + + Change Palette + Změnit paletu + + + + qdesigner_internal::PaletteModel + + + Color Role + Barevné kolo + + + + Active + V činnosti + + + + Inactive + Nečinný + + + + Disabled + Zakázáno + + + + qdesigner_internal::PixmapEditor + + + Copy Path + Kopírovat cestu + + + + Paste Path + Vložit cestu + + + + Choose Resource... + Vybrat zdroj... + + + + Choose File... + Vybrat soubor... + + + + + ... + ... + + + + qdesigner_internal::PlainTextEditorDialog + + + Edit text + Upravit text + + + + qdesigner_internal::PluginDialog + + + Components + Součásti + + + + Plugin Information + Informace o přídavných modulech + + + + Refresh + Obnovit + + + + Scan for newly installed custom widget plugins. + Prohledat kvůli nově nainstalovaným přídavným modulům s uživatelsky stanovenými prvky. + + + + Qt Designer couldn't find any plugins + Programu Qt Designer se nepodařilo najít jakékoli přídavné moduly + + + + Qt Designer found the following plugins + Programu Qt Designer se podařilo najít následující přídavné moduly + + + + New custom widget plugins have been found. + Byly nalezeny nové přídavné moduly s uživatelsky stanovenými prvky. + + + + qdesigner_internal::PreviewActionGroup + + + %1 Style + %1-Styl + + + + qdesigner_internal::PreviewConfigurationWidget + + + Default + Výchozí + + + + None + Žádný + + + + Browse... + Procházet... + + + + Load Custom Device Skin + Nahrát uživatelsky stanovený vzhled zařízení + + + + All QVFB Skins (*.%1) + Všechny vzhledy QVFB (*.%1) + + + + %1 - Duplicate Skin + %1 - Zdvojit vzhled + + + + The skin '%1' already exists. + Vzhled '%1' již existuje. + + + + %1 - Error + %1 - Chyba + + + + %1 is not a valid skin directory: +%2 + %1 není platným adresářem pro vzhled: +%2 + + + + qdesigner_internal::PreviewConfigurationWidget::PreviewConfigurationWidgetPrivate + + Load Custom Device Skin + Nahrát uživatelsky stanovený vzhled zařízení + + + All QVFB Skins (*.%1) + Všechny vzhledy QVFB (*.%1) + + + %1 - Duplicate Skin + %1 - Vzhled již existuje + + + The skin '%1' already exists. + Vzhled '%1' již existuje. + + + %1 - Error + %1 - Chyba + + + %1 is not a valid skin directory: +%2 + %1 není platným adresářem vzhledu: +%2 + + + + qdesigner_internal::PreviewDeviceSkin + + + &Portrait + Formát na &výšku + + + + Landscape (&CCW) + Rotate form preview counter-clockwise + Formát na šířku (&proti směru otáčení hodinových ručiček) + + + + &Landscape (CW) + Rotate form preview clockwise + Formát na šířku (po směru &otáčení hodinových ručiček) + + + + &Close + &Zavřít + + + + qdesigner_internal::PreviewManager + + + %1 - [Preview] + %1 - [Náhled] + + + + qdesigner_internal::PreviewMdiArea + + + The moose in the noose +ate the goose who was loose. + Palette editor background + Los v chomoutu snědl husu, +která byla volně puštěná. + + + + qdesigner_internal::PreviewWidget + + + Preview Window + Náhledové okno + + + + LineEdit + Úprava čáry + + + + ComboBox + Skupinová krabice + + + + PushButton + Tlačítko na postrčení + + + + ButtonGroup2 + Skupina tlačítek 2 + + + + CheckBox1 + Zaškrtnutelné políčko 1 + + + + CheckBox2 + Zaškrtnutelné políčko 2 + + + + ButtonGroup + Skupina tlačítek + + + + RadioButton1 + Rozhlasové tlačítko 1 + + + + RadioButton2 + Rozhlasové tlačítko 2 + + + + RadioButton3 + Rozhlasové tlačítko 3 + + + + qdesigner_internal::PromotionModel + + + Name + Název + + + + Header file + Hlavičkový soubor + + + + Global include + Celkový hlavičkový soubor + + + + Usage + Použití + + + + qdesigner_internal::PromotionTaskMenu + + + Promoted widgets... + Uživatelsky stanovené prvky... + + + + Promote to ... + Stanovit jako zástupný symbol pro uživatelsky stanovenou třídu... + + + + Promote to + Stanovit jako zástupný symbol pro uživatelsky stanovenou třídu + + + + Demote to %1 + Odstranit zástupný symbol pro uživatelsky stanovenou třídu a přeměnit na %1 + + + + Change signals/slots... + Změnit signály/zdířky... + + + + qdesigner_internal::PropertyEditor + + + Add Dynamic Property... + Přidat dynamickou vlastnost... + + + + Remove Dynamic Property + Odstranit dynamickou vlastnost + + + + Tree View + Stromový pohled + + + + Drop Down Button View + Podrobný pohled + + + + Object: %1 +Class: %2 + Předmět: %1 +Třída: %2 + + + + Sorting + Třídění + + + + Color Groups + Barevné zdůraznění + + + + Configure Property Editor + Nastavit editor vlastností + + + + String... + Řetězec znaků... + + + + Bool... + Booleánská hodnota... + + + + Other... + Jiný typ... + + + + qdesigner_internal::PropertyLineEdit + + + Insert line break + Vložit zalomení řádku + + + + qdesigner_internal::QDesignerPromotionDialog + + + Promoted Widgets + Zástupný symbol pro uživatelsky stanovené prvky + + + + Promoted Classes + Zástupný symbol pro uživatelsky stanovené třídy + + + + Promote + Používat + + + + %1 - Error + %1 - Chyba + + + + Change signals/slots... + Změnit signály/zdířky... + + + + qdesigner_internal::QDesignerResource + + + Loading qrc file + Nahrává se zdrojový soubor + + + + The specified qrc file <p><b>%1</b></p><p>could not be found. Do you want to update the file location?</p> + Zadaný zdrojový soubor <p><b>%1</b></p><p> se nepodařilo najít. Chcete zadat novou cestu k umístění souboru?</p> + + + + New location for %1 + Nové umístění %1 + + + + Resource files (*.qrc) + Zdrojové soubory (*.qrc) + + + + qdesigner_internal::QDesignerTaskMenu + + + Change objectName... + Změnit název předmětu... + + + + Change toolTip... + Změnit radu k nástroji... + + + + Change whatsThis... + Změnit "A co je toto"... + + + + Change styleSheet... + Změnit předlohový list... + + + + Create Menu Bar + Vytvořit nabídkový pruh + + + + Add Tool Bar + Přidat nástrojový pruh + + + + Create Status Bar + Vytvořit stavový pruh + + + + Remove Status Bar + Odstranit stavový pruh + + + + Change script... + Změnit skript... + + + + Change signals/slots... + Změnit signály/zdířky... + + + + Go to slot... + Jít na zdířku... + + + + no signals available + Nejsou dostupné žádné signály + + + + Set size constraint on %n widget(s) + + Nastavit omezení velikosti u jednoho prvku + Nastavit omezení velikosti u %n prvků + Nastavit omezení velikosti u %n prvků + + + + + Size Constraints + Omezení velikosti + + + + Set Minimum Width + Nastavit nejmenší šířku + + + + Set Minimum Height + Nastavit nejmenší výšku + + + + Set Minimum Size + Nastavit nejmenší velikost + + + + Set Maximum Width + Nastavit největší šířku + + + + Set Maximum Height + Nastavit největší výšku + + + + Set Maximum Size + Nastavit největší velikost + + + + Edit ToolTip + Upravit radu k nástroji + + + + Edit WhatsThis + Upravit "A co je toto" + + + + qdesigner_internal::QDesignerWidgetBox + + + + Unexpected element <%1> + Neplatný prvek <%1> + + + + A parse error occurred at line %1, column %2 of the XML code specified for the widget %3: %4 +%5 + Kód XML pro prvek %3 obsahuje chybu na řádku %1, sloupec %2:%4: +%5 + + + + The XML code specified for the widget %1 does not contain any widget elements. +%2 + Kód XML pro prvek %1 neobsahuje prvky. +%2 + + + + An error has been encountered at line %1 of %2: %3 + Chyba na řádku %1 z %2: %3 + + + + Unexpected element <%1> encountered when parsing for <widget> or <ui> + Na místě očekávaného <prvek>- nebo prvku <ui> byl nalezen <%1> + + + + Unexpected end of file encountered when parsing widgets. + Při čtení nastavení krabice s prvky se vyskytl předčasný konec souboru. + + + + A widget element could not be found. + Nepodařilo se najít prvek. + + + + qdesigner_internal::QtGradientStopsController + + + H + H + + + + S + S + + + + V + V + + + + + Hue + Barevný odstín + + + + Sat + Sytost + + + + Val + Hodnota + + + + Saturation + Sytost + + + + Value + Hodnota + + + + R + R + + + + G + G + + + + B + B + + + + Red + Červená + + + + Green + Zelená + + + + Blue + Modrá + + + + qdesigner_internal::RichTextEditorDialog + + + Edit text + Upravit text + + + + &OK + &OK + + + + &Cancel + &Zrušit + + + + Rich Text + Upravovatelný text + + + + Source + Zdroj + + + + qdesigner_internal::RichTextEditorToolBar + + + Bold + Tučné + + + + CTRL+B + CTRL+F + + + + Italic + Kurzíva + + + + CTRL+I + CTRL+K + + + + Underline + Podtržení + + + + CTRL+U + CTRL+U + + + + Left Align + Zarovnat k levému okraji + + + + Center + Zarovnat na střed + + + + Right Align + Zarovnat k pravému okraji + + + + Justify + Zarovnat do bloku + + + + Superscript + Horní index + + + + Subscript + Dolní index + + + + Insert &Link + Vložit &odkaz + + + + Insert &Image + Vložit &obrázek + + + + qdesigner_internal::ScriptDialog + + + Edit script + Upravit skript + + + + Syntax error + Chyba ve skladbě + + + + <html>Enter a Qt Script snippet to be executed while loading the form.<br>The widget and its children are accessible via the variables <i>widget</i> and <i>childWidgets</i>, respectively. + <html>Zadejte kousek Qt skriptu k provedení v průběhu nahrávání formuláře.<br>Prvek a jemu podřízené prvky jsou přístupné prostřednictvím proměnných <i>widget</i> und <i>childWidgets</i>. + + + + qdesigner_internal::ScriptErrorDialog + + + Script errors + Chyby ve skriptu + + + + qdesigner_internal::SignalSlotDialog + + + There is already a slot with the signature '%1'. + Již existuje zdířka s podpisem '%1'. + + + + There is already a signal with the signature '%1'. + Již existuje signál s podpisem '%1'. + + + + %1 - Duplicate Signature + %1 - Podpis již existuje + + + + + Signals/Slots of %1 + Signály/Zdířky od %1 + + + + qdesigner_internal::SignalSlotEditorPlugin + + + Edit Signals/Slots + Upravit signály/zdířky + + + + F4 + F4 + + + + qdesigner_internal::SignalSlotEditorTool + + + Edit Signals/Slots + Upravit signály/zdířky + + + + qdesigner_internal::StatusBarTaskMenu + + + Remove + Odstranit + + + + qdesigner_internal::StringListEditorButton + + + Change String List + Změnit seznamy s řetězci znaků + + + + qdesigner_internal::StyleSheetEditorDialog + + + Edit Style Sheet + Upravit předlohový list + + + + + Valid Style Sheet + Platný předlohový list + + + + Invalid Style Sheet + Neplatný předlohový list + + + + Add Resource... + Přidat zdroj... + + + + Add Gradient... + Přidat přechod... + + + + Add Color... + Přidat barvu... + + + + Add Font... + Přidat písmo... + + + + qdesigner_internal::TabOrderEditor + + + Start from Here + Začít znovu odtud + + + + Restart + Začít znovu + + + + Tab Order List... + Seznam s pořadím tabulátorů... + + + + Tab Order List + Seznam s pořadím tabulátorů + + + + Tab Order + Pořadí tabulátorů + + + + qdesigner_internal::TabOrderEditorPlugin + + + Edit Tab Order + Upravit pořadí tabulátorů + + + + qdesigner_internal::TabOrderEditorTool + + + Edit Tab Order + Upravit pořadí tabulátorů + + + + qdesigner_internal::TableWidgetEditor + + + New Column + Nový sloupec + + + + New Row + Nový řádek + + + + &Columns + &Sloupce + + + + &Rows + &Řádky + + + + Properties &<< + Vlastnosti &<< + + + + + Properties &>> + Vlastnosti &>> + + + + Edit Table Widget + Upravit prvek s tabulkou + + + + &Items + &Prvky + + + + Table Items + Prvky tabulek + + + + qdesigner_internal::TableWidgetTaskMenu + + + Edit Items... + Upravit prvky... + + + + qdesigner_internal::TemplateOptionsWidget + + + Pick a directory to save templates in + Vyberte adresář pro ukládání předloh + + + + Form + Formulář + + + + Additional Template Paths + Dodatečné adresáře pro předlohy + + + + ... + ... + + + + qdesigner_internal::TextEditTaskMenu + + + Change HTML... + Změnit HTML... + + + + Edit HTML + Upravit HTML + + + + Edit Text + Upravit text + + + + Change Plain Text... + Změnit prostý text... + + + + qdesigner_internal::TextEditor + + + Choose Resource... + Vybrat zdroj... + + + + Choose File... + Vybrat soubor... + + + + Choose a File + Vybrat soubor + + + + ... + ... + + + + qdesigner_internal::ToolBarEventFilter + + + Insert Separator + Vložit oddělovač + + + + Remove action '%1' + Odstranit činnost '%1' + + + + Remove Toolbar '%1' + Odstranit nástrojový pruh '%1' + + + + Insert Separator before '%1' + Vložit oddělovač před '%1' + + + + Append Separator + Připojit oddělovač + + + + qdesigner_internal::TreeWidgetEditor + + + &Columns + &Sloupce + + + + Per column properties + Vlastnosti sloupců + + + + Common properties + Společné vlastnosti + + + + + New Item + Nový prvek + + + + Properties &<< + Vlastnosti &<< + + + + + Properties &>> + Vlastnosti &>> + + + + New Column + Nový sloupec + + + + Edit Tree Widget + Upravit stromový prvek + + + + &Items + &Prvky + + + + Tree Items + Stromové prvky + + + + + New Subitem + Nový podřízený prvek + + + + New &Subitem + Nový po&dřízený prvek + + + + Delete Item + Smazat prvek + + + + Move Item Left (before Parent Item) + Posunout prvek doleva (před nadřízený prvek) + + + + L + L + + + + Move Item Right (as a First Subitem of the Next Sibling Item) + Posunout prvek doprava (jako první podřízený prvek dalšího rovnocenného prvku) + + + + R + R + + + + Move Item Up + Posunout prvek nahoru + + + + U + U + + + + Move Item Down + Posunout prvek dolů + + + + D + D + + + + 1 + 1 + + + + &New + &Nový + + + + &Delete + &Smazat + + + + qdesigner_internal::TreeWidgetTaskMenu + + + Edit Items... + Upravit prvky... + + + + qdesigner_internal::WidgetBox + + + Warning: Widget creation failed in the widget box. This could be caused by invalid custom widget XML. + Upozornění: Vytvoření prvku v krabici s prvky se nezdařilo. Mohlo by to být zapříčiněno chybným XML kódem uživatelsky stanoveného prvku. + + + + qdesigner_internal::WidgetBoxTreeWidget + + + Scratchpad + Skladování + + + + Custom Widgets + Uživatelsky stanovené prvky + + + + Expand all + Rozdělat vše + + + + Collapse all + Složit vše + + + + List View + Pohled se seznamem + + + + Icon View + Pohled s ikonami + + + + Remove + Odstranit + + + + Edit name + Upravit název + + + + qdesigner_internal::WidgetDataBase + + + A custom widget plugin whose class name (%1) matches that of an existing class has been found. + Byl nalezen přídavný modul, který obsahuje uživatelsky stanovený prvek, jehož název pro třídu (%1) odpovídá stávající třídě. + + + + qdesigner_internal::WidgetEditorTool + + + Edit Widgets + Upravit prvky + + + + qdesigner_internal::WidgetFactory + + + The custom widget factory registered for widgets of class %1 returned 0. + Závod pro uživatelsky stanovené prvky třídy %1 vrátil zpět 0. + + + + A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class %1. It returned a widget of class %2. + Při vytváření prvku byly zjištěny odporující si názvy tříd: Závod pro uživatelsky stanovené prvky třídy %1 vrátil zpět prvek třídy %2. + + + + The current page of the container '%1' (%2) could not be determined while creating a layout.This indicates an inconsistency in the ui-file, probably a layout being constructed on a container widget. + Při vytváření rozvržení se nepodařilo určit nynější stránku kontejneru '%1' (%2). To naznačuje jistou nesrovnalost v souboru s rozhraním; pravděpodobně bylo rozvržení postaveno přímo na prvku kontejneru. + + + + Attempt to add a layout to a widget '%1' (%2) which already has an unmanaged layout of type %3. +This indicates an inconsistency in the ui-file. + Pokus o přidání rozvržení na prvek '%1' (%2), který již má nespravované rozvržení typu %3. To naznačuje jistou nesrovnalost v souboru s rozhraním. + + + + Cannot create style '%1'. + Nepodařilo se vytvořit styl '%1'. + + + + %1 Widget + %1 prvek + + + + qdesigner_internal::WizardContainerWidgetTaskMenu + + + Next + Další + + + + Back + Zpět + + + + qdesigner_internal::ZoomMenu + + + %1 % + Zoom factor + %1 % + + + + qdesigner_internal::ZoomablePreviewDeviceSkin + + + &Zoom + &Zvětšit + + + diff --git a/translations/linguist_cs.ts b/translations/linguist_cs.ts new file mode 100644 index 0000000..32905c9 --- /dev/null +++ b/translations/linguist_cs.ts @@ -0,0 +1,2023 @@ + + + + + AboutDialog + + + Qt Linguist + Qt Linguist + + + + BatchTranslationDialog + + + Batch Translation of '%1' - Qt Linguist + Automatický překlad '%1' - Qt Linguist + + + + Searching, please wait... + Hledá se, čekejte, prosím... + + + + &Cancel + &Zrušit + + + + Linguist batch translator + Automatický překladatel (Linguist) + + + + Batch translated %n entries + + 1 záznam byl automaticky přeložen + %n záznamy byly automaticky přeloženy + %n záznamů bylo automaticky přeloženo + + + + + Qt Linguist - Batch Translation + Qt Linguist - Automatický překlad + + + + Options + Volby + + + + Set translated entries to finished + Označit přeložené záznamy jako hotové + + + + Retranslate entries with existing translation + Znovu přeložit záznamy s již existujícím překladem + + + + Translate also finished entries + Přeložit i hotové záznamy + + + + Phrase book preference + Slovníky + + + + Move up + Posunout nahoru + + + + Move down + Posunout dolů + + + + &Run + &Provést + + + + Cancel + Zrušit + + + + Note that the modified entries will be reset to unfinished if 'Set translated entries to finished' above is unchecked + Všimněte si, že změněné záznamy budou znovu nastaveny na nevyřízené, pokud není zapnuto nahoře zmíněné nastavení 'Označit přeložené záznamy jako hotové' + + + + The batch translator will search through the selected phrase books in the order given above + Automatický překladatel bude prohledávat vybrané slovníky v pořadí uvedeném výše + + + + DataModel + + + <qt>Duplicate messages found in '%1': + <qt>Vícekrát existující hlášení v '%1': + + + + <p>[more duplicates omitted] + <p>[vypuštěny další vícekrát existující zprávy] + + + + <p>* Context: %1<br>* Source: %2 + <p>* Souvislosti: %1<br>* Zdroj: %2 + + + + <br>* Comment: %3 + <br>* Poznámka: %3 + + + + Linguist does not know the plural rules for '%1'. +Will assume a single universal form. + Pravidla pro tvoření množného čísla (plurálu) jazyka '%1' nejsou v Linguistu stanovena. +Pracuje se s jednoduchým všeobecným tvarem. + + + + Cannot create '%2': %1 + '%2' nemůže být vytvořen: %1 + + + + Universal Form + Všeobecný tvar + + + + ErrorsView + + + Accelerator possibly superfluous in translation. + V textu překladu je možná přebytečný akcelerátor. + + + + Accelerator possibly missing in translation. + V textu překladu možná chybí akcelerátor. + + + + Translation does not end with the same punctuation as the source text. + Interpunkční znaménko na konci textu překladu se liší od interpunkce zdrojového textu. + + + + A phrase book suggestion for '%1' was ignored. + Na návrh slovníku pro '%1' nebyl brán zřetel. + + + + Translation does not refer to the same place markers as in the source text. + Držitelé místa v textu překladu a ve zdrojovém textu se liší. + + + + Translation does not contain the necessary %n place marker. + Potřebný držitel místa (%n) v překladu chybí. + + + + Unknown error + Neznámá chyba + + + + FindDialog + + + This window allows you to search for some text in the translation source file. + Toto okno vám umožňuje hledání textu ve zdrojovém souboru s překladem. + + + + Type in the text to search for. + Zadejte text, který se má hledat. + + + + Options + Volby + + + + Source texts are searched when checked. + Když je zapnuto, hledá se ve zdrojových textech. + + + + Translations are searched when checked. + Když je zapnuto, hledá se v překladech. + + + + Texts such as 'TeX' and 'tex' are considered as different when checked. + Když je zapnuto, texty jako 'TeX' a 'tex' se považují za rozdílné. + + + + Comments and contexts are searched when checked. + Když je zapnuto, prohledávají se poznámky a souvislosti. + + + + Find + Hledat + + + + &Find what: + &Vzor hledání: + + + + &Source texts + &Zdrojové texty + + + + &Translations + &Překlady + + + + &Match case + &Dbát na psaní velkých a malých písmen + + + + &Comments + &Poznámky + + + + Ignore &accelerators + Nedbat na &akcelerátory + + + + Click here to find the next occurrence of the text you typed in. + Klepněte sem pro skok k dalšímu výskytu hledáného textu. + + + + Find Next + Hledat dál + + + + Click here to close this window. + Klepněte sem pro zavření tohoto okna. + + + + Cancel + Zrušit + + + + + Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog + + + + + FormMultiWidget + + + Alt+Delete + translate, but don't change + Alt+Delete + + + + Shift+Alt+Insert + translate, but don't change + Shift+Alt+Insert + + + + Alt+Insert + translate, but don't change + Alt+Insert + + + + Confirmation - Qt Linguist + Potvrzení - Qt Linguist + + + + Delete non-empty length variant? + Smazat vyplněnou obměnu délky? + + + + LRelease + + + Dropped %n message(s) which had no ID. + + Byl smazán záznam bez identifikátoru. + Byly smazány %n záznamy bez identifikátoru. + Byly smazány %n záznamy bez identifikátoru. + + + + + Excess context/disambiguation dropped from %n message(s). + + U jednoho záznamu byla odstraněna přebytečná souvislost případně přebytečné zabránění dvojznačnosti (přebytečná informace k rozhodování). + U %n záznamů byla odstraněna přebytečná souvislost případně přebytečné zabránění dvojznačnosti (přebytečná informace k rozhodování). + U %n záznamů byla odstraněna přebytečná souvislost případně přebytečné zabránění dvojznačnosti (přebytečná informace k rozhodování). + + + + + Generated %n translation(s) (%1 finished and %2 unfinished) + + + Byl vytvořen jeden překlad (%1 dokončeno %2 nedokončeno) + + Byly vytvořeny %n překlady (%1 dokončeno %2 nedokončeno) + + Byly vytvořeny %n překlady (%1 dokončeno %2 nedokončeno) + + + + + + Ignored %n untranslated source text(s) + + + Na jeden nepřeložený text nebyl brán zřetel + + na %n nepřeložené texty nebyl brán zřetel + + na %n nepřeložené texty nebyl brán zřetel + + + + + + MainWindow + + + MainWindow + Hlavní okno + + + + &Phrases + &Slovníky + + + + &Close Phrase Book + &Zavřít slovník + + + + &Edit Phrase Book + &Upravit slovník + + + + &Print Phrase Book + &Vytisknout slovník + + + + V&alidation + &Schválení + + + + &View + &Pohled + + + + Vie&ws + Po&hledy + + + + &Toolbars + &Nástrojové lišty + + + + &Help + &Nápověda + + + + &Translation + &Překlad + + + + &File + &Soubor + + + + &Edit + Ú&pravy + + + + &Open... + &Otevřít... + + + + Open a Qt translation source file (TS file) for editing + Otevřít Qt zdrojový soubor s překladem (soubor TS) pro úpravy + + + + Ctrl+O + Ctrl+O + + + + E&xit + &Ukončit + + + + Close this window and exit. + Toto okno zavřít a ukončit. + + + + Ctrl+Q + Ctrl+Q + + + + + &Save + &Uložit + + + + Save changes made to this Qt translation source file + Uložit změny provedené v tomto Qt zdrojovém souboru s překladem + + + + Move to the previous unfinished item. + Jít na předchozí nevyřízený záznam. + + + + Move to the next unfinished item. + Jít na další nevyřízený záznam. + + + + Move to the previous item. + Jít na předchozí záznam. + + + + Move to the next item. + Jít na další záznam. + + + + Mark this item as done and move to the next unfinished item. + Označit tento záznam jako hotový a jít na další nevyřízený záznam. + + + + Copy from source text + Převzít zdrojový text + + + + Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. + Zapnout/Vypnout ověření akcelerátorů, to znamená, zda se shoduje počet znaků obchodnického -A (&) ve zdrojovém textu a v textu překladu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním. + + + + Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. + Zapnout/Vypnout ověření znaku na konci věty na konci textu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním. + + + + Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. + Zapnout/Vypnout ověření použití návrhů slovníku. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním. + + + + Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. + Zapnout/Vypnout ověření držitelů místa, to znamená, zda se shoduje používání %1, %2,... ve zdrojovém textu a v textu překladu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním. + + + + Open Read-O&nly... + Otevřít pouze &pro čtení... + + + + &Save All + &Uložit vše + + + + Ctrl+S + Ctrl+S + + + + + + Save &As... + Uložit &jako... + + + + Save As... + Uložit jako... + + + + Save changes made to this Qt translation source file into a new file. + Uložit změny provedené v tomto Qt zdrojovém souboru s překladem do nového souboru. + + + + &Release + &Vydat + + + + Create a Qt message file suitable for released applications from the current message file. + Vytvořit Qt soubor se zprávami vhodný pro vydané aplikace (soubor QM) ze současného souboru s překladem. + + + + &Print... + &Tisk... + + + + Ctrl+P + Ctrl+P + + + + &Undo + &Zpět + + + + Recently Opened &Files + Naposledy upravované sou&bory + + + + Save + Uložit + + + + Print a list of all the translation units in the current translation source file. + Vytisknout seznam se všemi překladovými jednotkami v současném zdrojovém souboru s překladem. + + + + Undo the last editing operation performed on the current translation. + Poslední změnu provedenou v současném překladu vrátit zpět. + + + + Ctrl+Z + Ctrl+Z + + + + &Redo + &Znovu + + + + Redo an undone editing operation performed on the translation. + Poslední zpět vrácenou změnu v překladu provést znovu. + + + + Ctrl+Y + Ctrl+Y + + + + Cu&t + &Vyjmout + + + + Copy the selected translation text to the clipboard and deletes it. + Zkopírovat vybraný text s překladem do schránky a smazat jej. + + + + Ctrl+X + Ctrl+X + + + + &Copy + &Kopírovat + + + + Copy the selected translation text to the clipboard. + Zkopírovat vybraný text s překladem do schránky. + + + + Ctrl+C + Ctrl+C + + + + &Paste + &Vložit + + + + Paste the clipboard text into the translation. + Vložit text ze schránky do překladu. + + + + Ctrl+V + Ctrl+V + + + + Select &All + Vybrat &vše + + + + Select the whole translation text. + Vybrat celý text s překladem. + + + + Ctrl+A + Ctrl+A + + + + &Find... + &Hledat... + + + + Search for some text in the translation source file. + Hledat text v souboru s překladem. + + + + Ctrl+F + Ctrl+F + + + + Find &Next + Hledat &dál + + + + Continue the search where it was left. + Pokračovat v hledání. + + + + F3 + F3 + + + + &Prev Unfinished + &Předchozí nevyřízený + + + + Close + Zavřít + + + + &Close All + &Zavřít vše + + + + Ctrl+W + Ctrl+W + + + + Ctrl+K + Ctrl+K + + + + &Next Unfinished + &Další nevyřízený + + + + P&rev + Před&chozí + + + + Ctrl+Shift+K + Ctrl+Shift+K + + + + Ne&xt + Da&lší + + + + &Done and Next + &Hotovo a další + + + + Copies the source text into the translation field. + Kopíruje zdrojový text do pole s překladem. + + + + Ctrl+B + Ctrl+B + + + + &Accelerators + &Akcelerátory + + + + &Ending Punctuation + &Interpunkce na konci + + + + &Phrase matches + &Slovník + + + + Place &Marker Matches + Držitel &místa + + + + &New Phrase Book... + &Nový slovník... + + + + Create a new phrase book. + Vytvořit nový slovník. + + + + Ctrl+N + Ctrl+N + + + + &Open Phrase Book... + &Otevřít slovník... + + + + Open a phrase book to assist translation. + Otevřít slovník kvůli podpoře při překladu. + + + + Ctrl+H + Ctrl+H + + + + &Reset Sorting + Řazení &vrátit zpět + + + + Sort the items back in the same order as in the message file. + Seřadit záznamy ve stejném pořadí jako v původním souboru s překladem. + + + + &Display guesses + Ukázat &návrhy + + + + Set whether or not to display translation guesses. + Zapnout/Vypnout zobrazení návrhů k překladu. + + + + &Statistics + S&tatistika + + + + Display translation statistics. + Ukázat statistiku k překladu. + + + + &Manual + &Příručka + + + + F1 + F1 + + + + About Qt Linguist + O Qt Linguistu + + + + About Qt + O Qt + + + + Display information about the Qt toolkit by Trolltech. + Zobrazit informace o sadě nástrojů Qt od Trolltechu. + + + + &What's This? + &Copak je asi toto? + + + + What's This? + Copak je asi toto? + + + + Enter What's This? mode. + Zapnout režim "Copak je asi toto?". + + + + Shift+F1 + Shift+F1 + + + + &Search And Translate... + Hledat a &překládat... + + + + Replace the translation on all entries that matches the search source text. + Nahradit překlad u všech záznamů, které odpovídají hledanému textu. + + + + + &Batch Translation... + &Automatický překlad... + + + + Batch translate all entries using the information in the phrase books. + Automaticky přeložit všechny záznamy s pomocí slovníků. + + + + + + Release As... + Vydat jako... + + + + + This is the application's main window. + + + + + Source text + Zdrojový text + + + + + Index + Rejstřík + + + + + Context + Souvislosti + + + + Items + Záznamy + + + + This panel lists the source contexts. + V tomto panelu jsou ukazovány souvislosti. + + + + Strings + Řetězce + + + + Phrases and guesses + Slovník a návrhy + + + + Sources and Forms + Zdrojové soubory a formuláře + + + + Warnings + Upozornění + + + + MOD + status bar: file(s) modified + Změněno + + + + Loading... + Nahrává se... + + + + + Loading File - Qt Linguist + Nahrává se soubor - Qt Linguist + + + + The file '%1' does not seem to be related to the currently open file(s) '%2'. + +Close the open file(s) first? + Nezdá se, že by soubor '%1' souvisel s již otevřenými soubory '%2'. + +Zavřít nejprve již otevřený soubor(y)? + + + + The file '%1' does not seem to be related to the file '%2' which is being loaded as well. + +Skip loading the first named file? + Nezdá se, že by soubor '%1' souvisel s již otevřeným souborem '%2', který je rovněž nahrán. + +Přeskočit nahrávání prve jmenovaného souboru? + + + + %n translation unit(s) loaded. + + Nahrána jedna překladová jednotka. + Nahrány %n překladové jednotky. + Nahrány %n překladové jednotky. + + + + + Related files (%1);; + Příbuzné soubory (%1);; + + + + Open Translation Files + Otevřít soubory s překlady + + + + + File saved. + Soubor uložen. + + + + + + Release + Vydat + + + + Qt message files for released applications (*.qm) +All files (*) + Qt soubory se zprávami pro vydané aplikace (*.qm) +Všechny soubory (*) + + + + + File created. + Soubor vytvořen. + + + + + Printing... + Tisk... + + + + Context: %1 + Souvislosti: %1 + + + + finished + vyřízeno + + + + unresolved + nevyřešeno + + + + obsolete + zastaralé + + + + + Printing... (page %1) + Tisk... (strana %1) + + + + + Printing completed + Tisk dokončen + + + + + Printing aborted + Tisk zrušen + + + + Search wrapped. + Hledání začíná odshora. + + + + + + + + + + + + + Qt Linguist + Qt Linguist + + + + + Cannot find the string '%1'. + Nelze najít řetězec '%1'. + + + + Search And Translate in '%1' - Qt Linguist + Hledat a překládat v '%1' - Qt Linguist + + + + + + Translate - Qt Linguist + Překlad - Qt Linguist + + + + Translated %n entry(s) + + Přeložen jeden záznam + Přeloženy %n záznamy + Přeloženy %n záznamy + + + + + No more occurrences of '%1'. Start over? + Žádné další výskyty '%1'. Začít znovu? + + + + Create New Phrase Book + Vytvořit nový slovník + + + + Qt phrase books (*.qph) +All files (*) + Slovníky Qt (*.qph) +Všechny soubory (*) + + + + Phrase book created. + Slovník vytvořen. + + + + Open Phrase Book + Otevřít slovník + + + + Qt phrase books (*.qph);;All files (*) + Slovníky Qt (*.qph);;Všechny soubory (*) + + + + %n phrase(s) loaded. + + Nahrán jeden záznam ve slovníku. + Nahrány %n záznamy ve slovníku. + Nahrány %n záznamy ve slovníku. + + + + + + + Add to phrase book + Přidat do slovníku + + + + No appropriate phrasebook found. + Nelze nalézt žádný příslušný slovník. + + + + Adding entry to phrasebook %1 + Přidává se záznam do slovníku %1 + + + + Select phrase book to add to + Do kterého slovníku se má záznam přidat + + + + Unable to launch Qt Assistant (%1) + Qt Assistant nelze spustit (%1) + + + + Version %1 + Verze %1 + + + + <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist je nástrojem pro přidávání překladů do aplikací Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i). + + + + Do you want to save the modified files? + Chcete uložit změněné soubory? + + + + Do you want to save '%1'? + Chcete uložit '%1'? + + + + Qt Linguist[*] + Qt Linguist[*] + + + + %1[*] - Qt Linguist + %1[*] - Qt Linguist + + + + + No untranslated translation units left. + Nezbyly žádné nepřeložené překladové jednotky. + + + + &Window + &Okno + + + + Minimize + Zmenšit + + + + Ctrl+M + Ctrl+M + + + + Display the manual for %1. + Zobrazit příručku k %1. + + + + Display information about %1. + Zobrazit údaje o %1. + + + + &Save '%1' + &Uložit '%1' + + + + Save '%1' &As... + '%1' uložit &jako... + + + + Release '%1' + Vydat '%1' + + + + Release '%1' As... + '%1' vydat jako... + + + + &Close '%1' + &Zavřít '%1' + + + + + &Close + &Zavřít + + + + Save All + Uložit vše + + + + + &Release All + &Vydat vše + + + + Close All + Zavřít vše + + + + Translation File &Settings for '%1'... + Nastavení &souboru s překladem pro '%1' ... + + + + &Batch Translation of '%1'... + &Automatický překlad '%1' ... + + + + Search And &Translate in '%1'... + Hledat a &překládat v '%1' ... + + + + Search And &Translate... + Hledat a &překládat... + + + + + File + Soubor + + + + + Edit + Úpravy + + + + + Translation + Překlad + + + + + Validation + Schválení + + + + + Help + Nápověda + + + + Cannot read from phrase book '%1'. + Nelze číst ze slovníku '%1'. + + + + Close this phrase book. + Tento slovník zavřít. + + + + Enables you to add, modify, or delete entries in this phrase book. + Umožní vložit, měnit nebo odstranit záznamy z tohoto slovníku. + + + + Print the entries in this phrase book. + Vytisknout záznamy z tohoto slovníku. + + + + Cannot create phrase book '%1'. + Nelze vytvořit slovník '%1'. + + + + Do you want to save phrase book '%1'? + Chcete uložit slovník '%1'? + + + + All + Vše + + + + Open/Refresh Form &Preview + Otevřít/Obnovit &náhled na formulář + + + + Form Preview Tool + Nástroj pro náhled na formulář + + + + F5 + F5 + + + + + Translation File &Settings... + &Nastavení souboru s překladem... + + + + &Add to Phrase Book + &Přidat do slovníku + + + + Ctrl+T + Ctrl+T + + + + Ctrl+J + Ctrl+J + + + + Ctrl+Shift+J + Ctrl+Shift+J + + + + Previous unfinished item + Předchozí nevyřízený záznam + + + + Next unfinished item + Další nevyřízený záznam + + + + Move to previous item + Jít na předchozí záznam + + + + Next item + Další záznam + + + + Mark item as done and move to the next unfinished item + Označit záznam jako vyřízený a jít na další nevyřízený záznam + + + + Copies the source text into the translation field + Kopíruje zdrojový text do pole s překladem + + + + Toggle the validity check of accelerators + Zapnout/Vypnout ověření akcelerátorů + + + + Toggle the validity check of ending punctuation + Zapnout/Vypnout ověření znaku na konci věty na konci textu + + + + Toggle checking that phrase suggestions are used + Zapnout/Vypnout ověření použití záznamů ze slovníku + + + + Toggle the validity check of place markers + Zapnout/Vypnout ověření držitelů místa + + + + Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file. + Vytvořit z nynějšího překladového souboru soubor s hlášeními Qt vhodný pro vydané aplikace. Název souboru bude automaticky odvozen z názvu souboru TS. + + + + Length Variants + Varianty délky + + + + MessageEditor + + + + This is the right panel of the main window. + + + + + Russian + Ruský + + + + German + Německý + + + + Japanese + Japonský + + + + French + Francouzský + + + + Polish + Polský + + + + Chinese + Čínský + + + + This whole panel allows you to view and edit the translation of some source text. + Celý tento panel umožňuje zobrazení a úpravy překladu zdrojového textu. + + + + Source text + Zdrojový text + + + + This area shows the source text. + Tato oblast ukazuje zdrojový text. + + + + Source text (Plural) + Zdrojový text (Plural) + + + + This area shows the plural form of the source text. + Tato oblast ukazuje množné číslo zdrojového textu. + + + + Developer comments + Vývojářovy poznámky + + + + This area shows a comment that may guide you, and the context in which the text occurs. + Tato oblast ukazuje případn poznámky, jež vás mohou vést, a souvislosti, v nichž se text vyskytuje. + + + + Here you can enter comments for your own use. They have no effect on the translated applications. + Sem můžete vepsat poznámky určené pro vaše vlastní použití. Na překlad nemají žádný vliv. + + + + %1 translation (%2) + Překlad %1 (%2) + + + + This is where you can enter or modify the translation of the above source text. + Tady můžete zadávat nebo měnit překlad zdrojového textu. + + + + %1 translation + Překlad %1 + + + + %1 translator comments + %1 překladatelovy poznámky + + + + '%1' +Line: %2 + '%1' +Řádek: %2 + + + + MessageModel + + + Completion status for %1 + Stav zpracování %1 + + + + <file header> + <hlavička souboru> + + + + <context comment> + <související poznámka> + + + + <unnamed context> + <nepojmenovaná souvislost> + + + + MsgEdit + + + + This is the right panel of the main window. + + + + + PhraseBookBox + + + + Go to Phrase > Edit Phrase Book... The dialog that pops up is a PhraseBookBox. + + + + + (New Entry) + (Nový záznam) + + + + %1[*] - Qt Linguist + %1[*] - Qt Linguist + + + + Qt Linguist + Qt Linguist + + + + Cannot save phrase book '%1'. + Nelze uložit slovník '%1'. + + + + Edit Phrase Book + Upravit slovník + + + + This window allows you to add, modify, or delete entries in a phrase book. + Toto okno vám umožní vložit, měnit nebo odstranit záznamy z tohoto slovníku. + + + + &Translation: + &Překlad: + + + + This is the phrase in the target language corresponding to the source phrase. + Toto je text, který v cílovém jazyce odpovídá zdrojovému textu. + + + + S&ource phrase: + &Zdrojový text: + + + + This is a definition for the source phrase. + Toto je vymezení zdrojového textu. + + + + This is the phrase in the source language. + Toto je text ve zdrojovém jazyce. + + + + &Definition: + &Vymezení: + + + + Click here to add the phrase to the phrase book. + Sem klepněte kvůli vložení nového záznamu do slovníku. + + + + &New Entry + &Nový záznam + + + + Click here to remove the entry from the phrase book. + Sem klepněte kvůli odstranění nového záznamu ze slovníku. + + + + &Remove Entry + &Odstranit záznam + + + + Settin&gs... + &Nastavení... + + + + Click here to save the changes made. + Sem klepněte kvůli uložení provedených změn. + + + + &Save + &Uložit + + + + Click here to close this window. + Sem klepněte kvůli zavření tohoto okna. + + + + Close + Zavřít + + + + PhraseModel + + + Source phrase + Zdrojový text + + + + Translation + Překlad + + + + Definition + Vymezení + + + + PhraseView + + + Insert + Vložit + + + + Edit + Upravit + + + + Guess (%1) + Návrh (%1) + + + + Guess + Návrh + + + + QObject + + + Compiled Qt translations + Sestavené překlady Qt + + + + Translation files (%1);; + Překladové soubory (%1);; + + + + All files (*) + Všechny soubory (*) + + + + + + + + + + Qt Linguist + Qt Linguist + + + + GNU Gettext localization files + Překladové soubory GNU Gettext + + + + Qt translation sources (format 1.1) + Překladové soubory Qt (verze formátu 1.1) + + + + Qt translation sources (format 2.0) + Překladové soubory Qt (verze formátu 2.0) + + + + Qt translation sources (latest format) + Překladové soubory Qt (nejnovější formát) + + + + XLIFF localization files + Překladové soubory XLIFF + + + + Qt Linguist 'Phrase Book' + Slovník Qt Linguist + + + + SourceCodeView + + + <i>Source code not available</i> + <i>Zdrojový text není dostupný</i> + + + + <i>File %1 not available</i> + <i>Soubor %1 není dostupný</i> + + + + <i>File %1 not readable</i> + <i>Soubor %1 není čitelný</i> + + + + Statistics + + + Statistics + Statistiky + + + + Translation + Překlad + + + + Source + Zdroj + + + + 0 + 0 + + + + Words: + Slov: + + + + Characters: + Znaků: + + + + Characters (with spaces): + Znaků (s mezerami): + + + + Close + Zavřít + + + + TranslateDialog + + + This window allows you to search for some text in the translation source file. + Toto okno vám umožňuje hledání textu ve zdrojovém souboru s překladem. + + + + Type in the text to search for. + Zadejte text, který se má hledat. + + + + Find &source text: + Hledat &zdrojový text: + + + + &Translate to: + &Překlad: + + + + Search options + Nastavení hledání + + + + Texts such as 'TeX' and 'tex' are considered as different when checked. + Když je zapnuto, texty jako 'TeX' a 'tex' se považují za rozdílné. + + + + Match &case + Dbát na &psaní velkých a malých písmen + + + + Mark new translation as &finished + Nový překlad označit jako &vyřízený + + + + Click here to find the next occurrence of the text you typed in. + Klepněte sem pro skok k dalšímu výskytu hledáného textu. + + + + Find Next + Hledat dál + + + + Translate + Přeložit + + + + Translate All + Přeložit vše + + + + Click here to close this window. + Klepněte sem pro zavření tohoto okna. + + + + Cancel + Zrušit + + + + TranslationSettingsDialog + + + Any Country + Země + + + + + Settings for '%1' - Qt Linguist + Nastavení pro '%1' - Qt Linguist + + + + Source language + Zdrojový jazyk + + + + Language + Jazyk + + + + Country/Region + Země/Oblast + + + + Target language + Cílový jazyk + + + diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts new file mode 100644 index 0000000..e184f64 --- /dev/null +++ b/translations/qt_cs.ts @@ -0,0 +1,10362 @@ + + + + + AudioEqualizer + + Frequency band, %1 Hz + Kmitočtové pásmo, %1 Hz + + + + AudioOutput + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>Zařízení pro přehrávání zvuku <b>%1</b> nepracuje.<br/>Místo něj <b>%2</b> se používá.</html> + + + Revert back to device '%1' + Přepnout zpět na zařízení '%1' + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>Zařízení pro přehrávání zvuku <b>%1</b> bylo spuštěno,<br/>protože je právě dostupné a má větší přednost.</html> + + + + CloseButton + + + Close Tab + Zavřít kartu + + + + FakeReply + + + Fake error ! + Napodobená chyba! + + + + Invalid URL + Neplátné URL + + + + Phonon:: + + + Games + Hry + + + + Music + Hudba + + + + Video + Video + + + + Communication + Spojení + + + + Accessibility + Dostupnost + + + + Notifications + Oznámení + + + + Phonon::AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>Zařízení pro přehrávání zvuku <b>%1</b> nepracuje.<br/>Místo něj <b>%2</b> se používá.</html> + + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>Zařízení pro přehrávání zvuku <b>%1</b> bylo spuštěno,<br/>protože je právě dostupné a má větší přednost.</html> + + + + Revert back to device '%1' + Přepnout zpět na zařízení '%1' + + + + Phonon::Gstreamer::Backend + + + Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled + Upozornění: Zdá se, že zákládní přídavné moduly pro GStreamer nejsou nainstalovány. +Podpora audia a videa byla vypnuta + + + + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled. + Varování: Balíček gstreamer0.10-plugins-good není nainstalován. +Některé vlastnosti videa nejsou dostupné. + + + + Phonon::Gstreamer::MediaObject + + + + + + + + + + Could not open media source. + Zdroj s médii se nepodařilo otevřít. + + + + Could not decode media source. + Zdroj s médii se nepodařilo rozluštit. + + + + Invalid source type. + Neplatný typ zdroje s médii. + + + + Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed. + Přehrávání nelze spustit. + +Ověřte, prosím, instalaci Gstreamer a ujistěte se, +že je nainstalován balíček libgstreamer-plugins-base. + + + + Could not open audio device. The device is already in use. + Zvukové zařízení se nepodařilo otevřít, protože se již používá. + + + + A required codec is missing. You need to install the following codec(s) to play this content: %0 + Všechny vyžadované kodeky nejsou nainstalovány. Kvůli přehrání tohoto obsahu je potřeba nainstalovat následující kodek(y): %0 + + + + Could not locate media source. + Zdroj s médii se nepodařilo nalézt. + + + + Phonon::MMF + + + Audio Output + Výstup zvuku + + + + The audio output device + Zařízení pro výstup zvuku + + + + Phonon::MMF::AudioEqualizer + + + Frequency band, %1 Hz + Kmitočtové pásmo, %1 Hz + + + + Phonon::MMF::EffectFactory + + + audio equalizer + zvukový ekvalizér + + + + Bass boost + Zdůraznění basů + + + + Distance Attenuation + Zeslabení v závislosti na vzdálenosti + + + + + Environmental Reverb + Vnější ozvěna + + + + Loudness + Hlasitost + + + + Source Orientation + Zaměření zdroje + + + + Stereo Widening + Rozšíření sterea + + + + Phonon::VolumeSlider + + + + + + Volume: %1% + Hlasitost: %1% + + + + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% + Posuvník se používá k nastavení hlasitosti. Poloha nejvíce vlevo odpovídá 0%; poloha nejvíce vpravo odpovídá %1% + + + + Muted + Ztlumení + + + + Q3Accel + + + %1, %2 not defined + %1, %2 nejsou stanoveny + + + + Ambiguous %1 not handled + Nejednoznačné %1 nemohou být zpracovány + + + + Q3DataTable + + + True + Pravdivý + + + + False + Nesprávný + + + + Delete + Smazat + + + + Insert + Vložit + + + + Update + Obnovit + + + + Q3FileDialog + + + + &OK + &OK + + + + &No + &Ne + + + + Dir + Adresář + + + + &Yes + &Ano + + + + Back + Zpět + + + + Date + Datum + + + + File + Soubor + + + + Name + Název + + + + + + Open + Otevřít + + + + Size + Velikost + + + + Sort + Roztřídit + + + + Type + Typ + + + + + + &Open + &Otevřít + + + + + &Save + &Uložit + + + + + Error + Chyba + + + + Open + Otevřít + + + + + Write: %1 + Zapsat: %1 + + + + Sort by &Size + Roztřídit podle &velikosti + + + + Sort by &Date + Roztřídit podle &data + + + + Sort by &Name + Roztřídit podle &názvu + + + + New Folder 1 + Nová složka 1 + + + + the directory + Adresář + + + + File &type: + Typ &souboru: + + + + + + File &name: + Název &souboru: + + + + Delete %1 + Smazat %1 + + + + + Cancel + Zrušit + + + + R&eload + Nahrát &znovu + + + + New Folder + Nová složka + + + + &Unsorted + &Neroztříděné + + + + Look &in: + Hle&dat v: + + + + Preview File Contents + Náhled obsahu souboru + + + + New Folder %1 + Nová složka %1 + + + + Read-write + Číst/Zapisovat + + + + Read-only + Pouze číst + + + + Copy or Move a File + Soubor kopírovat nebo posunout + + + + <qt>Are you sure you wish to delete %1 "%2"?</qt> + <qt>Jste si jistý, že chcete smazat %1 "%2"?</qt> + + + + Find Directory + Najít adresář + + + + Attributes + Vlastnosti + + + + Show &hidden files + &Ukázat skryté soubory + + + + + Save As + Uložit jako + + + + Inaccessible + Nepřístupné + + + + %1 +File not found. +Check path and filename. + %1 +Soubor se nepodařilo nalézt. +Ověřte cestu a název souboru. + + + + List View + Pohled se seznamem + + + + Special + Zvláštní vlastnost + + + + Write-only + Pouze zápis + + + + the symlink + Symbolický odkaz + + + + &Delete + &Smazat + + + + + + + All Files (*) + Všechny soubory (*) + + + + + Directories + Adresáře + + + + Symlink to Special + Symbolický odkaz k zvláštnímu souboru + + + + Select a Directory + Vyberte adresář + + + + All Files (*.*) + Všechny soubory (*.*) + + + + Read: %1 + Číst: %1 + + + + &Rename + &Přejmenovat + + + + Directory: + Adresář: + + + + One directory up + O jeden adresář nahoru + + + + Preview File Info + Náhled informace o souboru + + + + the file + Soubor + + + + Create New Folder + Vytvořit novou složku + + + + Symlink to File + Symbolický odkaz k souboru + + + + Symlink to Directory + Symbolický odkaz k adresáři + + + + Detail View + Podrobný pohled + + + + Q3LocalFs + + + Could not open +%1 + Nepodařilo se otevřít: +%1 + + + + Could not remove file or directory +%1 + Nepodařilo se odstranit soubor nebo adresář +%1 + + + + Could not create directory +%1 + Nepodařilo se vytvořit adresář +%1 + + + + + Could not read directory +%1 + Nepodařilo se přečíst adresář +%1 + + + + Could not rename +%1 +to +%2 + Nepodařilo se přejmenovat: +%1 +na +%2 + + + + Could not write +%1 + Nepodařilo se zapsat: +%1 + + + + Q3MainWindow + + + Line up + Uspořádat + + + + Customize... + Přizpůsobit... + + + + Q3NetworkProtocol + + + Operation stopped by the user + Operace byla zastavena uživatelem + + + + Q3ProgressDialog + + + + Cancel + Zrušit + + + + Q3TabDialog + + + + OK + OK + + + + Help + Nápověda + + + + Apply + Použít + + + + Cancel + Zrušit + + + + Defaults + Výchozí + + + + Q3TextEdit + + + Cu&t + Vyj&mout + + + + &Copy + &Kopírovat + + + + &Redo + &Znovu + + + + &Undo + &Zpět + + + + Clear + Smazat + + + + &Paste + &Vložit + + + + + Select All + Vybrat vše + + + + Q3TitleBar + + + Close + Zavřít + + + + Minimize + Zmenšit + + + Puts a minimized back to normal + Dá velikost zmenšeného okna zpátky do obvyklého stavu + + + + Displays the name of the window and contains controls to manipulate it + Zobrazí název okna a obsahuje příkazy pro zacházení s ním + + + + Makes the window full screen + Dá okno na celou obrazovku + + + + System + Systém + + + + Maximize + Zvětšit + + + + Contains commands to manipulate the window + Obsahuje příkazy pro zacházení s velikostí okna + + + + Restore up + Obnovit + + + + Puts a minimized window back to normal + Dá velikost zmenšeného okna zpátky do obvyklého stavu + + + + Closes the window + Zavře okno + + + + Puts a maximized window back to normal + Dá velikost zvětšeného okna zpátky do obvyklého stavu + + + + Moves the window out of the way + Zmenší okno + + + + Restore down + Obnovit + + + + Q3ToolBar + + + More... + Více... + + + + Q3UrlOperator + + + The protocol `%1' does not support getting files + Protokol `%1' nepodporuje nahrávání souborů + + + + The protocol `%1' does not support renaming files or directories + Protokol `%1' nepodporuje přejmenovávání souborů nebo adresářů + + + + The protocol `%1' does not support listing directories + Protokol `%1' nepodporuje sestavování seznamu adresářů + + + + + (unknown) + (neznámý) + + + + The protocol `%1' does not support removing files or directories + Protokol `%1' nepodporuje odstraňování souborů nebo adresářů + + + + The protocol `%1' does not support putting files + Protokol `%1' nepodporuje ukládání souborů + + + + + + The protocol `%1' is not supported + Protokol `%1' není podporován + + + + + The protocol `%1' does not support copying or moving files or directories + Protokol `%1' nepodporuje kopírování či přesun souborů nebo adresářů + + + + The protocol `%1' does not support creating new directories + Protokol `%1' nepodporuje vytváření nových adresářů + + + + Q3Wizard + + + &Help + &Nápověda + + + + &Cancel + &Zrušit + + + + &Finish + Do&končit + + + + &Next > + &Další > + + + + < &Back + < &Zpět + + + + QAbstractSocket + + + + + + Host not found + Nepodařilo se najít počítač + + + + + + Connection refused + Spojení bylo odmítnuto + + + + Connection timed out + Časový limit pro spojení byl překročen + + + + Socket is not connected + Zásuvka (socket) není spojena + + + + Socket operation timed out + Časový limit pro zásuvkovou (socket) operaci byl překročen + + + + Network unreachable + Síť není dosažitelná + + + + + + Operation on socket is not supported + Tato zásuvková (socket) operace není podporována + + + + QAbstractSpinBox + + + Step &down + Krok &dolů + + + + &Step up + &Krok nahoru + + + + &Select All + &Vybrat vše + + + + QAccessibleButton + + + Press + Stisknout + + + + QApplication + + + Activates the program's main window + Spustí hlavní okno programu + + + QT_LAYOUT_DIRECTION + LTR + + + + Activate + Spustit + + + + Executable '%1' requires Qt %2, found Qt %3. + Použití '%1' vyžaduje Qt %2; bylo ale nalezeno Qt %3. + + + + Incompatible Qt Library Error + Qt není slučitelná + + + + QT_LAYOUT_DIRECTION + Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. + LTR + + + + QAxSelect + + + OK + OK + + + + COM &Object: + COM-&Objekt: + + + + &Cancel + &Zrušit + + + + Select ActiveX Control + Vybrat prvek ActiveX + + + + QCheckBox + + + Check + Označit křížkem + + + + Toggle + Přepnout + + + + Uncheck + Zrušit označení křížkem + + + + QColorDialog + + + &Red: + &Červená: + + + + &Sat: + &Sytost: + + + + &Val: + &Jasnost: + + + + Hu&e: + Barevný &odstín: + + + + Select Color + Vybrat barvu + + + + &Add to Custom Colors + &Přidat k uživatelem stanoveným barvám + + + + Bl&ue: + &Modrá: + + + + &Green: + &Zelená: + + + + &Basic colors + Základní &barvy + + + + &Custom colors + &Uživatelem stanovené barvy + + + + A&lpha channel: + A&lfa kanál: + + + + QComboBox + + + + Open + Otevřít + + + + True + Pravdivý + + + + Close + Zavřít + + + + False + Nesprávný + + + + QCoreApplication + + + %1: key is empty + QSystemSemaphore + %1: Neplatný údaj u klíče (prázdný) + + + + %1: unable to make key + QSystemSemaphore + %1: Nepodařilo se vytvořit klíč + + + + %1: ftok failed + QSystemSemaphore + %1: Vyvolání ftok se nezdařilo + + + %1: key is empty + %1: Neplatný údaj u klíče (prázdný) + + + %1: unable to make key + %1: Nepodařilo se vytvořit klíč + + + %1: ftok failed + %1: Vyvolání ftok se nezdařilo + + + + %1: already exists + QSystemSemaphore + %1: Již existuje + + + + %1: does not exist + QSystemSemaphore + %1: Neexistuje + + + + %1: out of resources + QSystemSemaphore + %1: Nejsou již použitelné zdroje + + + + %1: unknown error %2 + QSystemSemaphore + %1: Neznámá chyba %2 + + + + QDB2Driver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Unable to set autocommit + 'autocommit' se nepodařilo nastavit + + + + Unable to connect + Nepodařilo se navázat spojení + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + QDB2Result + + + Unable to bind variable + Proměnnou se nepodařilo provést + + + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + Unable to fetch next + Další datový záznam se nepodařilo natáhnout + + + + Unable to prepare statement + Příkaz se nepodařilo připravit + + + + Unable to fetch record %1 + Datový záznam %1 se nepodařilo natáhnout + + + + Unable to fetch first + První datový záznam se nepodařilo natáhnout + + + + QDateTimeEdit + + + AM + AM + + + + PM + PM + + + + am + am + + + + pm + pm + + + + QDial + + + QDial + QDial + + + + SliderHandle + Posuvník + + + + SpeedoMeter + Rychloměr + + + + QDialog + + + Done + Hotovo + + + + What's This? + Co je toto? + + + + QDialogButtonBox + + + + + OK + OK + + + + &OK + &OK + + + + &No + &Ne + + + + &Yes + &Ano + + + + Help + Nápověda + + + + Open + Otevřít + + + + Save + Uložit + + + + &Save + &Uložit + + + + Abort + Zrušit + + + + Apply + Použít + + + + Close + Zavřít + + + + Reset + Vrátit + + + + Retry + Opakovat + + + + Restore Defaults + Obnovit výchozí + + + + &Close + &Zavřít + + + + Cancel + Zrušit + + + + Ignore + Přehlížet + + + + Close without Saving + Zavřít bez uložení + + + + N&o to All + N&e, žádné + + + + Save All + Uložit vše + + + + &Cancel + &Zrušit + + + + Discard + Odmítnout + + + + Yes to &All + Ano, &vše + + + + Don't Save + Neukládat + + + + QDirModel + + Kind + Druh + + + + Name + Název + + + + Size + Velikost + + + + Kind + Match OS X Finder + Druh + + + + Type + All other platforms + Typ + + + Type + Typ + + + + Date Modified + Datum změny + + + + QDockWidget + + + Dock + Vplout do panelu + + + + Close + Zavřít + + + + Float + Plout + + + + QDoubleSpinBox + + + Less + Méně + + + + More + Více + + + + QErrorMessage + + + &OK + &OK + + + + Fatal Error: + Osudová chyba: + + + + &Show this message again + Toto hlášení &ukázat ještě jednou + + + + Debug Message: + Hlášení o odladění: + + + + Warning: + Varování: + + + + QFile + + + Cannot create %1 for output + %1 se nepodařilo zřídit pro výstup + + + + Failure to write block + Datový blok se nepodařilo zapsat + + + + Will not rename sequential file using block copy + Nepřejmenuje posloupný soubor pomocí kopie bloku + + + + Cannot remove source file + Nelze odstranit zdrojový soubor + + + + Cannot open %1 for input + %1 se nepodařilo otevřít pro čtení + + + + + Destination file exists + Cílový soubor již existuje + + + + Cannot open for output + Nepodařilo se otevřít pro zápis + + + + QFileDialog + + + + Back + Zpět + + + + + File + Soubor + + + + File Folder + Match Windows Explorer + Souborová složka + + + + Folder + All other platforms + Složka + + + + Alias + Mac OS X Finder + Přezdívka + + + + Shortcut + All other platforms + Zkratka + + + + Open + Otevřít + + + + + + &Open + &Otevřít + + + + + &Save + &Uložit + + + + Drive + Disková jednotka + + + + Show + Ukázat + + + + '%1' is write protected. +Do you want to delete it anyway? + '%1' je chráněn proti zápisu. +Přesto chcete soubor smazat? + + + + + File &name: + Název &souboru: + + + + New Folder + Nová složka + + + + + Parent Directory + Nadřazený adresář + + + + &New Folder + &Nová složka + + + + Remove + Odstranit + + + + My Computer + Můj počítač + + + + + Look in: + Hledat v: + + + + + Files of type: + Soubory typu: + + + + Find Directory + Najít adresář + + + + Show &hidden files + &Ukázat skryté soubory + + + + Are sure you want to delete '%1'? + Jste si jistý, že %1 chcete smazat? + + + + Save As + Uložit jako + + + + + %1 +Directory not found. +Please verify the correct directory name was given. + %1 +Adresář se nepodařilo nalézt. +Ověřte, prosím, že byl zadán správný název adresáře. + + + + + List View + Pohled se seznamem + + + + + &Choose + &Vybrat + + + + &Delete + &Smazat + + + + + All Files (*) + Všechny soubory (*) + + + + Directories + Adresáře + + + + All Files (*.*) + Všechny soubory (*.*) + + + + &Rename + &Přejmenovat + + + + Could not delete directory. + Adresář se nepodařilo smazat. + + + + + Directory: + Adresář: + + + + Unknown + Neznámý + + + + %1 already exists. +Do you want to replace it? + Soubor %1 již existuje. +Chcete jej nahradit? + + + + + Forward + Dopředu + + + + Recent Places + Naposledy navštívené + + + + + Create New Folder + Vytvořit novou složku + + + + + Detail View + Podrobný pohled + + + + %1 +File not found. +Please verify the correct file name was given. + %1 +Soubor se nepodařilo nalézt. +Ověřte, prosím, že byl zadán správný název souboru. + + + + QFileSystemModel + + Kind + Druh + + + + Name + Název + + + + Size + Velikost + + + Type + Typ + + + + + %1 GB + %1 GB + + + + + %1 KB + %1 KB + + + + + %1 MB + %1 MB + + + + + %1 TB + %1 TB + + + + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. + <b>Název "%1" nelze použít.</b><p>Zkuste použít jiný název, s menším počtem znaků nebo bez zvláštních znaků. + + + + + %1 bytes + %1 bytů + + + + My Computer + Můj počítač + + + + Computer + Počítač + + + + Invalid filename + Neplatný název souboru + + + + Kind + Match OS X Finder + Druh + + + + Type + All other platforms + Typ + + + + Date Modified + Datum změny + + + + QFontDatabase + + + Any + Všechna + + + + Lao + Laoské + + + + + + Bold + Tučné + + + + Demi + Polotučné + + + + Thai + Thajské + + + + + + Black + Černé + + + + Greek + Řecké + + + + Khmer + Khmerské + + + + Latin + Latinské + + + + + Light + Lehké + + + + Ogham + Ogamské + + + + Oriya + Oriya + + + + Runic + Runové + + + + Tamil + Tamilské + + + + Cyrillic + Cyrilské + + + + Kannada + Kannada + + + + Malayalam + Malayalam + + + + Simplified Chinese + Zjednodušená čínština + + + + + Demi Bold + Polotučné + + + + Arabic + Arabské + + + + Hebrew + Hebrejské + + + + Myanmar + Myanmar + + + + + Italic + Itala + + + + Korean + Korejské + + + + + Normal + Obvyklé + + + + + Oblique + Nakloněné + + + + Telugu + Telugu + + + + Thaana + Thaana + + + + Symbol + Symbol + + + + Syriac + Syrské + + + + Devanagari + Devanagari + + + + Japanese + Japonské + + + + Bengali + Bengálské + + + + Armenian + Arménské + + + + Sinhala + Sinhálské + + + + Tibetan + Tibetské + + + + Vietnamese + Větnamské + + + + Gujarati + Gujarati + + + + Traditional Chinese + Tradiční čínština + + + + Georgian + Gruzínské + + + + Gurmukhi + Gurmukhi + + + + QFontDialog + + + &Font + &Písmo + + + + &Size + &Velikost + + + + Sample + Vzorek + + + + Font st&yle + Druh pís&ma + + + + Wr&iting System + Způsob &psaní + + + + + Select Font + Vybrat písmo + + + + &Underline + &Podtrhnout + + + + Effects + Efekty + + + + Stri&keout + Pře&škrtnout + + + + QFtp + + + + Listing directory failed: +%1 + Obsah adresářů nelze ukázat: +%1 + + + + + Creating directory failed: +%1 + Vytvoření adresářů se nezdařilo: +%1 + + + + + Not connected + Žádné spojení + + + + + Connection refused for data connection + Odmítnuto spojení spojení pro data + + + + + Login failed: +%1 + Přihlášení se nezdařilo: +%1 + + + + + Downloading file failed: +%1 + Stažení souboru se nezdařilo: +%1 + + + + Connected to host + Spojení s počítačem navázáno + + + + Connection timed out to host %1 + Časový limit pro spojení s počítačem '%1' byl překročen + + + + + + Connected to host %1 + Spojeno s počítačem %1 + + + + + Connecting to host failed: +%1 + Spojení s počítačem se nezdařilo: +%1 + + + + + Host %1 not found + Počítač %1 se nepodařilo nalézt + + + + + Uploading file failed: +%1 + Nahrání souboru se nezdařilo: +%1 + + + + + Changing directory failed: +%1 + Změna adresáře se nezdařila: +%1 + + + + Host found + Počítač byl nalezen + + + + + Removing directory failed: +%1 + Odstranění adresáře se nezdařilo: +%1 + + + + + Connection refused to host %1 + Spojení s počítačem %1 odmítnuto + + + + Connection to %1 closed + Spojení s %1 ukončeno + + + + + Removing file failed: +%1 + Odstranění souboru se nezdařilo: +%1 + + + + Host %1 found + Počítač %1 byl nalezen + + + + + + + Unknown error + Neznámá chyba + + + + + + Connection closed + Spojení ukončeno + + + + QHostInfo + + + Unknown error + Neznámá chyba + + + + QHostInfoAgent + + + + + + Host not found + Nepodařilo se najít počítač + + + + + + + Unknown address type + Neznámý typ adresy + + + + + + Unknown error + Neznámá chyba + + + + No host name given + Nebyl zadán název pro hostitelský počítač + + + + Invalid hostname + Neplatný název pro hostitelský počítač + + + + QHttp + + + Connection refused (or timed out) + Spojení bylo odmítnuto (nebo byl překročen časový limit) + + + + Data corrupted + Data jsou poškozena + + + + Connected to host + Spojení s počítačem navázáno + + + + Connected to host %1 + Spojeno s počítačem %1 + + + + + + Host %1 not found + Počítač %1 se nepodařilo nalézt + + + + Host requires authentication + Hostitelský počítač požaduje autentizaci + + + + Error writing response to device + Při psaní odpovědi výstupnímu zařízení se vyskytla chyba + + + + HTTPS connection requested but SSL support not compiled in + Požadované HTTPS spojení nelze vytvořit, protože neexistuje žádná SSL podpora + + + + Host found + Počítač byl nalezen + + + + + Connection refused + Spojení bylo odmítnuto + + + + Proxy authentication required + Požadována proxy autentizace + + + + Unknown protocol specified + Byl zadán neznámý protokol + + + + + + + HTTP request failed + HTTP dotaz se nezdařil + + + + Proxy requires authentication + Proxy server požaduje autentizaci + + + + Authentication required + Požadována autentizace + + + + SSL handshake failed + Během startu SSL protokolu se vyskytla chyba + + + + Connection to %1 closed + Spojení s %1 ukončeno + + + + + + + Invalid HTTP chunked body + Obsah (chunked body - rozkouskované tělo) HTTP je neplatný + + + + Host %1 found + Počítač %1 byl nalezen + + + + + Wrong content length + Neplatný údaj o délce obsahu + + + + + + + Unknown error + Neznámá chyba + + + + + Invalid HTTP response header + Hlavička HTTP odpovědi není platná + + + + Unknown authentication method + Neznámý způsob autentizace + + + + + Connection closed + Spojení ukončeno + + + + + No server set to connect to + Pro spojení nebyl nastaven žádný počítač - server + + + + + Server closed connection unexpectedly + Server neočekávaně uzavřel spojení + + + + + Request aborted + Požadavek byl zrušen + + + + QHttpSocketEngine + + + Proxy connection refused + Proxy server odmítl navázání spojení + + + + Proxy denied connection + Proxy server odmítl spojení + + + + Proxy server not found + Nepodařilo se najít žádný proxy server + + + + Proxy server connection timed out + Při spojení s proxy serverem byl překročen časový limit + + + + Did not receive HTTP response from proxy + Žádná HTTP odpověď od proxy serveru + + + + Proxy connection closed prematurely + Proxy server předčasně ukončil spojení + + + + Error communicating with HTTP proxy + Chyba při spojení s proxy serverem + + + + Authentication required + Požadována autentizace + + + + Error parsing authentication request from proxy + Chyba při vyhodnocení autentizačního požadavku proxy serveru + + + + QIBaseDriver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Could not start transaction + Nepodařilo se spustit žádnou transakci + + + + Error opening database + Nepodařilo se otevřít spojení s databází + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + QIBaseResult + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Unable to open BLOB + Nepodařilo se otevřít BLOB + + + + Could not describe statement + Nepodařilo se získat žádný popis příkazu + + + + + Could not describe input statement + Nepodařilo se získat žádný popis vstupního příkazu + + + + Could not allocate statement + Přidělení příkazu se nezdařilo + + + + Unable to write BLOB + Nepodařilo se zapsat BLOB + + + + Could not start transaction + Nepodařilo se spustit žádnou transakci + + + + Unable to close statement + Příkaz se nepodařilo zavřít + + + + Could not get query info + Požadované informace k vyhledávání nejsou k dispozici + + + + + Could not find array + Nepodařilo se najít pole + + + + Could not get array data + Nepodařilo se přečíst data pole + + + + Unable to execute query + Dotaz se nepodařilo provést + + + + Could not prepare statement + Příkaz se nepodařilo připravit + + + + Could not fetch next item + Další prvek se nepodařilo vyzvednout + + + + Could not get statement info + K dispozici není žádná informace k příkazu + + + + Unable to create BLOB + Nepodařilo se vytvořit žádný BLOB + + + + Unable to read BLOB + BLOB se nepodařilo přečíst + + + + QIODevice + + + No such file or directory + Nepodařilo se najít žádný takový soubor nebo adresář + + + + Permission denied + Přístup odepřen + + + + No space left on device + Na zařízení není žádný volný úložný prostor + + + + Unknown error + Neznámá chyba + + + + Too many open files + Příliš mnoho otevřených souborů + + + + QInputContext + + + XIM + XIM + + + + FEP + FEP + + + + Windows input method + Windows-vstupní metoda + + + + S60 FEP input method + S60 FEP-vstupní metoda + + + + XIM input method + XIM-vstupní metoda + + + + Mac OS X input method + Mac OS X-vstupní metoda + + + + QInputDialog + + + Enter a value: + Zadejte hodnotu: + + + + QLibrary + + + Could not unmap '%1': %2 + Operace unmap, zrušit zobrazení, se nezdařila u '%1': %2 + + + + + Cannot unload library %1: %2 + Knihovnu %1 nelze vyjmout: %2 + + + + + Cannot load library %1: %2 + Knihovnu %1 nelze nahrát: %2 + + + + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] + Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (%2.%3.%4) [%5] + + + + + Cannot resolve symbol "%1" in %2: %3 + Symbol "%1" nelze v %2 vyřešit: %3 + + + + Plugin verification data mismatch in '%1' + Ověřovací data přídavného nesouhlasí v '%1' + + + + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) + Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (Knihovny vytvořené v režimu ladění a vydání nemohou být používány společně.) + + + + The file '%1' is not a valid Qt plugin. + Soubor '%1' není platným přídavným modulem Qt. + + + + + The shared library was not found. + Nepodařilo se nalézt sdílenou knihovnu. + + + + Unknown error + Neznámá chyba + + + + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" + Přídavný modul '%1' používá neslučitelnou Qt knihovnu. Potřebný byl zvláštní klíč pro sestavení "%2", obdržen "%3" + + + + Could not mmap '%1': %2 + Operace mmap se nezdařila u '%1': %2 + + + + QLineEdit + + + Cu&t + &Vyjmout + + + + &Copy + &Kopírovat + + + + &Redo + &Znovu + + + + &Undo + &Zpět + + + + &Paste + &Vložit + + + + Delete + Smazat + + + + Select All + Vybrat vše + + + + QLocalServer + + + + %1: Name error + %1: Chybný název + + + + %1: Unknown error %2 + %1: Neznámá chyba %2 + + + + %1: Permission denied + %1: Přístup odepřen + + + + %1: Address in use + %1: Adresa se již používá + + + + QLocalSocket + + + + + %1: Connection error + %1: Chyba spojení + + + + + %1: Connection refused + %1: Spojení bylo odmítnuto + + + + + %1: Unknown error %2 + %1: Neznámá chyba %2 + + + + + %1: Socket access error + %1: Chyba při přístupu k zásuvce (socketu) + + + + + %1: Socket resource error + %1: Chyba zásuvky (socketu) - potíže se zdrojem + + + + + %1: The socket operation is not supported + %1: Tato operace se zásuvkou (socketem) není podporována + + + + + + + %1: Invalid name + %1: Neplatný název + + + + %1: Unknown error + %1: Neznámá chyba + + + + + %1: Socket operation timed out + %1: Překročení času při operaci se zásuvkou (socketem) + + + + + %1: Datagram too large + %1: Datagram je příliš veliký + + + + + %1: Remote closed + %1: Spojení bylo protější stranou uzavřeno + + + + QMYSQLDriver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Unable to open database ' + Nepodařilo se otevřít spojení s databází ' + + + + Unable to connect + Nepodařilo se navázat spojení + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + Unable to begin transaction + Transakci se nepodařilo spustit + + + + QMYSQLResult + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + Unable to store statement results + Výsledky příkazu se nepodařilo uložit + + + + Unable to execute next query + Další dotaz nelze provést + + + + + Unable to bind outvalues + Výstupní hodnoty se nepodařilo spojit + + + + Unable to store next result + Další výsledek nelze uložit + + + + Unable to fetch data + Nepodařilo se natáhnout žádná data + + + + + Unable to prepare statement + Příkaz se nepodařilo připravit + + + + Unable to store result + Výsledek se nepodařilo uložit + + + + Unable to bind value + Hodnotu se nepodařilo spojit + + + + Unable to execute query + Dotaz se nepodařilo provést + + + + Unable to reset statement + Příkaz se nepodařilo znovu nastavit + + + + QMdiArea + + + (Untitled) + (Bez názvu) + + + + QMdiSubWindow + + + Help + Nápověda + + + + Menu + Menu + + + + &Move + Po&sunout + + + + &Size + Změnit &velikost + + + + Close + Zavřít + + + + Minimize + Zmenšit + + + + Shade + Navinout + + + + Stay on &Top + Zůstat v &popředí + + + + &Close + &Zavřít + + + + - [%1] + - [%1] + + + + %1 - [%2] + %1 - [%2] + + + + &Restore + &Obnovit + + + + Restore + Obnovit + + + + Maximize + Zvětšit + + + + Unshade + Odvinout + + + + Mi&nimize + Zmen&šit + + + + Ma&ximize + Zvě&tšit + + + + Restore Down + Obnovit + + + + QMenu + + + + Open + Otevřít + + + + + Close + Zavřít + + + + + + Execute + Provést + + + + QMenuBar + + + Actions + Činnosti + + + + QMessageBox + + + + + + OK + OK + + + + Help + Nápověda + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <h3>O Qt</h3><p>Tento program používá Qt ve verzi %1.</p><p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p> + + + + Show Details... + Ukázat podrobnosti... + + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p> + <h3>O Qt</h3><p>Tento program používá Qt-verze %1.</p> + + + + <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p> + + + + About Qt + O Qt + + + <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> for an overview of Qt licensing.</p> + <p>Tento program používá Qt Open Source Edition verze %1.</p><p>Qt Open Source Edition je zamýšlena pro vývoj Open Source aplikací. Pro vývoj vlastnických aplikací (uzavřené zdrojové kódy) potřebujete Qt licenci.</p><p>Podívejte se, prosím, na <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> kvůli přehledu licencování Qt.</p> + + + + Hide Details... + Skrýt podrobnosti... + + + <p>This program uses Qt version %1.</p> + <p>Tento program používá Qt-verze %1.</p> + + + + QMultiInputContext + + + Select IM + Zvolit způsob vstupu + + + + QMultiInputContextPlugin + + + Multiple input method switcher that uses the context menu of the text widgets + Přepínač pro více způsobů vstupu, který používá související nabídku textového prvku + + + + Multiple input method switcher + Přepínač pro více způsobů vstupu + + + + QNativeSocketEngine + + + The proxy type is invalid for this operation + Tuto operaci nelze s tímto typem proxy provést + + + + Network operation timed out + Časový limit pro síťovou operaci byl překročen + + + + The remote host closed the connection + Vzdálený počítač uzavřel spojení + + + + Invalid socket descriptor + Neplatný deskriptor zásuvky (socketu) + + + + Host unreachable + Cílový počítač je nedosažitelný + + + + Protocol type not supported + Protokol tohoto typu není podporován + + + + Datagram was too large to send + Datagram byl pro odeslání příliš veliký + + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Vyzkoušelo se použít IPv6 zásuvku (socket) na systému bez podpory IPv6 + + + + Unable to receive a message + Zprávu se nepodařilo přijmout + + + + Permission denied + Přístup odepřen + + + + Connection refused + Spojení bylo odmítnuto + + + + Unable to write + Nepodařilo se zapsat + + + + Another socket is already listening on the same port + Na tomto portu již naslouchá jiná zásuvka (socket) + + + + Unable to send a message + Nepodařilo se odeslat hlášení + + + + The bound address is already in use + Uvedená adresa se už používá + + + + Connection timed out + Časový limit pro spojení byl překročen + + + + Network error + Síťová chyba + + + + Unsupported socket operation + Nepodporovaná zásuvková operace (povel pro socket) + + + + Operation on non-socket + Operaci lze použít pouze na jedné zásuvce (socketu) + + + + Unable to initialize broadcast socket + Zásuvku pro vysílání (socket) se nepodařilo spustit + + + + Unknown error + Neznámá chyba + + + + Unable to initialize non-blocking socket + Neblokující zásuvku (socket) se nepodařilo spustit + + + + The address is protected + Adresa je chráněna + + + + Network unreachable + Síť je nedosažitelná + + + + The address is not available + Adresa není dostupná + + + + Out of resources + Nejsou dostupné žádné zdroje + + + + QNetworkAccessCacheBackend + + + Error opening %1 + %1 se nepodařilo otevřít + + + + QNetworkAccessDebugPipeBackend + + + Write error writing to %1: %2 + Při zápisu do souboru %1: %2 nastala chyba + + + + QNetworkAccessFileBackend + + + Request for opening non-local file %1 + Požadavek na otevření souboru přes síť %1 + + + + Read error reading from %1: %2 + Při čtení ze souboru %1 nastala chyba: %2 + + + + Cannot open %1: Path is a directory + %1 nelze otevřít: Jedná se o adresář + + + + Error opening %1: %2 + %1 se nepodařilo otevřít: %2 + + + + Write error writing to %1: %2 + Při zápisu do souboru %1: %2 nastala chyba + + + + QNetworkAccessFtpBackend + + + No suitable proxy found + Nepodařilo se najít žádný vhodný proxy server + + + + Error while downloading %1: %2 + Při stahování %1 se vyskytla chyba: %2 + + + + Error while uploading %1: %2 + Při nahrávání %1 se vyskytla chyba: %2 + + + + Cannot open %1: is a directory + %1 nelze otevřít: Jedná se o adresář + + + + Logging in to %1 failed: authentication required + Přihlášení do %1 se nezdařilo: Je požadována autentizace + + + + QNetworkAccessHttpBackend + + + No suitable proxy found + Nepodařilo se najít žádný vhodný proxy server + + + + QNetworkReply + + + Error downloading %1 - server replied: %2 + Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2 + + + + Protocol "%1" is unknown + Protokol "%1" není znám + + + + QNetworkReplyImpl + + + + Operation canceled + Operace byla zrušena + + + + QOCIDriver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + Unable to initialize + Inicializace se nezdařila + + + + Unable to logon + Přihlášení se nezdařilo + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + Unable to begin transaction + Transakci se nepodařilo spustit + + + + Unable to initialize + QOCIDriver + Spuštění se nezdařilo + + + + QOCIResult + + + Unable to alloc statement + Přidělení příkazu se nepodařilo + + + + Unable to goto next + Nelze jít k dalšímu prvku + + + + Unable to get statement type + Nepodařilo se získat typ příkazu + + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + + + Unable to bind column for batch execute + Nepodařilo se spojit sloupec pro provedení příkazu dávkového zpracování + + + Unable to execute select statement + Výběrové vyhledávání se nepodařilo provést + + + + Unable to prepare statement + Příkaz se nepodařilo připravit + + + + Unable to execute batch statement + Příkaz pro dávkové zpracování se nepodařilo provést + + + + Unable to bind value + Hodnotu se nepodařilo spojit + + + + QODBCDriver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Unable to enable autocommit + 'autocommit' se nepodařilo povolit + + + Unable to connect - Driver doesn't support all needed functionality + Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje + + + + Unable to disable autocommit + 'autocommit', automatické odeslání, se nepodařilo zastavit + + + + Unable to connect + Nepodařilo se navázat spojení + + + + Unable to connect - Driver doesn't support all functionality required + Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + QODBCResult + + + Unable to bind variable + Proměnnou se nepodařilo provést + + + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + Unable to fetch next + Další datový záznam se nepodařilo natáhnout + + + + + + Unable to fetch last + Poslední datový záznam se nepodařilo natáhnout + + + + Unable to prepare statement + Příkaz se nepodařilo spustit + + + + Unable to fetch previous + Předchozí datový záznam se nepodařilo natáhnout + + + + Unable to fetch + Nepodařilo se natáhnout žádná data + + + + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + QODBCResult::reset: 'SQL_CURSOR_STATIC' se nepodařilo nastavit jako příkaz vlastnosti . Ověřte, prosím, nastavení svého ODBC ovladače + + + + Unable to fetch first + První datový záznam se nepodařilo natáhnout + + + + QObject + + + Invalid hostname + Neplatný název pro hostitelský počítač + + + Home + Home + + + Protocol error: packet of size 0 received + Chyba v zápisu: Byl přijat paket o nulové velikosti + + + + Invalid URI: %1 + Neplátná URI: %1 + + + + Socket error on %1: %2 + Chyba zásuvky (socketu) u %1: %2 + + + + + No host name given + Nebyl zadán název pro hostitelský počítač + + + Read error reading from %1: %2 + Při čtení ze souboru %1 nastala chyba: %2 + + + + Remote host closed the connection prematurely on %1 + Vzdálený počítač předčasně ukončil spojení s %1 + + + + Operation not supported on %1 + Tato operace není %1 podporována + + + Write error writing to %1: %2 + Při zápisu do souboru %1: %2 nastala chyba + + + + QPPDOptionsModel + + + Name + Název + + + + Value + Hodnota + + + + QPSQLDriver + + + Unable to subscribe + Registrace se nezdařila + + + + Could not begin transaction + Transakci se nepodařilo spustit + + + + Could not rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + Could not commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Unable to connect + Nepodařilo se navázat spojení + + + + Unable to unsubscribe + Registraci se nepodařilo zrušit + + + + QPSQLResult + + + Unable to prepare statement + Příkaz se nepodařilo připravit + + + + Unable to create query + Nepodařilo se vytvořit žádný dotaz + + + + QPageSetupWidget + + + Form + Formulář + + + + bottom margin + Dolní okraj + + + + Paper + Papír + + + + Paper source: + Zdroj papíru: + + + + Centimeters (cm) + Centimetry (cm) + + + + right margin + Pravý okraj + + + + Margins + Okraje + + + + Landscape + Formát na šířku + + + + Width: + Šířka: + + + + Orientation + Zaměření + + + + Portrait + Formát na výšku + + + + top margin + Horní okraj + + + + left margin + Levý okraj + + + + Page size: + Velikost stran: + + + + Reverse portrait + Obrácený formát na výšku + + + + Millimeters (mm) + Milimetry (mm) + + + + Points (pt) + Body (pt) + + + + Inches (in) + Palce (in) + + + + Reverse landscape + Obrácený formát na šířku + + + + Height: + Výška: + + + + QPluginLoader + + + The plugin was not loaded. + Přídavný modul nebyl nahrán. + + + + Unknown error + Neznámá chyba + + + + QPrintDialog + + + A0 + A0 + + + + A1 + A1 + + + + A2 + A2 + + + + A3 + A3 + + + + A4 + A4 + + + + A5 + A5 + + + + A6 + A6 + + + + A7 + A7 + + + + A8 + A8 + + + + A9 + A9 + + + + B0 + B0 + + + + B1 + B1 + + + + B2 + B2 + + + + B3 + B3 + + + + B4 + B4 + + + + B5 + B5 + + + + B6 + B6 + + + + B7 + B7 + + + + B8 + B8 + + + + B9 + B9 + + + + OK + OK + + + + B10 + B10 + + + + C5E + C5E + + + + DLE + DLE + + + + A6 (105 x 148 mm) + A6 (105 x 148 mm) + + + + Legal (8.5 x 14 inches, 216 x 356 mm) + Právní (8,5 x 14 palců, 216 x 356 mm) + + + + Folio + Folio + + + + Legal + Právní + + + + Print all + Tisknout vše + + + + + + Print + Tisk + + + + &Options << + &Nastavení << + + + + + &Options >> + &Nastavení >> + + + + B6 (125 x 176 mm) + B6 (125 x 176 mm) + + + + B8 (62 x 88 mm) + B8 (62 x 88 mm) + + + + A8 (52 x 74 mm) + A8 (52 x 74 mm) + + + + B9 (44 x 62 mm) + B9 (44 x 62 mm) + + + + A9 (37 x 52 mm) + A9 (37 x 52 mm) + + + + B0 (1000 x 1414 mm) + B0 (1000 x 1414 mm) + + + + A5 (148 x 210 mm) + A5 (148 x 210 mm) + + + + Tabloid (279 x 432 mm) + Bulvární noviny/tisk (279 x 432 mm) + + + + B10 (31 x 44 mm) + B10 (31 x 44 mm) + + + + B2 (500 x 707 mm) + B2 (500 x 707 mm) + + + + &Print + &Tisk + + + + A3 (297 x 420 mm) + A3 (297 x 420 mm) + + + + Print selection + Tisk výběru + + + + Print to File (Postscript) + Tisk do souboru (Postscript) + + + + B4 (250 x 353 mm) + B4 (250 x 353 mm) + + + + %1 already exists. +Do you want to overwrite it? + Soubor %1 již existuje. +Má se přepsat? + + + + A1 (594 x 841 mm) + A1 (594 x 841 mm) + + + + Custom + Stanovený uživatelem + + + + B1 (707 x 1000 mm) + B1 (707 x 1000 mm) + + + + Folio (210 x 330 mm) + Folio (210 x 330 mm) + + + + Ledger + Hlavní (účetní) kniha + + + + Letter + Dopis + + + + DLE (110 x 220 mm) + DLE (110 x 220 mm) + + + + C5E (163 x 229 mm) + C5E (163 x 229 mm) + + + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250 mm, 6.93 x 9.84 palců + + + + Print range + Tisková oblast + + + + File exists + Soubor již existuje + + + + Write %1 file + Zapsat %1 soubor + + + + A0 (841 x 1189 mm) + A0 (841 x 1189 mm) + + + + Local file + Místní soubor + + + + locally connected + přímo spojeno + + + + Ledger (432 x 279 mm) + Hlavní (účetní) kniha (432 x 279 mm) + + + + + Aliases: %1 + Přezdívka: %1 + + + + Print to File (PDF) + Tisk do souboru (PDF) + + + + Print To File ... + Tisk do souboru... + + + + US Common #10 Envelope (105 x 241 mm) + US běžná #10 obálka (105 x 241 mm) + + + + Tabloid + Bulvární noviny + + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297 mm, 8.26 x 11.7 palců) + + + + Executive + Prováděcí + + + + + unknown + Neznámý + + + + <qt>Do you want to overwrite it?</qt> + <qt>Chcete jej přepsat?</qt> + + + + Executive (7.5 x 10 inches, 191 x 254 mm) + Prováděcí (7,5 x 10 palců, 191 x 254 mm) + + + + Letter (8.5 x 11 inches, 216 x 279 mm) + Dopis (8,5 x 11 palců, 216 x 279 mm) + + + + The 'From' value cannot be greater than the 'To' value. + Údaj pro první stranu nesmí být větší než údaj pro poslední stranu. + + + + US Common #10 Envelope + US běžná #10 obálka + + + + %1 is a directory. +Please choose a different file name. + %1 je adresář. +Zvolte, prosím, pro soubor jiný název. + + + + File %1 is not writable. +Please choose a different file name. + Soubor %1 je chráněn proti zápisu. +Zvolte, prosím, pro soubor jiný název. + + + + B3 (353 x 500 mm) + B3 (353 x 500 mm) + + + + A7 (74 x 105 mm) + A7 (74 x 105 mm) + + + + A2 (420 x 594 mm) + A2 (420 x 594 mm) + + + + B7 (88 x 125 mm) + B7 (88 x 125 mm) + + + + QPrintPreviewDialog + + + %1% + %1% + + + + Print Preview + Náhled tisku + + + Close + Zavřít + + + + Print + Tisk + + + + Fit page + Přizpůsobit stranu + + + + Zoom in + Zvětšit + + + + Landscape + Formát na šířku + + + + Zoom out + Zmenšit + + + + Fit width + Přizpůsobit šířku + + + + Portrait + Formát na výšku + + + + + Page Setup + Nastavení strany + + + + Page setup + Nastavení strany + + + + Show overview of all pages + Ukázat přehled všech stran + + + + First page + První strana + + + + Last page + Poslední strana + + + + Show single page + Ukázat jednotlivé strany + + + + Export to PDF + Vyvést do PDF + + + + Previous page + Předchozí strana + + + + Next page + Další strana + + + + Show facing pages + Ukázat strany ležící naproti + + + + Export to PostScript + Vyvést do PostScriptu + + + + QPrintPropertiesWidget + + + Form + Formulář + + + + Page + Strana + + + + Advanced + Rozšířené + + + + QPrintSettingsOutput + + + to + do + + + + Form + Formulář + + + + None + Žádný + + + + Color + Barva + + + + Print all + Tisknout vše + + + + Selection + Výběr + + + + Long side + Dlouhá strana + + + + Copies + Počet exemplářů + + + + Print range + Tisk oblasti + + + + Color Mode + Barevný režim + + + + Options + Volby + + + + Output Settings + Nastavení výstupu + + + + Reverse + Obrácený + + + + Grayscale + Odstíny šedi + + + + Short side + Krátká strana + + + + Collate + Srovnat + + + + Copies: + Počet exemplářů: + + + + Pages from + Strany od + + + + Duplex Printing + Zdvojený tisk + + + + QPrintWidget + + + ... + ... + + + + Form + Formulář + + + + Type: + Typ: + + + + &Name: + &Název: + + + + Output &file: + Výstupní &soubor: + + + + P&roperties + &Vlastnosti + + + + Preview + Náhled + + + + Printer + Tiskárna + + + + Location: + Umístění: + + + + QProcess + + + + + Error writing to process + Zápis do procesu se nezdařil + + + + No program defined + Nestanoven žádný program + + + + Resource error (fork failure): %1 + Potíže se zdroji (selhání rozcestí - "fork failure"): %1 + + + + + + + Error reading from process + Čtení z procesu se nezdařilo + + + Process failed to start + Spuštění procesu se nezdařilo + + + + + Could not open input redirection for reading + Vstupní přesměrování se nepodařilo otevřít pro čtení + + + + + Could not open output redirection for writing + Výstupní přesměrování se nepodařilo otevřít pro zápis + + + + + + + + + + + + Process operation timed out + Překročení času u procesu + + + + Process crashed + Proces spadl + + + + Process failed to start: %1 + Proces se nepodařilo spustit: %1 + + + + QProgressDialog + + + Cancel + Zrušit + + + + QPushButton + + + Open + Otevřít + + + + QRadioButton + + + Check + Označit křížkem + + + + QRegExp + + + bad lookahead syntax + nesprávná syntax pro plánování dopředu + + + + no error occurred + žádná chyba + + + + missing left delim + chybějící levé vymezení + + + + bad char class syntax + nesprávná syntax pro třídu znaku + + + + disabled feature used + byla použita zakázaná vlastnost + + + + invalid octal value + neplatná osmičková hodnota + + + + invalid interval + neplatný interval + + + + invalid category + neplatná skupina + + + + bad repetition syntax + nesprávná syntax pro opakování + + + + met internal limit + dosažena vnitřní mez + + + + unexpected end + neočekávaný konec + + + + QSQLite2Driver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + Error to open database + Nepodařilo se otevřít spojení s datatabází + + + Unable to rollback Transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + Unable to begin transaction + Transakci se nepodařilo spustit + + + + Error opening database + Nepodařilo se otevřít spojení s databází + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + QSQLite2Result + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + Unable to fetch results + Výsledek se nepodařilo natáhnout + + + + QSQLiteDriver + + + Unable to commit transaction + Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila) + + + + Error closing database + Nepodařilo se uzavřít spojení s datatabází + + + + Error opening database + Nepodařilo se otevřít spojení s databází + + + + Unable to rollback transaction + Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila) + + + + Unable to begin transaction + Transakci se nepodařilo spustit + + + + QSQLiteResult + + + + + Unable to fetch row + Řádek se nepodařilo natáhnout + + + + No query + Žádný požadavek + + + + Unable to execute statement + Příkaz se nepodařilo provést + + + + Unable to bind parameters + Parametry se nepodařilo spojit + + + + Unable to reset statement + Příkaz se nepodařilo znovu nastavit + + + + Parameter count mismatch + Počet parametrů není správný + + + + QScriptBreakpointsModel + + + ID + ID + + + + Location + Umístění + + + + Condition + Podmínka + + + + Ignore-count + Spustit po + + + + Single-shot + Spustit jednou + + + + Hit-count + Spuštěný + + + + QScriptBreakpointsWidget + + + New + Nový + + + + Delete + Smazat + + + + QScriptDebugger + + + + Go to Line + Jít na řádek + + + + Line: + Řádek: + + + + Interrupt + Přerušit + + + + Shift+F5 + Shift+F5 + + + + Continue + Pokračovat + + + + F5 + F5 + + + + Step Into + Krok do + + + + F11 + F11 + + + + Step Over + Krok přes + + + + F10 + F10 + + + + Step Out + Krok ven + + + + Shift+F11 + Shift+F11 + + + + Run to Cursor + Provést po kurzor + + + + Ctrl+F10 + Ctrl+F10 + + + + Run to New Script + Provést po nový skript + + + + Toggle Breakpoint + Přepnout bod přerušení (zastavení) + + + + F9 + F9 + + + + Clear Debug Output + Smazat výstup ladění + + + + Clear Error Log + Smazat výstupní zápis s chybami + + + + Clear Console + Smazat konzoli + + + + &Find in Script... + &Hledat ve skriptu... + + + + Ctrl+F + Ctrl+F + + + + Find &Next + Najít &další + + + + F3 + F3 + + + + Find &Previous + Najít &předchozí + + + + Shift+F3 + Shift+F3 + + + + Ctrl+G + Ctrl+G + + + + Debug + Ladit + + + + QScriptDebuggerCodeFinderWidget + + + Close + Zavřít + + + + Previous + Předchozí + + + + Next + Další + + + + Case Sensitive + Rozlišující velká a malá písmena + + + + Whole words + Celá slova + + + + <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped + <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Hledání dosáhlo konce + + + + QScriptDebuggerLocalsModel + + + Name + Název + + + + Value + Hodnota + + + + QScriptDebuggerStackModel + + + Level + Úroveň + + + + Name + Název + + + + Location + Umístění + + + + QScriptEdit + + + Toggle Breakpoint + Přepnout bod zastavení + + + + Disable Breakpoint + Vypnout bod zastavení + + + + Enable Breakpoint + Zapnout bod zastavení + + + + Breakpoint Condition: + Podmínka zastavení: + + + + QScriptEngineDebugger + + + Loaded Scripts + Nahrané skripty + + + + Breakpoints + Body zastavení + + + + Stack + Zásobník + + + + Locals + Místní proměnné + + + + Console + Konzole + + + + Debug Output + Výstup ladění + + + + Error Log + Výstupní zápis s chybami + + + + Search + Hledat + + + + View + Pohled + + + + Qt Script Debugger + Qt ladění skriptů + + + + QScriptNewBreakpointWidget + + + Close + Zavřít + + + + QScrollBar + + + Top + Začátek + + + + Scroll down + Projíždět dolů + + + + Scroll here + Projíždět až sem + + + + Scroll left + Projíždět doleva + + + + Line up + O jeden řádek nahoru + + + + Line down + O jeden řádek dolů + + + + Bottom + Konec + + + + + Page up + O stranu nahoru + + + + Position + Poloha + + + + Page right + O stranu doprava + + + + Scroll up + Projíždět nahoru + + + + Scroll right + Projíždět doprava + + + + Left edge + Levý okraj + + + + + Page down + O stranu dolů + + + + Page left + O stranu doleva + + + + Right edge + Pravý okraj + + + + QSharedMemory + + + + %1: doesn't exist + %1: Neexistuje + + + + %1: UNIX key file doesn't exist + %1: Soubor s unixovým klíčem neexistuje + + + + %1: system-imposed size restrictions + %1: Bylo dosaženo systémem podmíněné meze velikosti + + + %1: unix key file doesn't exists + %1: Soubor s unixovým klíčem neexistuje + + + + %1: doesn't exists + %1: Neexistuje + + + + %1: key is empty + %1: Neplatný údaj u klíče (prázdný) + + + + + %1: key error + %1: Chybný klíč + + + + %1: create size is less then 0 + %1: Údaj o velikosti vytvoření je menší než nula + + + + + + %1: already exists + %1: Již existuje + + + + + + %1: unknown error %2 + %1: Neznámá chyba %2 + + + + + %1: invalid size + %1: Neplatná velikost + + + + + + %1: unable to make key + %1: Nepodařilo se vytvořit klíč + + + + %1: unable to set key on lock + %1: Nepodařilo se nastavit klíč pro uzavření + + + + %1: unable to unlock + %1: Uzavření se nepodařilo zrušit + + + + + + %1: permission denied + %1: Přístup odepřen + + + + %1: ftok failed + %1: Vyvolání ftok se nezdařilo + + + + + + %1: out of resources + %1: Nejsou již použitelné zdroje + + + + %1: not attached + %1: Nepřipojen + + + + %1: size query failed + %1: Vyhledání velikosti se nezdařilo + + + + + %1: unable to lock + %1: Uzavření se nezdařilo + + + + QShortcut + + + + + + + + + + No + Ne + + + + Up + Nahoru + + + + + Alt + Alt + + + + F%1 + F%1 + + + + Del + Delete + + + + End + End + + + + Esc + Esc + + + + Ins + Insert + + + + Tab + Tab + + + + Yes + Ano + + + + Back + Zpět + + + + Call + Volání + + + + + Ctrl + Ctrl + + + + Down + Dolů + + + + Flip + Obrátit + + + + Help + Nápověda + + + + Home + Home + + + + Left + Vlevo + + + + Menu + Menu + + + + + Meta + Meta + + + + PgUp + PgUp + + + + Stop + Stop + + + + Enter + Enter + + + + Pause + Pause + + + + Print + Print + + + + Right + Vpravo + + + + + Shift + Shift + + + + Space + Mezerník + + + + Media Record + Nahrát + + + + Print Screen + Print Screen + + + + Treble Down + Výšky - + + + + Scroll Lock + Scroll Lock + + + + Volume Down + Hlasitost - + + + + Volume Mute + Ztlumit hlasitost + + + + Media Previous + Předchozí + + + + Home Page + Domovská stránka + + + + Volume Up + Hlasitost + + + + + Launch (6) + Spustit (6) + + + + Launch (7) + Spustit (7) + + + + Launch (8) + Spustit (8) + + + + Launch (9) + Spustit (9) + + + + Launch (2) + Spustit (2) + + + + Launch (3) + Spustit (3) + + + + Launch (4) + Spustit (4) + + + + Launch (5) + Spustit (5) + + + + Launch (0) + Spustit (0) + + + + Launch (1) + Spustit (1) + + + + Launch (F) + Spustit (F) + + + + Launch (B) + Spustit (B) + + + + Launch (C) + Spustit (C) + + + + Launch (D) + Spustit (D) + + + + Launch (E) + Spustit (E) + + + + Launch (A) + Spustit (A) + + + + Delete + Delete + + + + Escape + Escape + + + + Hangup + Pověsit + + + + Insert + Insert + + + + Bass Boost + Zesílení basů + + + + PgDown + PgDown + + + + Return + Return + + + + Search + Hledat + + + + Select + Vybrat + + + + SysReq + SysReq + + + + NumLock + NumLock + + + + ScrollLock + ScrollLock + + + + Context1 + Kontext1 + + + + Context2 + Kontext2 + + + + Context3 + Kontext3 + + + + Context4 + Kontext4 + + + + Page Up + Page Up + + + + Open URL + Otevřít URL + + + + Caps Lock + Caps Lock + + + + System Request + Žádost systému + + + + CapsLock + CapsLock + + + + Backtab + Zpět-Tab + + + + Bass Up + Basy + + + + + Refresh + Obnovit + + + + Launch Mail + Spustit e-mail + + + + Backspace + Backspace + + + + Bass Down + Basy - + + + + Standby + V pohotovosti + + + + Treble Up + Výšky + + + + + Num Lock + Num Lock + + + + Number Lock + Zahlen-Feststelltaste + + + + Favorites + Oblíbené + + + + Forward + Dopředu + + + + Page Down + Obraz dolů + + + + Media Play + Přehrávání + + + + Media Stop + Zastavit přehrávání + + + + Media Next + Další + + + + Launch Media + Spustit přehrávač + + + + QSlider + + + Page up + O stranu nahoru + + + + Position + Poloha + + + + Page right + O stranu doprava + + + + Page down + O stranu dolů + + + + Page left + O stranu doleva + + + + QSocks5SocketEngine + + + Network operation timed out + Časový limit pro síťovou operaci byl překročen + + + + Connection to proxy closed prematurely + Proxy server předčasně ukončil spojení + + + + Proxy authentication failed: %1 + Autentizace u proxy serveru se nezdařila: %1 + + + + Proxy authentication failed + Autentizace u proxy serveru se nezdařila + + + + General SOCKSv5 server failure + Všeobecná chyba při spojení s SOCKSv5 serverem + + + + Unknown SOCKSv5 proxy error code 0x%1 + Byl obdržen neznámý chybový kód od SOCKSv5 proxy serveru: 0x%1 + + + + Connection not allowed by SOCKSv5 server + SOCKSv5 server odmítl spojení + + + + SOCKSv5 command not supported + Tento SOCKSv5 příkaz není podporován + + + + Connection to proxy timed out + Při spojení s proxy serverem byl překročen časový limit + + + + Proxy host not found + Proxy server se nepodařilo najit + + + + TTL expired + TTL uplynul + + + + Address type not supported + Tento typ adresy není podporován + + + + Connection to proxy refused + Proxy server odmítl navázání spojení + + + + SOCKS version 5 protocol error + Chyba protokolu (SOCKS verze 5) + + + + QSoftKeyManager + + + Ok + OK + + + + Select + Vybrat + + + + Done + Hotovo + + + + Options + Volby + + + + Cancel + Zrušit + + + + Exit + Ukončit + + + + QSpinBox + + + Less + Méně + + + + More + Více + + + + QSql + + + + + No + Ne + + + + + + Yes + Ano + + + + Cancel + Zrušit + + + + Delete + Delete + + + + Insert + Vložit + + + + Update + Obnovit + + + + Delete this record? + Smazat tento zápis? + + + + Save edits? + Uložit změny? + + + + Confirm + Potvrdit + + + + Cancel your edits? + Zrušit změny? + + + + QSslSocket + + + Error creating SSL session: %1 + Nepodařilo se vytvořit sezení SSL: %1 + + + + Error creating SSL session, %1 + Nepodařilo se vytvořit sezení SSL, %1 + + + + Cannot provide a certificate with no key, %1 + Bez klíče nelze poskytnout žádné osvědčení k volnému použití, %1 + + + + Unable to write data: %1 + Data se nepodařilo zapsat: %1 + + + + Error during SSL handshake: %1 + Během startu SSL protokolu se vyskytla chyba: %1 + + + + Error loading local certificate, %1 + Nepodařilo se nahrát místní osvědčení, %1 + + + + Invalid or empty cipher list (%1) + Neplatný či prázdný seznam se šifrovacími klíči (%1) + + + + Private key does not certificate public key, %1 + Vystavení osvědčení k veřejnému klíči přes soukromý klíč se nezdařilo, %1 + + + + Error creating SSL context (%1) + Nepodařilo se vytvořit žádný kontext SSL (%1) + + + + Error while reading: %1 + Při čtení se vyskytla chyba: %1 + + + + Error loading private key, %1 + Soukromý klíč se nepodařilo nahrát, %1 + + + + QStateMachine + + + Missing initial state in compound state '%1' + Chybí počáteční stav složeného stavu '%1' + + + + Missing default state in history state '%1' + Chybí výchozí stav ve vývoji stavu '%1' + + + + No common ancestor for targets and source of transition from state '%1' + Cíl a zdroj přechodu ze stavu '%1' nemají žádný společný původ + + + + Unknown error + Neznámá chyba + + + + QSystemSemaphore + + + %1: does not exist + %1: Neexistuje + + + + %1: already exists + %1: Již existuje + + + + + %1: unknown error %2 + %1: Neznámá chyba %2 + + + + + %1: permission denied + %1: Přístup odepřen + + + + + %1: out of resources + %1: Nejsou již použitelné zdroje + + + + QTDSDriver + + + Unable to open connection + Nepodařilo se otevřít spojení s databází + + + + Unable to use database + Datatbázi se nepodařilo použít + + + + QTabBar + + + Scroll Left + Projíždět doleva + + + + Scroll Right + Projíždět doprava + + + + QTcpServer + + + Operation on socket is not supported + Tato zásuvková (socket) operace není podporována + + + + QTextControl + + + Cu&t + Vyj&mout + + + + &Copy + &Kopírovat + + + + &Redo + &Znovu + + + + &Undo + &Zpět + + + + &Paste + &Vložit + + + + Delete + Smazat + + + + Select All + Vybrat vše + + + + Copy &Link Location + &Kopírovat adresu odkazu + + + + QToolButton + + + + Open + Otevřít + + + + + Press + Stisknout + + + + QUdpSocket + + + This platform does not support IPv6 + Tato patforma nepodpotuje IPv6 + + + + QUndoGroup + + + Redo + Znovu + + + + Undo + Zpět + + + + QUndoModel + + + <empty> + <prázdný> + + + + QUndoStack + + + Redo + Znovu + + + + Undo + Zpět + + + + QUnicodeControlCharacterMenu + + + RLE Start of right-to-left embedding + RLE Začátek zapuštění zprava doleva (right-to-left embedding) + + + + ZWSP Zero width space + ZWSP Prostor s nulovou šířkou (Zero width space) + + + + Insert Unicode control character + Vložit kontrolní znak Unicode + + + + LRO Start of left-to-right override + LRO Začátek zrušení zleva doprava (left-to-right override) + + + + LRE Start of left-to-right embedding + LRE Začátek zapuštění zleva doprava (right-to-left embedding) + + + + RLM Right-to-left mark + RLM Značka zprava doleva (Right-to-left mark) + + + + PDF Pop directional formatting + PDF Vsunout směrové formátování (Pop directional formatting) + + + + ZWNJ Zero width non-joiner + ZWNJ Nespojovač s nulovou šířkou (Zero width non-joiner) + + + + RLO Start of right-to-left override + RLO Začátek zrušení zprava doleva (right-to-left override) + + + + ZWJ Zero width joiner + ZWJ Spojovač s nulovou šířkou (Zero width joiner) + + + + LRM Left-to-right mark + LRM Značka zleva doprava (Left-to-right mark) + + + + QWebFrame + + + Request blocked + Požadavek byl odmítnut + + + + Request cancelled + Požadavek byl zrušen + + + + Cannot show URL + Adresu (URL) nelze ukázat + + + + Frame load interrupted by policy change + Nahrání rámce bylo přerušeno změnou směrnice + + + Frame load interruped by policy change + Nahrání rámce bylo přerušeno změnou směrnice + + + + File does not exist + Soubor neexistuje + + + + Cannot show mimetype + Tento mime typ nelze ukázat + + + + QWebPage + + Cut + Vyjmout + + + LTR + Zleva doprava + + + RTL + Zprava doleva + + + + Top + Začátek + + + Bold + Tučné + + + Copy + Kopírovat + + + Stop + Ukončit + + + Open Frame + Otevřít rámec + + + Open Image + Vyobrazení otevřít v novém okně + + + Fonts + Písma + + + Paste + Vložit + + + Reset + Vrátit + + + Inspect + Provést prohlídku + + + + Select to the start of the block + Vybrat až po začátek bloku + + + + Move the cursor to the end of the block + Ukazatel polohy posunout až na konec bloku + + + + JavaScript Alert - %1 + Upozornění od JavaScriptu - %1 + + + + JavaScript Confirm - %1 + Potvrzení od JavaScriptu - %1 + + + + JavaScript Prompt - %1 + Výzva od JavaScriptu - %1 + + + + JavaScript Problem - %1 + Potíže s JavaScriptem - %1 + + + + The script on this page appears to have a problem. Do you want to stop the script? + Vypadá to na to, že skript na této straně má potíže. Chcete tento skript zastavit? + + + + Select all + Vybrat vše + + + + Select to the start of the line + Vybrat až po začátek řádku + + + + Insert a new paragraph + Vložit nový odstavec + + + + Insert a new line + Vložit nový řádek + + + + Paste and Match Style + Vložit a odpovídat stylu + + + + Remove formatting + Odstranit formátování + + + + Strikethrough + Přeškrtnuto + + + + Subscript + Dolní index + + + + Superscript + Horní index + + + + Insert Bulleted List + Vložit seznam s odrážkami + + + + Insert Numbered List + Vložit číslovaný seznam + + + + Indent + Odsadit + + + + Outdent + Zrušit odsazení + + + + Center + Na střed + + + + Justify + Do bloku + + + + Align Left + Zarovnat vlevo + + + + Align Right + Zarovnat vpravo + + + Look Up In Dictionary + Podívat se do slovníku + + + Search The Web + Hledat na síti + + + Check Spelling While Typing + Kontrolovat pravopis během psaní + + + Add To Dictionary + Přidat do slovníku + + + + Delete to the start of the word + Smazat až po začátek slova + + + Recent searches + Dosavadní hledané výrazy + + + + Move the cursor to the next word + Ukazatel polohy posunout k následujícímu slovu + + + + Move the cursor to the next line + Ukazatel polohy posunout k následujícímu řádku + + + + Scroll down + Projíždět dolů + + + + Scroll here + Projíždět až sem + + + + Scroll left + Projíždět doleva + + + + Move the cursor to the start of the block + Ukazatel polohy posunout na začátek bloku + + + Text Direction + Směr psaní + + + + Bottom + Konec + + + Ignore + Nevšímat si + + + Italic + Kurzívní + + + + Move the cursor to the end of the line + Ukazatel polohy posunout na konec řádku + + + + Move the cursor to the start of the line + Ukazatel polohy posunout na začátek řádku + + + Reload + Nahrát znovu + + + Submit + Poslat + + + + Web Inspector - %2 + Web Inspektor - %2 + + + + Page up + O stranu nahoru + + + Spelling + Pravopis + + + Outline + Obrys + + + Check Grammar With Spelling + Kontrolovat mluvnici společně s pravopisem + + + No file selected + Nebyl vybrán žádný soubor + + + + Submit + default label for Submit buttons in forms on web pages + Poslat + + + + Reset + default label for Reset buttons in forms on web pages + Vrátit + + + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + Tento rejstřík má funkci hledání. Zadejte nějaký hledaný výraz: + + + + Choose File + title for file button used in HTML forms + Vybrat soubor + + + + No file selected + text to display in file button used in HTML forms when no file is selected + Nebyl vybrán žádný soubor + + + + Open in New Window + Open in New Window context menu item + Otevřít v novém okně + + + + Save Link... + Download Linked File context menu item + Uložit odkaz... + + + + Copy Link + Copy Link context menu item + Kopírovat adresu odkazu + + + + Open Image + Open Image in New Window context menu item + Vyobrazení otevřít v novém okně + + + + Save Image + Download Image context menu item + Uložit vyobrazení + + + + Copy Image + Copy Link context menu item + Kopírovat vyobrazení + + + + Open Frame + Open Frame in New Window context menu item + Otevřít rámec + + + + Copy + Copy context menu item + Kopírovat + + + + Go Back + Back context menu item + Jít zpět + + + + Go Forward + Forward context menu item + Jít dopředu + + + + Stop + Stop context menu item + Zastavit + + + + Reload + Reload context menu item + Nahrát znovu + + + + Cut + Cut context menu item + Vyjmout + + + + Paste + Paste context menu item + Vložit + + + + No Guesses Found + No Guesses Found context menu item + Nebyly nalezeny žádné návrhy + + + + Ignore + Ignore Spelling context menu item + Přehlížet + + + + Add To Dictionary + Learn Spelling context menu item + Přidat do slovníku + + + + Search The Web + Search The Web context menu item + Hledat na síti + + + + Look Up In Dictionary + Look Up in Dictionary context menu item + Podívat se do slovníku + + + + Open Link + Open Link context menu item + Otevřít adresu odkazu + + + + Ignore + Ignore Grammar context menu item + Přehlížet + + + + Spelling + Spelling and Grammar context sub-menu item + Pravopis + + + + Show Spelling and Grammar + menu item title + Ukázat pravopis a mluvnici + + + + Hide Spelling and Grammar + menu item title + Skrýt pravopis a mluvnici + + + + Check Spelling + Check spelling context menu item + Ověření pravopisu + + + + Check Spelling While Typing + Check spelling while typing context menu item + Ověřovat pravopis během psaní + + + + Check Grammar With Spelling + Check grammar with spelling context menu item + Ověřovat mluvnici společně s pravopisem + + + + Fonts + Font context sub-menu item + Písma + + + + Bold + Bold context menu item + Tučné + + + + Italic + Italic context menu item + Kurzíva + + + + Underline + Underline context menu item + Podtržení + + + + Outline + Outline context menu item + Obrys + + + + Direction + Writing direction context sub-menu item + Směr + + + + Text Direction + Text direction context sub-menu item + Směr psaní + + + + Default + Default writing direction context menu item + Výchozí + + + + Left to Right + Left to Right context menu item + Zleva doprava + + + + Right to Left + Right to Left context menu item + Zprava doleva + + + + Loading... + Media controller status message when the media is loading + Nahrává se... + + + + Live Broadcast + Media controller status message when watching a live broadcast + Živý přenos + + + + Audio Element + Media controller element + Zvukový prvek + + + + Video Element + Media controller element + Videoprvek + + + + Mute Button + Media controller element + Tlačítko pro ztlumení + + + + Unmute Button + Media controller element + Tlačítko pro zrušení ztlumení + + + + Play Button + Media controller element + Tlačítko pro přehrávání + + + + Pause Button + Media controller element + Tlačítko pro pozastavení + + + + Slider + Media controller element + Posuvník + + + + Slider Thumb + Media controller element + Palec posuvníku + + + + Rewind Button + Media controller element + Tlačítko pro přetočení + + + + Return to Real-time Button + Media controller element + Tlačítko pro návrat ke skutečnému času + + + + Elapsed Time + Media controller element + Uplynulý čas + + + + Remaining Time + Media controller element + Zbývající čas + + + + Status Display + Media controller element + Údaj o stavu + + + + Fullscreen Button + Media controller element + Tlačítko pro zobrazení na celou obrazovku + + + + Seek Forward Button + Media controller element + Tlačítko pro hledání dopředu + + + + Seek Back Button + Media controller element + Tlačítko pro hledání dozadu + + + + Audio element playback controls and status display + Media controller element + Řízení přehrávání zvuku a zobrazení stavu + + + + Video element playback controls and status display + Media controller element + Řízení přehrávání videa a zobrazení stavu + + + + Mute audio tracks + Media controller element + Ztlumit zvukové stopy + + + + Unmute audio tracks + Media controller element + Zrušit ztlumení zvukových stop + + + + Begin playback + Media controller element + Začít přehrávání + + + + Pause playback + Media controller element + Pozastavit přehrávání + + + + Movie time scrubber + Media controller element + Čas přehrávání + + + + Movie time scrubber thumb + Media controller element + Palec pro nastavení času přehrávání + + + + Rewind movie + Media controller element + Přetočit film zpět + + + + Return streaming movie to real-time + Media controller element + Vrátit film na skutečný čas + + + + Current movie time + Media controller element + Čas přehrávání filmu + + + + Remaining movie time + Media controller element + Zbývající čas z přehrávání filmu + + + + Current movie status + Media controller element + Stav filmu + + + + Play movie in full-screen mode + Media controller element + Přehrávat film v režimu zobrazení na celou obrazovku + + + + Seek quickly back + Media controller element + Rychlé zpětné hledání + + + + Seek quickly forward + Media controller element + Rychlé dopředné hledání + + + + Indefinite time + Media time description + Neomezený čas + + + + %1 days %2 hours %3 minutes %4 seconds + Media time description + %1 dny %2 hodiny %3 minuty %4 sekundy + + + + %1 hours %2 minutes %3 seconds + Media time description + %1 hodiny %2 minuty %3 sekundy + + + + %1 minutes %2 seconds + Media time description + %1 minuty %2 sekundy + + + + %1 seconds + Media time description + %1 sekundy + + + LTR + Left to Right context menu item + Zleva doprava + + + RTL + Right to Left context menu item + Zprava doleva + + + + Inspect + Inspect Element context menu item + Provést prohlídku + + + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + Neexistují žádné naposledy hledané výrazy + + + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + Dosavadní hledané výrazy + + + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + Smazat naposledy hledané výrazy + + + + Unknown + Unknown filesize FTP directory listing item + Neznámý + + + + %1 (%2x%3 pixels) + Title string for images + %1 (%2x%3 pixelů) + + + Save Image + Uložit vyobrazení + + + Save Link... + Uložit odkaz... + + + No recent searches + Neexistují žádné naposledy hledané výrazy + + + + Page right + O stranu doprava + + + + Move the cursor to the start of the document + Ukazatel polohy posunout na začátek dokumentu + + + + Move the cursor to the next character + Ukazatel polohy posunout k následujícímu znaku + + + Copy Link + Kopírovat adresu odkazu + + + + Select to the previous line + Vybrat až po předchozí řádek + + + + Select to the previous word + Vybrat až po předchozí slovo + + + Check Spelling + Kontrola pravopisu + + + + Select to the next character + Vybrat až po následující znak + + + Show Spelling and Grammar + Ukázat pravopis a mluvnici + + + + Delete to the end of the word + Smazat až po konec slova + + + Direction + Směr + + + + Select to the end of the line + Vybrat až po začátek řádku + + + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + Poslat + + + Choose File + Vybrat soubor + + + + Scroll up + Projíždět nahoru + + + Clear recent searches + Smazat naposledy hledané výrazy + + + + Select to the start of the document + Vybrat až po začátek dokumentu + + + Default + Výchozí + + + Underline + Podtrhnout + + + + Move the cursor to the previous character + Ukazatel polohy posunout k předchozímu znaku + + + Copy Image + Kopírovat vyobrazení + + + + Select to the end of the document + Vybrat až po konec dokumentu + + + + Select to the end of the block + Vybrat až po konec bloku + + + + Scroll right + Projíždět doprava + + + No Guesses Found + Nebyly nalezeny žádné návrhy + + + Open Link + Otevřít adresu odkazu + + + + Bad HTTP request + Neplatný požadavek HTTP + + + Unknown + Neznámý + + + + Move the cursor to the previous word + Ukazatel polohy posunout k předchozímu slovu + + + + Move the cursor to the previous line + Ukazatel polohy posunout na předchozí řádku + + + %n file(s) + %n soubor(ů) + + + + Left edge + Levý okraj + + + Go Forward + Jít dopředu + + + + Page down + O stranu dolů + + + + Page left + O stranu doleva + + + This is a searchable index. Enter search keywords: + Tento index má funkci hledání. Zadejte nějaký hledaný výraz: + + + + Select to the previous character + Vybrat až po předchozí znak + + + Go Back + Jít zpět + + + Open in New Window + Otevřít v novém okně + + + + Right edge + Pravý okraj + + + + Move the cursor to the end of the document + Ukazatel polohy posunout na konec dokumentu + + + Hide Spelling and Grammar + Skrýt pravopis a mluvnici + + + %1 (%2x%3 pixels) + %1 (%2x%3 pixelů) + + + + Select to the next word + Vybrat až po následující slovo + + + + Select to the next line + Vybrat až po následující řádek + + + + %n file(s) + number of chosen file + + %n soubor(ů) + + + + + + + QWhatsThisAction + + + What's This? + Co je toto? + + + + QWidget + + + * + * + + + + QWizard + + + Done + Hotovo + + + + Help + Nápověda + + + + &Help + &Nápověda + + + + &Next + &Další + + + + Cancel + Zrušit + + + + Commit + Použít + + + + Continue + Pokračovat + + + + &Finish + Do&končit + + + + &Next > + &Další > + + + + Go Back + Jít zpět + + + + < &Back + < &Zpět + + + + QWorkspace + + + &Move + Po&sunout + + + + &Size + Změnit &velikost + + + + Close + Zavřít + + + + Minimize + Zmenšit + + + + Stay on &Top + Zůstat v &popředí + + + + &Close + &Zavřít + + + + + %1 - [%2] + %1 - [%2] + + + + + Sh&ade + &Navinout + + + + &Restore + &Obnovit + + + + &Unshade + &Odvinout + + + + Mi&nimize + &Zmenšit + + + + Ma&ximize + Zvě&tšit + + + + Restore Down + Obnovit + + + + QXml + + + unparsed entity reference in wrong context + používán nevyhodnocený odkaz na entitu v nesprávné souvislosti + + + + external parsed general entity reference not allowed in DTD + v DTD nejsou dovoleny žádné odkazy na vnější obecnou entitu + + + + wrong value for standalone declaration + nesprávná hodnota pro samostatné prohlášení + + + + encoding declaration or standalone declaration expected while reading the XML declaration + chybějící prohlášení kódování nebo prohlášení samostatnosti při čtení prohlášení XML + + + + no error occurred + žádná chyba + + + + error occurred while parsing reference + při vyhodnocení odkazu se vyskytla chyba + + + + standalone declaration expected while reading the XML declaration + chybějící prohlášení samostatnosti při čtení prohlášení XML + + + + invalid name for processing instruction + neplatný název pro pokyn pro zpracování + + + + error triggered by consumer + chyba spuštěná spotřebitelem + + + + error occurred while parsing element + při vyhodnocení prvku se vyskytla chyba + + + + unexpected character + neočekávaný znak + + + + tag mismatch + Značky prvků nejsou vkládány správně + + + + error occurred while parsing content + při vyhodnocení obsahu se vyskytla chyba + + + + error occurred while parsing comment + při vyhodnocení poznámky se vyskytla chyba + + + + internal general entity reference not allowed in DTD + v DTD nejsou dovoleny žádné odkazy na vnitřní obecnou entitu + + + + recursive entities + rekurzivní entity + + + + more than one document type definition + více definicí typu dokumentu + + + + version expected while reading the XML declaration + chybějící verze při čtení prohlášení XML + + + + letter is expected + na tomto místě je potřeba písmeno + + + + unexpected end of file + neočekávaný konec souboru + + + + external parsed general entity reference not allowed in attribute value + v hodnotě vlastnosti nejsou dovoleny žádné odkazy na vnější obecnou entitu + + + + error in the text declaration of an external entity + Chyba v prohlášení textu vnější entity + + + + error occurred while parsing document type definition + při vyhodnocení definice typu dokumentu se vyskytla chyba + + + + QXmlStream + + + Reference to unparsed entity '%1'. + Odkaz na nevyhodnocenou entitu '%1'. + + + + Unexpected character '%1' in public id literal. + '%1' není platným znakem v údaji veřejného id, který je tvořen písmeny. + + + + + + + Illegal namespace declaration. + Neplatné prohlášení jmenného prostoru. + + + + Invalid XML character. + Neplatný znak XML. + + + + Expected character data. + Byly očekávány údaje o znacích. + + + + Standalone accepts only yes or no. + Hodnota pro samostatnou vlastnost může být pouze "ano" nebo "ne". + + + + Invalid XML version string. + Neplatný údaj o verzi XML. + + + + Invalid processing instruction name. + Název pokynu pro zpracování je neplatný. + + + + Namespace prefix '%1' not declared + Předpona jmenného prostoru '%1' nebyla prohlášena + + + + + + Entity '%1' not declared. + Entita '%1' není prohlášena. + + + + %1 is an invalid processing instruction name. + %1 není platným názvem pokynu pro zpracování. + + + + The standalone pseudo attribute must appear after the encoding. + Samostatná pseudovlastnost musí následovat bezprostředně po kódování. + + + + Sequence ']]>' not allowed in content. + Sled znaků ']]>' není v obsahu povolen. + + + + %1 is an invalid encoding name. + %1 není platným názvem pro kódování. + + + + , but got ' + očekáváno, namísto toho obdrženo ' + + + + Start tag expected. + Očekáván otevírající prvek. + + + + Invalid character reference. + Odkaz na neplatný znak. + + + + Reference to external entity '%1' in attribute value. + V hodnotě vlastnosti byla odkazována entita '%1'. + + + + Expected + Bylo + + + + Invalid document. + Neplatný dokument. + + + + Opening and ending tag mismatch. + Počet otevírajících prvků neodpovídá neodpovídá počtu zavírajících prvků. + + + + + Encountered incorrectly encoded content. + Byl nalezen obsah s neplatným kódováním. + + + + Invalid attribute in XML declaration. + Prohlášení XML obsahuje neplatnou vlastnost. + + + + Attribute redefined. + Vlastnost byla nově vymezena. + + + + %1 is an invalid PUBLIC identifier. + %1 není platným údajem VEŘEJNÉHO identifikátoru (id). + + + + + Extra content at end of document. + Přebytečný obsah za koncem dokumentu. + + + + Invalid XML name. + Neplatný název XML. + + + + Premature end of document. + Předčasný konec dokumentu. + + + + XML declaration not at start of document. + Prohlášení XML se nenachází na začátku dokumentu. + + + + Recursive entity detected. + Byla zjištěna rekurzivní entita. + + + + Unsupported XML version. + Tato verze XML není podporována. + + + + Unexpected ' + Na tomto místě neplatný ' + + + + Invalid entity value. + neplatná hodnota entity. + + + + Encoding %1 is unsupported + Kódování %1 není podporováno + + + + NDATA in parameter entity declaration. + Parametrické prohlášení entitynesmí obsahovat žádné NDATA. + + + + QtXmlPatterns + + + A comment cannot contain %1 + Poznámka nesmí obsahovat %1 + + + + Version %1 is not supported. The supported XQuery version is 1.0. + Verze %1 není podporována. Podporovanou verzí XQuery je 1.0. + + + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + Nadřízený uzel druhého agumentu funkce %1 musí být uzlem dokumentu, což není případ %2. + + + + The parameter %1 is required, but no corresponding %2 is supplied. + Nebyl zadán žádný odpovídající %2 pro potřebný parametr %1. + + + + Namespace declarations must occur before function, variable, and option declarations. + Prohlášení jmenných prostorů musí stát před prohlášeními funkcí-, proměnných- nebo prohlášeními voleb. + + + + empty + prázdný + + + + The namespace URI cannot be the empty string when binding to a prefix, %1. + Jmenný prostor-URI nesmí být prázdný, když je spojen s prefixem %1. + + + + A comment cannot end with a %1. + Poznámka nesmí končit na %1. + + + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + Úplně nahoře stojící prvky prováděcího listu se nesmí nacházet v nulovém jmenném prostoru, což je případ %1. + + + + Integer division (%1) by zero (%2) is undefined. + Celočíselné dělení (%1) nulou (%2) není stanoveno. + + + + A library module cannot be evaluated directly. It must be imported from a main module. + Knihovní modul nemůže být posouzen přímo, musí být zaveden z hlavního modulu. + + + + Time %1:%2:%3.%4 is invalid. + Časový údaj %1:%2:%3.%4 je neplatný. + + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + Prvek %2 může mít pouze obvyklé vlastnosti, ne však %1. + + + + A value of type %1 must contain an even number of digits. The value %2 does not. + Počet míst hodnoty typu %1 musí být stejný. To není případ %2. + + + + Modulus division (%1) by zero (%2) is undefined. + Dělení absolutní hodnoty (%1) nulou(%2) není stanoveno. + + + + No function with signature %1 is available + Neexistuje žádná funkce označená jako %1 + + + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + Musí být přítomen záložní výraz, neboť nejsou podporovány žádné věcné výrazy + + + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + V nahrazení může být použit pouze %1, aby se chránil sám, nebo %2, ne však pro %3 + + + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + Kódovací bod %1 z %2 s kódováním %3 není platným znakem XML. + + + + Network timeout. + Časový limit síťové operace byl překročen. + + + No casting is possible with %1 as the target type. + Nelze provádět žádné výběrové ("cast") operace s typem %1. + + + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + Prohlášení %1 je nepřípustné, protože není podporováno zavedení schémat. + + + + Attribute %1 and %2 are mutually exclusive. + Vlastnosti %1 a %2 se vzájemně vylučující. + + + + Parse error: %1 + Chyba vyhodnocení: %1 + + + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + Nelze zadat žádnou předponu, jestliže je první argument prázdný nebo je prázdný řetězec znaků (žádný jmenný prostor). Byla zadána předpona %1. + + + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + V XSL-T vyhledávacím vzoru musí být první argument k funkci %1 při použití k hledání odkaz tvořený písmeny nebo proměnný. + + + + + At least one component must be present. + Alespoň jedna součást musí být přítomna. + + + In a namespace constructor, the value for a namespace value cannot be an empty string. + Ve staviteli jmenného prostoru nesmí mýt hodnota jmenného prostoru prázdným řetězcem. + + + + An attribute by name %1 has already been created. + Již byla vytvořena jedna vlastnost s názvem %1. + + + + An argument by name %1 has already been declared. Every argument name must be unique. + Již existuje jeden argument s názvem %1. Názvy argumentů musí být jednoznačné. + + + + %1 is an invalid flag for regular expressions. Valid flags are: + %1 není pro regulérní výrazy platným příznakem. Platnými příznaky jsou: + + + + At least one %1-element must occur inside %2. + V %2 se musí vyskytovat alespoň jeden %1-prvek. + + + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + Je podporován pouze Unicode Codepoint Collation (%1). %2 není podporován. + + + + Matches are case insensitive + Na psaní velkých/malých písmen není brán zřetel + + + + The name of an extension expression must be in a namespace. + Název výrazu rozšíření se musí nacházet ve jmenném prostoru. + + + + Each name of a template parameter must be unique; %1 is duplicated. + Názvy parametrů předloh musí být jednoznačné, %1 již existuje. + + + + At least one mode must be specified in the %1-attribute on element %2. + Ve %1-vlastnosti prvku %2 musí být zadán alespoň jeden způsob. + + + + %1 matches newline characters + Výraz '%1' odpovídá znakům pro nový řádek + + + + Year %1 is invalid because it begins with %2. + %1 není platným údajem pro rok, protože začíná %2. + + + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + Druhý argument %1 nemůže být typ %2. Musí to být typ %3, %4 nebo %5. + + + + Element %1 cannot have children. + Prvek %1 nemůže mít podprvky. + + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + Prvek %2 může mít jen vlastnost %3 nebo vlastnosti, které jsou obvyklé, ne však %1. + + + + Only one %1-element can appear. + Může být jen jeden jediný %1-prvek. + + + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + Název počítané vlastnosti nesmí mít jmenný prostor-URI %1 s místním názvem %2. + + + + A positional predicate must evaluate to a single numeric value. + Poziční přísudek se musí vyhodnotit jako jednoduchá, číselná hodnota. + + + + Element %1 can't be serialized because it appears outside the document element. + Prvek %1 nemůže být vydáván na pokračování, protože se objevuje mimo prvky dokumentu. + + + + %1 and %2 match the start and end of a line. + Výrazy %1 a %2 vždy odpovídají začátku nebo konci libovolného řádku. + + + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + Je zpracováván jeden XSL-T 1.0 stylový list jedním procesorem verze 2.0. + + + + A stylesheet function must have a prefixed name. + Název funkce stylového listu musí mít předponu. + + + + %1 cannot be retrieved + %1 nelze určit + + + It's not possible to cast the value %1 of type %2 to %3 + Nelze provést operaci předvedení hodnoty %1 typu %2 k %3 + + + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + Hodnota XSL-T vlastnosti verze musí být hodnotou typu %1, což není případ %2. + + + + In a namespace constructor, the value for a namespace cannot be an empty string. + Ve staviteli jmenného prostoru nesmí mýt hodnota jmenného prostoru prázdným řetězcem. + + + + The prefix %1 cannot be bound. + Předponu %1 nelze spojit. + + + + The prefix must be a valid %1, which %2 is not. + Předpona musí být platný %1, což není případ %2. + + + + The keyword %1 cannot occur with any other mode name. + Klíčové slovo %1 se nemůže používat dohromady s jiným názvem způsobu. + + + + Type error in cast, expected %1, received %2. + Chyba psaní u operace předvedení, bylo očekáváno %1, ale přijato %2. + + + + %1 is not a valid numeric literal. + %1 není platný číselný údaj tvořený písmeny. + + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + %1 má jen %n argument; údaj %2 z tohoto důvodu neplatný. + %1 má jen %n argumenty; údaj %2 z tohoto důvodu neplatný. + %1 má jen %n argumenty; údaj %2 z tohoto důvodu neplatný. + + + + Circularity detected + byla zjištěna cirkulární závislost + + + + A variable by name %1 has already been declared. + Proměnná s názvem %1 již byla prohlášena. + + + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + Předpona %1 nemůže být spojena. Ve výchozím nastavení je již spojena se jmenným prostorem %2. + + + An %1-attribute must have a valid %2 as value, which %3 isn't. + Vlastnost s názvem %1 musí mít platnou %2-hodnotu. %3 není platnou hodnotou. + + + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + Prvek %1 nesmí mít vlastnost %3 nebo %4, pokud nemá vlastnost %2. + + + + A function already exists with the signature %1. + Již existuje funkce s podpisem %1. + + + + When casting to %1 from %2, the source value cannot be %3. + U operace předvedení z %1 do %2 nesmí být zdrojová hodnota %3. + + + + Attribute %1 can't be serialized because it appears at the top level. + Vlastnost %1 nemůže být vydáván na pokračování, protože se objevuje na nejvyšší rovině. + + + No comparisons can be done involving the type %1. + S typem %1 nemohou být prováděny žádné srovnávací operace. + + + + No value is available for the external variable by name %1. + Pro vnější proměnnou s názvem %1 není dostupná žádná hodnota. + + + + The value of attribute %1 must of type %2, which %3 isn't. + Hodnota vlastnosti %1 musí být typu %2. %3 není platnou hodnotou. + + + + The item %1 did not match the required type %2. + Prvek %1 neodpovídá požadovanému typu %2. + + + + Element %1 cannot have a sequence constructor. + Prvek %1 nemůže mít stavitele posloupnosti. + + + + When attribute %1 is present on %2, a sequence constructor cannot be used. + Nelze používat žádného stavitele posloupnosti, když %2 má vlastnost %1. + + + + one or more + jeden nebo více + + + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + Kódování %1 je neplatné; smí sestávat pouze z latinských písmen a musí odpovídat pravidelnéu výrazu %2. + + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + %1 vyžaduje alespoň %n argument; údaj %2 je z toho důvodu neplatný. + %1 vyžaduje alespoň %n argumenty; údaj %2 je z toho důvodu neplatný. + %1 vyžaduje alespoň %n argumenty; údaj %2 je z toho důvodu neplatný. + + + + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + %2 není platným cílovým názvem pokynu pro zpracování, protože tento nesmí být %1 (nehledě na psaní velkých/malých písmen). + + + + The focus is undefined. + Není stanoveno ohnisko. + + + + + %1 is an unknown schema type. + %1 je neznámým typem schematu. + + + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + Hodnota vlastnosti %1 prvku %2 může být jen %3 nebo %4, ne však %5. + + + + In the replacement string, %1 must be followed by at least one digit when not escaped. + V nahrazovacím řetězci musí po %1 následovat alespoň jedna číslice, když není chráněn znakem Escape. + + + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + V XSL-T vyhledávacím vzoru se smějí používat jen osy %2 nebo %3, ne však %1. + + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + Jmenný prostor uživatelem stanovené funkce nesmí být prázdný (pro tento účel je předstanovená předpona %1) + + + The first operand in an integer division, %1, cannot be infinity (%2). + První veličina, operand, celočíselného dělení %1 nesmí být nekonečno (%2). + + + + %1 is not a valid value of type %2. + %1 není platnou hodnotou typu %2. + + + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + Násobení hodnoty typu %1 s %2 nebo %3 (kladné nebo záporné nekonečno) není přípustné. + + + + The variable %1 is unused + Proměnná %1 se nepoužívá + + + + The %1-axis is unsupported in XQuery + Osa %1 není v XQuery podporována + + + + A direct element constructor is not well-formed. %1 is ended with %2. + Byl nalezen chybný stavitel přímého prvku. %1 končí %2. + + + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + Dělení hodnoty typu %1 prostřednictvím %2 nebo %3 (kladná nebo záporná nula) není přípustné. + + + + Attribute %1 cannot have the value %2. + Vlastnost %1 nesmí mít hodnotu %2. + + + + It will not be possible to retrieve %1. + %1 nelze určit. + + + + In an XSL-T pattern, function %1 cannot have a third argument. + V XSL-T vyhledávacím vzoru nesmí mít funkce %1 třetí argument. + + + + The namespace URI in the name for a computed attribute cannot be %1. + URI jmenného prostoru v názvu vypočítané vlastnosti nesmí být %1. + + + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + %1 není platným cílovým názvem pokynu pro zpracování. Musí to být hodnota %2 jakou je například %3. + + + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + %1 je složeným typem. Operace předvedení u složených typů není možná. Mohou se ovšem provádět operace obsazení u atomárních typů jako %2. + + + + zero or one + žádný nebo jeden + + + No operand in an integer division, %1, can be %2. + U celočíselného dělení %1 nesmí být veličina, operand, %2. + + + The element with local name %1 does not exist in XSL-T. + V XSL-T neexistuje žádný prvek s místním názvem %1. + + + + Two namespace declaration attributes have the same name: %1. + Byly nalezeny dvě vlastnosti prohlášení jmenného prostoru se stejným názvem (%1). + + + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + Skutečná Booleanská hodnota nemůže být vypočítána pro posloupnost ze dvou nebo více atomárních hodnot. + + + + + %1 is an invalid %2 + %1 je neplatný %2 + + + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + První argument k %1 nesmí být typu %2; musí to být číselný typ, xs:yearMonthDuration nebo xs:dayTimeDuration. + + + + Division (%1) by zero (%2) is undefined. + Dělení (%1) nulou (%2) není stanoveno. + + + + No template by name %1 exists. + Neexistuje žádná předloha s názvem %1. + + + The attribute %1 must appear on element %2. + Prvek %2 musí mít vlastnost %1. + + + + An attribute by name %1 has already appeared on this element. + Prvek má již vlastnost s názvem %1. + + + + The default collection is undefined + Pro sbírku není stanovena žádná předloha + + + + Only the prefix %1 can be bound to %2 and vice versa. + S %2 může být spojena pouze předpona %1 (a obráceně). + + + + Value %1 of type %2 exceeds maximum (%3). + Hodnota %1 typu %2 překračuje maximum (%3). + + + + Whitespace characters are removed, except when they appear in character classes + Prázdné znaky jsou odstraněny v případě, že se neobjeví ve znakových třídách + + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + Nemohou se provádět žádné operace předvedení k typu %1, protože je to abstraktní typ ist a nelze je doložit příkladem. + + + + Operator %1 cannot be used on type %2. + Operátor %1 nelze použít na typ %2. + + + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + Jmenný prostor %1 je vyhrazen a z toho důvodu jej nemohou používat uživatelem stanovené funkce (pro tento účel je tu předstanovená předpona %2). + + + + The target namespace of a %1 cannot be empty. + Cílový jmenný prostor %1 nesmí být prázdný. + + + + %1 must be followed by %2 or %3, not at the end of the replacement string. + Po %1 musí následovat %2 nebo %3; nesmí se objevit na konci nahrazovacího řetězce. + + + + %1 is an invalid namespace URI. + %1 není platným jmenným prostorem-URI. + + + + + The attribute %1 cannot appear on %2, when it is a child of %3. + %2 nesmí mít vlastnost %1 v případě, že je potomkem %3. + + + + The attribute %1 can only appear on the first %2 element. + Pouze první %2-prvek smí mít vlastnost %1. + + + + Element %1 must have either a %2-attribute or a sequence constructor. + Prvek %1 musí mít buď jednu %2-vlastnost nebo se musí používat stavitel posloupnosti. + + + + Module imports must occur before function, variable, and option declarations. + Zavedení modulů musí nastat před prohlášeními funkcí, proměnných a voleb. + + + + Day %1 is outside the range %2..%3. + Údaj dne %1 je mimo rozsah %2..%3. + + + + %1 contains octets which are disallowed in the requested encoding %2. + %1 obsahuje oktety, které v kódování %2 nejsou přípustné. + + + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + Výchozí hodnota požadovaného parametru nemůže být zadána ani prostřednictvím %1-vlastnosti ani přes stavitele posloupnosti. + + + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + V XSL-T vyhledávacím vzoru musí být první argument k funkci %1 při použití k hledání řetězec tvořený písmeny. + + + + Text nodes are not allowed at this location. + Na tomto místě nesmí stát žádné textové uzly. + + + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + Hodnoty typu %1 nesmí ýt přísudkem. Pro přísudky jsou přípustné pouze typ číselný nebo účinný booleánský. + + + + %1 is not a valid name for a processing-instruction. + %1 není platným názvem pokynu pro zpracování. + + + + %1 was called. + %1 byl volán. + + + + It's not possible to add attributes after any other kind of node. + Vlastnosti nesmí následovat za jinými druhy uzlů. + + + + At least one %1-element must occur before %2. + Před %2 musí stát alespoň jeden %1-prvek. + + + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + Tato forma normalizování %1 není podporována. Podporovanými formami normalizování jsou %2, %3, %4 a %5, a "žádný" (prázdný znakový řetězec zastupuje "žádné normalizování"). + + + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + U operace představení k typu %1 nebo odvozených typů musí být zdrojovou hodnotou řetězec znaků tvořený písmeny nebo hodnota stejného typu. Typ %2 je neplatný. + + + + A parameter in a function cannot be declared to be a tunnel. + Parameter funkce nelze prohlásit za tunel. + + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + XSL-T vlastnosti XSL-T prvku musí být v nulovém jmenném prostoru, nikoli v XSL-T jmenném prostoru, jako %1. + + + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + Jmenný prostor uživatelem stanovené funkce v modulu knihovny musí odpovídat jmennému prostoru modulu (Jinými slovy by měl být %1 namísto %2) + + + + Day %1 is invalid for month %2. + Ǔdaj o dni %1 je neplatným pro měsíc %2. + + + + Overflow: Can't represent date %1. + Nelze představit datum %1 (Přetečení). + + + + In a simplified stylesheet module, attribute %1 must be present. + Ve zjednodušeném modulu stylového listu musí být přítomna vlastnost %1. + + + + Unknown XSL-T attribute %1. + Neznámá XSL-T vlastnost: %1. + + + + It is not possible to redeclare prefix %1. + Předponu %1 nelze prohlásit. + + + + exactly one + přesně jeden + + + + %1 is an invalid regular expression pattern: %2 + %1 není platným pravidelným výrazem: %2 + + + + Element %1 is not allowed at this location. + Prvek %1 nesmí stát na tomto místě. + + + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + %1-výrazy se nemohou používat, protože funkce prohlášení schématu platným není podporována. + + + + At least one %1 element must appear as child of %2. + Alespoň jeden %1-prvek musí být potomkem %2. + + + + This processor is not Schema-aware and therefore %1 cannot be used. + %1 se nemůže používat, protože tento procesor nepodporuje žádné schéma. + + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + Prvek %2 může mít jen %3 nebo obvyklé vlastnosti, ne však %1. + + + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + Dělení hodnoty typu %1 prostřednictvím %2 (není číselnou hodnotou) není přípustné. + + + + Required cardinality is %1; got cardinality %2. + Požadované kardinální číslo (mohutnost množiny) je %1 (v současnosti %2). + + + A construct was encountered which only is allowed in XQuery. + Tento výtvor je přípustný pouze v XQuery. + + + + No function by name %1 is available. + Neexistuje žádná funkce s názvem %1. + + + + The URI cannot have a fragment + URI nesmí obsahovat kousek + + + + %1 is not an atomic type. Casting is only possible to atomic types. + %1 není atomárním typem. Operace představení se dají provádět pouze s atomárními typy. + + + The first argument to %1 cannot be of type %2. + První argument %1 nemůže být typu %2. + + + + The namespace URI must be a constant and cannot use enclosed expressions. + Jmenný prostor-URI musí být konstantou a nesmí používat vložené výrazy. + + + + Prefix %1 is already declared in the prolog. + Předpona %1 byla prohlášena již v předmluvě (prologu). + + + + Ambiguous rule match. + Víceznačné pravidlo. + + + + Promoting %1 to %2 may cause loss of precision. + Postoupení od %1 k %2 může vést ke ztrátě přesnosti. + + + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + V XSL-T vyhledávacím vzoru se smějí pro srovnávání používat jen funkce %1 a %2, ne však %3. + + + + + A default namespace declaration must occur before function, variable, and option declarations. + Prohlášení výchozích jmenných prostorů musí stát před prohlášeními funkcí-, proměnných- nebo prohlášeními voleb. + + + + Operator %1 cannot be used on atomic values of type %2 and %3. + Operátor %1 se nemůže používat u atomárních hodnot typů %2 a %3. + + + + The module import feature is not supported + Funkce zavedení modulu není podporována + + + + The parameter %1 is passed, but no corresponding %2 exists. + Neexistuje žádný odpovídající %2 pro předaný parameter %1. + + + + A value of type %1 cannot have an Effective Boolean Value. + Hodnota typu %1 nemůže mít žádnou účinnou booleánskou hodnotu. + + + + The data of a processing instruction cannot contain the string %1 + Data pokynu pro zpracování nesmí obsahovat řetězec znaků %1 + + + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + Časový údaj 24:%1:%2.%3 je neplatný. U hodinového údaje je 24, ale minuty, sekundy a milisekundy musí být všechny 0; + + + + A template by name %1 has already been declared. + Předloha s názvem %1 už byla prohlášena. + + + + It is not possible to bind to the prefix %1 + Předponu %1 nelze spojit + + + + Value %1 of type %2 is below minimum (%3). + Hodnota %1 typu %2 zůstává pod minimem (%3). + + + + Required type is %1, but %2 was found. + Požadovaný typ je %1, byl ale zadán %2. + + + + %1 is an unsupported encoding. + Kódování %1 není podporováno. + + + + The name of an option must have a prefix. There is no default namespace for options. + Název volby musí mít předponu. Pro volby není žádná předloha pro jmenný prostor. + + + + Element %1 must come last. + Prvek %1 musí stát jako poslední. + + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + Prvek %2 může mít jen vlastnost %3, %4 nebo vlastnosti, které jsou obvyklé, ne však %1. + + + + No namespace binding exists for the prefix %1 in %2 + Neexistuje žádné svázání jmenného prostoru pro předponu %1 v %2 + + + + The name %1 does not refer to any schema type. + Název %1 nemá žádnou spojitost s jakýmkoli typem schématu. + + + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + Předponu %1 lze spojit pouze s %2. Toto je prohlášeno již dopředu.. + + + + W3C XML Schema identity constraint selector + Přepínač omezení totožnosti W3C XML schéma + + + + W3C XML Schema identity constraint field + Pole omezení totožnosti W3C XML schéma + + + + A construct was encountered which is disallowed in the current language(%1). + Narazilo se na výtvor, který v nynějším jazyce není povolen (%1). + + + + The initialization of variable %1 depends on itself + Inicializace proměnné %1 je závislá na její vlastní hodnotě + + + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + Uzel vlastnosti se nesmí objevit jako potomek uzlu dokumentu. Objevil se uzel vlastnosti s názvem %1, který je proto nevhodný. + + + + Month %1 is outside the range %2..%3. + Údaj o měsíci %1 je mimo rozsah %2..%3. + + + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + Název proměnné úzce spojené s pro-výrazem se musí lišit od poziční proměnné. Dvě proměnné s názvem %1 se z tohoto důvodu střetávají. + + + + No namespace binding exists for the prefix %1 + Neexistuje žádné svázání jmenného prostoru pro předponu %1 + + + An %1-attribute with value %2 has already been declared. + Prvek má již jednu vlastnost s názvem %1 s hodnotou %2. + + + + %1 is not valid as a value of type %2. + %1 není platný jako hodnota typu %2. + + + + zero or more + žádný nebo více + + + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + %1 se nenachází v oblasti pod prohlášením vlastností. Všimněte si, že funkce zavedení schématu není podporována. + + + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + Při použití funkce %1 k vyhodnocování uvnitř vyhledávacího vzoru musí být argumentem odkaz na proměnnou nebo řetězec tvořený písmeny. + + + + %1 is an invalid template mode name. + %1 není platným názvem pro řežim předlohy. + + + + At least one time component must appear after the %1-delimiter. + Po %1-oddělovači se musí objevit alespoň jedna složka času. + + + + Overflow: Date can't be represented. + Nelze představit datum (Přetečení). + + + Operator %1 is not available between atomic values of type %2 and %3. + Operátor %1 se nemůže používat u atomárních hodnot typů %2 a %3. + + + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + Rozdíl v časové zóně musí ležet v oblasti %1..%2 (včetně). %3 leží mimo oblast. + + + + %1 is not a valid XML 1.0 character. + %1 není platný znak XML 1.0. + + + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + První argument %1 nemůže být typu %2. Musí to být typ %3, %4 nebo %5. + + + + %1 is not a whole number of minutes. + %1 není celočíselným údajem o minutách. + + + Failure when casting from %1 to %2: %3 + Operace předvedení od %1 do %2 se nepodařila: %3 + + + It is not possible to cast from %1 to %2. + Nelze provádět žádnou operaci předvedení od %1 do %2. + + + + No variable by name %1 exists + Neexistuje žádná proměnná s názvem %1 + + + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + Jmenný prostor %1 lze spojit pouze s %2. Toto je stanoveno již dopředu. + + + The second operand in a division, %1, cannot be zero (%2). + Druhá veličina, operand, dělení %1 nesmí být nula (%2). + + + + Only one %1 declaration can occur in the query prolog. + Předmluva k dotazu (prolog) smí obsahovat pouze jedno %1-prohlášení. + + + + Element %1 must have at least one of the attributes %2 or %3. + Prvek %1 musí mít alespoň jednu z vlastností %2 nebo %3. + + + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + Když jsou zadány obě hodnoty s časovými zónami, musí mít ten samý rozdíl v časové zóně. %1 a %2 nejsou to samé a jsou tím pádem nepřípustné. + + + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + Nejsou podporovány vnější funkce. Všechny podporované funkce se dají používat přímo, bez toho, že by byly nejprve prohlášeny za vnější + + + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + Poslední krok cesty musí obsahovat buď jen uzly nebo jen atomární hodnoty. Nesmí se vyskytovat společně. + + + + Empty particle cannot be derived from non-empty particle. + Prázdnou částici nelze odvodit z částice, která není prázdná. + + + + Derived particle is missing element %1. + V odvozené částici chybí prvek %1. + + + + Derived element %1 is missing value constraint as defined in base particle. + V odvozeném prvku %1 chybí omezení hodnoty, jak je to stanoveno v základní částici. + + + + Derived element %1 has weaker value constraint than base particle. + Odvozený prvek %1 má slabší omezení hodnoty než má základní částice. + + + + Fixed value constraint of element %1 differs from value constraint in base particle. + Pevné omezení hodnoty prvku %1 se liší od omezení hodnoty základní částici. + + + + Derived element %1 cannot be nillable as base element is not nillable. + Odvozený prvek %1 nemůže mít žádnou vlastnost 'nillable', neboť základní prvek žádnou nestanovuje. + + + + Block constraints of derived element %1 must not be more weaker than in the base element. + Omezení bloku odvozeného prvku %1 nesmí být slabší než v základním prvku. + + + + Simple type of derived element %1 cannot be validly derived from base element. + Jednoduchý typ odvozeného prvku %1 nemůže být platně odvozen ze základního prvku. + + + + Complex type of derived element %1 cannot be validly derived from base element. + Složitý typ odvozeného prvku %1 nemůže být platně odvozen ze základního prvku. + + + + Element %1 is missing in derived particle. + Prvek %1 chybí v odvozené částici. + + + + Element %1 does not match namespace constraint of wildcard in base particle. + Prvek %1 neodpovídá omezení jmenného prostoru zástupného symbolu (vzor hledání) v základní částici. + + + + Wildcard in derived particle is not a valid subset of wildcard in base particle. + Zástupný symbol (vzor hledání) v odvozené částici není platnou dílčí množinou zástupného symbolu v základní částici. + + + + processContent of wildcard in derived particle is weaker than wildcard in base particle. + Vlastnost processContent zástupného symbolu (vzor hledání) odvozené částice je slabší než zástupný symbol (vzor hledání) v základní částici. + + + + Derived particle allows content that is not allowed in the base particle. + Odvozená částice dovoluje obsah, který není přípustný pro základní částici. + + + + %1 has inheritance loop in its base type %2. + %1 má ve svém základním typu %2 v kruzích prováděnou dědičnost. + + + + + Circular inheritance of base type %1. + V kruzích prováděná dědičnost v základním typu %1. + + + + Circular inheritance of union %1. + V kruzích prováděná dědičnost při sjednocení %1. + + + + %1 is not allowed to derive from %2 by restriction as the latter defines it as final. + %1 není dovoleno odvodit z %2 pomocí omezení, neboť posledně uvedený ji určuje jako konečnou. + + + + %1 is not allowed to derive from %2 by extension as the latter defines it as final. + %1 není dovoleno odvodit z %2 pomocí rozšíření, neboť posledně uvedený ji určuje jako konečnou. + + + + Base type of simple type %1 cannot be complex type %2. + Složitý typ %2 nemůže být základním typem jednoduchého typu %1. + + + + Simple type %1 cannot have direct base type %2. + Jednoduchý typ %1 nemůže mít přímý základní typ %2. + + + + + Simple type %1 is not allowed to have base type %2. + Jednoduchý typ %1 nesmí mít základní typ %2. + + + + Simple type %1 can only have simple atomic type as base type. + Jednoduchý typ %1 může mít jen jednoduchý malinký základní typ. + + + + Simple type %1 cannot derive from %2 as the latter defines restriction as final. + Jednoduchý typ %1 nesmí být odvozen z %2 , neboť poslední určuje omezení jako konečné. + + + + + Variety of item type of %1 must be either atomic or union. + Rozmanitost složkových typů %1 musí být buď malinká nebo sjednocení. + + + + + Variety of member types of %1 must be atomic. + Rozmanitost členských typů %1 musí být malinká. + + + + + %1 is not allowed to derive from %2 by list as the latter defines it as final. + %1 není dovoleno odvodit z %2 pomocí seznamu, neboť posledně uvedený ji určuje jako konečnou. + + + + Simple type %1 is only allowed to have %2 facet. + Jednoduchý typ %1 může mít jen stránky %2. + + + + Base type of simple type %1 must have variety of type list. + Základní typ jednoduchého typu %1 musí mít rozmanitost seznamu typů. + + + + Base type of simple type %1 has defined derivation by restriction as final. + Základní typ jednoduchého typu %1 určuje sjednocení pomocí omezení jako konečné. + + + + Item type of base type does not match item type of %1. + Složkový typ základního typu neodpovídá složkovému typu %1. + + + + + Simple type %1 contains not allowed facet type %2. + Jednoduchý typ %1 obsahuje nedovolený typ stránky %2. + + + + + %1 is not allowed to derive from %2 by union as the latter defines it as final. + %1 není dovoleno odvodit z %2 pomocí sjednocení, neboť posledně uvedený ji určuje jako konečnou. + + + + %1 is not allowed to have any facets. + %1 nesmí mít žádné stránky. + + + + Base type %1 of simple type %2 must have variety of union. + Základní typ %1 jednoduchého typu %2 musí mít rozmanitost sjednocení typů. + + + + Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute. + Základní typ %1 jednoduchého typu %2 nesmí mít žádné omezení vlastnosti %3. + + + + Member type %1 cannot be derived from member type %2 of %3's base type %4. + Členský typ %1 nemůže být odvozen z členského typu %2 ze základního typu %4 %3. + + + + Derivation method of %1 must be extension because the base type %2 is a simple type. + Rozšíření s musí používat jako způsob dědičnosti (odvození) pro %1, neboť základní typ %2 je jednoduchým typem. + + + + Complex type %1 has duplicated element %2 in its content model. + Složitý typ %1 má zdvojený prvek %2 ve svém modelu obsahu. + + + + Complex type %1 has non-deterministic content. + Složitý typ %1 má ne-neměnný obsah. + + + + Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3. + Vlastnosti složitého typu %1 nejsou žádným platným rozšířením vlastností základního typu %2: %3. + + + + Content model of complex type %1 is not a valid extension of content model of %2. + Model obsahu složitého typu %1 není žádným platným rozšířením modelu obsahu %2. + + + + Complex type %1 must have simple content. + Složitý typ %1 musí mít jednoduchý obsah. + + + + Complex type %1 must have the same simple type as its base class %2. + Složitý typ %1 musí mít jednoduchý obsah. + + + + Complex type %1 cannot be derived from base type %2%3. + Složitý typ %2 nemůže být odvozen ze základního typu %2%3. + + + + Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3. + Vlastnosti složitého typu %1 nejsou žádným platným omezením vlastností základního typu %2: %3. + + + + Complex type %1 with simple content cannot be derived from complex base type %2. + Složitý typ %1 s jednoduchým obsahem nemůže být odvozen ze složitého základního typu %2. + + + + Item type of simple type %1 cannot be a complex type. + Složkový typ jednoduchého typu %1 nemůže být složitým typem. + + + + Member type of simple type %1 cannot be a complex type. + Členský typ jednoduchého typu %1 nemůže být složitým typem. + + + + %1 is not allowed to have a member type with the same name as itself. + %1 nesmí mít členský typ se stejným názvem, jaký má sám. + + + + + + %1 facet collides with %2 facet. + Stránka %1 se střetává se stránkou %2. + + + + %1 facet must have the same value as %2 facet of base type. + Stránka %1 musí mít tutéž hodnotu, jakou má stránka %2 základního typu. + + + + %1 facet must be equal or greater than %2 facet of base type. + Stránka %1 musí být stejná nebo větší než stránka %2 základního typu. + + + + + + + + + + + %1 facet must be less than or equal to %2 facet of base type. + Stránka %1 musí být menší nebo stejná jako stránka %2 základního typu. + + + + %1 facet contains invalid regular expression + Stránka %1 obsahuje neplatný pravidelný výraz + + + + Unknown notation %1 used in %2 facet. + Stránka %2 obsahuje neplatné zaznamenání %1. + + + + %1 facet contains invalid value %2: %3. + Stránka %1 obsahuje neplatnou hodnotu %2: %3. + + + + %1 facet cannot be %2 or %3 if %4 facet of base type is %5. + Stránka %1 nesmí být %2 nebo %3, pokud je stránka %4 základního typu %5. + + + + %1 facet cannot be %2 if %3 facet of base type is %4. + Stránka %1 nesmí být %2, pokud je stránka %3 základního typu %4. + + + + + + %1 facet must be less than or equal to %2 facet. + Stránka %1 musí být menší nebo stejná jako stránka %2. + + + + + + %1 facet must be less than %2 facet of base type. + Stránka %1 musí být menší než stránka %2 základního typu. + + + + + %1 facet and %2 facet cannot appear together. + Stránky %1 a %2 se nemohou objevit spolu. + + + + + + %1 facet must be greater than %2 facet of base type. + Stránka %1 musí být větší než stránka %2 základního typu. + + + + + %1 facet must be less than %2 facet. + Stránka %1 musí být menší než stránka %2. + + + + + %1 facet must be greater than or equal to %2 facet of base type. + Stránka %1 musí být větší nebo stejná jako stránka %2 základního typu. + + + + Simple type contains not allowed facet %1. + Jednoduchý typ obsahuje nedovolenou stránku %1. + + + + %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list. + Stránky %1, %2, %3, %4, %5 a %6 nejsou při odvození (dědičnosti) pomocí seznamu dovoleny. + + + + Only %1 and %2 facets are allowed when derived by union. + Při odvození (dědičnosti) pomocí sjednocení jsou dovoleny pouze stránky %1 a %2. + + + + + %1 contains %2 facet with invalid data: %3. + %1 obsahuje stránku %2 s neplatnými daty: %3. + + + + Attribute group %1 contains attribute %2 twice. + Skupina vlastností %1 obsahuje vlastnost %2 dvakrát. + + + + Attribute group %1 contains two different attributes that both have types derived from %2. + Skupina vlastností %1 obsahuje dvě rozdílné vlastnosti, obě s typy, které jsou odvozeny z %2. + + + + Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3. + Skupina vlastností %1 obsahuje vlastnost %2 s omezením hodnoty, typ je ale odvozen z %3. + + + + Complex type %1 contains attribute %2 twice. + Složitý typ %1 obsahuje vlastnost %2 dvakrát. + + + + Complex type %1 contains two different attributes that both have types derived from %2. + Složitý typ %1 obsahuje dvě rozdílné vlastnosti, obě s typy, které jsou odvozeny z %2. + + + + Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3. + Složitý typ %1 obsahuje vlastnost %2 s omezením hodnoty, typ je ale odvozen z %3. + + + + Element %1 is not allowed to have a value constraint if its base type is complex. + Prvek %1 nesmí mít omezení hodnoty, když je základní typ složitý. + + + + Element %1 is not allowed to have a value constraint if its type is derived from %2. + Prvek %1 nesmí mít omezení hodnoty, když je jeho typ odvozen z %2. + + + + + Value constraint of element %1 is not of elements type: %2. + Omezení hodnoty prvku %1 není z typu prvku: %2. + + + + Element %1 is not allowed to have substitution group affiliation as it is no global element. + Prvek %1 nesmí patřit k skupině nahrazení, neboť není celkovým prvkem. + + + + Type of element %1 cannot be derived from type of substitution group affiliation. + Typ prvku %1 nemůže být odvozen z typu příslušné skupiny nahrazení. + + + + Value constraint of attribute %1 is not of attributes type: %2. + Omezení hodnoty vlastnosti %1 není z typu vlastnosti: %2. + + + + Attribute %1 has value constraint but has type derived from %2. + Vlastnost %1 má mezení hodnoty, ale její typ je odvozen z %2. + + + + %1 attribute in derived complex type must be %2 like in base type. + Vlastnost %1 v odvozeném složitém typu musí být jako v základním typu %2. + + + + Attribute %1 in derived complex type must have %2 value constraint like in base type. + Vlastnost %1 v odvozeném složitém typu musí mít omezení hodnoty jako v základním typu %2. + + + + Attribute %1 in derived complex type must have the same %2 value constraint like in base type. + Vlastnost %1 v odvozeném složitém typu musí mít stejné omezení hodnoty %2 jako v základním typu. + + + + Attribute %1 in derived complex type must have %2 value constraint. + Vlastnost %1 v odvozeném složitém typu musí omezení hodnoty %2. + + + + processContent of base wildcard must be weaker than derived wildcard. + Vlastnost 'processContent' základního zástupného symbolu (vzor hledání) musí být slabší než odvozený zástupný symbol (vzor hledání). + + + + + Element %1 exists twice with different types. + Prvek %1 existuje dvakrát s rozdílnými typy. + + + + Particle contains non-deterministic wildcards. + Částice obsahuje ne-neměnné zástupné symboly (vzory hledání). + + + + + Base attribute %1 is required but derived attribute is not. + Základní vlastnost %1 je vyžadována, ale odvozená vlastnost není. + + + + Type of derived attribute %1 cannot be validly derived from type of base attribute. + Typ odvozené vlastnosti %1 nemůže být platně odvozen z typu základní vlastnosti. + + + + Value constraint of derived attribute %1 does not match value constraint of base attribute. + Omezení hodnoty odvozené vlastnosti %1 neodpovídá omezení hodnoty základní vlastnosti. + + + + Derived attribute %1 does not exists in the base definition. + Odvozená vlastnost %1 neexistuje v základním vymezení. + + + + Derived attribute %1 does not match the wildcard in the base definition. + Odvozená vlastnost %1 neodpovídá zástupnému symbolu (vzoru hledání) v základním vymezení. + + + + Base attribute %1 is required but missing in derived definition. + Základní vlastnost %1 je vyžadována, ale chybí v odvozeném vymezení. + + + + Derived definition contains an %1 element that does not exists in the base definition + Odvozené vymezení obsahuje prvek %1, který v základním vymezení neexistuje + + + + Derived wildcard is not a subset of the base wildcard. + Odvozený zástupný symbol (vzor hledání) není žádnou dílčí množinou základního zástupného symbolu (vzoru hledání). + + + + %1 of derived wildcard is not a valid restriction of %2 of base wildcard + Vlastnost %1 odvozeného zástupného symbolu (vzoru hledání) není platným omezením %2 základního zástupného symbolu (vzoru hledání) + + + + Attribute %1 from base type is missing in derived type. + Vlastnost %1 základního typu chybí v odvozeném typu. + + + + Type of derived attribute %1 differs from type of base attribute. + Typ odvozené vlastnosti %1 se liší od typu základní vlastnosti. + + + + Base definition contains an %1 element that is missing in the derived definition + Základní vymezení obsahuje prvek %1, který v odvozeném vymezení chybí + + + + Can not process unknown element %1, expected elements are: %2. + Nelze zpracovat neznámý prvek %1, očekávanými prvky jsou: %2. + + + + Element %1 is not allowed in this scope, possible elements are: %2. + Prvek %1 není v této oblasti dovolen; možnými prvky jsou: %2. + + + + Child element is missing in that scope, possible child elements are: %1. + Podprvek v oblasti chybí; možnými podprvky jsou: %1. + + + + Document is not a XML schema. + Dokument není schématem XML. + + + + %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4. + Vlastnost %1 prvku %2 obsahuje neplatný obsah: {%3} není hodnotou typu %4. + + + + %1 attribute of %2 element contains invalid content: {%3}. + Vlastnost %1 prvku %2 obsahuje neplatný obsah: {%3}. + + + + Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema. + Cílový jmenný prostor %1 zahrnutého schématu se liší od jím vymezeného cílového jmenného prostoru %2. + + + + + Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema. + Cílový jmenný prostor %1 zavedeného schématu se liší od jím vymezeného cílového jmenného prostoru %2. + + + + %1 element is not allowed to have the same %2 attribute value as the target namespace %3. + Prvek %1 nemůže stanovit cílový jmenný prostor %3 jako hodnotu vlastnosti %2. + + + + %1 element without %2 attribute is not allowed inside schema without target namespace. + Ve schématu bez jmenného prostoru musí mít prvek %1 vlastnost %2. + + + + + %1 element is not allowed inside %2 element if %3 attribute is present. + Když je přítomna vlastnost %3, nesmí se vyskytovat prvek %1 v prvku %2. + + + + + + %1 element has neither %2 attribute nor %3 child element. + Prvek %1 nemá ani vlastnost %2 ani podprvek %3. + + + + + + + + + + + + + + + + + %1 element with %2 child element must not have a %3 attribute. + Prvek %1 nesmí mít vlastnost %3, když existuje podprvek %2. + + + + %1 attribute of %2 element must be %3 or %4. + Vlastnost %1 prvku %2 může být jen %3 nebo %4. + + + + %1 attribute of %2 element must have a value of %3. + Vlastnost %1 prvku %2 musí mít hodnotu %3. + + + + + %1 attribute of %2 element must have a value of %3 or %4. + Vlastnost %1 prvku %2 může mít jen jednu z hodnot %3 nebo %4. + + + + + + + + + + + + + + + + + %1 element must not have %2 and %3 attribute together. + Vlastnosti %2 a %3 se v prvku %1 nemohou objevit společně. + + + + + Content of %1 attribute of %2 element must not be from namespace %3. + Obsah vlastnosti %1 prvku %2 nemůže pocházet ze jmenného prostoru %3. + + + + + %1 attribute of %2 element must not be %3. + Vlastnost %1 prvku %2 nemůže být %3. + + + + %1 attribute of %2 element must have the value %3 because the %4 attribute is set. + Vlastnost %1 prvku %2 musí mít hodnotu %3, protože je nastavena vlastnost %4. + + + + Specifying use='prohibited' inside an attribute group has no effect. + Zadání use='prohibited' ve skupině vlastností nemá naprosto žádný účinek. + + + + %1 element must have either %2 or %3 attribute. + Prvek %1 musí mít buď vlastnost %2 nebo %3. + + + + %1 element must have either %2 attribute or %3 or %4 as child element. + Prvek %1 musí mít buď vlastnost %2, nebo mít %3 nebo %4 jako podprvek. + + + + %1 element requires either %2 or %3 attribute. + Prvek %1 vyžaduje buď vlastnost %2 nebo %3. + + + + Text or entity references not allowed inside %1 element + Text nebo odkazy na entitu nejsou v prvku %1 dovoleny + + + + + %1 attribute of %2 element must contain %3, %4 or a list of URIs. + Vlastnost %1 prvku %2 musí obsahovat %3, %4 nebo seznam adres (URL). + + + + %1 element is not allowed in this context. + Prvek %1 není v této souvislosti dovolen. + + + + %1 attribute of %2 element has larger value than %3 attribute. + Hodnota vlastnosti %1 prvku %2 je větší než hodnota vlastnosti %3. + + + + Prefix of qualified name %1 is not defined. + Předpona způsobilého názvu %1 není stanovena. + + + + + %1 attribute of %2 element must either contain %3 or the other values. + Hodnota vlastnosti %1 prvku %2 musí obsahovat buď %3 nebo jiné hodnoty. + + + + Component with id %1 has been defined previously. + Součást s ID %1 je již stanovena. + + + + Element %1 already defined. + Prvek %1 je již stanoven. + + + + Attribute %1 already defined. + Vlastnost %1 je již stanovena. + + + + Type %1 already defined. + Typ %1 je již stanoven. + + + + Attribute group %1 already defined. + Skupina vlastností %1 je již stanovena. + + + + Element group %1 already defined. + Skupina prvků %1 je již stanovena. + + + + Notation %1 already defined. + Zápis %1 je již stanoven. + + + + Identity constraint %1 already defined. + Omezení totožnosti %1 je již stanoveno. + + + + Duplicated facets in simple type %1. + Zdvojené stránky v jednoduchém typu %1. + + + + %1 references unknown %2 or %3 element %4. + %1 odkazuje na neznámý prvek %4 (%2 nebo %3). + + + + %1 references identity constraint %2 that is no %3 or %4 element. + %1 odkazuje na omezení totožnosti %2, které není ani prvek '%3' ani '%4'. + + + + %1 has a different number of fields from the identity constraint %2 that it references. + U %1 se liší počet polí od omezení totožnosti %2, na kterou odkazuje. + + + + Base type %1 of %2 element cannot be resolved. + Základní typ %1 prvku %2 nemůže být vyřešen. + + + + Item type %1 of %2 element cannot be resolved. + Složkový typ %1 prvku %2 nemůže být vyřešen. + + + + Member type %1 of %2 element cannot be resolved. + Členský typ %1 prvku %2 nemůže být vyřešen. + + + + + + Type %1 of %2 element cannot be resolved. + Typ %1 prvku %2 nemůže být vyřešen. + + + + Base type %1 of complex type cannot be resolved. + Základní typ %1 složitého typu nemůže být vyřešen. + + + + %1 cannot have complex base type that has a %2. + %1 nelze mít žádný složitý základní typ, který má %2. + + + + Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type. + Model obsahu složitého typu %1 obsahuje prvek %2; nelze jej proto odvodit pomocí rozšíření z ne-prázdného typu. + + + + Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model. + Složitý typ %1 nemůže být odvozen pomocí rozšíření z %2, neboť poslední obsahuje prvek '%3' ve svém modelu obsahu. + + + + Type of %1 element must be a simple type, %2 is not. + Typ prvku %1 musí být jednoduchým prvkem, což %2 není. + + + + Substitution group %1 of %2 element cannot be resolved. + Skupina nahrazení %1 prvku %2 nemůže být vyřešena. + + + + Substitution group %1 has circular definition. + Skupina nahrazení %1 má v kruzích prováděné vymezení. + + + + + Duplicated element names %1 in %2 element. + Název prvku %1 se vyskytuje v prvku %2 vícekrát. + + + + + + + Reference %1 of %2 element cannot be resolved. + Odkaz %1 prvku %2 nemůže být vyřešen. + + + + Circular group reference for %1. + V kruzích prováděný skupinový odkaz pro %1. + + + + %1 element is not allowed in this scope + Prvek %1 není v této oblasti dovolen + + + + %1 element cannot have %2 attribute with value other than %3. + Hodnota vlastnosti %2 prvku %1 může být pouze %3. + + + + %1 element cannot have %2 attribute with value other than %3 or %4. + Hodnota vlastnosti %2 prvku %1 může být pouze %3 nebo %4. + + + + %1 or %2 attribute of reference %3 does not match with the attribute declaration %4. + Vlastnost %1 nebo %2 odkazu %3 neodpovídá prohlášení vlastnosti %4. + + + + Attribute group %1 has circular reference. + Skupina vlastnosti %1 má kruzích prováděný odkaz. + + + + %1 attribute in %2 must have %3 use like in base type %4. + Vlastnost %1 v %2 musí mít použití '%3' jako v základním typu %4. + + + + Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2. + Zástupný symbol vlastnosti (vzor hledání) %1není platným omezením zástupného symbolu vlastnosti (vzoru hledání) základního typu %2. + + + + %1 has attribute wildcard but its base type %2 has not. + %1 má zástupný symbol vlastnosti (vzor hledání), ale jeho základní typ %2 nemá. + + + + Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible. + Sjednocení zástupného symbolu vlastnosti (vzoru hledání) typu %1 a zástupného symbolu vlastnosti (vzoru hledání) jeho základního typu %2 není vyjádřitelné. + + + + Enumeration facet contains invalid content: {%1} is not a value of type %2. + Výčtová stránka obsahuje neplatný obsah: {%1} není hodnotou typu %2. + + + + Namespace prefix of qualified name %1 is not defined. + Předpona jmenného prostoru způsobilého názvu %1 není stanovena. + + + + + %1 element %2 is not a valid restriction of the %3 element it redefines: %4. + Prvek %2 (%1) není platným omezením přepisovaného prvku (%3): %4. + + + + + + %1 is not valid according to %2. + %1 je podle %2 neplatné. + + + + String content does not match the length facet. + Obsah řetězce znaků neodpovídá stránce délky. + + + + String content does not match the minLength facet. + Obsah řetězce znaků neodpovídá stránce délky (nejmenší údaj, 'minLength'). + + + + String content does not match the maxLength facet. + Obsah řetězce znaků neodpovídá stránce délky (největší údaj; 'maxLength'). + + + + String content does not match pattern facet. + Obsah řetězce znaků neodpovídá stránce vzoru pro hledání. + + + + String content is not listed in the enumeration facet. + Obsah řetězce znaků není obsažen ve výčtové stránce. + + + + Signed integer content does not match the maxInclusive facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce 'maxInclusive'. + + + + Signed integer content does not match the maxExclusive facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce 'maxExclusive'. + + + + Signed integer content does not match the minInclusive facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce 'minInclusive'. + + + + Signed integer content does not match the minExclusive facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce 'minExclusive'. + + + + Signed integer content is not listed in the enumeration facet. + Celočíselná hodnota označená znaménkem není obsažena ve výčtové stránce. + + + + Signed integer content does not match pattern facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce vzoru pro hledání. + + + + Signed integer content does not match in the totalDigits facet. + Celočíselná hodnota označená znaménkem neodpovídá stránce 'totalDigits'. + + + + Unsigned integer content does not match the maxInclusive facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'maxInclusive'. + + + + Unsigned integer content does not match the maxExclusive facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'maxExclusive'. + + + + Unsigned integer content does not match the minInclusive facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'minInclusive'. + + + + Unsigned integer content does not match the minExclusive facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'minExclusive'. + + + + Unsigned integer content is not listed in the enumeration facet. + Celočíselná hodnota jsoucí bez znaménka není obsažena ve výčtové stránce. + + + + Unsigned integer content does not match pattern facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce vzoru pro hledání. + + + + Unsigned integer content does not match in the totalDigits facet. + Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'totalDigits'. + + + + Double content does not match the maxInclusive facet. + Číslo s pohyblivou čárkou neodpovídá stránce 'maxInclusive'. + + + + Double content does not match the maxExclusive facet. + Číslo s pohyblivou čárkou neodpovídá stránce 'maxExclusive'. + + + + Double content does not match the minInclusive facet. + Číslo s pohyblivou čárkou neodpovídá stránce 'minInclusive'. + + + + Double content does not match the minExclusive facet. + Číslo s pohyblivou čárkou neodpovídá stránce 'minExclusive'. + + + + Double content is not listed in the enumeration facet. + Číslo s pohyblivou čárkou není obsaženo ve výčtové stránce. + + + + Double content does not match pattern facet. + Číslo s pohyblivou čárkou neodpovídá stránce vzoru pro hledání. + + + + Decimal content does not match in the fractionDigits facet. + Desetinné číslo neodpovídá stránce 'fractionDigits'. + + + + Decimal content does not match in the totalDigits facet. + Desetinné číslo neodpovídá stránce 'totalDigits'. + + + + Date time content does not match the maxInclusive facet. + Údaj o datu neodpovídá stránce 'maxInclusive'. + + + + Date time content does not match the maxExclusive facet. + Údaj o datu neodpovídá stránce 'maxExclusive'. + + + + Date time content does not match the minInclusive facet. + Údaj o datu neodpovídá stránce 'minInclusive'. + + + + Date time content does not match the minExclusive facet. + Údaj o datu neodpovídá stránce 'minExclusive'. + + + + Date time content is not listed in the enumeration facet. + Údaj o datu není obsažen ve výčtové stránce. + + + + Date time content does not match pattern facet. + Údaj o datu neodpovídá stránce vzoru pro hledání. + + + + Duration content does not match the maxInclusive facet. + Údaj o době trvání neodpovídá stránce 'maxInclusive'. + + + + Duration content does not match the maxExclusive facet. + Údaj o době trvání neodpovídá stránce 'maxExclusive'. + + + + Duration content does not match the minInclusive facet. + Údaj o době trvání neodpovídá stránce 'minInclusive'. + + + + Duration content does not match the minExclusive facet. + Údaj o době trvání neodpovídá stránce 'minExclusive'. + + + + Duration content is not listed in the enumeration facet. + Údaj o době trvání není obsažen ve výčtové stránce. + + + + Duration content does not match pattern facet. + Údaj o době trvání neodpovídá stránce vzoru pro hledání. + + + + Boolean content does not match pattern facet. + Booleánská hodnota neodpovídá stránce vzoru pro hledání. + + + + Binary content does not match the length facet. + Binární obsah neodpovídá stránce délky. + + + + Binary content does not match the minLength facet. + Binární obsah neodpovídá stránce 'minLength'. + + + + Binary content does not match the maxLength facet. + Binární obsah neodpovídá stránce 'maxLength'. + + + + Binary content is not listed in the enumeration facet. + Binární obsah není obsažen ve výčtové stránce. + + + + Invalid QName content: %1. + Obsah způsobilého názvu ('QName') je neplatný: %1. + + + + QName content is not listed in the enumeration facet. + Obsah způsobilého názvu ('QName') není obsažen ve výčtové stránce. + + + + QName content does not match pattern facet. + Obsah způsobilého názvu ('QName') neodpovídá stránce vzoru pro hledání. + + + + Notation content is not listed in the enumeration facet. + Obsah zápisu není obsažen ve výčtové stránce. + + + + List content does not match length facet. + Obsah seznamu neodpovídá stránce délky. + + + + List content does not match minLength facet. + Obsah seznamu neodpovídá stránce 'minLength'. + + + + List content does not match maxLength facet. + Obsah seznamu neodpovídá stránce 'maxLength'. + + + + List content is not listed in the enumeration facet. + Obsah seznamu není obsažen ve výčtové stránce. + + + + List content does not match pattern facet. + Obsah seznamu neodpovídá stránce vzoru pro hledání. + + + + Union content is not listed in the enumeration facet. + Obsah sjednocení není obsažen ve výčtové stránce. + + + + Union content does not match pattern facet. + Obsah sjednocení neodpovídá stránce vzoru pro hledání. + + + + Data of type %1 are not allowed to be empty. + Data typu %1 nemohou být prázdná. + + + + Element %1 is missing child element. + U prvku %1 chybí podprvek. + + + + There is one IDREF value with no corresponding ID: %1. + Existuje hodnota IDREF, pro kterou neexistuje příslušné ID: %1. + + + + Loaded schema file is invalid. + Nahraný soubor se schématem je neplatný. + + + + %1 contains invalid data. + %1 obsahuje neplatná data. + + + + xsi:schemaLocation namespace %1 has already appeared earlier in the instance document. + Jmenný prostor xsi:schemaLocation %1 byl již dříve v případovém dokumentu stanoven. + + + + xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute. + xsi:noNamespaceSchemaLocation se nemůže objevit po prvním prvku nebo vlastnosti bez jmenného prostoru. + + + + No schema defined for validation. + Pro schválení není stanoveno žádné schéma. + + + + No definition for element %1 available. + Pro prvek %1 není dostupné žádné vymezení. + + + + + + Specified type %1 is not known to the schema. + Zadaný typ %1 není ve schématu stanoven. + + + + Element %1 is not defined in this scope. + Prvek %1 není v této oblasti stanoven. + + + + Declaration for element %1 does not exist. + Pro prvek %1 není dostupné žádné prohlášení. + + + + Element %1 contains invalid content. + Prvek %1 obsahuje neplatný obsah. + + + + Element %1 is declared as abstract. + Prvek %1 je prohlášen jako abstraktní. + + + + Element %1 is not nillable. + Prvek %1 nemá zadánu vlastnost 'nillable'. + + + + Attribute %1 contains invalid data: %2 + Vlastnost %1 obsahuje neplatná data: %2 + + + + Element contains content although it is nillable. + Prvek má obsah, ačkoli je 'nillable'. + + + + Fixed value constrained not allowed if element is nillable. + Pevné omezení hodnoty není dovoleno, pokud je prvek 'nillable'. + + + + Specified type %1 is not validly substitutable with element type %2. + Zadaný typ %1 není platně nahraditelný typem prvku %2. + + + + Complex type %1 is not allowed to be abstract. + Složitý typ %1 nemůže být abstraktní. + + + + Element %1 contains not allowed attributes. + Prvek %1 obsahuje nepřípustné vlastnosti. + + + + + Element %1 contains not allowed child element. + Prvek %1 obsahuje nepřípustný podprvek. + + + + + Content of element %1 does not match its type definition: %2. + Obsah prvku %1 neodpovídá vymezení svého typu: %2. + + + + + + Content of element %1 does not match defined value constraint. + Obsah prvku %1 neodpovídá stanovenému omezení hodnoty. + + + + Element %1 contains not allowed child content. + Prvek %1 obsahuje nepřípustný podobsah. + + + + Element %1 contains not allowed text content. + Prvek %1 obsahuje nepřípustný textový obsah. + + + + Element %1 can not contain other elements, as it has a fixed content. + Prvek %1 nesmí obsahovat žádné podprvky, protože má pevný obsah. + + + + Element %1 is missing required attribute %2. + U prvkuk %1 chybí vyžadovaná vlastnost %2. + + + + Attribute %1 does not match the attribute wildcard. + Vlastnost %1 neodpovídá zástupnému symbolu (vzoru hledání) vlastnosti. + + + + Declaration for attribute %1 does not exist. + Pro vlastnost %1 není dostupné žádné prohlášení. + + + + Element %1 contains two attributes of type %2. + Prvek %1 obsahuje dvě vlastnosti typu %2. + + + + Attribute %1 contains invalid content. + Vlastnost %1 obsahuje neplatný obsah. + + + + Element %1 contains unknown attribute %2. + Prvek %1 obsahuje neznámou vlastnost %2. + + + + + Content of attribute %1 does not match its type definition: %2. + Obsah vlastnosti %1 neodpovídá vymezení svého typu: %2. + + + + + Content of attribute %1 does not match defined value constraint. + Obsah vlastnosti %1 neodpovídá stanovenému omezení hodnoty. + + + + Non-unique value found for constraint %1. + Pro omezení %1 byla nalezena ne jednoznačně stanovená hodnota. + + + + Key constraint %1 contains absent fields. + Omezení klíče %1 obsahuje nepřítomná pole. + + + + Key constraint %1 contains references nillable element %2. + Omezení klíče %1 obsahuje odkazy na prvek %2, který je 'nillable'. + + + + No referenced value found for key reference %1. + Odkazovanou hodnotu odkazu na klíč %1 se nepodařilo najít. + + + + More than one value found for field %1. + Pro pole %1 bylo nalezeno více hodnot. + + + + Field %1 has no simple type. + Pole %1 nemá žádný jednoduchý typ. + + + + ID value '%1' is not unique. + Hodnota ID %1 není jednoznačná. + + + + '%1' attribute contains invalid QName content: %2. + Vlastnost %1 obsahuje neplatný způsobilý název: %2. + + + + VolumeSlider + + Muted + Ztlumení + + + Volume: %1% + Hlasitost: %1% + + + diff --git a/translations/qt_help_cs.ts b/translations/qt_help_cs.ts new file mode 100644 index 0000000..15836f1 --- /dev/null +++ b/translations/qt_help_cs.ts @@ -0,0 +1,395 @@ + + + + + QCLuceneResultWidget + + + Search Results + Výsledky hledání + + + + Note: + Poznámka: + + + + The search results may not be complete since the documentation is still being indexed! + Nemusí být ukázány všechny výsledky, protože dokumentace je stále ještě rejstříkována! + + + + Your search did not match any documents. + Nebyly nalezeny žádné dokumenty, které by odpovídaly vašemu hledání. + + + + (The reason for this might be that the documentation is still being indexed.) + (Důvodem pro to by mohlo být, že dokumentace je stále ještě rejstříkována.) + + + + QHelpCollectionHandler + + The collection file is not set up yet! + Soubor se sbírkou ještě není zřízen! + + + + The collection file '%1' is not set up yet! + Soubor se sbírkou '%1' ještě není zřízen! + + + + Cannot load sqlite database driver! + Databázový ovladač pro SQLite nelze nahrát! + + + + + Cannot open collection file: %1 + Nelze otevřít soubor se sbírkou: %1 + + + + Cannot create tables in file %1! + V souboru %1 nelze vytvořit žádné tabulky! + + + + The collection file '%1' already exists! + Soubor se sbírkou '%1' již existuje! + + + + Unknown filter '%1'! + Neznámý filtr '%1'! + + + + Invalid documentation file '%1'! + Neplatný soubor s dokumentací '%1'! + + + + Cannot register namespace '%1'! + Nelze zapsat jmenný prostor %1! + + + + Cannot open database '%1' to optimize! + Databázi '%1' nelze otevřít pro vyladění! + + + The specified collection file already exists! + Zadaný soubor se sbírkou již existuje! + + + + Cannot create directory: %1 + Nelze vytvořit adresář: %1 + + + + Cannot copy collection file: %1 + Nelze kopírovat soubor se sbírkou: %1 + + + Unknown filter! + Neznámý filtr! + + + + Cannot register filter %1! + Nelze zapsat filtr %1! + + + + Cannot open documentation file %1! + Nelze otevřít soubor s dokumentací: %1! + + + Invalid documentation file! + Neplatný soubor s dokumentací! + + + + The namespace %1 was not registered! + Jmenný prostor %1 nebyl zapsán! + + + + Namespace %1 already exists! + Jmenný prostor %1 již existuje! + + + Cannot register namespace! + Jmenný prostor nelze zapsat! + + + Cannot open database to optimize! + Databázi nelze otevřít pro vyladění! + + + + QHelpDBReader + + + Cannot open database '%1' '%2': %3 + The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string + Databázi nelze otevřít: '%1' '%2': %3 + + + + QHelpEngineCore + + + The specified namespace does not exist! + Zadaný jmenný prostor neexistuje! + + + + QHelpEngineCorePrivate + + + Cannot open documentation file %1: %2! + Nelze otevřít soubor s dokumentací %1: %2! + + + + QHelpGenerator + + + Invalid help data! + Neplatná data s nápovědou! + + + + No output file name specified! + Pro výstupní soubor nebyl zadán žádný název! + + + + Building up file structure... + Vytváří se uspořádání souboru... + + + + The file %1 cannot be overwritten! + Soubor %1 nelze přepsat! + + + + Cannot open data base file %1! + Nelze otevřít soubor s databází: %1! + + + + Cannot register namespace %1! + Nelze zapsat jmenný prostor %1! + + + + Insert custom filters... + Vložit uživatelsky stanovené filtry... + + + + Insert help data for filter section (%1 of %2)... + Vložit data s nápovědou pro oddělení s filtrem (%1 von %2) einfügen... + + + + Documentation successfully generated. + Dokumentace byla úspěšně vytvořena. + + + + Some tables already exist! + Některé tabulky již existují! + + + + Cannot create tables! + Tabulky nelze vytvořit! + + + + Cannot register virtual folder! + Virtuální adresář nelze zapsat! + + + + Insert files... + Vložit soubory... + + + + The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it. + Odkazovaný soubor %1 se musí nacházet v adresáři %2 nebo v jeho podadresáři. Přeskakuje se. + + + + The file %1 does not exist! Skipping it. + Soubor %1 neexistuje! Přeskakuje se. + + + + Cannot open file %1! Skipping it. + Soubor %1 nelze otevřít! Přeskakuje se. + + + + The filter %1 is already registered! + Filtr %1 je již zapsán! + + + + Cannot register filter %1! + Nelze zapsat filtr %1! + + + + Insert indices... + Vložit rejstříky... + + + + Insert contents... + Vložit obsah... + + + + Cannot insert contents! + Obsah nelze vložit! + + + + Cannot register contents! + Obsah nelze zapsat! + + + + QHelpSearchQueryWidget + + + Search for: + Hledat: + + + + Previous search + Předchozí hledání + + + + Next search + Další hledání + + + + Search + Hledat + + + + Advanced search + Rozšířené hledání + + + + words <B>similar</B> to: + Slova <B>podobná</B>: + + + + <B>without</B> the words: + <B>beze</B> slov: + + + + with <B>exact phrase</B>: + s <B>přesnou skupinou slov</B>: + + + + with <B>all</B> of the words: + se <B>všemi</B> slovy: + + + + with <B>at least one</B> of the words: + s <B>jakýmkoli</B> ze slov: + + + + QHelpSearchResultWidget + + + 0 - 0 of 0 Hits + 0 - 0 z 0 zásahů + + + + QHelpSearchResultWidgetPrivate + + + %1 - %2 of %3 Hits + %1 - %2 z %3 zásahů + + + + QObject + + + Untitled + Bez názvu + + + + Unknown token. + Neznámý symbol. + + + + Unknown token. Expected "QtHelpProject"! + Neznámý symbol. Byl očekáván "QtHelpProject"! + + + + Error in line %1: %2 + Chyba na řádku %1: %2 + + + + A virtual folder must not contain a '/' character! + Virtuální složka nesmí obsahovat znak '/'! + + + + A namespace must not contain a '/' character! + Jmenný prostor nesmí obsahovat znak '/'! + + + + Missing namespace in QtHelpProject. + Chybějící jmenný prostor QtHelpProject. + + + + Missing virtual folder in QtHelpProject + Chybějící virtuální složka v QtHelpProject. + + + + Missing attribute in keyword at line %1. + Chybějící vlastnost v klíčovém slově na řádku %1. + + + + The input file %1 could not be opened! + Vstupní soubor %1 se nepodařilo otevřít! + + + diff --git a/translations/translations.pri b/translations/translations.pri index 8896654..9c70557 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -17,7 +17,7 @@ LUPDATE += -locations relative -no-ui-lines ###### Qt Libraries -QT_TS = ar da de es fr iw ja_JP pl pt ru sk sl sv uk zh_CN zh_TW +QT_TS = ar cs da de es fr iw ja_JP pl pt ru sk sl sv uk zh_CN zh_TW ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ -I../include -I../include/Qt \ -- cgit v0.12 From 94b3918fb52858064811c4993dac6392d0043b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 2 Feb 2010 15:05:54 +0100 Subject: Implemented QGifHandler::imageCount(). Task-number: QTBUG-7514 Reviewed-by: Kim --- src/plugins/imageformats/gif/qgifhandler.cpp | 235 ++++++++++++++++++++++++++- src/plugins/imageformats/gif/qgifhandler.h | 1 + tests/auto/qimagereader/tst_qimagereader.cpp | 6 + 3 files changed, 241 insertions(+), 1 deletion(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 6f049be..6cd7841 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -72,6 +72,7 @@ public: int decode(QImage *image, const uchar* buffer, int length, int *nextFrameDelay, int *loopCount, QSize *nextSize); + static int imageCount(QIODevice *device); bool newFrame; bool partialNewFrame; @@ -645,6 +646,234 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, return initial-length; } +/*! + Returns the number of images that can be read from \a device. +*/ + +int QGIFFormat::imageCount(QIODevice *device) +{ + if (!device) + return 0; + + qint64 oldPos = device->pos(); + if (!device->seek(0)) + return 0; + + int colorCount = 0; + int localColorCount = 0; + int globalColorCount = 0; + int colorReadCount = 0; + bool localColormap = false; + bool globalColormap = false; + int count = 0; + int blockSize = 0; + bool done = false; + uchar hold[16]; + int imageCount = 0; + State state = Header; + + const int readBufferSize = 40960; // 40k read buffer + QByteArray readBuffer(device->read(readBufferSize)); + + if (readBuffer.isEmpty()) + return 0; + + // this is a specialized version of the state machine from decode(), + // which doesn't do any image decoding or mallocing, and has an + // optimized way of skipping SkipBlocks, ImageDataBlocks and + // Global/LocalColorMaps. + + while (!readBuffer.isEmpty()) { + int length = readBuffer.size(); + const uchar *buffer = (const uchar *) readBuffer.constData(); + while (!done && length) { + length--; + uchar ch = *buffer++; + switch (state) { + case Header: + hold[count++] = ch; + if (count == 6) { + state = LogicalScreenDescriptor; + count = 0; + } + break; + case LogicalScreenDescriptor: + hold[count++] = ch; + if (count == 7) { + globalColormap = !!(hold[4] & 0x80); + globalColorCount = 2 << (hold[4] & 0x7); + count = 0; + colorCount = globalColorCount; + if (globalColormap) { + int colorTableSize = 3 * globalColorCount; + if (length >= colorTableSize) { + // skip the global color table in one go + length -= colorTableSize; + buffer += colorTableSize; + state = Introducer; + } else { + colorReadCount = 0; + state = GlobalColorMap; + } + } else { + state=Introducer; + } + } + break; + case GlobalColorMap: + case LocalColorMap: + hold[count++] = ch; + if (count == 3) { + if (++colorReadCount >= colorCount) { + if (state == LocalColorMap) + state = TableImageLZWSize; + else + state = Introducer; + } + count = 0; + } + break; + case Introducer: + hold[count++] = ch; + switch (ch) { + case 0x2c: + state = ImageDescriptor; + break; + case 0x21: + state = ExtensionLabel; + break; + case 0x3b: + state = Done; + break; + default: + done = true; + state = Error; + } + break; + case ImageDescriptor: + hold[count++] = ch; + if (count == 10) { + localColormap = !!(hold[9] & 0x80); + localColorCount = localColormap ? (2 << (hold[9] & 0x7)) : 0; + if (localColorCount) + colorCount = localColorCount; + else + colorCount = globalColorCount; + imageCount++; + + count = 0; + if (localColormap) { + int colorTableSize = 3 * localColorCount; + if (length >= colorTableSize) { + // skip the local color table in one go + length -= colorTableSize; + buffer += colorTableSize; + state = TableImageLZWSize; + } else { + colorReadCount = 0; + state = LocalColorMap; + } + } else { + state = TableImageLZWSize; + } + } + break; + case TableImageLZWSize: + if (ch > max_lzw_bits) + state = Error; + else + state = ImageDataBlockSize; + count = 0; + break; + case ImageDataBlockSize: + blockSize = ch; + if (blockSize) { + if (length >= blockSize) { + // we can skip the block in one go + length -= blockSize; + buffer += blockSize; + count = 0; + } else { + state = ImageDataBlock; + } + } else { + state = Introducer; + } + break; + case ImageDataBlock: + ++count; + if (count == blockSize) { + count = 0; + state = ImageDataBlockSize; + } + break; + case ExtensionLabel: + switch (ch) { + case 0xf9: + state = GraphicControlExtension; + break; + case 0xff: + state = ApplicationExtension; + break; + default: + state = SkipBlockSize; + } + count = 0; + break; + case ApplicationExtension: + if (count < 11) + hold[count] = ch; + ++count; + if (count == hold[0] + 1) { + state = SkipBlockSize; + count = 0; + } + break; + case GraphicControlExtension: + if (count < 5) + hold[count] = ch; + ++count; + if (count == hold[0] + 1) { + count = 0; + state = SkipBlockSize; + } + break; + case NetscapeExtensionBlockSize: // fallthrough + case SkipBlockSize: + blockSize = ch; + count = 0; + if (blockSize) { + if (length >= blockSize) { + // we can skip the block in one go + length -= blockSize; + buffer += blockSize; + } else { + state = SkipBlock; + } + } else { + state = Introducer; + } + break; + case NetscapeExtensionBlock: // fallthrough + case SkipBlock: + ++count; + if (count == blockSize) + state = SkipBlockSize; + break; + case Done: + done = true; + break; + case Error: + device->seek(oldPos); + return 0; + } + } + readBuffer = device->read(readBufferSize); + } + device->seek(oldPos); + return imageCount; +} + void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb color) { if (w>0) { @@ -766,6 +995,7 @@ QGifHandler::QGifHandler() loopCnt = 0; frameNumber = -1; nextSize = QSize(); + imageCnt = -1; } QGifHandler::~QGifHandler() @@ -883,7 +1113,10 @@ int QGifHandler::nextImageDelay() const int QGifHandler::imageCount() const { - return 0; // Don't know + if (imageCnt != -1) + return imageCnt; + imageCnt = QGIFFormat::imageCount(device()); + return imageCnt; } int QGifHandler::loopCount() const diff --git a/src/plugins/imageformats/gif/qgifhandler.h b/src/plugins/imageformats/gif/qgifhandler.h index a6e520f..830cd38 100644 --- a/src/plugins/imageformats/gif/qgifhandler.h +++ b/src/plugins/imageformats/gif/qgifhandler.h @@ -88,6 +88,7 @@ private: mutable int loopCnt; int frameNumber; mutable QSize nextSize; + mutable int imageCnt; }; QT_END_NAMESPACE diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index b1a5d26..debc090 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -765,6 +765,8 @@ void tst_QImageReader::gifImageCount() QVERIFY(io.canRead()); QImage greenFrame = io.read(); + QVERIFY(io.imageCount() == 4); + QVERIFY(io.canRead()); QImage blueFrame = io.read(); @@ -876,6 +878,10 @@ void tst_QImageReader::gifImageCount() QCOMPARE(blueFrame.size(), QSize(64,64)); QVERIFY(emptyFrame.isNull()); } + { + QImageReader io(":images/trolltech.gif"); + QVERIFY(io.imageCount() == 34); + } } #endif -- cgit v0.12 From 5d17f9735ab30983d71fc4bbfc71c8ed4b563585 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 2 Feb 2010 15:05:40 +0100 Subject: Revert "Improve raster graphics system performance on Mac." This reverts commit f5f62c0bede7b4558b35b595b3b9bc11e0232fac. Breaks the build for the cocoa port. --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 20 -------------------- src/gui/kernel/qcocoaview_mac.mm | 9 ++++----- src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- src/gui/kernel/qwidget.cpp | 15 +-------------- src/gui/kernel/qwidget_mac.mm | 19 ------------------- src/gui/painting/qwindowsurface_raster.cpp | 4 +++- 6 files changed, 9 insertions(+), 60 deletions(-) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 7829a4e..1a265d0 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -51,9 +51,6 @@ NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). ****************************************************************************/ -#include -#include - QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QPointer qt_button_down; //qapplication_mac.cpp @@ -188,20 +185,3 @@ QT_END_NAMESPACE return [super frameViewClassForStyleMask:styleMask]; } -- (void)displayIfNeeded -{ - - QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; - if (qwidget == 0) { - [super displayIfNeeded]; - return; - } - - if (QApplicationPrivate::graphicsSystem() != 0) { - if (QWidgetBackingStore *bs = qt_widget_private(qwidget)->maybeBackingStore()) - bs->sync(qwidget, qwidget->rect()); - } - [super displayIfNeeded]; -} - - diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 2c35be2..d255604 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -520,11 +520,10 @@ extern "C" { - (void)drawRect:(NSRect)aRect { if (QApplicationPrivate::graphicsSystem() != 0) { - if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) { - // Drawing is handled on the window level - // See qcocoasharedwindowmethods_mac_p. - return; - } + if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) + bs->markDirty(qwidget->rect(), qwidget); + qwidgetprivate->syncBackingStore(qwidget->rect()); + return; } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; qwidgetprivate->hd = cg; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 65c04e5..e06a810 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1162,7 +1162,7 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget) CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else - CGContextRef context = reinterpret_cast([[qt_mac_window_for(widget) graphicsContext] graphicsPort]); + CGContextRef context = (CGContextRef)[[NSGraphicsContext graphicsContextWithWindow:qt_mac_window_for(widget)] graphicsPort]; #endif return context; } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 78a25ac..ffad38b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1660,13 +1660,7 @@ void QWidgetPrivate::syncBackingStore() repaint_sys(dirty); dirty = QRegion(); } else if (QWidgetBackingStore *bs = maybeBackingStore()) { -#ifdef QT_MAC_USE_COCOA - Q_UNUSED(bs); - void qt_mac_set_needs_display(QWidget *, QRegion); - qt_mac_set_needs_display(q_func(), QRegion()); -#else bs->sync(); -#endif } } @@ -1674,15 +1668,8 @@ void QWidgetPrivate::syncBackingStore(const QRegion ®ion) { if (paintOnScreen()) repaint_sys(region); - else if (QWidgetBackingStore *bs = maybeBackingStore()) { -#ifdef QT_MAC_USE_COCOA - Q_UNUSED(bs); - void qt_mac_set_needs_display(QWidget *, QRegion); - qt_mac_set_needs_display(q_func(), region); -#else + else if (QWidgetBackingStore *bs = maybeBackingStore()) bs->sync(q_func(), region); -#endif - } } void QWidgetPrivate::setUpdatesEnabled_helper(bool enable) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index b5888b4..78c1562 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -565,25 +565,6 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif -#ifdef QT_MAC_USE_COCOA -void qt_mac_set_needs_display(QWidget *widget, QRegion region) -{ - NSView *theNSView = qt_mac_nativeview_for(widget); - if (region.isNull()) { - [theNSView setNeedsDisplay:YES]; - return; - } - - QVector rects = region.rects(); - for (int i = 0; i Date: Tue, 2 Feb 2010 16:17:53 +0100 Subject: Changelog: Added Designer/uic3 changes for 4.6.2 --- dist/changes-4.6.2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index d35f945..7ab2cde 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -143,7 +143,12 @@ Qt for Windows CE **************************************************************************** - Designer - * foo + * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties + * [QTBUG-6757] Fixed bug where selection handles would be affected by + a style sheet set on the main form. + + - uic3 + * [QTBUG-7404] Added option to preserve layout names set by Qt 3 Designer. - qdoc3 * bar -- cgit v0.12 From 39233f76647e166961c97b38d16f612076eeb9c3 Mon Sep 17 00:00:00 2001 From: ck Date: Tue, 2 Feb 2010 16:21:52 +0100 Subject: Assistant examples: Fix missing QLatin1String. --- examples/assistant/simpletextviewer/findfiledialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp index 0f7bbae..1f11f69 100644 --- a/examples/assistant/simpletextviewer/findfiledialog.cpp +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp @@ -102,7 +102,7 @@ void FindFileDialog::openFile(QTreeWidgetItem *item) if (file.open(QIODevice::ReadOnly)) { QString data(file.readAll()); - if (fileName.endsWith(".html")) + if (fileName.endsWith(QLatin1String(".html"))) currentEditor->setHtml(data); else currentEditor->setPlainText(data); -- cgit v0.12 From 3d2dbeb65089efaff4b92b7d13c13c1a234f71b0 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 2 Feb 2010 16:39:40 +0100 Subject: Avoids a possible crash when saving the state of a main window The crash could appear when saving the state of the main window in response to the visibilityChanged of the dock widgets. Task-number: QTBUG-7838 Reviewed-by: ogoffart --- src/gui/widgets/qmainwindowlayout.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index d1e7285..fc75c92 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1627,6 +1627,13 @@ void QMainWindowLayout::animationFinished(QWidget *widget) tb->d_func()->plug(currentGapRect); #endif + savedState.clear(); + currentGapPos.clear(); + pluggingWidget = 0; + //applying the state will make sure that the currentGap is updated correctly + //and all the geometries (especially the one from the central widget) is correct + layoutState.apply(false); + #ifndef QT_NO_DOCKWIDGET #ifndef QT_NO_TABBAR if (qobject_cast(widget) != 0) { @@ -1637,13 +1644,6 @@ void QMainWindowLayout::animationFinished(QWidget *widget) } #endif #endif - - savedState.clear(); - currentGapPos.clear(); - pluggingWidget = 0; - //applying the state will make sure that the currentGap is updated correctly - //and all the geometries (especially the one from the central widget) is correct - layoutState.apply(false); } if (!widgetAnimator.animating()) { -- cgit v0.12 From bcd979230af769b49a1e3fdb1c9e1103ce2348de Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 2 Feb 2010 08:06:43 -0800 Subject: Add changes for 4.6.2 Mostly DirectFB. Reviewed-by: TrustMe --- dist/changes-4.6.2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 7ab2cde..786efcc 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -110,7 +110,8 @@ Qt for Unix (X11 and Mac OS X) Qt for Linux/X11 ---------------- - + * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap + in Qt/X11. - Qt for Windows @@ -130,7 +131,13 @@ Qt for Embedded Linux DirectFB -------- - + * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap + in DirectFB. + * Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes + QPixmap::scroll + * Fix a rendering issue for semi-transparent top level windows in DirectFB. + * Make it possible to fall back to the raster engine for stretch blits in + DirectFB using QT_NO_DIRECTFB_STRETCHBLIT - Qt for Windows CE -- cgit v0.12 From 85578c6c37d9e4eb0da888937b20ba93a26d8805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 2 Feb 2010 17:39:19 +0100 Subject: 4.6.2 changes --- dist/changes-4.6.2 | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index d35f945..2a884fe 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -46,8 +46,14 @@ QtCore QtGui ----- - - foo - * bar + - QBmpHandler + * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images. + + - QImage + * [QTBUG-7231] Avoid an unnecessary copy in QImage::scaled(). + + - QPDFEngine + * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF engine. QtDBus ------ @@ -64,8 +70,14 @@ QtNetwork QtOpenGL -------- - - foo - * bar + - QGLWidget + * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows. + + - QGLPixelBuffer + * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers. + + - QGL2PaintEngineEx + * [QTBUG-7203] Reset the GL stencil mask, op and function in resetGLState(). QtScript -------- @@ -121,7 +133,8 @@ Qt for Windows Qt for Mac OS X --------------- - - + - QPrintPreviewDialog + * [QTBUG-7481] Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. Qt for Embedded Linux --------------------- -- cgit v0.12 From d5d882280fe9577c580d41f1efb5abbd5d57f6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 2 Feb 2010 17:57:19 +0100 Subject: Fixed a failure in tst_qgl. The assert wrong, it may be that the texture isn't removed from the cache if it doesn't have the MemoryManaged bind option set. Reviewed-by: Samuel --- src/opengl/qgl.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index dd977cb..fce9fdb 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1683,7 +1683,6 @@ void QGLTextureCache::cleanupBeforePixmapDestruction(QPixmapData* pmd) { // Remove any bound textures first: cleanupTextures(pmd); - Q_ASSERT(instance()->getTexture(pmd->cacheKey()) == 0); #if defined(Q_WS_X11) if (pmd->classId() == QPixmapData::X11Class) { -- cgit v0.12 From 335284df68b726bda40094c866c53547c13423d2 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 2 Feb 2010 18:01:09 +0100 Subject: Add auto-generated tests for QScriptValue tst_qscriptvalue_generated.cpp was generated by Jedrzej's generator (see testgen subdirectory). The idea is that the old isXXX and toXXX tests will be replaced entirely by the auto-generated versions, but we keep them for now (with "_old" suffix) until we are sure that the auto-generated versions cover everything. --- tests/auto/qscriptvalue/qscriptvalue.pro | 4 +- tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 158 +- tests/auto/qscriptvalue/tst_qscriptvalue.h | 410 ++ .../qscriptvalue/tst_qscriptvalue_generated.cpp | 6347 ++++++++++++++++++++ 4 files changed, 6836 insertions(+), 83 deletions(-) create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue.h create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro index 9efde80..1588cc5 100644 --- a/tests/auto/qscriptvalue/qscriptvalue.pro +++ b/tests/auto/qscriptvalue/qscriptvalue.pro @@ -1,5 +1,7 @@ load(qttest_p4) QT = core gui script SOURCES += tst_qscriptvalue.cpp +HEADERS += tst_qscriptvalue.h - +# Generated by testgen +SOURCES += tst_qscriptvalue_generated.cpp diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index ef960d0..f83cf58 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -39,14 +39,8 @@ ** ****************************************************************************/ - -#include +#include "tst_qscriptvalue.h" #include -#include - -#include -#include -#include //TESTED_CLASS= //TESTED_FILES= @@ -55,62 +49,70 @@ QT_BEGIN_NAMESPACE extern bool qt_script_isJITEnabled(); QT_END_NAMESPACE -class tst_QScriptValue : public QObject +tst_QScriptValue::tst_QScriptValue() + : engine(0) { - Q_OBJECT +} -public: - tst_QScriptValue(); - virtual ~tst_QScriptValue(); - -private slots: - void ctor(); - void engine(); - void toString(); - void toNumber(); - void toBoolean(); - void toBool(); - void toInteger(); - void toInt32(); - void toUInt32(); - void toUInt16(); - void toVariant(); - void toQObject(); - void toObject(); - void toDateTime(); - void toRegExp(); - void instanceOf(); - void isArray(); - void isDate(); - void isError(); - void isRegExp(); - void getSetPrototype(); - void getSetScope(); - void getSetProperty(); - void arrayElementGetterSetter(); - void getSetData(); - void getSetScriptClass(); - void call(); - void construct(); - void lessThan(); - void equals(); - void strictlyEquals(); - void castToPointer(); - void prettyPrinter_data(); - void prettyPrinter(); - void engineDeleted(); - void valueOfWithClosure(); - void objectId(); -}; +tst_QScriptValue::~tst_QScriptValue() +{ + delete engine; +} -tst_QScriptValue::tst_QScriptValue() +void tst_QScriptValue::dataHelper(InitDataFunction init, DefineDataFunction define) { + QTest::addColumn("__expression__"); + (this->*init)(); + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + m_currentExpression = it.key(); + (this->*define)(it.key().toLatin1()); + } + m_currentExpression = QString(); } -tst_QScriptValue::~tst_QScriptValue() +QTestData &tst_QScriptValue::newRow(const char *tag) { + return QTest::newRow(tag) << m_currentExpression; } +void tst_QScriptValue::testHelper(TestFunction fun) +{ + QFETCH(QString, __expression__); + QScriptValue value = m_values.value(__expression__); + (this->*fun)(__expression__.toLatin1(), value); +} + +void tst_QScriptValue::assignAndCopyConstruct_initData() +{ + QTest::addColumn("dummy"); + initScriptValues(); +} + +void tst_QScriptValue::assignAndCopyConstruct_makeData(const char *expr) +{ + newRow(expr) << 0; +} + +void tst_QScriptValue::assignAndCopyConstruct_test(const char *, const QScriptValue &value) +{ + QScriptValue copy(value); + QCOMPARE(copy.strictlyEquals(value), !value.isNumber() || !qIsNaN(value.toNumber())); + QCOMPARE(copy.engine(), value.engine()); + + QScriptValue assigned = copy; + QCOMPARE(assigned.strictlyEquals(value), !copy.isNumber() || !qIsNaN(copy.toNumber())); + QCOMPARE(assigned.engine(), assigned.engine()); + + QScriptValue other(!value.toBool()); + assigned = other; + QVERIFY(!assigned.strictlyEquals(copy)); + QVERIFY(assigned.strictlyEquals(other)); + QCOMPARE(assigned.engine(), other.engine()); +} + +DEFINE_TEST_FUNCTION(assignAndCopyConstruct) + void tst_QScriptValue::ctor() { QScriptEngine eng; @@ -330,19 +332,12 @@ void tst_QScriptValue::ctor() QVERIFY(QScriptValue(0, QString("ciao")).isString()); } -void tst_QScriptValue::engine() -{ - QScriptEngine eng; - QScriptValue object = eng.newObject(); - QCOMPARE(object.engine(), &eng); -} - static QScriptValue myFunction(QScriptContext *, QScriptEngine *eng) { return eng->undefinedValue(); } -void tst_QScriptValue::toString() +void tst_QScriptValue::toString_old() { QScriptEngine eng; @@ -456,7 +451,7 @@ void tst_QScriptValue::toString() QVERIFY(variant.toString().isEmpty()); } -void tst_QScriptValue::toNumber() +void tst_QScriptValue::toNumber_old() { QScriptEngine eng; @@ -529,7 +524,7 @@ void tst_QScriptValue::toNumber() } } -void tst_QScriptValue::toBoolean() // deprecated +void tst_QScriptValue::toBoolean_old() // deprecated { QScriptEngine eng; @@ -626,7 +621,7 @@ void tst_QScriptValue::toBoolean() // deprecated } } -void tst_QScriptValue::toBool() +void tst_QScriptValue::toBool_old() { QScriptEngine eng; @@ -723,7 +718,7 @@ void tst_QScriptValue::toBool() } } -void tst_QScriptValue::toInteger() +void tst_QScriptValue::toInteger_old() { QScriptEngine eng; @@ -810,7 +805,7 @@ void tst_QScriptValue::toInteger() QCOMPARE(inv.toInteger(), 0.0); } -void tst_QScriptValue::toInt32() +void tst_QScriptValue::toInt32_old() { QScriptEngine eng; @@ -946,7 +941,7 @@ void tst_QScriptValue::toInt32() QCOMPARE(qscriptvalue_cast(inv), 0); } -void tst_QScriptValue::toUInt32() +void tst_QScriptValue::toUInt32_old() { QScriptEngine eng; @@ -1078,7 +1073,7 @@ void tst_QScriptValue::toUInt32() QCOMPARE(qscriptvalue_cast(inv), quint32(0)); } -void tst_QScriptValue::toUInt16() +void tst_QScriptValue::toUInt16_old() { QScriptEngine eng; @@ -1239,7 +1234,7 @@ void tst_QScriptValue::toUInt16() Q_DECLARE_METATYPE(QVariant) #endif -void tst_QScriptValue::toVariant() +void tst_QScriptValue::toVariant_old() { QScriptEngine eng; @@ -1346,7 +1341,7 @@ void tst_QScriptValue::toVariant() // unfortunately, this is necessary in order to do qscriptvalue_cast(...) Q_DECLARE_METATYPE(QPushButton*) -void tst_QScriptValue::toQObject() +void tst_QScriptValue::toQObject_old() { QScriptEngine eng; @@ -1541,7 +1536,7 @@ void tst_QScriptValue::toObject() } } -void tst_QScriptValue::toDateTime() +void tst_QScriptValue::toDateTime_old() { QScriptEngine eng; QDateTime dt = eng.evaluate("new Date(0)").toDateTime(); @@ -1559,7 +1554,7 @@ void tst_QScriptValue::toDateTime() QVERIFY(!eng.undefinedValue().toDateTime().isValid()); } -void tst_QScriptValue::toRegExp() +void tst_QScriptValue::toRegExp_old() { QScriptEngine eng; { @@ -1589,7 +1584,7 @@ void tst_QScriptValue::toRegExp() QVERIFY(eng.undefinedValue().toRegExp().isEmpty()); } -void tst_QScriptValue::instanceOf() +void tst_QScriptValue::instanceOf_old() { QScriptEngine eng; QScriptValue obj = eng.newObject(); @@ -1625,7 +1620,7 @@ void tst_QScriptValue::instanceOf() QCOMPARE(obj.instanceOf(otherEngine.globalObject().property("Object")), false); } -void tst_QScriptValue::isArray() +void tst_QScriptValue::isArray_old() { QScriptEngine eng; QVERIFY(eng.evaluate("[]").isArray()); @@ -1638,7 +1633,7 @@ void tst_QScriptValue::isArray() QVERIFY(!eng.undefinedValue().isArray()); } -void tst_QScriptValue::isDate() +void tst_QScriptValue::isDate_old() { QScriptEngine eng; QVERIFY(eng.evaluate("new Date()").isDate()); @@ -1652,7 +1647,7 @@ void tst_QScriptValue::isDate() QVERIFY(!eng.undefinedValue().isDate()); } -void tst_QScriptValue::isError() +void tst_QScriptValue::isError_old() { QStringList errors; errors << "Error" @@ -1677,7 +1672,7 @@ void tst_QScriptValue::isError() QVERIFY(!eng.evaluate("new Object()").isError()); } -void tst_QScriptValue::isRegExp() +void tst_QScriptValue::isRegExp_old() { QScriptEngine eng; QVERIFY(eng.evaluate("/foo/").isRegExp()); @@ -2718,7 +2713,7 @@ void tst_QScriptValue::construct() QVERIFY(!QScriptValue(QScriptValue::NullValue).construct().isValid()); } -void tst_QScriptValue::lessThan() +void tst_QScriptValue::lessThan_old() { QScriptEngine eng; @@ -2812,7 +2807,7 @@ void tst_QScriptValue::lessThan() QCOMPARE(date1.lessThan(QScriptValue(&otherEngine, 123)), false); } -void tst_QScriptValue::equals() +void tst_QScriptValue::equals_old() { QScriptEngine eng; @@ -3005,7 +3000,7 @@ void tst_QScriptValue::equals() QCOMPARE(date1.equals(QScriptValue(&otherEngine, 123)), false); } -void tst_QScriptValue::strictlyEquals() +void tst_QScriptValue::strictlyEquals_old() { QScriptEngine eng; @@ -3456,4 +3451,3 @@ void tst_QScriptValue::objectId() } QTEST_MAIN(tst_QScriptValue) -#include "tst_qscriptvalue.moc" diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h new file mode 100644 index 0000000..6215506 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h @@ -0,0 +1,410 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef TST_QSCRIPTVALUE_H +#define TST_QSCRIPTVALUE_H + +#include +#include +#include +#include +#include +#include + +Q_DECLARE_METATYPE(QVariant) +Q_DECLARE_METATYPE(QScriptValue) + +class tst_QScriptValue : public QObject +{ + Q_OBJECT + +public: + tst_QScriptValue(); + virtual ~tst_QScriptValue(); + +private slots: + // Generated test functions + void isArray_data(); + void isArray(); + + void isBool_data(); + void isBool(); + + void isBoolean_data(); + void isBoolean(); + + void isDate_data(); + void isDate(); + + void isError_data(); + void isError(); + + void isFunction_data(); + void isFunction(); + + void isNull_data(); + void isNull(); + + void isNumber_data(); + void isNumber(); + + void isObject_data(); + void isObject(); + +// void isQMetaObject_data(); +// void isQMetaObject(); + +// void isQObject_data(); +// void isQObject(); + + void isRegExp_data(); + void isRegExp(); + + void isString_data(); + void isString(); + + void isUndefined_data(); + void isUndefined(); + + void isValid_data(); + void isValid(); + +// void isVariant_data(); +// void isVariant(); + + void toBool_data(); + void toBool(); + + void toBoolean_data(); + void toBoolean(); + +// void toDateTime_data(); +// void toDateTime(); + + void toInt32_data(); + void toInt32(); + + void toInteger_data(); + void toInteger(); + + void toNumber_data(); + void toNumber(); + +// void toQMetaObject_data(); +// void toQMetaObject(); + +// void toQObject_data(); +// void toQObject(); + +// void toRegExp_data(); +// void toRegExp(); + + void toString_data(); + void toString(); + + void toUInt16_data(); + void toUInt16(); + + void toUInt32_data(); + void toUInt32(); + +// void toVariant_data(); +// void toVariant(); + + void equals_data(); + void equals(); + + void strictlyEquals_data(); + void strictlyEquals(); + + void lessThan_data(); + void lessThan(); + + void instanceOf_data(); + void instanceOf(); + + void assignAndCopyConstruct_data(); + void assignAndCopyConstruct(); + + void qscriptvalue_castQString_data(); + void qscriptvalue_castQString(); + + void qscriptvalue_castqsreal_data(); + void qscriptvalue_castqsreal(); + + void qscriptvalue_castbool_data(); + void qscriptvalue_castbool(); + + void qscriptvalue_castqint32_data(); + void qscriptvalue_castqint32(); + + void qscriptvalue_castquint32_data(); + void qscriptvalue_castquint32(); + + void qscriptvalue_castquint16_data(); + void qscriptvalue_castquint16(); + + // Non-generated test functions + + void toObject(); + void ctor(); + + void toString_old(); + void toNumber_old(); + void toBoolean_old(); + void toBool_old(); + void toInteger_old(); + void toInt32_old(); + void toUInt32_old(); + void toUInt16_old(); + void toVariant_old(); + void toQObject_old(); + void toDateTime_old(); + void toRegExp_old(); + void instanceOf_old(); + void isArray_old(); + void isDate_old(); + void isError_old(); + void isRegExp_old(); + + void lessThan_old(); + void equals_old(); + void strictlyEquals_old(); + + void getSetPrototype(); + void getSetScope(); + void getSetProperty(); + void arrayElementGetterSetter(); + void getSetData(); + void getSetScriptClass(); + void call(); + void construct(); + void castToPointer(); + void prettyPrinter_data(); + void prettyPrinter(); + void engineDeleted(); + void valueOfWithClosure(); + void objectId(); + +private: + typedef void (tst_QScriptValue::*InitDataFunction)(); + typedef void (tst_QScriptValue::*DefineDataFunction)(const char *); + void dataHelper(InitDataFunction init, DefineDataFunction define); + QTestData &newRow(const char *tag); + + typedef void (tst_QScriptValue::*TestFunction)(const char *, const QScriptValue &); + void testHelper(TestFunction fun); + + // Generated functions + + void initScriptValues(); + + void isArray_initData(); + void isArray_makeData(const char *expr); + void isArray_test(const char *expr, const QScriptValue &value); + + void isBool_initData(); + void isBool_makeData(const char *expr); + void isBool_test(const char *expr, const QScriptValue &value); + + void isBoolean_initData(); + void isBoolean_makeData(const char *expr); + void isBoolean_test(const char *expr, const QScriptValue &value); + + void isDate_initData(); + void isDate_makeData(const char *expr); + void isDate_test(const char *expr, const QScriptValue &value); + + void isError_initData(); + void isError_makeData(const char *expr); + void isError_test(const char *expr, const QScriptValue &value); + + void isFunction_initData(); + void isFunction_makeData(const char *expr); + void isFunction_test(const char *expr, const QScriptValue &value); + + void isNull_initData(); + void isNull_makeData(const char *expr); + void isNull_test(const char *expr, const QScriptValue &value); + + void isNumber_initData(); + void isNumber_makeData(const char *expr); + void isNumber_test(const char *expr, const QScriptValue &value); + + void isObject_initData(); + void isObject_makeData(const char *expr); + void isObject_test(const char *expr, const QScriptValue &value); + + void isQMetaObject_initData(); + void isQMetaObject_makeData(const char *expr); + void isQMetaObject_test(const char *expr, const QScriptValue &value); + + void isQObject_initData(); + void isQObject_makeData(const char *expr); + void isQObject_test(const char *expr, const QScriptValue &value); + + void isRegExp_initData(); + void isRegExp_makeData(const char *expr); + void isRegExp_test(const char *expr, const QScriptValue &value); + + void isString_initData(); + void isString_makeData(const char *expr); + void isString_test(const char *expr, const QScriptValue &value); + + void isUndefined_initData(); + void isUndefined_makeData(const char *expr); + void isUndefined_test(const char *expr, const QScriptValue &value); + + void isValid_initData(); + void isValid_makeData(const char *expr); + void isValid_test(const char *expr, const QScriptValue &value); + + void isVariant_initData(); + void isVariant_makeData(const char *expr); + void isVariant_test(const char *expr, const QScriptValue &value); + + void toBool_initData(); + void toBool_makeData(const char *); + void toBool_test(const char *, const QScriptValue &value); + + void toBoolean_initData(); + void toBoolean_makeData(const char *); + void toBoolean_test(const char *, const QScriptValue &value); + + void toDateTime_initData(); + void toDateTime_makeData(const char *); + void toDateTime_test(const char *, const QScriptValue &value); + + void toInt32_initData(); + void toInt32_makeData(const char *); + void toInt32_test(const char *, const QScriptValue &value); + + void toInteger_initData(); + void toInteger_makeData(const char *); + void toInteger_test(const char *, const QScriptValue &value); + + void toNumber_initData(); + void toNumber_makeData(const char *); + void toNumber_test(const char *, const QScriptValue &value); + + void toQMetaObject_initData(); + void toQMetaObject_makeData(const char *); + void toQMetaObject_test(const char *, const QScriptValue &value); + + void toQObject_initData(); + void toQObject_makeData(const char *); + void toQObject_test(const char *, const QScriptValue &value); + + void toRegExp_initData(); + void toRegExp_makeData(const char *); + void toRegExp_test(const char *, const QScriptValue &value); + + void toString_initData(); + void toString_makeData(const char *); + void toString_test(const char *, const QScriptValue &value); + + void toUInt16_initData(); + void toUInt16_makeData(const char *); + void toUInt16_test(const char *, const QScriptValue &value); + + void toUInt32_initData(); + void toUInt32_makeData(const char *); + void toUInt32_test(const char *, const QScriptValue &value); + + void toVariant_initData(); + void toVariant_makeData(const char *); + void toVariant_test(const char *, const QScriptValue &value); + + void equals_initData(); + void equals_makeData(const char *); + void equals_test(const char *, const QScriptValue &value); + + void strictlyEquals_initData(); + void strictlyEquals_makeData(const char *); + void strictlyEquals_test(const char *, const QScriptValue &value); + + void lessThan_initData(); + void lessThan_makeData(const char *); + void lessThan_test(const char *, const QScriptValue &value); + + void instanceOf_initData(); + void instanceOf_makeData(const char *); + void instanceOf_test(const char *, const QScriptValue &value); + + void assignAndCopyConstruct_initData(); + void assignAndCopyConstruct_makeData(const char *); + void assignAndCopyConstruct_test(const char *, const QScriptValue &value); + + void qscriptvalue_castQString_initData(); + void qscriptvalue_castQString_makeData(const char *); + void qscriptvalue_castQString_test(const char *, const QScriptValue &value); + + void qscriptvalue_castqsreal_initData(); + void qscriptvalue_castqsreal_makeData(const char *); + void qscriptvalue_castqsreal_test(const char *, const QScriptValue &value); + + void qscriptvalue_castbool_initData(); + void qscriptvalue_castbool_makeData(const char *); + void qscriptvalue_castbool_test(const char *, const QScriptValue &value); + + void qscriptvalue_castqint32_initData(); + void qscriptvalue_castqint32_makeData(const char *); + void qscriptvalue_castqint32_test(const char *, const QScriptValue &value); + + void qscriptvalue_castquint32_initData(); + void qscriptvalue_castquint32_makeData(const char *); + void qscriptvalue_castquint32_test(const char *, const QScriptValue &value); + + void qscriptvalue_castquint16_initData(); + void qscriptvalue_castquint16_makeData(const char *); + void qscriptvalue_castquint16_test(const char *, const QScriptValue &value); + +private: + QScriptEngine *engine; + QHash m_values; + QString m_currentExpression; +}; + +#define DEFINE_TEST_FUNCTION(name) \ +void tst_QScriptValue::name##_data() { dataHelper(&tst_QScriptValue::name##_initData, &tst_QScriptValue::name##_makeData); } \ +void tst_QScriptValue::name() { testHelper(&tst_QScriptValue::name##_test); } + +#endif diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp new file mode 100644 index 0000000..6a59509 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -0,0 +1,6347 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "tst_qscriptvalue.h" + +#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr) + +void tst_QScriptValue::initScriptValues() +{ + m_values.clear(); + if (engine) + delete engine; + engine = new QScriptEngine; + DEFINE_TEST_VALUE(QScriptValue()); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(true)); + DEFINE_TEST_VALUE(QScriptValue(false)); + DEFINE_TEST_VALUE(QScriptValue(int(122))); + DEFINE_TEST_VALUE(QScriptValue(uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0)); + DEFINE_TEST_VALUE(QScriptValue(0.0)); + DEFINE_TEST_VALUE(QScriptValue(123.0)); + DEFINE_TEST_VALUE(QScriptValue(6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(-6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0x10001)); + DEFINE_TEST_VALUE(QScriptValue(qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(qInf())); + DEFINE_TEST_VALUE(QScriptValue(-qInf())); + DEFINE_TEST_VALUE(QScriptValue("NaN")); + DEFINE_TEST_VALUE(QScriptValue("Infinity")); + DEFINE_TEST_VALUE(QScriptValue("-Infinity")); + DEFINE_TEST_VALUE(QScriptValue("ciao")); + DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(QString(""))); + DEFINE_TEST_VALUE(QScriptValue(QString())); + DEFINE_TEST_VALUE(QScriptValue(QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(QString("12.4"))); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(0, true)); + DEFINE_TEST_VALUE(QScriptValue(0, false)); + DEFINE_TEST_VALUE(QScriptValue(0, int(122))); + DEFINE_TEST_VALUE(QScriptValue(0, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0, 0)); + DEFINE_TEST_VALUE(QScriptValue(0, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(0, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(0, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(0, QString())); + DEFINE_TEST_VALUE(QScriptValue(0, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, true)); + DEFINE_TEST_VALUE(QScriptValue(engine, false)); + DEFINE_TEST_VALUE(QScriptValue(engine, int(122))); + DEFINE_TEST_VALUE(QScriptValue(engine, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(engine, 0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString())); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23"))); + DEFINE_TEST_VALUE(engine->evaluate("[]")); + DEFINE_TEST_VALUE(engine->evaluate("{}")); + DEFINE_TEST_VALUE(engine->evaluate("Object.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Date.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Array.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Function.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Error.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Object")); + DEFINE_TEST_VALUE(engine->evaluate("Array")); + DEFINE_TEST_VALUE(engine->evaluate("Number")); + DEFINE_TEST_VALUE(engine->evaluate("Function")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })")); + DEFINE_TEST_VALUE(engine->evaluate("/foo/")); + DEFINE_TEST_VALUE(engine->evaluate("new Object()")); + DEFINE_TEST_VALUE(engine->evaluate("new Array()")); + DEFINE_TEST_VALUE(engine->evaluate("new Error()")); +} + + +void tst_QScriptValue::isValid_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isValid_makeData(const char* expr) +{ + static QSet isValid; + if (isValid.isEmpty()) { + isValid << "QScriptValue(QScriptValue::UndefinedValue)" + << "QScriptValue(QScriptValue::NullValue)" + << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(int(122))" + << "QScriptValue(uint(124))" + << "QScriptValue(0)" + << "QScriptValue(0.0)" + << "QScriptValue(123.0)" + << "QScriptValue(6.37e-8)" + << "QScriptValue(-6.37e-8)" + << "QScriptValue(0x43211234)" + << "QScriptValue(0x10000)" + << "QScriptValue(0x10001)" + << "QScriptValue(qSNaN())" + << "QScriptValue(qQNaN())" + << "QScriptValue(qInf())" + << "QScriptValue(-qInf())" + << "QScriptValue(\"NaN\")" + << "QScriptValue(\"Infinity\")" + << "QScriptValue(\"-Infinity\")" + << "QScriptValue(\"ciao\")" + << "QScriptValue(QString::fromLatin1(\"ciao\"))" + << "QScriptValue(QString(\"\"))" + << "QScriptValue(QString())" + << "QScriptValue(QString(\"0\"))" + << "QScriptValue(QString(\"123\"))" + << "QScriptValue(QString(\"12.4\"))" + << "QScriptValue(0, QScriptValue::UndefinedValue)" + << "QScriptValue(0, QScriptValue::NullValue)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(0, int(122))" + << "QScriptValue(0, uint(124))" + << "QScriptValue(0, 0)" + << "QScriptValue(0, 0.0)" + << "QScriptValue(0, 123.0)" + << "QScriptValue(0, 6.37e-8)" + << "QScriptValue(0, -6.37e-8)" + << "QScriptValue(0, 0x43211234)" + << "QScriptValue(0, 0x10000)" + << "QScriptValue(0, 0x10001)" + << "QScriptValue(0, qSNaN())" + << "QScriptValue(0, qQNaN())" + << "QScriptValue(0, qInf())" + << "QScriptValue(0, -qInf())" + << "QScriptValue(0, \"NaN\")" + << "QScriptValue(0, \"Infinity\")" + << "QScriptValue(0, \"-Infinity\")" + << "QScriptValue(0, \"ciao\")" + << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(0, QString(\"\"))" + << "QScriptValue(0, QString())" + << "QScriptValue(0, QString(\"0\"))" + << "QScriptValue(0, QString(\"123\"))" + << "QScriptValue(0, QString(\"12.3\"))" + << "QScriptValue(engine, QScriptValue::UndefinedValue)" + << "QScriptValue(engine, QScriptValue::NullValue)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + << "QScriptValue(engine, int(122))" + << "QScriptValue(engine, uint(124))" + << "QScriptValue(engine, 0)" + << "QScriptValue(engine, 0.0)" + << "QScriptValue(engine, 123.0)" + << "QScriptValue(engine, 6.37e-8)" + << "QScriptValue(engine, -6.37e-8)" + << "QScriptValue(engine, 0x43211234)" + << "QScriptValue(engine, 0x10000)" + << "QScriptValue(engine, 0x10001)" + << "QScriptValue(engine, qSNaN())" + << "QScriptValue(engine, qQNaN())" + << "QScriptValue(engine, qInf())" + << "QScriptValue(engine, -qInf())" + << "QScriptValue(engine, \"NaN\")" + << "QScriptValue(engine, \"Infinity\")" + << "QScriptValue(engine, \"-Infinity\")" + << "QScriptValue(engine, \"ciao\")" + << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(engine, QString(\"\"))" + << "QScriptValue(engine, QString())" + << "QScriptValue(engine, QString(\"0\"))" + << "QScriptValue(engine, QString(\"123\"))" + << "QScriptValue(engine, QString(\"1.23\"))" + << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"{}\")" + << "engine->evaluate(\"Object.prototype\")" + << "engine->evaluate(\"Date.prototype\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + << "engine->evaluate(\"new Object()\")" + << "engine->evaluate(\"new Array()\")" + << "engine->evaluate(\"new Error()\")" + ; + } + newRow(expr) << isValid.contains(expr); +} + +void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isValid(), expected); +} + +DEFINE_TEST_FUNCTION(isValid) + + +void tst_QScriptValue::isBool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isBool_makeData(const char* expr) +{ + static QSet isBool; + if (isBool.isEmpty()) { + isBool << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + ; + } + newRow(expr) << isBool.contains(expr); +} + +void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBool(), expected); +} + +DEFINE_TEST_FUNCTION(isBool) + + +void tst_QScriptValue::isBoolean_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isBoolean_makeData(const char* expr) +{ + static QSet isBoolean; + if (isBoolean.isEmpty()) { + isBoolean << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + ; + } + newRow(expr) << isBoolean.contains(expr); +} + +void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(isBoolean) + + +void tst_QScriptValue::isNumber_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isNumber_makeData(const char* expr) +{ + static QSet isNumber; + if (isNumber.isEmpty()) { + isNumber << "QScriptValue(int(122))" + << "QScriptValue(uint(124))" + << "QScriptValue(0)" + << "QScriptValue(0.0)" + << "QScriptValue(123.0)" + << "QScriptValue(6.37e-8)" + << "QScriptValue(-6.37e-8)" + << "QScriptValue(0x43211234)" + << "QScriptValue(0x10000)" + << "QScriptValue(0x10001)" + << "QScriptValue(qSNaN())" + << "QScriptValue(qQNaN())" + << "QScriptValue(qInf())" + << "QScriptValue(-qInf())" + << "QScriptValue(0, int(122))" + << "QScriptValue(0, uint(124))" + << "QScriptValue(0, 0)" + << "QScriptValue(0, 0.0)" + << "QScriptValue(0, 123.0)" + << "QScriptValue(0, 6.37e-8)" + << "QScriptValue(0, -6.37e-8)" + << "QScriptValue(0, 0x43211234)" + << "QScriptValue(0, 0x10000)" + << "QScriptValue(0, 0x10001)" + << "QScriptValue(0, qSNaN())" + << "QScriptValue(0, qQNaN())" + << "QScriptValue(0, qInf())" + << "QScriptValue(0, -qInf())" + << "QScriptValue(engine, int(122))" + << "QScriptValue(engine, uint(124))" + << "QScriptValue(engine, 0)" + << "QScriptValue(engine, 0.0)" + << "QScriptValue(engine, 123.0)" + << "QScriptValue(engine, 6.37e-8)" + << "QScriptValue(engine, -6.37e-8)" + << "QScriptValue(engine, 0x43211234)" + << "QScriptValue(engine, 0x10000)" + << "QScriptValue(engine, 0x10001)" + << "QScriptValue(engine, qSNaN())" + << "QScriptValue(engine, qQNaN())" + << "QScriptValue(engine, qInf())" + << "QScriptValue(engine, -qInf())" + ; + } + newRow(expr) << isNumber.contains(expr); +} + +void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNumber(), expected); +} + +DEFINE_TEST_FUNCTION(isNumber) + + +void tst_QScriptValue::isFunction_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isFunction_makeData(const char* expr) +{ + static QSet isFunction; + if (isFunction.isEmpty()) { + isFunction << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + ; + } + newRow(expr) << isFunction.contains(expr); +} + +void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isFunction(), expected); +} + +DEFINE_TEST_FUNCTION(isFunction) + + +void tst_QScriptValue::isNull_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isNull_makeData(const char* expr) +{ + static QSet isNull; + if (isNull.isEmpty()) { + isNull << "QScriptValue(QScriptValue::NullValue)" + << "QScriptValue(0, QScriptValue::NullValue)" + << "QScriptValue(engine, QScriptValue::NullValue)" + ; + } + newRow(expr) << isNull.contains(expr); +} + +void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNull(), expected); +} + +DEFINE_TEST_FUNCTION(isNull) + + +void tst_QScriptValue::isString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isString_makeData(const char* expr) +{ + static QSet isString; + if (isString.isEmpty()) { + isString << "QScriptValue(\"NaN\")" + << "QScriptValue(\"Infinity\")" + << "QScriptValue(\"-Infinity\")" + << "QScriptValue(\"ciao\")" + << "QScriptValue(QString::fromLatin1(\"ciao\"))" + << "QScriptValue(QString(\"\"))" + << "QScriptValue(QString())" + << "QScriptValue(QString(\"0\"))" + << "QScriptValue(QString(\"123\"))" + << "QScriptValue(QString(\"12.4\"))" + << "QScriptValue(0, \"NaN\")" + << "QScriptValue(0, \"Infinity\")" + << "QScriptValue(0, \"-Infinity\")" + << "QScriptValue(0, \"ciao\")" + << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(0, QString(\"\"))" + << "QScriptValue(0, QString())" + << "QScriptValue(0, QString(\"0\"))" + << "QScriptValue(0, QString(\"123\"))" + << "QScriptValue(0, QString(\"12.3\"))" + << "QScriptValue(engine, \"NaN\")" + << "QScriptValue(engine, \"Infinity\")" + << "QScriptValue(engine, \"-Infinity\")" + << "QScriptValue(engine, \"ciao\")" + << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(engine, QString(\"\"))" + << "QScriptValue(engine, QString())" + << "QScriptValue(engine, QString(\"0\"))" + << "QScriptValue(engine, QString(\"123\"))" + << "QScriptValue(engine, QString(\"1.23\"))" + ; + } + newRow(expr) << isString.contains(expr); +} + +void tst_QScriptValue::isString_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isString(), expected); +} + +DEFINE_TEST_FUNCTION(isString) + + +void tst_QScriptValue::isUndefined_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isUndefined_makeData(const char* expr) +{ + static QSet isUndefined; + if (isUndefined.isEmpty()) { + isUndefined << "QScriptValue(QScriptValue::UndefinedValue)" + << "QScriptValue(0, QScriptValue::UndefinedValue)" + << "QScriptValue(engine, QScriptValue::UndefinedValue)" + << "engine->evaluate(\"{}\")" + ; + } + newRow(expr) << isUndefined.contains(expr); +} + +void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isUndefined(), expected); +} + +DEFINE_TEST_FUNCTION(isUndefined) + + + + + +void tst_QScriptValue::isObject_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isObject_makeData(const char* expr) +{ + static QSet isObject; + if (isObject.isEmpty()) { + isObject << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"Object.prototype\")" + << "engine->evaluate(\"Date.prototype\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + << "engine->evaluate(\"new Object()\")" + << "engine->evaluate(\"new Array()\")" + << "engine->evaluate(\"new Error()\")" + ; + } + newRow(expr) << isObject.contains(expr); +} + +void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isObject(), expected); +} + +DEFINE_TEST_FUNCTION(isObject) + + +void tst_QScriptValue::isDate_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isDate_makeData(const char* expr) +{ + static QSet isDate; + if (isDate.isEmpty()) { + isDate << "engine->evaluate(\"Date.prototype\")" + ; + } + newRow(expr) << isDate.contains(expr); +} + +void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isDate(), expected); +} + +DEFINE_TEST_FUNCTION(isDate) + + +void tst_QScriptValue::isRegExp_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isRegExp_makeData(const char* expr) +{ + static QSet isRegExp; + if (isRegExp.isEmpty()) { + isRegExp << "engine->evaluate(\"/foo/\")" + ; + } + newRow(expr) << isRegExp.contains(expr); +} + +void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isRegExp(), expected); +} + +DEFINE_TEST_FUNCTION(isRegExp) + + +void tst_QScriptValue::isArray_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isArray_makeData(const char* expr) +{ + static QSet isArray; + if (isArray.isEmpty()) { + isArray << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"new Array()\")" + ; + } + newRow(expr) << isArray.contains(expr); +} + +void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isArray(), expected); +} + +DEFINE_TEST_FUNCTION(isArray) + + +void tst_QScriptValue::isError_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isError_makeData(const char* expr) +{ + static QSet isError; + if (isError.isEmpty()) { + isError << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"new Error()\")" + ; + } + newRow(expr) << isError.contains(expr); +} + +void tst_QScriptValue::isError_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isError(), expected); +} + +DEFINE_TEST_FUNCTION(isError) + + + +void tst_QScriptValue::toString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toString_makeData(const char* expr) +{ + static QHash toString; + if (toString.isEmpty()) { + toString.insert("QScriptValue()", ""); + toString.insert("QScriptValue(QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(true)", "true"); + toString.insert("QScriptValue(false)", "false"); + toString.insert("QScriptValue(int(122))", "122"); + toString.insert("QScriptValue(uint(124))", "124"); + toString.insert("QScriptValue(0)", "0"); + toString.insert("QScriptValue(0.0)", "0"); + toString.insert("QScriptValue(123.0)", "123"); + toString.insert("QScriptValue(6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(0x43211234)", "1126240820"); + toString.insert("QScriptValue(0x10000)", "65536"); + toString.insert("QScriptValue(0x10001)", "65537"); + toString.insert("QScriptValue(qSNaN())", "NaN"); + toString.insert("QScriptValue(qQNaN())", "NaN"); + toString.insert("QScriptValue(qInf())", "Infinity"); + toString.insert("QScriptValue(-qInf())", "-Infinity"); + toString.insert("QScriptValue(\"NaN\")", "NaN"); + toString.insert("QScriptValue(\"Infinity\")", "Infinity"); + toString.insert("QScriptValue(\"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(\"ciao\")", "ciao"); + toString.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(QString(\"\"))", ""); + toString.insert("QScriptValue(QString())", ""); + toString.insert("QScriptValue(QString(\"0\"))", "0"); + toString.insert("QScriptValue(QString(\"123\"))", "123"); + toString.insert("QScriptValue(QString(\"12.4\"))", "12.4"); + toString.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(0, QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(0, true)", "true"); + toString.insert("QScriptValue(0, false)", "false"); + toString.insert("QScriptValue(0, int(122))", "122"); + toString.insert("QScriptValue(0, uint(124))", "124"); + toString.insert("QScriptValue(0, 0)", "0"); + toString.insert("QScriptValue(0, 0.0)", "0"); + toString.insert("QScriptValue(0, 123.0)", "123"); + toString.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(0, 0x43211234)", "1126240820"); + toString.insert("QScriptValue(0, 0x10000)", "65536"); + toString.insert("QScriptValue(0, 0x10001)", "65537"); + toString.insert("QScriptValue(0, qSNaN())", "NaN"); + toString.insert("QScriptValue(0, qQNaN())", "NaN"); + toString.insert("QScriptValue(0, qInf())", "Infinity"); + toString.insert("QScriptValue(0, -qInf())", "-Infinity"); + toString.insert("QScriptValue(0, \"NaN\")", "NaN"); + toString.insert("QScriptValue(0, \"Infinity\")", "Infinity"); + toString.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(0, \"ciao\")", "ciao"); + toString.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(0, QString(\"\"))", ""); + toString.insert("QScriptValue(0, QString())", ""); + toString.insert("QScriptValue(0, QString(\"0\"))", "0"); + toString.insert("QScriptValue(0, QString(\"123\"))", "123"); + toString.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); + toString.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(engine, QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(engine, true)", "true"); + toString.insert("QScriptValue(engine, false)", "false"); + toString.insert("QScriptValue(engine, int(122))", "122"); + toString.insert("QScriptValue(engine, uint(124))", "124"); + toString.insert("QScriptValue(engine, 0)", "0"); + toString.insert("QScriptValue(engine, 0.0)", "0"); + toString.insert("QScriptValue(engine, 123.0)", "123"); + toString.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(engine, 0x43211234)", "1126240820"); + toString.insert("QScriptValue(engine, 0x10000)", "65536"); + toString.insert("QScriptValue(engine, 0x10001)", "65537"); + toString.insert("QScriptValue(engine, qSNaN())", "NaN"); + toString.insert("QScriptValue(engine, qQNaN())", "NaN"); + toString.insert("QScriptValue(engine, qInf())", "Infinity"); + toString.insert("QScriptValue(engine, -qInf())", "-Infinity"); + toString.insert("QScriptValue(engine, \"NaN\")", "NaN"); + toString.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); + toString.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(engine, \"ciao\")", "ciao"); + toString.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(engine, QString(\"\"))", ""); + toString.insert("QScriptValue(engine, QString())", ""); + toString.insert("QScriptValue(engine, QString(\"0\"))", "0"); + toString.insert("QScriptValue(engine, QString(\"123\"))", "123"); + toString.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); + toString.insert("engine->evaluate(\"[]\")", ""); + toString.insert("engine->evaluate(\"{}\")", "undefined"); + toString.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); + toString.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); + toString.insert("engine->evaluate(\"Array.prototype\")", ""); + toString.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); + toString.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); + toString.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); + toString.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); + toString.insert("engine->evaluate(\"/foo/\")", "/foo/"); + toString.insert("engine->evaluate(\"new Object()\")", "[object Object]"); + toString.insert("engine->evaluate(\"new Array()\")", ""); + toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + } + newRow(expr) << toString.value(expr); +} + +void tst_QScriptValue::toString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(value.toString(), expected); +} + +DEFINE_TEST_FUNCTION(toString) + + +void tst_QScriptValue::toNumber_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toNumber_makeData(const char* expr) +{ + static QHash toNumber; + if (toNumber.isEmpty()) { + toNumber.insert("QScriptValue()", 0); + toNumber.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(true)", 1); + toNumber.insert("QScriptValue(false)", 0); + toNumber.insert("QScriptValue(int(122))", 122); + toNumber.insert("QScriptValue(uint(124))", 124); + toNumber.insert("QScriptValue(0)", 0); + toNumber.insert("QScriptValue(0.0)", 0); + toNumber.insert("QScriptValue(123.0)", 123); + toNumber.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(0x43211234)", 1126240820); + toNumber.insert("QScriptValue(0x10000)", 65536); + toNumber.insert("QScriptValue(0x10001)", 65537); + toNumber.insert("QScriptValue(qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(qInf())", qInf()); + toNumber.insert("QScriptValue(-qInf())", qInf()); + toNumber.insert("QScriptValue(\"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(\"Infinity\")", qInf()); + toNumber.insert("QScriptValue(\"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(\"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(QString(\"\"))", 0); + toNumber.insert("QScriptValue(QString())", 0); + toNumber.insert("QScriptValue(QString(\"0\"))", 0); + toNumber.insert("QScriptValue(QString(\"123\"))", 123); + toNumber.insert("QScriptValue(QString(\"12.4\"))", 12.4); + toNumber.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(0, true)", 1); + toNumber.insert("QScriptValue(0, false)", 0); + toNumber.insert("QScriptValue(0, int(122))", 122); + toNumber.insert("QScriptValue(0, uint(124))", 124); + toNumber.insert("QScriptValue(0, 0)", 0); + toNumber.insert("QScriptValue(0, 0.0)", 0); + toNumber.insert("QScriptValue(0, 123.0)", 123); + toNumber.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(0, 0x43211234)", 1126240820); + toNumber.insert("QScriptValue(0, 0x10000)", 65536); + toNumber.insert("QScriptValue(0, 0x10001)", 65537); + toNumber.insert("QScriptValue(0, qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(0, qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(0, qInf())", qInf()); + toNumber.insert("QScriptValue(0, -qInf())", qInf()); + toNumber.insert("QScriptValue(0, \"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(0, \"Infinity\")", qInf()); + toNumber.insert("QScriptValue(0, \"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(0, \"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(0, QString(\"\"))", 0); + toNumber.insert("QScriptValue(0, QString())", 0); + toNumber.insert("QScriptValue(0, QString(\"0\"))", 0); + toNumber.insert("QScriptValue(0, QString(\"123\"))", 123); + toNumber.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); + toNumber.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(engine, true)", 1); + toNumber.insert("QScriptValue(engine, false)", 0); + toNumber.insert("QScriptValue(engine, int(122))", 122); + toNumber.insert("QScriptValue(engine, uint(124))", 124); + toNumber.insert("QScriptValue(engine, 0)", 0); + toNumber.insert("QScriptValue(engine, 0.0)", 0); + toNumber.insert("QScriptValue(engine, 123.0)", 123); + toNumber.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toNumber.insert("QScriptValue(engine, 0x10000)", 65536); + toNumber.insert("QScriptValue(engine, 0x10001)", 65537); + toNumber.insert("QScriptValue(engine, qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(engine, qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(engine, qInf())", qInf()); + toNumber.insert("QScriptValue(engine, -qInf())", qInf()); + toNumber.insert("QScriptValue(engine, \"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(engine, \"Infinity\")", qInf()); + toNumber.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(engine, \"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(engine, QString(\"\"))", 0); + toNumber.insert("QScriptValue(engine, QString())", 0); + toNumber.insert("QScriptValue(engine, QString(\"0\"))", 0); + toNumber.insert("QScriptValue(engine, QString(\"123\"))", 123); + toNumber.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); + toNumber.insert("engine->evaluate(\"[]\")", 0); + toNumber.insert("engine->evaluate(\"{}\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Array.prototype\")", 0); + toNumber.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Object\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Array\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Number\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Function\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"/foo/\")", qQNaN()); + toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN()); + toNumber.insert("engine->evaluate(\"new Array()\")", 0); + toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN()); + } + newRow(expr) << toNumber.value(expr); +} + +void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(value.toNumber())); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toNumber())); + return; + } + QCOMPARE(value.toNumber(), expected); +} + +DEFINE_TEST_FUNCTION(toNumber) + + +void tst_QScriptValue::toBool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toBool_makeData(const char* expr) +{ + static QHash toBool; + if (toBool.isEmpty()) { + toBool.insert("QScriptValue()", false); + toBool.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(true)", true); + toBool.insert("QScriptValue(false)", false); + toBool.insert("QScriptValue(int(122))", true); + toBool.insert("QScriptValue(uint(124))", true); + toBool.insert("QScriptValue(0)", false); + toBool.insert("QScriptValue(0.0)", false); + toBool.insert("QScriptValue(123.0)", true); + toBool.insert("QScriptValue(6.37e-8)", true); + toBool.insert("QScriptValue(-6.37e-8)", true); + toBool.insert("QScriptValue(0x43211234)", true); + toBool.insert("QScriptValue(0x10000)", true); + toBool.insert("QScriptValue(0x10001)", true); + toBool.insert("QScriptValue(qSNaN())", false); + toBool.insert("QScriptValue(qQNaN())", false); + toBool.insert("QScriptValue(qInf())", true); + toBool.insert("QScriptValue(-qInf())", true); + toBool.insert("QScriptValue(\"NaN\")", true); + toBool.insert("QScriptValue(\"Infinity\")", true); + toBool.insert("QScriptValue(\"-Infinity\")", true); + toBool.insert("QScriptValue(\"ciao\")", true); + toBool.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(QString(\"\"))", false); + toBool.insert("QScriptValue(QString())", false); + toBool.insert("QScriptValue(QString(\"0\"))", true); + toBool.insert("QScriptValue(QString(\"123\"))", true); + toBool.insert("QScriptValue(QString(\"12.4\"))", true); + toBool.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(0, QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(0, true)", true); + toBool.insert("QScriptValue(0, false)", false); + toBool.insert("QScriptValue(0, int(122))", true); + toBool.insert("QScriptValue(0, uint(124))", true); + toBool.insert("QScriptValue(0, 0)", false); + toBool.insert("QScriptValue(0, 0.0)", false); + toBool.insert("QScriptValue(0, 123.0)", true); + toBool.insert("QScriptValue(0, 6.37e-8)", true); + toBool.insert("QScriptValue(0, -6.37e-8)", true); + toBool.insert("QScriptValue(0, 0x43211234)", true); + toBool.insert("QScriptValue(0, 0x10000)", true); + toBool.insert("QScriptValue(0, 0x10001)", true); + toBool.insert("QScriptValue(0, qSNaN())", false); + toBool.insert("QScriptValue(0, qQNaN())", false); + toBool.insert("QScriptValue(0, qInf())", true); + toBool.insert("QScriptValue(0, -qInf())", true); + toBool.insert("QScriptValue(0, \"NaN\")", true); + toBool.insert("QScriptValue(0, \"Infinity\")", true); + toBool.insert("QScriptValue(0, \"-Infinity\")", true); + toBool.insert("QScriptValue(0, \"ciao\")", true); + toBool.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(0, QString(\"\"))", false); + toBool.insert("QScriptValue(0, QString())", false); + toBool.insert("QScriptValue(0, QString(\"0\"))", true); + toBool.insert("QScriptValue(0, QString(\"123\"))", true); + toBool.insert("QScriptValue(0, QString(\"12.3\"))", true); + toBool.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(engine, true)", true); + toBool.insert("QScriptValue(engine, false)", false); + toBool.insert("QScriptValue(engine, int(122))", true); + toBool.insert("QScriptValue(engine, uint(124))", true); + toBool.insert("QScriptValue(engine, 0)", false); + toBool.insert("QScriptValue(engine, 0.0)", false); + toBool.insert("QScriptValue(engine, 123.0)", true); + toBool.insert("QScriptValue(engine, 6.37e-8)", true); + toBool.insert("QScriptValue(engine, -6.37e-8)", true); + toBool.insert("QScriptValue(engine, 0x43211234)", true); + toBool.insert("QScriptValue(engine, 0x10000)", true); + toBool.insert("QScriptValue(engine, 0x10001)", true); + toBool.insert("QScriptValue(engine, qSNaN())", false); + toBool.insert("QScriptValue(engine, qQNaN())", false); + toBool.insert("QScriptValue(engine, qInf())", true); + toBool.insert("QScriptValue(engine, -qInf())", true); + toBool.insert("QScriptValue(engine, \"NaN\")", true); + toBool.insert("QScriptValue(engine, \"Infinity\")", true); + toBool.insert("QScriptValue(engine, \"-Infinity\")", true); + toBool.insert("QScriptValue(engine, \"ciao\")", true); + toBool.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(engine, QString(\"\"))", false); + toBool.insert("QScriptValue(engine, QString())", false); + toBool.insert("QScriptValue(engine, QString(\"0\"))", true); + toBool.insert("QScriptValue(engine, QString(\"123\"))", true); + toBool.insert("QScriptValue(engine, QString(\"1.23\"))", true); + toBool.insert("engine->evaluate(\"[]\")", true); + toBool.insert("engine->evaluate(\"{}\")", false); + toBool.insert("engine->evaluate(\"Object.prototype\")", true); + toBool.insert("engine->evaluate(\"Date.prototype\")", true); + toBool.insert("engine->evaluate(\"Array.prototype\")", true); + toBool.insert("engine->evaluate(\"Function.prototype\")", true); + toBool.insert("engine->evaluate(\"Error.prototype\")", true); + toBool.insert("engine->evaluate(\"Object\")", true); + toBool.insert("engine->evaluate(\"Array\")", true); + toBool.insert("engine->evaluate(\"Number\")", true); + toBool.insert("engine->evaluate(\"Function\")", true); + toBool.insert("engine->evaluate(\"(function() { return 1; })\")", true); + toBool.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + toBool.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + toBool.insert("engine->evaluate(\"/foo/\")", true); + toBool.insert("engine->evaluate(\"new Object()\")", true); + toBool.insert("engine->evaluate(\"new Array()\")", true); + toBool.insert("engine->evaluate(\"new Error()\")", true); + } + newRow(expr) << toBool.value(expr); +} + +void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBool(), expected); +} + +DEFINE_TEST_FUNCTION(toBool) + + +void tst_QScriptValue::toBoolean_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toBoolean_makeData(const char* expr) +{ + static QHash toBoolean; + if (toBoolean.isEmpty()) { + toBoolean.insert("QScriptValue()", false); + toBoolean.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(true)", true); + toBoolean.insert("QScriptValue(false)", false); + toBoolean.insert("QScriptValue(int(122))", true); + toBoolean.insert("QScriptValue(uint(124))", true); + toBoolean.insert("QScriptValue(0)", false); + toBoolean.insert("QScriptValue(0.0)", false); + toBoolean.insert("QScriptValue(123.0)", true); + toBoolean.insert("QScriptValue(6.37e-8)", true); + toBoolean.insert("QScriptValue(-6.37e-8)", true); + toBoolean.insert("QScriptValue(0x43211234)", true); + toBoolean.insert("QScriptValue(0x10000)", true); + toBoolean.insert("QScriptValue(0x10001)", true); + toBoolean.insert("QScriptValue(qSNaN())", false); + toBoolean.insert("QScriptValue(qQNaN())", false); + toBoolean.insert("QScriptValue(qInf())", true); + toBoolean.insert("QScriptValue(-qInf())", true); + toBoolean.insert("QScriptValue(\"NaN\")", true); + toBoolean.insert("QScriptValue(\"Infinity\")", true); + toBoolean.insert("QScriptValue(\"-Infinity\")", true); + toBoolean.insert("QScriptValue(\"ciao\")", true); + toBoolean.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(QString(\"\"))", false); + toBoolean.insert("QScriptValue(QString())", false); + toBoolean.insert("QScriptValue(QString(\"0\"))", true); + toBoolean.insert("QScriptValue(QString(\"123\"))", true); + toBoolean.insert("QScriptValue(QString(\"12.4\"))", true); + toBoolean.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(0, QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(0, true)", true); + toBoolean.insert("QScriptValue(0, false)", false); + toBoolean.insert("QScriptValue(0, int(122))", true); + toBoolean.insert("QScriptValue(0, uint(124))", true); + toBoolean.insert("QScriptValue(0, 0)", false); + toBoolean.insert("QScriptValue(0, 0.0)", false); + toBoolean.insert("QScriptValue(0, 123.0)", true); + toBoolean.insert("QScriptValue(0, 6.37e-8)", true); + toBoolean.insert("QScriptValue(0, -6.37e-8)", true); + toBoolean.insert("QScriptValue(0, 0x43211234)", true); + toBoolean.insert("QScriptValue(0, 0x10000)", true); + toBoolean.insert("QScriptValue(0, 0x10001)", true); + toBoolean.insert("QScriptValue(0, qSNaN())", false); + toBoolean.insert("QScriptValue(0, qQNaN())", false); + toBoolean.insert("QScriptValue(0, qInf())", true); + toBoolean.insert("QScriptValue(0, -qInf())", true); + toBoolean.insert("QScriptValue(0, \"NaN\")", true); + toBoolean.insert("QScriptValue(0, \"Infinity\")", true); + toBoolean.insert("QScriptValue(0, \"-Infinity\")", true); + toBoolean.insert("QScriptValue(0, \"ciao\")", true); + toBoolean.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"\"))", false); + toBoolean.insert("QScriptValue(0, QString())", false); + toBoolean.insert("QScriptValue(0, QString(\"0\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"123\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"12.3\"))", true); + toBoolean.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(engine, true)", true); + toBoolean.insert("QScriptValue(engine, false)", false); + toBoolean.insert("QScriptValue(engine, int(122))", true); + toBoolean.insert("QScriptValue(engine, uint(124))", true); + toBoolean.insert("QScriptValue(engine, 0)", false); + toBoolean.insert("QScriptValue(engine, 0.0)", false); + toBoolean.insert("QScriptValue(engine, 123.0)", true); + toBoolean.insert("QScriptValue(engine, 6.37e-8)", true); + toBoolean.insert("QScriptValue(engine, -6.37e-8)", true); + toBoolean.insert("QScriptValue(engine, 0x43211234)", true); + toBoolean.insert("QScriptValue(engine, 0x10000)", true); + toBoolean.insert("QScriptValue(engine, 0x10001)", true); + toBoolean.insert("QScriptValue(engine, qSNaN())", false); + toBoolean.insert("QScriptValue(engine, qQNaN())", false); + toBoolean.insert("QScriptValue(engine, qInf())", true); + toBoolean.insert("QScriptValue(engine, -qInf())", true); + toBoolean.insert("QScriptValue(engine, \"NaN\")", true); + toBoolean.insert("QScriptValue(engine, \"Infinity\")", true); + toBoolean.insert("QScriptValue(engine, \"-Infinity\")", true); + toBoolean.insert("QScriptValue(engine, \"ciao\")", true); + toBoolean.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"\"))", false); + toBoolean.insert("QScriptValue(engine, QString())", false); + toBoolean.insert("QScriptValue(engine, QString(\"0\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"123\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"1.23\"))", true); + toBoolean.insert("engine->evaluate(\"[]\")", true); + toBoolean.insert("engine->evaluate(\"{}\")", false); + toBoolean.insert("engine->evaluate(\"Object.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Date.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Array.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Function.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Error.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Object\")", true); + toBoolean.insert("engine->evaluate(\"Array\")", true); + toBoolean.insert("engine->evaluate(\"Number\")", true); + toBoolean.insert("engine->evaluate(\"Function\")", true); + toBoolean.insert("engine->evaluate(\"(function() { return 1; })\")", true); + toBoolean.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + toBoolean.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + toBoolean.insert("engine->evaluate(\"/foo/\")", true); + toBoolean.insert("engine->evaluate(\"new Object()\")", true); + toBoolean.insert("engine->evaluate(\"new Array()\")", true); + toBoolean.insert("engine->evaluate(\"new Error()\")", true); + } + newRow(expr) << toBoolean.value(expr); +} + +void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(toBoolean) + + +void tst_QScriptValue::toInteger_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInteger_makeData(const char* expr) +{ + static QHash toInteger; + if (toInteger.isEmpty()) { + toInteger.insert("QScriptValue()", 0); + toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(true)", 1); + toInteger.insert("QScriptValue(false)", 0); + toInteger.insert("QScriptValue(int(122))", 122); + toInteger.insert("QScriptValue(uint(124))", 124); + toInteger.insert("QScriptValue(0)", 0); + toInteger.insert("QScriptValue(0.0)", 0); + toInteger.insert("QScriptValue(123.0)", 123); + toInteger.insert("QScriptValue(6.37e-8)", 0); + toInteger.insert("QScriptValue(-6.37e-8)", 0); + toInteger.insert("QScriptValue(0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0x10000)", 65536); + toInteger.insert("QScriptValue(0x10001)", 65537); + toInteger.insert("QScriptValue(qSNaN())", 0); + toInteger.insert("QScriptValue(qQNaN())", 0); + toInteger.insert("QScriptValue(qInf())", qInf()); + toInteger.insert("QScriptValue(-qInf())", qInf()); + toInteger.insert("QScriptValue(\"NaN\")", 0); + toInteger.insert("QScriptValue(\"Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"ciao\")", 0); + toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(QString(\"\"))", 0); + toInteger.insert("QScriptValue(QString())", 0); + toInteger.insert("QScriptValue(QString(\"0\"))", 0); + toInteger.insert("QScriptValue(QString(\"123\"))", 123); + toInteger.insert("QScriptValue(QString(\"12.4\"))", 12); + toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(0, true)", 1); + toInteger.insert("QScriptValue(0, false)", 0); + toInteger.insert("QScriptValue(0, int(122))", 122); + toInteger.insert("QScriptValue(0, uint(124))", 124); + toInteger.insert("QScriptValue(0, 0)", 0); + toInteger.insert("QScriptValue(0, 0.0)", 0); + toInteger.insert("QScriptValue(0, 123.0)", 123); + toInteger.insert("QScriptValue(0, 6.37e-8)", 0); + toInteger.insert("QScriptValue(0, -6.37e-8)", 0); + toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0, 0x10000)", 65536); + toInteger.insert("QScriptValue(0, 0x10001)", 65537); + toInteger.insert("QScriptValue(0, qSNaN())", 0); + toInteger.insert("QScriptValue(0, qQNaN())", 0); + toInteger.insert("QScriptValue(0, qInf())", qInf()); + toInteger.insert("QScriptValue(0, -qInf())", qInf()); + toInteger.insert("QScriptValue(0, \"NaN\")", 0); + toInteger.insert("QScriptValue(0, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"ciao\")", 0); + toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"\"))", 0); + toInteger.insert("QScriptValue(0, QString())", 0); + toInteger.insert("QScriptValue(0, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(engine, true)", 1); + toInteger.insert("QScriptValue(engine, false)", 0); + toInteger.insert("QScriptValue(engine, int(122))", 122); + toInteger.insert("QScriptValue(engine, uint(124))", 124); + toInteger.insert("QScriptValue(engine, 0)", 0); + toInteger.insert("QScriptValue(engine, 0.0)", 0); + toInteger.insert("QScriptValue(engine, 123.0)", 123); + toInteger.insert("QScriptValue(engine, 6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, -6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(engine, 0x10000)", 65536); + toInteger.insert("QScriptValue(engine, 0x10001)", 65537); + toInteger.insert("QScriptValue(engine, qSNaN())", 0); + toInteger.insert("QScriptValue(engine, qQNaN())", 0); + toInteger.insert("QScriptValue(engine, qInf())", qInf()); + toInteger.insert("QScriptValue(engine, -qInf())", qInf()); + toInteger.insert("QScriptValue(engine, \"NaN\")", 0); + toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"ciao\")", 0); + toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"\"))", 0); + toInteger.insert("QScriptValue(engine, QString())", 0); + toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInteger.insert("engine->evaluate(\"[]\")", 0); + toInteger.insert("engine->evaluate(\"{}\")", 0); + toInteger.insert("engine->evaluate(\"Object.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Date.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Array.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Function.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Error.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Object\")", 0); + toInteger.insert("engine->evaluate(\"Array\")", 0); + toInteger.insert("engine->evaluate(\"Number\")", 0); + toInteger.insert("engine->evaluate(\"Function\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInteger.insert("engine->evaluate(\"/foo/\")", 0); + toInteger.insert("engine->evaluate(\"new Object()\")", 0); + toInteger.insert("engine->evaluate(\"new Array()\")", 0); + toInteger.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toInteger.value(expr); +} + +void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toInteger())); + return; + } + QCOMPARE(value.toInteger(), expected); +} + +DEFINE_TEST_FUNCTION(toInteger) + + +void tst_QScriptValue::toInt32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInt32_makeData(const char* expr) +{ + static QHash toInt32; + if (toInt32.isEmpty()) { + toInt32.insert("QScriptValue()", 0); + toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(true)", 1); + toInt32.insert("QScriptValue(false)", 0); + toInt32.insert("QScriptValue(int(122))", 122); + toInt32.insert("QScriptValue(uint(124))", 124); + toInt32.insert("QScriptValue(0)", 0); + toInt32.insert("QScriptValue(0.0)", 0); + toInt32.insert("QScriptValue(123.0)", 123); + toInt32.insert("QScriptValue(6.37e-8)", 0); + toInt32.insert("QScriptValue(-6.37e-8)", 0); + toInt32.insert("QScriptValue(0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0x10000)", 65536); + toInt32.insert("QScriptValue(0x10001)", 65537); + toInt32.insert("QScriptValue(qSNaN())", 0); + toInt32.insert("QScriptValue(qQNaN())", 0); + toInt32.insert("QScriptValue(qInf())", 0); + toInt32.insert("QScriptValue(-qInf())", 0); + toInt32.insert("QScriptValue(\"NaN\")", 0); + toInt32.insert("QScriptValue(\"Infinity\")", 0); + toInt32.insert("QScriptValue(\"-Infinity\")", 0); + toInt32.insert("QScriptValue(\"ciao\")", 0); + toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(QString(\"\"))", 0); + toInt32.insert("QScriptValue(QString())", 0); + toInt32.insert("QScriptValue(QString(\"0\"))", 0); + toInt32.insert("QScriptValue(QString(\"123\"))", 123); + toInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(0, true)", 1); + toInt32.insert("QScriptValue(0, false)", 0); + toInt32.insert("QScriptValue(0, int(122))", 122); + toInt32.insert("QScriptValue(0, uint(124))", 124); + toInt32.insert("QScriptValue(0, 0)", 0); + toInt32.insert("QScriptValue(0, 0.0)", 0); + toInt32.insert("QScriptValue(0, 123.0)", 123); + toInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0, 0x10000)", 65536); + toInt32.insert("QScriptValue(0, 0x10001)", 65537); + toInt32.insert("QScriptValue(0, qSNaN())", 0); + toInt32.insert("QScriptValue(0, qQNaN())", 0); + toInt32.insert("QScriptValue(0, qInf())", 0); + toInt32.insert("QScriptValue(0, -qInf())", 0); + toInt32.insert("QScriptValue(0, \"NaN\")", 0); + toInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"ciao\")", 0); + toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toInt32.insert("QScriptValue(0, QString())", 0); + toInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(engine, true)", 1); + toInt32.insert("QScriptValue(engine, false)", 0); + toInt32.insert("QScriptValue(engine, int(122))", 122); + toInt32.insert("QScriptValue(engine, uint(124))", 124); + toInt32.insert("QScriptValue(engine, 0)", 0); + toInt32.insert("QScriptValue(engine, 0.0)", 0); + toInt32.insert("QScriptValue(engine, 123.0)", 123); + toInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toInt32.insert("QScriptValue(engine, qSNaN())", 0); + toInt32.insert("QScriptValue(engine, qQNaN())", 0); + toInt32.insert("QScriptValue(engine, qInf())", 0); + toInt32.insert("QScriptValue(engine, -qInf())", 0); + toInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toInt32.insert("QScriptValue(engine, QString())", 0); + toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInt32.insert("engine->evaluate(\"[]\")", 0); + toInt32.insert("engine->evaluate(\"{}\")", 0); + toInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Object\")", 0); + toInt32.insert("engine->evaluate(\"Array\")", 0); + toInt32.insert("engine->evaluate(\"Number\")", 0); + toInt32.insert("engine->evaluate(\"Function\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInt32.insert("engine->evaluate(\"/foo/\")", 0); + toInt32.insert("engine->evaluate(\"new Object()\")", 0); + toInt32.insert("engine->evaluate(\"new Array()\")", 0); + toInt32.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toInt32.value(expr); +} + +void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(value.toInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toInt32) + + +void tst_QScriptValue::toUInt32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt32_makeData(const char* expr) +{ + static QHash toUInt32; + if (toUInt32.isEmpty()) { + toUInt32.insert("QScriptValue()", 0); + toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(true)", 1); + toUInt32.insert("QScriptValue(false)", 0); + toUInt32.insert("QScriptValue(int(122))", 122); + toUInt32.insert("QScriptValue(uint(124))", 124); + toUInt32.insert("QScriptValue(0)", 0); + toUInt32.insert("QScriptValue(0.0)", 0); + toUInt32.insert("QScriptValue(123.0)", 123); + toUInt32.insert("QScriptValue(6.37e-8)", 0); + toUInt32.insert("QScriptValue(-6.37e-8)", 0); + toUInt32.insert("QScriptValue(0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0x10000)", 65536); + toUInt32.insert("QScriptValue(0x10001)", 65537); + toUInt32.insert("QScriptValue(qSNaN())", 0); + toUInt32.insert("QScriptValue(qQNaN())", 0); + toUInt32.insert("QScriptValue(qInf())", 0); + toUInt32.insert("QScriptValue(-qInf())", 0); + toUInt32.insert("QScriptValue(\"NaN\")", 0); + toUInt32.insert("QScriptValue(\"Infinity\")", 0); + toUInt32.insert("QScriptValue(\"-Infinity\")", 0); + toUInt32.insert("QScriptValue(\"ciao\")", 0); + toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(QString(\"\"))", 0); + toUInt32.insert("QScriptValue(QString())", 0); + toUInt32.insert("QScriptValue(QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(0, true)", 1); + toUInt32.insert("QScriptValue(0, false)", 0); + toUInt32.insert("QScriptValue(0, int(122))", 122); + toUInt32.insert("QScriptValue(0, uint(124))", 124); + toUInt32.insert("QScriptValue(0, 0)", 0); + toUInt32.insert("QScriptValue(0, 0.0)", 0); + toUInt32.insert("QScriptValue(0, 123.0)", 123); + toUInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0, 0x10000)", 65536); + toUInt32.insert("QScriptValue(0, 0x10001)", 65537); + toUInt32.insert("QScriptValue(0, qSNaN())", 0); + toUInt32.insert("QScriptValue(0, qQNaN())", 0); + toUInt32.insert("QScriptValue(0, qInf())", 0); + toUInt32.insert("QScriptValue(0, -qInf())", 0); + toUInt32.insert("QScriptValue(0, \"NaN\")", 0); + toUInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"ciao\")", 0); + toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(0, QString())", 0); + toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(engine, true)", 1); + toUInt32.insert("QScriptValue(engine, false)", 0); + toUInt32.insert("QScriptValue(engine, int(122))", 122); + toUInt32.insert("QScriptValue(engine, uint(124))", 124); + toUInt32.insert("QScriptValue(engine, 0)", 0); + toUInt32.insert("QScriptValue(engine, 0.0)", 0); + toUInt32.insert("QScriptValue(engine, 123.0)", 123); + toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toUInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toUInt32.insert("QScriptValue(engine, qSNaN())", 0); + toUInt32.insert("QScriptValue(engine, qQNaN())", 0); + toUInt32.insert("QScriptValue(engine, qInf())", 0); + toUInt32.insert("QScriptValue(engine, -qInf())", 0); + toUInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(engine, QString())", 0); + toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt32.insert("engine->evaluate(\"[]\")", 0); + toUInt32.insert("engine->evaluate(\"{}\")", 0); + toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Object\")", 0); + toUInt32.insert("engine->evaluate(\"Array\")", 0); + toUInt32.insert("engine->evaluate(\"Number\")", 0); + toUInt32.insert("engine->evaluate(\"Function\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt32.insert("engine->evaluate(\"/foo/\")", 0); + toUInt32.insert("engine->evaluate(\"new Object()\")", 0); + toUInt32.insert("engine->evaluate(\"new Array()\")", 0); + toUInt32.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toUInt32.value(expr); +} + +void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(value.toUInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt32) + + +void tst_QScriptValue::toUInt16_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt16_makeData(const char* expr) +{ + static QHash toUInt16; + if (toUInt16.isEmpty()) { + toUInt16.insert("QScriptValue()", 0); + toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(true)", 1); + toUInt16.insert("QScriptValue(false)", 0); + toUInt16.insert("QScriptValue(int(122))", 122); + toUInt16.insert("QScriptValue(uint(124))", 124); + toUInt16.insert("QScriptValue(0)", 0); + toUInt16.insert("QScriptValue(0.0)", 0); + toUInt16.insert("QScriptValue(123.0)", 123); + toUInt16.insert("QScriptValue(6.37e-8)", 0); + toUInt16.insert("QScriptValue(-6.37e-8)", 0); + toUInt16.insert("QScriptValue(0x43211234)", 4660); + toUInt16.insert("QScriptValue(0x10000)", 0); + toUInt16.insert("QScriptValue(0x10001)", 1); + toUInt16.insert("QScriptValue(qSNaN())", 0); + toUInt16.insert("QScriptValue(qQNaN())", 0); + toUInt16.insert("QScriptValue(qInf())", 0); + toUInt16.insert("QScriptValue(-qInf())", 0); + toUInt16.insert("QScriptValue(\"NaN\")", 0); + toUInt16.insert("QScriptValue(\"Infinity\")", 0); + toUInt16.insert("QScriptValue(\"-Infinity\")", 0); + toUInt16.insert("QScriptValue(\"ciao\")", 0); + toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(QString(\"\"))", 0); + toUInt16.insert("QScriptValue(QString())", 0); + toUInt16.insert("QScriptValue(QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(0, true)", 1); + toUInt16.insert("QScriptValue(0, false)", 0); + toUInt16.insert("QScriptValue(0, int(122))", 122); + toUInt16.insert("QScriptValue(0, uint(124))", 124); + toUInt16.insert("QScriptValue(0, 0)", 0); + toUInt16.insert("QScriptValue(0, 0.0)", 0); + toUInt16.insert("QScriptValue(0, 123.0)", 123); + toUInt16.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(0, 0x10000)", 0); + toUInt16.insert("QScriptValue(0, 0x10001)", 1); + toUInt16.insert("QScriptValue(0, qSNaN())", 0); + toUInt16.insert("QScriptValue(0, qQNaN())", 0); + toUInt16.insert("QScriptValue(0, qInf())", 0); + toUInt16.insert("QScriptValue(0, -qInf())", 0); + toUInt16.insert("QScriptValue(0, \"NaN\")", 0); + toUInt16.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"ciao\")", 0); + toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(0, QString())", 0); + toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(engine, true)", 1); + toUInt16.insert("QScriptValue(engine, false)", 0); + toUInt16.insert("QScriptValue(engine, int(122))", 122); + toUInt16.insert("QScriptValue(engine, uint(124))", 124); + toUInt16.insert("QScriptValue(engine, 0)", 0); + toUInt16.insert("QScriptValue(engine, 0.0)", 0); + toUInt16.insert("QScriptValue(engine, 123.0)", 123); + toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(engine, 0x10000)", 0); + toUInt16.insert("QScriptValue(engine, 0x10001)", 1); + toUInt16.insert("QScriptValue(engine, qSNaN())", 0); + toUInt16.insert("QScriptValue(engine, qQNaN())", 0); + toUInt16.insert("QScriptValue(engine, qInf())", 0); + toUInt16.insert("QScriptValue(engine, -qInf())", 0); + toUInt16.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(engine, QString())", 0); + toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt16.insert("engine->evaluate(\"[]\")", 0); + toUInt16.insert("engine->evaluate(\"{}\")", 0); + toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Object\")", 0); + toUInt16.insert("engine->evaluate(\"Array\")", 0); + toUInt16.insert("engine->evaluate(\"Number\")", 0); + toUInt16.insert("engine->evaluate(\"Function\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt16.insert("engine->evaluate(\"/foo/\")", 0); + toUInt16.insert("engine->evaluate(\"new Object()\")", 0); + toUInt16.insert("engine->evaluate(\"new Array()\")", 0); + toUInt16.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toUInt16.value(expr); +} + +void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(value.toUInt16(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt16) + + +void tst_QScriptValue::equals_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::equals_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue() <=> QScriptValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::equals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.equals(other), expected); +} + +DEFINE_TEST_FUNCTION(equals) + + +void tst_QScriptValue::strictlyEquals_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::strictlyEquals_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue() <=> QScriptValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.strictlyEquals(other), expected); +} + +DEFINE_TEST_FUNCTION(strictlyEquals) + + +void tst_QScriptValue::lessThan_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::lessThan_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")"); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.lessThan(other), expected); +} + +DEFINE_TEST_FUNCTION(lessThan) + + +void tst_QScriptValue::instanceOf_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::instanceOf_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.instanceOf(other), expected); +} + +DEFINE_TEST_FUNCTION(instanceOf) + + +void tst_QScriptValue::qscriptvalue_castQString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", ""); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(QScriptValue::NullValue)", ""); + value.insert("QScriptValue(true)", "true"); + value.insert("QScriptValue(false)", "false"); + value.insert("QScriptValue(int(122))", "122"); + value.insert("QScriptValue(uint(124))", "124"); + value.insert("QScriptValue(0)", "0"); + value.insert("QScriptValue(0.0)", "0"); + value.insert("QScriptValue(123.0)", "123"); + value.insert("QScriptValue(6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(0x43211234)", "1126240820"); + value.insert("QScriptValue(0x10000)", "65536"); + value.insert("QScriptValue(0x10001)", "65537"); + value.insert("QScriptValue(qSNaN())", "NaN"); + value.insert("QScriptValue(qQNaN())", "NaN"); + value.insert("QScriptValue(qInf())", "Infinity"); + value.insert("QScriptValue(-qInf())", "-Infinity"); + value.insert("QScriptValue(\"NaN\")", "NaN"); + value.insert("QScriptValue(\"Infinity\")", "Infinity"); + value.insert("QScriptValue(\"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(\"ciao\")", "ciao"); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(QString(\"\"))", ""); + value.insert("QScriptValue(QString())", ""); + value.insert("QScriptValue(QString(\"0\"))", "0"); + value.insert("QScriptValue(QString(\"123\"))", "123"); + value.insert("QScriptValue(QString(\"12.4\"))", "12.4"); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(0, QScriptValue::NullValue)", ""); + value.insert("QScriptValue(0, true)", "true"); + value.insert("QScriptValue(0, false)", "false"); + value.insert("QScriptValue(0, int(122))", "122"); + value.insert("QScriptValue(0, uint(124))", "124"); + value.insert("QScriptValue(0, 0)", "0"); + value.insert("QScriptValue(0, 0.0)", "0"); + value.insert("QScriptValue(0, 123.0)", "123"); + value.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(0, 0x43211234)", "1126240820"); + value.insert("QScriptValue(0, 0x10000)", "65536"); + value.insert("QScriptValue(0, 0x10001)", "65537"); + value.insert("QScriptValue(0, qSNaN())", "NaN"); + value.insert("QScriptValue(0, qQNaN())", "NaN"); + value.insert("QScriptValue(0, qInf())", "Infinity"); + value.insert("QScriptValue(0, -qInf())", "-Infinity"); + value.insert("QScriptValue(0, \"NaN\")", "NaN"); + value.insert("QScriptValue(0, \"Infinity\")", "Infinity"); + value.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(0, \"ciao\")", "ciao"); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(0, QString(\"\"))", ""); + value.insert("QScriptValue(0, QString())", ""); + value.insert("QScriptValue(0, QString(\"0\"))", "0"); + value.insert("QScriptValue(0, QString(\"123\"))", "123"); + value.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", ""); + value.insert("QScriptValue(engine, true)", "true"); + value.insert("QScriptValue(engine, false)", "false"); + value.insert("QScriptValue(engine, int(122))", "122"); + value.insert("QScriptValue(engine, uint(124))", "124"); + value.insert("QScriptValue(engine, 0)", "0"); + value.insert("QScriptValue(engine, 0.0)", "0"); + value.insert("QScriptValue(engine, 123.0)", "123"); + value.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(engine, 0x43211234)", "1126240820"); + value.insert("QScriptValue(engine, 0x10000)", "65536"); + value.insert("QScriptValue(engine, 0x10001)", "65537"); + value.insert("QScriptValue(engine, qSNaN())", "NaN"); + value.insert("QScriptValue(engine, qQNaN())", "NaN"); + value.insert("QScriptValue(engine, qInf())", "Infinity"); + value.insert("QScriptValue(engine, -qInf())", "-Infinity"); + value.insert("QScriptValue(engine, \"NaN\")", "NaN"); + value.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); + value.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(engine, \"ciao\")", "ciao"); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(engine, QString(\"\"))", ""); + value.insert("QScriptValue(engine, QString())", ""); + value.insert("QScriptValue(engine, QString(\"0\"))", "0"); + value.insert("QScriptValue(engine, QString(\"123\"))", "123"); + value.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); + value.insert("engine->evaluate(\"[]\")", ""); + value.insert("engine->evaluate(\"{}\")", ""); + value.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); + value.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); + value.insert("engine->evaluate(\"Array.prototype\")", ""); + value.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); + value.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); + value.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); + value.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); + value.insert("engine->evaluate(\"/foo/\")", "/foo/"); + value.insert("engine->evaluate(\"new Object()\")", "[object Object]"); + value.insert("engine->evaluate(\"new Array()\")", ""); + value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castQString) + + +void tst_QScriptValue::qscriptvalue_castqsreal_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", qQNaN()); + value.insert("QScriptValue(qQNaN())", qQNaN()); + value.insert("QScriptValue(qInf())", qInf()); + value.insert("QScriptValue(-qInf())", qInf()); + value.insert("QScriptValue(\"NaN\")", qQNaN()); + value.insert("QScriptValue(\"Infinity\")", qInf()); + value.insert("QScriptValue(\"-Infinity\")", qInf()); + value.insert("QScriptValue(\"ciao\")", qQNaN()); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12.4); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", qQNaN()); + value.insert("QScriptValue(0, qQNaN())", qQNaN()); + value.insert("QScriptValue(0, qInf())", qInf()); + value.insert("QScriptValue(0, -qInf())", qInf()); + value.insert("QScriptValue(0, \"NaN\")", qQNaN()); + value.insert("QScriptValue(0, \"Infinity\")", qInf()); + value.insert("QScriptValue(0, \"-Infinity\")", qInf()); + value.insert("QScriptValue(0, \"ciao\")", qQNaN()); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", qQNaN()); + value.insert("QScriptValue(engine, qQNaN())", qQNaN()); + value.insert("QScriptValue(engine, qInf())", qInf()); + value.insert("QScriptValue(engine, -qInf())", qInf()); + value.insert("QScriptValue(engine, \"NaN\")", qQNaN()); + value.insert("QScriptValue(engine, \"Infinity\")", qInf()); + value.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + value.insert("QScriptValue(engine, \"ciao\")", qQNaN()); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", qQNaN()); + value.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Object\")", qQNaN()); + value.insert("engine->evaluate(\"Array\")", qQNaN()); + value.insert("engine->evaluate(\"Number\")", qQNaN()); + value.insert("engine->evaluate(\"Function\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); + value.insert("engine->evaluate(\"/foo/\")", qQNaN()); + value.insert("engine->evaluate(\"new Object()\")", qQNaN()); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", qQNaN()); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(qscriptvalue_cast(value))); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(qscriptvalue_cast(value))); + return; + } + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) + + +void tst_QScriptValue::qscriptvalue_castbool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", false); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(QScriptValue::NullValue)", false); + value.insert("QScriptValue(true)", true); + value.insert("QScriptValue(false)", false); + value.insert("QScriptValue(int(122))", true); + value.insert("QScriptValue(uint(124))", true); + value.insert("QScriptValue(0)", false); + value.insert("QScriptValue(0.0)", false); + value.insert("QScriptValue(123.0)", true); + value.insert("QScriptValue(6.37e-8)", true); + value.insert("QScriptValue(-6.37e-8)", true); + value.insert("QScriptValue(0x43211234)", true); + value.insert("QScriptValue(0x10000)", true); + value.insert("QScriptValue(0x10001)", true); + value.insert("QScriptValue(qSNaN())", false); + value.insert("QScriptValue(qQNaN())", false); + value.insert("QScriptValue(qInf())", true); + value.insert("QScriptValue(-qInf())", true); + value.insert("QScriptValue(\"NaN\")", true); + value.insert("QScriptValue(\"Infinity\")", true); + value.insert("QScriptValue(\"-Infinity\")", true); + value.insert("QScriptValue(\"ciao\")", true); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(QString(\"\"))", false); + value.insert("QScriptValue(QString())", false); + value.insert("QScriptValue(QString(\"0\"))", true); + value.insert("QScriptValue(QString(\"123\"))", true); + value.insert("QScriptValue(QString(\"12.4\"))", true); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(0, QScriptValue::NullValue)", false); + value.insert("QScriptValue(0, true)", true); + value.insert("QScriptValue(0, false)", false); + value.insert("QScriptValue(0, int(122))", true); + value.insert("QScriptValue(0, uint(124))", true); + value.insert("QScriptValue(0, 0)", false); + value.insert("QScriptValue(0, 0.0)", false); + value.insert("QScriptValue(0, 123.0)", true); + value.insert("QScriptValue(0, 6.37e-8)", true); + value.insert("QScriptValue(0, -6.37e-8)", true); + value.insert("QScriptValue(0, 0x43211234)", true); + value.insert("QScriptValue(0, 0x10000)", true); + value.insert("QScriptValue(0, 0x10001)", true); + value.insert("QScriptValue(0, qSNaN())", false); + value.insert("QScriptValue(0, qQNaN())", false); + value.insert("QScriptValue(0, qInf())", true); + value.insert("QScriptValue(0, -qInf())", true); + value.insert("QScriptValue(0, \"NaN\")", true); + value.insert("QScriptValue(0, \"Infinity\")", true); + value.insert("QScriptValue(0, \"-Infinity\")", true); + value.insert("QScriptValue(0, \"ciao\")", true); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(0, QString(\"\"))", false); + value.insert("QScriptValue(0, QString())", false); + value.insert("QScriptValue(0, QString(\"0\"))", true); + value.insert("QScriptValue(0, QString(\"123\"))", true); + value.insert("QScriptValue(0, QString(\"12.3\"))", true); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + value.insert("QScriptValue(engine, true)", true); + value.insert("QScriptValue(engine, false)", false); + value.insert("QScriptValue(engine, int(122))", true); + value.insert("QScriptValue(engine, uint(124))", true); + value.insert("QScriptValue(engine, 0)", false); + value.insert("QScriptValue(engine, 0.0)", false); + value.insert("QScriptValue(engine, 123.0)", true); + value.insert("QScriptValue(engine, 6.37e-8)", true); + value.insert("QScriptValue(engine, -6.37e-8)", true); + value.insert("QScriptValue(engine, 0x43211234)", true); + value.insert("QScriptValue(engine, 0x10000)", true); + value.insert("QScriptValue(engine, 0x10001)", true); + value.insert("QScriptValue(engine, qSNaN())", false); + value.insert("QScriptValue(engine, qQNaN())", false); + value.insert("QScriptValue(engine, qInf())", true); + value.insert("QScriptValue(engine, -qInf())", true); + value.insert("QScriptValue(engine, \"NaN\")", true); + value.insert("QScriptValue(engine, \"Infinity\")", true); + value.insert("QScriptValue(engine, \"-Infinity\")", true); + value.insert("QScriptValue(engine, \"ciao\")", true); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(engine, QString(\"\"))", false); + value.insert("QScriptValue(engine, QString())", false); + value.insert("QScriptValue(engine, QString(\"0\"))", true); + value.insert("QScriptValue(engine, QString(\"123\"))", true); + value.insert("QScriptValue(engine, QString(\"1.23\"))", true); + value.insert("engine->evaluate(\"[]\")", true); + value.insert("engine->evaluate(\"{}\")", false); + value.insert("engine->evaluate(\"Object.prototype\")", true); + value.insert("engine->evaluate(\"Date.prototype\")", true); + value.insert("engine->evaluate(\"Array.prototype\")", true); + value.insert("engine->evaluate(\"Function.prototype\")", true); + value.insert("engine->evaluate(\"Error.prototype\")", true); + value.insert("engine->evaluate(\"Object\")", true); + value.insert("engine->evaluate(\"Array\")", true); + value.insert("engine->evaluate(\"Number\")", true); + value.insert("engine->evaluate(\"Function\")", true); + value.insert("engine->evaluate(\"(function() { return 1; })\")", true); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + value.insert("engine->evaluate(\"/foo/\")", true); + value.insert("engine->evaluate(\"new Object()\")", true); + value.insert("engine->evaluate(\"new Array()\")", true); + value.insert("engine->evaluate(\"new Error()\")", true); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castbool) + + +void tst_QScriptValue::qscriptvalue_castqint32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) + + +void tst_QScriptValue::qscriptvalue_castquint32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) + + +void tst_QScriptValue::qscriptvalue_castquint16_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 4660); + value.insert("QScriptValue(0x10000)", 0); + value.insert("QScriptValue(0x10001)", 1); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 4660); + value.insert("QScriptValue(0, 0x10000)", 0); + value.insert("QScriptValue(0, 0x10001)", 1); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 4660); + value.insert("QScriptValue(engine, 0x10000)", 0); + value.insert("QScriptValue(engine, 0x10001)", 1); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint16) -- cgit v0.12 From c186c0402781ec6ef6ee97e2168d16f0b043044e Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 2 Feb 2010 13:51:43 -0800 Subject: Make DSFLIP_ONSYNC part of the default flip flags. Reviewed-by: Jervey Kong --- src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 6b251c7..cd4d5c2 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -921,7 +921,7 @@ void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args) qPrintable(flip)); } } else { - flipFlags = DSFLIP_BLIT; + flipFlags = DSFLIP_BLIT|DSFLIP_ONSYNC; } } -- cgit v0.12 From 9647dfb6d363812c59bd7ffb2a6c4ee2a34035ce Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 2 Feb 2010 22:57:39 +0100 Subject: Fix license headers on these new files (and the generator). --- tests/auto/qscriptvalue/testgen/gen.py | 44 +++++--- tests/auto/qscriptvalue/testgen/main.cpp | 58 +++++++---- tests/auto/qscriptvalue/testgen/testgenerator.cpp | 116 ++++++++++++++------- tests/auto/qscriptvalue/testgen/testgenerator.h | 58 +++++++---- .../qscriptvalue/tst_qscriptvalue_generated.cpp | 58 +++++++---- 5 files changed, 230 insertions(+), 104 deletions(-) diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py index fddb853..c14fe86 100755 --- a/tests/auto/qscriptvalue/testgen/gen.py +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -3,20 +3,36 @@ #Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) -#This library is free software; you can redistribute it and/or -#modify it under the terms of the GNU Library General Public -#License as published by the Free Software Foundation; either -#version 2 of the License, or (at your option) any later version. - -#This library is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -#Library General Public License for more details. - -#You should have received a copy of the GNU Library General Public License -#along with this library; see the file COPYING.LIB. If not, write to -#the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -#Boston, MA 02110-1301, USA. +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## 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, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ from __future__ import with_statement from string import Template diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp index 389a725..fe35de9 100644 --- a/tests/auto/qscriptvalue/testgen/main.cpp +++ b/tests/auto/qscriptvalue/testgen/main.cpp @@ -1,21 +1,43 @@ -/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "testgenerator.h" #include diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp index 199e84b..d852ea5 100644 --- a/tests/auto/qscriptvalue/testgen/testgenerator.cpp +++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp @@ -1,21 +1,43 @@ -/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "testgenerator.h" @@ -364,24 +386,46 @@ static QString generateCompareDef(const QString& comparisionType, const QList& allDataTags) { - static const QString templ = "/*\n"\ - " Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)\n"\ - "\n"\ - " This library is free software; you can redistribute it and/or\n"\ - " modify it under the terms of the GNU Library General Public\n"\ - " License as published by the Free Software Foundation; either\n"\ - " version 2 of the License, or (at your option) any later version.\n"\ - "\n"\ - " This library is distributed in the hope that it will be useful,\n"\ - " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"\ - " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"\ - " Library General Public License for more details.\n"\ - "\n"\ - " You should have received a copy of the GNU Library General Public License\n"\ - " along with this library; see the file COPYING.LIB. If not, write to\n"\ - " the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"\ - " Boston, MA 02110-1301, USA.\n"\ - "*/\n"\ + static const QString templ = "/****************************************************************************\n" + "**\n" + "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n" + "** All rights reserved.\n" + "** Contact: Nokia Corporation (qt-info@nokia.com)\n" + "**\n" + "** This file is part of the test suite of the Qt Toolkit.\n" + "**\n" + "** $QT_BEGIN_LICENSE:LGPL$\n" + "** No Commercial Usage\n" + "** This file contains pre-release code and may not be distributed.\n" + "** You may use this file in accordance with the terms and conditions\n" + "** contained in the Technology Preview License Agreement accompanying\n" + "** this package.\n" + "**\n" + "** GNU Lesser General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU Lesser\n" + "** General Public License version 2.1 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.LGPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU Lesser General Public License version 2.1 requirements\n" + "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" + "**\n" + "** In addition, as a special exception, Nokia gives you certain additional\n" + "** rights. These rights are described in the Nokia Qt LGPL Exception\n" + "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n" + "**\n" + "** If you have questions regarding the use of this file, please contact\n" + "** Nokia at qt-info@nokia.com.\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "** $QT_END_LICENSE$\n" + "**\n" + "****************************************************************************/\n" "\n"\ "#include \"tst_qscriptvalue.h\"\n\n"\ "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\ diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h index d3a2196..8f4a357 100644 --- a/tests/auto/qscriptvalue/testgen/testgenerator.h +++ b/tests/auto/qscriptvalue/testgen/testgenerator.h @@ -1,21 +1,43 @@ -/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #ifndef TESTGENERATOR_H #define TESTGENERATOR_H diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp index 6a59509..1d105b4 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -1,21 +1,43 @@ -/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "tst_qscriptvalue.h" -- cgit v0.12 From 89377dc65ea505de568bb7243396ae260f435438 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 3 Feb 2010 09:36:41 +1000 Subject: Updated changlog 4.6.2 Added bug 7044 to log. --- dist/changes-4.6.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index d35f945..d743f10 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -85,6 +85,12 @@ QtXml - foo * bar +QtMultimedia +------------ + + - QAudioInput + * [QTBUG-7044]: QAudioInput stopped working correctly after suspend()/resume() on linux. + Qt Plugins ---------- -- cgit v0.12 From 0c73b18d0750bee9da4b88de595aa6093b5be820 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Wed, 3 Feb 2010 10:46:53 +0200 Subject: Implementation for QVGPixmapData to/fromSymbianCFbsBitmap functions. --- mkspecs/common/symbian/symbian.conf | 2 +- src/openvg/qpixmapdata_vg.cpp | 94 ++++++++++++++++++++++++++++++++++++- tests/auto/qpixmap/tst_qpixmap.cpp | 45 +++++++++++++++++- 3 files changed, 136 insertions(+), 5 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index b1ef354..7162bad 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -70,7 +70,7 @@ QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 QMAKE_LIBS_NETWORK = QMAKE_LIBS_EGL = -llibEGL QMAKE_LIBS_OPENGL = -QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource +QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource -lfbscli -lbitgdi -lgdi QMAKE_LIBS_COMPAT = QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib QMAKE_LIBS_S60 = -lavkon diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index cc0e5a1..3087b77 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -46,11 +46,13 @@ #include "qvgimagepool_p.h" #ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE +#include +#include #include typedef EGLImageKHR (*pfnEglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, EGLint*); typedef EGLBoolean (*pfnEglDestroyImageKHR)(EGLDisplay, EGLImageKHR); typedef VGImage (*pfnVgCreateEGLImageTargetKHR)(VGeglImageKHR); -#endif +#endif // QT_SYMBIAN_SUPPORTS_SGIMAGE QT_BEGIN_NAMESPACE @@ -425,6 +427,34 @@ Q_OPENVG_EXPORT VGImage qPixmapToVGImage(const QPixmap& pixmap) } #if defined(Q_OS_SYMBIAN) + +static CFbsBitmap* createBlitCopy(CFbsBitmap* bitmap) +{ + CFbsBitmap *copy = q_check_ptr(new CFbsBitmap); + if(!copy) + return 0; + + if (copy->Create(bitmap->SizeInPixels(), bitmap->DisplayMode()) != KErrNone) { + delete copy; + copy = 0; + + return 0; + } + + CFbsBitmapDevice* bitmapDevice = 0; + CFbsBitGc *bitmapGc = 0; + QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(copy)); + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); + + bitmapGc->BitBlt(TPoint(), bitmap); + + delete bitmapGc; + delete bitmapDevice; + + return copy; +} + void QVGPixmapData::cleanup() { is_null = w = h = 0; @@ -510,7 +540,49 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) eglDestroyImageKHR(context->display(), eglImage); SgDriver::Close(); } else if (type == QPixmapData::FbsBitmap) { + CFbsBitmap *bitmap = reinterpret_cast(pixmap); + + bool deleteSourceBitmap = false; + +#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE + + // Rasterize extended bitmaps + + TUid extendedBitmapType = bitmap->ExtendedBitmapType(); + if (extendedBitmapType != KNullUid) { + bitmap = createBlitCopy(bitmap); + deleteSourceBitmap = true; + } +#endif + + if (bitmap->IsCompressedInRAM()) { + bitmap = createBlitCopy(bitmap); + deleteSourceBitmap = true; + } + + TDisplayMode displayMode = bitmap->DisplayMode(); + QImage::Format format = qt_TDisplayMode2Format(displayMode); + + TSize size = bitmap->SizeInPixels(); + + bitmap->BeginDataAccess(); + uchar *bytes = (uchar*)bitmap->DataAddress(); + QImage img = QImage(bytes, size.iWidth, size.iHeight, format); + img = img.copy(); + bitmap->EndDataAccess(); + + if(displayMode == EGray2) { + //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid + //So invert mono bitmaps so that masks work correctly. + img.invertPixels(); + } else if(displayMode == EColor16M) { + img = img.rgbSwapped(); // EColor16M is BGR + } + + fromImage(img, Qt::AutoColor); + if(deleteSourceBitmap) + delete bitmap; } #else Q_UNUSED(pixmap); @@ -593,7 +665,25 @@ void* QVGPixmapData::toNativeType(NativeType type) SgDriver::Close(); return reinterpret_cast(sgImage); } else if (type == QPixmapData::FbsBitmap) { - return 0; + CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap); + + if (bitmap) { + if (bitmap->Create(TSize(source.width(), source.height()), + EColor16MAP) == KErrNone) { + const uchar *sptr = qt_vg_imageBits(source); + bitmap->BeginDataAccess(); + + uchar *dptr = (uchar*)bitmap->DataAddress(); + Mem::Copy(dptr, sptr, source.byteCount()); + + bitmap->EndDataAccess(); + } else { + delete bitmap; + bitmap = 0; + } + } + + return reinterpret_cast(bitmap); } #else Q_UNUSED(type); diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index 8bcd5e8..d7c6ad3 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -145,9 +145,11 @@ private slots: void fromWinHICON(); #endif -#if defined(Q_WS_S60) +#if defined(Q_OS_SYMBIAN) void fromSymbianCFbsBitmap_data(); void fromSymbianCFbsBitmap(); + void toSymbianCFbsBitmap_data(); + void toSymbianCFbsBitmap(); #endif void onlyNullPixmapsOutsideGuiThread(); @@ -1110,7 +1112,7 @@ void tst_QPixmap::fromWinHICON() #endif // Q_WS_WIN -#if defined(Q_WS_S60) +#if defined(Q_OS_SYMBIAN) Q_DECLARE_METATYPE(TDisplayMode) void tst_QPixmap::fromSymbianCFbsBitmap_data() @@ -1206,6 +1208,45 @@ void tst_QPixmap::fromSymbianCFbsBitmap() CleanupStack::PopAndDestroy(3); } + +void tst_QPixmap::toSymbianCFbsBitmap_data() +{ + QTest::addColumn("red"); + QTest::addColumn("green"); + QTest::addColumn("blue"); + + QTest::newRow("red") << 255 << 0 << 0; + QTest::newRow("green") << 0 << 255 << 0; + QTest::newRow("blue") << 0 << 0 << 255; +} + +void tst_QPixmap::toSymbianCFbsBitmap() +{ + QFETCH(int, red); + QFETCH(int, green); + QFETCH(int, blue); + + QPixmap pm(100, 100); + pm.fill(QColor(red, green, blue)); + + CFbsBitmap *bitmap = pm.toSymbianCFbsBitmap(); + + QVERIFY(bitmap != 0); + + // Verify size + QCOMPARE(100, (int) bitmap->SizeInPixels().iWidth); + QCOMPARE(100, (int) bitmap->SizeInPixels().iHeight); + + // Verify pixel color + TRgb pixel; + bitmap->GetPixel(pixel, TPoint(0,0)); + QCOMPARE((int)pixel.Red(), red); + QCOMPARE((int)pixel.Green(), green); + QCOMPARE((int)pixel.Blue(), blue); + + // Clean up + delete bitmap; +} #endif void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() -- cgit v0.12 From 7d4ef9167249df5f00831dc07e57705eb1ddd22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 3 Feb 2010 10:36:15 +0100 Subject: Update changes-4.6.2. --- dist/changes-4.6.2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 58dcf0e..292b3ef 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -49,6 +49,10 @@ QtGui - QBmpHandler * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images. + - QGraphicsEffect + * [QTBUG-6901] Fixed performance problem when translating items with + graphics effects. + - QImage * [QTBUG-7231] Avoid an unnecessary copy in QImage::scaled(). -- cgit v0.12 From 2a8d20453926082062246fc4cc788f88ea3c59ae Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 3 Feb 2010 11:37:24 +0200 Subject: S60 softkey refactoring (support for merging, priorities and menus) Implemented features: Softkey Merging: Widget can set only one softkey and set flag that rest of the softkeys shall be taken from parent. Priority Handling: If multiple sokftkeys with same role are set, the highest priority action gets displayed. Custom Softkey Menu: By setting QMenu to QAction and assigning a softkey role for that action, the native menubar will be displayed when sofkey is clicked. Softkey Image: Initial code for implementing sofkey image support, the final implementation is still pending legal acceptance to use eiksoftkeyimage.h header file which is under EPL license. Task-number: QTBUG-7315 Review-By: Sami Merila Review-By: Jason Barron --- src/corelib/global/qnamespace.h | 3 + src/corelib/global/qnamespace.qdoc | 15 +- src/gui/kernel/kernel.pri | 53 +++-- src/gui/kernel/qsoftkeymanager.cpp | 209 ++++++----------- src/gui/kernel/qsoftkeymanager_common_p.h | 82 +++++++ src/gui/kernel/qsoftkeymanager_p.h | 22 +- src/gui/kernel/qsoftkeymanager_s60.cpp | 366 ++++++++++++++++++++++++++++++ src/gui/kernel/qsoftkeymanager_s60_p.h | 109 +++++++++ src/gui/kernel/qt_s60_p.h | 6 + src/gui/widgets/qmainwindow.cpp | 2 - src/gui/widgets/qmenu_p.h | 7 +- src/gui/widgets/qmenu_symbian.cpp | 34 ++- src/gui/widgets/qmenubar.cpp | 2 +- 13 files changed, 727 insertions(+), 183 deletions(-) create mode 100644 src/gui/kernel/qsoftkeymanager_common_p.h create mode 100644 src/gui/kernel/qsoftkeymanager_s60.cpp create mode 100644 src/gui/kernel/qsoftkeymanager_s60_p.h diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 38e1886..177bee4 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -497,6 +497,9 @@ public: WA_WState_AcceptedTouchBeginEvent = 122, WA_TouchPadAcceptSingleTouchEvents = 123, + WA_MergeSoftkeys = 124, + WA_MergeSoftkeysRecursively = 125, + // Add new attributes before this line WA_AttributeCount }; diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 871dd5c..6627c76 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -524,11 +524,11 @@ receiver are in the same thread. Same as QueuedConnection, if the emitter and receiver are in different threads. - \value DirectConnection + \value DirectConnection The slot is invoked immediately, when the signal is emitted. - \value QueuedConnection + \value QueuedConnection The slot is invoked when control returns to the event loop of the receiver's thread. The slot is executed in the receiver's thread. @@ -1243,6 +1243,17 @@ \value WA_TouchPadAcceptSingleTouchEvents Allows touchpad single touch events to be sent to the widget. + \value WA_MergeSoftkeys Allows widget to merge softkeys with parent widget, + i.e. widget can set only one softkeys and request softkey implementation + to take rest of the softkeys from the parent. Note parents are traversed until + WA_MergeSoftkeys is not set. See also Qt::WA_MergeSoftkeysRecursively + This attribute currently has effect only on Symbian platforms + + \value WA_MergeSoftkeysRecursively Allows widget to merge softkeys recursively + with all parents. If this attribute is set, the widget parents are traversed until + window boundary (widget without parent or dialog) is found. + This attribute currently has effect only on Symbian platforms + \omitvalue WA_SetLayoutDirection \omitvalue WA_InputMethodTransparent \omitvalue WA_WState_CompressKeys diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index f2bd288..0993b86 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -7,7 +7,7 @@ PRECOMPILED_HEADER = kernel/qt_gui_pch.h KERNEL_P= kernel HEADERS += \ kernel/qaction.h \ - kernel/qaction_p.h \ + kernel/qaction_p.h \ kernel/qactiongroup.h \ kernel/qapplication.h \ kernel/qapplication_p.h \ @@ -37,8 +37,8 @@ HEADERS += \ kernel/qstackedlayout.h \ kernel/qtooltip.h \ kernel/qwhatsthis.h \ - kernel/qwidget.h \ - kernel/qwidget_p.h \ + kernel/qwidget.h \ + kernel/qwidget_p.h \ kernel/qwidgetaction.h \ kernel/qwidgetaction_p.h \ kernel/qwindowdefs.h \ @@ -49,6 +49,7 @@ HEADERS += \ kernel/qgesturerecognizer.h \ kernel/qgesturemanager_p.h \ kernel/qsoftkeymanager_p.h \ + kernel/qsoftkeymanager_common_p.h \ kernel/qguiplatformplugin_p.h SOURCES += \ @@ -84,14 +85,14 @@ SOURCES += \ kernel/qgesturerecognizer.cpp \ kernel/qgesturemanager.cpp \ kernel/qsoftkeymanager.cpp \ - kernel/qdesktopwidget.cpp \ + kernel/qdesktopwidget.cpp \ kernel/qguiplatformplugin.cpp win32 { DEFINES += QT_NO_DIRECTDRAW - HEADERS += \ - kernel/qwinnativepangesturerecognizer_win_p.h + HEADERS += \ + kernel/qwinnativepangesturerecognizer_win_p.h SOURCES += \ kernel/qapplication_win.cpp \ @@ -103,30 +104,34 @@ win32 { kernel/qsound_win.cpp \ kernel/qwidget_win.cpp \ kernel/qole_win.cpp \ - kernel/qkeymapper_win.cpp \ - kernel/qwinnativepangesturerecognizer_win.cpp + kernel/qkeymapper_win.cpp \ + kernel/qwinnativepangesturerecognizer_win.cpp - !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib + !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib } symbian { - SOURCES += \ - kernel/qapplication_s60.cpp \ - kernel/qeventdispatcher_s60.cpp \ - kernel/qwidget_s60.cpp \ - kernel/qcursor_s60.cpp \ - kernel/qdesktopwidget_s60.cpp \ - kernel/qkeymapper_s60.cpp\ - kernel/qclipboard_s60.cpp\ - kernel/qdnd_s60.cpp \ - kernel/qsound_s60.cpp + SOURCES += \ + kernel/qapplication_s60.cpp \ + kernel/qeventdispatcher_s60.cpp \ + kernel/qwidget_s60.cpp \ + kernel/qcursor_s60.cpp \ + kernel/qdesktopwidget_s60.cpp \ + kernel/qkeymapper_s60.cpp\ + kernel/qclipboard_s60.cpp\ + kernel/qdnd_s60.cpp \ + kernel/qsound_s60.cpp \ + kernel/qsoftkeymanager_s60.cpp - HEADERS += \ - kernel/qt_s60_p.h \ - kernel/qeventdispatcher_s60_p.h - LIBS += -lbafl -lestor + HEADERS += \ + kernel/qt_s60_p.h \ + kernel/qeventdispatcher_s60_p.h \ + kernel/qsoftkeymanager_s60_p.h + + LIBS += -lbafl -lestor - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + INCLUDEPATH += ../3rdparty/s60 } diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 354f90b..6d108b0 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -41,34 +41,18 @@ #include "qapplication.h" #include "qevent.h" -#ifdef Q_WS_S60 -#include "qstyle.h" -#include "private/qt_s60_p.h" -#endif +#include "qbitmap.h" #include "private/qsoftkeymanager_p.h" #include "private/qobject_p.h" - -#ifndef QT_NO_SOFTKEYMANAGER -QT_BEGIN_NAMESPACE +#include "private/qsoftkeymanager_common_p.h" #ifdef Q_WS_S60 -static const int s60CommandStart = 6000; +#include "private/qsoftkeymanager_s60_p.h" #endif -class QSoftKeyManagerPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QSoftKeyManager) - -public: - static void updateSoftKeys_sys(const QList &softKeys); - -private: - QHash keyedActions; - static QSoftKeyManager *self; - static QWidget *softKeySource; -}; +#ifndef QT_NO_SOFTKEYMANAGER +QT_BEGIN_NAMESPACE -QWidget *QSoftKeyManagerPrivate::softKeySource = 0; QSoftKeyManager *QSoftKeyManagerPrivate::self = 0; const char *QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey) @@ -105,7 +89,12 @@ QSoftKeyManager *QSoftKeyManager::instance() return QSoftKeyManagerPrivate::self; } -QSoftKeyManager::QSoftKeyManager() : QObject(*(new QSoftKeyManagerPrivate), 0) +QSoftKeyManager::QSoftKeyManager() : +#ifdef Q_WS_S60 + QObject(*(new QSoftKeyManagerPrivateS60), 0) +#else + QObject(*(new QSoftKeyManagerPrivate), 0) +#endif { } @@ -115,10 +104,11 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act QAction *action = new QAction(QSoftKeyManager::tr(text), actionWidget); QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey; switch (standardKey) { + case MenuSoftKey: // FALL-THROUGH + action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar case OkSoftKey: case SelectSoftKey: case DoneSoftKey: - case MenuSoftKey: softKeyRole = QAction::PositiveSoftKey; break; case CancelSoftKey: @@ -147,7 +137,7 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key #endif //QT_NO_ACTION } -void QSoftKeyManager::cleanupHash(QObject* obj) +void QSoftKeyManager::cleanupHash(QObject *obj) { Q_D(QSoftKeyManager); QAction *action = qobject_cast(obj); @@ -175,137 +165,78 @@ void QSoftKeyManager::updateSoftKeys() QApplication::postEvent(QSoftKeyManager::instance(), event); } -bool QSoftKeyManager::event(QEvent *e) +bool QSoftKeyManager::appendSoftkeys(const QWidget &source, int level) { -#ifndef QT_NO_ACTION - if (e->type() == QEvent::UpdateSoftKeys) { - QList softKeys; - QWidget *source = QApplication::focusWidget(); - do { - if (source) { - QList actions = source->actions(); - for (int i = 0; i < actions.count(); ++i) { - if (actions.at(i)->softKeyRole() != QAction::NoSoftKey) - softKeys.append(actions.at(i)); - } - - QWidget *parent = source->parentWidget(); - if (parent && softKeys.isEmpty() && !source->isWindow()) - source = parent; - else - break; - } else { - source = QApplication::activeWindow(); - } - } while (source); - - QSoftKeyManagerPrivate::softKeySource = source; - QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys); - return true; + Q_D(QSoftKeyManager); + bool ret = false; + QList actions = source.actions(); + for (int i = 0; i < actions.count(); ++i) { + if (actions.at(i)->softKeyRole() != QAction::NoSoftKey) { + d->requestedSoftKeyActions.insert(level, actions.at(i)); + ret = true; + } } -#endif //QT_NO_ACTION - return false; + return ret; } -#ifdef Q_WS_S60 -void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList &softkeys) +QWidget *QSoftKeyManager::softkeySource(QWidget *previousSource, bool& recursiveMerging) { - // lets not update softkeys if s60 native dialog or menu is shown - if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) - || CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) - return; - - CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer(); - nativeContainer->DrawableWindow()->SetOrdinalPosition(0); - nativeContainer->DrawableWindow()->SetPointerCapturePriority(1); //keep softkeys available in modal dialog - nativeContainer->DrawableWindow()->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren); - - int position = -1; - bool needsExitButton = true; - QT_TRAP_THROWING( - //Using -1 instead of EAknSoftkeyEmpty to avoid flickering. - nativeContainer->SetCommandL(0, -1, KNullDesC); - nativeContainer->SetCommandL(2, -1, KNullDesC); - ); - - for (int index = 0; index < softkeys.count(); index++) { - const QAction* softKeyAction = softkeys.at(index); - switch (softKeyAction->softKeyRole()) { - // Positive Actions on the LSK - case QAction::PositiveSoftKey: - position = 0; - break; - case QAction::SelectSoftKey: - position = 0; - break; - // Negative Actions on the RSK - case QAction::NegativeSoftKey: - needsExitButton = false; - position = 2; - break; - default: - break; - } - - int command = (softKeyAction->objectName().contains(QLatin1String("_q_menuSoftKeyAction"))) - ? EAknSoftkeyOptions - : s60CommandStart + index; - - // _q_menuSoftKeyAction action is set to "invisible" and all invisible actions are by default - // disabled. However we never want to dim options softkey, even it is set to "invisible" - bool dimmed = (command == EAknSoftkeyOptions) ? false : !softKeyAction->isEnabled(); - - if (position != -1) { - const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut); - QString iconText = softKeyAction->iconText(); - TPtrC text = qt_QString2TPtrC( underlineShortCut ? softKeyAction->text() : iconText); - QT_TRAP_THROWING( - nativeContainer->SetCommandL(position, command, text); - nativeContainer->DimCommand(command, dimmed); - ); - } + Q_D(QSoftKeyManager); + QWidget *source = NULL; + if (!previousSource) { + // Initial source is primarily focuswidget and secondarily activeWindow + source = QApplication::focusWidget(); + if (!source) + source = QApplication::activeWindow(); + } else { + // Softkey merging is based on four criterias + // 1. Implicit merging is used whenever focus widget does not specify any softkeys + bool implicitMerging = d->requestedSoftKeyActions.isEmpty(); + // 2. Explicit merging with parent is used whenever WA_MergeSoftkeys widget attribute is set + bool explicitMerging = previousSource->testAttribute(Qt::WA_MergeSoftkeys); + // 3. Explicit merging with all parents + recursiveMerging |= previousSource->testAttribute(Qt::WA_MergeSoftkeysRecursively); + // 4. Implicit and explicit merging always stops at window boundary + bool merging = (implicitMerging || explicitMerging || recursiveMerging) && !previousSource->isWindow(); + + source = merging ? previousSource->parentWidget() : NULL; } - - const Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource - ? QSoftKeyManagerPrivate::softKeySource->window()->windowType() - : Qt::Widget; - - if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup) - QT_TRAP_THROWING( - nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit")))); - - nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation + return source; } -bool QSoftKeyManager::handleCommand(int command) +bool QSoftKeyManager::handleUpdateSoftKeys() { - if (command >= s60CommandStart && QSoftKeyManagerPrivate::softKeySource) { - int index = command - s60CommandStart; - const QList& softKeys = QSoftKeyManagerPrivate::softKeySource->actions(); - for (int i = 0, j = 0; i < softKeys.count(); ++i) { - QAction *action = softKeys.at(i); - if (action->softKeyRole() != QAction::NoSoftKey) { - if (j == index) { - QWidget *parent = action->parentWidget(); - if (parent && parent->isEnabled()) { - action->activate(QAction::Trigger); - return true; - } - } - j++; - } + Q_D(QSoftKeyManager); + int level = 0; + d->requestedSoftKeyActions.clear(); + bool recursiveMerging = false; + QWidget *source = softkeySource(NULL, recursiveMerging); + do { + if (source) { + bool added = appendSoftkeys(*source, level); + source = softkeySource(source, recursiveMerging); + level = added ? ++level : level; } - } + } while (source); - return false; + d->updateSoftKeys_sys(); + return true; } -#else - -void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList &) +bool QSoftKeyManager::event(QEvent *e) { +#ifndef QT_NO_ACTION + if (e->type() == QEvent::UpdateSoftKeys) + return handleUpdateSoftKeys(); +#endif //QT_NO_ACTION + return false; } +#ifdef Q_WS_S60 +bool QSoftKeyManager::handleCommand(int command) +{ + return static_cast(QSoftKeyManager::instance()->d_func())->handleCommand(command); +} #endif QT_END_NAMESPACE diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h new file mode 100644 index 0000000..460d0dc --- /dev/null +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOFTKEYMANAGER_COMMON_P_H +#define QSOFTKEYMANAGER_COMMON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_HEADER + +#ifndef QT_NO_SOFTKEYMANAGER + +QT_BEGIN_NAMESPACE + +class QSoftKeyManagerPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QSoftKeyManager) + +public: + virtual void updateSoftKeys_sys() {}; + +protected: + static QSoftKeyManager *self; + QHash keyedActions; + QMultiHash requestedSoftKeyActions; + +}; + +QT_END_NAMESPACE + +#endif //QT_NO_SOFTKEYMANAGER + +QT_END_HEADER + +#endif // QSOFTKEYMANAGER_COMMON_P_H \ No newline at end of file diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h index c901a29..ce902fe 100644 --- a/src/gui/kernel/qsoftkeymanager_p.h +++ b/src/gui/kernel/qsoftkeymanager_p.h @@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE class QSoftKeyManagerPrivate; +const char MENU_ACTION_PROPERTY[] = "_q_menuaction"; + class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject { Q_OBJECT @@ -79,26 +81,30 @@ public: }; static void updateSoftKeys(); - static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget); - static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget); - #ifdef Q_WS_S60 static bool handleCommand(int); #endif -private: - QSoftKeyManager(); - static QSoftKeyManager *instance(); - static const char *standardSoftKeyText(StandardSoftKey standardKey); + static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget); + static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget); protected: bool event(QEvent *e); - Q_DISABLE_COPY(QSoftKeyManager) +private: + QSoftKeyManager(); + static QSoftKeyManager *instance(); + static const char *standardSoftKeyText(StandardSoftKey standardKey); + bool appendSoftkeys(const QWidget &source, int level); + QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging); + bool handleUpdateSoftKeys(); private Q_SLOTS: void cleanupHash(QObject* obj); void sendKeyEvent(); + +private: + Q_DISABLE_COPY(QSoftKeyManager) }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp new file mode 100644 index 0000000..67ed8b0 --- /dev/null +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qapplication.h" +#include "qevent.h" +#include "qbitmap.h" +#include "qstyle.h" +#include "qmenubar.h" +#include "private/qt_s60_p.h" +#include "private/qmenu_p.h" +#include "private/qsoftkeymanager_p.h" +#include "private/qsoftkeymanager_s60_p.h" +#include "private/qobject_p.h" +//#include +#include + +#ifndef QT_NO_SOFTKEYMANAGER +QT_BEGIN_NAMESPACE + +const int S60_COMMAND_START = 6000; +const int LSK_POSITION = 0; +const int MSK_POSITION = 3; +const int RSK_POSITION = 2; + +QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60() +{ + cachedCbaIconSize[0] = QSize(0,0); + cachedCbaIconSize[1] = QSize(0,0); + skipNextUpdate = false; +} + +bool QSoftKeyManagerPrivateS60::skipCbaUpdate() +{ + // lets not update softkeys if + // 1. We don't have application panes, i.e. cba + // 2. S60 native dialog or menu is shown + if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) || + CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || skipNextUpdate) { + skipNextUpdate = false; + return true; + } + return false; +} + +void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonGroupContainer &cba) +{ + RDrawableWindow *cbaWindow = cba.DrawableWindow(); + Q_ASSERT_X(cbaWindow, Q_FUNC_INFO, "Native CBA does not have window!"); + // Make sure CBA is visible, i.e. CBA window is on top + cbaWindow->SetOrdinalPosition(0); + // Qt shares same CBA instance between top-level widgets, + // make sure we are not faded by underlying window. + cbaWindow->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren); + // Modal dialogs capture pointer events, but shared cba instance + // shall stay responsive. Raise pointer capture priority to keep + // softkeys responsive in modal dialogs + cbaWindow->SetPointerCapturePriority(1); +} + +void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba) +{ + QT_TRAP_THROWING( + //Using -1 instead of EAknSoftkeyEmpty to avoid flickering. + cba.SetCommandL(0, -1, KNullDesC); + // TODO: Should we clear also middle SK? + cba.SetCommandL(2, -1, KNullDesC); + ); + realSoftKeyActions.clear(); +} + +QString QSoftKeyManagerPrivateS60::softkeyText(QAction &softkeyAction) +{ + // In S60 softkeys and menu items do not support key accelerators (i.e. + // CTRL+X). Therefore, removing the accelerator characters from both softkey + // and menu item texts. + const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut); + QString iconText = softkeyAction.iconText(); + return underlineShortCut ? softkeyAction.text() : iconText; +} + +QAction *QSoftKeyManagerPrivateS60::highestPrioritySoftkey(QAction::SoftKeyRole role) +{ + QAction *ret = NULL; + // Priority look up is two level + // 1. First widget with softkeys always has highest priority + for (int level = 0; !ret; level++) { + // 2. Highest priority action within widget + QList actions = requestedSoftKeyActions.values(level); + if (actions.isEmpty()) + break; + qSort(actions.begin(), actions.end(), QSoftKeyManagerPrivateS60::actionPriorityMoreThan); + foreach (QAction *action, actions) { + if (action->softKeyRole() == role) { + ret = action; + break; + } + } + } + return ret; +} + +bool QSoftKeyManagerPrivateS60::actionPriorityMoreThan(const QAction *firstItem, const QAction *secondItem) +{ + return firstItem->priority() > secondItem->priority(); +} + +void QSoftKeyManagerPrivateS60::setNativeSoftkey(CEikButtonGroupContainer &cba, + TInt position, TInt command, const TDesC &text) +{ + // Calling SetCommandL causes CBA redraw + QT_TRAP_THROWING(cba.SetCommandL(position, command, text)); +} + +bool QSoftKeyManagerPrivateS60::isOrientationLandscape() +{ + // Hard to believe that there is no public API in S60 to + // get current orientation. This workaround works with currently supported resolutions + return S60->screenHeightInPixels < S60->screenWidthInPixels; +} + +QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int position) +{ + Q_UNUSED(cba); + Q_UNUSED(position); + + // Will be implemented when EikSoftkeyImage usage license wise is OK +/* + const int index = isOrientationLandscape() ? 0 : 1; + if(cachedCbaIconSize[index].isNull()) { + // Only way I figured out to get CBA icon size without RnD SDK, was + // Only way I figured out to get CBA icon size without RnD SDK, was + // to set some dummy icon to CBA first and then ask CBA button CCoeControl::Size() + // The returned value is cached to avoid unnecessary icon setting every time. + const bool left = (position == LSK_POSITION); + if(position == LSK_POSITION || position == RSK_POSITION) { + CEikImage* tmpImage = NULL; + QT_TRAP_THROWING(tmpImage = new (ELeave) CEikImage); + EikSoftkeyImage::SetImage(cba, *tmpImage, left); // Takes myimage ownership + int command = S60_COMMAND_START + position; + setNativeSoftkey(*cba, position, command, KNullDesC()); + cachedCbaIconSize[index] = qt_TSize2QSize(cba->ControlOrNull(command)->Size()); + EikSoftkeyImage::SetLabel(cba, left); + } + } + + return cachedCbaIconSize[index]; +*/ + return QSize(); +} + +bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, + QAction &action, int position) +{ + bool ret = false; + Q_UNUSED(cba); + Q_UNUSED(action); + Q_UNUSED(position); + + // Will be implemented when EikSoftkeyImage usage license wise is OK + /* + const bool left = (position == LSK_POSITION); + if(position == LSK_POSITION || position == RSK_POSITION) { + QIcon icon = action.icon(); + if (!icon.isNull()) { + QPixmap pm = icon.pixmap(cbaIconSize(cba, position)); + pm = pm.scaled(cbaIconSize(cba, position)); + QBitmap mask = pm.mask(); + if (mask.isNull()) { + mask = QBitmap(pm.size()); + mask.fill(Qt::color1); + } + + CFbsBitmap* nBitmap = pm.toSymbianCFbsBitmap(); + CFbsBitmap* nMask = mask.toSymbianCFbsBitmap(); + + CEikImage* myimage = new (ELeave) CEikImage; + myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered + + EikSoftkeyImage::SetImage(cba, *myimage, left); // Takes myimage ownership + ret = true; + } else { + // Restore softkey to text based + EikSoftkeyImage::SetLabel(cba, left); + } + } + */ + return ret; +} + +bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, + QAction::SoftKeyRole role, int position) +{ + QAction *action = highestPrioritySoftkey(role); + if (action) { + setSoftkeyImage(&cba, *action, position); + QString text = softkeyText(*action); + TPtrC nativeText = qt_QString2TPtrC(text); + int command = S60_COMMAND_START + position; + setNativeSoftkey(cba, position, command, nativeText); + cba.DimCommand(command, !action->isEnabled()); + realSoftKeyActions.insert(command, action); + return true; + } + return false; +} + +bool QSoftKeyManagerPrivateS60::setLeftSoftkey(CEikButtonGroupContainer &cba) +{ + return setSoftkey(cba, QAction::PositiveSoftKey, LSK_POSITION); +} + +bool QSoftKeyManagerPrivateS60::setMiddleSoftkey(CEikButtonGroupContainer &cba) +{ + // Note: In order to get MSK working, application has to have EAknEnableMSK flag set + // Currently it is not possible very easily) + // For more information see: http://wiki.forum.nokia.com/index.php/Middle_softkey_usage + return setSoftkey(cba, QAction::SelectSoftKey, MSK_POSITION); +} + +bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) +{ + if (!setSoftkey(cba, QAction::NegativeSoftKey, RSK_POSITION)) { + Qt::WindowType windowType = Qt::Window; + QAction *action = requestedSoftKeyActions.value(0); + if (action) { + QWidget *actionParent = action->parentWidget(); + Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!"); + + QWidget *actionWindow = actionParent->window(); + Q_ASSERT_X(actionWindow, Q_FUNC_INFO, "Softkey action does not have window!"); + windowType = actionWindow->windowType(); + } + + if (windowType != Qt::Dialog && windowType != Qt::Popup) { + QString text(QSoftKeyManager::tr("Exit")); + TPtrC nativeText = qt_QString2TPtrC(text); + setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText); + return true; + } + } + return false; +} + +void QSoftKeyManagerPrivateS60::setSoftkeys(CEikButtonGroupContainer &cba) +{ + int requestedSoftkeyCount = requestedSoftKeyActions.count(); + const int maxSoftkeyCount = 2; // TODO: differs based on orientation ans S60 versions (some have MSK) + if (requestedSoftkeyCount > maxSoftkeyCount) { + // We have more softkeys than available slots + // Put highest priority negative action to RSK and Options menu with rest of softkey actions to LSK + // TODO: Build menu + setLeftSoftkey(cba); + if(AknLayoutUtils::MSKEnabled()) + setMiddleSoftkey(cba); + setRightSoftkey(cba); + } else { + // We have less softkeys than available slots + // Put softkeys to request slots based on role + setLeftSoftkey(cba); + if(AknLayoutUtils::MSKEnabled()) + setMiddleSoftkey(cba); + setRightSoftkey(cba); + } +} + +void QSoftKeyManagerPrivateS60::updateSoftKeys_sys() +{ + //bool status = CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog(); + if (skipCbaUpdate()) + return; + + CEikButtonGroupContainer *nativeContainer = S60->buttonGroupContainer(); + Q_ASSERT_X(nativeContainer, Q_FUNC_INFO, "Native CBA does not exist!"); + ensureCbaVisibilityAndResponsiviness(*nativeContainer); + clearSoftkeys(*nativeContainer); + setSoftkeys(*nativeContainer); + + nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation +} + +bool QSoftKeyManagerPrivateS60::handleCommand(int command) +{ + QAction *action = realSoftKeyActions.value(command); + if (action) { + QVariant property = action->property(MENU_ACTION_PROPERTY); + if (property.isValid() && property.toBool()) { + QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL()); + } else if (action->menu()) { + // TODO: This is hack, in order to use exising QMenuBar implementation for Symbian + // menubar needs to have widget to which it is associated. Since we want to associate + // menubar to action (which is inherited from QObejct), we create and associate QWidget + // to action and pass that for QMenuBar. This associates the menubar to action, and we + // can have own menubar for each action. + QWidget *actionContainer = action->property("_q_action_widget").value(); + if(!actionContainer) { + actionContainer = new QWidget(action->parentWidget()); + QMenuBar *menuBar = new QMenuBar(actionContainer); + foreach(QAction *menuAction, action->menu()->actions()) { + QMenu *menu = menuAction->menu(); + if(menu) + menuBar->addMenu(action->menu()); + else + menuBar->addAction(menuAction); + } + QVariant v; + v.setValue(actionContainer); + action->setProperty("_q_action_widget", v); + } + qt_symbian_next_menu_from_action(actionContainer); + QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL()); + // TODO: hack remove, it can happen that IsDisplayingMenuOrDialog return false + // in updateSoftKeys_sys, and we will override menu CBA with our own + skipNextUpdate = true; + } else { + Q_ASSERT(action->softKeyRole() != QAction::NoSoftKey); + QWidget *actionParent = action->parentWidget(); + Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!"); + if (actionParent->isEnabled()) { + action->activate(QAction::Trigger); + return true; + } + } + } + return false; +} + +QT_END_NAMESPACE +#endif //QT_NO_SOFTKEYMANAGER diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h new file mode 100644 index 0000000..46e3596 --- /dev/null +++ b/src/gui/kernel/qsoftkeymanager_s60_p.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOFTKEYMANAGER_S60_P_H +#define QSOFTKEYMANAGER_S60_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "private/qobject_p.h" +#include "private/qsoftkeymanager_common_p.h" + +QT_BEGIN_HEADER + +#ifndef QT_NO_SOFTKEYMANAGER + +QT_BEGIN_NAMESPACE + +class CEikButtonGroupContainer; +class QAction; + +class QSoftKeyManagerPrivateS60 : public QSoftKeyManagerPrivate +{ + Q_DECLARE_PUBLIC(QSoftKeyManager) + +public: + QSoftKeyManagerPrivateS60(); + +public: + void updateSoftKeys_sys(); + bool handleCommand(int command); + +private: + bool skipCbaUpdate(); + void ensureCbaVisibilityAndResponsiviness(CEikButtonGroupContainer &cba); + void clearSoftkeys(CEikButtonGroupContainer &cba); + QString softkeyText(QAction &softkeyAction); + QAction *highestPrioritySoftkey(QAction::SoftKeyRole role); + static bool actionPriorityMoreThan(const QAction* item1, const QAction* item2); + void setNativeSoftkey(CEikButtonGroupContainer &cba, TInt position, TInt command, const TDesC& text); + bool isOrientationLandscape(); + QSize cbaIconSize(CEikButtonGroupContainer *cba, int position); + bool setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position); + bool setSoftkey(CEikButtonGroupContainer &cba, QAction::SoftKeyRole role, int position); + bool setLeftSoftkey(CEikButtonGroupContainer &cba); + bool setMiddleSoftkey(CEikButtonGroupContainer &cba); + bool setRightSoftkey(CEikButtonGroupContainer &cba); + void setSoftkeys(CEikButtonGroupContainer &cba); + +private: + QHash realSoftKeyActions; + QSize cachedCbaIconSize[2]; + bool skipNextUpdate; +}; + + +QT_END_NAMESPACE + +#endif //QT_NO_SOFTKEYMANAGER + +QT_END_HEADER + +#endif // QSOFTKEYMANAGER_S60_P_H diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 1163055..735ca7a 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -128,6 +128,7 @@ public: static inline RWindowGroup& windowGroup(); static inline CWsScreenDevice* screenDevice(); static inline CCoeAppUi* appUi(); + static inline CEikMenuBar* menuBar(); #ifdef Q_WS_S60 static inline CEikStatusPane* statusPane(); static inline CCoeControl* statusPaneSubPane(TInt aPaneId); @@ -270,6 +271,11 @@ inline CCoeAppUi* QS60Data::appUi() return CCoeEnv::Static()-> AppUi(); } +inline CEikMenuBar* QS60Data::menuBar() +{ + return CEikonEnv::Static()->AppUiFactory()->MenuBar(); +} + #ifdef Q_WS_S60 inline CEikStatusPane* QS60Data::statusPane() { diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 1622191..269cd12 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -119,8 +119,6 @@ void QMainWindowPrivate::init() q->setAttribute(Qt::WA_Hover); #ifdef QT_SOFTKEYS_ENABLED menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q); - menuBarAction->setObjectName(QLatin1String("_q_menuSoftKeyAction")); - menuBarAction->setVisible(false); #endif } diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index b7272f7..aaed6b1 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_MENU #ifdef Q_WS_S60 +void qt_symbian_next_menu_from_action(QWidget* actionContainer); void qt_symbian_show_toplevel(CEikMenuPane* menuPane); void qt_symbian_show_submenu(CEikMenuPane* menuPane, int id); #endif // Q_WS_S60 @@ -87,7 +88,7 @@ QT_BEGIN_NAMESPACE typedef void NSMenuItem; # endif //__OBJC__ struct QMacMenuAction { - QMacMenuAction() + QMacMenuAction() #ifndef QT_MAC_USE_COCOA : command(0) #else @@ -124,7 +125,7 @@ typedef QList QMenuMergeList; #ifdef Q_WS_WINCE struct QWceMenuAction { - uint command; + uint command; QPointer action; HMENU menuHandle; QWceMenuAction() : menuHandle(0), command(0) {} @@ -340,7 +341,7 @@ public: QList actionItems; HMENU menuHandle; QWceMenuPrivate(); - ~QWceMenuPrivate(); + ~QWceMenuPrivate(); void addAction(QAction *, QWceMenuAction* =0); void addAction(QWceMenuAction *, QWceMenuAction* =0); void syncAction(QWceMenuAction *); diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 28b27d4..eae97a6 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -81,6 +81,7 @@ static QList nativeMenuBars; static uint qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM; static QPointer widgetWithContextMenu; static QList contextMenuActionList; +static QWidget* actionMenu = NULL; static int contexMenuCommand=0; bool menuExists() @@ -224,8 +225,26 @@ static void rebuildMenu() } #ifdef Q_WS_S60 +void qt_symbian_next_menu_from_action(QWidget *actionContainer) +{ + actionMenu = actionContainer; +} + void qt_symbian_show_toplevel( CEikMenuPane* menuPane) { + if (actionMenu) { + QMenuBarPrivate *mb = 0; + mb = menubars()->value(actionMenu); + qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM; + deleteAll( &symbianMenus ); + Q_ASSERT(mb); + mb->symbian_menubar->rebuild(); + for (int i = 0; i < symbianMenus.count(); ++i) + QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); + actionMenu = NULL; + return; + } + if (!menuExists()) return; rebuildMenu(); @@ -271,10 +290,16 @@ int QMenuBarPrivate::symbianCommands(int command) void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent) { Q_Q(QMenuBar); - if (parent && parent->isWindow()){ - menubars()->insert(q->window(), this); - symbian_menubar = new QSymbianMenuBarPrivate(this); - nativeMenuBars.append(q); + if (parent) { + if(parent->isWindow()) { + menubars()->insert(q->window(), this); + symbian_menubar = new QSymbianMenuBarPrivate(this); + nativeMenuBars.append(q); + } else { + menubars()->insert(q->parentWidget(), this); + symbian_menubar = new QSymbianMenuBarPrivate(this); + nativeMenuBars.append(q); + } } } @@ -284,6 +309,7 @@ void QMenuBarPrivate::symbianDestroyMenuBar() int index = nativeMenuBars.indexOf(q); nativeMenuBars.removeAt(index); menubars()->remove(q->window(), this); + menubars()->remove(q->parentWidget(), this); rebuildMenu(); if (symbian_menubar) delete symbian_menubar; diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 0e14385..9caadb7 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -667,7 +667,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti \i Application Menu | About \i The application name is fetched from the \c {Info.plist} file (see note below). If this entry is not found no About item - will appear in the Application Menu. + will appear in the Application Menu. \row \i config, options, setup, settings or preferences \i Application Menu | Preferences \i If this entry is not found the Settings item will be disabled -- cgit v0.12 From 7e46016d55a80e9d49797efe34779893d80b71e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakari=20Peltom=C3=A4ki?= Date: Wed, 3 Feb 2010 10:42:54 +0100 Subject: Proper Fav icon is not shown, for all the links default fav icon shown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added two functions on QtIcoHandler(inherited from QImageIOHandler): bool supports Option(ImageOption option) const QVariant option(ImageOption option) const implementation of these functions make possible to open fav.ico eg. via web browser. (if using fav.ico icons via webkit, browser should initialize webcore::icondatabase using QWebSettings::enablePersistentStorage() ) Merge-request: 2150 Reviewed-by: Jan-Arve Sæther --- src/plugins/imageformats/ico/qicohandler.cpp | 24 ++++++++++++++++++++++++ src/plugins/imageformats/ico/qicohandler.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index b2351fa..4edb87a 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -53,6 +53,7 @@ #include #include #include +#include // These next two structs represent how the icon information is stored // in an ICO file. typedef struct @@ -772,6 +773,29 @@ QtIcoHandler::~QtIcoHandler() delete m_pICOReader; } +QVariant QtIcoHandler::option(ImageOption option) const +{ + if (option == Size) { + QIODevice *device = QImageIOHandler::device(); + qint64 oldPos = device->pos(); + ICONDIRENTRY iconEntry; + if (device->seek(oldPos + ICONDIR_SIZE + (m_currentIconIndex * ICONDIRENTRY_SIZE))) { + if (readIconDirEntry(device, &iconEntry)) { + device->seek(oldPos); + return QSize(iconEntry.bWidth, iconEntry.bHeight); + } + } + if (!device->isSequential()) + device->seek(oldPos); + } + return QVariant(); +} + +bool QtIcoHandler::supportsOption(ImageOption option) const +{ + return option == Size; +} + /*! * Verifies if some values (magic bytes) are set as expected in the header of the file. * If the magic bytes were found, it is assumed that the QtIcoHandler can read the file. diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h index b9ef27e..394a5eb 100644 --- a/src/plugins/imageformats/ico/qicohandler.h +++ b/src/plugins/imageformats/ico/qicohandler.h @@ -62,6 +62,9 @@ public: static bool canRead(QIODevice *device); + bool supportsOption(ImageOption option) const; + QVariant option(ImageOption option) const; + private: int m_currentIconIndex; ICOReader *m_pICOReader; -- cgit v0.12 From d53315d30b38352db11063096ee3867a40bdc234 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 3 Feb 2010 11:30:20 +0100 Subject: Revert "QAbstractScrollArea: Wheel over a scrollarea that has only one horizontal scrollbar" This reverts commit 46a3e518b3070cf7cb4cbbb2cb58254454cf169d. This shown to cause more problem than it solved Also update the changelog Reviewed-by: Thierry --- dist/changes-4.6.2 | 3 + src/gui/widgets/qabstractscrollarea.cpp | 11 +-- src/gui/widgets/qabstractslider.cpp | 2 + .../tst_qabstractscrollarea.cpp | 97 +--------------------- 4 files changed, 11 insertions(+), 102 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 292b3ef..4127e13 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -46,6 +46,9 @@ QtCore QtGui ----- + - QAbstractScrollArea + * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical scrollbar is hidden + - QBmpHandler * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images. diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 87f6c83..1d496d5 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -1134,13 +1134,10 @@ void QAbstractScrollArea::mouseMoveEvent(QMouseEvent *e) void QAbstractScrollArea::wheelEvent(QWheelEvent *e) { Q_D(QAbstractScrollArea); - QScrollBar *const bars[2] = { d->hbar, d->vbar }; - int idx = (e->orientation() == Qt::Vertical) ? 1 : 0; - int other = (idx + 1) % 2; - if (!bars[idx]->isVisible() && bars[other]->isVisible()) - idx = other; // If the scrollbar of the event orientation is hidden, fallback to the other. - - QApplication::sendEvent(bars[idx], e); + if (static_cast(e)->orientation() == Qt::Horizontal) + QApplication::sendEvent(d->hbar, e); + else + QApplication::sendEvent(d->vbar, e); } #endif diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 2874647..77c5a01 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -697,6 +697,8 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) { Q_D(QAbstractSlider); e->ignore(); + if (e->orientation() != d->orientation && !rect().contains(e->pos())) + return; int stepsToScroll = 0; qreal offset = qreal(e->delta()) / 120; diff --git a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp index 3e062b8..da83826 100644 --- a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp +++ b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp @@ -71,8 +71,6 @@ private slots: void viewportCrash(); void task214488_layoutDirection_data(); void task214488_layoutDirection(); - void wheelEvent_data(); - void wheelEvent(); }; tst_QAbstractScrollArea::tst_QAbstractScrollArea() @@ -298,10 +296,10 @@ public: setAttribute(Qt::WA_DropSiteRegistered, true); - startTimer(200); + startTimer(2000); } - void timerEvent(QTimerEvent *) + void timerEvent(QTimerEvent *event) { // should not crash. (void)new QScrollArea(this); @@ -387,96 +385,5 @@ void tst_QAbstractScrollArea::patternBackground() QCOMPARE(image.pixel(QPoint(20,20)) , QColor(Qt::red).rgb()); } -Q_DECLARE_METATYPE(QWheelEvent *); - -void tst_QAbstractScrollArea::wheelEvent_data() -{ - QTest::addColumn("widgetSize"); - QTest::addColumn("initialOffset"); - QTest::addColumn("event"); - QTest::addColumn("movedX"); // -1 , 0 , or 1 - QTest::addColumn("movedY"); - - QPoint pos(100,100); - int delta =-120; - - QTest::newRow("1") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 1 << 0; - - QTest::newRow("2") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 0 << 1; - - QTest::newRow("3") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << -1 << 0; - - QTest::newRow("4") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << 0 << -1; - - QTest::newRow("5") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 0 << 1; - - QTest::newRow("6") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 0 << 1; - - QTest::newRow("7") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << 0 << -1; - - QTest::newRow("8") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << 0 << -1; - - QTest::newRow("9") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 1 << 0; - - QTest::newRow("a") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 1 << 0; - - QTest::newRow("b") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << -1 << 0; - - QTest::newRow("c") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << -1 << 0; -} - - - - -void tst_QAbstractScrollArea::wheelEvent() -{ - QFETCH(QSize, widgetSize); - QFETCH(QPoint, initialOffset); - QFETCH(QWheelEvent *, event); - QFETCH(int, movedX); - QFETCH(int, movedY); - - QScrollArea scrollArea; - scrollArea.resize(200, 200); - QLabel widget("H e l l o"); - widget.resize(widgetSize); - scrollArea.setWidget(&widget); - scrollArea.show(); - QTest::qWait(20); - - scrollArea.verticalScrollBar()->setValue(initialOffset.y()); - scrollArea.horizontalScrollBar()->setValue(initialOffset.x()); - - QCOMPARE(scrollArea.verticalScrollBar()->value(), initialOffset.y()); - QCOMPARE(scrollArea.horizontalScrollBar()->value(), initialOffset.x()); - - QApplication::sendEvent(scrollArea.viewport(), event); - - if(movedX == 0) - QCOMPARE(scrollArea.horizontalScrollBar()->value(), initialOffset.x()); - else - QVERIFY(movedX * scrollArea.horizontalScrollBar()->value() > movedX * initialOffset.x()); - - if(movedY == 0) - QCOMPARE(scrollArea.verticalScrollBar()->value(), initialOffset.y()); - else - QVERIFY(movedY * scrollArea.verticalScrollBar()->value() > movedY * initialOffset.y()); - - delete event; -} - - QTEST_MAIN(tst_QAbstractScrollArea) #include "tst_qabstractscrollarea.moc" -- cgit v0.12 From 787a20b76b7f6e0dd6c7a6331220b46b5eddff79 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Feb 2010 12:17:55 +0100 Subject: revert to fromUtf16() usage in fromWCharArray() this is a public function, so changing its semantics is no option. in fact, it broke qmake on windows (for symbian-abld and wince50smart). Reviewed-by: joerg --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 3388500..3ef0e66 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -885,7 +885,7 @@ int QString::grow(int size) QString QString::fromWCharArray(const wchar_t *string, int size) { if (sizeof(wchar_t) == sizeof(QChar)) { - return QString((const QChar *)string, size); + return fromUtf16((const ushort *)string, size); } else { return fromUcs4((uint *)string, size); } -- cgit v0.12 From cc585886ba9da17064a7fc858f5d717967da6e85 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 3 Feb 2010 12:47:34 +0100 Subject: QStyleSheetStyle: Fix combinaison of border-image and border-radius Regression since b4d642e639eabde5d72a4 Task-number: QTBUG-7737 Reviewed-by: Gabriel --- src/gui/styles/qstylesheetstyle.cpp | 2 + .../baseline/css_qtbug7737_borderimageradius.ui | 44 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 498313b..b36294a 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -1125,6 +1125,7 @@ void QRenderRule::fixupBorder(int nativeWidth) void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect) { + setClip(p, rect); static const Qt::TileRule tileMode2TileRule[] = { Qt::StretchTile, Qt::RoundTile, Qt::StretchTile, Qt::RepeatTile, Qt::StretchTile }; @@ -1142,6 +1143,7 @@ void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect) QRect(QPoint(), borderImageData->pixmap.size()), sourceMargins, QTileRules(tileMode2TileRule[borderImageData->horizStretch], tileMode2TileRule[borderImageData->vertStretch])); p->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothPixmapTransform); + unsetClip(p); } QRect QRenderRule::originRect(const QRect &rect, Origin origin) const diff --git a/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui b/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui new file mode 100644 index 0000000..089cb76 --- /dev/null +++ b/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui @@ -0,0 +1,44 @@ + + + Form + + + + 0 + 0 + 207 + 69 + + + + Form + + + QPushButton { border-image: url("images/pushbutton.png") 5 5 5 5; border-radius:8px; } + + + + + + Border image and radius + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + -- cgit v0.12 From 80e114ad0b7974894858a17153d6f54546835066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 3 Feb 2010 11:17:19 +0100 Subject: QGraphicsScene: Use QPainter::setClipRect instead of setClipPath if possible. Using QPainter::setClipPath results in complex (and slow) alphamasking so this must be avoided if possible. Task-number: QTBUG-7790 Reviewed-by: samuel --- src/gui/graphicsview/qgraphicsscene.cpp | 18 +++++++++++++++--- src/gui/painting/qpathclipper.cpp | 4 +--- src/gui/painting/qpathclipper_p.h | 2 ++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 842d368..4bfe9ad 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -251,6 +251,7 @@ #endif #include #include +#include // #define GESTURE_DEBUG #ifndef GESTURE_DEBUG @@ -4765,7 +4766,12 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q painter->setWorldTransform(*transformPtr * *effectTransform); else painter->setWorldTransform(*transformPtr); - painter->setClipPath(item->shape(), Qt::IntersectClip); + QRectF clipRect; + const QPainterPath clipPath(item->shape()); + if (QPathClipper::pathToRect(clipPath, &clipRect)) + painter->setClipRect(clipRect, Qt::IntersectClip); + else + painter->setClipPath(clipPath, Qt::IntersectClip); } // Draw children behind @@ -4801,8 +4807,14 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q painter->setWorldTransform(*transformPtr); } - if (itemClipsToShape) - painter->setClipPath(item->shape(), Qt::IntersectClip); + if (itemClipsToShape) { + QRectF clipRect; + const QPainterPath clipPath(item->shape()); + if (QPathClipper::pathToRect(clipPath, &clipRect)) + painter->setClipRect(clipRect, Qt::IntersectClip); + else + painter->setClipPath(clipPath, Qt::IntersectClip); + } painter->setOpacity(opacity); if (!item->d_ptr->cacheMode && !item->d_ptr->isWidget) diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 7997e77..5702ede 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -90,8 +90,6 @@ static QPointF normalize(const QPointF &p) return p / qSqrt(p.x() * p.x() + p.y() * p.y()); } -static bool pathToRect(const QPainterPath &path, QRectF *rect = 0); - struct QIntersection { qreal alphaA; @@ -1660,7 +1658,7 @@ static bool fuzzyCompare(qreal a, qreal b) return qFuzzyCompare(a, b); } -static bool pathToRect(const QPainterPath &path, QRectF *rect) +bool QPathClipper::pathToRect(const QPainterPath &path, QRectF *rect) { if (path.elementCount() != 5) return false; diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h index 0d2c049..b900862 100644 --- a/src/gui/painting/qpathclipper_p.h +++ b/src/gui/painting/qpathclipper_p.h @@ -86,6 +86,8 @@ public: bool intersect(); bool contains(); + static bool pathToRect(const QPainterPath &path, QRectF *rect = 0); + private: Q_DISABLE_COPY(QPathClipper) -- cgit v0.12 From 09fe8e377fea67b4279521e3cb08bb937ef65474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 3 Feb 2010 11:26:50 +0100 Subject: Optimize QPathClipper::pathToRect. Patch speaks for itself :-) Reviewed-by: samuel --- src/gui/painting/qpathclipper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 5702ede..bc81514 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -1691,7 +1691,7 @@ bool QPathClipper::pathToRect(const QPainterPath &path, QRectF *rect) return false; if (rect) - *rect = QRectF(QPointF(x1, y1), QPointF(x2, y2)); + rect->setCoords(x1, y1, x2, y2); return true; } -- cgit v0.12 From ca57a6e6bb48b468631576c3bd316f6c2b24e0dd Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 3 Feb 2010 14:07:35 +0100 Subject: Compile fix for non-Symbian compilers Putting the code for "case CT_ComboBox:" into {} --- src/gui/styles/qs60style.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index fc435e8..9025e5b 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2399,13 +2399,14 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin)); break; #ifndef QT_NO_COMBOBOX - case CT_ComboBox: - // Fixing Ui design issues with too wide QComboBoxes and greedy SizeHints - // Make sure, that the combobox says within the screen. - const QSize desktopContentSize = QApplication::desktop()->availableGeometry().size() - -QSize(pixelMetric(PM_LayoutLeftMargin) + pixelMetric(PM_LayoutRightMargin), 0); - sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget). - boundedTo(desktopContentSize); + case CT_ComboBox: { + // Fixing Ui design issues with too wide QComboBoxes and greedy SizeHints + // Make sure, that the combobox says within the screen. + const QSize desktopContentSize = QApplication::desktop()->availableGeometry().size() + -QSize(pixelMetric(PM_LayoutLeftMargin) + pixelMetric(PM_LayoutRightMargin), 0); + sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget). + boundedTo(desktopContentSize); + } break; #endif default: -- cgit v0.12 From 71e2f9d35a922fb0ec8fff40bdc7d2d47d42dd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 3 Feb 2010 14:56:43 +0100 Subject: Compiler warning in QAbstractSlider. --- src/gui/widgets/qabstractslider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 77c5a01..dca44a4 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -214,8 +214,8 @@ QT_BEGIN_NAMESPACE */ QAbstractSliderPrivate::QAbstractSliderPrivate() - : minimum(0), maximum(99), singleStep(1), pageStep(10), - value(0), position(0), pressValue(-1), offset_accumulated(0), tracking(true), + : minimum(0), maximum(99), pageStep(10), value(0), position(0), pressValue(-1), + singleStep(1), offset_accumulated(0), tracking(true), blocktracking(false), pressed(false), invertedAppearance(false), invertedControls(false), orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction) -- cgit v0.12 From 038893af4241add08cbcf4ee9973b17209bc2272 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 3 Feb 2010 17:32:15 +0100 Subject: Doc: Fixed typo. Reviewed-by: Trust Me --- src/xml/dom/qdom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index cae959b..8d9ae4f 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -2973,7 +2973,7 @@ QDomElement QDomNode::lastChildElement(const QString &tagName) const } /*! - Returns the next sibilng element with tag name \a tagName if \a tagName + Returns the next sibling element with tag name \a tagName if \a tagName is non-empty; otherwise returns any next sibling element. Returns a null element if no such sibling exists. -- cgit v0.12 From 14ee2007fd2ada46e5fe30af838f5a7fcb7c6f4d Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 3 Feb 2010 15:39:43 +0000 Subject: Corrected namespace for Phonon::MMF translatable error strings Error strings are now part of the Phonon::MMF namespace. Reviewed-by: trustme --- src/3rdparty/phonon/mmf/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/phonon/mmf/utils.h b/src/3rdparty/phonon/mmf/utils.h index 56ccafc..acad55a 100644 --- a/src/3rdparty/phonon/mmf/utils.h +++ b/src/3rdparty/phonon/mmf/utils.h @@ -44,7 +44,7 @@ enum PanicCode { class Utils { - Q_DECLARE_TR_FUNCTIONS(Utils) + Q_DECLARE_TR_FUNCTIONS(Phonon::MMF) public: /** -- cgit v0.12 From 4b059682ddba4a1fb90c656d7d829680779a2e60 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 3 Feb 2010 15:52:14 +0000 Subject: Added descriptions of translatable strings for Phonon MMF reverb effect Reviewed-by: trustme --- src/3rdparty/phonon/mmf/environmentalreverb.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp index 89f8d60..4a6ce29 100644 --- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp +++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp @@ -140,55 +140,75 @@ bool EnvironmentalReverb::getParameters(CMdaAudioOutputStream *stream, TUint32 umin, umax; // DecayHFRatio + // Ratio of high-frequency decay time to the value specified by + // DecayTime. effect->DecayHFRatioRange(umin, umax); parameters.append(createParameter( DecayHFRatio, tr("Decay HF ratio (%)"), effect->DecayHFRatio(), umin, umax)); // DecayTime + // Time over which reverberation is diminished. effect->DecayTimeRange(umin, umax); parameters.append(createParameter( DecayTime, tr("Decay time (ms)"), effect->DecayTime(), umin, umax)); // Density + // Delay between first and subsequent reflections. + // Note that the S60 platform documentation does not make clear + // the distinction between this value and the Diffusion value. parameters.append(createParameter( Density, tr("Density (%)"), effect->Density(), 0, 100)); // Diffusion + // Delay between first and subsequent reflections. + // Note that the S60 platform documentation does not make clear + // the distinction between this value and the Density value. parameters.append(createParameter( Diffusion, tr("Diffusion (%)"), effect->Diffusion(), 0, 100)); // ReflectionsDelay + // Amount of delay between the arrival the direct path from the + // source and the arrival of the first reflection. parameters.append(createParameter( ReflectionsDelay, tr("Reflections delay (ms)"), effect->ReflectionsDelay(), 0, effect->ReflectionsDelayMax())); // ReflectionsLevel - effect->ReflectionLevelRange(min, max); + // Amplitude of reflections. This value is corrected by the RoomLevel + // to give the final reflection amplitude. + effect->ReflectionLevelRange(min, max); parameters.append(createParameter( ReflectionsLevel, tr("Reflections level (mB)"), effect->ReflectionsLevel(), min, max, EffectParameter::LogarithmicHint)); // ReverbDelay + // Amount of time between arrival of the first reflection and start of + // the late reverberation. parameters.append(createParameter( ReverbDelay, tr("Reverb delay (ms)"), effect->ReverbDelay(), 0, effect->ReverbDelayMax())); // ReverbLevel + // Amplitude of reverberations. This value is corrected by the + // RoomLevel to give the final reverberation amplitude. effect->ReverbLevelRange(min, max); parameters.append(createParameter( ReverbLevel, tr("Reverb level (mB)"), effect->ReverbLevel(), min, max, EffectParameter::LogarithmicHint)); // RoomHFLevel + // Amplitude of low-pass filter used to attenuate the high frequency + // component of reflected sound. effect->RoomHFLevelRange(min, max); parameters.append(createParameter( RoomHFLevel, tr("Room HF level"), effect->RoomHFLevel(), min, max)); // RoomLevel + // Master volume control for all reflected sound. effect->RoomLevelRange(min, max); parameters.append(createParameter( RoomLevel, tr("Room level (mB)"), effect->RoomLevel(), -- cgit v0.12 From afae62256897a8ed14e3156df33838082c6d4b98 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 5 Nov 2009 13:16:41 +0100 Subject: Adjust rw base address for gui built with GCCE for Symbian OS fixed during merge to match new style flag setting. Reviewed-by: Janne Koskinen --- src/gui/gui.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 4215f97..8ad3bac 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -54,4 +54,5 @@ DEFINES += Q_INTERNAL_QAPP_SRC symbian:TARGET.UID3=0x2001B2DD # ro-section in gui can exceed default allocated space, so more rw-section little further -symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000" +symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 +symbian: QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 -- cgit v0.12 From dda8a57c085216db609f822837c50bae38006b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 3 Feb 2010 19:39:17 +0100 Subject: QGraphicsWidget is painted twice on the first show. We want to discard all update requests when we there's a full update pending. The problem was that 'updateAll' was reset too early causing update requests to fall through. To prevent this from happening we reset 'updateAll' right before the items are actually painted. Auto-test included. Task-number: QTBUG-6956 --- src/gui/graphicsview/qgraphicsscene.cpp | 7 +++++- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 27 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 4bfe9ad..66707fc 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -373,7 +373,10 @@ void QGraphicsScenePrivate::_q_emitUpdated() } } } else { - updateAll = false; + if (views.isEmpty()) { + updateAll = false; + return; + } for (int i = 0; i < views.size(); ++i) views.at(i)->d_func()->processPendingUpdates(); // It's important that we update all views before we dispatch, hence two for-loops. @@ -4604,6 +4607,7 @@ void QGraphicsScenePrivate::drawItems(QPainter *painter, const QTransform *const if (!unpolishedItems.isEmpty()) _q_polishItems(); + updateAll = false; QRectF exposedSceneRect; if (exposedRegion && indexMethod != QGraphicsScene::NoIndex) { exposedSceneRect = exposedRegion->boundingRect().adjusted(-1, -1, 1, 1); @@ -5166,6 +5170,7 @@ void QGraphicsScene::drawItems(QPainter *painter, if (!d->unpolishedItems.isEmpty()) d->_q_polishItems(); + d->updateAll = false; QTransform viewTransform = painter->worldTransform(); Q_UNUSED(options); diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index d3132fe..526486e 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -164,6 +164,7 @@ private slots: void polishEvent(); void polishEvent2(); void initialShow(); + void initialShow2(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2881,6 +2882,32 @@ void tst_QGraphicsWidget::initialShow() QCOMPARE(widget->repaints, 1); } +void tst_QGraphicsWidget::initialShow2() +{ + class MyGraphicsWidget : public QGraphicsWidget + { public: + MyGraphicsWidget() : repaints(0) {} + int repaints; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; } + void polishEvent() { update(); } + }; + + MyGraphicsWidget *widget = new MyGraphicsWidget; + widget->resize(100, 100); + + QGraphicsScene scene(0, 0, 200, 200); + scene.addItem(widget); + + QGraphicsView view(&scene); + view.show(); + // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's + // a bug in qt_x11_wait_for_window_manager that prevents this test + // to pass. Denis is looking into it. + QTest::qWait(300); + + QCOMPARE(widget->repaints, 1); +} + void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() { QGraphicsScene scene; -- cgit v0.12 From 9962e2d96a212c518054220167eb6f61e1052bcc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 3 Feb 2010 20:25:38 +0100 Subject: Autotest: to be sure, generate .cpp files with the proper headers too --- tests/auto/qscriptvalue/testgen/gen.py | 57 ++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py index c14fe86..7161e6b 100755 --- a/tests/auto/qscriptvalue/testgen/gen.py +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -71,23 +71,46 @@ class Options(): mainTempl = Template("""/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ //////////////////////////////////////////////////////////////// // THIS FILE IS AUTOGENERATED, ALL MODIFICATIONS WILL BE LAST // -- cgit v0.12 From 1677382148ed9e8d037d03a6fcc7bbe40458d69a Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 4 Feb 2010 07:30:37 +1000 Subject: Optimize single-rect IntersectClip in OpenVG using the scissor Task-number: QTBUG-7791 Reviewed-by: Sarah Smith --- src/openvg/qpaintengine_vg.cpp | 46 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index cc9ba77..bff3328 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -188,6 +188,7 @@ public: bool maskValid; // True if vgMask() contains valid data. bool maskIsSet; // True if mask would be fully set if it was valid. + bool scissorMask; // True if scissor is used in place of the mask. bool rawVG; // True if processing a raw VG escape. QRect maskRect; // Rectangle version of mask if it is simple. @@ -355,6 +356,7 @@ void QVGPaintEnginePrivate::init() maskValid = false; maskIsSet = false; + scissorMask = false; rawVG = false; scissorActive = false; @@ -1664,12 +1666,12 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) if (op == Qt::NoClip) { d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); vgSeti(VG_MASKING, VG_FALSE); return; } -#if defined(QVG_NO_RENDER_TO_MASK) // We don't have vgRenderToMask(), so handle simple QRectF's only. if (path.shape() == QVectorPath::RectangleHint && path.elementCount() == 4 && clipTransformIsSimple(d->transform)) { @@ -1679,8 +1681,10 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) QRectF rect(points[0], points[1], points[2] - points[0], points[5] - points[1]); clip(rect.toRect(), op); + return; } -#else + +#if !defined(QVG_NO_RENDER_TO_MASK) QPaintDevice *pdev = paintDevice(); int width = pdev->width(); int height = pdev->height(); @@ -1711,6 +1715,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) vgSeti(VG_MASKING, VG_TRUE); d->maskValid = true; d->maskIsSet = false; + d->scissorMask = false; #endif } @@ -1731,6 +1736,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) { d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); vgSeti(VG_MASKING, VG_FALSE); } @@ -1746,6 +1752,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) vgSeti(VG_MASKING, VG_FALSE); d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); } else { // Special case: if the intersection of the system @@ -1763,6 +1770,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) if (clip.rectCount() != 1) { d->maskValid = false; d->maskIsSet = false; + d->scissorMask = false; d->maskRect = QRect(); d->modifyMask(this, VG_FILL_MASK, r); break; @@ -1771,6 +1779,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) } d->maskValid = false; d->maskIsSet = false; + d->scissorMask = true; d->maskRect = clipRect; vgSeti(VG_MASKING, VG_FALSE); updateScissor(); @@ -1781,13 +1790,30 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) case Qt::IntersectClip: { QRect r = d->transform.mapRect(rect); - if (d->maskIsSet && isDefaultClipRect(r)) { + if (!d->maskValid) { + // Mask has not been used yet, so intersect with + // the previous scissor-based region in maskRect. + if (d->scissorMask) + r = r.intersect(d->maskRect); + if (isDefaultClipRect(r)) { + // The clip is the full window, so turn off clipping. + d->maskIsSet = true; + d->maskRect = QRect(); + } else { + // Activate the scissor on a smaller maskRect. + d->maskIsSet = false; + d->maskRect = r; + } + d->scissorMask = true; + updateScissor(); + } else if (d->maskIsSet && isDefaultClipRect(r)) { // Intersecting a full-window clip with a full-window // region is the same as turning off clipping. if (d->maskValid) vgSeti(VG_MASKING, VG_FALSE); d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); } else { d->modifyMask(this, VG_INTERSECT_MASK, r); @@ -1829,6 +1855,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) { d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); vgSeti(VG_MASKING, VG_FALSE); } @@ -1844,6 +1871,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) vgSeti(VG_MASKING, VG_FALSE); d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); } else { // Special case: if the intersection of the system @@ -1857,12 +1885,14 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) if (clip.rectCount() == 1) { d->maskValid = false; d->maskIsSet = false; + d->scissorMask = true; d->maskRect = clip.boundingRect(); vgSeti(VG_MASKING, VG_FALSE); updateScissor(); } else { d->maskValid = false; d->maskIsSet = false; + d->scissorMask = false; d->maskRect = QRect(); d->modifyMask(this, VG_FILL_MASK, r); } @@ -1887,6 +1917,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) vgSeti(VG_MASKING, VG_FALSE); d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); } else { d->modifyMask(this, VG_INTERSECT_MASK, r); @@ -1965,6 +1996,7 @@ void QVGPaintEngine::clip(const QPainterPath &path, Qt::ClipOperation op) if (op == Qt::NoClip) { d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); vgSeti(VG_MASKING, VG_FALSE); return; @@ -2000,6 +2032,7 @@ void QVGPaintEngine::clip(const QPainterPath &path, Qt::ClipOperation op) vgSeti(VG_MASKING, VG_TRUE); d->maskValid = true; d->maskIsSet = false; + d->scissorMask = false; #else QPaintEngineEx::clip(path, op); #endif @@ -2043,6 +2076,7 @@ void QVGPaintEnginePrivate::modifyMask vgSeti(VG_MASKING, VG_TRUE); maskValid = true; maskIsSet = false; + scissorMask = false; } void QVGPaintEnginePrivate::modifyMask @@ -2064,6 +2098,7 @@ void QVGPaintEnginePrivate::modifyMask vgSeti(VG_MASKING, VG_TRUE); maskValid = true; maskIsSet = false; + scissorMask = false; } #endif // !QVG_SCISSOR_CLIP @@ -2096,7 +2131,7 @@ void QVGPaintEngine::updateScissor() { #if !defined(QVG_SCISSOR_CLIP) // Combine the system clip with the simple mask rectangle. - if (!d->maskRect.isNull()) { + if (d->scissorMask) { if (region.isEmpty()) region = d->maskRect; else @@ -2187,6 +2222,7 @@ void QVGPaintEngine::clipEnabledChanged() // Replay the entire clip stack to put the mask into the right state. d->maskValid = false; d->maskIsSet = true; + d->scissorMask = false; d->maskRect = QRect(); s->clipRegion = defaultClipRegion(); d->replayClipOperations(); @@ -2196,6 +2232,7 @@ void QVGPaintEngine::clipEnabledChanged() vgSeti(VG_MASKING, VG_FALSE); d->maskValid = false; d->maskIsSet = false; + d->scissorMask = false; d->maskRect = QRect(); } #endif @@ -3398,6 +3435,7 @@ void QVGPaintEngine::restoreState(QPaintEngine::DirtyFlags dirty) QPaintEngine::DirtyClipEnabled)) != 0) { d->maskValid = false; d->maskIsSet = false; + d->scissorMask = false; d->maskRect = QRect(); clipEnabledChanged(); } -- cgit v0.12 From 4c84020bd1c049ce82e0deb77196829616b91f4a Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 4 Feb 2010 10:12:14 +1000 Subject: Use OpenVG scissor on 90/180/270 rotations and simple clips. Task-number: QTBUG-7864 Reviewed-by: Sarah Smith --- src/openvg/qpaintengine_vg.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index bff3328..6813d2f 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1544,7 +1544,28 @@ void QVGPaintEngine::stroke(const QVectorPath &path, const QPen &pen) static inline bool clipTransformIsSimple(const QTransform& transform) { QTransform::TransformationType type = transform.type(); - return (type == QTransform::TxNone || type == QTransform::TxTranslate); + if (type == QTransform::TxNone || type == QTransform::TxTranslate) + return true; + if (type == QTransform::TxRotate) { + // Check for 0, 90, 180, and 270 degree rotations. + // (0 might happen after 4 rotations of 90 degrees). + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m11 == 0.0f && m22 == 0.0f) { + if (m12 == 1.0f && m21 == -1.0f) + return true; // 90 degrees. + else if (m12 == -1.0f && m21 == 1.0f) + return true; // 270 degrees. + } else if (m12 == 0.0f && m21 == 0.0f) { + if (m11 == -1.0f && m22 == -1.0f) + return true; // 180 degrees. + else if (m11 == 1.0f && m22 == 1.0f) + return true; // 0 degrees. + } + } + return false; } #if defined(QVG_SCISSOR_CLIP) @@ -2351,12 +2372,7 @@ bool QVGPaintEngine::clearRect(const QRectF &rect, const QColor &color) Q_D(QVGPaintEngine); QVGPainterState *s = state(); if (!s->clipEnabled || s->clipOperation == Qt::NoClip) { - // The transform will either be identity or a simple translation, - // so do a simpler version of "r = d->transform.map(rect).toRect()". - QRect r = QRect(qRound(rect.x() + d->transform.dx()), - qRound(rect.y() + d->transform.dy()), - qRound(rect.width()), - qRound(rect.height())); + QRect r = d->transform.mapRect(rect).toRect(); int height = paintDevice()->height(); if (d->clearColor != color || d->clearOpacity != s->opacity) { VGfloat values[4]; -- cgit v0.12 From 264f4451667e7da90e63cf87a2b4a6eb72a14d3b Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 4 Feb 2010 15:02:41 +1000 Subject: Rhys Weatherley's changes for 4.6.2 --- dist/changes-4.6.2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index d768988..00509ed 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -67,8 +67,13 @@ QtNetwork QtOpenGL -------- - - foo - * bar + - [QTBUG-7490] Better support for user-generated binary shaders. + +QtOpenVG +-------- + + - [QTBUG-7791] Optimize single-rect IntersectClip in OpenVG using the scissor. + - [QTBUG-7864] Use OpenVG scissor on 90/180/270 rotations and simple clips. QtScript -------- -- cgit v0.12 From 39523f9f78a7c93643924711b1ed8006ebfcf5ce Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 4 Feb 2010 09:54:47 +0100 Subject: Fix the QAbstractSlider autotest. This reverts part of commit d53315d30b38352db11063096ee3867a40bdc234. --- src/gui/widgets/qabstractslider.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index dca44a4..defebb9 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -697,8 +697,6 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) { Q_D(QAbstractSlider); e->ignore(); - if (e->orientation() != d->orientation && !rect().contains(e->pos())) - return; int stepsToScroll = 0; qreal offset = qreal(e->delta()) / 120; -- cgit v0.12 From d950a35334dda4620a138914c8d8198da670b2dd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 10:07:53 +0100 Subject: I10n: Use 'real' Linguist comments in Phonon::EnvironmentalReverb Reviewed-by: Oswald Buddenhagen --- src/3rdparty/phonon/mmf/environmentalreverb.cpp | 53 ++++++++++--------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp index 4a6ce29..d4f5223 100644 --- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp +++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp @@ -139,77 +139,68 @@ bool EnvironmentalReverb::getParameters(CMdaAudioOutputStream *stream, TInt32 min, max; TUint32 umin, umax; - // DecayHFRatio - // Ratio of high-frequency decay time to the value specified by - // DecayTime. effect->DecayHFRatioRange(umin, umax); + //: DecayHFRatio: Ratio of high-frequency decay time to the value specified by + //: DecayTime. parameters.append(createParameter( DecayHFRatio, tr("Decay HF ratio (%)"), effect->DecayHFRatio(), umin, umax)); - // DecayTime - // Time over which reverberation is diminished. effect->DecayTimeRange(umin, umax); + //: DecayTime: Time over which reverberation is diminished. parameters.append(createParameter( DecayTime, tr("Decay time (ms)"), effect->DecayTime(), umin, umax)); - // Density - // Delay between first and subsequent reflections. - // Note that the S60 platform documentation does not make clear - // the distinction between this value and the Diffusion value. + //: Density Delay between first and subsequent reflections. + //: Note that the S60 platform documentation does not make clear + //: the distinction between this value and the Diffusion value. parameters.append(createParameter( Density, tr("Density (%)"), effect->Density(), 0, 100)); - // Diffusion - // Delay between first and subsequent reflections. - // Note that the S60 platform documentation does not make clear - // the distinction between this value and the Density value. + //: Diffusion: Delay between first and subsequent reflections. + //: Note that the S60 platform documentation does not make clear + //: the distinction between this value and the Density value. parameters.append(createParameter( Diffusion, tr("Diffusion (%)"), effect->Diffusion(), 0, 100)); - // ReflectionsDelay - // Amount of delay between the arrival the direct path from the - // source and the arrival of the first reflection. + //: ReflectionsDelay: Amount of delay between the arrival the direct + //: path from the source and the arrival of the first reflection. parameters.append(createParameter( ReflectionsDelay, tr("Reflections delay (ms)"), effect->ReflectionsDelay(), 0, effect->ReflectionsDelayMax())); - // ReflectionsLevel - // Amplitude of reflections. This value is corrected by the RoomLevel - // to give the final reflection amplitude. - effect->ReflectionLevelRange(min, max); + effect->ReflectionLevelRange(min, max); + //: ReflectionsLevel: Amplitude of reflections. This value is + //: corrected by the RoomLevel to give the final reflection amplitude. parameters.append(createParameter( ReflectionsLevel, tr("Reflections level (mB)"), effect->ReflectionsLevel(), min, max, EffectParameter::LogarithmicHint)); - // ReverbDelay - // Amount of time between arrival of the first reflection and start of - // the late reverberation. + //: ReverbDelay: Amount of time between arrival of the first + //: reflection and start of the late reverberation. parameters.append(createParameter( ReverbDelay, tr("Reverb delay (ms)"), effect->ReverbDelay(), 0, effect->ReverbDelayMax())); - // ReverbLevel - // Amplitude of reverberations. This value is corrected by the - // RoomLevel to give the final reverberation amplitude. effect->ReverbLevelRange(min, max); + //: ReverbLevel Amplitude of reverberations. This value is + //: corrected by the RoomLevel to give the final reverberation + //: amplitude. parameters.append(createParameter( ReverbLevel, tr("Reverb level (mB)"), effect->ReverbLevel(), min, max, EffectParameter::LogarithmicHint)); - // RoomHFLevel - // Amplitude of low-pass filter used to attenuate the high frequency - // component of reflected sound. effect->RoomHFLevelRange(min, max); + //: RoomHFLevel: Amplitude of low-pass filter used to attenuate the + //: high frequency component of reflected sound. parameters.append(createParameter( RoomHFLevel, tr("Room HF level"), effect->RoomHFLevel(), min, max)); - // RoomLevel - // Master volume control for all reflected sound. effect->RoomLevelRange(min, max); + //: RoomLevel: Master volume control for all reflected sound. parameters.append(createParameter( RoomLevel, tr("Room level (mB)"), effect->RoomLevel(), min, max, EffectParameter::LogarithmicHint)); -- cgit v0.12 From 3e6b22f138ad5b592dedbca99f91fdf612f20cea Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 10:08:54 +0100 Subject: I10n/German: Update translations for 4.6.2 --- translations/designer_de.ts | 45 ++-- translations/qt_de.ts | 533 +++++++++++++++++++++++++++++++++----------- 2 files changed, 436 insertions(+), 142 deletions(-) diff --git a/translations/designer_de.ts b/translations/designer_de.ts index b731595..8c1ba68 100644 --- a/translations/designer_de.ts +++ b/translations/designer_de.ts @@ -517,12 +517,12 @@ - + Move action Aktion verschieben - + Change Title Titel ändern @@ -1027,7 +1027,7 @@ FormBuilder - + Invalid stretch value for '%1': '%2' Parsing layout stretch values Ungültiger Stretch-Wert für '%1': '%2' @@ -1412,7 +1412,7 @@ Fehler beim Lesen der ui-Datei: Das Wurzelelement <ui> fehlt. - + The creation of a widget of the class '%1' failed. Es konnte kein Widget der Klasse '%1' erzeugt werden. @@ -2273,7 +2273,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QFormBuilder - + An empty class name was passed on to %1 (object name: '%2'). Empty class name passed to widget factory method Der Methode %1 wurde ein leerer Klassennamen übergeben (Name '%2'). @@ -2313,6 +2313,16 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier The property %1 could not be written. The type %2 is not supported yet. Die Eigenschaft %1 konnte nicht geschrieben werden, da der Typ %2 nicht unterstützt wird. + + + The enumeration-value '%1' is invalid. The default value '%2' will be used instead. + Der Aufzählungswert '%1' ist ungültig. Es wird der Vorgabewert '%2' verwendet. + + + + The flag-value '%1' is invalid. Zero will be used instead. + Der Flag-Wert '%1' ist ungültig. Es wird der Wert 0 verwendet. + QStackedWidgetEventFilter @@ -2446,7 +2456,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtBoolEdit - + True @@ -2475,7 +2485,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtCharEdit - + Clear Char Zeichen löschen @@ -2491,7 +2501,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtColorPropertyManager - + Red Rot @@ -2514,7 +2524,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtCursorDatabase - + Arrow Pfeil @@ -3062,6 +3072,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtGradientViewDialog + Select Gradient Gradienten auswählen @@ -3069,7 +3080,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtKeySequenceEdit - + Clear Shortcut Tastenkürzel löschen @@ -3131,7 +3142,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtPropertyBrowserUtils - + [%1, %2, %3] (%4) [%1, %2, %3] (%4) @@ -3904,7 +3915,7 @@ Möchten Sie sie überschreiben? VersionDialog - + <h3>%1</h3><br/><br/>Version %2 <h3>%1</h3><br/><br/>Version %2 @@ -4742,7 +4753,7 @@ Möchten Sie sie überschreiben? Fehler beim Einfügen - + Lay out Layout @@ -4753,7 +4764,7 @@ Möchten Sie sie überschreiben? Widget einfügen - + Paste %n action(s) Eine Aktion einfügen @@ -4794,12 +4805,12 @@ Möchten Sie sie überschreiben? Übergeordnetes Widget auswählen - + A QMainWindow-based form does not contain a central widget. Ein auf QMainWindow basierendes Formular enthält kein zentrales Widget. - + Raise widgets Widgets nach vorn bringen @@ -4825,7 +4836,7 @@ Möchten Sie sie überschreiben? qdesigner_internal::FormWindowManager - + Cu&t &Ausschneiden diff --git a/translations/qt_de.ts b/translations/qt_de.ts index d916733..8cbf402 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -4,7 +4,7 @@ CloseButton - + Close Tab Schließen @@ -12,7 +12,7 @@ FakeReply - + Fake error ! Fake error ! @@ -143,7 +143,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Phonon::MMF - + Audio Output Audio-Ausgabe @@ -152,60 +152,333 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass The audio output device Audio-Ausgabegerät - - - Phonon::MMF::AudioEqualizer - - Frequency band, %1 Hz - Frequenzband, %1 Hz + + No error + Kein Fehler - - - Phonon::MMF::EffectFactory - - Audio Equalizer - Audio-Equalizer + + Not found + Nicht gefunden - Bass Boost - Bass-Boost + Out of memory + Es ist kein Speicher mehr verfügbar + + + + Not supported + Nicht unterstützt + + + + Overflow + Überlauf + + + + Underflow + Unterlauf + + + + Already exists + Existiert bereits + + + + Path not found + Pfad konnte nicht gefunden werden + + + + In use + Bereits in Verwendung + + + + Not ready + Nicht bereit + + + + Access denied + Zugriff verweigert + + + + Could not connect + Es konnte keine Verbindung hergestellt werden + + + + Disconnected + Getrennt + + + + Permission denied + Zugriff verweigert + + + + Insufficient bandwidth + Unzureichende Bandweite + + + + Network unavailable + Netzwerk nicht verfügbar + + + + Network communication error + Fehler bei der Kommunikation über das Netzwerk - Distance Attenuation - Abschwächung in Abhängigkeit von der Entfernung + Streaming not supported + Streaming nicht unterstützt + Server alert + Server alert + + + + Invalid protocol + Ungültiges Protokoll + + - Environmental Reverb - Hall-Effekt der Umgebung + Invalid URL + Ungültige URL - Loudness - Lautstärke + Multicast error + Multicast-Fehler + + + + Proxy server error + Fehler bei Proxy-Server-Kommunikation - Source Orientation - Ausrichtung der Quelle + Proxy server not supported + Proxy-Server nicht unterstützt - Stereo Widening - Stereo-Basisverbreiterung + Audio output error + Fehler bei Audio-Ausgabe + + + + Video output error + Fehler bei Video-Ausgabe + + + + Decoder error + Fehler im Decoder + + + + Audio or video components could not be played + Audio- oder Videokomponenten konnten nicht abgespielt werden + + + + DRM error + DRM-Fehler + + + + Unknown error (%1) + Unbekannter Fehler (%1) + + + + Phonon::MMF::AbstractMediaPlayer + + + Not ready to play + Das Abspielen ist im Grundzustand nicht möglich + + + + + Error opening file + Die Datei konnte nicht geöffnet werden + + + + Error opening URL + Der URL konnte nicht geöffnet werden + + + + Setting volume failed + Die Lautstärke konnte nicht eingestellt werden + + + + Playback complete + Abspielen beendet + + + + Phonon::MMF::AudioEqualizer + + + %1 Hz + %1 Hz + + + + Phonon::MMF::AudioPlayer + + + Getting position failed + Die Position konnte nicht bestimmt werden + + + + Opening clip failed + Der Clip konnte nicht geöffnet werden + + + + Phonon::MMF::EffectFactory + + + Enabled + Aktiviert + + + + Phonon::MMF::EnvironmentalReverb + + + Decay HF ratio (%) + DecayHFRatio: Ratio of high-frequency decay time to the value specified by DecayTime. + Hochfrequenz-Abklingverhältnis (%) + + + + Decay time (ms) + Abklingzeit (ms) + + + + Density (%) + Density Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Diffusion value. + Dichte (%) + + + + Diffusion (%) + Diffusion: Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Density value. + Diffusion (%) + + + + Reflections delay (ms) + ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection. + Verzögerung des Echos (ms) + + + + Reflections level (mB) + ReflectionsLevel: Amplitude of reflections. This value is corrected by the RoomLevel to give the final reflection amplitude. + Stärke des Echos (mB) + + + + Reverb delay (ms) + ReverbDelay: Amount of time between arrival of the first reflection and start of the late reverberation. + Verzögerung des Nachhalls (ms) + + + + Reverb level (mB) + ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude. + Stärke des Nachhalls (mB) + + + + Room HF level + RoomHFLevel: Amplitude of low-pass filter used to attenuate the high frequency component of reflected sound. + Hochfrequenz-Pegel des Raums + + + + Room level (mB) + RoomLevel: Master volume control for all reflected sound. + Pegel des Raums (mB) Phonon::MMF::MediaObject - - Media type could not be determined - Der Typ des Mediums konnte nicht bestimmt werden + + Error opening source: type not supported + Die Quelle konnte nicht geöffnet werden: Dieser Typ wird nicht unterstützt + + + + Error opening source: media type could not be determined + Die Quelle konnte nicht geöffnet werden: Der Medientyp konnte nicht bestimmt werden + + + + Phonon::MMF::StereoWidening + + + Level (%) + Stärke (%) + + + + Phonon::MMF::VideoPlayer + + + Pause failed + Fehler bei Pause-Funktion + + + + Seek failed + Suchoperation fehlgeschlagen + + + + Getting position failed + Die Position konnte nicht bestimmt werden + + + + Opening clip failed + Der Clip konnte nicht geöffnet werden + + + + Buffering clip failed + Fehler beim Puffern des Clips + + + + + + + + Video display error + Fehler bei der Video-Anzeige @@ -275,7 +548,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Q3FileDialog - + Copy or Move a File Datei kopieren oder verschieben @@ -300,7 +573,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass - + All Files (*) Alle Dateien (*) @@ -912,8 +1185,8 @@ nach QAbstractSocket - - + + Host not found @@ -932,19 +1205,20 @@ nach Das Zeitlimit für die Verbindung wurde überschritten - - + + Operation on socket is not supported Diese Socket-Operation wird nicht unterstützt - + + Socket operation timed out Das Zeitlimit für die Operation wurde überschritten - + Socket is not connected Nicht verbunden @@ -957,7 +1231,7 @@ nach QAbstractSpinBox - + &Step up &Inkrementieren @@ -983,7 +1257,7 @@ nach QApplication - + QT_LAYOUT_DIRECTION Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. LTR @@ -1053,7 +1327,7 @@ nach QColorDialog - + Hu&e: Farb&ton: @@ -1093,7 +1367,7 @@ nach Farbauswahl - + &Basic colors Grundfar&ben @@ -1180,7 +1454,7 @@ nach QDB2Driver - + Unable to connect Es kann keine Verbindung aufgebaut werden @@ -1203,7 +1477,7 @@ nach QDB2Result - + Unable to execute statement Der Befehl kann nicht ausgeführt werden @@ -1278,7 +1552,7 @@ nach QDialog - + What's This? Direkthilfe @@ -1291,9 +1565,9 @@ nach QDialogButtonBox - + - + OK OK @@ -1505,7 +1779,7 @@ nach QFile - + Destination file exists Die Zieldatei existiert bereits @@ -1545,7 +1819,7 @@ nach QFileDialog - + All Files (*) Alle Dateien (*) @@ -1568,13 +1842,13 @@ nach Details - + File Datei - + Open Öffnen @@ -1584,25 +1858,25 @@ nach Speichern unter - - - + + + &Open &Öffnen - - + + &Save S&peichern - + Recent Places Zuletzt besucht - + &Rename &Umbenennen @@ -1617,17 +1891,17 @@ nach &Versteckte Dateien anzeigen - + New Folder Neues Verzeichnis - + Find Directory Verzeichnis suchen - + Directories Verzeichnisse @@ -1637,13 +1911,13 @@ nach Alle Dateien (*.*) - - + + Directory: Verzeichnis: - + %1 already exists. Do you want to replace it? Die Datei %1 existiert bereits. @@ -1737,7 +2011,7 @@ Möchten Sie die Datei trotzdem löschen? Unbekannt - + Show Anzeigen @@ -1753,8 +2027,8 @@ Möchten Sie die Datei trotzdem löschen? &Neues Verzeichnis - - + + &Choose &Auswählen @@ -1764,8 +2038,8 @@ Möchten Sie die Datei trotzdem löschen? Löschen - - + + File &name: Datei&name: @@ -2286,7 +2560,7 @@ Möchten Sie die Datei trotzdem löschen? QHostInfo - + Unknown error Unbekannter Fehler @@ -2296,7 +2570,7 @@ Möchten Sie die Datei trotzdem löschen? - + Host not found Rechner konnte nicht gefunden werden @@ -2330,7 +2604,7 @@ Möchten Sie die Datei trotzdem löschen? QHttp - + Connection refused Verbindung verweigert @@ -2350,8 +2624,6 @@ Möchten Sie die Datei trotzdem löschen? - - HTTP request failed HTTP-Anfrage fehlgeschlagen @@ -2382,7 +2654,7 @@ Möchten Sie die Datei trotzdem löschen? Verbindung mit %1 beendet - + Connection closed Verbindung beendet @@ -2647,7 +2919,7 @@ Möchten Sie die Datei trotzdem löschen? QIODevice - + Permission denied Zugriff verweigert @@ -2667,7 +2939,7 @@ Möchten Sie die Datei trotzdem löschen? Kein freier Speicherplatz auf dem Gerät vorhanden - + Unknown error Unbekannter Fehler @@ -2731,7 +3003,7 @@ Möchten Sie die Datei trotzdem löschen? Operation unmap fehlgeschlagen für '%1': %2 - + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (%2.%3.%4) [%5] @@ -2783,12 +3055,12 @@ Möchten Sie die Datei trotzdem löschen? QLineEdit - + Select All Alles auswählen - + &Undo &Rückgängig @@ -2798,22 +3070,22 @@ Möchten Sie die Datei trotzdem löschen? Wieder&herstellen - + Cu&t &Ausschneiden - + &Copy &Kopieren - + &Paste Einf&ügen - + Delete Löschen @@ -2916,7 +3188,7 @@ Möchten Sie die Datei trotzdem löschen? QMYSQLDriver - + Unable to open database ' Die Datenbankverbindung kann nicht geöffnet werden ' @@ -2926,7 +3198,7 @@ Möchten Sie die Datei trotzdem löschen? Es kann keine Verbindung aufgebaut werden - + Unable to begin transaction Es kann keine Transaktion gestartet werden @@ -2944,12 +3216,13 @@ Möchten Sie die Datei trotzdem löschen? QMYSQLResult - + + Unable to fetch data Es konnten keine Daten abgeholt werden - + Unable to execute query Die Abfrage konnte nicht ausgeführt werden @@ -3127,7 +3400,7 @@ Möchten Sie die Datei trotzdem löschen? QMenuBar - + Actions Optionen @@ -3163,7 +3436,7 @@ Möchten Sie die Datei trotzdem löschen? Hilfe - + Show Details... Details einblenden... @@ -3346,13 +3619,13 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessFileBackend - + Request for opening non-local file %1 Anforderung zum Öffnen einer Datei über Netzwerk %1 - + Error opening %1: %2 %1 konnte nicht geöffnet werden: %2 @@ -3363,7 +3636,7 @@ Möchten Sie die Datei trotzdem löschen? Fehler beim Schreiben zur Datei %1: %2 - + Cannot open %1: Path is a directory %1 kann nicht geöffnet werden: Der Pfad spezifiziert ein Verzeichnis @@ -3405,7 +3678,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessHttpBackend - + No suitable proxy found Es konnte kein geeigneter Proxy-Server gefunden werden @@ -3413,12 +3686,12 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReply - + Error downloading %1 - server replied: %2 Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2 - + Protocol "%1" is unknown Das Protokoll "%1" ist unbekannt @@ -3426,7 +3699,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReplyImpl - + Operation canceled Operation abgebrochen @@ -3509,7 +3782,7 @@ Möchten Sie die Datei trotzdem löschen? QODBCDriver - + Unable to connect Es kann keine Verbindung aufgebaut werden @@ -3542,14 +3815,14 @@ Möchten Sie die Datei trotzdem löschen? QODBCResult - - + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResult::reset: 'SQL_CURSOR_STATIC' konnte nicht als Attribut des Befehls gesetzt werden. Bitte prüfen Sie die Konfiguration Ihres ODBC-Treibers - - + + Unable to execute statement Der Befehl konnte nicht ausgeführt werden @@ -3569,7 +3842,7 @@ Möchten Sie die Datei trotzdem löschen? Die Variable konnte nicht gebunden werden - + Unable to fetch last @@ -3619,7 +3892,7 @@ Möchten Sie die Datei trotzdem löschen? Der entfernte Rechner hat die Verbindung zu %1 vorzeitig beendet - + No host name given Es wurde kein Hostname angegeben @@ -3803,7 +4076,7 @@ Möchten Sie die Datei trotzdem löschen? QPrintDialog - + locally connected direkt verbunden @@ -4232,12 +4505,12 @@ Bitte wählen Sie einen anderen Dateinamen. QPrintPreviewDialog - + %1% %1% - + Print Preview Druckvorschau @@ -4317,7 +4590,12 @@ Bitte wählen Sie einen anderen Dateinamen. Seite einrichten - + + Close + Schließen + + + Export to PDF PDF exportieren @@ -4530,7 +4808,7 @@ Bitte wählen Sie einen anderen Dateinamen. Zeitüberschreitung - + @@ -4645,7 +4923,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLite2Driver - + Error opening database Die Datenbankverbindung konnte nicht geöffnet werden @@ -4668,12 +4946,12 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLite2Result - + Unable to fetch results Das Ergebnis konnte nicht abgeholt werden - + Unable to execute statement Der Befehl konnte nicht ausgeführt werden @@ -4681,7 +4959,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLiteDriver - + Error opening database Die Datenbankverbindung konnte nicht geöffnet werden @@ -5184,7 +5462,7 @@ Bitte wählen Sie einen anderen Dateinamen. - + %1: permission denied %1: Zugriff verweigert @@ -6150,7 +6428,7 @@ Bitte wählen Sie einen anderen Dateinamen. Umdrehen - + Ctrl Strg @@ -6184,7 +6462,7 @@ Bitte wählen Sie einen anderen Dateinamen. F%1 - + Home Page Startseite @@ -6293,7 +6571,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSoftKeyManager - + Ok Ok @@ -6318,7 +6596,7 @@ Bitte wählen Sie einen anderen Dateinamen. Abbrechen - + Exit Beenden @@ -6401,7 +6679,12 @@ Bitte wählen Sie einen anderen Dateinamen. Die Daten konnten nicht geschrieben werden: %1 - + + Unable to decrypt data: %1 + Die Daten konnten nicht entschlüsselt werden: %1 + + + Error while reading: %1 Beim Lesen ist ein Fehler aufgetreten: %1 @@ -6411,7 +6694,7 @@ Bitte wählen Sie einen anderen Dateinamen. Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten: %1 - + Error creating SSL context (%1) Es konnte keine SSL-Kontextstruktur erzeugt werden (%1) @@ -6657,7 +6940,7 @@ Bitte wählen Sie einen anderen Dateinamen. QTextControl - + &Undo &Rückgängig @@ -7375,7 +7658,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 (%2x%3 Pixel) - + Bad HTTP request Ungültige HTTP-Anforderung @@ -7460,7 +7743,7 @@ Bitte wählen Sie einen anderen Dateinamen. - + JavaScript Alert - %1 JavaScript-Hinweis - %1 @@ -7470,7 +7753,7 @@ Bitte wählen Sie einen anderen Dateinamen. JavaScript-Bestätigung - %1 - + JavaScript Prompt - %1 JavaScript-Eingabeaufforderung - %1 @@ -7706,7 +7989,7 @@ Bitte wählen Sie einen anderen Dateinamen. QWidget - + * * -- cgit v0.12 From 04e34fe3aecca482abeeabe2e31778e9102eeb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 18 Jan 2010 09:14:12 +0100 Subject: Improve raster graphics system performance on Mac (second try). This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context. --- src/gui/kernel/qcocoapanel_mac.mm | 3 +++ src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 20 ++++++++++++++++++++ src/gui/kernel/qcocoaview_mac.mm | 9 +++++---- src/gui/kernel/qcocoawindow_mac_p.h | 3 +++ src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- src/gui/kernel/qwidget.cpp | 15 ++++++++++++++- src/gui/kernel/qwidget_mac.mm | 19 +++++++++++++++++++ src/gui/painting/qwindowsurface_raster.cpp | 4 +--- 8 files changed, 66 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm index e535aac..5e24c84 100644 --- a/src/gui/kernel/qcocoapanel_mac.mm +++ b/src/gui/kernel/qcocoapanel_mac.mm @@ -46,6 +46,9 @@ #import #import #import +#include +#include + #include diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 1a265d0..d2b74d7 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -51,6 +51,9 @@ NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). ****************************************************************************/ +// WARNING: Don't include any header files from within this file. Put them +// directly into qcocoawindow_mac_p.h and qcocoapanel_mac_p.h + QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QPointer qt_button_down; //qapplication_mac.cpp @@ -185,3 +188,20 @@ QT_END_NAMESPACE return [super frameViewClassForStyleMask:styleMask]; } +- (void)displayIfNeeded +{ + + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + if (qwidget == 0) { + [super displayIfNeeded]; + return; + } + + if (QApplicationPrivate::graphicsSystem() != 0) { + if (QWidgetBackingStore *bs = qt_widget_private(qwidget)->maybeBackingStore()) + bs->sync(qwidget, qwidget->rect()); + } + [super displayIfNeeded]; +} + + diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index d255604..2c35be2 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -520,10 +520,11 @@ extern "C" { - (void)drawRect:(NSRect)aRect { if (QApplicationPrivate::graphicsSystem() != 0) { - if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) - bs->markDirty(qwidget->rect(), qwidget); - qwidgetprivate->syncBackingStore(qwidget->rect()); - return; + if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) { + // Drawing is handled on the window level + // See qcocoasharedwindowmethods_mac_p. + return; + } } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; qwidgetprivate->hd = cg; diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h index c0d8252..0474882 100644 --- a/src/gui/kernel/qcocoawindow_mac_p.h +++ b/src/gui/kernel/qcocoawindow_mac_p.h @@ -53,6 +53,9 @@ #ifdef QT_MAC_USE_COCOA #include "qmacdefines_mac.h" #import +#include +#include + enum { QtMacCustomizeWindow = 1 << 21 }; // This will one day be run over by diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e06a810..65c04e5 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1162,7 +1162,7 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget) CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else - CGContextRef context = (CGContextRef)[[NSGraphicsContext graphicsContextWithWindow:qt_mac_window_for(widget)] graphicsPort]; + CGContextRef context = reinterpret_cast([[qt_mac_window_for(widget) graphicsContext] graphicsPort]); #endif return context; } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ffad38b..78a25ac 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1660,7 +1660,13 @@ void QWidgetPrivate::syncBackingStore() repaint_sys(dirty); dirty = QRegion(); } else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), QRegion()); +#else bs->sync(); +#endif } } @@ -1668,8 +1674,15 @@ void QWidgetPrivate::syncBackingStore(const QRegion ®ion) { if (paintOnScreen()) repaint_sys(region); - else if (QWidgetBackingStore *bs = maybeBackingStore()) + else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), region); +#else bs->sync(q_func(), region); +#endif + } } void QWidgetPrivate::setUpdatesEnabled_helper(bool enable) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 78c1562..b5888b4 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -565,6 +565,25 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif +#ifdef QT_MAC_USE_COCOA +void qt_mac_set_needs_display(QWidget *widget, QRegion region) +{ + NSView *theNSView = qt_mac_nativeview_for(widget); + if (region.isNull()) { + [theNSView setNeedsDisplay:YES]; + return; + } + + QVector rects = region.rects(); + for (int i = 0; i Date: Thu, 4 Feb 2010 10:26:27 +0100 Subject: Change log updated --- dist/changes-4.6.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 00509ed..f80c526 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -120,7 +120,7 @@ Third party components Qt for Unix (X11 and Mac OS X) ------------------------------ - - + - Qt for Linux/X11 ---------------- @@ -141,6 +141,9 @@ Qt for Mac OS X - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. + - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes. + - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar. + - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa. Qt for Embedded Linux -- cgit v0.12 From 88a3be84f9a1cb235a8e3a9b25df7763646166b6 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 4 Feb 2010 10:32:55 +0100 Subject: Add some entries to the change log --- dist/changes-4.6.2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index f80c526..65c07cb 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -51,6 +51,8 @@ QtGui * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. + * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. + QtDBus ------ @@ -130,21 +132,25 @@ Qt for Linux/X11 * Fixed a crash when an input method tries to create a widget after the application is destroyed. + - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle + - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with + some GTK+ themes. + - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes. + Qt for Windows -------------- - - - Qt for Mac OS X --------------- + - [QTBUG-7832]: Restored missing margins around non-unified toolbars. - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes. - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar. - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa. - + - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left mode. Qt for Embedded Linux --------------------- -- cgit v0.12 From 26b696f9333147218bb7dca0abdf0e5f321763f9 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Feb 2010 11:18:49 +0100 Subject: Doc: Removed promisse to fix a problem The problem is out of scope and will not be fixed. Task-number:QTBUG-4377 Reviewed-by:Trust Me --- src/gui/widgets/qtoolbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 53050ac..8beda55 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -441,8 +441,7 @@ void QToolBarPrivate::plug(const QRect &r) When a QToolBar is not a child of a QMainWindow, it looses the ability to populate the extension pop up with widgets added to the toolbar using addWidget(). Please use widget actions created by inheriting QWidgetAction - and implementing QWidgetAction::createWidget() instead. This is a known - issue which will be fixed in a future release. + and implementing QWidgetAction::createWidget() instead. \sa QToolButton, QMenu, QAction, {Application Example} */ -- cgit v0.12 From 3569038ffec0c133ff29f80d506f334cc0f2ddb3 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 4 Feb 2010 10:29:34 +0000 Subject: Further bug fixes for enable/disables DEF files mechanism on Symbian Fix bug where all target types, including apps, plugins and static libraries were getting DEFFILE statements - now it's just libraries that get it. Fix bug where duplicate DEFFILE blocks were being added to projects that manually specified their own DEFFILE - this now tests for the qmake variable "defBlock" being set, and doesn't add additional DEFFILE statements if it is. NOTE: This means that adding DEFFILE statements to MMP_RULES manually should be done by creating a variable called defBlock, and adding that to the MMP_RULES (ie. MMP_RULES += defBlock) Fix bug in configure.exe, where using -nokia-developer for Windows builds would warn about Symbian DEF file usage (or lack thereof) Reviewed-by: Janne Koskinen Reviewed-by: Jason Barron --- configure.exe | Bin 1178112 -> 1180160 bytes mkspecs/features/symbian/def_files.prf | 48 ++++++++++++++---------- mkspecs/features/symbian/def_files_disabled.prf | 12 ++++-- tools/configure/configureapp.cpp | 4 +- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/configure.exe b/configure.exe index 21fdcfa..8913de1 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index c29d4ec..48d91aa 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -3,24 +3,32 @@ CONFIG -= def_files_disabled -!isEmpty(defFilePath) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defBlock -} else { - # If defFilePath is not defined, then put the folders containing the DEF files at the - # same level as the .pro (and generated MMP) file(s) - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ./bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ./eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defBlock +# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one +# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements +# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) +!contains(MMP_RULES, defBlock) { + # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files + # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE + # statements - they use the qmake generated statements instead + # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + !isEmpty(defFilePath) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else { + # If defFilePath is not defined, then put the folders containing the DEF files at the + # same level as the .pro (and generated MMP) file(s) + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ./bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE ./eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } + MMP_RULES += defBlock + } } diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf index d5c9505..557c5e3 100644 --- a/mkspecs/features/symbian/def_files_disabled.prf +++ b/mkspecs/features/symbian/def_files_disabled.prf @@ -2,6 +2,12 @@ CONFIG -= def_files -# with EXPORTUNFROZEN enabled, new exports are included in the dll without -# needing to run abld/sbs freeze -MMP_RULES += EXPORTUNFROZEN +# See def_files.prf for reasoning on the slight nastiness of this +!contains(MMP_RULES, defBlock) { + # See def_files.prf for reasoning for excluding target types and configs below + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without + # needing to run abld/sbs freeze + MMP_RULES += EXPORTUNFROZEN + } +} diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8d1b640..83b4d9c 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -482,7 +482,9 @@ void Configure::parseCmdLine() dictionary[ "BUILDNOKIA" ] = "yes"; dictionary[ "BUILDDEV" ] = "yes"; dictionary["LICENSE_CONFIRMED"] = "yes"; - dictionary[ "SYMBIAN_DEFFILES" ] = "no"; + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { + dictionary[ "SYMBIAN_DEFFILES" ] = "no"; + } } else if( configCmdLine.at(i) == "-opensource" ) { dictionary[ "BUILDTYPE" ] = "opensource"; -- cgit v0.12 From 6d1d425e219b0a5e03603f7d708cd740b7d3a3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 4 Feb 2010 11:44:44 +0100 Subject: Cache the sizes of the images in an animated GIF. Rework the previous commit a bit and include caching of image sizes. Task-number: QTBUG-6696 Reviewed-by: Kim --- src/plugins/imageformats/gif/qgifhandler.cpp | 85 ++++++++++++++++++---------- src/plugins/imageformats/gif/qgifhandler.h | 4 +- tests/auto/qimagereader/tst_qimagereader.cpp | 1 + 3 files changed, 59 insertions(+), 31 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 6cd7841..6d473e3 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -71,8 +71,8 @@ public: ~QGIFFormat(); int decode(QImage *image, const uchar* buffer, int length, - int *nextFrameDelay, int *loopCount, QSize *nextSize); - static int imageCount(QIODevice *device); + int *nextFrameDelay, int *loopCount); + static void scan(QIODevice *device, QVector *imageSizes); bool newFrame; bool partialNewFrame; @@ -230,7 +230,7 @@ void QGIFFormat::disposePrevious(QImage *image) Returns the number of bytes consumed. */ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, - int *nextFrameDelay, int *loopCount, QSize *nextSize) + int *nextFrameDelay, int *loopCount) { // We are required to state that // "The Graphics Interchange Format(c) is the Copyright property of @@ -347,10 +347,6 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, bpl = image->bytesPerLine(); bits = image->bits(); memset(bits, 0, image->byteCount()); - - // ### size of the upcoming frame, should rather - // be known before decoding it. - *nextSize = QSize(swidth, sheight); } disposePrevious(image); @@ -647,17 +643,17 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, } /*! - Returns the number of images that can be read from \a device. + Scans through the data stream defined by \a device and returns the image + sizes found in the stream in the \a imageSizes vector. */ - -int QGIFFormat::imageCount(QIODevice *device) +void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) { if (!device) - return 0; + return; qint64 oldPos = device->pos(); if (!device->seek(0)) - return 0; + return; int colorCount = 0; int localColorCount = 0; @@ -667,18 +663,21 @@ int QGIFFormat::imageCount(QIODevice *device) bool globalColormap = false; int count = 0; int blockSize = 0; + int imageWidth = 0; + int imageHeight = 0; bool done = false; uchar hold[16]; - int imageCount = 0; State state = Header; const int readBufferSize = 40960; // 40k read buffer QByteArray readBuffer(device->read(readBufferSize)); - if (readBuffer.isEmpty()) - return 0; + if (readBuffer.isEmpty()) { + device->seek(oldPos); + return; + } - // this is a specialized version of the state machine from decode(), + // This is a specialized version of the state machine from decode(), // which doesn't do any image decoding or mallocing, and has an // optimized way of skipping SkipBlocks, ImageDataBlocks and // Global/LocalColorMaps. @@ -700,6 +699,8 @@ int QGIFFormat::imageCount(QIODevice *device) case LogicalScreenDescriptor: hold[count++] = ch; if (count == 7) { + imageWidth = LM(hold[0], hold[1]); + imageHeight = LM(hold[2], hold[3]); globalColormap = !!(hold[4] & 0x80); globalColorCount = 2 << (hold[4] & 0x7); count = 0; @@ -753,13 +754,29 @@ int QGIFFormat::imageCount(QIODevice *device) case ImageDescriptor: hold[count++] = ch; if (count == 10) { + int newLeft = LM(hold[1], hold[2]); + int newTop = LM(hold[3], hold[4]); + int newWidth = LM(hold[5], hold[6]); + int newHeight = LM(hold[7], hold[8]); + + if (imageWidth/10 > qMax(newWidth,200)) + imageWidth = -1; + if (imageHeight/10 > qMax(newHeight,200)) + imageHeight = -1; + + if (imageWidth <= 0) + imageWidth = newLeft + newWidth; + if (imageHeight <= 0) + imageHeight = newTop + newHeight; + + *imageSizes << QSize(imageWidth, imageHeight); + localColormap = !!(hold[9] & 0x80); localColorCount = localColormap ? (2 << (hold[9] & 0x7)) : 0; if (localColorCount) colorCount = localColorCount; else colorCount = globalColorCount; - imageCount++; count = 0; if (localColormap) { @@ -865,13 +882,13 @@ int QGIFFormat::imageCount(QIODevice *device) break; case Error: device->seek(oldPos); - return 0; + return; } } readBuffer = device->read(readBufferSize); } device->seek(oldPos); - return imageCount; + return; } void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb color) @@ -994,8 +1011,7 @@ QGifHandler::QGifHandler() nextDelay = 0; loopCnt = 0; frameNumber = -1; - nextSize = QSize(); - imageCnt = -1; + scanIsCached = false; } QGifHandler::~QGifHandler() @@ -1017,7 +1033,7 @@ bool QGifHandler::imageIsComing() const } int decoded = gifFormat->decode(&lastImage, (const uchar *)buffer.constData(), buffer.size(), - &nextDelay, &loopCnt, &nextSize); + &nextDelay, &loopCnt); if (decoded == -1) break; buffer.remove(0, decoded); @@ -1061,7 +1077,7 @@ bool QGifHandler::read(QImage *image) } int decoded = gifFormat->decode(&lastImage, (const uchar *)buffer.constData(), buffer.size(), - &nextDelay, &loopCnt, &nextSize); + &nextDelay, &loopCnt); if (decoded == -1) break; buffer.remove(0, decoded); @@ -1092,8 +1108,18 @@ bool QGifHandler::supportsOption(ImageOption option) const QVariant QGifHandler::option(ImageOption option) const { if (option == Size) { - if (imageIsComing()) - return nextSize; + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes); + scanIsCached = true; + } + // before the first frame is read, or we have an empty data stream + if (frameNumber == -1) + return (imageSizes.count() > 0) ? QVariant(imageSizes.at(0)) : QVariant(); + // after the last frame has been read, the next size is undefined + if (frameNumber >= imageSizes.count() - 1) + return QVariant(); + // and the last case: the size of the next frame + return imageSizes.at(frameNumber + 1); } else if (option == Animation) { return true; } @@ -1113,10 +1139,11 @@ int QGifHandler::nextImageDelay() const int QGifHandler::imageCount() const { - if (imageCnt != -1) - return imageCnt; - imageCnt = QGIFFormat::imageCount(device()); - return imageCnt; + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes); + scanIsCached = true; + } + return imageSizes.count(); } int QGifHandler::loopCount() const diff --git a/src/plugins/imageformats/gif/qgifhandler.h b/src/plugins/imageformats/gif/qgifhandler.h index 830cd38..8e07aff 100644 --- a/src/plugins/imageformats/gif/qgifhandler.h +++ b/src/plugins/imageformats/gif/qgifhandler.h @@ -87,8 +87,8 @@ private: mutable int nextDelay; mutable int loopCnt; int frameNumber; - mutable QSize nextSize; - mutable int imageCnt; + mutable QVector imageSizes; + mutable bool scanIsCached; }; QT_END_NAMESPACE diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index debc090..3e40527 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -881,6 +881,7 @@ void tst_QImageReader::gifImageCount() { QImageReader io(":images/trolltech.gif"); QVERIFY(io.imageCount() == 34); + QVERIFY(io.size() == QSize(128,64)); } } #endif -- cgit v0.12 From 4cd8dd562ea149d5a6cdcc15533e4975682106f6 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Thu, 4 Feb 2010 13:39:55 +0200 Subject: Revert "Daylight savings time for Symbian take 2" This reverts commit 7bc18035816a2eac15dfac4d987eb9bf43f90ef6. --- src/corelib/corelib.pro | 2 -- src/corelib/tools/qdatetime.cpp | 60 +++++++++++++--------------------- tests/auto/qdatetime/tst_qdatetime.cpp | 7 ---- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 7f33791..9a15bf1 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -35,6 +35,4 @@ symbian: { # Workaroud for problems with paging this dll MMP_RULES -= PAGED MMP_RULES *= UNPAGED - # Timezone server - LIBS += -ltzclient } diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 9a361c0..c1027ed 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -75,7 +75,6 @@ #if defined(Q_OS_SYMBIAN) #include -#include #endif QT_BEGIN_NAMESPACE @@ -3722,32 +3721,23 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); + TTimeIntervalSeconds utcOffset = User::UTCOffset(); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - TRAP(err, - RTz tz; - User::LeaveIfError(tz.Connect()); - CleanupClosePushL(tz); - res.tm_isdst = tz.IsDaylightSavingOnL(*tz.GetTimeZoneIdL(),utcTTime); - User::LeaveIfError(tz.ConvertToLocalTime(utcTTime)); - CleanupStack::PopAndDestroy(&tz)); - if (KErrNone == err) { - TDateTime localDateTime = utcTTime.DateTime(); - res.tm_sec = localDateTime.Second(); - res.tm_min = localDateTime.Minute(); - res.tm_hour = localDateTime.Hour(); - res.tm_mday = localDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = localDateTime.Month(); - res.tm_year = localDateTime.Year() - 1900; - // Symbian's timezone server doesn't know how to handle DST before year 1997 - if (res.tm_year < 97) - res.tm_isdst = -1; - brokenDown = &res; - } + utcTTime = utcTTime + utcOffset; + TDateTime utcDateTime = utcTTime.DateTime(); + res.tm_sec = utcDateTime.Second(); + res.tm_min = utcDateTime.Minute(); + res.tm_hour = utcDateTime.Hour(); + res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = utcDateTime.Month(); + res.tm_year = utcDateTime.Year() - 1900; + res.tm_isdst = 0; + brokenDown = &res; } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of localtime() where available @@ -3822,27 +3812,23 @@ static void localToUtc(QDate &date, QTime &time, int isdst) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); + TTimeIntervalSeconds utcOffset = TTimeIntervalSeconds(0 - User::UTCOffset().Int()); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { - TTime localTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - RTz tz; - if (KErrNone == tz.Connect()) { - if (KErrNone == tz.ConvertToUniversalTime(localTTime)) { - TDateTime utcDateTime = localTTime.DateTime(); - res.tm_sec = utcDateTime.Second(); - res.tm_min = utcDateTime.Minute(); - res.tm_hour = utcDateTime.Hour(); - res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = utcDateTime.Month(); - res.tm_year = utcDateTime.Year() - 1900; - res.tm_isdst = (int)isdst; - brokenDown = &res; - } - tz.Close(); - } + TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; + utcTTime = utcTTime + utcOffset; + TDateTime utcDateTime = utcTTime.DateTime(); + res.tm_sec = utcDateTime.Second(); + res.tm_min = utcDateTime.Minute(); + res.tm_hour = utcDateTime.Hour(); + res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = utcDateTime.Month(); + res.tm_year = utcDateTime.Year() - 1900; + res.tm_isdst = (int)isdst; + brokenDown = &res; } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of gmtime() where available diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index b9d1d7c..86a4c80 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -147,16 +147,9 @@ Q_DECLARE_METATYPE(QTime) tst_QDateTime::tst_QDateTime() { -#ifdef Q_OS_SYMBIAN - // Symbian's timezone server cannot handle DST correctly for dates before year 1997 - uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t(); - uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t(); - europeanTimeZone = (x1 == 946681200 && x2 == 959810400); -#else uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t(); uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t(); europeanTimeZone = (x1 == 631148400 && x2 == 644191200); -#endif } tst_QDateTime::~tst_QDateTime() -- cgit v0.12 From 4c8b2aa00acc00a95b6f950a4ab7de737631e494 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 4 Feb 2010 11:18:47 +0100 Subject: Add the QMAKE_FILE_EXT variable to extra compilers generation. This give the possibility to get the file name with the extension and without the path. Reviewed-by: Joao Reviewed-by: Marius Storm-Olsen --- qmake/generators/makefile.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 69e1d8a..db2737b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1513,6 +1513,19 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const base = fi.fileName(); val += base; } + } else if(var == QLatin1String("QMAKE_FILE_EXT")) { + filePath = true; + for(int i = 0; i < in.size(); ++i) { + QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i)))); + QString ext; + // Ensure complementarity with QMAKE_FILE_BASE + int baseLen = fi.completeBaseName().length(); + if(baseLen == 0) + ext = fi.fileName(); + else + ext = fi.fileName().remove(0, baseLen); + val += ext; + } } else if(var == QLatin1String("QMAKE_FILE_PATH") || var == QLatin1String("QMAKE_FILE_IN_PATH")) { filePath = true; for(int i = 0; i < in.size(); ++i) -- cgit v0.12 From 34f1758428282a327c12b0d8040061c1f67ecc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 11:35:27 +0100 Subject: Crash when closing any top-level widget on Symbian. The window surface must be deleted while the window is valid because on some graphics systems a notifcation is sent to the window when the surface is released. This fix is also an optmization as we no longer process any backing store requests while deleting the top-level. Previously it would handle requests from the window itself and all its children. Task-number: QT-2513 Reviewed-by: jbarron --- src/gui/kernel/qwidget.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4054d2a..4520a1b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1439,7 +1439,16 @@ QWidget::~QWidget() } #endif - if (QWidgetBackingStore *bs = d->maybeBackingStore()) { + if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { + // Okay, we are about to destroy the top-level window that owns + // the backing store. Make sure we delete the backing store right away + // before the window handle is invalid. This is important because + // the backing store will delete its window surface, which may or may + // not have a reference to this widget that will be used later to + // notify the window it no longer has a surface. + delete d->extra->topextra->backingStore; + d->extra->topextra->backingStore = 0; + } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) bs->removeStaticWidget(this); -- cgit v0.12 From b52e4ac1dfcce317872d9104142c026951a29145 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 4 Feb 2010 12:49:37 +0100 Subject: My Changelog entries for 4.6.2 --- dist/changes-4.6.2 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 65c07cb..5f3d23c 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -42,6 +42,10 @@ QtCore - QXmlStreamWriter * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QFSFileEngine + * Fix typo that made realpath() not being used + - QIODevice + * Optimized readAll() QtGui ----- @@ -63,8 +67,17 @@ QtDBus QtNetwork --------- - - foo - * bar + - QNetworkAccessManager + * Optimizations + * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed + * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers + * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + - QSslCertificate + * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + - QTcpSocket + * [QTBUG-7344] Fix performance degredation with write() on Windows + * [QTBUG-7316] Also handle unknown errors from socket engine + * [QTBUG-7317] Also handle unknown errors from socket engine QtOpenGL -------- -- cgit v0.12 From 417e269c648fab4ad6e2075014419cc7fad69145 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 4 Feb 2010 12:29:47 +0100 Subject: Fix copy/pasto Reviewed-by: trustme --- src/gui/text/qzipreader_p.h | 2 +- src/gui/text/qzipwriter_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h index 1086464..67a2ace 100644 --- a/src/gui/text/qzipreader_p.h +++ b/src/gui/text/qzipreader_p.h @@ -49,7 +49,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QZipReader class. This header file may change from // version to version without notice, or even be removed. // // We mean it. diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h index 7b97937..9322f4a 100644 --- a/src/gui/text/qzipwriter_p.h +++ b/src/gui/text/qzipwriter_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QZipWriter class. This header file may change from // version to version without notice, or even be removed. // // We mean it. -- cgit v0.12 From bc1638138b71adf056f5972b7b1239f4eeffcfec Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 4 Feb 2010 12:30:18 +0100 Subject: Make sure we define S_IFDIR on Windows Reviewed-by: Thierry Bastian --- src/gui/text/qzip.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index 2fc1940..d30c996 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -54,10 +54,13 @@ #include #if defined(Q_OS_WIN) -#undef S_IFREG -#define S_IFREG 0100000 +# undef S_IFREG +# define S_IFREG 0100000 +# ifndef S_IFDIR +# define S_IFDIR 0040000 +# endif # ifndef S_ISDIR -# define S_ISDIR(x) ((x) & 0040000) > 0 +# define S_ISDIR(x) ((x) & S_IFDIR) > 0 # endif # ifndef S_ISREG # define S_ISREG(x) ((x) & 0170000) == S_IFREG -- cgit v0.12 From db82dda4ae3672844f7637394bf9a403e7c4f4b3 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 4 Feb 2010 13:15:31 +0100 Subject: My changelog for 4.6.2 --- dist/changes-4.6.2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 5f3d23c..0175f1d 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -56,6 +56,8 @@ QtGui * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. + * [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using a QPen + with a style other than SolidLine. QtDBus -- cgit v0.12 From 3c991df1681471cbfb737f6bed0c679e5ca67aa9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 13:58:35 +0100 Subject: uic: Fixed code generating setCentralWidget()-calls of QMainWindow. Regression introduced by QTBUG-5824 change 6809bd020e3307324e136707f32f6f17f77b9591. Do not generate setCentralWidget() for Qt3Support toolbar/dock widget classes. Reviewed-by: ogoffart Task-number: QTBUG-7612 --- src/tools/uic/cpp/cppwriteinitialization.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 8099ffa..dc1d181 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -721,8 +721,9 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n"; } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) { m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n"; - } else { - m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; + } else if (!m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3DockWindow")) + && !m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3ToolBar"))) { + m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; } } -- cgit v0.12 From 551575ae14de1c80712478ba07fd26c7cccec322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 4 Feb 2010 14:15:00 +0100 Subject: My changes for 4.6.2 --- dist/changes-4.6.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 0175f1d..f667c91 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -42,6 +42,12 @@ QtCore - QXmlStreamWriter * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QFile + * Fixed double-buffering issue when opening files in buffered mode. + * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the + same instance had been previously failed. This manisfested itself in + QTemporaryFile failing to auto-remove files and QFile::copy leaving + temporary files behind in certain situations. - QFSFileEngine * Fix typo that made realpath() not being used - QIODevice -- cgit v0.12 From 5160af692fd0352457cdf12cb497e1b8d8eed858 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Feb 2010 14:32:20 +0100 Subject: Doc: Correcting image Changing "Trolltech" to "Nokia" Task-number:QTBUG-7370 Reviewed-by:Trust me --- doc/src/images/qpainter-text.png | Bin 791 -> 1391 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/src/images/qpainter-text.png b/doc/src/images/qpainter-text.png index af7821c..e95c965 100644 Binary files a/doc/src/images/qpainter-text.png and b/doc/src/images/qpainter-text.png differ -- cgit v0.12 From 5ddcf96b8339850d1f84db9f487ac15a1ed3364a Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 4 Feb 2010 14:42:50 +0100 Subject: Added my changes to changes file. --- dist/changes-4.6.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index f667c91..e7c2860 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -59,6 +59,12 @@ QtGui - foo * bar + - QApplication + * [QTBUG-6098] Added a flag to avoid construction of application panes. + - QInputContext + * [QTBUG-7439] Avoided the loss of preedit text when losing focus on Symbian. + + * [QT-2629] Implemented event filter functions for Symbian. * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. -- cgit v0.12 From 38d31452b3cafd738c215b5686bf3ff95c1d27d6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 4 Feb 2010 14:48:11 +0100 Subject: My 4.6.2 changes --- dist/changes-4.6.2 | 63 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index e7c2860..45b7086 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -1,7 +1,7 @@ Qt 4.6.2 is a bug-fix release. It maintains both forward and backward -compatibility (source and binary) with Qt 4.6.0. For more details, -refer to the online documentation included in this distribution. The -documentation is also available online: +compatibility (source and binary) with Qt 4.6.0 and 4.6.1. For more +details, refer to the online documentation included in this +distribution. The documentation is also available online: http://qt.nokia.com/doc/4.6 @@ -40,19 +40,29 @@ Optimizations QtCore ------ - - QXmlStreamWriter - * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QAtomicPointer + * [QTBUG-7356] Fixed a compilation failure when using the Intel + compiler on IA-64 + - QFile * Fixed double-buffering issue when opening files in buffered mode. * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the same instance had been previously failed. This manisfested itself in QTemporaryFile failing to auto-remove files and QFile::copy leaving temporary files behind in certain situations. + - QFSFileEngine * Fix typo that made realpath() not being used + - QIODevice * Optimized readAll() + - QReadWriteLock + * [MR 426] Fixed documentation + + - QXmlStreamWriter + * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + QtGui ----- @@ -72,26 +82,31 @@ QtGui with a style other than SolidLine. + * [MR 2077] Integrated merge request 2077 + QtDBus ------ - - foo - * bar + - QDBusConnection + * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui QtNetwork --------- - QNetworkAccessManager - * Optimizations - * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed - * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers - * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + * Optimizations + * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed + * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers + * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + * [QTBUG-7060] Fixed an issue with parsing of HTTP headers like + "private, max-age=300" + - QSslCertificate - * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + - QTcpSocket - * [QTBUG-7344] Fix performance degredation with write() on Windows - * [QTBUG-7316] Also handle unknown errors from socket engine - * [QTBUG-7317] Also handle unknown errors from socket engine + * [QTBUG-7344] Fix performance degredation with write() on Windows + * [QTBUG-7316,QTBUG-7317] Also handle unknown errors from socket engine QtOpenGL -------- @@ -134,6 +149,15 @@ Qt Plugins - foo * bar +Examples +-------- + + - QtMultimedia + * [MR 418] Fixed the example for QAudioOutput + + - WebKit + * [MR 2235] Added the framecapture example to the default build + Third party components ---------------------- @@ -222,5 +246,12 @@ Qt for Windows CE * Important Behavior Changes * **************************************************************************** - - + - QNetworkAccessManager cache + * QNetworkAccessManager will no longer return expired pages, as + stated in the documentation + * The behaviour of PreferCache and PreferNetwork modes now match + the documentation more closely + - QUrl + * QUrl will now accept hostnames ending in dot and will not treat + those as invalid hostnames -- cgit v0.12 From 63d50974f104f3626fee13c24251b91a6b3d046b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 14:51:59 +0100 Subject: Stabilize tst_QGraphicsWidget::initialShow2 (new test) --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 526486e..a7195c4 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2892,6 +2892,26 @@ void tst_QGraphicsWidget::initialShow2() void polishEvent() { update(); } }; + // Don't let paint events triggered by the windowing system + // influence our test case. We're only interested in knowing + // whether a QGraphicsWidget generates an additional repaint + // on the inital show. Hence create a dummy scenario to find out + // how many repaints we should expect. + QGraphicsScene dummyScene(0, 0, 200, 200); + dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); + + QGraphicsView *dummyView = new QGraphicsView(&dummyScene); + EventSpy paintSpy(dummyView->viewport(), QEvent::Paint); + dummyView->show(); + // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's + // a bug in qt_x11_wait_for_window_manager that prevents this test + // to pass. Denis is looking into it. + QTest::qWait(300); + const int expectedRepaintCount = paintSpy.count(); + delete dummyView; + dummyView = 0; + QTest::qWait(200); + MyGraphicsWidget *widget = new MyGraphicsWidget; widget->resize(100, 100); @@ -2905,7 +2925,7 @@ void tst_QGraphicsWidget::initialShow2() // to pass. Denis is looking into it. QTest::qWait(300); - QCOMPARE(widget->repaints, 1); + QCOMPARE(widget->repaints, expectedRepaintCount); } void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() -- cgit v0.12 From 94abb3ee93aa09f79640e14fed89b286c57ce05c Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 4 Feb 2010 15:57:44 +0200 Subject: Initial support for S60 softkey icons. The logic for resolving the icon size in landscape mode for S60 5.0 (5800XM) is somewhat fragile, but better way is not yet know. Also the 50% transparent mask what CBA implementation tries to create for pressed down CB Abuttons fails for some reason. When button is pressed down there are drawing artifacts in softkey images. These issues will be tried to resolve with later commits Task-number: QTBUG-7314 Review-By: Sami Merila --- src/3rdparty/s60/eiksoftkeyimage.h | 112 +++++++++++++++++++++++++++++++++ src/gui/kernel/qsoftkeymanager_s60.cpp | 89 +++++++++++++++++++------- src/gui/kernel/qsoftkeymanager_s60_p.h | 4 +- 3 files changed, 180 insertions(+), 25 deletions(-) create mode 100644 src/3rdparty/s60/eiksoftkeyimage.h diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h new file mode 100644 index 0000000..84f6108a --- /dev/null +++ b/src/3rdparty/s60/eiksoftkeyimage.h @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Changes cba button's label to image. +* +*/ + +#ifndef EIKSOFTKEYIMAGE_H +#define EIKSOFTKEYIMAGE_H + +// FORWARD DECLARATIONS +class CEikButtonGroupContainer; + +// CLASS DECLARATION + +/** +* Changes cba button's label to image. +* +* @lib EIKCOCTL +* @since 2.0 +*/ +class EikSoftkeyImage + { + public: + + /** + * Set image to cba button by replacing label + * @since 2.0 + * @param aButtonGroupContainer Button container + * @param aImage Image to button, + * Takes Images ownership + * @param aLeft Boolean: left or right button. + * If true, then change left, + * if false, change right + */ + IMPORT_C static void SetImage(CEikButtonGroupContainer* aButtonGroupContainer, CEikImage& aImage, TBool aLeft); + + /** + * Change to cba button image back to label + * @since 2.0 + * @param aButtonGroupContainer Button container + * @param aLeft Boolean: left or right button. + * If true, then change left, + * if false, change right + */ + IMPORT_C static void SetLabel(CEikButtonGroupContainer* aButtonGroupContainer, TBool aLeft); + + private: + + /** + * C++ default constructor. + */ + EikSoftkeyImage() {}; + + + }; + +#endif // EIKSOFTKEYIMAGE_H + +// End of File + diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 67ed8b0..a72d16c 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -49,7 +49,7 @@ #include "private/qsoftkeymanager_p.h" #include "private/qsoftkeymanager_s60_p.h" #include "private/qobject_p.h" -//#include +#include #include #ifndef QT_NO_SOFTKEYMANAGER @@ -64,6 +64,8 @@ QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60() { cachedCbaIconSize[0] = QSize(0,0); cachedCbaIconSize[1] = QSize(0,0); + cachedCbaIconSize[2] = QSize(0,0); + cachedCbaIconSize[3] = QSize(0,0); skipNextUpdate = false; } @@ -149,6 +151,39 @@ void QSoftKeyManagerPrivateS60::setNativeSoftkey(CEikButtonGroupContainer &cba, QT_TRAP_THROWING(cba.SetCommandL(position, command, text)); } +QPoint QSoftKeyManagerPrivateS60::softkeyIconPosition(int position, QSize sourceSize, QSize targetSize) +{ + QPoint iconPosition(0,0); + switch( AknLayoutUtils::CbaLocation() ) + { + case AknLayoutUtils::EAknCbaLocationBottom: + // RSK must be moved to right, LSK in on correct position by default + if (position == RSK_POSITION) + iconPosition.setX(targetSize.width() - sourceSize.width()); + break; + case AknLayoutUtils::EAknCbaLocationRight: + case AknLayoutUtils::EAknCbaLocationLeft: + // Already in correct position + default: + break; + } + + // Align horizontally to center + iconPosition.setY((targetSize.height() - sourceSize.height()) >> 1); + return iconPosition; +} + +QPixmap QSoftKeyManagerPrivateS60::prepareSoftkeyPixmap(QPixmap src, int position, QSize targetSize) +{ + QPixmap target(targetSize); + target.fill(Qt::transparent); + QPainter p; + p.begin(&target); + p.drawPixmap(softkeyIconPosition(position, src.size(), targetSize), src); + p.end(); + return target; +} + bool QSoftKeyManagerPrivateS60::isOrientationLandscape() { // Hard to believe that there is no public API in S60 to @@ -158,15 +193,11 @@ bool QSoftKeyManagerPrivateS60::isOrientationLandscape() QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int position) { - Q_UNUSED(cba); - Q_UNUSED(position); - // Will be implemented when EikSoftkeyImage usage license wise is OK -/* - const int index = isOrientationLandscape() ? 0 : 1; + int index = position; + index += isOrientationLandscape() ? 0 : 1; if(cachedCbaIconSize[index].isNull()) { // Only way I figured out to get CBA icon size without RnD SDK, was - // Only way I figured out to get CBA icon size without RnD SDK, was // to set some dummy icon to CBA first and then ask CBA button CCoeControl::Size() // The returned value is cached to avoid unnecessary icon setting every time. const bool left = (position == LSK_POSITION); @@ -178,38 +209,49 @@ QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int setNativeSoftkey(*cba, position, command, KNullDesC()); cachedCbaIconSize[index] = qt_TSize2QSize(cba->ControlOrNull(command)->Size()); EikSoftkeyImage::SetLabel(cba, left); + + if(cachedCbaIconSize[index] == QSize(138,72)) { + // Hack for S60 5.0 (5800) landscape orientation, which return wrong icon size + cachedCbaIconSize[index] = QSize(60,60); + } } } return cachedCbaIconSize[index]; -*/ - return QSize(); } bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position) { bool ret = false; - Q_UNUSED(cba); - Q_UNUSED(action); - Q_UNUSED(position); - // Will be implemented when EikSoftkeyImage usage license wise is OK - /* const bool left = (position == LSK_POSITION); if(position == LSK_POSITION || position == RSK_POSITION) { QIcon icon = action.icon(); if (!icon.isNull()) { - QPixmap pm = icon.pixmap(cbaIconSize(cba, position)); - pm = pm.scaled(cbaIconSize(cba, position)); - QBitmap mask = pm.mask(); - if (mask.isNull()) { - mask = QBitmap(pm.size()); - mask.fill(Qt::color1); + // Get size of CBA icon area based on button position and orientation + QSize requiredIconSize = cbaIconSize(cba, position); + // Get pixmap out of icon based on preferred size, the aspect ratio is kept + QPixmap pmWihtAspectRatio = icon.pixmap(requiredIconSize); + // Native softkeys require that pixmap size is exactly the same as requiredIconSize + // prepareSoftkeyPixmap creates a new pixmap with requiredIconSize and blits the 'pmWihtAspectRatio' + // to correct location of it + QPixmap softkeyPixmap = prepareSoftkeyPixmap(pmWihtAspectRatio, position, requiredIconSize); + QBitmap softkeyMask = softkeyPixmap.mask(); + if (softkeyMask.isNull()) { + softkeyMask = QBitmap(softkeyPixmap.size()); + softkeyMask.fill(Qt::color1); + } + + // Softkey mask in > SV_S60_5_1 has to be inverted + if(QSysInfo::s60Version() > QSysInfo::SV_S60_5_1) { + QImage maskImage = softkeyMask.toImage(); + maskImage.invertPixels(); + softkeyMask = QPixmap::fromImage(maskImage); } - CFbsBitmap* nBitmap = pm.toSymbianCFbsBitmap(); - CFbsBitmap* nMask = mask.toSymbianCFbsBitmap(); + CFbsBitmap* nBitmap = softkeyPixmap.toSymbianCFbsBitmap(); + CFbsBitmap* nMask = softkeyMask.toSymbianCFbsBitmap(); CEikImage* myimage = new (ELeave) CEikImage; myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered @@ -221,7 +263,6 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, EikSoftkeyImage::SetLabel(cba, left); } } - */ return ret; } @@ -272,6 +313,7 @@ bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) if (windowType != Qt::Dialog && windowType != Qt::Popup) { QString text(QSoftKeyManager::tr("Exit")); TPtrC nativeText = qt_QString2TPtrC(text); + EikSoftkeyImage::SetLabel(&cba, false); setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText); return true; } @@ -303,7 +345,6 @@ void QSoftKeyManagerPrivateS60::setSoftkeys(CEikButtonGroupContainer &cba) void QSoftKeyManagerPrivateS60::updateSoftKeys_sys() { - //bool status = CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog(); if (skipCbaUpdate()) return; diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h index 46e3596..f8bd6d9 100644 --- a/src/gui/kernel/qsoftkeymanager_s60_p.h +++ b/src/gui/kernel/qsoftkeymanager_s60_p.h @@ -84,6 +84,8 @@ private: QAction *highestPrioritySoftkey(QAction::SoftKeyRole role); static bool actionPriorityMoreThan(const QAction* item1, const QAction* item2); void setNativeSoftkey(CEikButtonGroupContainer &cba, TInt position, TInt command, const TDesC& text); + QPoint softkeyIconPosition(int position, QSize sourceSize, QSize targetSize); + QPixmap prepareSoftkeyPixmap(QPixmap src, int position, QSize targetSize); bool isOrientationLandscape(); QSize cbaIconSize(CEikButtonGroupContainer *cba, int position); bool setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position); @@ -95,7 +97,7 @@ private: private: QHash realSoftKeyActions; - QSize cachedCbaIconSize[2]; + QSize cachedCbaIconSize[4]; bool skipNextUpdate; }; -- cgit v0.12 From 56d1da45bc15989542fe3621c9c9de444219729c Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 4 Feb 2010 10:53:05 +0100 Subject: Fix crash when multiple screens are reported from HAL. The support for multiple screens is not implemented yet in Qt on the Symbian platform, so there is really no need to query the HAL for the value since the additional screens can't be used yet anyway. The crash here occured when the HAL returned more than 1 screen, but the arrays were resized to contain one element. The loop in resizeEvent() was iterating past the end of the array because it thought there were more screens than the arrays did. Reviewed-by: axis --- src/gui/kernel/qdesktopwidget_s60.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp index 77745ea..84e3c5d 100644 --- a/src/gui/kernel/qdesktopwidget_s60.cpp +++ b/src/gui/kernel/qdesktopwidget_s60.cpp @@ -88,24 +88,20 @@ QDesktopWidgetPrivate::~QDesktopWidgetPrivate() void QDesktopWidgetPrivate::init(QDesktopWidget *that) { - int screenCount=0; +// int screenCount=0; - if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) - QDesktopWidgetPrivate::screenCount = screenCount; - else - QDesktopWidgetPrivate::screenCount = 0; + // ### TODO: Implement proper multi-display support + QDesktopWidgetPrivate::screenCount = 1; +// if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) +// QDesktopWidgetPrivate::screenCount = screenCount; +// else +// QDesktopWidgetPrivate::screenCount = 0; rects = new QVector(); workrects = new QVector(); rects->resize(QDesktopWidgetPrivate::screenCount); workrects->resize(QDesktopWidgetPrivate::screenCount); - - // ### TODO: Implement proper multi-display support - rects->resize(1); - rects->replace(0, that->rect()); - workrects->resize(1); - workrects->replace(0, that->rect()); } void QDesktopWidgetPrivate::cleanup() -- cgit v0.12 From 91e236022acd79dfbc4aef9e30edb4d1aeb2685c Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 4 Feb 2010 14:15:56 +0100 Subject: Flush the WSERV command buffer after deleting a surface. For graphics systems that use EGL surfaces in the backing store destroying the surface does not guarantee that the memory is immediately freed because this command does not cause a flush. This implies that a manual flush is instead needed. We do this in 2 places; the first is when the surface is destroyed due to a visibility changed. The second case is just after the window has been destroyed. At this point the backing store has already been deleted so the deletion of both the surface and window can happen atomically in WSERV. Task-number: QT-2506 Reviewed-by: Iain --- src/gui/kernel/qapplication_s60.cpp | 3 +++ src/gui/kernel/qwidget_s60.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6caac9f..6e03d7c 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1647,6 +1647,9 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent if (visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible) { delete w->d_func()->topData()->backingStore; w->d_func()->topData()->backingStore = 0; + // In order to ensure that any resources used by the window surface + // are immediately freed, we flush the WSERV command buffer. + S60->wsSession().Flush(); } else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible) && !w->d_func()->maybeBackingStore()) { w->d_func()->topData()->backingStore = new QWidgetBackingStore(w); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 00f2213..0ce7534 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1195,6 +1195,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (destroyWindow) { delete id; + // At this point the backing store should already be destroyed + // so we flush the command buffer to ensure that the freeing of + // those resources and deleting the window can happen "atomically" + S60->wsSession().Flush(); } } -- cgit v0.12 From 392123ef5432643d1047d1e1dd71512ec39d382d Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 3 Feb 2010 13:27:43 +0100 Subject: Fixed bug where GL widget was not fully updated on Vista. There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth --- src/gui/kernel/qapplication_win.cpp | 28 +++++++++++++++++++--------- src/gui/kernel/qwidget.cpp | 2 +- src/gui/kernel/qwidget_p.h | 2 +- src/opengl/qgl_mac.mm | 2 -- src/opengl/qgl_p.h | 4 +++- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 5a4f4e6..d0c986d 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -927,7 +927,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class uint style; bool icon; QString cname; - if (flags & Qt::MSWindowsOwnDC) { + if (qt_widget_private(w)->isGLWidget) { + cname = QLatin1String("QGLWidget"); + style = CS_DBLCLKS; + icon = true; + } else if (flags & Qt::MSWindowsOwnDC) { cname = QLatin1String("QWidgetOwnDC"); style = CS_DBLCLKS; #ifndef Q_OS_WINCE @@ -1011,7 +1015,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class ATOM atom; #ifndef Q_OS_WINCE - HBRUSH bgBrush = (HBRUSH)GetSysColorBrush(COLOR_WINDOW); + HBRUSH bgBrush = qt_widget_private(w)->isGLWidget ? 0 : (HBRUSH)GetSysColorBrush(COLOR_WINDOW); QT_WA({ WNDCLASS wc; wc.style = style; @@ -3626,13 +3630,19 @@ bool QETWidget::translatePaintEvent(const MSG &msg) return true; setAttribute(Qt::WA_PendingUpdate, false); - const QRegion dirtyInBackingStore(qt_dirtyRegion(this)); - // Make sure the invalidated region contains the region we're about to repaint. - // BeginPaint will set the clip to the invalidated region and it is impossible - // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient - // as it may return an invalid context (especially on Windows Vista). - if (!dirtyInBackingStore.isEmpty()) - InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false); + + if (d_func()->isGLWidget) { + if (d_func()->usesDoubleBufferedGLContext) + InvalidateRect(internalWinId(), 0, false); + } else { + const QRegion dirtyInBackingStore(qt_dirtyRegion(this)); + // Make sure the invalidated region contains the region we're about to repaint. + // BeginPaint will set the clip to the invalidated region and it is impossible + // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient + // as it may return an invalid context (especially on Windows Vista). + if (!dirtyInBackingStore.isEmpty()) + InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false); + } PAINTSTRUCT ps; d_func()->hd = BeginPaint(internalWinId(), &ps); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 91e43ce..e8ec3a5 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -183,6 +183,7 @@ QWidgetPrivate::QWidgetPrivate(int version) : ,inDirtyList(0) ,isScrolled(0) ,isMoved(0) + , isGLWidget(0) ,usesDoubleBufferedGLContext(0) #ifdef Q_WS_WIN ,noPaintOnScreen(0) @@ -194,7 +195,6 @@ QWidgetPrivate::QWidgetPrivate(int version) : #endif #ifdef Q_WS_MAC ,needWindowChange(0) - ,isGLWidget(0) #endif ,polished(0) diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 2b09220..ee56bb2 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -537,6 +537,7 @@ public: uint inDirtyList : 1; uint isScrolled : 1; uint isMoved : 1; + uint isGLWidget : 1; uint usesDoubleBufferedGLContext : 1; #ifdef Q_WS_WIN @@ -593,7 +594,6 @@ public: // This is new stuff uint needWindowChange : 1; - uint isGLWidget : 1; #endif #if defined(Q_WS_X11) || defined (Q_WS_WIN) || defined(Q_WS_MAC) diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm index dd9d9ff..3329ff9 100644 --- a/src/opengl/qgl_mac.mm +++ b/src/opengl/qgl_mac.mm @@ -882,8 +882,6 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget) break; current = current->parentWidget(); } - - isGLWidget = 1; } bool QGLWidgetPrivate::renderCxPm(QPixmap*) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 793c4d7..56fe11f 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -160,7 +160,9 @@ public: #if defined(Q_WS_X11) && defined(QT_OPENGL_ES) , eglSurfaceWindowId(0) #endif - {} + { + isGLWidget = 1; + } ~QGLWidgetPrivate() {} -- cgit v0.12 From 9cc4ae77a73bd28ff495f36f26dd87c78b76b976 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 15:08:44 +0200 Subject: Added support for smart installer package generation in Symbian Smart installer packages bundle normal application sis with a bootstrap package that will download a smart installer when the package is installed. Smart installer in turn will download any dependencies of the application that are available on remote server, such as Open C, Qt, and QtWebkit packages, and install them Smart installer packages are generated when DEPLOYMENT.installer_header variable is defined in applicatoin .pro file. This commit is still missing properly signed bootstrap.sis package. Task-number: QTBUG-7908 Reviewed-by: Shane Kearns --- bin/createpackage.pl | 64 ++++++++++++------ demos/embedded/fluidlauncher/fluidlauncher.pro | 2 + doc/src/deployment/deployment.qdoc | 34 ++++++---- doc/src/development/qmake-manual.qdoc | 12 ++++ doc/src/snippets/code/doc_src_deployment.qdoc | 13 ++-- doc/src/snippets/code/doc_src_qmake-manual.qdoc | 10 +-- qmake/generators/symbian/symmake.cpp | 86 ++++++++++++++++++++----- 7 files changed, 160 insertions(+), 61 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 197dffe..460df31 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -64,7 +64,7 @@ sub Usage() { ============================================================================================== Convenience script for creating signed packages you can install on your phone. -Usage: createpackage.pl [options] templatepkg target-platform [certificate key [passphrase]] +Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]] Where supported optiobns are as follows: [-i|install] = Install the package right away using PC suite @@ -72,9 +72,10 @@ Where supported optiobns are as follows: [-c|certfile=] = The file containing certificate information for signing. The file can have several certificates, each specified in separate line. The certificate, key and passphrase in line - must be ';' separated. Lines starting with '#' are treated - as a comments. Also empty lines are ignored. The paths in + must be ';' separated. Lines starting with '#' are treated + as a comments. Also empty lines are ignored. The paths in can be absolute or relative to . + [-u|unsigned] = Preserves the unsigned package Where parameters are as follows: templatepkg = Name of .pkg file template target = Either debug or release @@ -86,10 +87,10 @@ Where parameters are as follows: Example: createpackage.pl fluidlauncher_template.pkg release-armv5 - + Example with certfile: createpackage.pl -c=mycerts.txt fluidlauncher_template.pkg release-armv5 - + Content of 'mycerts.txt' must be something like this: # This is comment line, also the empty lines are ignored rd.cer;rd-key.pem @@ -109,8 +110,12 @@ ENDUSAGESTRING my $install = ""; my $preprocessonly = ""; my $certfile = ""; +my $preserveUnsigned = ""; -unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile)){ +unless (GetOptions('i|install' => \$install, + 'p|preprocess' => \$preprocessonly, + 'c|certfile=s' => \$certfile, + 'u|unsigned' => \$preserveUnsigned,)){ Usage(); } @@ -134,7 +139,12 @@ my $passphrase = $ARGV[4]; # Generate output pkg basename (i.e. file name without extension) my $pkgoutputbasename = $templatepkg; -$pkgoutputbasename =~ s/_template\.pkg/_$targetplatform/g; +my $preservePkgOutput = ""; +$pkgoutputbasename =~ s/_template/_$targetplatform/g; +if ($pkgoutputbasename eq $templatepkg) { + $preservePkgOutput = "1"; +} +$pkgoutputbasename =~ s/\.pkg//g; $pkgoutputbasename = lc($pkgoutputbasename); # Store output file names to variables @@ -150,12 +160,20 @@ $certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash $certpath =~ s-/-\\-go; # for those working with UNIX shells $certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy -# Check some pre-conditions and print error messages if needed -unless (length($templatepkg) && length($platform) && length($target)) { - print "\nError: Template PKG filename, platform or target is not defined!\n"; +# Check some pre-conditions and print error messages if needed. +unless (length($templatepkg)) { + print "\nError: Template PKG filename is not defined!\n"; Usage(); } +# If the pkg file is not actually a template, there is no need for plaform or target. +if ($templatepkg =~ m/_template\.pkg/i) { + unless (length($platform) && length($target)) { + print "\nError: Platform or target is not defined!\n"; + Usage(); + } +} + # Check template exist stat($templatepkg); unless( -e _ ) { @@ -192,18 +210,18 @@ if (length($certfile)) { next if /^(\s)*$/; # skip blank lines chomp; # remove trailing newline characters my @certinfo = split(';', $_); # split row to certinfo - + # Trim spaces for(@certinfo) { s/^\s+//; s/\s+$//; - } - + } + # Do some validation - unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) { + unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) { print "\nError: $certfile line '$_' does not contain valid information!\n"; - Usage(); - } + Usage(); + } push @certificates, [@certinfo]; # push data to two dimensional array } @@ -212,7 +230,9 @@ if (length($certfile)) { # Remove any existing .sis packages unlink $unsigned_sis_name; unlink $signed_sis_name; -unlink $pkgoutput; +if (!$preservePkgOutput) { + unlink $pkgoutput; +} # Preprocess PKG local $/; @@ -254,10 +274,14 @@ if( -e _ ) { system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); } - + # remove temporary pkg and unsigned sis - unlink $pkgoutput; - unlink $unsigned_sis_name; + if (!$preservePkgOutput) { + unlink $pkgoutput; + } + if (!$preserveUnsigned) { + unlink $unsigned_sis_name; + } # Install the sis if requested if ($install) { diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index 92d6e1e..f71388c 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -213,5 +213,7 @@ symbian { DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \ mifs desktopservices_music desktopservices_images fluidbackup + DEPLOYMENT.installer_header = 0xA000D7CD + TARGET.EPOCHEAPSIZE = 100000 20000000 } diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 8ba106c..575a6dc 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1573,18 +1573,13 @@ By default \c .pkg file generated by \c qmake adds support for all S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices. - As a last step we will embed the \c qt_installer.sis file to the Wiggly - deployment file: + As a last step we will instruct qmake to generate smart installer \c .pkg file by defining + the UID of the installation package. The UID needs to be different than the application UID, + and should be reserved via normal Symbian mechanisms. You can use a random UID starting with + \c 0xE for testing purposes: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 - When \c qt_installer.sis is embedded to the application deployment file, the - end-user does not need to download and install all dependencies separately. - The drawback of \c .sis embedding is that the application \c .sis file size becomes - big. To address these problems Forum Nokia is planning to release a smart installer - which will take care of downloading and installing the necessary dependencies - over-the-air. The expected availability of smart installer is 1Q 2010. - Now we are ready to compile the application and create the application deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss) and deployment packaging files (\c .pkg). And do build to create the @@ -1593,13 +1588,26 @@ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 If everything compiled and linked without any errors, we are now ready to create - an application installation file: + an application package (\c wiggly.sis): \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60 - If all binaries and dependencies were found, we should now have a self-signed - \c wiggly_release-gcce.sis ready to be installed on a device. For more information - about creating a \c .sis file and installing it to device see also + Now you can create the smart installer package for the application: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 61 + + If all binaries and dependencies were found, you should now have a self signed + \c wiggly_installer.sis ready to be installed on a device. The smart installer + contained in the in the installer package will download the necessary dependencies + such as Qt libraries to the device. + + \note If you want to have your application properly Symbian Signed for distribution, + you will have to properly sign both the application and the application installer packages. + Please see + \l{http://developer.symbian.org/wiki/index.php/Category:Symbian_Signed} + {Symbian Signed wiki} for more information about Symbian Signed. + + For more information about creating a \c .sis file and installing it to device see also \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}. */ diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d7aa0db..49e1e71 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1431,6 +1431,18 @@ is the application private directory on the drive it is installed to. \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 141 + On the Symbian platform, you can use \c{DEPLOYMENT.installer_header} + variable to generate smart installer wrapper for your application. + If you specify just UID of the installer package as the value, then + installer package name and version will be autogenerated: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146 + + If autogenerated values are not suitable, you can also specify the sis + header yourself using this variable: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 147 + \target DEPLOYMENT_PLUGIN \section1 DEPLOYMENT_PLUGIN diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index 7eb8808..9c00681 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -475,11 +475,7 @@ default_deployment.pkg_prerules += supported_platforms //! [57] //! [58] -embedded_deployments = \ - "; Embed Qt dependencies" \ - "@\"$$[QT_INSTALL_PREFIX]/qt_installer.sis\",(0x2001E62D)" - -default_deployment.pkg_prerules += embedded_deployments +DEPLOYMENT.installer_header = 0xE2345678 //! [58] //! [59] @@ -489,4 +485,9 @@ make release-gcce //! [60] make sis -//! [60] \ No newline at end of file +ren wiggly_release-gcce.sis wiggly.sis +//! [60] + +//! [61] +createpackage wiggly_installer.pkg +//! [61] \ No newline at end of file diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index b1cbc72..a48b53f 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -963,9 +963,9 @@ RSS_RULES += myrssrules //! [145] //! [146] -BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "rom/my.iby APP_LAYER_PUBLIC_EXPORT_PATH(my.iby)" \ - "inc/myheader.h mycomp/myheader.h" \ - ":zip my_api.zip my_api" +DEPLOYMENT.installer_header = 0x12345678 //! [146] + +//! [147] +DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"My Application Installer\"},(0x12345678),1,0,0" +//! [147] diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 8f712d8..8f0abf4 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -292,12 +292,23 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme } generatedFiles << pkgFile.fileName(); + QTextStream t(&pkgFile); + + QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); + QString wrapperStreamBuffer; + QTextStream tw(&wrapperStreamBuffer); + + QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate); // Header info - QTextStream t(&pkgFile); - t << QString("; %1 generated by qmake at %2").arg(pkgFilename).arg(QDateTime::currentDateTime().toString(Qt::ISODate)) << endl; - t << "; This file is generated by qmake and should not be modified by the user" << endl; - t << ";" << endl << endl; + QString wrapperPkgFilename = QString("%1_installer.%2") + .arg(fixedTarget) + .arg("pkg"); + QString headerComment = "; %1 generated by qmake at %2\n" + "; This file is generated by qmake and should not be modified by the user\n" + ";\n\n"; + t << headerComment.arg(pkgFilename).arg(dateStr); + tw << headerComment.arg(wrapperPkgFilename).arg(dateStr); // Construct QStringList from pkg_prerules since we need search it before printed to file QStringList rawPkgPreRules; @@ -320,8 +331,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme if (!containsStartWithItem('&', rawPkgPreRules)) { // language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS) - t << "; Language" << endl; - t << "&EN" << endl << endl; + QString languageCode = "; Language\n&EN\n\n"; + t << languageCode; + tw << languageCode; } else { // In case user defines langs, he must take care also about SIS header if (!containsStartWithItem('#', rawPkgPreRules)) @@ -330,34 +342,51 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme // name of application, UID and version QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ','); + QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; + QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET"))); + visualTarget = removePathSeparators(visualTarget); + QString wrapperTarget = visualTarget + " installer"; - if (!containsStartWithItem('#', rawPkgPreRules)) { - QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET"))); - visualTarget = removePathSeparators(visualTarget); + if (installerSisHeader.startsWith("0x", Qt::CaseInsensitive)) { + tw << sisHeader.arg(wrapperTarget).arg(installerSisHeader).arg(applicationVersion); + } else { + tw << installerSisHeader << endl; + } - t << "; SIS header: name, uid, version" << endl; - t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl; + if (!containsStartWithItem('#', rawPkgPreRules)) { + t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); } // Localized vendor name + QString vendorName; if (!containsStartWithItem('%', rawPkgPreRules)) { - t << "; Localised Vendor name" << endl; - t << "%{\"Vendor\"}" << endl << endl; + vendorName += "; Localised Vendor name\n%{\"Vendor\"}\n\n"; } // Unique vendor name if (!containsStartWithItem(':', rawPkgPreRules)) { - t << "; Unique Vendor name" << endl; - t << ":\"Vendor\"" << endl << endl; + vendorName += "; Unique Vendor name\n:\"Vendor\"\n\n"; } + t << vendorName; + tw << vendorName; + // PKG pre-rules - these are added before actual file installations i.e. SIS package body if (rawPkgPreRules.size()) { - t << "; Manual PKG pre-rules from PRO files" << endl; + QString comment = "\n; Manual PKG pre-rules from PRO files\n"; + t << comment; + tw << comment; + foreach(QString item, rawPkgPreRules) { + // Only regular pkg file should have package dependencies or pkg header if that is + // defined using prerules. + if (!item.startsWith("(") && !item.startsWith("#")) { + tw << item << endl; + } t << item << endl; } t << endl; + tw << endl; } // Begin Manufacturer block @@ -380,7 +409,6 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)") .arg(epocRoot()); - if (targetType == TypeExe) { // deploy .exe file t << "; Executable and default resource files" << endl; @@ -469,6 +497,30 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme << " - \"\", FILETEXT, TEXTEXIT" << endl << "ENDIF ; MANUFACTURER" << endl; } + + // Write wrapper pkg + if (!installerSisHeader.isEmpty()) { + QFile wrapperPkgFile(wrapperPkgFilename); + if (!wrapperPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { + PRINT_FILE_CREATE_ERROR(wrapperPkgFilename); + return; + } + + generatedFiles << wrapperPkgFile.fileName(); + QTextStream twf(&wrapperPkgFile); + + twf << wrapperStreamBuffer << endl; + + // Wrapped files deployment + QString currentPath = qmake_getpwd(); + QString sisName = QString("%1.sis").arg(fixedTarget); + twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; + + QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); + bootStrapPath.append("/src/s60installs/bootstrap.sis"); + QFileInfo fi(fileInfo(bootStrapPath)); + twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; + } } bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStringList& src) -- cgit v0.12 From 030c620e9f3f4e86b77a69e77a604a0c1e946229 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 4 Feb 2010 13:30:13 +0100 Subject: Improved QTest::qWaitForWindowShown on X11. The function is supposed to wait until the window has been managed by the window manager on X11 - i.e. it has been reparented to a frame, mapped and received at least one Expose event after that. Reviewed-by: Olivier Goffart --- src/gui/kernel/qwidget_x11.cpp | 75 +++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 4684bc1..007de7f 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -346,11 +346,6 @@ Q_GUI_EXPORT void qt_x11_enforce_cursor(QWidget * w) qt_x11_enforce_cursor(w, false); } -static Bool checkForConfigureAndExpose(Display *, XEvent *e, XPointer) -{ - return e->type == ConfigureNotify || e->type == Expose; -} - Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) { if (!w || (!w->isWindow() && !w->internalWinId())) @@ -363,38 +358,58 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) if (!w->testAttribute(Qt::WA_WState_Created)) return; - if (!(w->windowFlags() & Qt::X11BypassWindowManagerHint)) { - // if the window is not override-redirect, then the window manager - // will reparent us to the frame decoration window. - while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), ReparentNotify, &ev)) { - if (t.elapsed() > maximumWaitTime) - return; - qApp->syncX(); // non-busy wait - } - } + // first deliver events that are already in the local queue + QApplication::sendPostedEvents(); - while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), MapNotify, &ev)) { - if (t.elapsed() > maximumWaitTime) - return; - qApp->syncX(); // non-busy wait - } + // the normal sequence is: + // ... ConfigureNotify ... ReparentNotify ... MapNotify ... Expose + // with X11BypassWindowManagerHint: + // ConfigureNotify ... MapNotify ... Expose - qApp->x11ProcessEvent(&ev); + enum State { + Initial, Reparented, Mapped + } state = Initial; - // ok, seems like the window manager successfully reparented us, we'll wait - // for the first paint event to arrive, while handling ConfigureNotify in - // the arrival order - while(1) - { - if (XCheckIfEvent(X11->display, &ev, checkForConfigureAndExpose, 0)) { + do { + if (XEventsQueued(X11->display, QueuedAlready)) { + XNextEvent(X11->display, &ev); qApp->x11ProcessEvent(&ev); - if (ev.type == Expose) - return; + + if (w->windowFlags() & Qt::X11BypassWindowManagerHint) { + switch (state) { + case Initial: + case Reparented: + if (ev.type == MapNotify) + state = Mapped; + break; + case Mapped: + if (ev.type == Expose) + return; + break; + } + } else { + switch (state) { + case Initial: + if (ev.type == ReparentNotify) + state = Reparented; + break; + case Reparented: + if (ev.type == MapNotify) + state = Mapped; + break; + case Mapped: + if (ev.type == Expose) + return; + break; + } + } + } else { + if (!XEventsQueued(X11->display, QueuedAfterFlush)) + qApp->syncX(); // non-busy wait } if (t.elapsed() > maximumWaitTime) return; - qApp->syncX(); // non-busy wait - } + } while(1); } void qt_change_net_wm_state(const QWidget* w, bool set, Atom one, Atom two = 0) -- cgit v0.12 From 555d5b7a87b8c3a2f207c93c7eda30892de5ecc6 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 4 Feb 2010 13:55:36 +0100 Subject: Changed qgraphicswidget autotest to use qWaitForWindowShown. Make use of (yet another time) improved QTest::qWaitForWindowShown. Reviewed-by: trustme --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index a7195c4..2bf1521 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2919,11 +2919,9 @@ void tst_QGraphicsWidget::initialShow2() scene.addItem(widget); QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); view.show(); - // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's - // a bug in qt_x11_wait_for_window_manager that prevents this test - // to pass. Denis is looking into it. - QTest::qWait(300); + QTest::qWaitForWindowShown(&view); QCOMPARE(widget->repaints, expectedRepaintCount); } -- cgit v0.12 From f3bd6565674f163b058bc235670d45631ce559ee Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 4 Feb 2010 16:14:00 +0100 Subject: Another fix for the non unified title+toolbar regarding text under icons This makes the case where there is text under the icons in toolbuttons and the title and toolbar is not unified on Mac. This was a regression against Qt 4.5.x Reviewed-by: jbache --- src/gui/styles/qmacstyle_mac.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index aab16cb..78074c7 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3380,8 +3380,14 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) { needText = true; if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - pr.setHeight(pixmap.size().height()); - cr.adjust(0, pr.bottom() + 1, 0, 1); + QMainWindow *mw = qobject_cast(w->window()); + if (mw && mw->unifiedTitleAndToolBarOnMac()) { + pr.setHeight(pixmap.size().height()); + cr.adjust(0, pr.bottom() + 1, 0, 1); + } else { + pr.setHeight(pixmap.size().height() + 6); + cr.adjust(0, pr.bottom(), 0, -3); + } alignment |= Qt::AlignCenter; } else { pr.setWidth(pixmap.width() + 8); -- cgit v0.12 From 07d81d0e0f15f015c7436992a99ef4b1ec36ae1c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 18:04:43 +0200 Subject: Fixed the location where bootstrap.sis is looked for. Task-number: QTBUG-7908 Reviewed-by: TrustMe --- qmake/generators/symbian/symmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 8f0abf4..6c44f0b 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -517,7 +517,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); - bootStrapPath.append("/src/s60installs/bootstrap.sis"); + bootStrapPath.append("/bootstrap.sis"); QFileInfo fi(fileInfo(bootStrapPath)); twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; } -- cgit v0.12 From 96a169ac3f235433906d58ac0e4c613f51c21bf3 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 18:16:43 +0200 Subject: My changes for 4.6.2 Reviewed-by: TrustMe --- dist/changes-4.6.2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 00509ed..f5e4e57 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -164,6 +164,24 @@ Qt for Windows CE - +Qt for Symbian +-------------- + +- QProcess + * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished. + +- qmake + * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated + pkg files. + * [QTBUG-7908] Smart installer package generation support + +- Patch_capabilities script + * Added support for embedded sis name/uid patching. + +- Qt deployment + * [QTBUG-7518] Backup and restore support for Qt libs + + **************************************************************************** * Tools * **************************************************************************** -- cgit v0.12 From 39bbc477e418d4d34c2f44fd10e76950a1ae781d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 17:44:14 +0100 Subject: Cleanup after "QGraphicsWidget is painted twice on the first show" Commit: dda8a57c085216db609f822837c50bae38006b4e We don't want to reset 'updateAll' at that point, for the same reason as mentioned in the above commit. More details in the task. Task-number: QTBUG-6956 --- src/gui/graphicsview/qgraphicsview.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 451f183..96b9373 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -2748,7 +2748,6 @@ bool QGraphicsView::viewportEvent(QEvent *event) } } } - d->scene->d_func()->updateAll = false; } break; case QEvent::TouchBegin: -- cgit v0.12 From e2f439d8ff3529d9ef50ac58da61432627a8f350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 17:54:24 +0100 Subject: Cleanup after "Changed qgraphicswidget autotest to use qWaitForWindowShown" Commit: 555d5b7a87b8c3a2f207c93c7eda30892de5ecc6 We also have to do the same for the "dummyView". --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 2bf1521..00bf144 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2901,12 +2901,10 @@ void tst_QGraphicsWidget::initialShow2() dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); QGraphicsView *dummyView = new QGraphicsView(&dummyScene); + dummyView->setWindowFlags(Qt::X11BypassWindowManagerHint); EventSpy paintSpy(dummyView->viewport(), QEvent::Paint); dummyView->show(); - // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's - // a bug in qt_x11_wait_for_window_manager that prevents this test - // to pass. Denis is looking into it. - QTest::qWait(300); + QTest::qWaitForWindowShown(dummyView); const int expectedRepaintCount = paintSpy.count(); delete dummyView; dummyView = 0; -- cgit v0.12 From c8b9acf8abc26e71529b8f5ed6402e70a03b9ac8 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Fri, 5 Feb 2010 10:20:23 +1000 Subject: Make sure include for QAudio namespace is created Task-number: QTBUG-7891 Reviewed-by: Kurt Korbatits --- bin/syncqt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/syncqt b/bin/syncqt index 1fb5304..db6dce6 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -194,6 +194,8 @@ sub classNames { push @ret, "QtConcurrentFilter" } elsif(basename($iheader) eq "qtconcurrentrun.h") { push @ret, "QtConcurrentRun" + } elsif(basename($iheader) eq "qaudio.h") { + push @ret, "QAudio" } my $parsable = ""; -- cgit v0.12 From f92253080a73a60a3d6ce8343b94788334ce9a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 4 Feb 2010 11:05:39 +0100 Subject: Compile. --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index b5888b4..9e7517f 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -569,7 +569,7 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) void qt_mac_set_needs_display(QWidget *widget, QRegion region) { NSView *theNSView = qt_mac_nativeview_for(widget); - if (region.isNull()) { + if (region.isEmpty()) { [theNSView setNeedsDisplay:YES]; return; } -- cgit v0.12 From bd36d753337090a2878fc0ca4117e2250c5ae1b7 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Fri, 5 Feb 2010 09:34:48 +0100 Subject: Fixing 'softvfp+vfpv2' compiling issue for Tb9.2 When compiling with -fpu=softvfp+vfpv2 on Tb9.2 we were getting the segmentattion fault. This seems to be due to the RVCT bug when it comes to using int->float (and reverse) castings. One extra level of indirection (function call) has to be applied. Task-number: QTBUG-4893 Reviewed-by: TrustMe --- src/gui/painting/qdrawhelper.cpp | 4 ++++ src/gui/painting/qmath_p.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 194dda3..660a2a8 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -2408,7 +2408,11 @@ static inline int soft_light_op(int dst, int src, int da, int sa) else if (4 * dst <= da) return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; else { +# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 + return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; +# else return (dst * sa * 255 + da * (src2 - sa) * (int(sqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; +# endif } } diff --git a/src/gui/painting/qmath_p.h b/src/gui/painting/qmath_p.h index cd9f5ea..8a5f5ab 100644 --- a/src/gui/painting/qmath_p.h +++ b/src/gui/painting/qmath_p.h @@ -54,6 +54,7 @@ // #include +#include QT_BEGIN_NAMESPACE @@ -61,6 +62,11 @@ static const qreal Q_PI = qreal(3.14159265358979323846); // pi static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2 +inline int qIntSqrtInt(int v) +{ + return static_cast(qSqrt(static_cast(v))); +} + QT_END_NAMESPACE #endif // QMATH_P_H -- cgit v0.12 From 3baf7b981a8f40ed13c2ffb62d2188a16005f69c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 5 Feb 2010 09:48:22 +0100 Subject: fix regression from Qt 4.5 wrt missing text pixels in QTabBar The line spacing fix showed a bug in QCommonStylePrivate::tabLayout. Since QFontMetrics::height() now usually returns one pixel less than in Qt 4.5, the tab bar is one pixel smaller. Squeezing the tab rect vertically can result in missing pixels. This depends on anti-aliasing settings and font size. The new behaviour in tabLayout is now: If we have to shift the tab rect, then we move its position instead of changing its height. Task-number: QTBUG-7137 Reviewed-by: jbache --- src/gui/styles/qcommonstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 74d3ec3..b1924e7 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1149,10 +1149,10 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth) verticalShift = -verticalShift; - tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding); + tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding); bool selected = opt->state & QStyle::State_Selected; if (selected) { - tr.setBottom(tr.bottom() - verticalShift); + tr.setTop(tr.top() - verticalShift); tr.setRight(tr.right() - horizontalShift); } -- cgit v0.12 From 79fb890a4f2a13cc0f21e92f5b2a6e10af1430b4 Mon Sep 17 00:00:00 2001 From: Samuel Nevala Date: Fri, 5 Feb 2010 09:51:00 +0200 Subject: s60 application loses normalGeometry when returning from fullscreen Problem description: normalGeomerty lost during showFullScreen 1. Reported problen was due on void QSymbianControl::PositionChanged() over write top->normaGeometry on every position change. As fix top->normalGeometry is moved to new rect:s top left only when widget windowState == 0. 2. Also made some new qwidget auto tests. Refactored s60 side setWindowState to be more readable. Minimized window state now hides window decoration. QApplication & QWidget autotest run on emulator and tested on s60 5.0 hw using attached application. http://bugreports.qt.nokia.com/browse/QTBUG-6231 Task-number:QTBUG-6231 Merge-request: 2256 Reviewed-by: Jani Hautakangas --- src/gui/kernel/qapplication_s60.cpp | 17 ++- src/gui/kernel/qwidget_s60.cpp | 108 +++++------------ tests/auto/qwidget/tst_qwidget.cpp | 224 ++++++++++++++++++++++++++++++++++++ 3 files changed, 262 insertions(+), 87 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6e03d7c..4a137ee 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -924,8 +924,8 @@ void QSymbianControl::PositionChanged() cr.moveTopLeft(newPos); qwidget->data->crect = cr; QTLWExtra *top = qwidget->d_func()->maybeTopData(); - if (top) - top->normalGeometry = cr; + if (top && (qwidget->windowState() & (~Qt::WindowActive)) == Qt::WindowNoState) + top->normalGeometry.moveTopLeft(newPos); if (qwidget->isVisible()) { QMoveEvent e(newPos, oldPos); qt_sendSpontaneousEvent(qwidget, &e); @@ -960,15 +960,14 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) qwidget->d_func()->setWindowIcon_sys(true); qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); #ifdef Q_WS_S60 - // If widget is fullscreen, hide status pane and button container - // otherwise show them. + // If widget is fullscreen/minimized, hide status pane and button container otherwise show them. CEikStatusPane* statusPane = S60->statusPane(); CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); - bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen; - if (statusPane && (bool)statusPane->IsVisible() == isFullscreen) - statusPane->MakeVisible(!isFullscreen); - if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen) - buttonGroup->MakeVisible(!isFullscreen); + TBool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized)); + if (statusPane) + statusPane->MakeVisible(visible); + if (buttonGroup) + buttonGroup->MakeVisible(visible); #endif } else if (QApplication::activeWindow() == qwidget->window()) { if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) { diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 0ce7534..c84e1cc 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1046,96 +1046,48 @@ void QWidget::setWindowState(Qt::WindowStates newstate) return; if (isWindow()) { -#ifdef Q_WS_S60 - // Change window decoration visibility if switching to or from fullsccreen - // In addition decoration visibility is changed when the initial has been - // WindowNoState. - // The window decoration visibility has to be changed before doing actual - // window state change since in that order the availableGeometry will return - // directly the right size and we will avoid unnecessarty redraws - if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen) || - oldstate == Qt::WindowNoState) { - CEikStatusPane* statusPane = S60->statusPane(); - CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); - if (newstate & Qt::WindowFullScreen) { - if (statusPane) - statusPane->MakeVisible(false); - if (buttonGroup) - buttonGroup->MakeVisible(false); - } else { - if (statusPane) - statusPane->MakeVisible(true); - if (buttonGroup) - buttonGroup->MakeVisible(true); - } + QSymbianControl *window = static_cast(effectiveWinId()); + if (window && newstate & Qt::WindowMinimized) { + window->setFocusSafely(false); + window->MakeVisible(false); + } else if (window && oldstate & Qt::WindowMinimized) { + window->setFocusSafely(true); + window->MakeVisible(true); } + +#ifdef Q_WS_S60 + // Hide window decoration when switching to fullsccreen / minimized otherwise show decoration. + // The window decoration visibility has to be changed before doing actual window state + // change since in that order the availableGeometry will return directly the right size and + // we will avoid unnecessarty redraws + CEikStatusPane* statusPane = S60->statusPane(); + CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); + TBool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized)); + if (statusPane) + statusPane->MakeVisible(visible); + if (buttonGroup) + buttonGroup->MakeVisible(visible); #endif // Q_WS_S60 createWinId(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); - QTLWExtra *top = d->topData(); - // Ensure the initial size is valid, since we store it as normalGeometry below. if (!testAttribute(Qt::WA_Resized) && !isVisible()) adjustSize(); - if ((oldstate & Qt::WindowMaximized) != (newstate & Qt::WindowMaximized)) { - if ((newstate & Qt::WindowMaximized)) { - const QRect normalGeometry = geometry(); + QTLWExtra *top = d->topData(); + const QRect normalGeometry = (top->normalGeometry.width() < 0) ? geometry() : top->normalGeometry; - const QRect r = top->normalGeometry; - setGeometry(qApp->desktop()->availableGeometry(this)); - top->normalGeometry = r; + if (newstate & Qt::WindowFullScreen) + setGeometry(qApp->desktop()->screenGeometry(this)); + else if (newstate & Qt::WindowMaximized) + setGeometry(qApp->desktop()->availableGeometry(this)); + else + setGeometry(normalGeometry); - if (top->normalGeometry.width() < 0) - top->normalGeometry = normalGeometry; - } else { - // restore original geometry - setGeometry(top->normalGeometry); - } - } - if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen)) { - if (newstate & Qt::WindowFullScreen) { - const QRect normalGeometry = geometry(); - const QRect r = top->normalGeometry; - setGeometry(qApp->desktop()->screenGeometry(this)); - - top->normalGeometry = r; - if (top->normalGeometry.width() < 0) - top->normalGeometry = normalGeometry; - } else { - if (newstate & Qt::WindowMaximized) { - const QRect r = top->normalGeometry; - setGeometry(qApp->desktop()->availableGeometry(this)); - top->normalGeometry = r; - } else { - setGeometry(top->normalGeometry); - } - } - } - if ((oldstate & Qt::WindowMinimized) != (newstate & Qt::WindowMinimized)) { - if (newstate & Qt::WindowMinimized) { - if (isVisible()) { - QSymbianControl *id = static_cast(effectiveWinId()); - if (id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->setFocusSafely(false); - id->MakeVisible(false); - } - } else { - if (isVisible()) { - QSymbianControl *id = static_cast(effectiveWinId()); - id->MakeVisible(true); - if (!id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->setFocusSafely(true); - } - const QRect normalGeometry = geometry(); - const QRect r = top->normalGeometry; - top->normalGeometry = r; - if (top->normalGeometry.width() < 0) - top->normalGeometry = normalGeometry; - } - } + //restore normal geometry + top->normalGeometry = normalGeometry; } data->window_state = newstate; diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ea90ae3..88bdc72 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -391,6 +391,10 @@ private slots: #ifdef Q_OS_SYMBIAN void cbaVisibility(); + void fullScreenWindowModeTransitions(); + void maximizedWindowModeTransitions(); + void minimizedWindowModeTransitions(); + void normalWindowModeTransitions(); #endif void focusProxyAndInputMethods(); @@ -9687,6 +9691,226 @@ void tst_QWidget::cbaVisibility() CEikButtonGroupContainer* buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); QVERIFY(buttonGroup->IsVisible()); } + +void tst_QWidget::fullScreenWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMinimized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + //Exit + widget.showFullScreen(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} + +void tst_QWidget::maximizedWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + //Exit + widget.showMaximized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMaximized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showMinimized(); + // Since showMinimized hides window decoration availableGeometry gives different value + // than with decoration visible. Altual size does not really matter since widget is invisible. + QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} + +void tst_QWidget::minimizedWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showMinimized(); + // Since showMinimized hides window decoration availableGeometry gives different value + // than with decoration visible. Altual size does not really matter since widget is invisible. + QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + //Exit + widget.showMinimized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMinimized(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); +} + +void tst_QWidget::normalWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showMaximized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + //Exit + widget.showNormal(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showNormal(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showNormal(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} #endif class InputContextTester : public QInputContext -- cgit v0.12 From fd12fbcf332878ab6a5b6ef8f09804b8598faced Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 5 Feb 2010 12:29:08 +0200 Subject: Whitespace/tab fixes. Reviewed-by: Trust me --- src/gui/kernel/qwidget_s60.cpp | 2 +- tests/auto/qwidget/tst_qwidget.cpp | 90 +++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index c84e1cc..a844430 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1083,7 +1083,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) setGeometry(qApp->desktop()->screenGeometry(this)); else if (newstate & Qt::WindowMaximized) setGeometry(qApp->desktop()->availableGeometry(this)); - else + else setGeometry(normalGeometry); //restore normal geometry diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 88bdc72..80b693c 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9700,50 +9700,50 @@ void tst_QWidget::fullScreenWindowModeTransitions() layout->addWidget(button); widget.setLayout(layout); widget.show(); - + const QRect normalGeometry = widget.normalGeometry(); const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); - - //Enter + + //Enter widget.showNormal(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - + QVERIFY(!statusPane->IsVisible()); + widget.showMaximized(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - + QVERIFY(!statusPane->IsVisible()); + widget.showMinimized(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - - //Exit + QVERIFY(!statusPane->IsVisible()); + + //Exit widget.showFullScreen(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); widget.showFullScreen(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); widget.showFullScreen(); widget.showMinimized(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); } void tst_QWidget::maximizedWindowModeTransitions() @@ -9760,38 +9760,38 @@ void tst_QWidget::maximizedWindowModeTransitions() const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); - + //Enter widget.showNormal(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + widget.showFullScreen(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + widget.showMinimized(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + //Exit widget.showMaximized(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); widget.showMaximized(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); widget.showMaximized(); widget.showMinimized(); @@ -9799,7 +9799,7 @@ void tst_QWidget::maximizedWindowModeTransitions() // than with decoration visible. Altual size does not really matter since widget is invisible. QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); } void tst_QWidget::minimizedWindowModeTransitions() @@ -9810,52 +9810,52 @@ void tst_QWidget::minimizedWindowModeTransitions() layout->addWidget(button); widget.setLayout(layout); widget.show(); - + const QRect normalGeometry = widget.normalGeometry(); const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); - + //Enter widget.showNormal(); widget.showMinimized(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - + QVERIFY(!statusPane->IsVisible()); + widget.showFullScreen(); widget.showMinimized(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - + QVERIFY(!statusPane->IsVisible()); + widget.showMaximized(); widget.showMinimized(); // Since showMinimized hides window decoration availableGeometry gives different value // than with decoration visible. Altual size does not really matter since widget is invisible. QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); //Exit widget.showMinimized(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); widget.showMinimized(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); widget.showMinimized(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); } void tst_QWidget::normalWindowModeTransitions() @@ -9866,50 +9866,50 @@ void tst_QWidget::normalWindowModeTransitions() layout->addWidget(button); widget.setLayout(layout); widget.show(); - + const QRect normalGeometry = widget.normalGeometry(); const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); - + //Enter widget.showMaximized(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + widget.showFullScreen(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + widget.showMinimized(); widget.showNormal(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); - + QVERIFY(statusPane->IsVisible()); + //Exit widget.showNormal(); widget.showMaximized(); QCOMPARE(widget.geometry(), maximumScreenGeometry); QVERIFY(buttonGroup->IsVisible()); - QVERIFY(statusPane->IsVisible()); + QVERIFY(statusPane->IsVisible()); widget.showNormal(); widget.showFullScreen(); QCOMPARE(widget.geometry(), fullScreenGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); - + QVERIFY(!statusPane->IsVisible()); + widget.showNormal(); widget.showMinimized(); QCOMPARE(widget.geometry(), normalGeometry); QVERIFY(!buttonGroup->IsVisible()); - QVERIFY(!statusPane->IsVisible()); + QVERIFY(!statusPane->IsVisible()); } #endif -- cgit v0.12 From fcb431bfe807997b475b8b315e07fc7bd898ef61 Mon Sep 17 00:00:00 2001 From: Iain Date: Fri, 5 Feb 2010 10:04:11 +0000 Subject: Iain's changes for 4.6.2 --- dist/changes-4.6.2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index aa8d40b..5e0be9a 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -227,6 +227,14 @@ Qt for Windows CE Qt for Symbian -------------- + * [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/ + disable of DEF file usage (for use _during development only_ to decouple + the need to update the DEF files at the precise point that symbols are + removed, therefore allowing builds by CI systems to succeed even if symbols + have been removed. This does not remove the need to update the DEF files + before release. NOTE: Builds generated using this flag are not binary + compatible with previous versions of Qt.) + - QProcess * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished. -- cgit v0.12 From 7a300d4d3a89d7002643bd7e70b1525d72967681 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Feb 2010 12:52:37 +0100 Subject: Fixed the context menu test case in the qgraphicsscene autotest. When creating a custom QContextMenuEvent to send to a viewport we should use the viewport to convert the mouse cursor position to screen coordinates. Reviewed-by: Olivier Goffart --- tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 6743fbe..469ded0 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -2806,14 +2806,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() { QPoint pos(50, 50); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(150, 150); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); @@ -2821,14 +2821,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() view.scale(1.5, 1.5); { QPoint pos(25, 25); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(55, 55); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); -- cgit v0.12 From 95012c3ca7ef52ea8f2a2ecb67987b8575758987 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 5 Feb 2010 14:01:17 +0200 Subject: Fix to S60 softkey pressed down image. On Symbian the icons which are passed to softkeys, i.e. to actions with softkey role, need to use pixmap alpha channel instead of mask. Otherwise S60 CBA framework fails to create 50% transparent pressed down mask for softkey icon. Task-number: QTBUG-7314 Review-By: Sami Merila --- src/gui/kernel/qaction.cpp | 4 ++++ src/gui/kernel/qsoftkeymanager_s60.cpp | 19 ++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 4b7d949..8ddd051 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -715,6 +715,10 @@ QActionGroup *QAction::actionGroup() const it is displayed to the left of the menu text. There is no default icon. + On Symbian the icons which are passed to softkeys, i.e. to actions with + softkey role, need to have pixmap alpha channel correctly set otherwise + drawing artifacts will appear when softkey is pressed down. + If a null icon (QIcon::isNull() is passed into this function, the icon of the action is cleared. */ diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index a72d16c..af84a8f 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -237,21 +237,18 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, // prepareSoftkeyPixmap creates a new pixmap with requiredIconSize and blits the 'pmWihtAspectRatio' // to correct location of it QPixmap softkeyPixmap = prepareSoftkeyPixmap(pmWihtAspectRatio, position, requiredIconSize); - QBitmap softkeyMask = softkeyPixmap.mask(); - if (softkeyMask.isNull()) { - softkeyMask = QBitmap(softkeyPixmap.size()); - softkeyMask.fill(Qt::color1); - } - // Softkey mask in > SV_S60_5_1 has to be inverted - if(QSysInfo::s60Version() > QSysInfo::SV_S60_5_1) { - QImage maskImage = softkeyMask.toImage(); - maskImage.invertPixels(); - softkeyMask = QPixmap::fromImage(maskImage); + QPixmap softkeyAlpha = softkeyPixmap.alphaChannel(); + // Alpha channel in 5.1 and older devices need to be inverted + // TODO: Switch to use toSymbianCFbsBitmap with invert when available + if(QSysInfo::s60Version() <= QSysInfo::SV_S60_5_1) { + QImage alphaImage = softkeyAlpha.toImage(); + alphaImage.invertPixels(); + softkeyAlpha = QPixmap::fromImage(alphaImage); } CFbsBitmap* nBitmap = softkeyPixmap.toSymbianCFbsBitmap(); - CFbsBitmap* nMask = softkeyMask.toSymbianCFbsBitmap(); + CFbsBitmap* nMask = softkeyAlpha.toSymbianCFbsBitmap(); CEikImage* myimage = new (ELeave) CEikImage; myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered -- cgit v0.12 From 906f77bcfd4358f35155075b6d5fd8a383adadba Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Fri, 5 Feb 2010 13:13:49 +0100 Subject: A fix for accidently reused variable names in nested iterations. Reviewed-by: Peter Hartmann --- src/corelib/codecs/qtextcodec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 698ca9e..b63a82e 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -958,8 +958,8 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) if (nameMatch(cursor->name(), name)) return cursor; QList aliases = cursor->aliases(); - for (int i = 0; i < aliases.size(); ++i) - if (nameMatch(aliases.at(i), name)) + for (int y = 0; y < aliases.size(); ++y) + if (nameMatch(aliases.at(y), name)) return cursor; } -- cgit v0.12 From 3fdc70e9272f1a0ddd087f0d908a64ce2d4e4302 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Feb 2010 13:48:35 +0100 Subject: Fixed indentation. --- src/gui/inputmethod/qcoefepinputcontext_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index f5034fc..73c13d9 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -127,7 +127,7 @@ public: private: void DoCommitFepInlineEditL(); MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); - void ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType); + void ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType); // From MCoeFepAwareTextEditor_Extension1 public: -- cgit v0.12 From e3237deee07ec6961b905800d29b1a80f0f63595 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Feb 2010 13:49:46 +0100 Subject: Removed useless member variable and replaced with var on the stack. RevBy: Trust me --- src/gui/inputmethod/qcoefepinputcontext_p.h | 1 - src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 73c13d9..f325fb9 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -151,7 +151,6 @@ private: int m_inlinePosition; MFepInlineTextFormatRetriever *m_formatRetriever; MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; - int m_longPress; int m_cursorPos; QBasicTimer m_tempPreeditStringTimeout; bool m_hasTempPreeditString; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index e5ab300..56b79f4 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -71,7 +71,6 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_inlinePosition(0), m_formatRetriever(0), m_pointerHandler(0), - m_longPress(0), m_cursorPos(0), m_hasTempPreeditString(false) { @@ -744,24 +743,26 @@ void QCoeFepInputContext::DoCommitFepInlineEditL() void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) { + int longPress = 0; + if (m_preeditString.size() == 0) { QWidget *w = focusWidget(); if (triggeredBySymbian && w) { // We must replace the last character only if the input box has already accepted one if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) - m_longPress = 1; + longPress = 1; } return; } QList attributes; QInputMethodEvent event(QLatin1String(""), attributes); - event.setCommitString(m_preeditString, 0-m_longPress, m_longPress); + event.setCommitString(m_preeditString, 0-longPress, longPress); m_preeditString.clear(); sendEvent(event); m_hasTempPreeditString = false; - m_longPress = 0; + longPress = 0; if (!triggeredBySymbian) { CCoeFep* fep = CCoeEnv::Static()->Fep(); -- cgit v0.12 From 1e8a17edef013e70fa0d0c20a04e713c190c0bec Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Feb 2010 13:51:28 +0100 Subject: Fixed sendEvent call. The documentation states we should use the local sendEvent. Not sure if it makes a difference, but better to be consistent. RevBy: Trust me --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 56b79f4..41481d0 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -233,7 +233,7 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) m_preeditString = keyEvent->text(); QList attributes; QInputMethodEvent imEvent(m_preeditString, attributes); - QApplication::sendEvent(focusWidget(), &imEvent); + sendEvent(imEvent); m_tempPreeditStringTimeout.start(1000, this); m_hasTempPreeditString = true; update(); -- cgit v0.12 From fc58ceb0041626baa95d00eaaa2e740171d4767c Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 21 Jan 2010 17:27:27 +0100 Subject: fix compile error when linuxinput keyboard driver is compiled as plugin When creating the driver instance two parameters are given to the driver. But it accepts only the name of the device to be used. Reviewed-by: Paul Merge-request: 2288 --- src/plugins/kbddrivers/linuxinput/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/kbddrivers/linuxinput/main.cpp b/src/plugins/kbddrivers/linuxinput/main.cpp index 19a3145..db5167e 100644 --- a/src/plugins/kbddrivers/linuxinput/main.cpp +++ b/src/plugins/kbddrivers/linuxinput/main.cpp @@ -69,7 +69,7 @@ QWSKeyboardHandler* QLinuxInputKbdDriver::create(const QString &driver, Q_UNUSED(device); if (driver.compare(QLatin1String("LinuxInput"), Qt::CaseInsensitive)) return 0; - return new QWSLinuxInputKeyboardHandler(driver, device); + return new QWSLinuxInputKeyboardHandler(device); } Q_EXPORT_PLUGIN2(qwslinuxinputkbddriver, QLinuxInputKbdDriver) -- cgit v0.12 From cafc2a861b139c33d3989c625deb76a874159fbe Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Feb 2010 13:53:12 +0100 Subject: Fixed a bug where text would disappear in password fields. There were two bugs: - First, we need to avoid triggering the CancelTransaction call when committing the temporary preedit text, because otherwise FEP starts sending us spurious backspace events. Since the "triggeredBySymbian" variable is no longer descriptive for that use case, I renamed it in the process and that changed the negation of the flag. Notice the absense of a change inside commitTemporaryPreeditString(). That is because we want that one to avoid the transaction cancel, and therefore wee keep the old negation. - Second, m_cursorPos needs to be kept in sync with the widget state when we send the temporary preedit string, because the input context cannot separate between types of preedit text when it hits the first block in commitCurrentString() (types being either our temporary text, or FEP's text), and we have to avoid the longPress code path. RevBy: Janne Koskinen --- src/gui/inputmethod/qcoefepinputcontext_p.h | 2 +- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index f325fb9..d5243c3 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -96,7 +96,7 @@ protected: void timerEvent(QTimerEvent *timerEvent); private: - void commitCurrentString(bool triggeredBySymbian); + void commitCurrentString(bool cancelFepTransaction); void updateHints(bool mustUpdateInputCapabilities); void applyHints(Qt::InputMethodHints hints); void applyFormat(QList *attributes); diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 41481d0..2b91711 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -100,7 +100,7 @@ QCoeFepInputContext::~QCoeFepInputContext() void QCoeFepInputContext::reset() { - commitCurrentString(false); + commitCurrentString(true); } void QCoeFepInputContext::ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType) @@ -125,7 +125,7 @@ void QCoeFepInputContext::update() void QCoeFepInputContext::setFocusWidget(QWidget *w) { - commitCurrentString(false); + commitCurrentString(true); QInputContext::setFocusWidget(w); @@ -218,7 +218,7 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) break; case Qt::Key_Select: if (!m_preeditString.isEmpty()) { - commitCurrentString(false); + commitCurrentString(true); return true; } break; @@ -230,6 +230,7 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) && focusWidget()->inputMethodHints() & Qt::ImhHiddenText && !keyEvent->text().isEmpty()) { // Send some temporary preedit text in order to make text visible for a moment. + m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); m_preeditString = keyEvent->text(); QList attributes; QInputMethodEvent imEvent(m_preeditString, attributes); @@ -292,7 +293,7 @@ void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event) Q_ASSERT(focusWidget()); if (event->type() == QEvent::MouseButtonPress && event->button() == Qt::LeftButton) { - commitCurrentString(false); + commitCurrentString(true); int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); QList attributes; @@ -738,16 +739,16 @@ void QCoeFepInputContext::GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLin void QCoeFepInputContext::DoCommitFepInlineEditL() { - commitCurrentString(true); + commitCurrentString(false); } -void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) +void QCoeFepInputContext::commitCurrentString(bool cancelFepTransaction) { int longPress = 0; if (m_preeditString.size() == 0) { QWidget *w = focusWidget(); - if (triggeredBySymbian && w) { + if (!cancelFepTransaction && w) { // We must replace the last character only if the input box has already accepted one if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) longPress = 1; @@ -764,7 +765,7 @@ void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) m_hasTempPreeditString = false; longPress = 0; - if (!triggeredBySymbian) { + if (cancelFepTransaction) { CCoeFep* fep = CCoeEnv::Static()->Fep(); if (fep) fep->CancelTransaction(); -- cgit v0.12 From f9c314aa306bfd4a237594775a8aeb14c858e66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 5 Feb 2010 13:59:16 +0100 Subject: Fix tst_QAccessiblity failure. This started to fail after 34f1758428282a327c12b0d8040061c1f67ecc7f. Or actually, the test crashes on my machine. Reason is that the the test first creates a top-level line edit (which then gets its own backing store). The line edit is then reparented into another top-level. When the line edit is destroyed extra->topextra->backingStore is true and we delete the backing store it first got when created as a top-level. However, the line edit was reparented so this backing store is not the "active" one. We should still delete topextra->backingstore, but we must also remove any pointer references to the line edit in the "active" backing store. Reviewed-by: jbarron --- src/gui/kernel/qwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4520a1b..8b8768c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1448,7 +1448,8 @@ QWidget::~QWidget() // notify the window it no longer has a surface. delete d->extra->topextra->backingStore; d->extra->topextra->backingStore = 0; - } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { + } + if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) bs->removeStaticWidget(this); -- cgit v0.12 From f1603d5a8738b13e1c1402e29f393dfbdf079a25 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:30:49 +0100 Subject: add const Reviewed-by: hjk --- src/corelib/tools/qstringbuilder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index ddb5c7d..74661c2 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -71,7 +71,7 @@ public: private: const int m_size; - const char *m_data; + const char * const m_data; }; struct Q_CORE_EXPORT QAbstractConcatenable -- cgit v0.12 From b0e4af35ec8ddb5e7bfa658f916fbf29caa5a550 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:32:10 +0100 Subject: remove the rounded extra frame around the main message editor for one, it just added visual noise. second, it did not respect the color scheme, which made it unusable with light-on-dark colors. Task-number: QTBUG-7778 --- tools/linguist/linguist/messageeditor.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index 91c88da..4aeac89 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -135,12 +135,8 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) void MessageEditor::setupEditorPage() { QFrame *editorPage = new QFrame; - editorPage->setObjectName(QLatin1String("editorPage")); editorPage->setStyleSheet(QLatin1String( - "QFrame#editorPage { border-image: url(:/images/transbox.png) 12 16 16 12 repeat;" - " border-width: 12px 16px 16px 12px; }" - "QFrame#editorPage { background-color: white; }" "QLabel { font-weight: bold; }" )); editorPage->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); -- cgit v0.12 From 662f94d478063f05155e3d2345aa6617f602ef38 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:35:55 +0100 Subject: don't use stylesheet for just making labels bold --- tools/linguist/linguist/messageeditor.cpp | 4 ---- tools/linguist/linguist/messageeditorwidgets.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index 4aeac89..b6c1688 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -135,10 +135,6 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) void MessageEditor::setupEditorPage() { QFrame *editorPage = new QFrame; - - editorPage->setStyleSheet(QLatin1String( - "QLabel { font-weight: bold; }" - )); editorPage->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); m_source = new FormWidget(tr("Source text"), false); diff --git a/tools/linguist/linguist/messageeditorwidgets.cpp b/tools/linguist/linguist/messageeditorwidgets.cpp index 8b4fa62..4d31db2 100644 --- a/tools/linguist/linguist/messageeditorwidgets.cpp +++ b/tools/linguist/linguist/messageeditorwidgets.cpp @@ -171,6 +171,9 @@ FormWidget::FormWidget(const QString &label, bool isEditable, QWidget *parent) layout->setMargin(0); m_label = new QLabel(this); + QFont fnt; + fnt.setBold(true); + m_label->setFont(fnt); m_label->setText(label); layout->addWidget(m_label); @@ -249,6 +252,9 @@ FormMultiWidget::FormMultiWidget(const QString &label, QWidget *parent) m_minusIcon(QIcon(QLatin1String(":/images/minus.png"))) { m_label = new QLabel(this); + QFont fnt; + fnt.setBold(true); + m_label->setFont(fnt); m_label->setText(label); m_plusButtons.append( -- cgit v0.12 From 440aa04f0dec0eb9742a774723e1d27e42078c9c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 5 Feb 2010 15:58:26 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( da5d96a26e80162027bc95ce7e5725fe4b277ff7 ) Changes in WebKit/qt since the last update: --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 38 ++++++++++++++++++++++ .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 29 +++++++++-------- .../webkit/WebCore/platform/qt/RenderThemeQt.h | 10 +++--- .../WebCore/platform/qt/ScrollbarThemeQt.cpp | 22 ++++++++----- .../webkit/WebCore/platform/qt/ScrollbarThemeQt.h | 8 +++++ 6 files changed, 81 insertions(+), 28 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index c304876..4348cbc 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 69dd29fbeb12d076741dce70ac6bc155101ccd6f + da5d96a26e80162027bc95ce7e5725fe4b277ff7 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 18d119a..1f6f290 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -2,6 +2,44 @@ Reviewed by Kenneth Rohde Christiansen. + [Qt] In the StyledPainter determine the style from the Render and Scrollbar theme instead of from the paint device + https://bugs.webkit.org/show_bug.cgi?id=34054 + + Getting the style from the painter's paint device is a hack that breaks when + the paint device's style is different than the style that is used when + calculating the metries earlier when there is no painter available. + + This change moves us closer to always using the same style. + + * platform/qt/RenderThemeQt.cpp: + (WebCore::StylePainter::StylePainter): + (WebCore::StylePainter::init): + (WebCore::RenderThemeQt::paintButton): + (WebCore::RenderThemeQt::paintTextField): + (WebCore::RenderThemeQt::paintMenuList): + (WebCore::RenderThemeQt::paintMenuListButton): + (WebCore::RenderThemeQt::paintSliderTrack): + (WebCore::RenderThemeQt::paintMediaMuteButton): + (WebCore::RenderThemeQt::paintMediaPlayButton): + (WebCore::RenderThemeQt::paintMediaSliderTrack): + (WebCore::RenderThemeQt::paintMediaSliderThumb): + * platform/qt/RenderThemeQt.h: + * platform/qt/ScrollbarThemeQt.cpp: + (WebCore::ScrollbarThemeQt::paint): + (WebCore::ScrollbarThemeQt::hitTest): + (WebCore::ScrollbarThemeQt::shouldCenterOnThumb): + (WebCore::ScrollbarThemeQt::scrollbarThickness): + (WebCore::ScrollbarThemeQt::thumbLength): + (WebCore::ScrollbarThemeQt::trackPosition): + (WebCore::ScrollbarThemeQt::trackLength): + (WebCore::ScrollbarThemeQt::paintScrollCorner): + (WebCore::ScrollbarThemeQt::style): + * platform/qt/ScrollbarThemeQt.h: + +2010-01-25 Simon Hausmann + + Reviewed by Kenneth Rohde Christiansen. + [Qt] Use the fallback style on Maemo 5 https://bugs.webkit.org/show_bug.cgi?id=34376 diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 6a1eee8..37a6408 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -44,6 +44,7 @@ #include "Page.h" #include "RenderBox.h" #include "RenderTheme.h" +#include "ScrollbarThemeQt.h" #include "UserAgentStyleSheets.h" #include "QWebPageClient.h" #include "qwebpage.h" @@ -66,17 +67,17 @@ namespace WebCore { using namespace HTMLNames; -StylePainter::StylePainter(const RenderObject::PaintInfo& paintInfo) +StylePainter::StylePainter(RenderThemeQt* theme, const RenderObject::PaintInfo& paintInfo) { - init(paintInfo.context ? paintInfo.context : 0); + init(paintInfo.context ? paintInfo.context : 0, theme->qStyle()); } -StylePainter::StylePainter(GraphicsContext* context) +StylePainter::StylePainter(ScrollbarThemeQt* theme, GraphicsContext* context) { - init(context); + init(context, theme->style()); } -void StylePainter::init(GraphicsContext* context) +void StylePainter::init(GraphicsContext* context, QStyle* themeStyle) { painter = static_cast(context->platformContext()); widget = 0; @@ -85,7 +86,7 @@ void StylePainter::init(GraphicsContext* context) dev = painter->device(); if (dev && dev->devType() == QInternal::Widget) widget = static_cast(dev); - style = (widget ? widget->style() : QApplication::style()); + style = themeStyle; if (painter) { // the styles often assume being called with a pristine painter where no brush is set, @@ -464,7 +465,7 @@ void RenderThemeQt::setButtonPadding(RenderStyle* style) const bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { - StylePainter p(i); + StylePainter p(this, i); if (!p.isValid()) return true; @@ -497,7 +498,7 @@ void RenderThemeQt::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style, bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { - StylePainter p(i); + StylePainter p(this, i); if (!p.isValid()) return true; @@ -566,7 +567,7 @@ void RenderThemeQt::setPopupPadding(RenderStyle* style) const bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { - StylePainter p(i); + StylePainter p(this, i); if (!p.isValid()) return true; @@ -606,7 +607,7 @@ void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* st bool RenderThemeQt::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { - StylePainter p(i); + StylePainter p(this, i); if (!p.isValid()) return true; @@ -837,7 +838,7 @@ bool RenderThemeQt::paintMediaMuteButton(RenderObject* o, const RenderObject::Pa if (!mediaElement) return false; - StylePainter p(paintInfo); + StylePainter p(this, paintInfo); if (!p.isValid()) return true; @@ -866,7 +867,7 @@ bool RenderThemeQt::paintMediaPlayButton(RenderObject* o, const RenderObject::Pa if (!mediaElement) return false; - StylePainter p(paintInfo); + StylePainter p(this, paintInfo); if (!p.isValid()) return true; @@ -905,7 +906,7 @@ bool RenderThemeQt::paintMediaSliderTrack(RenderObject* o, const RenderObject::P if (!mediaElement) return false; - StylePainter p(paintInfo); + StylePainter p(this, paintInfo); if (!p.isValid()) return true; @@ -932,7 +933,7 @@ bool RenderThemeQt::paintMediaSliderThumb(RenderObject* o, const RenderObject::P if (!mediaElement) return false; - StylePainter p(paintInfo); + StylePainter p(this, paintInfo); if (!p.isValid()) return true; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h index 19337ac..13fb42f 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h @@ -35,6 +35,7 @@ namespace WebCore { class RenderStyle; class HTMLMediaElement; +class ScrollbarThemeQt; class RenderThemeQt : public RenderTheme { private: @@ -75,6 +76,8 @@ public: virtual String extraMediaControlsStyleSheet(); #endif + QStyle* qStyle() const; + protected: virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); virtual void setCheckboxSize(RenderStyle*) const; @@ -137,7 +140,6 @@ private: void setButtonPadding(RenderStyle*) const; void setPopupPadding(RenderStyle*) const; - QStyle* qStyle() const; QStyle* fallbackStyle() const; Page* m_page; @@ -152,8 +154,8 @@ private: class StylePainter { public: - explicit StylePainter(const RenderObject::PaintInfo& paintInfo); - explicit StylePainter(GraphicsContext* context); + explicit StylePainter(RenderThemeQt*, const RenderObject::PaintInfo&); + explicit StylePainter(ScrollbarThemeQt*, GraphicsContext*); ~StylePainter(); bool isValid() const { return painter && style; } @@ -170,7 +172,7 @@ public: { style->drawComplexControl(cc, &opt, painter, widget); } private: - void init(GraphicsContext* context); + void init(GraphicsContext* context, QStyle*); QBrush oldBrush; bool oldAntialiasing; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp index 561e55f..c0692ca 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp @@ -140,7 +140,7 @@ bool ScrollbarThemeQt::paint(Scrollbar* scrollbar, GraphicsContext* graphicsCont return false; } - StylePainter p(graphicsContext); + StylePainter p(this, graphicsContext); if (!p.isValid()) return true; @@ -172,14 +172,14 @@ ScrollbarPart ScrollbarThemeQt::hitTest(Scrollbar* scrollbar, const PlatformMous QStyleOptionSlider* opt = styleOptionSlider(scrollbar); const QPoint pos = scrollbar->convertFromContainingWindow(evt.pos()); opt->rect.moveTo(QPoint(0, 0)); - QStyle::SubControl sc = QApplication::style()->hitTestComplexControl(QStyle::CC_ScrollBar, opt, pos, 0); + QStyle::SubControl sc = style()->hitTestComplexControl(QStyle::CC_ScrollBar, opt, pos, 0); return scrollbarPart(sc); } bool ScrollbarThemeQt::shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent& evt) { // Middle click centers slider thumb (if supported) - return QApplication::style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition) && evt.button() == MiddleButton; + return style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition) && evt.button() == MiddleButton; } void ScrollbarThemeQt::invalidatePart(Scrollbar* scrollbar, ScrollbarPart) @@ -190,13 +190,12 @@ void ScrollbarThemeQt::invalidatePart(Scrollbar* scrollbar, ScrollbarPart) int ScrollbarThemeQt::scrollbarThickness(ScrollbarControlSize controlSize) { - QStyle* s = QApplication::style(); QStyleOptionSlider o; o.orientation = Qt::Vertical; o.state &= ~QStyle::State_Horizontal; if (controlSize != RegularScrollbar) o.state |= QStyle::State_Mini; - return s->pixelMetric(QStyle::PM_ScrollBarExtent, &o, 0); + return style()->pixelMetric(QStyle::PM_ScrollBarExtent, &o, 0); } int ScrollbarThemeQt::thumbPosition(Scrollbar* scrollbar) @@ -209,21 +208,21 @@ int ScrollbarThemeQt::thumbPosition(Scrollbar* scrollbar) int ScrollbarThemeQt::thumbLength(Scrollbar* scrollbar) { QStyleOptionSlider* opt = styleOptionSlider(scrollbar); - IntRect thumb = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarSlider, 0); + IntRect thumb = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarSlider, 0); return scrollbar->orientation() == HorizontalScrollbar ? thumb.width() : thumb.height(); } int ScrollbarThemeQt::trackPosition(Scrollbar* scrollbar) { QStyleOptionSlider* opt = styleOptionSlider(scrollbar); - IntRect track = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0); + IntRect track = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0); return scrollbar->orientation() == HorizontalScrollbar ? track.x() - scrollbar->x() : track.y() - scrollbar->y(); } int ScrollbarThemeQt::trackLength(Scrollbar* scrollbar) { QStyleOptionSlider* opt = styleOptionSlider(scrollbar); - IntRect track = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0); + IntRect track = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0); return scrollbar->orientation() == HorizontalScrollbar ? track.width() : track.height(); } @@ -237,7 +236,7 @@ void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext #if QT_VERSION < 0x040500 context->fillRect(rect, QApplication::palette().color(QPalette::Normal, QPalette::Window)); #else - StylePainter p(context); + StylePainter p(this, context); if (!p.isValid()) return; @@ -247,5 +246,10 @@ void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext #endif } +QStyle* ScrollbarThemeQt::style() const +{ + return QApplication::style(); +} + } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h index 6ca44ea..cf4882d 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h @@ -28,6 +28,12 @@ #include "ScrollbarTheme.h" +#include + +QT_BEGIN_NAMESPACE +class QStyle; +QT_END_NAMESPACE + namespace WebCore { class ScrollbarThemeQt : public ScrollbarTheme { @@ -49,6 +55,8 @@ public: virtual int trackLength(Scrollbar*); virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar); + + QStyle* style() const; }; } -- cgit v0.12 From ced7ed0bc745618e1b0618a17b112f983dd4a9c6 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 5 Feb 2010 16:01:29 +0100 Subject: Doc: Clarified ownership of custom buttons added to a QDialogButtonBox. Reviewed-by: Trust Me Suggested-by: Robert Griebl --- src/gui/widgets/qdialogbuttonbox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 48d7022..6a0e363 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -1017,6 +1017,8 @@ void QDialogButtonBox::removeButton(QAbstractButton *button) If the button has already been added, it is removed and added again with the new role. + \note The button box takes ownership of the button. + \sa removeButton(), clear() */ void QDialogButtonBox::addButton(QAbstractButton *button, ButtonRole role) -- cgit v0.12 From 381f5ae82cccec3774b68674b4c0e782e9f49f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 5 Feb 2010 16:06:33 +0100 Subject: Fixed QGifHandler::loopCount(). Task-number: QTBUG-7037 Reviewed-by: Kim --- src/plugins/imageformats/gif/qgifhandler.cpp | 38 ++++++++++++++++++----- tests/auto/qimagereader/images/qt-gif-anim.gif | Bin 0 -> 1661 bytes tests/auto/qimagereader/images/qt-gif-noanim.gif | Bin 0 -> 1642 bytes tests/auto/qimagereader/qimagereader.qrc | 4 ++- tests/auto/qimagereader/tst_qimagereader.cpp | 14 +++++++++ 5 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 tests/auto/qimagereader/images/qt-gif-anim.gif create mode 100644 tests/auto/qimagereader/images/qt-gif-noanim.gif diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 6d473e3..25d3dfa 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -72,7 +72,7 @@ public: int decode(QImage *image, const uchar* buffer, int length, int *nextFrameDelay, int *loopCount); - static void scan(QIODevice *device, QVector *imageSizes); + static void scan(QIODevice *device, QVector *imageSizes, int *loopCount); bool newFrame; bool partialNewFrame; @@ -646,7 +646,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, Scans through the data stream defined by \a device and returns the image sizes found in the stream in the \a imageSizes vector. */ -void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) +void QGIFFormat::scan(QIODevice *device, QVector *imageSizes, int *loopCount) { if (!device) return; @@ -842,7 +842,10 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) hold[count] = ch; ++count; if (count == hold[0] + 1) { - state = SkipBlockSize; + if (qstrncmp((char*)(hold+1), "NETSCAPE", 8) == 0) + state=NetscapeExtensionBlockSize; + else + state=SkipBlockSize; count = 0; } break; @@ -855,7 +858,23 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) state = SkipBlockSize; } break; - case NetscapeExtensionBlockSize: // fallthrough + case NetscapeExtensionBlockSize: + blockSize = ch; + count = 0; + if (blockSize) + state = NetscapeExtensionBlock; + else + state = Introducer; + break; + case NetscapeExtensionBlock: + if (count < 3) + hold[count] = ch; + count++; + if (count == blockSize) { + *loopCount = LM(hold[1], hold[2]); + state = SkipBlockSize; + } + break; case SkipBlockSize: blockSize = ch; count = 0; @@ -871,7 +890,6 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) state = Introducer; } break; - case NetscapeExtensionBlock: // fallthrough case SkipBlock: ++count; if (count == blockSize) @@ -1009,7 +1027,7 @@ QGifHandler::QGifHandler() { gifFormat = new QGIFFormat; nextDelay = 0; - loopCnt = 0; + loopCnt = 1; frameNumber = -1; scanIsCached = false; } @@ -1109,7 +1127,7 @@ QVariant QGifHandler::option(ImageOption option) const { if (option == Size) { if (!scanIsCached) { - QGIFFormat::scan(device(), &imageSizes); + QGIFFormat::scan(device(), &imageSizes, &loopCnt); scanIsCached = true; } // before the first frame is read, or we have an empty data stream @@ -1140,7 +1158,7 @@ int QGifHandler::nextImageDelay() const int QGifHandler::imageCount() const { if (!scanIsCached) { - QGIFFormat::scan(device(), &imageSizes); + QGIFFormat::scan(device(), &imageSizes, &loopCnt); scanIsCached = true; } return imageSizes.count(); @@ -1148,6 +1166,10 @@ int QGifHandler::imageCount() const int QGifHandler::loopCount() const { + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes, &loopCnt); + scanIsCached = true; + } return loopCnt-1; // In GIF, loop count is iteration count, so subtract one } diff --git a/tests/auto/qimagereader/images/qt-gif-anim.gif b/tests/auto/qimagereader/images/qt-gif-anim.gif new file mode 100644 index 0000000..8bca4a8 Binary files /dev/null and b/tests/auto/qimagereader/images/qt-gif-anim.gif differ diff --git a/tests/auto/qimagereader/images/qt-gif-noanim.gif b/tests/auto/qimagereader/images/qt-gif-noanim.gif new file mode 100644 index 0000000..b6a8540 Binary files /dev/null and b/tests/auto/qimagereader/images/qt-gif-noanim.gif differ diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 58f2f74..bc48244 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -1,5 +1,5 @@ - + images/16bpp.bmp images/4bpp-rle.bmp images/YCbCr_cmyk.jpg @@ -59,5 +59,7 @@ images/qt8.gif images/endless-anim.gif images/four-frames.gif + images/qt-gif-anim.gif + images/qt-gif-noanim.gif diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 3e40527..121a8fa 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -142,6 +142,7 @@ private slots: void gifHandlerBugs(); void animatedGif(); void gifImageCount(); + void gifLoopCount(); #endif void readCorruptImage_data(); @@ -884,6 +885,19 @@ void tst_QImageReader::gifImageCount() QVERIFY(io.size() == QSize(128,64)); } } + +void tst_QImageReader::gifLoopCount() +{ + { + QImageReader io(":images/qt-gif-anim.gif"); + QCOMPARE(io.loopCount(), -1); // infinite loop + } + { + QImageReader io(":images/qt-gif-noanim.gif"); + QCOMPARE(io.loopCount(), 0); // no loop + } +} + #endif class Server : public QObject -- cgit v0.12 From fb8d0593198313b975ed6c0c9ba99624d1d1fbec Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 5 Feb 2010 16:44:51 +0100 Subject: Revert change 34f1758 on non-Synbian platforms The change introduces behavior changes (including crashing on QWS). It is only critical for Symbian. To reduce risk, we only apply it on the Symbian platform for now. Task-number: Autotest regression Reviewed-by: Jesper --- src/gui/kernel/qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 72388f0..c072d9d 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1439,6 +1439,7 @@ QWidget::~QWidget() } #endif +#ifdef Q_OS_SYMBIAN if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { // Okay, we are about to destroy the top-level window that owns // the backing store. Make sure we delete the backing store right away @@ -1449,6 +1450,7 @@ QWidget::~QWidget() delete d->extra->topextra->backingStore; d->extra->topextra->backingStore = 0; } +#endif if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) -- cgit v0.12 From 2bc5d161e6820d459f00ac687ed99830a731cb74 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Feb 2010 16:59:33 +0100 Subject: Fixed qt_x11_wait_for_window_manager When we wait for the window to be shown by looking for ReparentNotify, MapNotify, etc events in the event queue, we should check if those events come for the right window, otherwise we might exit too early if there are event for an other window in the queue. Reviewed-by: Leonardo Sobral Cunha --- src/gui/kernel/qwidget_x11.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 007de7f..10fb009 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -358,6 +358,8 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) if (!w->testAttribute(Qt::WA_WState_Created)) return; + WId winid = w->internalWinId(); + // first deliver events that are already in the local queue QApplication::sendPostedEvents(); @@ -379,26 +381,26 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) switch (state) { case Initial: case Reparented: - if (ev.type == MapNotify) + if (ev.type == MapNotify && ev.xany.window == winid) state = Mapped; break; case Mapped: - if (ev.type == Expose) + if (ev.type == Expose && ev.xany.window == winid) return; break; } } else { switch (state) { case Initial: - if (ev.type == ReparentNotify) + if (ev.type == ReparentNotify && ev.xany.window == winid) state = Reparented; break; case Reparented: - if (ev.type == MapNotify) + if (ev.type == MapNotify && ev.xany.window == winid) state = Mapped; break; case Mapped: - if (ev.type == Expose) + if (ev.type == Expose && ev.xany.window == winid) return; break; } -- cgit v0.12 From cf14db1f16fffd7755d6200aaa6769a57a9da99d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 16:27:19 +0100 Subject: don't use QKeySequence::mnemonic() after all it wastes cpu cycles, and it started flooding the console with irrelevant messages. --- tools/linguist/linguist/mainwindow.cpp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 008ebb1..6e5c656 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -94,6 +94,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE static const int MessageMS = 2500; @@ -2356,13 +2358,28 @@ void MainWindow::updatePhraseDicts() static bool haveMnemonic(const QString &str) { - QString mnemonic = QKeySequence::mnemonic(str); - if (mnemonic == QLatin1String("Alt+Space")) { - // "Nobody" ever really uses these, and they are highly annoying - // because we get a lot of false positives. - return false; + for (const ushort *p = (ushort *)str.constData();; ) { // Assume null-termination + ushort c = *p++; + if (!c) + break; + if (c == '&') { + c = *p++; + if (!c) + return false; + // "Nobody" ever really uses these alt-space, and they are highly annoying + // because we get a lot of false positives. + if (c != '&' && c != ' ' && QChar(c).isPrint()) { + const ushort *pp = p; + for (; ::isalpha(*p); p++) ; + if (pp == p || *p != ';') + return true; + // This looks like a HTML &entity;, so ignore it. As a HTML string + // won't contain accels anyway, we can stop scanning here. + break; + } + } } - return !mnemonic.isEmpty(); + return false; } void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose) -- cgit v0.12 From e855b199319c932f2e9500235775f961bc32e41a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Feb 2010 16:12:34 +0100 Subject: Fixes scrolling horizontally with a mouse wheel over sliders. When scrolling horizontally over sliders the slider should go to the right, which means the value of the slider should increase. However in Qt scrolling with a mouse wheel horizontally means the delta value is negative, which is wrong. So changed the delta to be inversed. Reviewed-by: Richard Moe Gustavsen --- src/gui/widgets/qabstractslider.cpp | 67 ++++++++++++++++++++++--------------- src/gui/widgets/qabstractslider_p.h | 1 + src/gui/widgets/qscrollbar.cpp | 16 +++++++++ 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 2874647..f119a4f 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -688,51 +688,64 @@ void QAbstractSlider::sliderChange(SliderChange) update(); } - -/*! - \reimp -*/ -#ifndef QT_NO_WHEELEVENT -void QAbstractSlider::wheelEvent(QWheelEvent * e) +bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::KeyboardModifiers modifiers, int delta) { - Q_D(QAbstractSlider); - e->ignore(); - + Q_Q(QAbstractSlider); int stepsToScroll = 0; - qreal offset = qreal(e->delta()) / 120; + // in Qt scrolling to the right gives negative values. + if (orientation == Qt::Horizontal) + delta = -delta; + qreal offset = qreal(delta) / 120; - if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::ShiftModifier)) { + if ((modifiers & Qt::ControlModifier) || (modifiers & Qt::ShiftModifier)) { // Scroll one page regardless of delta: - stepsToScroll = qBound(-d->pageStep, int(offset * d->pageStep), d->pageStep); - d->offset_accumulated = 0; + stepsToScroll = qBound(-pageStep, int(offset * pageStep), pageStep); + offset_accumulated = 0; } else { // Calculate how many lines to scroll. Depending on what delta is (and // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. - qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->effectiveSingleStep(); + qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * effectiveSingleStep(); // Check if wheel changed direction since last event: - if (d->offset_accumulated != 0 && (offset / d->offset_accumulated) < 0) - d->offset_accumulated = 0; + if (offset_accumulated != 0 && (offset / offset_accumulated) < 0) + offset_accumulated = 0; - d->offset_accumulated += stepsToScrollF; - stepsToScroll = qBound(-d->pageStep, int(d->offset_accumulated), d->pageStep); - d->offset_accumulated -= int(d->offset_accumulated); + offset_accumulated += stepsToScrollF; + stepsToScroll = qBound(-pageStep, int(offset_accumulated), pageStep); + offset_accumulated -= int(offset_accumulated); if (stepsToScroll == 0) - return; + return false; } - if (d->invertedControls) + if (invertedControls) stepsToScroll = -stepsToScroll; - int prevValue = d->value; - d->position = d->overflowSafeAdd(stepsToScroll); // value will be updated by triggerAction() - triggerAction(SliderMove); + int prevValue = value; + position = overflowSafeAdd(stepsToScroll); // value will be updated by triggerAction() + q->triggerAction(QAbstractSlider::SliderMove); - if (prevValue == d->value) - d->offset_accumulated = 0; - else + if (prevValue == value) { + offset_accumulated = 0; + return false; + } + return true; +} + +/*! + \reimp +*/ +#ifndef QT_NO_WHEELEVENT +void QAbstractSlider::wheelEvent(QWheelEvent * e) +{ + Q_D(QAbstractSlider); + e->ignore(); + if (e->orientation() != d->orientation && !rect().contains(e->pos())) + return; + int delta = e->delta(); + if (d->scrollByDelta(e->orientation(), e->modifiers(), delta)) e->accept(); } + #endif #ifdef QT_KEYPAD_NAVIGATION /*! diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 6cde468..6e6ff6e 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -138,6 +138,7 @@ public: } q->triggerAction(repeatAction); } + bool scrollByDelta(Qt::Orientation orientation, Qt::KeyboardModifiers modifiers, int delta); }; QT_END_NAMESPACE diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp index 73ce122..3eed3a9 100644 --- a/src/gui/widgets/qscrollbar.cpp +++ b/src/gui/widgets/qscrollbar.cpp @@ -521,6 +521,22 @@ bool QScrollBar::event(QEvent *event) if (const QHoverEvent *he = static_cast(event)) d_func()->updateHoverControl(he->pos()); break; + case QEvent::Wheel: { + // override wheel event without adding virtual function override + QWheelEvent *ev = static_cast(event); + int delta = ev->delta(); + // scrollbar is a special case - in vertical mode it reaches minimum + // value in the upper position, however QSlider's minimum value is on + // the bottom. So we need to invert a value, but since the scrollbar is + // inverted by default, we need to inverse the delta value for the + // horizontal orientation. + if (ev->orientation() == Qt::Horizontal) + delta = -delta; + Q_D(QScrollBar); + if (d->scrollByDelta(ev->orientation(), ev->modifiers(), delta)) + event->accept(); + return true; + } default: break; } -- cgit v0.12 From 3b7164b3188e9382510bef2211e82ef777faa75c Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 5 Feb 2010 21:31:10 +0100 Subject: Fixed casual crash in initializeDb (Symbian) dynamic_cast should be used carefully with rvct before version 4. We found that out after the a dynamic (down)-cast from CFont* to CFbsFont* in QtGui suddenly failed. We test for (TypeUid() == KCFbsFontUid), before doing the cast. So, a static_cast is safe in this case. Also the other two dynamic_casts in qfontdatabase_s60.cpp were changed to static_cast. http://bugreports.qt.nokia.com/browse/QTBUG-7963 Task-number: QTBUG-7963 Reviewed-by: lars modified: src/gui/text/qfontdatabase_s60.cpp --- src/gui/text/qfontdatabase_s60.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index f8de08f..7e5397d 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -246,8 +246,8 @@ static void initializeDb() QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces(); - const QFontDatabaseS60StoreImplementation *store = dynamic_cast(db->s60Store); - Q_ASSERT(store); + const QFontDatabaseS60StoreImplementation *store = + static_cast(db->s60Store); bool fontAdded = false; for (int i = 0; i < numTypeFaces; i++) { TTypefaceSupport typefaceSupport; @@ -258,8 +258,7 @@ static void initializeDb() continue; if (font->TypeUid() == KCFbsFontUid) { TOpenFontFaceAttrib faceAttrib; - const CFbsFont *cfbsFont = dynamic_cast(font); - Q_ASSERT(cfbsFont); + const CFbsFont *cfbsFont = static_cast(font); cfbsFont->GetFaceAttrib(faceAttrib); QtFontStyle::Key styleKey; @@ -390,8 +389,8 @@ QFontEngine *QFontDatabase::findFont(int script, const QFontPrivate *, const QFo QFontDef request = req; request.family = fontFamily; #if defined(QT_NO_FREETYPE) - const QFontDatabaseS60StoreImplementation *store = dynamic_cast(db->s60Store); - Q_ASSERT(store); + const QFontDatabaseS60StoreImplementation *store = + static_cast(db->s60Store); const QFontEngineS60Extensions *extension = store->extension(fontFamily); fe = new QFontEngineS60(request, extension); #else -- cgit v0.12 From 3108f02f35685bd57486e198277c600e09d98b13 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 8 Feb 2010 09:50:33 +1000 Subject: [CRASH] audioinput and audiooutput examples crash when no devices are available. Task-number:QTBUG-7783 Reviewed-by:Justin McPherson --- examples/multimedia/audioinput/audioinput.cpp | 3 +++ examples/multimedia/audiooutput/audiooutput.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp index 8cc9948..fbf4dc4 100644 --- a/examples/multimedia/audioinput/audioinput.cpp +++ b/examples/multimedia/audioinput/audioinput.cpp @@ -213,6 +213,9 @@ InputTest::InputTest() if(format.sampleSize() != 16) { qWarning()<<"audio device doesn't support 16 bit samples, example cannot run"; + audioInput = 0; + button->setDisabled(true); + button2->setDisabled(true); return; } diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp index 0c57f4d..b44accd 100644 --- a/examples/multimedia/audiooutput/audiooutput.cpp +++ b/examples/multimedia/audiooutput/audiooutput.cpp @@ -179,6 +179,9 @@ AudioTest::AudioTest() if(settings.sampleSize() != 16) { qWarning()<<"audio device doesn't support 16 bit samples, example cannot run"; + button->setDisabled(true); + button2->setDisabled(true); + audioOutput = 0; return; } -- cgit v0.12 From e83d3937a236dc4a339c50a8f287e1a341f3b47f Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 8 Feb 2010 10:26:37 +0100 Subject: Fixing a test case to be runnable on Symbian device. Number of stacked items had to be lowered due to memory constrains. Reviewed-by: TrustMe --- tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp index d98a2a1..4cb07db 100644 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp @@ -171,7 +171,7 @@ void tst_QGraphicsView::paintSingleItem() } #ifdef Q_OS_SYMBIAN -# define DEEP_STACKING_COUNT 200 +# define DEEP_STACKING_COUNT 85 #else # define DEEP_STACKING_COUNT 1000 #endif -- cgit v0.12 From 242220cccfeb9212f8425d04c2dda36e9d2c63c9 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 8 Feb 2010 10:31:04 +0100 Subject: Enabling runfast mode when vfpv2 used. The fpu flag is monitored and when either 'softvfp+vfpv2' or 'vfpv2' detected we are turning on RunFast mode (via --fpumode fast switch). Reviewed-by: Iain --- mkspecs/common/symbian/symbian.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 7162bad..6113746 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -148,3 +148,19 @@ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis MMP_RULES -= PAGED } } + +QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast +# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE = + +symbian { + armfpu = $$find(MMP_RULES, "ARMFPU") + !isEmpty(armfpu) { + vfpv2 = $$find(MMP_RULES, "vfpv2") + !isEmpty(vfpv2) { + # we will respect fpu setting obtained from configure, but, + # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode + QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC} + # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE} + } + } +} \ No newline at end of file -- cgit v0.12 From 7b350628d231f8e491172dd00cd8ef5f7bda331e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20H=C3=A4m=C3=A4l=C3=A4inen?= Date: Thu, 4 Feb 2010 11:19:34 +0200 Subject: Do not run the tests automatically during install. A separate "check" rule added for running the tests. Use "make check" to run the tests. Task-number: QTPROD-442 Reviewed-by: Harald Fernengel Reviewed-by: Rohan McGovern --- mkspecs/features/qttest_p4.prf | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf index 525e7b2..e0b22f2 100644 --- a/mkspecs/features/qttest_p4.prf +++ b/mkspecs/features/qttest_p4.prf @@ -13,23 +13,19 @@ symbian:{ # prefix test binary with tst_ !contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_") -######################################################################## -# Use install rule to run test application. -# This lets you do 'make install' on a test to both build and run it, -# and lets you easily build and run all tests from the parent directory. -# ---------------------------------------------------------------------- -runme.files = -runme.path = . -!isEmpty(DESTDIR): runme.commands = cd ./$(DESTDIR) && -macx: runme.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) -else:unix: runme.commands += ./$(QMAKE_TARGET) +check.files = +check.path = . +!isEmpty(DESTDIR): check.commands = cd ./$(DESTDIR) && +macx: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) +else:unix: check.commands += ./$(QMAKE_TARGET) else:win32: { - CONFIG(debug, debug|release):runme.commands += debug\\$(QMAKE_TARGET) - else:runme.commands += release\\$(QMAKE_TARGET) + CONFIG(debug, debug|release):check.commands += debug\\$(QMAKE_TARGET) + else:check.commands += release\\$(QMAKE_TARGET) } -embedded: runme.commands += -qws -INSTALLS += runme +embedded: check.commands += -qws +QMAKE_EXTRA_TARGETS += check -######################################################################## +target.path += $$[QT_INSTALL_PREFIX]/tests/qt4 +INSTALLS += target -- cgit v0.12 From 7cc07c14cedcec0b4b2929b6e4243fff80531670 Mon Sep 17 00:00:00 2001 From: Adrian Constantin Date: Mon, 8 Feb 2010 12:00:03 +0200 Subject: Add a recursive rule for running the auto-tests. Use "make check" to run all the auto-tests. Task-number: QTPROD-442 Reviewed-by: Harald Fernengel Reviewed-by: Rohan McGovern --- tests/auto/auto.pro | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 3198a65..022b19a 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -587,3 +587,11 @@ contains(QT_CONFIG, declarative): SUBDIRS += declarative xmlpatternsview \ xmlpatternsxqts \ xmlpatternsxslts + + +############### make check recursively for testcases ################## +check.CONFIG = recursive +check.recurse = $$SUBDIRS +check.recurse_target = check +QMAKE_EXTRA_TARGETS += check +########################################################### -- cgit v0.12 From a8d09369fea1574b24309d7b7b2bb373021bf387 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 18 Jan 2010 14:16:16 +0100 Subject: Make QTextCodec reentrant. QTextCodec::codecForName and codedForMib were not reentrant Reviewed-by: Brad Reviewed-by: Denis --- src/corelib/codecs/qsimplecodec.cpp | 2 +- src/corelib/codecs/qtextcodec.cpp | 46 ++++++++++++++++++++++++++------ tests/auto/qtextcodec/tst_qtextcodec.cpp | 46 ++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 9 deletions(-) diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp index 445565a..4cc7912 100644 --- a/src/corelib/codecs/qsimplecodec.cpp +++ b/src/corelib/codecs/qsimplecodec.cpp @@ -681,7 +681,7 @@ QByteArray QSimpleTextCodec::convertFromUnicode(const QChar *in, int length, Con int u; const QChar* ucp = in; unsigned char* rp = (unsigned char *)r.data(); - const unsigned char* rmp = (const unsigned char *)reverseMap->data(); + const unsigned char* rmp = (const unsigned char *)reverseMap->constData(); int rmsize = (int) reverseMap->size(); while(i--) { diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 698ca9e..e9c1803 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -79,7 +79,7 @@ # endif #endif // QT_NO_CODECS #include "qlocale.h" -#include "private/qmutexpool_p.h" +#include "qmutex.h" #include #include @@ -659,13 +659,13 @@ static void setupLocaleMapper() #endif } - -static void setup() -{ #ifndef QT_NO_THREAD - QMutexLocker locker(QMutexPool::globalInstanceGet(&all)); +Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive)); #endif +// textCodecsMutex need to be locked to enter this function +static void setup() +{ if (all) return; @@ -903,8 +903,6 @@ QTextCodec::ConverterState::~ConverterState() */ /*! - \nonreentrant - Constructs a QTextCodec, and gives it the highest precedence. The QTextCodec should always be constructed on the heap (i.e. with \c new). Qt takes ownership and will delete it when the application @@ -912,6 +910,9 @@ QTextCodec::ConverterState::~ConverterState() */ QTextCodec::QTextCodec() { +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); all->prepend(this); } @@ -929,8 +930,12 @@ QTextCodec::~QTextCodec() if (!destroying_is_ok) qWarning("QTextCodec::~QTextCodec: Called by application"); #endif - if (all) + if (all) { +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif all->removeAll(this); + } } /*! @@ -951,6 +956,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) if (name.isEmpty()) return 0; +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); for (int i = 0; i < all->size(); ++i) { @@ -973,6 +981,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) */ QTextCodec* QTextCodec::codecForMib(int mib) { +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); // Qt 3 used 1000 (mib for UCS2) as its identifier for the utf16 codec. Map @@ -1001,6 +1012,9 @@ QTextCodec* QTextCodec::codecForMib(int mib) */ QList QTextCodec::availableCodecs() { +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); QList codecs; @@ -1008,6 +1022,11 @@ QList QTextCodec::availableCodecs() codecs += all->at(i)->name(); codecs += all->at(i)->aliases(); } + +#ifndef QT_NO_THREAD + locker.unlock(); +#endif + #ifndef QT_NO_TEXTCODECPLUGIN QFactoryLoader *l = loader(); QStringList keys = l->keys(); @@ -1031,11 +1050,19 @@ QList QTextCodec::availableCodecs() */ QList QTextCodec::availableMibs() { +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); QList codecs; for (int i = 0; i < all->size(); ++i) codecs += all->at(i)->mibEnum(); + +#ifndef QT_NO_THREAD + locker.unlock(); +#endif + #ifndef QT_NO_TEXTCODECPLUGIN QFactoryLoader *l = loader(); QStringList keys = l->keys(); @@ -1082,6 +1109,9 @@ QTextCodec* QTextCodec::codecForLocale() if (localeMapper) return localeMapper; +#ifndef QT_NO_THREAD + QMutexLocker locker(textCodecsMutex()); +#endif setup(); return localeMapper; diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp index eb348fb..65b0448 100644 --- a/tests/auto/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp @@ -47,6 +47,8 @@ #include #include #include +#include +#include #ifdef Q_OS_SYMBIAN #define SRCDIR "" @@ -58,6 +60,9 @@ class tst_QTextCodec : public QObject Q_OBJECT private slots: + + void threadSafety(); + void toUnicode_data(); void toUnicode(); void codecForName_data(); @@ -1904,5 +1909,46 @@ void tst_QTextCodec::toLocal8Bit() } #endif +static QByteArray loadAndConvert(const QByteArray &codecName) +{ + QTextCodec *c = QTextCodec::codecForName(codecName); + if (!c) { + qDebug() << "WARNING " << codecName << " not found? "; + return QByteArray(); + } + QString str = QString::fromLatin1(codecName); + QByteArray b = c->fromUnicode(str); + c->toUnicode(b); + return codecName; +} + +static int loadAndConvertMIB(int mib) +{ + QTextCodec *c = QTextCodec::codecForMib(mib); + if (!c) { + qDebug() << "WARNING " << mib << " not found? "; + return 0; + } + QString str = QString::number(mib); + QByteArray b = c->fromUnicode(str); + c->toUnicode(b); + return mib; +} + + +void tst_QTextCodec::threadSafety() +{ + QThreadPool::globalInstance()->setMaxThreadCount(12); + + QList codecList = QTextCodec::availableCodecs(); + QFuture res = QtConcurrent::mapped(codecList, loadAndConvert); + + QList mibList = QTextCodec::availableMibs(); + QFuture res2 = QtConcurrent::mapped(mibList, loadAndConvertMIB); + + QCOMPARE(res.results(), codecList); + QCOMPARE(res2.results(), mibList); +} + QTEST_MAIN(tst_QTextCodec) #include "tst_qtextcodec.moc" -- cgit v0.12 From 95a095c69973081b66782e83fccd54ba15ca0b71 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 8 Feb 2010 11:40:44 +0200 Subject: Workaround for abld toolchain issue with s60main When building for ARMV6 with abld toolchain in Symbian, qtmain.lib ends up missing some symbols that are required to link it against GCCE apps. This happens because --dllimport_runtime compiler option is missing in ARMV6 builds of qtmain.lib. Task-number: QTBUG-7952 Reviewed-by: axis --- src/s60main/s60main.pro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index 47cf020..25fb188 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -22,6 +22,9 @@ symbian { # staticlib should not have any lib depencies in s60 # This seems not to work, some hard coded libs are still added as dependency LIBS = + + # Workaround for abld toolchain problem to make ARMV6 qtmain.lib link with GCCE apps + symbian-abld: QMAKE_CXXFLAGS.ARMCC += --dllimport_runtime } else { error("$$_FILE_ is intended only for Symbian!") } -- cgit v0.12 From 7724c474a941ea3516da6102a16b30ca254afe53 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 8 Feb 2010 12:25:10 +0100 Subject: QGraphicsItem: Do not crash at exit if there is static QGraphicsItem. The DataStore could have been destroyed before. Even if having static QGraphicsItem is not really supported, it is better not to crash Task-number: QTBUG-7629 Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 3 ++- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b4e19d1..39c41c4 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1392,7 +1392,8 @@ QGraphicsItem::~QGraphicsItem() } delete d_ptr->transformData; - qt_dataStore()->data.remove(this); + if (QGraphicsItemCustomDataStore *dataStore = qt_dataStore()) + dataStore->data.remove(this); } /*! diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 7b54a3b..7c1b97e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -90,6 +90,8 @@ Q_DECLARE_METATYPE(QRectF) #define COMPARE_REGIONS QTRY_COMPARE #endif +static QGraphicsRectItem staticItem; //QTBUG-7629, we should not crash at exit. + static void sendMousePress(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton) { QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); -- cgit v0.12 From 8d9c9386be6e45fdf919a3ac5bf79f5cde315142 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 18:21:47 +0100 Subject: drastically improve load time of TS files it isn't such a good idea to insert rows one by one into the model. so instead batch the "announcement" of new data. unloading single models is still slow, but that's a corner use case, so don't bother fixing it now, especially as it is harder to do it. --- tools/linguist/linguist/messagemodel.cpp | 48 +++++++++++++++++++++----------- tools/linguist/linguist/messagemodel.h | 2 +- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp index 6572059..4e2b473 100644 --- a/tools/linguist/linguist/messagemodel.cpp +++ b/tools/linguist/linguist/messagemodel.cpp @@ -584,12 +584,16 @@ void MultiContextItem::putMessageItem(int pos, MessageItem *m) m_messageLists.last()[pos] = m; } -void MultiContextItem::appendMessageItem(MessageItem *m) +void MultiContextItem::appendMessageItems(const QList &m) { + QList nullItems = m; // Basically, just a reservation + for (int i = 0; i < nullItems.count(); ++i) + nullItems[i] = 0; for (int i = 0; i < m_messageLists.count() - 1; ++i) - m_messageLists[i].append(0); - m_messageLists.last().append(m); - m_multiMessageList.append(MultiMessageItem(m)); + m_messageLists[i] += nullItems; + m_messageLists.last() += m; + foreach (MessageItem *mi, m) + m_multiMessageList.append(MultiMessageItem(mi)); } void MultiContextItem::removeMultiMessageItem(int pos) @@ -710,33 +714,43 @@ void MultiDataModel::append(DataModel *dm, bool readWrite) m_msgModel->endInsertColumns(); } m_msgModel->endInsertColumns(); + int appendedContexts = 0; for (int i = 0; i < dm->contextCount(); ++i) { ContextItem *c = dm->contextItem(i); int mcx = findContextIndex(c->context()); if (mcx >= 0) { MultiContextItem *mc = multiContextItem(mcx); mc->assignLastModel(c, readWrite); + QList appendItems; for (int j = 0; j < c->messageCount(); ++j) { MessageItem *m = c->messageItem(j); int msgIdx = mc->findMessage(m->text(), m->comment()); - if (msgIdx >= 0) { + if (msgIdx >= 0) mc->putMessageItem(msgIdx, m); - } else { - int msgCnt = mc->messageCount(); - m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0), msgCnt, msgCnt); - mc->appendMessageItem(m); - m_msgModel->endInsertRows(); - ++m_numMessages; - } + else + appendItems << m; + } + if (!appendItems.isEmpty()) { + int msgCnt = mc->messageCount(); + m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0), + msgCnt, msgCnt + appendItems.size() - 1); + mc->appendMessageItems(appendItems); + m_msgModel->endInsertRows(); + m_numMessages += appendItems.size(); } } else { - MultiContextItem item(modelCount() - 1, c, readWrite); - m_msgModel->beginInsertRows(QModelIndex(), contextCount(), contextCount()); - m_multiContextList.append(item); - m_msgModel->endInsertRows(); - m_numMessages += item.messageCount(); + m_multiContextList << MultiContextItem(modelCount() - 1, c, readWrite); + m_numMessages += c->messageCount(); + ++appendedContexts; } } + if (appendedContexts) { + // Do that en block to avoid itemview inefficiency. It doesn't hurt that we + // announce the availability of the data "long" after it was actually added. + m_msgModel->beginInsertRows(QModelIndex(), + contextCount() - appendedContexts, contextCount() - 1); + m_msgModel->endInsertRows(); + } dm->setWritable(readWrite); updateCountsOnAdd(modelCount() - 1, readWrite); connect(dm, SIGNAL(modifiedChanged()), SLOT(onModifiedChanged())); diff --git a/tools/linguist/linguist/messagemodel.h b/tools/linguist/linguist/messagemodel.h index 3e0107e..7d98873 100644 --- a/tools/linguist/linguist/messagemodel.h +++ b/tools/linguist/linguist/messagemodel.h @@ -332,7 +332,7 @@ private: void removeModel(int pos); void moveModel(int oldPos, int newPos); // newPos is *before* removing at oldPos void putMessageItem(int pos, MessageItem *m); - void appendMessageItem(MessageItem *m); + void appendMessageItems(const QList &m); void removeMultiMessageItem(int pos); void incrementFinishedCount() { ++m_finishedCount; } void decrementFinishedCount() { --m_finishedCount; } -- cgit v0.12 From e49fa5d9ab3c15918fe5fe92d30d7640e23a1307 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 8 Feb 2010 12:54:35 +0100 Subject: generate code which does not break QT_USE_FAST_CONCATENATION with old gcc --- util/qlalr/cppgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qlalr/cppgenerator.cpp b/util/qlalr/cppgenerator.cpp index a95f5e4..f52a86f 100644 --- a/util/qlalr/cppgenerator.cpp +++ b/util/qlalr/cppgenerator.cpp @@ -457,7 +457,7 @@ void CppGenerator::generateDecl (QTextStream &out) out << "class " << grammar.table_name << endl << "{" << endl << "public:" << endl - << " enum {" << endl; + << " enum VariousConstants {" << endl; foreach (Name t, grammar.terminals) { -- cgit v0.12 From febca287b4b357240246f7149075ee3917f6c20c Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 8 Feb 2010 11:02:02 +0100 Subject: Fixes qabstractslider autotest Fixed a bad merge in the QAbstractSlider::wheelEvent. Modified an autotest to follow a change in behavior - scrolling with a horizontal mouse wheel to the "right" means increasing the value. Reviewed-by: Richard Moe Gustavsen --- src/gui/widgets/qabstractslider.cpp | 2 -- tests/auto/qabstractslider/tst_qabstractslider.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index f0ae5a8..73c17db 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -739,8 +739,6 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) { Q_D(QAbstractSlider); e->ignore(); - if (e->orientation() != d->orientation && !rect().contains(e->pos())) - return; int delta = e->delta(); if (d->scrollByDelta(e->orientation(), e->modifiers(), delta)) e->accept(); diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp index 40281c6..293af36 100644 --- a/tests/auto/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp @@ -768,7 +768,7 @@ void tst_QAbstractSlider::wheelEvent_data() << true // inverted controls << 20 // wheel scroll lines << false // with modifiers - << 1 // delta + << -1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 30 // expected position after @@ -782,7 +782,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers - << 2 // delta + << -2 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 100 // expected position after @@ -796,7 +796,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers - << -2 // delta + << 2 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 0 // expected position after @@ -810,7 +810,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 20 // wheel scroll lines << true // with modifiers - << 1 // delta + << -1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 90 // expected position after -- cgit v0.12 From 5f887ce23a38fc6b9f395593a4f7ce1de5b80e8d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 8 Feb 2010 14:17:29 +0200 Subject: Don't remove all dependencies when patching the pkg. Only remove dependencies that are known to cause unncessary warnings from pkg files when patching them with patch_capabilities.pl script. Task-number: QTBUG-8018 Reviewed-by: Janne Koskinen --- bin/patch_capabilities.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 8afe776..f82c48f 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -131,9 +131,13 @@ if (@ARGV) } } - # Remove all dependencies to other packages to reduce unnecessary error messages - # from depended packages that are also patched and therefore have different UID. - if ($line =~ m/^\(0x[0-9|a-f|A-F]*\).*\{.*\}$/) + # Remove dependencies to known problem packages (i.e. packages that are likely to be patched, also) + # to reduce unnecessary error messages. + if ($line =~ m/^\(0x2002af5f\).*\{.*\}$/) + { + $newLine = "\n" + } + if ($line =~ m/^\(0x2001E61C\).*\{.*\}$/) { $newLine = "\n" } -- cgit v0.12 From 95f8f814f2f77654d846660644f0e8a5c48eeb26 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 8 Feb 2010 14:08:29 +0100 Subject: QLineEdit: regression: read-only line edits would eat shortcuts. Restore Qt 4.5 behaviour. Task-number: QTBUG-7395 Reviewed-by: Thierry --- src/gui/widgets/qlinecontrol.cpp | 2 ++ tests/auto/qlineedit/tst_qlineedit.cpp | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index b0a64ea..db099e8 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1371,6 +1371,8 @@ bool QLineControl::processEvent(QEvent* ev) processInputMethodEvent(static_cast(ev)); break; #ifndef QT_NO_SHORTCUT case QEvent::ShortcutOverride:{ + if (isReadOnly()) + return false; QKeyEvent* ke = static_cast(ev); if (ke == QKeySequence::Copy || ke == QKeySequence::Paste diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 7283916..69e7699 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -271,6 +271,7 @@ private slots: void taskQTBUG_4401_enterKeyClearsPassword(); void taskQTBUG_4679_moveToStartEndOfBlock(); void taskQTBUG_4679_selectToStartEndOfBlock(); + void taskQTBUG_7395_readOnlyShortcut(); protected slots: #ifdef QT3_SUPPORT @@ -3638,5 +3639,25 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock() #endif // Q_OS_MAC } +void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut() +{ + //ReadOnly QLineEdit should not intercept shortcut. + QLineEdit le; + le.setReadOnly(true); + + QAction action(QString::fromLatin1("hello"), &le); + action.setShortcut(QString::fromLatin1("p")); + QSignalSpy spy(&action, SIGNAL(triggered())); + le.addAction(&action); + + le.show(); + QApplication::setActiveWindow(&le); + QTest::qWaitForWindowShown(&le); + le.setFocus(); + QTRY_VERIFY(le.hasFocus()); + QTest::keyClick(0, Qt::Key_P); + QCOMPARE(spy.count(), 1); +} + QTEST_MAIN(tst_QLineEdit) #include "tst_qlineedit.moc" -- cgit v0.12 From 707610b9f07ad96318e6d84f321588c060c0c294 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 8 Feb 2010 13:31:09 +0100 Subject: Remove the installer from the Qt sources. This copy of the installer doesn't work anymore. Reviewed-By: TrustMe --- tools/installer/README | 12 - tools/installer/batch/build.bat | 157 ------ tools/installer/batch/copy.bat | 121 ----- tools/installer/batch/delete.bat | 73 --- tools/installer/batch/env.bat | 141 ------ tools/installer/batch/extract.bat | 83 --- tools/installer/batch/installer.bat | 247 --------- tools/installer/batch/log.bat | 58 --- tools/installer/batch/toupper.bat | 69 --- tools/installer/config/config.default.sample | 64 --- tools/installer/config/mingw-opensource.conf | 136 ----- tools/installer/iwmake.bat | 124 ----- tools/installer/nsis/confirmpage.ini | 59 --- tools/installer/nsis/gwdownload.ini | 118 ----- tools/installer/nsis/gwmirror.ini | 67 --- tools/installer/nsis/images/install.ico | Bin 22486 -> 0 bytes tools/installer/nsis/images/qt-header.bmp | Bin 25818 -> 0 bytes tools/installer/nsis/images/qt-wizard.bmp | Bin 154542 -> 0 bytes tools/installer/nsis/includes/global.nsh | 143 ------ tools/installer/nsis/includes/instdir.nsh | 254 ---------- tools/installer/nsis/includes/list.nsh | 136 ----- tools/installer/nsis/includes/qtcommon.nsh | 549 -------------------- tools/installer/nsis/includes/qtenv.nsh | 303 ----------- tools/installer/nsis/includes/system.nsh | 269 ---------- tools/installer/nsis/installer.nsi | 524 ------------------- tools/installer/nsis/modules/environment.nsh | 216 -------- tools/installer/nsis/modules/mingw.nsh | 670 ------------------------- tools/installer/nsis/modules/opensource.nsh | 94 ---- tools/installer/nsis/modules/registeruiext.nsh | 207 -------- tools/installer/nsis/opensource.ini | 78 --- 30 files changed, 4972 deletions(-) delete mode 100644 tools/installer/README delete mode 100755 tools/installer/batch/build.bat delete mode 100755 tools/installer/batch/copy.bat delete mode 100755 tools/installer/batch/delete.bat delete mode 100755 tools/installer/batch/env.bat delete mode 100755 tools/installer/batch/extract.bat delete mode 100755 tools/installer/batch/installer.bat delete mode 100755 tools/installer/batch/log.bat delete mode 100755 tools/installer/batch/toupper.bat delete mode 100644 tools/installer/config/config.default.sample delete mode 100644 tools/installer/config/mingw-opensource.conf delete mode 100755 tools/installer/iwmake.bat delete mode 100644 tools/installer/nsis/confirmpage.ini delete mode 100644 tools/installer/nsis/gwdownload.ini delete mode 100644 tools/installer/nsis/gwmirror.ini delete mode 100644 tools/installer/nsis/images/install.ico delete mode 100644 tools/installer/nsis/images/qt-header.bmp delete mode 100644 tools/installer/nsis/images/qt-wizard.bmp delete mode 100644 tools/installer/nsis/includes/global.nsh delete mode 100644 tools/installer/nsis/includes/instdir.nsh delete mode 100644 tools/installer/nsis/includes/list.nsh delete mode 100644 tools/installer/nsis/includes/qtcommon.nsh delete mode 100644 tools/installer/nsis/includes/qtenv.nsh delete mode 100644 tools/installer/nsis/includes/system.nsh delete mode 100644 tools/installer/nsis/installer.nsi delete mode 100644 tools/installer/nsis/modules/environment.nsh delete mode 100644 tools/installer/nsis/modules/mingw.nsh delete mode 100644 tools/installer/nsis/modules/opensource.nsh delete mode 100644 tools/installer/nsis/modules/registeruiext.nsh delete mode 100644 tools/installer/nsis/opensource.ini diff --git a/tools/installer/README b/tools/installer/README deleted file mode 100644 index 63abf6d..0000000 --- a/tools/installer/README +++ /dev/null @@ -1,12 +0,0 @@ -iwmake is the tool used to generate the Qt installer binaries. - -To be able to use it yourself create a config.default in the -config/ directory. You can refer to config.default.sample to see -which values need to be set within this file. - -Afterwards call "iwmake.bat mingw-opensource.conf" to create an -installer package yourself. - -Note that the binary creation takes a lot of time and is very -CPU-intensive as it recompiles the Qt source package among other -steps. diff --git a/tools/installer/batch/build.bat b/tools/installer/batch/build.bat deleted file mode 100755 index c10b7f3..0000000 --- a/tools/installer/batch/build.bat +++ /dev/null @@ -1,157 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:begin -for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_COMPILER=%%~m& set IWMAKE_TMP=%%~n - -if "%IWMAKE_TMP%"=="" set IWMAKE_TMP=build_%IWMAKE_COMPILER% -set IWMAKE_BUILD=%IWMAKE_ROOT%\%IWMAKE_TMP% -if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD% - -if not "%PATH%"=="" set IWMAKE_OLD_PATH=%PATH% -if not "%QMAKESPEC%"=="" set IWMAKE_OLD_QMAKESPEC=%QMAKESPEC% -if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR% -if not "%INCLUDE%"=="" set IWMAKE_OLD_INCLUDE=%INCLUDE% -if not "%LIB%"=="" set IWMAKE_OLD_LIB=%LIB% - -set PATH=%IWMAKE_BUILD%\bin;%PATH% -set QTDIR=%IWMAKE_BUILD% - -if "%IWMAKE_COMPILER%"=="vs2003" goto VS2003Env -if "%IWMAKE_COMPILER%"=="vs2002" goto VS2002Env -if "%IWMAKE_COMPILER%"=="vs2005" goto VS2005Env -if "%IWMAKE_COMPILER%"=="vc60" goto VC60Env -if "%IWMAKE_COMPILER%"=="mingw" goto MinGWEnv -goto :eof - -:VS2003Env -set QMAKESPEC=win32-msvc.net -if not exist "%VS71COMNTOOLS%vsvars32.bat" echo VS2003 not found >> %IWMAKE_LOGFILE% & exit /b 1 -call "%VS71COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE% -set IWMAKE_MAKE=nmake -goto :eof - -:VS2002Env -set QMAKESPEC=win32-msvc.net -if not exist "%VSCOMNTOOLS%vsvars32.bat" echo VS2002 not found >> %IWMAKE_LOGFILE% & exit /b 1 -call "%VSCOMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE% -set IWMAKE_MAKE=nmake -goto :eof - -:VS2005Env -set QMAKESPEC=win32-msvc2005 -if not exist "%VS80COMNTOOLS%vsvars32.bat" echo VS2005 not found >> %IWMAKE_LOGFILE% & exit /b 1 -call "%VS80COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE% -set IWMAKE_MAKE=nmake -goto :eof - -:VC60Env -set QMAKESPEC=win32-msvc -if not exist "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" echo VC60 not found >> %IWMAKE_LOGFILE% & exit /b 1 -call "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" >> %IWMAKE_LOGFILE% -set IWMAKE_MAKE=nmake -goto :eof - -:MinGWEnv -set QMAKESPEC=win32-g++ -if not exist %IWMAKE_MINGWPATH%\bin\gcc.exe echo MinGW not found in %IWMAKE_MINGWPATH% >> %IWMAKE_LOGFILE% & exit /b 1 -set PATH=%IWMAKE_MINGWPATH%\bin;%PATH% -set IWMAKE_MAKE=mingw32-make -goto :eof - -:finish - if not "%IWMAKE_OLD_PATH%"=="" set PATH=%IWMAKE_OLD_PATH%& set IWMAKE_OLD_PATH= - if not "%IWMAKE_OLD_QMAKESPEC%"=="" set QMAKESPEC=%IWMAKE_OLD_QMAKESPEC%& set IWMAKE_OLD_QMAKESPEC= - if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR%& set IWMAKE_OLD_QTDIR= - if not "%IWMAKE_OLD_INCLUDE%"=="" set INCLUDE=%IWMAKE_OLD_INCLUDE%& set IWMAKE_OLD_INCLUDE= - if not "%IWMAKE_OLD_LIB%"=="" set LIB=%IWMAKE_OLD_LIB%& set IWMAKE_OLD_LIB= -goto :eof - -:configure - pushd %IWMAKE_BUILD% - configure %~1 >> %IWMAKE_LOGFILE% 2>&1 - popd -goto :eof - -:bin - pushd %IWMAKE_BUILD% - %IWMAKE_MAKE% %~1 >>%IWMAKE_LOGFILE% 2>&1 - popd -goto :eof - -:binInDir - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - pushd %IWMAKE_BUILD%\%IWMAKE_TMP% - %IWMAKE_MAKE% %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1 - popd -goto :eof - -:DBPlugins - call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sql - set IWMAKE_SQL_OLD_LIB=%LIB% - pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\mysql - set LIB=%IWMAKE_ROOT%\sql\mysql\lib\debug;%IWMAKE_SQL_OLD_LIB% - qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\mysql\include" "LIBS+=libmysql.lib ws2_32.lib advapi32.lib user32.lib" >> %IWMAKE_LOGFILE% 2>&1 - %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1 - set LIB=%IWMAKE_ROOT%\sql\mysql\lib\opt;%IWMAKE_SQL_OLD_LIB% - qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\mysql\include" "LIBS+=libmysql.lib ws2_32.lib advapi32.lib" >> %IWMAKE_LOGFILE% 2>&1 - %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1 - popd - - set LIB=%IWMAKE_ROOT%\sql\%IWMAKE_COMPILER%;%IWMAKE_SQL_OLD_LIB% - pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\psql - qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpqd.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1 - %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1 - qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpq.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1 - %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1 - popd - set LIB=%IWMAKE_SQL_OLD_LIB% - set IWMAKE_SQL_OLD_LIB= -goto :eof - -:root - set IWMAKE_BUILD=%~1 - if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD% -goto :eof - -:END diff --git a/tools/installer/batch/copy.bat b/tools/installer/batch/copy.bat deleted file mode 100755 index 8fabebf..0000000 --- a/tools/installer/batch/copy.bat +++ /dev/null @@ -1,121 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:dest - set IWMAKE_OUTDIR=%IWMAKE_ROOT%\%~1 - if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR% -goto :eof - -:src - set IWMAKE_SRCDIR=%IWMAKE_ROOT%\%~1 - if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR% -goto :eof - -:destAbs - set IWMAKE_OUTDIR=%1 - if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR% -goto :eof - -:srcAbs - set IWMAKE_SRCDIR=%1 - if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR% -goto :eof - -:extsync - if exist %IWMAKE_ROOT%\%~1 rd /S /Q %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE% - xcopy /H /Y /Q /I /R /E %IWMAKE_EXTERNAL%\%~1 %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE% -goto :eof - -:all - xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%~1 %IWMAKE_OUTDIR%\ >> %IWMAKE_LOGFILE% -goto :eof - -:filesEx - for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o - echo %IWMAKE_TMP3% > %IWMAKE_ROOT%\iwmake_exclude - xcopy /H /Y /Q /I /R /S /EXCLUDE:%IWMAKE_ROOT%\iwmake_exclude %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% -goto :eof - -:file - set IWMAKE_TMP=%~1 - set IWMAKE_TMP2=%~nx1 - echo set IWMAKE_TMP3=%%IWMAKE_TMP:%IWMAKE_TMP2%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat" - call %IWMAKE_ROOT%\iwmake_tmp.bat - if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" - xcopy /H /Y /Q /I /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP3% >> %IWMAKE_LOGFILE% -goto :eof - -:fileAndRename - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP4=%%~nxn - echo set IWMAKE_TMP3=%%IWMAKE_TMP2:%IWMAKE_TMP4%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat" - call %IWMAKE_ROOT%\iwmake_tmp.bat - if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" - echo > %IWMAKE_OUTDIR%\%IWMAKE_TMP2% - xcopy /H /Y /Q /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% - set IWMAKE_TMP4= -goto :eof - -:files - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%" - xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% -goto :eof - -:runtime - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - if "%IWMAKE_TMP2%" == "" set IWMAKE_TMP2=bin - xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcr%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% - xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcp%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% -goto :eof - -:syncqt - pushd %IWMAKE_OUTDIR% - if exist "include" rd /S /Q include - if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR% - set QTDIR=%IWMAKE_OUTDIR% - "%IWMAKE_PERLPATH%\perl" %QTDIR%\bin\syncqt -copy >> %IWMAKE_LOGFILE% 2>&1 - if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR% - popd -goto :eof - -:END diff --git a/tools/installer/batch/delete.bat b/tools/installer/batch/delete.bat deleted file mode 100755 index a923c13..0000000 --- a/tools/installer/batch/delete.bat +++ /dev/null @@ -1,73 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:destDir - if exist "%IWMAKE_OUTDIR%\%~1" rd /S /Q %IWMAKE_OUTDIR%\%~1 -goto :eof - -:dir - if exist "%IWMAKE_ROOT%\%~1" rd /S /Q %IWMAKE_ROOT%\%~1 -goto :eof - -:dirAbs - if exist "%~1" rd /S /Q %~1 -goto :eof - -:file - del /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1 - exit /b 0 -goto :eof - -:files - del /S /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1 - exit /b 0 -goto :eof - -:line - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - if exist "%IWMAKE_ROOT%\tmp_line.txt" del /Q /F "%IWMAKE_ROOT%\tmp_line.txt" >> %IWMAKE_LOGFILE% - type "%IWMAKE_ROOT%\%IWMAKE_TMP%" | find /V "%IWMAKE_TMP2%" >> "%IWMAKE_ROOT%\tmp_line.txt" - xcopy /Y /Q /R %IWMAKE_ROOT%\tmp_line.txt %IWMAKE_ROOT%\%IWMAKE_TMP% >> %IWMAKE_LOGFILE% -goto :eof - -:END diff --git a/tools/installer/batch/env.bat b/tools/installer/batch/env.bat deleted file mode 100755 index c1faceb..0000000 --- a/tools/installer/batch/env.bat +++ /dev/null @@ -1,141 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:setglobals -set IWMAKE_PARSESECTION=1 -set IWMAKE_MINGWPATH=c:\MinGW\bin -set IWMAKE_STARTDIR=%CD% -set IWMAKE_NSISCONF=%IWMAKE_SCRIPTDIR%\nsis\config.nsh -set IWMAKE_ROOT=c:\package -set IWMAKE_OUTDIR=%IWMAKE_ROOT% -set IWMAKE_SRCDIR=%IWMAKE_ROOT% -set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT% -set IWMAKE_NSISPATH=%PROGRAMFILES%\NSIS -call %IWMAKE_SCRIPTDIR%\batch\log.bat fileAbs "%IWMAKE_STARTDIR%\log.txt" -goto :eof - -:signPath - set IWMAKE_SIGNPATH=%~1 -goto :eof - -:wgetPath - set IWMAKE_WGET=%~1 -goto :eof - -:wgetDir - set IWMAKE_WGET=%IWMAKE_ROOT%\%~1 -goto :eof - -:NSISPath - set IWMAKE_NSISPATH=%~1 -goto :eof - -:PerlPath - set IWMAKE_PERLPATH=%~1 -goto :eof - -:MinGWPath - set IWMAKE_MINGWPATH=%~1 -goto :eof - -:unzipApp - set IWMAKE_UNZIPAPP=%~1 -goto :eof - -:releaseLocation - set IWMAKE_WGETUSER= - set IWMAKE_WGETPASS= - for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& if not "%%~n"=="" set IWMAKE_TMP2=%%~n& if not "%%~o"=="" set IWMAKE_TMP3=%%~o - if not "%IWMAKE_TMP2%"=="" set IWMAKE_WGETUSER=--http-user=%IWMAKE_TMP2% - if not "%IWMAKE_TMP3%"=="" set IWMAKE_WGETPASS=--http-passwd=%IWMAKE_TMP3% - set IWMAKE_RELEASELOCATION=%IWMAKE_TMP% -goto :eof - -:removeglobals -if not "%IWMAKE_OLD_PATH%"=="" call %IWMAKE_SCRIPTDIR%\batch\build.bat finish -set IWMAKE_RELEASELOCATION= -set IWMAKE_NSISPATH= -set IWMAKE_SECTION= -set IWMAKE_WGET= -set IWMAKE_WGETUSER= -set IWMAKE_WGETPASS= -set IWMAKE_UNZIPAPP= -set IWMAKE_MINGWPATH= -set IWMAKE_MAKE= -set IWMAKE_PERLPATH= -set IWMAKE_STARTDIR= -set IWMAKE_SCRIPTDIR= -set IWMAKE_NSISCONF= -set IWMAKE_RESULT= -set IWMAKE_TMP= -set IWMAKE_TMP2= -set IWMAKE_TMP3= -set IWMAKE_STATUS= -set IWMAKE_LOGFILE= -set IWMAKE_BUILD= -set IWMAKE_ROOT= -set IWMAKE_OUTDIR= -set IWMAKE_EXTERNAL= -set IWMAKE_OLD_PATH= -set IWMAKE_OLD_QMAKESPEC= -set IWMAKE_OLD_QTDIR= -set IWMAKE_OLD_INCLUDE= -set IWMAKE_OLD_LIB= -set IWMAKE_COMPILER= -set IWMAKE_SRCDIR= -set IWMAKE_EXTRACTSRC= -set IWMAKE_EXTRACTDEST= -set IWMAKE_PARSESECTION= -set IWMAKE_OUTPUT_FILE= -set IWMAKE_SIGNPATH= -goto :eof - -:root -set IWMAKE_ROOT=%~1 -goto :eof - -:extroot -set IWMAKE_EXTERNAL=%~1 -goto :eof - -:END diff --git a/tools/installer/batch/extract.bat b/tools/installer/batch/extract.bat deleted file mode 100755 index 7f14a9b..0000000 --- a/tools/installer/batch/extract.bat +++ /dev/null @@ -1,83 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:dest - set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT%\%~1 -goto :eof - -:extUnpack - set IWMAKE_EXTRACTSRC=%~n1 - pushd %IWMAKE_ROOT% - if exist "%IWMAKE_EXTRACTSRC%.zip" del /Q /F "%IWMAKE_EXTRACTSRC%.zip" - %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE% 2>&1 - popd - call :unpack "%~1" -goto :eof - -:unpack - set IWMAKE_EXTRACTSRC=%~n1 - pushd %IWMAKE_ROOT% - if exist "%IWMAKE_EXTRACTDEST%" rd /S /Q %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE% 2>&1 - if exist "%IWMAKE_EXTRACTSRC%" rd /S /Q %IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE% 2>&1 - %IWMAKE_UNZIPAPP% %IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE% - popd - move %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE% -goto :eof - -:extPatch - pushd %IWMAKE_ROOT% - if exist "%~1" del /Q /F "%~1" - %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%~1 >> %IWMAKE_LOGFILE% 2>&1 - popd - call :patch "%~1" -goto :eof - -:patch - pushd %IWMAKE_ROOT% - %IWMAKE_UNZIPAPP% %~1 >> %IWMAKE_LOGFILE% - popd - xcopy /R /I /S /Q /Y %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC%\*.* %IWMAKE_EXTRACTDEST%\ >> %IWMAKE_LOGFILE% - rd /S /Q %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE% -goto :eof - -:END diff --git a/tools/installer/batch/installer.bat b/tools/installer/batch/installer.bat deleted file mode 100755 index 75e8680..0000000 --- a/tools/installer/batch/installer.bat +++ /dev/null @@ -1,247 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:begin - call :reset - echo !define PRODUCT_NAME "%~1" >> %IWMAKE_NSISCONF% - echo !define INSTALL_ROOT "%IWMAKE_ROOT%" >> %IWMAKE_NSISCONF% -goto :eof - -:output - set IWMAKE_OUTPUT_FILE=%~1 - echo !define OUTPUT_FILE "%~1" >> %IWMAKE_NSISCONF% -goto :eof - -:module - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 - echo !define MODULE_%IWMAKE_RESULT% >> %IWMAKE_NSISCONF% -goto :eof - -:enable - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 - echo !define USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF% -goto :eof - -:disable - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 - echo !undef USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF% -goto :eof - -:startmenu - echo !define DEFAULT_STARTMENU_STRING "%~1" >> %IWMAKE_NSISCONF% -goto :eof - -:reset - if exist "%IWMAKE_NSISCONF%" del /Q /F "%IWMAKE_NSISCONF%" -goto :eof - -:instdir - for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o" - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - echo !define INSTDIR_%IWMAKE_TMP2% %IWMAKE_RESULT:"=% >> "%IWMAKE_NSISCONF%" - echo !define INSTDIR_%IWMAKE_TMP2%_TEXT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" -goto :eof - -:version - echo !define PRODUCT_VERSION "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:readme - echo !define README_FILE "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:licenseFile - echo !define LICENSE_FILE "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:runfunction - echo !define RUN_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:readmefunction - echo !define README_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:welcomenote - echo !define WELCOME_NOTE "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:updateplugins - call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync INetLoad - xcopy /Q /Y /R "%IWMAKE_ROOT%\INetLoad\INetLoad.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE% -:: xcopy /Q /Y /R "%IWMAKE_SCRIPTDIR%\nsis\qtnsisext\qtnsisext.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE% -goto :eof - -:defineDir - for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - set IWMAKE_TMP=%IWMAKE_RESULT% - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2% - set IWMAKE_TMP2=%IWMAKE_RESULT% - echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% "%IWMAKE_ROOT%\%IWMAKE_TMP3%" >> "%IWMAKE_NSISCONF%" -goto :eof - -:define - for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o" - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - set IWMAKE_TMP=%IWMAKE_RESULT% - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2% - set IWMAKE_TMP2=%IWMAKE_RESULT% - if %IWMAKE_TMP3%=="" set IWMAKE_TMP3= - echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" -goto :eof - -:src - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - set IWMAKE_TMP=%IWMAKE_RESULT% - set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" - echo !define MODULE_%IWMAKE_TMP%_ROOT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" -goto :eof - -:buildDir - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - set IWMAKE_TMP=%IWMAKE_RESULT% - set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" - echo !define MODULE_%IWMAKE_TMP%_BUILDDIR %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" - for /F "eol=- tokens=1,2,3" %%m in ('%SystemRoot%\system32\find "QT_PACKAGEDATE_STR" %IWMAKE_ROOT%\%IWMAKE_TMP2%\src\corelib\global\qglobal.h') do echo !define MODULE_LICENSECHECK_PACKAGEDATE %%o >> "%IWMAKE_NSISCONF%" -goto :eof - -:compile - call :required - pushd %IWMAKE_SCRIPTDIR%\nsis - "%IWMAKE_NSISPATH%\makensis.exe" installer.nsi >> %IWMAKE_LOGFILE% - popd -goto :eof - -:required - call :setrequired PRODUCT_NAME - call :setrequired INSTALL_ROOT - call :setrequired PRODUCT_VERSION - call :setrequired OUTPUT_FILE - call :setrequired INSTDIR_0 - call :setrequired DEFAULT_STARTMENU_STRING -goto :eof - -:setrequired - echo !ifndef %1 >> "%IWMAKE_NSISCONF%" - echo !error "%1 must be in the .conf file..." >> "%IWMAKE_NSISCONF%" - echo !endif >> "%IWMAKE_NSISCONF%" -goto :eof - -:makeFileList - for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n - call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% - set IWMAKE_TMP=%IWMAKE_RESULT% - set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" - - - echo !macro MODULE_%IWMAKE_TMP%_INSTALLFILES >> "%IWMAKE_NSISCONF%" - - pushd %IWMAKE_TMP3% - - echo set IWMAKE_TMP2=%%IWMAKE_TMP2:%CD%\=%% > "%IWMAKE_ROOT%\iwmake_tmp.bat" - - dir /AD /B /S | %SystemRoot%\system32\sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt" - for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallDirectory "%%m" - - - dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt" - for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallFile "%%m" - - popd - echo !macroend >> "%IWMAKE_NSISCONF%" - - - echo !macro MODULE_%IWMAKE_TMP%_REMOVE removepath >> "%IWMAKE_NSISCONF%" - echo strcmp ${removepath} "" MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL >> "%IWMAKE_NSISCONF%" - pushd %IWMAKE_TMP3% - - echo set IWMAKE_TMP2=%%IWMAKE_TMP2:%CD%\=%% > "%IWMAKE_ROOT%\iwmake_tmp.bat" - - dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt" - for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveFiles "%%m" - - dir /AD /B /S | %SystemRoot%\system32\sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt" - for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveDirectory "%%m" - - popd - echo MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL: >> "%IWMAKE_NSISCONF%" - echo !macroend >> "%IWMAKE_NSISCONF%" -goto :eof - -:addInstallFile - set IWMAKE_TMP2=%~1 - call "%IWMAKE_ROOT%\iwmake_tmp.bat" - echo File "/oname=%IWMAKE_TMP2%" "%~1" >> "%IWMAKE_NSISCONF%" -goto :eof - -:addInstallDirectory - set IWMAKE_TMP2=%~1 - call "%IWMAKE_ROOT%\iwmake_tmp.bat" - echo CreateDirectory "$OUTDIR\%IWMAKE_TMP2%" >> "%IWMAKE_NSISCONF%" -goto :eof - -:addRemoveDirectory - set IWMAKE_TMP2=%~1 - call "%IWMAKE_ROOT%\iwmake_tmp.bat" - echo RMDir ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%" -goto :eof - -:addRemoveFiles - set IWMAKE_TMP2=%~1 - call "%IWMAKE_ROOT%\iwmake_tmp.bat" - echo Delete ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%" -goto :eof - -:sign - echo Signing Installer ... - %IWMAKE_SIGNPATH%\signtool.exe sign /v /t http://timestamp.verisign.com/scripts/timestamp.dll /f "%IWMAKE_SIGNPATH%\keys.pfx" "%IWMAKE_OUTPUT_FILE%" >> %IWMAKE_LOGFILE% -goto :eof - -:openpackage - echo !define OPENSOURCE_BUILD >> "%IWMAKE_NSISCONF%" -goto :eof - -:END diff --git a/tools/installer/batch/log.bat b/tools/installer/batch/log.bat deleted file mode 100755 index 782dcd7..0000000 --- a/tools/installer/batch/log.bat +++ /dev/null @@ -1,58 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -call :%1 %2 -goto END - -:file -set IWMAKE_LOGFILE=%IWMAKE_ROOT%\%~1 -call :reset -goto :eof - -:fileAbs -set IWMAKE_LOGFILE=%1 -call :reset -goto :eof - -:reset -date /T > %IWMAKE_LOGFILE% -goto :eof - -:END diff --git a/tools/installer/batch/toupper.bat b/tools/installer/batch/toupper.bat deleted file mode 100755 index 2543207..0000000 --- a/tools/installer/batch/toupper.bat +++ /dev/null @@ -1,69 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -set IWMAKE_RESULT=%1 -if [%IWMAKE_RESULT%]==[] goto :eof -set IWMAKE_RESULT=%IWMAKE_RESULT:a=A% -set IWMAKE_RESULT=%IWMAKE_RESULT:b=B% -set IWMAKE_RESULT=%IWMAKE_RESULT:c=C% -set IWMAKE_RESULT=%IWMAKE_RESULT:d=D% -set IWMAKE_RESULT=%IWMAKE_RESULT:e=E% -set IWMAKE_RESULT=%IWMAKE_RESULT:f=F% -set IWMAKE_RESULT=%IWMAKE_RESULT:g=G% -set IWMAKE_RESULT=%IWMAKE_RESULT:h=H% -set IWMAKE_RESULT=%IWMAKE_RESULT:i=I% -set IWMAKE_RESULT=%IWMAKE_RESULT:j=J% -set IWMAKE_RESULT=%IWMAKE_RESULT:k=K% -set IWMAKE_RESULT=%IWMAKE_RESULT:l=L% -set IWMAKE_RESULT=%IWMAKE_RESULT:m=M% -set IWMAKE_RESULT=%IWMAKE_RESULT:n=N% -set IWMAKE_RESULT=%IWMAKE_RESULT:o=O% -set IWMAKE_RESULT=%IWMAKE_RESULT:p=P% -set IWMAKE_RESULT=%IWMAKE_RESULT:q=Q% -set IWMAKE_RESULT=%IWMAKE_RESULT:r=R% -set IWMAKE_RESULT=%IWMAKE_RESULT:s=S% -set IWMAKE_RESULT=%IWMAKE_RESULT:t=T% -set IWMAKE_RESULT=%IWMAKE_RESULT:u=U% -set IWMAKE_RESULT=%IWMAKE_RESULT:v=V% -set IWMAKE_RESULT=%IWMAKE_RESULT:w=W% -set IWMAKE_RESULT=%IWMAKE_RESULT:x=X% -set IWMAKE_RESULT=%IWMAKE_RESULT:y=Y% -set IWMAKE_RESULT=%IWMAKE_RESULT:z=Z% - diff --git a/tools/installer/config/config.default.sample b/tools/installer/config/config.default.sample deleted file mode 100644 index a05b8d7..0000000 --- a/tools/installer/config/config.default.sample +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################# -## -## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -## All rights reserved. -## Contact: Nokia Corporation (qt-info@nokia.com) -## -## This file is part of the tools applications of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## No Commercial Usage -## This file contains pre-release code and may not be distributed. -## You may use this file in accordance with the terms and conditions -## contained in the Technology Preview License Agreement accompanying -## this package. -## -## 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, Nokia gives you certain additional -## rights. These rights are described in the Nokia Qt LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## If you have questions regarding the use of this file, please contact -## Nokia at qt-info@nokia.com. -## -## -## -## -## -## -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -# root directory -# Describes the directory where temporary folder, build directory and -# package will be located at. -env root "c:\qt_packages" - -# where to find all external files -# To resolve the external dependencies specify a server, where to get -# required tools like wget, sign, etc. -env extroot "\\someshare\tools\" - -# Location of the installed MinGW to build binaries -env mingwPath "c:\mingw" - -# Location to NSIS package creator -env NSISPath "%ProgramFiles%\NSIS" - -# Location to the install path of PERL -env perlPath "c:\Perl\bin" - -# source package directory -# Describe the directory where compressed source package is located at. -# The installer script uses this one for building and creating a package. -env releaseLocation "http://your.source.server/somepath" diff --git a/tools/installer/config/mingw-opensource.conf b/tools/installer/config/mingw-opensource.conf deleted file mode 100644 index 6cba06e..0000000 --- a/tools/installer/config/mingw-opensource.conf +++ /dev/null @@ -1,136 +0,0 @@ -############################################################################# -## -## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -## All rights reserved. -## Contact: Nokia Corporation (qt-info@nokia.com) -## -## This file is part of the tools applications of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## No Commercial Usage -## This file contains pre-release code and may not be distributed. -## You may use this file in accordance with the terms and conditions -## contained in the Technology Preview License Agreement accompanying -## this package. -## -## 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, Nokia gives you certain additional -## rights. These rights are described in the Nokia Qt LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## If you have questions regarding the use of this file, please contact -## Nokia at qt-info@nokia.com. -## -## -## -## -## -## -## -## -## $QT_END_LICENSE$ -## -############################################################################# -#extracts the package to buildDir - -#extract dest "build_mingw_opensource" -#Section EXTRACT -#extract extUnpack "qt-win-opensource-src-%VERSION%.zip" -#SectionEnd - -#build the binaries -#build begin mingw "build_mingw_opensource" - -#Section CONFIGURE -#build configure "-confirm-license -release -plugin-sql-sqlite -qt-libpng -qt-libjpeg" -#SectionEnd - -#Section BUILD -#build bin -#SectionEnd - -#build finish - -# organize release files -#Section ORGANIZE -#delete dir "release_mingw_opensource" - -#copy dest "release_mingw_opensource" -#copy src "build_mingw_opensource" - -# extract everything once more -#extract dest "release_mingw_opensource" -#extract unpack "qt-win-opensource-src-4.4.3.zip" - -# qconfig.h -#copy file "src\corelib\global\qconfig.h" -#copy file "include\QtCore\qconfig.h" -#copy file "include\Qt\qconfig.h" - -# qconfig.pri -#copy file "mkspecs\qconfig.pri" - -# .qmake.cache -#copy file ".qmake.cache" - -# default mkspec -#copy files "mkspecs\default\*" "mkspecs\default\" - -# copy all binary files -#copy all "*.a" -#copy all "*.exe" -#copy all "*.dll" - -# .prl files -#copy files "lib\*.prl" "lib\" - -# remove unused stuff -#delete files "lib\*.dll" - -# copy InetLoad license info -#copy files "..\INetLoad\Readme.txt" "src\3rdparty\InetLoad\" - -#SectionEnd - -Section NSIS -# general installer options -installer begin "Qt OpenSource" -installer version "4.4.3" -installer output "c:\iwmake\qt-win-opensource-4.4.3-mingw.exe" -installer startmenu "Qt by Nokia v4.4.3 (OpenSource)" -installer enable component_page -installer enable directory_page -installer enable startmenu_page -installer instdir mingw 0 "Qt Installation Directory" -installer licenseFile "%IWMAKE_ROOT%\release_mingw_opensource\LICENSE.GPL" -#installer licenseFile "%IWMAKE_ROOT%\release_mingw_opensource\LICENSE.PREVIEW.OPENSOURCE" - -installer runfunction "Run Examples and Demos" -installer readmefunction "Show Documentation" - -installer module registeruiext -installer module opensource - -# mingw options -installer module mingw -installer src mingw "release_mingw_opensource" -installer makeFileList mingw "release_mingw_opensource" -installer buildDir mingw "build_mingw_opensource" -installer enable nodirlengthcheck - -# public generatable package -installer openpackage - -SectionEnd - -# compile the package -Section NSIS_COMPILE -installer compile -SectionEnd diff --git a/tools/installer/iwmake.bat b/tools/installer/iwmake.bat deleted file mode 100755 index 0fc1b08..0000000 --- a/tools/installer/iwmake.bat +++ /dev/null @@ -1,124 +0,0 @@ -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -:: All rights reserved. -:: Contact: Nokia Corporation (qt-info@nokia.com) -:: -:: This file is part of the tools applications of the Qt Toolkit. -:: -:: $QT_BEGIN_LICENSE:LGPL$ -:: No Commercial Usage -:: This file contains pre-release code and may not be distributed. -:: You may use this file in accordance with the terms and conditions -:: contained in the Technology Preview License Agreement accompanying -:: this package. -:: -:: 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, Nokia gives you certain additional -:: rights. These rights are described in the Nokia Qt LGPL Exception -:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -:: -:: If you have questions regarding the use of this file, please contact -:: Nokia at qt-info@nokia.com. -:: -:: -:: -:: -:: -:: -:: -:: -:: $QT_END_LICENSE$ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -rem @echo off -call :init -if "%IWMAKE_STATUS%"=="failed" goto FAILED -if not exist "%IWMAKE_SCRIPTDIR%\config\%1.conf" goto FAILED -if not "%~2"=="" set IWMAKE_SECTION=%~2 -for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.default) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j -if "%IWMAKE_STATUS%"=="failed" goto FAILED -if exist "%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%" for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j -if "%IWMAKE_STATUS%"=="failed" goto FAILED -call :checkrequirements -if "%IWMAKE_STATUS%"=="failed" goto FAILED -for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\%1.conf) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j -if "%IWMAKE_STATUS%"=="failed" goto FAILED -goto DONE - -:func_delegate -if "%IWMAKE_STATUS%"=="failed" goto :eof -set IWMAKE_TMP="%IWMAKE_TMP:"=%" - -if /i "%1"=="sectionend" echo Leaving Section& set IWMAKE_PARSESECTION=1& goto :eof -if /i not "%1"=="section" goto callScript -echo Entering Section %~2 -for %%m in (%IWMAKE_SECTION%) do call :checkSection %%m %~2 -goto :eof - -:callScript -if "%IWMAKE_PARSESECTION%"=="0" goto :eof - -call "%IWMAKE_SCRIPTDIR%\batch\%1.bat" %2 %IWMAKE_TMP% -if not "%errorlevel%"=="0" echo %1 %2 failed! >> %IWMAKE_LOGFILE%& set IWMAKE_STATUS=failed -goto :eof - -:checkSection - if /i "%1"=="%2" echo Skipping Section& set IWMAKE_PARSESECTION=0 -goto :eof - -:checkrequirements - if not exist %IWMAKE_ROOT% mkdir %IWMAKE_ROOT% - if not "%IWMAKE_SIGNPATH%"=="" goto CheckSIGNOK - call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sign - call "%IWMAKE_SCRIPTDIR%\batch\env.bat" signPath "%IWMAKE_ROOT%\sign" -:CheckSIGNOK - if not "%IWMAKE_WGET%"=="" goto CheckWGETOK - call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync wget - call "%IWMAKE_SCRIPTDIR%\batch\env.bat" wgetDir wget -:CheckWGETOK - if exist "%IWMAKE_PERLPATH%\perl.exe" goto CheckPerlOK - set IWMAKE_STATUS=failed - echo Perl not found in %IWMAKE_PERLPATH%! (check your config file) -:CheckPerlOK - if not "%IWMAKE_UNZIPAPP%"=="" goto CheckUNZIPOK - call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync unzip - call "%IWMAKE_SCRIPTDIR%\batch\env.bat" unzipApp "%IWMAKE_ROOT%\unzip\unzip.exe" -:CheckUNZIPOK - if exist "%IWMAKE_NSISPATH%\makensis.exe" goto CheckNSISOK - set IWMAKE_STATUS=failed - echo NSIS not found! (check your config file) -:CheckNSISOK - call "%IWMAKE_SCRIPTDIR%\batch\installer.bat" updateplugins -goto :eof - -:init - set IWMAKE_SCRIPTDIR=%~dp0 - set IWMAKE_SCRIPTDIR=%IWMAKE_SCRIPTDIR:~0,-1% - call "%IWMAKE_SCRIPTDIR%\batch\env.bat" setglobals -goto :eof - -:cleanup - pushd "%IWMAKE_STARTDIR%" - call "%IWMAKE_SCRIPTDIR%\batch\env.bat" removeglobals - popd -goto :eof - -:FAILED - call :cleanup - echo Failed! -goto END - -:DONE - call :cleanup - echo Done! -goto END - -:END diff --git a/tools/installer/nsis/confirmpage.ini b/tools/installer/nsis/confirmpage.ini deleted file mode 100644 index b42132c..0000000 --- a/tools/installer/nsis/confirmpage.ini +++ /dev/null @@ -1,59 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Ini file generated by the HM NIS Edit IO designer. -[Settings] -NumFields=2 - -[Field 1] -Type=Label -Text=The following components will be uninstalled: -Left=1 -Right=298 -Top=1 -Bottom=12 - -[Field 2] -Type=Label -Left=16 -Right=298 -Top=16 -Bottom=136 - diff --git a/tools/installer/nsis/gwdownload.ini b/tools/installer/nsis/gwdownload.ini deleted file mode 100644 index c139aaf..0000000 --- a/tools/installer/nsis/gwdownload.ini +++ /dev/null @@ -1,118 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Ini file generated by the HM NIS Edit IO designer. -[Settings] -NumFields=9 - -[Field 1] -Type=Groupbox -Text=Find MinGW -Left=0 -Right=299 -Top=49 -Bottom=91 - -[Field 2] -Type=Label -Text=Please specify a directory where to find MinGW (for instance: C:\\MinGW). If you do not have MinGW installed, you can let the installer download and install it for you. -Left=2 -Right=298 -Top=1 -Bottom=27 - -[Field 3] -Type=DirRequest -Left=8 -Right=290 -Top=68 -Bottom=81 - -[Field 4] -Type=Groupbox -Text=Download and install MinGW -Left=0 -Right=299 -Top=94 -Bottom=137 - -[Field 5] -Type=Label -Text=Previously installed MinGW: -Left=8 -Right=286 -Top=60 -Bottom=68 - -[Field 6] -Type=DirRequest -Left=8 -Right=290 -Top=116 -Bottom=129 -Flags=DISABLED - -[Field 7] -Type=Label -Text=Installation directory: -Left=8 -Right=124 -Top=107 -Bottom=115 -Flags=DISABLED - -[Field 8] -Type=Checkbox -Text=Download and install minimal MinGW installation. -Left=8 -Right=172 -Top=28 -Bottom=40 -Flags=NOTIFY - -[Field 9] -Type=Link -Text=(http://www.mingw.org) -Left=174 -Right=260 -Top=30 -Bottom=38 -State=http://www.mingw.org - diff --git a/tools/installer/nsis/gwmirror.ini b/tools/installer/nsis/gwmirror.ini deleted file mode 100644 index e246080..0000000 --- a/tools/installer/nsis/gwmirror.ini +++ /dev/null @@ -1,67 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Ini file generated by the HM NIS Edit IO designer. -[Settings] -NumFields=3 - -[Field 1] -Type=Label -Text=Select a mirror where to download MinGW: -Left=0 -Right=211 -Top=0 -Bottom=8 - -[Field 2] -Type=Checkbox -Text=Download MinGW source code. (You don't need this to compile Qt) -Left=4 -Right=296 -Top=124 -Bottom=134 - -[Field 3] -Type=Listbox -Left=0 -Right=299 -Top=9 -Bottom=118 - diff --git a/tools/installer/nsis/images/install.ico b/tools/installer/nsis/images/install.ico deleted file mode 100644 index 080d82d..0000000 Binary files a/tools/installer/nsis/images/install.ico and /dev/null differ diff --git a/tools/installer/nsis/images/qt-header.bmp b/tools/installer/nsis/images/qt-header.bmp deleted file mode 100644 index 1333cb4..0000000 Binary files a/tools/installer/nsis/images/qt-header.bmp and /dev/null differ diff --git a/tools/installer/nsis/images/qt-wizard.bmp b/tools/installer/nsis/images/qt-wizard.bmp deleted file mode 100644 index 4aefd2d..0000000 Binary files a/tools/installer/nsis/images/qt-wizard.bmp and /dev/null differ diff --git a/tools/installer/nsis/includes/global.nsh b/tools/installer/nsis/includes/global.nsh deleted file mode 100644 index d91a039..0000000 --- a/tools/installer/nsis/includes/global.nsh +++ /dev/null @@ -1,143 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!include "StrFunc.nsh" -!include "includes\list.nsh" - -${StrCase} -${StrTrimNewLines} -${StrStr} -${StrRep} -${UnStrRep} - -var STARTMENU_STRING -var PRODUCT_UNIQUE_KEY -var RUNNING_AS_ADMIN - -!ifndef MODULE_MINGW - !ifdef MODULE_MSVC_VC60 - !define INSTALL_COMPILER "vc60" - !else - !ifdef MODULE_MSVC_VS2002 - !define INSTALL_COMPILER "vs2002" - !else - !ifdef MODULE_MSVC_VS2005 - !define INSTALL_COMPILER "vs2005" - !else - !define INSTALL_COMPILER "vs2003" - !endif - !endif - !endif -!else - !define INSTALL_COMPILER "mingw" -!endif - -; ADDIN\INTEGRATION -var VS_VERSION -var VS_VERSION_SHORT -var ADDIN_INSTDIR -var VSIP_INSTDIR -var HELP_INSTDIR -var ECLIPSE_INSTDIR -var QTJAMBIECLIPSE_INSTDIR - -; LICENSECHECK -var LICENSE_KEY -var LICENSEE -var LICENSE_PRODUCT -var LICENSE_FILE - -; MSVC -!ifdef MODULE_MSVC - !define MSVC_ValidateDirectory - var MSVC_INSTDIR -!endif - -; MINGW -!ifdef MODULE_MINGW - !define MINGW_ValidateDirectory - var MINGW_INSTDIR -!endif - -; QSA -var QSA_INSTDIR - -; QTDIR PAGE -var QTDIR_SELECTED -var COMPILER_SELECTED - -; used by addin7x and vsip -!ifndef MODULE_VSIP_ROOT - !define MODULE_VSIP_ROOT "${INSTALL_ROOT}\vsip" -!endif - -; add to confirm path -var UninstallerConfirmProduct - -Function un.ConfirmOnDelete - exch $0 - push $1 - - push "$0" - push "$UninstallerConfirmProduct" - call un.ItemInList - pop $1 - IntCmp $1 1 ConfirmOnDeleteDone - - strcmp "$UninstallerConfirmProduct" "" 0 +3 - strcpy $UninstallerConfirmProduct "$0" - goto +2 - strcpy $UninstallerConfirmProduct "$UninstallerConfirmProduct$\r$\n$0" - - ConfirmOnDeleteDone: - pop $1 - pop $0 -FunctionEnd - -!macro ConfirmOnRemove REG_KEY PRODUCT_NAME - push $0 - ClearErrors - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "${REG_KEY}" - intcmp $0 1 0 +3 - push "${PRODUCT_NAME}" - call un.ConfirmOnDelete - ClearErrors - pop $0 -!macroend diff --git a/tools/installer/nsis/includes/instdir.nsh b/tools/installer/nsis/includes/instdir.nsh deleted file mode 100644 index a0957dd..0000000 --- a/tools/installer/nsis/includes/instdir.nsh +++ /dev/null @@ -1,254 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifndef INSTDIR_1 - !macro INSTDIR_INITIALIZE - !define MUI_DIRECTORYPAGE_VARIABLE $${INSTDIR_0}_INSTDIR - !ifdef ${INSTDIR_0}_ValidateDirectory - !define MUI_PAGE_CUSTOMFUNCTION_LEAVE "${INSTDIR_0}_ValidateDirectoryFunc" - !endif - !insertmacro MUI_PAGE_DIRECTORY - !macroend - !macro INSTDIR_FUNCTIONS - !macroend - !macro INSTDIR_STARTUP - !macroend -!else -!macro INSTDIR_INITIALIZE - !define INSTDIR_INI_FILE "instdir.ini" - !define INSTDIR_0_DIRFIELD "Field 10" - !define INSTDIR_0_TEXTFIELD "Field 13" - !define INSTDIR_1_DIRFIELD "Field 7" - !define INSTDIR_1_TEXTFIELD "Field 11" - !define INSTDIR_2_DIRFIELD "Field 5" - !define INSTDIR_2_TEXTFIELD "Field 8" - !define INSTDIR_3_DIRFIELD "Field 3" - !define INSTDIR_3_TEXTFIELD "Field 6" - !define INSTDIR_4_DIRFIELD "Field 2" - !define INSTDIR_4_TEXTFIELD "Field 4" - !define INSTDIR_5_DIRFIELD "Field 9" - !define INSTDIR_5_TEXTFIELD "Field 12" - !define INSTDIR_DIRHEIGHT 18 - - Page custom InitInstDirs UpdateInstDirs - - LangString InstDirLicenseTitle ${LANG_ENGLISH} "Installation Directories" - LangString InstDirLicenseTitleDescription ${LANG_ENGLISH} "Select the directories where you want the software installed." -!macroend - -!macro INSTDIR_FUNCTIONS - Function InitInstDirs - push $0 - push $1 - push $2 - push $3 - - !insertmacro MUI_HEADER_TEXT "$(InstDirLicenseTitle)" "$(InstDirLicenseTitleDescription)" - strcpy $0 "129" - -!ifdef INSTDIR_0 - SectionGetFlags ${${INSTDIR_0}_SEC01} $1 -!ifdef ${INSTDIR_0}_SEC02 - SectionGetFlags ${${INSTDIR_0}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Text" "${INSTDIR_0_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "State" $${INSTDIR_0}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif -!ifdef INSTDIR_1 - SectionGetFlags ${${INSTDIR_1}_SEC01} $1 -!ifdef ${INSTDIR_1}_SEC02 - SectionGetFlags ${${INSTDIR_1}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Text" "${INSTDIR_1_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "State" $${INSTDIR_1}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif -!ifdef INSTDIR_2 - SectionGetFlags ${${INSTDIR_2}_SEC01} $1 -!ifdef ${INSTDIR_2}_SEC02 - SectionGetFlags ${${INSTDIR_2}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Text" "${INSTDIR_2_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "State" $${INSTDIR_2}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif -!ifdef INSTDIR_3 - SectionGetFlags ${${INSTDIR_3}_SEC01} $1 -!ifdef ${INSTDIR_3}_SEC02 - SectionGetFlags ${${INSTDIR_3}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Text" "${INSTDIR_3_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "State" $${INSTDIR_3}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif -!ifdef INSTDIR_4 - SectionGetFlags ${${INSTDIR_4}_SEC01} $1 -!ifdef ${INSTDIR_4}_SEC02 - SectionGetFlags ${${INSTDIR_4}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Text" "${INSTDIR_4_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "State" $${INSTDIR_4}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif -!ifdef INSTDIR_5 - SectionGetFlags ${${INSTDIR_5}_SEC01} $1 -!ifdef ${INSTDIR_5}_SEC02 - SectionGetFlags ${${INSTDIR_5}_SEC02} $3 - IntOp $1 $1 | $3 -!endif - IntOp $2 $1 & 1 ;just care about the first flag - StrCpy $1 "READONLY" - StrCmp "$2" "1" +2 - StrCpy $1 "DISABLED" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "Flags" "$1" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Text" "${INSTDIR_5_TEXT}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "State" $${INSTDIR_5}_INSTDIR -!else - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "Type" "Unknown" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Type" "Unknown" - intop $0 $0 - ${INSTDIR_DIRHEIGHT} -!endif - - !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "Field 1" "Bottom" "$0" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${INSTDIR_INI_FILE}" - - pop $3 - pop $2 - pop $1 - pop $0 - FunctionEnd - - Function UpdateInstDirs -!ifdef INSTDIR_0 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_0}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "State" - !ifdef ${INSTDIR_0}_ValidateDirectory - call ${INSTDIR_0}_ValidateDirectoryFunc - !endif -!endif -!ifdef INSTDIR_1 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_1}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "State" - !ifdef ${INSTDIR_1}_ValidateDirectory - call ${INSTDIR_1}_ValidateDirectoryFunc - !endif -!endif -!ifdef INSTDIR_2 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_2}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "State" - !ifdef ${INSTDIR_2}_ValidateDirectory - call ${INSTDIR_2}_ValidateDirectoryFunc - !endif -!endif -!ifdef INSTDIR_3 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_3}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "State" - !ifdef ${INSTDIR_3}_ValidateDirectory - call ${INSTDIR_3}_ValidateDirectoryFunc - !endif -!endif -!ifdef INSTDIR_4 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_4}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "State" - !ifdef ${INSTDIR_4}_ValidateDirectory - call ${INSTDIR_4}_ValidateDirectoryFunc - !endif -!endif -!ifdef INSTDIR_5 - !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_5}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "State" - !ifdef ${INSTDIR_5}_ValidateDirectory - call ${INSTDIR_5}_ValidateDirectoryFunc - !endif -!endif - FunctionEnd -!macroend - -!macro INSTDIR_STARTUP - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${INSTDIR_INI_FILE}" -!macroend - -!endif ;ifndef INSTDIR_1 diff --git a/tools/installer/nsis/includes/list.nsh b/tools/installer/nsis/includes/list.nsh deleted file mode 100644 index 7a2fd0a..0000000 --- a/tools/installer/nsis/includes/list.nsh +++ /dev/null @@ -1,136 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifndef LIST_INCLUDE -!define LIST_INCLUDE - -; usage: -; push item -; push list -; call ItemInList -; returns 1 or 0 -!macro ItemInList UN -Function ${UN}ItemInList - exch $0 ;list - exch - exch $1 ;item - push $2 ;counter - push $3 ;substr - push $4 ;char - - strcpy $3 "" - strcpy $2 "0" - - loop: - strcpy $4 $0 1 $2 - strcmp "$4" "" atend - intop $2 $2 + 1 - - strcmp "$4" "|" 0 +4 - strcmp "$3" "$1" found - strcpy $3 "" ;reset substr - goto +2 - strcpy $3 "$3$4" ;append char to substr - goto loop - - found: - strcpy $0 "1" - goto done - - atend: - strcmp "$3" "$1" found - strcpy $0 "0" - - done: - pop $4 - pop $3 - pop $2 - pop $1 - exch $0 -FunctionEnd -!macroend - -!insertmacro ItemInList "" -!insertmacro ItemInList "un." - -Function GetItemInList - exch $0 ;list - exch - exch $1 ;index - push $2 ;counter - push $3 ;substr - push $4 ;char - push $5 ;current index - - strcpy $3 "" - strcpy $2 "0" - strcpy $5 "1" - - loop: - strcpy $4 $0 1 $2 - strcmp "$4" "" atend - intop $2 $2 + 1 - - strcmp "$4" "|" 0 +5 - strcmp "$5" "$1" found - strcpy $3 "" ;reset substr - intop $5 $5 + 1 - goto +2 - strcpy $3 "$3$4" ;append char to substr - goto loop - - found: - strcpy $0 "$3" - goto done - - atend: - strcmp "$5" "$1" found - strcpy $0 "" - - done: - pop $5 - pop $4 - pop $3 - pop $2 - pop $1 - exch $0 -FunctionEnd - -!endif ;LIST_INCLUDE diff --git a/tools/installer/nsis/includes/qtcommon.nsh b/tools/installer/nsis/includes/qtcommon.nsh deleted file mode 100644 index a4ec01b..0000000 --- a/tools/installer/nsis/includes/qtcommon.nsh +++ /dev/null @@ -1,549 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifndef QTCOMMON_INCLUDE -!define QTCOMMON_INCLUDE - -!macro MakeQtDirectory UN -Function ${UN}MakeQtDirectory - exch $0 - - push $0 - push " " #replace - push "-" #with - call ${UN}ReplaceString - pop $0 - - push $0 - push "(" #replace - push "" #with - call ${UN}ReplaceString - pop $0 - - push $0 - push ")" #replace - push "" #with - call ${UN}ReplaceString - pop $0 - - exch $0 -FunctionEnd -!macroend -!insertmacro MakeQtDirectory "" -!insertmacro MakeQtDirectory "un." - -Function AddStartmenuApplication - exch $0 - IfFileExists "$0\assistant.exe" 0 +2 - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Assistant.lnk" "$0\assistant.exe" - IfFileExists "$0\designer.exe" 0 +2 - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Designer.lnk" "$0\designer.exe" - IfFileExists "$0\linguist.exe" 0 +2 - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Linguist.lnk" "$0\linguist.exe" - IfFileExists "$0\qtdemo.exe" 0 +2 - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" "$0\qtdemo.exe" - IfFileExists "$0\..\README" 0 ReadMeShortCutFinished - IfFileExists "$WINDIR\notepad.exe" +3 - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" "$SYSDIR\notepad.exe" "$0\..\README" - goto ReadMeShortCutFinished - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" "$WINDIR\notepad.exe" "$0\..\README" - ReadMeShortCutFinished: - pop $0 -FunctionEnd - -Function un.RemoveStartmenuApplication - Delete "$SMPROGRAMS\$STARTMENU_STRING\Assistant.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\Designer.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\Linguist.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" -FunctionEnd - -#patch the licence information -Function PatchLicenseInformation - exch $0 - push $1 - push $2 - - DetailPrint "Patching license information..." - - IfFileExists "$0\src\corelib\global\qconfig.h" 0 +3 - strcpy $2 "$0\src\corelib\global\qconfig.h" - goto PatchLicensee - - IfFileExists "$0\include\Qt\qconfig.h" 0 PatchConfigPriFile - strcpy $2 "$0\include\Qt\qconfig.h" - - PatchLicensee: - push $2 - push '#define QT_PRODUCT_LICENSEE "' - push '#define QT_PRODUCT_LICENSEE "$LICENSEE"$\r$\n' - call PatchLine - - push $2 - push '#define QT_PRODUCT_LICENSE "' - push '#define QT_PRODUCT_LICENSE "$LICENSE_PRODUCT"$\r$\n' - call PatchLine - - push $2 - ${StrCase} $1 "$LICENSE_PRODUCT" "U" - push '# define QT_EDITION QT_EDITION_' - push '# define QT_EDITION QT_EDITION_$1$\r$\n' - call PatchLine - - PatchConfigPriFile: - IfFileExists "$0\mkspecs\qconfig.pri" 0 PatchLicenseProductDone - push "$0\mkspecs\qconfig.pri" - push "QT_EDITION = " - push "QT_EDITION = $LICENSE_PRODUCT$\r$\n" - call PatchLine - - PatchLicenseProductDone: - pop $2 - pop $1 - pop $0 -FunctionEnd - -Function PatchCommonBinaryFiles - exch $2 - push $0 - push $1 - - IfFileExists "$2\bin\qmake.exe" 0 +5 - DetailPrint "Patching paths in qmake..." - push $2 - push "$2\bin\qmake.exe" - call PatchBinaryPaths - - DetailPrint "Patching paths in core..." - FindFirst $0 $1 "$2\bin\QtCore*.dll" - StrCmp $1 "" ErrorPatching - push $2 - push "$2\bin\$1" - call PatchBinaryPaths - - FindNext $0 $1 - StrCmp $1 "" ErrorPatching - push $2 - push "$2\bin\$1" - call PatchBinaryPaths - - ErrorPatching: - - pop $1 - pop $0 - pop $2 -FunctionEnd - -Function PatchBinaryPaths - exch $0 - exch - exch $2 - push $1 - -!ifndef OPENSOURCE_BUILD - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_prfxpath=" "qt_prfxpath=$2" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_docspath=" "qt_docspath=$2\doc" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_hdrspath=" "qt_hdrspath=$2\include" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_libspath=" "qt_libspath=$2\lib" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_binspath=" "qt_binspath=$2\bin" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_plugpath=" "qt_plugpath=$2\plugins" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_datapath=" "qt_datapath=$2" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_trnspath=" "qt_trnspath=$2\translations" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_xmplpath=" "qt_xmplpath=$2\examples" -!ifdef MODULE_LICENSECHECK - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_lcnsuser=" "qt_lcnsuser=$LICENSEE" - qtnsisext::PatchBinary /NOUNLOAD $0 "qt_lcnsprod=" "qt_lcnsprod=$LICENSE_PRODUCT" -!endif - qtnsisext::PatchBinary $0 "qt_demopath=" "qt_demopath=$2\demos" -!endif - - pop $1 - pop $2 - pop $0 -FunctionEnd - -#patching the prl files -Function PatchPrlFiles - exch $2 - exch - exch $3 ;buildDir - push $0 - push $1 - - FindFirst $0 $1 "$2\lib\*.prl" - loop: - StrCmp $1 "" done - DetailPrint "Patching $1..." - - push "$2\lib\$1" - push $3 - push $2 - call PatchPath - - FindNext $0 $1 - Goto loop - done: - pop $1 - pop $0 - pop $3 - pop $2 -FunctionEnd - -# -# patch line in text files -# push "qtcore4.prl" #Filename -# push "#define ..." #START WITH -# push "c:\qt" #REPLACE WITH -# call PatchLine -# -Function PatchLine - exch $2 ;replacement line - exch 2 - exch $1 ;Filename - exch - exch $0 ;start with - push $3 ; tmp filename - push $4 ; handle (tmp) - push $5 ; handle (org) - push $6 ; string - - ClearErrors - GetTempFileName $3 - IfErrors done - FileOpen $4 $3 w - IfErrors done - FileOpen $5 $1 r - IfErrors done - -nextline: - FileRead $5 $6 - IfErrors renameFile - push $6 - push $0 - push $2 - call ReplaceLine - pop $6 - FileWrite $4 $6 - goto nextline - -renameFile: - FileClose $4 - FileClose $5 - SetDetailsPrint none - Delete $1 - Rename $3 $1 - SetDetailsPrint both - - done: - pop $6 - pop $5 - pop $4 - pop $3 - pop $0 - pop $1 - pop $2 -FunctionEnd - -# -# replaces a string that starts with something, with another string -# push string -# push "#define ..." #START WITH -# push "c:\qt" #REPLACE WITH -# call ReplaceLine -# pop $0 #new string -# -Function ReplaceLine - exch $2 ;new line - exch 2 - exch $1 ;string - exch - exch $0 ;start with - - push $3 ; tmp string - push $4 ; counter - push $5 ; strlen - - StrCpy $4 "-1" - StrLen $5 $1 - - loop: - IntOp $4 $4 + 1 ;increase counter - StrCpy $3 $1 $4 ;get substring - IntCmp $4 $5 copystring ; check for end - StrCmp $3 $0 done ;start with found - goto loop - - copystring: - StrCpy $2 $1 - goto done - - done: - pop $5 - pop $4 - pop $3 - pop $0 - pop $1 - exch $2 -FunctionEnd - -# -# patch paths in text files -# push "qtcore4.prl" #Filename -# push "c:\compile" #OLD_QTDIR -# push "c:\qt" #QTDIR -# call PatchPath -# -Function PatchPath - exch $2 ;NEW - exch 2 - exch $1 ;Filename - exch - exch $0 ;OLD - push $3 ;readline - push $4 ;file 1 - push $5 ;file 2 - push $6 ;tmpfilename - - push $7 ;forward slash NEW - push $8 ;forward slash OLD - - push $2 - push "\" - push "/" - call ReplaceString - pop $7 - - push $0 - push "\" - push "/" - call ReplaceString - pop $8 - - ClearErrors - GetTempFileName $6 - IfErrors done - FileOpen $5 $6 w - IfErrors done - FileOpen $4 $1 r - IfErrors done - -nextline: - FileRead $4 $3 - IfErrors renameFile - push $3 - push $0 - push $2 - call ReplaceString ;replace backward slash path - push $8 - push $7 - call ReplaceString ;replace forward slash path - pop $3 - FileWrite $5 $3 - goto nextline - -renameFile: - FileClose $5 - FileClose $4 - SetDetailsPrint none - Delete $1 - Rename $6 $1 - SetDetailsPrint both - -done: - pop $8 - pop $7 - pop $6 - pop $5 - pop $4 - pop $3 - pop $0 - pop $1 - pop $2 -FunctionEnd - -# -# replaces a string with another string -# push string -# push "c:\qt" #replace -# push "c:\compile" #with -# call ReplaceString -# pop $0 #new string -# -!macro ReplaceString UN -Function ${UN}ReplaceString - exch $2 ;NEW - exch 2 - exch $1 ;string - exch - exch $0 ;OLD - - push $3 ; tmp string - push $4 ; counter - push $5 ; result - - push $6 ; old strlen - - StrCpy $4 "-1" - StrCpy $5 "" - - StrLen $6 $0 - - loop: - IntOp $4 $4 + 1 ;increase counter - StrCpy $3 $1 $6 $4 ;get substring - StrCmp $3 "" done ; check for end - StrCmp $3 $0 replace ;replace if old - StrCpy $3 $1 "1" $4 - StrCpy $5 $5$3 ;append character to result - goto loop - - replace: - StrCpy $5 $5$2 ;insert new qtdir - IntOp $4 $4 + $6 ;increase offset - IntOp $4 $4 - 1 ;decrease offset one more - goto loop - - done: - StrCpy $2 $5 - pop $6 - pop $5 - pop $4 - pop $3 - pop $0 - pop $1 - exch $2 -FunctionEnd -!macroend -!insertmacro ReplaceString "" -!insertmacro ReplaceString "un." - -Function CommonCheckDirectory - exch $4 - exch - exch $5 - push $0 - push $1 - push $2 - push $3 - - ; check if qt is already installed - IfFileExists "$4\bin\qmake.exe" 0 +2 - IfFileExists "$4\uninst.exe" qtExistsError - - ; check if directory is empty - FindFirst $0 $1 "$4\*" - CommonCheckDirectory_FileSearchLoop: - StrCmp $1 "" CommonCheckDirectory_DirDoesNotExist - StrCmp $1 "." CommonCheckDirectory_ContinueSearchLoop - StrCmp $1 ".." CommonCheckDirectory_ContinueSearchLoop - goto CommonCheckDirectory_FoundFile - CommonCheckDirectory_ContinueSearchLoop: - FindNext $0 $1 - goto CommonCheckDirectory_FileSearchLoop - -CommonCheckDirectory_FoundFile: - FindClose $0 - MessageBox MB_YESNO|MB_ICONEXCLAMATION "This directory already has contents. Are you sure you want to use this directory?" IDYES CommonCheckDirectory_DirDoesNotExist - Goto errorInDirectory -CommonCheckDirectory_DirDoesNotExist: - FindClose $0 - - GetInstDirError $0 - IntCmp 0 $0 0 instDirError - - StrLen $0 $4 - -!ifdef USE_NODIRLENGTHCHECK - StrCpy $1 "400" -!else - StrLen $1 $5 -!endif - - IntCmp $1 $0 0 directoryToLong - - ;check for spaces - StrCpy $2 "-1" - StrCpy $3 "" - - loop: - IntOp $2 $2 + 1 ;increase counter - StrCpy $3 $4 "1" $2 ;get char - StrCmp $3 "" directoryOk ; check for end - StrCmp $3 " " spaceInDirectory ;check for space - goto loop - -qtExistsError: - MessageBox MB_OK|MB_ICONEXCLAMATION "Qt is already installed in this directory. Please uninstall the previous version and try again." - Goto errorInDirectory - -instDirError: - MessageBox MB_OK|MB_ICONEXCLAMATION "This is not a valid installation directory." - Goto errorInDirectory - -spaceInDirectory: - MessageBox MB_OK|MB_ICONEXCLAMATION "The installation path can't contain spaces." - Goto errorInDirectory - -directoryToLong: - MessageBox MB_OK|MB_ICONEXCLAMATION "The installation directory is to long." - Goto errorInDirectory - -errorInDirectory: - pop $3 - pop $2 - pop $1 - pop $0 - pop $5 - pop $4 - Abort - goto done - -directoryOk: - pop $3 - pop $2 - pop $1 - pop $0 - pop $5 - pop $4 -done: -FunctionEnd - -!endif ;QTCOMMON_INCLUDE diff --git a/tools/installer/nsis/includes/qtenv.nsh b/tools/installer/nsis/includes/qtenv.nsh deleted file mode 100644 index 8a06888..0000000 --- a/tools/installer/nsis/includes/qtenv.nsh +++ /dev/null @@ -1,303 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifndef QTENV_INCLUDE -!define QTENV_INCLUDE -# -# creates a qtvars.bat file in $QTDIR\bin -# push "vs2003" #compiler -# push "c:\qt" #QTDIR -# call MakeQtVarsFile -# -Function MakeQtVarsFile - exch $1 ; QTDIR - exch - exch $3 ; vs version - push $0 ; file handle - push $2 - push $4 - - push $3 - call GetMkSpec - pop $2 - - ClearErrors - FileOpen $0 "$1\bin\qtvars.bat" w - IfErrors done - FileWrite $0 "@echo off$\r$\n" - FileWrite $0 "rem$\r$\n" - FileWrite $0 "rem This file is generated$\r$\n" - FileWrite $0 "rem$\r$\n" - FileWrite $0 "$\r$\n" - FileWrite $0 "echo Setting up a Qt environment...$\r$\n" - FileWrite $0 "echo -- QTDIR set to $1$\r$\n" - FileWrite $0 "echo -- Added $1\bin to PATH$\r$\n" - FileWrite $0 "echo -- QMAKESPEC set to $2$\r$\n" - FileWrite $0 "$\r$\n" - FileWrite $0 "set QTDIR=$1$\r$\n" - FileWrite $0 "set PATH=$1\bin;%PATH%$\r$\n" - FileWrite $0 "set QMAKESPEC=$2$\r$\n" - - call IsExpressVersion - pop $4 - strcmp $4 "" noExpressVersion - FileWrite $0 "$\r$\n" - FileWrite $0 'regedit /e S$$D$$K$$ "HKEY_LOCAL_MACHINE\Software\Microsoft\MicrosoftSDK"$\r$\n' - Filewrite $0 'if not exist S$$D$$K$$ goto ENDSDK\r$\n' - FileWrite $0 'find "Install Dir" < S$$D$$K$$ > D$$I$$R$$$\r$\n' - FileWrite $0 'del S$$D$$K$$$\r$\n' - FileWrite $0 'for /f "tokens=2 delims==" %%i in (D$$I$$R$$) do call %%i\setenv$\r$\n' - FileWrite $0 'del D$$I$$R$$$\r$\n' - Filewrite $0 ':ENDSDK\r$\n' - noExpressVersion: - - push $3 - call GetVSVarsFile - pop $2 - strcmp $2 "" novsvars - FileWrite $0 "$\r$\n" - FileWrite $0 'if not "%1"=="vsvars" goto END$\r$\n' - FileWrite $0 'call "$2"$\r$\n' - FileWrite $0 ":END$\r$\n" - - FileWrite $0 "$\r$\n" - FileWrite $0 'if not "%1"=="vsstart" goto ENDSTARTVS$\r$\n' - FileWrite $0 'call "$2"$\r$\n' - - strcmp $3 "vc60" vc60startup - FileWrite $0 "devenv /useenv$\r$\n" - Goto donevsstartup - vc60startup: - FileWrite $0 "msdev /useenv$\r$\n" - donevsstartup: - - FileWrite $0 ":ENDSTARTVS$\r$\n" - - novsvars: - FileWrite $0 "$\r$\n" - FileClose $0 - done: - pop $4 - pop $2 - pop $0 - pop $3 - pop $1 -FunctionEnd - -Function GetMkSpec - exch $0 - StrCmp $0 "mingw" MINGW - StrCmp $0 "vs2005" VS2005 - StrCmp $0 "vs2003" VS2003 - StrCmp $0 "vs2002" VS2002 - StrCmp $0 "vc60" VS60 - StrCmp $0 "icc" ICC - - MINGW: - pop $0 - push "win32-g++" - goto done - - VS2005: - pop $0 - push "win32-msvc2005" - goto done - - VS2003: - pop $0 - push "win32-msvc.net" - goto done - - VS2002: - pop $0 - push "win32-msvc.net" - goto done - - VS60: - pop $0 - push "win32-msvc" - goto done - - ICC: - pop $0 - push "win32-icc" - goto done - - done: -FunctionEnd - -!define AD_COMPILER_NAME_VS2005 "Visual Studio .NET 2005" -!define AD_COMPILER_NAME_VS2005_EXPRESS "Visual C++ 2005 Express Edition" -!define AD_COMPILER_NAME_VS2003 "Visual Studio .NET 2003" -!define AD_COMPILER_NAME_VS2002 "Visual Studio .NET 2002" -!define AD_COMPILER_NAME_VC60 "Visual Studio 6.0" -!define AD_COMPILER_NAME_ICC "Intel C++ Compiler" -!define AD_COMPILER_NAME_MINGW "MinGW (Must be in PATH!)" - -Function GetShortCompilerName - exch $0 - - strcmp "$0" "${AD_COMPILER_NAME_VS2005}" 0 +3 - strcpy $0 "vs2005" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_VS2005_EXPRESS}" 0 +3 - strcpy $0 "vs2005" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_VS2003}" 0 +3 - strcpy $0 "vs2003" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_VS2002}" 0 +3 - strcpy $0 "vs2002" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_VC60}" 0 +3 - strcpy $0 "vc60" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_ICC}" 0 +3 - strcpy $0 "icc" - goto done - - strcmp "$0" "${AD_COMPILER_NAME_MINGW}" 0 +3 - strcpy $0 "mingw" - goto done - - strcpy $0 "" ;this is bad! - - done: - exch $0 -FunctionEnd - -Function IsExpressVersion - push $0 - ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0" "InstallDir" - ClearErrors - exch $0 -FunctionEnd - -Function AutoDetectCompilers - push $0 - push $1 - - strcpy $1 "" - - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0" "InstallDir" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_VS2005}|" - - ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0" "InstallDir" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_VS2005_EXPRESS}|" - - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.1" "InstallDir" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_VS2003}|" - - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.0" "InstallDir" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_VS2002}|" - - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_VC60}|" - - ReadRegStr $0 HKLM "Software\Intel\Compilers\C++\80" "Major Version" - strcmp $0 "" +2 - strcpy $1 "$1${AD_COMPILER_NAME_ICC}|" - - strcpy $1 "$1${AD_COMPILER_NAME_MINGW}" - - exch - pop $0 - exch $1 -FunctionEnd - -Function GetVSVarsFile - exch $1 - push $0 - - StrCmp $1 "vs2005" VS2005 - StrCmp $1 "vs2003" VS2003 - StrCmp $1 "vs2002" VS2002 - StrCmp $1 "vc60" VS60 - - push "" ;empty string if not found - goto done - - VS2005: - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0\Setup\VS" "ProductDir" - StrCmp $0 "" +1 foundVSDir ; found msvc.net 2005 - - ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0\Setup\VS" "ProductDir" - StrCmp $0 "" +1 foundVSDir ; found msvc.net 2005 epress - - VS2003: - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.1\Setup\VS" "ProductDir" - StrCmp $0 "" +1 foundVSDir ; found msvc.net 2003 - - VS2002: - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.0\Setup\VS" "ProductDir" - StrCmp $0 "" +1 foundVSDir ; found msvc.net 2002 - - VS60: - ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++" "ProductDir" - StrCmp $0 "" +1 foundVCDir ; found msvc 6.0 - - push "" ;empty string if not found - goto done - - foundVSDir: - push "$0\Common7\Tools\vsvars32.bat" - goto done - - foundVCDir: - push "$0\bin\vcvars32.bat" - - done: - exch - pop $0 - exch - pop $1 -FunctionEnd - -!endif ;QTENV_INCLUDE diff --git a/tools/installer/nsis/includes/system.nsh b/tools/installer/nsis/includes/system.nsh deleted file mode 100644 index 3bc5be2..0000000 --- a/tools/installer/nsis/includes/system.nsh +++ /dev/null @@ -1,269 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifndef SYSTEM_INCLUDE -!define SYSTEM_INCLUDE - -!define QTVSIP2003_GUID "{789202F4-94F5-4f0a-AA00-73295FEBFD68}" -!define QTVSIP2005_GUID "{789202F4-94F5-4f0a-AA00-73295FEBFD69}" - -!define QMSNET2002_GUID "{C174ACCD-D856-4B60-9887-0FF9E841E0EC}" -!define QMSNET2003_GUID "{C174ACCE-D857-4B61-9888-0FF9E841E0ED}" -!define QMSNET2005_GUID "{14E98DB4-A232-49a4-8EC1-8CE4F6985C73}" - -!macro GetVSInstallationDir UN -; Usage: -; -; push "7.0" -; call GetVSInstallationDir -; pop $0 -; -; If the requested VS version can be found, its -; installation directory is returned. -Function ${UN}GetVSInstallationDir - Exch $0 - Push $1 - ReadRegStr $1 HKLM "Software\Microsoft\VisualStudio\$0" "InstallDir" - StrCpy $0 $1 - StrCmp $0 "" 0 +2 - SetErrors - Pop $1 - Exch $0 -FunctionEnd -!macroend - -!insertmacro GetVSInstallationDir "" -!insertmacro GetVSInstallationDir "un." - - -!macro IsDotNETInstalled UN -; Usage: -; -; push "8.0" -; call IsDotNETInstalled -; pop $0 -; -; $0 contains the path where the .NET framework is installed. -; If not installation can be found $0 is empty. -Function ${UN}IsDotNETInstalled - Exch $0 - Push $1 - Push $2 - Push $3 - Push $4 - Push $5 - - StrCpy $5 $0 - - ReadRegStr $4 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework" "InstallRoot" - Push $4 - Exch $EXEDIR - Exch $EXEDIR - Pop $4 - - IfFileExists $4 0 noDotNET - StrCpy $0 0 - - EnumStart: - EnumRegKey $2 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework\Policy" $0 - IntOp $0 $0 + 1 - StrCmp $2 "" noDotNET - StrCpy $1 0 - - EnumPolicy: - EnumRegValue $3 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework\Policy\$2" $1 - IntOp $1 $1 + 1 - StrCmp $3 "" EnumStart - - StrCmp $5 "8.0" 0 +2 - StrCmp $2 "v2.0" 0 EnumPolicy - - IfFileExists "$4\$2.$3" foundDotNET EnumPolicy - - noDotNET: - StrCpy $0 0 - Goto done - - foundDotNET: - StrCpy $0 "$4\$2.$3" - - done: - Pop $5 - Pop $4 - Pop $3 - Pop $2 - Pop $1 - Exch $0 -FunctionEnd -!macroend - -!insertmacro IsDotNETInstalled "" -!insertmacro IsDotNETInstalled "un." - -!macro IsQMsNetInstalled UN -; Usage: -; -; push "8.0" -; call IsQMsNetInstalled -; pop $0 -Function ${UN}IsQMsNetInstalled - Exch $0 - Push $1 - Push $2 - Push $3 - - StrCmp $0 "7.0" 0 +2 - StrCpy $2 "${QMSNET2002_GUID}" - StrCmp $0 "7.1" 0 +2 - StrCpy $2 "${QMSNET2003_GUID}" - StrCmp $0 "8.0" 0 +2 - StrCpy $2 "${QMSNET2005_GUID}" - - StrCpy $3 0 - - ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" - StrCmp $1 "" +3 - StrCpy $3 1 - goto done - - ReadRegStr $1 HKCU "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" - StrCmp $1 "" +2 - StrCpy $3 1 - -done: - StrCpy $0 $3 - - Pop $3 - Pop $2 - Pop $1 - Exch $0 -FunctionEnd -!macroend - -!insertmacro IsQMsNetInstalled "" -!insertmacro IsQMsNetInstalled "un." - -!macro IsQMsDevInstalled UN -; Usage: -; -; call IsQMsDevInstalled -; pop $0 -Function ${UN}IsQMsDevInstalled - Push $0 - Push $1 - Push $2 - - StrCpy $0 0 - - ReadRegStr $1 HKLM "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Filename" - StrCmp $1 "" +3 - StrCpy $0 1 - goto done - - ReadRegStr $1 HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Filename" - StrCmp $1 "" +2 - StrCpy $0 1 - -done: - Pop $2 - Pop $1 - Exch $0 -FunctionEnd -!macroend - -!insertmacro IsQMsDevInstalled "" -!insertmacro IsQMsDevInstalled "un." - -!macro IsIntegrationInstalled UN -; Usage: -; -; push "8.0" -; call IsIntegrationInstalled -; pop $0 -Function ${UN}IsIntegrationInstalled - Exch $0 - Push $1 - Push $2 - - StrCmp $0 "7.1" 0 +2 - StrCpy $2 "${QTVSIP2003_GUID}" - StrCmp $0 "8.0" 0 +2 - StrCpy $2 "${QTVSIP2005_GUID}" - - ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\Packages\$2" "ProductName" - - StrCpy $0 0 - StrCmp $1 "" done - StrCpy $0 1 - -done: - Pop $2 - Pop $1 - Exch $0 -FunctionEnd -!macroend - -!insertmacro IsIntegrationInstalled "" -!insertmacro IsIntegrationInstalled "un." - -!macro AdministratorRights UN -Function ${UN}HasAdminRights - push $0 - ClearErrors - UserInfo::GetAccountType - IfErrors Yes ;It's probably Win95 - pop $0 - StrCmp $0 "Admin" Yes - StrCmp $0 "Power" Yes - - StrCpy $0 "false" - goto Done - - Yes: - StrCpy $0 "true" - - Done: - exch $0 -FunctionEnd -!macroend -!insertmacro AdministratorRights "" -!insertmacro AdministratorRights "un." - -!endif ;SYSTEM_INCLUDE diff --git a/tools/installer/nsis/installer.nsi b/tools/installer/nsis/installer.nsi deleted file mode 100644 index af7e9a8..0000000 --- a/tools/installer/nsis/installer.nsi +++ /dev/null @@ -1,524 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Script generated by the HM NIS Edit Script Wizard. - -!include "config.nsh" -!include "includes\global.nsh" - -!define PRODUCT_PUBLISHER "Nokia Corporation and/or its subsidiary(-ies)" -!define PRODUCT_WEB_SITE "http://qt.nokia.com" - -!define INSTALL_ICON "images\install.ico" -!define WELCOME_PAGE_ICON "images\qt-wizard.bmp" -!define PAGE_HEADER_ICON "images\qt-header.bmp" - -!include "MUI.nsh" - -; modules -!include "modules\mingw.nsh" -!include "modules\opensource.nsh" -!include "includes\instdir.nsh" -!include "modules\environment.nsh" -!include "modules\registeruiext.nsh" -!ifndef OPENSOURCE_BUILD -!include "modules\msvc.nsh" -!include "modules\addin7x.nsh" -!include "modules\qsa.nsh" -!include "modules\addin60.nsh" -!include "modules\debugext.nsh" -!include "modules\license.nsh" -!include "modules\vsip.nsh" -!include "modules\help.nsh" -!include "modules\evaluation.nsh" -!include "modules\eclipse.nsh" -!include "modules\qtjambieclipse.nsh" -!endif - -; MUI Settings -!define MUI_ABORTWARNING -!define MUI_ICON "${INSTALL_ICON}" -!define MUI_UNICON "${INSTALL_ICON}" - -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_BITMAP "${PAGE_HEADER_ICON}" -!define MUI_HEADERIMAGE_UNBITMAP "${PAGE_HEADER_ICON}" - -!define MUI_WELCOMEFINISHPAGE_BITMAP "${WELCOME_PAGE_ICON}" -!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${WELCOME_PAGE_ICON}" - -!ifdef WELCOME_NOTE - !define MUI_WELCOMEPAGE_TEXT "${WELCOME_NOTE}" -!endif -!insertmacro MUI_PAGE_WELCOME -!insertmacro OPENSOURCE_INITIALIZE -!ifndef OPENSOURCE_BUILD -!insertmacro EVALUATION_INITIALIZE -!insertmacro LICENSECHECK_INITIALIZE -!insertmacro MSVC_INITIALIZE -!insertmacro ADDIN7X_INITIALIZE -!insertmacro ADDIN60_INITIALIZE -!insertmacro DEBUGEXT_INITIALIZE -!insertmacro HELP_INITIALIZE -!insertmacro VSIP_INITIALIZE -!endif - -!ifdef USE_COMPONENT_PAGE - !insertmacro MUI_PAGE_COMPONENTS -!endif - -!ifdef USE_DIRECTORY_PAGE - !insertmacro INSTDIR_INITIALIZE -!endif - -!ifdef USE_STARTMENU_PAGE - !define MUI_STARTMENUPAGE_NODISABLE - !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${DEFAULT_STARTMENU_STRING}" - !insertmacro MUI_PAGE_STARTMENU 1 $STARTMENU_STRING -!endif - -!insertmacro MINGW_INITIALIZE -!insertmacro ENVIRONMENT_INITIALIZE -!insertmacro REGISTERUIEXT_INITIALIZE -!ifndef OPENSOURCE_BUILD -!insertmacro QSA_INITIALIZE -!insertmacro ECLIPSE_INITIALIZE -!insertmacro QTJAMBIECLIPSE_INITIALIZE -!endif - -!define MUI_FINISHPAGE_NOAUTOCLOSE - -!insertmacro MUI_PAGE_INSTFILES -!ifdef README_FILE - !define MUI_FINISHPAGE_SHOWREADME ${README_FILE} -!else - !ifdef README_FUNCTION - !define MUI_FINISHPAGE_SHOWREADME - !define MUI_FINISHPAGE_SHOWREADME_TEXT "${README_FUNCTION}" - !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CommonReadmeFunction" - !endif -!endif -!ifdef RUN_FUNCTION - !define MUI_FINISHPAGE_RUN - !define MUI_FINISHPAGE_RUN_TEXT "${RUN_FUNCTION}" - !define MUI_FINISHPAGE_RUN_FUNCTION "CommonRunFunction" -!endif -!insertmacro MUI_PAGE_FINISH - -!insertmacro MUI_UNPAGE_WELCOME -!define UNINSTALLER_CONFIRM_PAGE "confirmpage.ini" -UninstPage custom un.UninstallerConfirmPage -!insertmacro MUI_UNPAGE_INSTFILES - -!insertmacro MUI_UNPAGE_FINISH - -!insertmacro MUI_LANGUAGE "English" - -Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile ${OUTPUT_FILE} - -Section -PreCommonSection -!ifdef INSTDIR_0 ;the default one, must exist - strcpy $INSTDIR $${INSTDIR_0}_INSTDIR - ${StrRep} $PRODUCT_UNIQUE_KEY "${PRODUCT_NAME} ${PRODUCT_VERSION} - $INSTDIR" "\" "_" - strcpy $PRODUCT_UNIQUE_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_UNIQUE_KEY" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_0}_INSTDIR" "$${INSTDIR_0}_INSTDIR" -!endif -!ifdef INSTDIR_1 - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_1}_INSTDIR" "$${INSTDIR_1}_INSTDIR" -!endif -!ifdef INSTDIR_2 - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_2}_INSTDIR" "$${INSTDIR_2}_INSTDIR" -!endif -!ifdef INSTDIR_3 - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_3}_INSTDIR" "$${INSTDIR_3}_INSTDIR" -!endif -!ifdef INSTDIR_4 - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_4}_INSTDIR" "$${INSTDIR_4}_INSTDIR" -!endif -!ifdef INSTDIR_5 - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_5}_INSTDIR" "$${INSTDIR_5}_INSTDIR" -!endif - - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "StartMenu" "$STARTMENU_STRING" - CreateDirectory "$SMPROGRAMS\$STARTMENU_STRING" -SectionEnd - -!insertmacro OPENSOURCE_SECTIONS -!insertmacro MINGW_SECTIONS -!insertmacro ENVIRONMENT_SECTIONS -!insertmacro REGISTERUIEXT_SECTIONS -!ifndef OPENSOURCE_BUILD -!insertmacro MSVC_SECTIONS -!insertmacro ADDIN7X_SECTIONS -!insertmacro ADDIN60_SECTIONS -!insertmacro VSIP_SECTIONS -!insertmacro HELP_SECTIONS -!insertmacro DEBUGEXT_SECTIONS -!insertmacro LICENSECHECK_SECTIONS -!insertmacro QSA_SECTIONS -!insertmacro EVALUATION_SECTIONS -!insertmacro ECLIPSE_SECTIONS -!insertmacro QTJAMBIECLIPSE_SECTIONS -!endif - -!insertmacro INSTDIR_FUNCTIONS - -Section -CommonSection - WriteUninstaller "$INSTDIR\uninst.exe" - - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayName" "$(^Name)" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "UninstallString" "$INSTDIR\uninst.exe" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "URLInfoAbout" "${PRODUCT_WEB_SITE}" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "Publisher" "${PRODUCT_PUBLISHER}" - - WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\qt.nokia.com.lnk" "$INSTDIR\${PRODUCT_NAME}.url" - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Uninstall ${PRODUCT_NAME} ${PRODUCT_VERSION}.lnk" "$INSTDIR\uninst.exe" - SetOutPath "$INSTDIR" -SectionEnd - -Function CheckLocalLicenseProduct -!ifdef MODULE_LICENSECHECK - !insertmacro QSA_CHECKLICENSEPRODUCT -!endif -FunctionEnd - -Function .onInit - StrCpy $STARTMENU_STRING "${DEFAULT_STARTMENU_STRING}" - -!ifdef USE_UNINSTALL_PREVIOUS - push "${PRODUCT_NAME}" - call GetExistsPreviousInstallationOfProduct - exch $0 - StrCmp $0 true 0 +3 - MessageBox MB_OK|MB_ICONSTOP "A previous installation of ${PRODUCT_NAME} was detected.$\nPlease uninstall it before running this installer." - Abort - pop $0 -!endif - - call SetAdminVar - StrCmp "$RUNNING_AS_ADMIN" "false" 0 common_running_as_admin -!ifdef USE_ADMIN_CHECK - MessageBox MB_OK|MB_ICONSTOP "You need to have administrator rights to install this software!" - Abort -!endif - SetShellVarContext current - goto common_admin_check_done - common_running_as_admin: - SetShellVarContext all - common_admin_check_done: - - !insertmacro INSTDIR_STARTUP - - !insertmacro OPENSOURCE_STARTUP - !insertmacro ENVIRONMENT_STARTUP - !insertmacro REGISTERUIEXT_STARTUP - !insertmacro MINGW_STARTUP -!ifndef OPENSOURCE_BUILD - !insertmacro LICENSECHECK_STARTUP - !insertmacro MSVC_STARTUP - !insertmacro EVALUATION_STARTUP - !insertmacro ADDIN7X_STARTUP - !insertmacro ADDIN60_STARTUP - !insertmacro DEBUGEXT_STARTUP - !insertmacro VSIP_STARTUP - !insertmacro HELP_STARTUP - !insertmacro QSA_STARTUP - !insertmacro ECLIPSE_STARTUP - !insertmacro QTJAMBIECLIPSE_STARTUP -!endif -FunctionEnd - -Function .onInstSuccess - !insertmacro ENVIRONMENT_FINISH - !insertmacro REGISTERUIEXT_FINISH - !insertmacro OPENSOURCE_FINISH - !insertmacro MINGW_FINISH -!ifndef OPENSOURCE_BUILD - !insertmacro LICENSECHECK_FINISH - !insertmacro MSVC_FINISH - !insertmacro EVALUATION_FINISH - !insertmacro ADDIN7X_FINISH - !insertmacro ADDIN60_FINISH - !insertmacro DEBUGEXT_FINISH - !insertmacro VSIP_FINISH - !insertmacro HELP_FINISH - !insertmacro QSA_FINISH - !insertmacro ECLIPSE_FINISH - !insertmacro QTJAMBIECLIPSE_FINISH -!endif -FunctionEnd - -Function un.onUninstSuccess - !insertmacro ENVIRONMENT_UNFINISH - !insertmacro REGISTERUIEXT_UNFINISH - !insertmacro OPENSOURCE_UNFINISH - !insertmacro MINGW_UNFINISH -!ifndef OPENSOURCE_BUILD - !insertmacro LICENSECHECK_UNFINISH - !insertmacro MSVC_UNFINISH - !insertmacro EVALUATION_UNFINISH - !insertmacro ADDIN7X_UNFINISH - !insertmacro ADDIN60_UNFINISH - !insertmacro DEBUGEXT_UNFINISH - !insertmacro VSIP_UNFINISH - !insertmacro HELP_UNFINISH - !insertmacro QSA_UNFINISH - !insertmacro ECLIPSE_UNFINISH - !insertmacro QTJAMBIECLIPSE_UNFINISH -!endif -FunctionEnd - -Function un.onInit - call un.SetAdminVar - StrCmp "$RUNNING_AS_ADMIN" "false" 0 common_running_as_admin -!ifdef USE_ADMIN_CHECK - MessageBox MB_OK|MB_ICONSTOP "You do not have the required access rights to uninstall this package." - Abort -!endif - SetShellVarContext current - goto common_admin_check_done - common_running_as_admin: - SetShellVarContext all - common_admin_check_done: - - ${UnStrRep} $PRODUCT_UNIQUE_KEY "${PRODUCT_NAME} ${PRODUCT_VERSION} - $INSTDIR" "\" "_" - strcpy $PRODUCT_UNIQUE_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_UNIQUE_KEY" - - push $0 - ClearErrors - ReadRegStr $0 SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayName" - IfErrors 0 +3 - MessageBox MB_OK|MB_ICONSTOP "The uninstaller was unable to find the product to uninstall." - Abort - pop $0 - - ReadRegStr $STARTMENU_STRING SHCTX "$PRODUCT_UNIQUE_KEY" "StartMenu" - StrCmp "$STARTMENU_STRING" "" 0 +2 - StrCpy $STARTMENU_STRING "${DEFAULT_STARTMENU_STRING}" - -!ifdef INSTDIR_0 ;the default one, must exist - ReadRegStr $${INSTDIR_0}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_0}_INSTDIR" -!endif -!ifdef INSTDIR_1 - ReadRegStr $${INSTDIR_1}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_1}_INSTDIR" -!endif -!ifdef INSTDIR_2 - ReadRegStr $${INSTDIR_2}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_2}_INSTDIR" -!endif -!ifdef INSTDIR_3 - ReadRegStr $${INSTDIR_3}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_3}_INSTDIR" -!endif -!ifdef INSTDIR_4 - ReadRegStr $${INSTDIR_4}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_4}_INSTDIR" -!endif -!ifdef INSTDIR_5 - ReadRegStr $${INSTDIR_5}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_5}_INSTDIR" -!endif - - !insertmacro ENVIRONMENT_UNSTARTUP - !insertmacro REGISTERUIEXT_UNSTARTUP - !insertmacro OPENSOURCE_UNSTARTUP - !insertmacro MINGW_UNSTARTUP -!ifndef OPENSOURCE_BUILD - !insertmacro LICENSECHECK_UNSTARTUP - !insertmacro MSVC_UNSTARTUP - !insertmacro EVALUATION_UNSTARTUP - !insertmacro ADDIN7X_UNSTARTUP - !insertmacro ADDIN60_UNSTARTUP - !insertmacro DEBUGEXT_UNSTARTUP - !insertmacro VSIP_UNSTARTUP - !insertmacro HELP_UNSTARTUP - !insertmacro QSA_UNSTARTUP - !insertmacro ECLIPSE_UNSTARTUP - !insertmacro QTJAMBIECLIPSE_UNSTARTUP -!endif - - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${UNINSTALLER_CONFIRM_PAGE}" -FunctionEnd - -!insertmacro OPENSOURCE_UNINSTALL -!insertmacro ENVIRONMENT_UNINSTALL -!insertmacro REGISTERUIEXT_UNINSTALL -!insertmacro MINGW_UNINSTALL -!ifndef OPENSOURCE_BUILD -!insertmacro HELP_UNINSTALL -!insertmacro DEBUGEXT_UNINSTALL -!insertmacro MSVC_UNINSTALL -!insertmacro EVALUATION_UNINSTALL -!insertmacro QSA_UNINSTALL -!insertmacro ECLIPSE_UNINSTALL -!insertmacro QTJAMBIECLIPSE_UNINSTALL -!endif - -Section Uninstall - !ifndef OPENSOURCE_BUILD - !insertmacro LICENSECHECK_UNINSTALL - !insertmacro ADDIN7X_UNINSTALL - !insertmacro ADDIN60_UNINSTALL - !insertmacro VSIP_UNINSTALL - !endif - - ; COMMON - Delete "$INSTDIR\${PRODUCT_NAME}.url" - Delete "$INSTDIR\uninst.exe" - Delete "$SMPROGRAMS\$STARTMENU_STRING\Uninstall ${PRODUCT_NAME} ${PRODUCT_VERSION}.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\qt.nokia.com.lnk" - - RMDir "$SMPROGRAMS\$STARTMENU_STRING" - RMDir "$INSTDIR" - - DeleteRegKey SHCTX "$PRODUCT_UNIQUE_KEY" -SectionEnd - -Function CommonRunFunction - !ifndef OPENSOURCE_BUILD - !insertmacro MSVC_RUN_FUNCTION - !insertmacro QSA_RUN_FUNCTION - !endif - !insertmacro MINGW_RUN_FUNCTION - DoneRunFunction: -FunctionEnd - -Function CommonReadmeFunction - !ifndef OPENSOURCE_BUILD - !insertmacro MSVC_README_FUNCTION - !endif - !insertmacro MINGW_README_FUNCTION - DoneReadmeFunction: -FunctionEnd - -Function un.UninstallerConfirmPage - !insertmacro MUI_HEADER_TEXT "Confirm" "Confirm Uninstallation Directories" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${UNINSTALLER_CONFIRM_PAGE}" "Field 2" "Text" "$UninstallerConfirmProduct" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${UNINSTALLER_CONFIRM_PAGE}" -FunctionEnd - -;pops product name from stack and as result pushes TRUE or FALSE on stack -Function GetExistsPreviousInstallationOfProduct - exch $0 - push $1 - push $2 - push $3 - - StrCpy $1 0 - loop: - EnumRegKey $2 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall $1 - StrCmp $2 "" no_reg_key_found - ${StrStr} $3 $2 $0 - StrCmp $3 $2 reg_key_found - IntOp $1 $1 + 1 - goto loop - - reg_key_found: - push true - goto done - - no_reg_key_found: - push false - - done: - exch - pop $3 - exch - pop $2 - exch - pop $1 - exch - pop $0 -FunctionEnd - -;pops product name from stack -Function WarnIfInstalledProductDetected - exch $0 - push $0 - call GetExistsPreviousInstallationOfProduct - exch $1 - StrCmp $1 true +1 +3 - MessageBox MB_YESNO|MB_ICONQUESTION "An existing installation of $0 was detected.$\nIt is recommended to deinstall $0 before continuing.$\nDo you want to continue this installation nevertheless?" IDYES +2 IDNO +1 - Abort - pop $1 - pop $0 -FunctionEnd - -;sets $RUNNING_AS_ADMIN to "true" if Admin or Power user -!macro SetAdminVar UN -Function ${UN}SetAdminVar - push $0 - ClearErrors - UserInfo::GetAccountType - IfErrors Admin ;It's probably Win95 - pop $0 - StrCmp $0 "Admin" Admin - StrCmp $0 "Power" Admin - - StrCpy $RUNNING_AS_ADMIN "false" - goto Done - - Admin: - StrCpy $RUNNING_AS_ADMIN "true" - - Done: - pop $0 -FunctionEnd -!macroend -!insertmacro SetAdminVar "" -!insertmacro SetAdminVar "un." - -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro OPENSOURCE_DESCRIPTION - !insertmacro ENVIRONMENT_DESCRIPTION - !insertmacro REGISTERUIEXT_DESCRIPTION - !insertmacro MINGW_DESCRIPTION - !ifndef OPENSOURCE_BUILD - !insertmacro MSVC_DESCRIPTION - !insertmacro EVALUATION_DESCRIPTION - !insertmacro ADDIN7X_DESCRIPTION - !insertmacro ADDIN60_DESCRIPTION - !insertmacro DEBUGEXT_DESCRIPTION - !insertmacro HELP_DESCRIPTION - !insertmacro VSIP_DESCRIPTION - !insertmacro QSA_DESCRIPTION - !insertmacro ECLIPSE_DESCRIPTION - !insertmacro QTJAMBIECLIPSE_DESCRIPTION - !endif -!insertmacro MUI_FUNCTION_DESCRIPTION_END diff --git a/tools/installer/nsis/modules/environment.nsh b/tools/installer/nsis/modules/environment.nsh deleted file mode 100644 index fa610a7..0000000 --- a/tools/installer/nsis/modules/environment.nsh +++ /dev/null @@ -1,216 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifdef MODULE_ENVIRONMENT -!macro ENVIRONMENT_INITIALIZE - !include "includes\writeEnvStr.nsh" - !include "includes\writePathStr.nsh" - - !ifndef MODULE_ENVIRONMENT_QTDIR - !ifdef MODULE_MINGW - !define MODULE_ENVIRONMENT_QTDIR $MINGW_INSTDIR - !endif - - !ifdef MODULE_MSVC - !define MODULE_ENVIRONMENT_QTDIR $MSVC_INSTDIR - !endif - !endif - - !define MODULE_ENVIRONMENT_PAGE "envpage.ini" - var MODULE_ENVIRONMENT_SET - var MODULE_ENVIRONMENT_OLD - LangString ModuleEnvironmentTitle ${LANG_ENGLISH} "Configure Environment" - LangString ModuleEnvironmentDescription ${LANG_ENGLISH} "Configure Qt environment variables" - - Page custom ModuleEnvironmentPageEnter ModuleEnvironmentPageExit -!macroend -!macro ENVIRONMENT_SECTIONS - Section -ModuleEnvironmentRegister - push "${MODULE_ENVIRONMENT_QTDIR}" - call RegisterQtEnvVariables - SectionEnd - - Function ModuleEnvironmentPageEnter - push $0 - Call IsNT - pop $0 - strcmp "$0" "1" +2 - abort - pop $0 - - !insertmacro MUI_HEADER_TEXT "$(ModuleEnvironmentTitle)" "$(ModuleEnvironmentDescription)" - - strcmp $MODULE_ENVIRONMENT_SET "1" 0 envCheckNo - !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" "1" - goto showEnvPage - envCheckNo: - !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" "0" - - showEnvPage: - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_ENVIRONMENT_PAGE}" - FunctionEnd - - Function ModuleEnvironmentPageExit - !insertmacro MUI_INSTALLOPTIONS_READ $MODULE_ENVIRONMENT_SET "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" - FunctionEnd - - Function RegisterQtEnvVariables - exch $2 ; the installation path = QTDIR - push $0 ; I think WriteEnvStr mixes up $0 and $1 - push $1 - - WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtEnvSet" $MODULE_ENVIRONMENT_SET - - strcmp $MODULE_ENVIRONMENT_SET "1" 0 noenv - - StrCmp $MODULE_ENVIRONMENT_OLD "0" +4 - DetailPrint "Removing $MODULE_ENVIRONMENT_OLD\bin from PATH" - push "$MODULE_ENVIRONMENT_OLD\bin" - Call RemoveFromPath ; remove old qtdir - - DetailPrint "Setting QTDIR to $2" - push "QTDIR" - push $2 - Call WriteEnvStr ; set the QTDIR - - DetailPrint "Adding $2\bin to PATH" - push "$2\bin" - Call AddToPath ; set the PATH - - - push "QMAKESPEC" - push ${INSTALL_COMPILER} - Call GetMkSpec - pop $0 - DetailPrint "Setting QMAKESPEC to $0" - push $0 - Call WriteEnvStr ; set the QMAKESPEC - - noenv: - pop $1 - pop $0 - pop $2 - FunctionEnd - - Function un.RegisterQtEnvVariables - exch $0 ; QTDIR - push $1 - - ClearErrors - ReadRegDWORD $MODULE_ENVIRONMENT_SET SHCTX "$PRODUCT_UNIQUE_KEY" "QtEnvSet" - intcmp $MODULE_ENVIRONMENT_SET 0 noenv - - DetailPrint "Removing $0\bin from the PATH" - push "$0\bin" - Call un.RemoveFromPath ; removes qt from the path - - ;Check if QTDIR is equal to installdir - ExpandEnvStrings $1 "%QTDIR%" - - StrCmp "$0" "$1" removeenv - StrCmp "$0\" "$1" removeenv - StrCmp "$0" "$1\" removeenv - Goto noenv - - removeenv: - DetailPrint "Removing QTDIR" - push "QTDIR" - Call un.DeleteEnvStr ; removes QTDIR - - DetailPrint "Removing QMAKESPEC" - push "QMAKESPEC" - Call un.DeleteEnvStr ; removes QMAKESPEC - - noenv: - pop $1 - pop $0 - FunctionEnd -!macroend -!macro ENVIRONMENT_DESCRIPTION -!macroend -!macro ENVIRONMENT_STARTUP - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_ENVIRONMENT_PAGE}" - push $0 - ExpandEnvStrings $0 "%QTDIR%" - - StrCmp $0 "%QTDIR%" +4 - strcpy $MODULE_ENVIRONMENT_SET "0" ;QTDIR exists - strcpy $MODULE_ENVIRONMENT_OLD $0 - Goto +3 - strcpy $MODULE_ENVIRONMENT_SET "1" ;no QTDIR - strcpy $MODULE_ENVIRONMENT_OLD "0" - - Call IsNT - pop $0 - strcmp "$0" "1" +2 - strcpy $MODULE_ENVIRONMENT_SET "0" - pop $0 -!macroend -!macro ENVIRONMENT_FINISH -!macroend -!macro ENVIRONMENT_UNSTARTUP -!macroend -!macro ENVIRONMENT_UNINSTALL - Section -un.ModuleEnvironmentRegister - push "${MODULE_ENVIRONMENT_QTDIR}" - call un.RegisterQtEnvVariables - SectionEnd -!macroend -!macro ENVIRONMENT_UNFINISH -!macroend -!else ;MODULE_ENVIRONMENT -!macro ENVIRONMENT_INITIALIZE -!macroend -!macro ENVIRONMENT_SECTIONS -!macroend -!macro ENVIRONMENT_DESCRIPTION -!macroend -!macro ENVIRONMENT_STARTUP -!macroend -!macro ENVIRONMENT_FINISH -!macroend -!macro ENVIRONMENT_UNSTARTUP -!macroend -!macro ENVIRONMENT_UNINSTALL -!macroend -!macro ENVIRONMENT_UNFINISH -!macroend -!endif ;MODULE_ENVIRONMENT - diff --git a/tools/installer/nsis/modules/mingw.nsh b/tools/installer/nsis/modules/mingw.nsh deleted file mode 100644 index 8694790..0000000 --- a/tools/installer/nsis/modules/mingw.nsh +++ /dev/null @@ -1,670 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifdef MODULE_MINGW -!macro MINGW_INITIALIZE -!include "includes\qtcommon.nsh" -!ifndef MODULE_MINGW_NAME - !define MODULE_MINGW_NAME "Qt" -!endif -!ifndef MODULE_MINGW_VERSION - !define MODULE_MINGW_VERSION "${PRODUCT_VERSION}" -!endif -!ifndef MODULE_MINGW_BUILDDIR - !error "MODULE_MINGW_BUILDDIR not defined!" -!endif -!ifndef MODULE_MINGW_ROOT - !error "MODULE_MINGW_ROOT not defined!" -!endif -!ifndef MODULE_MINGW_URL - !define MODULE_MINGW_URL "ftp://ftp.qt.nokia.com/misc" -!endif -!ifndef MODULE_MINGW_COMPILERVERSION - !define MODULE_MINGW_COMPILERVERSION "3.4.2" -!endif -!ifndef MODULE_MINGW_LICENSE - !define MODULE_MINGW_LICENSE "C:\MinGW\COPYING" -!endif - -!define MODULE_MINGW_DOWNLOADPAGE "gwdownload.ini" -!define MODULE_MINGW_MIRRORPAGE "gwmirror.ini" -!define MODULE_MINGW_RUNTIME_LIB "mingw*.dll" -!define MODULE_MINGW_DOWNLOADFILE "MinGW-${MODULE_MINGW_COMPILERVERSION}" - -var MODULE_MINGW_DOWNLOAD -var MODULE_MINGW_SOURCEDOWNLOAD -var MODULE_MINGW_MIRRORS -var MODULE_MINGW_INSTOK -var MODULE_MINGW_COMPILERINSTDIR - -LangString ModuleMinGWTitle ${LANG_ENGLISH} "MinGW Installation" -LangString ModuleMinGWDescription ${LANG_ENGLISH} "You need MinGW to be able to compile Qt applications." -LangString ModuleMinGWMirrorTitle ${LANG_ENGLISH} "MinGW Download Mirror" -LangString ModuleMinGWMirrorDescription ${LANG_ENGLISH} "Select a download mirror." - -Page custom ModuleMinGWDownloadPageEnter ModuleMinGWDownloadPageExit -!define MUI_PAGE_CUSTOMFUNCTION_PRE ModuleMinGWLicensePageEnter -!define MUI_PAGE_HEADER_TEXT "MinGW License Agreement" -!define MUI_PAGE_HEADER_SUBTEXT "Please review the license terms before installing MinGW." -!define MUI_LICENSEPAGE_TEXT_TOP "MinGW License Information" -!insertmacro MUI_PAGE_LICENSE "${MODULE_MINGW_LICENSE}" -Page custom ModuleMinGWMirrorPageEnter ModuleMinGWMirrorPageExit - -!include "includes\qtenv.nsh" -!macroend - -!macro MINGW_SECTIONS -Section "${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" MINGW_SEC01 - strcmp "$MINGW_INSTDIR" "" 0 +5 - StrCpy $MINGW_INSTDIR "$INSTDIR\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" - push $MINGW_INSTDIR - call MakeQtDirectory - pop $MINGW_INSTDIR - - WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" 1 - - SetOutPath "$MINGW_INSTDIR" - SetOverwrite ifnewer - !insertmacro MODULE_MINGW_INSTALLFILES - - push "$MINGW_INSTDIR\bin" - call AddStartmenuApplication - - push ${MODULE_MINGW_BUILDDIR} - push "$MINGW_INSTDIR" - call PatchPrlFiles - - IfFileExists "$MINGW_INSTDIR\.qmake.cache" 0 +5 - push "$MINGW_INSTDIR\.qmake.cache" - push ${MODULE_MINGW_BUILDDIR} - push $MINGW_INSTDIR - call PatchPath - - IfFileExists "$MINGW_INSTDIR\mkspecs\default\qmake.conf" 0 +5 - push "$MINGW_INSTDIR\mkspecs\default\qmake.conf" - push ${MODULE_MINGW_BUILDDIR} - push $MINGW_INSTDIR - call PatchPath - - push $MINGW_INSTDIR - call PatchCommonBinaryFiles - - push $MINGW_INSTDIR - call PatchLicenseInformation - - WriteRegStr SHCTX "SOFTWARE\Trolltech\Common\${MODULE_MINGW_VERSION}\$LICENSE_PRODUCT" "Key" "$LICENSE_KEY" - - push $MINGW_INSTDIR - call ModuleMinGWMakeEnvFile - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} Command Prompt.lnk" "%COMSPEC%" '/k "$MINGW_INSTDIR\bin\qtvars.bat"' - CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} (Build Debug Libraries).lnk" "%COMSPEC%" '/k "$MINGW_INSTDIR\bin\qtvars.bat compile_debug"' - - push $0 - strcmp $MODULE_MINGW_DOWNLOAD "no" DoneMinGWInstall - DetailPrint "Installing MinGW into $MODULE_MINGW_COMPILERINSTDIR" - WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWInstDir" "$MODULE_MINGW_COMPILERINSTDIR" - nsExec::ExecToLog '"$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" /S /D=$MODULE_MINGW_COMPILERINSTDIR' - pop $0 - strcmp $MODULE_MINGW_SOURCEDOWNLOAD "no" DoneMinGWInstall - DetailPrint "Installing MinGW sources into $MODULE_MINGW_COMPILERINSTDIR\src" - WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWSources" 1 - nsExec::ExecToLog '"$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" /S /D=$MODULE_MINGW_COMPILERINSTDIR\src' - pop $0 - DoneMinGWInstall: - pop $0 - - DetailPrint "Copying MinGW runtime..." - SetDetailsPrint none - CopyFiles /SILENT "$MODULE_MINGW_COMPILERINSTDIR\bin\${MODULE_MINGW_RUNTIME_LIB}" "$MINGW_INSTDIR\bin" - SetDetailsPrint both -SectionEnd - -Function EnableButtons - Push $0 - GetDlgItem $0 $HWNDPARENT 3 - EnableWindow $0 1 - GetDlgItem $0 $HWNDPARENT 1 - EnableWindow $0 1 - GetDlgItem $0 $HWNDPARENT 2 - EnableWindow $0 1 - Pop $0 -FunctionEnd - -Function DisableButtons - Push $0 - GetDlgItem $0 $HWNDPARENT 3 - EnableWindow $0 0 - GetDlgItem $0 $HWNDPARENT 1 - EnableWindow $0 0 - GetDlgItem $0 $HWNDPARENT 2 - EnableWindow $0 0 - Pop $0 -FunctionEnd - -Function ModuleMinGWDownloadPageEnter - strcmp $MODULE_MINGW_INSTOK "yes" 0 +2 - Abort - - !insertmacro MUI_HEADER_TEXT "$(ModuleMinGWTitle)" "$(ModuleMinGWTitleDescription)" - Call UpdateCtrlStates - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_MINGW_DOWNLOADPAGE}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" "0" -FunctionEnd - -Function ModuleMinGWMirrorPageEnter - strcmp $MODULE_MINGW_DOWNLOAD "yes" +2 - Abort - - !insertmacro MUI_HEADER_TEXT "$(ModuleMinGWMirrorTitle)" "$(ModuleMinGWMirrorDescription)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_MINGW_MIRRORPAGE}" -FunctionEnd - -Function ModuleMinGWLicensePageEnter - strcmp $MODULE_MINGW_DOWNLOAD "yes" +2 - Abort -FunctionEnd - -Function UpdateCtrlStates - push $0 - push $1 - push $2 - - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" - intop $0 $0 ! - FindWindow $2 "#32770" "" $HWNDPARENT - GetDlgItem $1 $2 1205 - EnableWindow $1 $0 - GetDlgItem $1 $2 1202 - EnableWindow $1 $0 - GetDlgItem $1 $2 1203 - EnableWindow $1 $0 - - intop $0 $0 ! - GetDlgItem $1 $2 1206 - EnableWindow $1 $0 - GetDlgItem $1 $2 1207 - EnableWindow $1 $0 - GetDlgItem $1 $2 1208 - EnableWindow $1 $0 - - GetDlgItem $1 $HWNDPARENT 1 - IntCmp $0 0 +3 - SendMessage $1 ${WM_SETTEXT} 0 "STR:Next >" - Goto +2 - SendMessage $1 ${WM_SETTEXT} 0 "STR:Install" - - pop $2 - pop $1 - pop $0 -FunctionEnd - -Function ModuleMinGWDownloadPageExit - push $0 - push $1 - - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Settings" "State" - strcmp "$0" "8" 0 NoNotify - Call UpdateCtrlStates - abort - NoNotify: - - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" - strcmp "$0" "0" noDownload doDownload - -doDownload: - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 6" "State" - strcmp $0 "" 0 +3 - MessageBox MB_ICONEXCLAMATION|MB_OK "You need to specify an installation directory!" - goto tryAgain - - strcpy $MODULE_MINGW_COMPILERINSTDIR $0 - strcpy $MODULE_MINGW_DOWNLOAD "yes" - CreateDirectory "$MINGW_INSTDIR\downloads" - - Call DisableButtons - InetLoad::load /BANNER "Mirror Download" "Downloading mirrors from server..." "${MODULE_MINGW_URL}/${MODULE_MINGW_DOWNLOADFILE}.mirrors" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" /END - Pop $1 ;Get the return value - Call EnableButtons - - StrCmp $1 "OK" +3 - MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "Was not able to download mirror list ($1)." IDRETRY tryAgain 0 - Quit - - call ModuleMinGWReadMirrors - !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_MINGW_MIRRORPAGE} "Field 3" "ListItems" "$MODULE_MINGW_MIRRORS" - goto done - -noDownload: - strcpy $MODULE_MINGW_DOWNLOAD "no" - strcpy $MODULE_MINGW_SOURCEDOWNLOAD "no" - call ModuleMinGWChecking - strcmp $MODULE_MINGW_INSTOK "yes" done - MessageBox MB_ICONEXCLAMATION|MB_YESNO "There is a problem with your MinGW installation:$\r$\n$MODULE_MINGW_INSTOK$\r$\nDo you still want to continue? (Your installation may not work)" IDNO tryAgain - goto done - -tryAgain: - pop $1 - pop $0 - Abort - -done: - pop $1 - pop $0 -FunctionEnd - -Function ModuleMinGWMirrorPageExit - push $0 - push $2 - push $1 - - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_MIRRORPAGE}" "Field 3" "State" - strcmp "$0" "" 0 +3 - MessageBox MB_ICONEXCLAMATION|MB_OK "You must select a mirror to download from!" - goto tryAgain - - push $0 - call ModuleMinGWGetMirror - pop $0 - - Call DisableButtons - InetLoad::load /BANNER "MinGW Download" "Downloading MinGW from server..." "$0/${MODULE_MINGW_DOWNLOADFILE}.exe" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" /END - Pop $2 ;get the return value - Call EnableButtons - - StrCmp $2 "OK" +3 - MessageBox MB_ICONEXCLAMATION|MB_OK "Was not able to download MinGW ($2). Please try another mirror." - Goto tryAgain - - !insertmacro MUI_INSTALLOPTIONS_READ $1 "${MODULE_MINGW_MIRRORPAGE}" "Field 2" "State" - strcmp "$1" "0" done - - Call DisableButtons - InetLoad::load /BANNER "MinGW Sources Download" "Downloading MinGW Sources from server..." "$0/${MODULE_MINGW_DOWNLOADFILE}-src.exe" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" /END - Pop $2 - Call EnableButtons - - strcpy $MODULE_MINGW_SOURCEDOWNLOAD "yes" - - StrCmp $2 "OK" +3 - MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "Was not able to download MinGW sources ($2). Please try another mirror?" IDRETRY tryAgain 0 - Quit - - goto done - -tryAgain: - pop $1 - pop $2 - pop $0 - Abort - -done: - pop $1 - pop $2 - pop $0 -FunctionEnd - -Function ModuleMinGWReadMirrors - push $0 ;file handle - push $1 ;line - - ClearErrors - FileOpen $0 "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" r - IfErrors done - - strcpy $MODULE_MINGW_MIRRORS "" - -nextline: - FileRead $0 $1 - IfErrors done - push $1 - call ModuleMinGWRemoveNewLine - pop $1 - strcpy $MODULE_MINGW_MIRRORS "$MODULE_MINGW_MIRRORS|$1" - FileRead $0 $1 ;Jump over next line - IfErrors done - goto nextline - -done: - FileClose $0 - strlen $1 $MODULE_MINGW_MIRRORS - intcmp $1 0 failed failed cleanup - -failed: - MessageBox MB_ICONSTOP|MB_OK "Unable to parse mirror list, exiting!" - Quit - -cleanup: - pop $1 - pop $0 -FunctionEnd - -#this just removes the last two chars -Function ModuleMinGWRemoveNewLine -exch $0 -push $1 -push $2 - -strlen $1 $0 -intop $1 $1 - 1 -strcpy $2 $0 1 $1 ;get last char - -strcmp "$2" "$\n" 0 +2 -intop $1 $1 - 1 - -strcpy $2 $0 1 $1 ;get last char -strcmp "$2" "$\r" 0 +2 -intop $1 $1 - 1 - -intop $1 $1 + 1 -strcpy $0 $0 $1 - -pop $2 -pop $1 -exch $0 -FunctionEnd - -#push serverid -#call GetMirror -#pop server -Function ModuleMinGWGetMirror - exch $1 ;id - push $0 ;file handle - push $2 ;line - push $3 ;tmp - - strcpy $3 "" - - ClearErrors - FileOpen $0 "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" r - IfErrors done - -nextline: - FileRead $0 $2 - IfErrors done - push $2 - call ModuleMinGWRemoveNewLine - pop $2 - strcmp $1 $2 0 nextline - FileRead $0 $3 - IfErrors done - push $3 - call ModuleMinGWRemoveNewLine - pop $3 - -done: - strcpy $1 $3 - FileClose $0 - strlen $2 $1 - intcmp $2 0 failed failed cleanup - -failed: - MessageBox MB_ICONSTOP|MB_OK "Unable to parse mirror list, exiting!" - Quit - -cleanup: - pop $3 - pop $2 - pop $0 - exch $1 -FunctionEnd - -Function ModuleMinGWChecking - push $0 - - ### update with plugin - strcpy $MODULE_MINGW_INSTOK "yes" - strcpy $MODULE_MINGW_COMPILERINSTDIR "C:\MinGW" ;fallback dir - - !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 3" "State" - strcmp "$0" "" +2 - strcpy $MODULE_MINGW_COMPILERINSTDIR $0 - - IfFileExists "$MODULE_MINGW_COMPILERINSTDIR\bin\g++.exe" +3 0 - strcpy $MODULE_MINGW_INSTOK "g++ not found in $MODULE_MINGW_COMPILERINSTDIR\bin\" - goto DoneChecking - -!ifndef OPENSOURCE_BUILD - ; check w32api.h - push $MODULE_MINGW_COMPILERINSTDIR - qtnsisext::HasValidWin32Library - pop $0 - strcmp "$0" "1" +3 0 - strcpy $MODULE_MINGW_INSTOK "The installer could not find a valid $MODULE_MINGW_COMPILERINSTDIR\include\w32api.h$\r$\n(The supported version is 3.2)" - goto DoneChecking - - ; check version - push $MODULE_MINGW_COMPILERINSTDIR - qtnsisext::GetMinGWVersion - pop $0 - strcmp "$0" "${MODULE_MINGW_COMPILERVERSION}" +3 0 - strcpy $MODULE_MINGW_INSTOK "g++ version found does not match ${MODULE_MINGW_COMPILERVERSION} (Found version $0)." - goto DoneChecking -!endif - -DoneChecking: - pop $0 -FunctionEnd - -# -# creates a qtvars.bat file in $QTDIR\bin -# push "c:\qt" #QTDIR -# call MakeQtVarsFile -# -Function ModuleMinGWMakeEnvFile - push $0 ; file handle - - ClearErrors - FileOpen $0 "$MINGW_INSTDIR\bin\qtvars.bat" w - IfErrors WriteMakeFile - FileWrite $0 "@echo off$\r$\n" - FileWrite $0 "rem$\r$\n" - FileWrite $0 "rem This file is generated$\r$\n" - FileWrite $0 "rem$\r$\n" - FileWrite $0 "$\r$\n" - FileWrite $0 "echo Setting up a MinGW/Qt only environment...$\r$\n" - FileWrite $0 "echo -- QTDIR set to $MINGW_INSTDIR$\r$\n" - FileWrite $0 "echo -- PATH set to $MINGW_INSTDIR\bin$\r$\n" - FileWrite $0 "echo -- Adding $MODULE_MINGW_COMPILERINSTDIR\bin to PATH$\r$\n" - FileWrite $0 "echo -- Adding %SystemRoot%\System32 to PATH$\r$\n" - FileWrite $0 "echo -- QMAKESPEC set to win32-g++$\r$\n" - FileWrite $0 "$\r$\n" - FileWrite $0 "set QTDIR=$MINGW_INSTDIR$\r$\n" - FileWrite $0 "set PATH=$MINGW_INSTDIR\bin$\r$\n" - FileWrite $0 "set PATH=%PATH%;$MODULE_MINGW_COMPILERINSTDIR\bin$\r$\n" - FileWrite $0 "set PATH=%PATH%;%SystemRoot%\System32$\r$\n" - FileWrite $0 "set QMAKESPEC=win32-g++$\r$\n" - FileWrite $0 "$\r$\n" - - FileWrite $0 'if not "%1"=="compile_debug" goto END$\r$\n' - FileWrite $0 "cd %QTDIR%$\r$\n" - FileWrite $0 "echo This will configure and compile qt in debug.$\r$\n" - FileWrite $0 "echo The release libraries will not be recompiled.$\r$\n" - FileWrite $0 "pause$\r$\n" - FileWrite $0 "configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg$\r$\n" - FileWrite $0 "cd %QTDIR%\src$\r$\n" - FileWrite $0 "qmake$\r$\n" - FileWrite $0 "mingw32-make debug$\r$\n" - FileWrite $0 ":END$\r$\n" - FileClose $0 - -WriteMakeFile: - ClearErrors - FileOpen $0 "$MINGW_INSTDIR\bin\make.bat" w - IfErrors done - FileWrite $0 "@echo off$\r$\n" - FileWrite $0 "mingw32-make %*$\r$\n" - FileClose $0 - -done: -; pop $1 - pop $0 -FunctionEnd - -Function MINGW_ValidateDirectoryFunc - push "${MODULE_MINGW_BUILDDIR}" - push $MINGW_INSTDIR - call CommonCheckDirectory -FunctionEnd -!macroend - -!macro MINGW_DESCRIPTION - !insertmacro MUI_DESCRIPTION_TEXT ${MINGW_SEC01} "This installs ${MODULE_MINGW_NAME} version ${MODULE_MINGW_VERSION} on your system." -!macroend - -!macro MINGW_STARTUP - !ifndef MODULE_MINGW_NODEFAULT - SectionSetFlags ${MINGW_SEC01} 17 - !endif - strcpy $MINGW_INSTDIR "C:\Qt\${MODULE_MINGW_VERSION}" - push $MINGW_INSTDIR - call MakeQtDirectory - pop $MINGW_INSTDIR - - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_MINGW_DOWNLOADPAGE}" - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_MINGW_MIRRORPAGE}" - - !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 3" "State" "C:\MinGW" - !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 6" "State" "C:\MinGW" - - strcpy $MODULE_MINGW_DOWNLOAD "no" - strcpy $MODULE_MINGW_SOURCEDOWNLOAD "no" -!macroend - -!macro MINGW_FINISH -!macroend - -!macro MINGW_RUN_FUNCTION - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" - intcmp $0 1 0 DoneRunFunctionMINGW - - IfFileExists "$MINGW_INSTDIR\bin\qtdemo.exe" 0 +2 - Exec '$MINGW_INSTDIR\bin\qtdemo.exe' - goto DoneRunFunction ;don't run more applications - - DoneRunFunctionMINGW: -!macroend - -!macro MINGW_README_FUNCTION - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" - intcmp $0 1 0 DoneReadmeFunctionMINGW - - IfFileExists "$MINGW_INSTDIR\bin\assistant.exe" 0 +2 - Exec '$MINGW_INSTDIR\bin\assistant.exe' - goto DoneReadmeFunction ;don't run more applications - - DoneReadmeFunctionMINGW: -!macroend - -!macro MINGW_UNSTARTUP - strcmp "$MINGW_INSTDIR" "" 0 +5 - StrCpy $MINGW_INSTDIR "$INSTDIR\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" - push $MINGW_INSTDIR - call un.MakeQtDirectory - pop $MINGW_INSTDIR - - !insertmacro ConfirmOnRemove "MINGWInstalled" "- ${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} in $MINGW_INSTDIR" -!macroend - -!macro MINGW_UNINSTALL -Section un.ModuleMinGW - push $0 - push $1 - - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" - intcmp $0 1 0 DoneUnInstallMINGW - - Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" - - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWSources" - strcmp $0 "" MinGWSourcesUninstallDone ;not installed - Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" - nsExec::ExecToLog '"$0\src\uninst.exe"' - pop $1 - MinGWSourcesUninstallDone: - - ReadRegStr $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWInstDir" - strcmp $0 "" MinGWUninstallDone ;not installed - Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" - nsExec::ExecToLog '"$0\uninst.exe"' - pop $1 - MinGWUninstallDone: - - DetailPrint "Removing start menu shortcuts" - call un.RemoveStartmenuApplication - Delete "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} Command Prompt.lnk" - Delete "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} (Build Debug Libraries).lnk" - - Delete "$MINGW_INSTDIR\bin\${MODULE_MINGW_RUNTIME_LIB}" - Delete "$MINGW_INSTDIR\bin\make.bat" - Delete "$MINGW_INSTDIR\bin\qtvars.bat" - - !insertmacro MODULE_MINGW_REMOVE "$MINGW_INSTDIR" - RMDir $MINGW_INSTDIR ;removes it if empty - - DoneUnInstallMINGW: - pop $1 - pop $0 -SectionEnd -!macroend -!macro MINGW_UNFINISH -!macroend -!else ;MODULE_MINGW -!macro MINGW_INITIALIZE -!macroend -!macro MINGW_SECTIONS -!macroend -!macro MINGW_DESCRIPTION -!macroend -!macro MINGW_STARTUP -!macroend -!macro MINGW_FINISH -!macroend -!macro MINGW_RUN_FUNCTION -!macroend -!macro MINGW_README_FUNCTION -!macroend -!macro MINGW_UNSTARTUP -!macroend -!macro MINGW_UNINSTALL -!macroend -!macro MINGW_UNFINISH -!macroend -!endif ;MODULE_MINGW - diff --git a/tools/installer/nsis/modules/opensource.nsh b/tools/installer/nsis/modules/opensource.nsh deleted file mode 100644 index fbd6ef7..0000000 --- a/tools/installer/nsis/modules/opensource.nsh +++ /dev/null @@ -1,94 +0,0 @@ -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!ifdef MODULE_OPENSOURCE -!macro OPENSOURCE_INITIALIZE - !define MODULE_OPENSOURCE_PAGE "opensource.ini" - page custom ModuleOpenSourceShowPage -!macroend -!macro OPENSOURCE_SECTIONS - Section -ModuleOpenSourceSection - !ifdef MODULE_OPENSOURCE_ROOT - SetOutPath "$INSTDIR" - File "${MODULE_OPENSOURCE_ROOT}\OPENSOURCE-NOTICE.TXT" - !endif - SectionEnd - - Function ModuleOpenSourceShowPage - !insertmacro MUI_HEADER_TEXT "Open Source Edition" " " - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_OPENSOURCE_PAGE}" - strcpy "$LICENSEE" "Open Source" - strcpy "$LICENSE_PRODUCT" "OpenSource" - FunctionEnd -!macroend -!macro OPENSOURCE_DESCRIPTION -!macroend -!macro OPENSOURCE_STARTUP - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_OPENSOURCE_PAGE}" -!macroend -!macro OPENSOURCE_FINISH -!macroend -!macro OPENSOURCE_UNSTARTUP -!macroend -!macro OPENSOURCE_UNINSTALL - Section -un.ModuleOpenSourceSection - Delete "$SMPROGRAMS\$STARTMENU_STRING\OpenSource Notice.lnk" - SectionEnd -!macroend -!macro OPENSOURCE_UNFINISH -!macroend -!else ;MODULE_OPENSOURCE -!macro OPENSOURCE_INITIALIZE -!macroend -!macro OPENSOURCE_SECTIONS -!macroend -!macro OPENSOURCE_DESCRIPTION -!macroend -!macro OPENSOURCE_STARTUP -!macroend -!macro OPENSOURCE_FINISH -!macroend -!macro OPENSOURCE_UNSTARTUP -!macroend -!macro OPENSOURCE_UNINSTALL -!macroend -!macro OPENSOURCE_UNFINISH -!macroend -!endif ;MODULE_OPENSOURCE - diff --git a/tools/installer/nsis/modules/registeruiext.nsh b/tools/installer/nsis/modules/registeruiext.nsh deleted file mode 100644 index f895bde..0000000 --- a/tools/installer/nsis/modules/registeruiext.nsh +++ /dev/null @@ -1,207 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; UI Extension Module - -!ifdef MODULE_REGISTERUIEXT - -;------------------------------------------------------------------------------------------------ -!macro REGISTERUIEXT_INITIALIZE - !include "includes\system.nsh" - - !ifndef MODULE_REGISTERUIEXT_QTDIR - !ifdef MODULE_MINGW - !define MODULE_REGISTERUIEXT_QTDIR $MINGW_INSTDIR - !endif - - !ifdef MODULE_MSVC - !define MODULE_REGISTERUIEXT_QTDIR $MSVC_INSTDIR - !endif - !endif - - !define MODULE_REGISTERUIEXT_INTERNAL_DESC "Trolltech.DesignerForm" - !define MODULE_REGISTERUIEXT_DESC_DESIGNER "Open with Qt Designer" - !define MODULE_REGISTERUIEXT_DESC_DEVENV "Open with Visual Studio .NET" - !define MODULE_REGISTERUIEXT_FILE_DESC "Qt Designer File" -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_SECTIONS - -Function GetSelectedVSIP - Push $0 - Push $1 - - StrCpy $0 "" -!ifdef MODULE_VSIP -!ifdef VSIP_SEC01 - SectionGetFlags ${VSIP_SEC01} $1 - IntOp $1 $1 & 1 - IntCmp $1 0 +2 - StrCpy $0 "7.1" -!endif -!ifdef VSIP_SEC02 - SectionGetFlags ${VSIP_SEC02} $1 - IntOp $1 $1 & 1 - IntCmp $1 0 +2 - StrCpy $0 "8.0" -!endif -!endif - - Pop $1 - Exch $0 -FunctionEnd - -SectionGroup "File Associations" -Section "UI Files (*.ui)" REGISTERUIEXT_SEC01 - call ModuleRegisterUI -SectionEnd -SectionGroupEnd - -Function ModuleRegisterUI - push $0 - push $1 - - WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "UIExtRegistered" 1 - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" "" "${MODULE_REGISTERUIEXT_FILE_DESC}" - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell" "" "open" - - Call GetSelectedVSIP - Pop $1 - - StrCmp "$1" "" 0 RegisterVSIP - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open" "" "${MODULE_REGISTERUIEXT_DESC_DESIGNER}" - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open\command" "" "${MODULE_REGISTERUIEXT_QTDIR}\bin\designer.exe $\"%1$\"" - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\DefaultIcon" "" "${MODULE_REGISTERUIEXT_QTDIR}\bin\designer.exe,0" - goto RegisterFinished - - RegisterVSIP: - Push $1 - Call GetVSInstallationDir - Pop $0 - - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open" "" "${MODULE_REGISTERUIEXT_DESC_DEVENV}" - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\${MODULE_REGISTERUIEXT_DESC_DEVENV}\command" "" "$0\devenv.exe $\"%1$\"" - WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\DefaultIcon" "" "$VSIP_INSTDIR\ui.ico" - RegisterFinished: - WriteRegStr HKCR ".ui" "" "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" - - pop $1 - pop $0 -FunctionEnd - -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_DESCRIPTION - !insertmacro MUI_DESCRIPTION_TEXT ${REGISTERUIEXT_SEC01} "This will associate the file extention .ui with the Qt GUI editor." -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_STARTUP - StrCmp $RUNNING_AS_ADMIN "true" +2 - SectionSetFlags ${REGISTERUIEXT_SEC01} 16 -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_FINISH -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_UNSTARTUP -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_UNINSTALL -Function un.ModuleRegisterUI - push $1 - ReadRegStr $1 HKCR ".ui" "" - strcmp $1 "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" 0 continue - ; do not delete this key since a subkey openwithlist - ; or open withprogid may exist - WriteRegStr HKCR ".ui" "" "" - continue: - ; just delete it since nobody else is supposed to use it - DeleteRegKey HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" - - pop $1 -FunctionEnd - -Section -un.ModuleRegisterUIExtSection - push $0 - ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "UIExtRegistered" - intcmp $0 1 0 DoneUnRegister - call un.ModuleRegisterUI - DoneUnRegister: - pop $0 -SectionEnd -!macroend - -;------------------------------------------------------------------------------------------------ - -!macro REGISTERUIEXT_UNFINISH -!macroend - -;------------------------------------------------------------------------------------------------ - -!else -!macro REGISTERUIEXT_INITIALIZE -!macroend -!macro REGISTERUIEXT_SECTIONS -!macroend -!macro REGISTERUIEXT_DESCRIPTION -!macroend -!macro REGISTERUIEXT_STARTUP -!macroend -!macro REGISTERUIEXT_FINISH -!macroend -!macro REGISTERUIEXT_UNSTARTUP -!macroend -!macro REGISTERUIEXT_UNINSTALL -!macroend -!macro REGISTERUIEXT_UNFINISH -!macroend -!endif diff --git a/tools/installer/nsis/opensource.ini b/tools/installer/nsis/opensource.ini deleted file mode 100644 index 4ce40bf..0000000 --- a/tools/installer/nsis/opensource.ini +++ /dev/null @@ -1,78 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;; All rights reserved. -;; Contact: Nokia Corporation (qt-info@nokia.com) -;; -;; This file is part of the tools applications of the Qt Toolkit. -;; -;; $QT_BEGIN_LICENSE:LGPL$ -;; No Commercial Usage -;; This file contains pre-release code and may not be distributed. -;; You may use this file in accordance with the terms and conditions -;; contained in the Technology Preview License Agreement accompanying -;; this package. -;; -;; 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, Nokia gives you certain additional -;; rights. These rights are described in the Nokia Qt LGPL Exception -;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;; -;; If you have questions regarding the use of this file, please contact -;; Nokia at qt-info@nokia.com. -;; -;; -;; -;; -;; -;; -;; -;; -;; $QT_END_LICENSE$ -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Ini file generated by the HM NIS Edit IO designer. -[Settings] -NumFields=4 - -[Field 1] -Type=Label -Text=You are now installing the Open Source Edition of Qt. It is licensed under GNU LGPL version 2.1 and the GPL version 3. -Left=0 -Right=300 -Top=0 -Bottom=78 - -[Field 2] -Type=Link -Text=http://qt.nokia.com/downloads -State=http://qt.nokia.com/downloads -Left=0 -Right=278 -Top=80 -Bottom=88 - -[Field 3] -Type=Link -Text=http://qt.nokia.com/about -State=http://qt.nokia.com/about -Left=0 -Right=267 -Top=112 -Bottom=120 - -[Field 4] -Type=Label -Text=To read more about Nokia's licensing, please go to: -Left=0 -Right=278 -Top=97 -Bottom=105 - -- cgit v0.12 From 169279fa29f9a5afeb079729c9aec3cffbf81811 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 8 Feb 2010 14:45:31 +0100 Subject: Update Symbian OS def files for 4.6.2 Task-number: QTBUG-8024 --- src/s60installs/bwins/QtGuiu.def | 27 +++++++++++++++++++++------ src/s60installs/eabi/QtGuiu.def | 25 +++++++++++++++++++------ 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 155e3e7..be7a6a0 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -2081,8 +2081,8 @@ EXPORTS ?addPixmap@QGraphicsScene@@QAEPAVQGraphicsPixmapItem@@ABVQPixmap@@@Z @ 2080 NONAME ; class QGraphicsPixmapItem * QGraphicsScene::addPixmap(class QPixmap const &) ?addPixmap@QIcon@@QAEXABVQPixmap@@W4Mode@1@W4State@1@@Z @ 2081 NONAME ; void QIcon::addPixmap(class QPixmap const &, enum QIcon::Mode, enum QIcon::State) ?addPixmap@QIconEngine@@UAEXABVQPixmap@@W4Mode@QIcon@@W4State@4@@Z @ 2082 NONAME ; void QIconEngine::addPixmap(class QPixmap const &, enum QIcon::Mode, enum QIcon::State) - ?addPixmapDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 2083 NONAME ; void QImagePixmapCleanupHooks::addPixmapDestructionHook(void (*)(class QPixmap *)) - ?addPixmapModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 2084 NONAME ; void QImagePixmapCleanupHooks::addPixmapModificationHook(void (*)(class QPixmap *)) + ?addPixmapDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 2083 NONAME ABSENT ; void QImagePixmapCleanupHooks::addPixmapDestructionHook(void (*)(class QPixmap *)) + ?addPixmapModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 2084 NONAME ABSENT ; void QImagePixmapCleanupHooks::addPixmapModificationHook(void (*)(class QPixmap *)) ?addPolygon@QGraphicsScene@@QAEPAVQGraphicsPolygonItem@@ABVQPolygonF@@ABVQPen@@ABVQBrush@@@Z @ 2085 NONAME ; class QGraphicsPolygonItem * QGraphicsScene::addPolygon(class QPolygonF const &, class QPen const &, class QBrush const &) ?addPolygon@QPainterPath@@QAEXABVQPolygonF@@@Z @ 2086 NONAME ; void QPainterPath::addPolygon(class QPolygonF const &) ?addRect@QGraphicsScene@@QAEPAVQGraphicsRectItem@@ABVQRectF@@ABVQPen@@ABVQBrush@@@Z @ 2087 NONAME ; class QGraphicsRectItem * QGraphicsScene::addRect(class QRectF const &, class QPen const &, class QBrush const &) @@ -4283,8 +4283,8 @@ EXPORTS ?executeDelayedItemsLayout@QAbstractItemView@@IAEXXZ @ 4282 NONAME ; void QAbstractItemView::executeDelayedItemsLayout(void) ?executeImageHooks@QImagePixmapCleanupHooks@@SAX_J@Z @ 4283 NONAME ; void QImagePixmapCleanupHooks::executeImageHooks(long long) ?executePendingSort@QTreeWidgetItem@@ABEXXZ @ 4284 NONAME ; void QTreeWidgetItem::executePendingSort(void) const - ?executePixmapDestructionHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmap@@@Z @ 4285 NONAME ; void QImagePixmapCleanupHooks::executePixmapDestructionHooks(class QPixmap *) - ?executePixmapModificationHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmap@@@Z @ 4286 NONAME ; void QImagePixmapCleanupHooks::executePixmapModificationHooks(class QPixmap *) + ?executePixmapDestructionHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmap@@@Z @ 4285 NONAME ABSENT ; void QImagePixmapCleanupHooks::executePixmapDestructionHooks(class QPixmap *) + ?executePixmapModificationHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmap@@@Z @ 4286 NONAME ABSENT ; void QImagePixmapCleanupHooks::executePixmapModificationHooks(class QPixmap *) ?expand@QTreeView@@QAEXABVQModelIndex@@@Z @ 4287 NONAME ; void QTreeView::expand(class QModelIndex const &) ?expandAll@QTreeView@@QAEXXZ @ 4288 NONAME ; void QTreeView::expandAll(void) ?expandItem@QTreeWidget@@QAEXPBVQTreeWidgetItem@@@Z @ 4289 NONAME ; void QTreeWidget::expandItem(class QTreeWidgetItem const *) @@ -7927,8 +7927,8 @@ EXPORTS ?removeItemWidget@QTreeWidget@@QAEXPAVQTreeWidgetItem@@H@Z @ 7926 NONAME ; void QTreeWidget::removeItemWidget(class QTreeWidgetItem *, int) ?removeMapping@QDataWidgetMapper@@QAEXPAVQWidget@@@Z @ 7927 NONAME ; void QDataWidgetMapper::removeMapping(class QWidget *) ?removePage@QWizard@@QAEXH@Z @ 7928 NONAME ; void QWizard::removePage(int) - ?removePixmapDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 7929 NONAME ; void QImagePixmapCleanupHooks::removePixmapDestructionHook(void (*)(class QPixmap *)) - ?removePixmapModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 7930 NONAME ; void QImagePixmapCleanupHooks::removePixmapModificationHook(void (*)(class QPixmap *)) + ?removePixmapDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 7929 NONAME ABSENT ; void QImagePixmapCleanupHooks::removePixmapDestructionHook(void (*)(class QPixmap *)) + ?removePixmapModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmap@@@Z@Z @ 7930 NONAME ABSENT ; void QImagePixmapCleanupHooks::removePixmapModificationHook(void (*)(class QPixmap *)) ?removeRow@QStandardItem@@QAEXH@Z @ 7931 NONAME ; void QStandardItem::removeRow(int) ?removeRow@QTableWidget@@QAEXH@Z @ 7932 NONAME ; void QTableWidget::removeRow(int) ?removeRows@QSortFilterProxyModel@@UAE_NHHABVQModelIndex@@@Z @ 7933 NONAME ; bool QSortFilterProxyModel::removeRows(int, int, class QModelIndex const &) @@ -12533,4 +12533,19 @@ EXPORTS ?symbianHandleCommand@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12532 NONAME ; int QApplicationPrivate::symbianHandleCommand(class QSymbianEvent const *) ?symbianProcessWsEvent@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12533 NONAME ; int QApplicationPrivate::symbianProcessWsEvent(class QSymbianEvent const *) ?symbianResourceChange@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12534 NONAME ; int QApplicationPrivate::symbianResourceChange(class QSymbianEvent const *) + ?addPixmapDataDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmapData@@@Z@Z @ 12535 NONAME ; void QImagePixmapCleanupHooks::addPixmapDataDestructionHook(void (*)(class QPixmapData *)) + ?addPixmapDataModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmapData@@@Z@Z @ 12536 NONAME ; void QImagePixmapCleanupHooks::addPixmapDataModificationHook(void (*)(class QPixmapData *)) + ?cacheKey@QPixmapData@@QBE_JXZ @ 12537 NONAME ; long long QPixmapData::cacheKey(void) const + ?eventFilter@QS60Style@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 12538 NONAME ; bool QS60Style::eventFilter(class QObject *, class QEvent *) + ?executePixmapDataDestructionHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmapData@@@Z @ 12539 NONAME ; void QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(class QPixmapData *) + ?executePixmapDataModificationHooks@QImagePixmapCleanupHooks@@SAXPAVQPixmapData@@@Z @ 12540 NONAME ; void QImagePixmapCleanupHooks::executePixmapDataModificationHooks(class QPixmapData *) + ?invalidateChildGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXW4InvalidateReason@1@@Z @ 12541 NONAME ; void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(enum QGraphicsItemPrivate::InvalidateReason) + ?invalidateParentGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXXZ @ 12542 NONAME ; void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively(void) + ?markParentDirty@QGraphicsItemPrivate@@QAEX_N@Z @ 12543 NONAME ; void QGraphicsItemPrivate::markParentDirty(bool) + ?removePixmapDataDestructionHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmapData@@@Z@Z @ 12544 NONAME ; void QImagePixmapCleanupHooks::removePixmapDataDestructionHook(void (*)(class QPixmapData *)) + ?removePixmapDataModificationHook@QImagePixmapCleanupHooks@@QAEXP6AXPAVQPixmapData@@@Z@Z @ 12545 NONAME ; void QImagePixmapCleanupHooks::removePixmapDataModificationHook(void (*)(class QPixmapData *)) + ?setParentItemHelper@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@PBVQVariant@@1@Z @ 12546 NONAME ; void QGraphicsItemPrivate::setParentItemHelper(class QGraphicsItem *, class QVariant const *, class QVariant const *) + ?timerEvent@QS60Style@@MAEXPAVQTimerEvent@@@Z @ 12547 NONAME ; void QS60Style::timerEvent(class QTimerEvent *) + ?updateAncestorFlags@QGraphicsItemPrivate@@QAEXXZ @ 12548 NONAME ; void QGraphicsItemPrivate::updateAncestorFlags(void) + ?updateChildWithGraphicsEffectFlagRecursively@QGraphicsItemPrivate@@QAEXXZ @ 12549 NONAME ; void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively(void) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index a9a69aa..5cf700b 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11648,12 +11648,12 @@ EXPORTS _ZN24QImagePixmapCleanupHooks18enableCleanupHooksEP11QPixmapData @ 11647 NONAME _ZN24QImagePixmapCleanupHooks18enableCleanupHooksERK6QImage @ 11648 NONAME _ZN24QImagePixmapCleanupHooks18enableCleanupHooksERK7QPixmap @ 11649 NONAME - _ZN24QImagePixmapCleanupHooks24addPixmapDestructionHookEPFvP7QPixmapE @ 11650 NONAME - _ZN24QImagePixmapCleanupHooks25addPixmapModificationHookEPFvP7QPixmapE @ 11651 NONAME - _ZN24QImagePixmapCleanupHooks27removePixmapDestructionHookEPFvP7QPixmapE @ 11652 NONAME - _ZN24QImagePixmapCleanupHooks28removePixmapModificationHookEPFvP7QPixmapE @ 11653 NONAME - _ZN24QImagePixmapCleanupHooks29executePixmapDestructionHooksEP7QPixmap @ 11654 NONAME - _ZN24QImagePixmapCleanupHooks30executePixmapModificationHooksEP7QPixmap @ 11655 NONAME + _ZN24QImagePixmapCleanupHooks24addPixmapDestructionHookEPFvP7QPixmapE @ 11650 NONAME ABSENT + _ZN24QImagePixmapCleanupHooks25addPixmapModificationHookEPFvP7QPixmapE @ 11651 NONAME ABSENT + _ZN24QImagePixmapCleanupHooks27removePixmapDestructionHookEPFvP7QPixmapE @ 11652 NONAME ABSENT + _ZN24QImagePixmapCleanupHooks28removePixmapModificationHookEPFvP7QPixmapE @ 11653 NONAME ABSENT + _ZN24QImagePixmapCleanupHooks29executePixmapDestructionHooksEP7QPixmap @ 11654 NONAME ABSENT + _ZN24QImagePixmapCleanupHooks30executePixmapModificationHooksEP7QPixmap @ 11655 NONAME ABSENT _ZN25QGraphicsDropShadowEffect13setBlurRadiusEf @ 11656 NONAME _ZN25QGraphicsDropShadowEffect17blurRadiusChangedEf @ 11657 NONAME _ZN25QGraphicsDropShadowEffect4drawEP8QPainter @ 11658 NONAME @@ -11792,4 +11792,17 @@ EXPORTS _ZN19QApplicationPrivate20symbianHandleCommandEPK13QSymbianEvent @ 11791 NONAME _ZN19QApplicationPrivate21symbianProcessWsEventEPK13QSymbianEvent @ 11792 NONAME _ZN19QApplicationPrivate21symbianResourceChangeEPK13QSymbianEvent @ 11793 NONAME + _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItemPK8QVariantS4_ @ 11794 NONAME + _ZN20QGraphicsItemPrivate19updateAncestorFlagsEv @ 11795 NONAME + _ZN20QGraphicsItemPrivate41invalidateChildGraphicsEffectsRecursivelyENS_16InvalidateReasonE @ 11796 NONAME + _ZN20QGraphicsItemPrivate42invalidateParentGraphicsEffectsRecursivelyEv @ 11797 NONAME + _ZN20QGraphicsItemPrivate44updateChildWithGraphicsEffectFlagRecursivelyEv @ 11798 NONAME + _ZN24QImagePixmapCleanupHooks28addPixmapDataDestructionHookEPFvP11QPixmapDataE @ 11799 NONAME + _ZN24QImagePixmapCleanupHooks29addPixmapDataModificationHookEPFvP11QPixmapDataE @ 11800 NONAME + _ZN24QImagePixmapCleanupHooks31removePixmapDataDestructionHookEPFvP11QPixmapDataE @ 11801 NONAME + _ZN24QImagePixmapCleanupHooks32removePixmapDataModificationHookEPFvP11QPixmapDataE @ 11802 NONAME + _ZN24QImagePixmapCleanupHooks33executePixmapDataDestructionHooksEP11QPixmapData @ 11803 NONAME + _ZN24QImagePixmapCleanupHooks34executePixmapDataModificationHooksEP11QPixmapData @ 11804 NONAME + _ZN9QS60Style10timerEventEP11QTimerEvent @ 11805 NONAME + _ZN9QS60Style11eventFilterEP7QObjectP6QEvent @ 11806 NONAME -- cgit v0.12 From 43a9c48554579d76e1f1267fbd70f488f22fd408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 8 Feb 2010 14:55:40 +0100 Subject: Fixed QImagReader::setAutoDetectImageFormat() to work with plugins. Only the compiled in formats where checked when setAutoDetectImageFormat(false) was set on a QImageReader object. Task-number: QTBUG-7980 Reviewed-by: aavit --- src/gui/image/qimagereader.cpp | 28 +++++++++++++++++++-------- tests/auto/qimagereader/tst_qimagereader.cpp | 29 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index c9e015c..9320cfc 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -263,25 +263,37 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, device->seek(pos); } - if (!handler && !testFormat.isEmpty() && autoDetectImageFormat && !ignoresFormatAndExtension) { + if (!handler && !testFormat.isEmpty() && !ignoresFormatAndExtension) { // check if any plugin supports the format (they are not allowed to // read from the device yet). const qint64 pos = device ? device->pos() : 0; - for (int i = 0; i < keys.size(); ++i) { - if (i != suffixPluginIndex) { - QImageIOPlugin *plugin = qobject_cast(l->instance(keys.at(i))); - if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { + + if (autoDetectImageFormat) { + for (int i = 0; i < keys.size(); ++i) { + if (i != suffixPluginIndex) { + QImageIOPlugin *plugin = qobject_cast(l->instance(keys.at(i))); + if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { #ifdef QIMAGEREADER_DEBUG - qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format"; + qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format"; #endif - handler = plugin->create(device, testFormat); - break; + handler = plugin->create(device, testFormat); + break; + } } } + } else { + QImageIOPlugin *plugin = qobject_cast(l->instance(QLatin1String(testFormat))); + if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { +#ifdef QIMAGEREADER_DEBUG + qDebug() << "QImageReader::createReadHandler: the" << testFormat << "plugin can read this format"; +#endif + handler = plugin->create(device, testFormat); + } } if (device && !device->isSequential()) device->seek(pos); } + #endif // QT_NO_LIBRARY // if we don't have a handler yet, check if we have built-in support for diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 121a8fa..99244c2 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1633,6 +1633,35 @@ void tst_QImageReader::autoDetectImageFormat() QVERIFY(reader.canRead()); QVERIFY(!reader.read().isNull()); } + +#ifdef QTEST_HAVE_JPEG + { + QImageReader io(prefix + "YCbCr_rgb.jpg"); + io.setAutoDetectImageFormat(false); + // This should fail since no format string is given + QImage image; + QVERIFY(!io.read(&image)); + } + { + QImageReader io(prefix + "YCbCr_rgb.jpg", "jpg"); + io.setAutoDetectImageFormat(false); + QImage image; + QVERIFY(io.read(&image)); + } +#endif + { + QImageReader io(prefix + "tst7.png"); + io.setAutoDetectImageFormat(false); + // This should fail since no format string is given + QImage image; + QVERIFY(!io.read(&image)); + } + { + QImageReader io(prefix + "tst7.png", "png"); + io.setAutoDetectImageFormat(false); + QImage image; + QVERIFY(io.read(&image)); + } } void tst_QImageReader::fileNameProbing() -- cgit v0.12 From 020830966e08239854ac207ec28663a80c6e0647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 8 Feb 2010 14:01:08 +0100 Subject: Restructure tests/benchmarks directory. We follow the same structure as used in the src directory. This makes it easier to navigate through the jungel, especially now that we are going to add functional tests etc. --- tests/benchmarks/benchmarks.pro | 52 +- tests/benchmarks/blendbench/blendbench.pro | 8 - tests/benchmarks/blendbench/main.cpp | 152 -- .../containers-associative.pro | 8 - tests/benchmarks/containers-associative/main.cpp | 143 -- .../containers-sequential.pro | 8 - tests/benchmarks/containers-sequential/main.cpp | 265 ---- tests/benchmarks/corelib/corelib.pro | 6 + tests/benchmarks/corelib/io/io.pro | 9 + tests/benchmarks/corelib/io/qdir/qdir.pro | 8 + tests/benchmarks/corelib/io/qdir/tst_qdir.cpp | 198 +++ tests/benchmarks/corelib/io/qdiriterator/main.cpp | 251 +++ .../corelib/io/qdiriterator/qdiriterator.pro | 23 + .../io/qdiriterator/qfilesystemiterator.cpp | 678 ++++++++ .../corelib/io/qdiriterator/qfilesystemiterator.h | 99 ++ tests/benchmarks/corelib/io/qfile/main.cpp | 675 ++++++++ tests/benchmarks/corelib/io/qfile/qfile.pro | 7 + tests/benchmarks/corelib/io/qfileinfo/main.cpp | 83 + .../benchmarks/corelib/io/qfileinfo/qfileinfo.pro | 12 + tests/benchmarks/corelib/io/qiodevice/main.cpp | 107 ++ .../benchmarks/corelib/io/qiodevice/qiodevice.pro | 13 + .../benchmarks/corelib/io/qtemporaryfile/main.cpp | 103 ++ .../corelib/io/qtemporaryfile/qtemporaryfile.pro | 12 + tests/benchmarks/corelib/kernel/events/events.pro | 7 + tests/benchmarks/corelib/kernel/events/main.cpp | 187 +++ tests/benchmarks/corelib/kernel/kernel.pro | 6 + .../benchmarks/corelib/kernel/qmetaobject/main.cpp | 159 ++ .../corelib/kernel/qmetaobject/qmetaobject.pro | 5 + tests/benchmarks/corelib/kernel/qobject/main.cpp | 180 +++ tests/benchmarks/corelib/kernel/qobject/object.cpp | 65 + tests/benchmarks/corelib/kernel/qobject/object.h | 75 + .../benchmarks/corelib/kernel/qobject/qobject.pro | 9 + .../corelib/kernel/qvariant/qvariant.pro | 11 + .../corelib/kernel/qvariant/tst_qvariant.cpp | 180 +++ .../thread/qthreadstorage/qthreadstorage.pro | 6 + .../thread/qthreadstorage/tst_qthreadstorage.cpp | 124 ++ tests/benchmarks/corelib/thread/thread.pro | 3 + .../containers-associative.pro | 8 + .../corelib/tools/containers-associative/main.cpp | 143 ++ .../containers-sequential.pro | 8 + .../corelib/tools/containers-sequential/main.cpp | 265 ++++ tests/benchmarks/corelib/tools/qbytearray/main.cpp | 92 ++ .../corelib/tools/qbytearray/qbytearray.pro | 12 + tests/benchmarks/corelib/tools/qrect/main.cpp | 329 ++++ tests/benchmarks/corelib/tools/qrect/qrect.pro | 12 + tests/benchmarks/corelib/tools/qregexp/main.cpp | 290 ++++ tests/benchmarks/corelib/tools/qregexp/qregexp.pro | 12 + tests/benchmarks/corelib/tools/qstring/main.cpp | 147 ++ tests/benchmarks/corelib/tools/qstring/qstring.pro | 16 + tests/benchmarks/corelib/tools/qstring/utf-8.txt | 72 + .../corelib/tools/qstringbuilder/main.cpp | 464 ++++++ .../tools/qstringbuilder/qstringbuilder.pro | 12 + .../corelib/tools/qstringlist/.gitignore | 1 + .../benchmarks/corelib/tools/qstringlist/main.cpp | 193 +++ .../corelib/tools/qstringlist/qstringlist.pro | 6 + tests/benchmarks/corelib/tools/tools.pro | 10 + tests/benchmarks/events/events.pro | 7 - tests/benchmarks/events/main.cpp | 187 --- tests/benchmarks/gui/animation/animation.pro | 2 + .../gui/animation/qanimation/dummyanimation.cpp | 61 + .../gui/animation/qanimation/dummyanimation.h | 60 + .../gui/animation/qanimation/dummyobject.cpp | 66 + .../gui/animation/qanimation/dummyobject.h | 64 + tests/benchmarks/gui/animation/qanimation/main.cpp | 191 +++ .../gui/animation/qanimation/qanimation.pro | 18 + .../gui/animation/qanimation/rectanimation.cpp | 94 ++ .../gui/animation/qanimation/rectanimation.h | 70 + tests/benchmarks/gui/graphicsview/graphicsview.pro | 7 + .../qgraphicsanchorlayout.pro | 6 + .../tst_qgraphicsanchorlayout.cpp | 433 ++++++ .../graphicsview/qgraphicsitem/qgraphicsitem.pro | 5 + .../qgraphicsitem/tst_qgraphicsitem.cpp | 243 +++ .../graphicsview/qgraphicsscene/qgraphicsscene.pro | 6 + .../qgraphicsscene/tst_qgraphicsscene.cpp | 248 +++ .../qgraphicsview/benchapps/chipTest/chip.cpp | 176 +++ .../qgraphicsview/benchapps/chipTest/chip.debug | Bin 0 -> 863805 bytes .../qgraphicsview/benchapps/chipTest/chip.h | 68 + .../qgraphicsview/benchapps/chipTest/chip.pro | 19 + .../qgraphicsview/benchapps/chipTest/fileprint.png | Bin 0 -> 1456 bytes .../qgraphicsview/benchapps/chipTest/images.qrc | 10 + .../qgraphicsview/benchapps/chipTest/main.cpp | 57 + .../benchapps/chipTest/mainwindow.cpp | 87 ++ .../qgraphicsview/benchapps/chipTest/mainwindow.h | 66 + .../qgraphicsview/benchapps/chipTest/qt4logo.png | Bin 0 -> 48333 bytes .../benchapps/chipTest/rotateleft.png | Bin 0 -> 1754 bytes .../benchapps/chipTest/rotateright.png | Bin 0 -> 1732 bytes .../qgraphicsview/benchapps/chipTest/view.cpp | 257 +++ .../qgraphicsview/benchapps/chipTest/view.h | 86 ++ .../qgraphicsview/benchapps/chipTest/zoomin.png | Bin 0 -> 1622 bytes .../qgraphicsview/benchapps/chipTest/zoomout.png | Bin 0 -> 1601 bytes .../qgraphicsview/benchapps/moveItems/main.cpp | 106 ++ .../benchapps/moveItems/moveItems.pro | 1 + .../qgraphicsview/benchapps/scrolltest/main.cpp | 146 ++ .../benchapps/scrolltest/scrolltest.pro | 1 + .../graphicsview/qgraphicsview/chiptester/chip.cpp | 182 +++ .../graphicsview/qgraphicsview/chiptester/chip.h | 68 + .../qgraphicsview/chiptester/chiptester.cpp | 144 ++ .../qgraphicsview/chiptester/chiptester.h | 85 + .../qgraphicsview/chiptester/chiptester.pri | 12 + .../qgraphicsview/chiptester/images.qrc | 5 + .../qgraphicsview/chiptester/qt4logo.png | Bin 0 -> 48333 bytes .../graphicsview/qgraphicsview/images/designer.png | Bin 0 -> 4205 bytes .../qgraphicsview/images/wine-big.jpeg | Bin 0 -> 12249 bytes .../graphicsview/qgraphicsview/images/wine.jpeg | Bin 0 -> 2265 bytes .../graphicsview/qgraphicsview/qgraphicsview.pro | 16 + .../graphicsview/qgraphicsview/qgraphicsview.qrc | 9 + .../gui/graphicsview/qgraphicsview/random.data | Bin 0 -> 800 bytes .../qgraphicsview/tst_qgraphicsview.cpp | 908 +++++++++++ .../qgraphicswidget/qgraphicswidget.pro | 6 + .../qgraphicswidget/tst_qgraphicswidget.cpp | 94 ++ tests/benchmarks/gui/gui.pro | 11 + .../benchmarks/gui/image/blendbench/blendbench.pro | 8 + tests/benchmarks/gui/image/blendbench/main.cpp | 152 ++ tests/benchmarks/gui/image/image.pro | 6 + .../gui/image/qimagereader/images/16bpp.bmp | Bin 0 -> 153654 bytes .../gui/image/qimagereader/images/4bpp-rle.bmp | Bin 0 -> 23662 bytes .../gui/image/qimagereader/images/YCbCr_cmyk.jpg | Bin 0 -> 3699 bytes .../gui/image/qimagereader/images/YCbCr_cmyk.png | Bin 0 -> 230 bytes .../gui/image/qimagereader/images/YCbCr_rgb.jpg | Bin 0 -> 2045 bytes .../gui/image/qimagereader/images/away.png | Bin 0 -> 753 bytes .../gui/image/qimagereader/images/ball.mng | Bin 0 -> 34394 bytes .../gui/image/qimagereader/images/bat1.gif | Bin 0 -> 953 bytes .../gui/image/qimagereader/images/bat2.gif | Bin 0 -> 980 bytes .../gui/image/qimagereader/images/beavis.jpg | Bin 0 -> 20688 bytes .../gui/image/qimagereader/images/black.png | Bin 0 -> 697 bytes .../gui/image/qimagereader/images/black.xpm | 65 + .../gui/image/qimagereader/images/colorful.bmp | Bin 0 -> 65002 bytes .../image/qimagereader/images/corrupt-colors.xpm | 26 + .../gui/image/qimagereader/images/corrupt-data.tif | Bin 0 -> 8590 bytes .../image/qimagereader/images/corrupt-pixels.xpm | 7 + .../gui/image/qimagereader/images/corrupt.bmp | Bin 0 -> 116 bytes .../gui/image/qimagereader/images/corrupt.gif | Bin 0 -> 2608 bytes .../gui/image/qimagereader/images/corrupt.jpg | Bin 0 -> 18 bytes .../gui/image/qimagereader/images/corrupt.mng | Bin 0 -> 183 bytes .../gui/image/qimagereader/images/corrupt.png | Bin 0 -> 95 bytes .../gui/image/qimagereader/images/corrupt.xbm | 5 + .../qimagereader/images/crash-signed-char.bmp | Bin 0 -> 45748 bytes .../gui/image/qimagereader/images/earth.gif | Bin 0 -> 51712 bytes .../gui/image/qimagereader/images/fire.mng | Bin 0 -> 44430 bytes .../gui/image/qimagereader/images/font.bmp | Bin 0 -> 1026 bytes .../gui/image/qimagereader/images/gnus.xbm | 622 ++++++++ .../gui/image/qimagereader/images/image.pbm | 8 + .../gui/image/qimagereader/images/image.pgm | 10 + .../gui/image/qimagereader/images/image.png | Bin 0 -> 549 bytes .../gui/image/qimagereader/images/image.ppm | 7 + .../gui/image/qimagereader/images/kollada-noext | Bin 0 -> 13907 bytes .../gui/image/qimagereader/images/kollada.png | Bin 0 -> 13907 bytes .../gui/image/qimagereader/images/marble.xpm | 470 ++++++ .../gui/image/qimagereader/images/namedcolors.xpm | 18 + .../image/qimagereader/images/negativeheight.bmp | Bin 0 -> 24630 bytes .../gui/image/qimagereader/images/noclearcode.bmp | Bin 0 -> 326 bytes .../gui/image/qimagereader/images/noclearcode.gif | Bin 0 -> 130 bytes .../image/qimagereader/images/nontransparent.xpm | 788 ++++++++++ .../qimagereader/images/pngwithcompressedtext.png | Bin 0 -> 757 bytes .../gui/image/qimagereader/images/pngwithtext.png | Bin 0 -> 796 bytes .../images/rgba_adobedeflate_littleendian.tif | Bin 0 -> 4784 bytes .../qimagereader/images/rgba_lzw_littleendian.tif | Bin 0 -> 26690 bytes .../images/rgba_nocompression_bigendian.tif | Bin 0 -> 160384 bytes .../images/rgba_nocompression_littleendian.tif | Bin 0 -> 160388 bytes .../images/rgba_packbits_littleendian.tif | Bin 0 -> 161370 bytes .../images/rgba_zipdeflate_littleendian.tif | Bin 0 -> 14728 bytes .../gui/image/qimagereader/images/runners.ppm | Bin 0 -> 960016 bytes .../gui/image/qimagereader/images/task210380.jpg | Bin 0 -> 975535 bytes .../gui/image/qimagereader/images/teapot.ppm | 31 + .../gui/image/qimagereader/images/test.ppm | 2 + .../gui/image/qimagereader/images/test.xpm | 260 ++++ .../gui/image/qimagereader/images/transparent.xpm | 788 ++++++++++ .../gui/image/qimagereader/images/trolltech.gif | Bin 0 -> 42629 bytes .../gui/image/qimagereader/images/tst7.bmp | Bin 0 -> 582 bytes .../gui/image/qimagereader/images/tst7.png | Bin 0 -> 167 bytes .../gui/image/qimagereader/qimagereader.pro | 27 + .../gui/image/qimagereader/tst_qimagereader.cpp | 244 +++ tests/benchmarks/gui/image/qpixmap/qpixmap.pro | 5 + tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp | 227 +++ .../gui/image/qpixmapcache/qpixmapcache.pro | 6 + .../gui/image/qpixmapcache/tst_qpixmapcache.cpp | 226 +++ tests/benchmarks/gui/itemviews/itemviews.pro | 3 + .../gui/itemviews/qtableview/qtableview.pro | 6 + .../gui/itemviews/qtableview/tst_qtableview.cpp | 367 +++++ tests/benchmarks/gui/kernel/kernel.pro | 4 + tests/benchmarks/gui/kernel/qapplication/main.cpp | 71 + .../gui/kernel/qapplication/qapplication.pro | 10 + tests/benchmarks/gui/kernel/qwidget/qwidget.pro | 4 + .../benchmarks/gui/kernel/qwidget/tst_qwidget.cpp | 332 ++++ tests/benchmarks/gui/math3d/math3d.pro | 4 + .../gui/math3d/qmatrix4x4/qmatrix4x4.pro | 6 + .../gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp | 672 ++++++++ .../gui/math3d/qquaternion/qquaternion.pro | 6 + .../gui/math3d/qquaternion/tst_qquaternion.cpp | 124 ++ tests/benchmarks/gui/painting/painting.pro | 5 + .../benchmarks/gui/painting/qpainter/qpainter.pro | 5 + .../gui/painting/qpainter/tst_qpainter.cpp | 1633 ++++++++++++++++++++ tests/benchmarks/gui/painting/qregion/main.cpp | 89 ++ tests/benchmarks/gui/painting/qregion/qregion.pro | 10 + .../gui/painting/qtransform/qtransform.pro | 6 + .../gui/painting/qtransform/tst_qtransform.cpp | 592 +++++++ .../gui/styles/qstylesheetstyle/main.cpp | 192 +++ .../styles/qstylesheetstyle/qstylesheetstyle.pro | 11 + tests/benchmarks/gui/styles/styles.pro | 3 + tests/benchmarks/gui/text/qfontmetrics/main.cpp | 112 ++ .../gui/text/qfontmetrics/qfontmetrics.pro | 5 + tests/benchmarks/gui/text/qtext/bidi.txt | 4 + tests/benchmarks/gui/text/qtext/main.cpp | 415 +++++ tests/benchmarks/gui/text/qtext/qtext.pro | 14 + tests/benchmarks/gui/text/text.pro | 4 + tests/benchmarks/network/access/access.pro | 4 + .../access/qfile_vs_qnetworkaccessmanager/main.cpp | 193 +++ .../qfile_vs_qnetworkaccessmanager.pro | 13 + .../network/access/qnetworkreply/qnetworkreply.pro | 13 + .../access/qnetworkreply/tst_qnetworkreply.cpp | 656 ++++++++ tests/benchmarks/network/kernel/kernel.pro | 3 + tests/benchmarks/network/kernel/qhostinfo/main.cpp | 96 ++ .../network/kernel/qhostinfo/qhostinfo.pro | 13 + tests/benchmarks/network/network.pro | 5 + .../network/socket/qtcpserver/qtcpserver.pro | 13 + .../network/socket/qtcpserver/tst_qtcpserver.cpp | 277 ++++ tests/benchmarks/network/socket/socket.pro | 3 + tests/benchmarks/qanimation/dummyanimation.cpp | 61 - tests/benchmarks/qanimation/dummyanimation.h | 60 - tests/benchmarks/qanimation/dummyobject.cpp | 66 - tests/benchmarks/qanimation/dummyobject.h | 64 - tests/benchmarks/qanimation/main.cpp | 191 --- tests/benchmarks/qanimation/qanimation.pro | 18 - tests/benchmarks/qanimation/rectanimation.cpp | 94 -- tests/benchmarks/qanimation/rectanimation.h | 70 - tests/benchmarks/qapplication/main.cpp | 71 - tests/benchmarks/qapplication/qapplication.pro | 10 - tests/benchmarks/qbytearray/main.cpp | 92 -- tests/benchmarks/qbytearray/qbytearray.pro | 12 - tests/benchmarks/qdir/qdir.pro | 8 - tests/benchmarks/qdir/tst_qdir.cpp | 198 --- tests/benchmarks/qdiriterator/main.cpp | 251 --- tests/benchmarks/qdiriterator/qdiriterator.pro | 23 - .../qdiriterator/qfilesystemiterator.cpp | 678 -------- .../benchmarks/qdiriterator/qfilesystemiterator.h | 99 -- tests/benchmarks/qfile/main.cpp | 675 -------- tests/benchmarks/qfile/qfile.pro | 7 - .../qfile_vs_qnetworkaccessmanager/main.cpp | 193 --- .../qfile_vs_qnetworkaccessmanager.pro | 13 - tests/benchmarks/qfileinfo/main.cpp | 83 - tests/benchmarks/qfileinfo/qfileinfo.pro | 12 - tests/benchmarks/qfontmetrics/main.cpp | 112 -- tests/benchmarks/qfontmetrics/qfontmetrics.pro | 5 - .../qgraphicsanchorlayout.pro | 6 - .../tst_qgraphicsanchorlayout.cpp | 433 ------ tests/benchmarks/qgraphicsitem/qgraphicsitem.pro | 5 - .../benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp | 243 --- tests/benchmarks/qgraphicsscene/qgraphicsscene.pro | 6 - .../qgraphicsscene/tst_qgraphicsscene.cpp | 248 --- .../qgraphicsview/benchapps/chipTest/chip.cpp | 176 --- .../qgraphicsview/benchapps/chipTest/chip.debug | Bin 863805 -> 0 bytes .../qgraphicsview/benchapps/chipTest/chip.h | 68 - .../qgraphicsview/benchapps/chipTest/chip.pro | 19 - .../qgraphicsview/benchapps/chipTest/fileprint.png | Bin 1456 -> 0 bytes .../qgraphicsview/benchapps/chipTest/images.qrc | 10 - .../qgraphicsview/benchapps/chipTest/main.cpp | 57 - .../benchapps/chipTest/mainwindow.cpp | 87 -- .../qgraphicsview/benchapps/chipTest/mainwindow.h | 66 - .../qgraphicsview/benchapps/chipTest/qt4logo.png | Bin 48333 -> 0 bytes .../benchapps/chipTest/rotateleft.png | Bin 1754 -> 0 bytes .../benchapps/chipTest/rotateright.png | Bin 1732 -> 0 bytes .../qgraphicsview/benchapps/chipTest/view.cpp | 257 --- .../qgraphicsview/benchapps/chipTest/view.h | 86 -- .../qgraphicsview/benchapps/chipTest/zoomin.png | Bin 1622 -> 0 bytes .../qgraphicsview/benchapps/chipTest/zoomout.png | Bin 1601 -> 0 bytes .../qgraphicsview/benchapps/moveItems/main.cpp | 106 -- .../benchapps/moveItems/moveItems.pro | 1 - .../qgraphicsview/benchapps/scrolltest/main.cpp | 146 -- .../benchapps/scrolltest/scrolltest.pro | 1 - tests/benchmarks/qgraphicsview/chiptester/chip.cpp | 182 --- tests/benchmarks/qgraphicsview/chiptester/chip.h | 68 - .../qgraphicsview/chiptester/chiptester.cpp | 144 -- .../qgraphicsview/chiptester/chiptester.h | 85 - .../qgraphicsview/chiptester/chiptester.pri | 12 - .../benchmarks/qgraphicsview/chiptester/images.qrc | 5 - .../qgraphicsview/chiptester/qt4logo.png | Bin 48333 -> 0 bytes tests/benchmarks/qgraphicsview/images/designer.png | Bin 4205 -> 0 bytes .../benchmarks/qgraphicsview/images/wine-big.jpeg | Bin 12249 -> 0 bytes tests/benchmarks/qgraphicsview/images/wine.jpeg | Bin 2265 -> 0 bytes tests/benchmarks/qgraphicsview/qgraphicsview.pro | 16 - tests/benchmarks/qgraphicsview/qgraphicsview.qrc | 9 - tests/benchmarks/qgraphicsview/random.data | Bin 800 -> 0 bytes .../benchmarks/qgraphicsview/tst_qgraphicsview.cpp | 908 ----------- .../benchmarks/qgraphicswidget/qgraphicswidget.pro | 6 - .../qgraphicswidget/tst_qgraphicswidget.cpp | 94 -- tests/benchmarks/qhostinfo/main.cpp | 96 -- tests/benchmarks/qhostinfo/qhostinfo.pro | 13 - tests/benchmarks/qimagereader/images/16bpp.bmp | Bin 153654 -> 0 bytes tests/benchmarks/qimagereader/images/4bpp-rle.bmp | Bin 23662 -> 0 bytes .../benchmarks/qimagereader/images/YCbCr_cmyk.jpg | Bin 3699 -> 0 bytes .../benchmarks/qimagereader/images/YCbCr_cmyk.png | Bin 230 -> 0 bytes tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg | Bin 2045 -> 0 bytes tests/benchmarks/qimagereader/images/away.png | Bin 753 -> 0 bytes tests/benchmarks/qimagereader/images/ball.mng | Bin 34394 -> 0 bytes tests/benchmarks/qimagereader/images/bat1.gif | Bin 953 -> 0 bytes tests/benchmarks/qimagereader/images/bat2.gif | Bin 980 -> 0 bytes tests/benchmarks/qimagereader/images/beavis.jpg | Bin 20688 -> 0 bytes tests/benchmarks/qimagereader/images/black.png | Bin 697 -> 0 bytes tests/benchmarks/qimagereader/images/black.xpm | 65 - tests/benchmarks/qimagereader/images/colorful.bmp | Bin 65002 -> 0 bytes .../qimagereader/images/corrupt-colors.xpm | 26 - .../qimagereader/images/corrupt-data.tif | Bin 8590 -> 0 bytes .../qimagereader/images/corrupt-pixels.xpm | 7 - tests/benchmarks/qimagereader/images/corrupt.bmp | Bin 116 -> 0 bytes tests/benchmarks/qimagereader/images/corrupt.gif | Bin 2608 -> 0 bytes tests/benchmarks/qimagereader/images/corrupt.jpg | Bin 18 -> 0 bytes tests/benchmarks/qimagereader/images/corrupt.mng | Bin 183 -> 0 bytes tests/benchmarks/qimagereader/images/corrupt.png | Bin 95 -> 0 bytes tests/benchmarks/qimagereader/images/corrupt.xbm | 5 - .../qimagereader/images/crash-signed-char.bmp | Bin 45748 -> 0 bytes tests/benchmarks/qimagereader/images/earth.gif | Bin 51712 -> 0 bytes tests/benchmarks/qimagereader/images/fire.mng | Bin 44430 -> 0 bytes tests/benchmarks/qimagereader/images/font.bmp | Bin 1026 -> 0 bytes tests/benchmarks/qimagereader/images/gnus.xbm | 622 -------- tests/benchmarks/qimagereader/images/image.pbm | 8 - tests/benchmarks/qimagereader/images/image.pgm | 10 - tests/benchmarks/qimagereader/images/image.png | Bin 549 -> 0 bytes tests/benchmarks/qimagereader/images/image.ppm | 7 - tests/benchmarks/qimagereader/images/kollada-noext | Bin 13907 -> 0 bytes tests/benchmarks/qimagereader/images/kollada.png | Bin 13907 -> 0 bytes tests/benchmarks/qimagereader/images/marble.xpm | 470 ------ .../benchmarks/qimagereader/images/namedcolors.xpm | 18 - .../qimagereader/images/negativeheight.bmp | Bin 24630 -> 0 bytes .../benchmarks/qimagereader/images/noclearcode.bmp | Bin 326 -> 0 bytes .../benchmarks/qimagereader/images/noclearcode.gif | Bin 130 -> 0 bytes .../qimagereader/images/nontransparent.xpm | 788 ---------- .../qimagereader/images/pngwithcompressedtext.png | Bin 757 -> 0 bytes .../benchmarks/qimagereader/images/pngwithtext.png | Bin 796 -> 0 bytes .../images/rgba_adobedeflate_littleendian.tif | Bin 4784 -> 0 bytes .../qimagereader/images/rgba_lzw_littleendian.tif | Bin 26690 -> 0 bytes .../images/rgba_nocompression_bigendian.tif | Bin 160384 -> 0 bytes .../images/rgba_nocompression_littleendian.tif | Bin 160388 -> 0 bytes .../images/rgba_packbits_littleendian.tif | Bin 161370 -> 0 bytes .../images/rgba_zipdeflate_littleendian.tif | Bin 14728 -> 0 bytes tests/benchmarks/qimagereader/images/runners.ppm | Bin 960016 -> 0 bytes .../benchmarks/qimagereader/images/task210380.jpg | Bin 975535 -> 0 bytes tests/benchmarks/qimagereader/images/teapot.ppm | 31 - tests/benchmarks/qimagereader/images/test.ppm | 2 - tests/benchmarks/qimagereader/images/test.xpm | 260 ---- .../benchmarks/qimagereader/images/transparent.xpm | 788 ---------- tests/benchmarks/qimagereader/images/trolltech.gif | Bin 42629 -> 0 bytes tests/benchmarks/qimagereader/images/tst7.bmp | Bin 582 -> 0 bytes tests/benchmarks/qimagereader/images/tst7.png | Bin 167 -> 0 bytes tests/benchmarks/qimagereader/qimagereader.pro | 27 - tests/benchmarks/qimagereader/tst_qimagereader.cpp | 244 --- tests/benchmarks/qiodevice/main.cpp | 107 -- tests/benchmarks/qiodevice/qiodevice.pro | 13 - tests/benchmarks/qmatrix4x4/qmatrix4x4.pro | 6 - tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp | 672 -------- tests/benchmarks/qmetaobject/main.cpp | 159 -- tests/benchmarks/qmetaobject/qmetaobject.pro | 5 - tests/benchmarks/qnetworkreply/qnetworkreply.pro | 13 - .../benchmarks/qnetworkreply/tst_qnetworkreply.cpp | 656 -------- tests/benchmarks/qobject/main.cpp | 180 --- tests/benchmarks/qobject/object.cpp | 65 - tests/benchmarks/qobject/object.h | 75 - tests/benchmarks/qobject/qobject.pro | 9 - tests/benchmarks/qpainter/qpainter.pro | 5 - tests/benchmarks/qpainter/tst_qpainter.cpp | 1633 -------------------- tests/benchmarks/qpixmap/qpixmap.pro | 5 - tests/benchmarks/qpixmap/tst_qpixmap.cpp | 227 --- tests/benchmarks/qpixmapcache/qpixmapcache.pro | 6 - tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp | 226 --- tests/benchmarks/qquaternion/qquaternion.pro | 6 - tests/benchmarks/qquaternion/tst_qquaternion.cpp | 124 -- tests/benchmarks/qrect/main.cpp | 329 ---- tests/benchmarks/qrect/qrect.pro | 12 - tests/benchmarks/qregexp/main.cpp | 290 ---- tests/benchmarks/qregexp/qregexp.pro | 12 - tests/benchmarks/qregion/main.cpp | 89 -- tests/benchmarks/qregion/qregion.pro | 10 - tests/benchmarks/qscriptclass/qscriptclass.pro | 7 - tests/benchmarks/qscriptclass/tst_qscriptclass.cpp | 511 ------ tests/benchmarks/qscriptengine/qscriptengine.pro | 12 - .../benchmarks/qscriptengine/tst_qscriptengine.cpp | 289 ---- tests/benchmarks/qscriptvalue/qscriptvalue.pro | 7 - tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp | 205 --- tests/benchmarks/qstring/main.cpp | 147 -- tests/benchmarks/qstring/qstring.pro | 16 - tests/benchmarks/qstring/utf-8.txt | 72 - tests/benchmarks/qstringbuilder/main.cpp | 464 ------ tests/benchmarks/qstringbuilder/qstringbuilder.pro | 12 - tests/benchmarks/qstringlist/.gitignore | 1 - tests/benchmarks/qstringlist/main.cpp | 193 --- tests/benchmarks/qstringlist/qstringlist.pro | 6 - tests/benchmarks/qstylesheetstyle/main.cpp | 192 --- .../qstylesheetstyle/qstylesheetstyle.pro | 11 - tests/benchmarks/qsvgrenderer/data/tiger.svg | 730 --------- tests/benchmarks/qsvgrenderer/qsvgrenderer.pro | 9 - tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc | 6 - tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp | 103 -- tests/benchmarks/qtableview/qtableview.pro | 6 - tests/benchmarks/qtableview/tst_qtableview.cpp | 367 ----- tests/benchmarks/qtcpserver/qtcpserver.pro | 13 - tests/benchmarks/qtcpserver/tst_qtcpserver.cpp | 277 ---- tests/benchmarks/qtemporaryfile/main.cpp | 103 -- tests/benchmarks/qtemporaryfile/qtemporaryfile.pro | 12 - tests/benchmarks/qtext/bidi.txt | 4 - tests/benchmarks/qtext/main.cpp | 415 ----- tests/benchmarks/qtext/qtext.pro | 14 - tests/benchmarks/qthreadstorage/qthreadstorage.pro | 6 - .../qthreadstorage/tst_qthreadstorage.cpp | 124 -- tests/benchmarks/qtransform/qtransform.pro | 6 - tests/benchmarks/qtransform/tst_qtransform.cpp | 592 ------- tests/benchmarks/qvariant/qvariant.pro | 11 - tests/benchmarks/qvariant/tst_qvariant.cpp | 180 --- tests/benchmarks/qwidget/qwidget.pro | 4 - tests/benchmarks/qwidget/tst_qwidget.cpp | 332 ---- .../script/qscriptclass/qscriptclass.pro | 7 + .../script/qscriptclass/tst_qscriptclass.cpp | 511 ++++++ .../script/qscriptengine/qscriptengine.pro | 12 + .../script/qscriptengine/tst_qscriptengine.cpp | 289 ++++ .../script/qscriptvalue/qscriptvalue.pro | 7 + .../script/qscriptvalue/tst_qscriptvalue.cpp | 205 +++ tests/benchmarks/script/script.pro | 5 + tests/benchmarks/svg/qsvgrenderer/data/tiger.svg | 730 +++++++++ tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro | 9 + tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc | 6 + .../svg/qsvgrenderer/tst_qsvgrenderer.cpp | 103 ++ tests/benchmarks/svg/svg.pro | 3 + tests/tests.pro | 3 +- 421 files changed, 21488 insertions(+), 21421 deletions(-) delete mode 100644 tests/benchmarks/blendbench/blendbench.pro delete mode 100644 tests/benchmarks/blendbench/main.cpp delete mode 100644 tests/benchmarks/containers-associative/containers-associative.pro delete mode 100644 tests/benchmarks/containers-associative/main.cpp delete mode 100644 tests/benchmarks/containers-sequential/containers-sequential.pro delete mode 100644 tests/benchmarks/containers-sequential/main.cpp create mode 100644 tests/benchmarks/corelib/corelib.pro create mode 100644 tests/benchmarks/corelib/io/io.pro create mode 100644 tests/benchmarks/corelib/io/qdir/qdir.pro create mode 100644 tests/benchmarks/corelib/io/qdir/tst_qdir.cpp create mode 100644 tests/benchmarks/corelib/io/qdiriterator/main.cpp create mode 100755 tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro create mode 100644 tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp create mode 100644 tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h create mode 100644 tests/benchmarks/corelib/io/qfile/main.cpp create mode 100644 tests/benchmarks/corelib/io/qfile/qfile.pro create mode 100644 tests/benchmarks/corelib/io/qfileinfo/main.cpp create mode 100644 tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro create mode 100644 tests/benchmarks/corelib/io/qiodevice/main.cpp create mode 100755 tests/benchmarks/corelib/io/qiodevice/qiodevice.pro create mode 100644 tests/benchmarks/corelib/io/qtemporaryfile/main.cpp create mode 100644 tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro create mode 100644 tests/benchmarks/corelib/kernel/events/events.pro create mode 100644 tests/benchmarks/corelib/kernel/events/main.cpp create mode 100644 tests/benchmarks/corelib/kernel/kernel.pro create mode 100644 tests/benchmarks/corelib/kernel/qmetaobject/main.cpp create mode 100644 tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro create mode 100644 tests/benchmarks/corelib/kernel/qobject/main.cpp create mode 100644 tests/benchmarks/corelib/kernel/qobject/object.cpp create mode 100644 tests/benchmarks/corelib/kernel/qobject/object.h create mode 100644 tests/benchmarks/corelib/kernel/qobject/qobject.pro create mode 100644 tests/benchmarks/corelib/kernel/qvariant/qvariant.pro create mode 100644 tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp create mode 100644 tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro create mode 100644 tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp create mode 100644 tests/benchmarks/corelib/thread/thread.pro create mode 100644 tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro create mode 100644 tests/benchmarks/corelib/tools/containers-associative/main.cpp create mode 100644 tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro create mode 100644 tests/benchmarks/corelib/tools/containers-sequential/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qbytearray/main.cpp create mode 100755 tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro create mode 100644 tests/benchmarks/corelib/tools/qrect/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qrect/qrect.pro create mode 100644 tests/benchmarks/corelib/tools/qregexp/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qregexp/qregexp.pro create mode 100644 tests/benchmarks/corelib/tools/qstring/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qstring/qstring.pro create mode 100644 tests/benchmarks/corelib/tools/qstring/utf-8.txt create mode 100644 tests/benchmarks/corelib/tools/qstringbuilder/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro create mode 100644 tests/benchmarks/corelib/tools/qstringlist/.gitignore create mode 100644 tests/benchmarks/corelib/tools/qstringlist/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro create mode 100644 tests/benchmarks/corelib/tools/tools.pro delete mode 100644 tests/benchmarks/events/events.pro delete mode 100644 tests/benchmarks/events/main.cpp create mode 100644 tests/benchmarks/gui/animation/animation.pro create mode 100644 tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp create mode 100644 tests/benchmarks/gui/animation/qanimation/dummyanimation.h create mode 100644 tests/benchmarks/gui/animation/qanimation/dummyobject.cpp create mode 100644 tests/benchmarks/gui/animation/qanimation/dummyobject.h create mode 100644 tests/benchmarks/gui/animation/qanimation/main.cpp create mode 100644 tests/benchmarks/gui/animation/qanimation/qanimation.pro create mode 100644 tests/benchmarks/gui/animation/qanimation/rectanimation.cpp create mode 100644 tests/benchmarks/gui/animation/qanimation/rectanimation.h create mode 100644 tests/benchmarks/gui/graphicsview/graphicsview.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/random.data create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro create mode 100644 tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp create mode 100644 tests/benchmarks/gui/gui.pro create mode 100644 tests/benchmarks/gui/image/blendbench/blendbench.pro create mode 100644 tests/benchmarks/gui/image/blendbench/main.cpp create mode 100644 tests/benchmarks/gui/image/image.pro create mode 100644 tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg create mode 100644 tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg create mode 100644 tests/benchmarks/gui/image/qimagereader/images/away.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/ball.mng create mode 100644 tests/benchmarks/gui/image/qimagereader/images/bat1.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/bat2.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/beavis.jpg create mode 100644 tests/benchmarks/gui/image/qimagereader/images/black.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/black.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/colorful.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.mng create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/earth.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/fire.mng create mode 100644 tests/benchmarks/gui/image/qimagereader/images/font.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/gnus.xbm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/image.pbm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/image.pgm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/image.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/image.ppm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/kollada-noext create mode 100644 tests/benchmarks/gui/image/qimagereader/images/kollada.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/marble.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/runners.ppm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/task210380.jpg create mode 100644 tests/benchmarks/gui/image/qimagereader/images/teapot.ppm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/test.ppm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/test.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/transparent.xpm create mode 100644 tests/benchmarks/gui/image/qimagereader/images/trolltech.gif create mode 100644 tests/benchmarks/gui/image/qimagereader/images/tst7.bmp create mode 100644 tests/benchmarks/gui/image/qimagereader/images/tst7.png create mode 100644 tests/benchmarks/gui/image/qimagereader/qimagereader.pro create mode 100644 tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp create mode 100644 tests/benchmarks/gui/image/qpixmap/qpixmap.pro create mode 100644 tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp create mode 100644 tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro create mode 100644 tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp create mode 100644 tests/benchmarks/gui/itemviews/itemviews.pro create mode 100644 tests/benchmarks/gui/itemviews/qtableview/qtableview.pro create mode 100644 tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp create mode 100644 tests/benchmarks/gui/kernel/kernel.pro create mode 100644 tests/benchmarks/gui/kernel/qapplication/main.cpp create mode 100644 tests/benchmarks/gui/kernel/qapplication/qapplication.pro create mode 100644 tests/benchmarks/gui/kernel/qwidget/qwidget.pro create mode 100644 tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp create mode 100644 tests/benchmarks/gui/math3d/math3d.pro create mode 100644 tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro create mode 100644 tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp create mode 100644 tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro create mode 100644 tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp create mode 100644 tests/benchmarks/gui/painting/painting.pro create mode 100644 tests/benchmarks/gui/painting/qpainter/qpainter.pro create mode 100644 tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp create mode 100644 tests/benchmarks/gui/painting/qregion/main.cpp create mode 100644 tests/benchmarks/gui/painting/qregion/qregion.pro create mode 100644 tests/benchmarks/gui/painting/qtransform/qtransform.pro create mode 100644 tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp create mode 100644 tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp create mode 100644 tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro create mode 100644 tests/benchmarks/gui/styles/styles.pro create mode 100644 tests/benchmarks/gui/text/qfontmetrics/main.cpp create mode 100644 tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro create mode 100644 tests/benchmarks/gui/text/qtext/bidi.txt create mode 100644 tests/benchmarks/gui/text/qtext/main.cpp create mode 100644 tests/benchmarks/gui/text/qtext/qtext.pro create mode 100644 tests/benchmarks/gui/text/text.pro create mode 100644 tests/benchmarks/network/access/access.pro create mode 100644 tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp create mode 100644 tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro create mode 100644 tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro create mode 100644 tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp create mode 100644 tests/benchmarks/network/kernel/kernel.pro create mode 100644 tests/benchmarks/network/kernel/qhostinfo/main.cpp create mode 100755 tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro create mode 100644 tests/benchmarks/network/network.pro create mode 100644 tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro create mode 100644 tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp create mode 100644 tests/benchmarks/network/socket/socket.pro delete mode 100644 tests/benchmarks/qanimation/dummyanimation.cpp delete mode 100644 tests/benchmarks/qanimation/dummyanimation.h delete mode 100644 tests/benchmarks/qanimation/dummyobject.cpp delete mode 100644 tests/benchmarks/qanimation/dummyobject.h delete mode 100644 tests/benchmarks/qanimation/main.cpp delete mode 100644 tests/benchmarks/qanimation/qanimation.pro delete mode 100644 tests/benchmarks/qanimation/rectanimation.cpp delete mode 100644 tests/benchmarks/qanimation/rectanimation.h delete mode 100644 tests/benchmarks/qapplication/main.cpp delete mode 100644 tests/benchmarks/qapplication/qapplication.pro delete mode 100644 tests/benchmarks/qbytearray/main.cpp delete mode 100755 tests/benchmarks/qbytearray/qbytearray.pro delete mode 100644 tests/benchmarks/qdir/qdir.pro delete mode 100644 tests/benchmarks/qdir/tst_qdir.cpp delete mode 100644 tests/benchmarks/qdiriterator/main.cpp delete mode 100755 tests/benchmarks/qdiriterator/qdiriterator.pro delete mode 100644 tests/benchmarks/qdiriterator/qfilesystemiterator.cpp delete mode 100644 tests/benchmarks/qdiriterator/qfilesystemiterator.h delete mode 100644 tests/benchmarks/qfile/main.cpp delete mode 100644 tests/benchmarks/qfile/qfile.pro delete mode 100644 tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp delete mode 100644 tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro delete mode 100644 tests/benchmarks/qfileinfo/main.cpp delete mode 100644 tests/benchmarks/qfileinfo/qfileinfo.pro delete mode 100644 tests/benchmarks/qfontmetrics/main.cpp delete mode 100644 tests/benchmarks/qfontmetrics/qfontmetrics.pro delete mode 100644 tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro delete mode 100644 tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp delete mode 100644 tests/benchmarks/qgraphicsitem/qgraphicsitem.pro delete mode 100644 tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp delete mode 100644 tests/benchmarks/qgraphicsscene/qgraphicsscene.pro delete mode 100644 tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp delete mode 100644 tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/chip.cpp delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/chip.h delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/chiptester.h delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/chiptester.pri delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/images.qrc delete mode 100644 tests/benchmarks/qgraphicsview/chiptester/qt4logo.png delete mode 100644 tests/benchmarks/qgraphicsview/images/designer.png delete mode 100644 tests/benchmarks/qgraphicsview/images/wine-big.jpeg delete mode 100644 tests/benchmarks/qgraphicsview/images/wine.jpeg delete mode 100644 tests/benchmarks/qgraphicsview/qgraphicsview.pro delete mode 100644 tests/benchmarks/qgraphicsview/qgraphicsview.qrc delete mode 100644 tests/benchmarks/qgraphicsview/random.data delete mode 100644 tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp delete mode 100644 tests/benchmarks/qgraphicswidget/qgraphicswidget.pro delete mode 100644 tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp delete mode 100644 tests/benchmarks/qhostinfo/main.cpp delete mode 100755 tests/benchmarks/qhostinfo/qhostinfo.pro delete mode 100644 tests/benchmarks/qimagereader/images/16bpp.bmp delete mode 100644 tests/benchmarks/qimagereader/images/4bpp-rle.bmp delete mode 100644 tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg delete mode 100644 tests/benchmarks/qimagereader/images/YCbCr_cmyk.png delete mode 100644 tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg delete mode 100644 tests/benchmarks/qimagereader/images/away.png delete mode 100644 tests/benchmarks/qimagereader/images/ball.mng delete mode 100644 tests/benchmarks/qimagereader/images/bat1.gif delete mode 100644 tests/benchmarks/qimagereader/images/bat2.gif delete mode 100644 tests/benchmarks/qimagereader/images/beavis.jpg delete mode 100644 tests/benchmarks/qimagereader/images/black.png delete mode 100644 tests/benchmarks/qimagereader/images/black.xpm delete mode 100644 tests/benchmarks/qimagereader/images/colorful.bmp delete mode 100644 tests/benchmarks/qimagereader/images/corrupt-colors.xpm delete mode 100644 tests/benchmarks/qimagereader/images/corrupt-data.tif delete mode 100644 tests/benchmarks/qimagereader/images/corrupt-pixels.xpm delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.bmp delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.gif delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.jpg delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.mng delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.png delete mode 100644 tests/benchmarks/qimagereader/images/corrupt.xbm delete mode 100644 tests/benchmarks/qimagereader/images/crash-signed-char.bmp delete mode 100644 tests/benchmarks/qimagereader/images/earth.gif delete mode 100644 tests/benchmarks/qimagereader/images/fire.mng delete mode 100644 tests/benchmarks/qimagereader/images/font.bmp delete mode 100644 tests/benchmarks/qimagereader/images/gnus.xbm delete mode 100644 tests/benchmarks/qimagereader/images/image.pbm delete mode 100644 tests/benchmarks/qimagereader/images/image.pgm delete mode 100644 tests/benchmarks/qimagereader/images/image.png delete mode 100644 tests/benchmarks/qimagereader/images/image.ppm delete mode 100644 tests/benchmarks/qimagereader/images/kollada-noext delete mode 100644 tests/benchmarks/qimagereader/images/kollada.png delete mode 100644 tests/benchmarks/qimagereader/images/marble.xpm delete mode 100644 tests/benchmarks/qimagereader/images/namedcolors.xpm delete mode 100644 tests/benchmarks/qimagereader/images/negativeheight.bmp delete mode 100644 tests/benchmarks/qimagereader/images/noclearcode.bmp delete mode 100644 tests/benchmarks/qimagereader/images/noclearcode.gif delete mode 100644 tests/benchmarks/qimagereader/images/nontransparent.xpm delete mode 100644 tests/benchmarks/qimagereader/images/pngwithcompressedtext.png delete mode 100644 tests/benchmarks/qimagereader/images/pngwithtext.png delete mode 100644 tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif delete mode 100644 tests/benchmarks/qimagereader/images/runners.ppm delete mode 100644 tests/benchmarks/qimagereader/images/task210380.jpg delete mode 100644 tests/benchmarks/qimagereader/images/teapot.ppm delete mode 100644 tests/benchmarks/qimagereader/images/test.ppm delete mode 100644 tests/benchmarks/qimagereader/images/test.xpm delete mode 100644 tests/benchmarks/qimagereader/images/transparent.xpm delete mode 100644 tests/benchmarks/qimagereader/images/trolltech.gif delete mode 100644 tests/benchmarks/qimagereader/images/tst7.bmp delete mode 100644 tests/benchmarks/qimagereader/images/tst7.png delete mode 100644 tests/benchmarks/qimagereader/qimagereader.pro delete mode 100644 tests/benchmarks/qimagereader/tst_qimagereader.cpp delete mode 100644 tests/benchmarks/qiodevice/main.cpp delete mode 100755 tests/benchmarks/qiodevice/qiodevice.pro delete mode 100644 tests/benchmarks/qmatrix4x4/qmatrix4x4.pro delete mode 100644 tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp delete mode 100644 tests/benchmarks/qmetaobject/main.cpp delete mode 100644 tests/benchmarks/qmetaobject/qmetaobject.pro delete mode 100644 tests/benchmarks/qnetworkreply/qnetworkreply.pro delete mode 100644 tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp delete mode 100644 tests/benchmarks/qobject/main.cpp delete mode 100644 tests/benchmarks/qobject/object.cpp delete mode 100644 tests/benchmarks/qobject/object.h delete mode 100644 tests/benchmarks/qobject/qobject.pro delete mode 100644 tests/benchmarks/qpainter/qpainter.pro delete mode 100644 tests/benchmarks/qpainter/tst_qpainter.cpp delete mode 100644 tests/benchmarks/qpixmap/qpixmap.pro delete mode 100644 tests/benchmarks/qpixmap/tst_qpixmap.cpp delete mode 100644 tests/benchmarks/qpixmapcache/qpixmapcache.pro delete mode 100644 tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp delete mode 100644 tests/benchmarks/qquaternion/qquaternion.pro delete mode 100644 tests/benchmarks/qquaternion/tst_qquaternion.cpp delete mode 100644 tests/benchmarks/qrect/main.cpp delete mode 100644 tests/benchmarks/qrect/qrect.pro delete mode 100644 tests/benchmarks/qregexp/main.cpp delete mode 100644 tests/benchmarks/qregexp/qregexp.pro delete mode 100644 tests/benchmarks/qregion/main.cpp delete mode 100644 tests/benchmarks/qregion/qregion.pro delete mode 100644 tests/benchmarks/qscriptclass/qscriptclass.pro delete mode 100644 tests/benchmarks/qscriptclass/tst_qscriptclass.cpp delete mode 100644 tests/benchmarks/qscriptengine/qscriptengine.pro delete mode 100644 tests/benchmarks/qscriptengine/tst_qscriptengine.cpp delete mode 100644 tests/benchmarks/qscriptvalue/qscriptvalue.pro delete mode 100644 tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp delete mode 100644 tests/benchmarks/qstring/main.cpp delete mode 100644 tests/benchmarks/qstring/qstring.pro delete mode 100644 tests/benchmarks/qstring/utf-8.txt delete mode 100644 tests/benchmarks/qstringbuilder/main.cpp delete mode 100644 tests/benchmarks/qstringbuilder/qstringbuilder.pro delete mode 100644 tests/benchmarks/qstringlist/.gitignore delete mode 100644 tests/benchmarks/qstringlist/main.cpp delete mode 100644 tests/benchmarks/qstringlist/qstringlist.pro delete mode 100644 tests/benchmarks/qstylesheetstyle/main.cpp delete mode 100644 tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro delete mode 100644 tests/benchmarks/qsvgrenderer/data/tiger.svg delete mode 100644 tests/benchmarks/qsvgrenderer/qsvgrenderer.pro delete mode 100644 tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc delete mode 100644 tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp delete mode 100644 tests/benchmarks/qtableview/qtableview.pro delete mode 100644 tests/benchmarks/qtableview/tst_qtableview.cpp delete mode 100644 tests/benchmarks/qtcpserver/qtcpserver.pro delete mode 100644 tests/benchmarks/qtcpserver/tst_qtcpserver.cpp delete mode 100644 tests/benchmarks/qtemporaryfile/main.cpp delete mode 100644 tests/benchmarks/qtemporaryfile/qtemporaryfile.pro delete mode 100644 tests/benchmarks/qtext/bidi.txt delete mode 100644 tests/benchmarks/qtext/main.cpp delete mode 100644 tests/benchmarks/qtext/qtext.pro delete mode 100644 tests/benchmarks/qthreadstorage/qthreadstorage.pro delete mode 100644 tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp delete mode 100644 tests/benchmarks/qtransform/qtransform.pro delete mode 100644 tests/benchmarks/qtransform/tst_qtransform.cpp delete mode 100644 tests/benchmarks/qvariant/qvariant.pro delete mode 100644 tests/benchmarks/qvariant/tst_qvariant.cpp delete mode 100644 tests/benchmarks/qwidget/qwidget.pro delete mode 100644 tests/benchmarks/qwidget/tst_qwidget.cpp create mode 100644 tests/benchmarks/script/qscriptclass/qscriptclass.pro create mode 100644 tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp create mode 100644 tests/benchmarks/script/qscriptengine/qscriptengine.pro create mode 100644 tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp create mode 100644 tests/benchmarks/script/qscriptvalue/qscriptvalue.pro create mode 100644 tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp create mode 100644 tests/benchmarks/script/script.pro create mode 100644 tests/benchmarks/svg/qsvgrenderer/data/tiger.svg create mode 100644 tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro create mode 100644 tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc create mode 100644 tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp create mode 100644 tests/benchmarks/svg/svg.pro diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index 7a27cc9..c406d54 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -1,48 +1,8 @@ TEMPLATE = subdirs -SUBDIRS = containers-associative \ - containers-sequential \ - qanimation \ - qbytearray \ - qfileinfo \ - qfile_vs_qnetworkaccessmanager \ - qfontmetrics \ - qhostinfo \ - qpainter \ - qtestlib-simple events \ - qtext \ - qiodevice \ - qpixmap \ - blendbench \ - qstring \ - qstringlist \ - qmatrix4x4 \ - qnetworkreply \ - qobject \ - qrect \ - qregexp \ - qregion \ - qvariant \ - qwidget \ - qtwidgets \ - qapplication \ - qdir \ - qdiriterator \ - qgraphicsanchorlayout \ - qgraphicsitem \ - qgraphicswidget \ - qmetaobject \ - qpixmapcache \ - qquaternion \ - qscriptclass \ - qscriptengine \ - qscriptvalue \ - qstringbuilder \ - qstylesheetstyle \ - qsvgrenderer \ - qtcpserver \ - qtableview \ - qthreadstorage - - - +SUBDIRS = \ + corelib \ + gui \ + network \ + script \ + svg contains(QT_CONFIG, opengl): SUBDIRS += opengl diff --git a/tests/benchmarks/blendbench/blendbench.pro b/tests/benchmarks/blendbench/blendbench.pro deleted file mode 100644 index a3228c5..0000000 --- a/tests/benchmarks/blendbench/blendbench.pro +++ /dev/null @@ -1,8 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_blendbench -DEPENDPATH += . -INCLUDEPATH += . - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/blendbench/main.cpp b/tests/benchmarks/blendbench/main.cpp deleted file mode 100644 index 92d1633..0000000 --- a/tests/benchmarks/blendbench/main.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include - -#include - -void paint(QPaintDevice *device) -{ - QPainter p(device); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(0, 0, device->width(), device->height(), Qt::transparent); - - QLinearGradient g(QPoint(0, 0), QPoint(1, 1)); -// g.setCoordinateMode(QGradient::ObjectBoundingMode); - g.setColorAt(0, Qt::magenta); - g.setColorAt(0, Qt::white); - -// p.setOpacity(0.8); - p.setPen(Qt::NoPen); - p.setBrush(g); - p.setRenderHint(QPainter::Antialiasing); - p.setOpacity(0.9); - p.drawEllipse(0, 0, device->width(), device->height()); -} - -QLatin1String compositionModes[] = { - QLatin1String("SourceOver"), - QLatin1String("DestinationOver"), - QLatin1String("Clear"), - QLatin1String("Source"), - QLatin1String("Destination"), - QLatin1String("SourceIn"), - QLatin1String("DestinationIn"), - QLatin1String("SourceOut"), - QLatin1String("DestinationOut"), - QLatin1String("SourceAtop"), - QLatin1String("DestinationAtop"), - QLatin1String("Xor"), - - //svg 1.2 blend modes - QLatin1String("Plus"), - QLatin1String("Multiply"), - QLatin1String("Screen"), - QLatin1String("Overlay"), - QLatin1String("Darken"), - QLatin1String("Lighten"), - QLatin1String("ColorDodge"), - QLatin1String("ColorBurn"), - QLatin1String("HardLight"), - QLatin1String("SoftLight"), - QLatin1String("Difference"), - QLatin1String("Exclusion") -}; - -enum BrushType { ImageBrush, SolidBrush }; -QLatin1String brushTypes[] = { - QLatin1String("ImageBrush"), - QLatin1String("SolidBrush"), -}; - -class BlendBench : public QObject -{ - Q_OBJECT -private slots: - void blendBench_data(); - void blendBench(); -}; - -void BlendBench::blendBench_data() -{ - int first = 0; - int limit = 12; - if (qApp->arguments().contains("--extended")) { - first = 12; - limit = 24; - } - - QTest::addColumn("brushType"); - QTest::addColumn("compositionMode"); - - for (int brush = ImageBrush; brush <= SolidBrush; ++brush) - for (int mode = first; mode < limit; ++mode) - QTest::newRow(QString("brush=%1; mode=%2") - .arg(brushTypes[brush]).arg(compositionModes[mode]).toAscii().data()) - << brush << mode; -} - -void BlendBench::blendBench() -{ - QFETCH(int, brushType); - QFETCH(int, compositionMode); - - QImage img(512, 512, QImage::Format_ARGB32_Premultiplied); - QImage src(512, 512, QImage::Format_ARGB32_Premultiplied); - paint(&src); - QPainter p(&img); - p.setPen(Qt::NoPen); - - p.setCompositionMode(QPainter::CompositionMode(compositionMode)); - if (brushType == ImageBrush) { - p.setBrush(QBrush(src)); - } else if (brushType == SolidBrush) { - p.setBrush(QColor(127, 127, 127, 127)); - } - - QBENCHMARK { - p.drawRect(0, 0, 512, 512); - } -} - -QTEST_MAIN(BlendBench) - -#include "main.moc" diff --git a/tests/benchmarks/containers-associative/containers-associative.pro b/tests/benchmarks/containers-associative/containers-associative.pro deleted file mode 100644 index c6f3fa6..0000000 --- a/tests/benchmarks/containers-associative/containers-associative.pro +++ /dev/null @@ -1,8 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_containers-associative -DEPENDPATH += . -INCLUDEPATH += . - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/containers-associative/main.cpp b/tests/benchmarks/containers-associative/main.cpp deleted file mode 100644 index 4c6dae4..0000000 --- a/tests/benchmarks/containers-associative/main.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include - -#include - -class tst_associative_containers : public QObject -{ - Q_OBJECT -private slots: - void insert_data(); - void insert(); - void lookup_data(); - void lookup(); -}; - -template -void testInsert(int size) -{ - T container; - - QBENCHMARK { - for (int i = 0; i < size; ++i) - container.insert(i, i); - } -} - -void tst_associative_containers::insert_data() -{ - QTest::addColumn("useHash"); - QTest::addColumn("size"); - - for (int size = 10; size < 20000; size += 100) { - - const QByteArray sizeString = QByteArray::number(size); - - QTest::newRow(("hash--" + sizeString).constData()) << true << size; - QTest::newRow(("map--" + sizeString).constData()) << false << size; - } -} - -void tst_associative_containers::insert() -{ - QFETCH(bool, useHash); - QFETCH(int, size); - - QHash testHash; - QMap testMap; - - if (useHash) { - testInsert >(size); - } else { - testInsert >(size); - } -} - -void tst_associative_containers::lookup_data() -{ -// setReportType(LineChartReport); -// setChartTitle("Time to call value(), with an increasing number of items in the container"); - - QTest::addColumn("useHash"); - QTest::addColumn("size"); - - for (int size = 10; size < 20000; size += 100) { - - const QByteArray sizeString = QByteArray::number(size); - - QTest::newRow(("hash--" + sizeString).constData()) << true << size; - QTest::newRow(("map--" + sizeString).constData()) << false << size; - } -} - -template -void testLookup(int size) -{ - T container; - - for (int i = 0; i < size; ++i) - container.insert(i, i); - - int val; - - QBENCHMARK { - for (int i = 0; i < size; ++i) - val = container.value(i); - - } -} - -void tst_associative_containers::lookup() -{ - QFETCH(bool, useHash); - QFETCH(int, size); - - if (useHash) { - testLookup >(size); - } else { - testLookup >(size); - } -} - -QTEST_MAIN(tst_associative_containers) -#include "main.moc" diff --git a/tests/benchmarks/containers-sequential/containers-sequential.pro b/tests/benchmarks/containers-sequential/containers-sequential.pro deleted file mode 100644 index bf6db44..0000000 --- a/tests/benchmarks/containers-sequential/containers-sequential.pro +++ /dev/null @@ -1,8 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_containers-sequential -DEPENDPATH += . -INCLUDEPATH += . - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/containers-sequential/main.cpp b/tests/benchmarks/containers-sequential/main.cpp deleted file mode 100644 index a6e405c..0000000 --- a/tests/benchmarks/containers-sequential/main.cpp +++ /dev/null @@ -1,265 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -// This file contains benchmarks for comparing QVector against std::vector - -#include -#include -#include - -#include - -template // T is the item type -class UseCases { -public: - virtual ~UseCases() {} - - // Use case: Insert \a size items into the vector. - virtual void insert(int size) = 0; - - // Use case: Lookup \a size items from the vector. - virtual void lookup(int size) = 0; -}; - -template -T * f(T *ts) // dummy function to prevent code from being optimized away by the compiler -{ - return ts; -} - -// This subclass implements the use cases using QVector as efficiently as possible. -template -class UseCases_QVector : public UseCases -{ - void insert(int size) - { - QVector v; - T t; - QBENCHMARK { - for (int i = 0; i < size; ++i) - v.append(t); - } - } - - void lookup(int size) - { - QVector v; - - T t; - for (int i = 0; i < size; ++i) - v.append(t); - - T *ts = new T[size]; - QBENCHMARK { - for (int i = 0; i < size; ++i) - ts[i] = v.value(i); - } - f(ts); - delete[] ts; - } -}; - -// This subclass implements the use cases using std::vector as efficiently as possible. -template -class UseCases_stdvector : public UseCases -{ - void insert(int size) - { - std::vector v; - T t; - QBENCHMARK { - for (int i = 0; i < size; ++i) - v.push_back(t); - } - } - - void lookup(int size) - { - std::vector v; - - T t; - for (int i = 0; i < size; ++i) - v.push_back(t); - - T *ts = new T[size]; - QBENCHMARK { - for (int i = 0; i < size; ++i) - ts[i] = v[i]; - } - f(ts); - delete[] ts; - } -}; - -struct Large { // A "large" item type - int x[1000]; -}; - -// Symbian devices typically have limited memory -#ifdef Q_OS_SYMBIAN -# define LARGE_MAX_SIZE 2000 -#else -# define LARGE_MAX_SIZE 20000 -#endif - -class tst_vector_vs_std : public QObject -{ - Q_OBJECT -public: - tst_vector_vs_std() - { - useCases_QVector_int = new UseCases_QVector; - useCases_stdvector_int = new UseCases_stdvector; - - useCases_QVector_Large = new UseCases_QVector; - useCases_stdvector_Large = new UseCases_stdvector; - } - -private: - UseCases *useCases_QVector_int; - UseCases *useCases_stdvector_int; - UseCases *useCases_QVector_Large; - UseCases *useCases_stdvector_Large; - -private slots: - void insert_int_data(); - void insert_int(); - void insert_Large_data(); - void insert_Large(); - void lookup_int_data(); - void lookup_int(); - void lookup_Large_data(); - void lookup_Large(); -}; - -void tst_vector_vs_std::insert_int_data() -{ - QTest::addColumn("useStd"); - QTest::addColumn("size"); - - for (int size = 10; size < 20000; size += 100) { - const QByteArray sizeString = QByteArray::number(size); - QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size; - QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size; - } -} - -void tst_vector_vs_std::insert_int() -{ - QFETCH(bool, useStd); - QFETCH(int, size); - - if (useStd) - useCases_stdvector_int->insert(size); - else - useCases_QVector_int->insert(size); -} - -void tst_vector_vs_std::insert_Large_data() -{ - QTest::addColumn("useStd"); - QTest::addColumn("size"); - - for (int size = 10; size < LARGE_MAX_SIZE; size += 100) { - const QByteArray sizeString = QByteArray::number(size); - QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size; - QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size; - } -} - -void tst_vector_vs_std::insert_Large() -{ - QFETCH(bool, useStd); - QFETCH(int, size); - - if (useStd) - useCases_stdvector_Large->insert(size); - else - useCases_QVector_Large->insert(size); -} - -void tst_vector_vs_std::lookup_int_data() -{ - QTest::addColumn("useStd"); - QTest::addColumn("size"); - - for (int size = 10; size < 20000; size += 100) { - const QByteArray sizeString = QByteArray::number(size); - QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size; - QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size; - } -} - -void tst_vector_vs_std::lookup_int() -{ - QFETCH(bool, useStd); - QFETCH(int, size); - - if (useStd) - useCases_stdvector_int->lookup(size); - else - useCases_QVector_int->lookup(size); -} - -void tst_vector_vs_std::lookup_Large_data() -{ - QTest::addColumn("useStd"); - QTest::addColumn("size"); - - for (int size = 10; size < LARGE_MAX_SIZE; size += 100) { - const QByteArray sizeString = QByteArray::number(size); - QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size; - QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size; - } -} - -void tst_vector_vs_std::lookup_Large() -{ - QFETCH(bool, useStd); - QFETCH(int, size); - - if (useStd) - useCases_stdvector_Large->lookup(size); - else - useCases_QVector_Large->lookup(size); -} - -QTEST_MAIN(tst_vector_vs_std) -#include "main.moc" diff --git a/tests/benchmarks/corelib/corelib.pro b/tests/benchmarks/corelib/corelib.pro new file mode 100644 index 0000000..72fca33 --- /dev/null +++ b/tests/benchmarks/corelib/corelib.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +SUBDIRS = \ + io \ + kernel \ + thread \ + tools diff --git a/tests/benchmarks/corelib/io/io.pro b/tests/benchmarks/corelib/io/io.pro new file mode 100644 index 0000000..97445d7 --- /dev/null +++ b/tests/benchmarks/corelib/io/io.pro @@ -0,0 +1,9 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qdir \ + qdiriterator \ + qfile \ + qfileinfo \ + qiodevice \ + qtemporaryfile + diff --git a/tests/benchmarks/corelib/io/qdir/qdir.pro b/tests/benchmarks/corelib/io/qdir/qdir.pro new file mode 100644 index 0000000..2cdebfd --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/qdir.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qdir +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += tst_qdir.cpp diff --git a/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp new file mode 100644 index 0000000..aea9fd0 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp @@ -0,0 +1,198 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifdef Q_OS_WIN +# include +#else +# include +# include +# include +# include +#endif + +class Test : public QObject{ + Q_OBJECT +public slots: + void initTestCase() { + QDir testdir = QDir::tempPath(); + + const QString subfolder_name = QLatin1String("test_speed"); + QVERIFY(testdir.mkdir(subfolder_name)); + QVERIFY(testdir.cd(subfolder_name)); + + for (uint i=0; i<10000; ++i) { + QFile file(testdir.absolutePath() + "/testfile_" + QString::number(i)); + file.open(QIODevice::WriteOnly); + } + } + void cleanupTestCase() { + { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + testdir.setSorting(QDir::Unsorted); + testdir.setFilter(QDir::AllEntries | QDir::System | QDir::Hidden); + foreach (const QString &filename, testdir.entryList()) { + testdir.remove(filename); + } + } + const QDir temp = QDir(QDir::tempPath()); + temp.rmdir(QLatin1String("test_speed")); + } +private slots: + void baseline() {} + + void sizeSpeed() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QFileInfoList fileInfoList = testdir.entryInfoList(QDir::Files, QDir::Unsorted); + foreach (const QFileInfo &fileInfo, fileInfoList) { + fileInfo.isDir(); + fileInfo.size(); + } + } + } + void sizeSpeedIterator() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QDirIterator dit(testdir.path(), QDir::Files); + while (dit.hasNext()) { + dit.fileInfo().isDir(); + dit.fileInfo().size(); + dit.next(); + } + } + } + + void sizeSpeedWithoutFilter() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QFileInfoList fileInfoList = testdir.entryInfoList(QDir::NoFilter, QDir::Unsorted); + foreach (const QFileInfo &fileInfo, fileInfoList) { + fileInfo.size(); + } + } + } + void sizeSpeedWithoutFilterIterator() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QDirIterator dit(testdir.path()); + while (dit.hasNext()) { + dit.fileInfo().isDir(); + dit.fileInfo().size(); + dit.next(); + } + } + } + + void sizeSpeedWithoutFileInfoList() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + testdir.setSorting(QDir::Unsorted); + QBENCHMARK { + QStringList fileList = testdir.entryList(QDir::NoFilter, QDir::Unsorted); + foreach (const QString &filename, fileList) { + QFileInfo fileInfo(filename); + fileInfo.size(); + } + } + } + + void iDontWantAnyStat() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + testdir.setSorting(QDir::Unsorted); + testdir.setFilter(QDir::AllEntries | QDir::System | QDir::Hidden); + QBENCHMARK { + QStringList fileList = testdir.entryList(QDir::NoFilter, QDir::Unsorted); + foreach (const QString &filename, fileList) { + + } + } + } + void iDontWantAnyStatIterator() { + QBENCHMARK { + QDirIterator dit(QDir::tempPath() + QLatin1String("/test_speed")); + while (dit.hasNext()) { + dit.next(); + } + } + } + + void sizeSpeedWithoutFilterLowLevel() { +#ifdef Q_OS_WIN + const wchar_t *dirpath = (wchar_t*)testdir.absolutePath().utf16(); + wchar_t appendedPath[MAX_PATH]; + wcscpy(appendedPath, dirpath); + wcscat(appendedPath, L"\\*"); + + WIN32_FIND_DATA fd; + HANDLE hSearch = FindFirstFileW(appendedPath, &fd); + QVERIFY(hSearch == INVALID_HANDLE_VALUE); + + QBENCHMARK { + do { + + } while (FindNextFile(hSearch, &fd)); + } + FindClose(hSearch); +#else + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + DIR *dir = opendir(qPrintable(testdir.absolutePath())); + QVERIFY(dir); + + QVERIFY(!chdir(qPrintable(testdir.absolutePath()))); + QBENCHMARK { + struct dirent *item = readdir(dir); + while (item) { + char *fileName = item->d_name; + + struct stat fileStat; + QVERIFY(!stat(fileName, &fileStat)); + + item = readdir(dir); + } + } + closedir(dir); +#endif + } +}; + +QTEST_MAIN(Test) +#include "tst_qdir.moc" diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp new file mode 100644 index 0000000..afa6b7b --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -0,0 +1,251 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +#ifdef Q_OS_WIN +# include +# include +#else +# include +# include +# include +# include +# include +#endif + +#include + +#include "qfilesystemiterator.h" + +class tst_qdiriterator : public QObject +{ + Q_OBJECT +private slots: + void posix(); + void posix_data() { data(); } + void diriterator(); + void diriterator_data() { data(); } + void fsiterator(); + void fsiterator_data() { data(); } + void data(); +}; + + +void tst_qdiriterator::data() +{ +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + QByteArray qtdir = qPrintable(QCoreApplication::applicationDirPath()); + qtdir += "/depot"; +#else +#if defined(Q_OS_WIN) + const char *qtdir = "C:\\depot\\qt\\main"; +#else + const char *qtdir = ::getenv("QTDIR"); +#endif + if (!qtdir) { + fprintf(stderr, "QTDIR not set\n"); + exit(1); + } +#endif + + QTest::addColumn("dirpath"); + QByteArray ba = QByteArray(qtdir) + "/src/corelib"; + QByteArray ba1 = ba + "/io"; + QTest::newRow(ba) << ba; + //QTest::newRow(ba1) << ba1; +} + +#ifdef Q_OS_WIN +static int posix_helper(const wchar_t *dirpath) +{ + int count = 0; + HANDLE hSearch; + WIN32_FIND_DATA fd; + + const size_t origDirPathLength = wcslen(dirpath); + + wchar_t appendedPath[MAX_PATH]; + wcscpy(appendedPath, dirpath); + wcscat(appendedPath, L"\\*"); + hSearch = FindFirstFile(appendedPath, &fd); + appendedPath[origDirPathLength] = 0; + + if (hSearch == INVALID_HANDLE_VALUE) { + qWarning("FindFirstFile failed"); + return count; + } + + do { + if (!(fd.cFileName[0] == L'.' && fd.cFileName[1] == 0) && + !(fd.cFileName[0] == L'.' && fd.cFileName[1] == L'.' && fd.cFileName[2] == 0)) + { + if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + wcscat(appendedPath, L"\\"); + wcscat(appendedPath, fd.cFileName); + count += posix_helper(appendedPath); + appendedPath[origDirPathLength] = 0; + } + else { + ++count; + } + } + } while (FindNextFile(hSearch, &fd)); + FindClose(hSearch); + + return count; +} + +#else + +static int posix_helper(const char *dirpath) +{ + //qDebug() << "DIR" << dirpath; + DIR *dir = ::opendir(dirpath); + if (!dir) + return 0; + + dirent *entry = 0; + + int count = 0; + while ((entry = ::readdir(dir))) { + if (qstrcmp(entry->d_name, ".") == 0) + continue; + if (qstrcmp(entry->d_name, "..") == 0) + continue; + ++count; + QByteArray ba = dirpath; + ba += '/'; + ba += entry->d_name; + struct stat st; + lstat(ba.constData(), &st); + if (S_ISDIR(st.st_mode)) + count += posix_helper(ba.constData()); + } + + ::closedir(dir); + return count; +} +#endif + + +void tst_qdiriterator::posix() +{ + QFETCH(QByteArray, dirpath); + + int count = 0; + QString path(dirpath); + QBENCHMARK { +#ifdef Q_OS_WIN + count = posix_helper(path.utf16()); +#else + count = posix_helper(dirpath.constData()); +#endif + } + qDebug() << count; +} + +void tst_qdiriterator::diriterator() +{ + QFETCH(QByteArray, dirpath); + + int count = 0; + + QBENCHMARK { + int c = 0; + + QDirIterator dir(dirpath, + //QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot, + //QDir::AllEntries | QDir::Hidden, + QDir::Files, + QDirIterator::Subdirectories); + + while (dir.hasNext()) { + dir.next(); + //printf("%s\n", qPrintable(dir.fileName())); + 0 && printf("%d %s\n", + dir.fileInfo().isDir(), + //qPrintable(dir.fileInfo().absoluteFilePath()), + //qPrintable(dir.path()), + qPrintable(dir.filePath())); + ++c; + } + count = c; + } + qDebug() << count; +} + +void tst_qdiriterator::fsiterator() +{ + QFETCH(QByteArray, dirpath); + + int count = 0; + int dump = 0; + + QBENCHMARK { + int c = 0; + + dump && printf("\n\n\n\n"); + QFileSystemIterator dir(dirpath, + //QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot, + //QDir::AllEntries | QDir::Hidden, + //QDir::Files | QDir::NoDotAndDotDot, + QDir::Files, + QFileSystemIterator::Subdirectories); + + for (; !dir.atEnd(); dir.next()) { + dump && printf("%d %s\n", + dir.fileInfo().isDir(), + //qPrintable(dir.fileInfo().absoluteFilePath()), + //qPrintable(dir.path()), + qPrintable(dir.filePath()) + ); + ++c; + } + count = c; + } + qDebug() << count; +} + +QTEST_MAIN(tst_qdiriterator) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro new file mode 100755 index 0000000..e06d746 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -0,0 +1,23 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qdiriterator +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release +CONFIG += debug + + +SOURCES += main.cpp + +SOURCES += qfilesystemiterator.cpp +HEADERS += qfilesystemiterator.h + +wince*|symbian: { + corelibdir.sources = $$QT_SOURCE_TREE/src/corelib + corelibdir.path = ./depot/src + DEPLOYMENT += corelibdir +} + diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp new file mode 100644 index 0000000..267d53f --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp @@ -0,0 +1,678 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \since 4.5 + \class QFileSystemIterator + \brief The QFileSystemIterator class provides an iterator for directory entrylists. + + You can use QFileSystemIterator to navigate entries of a directory one at a time. + It is similar to QDir::entryList() and QDir::entryInfoList(), but because + it lists entries one at a time instead of all at once, it scales better + and is more suitable for large directories. It also supports listing + directory contents recursively, and following symbolic links. Unlike + QDir::entryList(), QFileSystemIterator does not support sorting. + + The QFileSystemIterator constructor takes a QDir or a directory as + argument. After construction, the iterator is located before the first + directory entry. Here's how to iterate over all the entries sequentially: + + \snippet doc/src/snippets/code/src.corelib.io.qdiriterator.cpp 0 + + The next() function returns the path to the next directory entry and + advances the iterator. You can also call filePath() to get the current + file path without advancing the iterator. The fileName() function returns + only the name of the file, similar to how QDir::entryList() works. You can + also call fileInfo() to get a QFileInfo for the current entry. + + Unlike Qt's container iterators, QFileSystemIterator is uni-directional (i.e., + you cannot iterate directories in reverse order) and does not allow random + access. + + QFileSystemIterator works with all supported file engines, and is implemented + using QAbstractFileEngineIterator. + + \sa QDir, QDir::entryList(), QAbstractFileEngineIterator +*/ + +/*! \enum QFileSystemIterator::IteratorFlag + + This enum describes flags that you can combine to configure the behavior + of QFileSystemIterator. + + \value NoIteratorFlags The default value, representing no flags. The + iterator will return entries for the assigned path. + + \value Subdirectories List entries inside all subdirectories as well. + + \value FollowSymlinks When combined with Subdirectories, this flag + enables iterating through all subdirectories of the assigned path, + following all symbolic links. Symbolic link loops (e.g., "link" => "." or + "link" => "..") are automatically detected and ignored. +*/ + +#include "qfilesystemiterator.h" + +#include +#include +#include +#include + +#ifdef Q_OS_WIN +# include +# include +#else +# include +# include +# include +# include +#endif + +QT_BEGIN_NAMESPACE + +class QFileSystemIteratorPrivate +{ +public: + QFileSystemIteratorPrivate(const QString &path, const QStringList &nameFilters, + QDir::Filters filters, QFileSystemIterator::IteratorFlags flags); + ~QFileSystemIteratorPrivate(); + + void pushSubDirectory(const QByteArray &path); + void advance(); + bool isAcceptable() const; + bool shouldFollowDirectory(const QFileInfo &); + //bool matchesFilters(const QAbstractFileEngineIterator *it) const; + inline bool atEnd() const { return m_dirPaths.isEmpty(); } + +#ifdef Q_OS_WIN + QStack m_dirStructs; + WIN32_FIND_DATA* m_entry; + WIN32_FIND_DATA m_fileSearchResult; + bool m_bFirstSearchResult; +#else + QStack m_dirStructs; + dirent *m_entry; +#endif + + QSet visitedLinks; + QStack m_dirPaths; + QFileInfo fileInfo; + QString currentFilePath; + QFileSystemIterator::IteratorFlags iteratorFlags; + QDir::Filters filters; + QStringList nameFilters; + + enum { DontShowDir, ShowDotDotDir, ShowDotDir, ShowDir } + m_currentDirShown, m_nextDirShown; + + QFileSystemIterator *q; + +private: + bool advanceHelper(); // returns true if we know we have something suitable +}; + +/*! + \internal +*/ +QFileSystemIteratorPrivate::QFileSystemIteratorPrivate(const QString &path, + const QStringList &nameFilters, QDir::Filters filters, + QFileSystemIterator::IteratorFlags flags) + : iteratorFlags(flags) +{ + if (filters == QDir::NoFilter) + filters = QDir::AllEntries; + this->filters = filters; + this->nameFilters = nameFilters; + + fileInfo.setFile(path); + QString dir = fileInfo.isSymLink() ? fileInfo.canonicalFilePath() : path; + pushSubDirectory(dir.toLocal8Bit()); + // skip to acceptable entry + while (true) { + if (atEnd()) + return; + if (isAcceptable()) + return; + if (advanceHelper()) + return; + } +} + +/*! + \internal +*/ +QFileSystemIteratorPrivate::~QFileSystemIteratorPrivate() +{ +#ifdef Q_OS_WIN + while (!m_dirStructs.isEmpty()) + ::FindClose(m_dirStructs.pop()); +#else + while (!m_dirStructs.isEmpty()) + ::closedir(m_dirStructs.pop()); +#endif +} + +#ifdef Q_OS_WIN +static bool isDotOrDotDot(const wchar_t* name) +{ + if (name[0] == L'.' && name[1] == 0) + return true; + if (name[0] == L'.' && name[1] == L'.' && name[2] == 0) + return true; + return false; +} +#else +static bool isDotOrDotDot(const char *name) +{ + if (name[0] == '.' && name[1] == 0) + return true; + if (name[0] == '.' && name[1] == '.' && name[2] == 0) + return true; + return false; +} +#endif + +/*! + \internal +*/ +void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path) +{ +/* + if (iteratorFlags & QFileSystemIterator::FollowSymlinks) { + if (fileInfo.filePath() != path) + fileInfo.setFile(path); + if (fileInfo.isSymLink()) { + visitedLinks << fileInfo.canonicalFilePath(); + } else { + visitedLinks << fileInfo.absoluteFilePath(); + } + } +*/ + +#ifdef Q_OS_WIN + wchar_t szSearchPath[MAX_PATH]; + wcscpy(szSearchPath, QString(path).utf16()); + wcscat(szSearchPath, L"\\*"); + HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult); + m_bFirstSearchResult = true; +#else + DIR *dir = ::opendir(path.constData()); + //m_entry = ::readdir(dir); + //while (m_entry && isDotOrDotDot(m_entry->d_name)) + // m_entry = ::readdir(m_dirStructs.top()); +#endif + m_dirStructs.append(dir); + m_dirPaths.append(path); + m_entry = 0; + if (filters & QDir::Dirs) + m_nextDirShown = ShowDir; + else + m_nextDirShown = DontShowDir; + m_currentDirShown = DontShowDir; +} + +/*! + \internal +*/ +bool QFileSystemIteratorPrivate::isAcceptable() const +{ + if (!m_entry) + return false; + return true; +} + +/*! + \internal +*/ + + +void QFileSystemIteratorPrivate::advance() +{ + while (true) { + if (advanceHelper()) + return; + if (atEnd()) + return; + if (isAcceptable()) + return; + } +} + +bool QFileSystemIteratorPrivate::advanceHelper() +{ + if (m_dirStructs.isEmpty()) + return true; + + //printf("ADV %d %d\n", int(m_currentDirShown), int(m_nextDirShown)); + + if ((filters & QDir::Dirs)) { + m_currentDirShown = m_nextDirShown; + if (m_nextDirShown == ShowDir) { + //printf("RESTING ON DIR %s %x\n", m_dirPaths.top().constData(), int(filters)); + m_nextDirShown = (filters & QDir::NoDotAndDotDot) ? DontShowDir : ShowDotDir; + // skip start directory itself + if (m_dirStructs.size() == 1 && m_currentDirShown == ShowDir) + return advanceHelper(); + return true; + } + if (m_nextDirShown == ShowDotDir) { + //printf("RESTING ON DOT %s %x\n", m_dirPaths.top().constData(), int(filters)); + m_nextDirShown = ShowDotDotDir; + return true; + } + if (m_nextDirShown == ShowDotDotDir) { + //printf("RESTING ON DOTDOT %s %x\n", m_dirPaths.top().constData(), int(filters)); + m_nextDirShown = DontShowDir; + return true; + } + m_currentDirShown = DontShowDir; + } + +#ifdef Q_OS_WIN + m_entry = &m_fileSearchResult; + if (m_bFirstSearchResult) { + m_bFirstSearchResult = false; + } else { + if (!FindNextFile(m_dirStructs.top(), m_entry)) + m_entry = 0; + } + + while (m_entry && isDotOrDotDot(m_entry->cFileName)) + if (!FindNextFile(m_dirStructs.top(), m_entry)) + m_entry = 0; + + if (!m_entry) { + m_dirPaths.pop(); + FindClose(m_dirStructs.pop()); + return false; + } + + if (m_entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + QByteArray ba = m_dirPaths.top(); + ba += '\\'; + ba += QString::fromWCharArray(m_entry->cFileName); + pushSubDirectory(ba); + } +#else + m_entry = ::readdir(m_dirStructs.top()); + while (m_entry && isDotOrDotDot(m_entry->d_name)) + m_entry = ::readdir(m_dirStructs.top()); + //return false; // further iteration possibly needed + //printf("READ %p %s\n", m_entry, m_entry ? m_entry->d_name : ""); + + if (!m_entry) { + m_dirPaths.pop(); + DIR *dir = m_dirStructs.pop(); + ::closedir(dir); + return false; // further iteration possibly needed + } + + const char *name = m_entry->d_name; + + QByteArray ba = m_dirPaths.top(); + ba += '/'; + ba += name; + struct stat st; + lstat(ba.constData(), &st); + + if (S_ISDIR(st.st_mode)) { + pushSubDirectory(ba); + return false; // further iteration possibly needed + } +#endif + return false; // further iteration possiblye needed +} + +/*! + \internal + */ +bool QFileSystemIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo) +{ + // If we're doing flat iteration, we're done. + if (!(iteratorFlags & QFileSystemIterator::Subdirectories)) + return false; + + // Never follow non-directory entries + if (!fileInfo.isDir()) + return false; + + + // Never follow . and .. + if (fileInfo.fileName() == QLatin1String(".") || fileInfo.fileName() == QLatin1String("..")) + return false; + + + // Check symlinks + if (fileInfo.isSymLink() && !(iteratorFlags & QFileSystemIterator::FollowSymlinks)) { + // Follow symlinks only if FollowSymlinks was passed + return false; + } + + // Stop link loops + if (visitedLinks.contains(fileInfo.canonicalFilePath())) + return false; + + return true; +} + + +/*! + \internal + + This convenience function implements the iterator's filtering logics and + applies then to the current directory entry. + + It returns true if the current entry matches the filters (i.e., the + current entry will be returned as part of the directory iteration); + otherwise, false is returned. +*/ +#if 0 +bool QFileSystemIteratorPrivate::matchesFilters(const QAbstractFileEngineIterator *it) const +{ + const bool filterPermissions = ((filters & QDir::PermissionMask) + && (filters & QDir::PermissionMask) != QDir::PermissionMask); + const bool skipDirs = !(filters & (QDir::Dirs | QDir::AllDirs)); + const bool skipFiles = !(filters & QDir::Files); + const bool skipSymlinks = (filters & QDir::NoSymLinks); + const bool doReadable = !filterPermissions || (filters & QDir::Readable); + const bool doWritable = !filterPermissions || (filters & QDir::Writable); + const bool doExecutable = !filterPermissions || (filters & QDir::Executable); + const bool includeHidden = (filters & QDir::Hidden); + const bool includeSystem = (filters & QDir::System); + +#ifndef QT_NO_REGEXP + // Prepare name filters + QList regexps; + bool hasNameFilters = !nameFilters.isEmpty() && !(nameFilters.contains(QLatin1String("*"))); + if (hasNameFilters) { + for (int i = 0; i < nameFilters.size(); ++i) { + regexps << QRegExp(nameFilters.at(i), + (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, + QRegExp::Wildcard); + } + } +#endif + + QString fileName = it->currentFileName(); + if (fileName.isEmpty()) { + // invalid entry + return false; + } + + QFileInfo fi = it->currentFileInfo(); + QString filePath = it->currentFilePath(); + +#ifndef QT_NO_REGEXP + // Pass all entries through name filters, except dirs if the AllDirs + // filter is passed. + if (hasNameFilters && !((filters & QDir::AllDirs) && fi.isDir())) { + bool matched = false; + for (int i = 0; i < regexps.size(); ++i) { + if (regexps.at(i).exactMatch(fileName)) { + matched = true; + break; + } + } + if (!matched) + return false; + } +#endif + + bool dotOrDotDot = (fileName == QLatin1String(".") || fileName == QLatin1String("..")); + if ((filters & QDir::NoDotAndDotDot) && dotOrDotDot) + return false; + + bool isHidden = !dotOrDotDot && fi.isHidden(); + if (!includeHidden && isHidden) + return false; + + bool isSystem = (!fi.isFile() && !fi.isDir() && !fi.isSymLink()) + || (!fi.exists() && fi.isSymLink()); + if (!includeSystem && isSystem) + return false; + + bool alwaysShow = (filters & QDir::TypeMask) == 0 + && ((isHidden && includeHidden) + || (includeSystem && isSystem)); + + // Skip files and directories + if ((filters & QDir::AllDirs) == 0 && skipDirs && fi.isDir()) { + if (!alwaysShow) + return false; + } + + if ((skipFiles && (fi.isFile() || !fi.exists())) + || (skipSymlinks && fi.isSymLink())) { + if (!alwaysShow) + return false; + } + + if (filterPermissions + && ((doReadable && !fi.isReadable()) + || (doWritable && !fi.isWritable()) + || (doExecutable && !fi.isExecutable()))) { + return false; + } + + if (!includeSystem && !dotOrDotDot && ((fi.exists() && !fi.isFile() && !fi.isDir() && !fi.isSymLink()) + || (!fi.exists() && fi.isSymLink()))) { + return false; + } + + return true; +} +#endif + +/*! + Constructs a QFileSystemIterator that can iterate over \a dir's entrylist, using + \a dir's name filters and regular filters. You can pass options via \a + flags to decide how the directory should be iterated. + + By default, \a flags is NoIteratorFlags, which provides the same behavior + as in QDir::entryList(). + + The sorting in \a dir is ignored. + + \sa atEnd(), next(), IteratorFlags +*/ +QFileSystemIterator::QFileSystemIterator(const QDir &dir, IteratorFlags flags) + : d(new QFileSystemIteratorPrivate(dir.path(), dir.nameFilters(), dir.filter(), flags)) +{ + d->q = this; +} + +/*! + Constructs a QFileSystemIterator that can iterate over \a path, with no name + filtering and \a filters for entry filtering. You can pass options via \a + flags to decide how the directory should be iterated. + + By default, \a filters is QDir::NoFilter, and \a flags is NoIteratorFlags, + which provides the same behavior as in QDir::entryList(). + + \sa atEnd(), next(), IteratorFlags +*/ +QFileSystemIterator::QFileSystemIterator(const QString &path, QDir::Filters filters, IteratorFlags flags) + : d(new QFileSystemIteratorPrivate(path, QStringList(QLatin1String("*")), filters, flags)) +{ + d->q = this; +} + +/*! + Constructs a QFileSystemIterator that can iterate over \a path. You can pass + options via \a flags to decide how the directory should be iterated. + + By default, \a flags is NoIteratorFlags, which provides the same behavior + as in QDir::entryList(). + + \sa atEnd(), next(), IteratorFlags +*/ +QFileSystemIterator::QFileSystemIterator(const QString &path, IteratorFlags flags) + : d(new QFileSystemIteratorPrivate(path, QStringList(QLatin1String("*")), QDir::NoFilter, flags)) +{ + d->q = this; +} + +/*! + Constructs a QFileSystemIterator that can iterate over \a path, using \a + nameFilters and \a filters. You can pass options via \a flags to decide + how the directory should be iterated. + + By default, \a flags is NoIteratorFlags, which provides the same behavior + as QDir::entryList(). + + \sa atEnd(), next(), IteratorFlags +*/ +QFileSystemIterator::QFileSystemIterator(const QString &path, const QStringList &nameFilters, + QDir::Filters filters, IteratorFlags flags) + : d(new QFileSystemIteratorPrivate(path, nameFilters, filters, flags)) +{ + d->q = this; +} + +/*! + Destroys the QFileSystemIterator. +*/ +QFileSystemIterator::~QFileSystemIterator() +{ + delete d; +} + +/*! + Advances the iterator to the next entry, and returns the file path of this + new entry. If atEnd() returns true, this function does nothing, and + returns a null QString. + + You can call fileName() or filePath() to get the current entry file name + or path, or fileInfo() to get a QFileInfo for the current entry. + + \sa hasNext(), fileName(), filePath(), fileInfo() +*/ +void QFileSystemIterator::next() +{ + d->advance(); +} + +/*! + Returns true if there is at least one more entry in the directory; + otherwise, false is returned. + + \sa next(), fileName(), filePath(), fileInfo() +*/ +bool QFileSystemIterator::atEnd() const +{ + return d->atEnd(); +} + +/*! + Returns the file name for the current directory entry, without the path + prepended. If the current entry is invalid (i.e., isValid() returns + false), a null QString is returned. + + This function is provided for the convenience when iterating single + directories. For recursive iteration, you should call filePath() or + fileInfo() instead. + + \sa filePath(), fileInfo() +*/ +QString QFileSystemIterator::fileName() const +{ + if (d->atEnd() || !d->m_entry) + return QString(); + if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDir) + return QString(); + if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDir) + return QLatin1String("@"); + if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDotDir) + return QLatin1String("@@"); +#ifdef Q_OS_WIN + return QString::fromWCharArray(d->m_entry->cFileName); +#else + return QString::fromLocal8Bit(d->m_entry->d_name); +#endif +} + +/*! + Returns the full file path for the current directory entry. If the current + entry is invalid (i.e., isValid() returns false), a null QString is + returned. + + \sa fileInfo(), fileName() +*/ +QString QFileSystemIterator::filePath() const +{ + if (d->atEnd()) + return QString(); + QByteArray ba = d->m_dirPaths.top(); + if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDir) + ba += "/."; + else if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDotDir) + ba += "/.."; + else if (d->m_entry) { + ba += '/'; +#ifdef Q_OS_WIN + ba += QString::fromWCharArray(d->m_entry->cFileName); +#else + ba += d->m_entry->d_name; +#endif + } + return QString::fromLocal8Bit(ba); +} + +/*! + Returns a QFileInfo for the current directory entry. If the current entry + is invalid (i.e., isValid() returns false), a null QFileInfo is returned. + + \sa filePath(), fileName() +*/ +QFileInfo QFileSystemIterator::fileInfo() const +{ + return QFileInfo(filePath()); +} + +/*! + Returns the base directory of the iterator. +*/ +QString QFileSystemIterator::path() const +{ + return QString::fromLocal8Bit(d->m_dirPaths.top()); +} + +QT_END_NAMESPACE diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h new file mode 100644 index 0000000..4aad3a1 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QFILESYSTEMITERATOR_H +#define QFILESYSTEMITERATOR_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + +class QFileSystemIteratorPrivate; +class //Q_CORE_EXPORT +QFileSystemIterator +{ +public: + enum IteratorFlag { + NoIteratorFlags = 0x0, + FollowSymlinks = 0x1, + Subdirectories = 0x2 + }; + Q_DECLARE_FLAGS(IteratorFlags, IteratorFlag) + + QFileSystemIterator(const QDir &dir, IteratorFlags flags = NoIteratorFlags); + QFileSystemIterator(const QString &path, + IteratorFlags flags = NoIteratorFlags); + QFileSystemIterator(const QString &path, + QDir::Filters filter, + IteratorFlags flags = NoIteratorFlags); + QFileSystemIterator(const QString &path, + const QStringList &nameFilters, + QDir::Filters filters = QDir::NoFilter, + IteratorFlags flags = NoIteratorFlags); + + virtual ~QFileSystemIterator(); + + void next(); + bool atEnd() const; + + QString fileName() const; + QString filePath() const; + QFileInfo fileInfo() const; + QString path() const; + +private: + Q_DISABLE_COPY(QFileSystemIterator) + + QFileSystemIteratorPrivate *d; + friend class QDir; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemIterator::IteratorFlags) + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp new file mode 100644 index 0000000..103b77c --- /dev/null +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -0,0 +1,675 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include + +#include + +#ifdef Q_OS_WIN +# include +# include +#endif + +#define BUFSIZE 1024*512 +#define FACTOR 1024*512 +#define TF_SIZE FACTOR*81 + +// 10 predefined (but random() seek positions +// hardcoded to be comparable over several runs +const int seekpos[] = {TF_SIZE*0.52, + TF_SIZE*0.23, + TF_SIZE*0.73, + TF_SIZE*0.77, + TF_SIZE*0.80, + TF_SIZE*0.12, + TF_SIZE*0.53, + TF_SIZE*0.21, + TF_SIZE*0.27, + TF_SIZE*0.78}; + +const int sp_size = sizeof(seekpos)/sizeof(int); + +class tst_qfile: public QObject +{ +Q_ENUMS(BenchmarkType) +Q_OBJECT +public: + enum BenchmarkType { + QFileBenchmark = 1, + QFSFileEngineBenchmark, + Win32Benchmark, + PosixBenchmark, + QFileFromPosixBenchmark + }; +private slots: + void initTestCase(); + void cleanupTestCase(); + + void open_data(); + void open(); + void seek_data(); + void seek(); + + void readSmallFiles_QFile(); + void readSmallFiles_QFSFileEngine(); + void readSmallFiles_posix(); + void readSmallFiles_Win32(); + + void readSmallFiles_QFile_data(); + void readSmallFiles_QFSFileEngine_data(); + void readSmallFiles_posix_data(); + void readSmallFiles_Win32_data(); + + void readBigFile_QFile_data(); + void readBigFile_QFSFileEngine_data(); + void readBigFile_posix_data(); + void readBigFile_Win32_data(); + + void readBigFile_QFile(); + void readBigFile_QFSFileEngine(); + void readBigFile_posix(); + void readBigFile_Win32(); + +private: + void readBigFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b); + void readBigFile(); + void readSmallFiles_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b); + void readSmallFiles(); + void createFile(); + void fillFile(int factor=FACTOR); + void removeFile(); + void createSmallFiles(); + void removeSmallFiles(); + QString filename; + QString tmpDirName; +}; + +Q_DECLARE_METATYPE(tst_qfile::BenchmarkType) +Q_DECLARE_METATYPE(QIODevice::OpenMode) +Q_DECLARE_METATYPE(QIODevice::OpenModeFlag) + +void tst_qfile::createFile() +{ + removeFile(); // Cleanup in case previous test case aborted before cleaning up + + QTemporaryFile tmpFile; + tmpFile.setAutoRemove(false); + if (!tmpFile.open()) + ::exit(1); + filename = tmpFile.fileName(); + tmpFile.close(); +} + +void tst_qfile::removeFile() +{ + if (!filename.isEmpty()) + QFile::remove(filename); +} + +void tst_qfile::fillFile(int factor) +{ + QFile tmpFile(filename); + tmpFile.open(QIODevice::WriteOnly); + //for (int row=0; row("testType"); + QTest::addColumn("blockSize"); + QTest::addColumn("textMode"); + QTest::addColumn("bufferedMode"); + + const int bs[] = {1024, 1024*2, 1024*8, 1024*16, 1024*32,1024*512}; + int bs_entries = sizeof(bs)/sizeof(const int); + + QString flagstring; + if (t & QIODevice::Text) flagstring += "textMode "; + if (b & QIODevice::Unbuffered) flagstring += "unbuffered "; + if (flagstring.isEmpty()) flagstring = "none"; + + for (int i=0; i("testType"); + QTest::newRow("QFile") << QFileBenchmark; + QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; + QTest::newRow("Posix FILE*") << PosixBenchmark; +#ifdef Q_OS_WIN + QTest::newRow("Win32 API") << Win32Benchmark; +#endif +} + +void tst_qfile::seek() +{ + QFETCH(tst_qfile::BenchmarkType, testType); + int i = 0; + + createFile(); + fillFile(); + + switch (testType) { + case(QFileBenchmark): { + QFile file(filename); + file.open(QIODevice::ReadOnly); + QBENCHMARK { + i=(i+1)%sp_size; + file.seek(seekpos[i]); + } + file.close(); + } + break; + case(QFSFileEngineBenchmark): { + QFSFileEngine fse(filename); + fse.open(QIODevice::ReadOnly); + QBENCHMARK { + i=(i+1)%sp_size; + fse.seek(seekpos[i]); + } + fse.close(); + } + break; + case(PosixBenchmark): { + QByteArray data = filename.toLocal8Bit(); + const char* cfilename = data.constData(); + FILE* cfile = ::fopen(cfilename, "rb"); + QBENCHMARK { + i=(i+1)%sp_size; + ::fseek(cfile, seekpos[i], SEEK_SET); + } + ::fclose(cfile); + } + break; + case(QFileFromPosixBenchmark): { + // No gain in benchmarking this case + } + break; + case(Win32Benchmark): { +#ifdef Q_OS_WIN + HANDLE hndl; + + // ensure we don't account string conversion + wchar_t* cfilename = (wchar_t*)filename.utf16(); + + hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); + Q_ASSERT(hndl); + QBENCHMARK { + i=(i+1)%sp_size; + SetFilePointer(hndl, seekpos[i], NULL, 0); + } + CloseHandle(hndl); +#else + QFAIL("Not running on a Windows plattform!"); +#endif + } + break; + } + + removeFile(); +} + +void tst_qfile::open_data() +{ + QTest::addColumn("testType"); + QTest::newRow("QFile") << QFileBenchmark; + QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; + QTest::newRow("Posix FILE*") << PosixBenchmark; + QTest::newRow("QFile from FILE*") << QFileFromPosixBenchmark; +#ifdef Q_OS_WIN + QTest::newRow("Win32 API") << Win32Benchmark; +#endif +} + +void tst_qfile::open() +{ + QFETCH(tst_qfile::BenchmarkType, testType); + + createFile(); + + switch (testType) { + case(QFileBenchmark): { + QBENCHMARK { + QFile file( filename ); + file.open( QIODevice::ReadOnly ); + file.close(); + } + } + break; + case(QFSFileEngineBenchmark): { + QBENCHMARK { + QFSFileEngine fse(filename); + fse.open(QIODevice::ReadOnly); + fse.close(); + } + } + break; + + case(PosixBenchmark): { + // ensure we don't account toLocal8Bit() + QByteArray data = filename.toLocal8Bit(); + const char* cfilename = data.constData(); + + QBENCHMARK { + FILE* cfile = ::fopen(cfilename, "rb"); + ::fclose(cfile); + } + } + break; + case(QFileFromPosixBenchmark): { + // ensure we don't account toLocal8Bit() + QByteArray data = filename.toLocal8Bit(); + const char* cfilename = data.constData(); + FILE* cfile = ::fopen(cfilename, "rb"); + + QBENCHMARK { + QFile file; + file.open(cfile, QIODevice::ReadOnly); + file.close(); + } + ::fclose(cfile); + } + break; + case(Win32Benchmark): { +#ifdef Q_OS_WIN + HANDLE hndl; + + // ensure we don't account string conversion + wchar_t* cfilename = (wchar_t*)filename.utf16(); + + QBENCHMARK { + hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); + Q_ASSERT(hndl); + CloseHandle(hndl); + } +#else + QFAIL("Not running on a non-Windows platform!"); +#endif + } + break; + } + + removeFile(); +} + + +void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); } +void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); } +void tst_qfile::readSmallFiles_posix() { readSmallFiles(); } +void tst_qfile::readSmallFiles_Win32() { readSmallFiles(); } + +void tst_qfile::readSmallFiles_QFile_data() +{ + readSmallFiles_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); + readSmallFiles_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); + readSmallFiles_data(QFileBenchmark, QIODevice::Text, QIODevice::NotOpen); + readSmallFiles_data(QFileBenchmark, QIODevice::Text, QIODevice::Unbuffered); + +} + +void tst_qfile::readSmallFiles_QFSFileEngine_data() +{ + readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); + readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); + readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::NotOpen); + readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::Unbuffered); +} + +void tst_qfile::readSmallFiles_posix_data() +{ + readSmallFiles_data(PosixBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); +} + +void tst_qfile::readSmallFiles_Win32_data() +{ + readSmallFiles_data(Win32Benchmark, QIODevice::NotOpen, QIODevice::NotOpen); +} + + +void tst_qfile::readSmallFiles_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b) +{ + QTest::addColumn("testType"); + QTest::addColumn("blockSize"); + QTest::addColumn("textMode"); + QTest::addColumn("bufferedMode"); + + const int bs[] = {1024, 1024*2, 1024*8, 1024*16, 1024*32,1024*512}; + int bs_entries = sizeof(bs)/sizeof(const int); + + QString flagstring; + if (t & QIODevice::Text) flagstring += "textMode "; + if (b & QIODevice::Unbuffered) flagstring += "unbuffered "; + if (flagstring.isEmpty()) flagstring = "none"; + + for (int i=0; i fileList; + Q_FOREACH(QString file, files) { + QFile *f = new QFile(tmpDirName+ "/" + file); + f->open(QIODevice::ReadOnly|textMode|bufferedMode); + fileList.append(f); + } + + QBENCHMARK { + Q_FOREACH(QFile *file, fileList) { + while (!file->atEnd()) { + file->read(buffer, blockSize); + } + } + } + + Q_FOREACH(QFile *file, fileList) { + file->close(); + delete file; + } + } + break; + case(QFSFileEngineBenchmark): { + QList fileList; + Q_FOREACH(QString file, files) { + QFSFileEngine *fse = new QFSFileEngine(tmpDirName+ "/" + file); + fse->open(QIODevice::ReadOnly|textMode|bufferedMode); + fileList.append(fse); + } + + QBENCHMARK { + Q_FOREACH(QFSFileEngine *fse, fileList) { + while (fse->read(buffer, blockSize)); + } + } + + Q_FOREACH(QFSFileEngine *fse, fileList) { + fse->close(); + delete fse; + } + } + break; + case(PosixBenchmark): { + QList fileList; + Q_FOREACH(QString file, files) { + fileList.append(::fopen(QFile::encodeName(tmpDirName+ "/" + file).constData(), "rb")); + } + + QBENCHMARK { + Q_FOREACH(FILE* cfile, fileList) { + while(!feof(cfile)) + ::fread(buffer, blockSize, 1, cfile); + ::fseek(cfile, 0, SEEK_SET); + } + } + + Q_FOREACH(FILE* cfile, fileList) { + ::fclose(cfile); + } + } + break; + case(QFileFromPosixBenchmark): { + // No gain in benchmarking this case + } + break; + case(Win32Benchmark): { +#ifdef Q_OS_WIN + HANDLE hndl; + + // ensure we don't account string conversion + wchar_t* cfilename = (wchar_t*)filename.utf16(); + + hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); + Q_ASSERT(hndl); + wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; + DWORD numberOfBytesRead; + QBENCHMARK { + do { + ReadFile(hndl, nativeBuffer, blockSize, &numberOfBytesRead, NULL); + } while(numberOfBytesRead != 0); + } + delete nativeBuffer; + CloseHandle(hndl); +#else + QFAIL("Not running on a non-Windows platform!"); +#endif + } + break; + } + + removeSmallFiles(); + delete[] buffer; +} + +QTEST_MAIN(tst_qfile) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/io/qfile/qfile.pro b/tests/benchmarks/corelib/io/qfile/qfile.pro new file mode 100644 index 0000000..99505c3 --- /dev/null +++ b/tests/benchmarks/corelib/io/qfile/qfile.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qfile +QT -= gui +win32: DEFINES+= _CRT_SECURE_NO_WARNINGS + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp new file mode 100644 index 0000000..025787f --- /dev/null +++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include + +#include "private/qfsfileengine_p.h" + +class qfileinfo : public QObject +{ + Q_OBJECT +private slots: + void canonicalFileNamePerformance(); + + void initTestCase(); + void cleanupTestCase(); +public: + qfileinfo() : QObject() {}; +}; + +void qfileinfo::initTestCase() +{ +} + +void qfileinfo::cleanupTestCase() +{ +} + +void qfileinfo::canonicalFileNamePerformance() +{ + QString appPath = QCoreApplication::applicationFilePath(); + QFSFileEnginePrivate::canonicalized(appPath); // warmup + QFSFileEnginePrivate::canonicalized(appPath); // more warmup + QBENCHMARK { + for (int i = 0; i < 5000; i++) { + QFSFileEnginePrivate::canonicalized(appPath); + } + } +} + +QTEST_MAIN(qfileinfo) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro new file mode 100644 index 0000000..295cb50 --- /dev/null +++ b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = qfileinfo +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qiodevice/main.cpp b/tests/benchmarks/corelib/io/qiodevice/main.cpp new file mode 100644 index 0000000..4af697c --- /dev/null +++ b/tests/benchmarks/corelib/io/qiodevice/main.cpp @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include + +#include + + +class tst_qiodevice : public QObject +{ + Q_OBJECT +private slots: + void read_old(); + void read_old_data() { read_data(); } + //void read_new(); + //void read_new_data() { read_data(); } +private: + void read_data(); +}; + + +void tst_qiodevice::read_data() +{ + QTest::addColumn("size"); + QTest::newRow("10k") << qint64(10 * 1024); + QTest::newRow("100k") << qint64(100 * 1024); + QTest::newRow("1000k") << qint64(1000 * 1024); + QTest::newRow("10000k") << qint64(10000 * 1024); +#ifndef Q_OS_SYMBIAN // Symbian devices don't (yet) have enough available RAM to run these + QTest::newRow("100000k") << qint64(100000 * 1024); + QTest::newRow("1000000k") << qint64(1000000 * 1024); +#endif +} + +void tst_qiodevice::read_old() +{ + QFETCH(qint64, size); + + QString name = "tmp" + QString::number(size); + + { + QFile file(name); + file.open(QIODevice::WriteOnly); + file.seek(size); + file.write("x", 1); + file.close(); + } + + QBENCHMARK { + QFile file(name); + file.open(QIODevice::ReadOnly); + QByteArray ba; + qint64 s = size - 1024; + file.seek(512); + ba = file.read(s); // crash happens during this read / assignment operation + } + + { + QFile file(name); + file.remove(); + } +} + + +QTEST_MAIN(tst_qiodevice) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro new file mode 100755 index 0000000..749a4d6 --- /dev/null +++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qiodevice +TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp new file mode 100644 index 0000000..8b71189 --- /dev/null +++ b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include +#include + + +class tst_qtemporaryfile : public QObject +{ + Q_OBJECT +private slots: + void openclose_data(); + void openclose(); + void readwrite_data() { openclose_data(); } + void readwrite(); + +private: +}; + +void tst_qtemporaryfile::openclose_data() +{ + QTest::addColumn("amount"); + QTest::newRow("100") << qint64(100); + QTest::newRow("1000") << qint64(1000); + QTest::newRow("10000") << qint64(10000); +} + +void tst_qtemporaryfile::openclose() +{ + QFETCH(qint64, amount); + + QBENCHMARK { + for (qint64 i = 0; i < amount; ++i) { + QTemporaryFile file; + file.open(); + file.close(); + } + } +} + +void tst_qtemporaryfile::readwrite() +{ + QFETCH(qint64, amount); + + const int dataSize = 4096; + QByteArray data; + data.fill('a', dataSize); + QBENCHMARK { + for (qint64 i = 0; i < amount; ++i) { + QTemporaryFile file; + file.open(); + file.write(data); + file.seek(0); + file.read(dataSize); + file.close(); + } + } +} + +QTEST_MAIN(tst_qtemporaryfile) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro new file mode 100644 index 0000000..c1b04f4 --- /dev/null +++ b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qtemporaryfile +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/events/events.pro b/tests/benchmarks/corelib/kernel/events/events.pro new file mode 100644 index 0000000..adf2317 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/events/events.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_events +DEPENDPATH += . +INCLUDEPATH += . +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/events/main.cpp b/tests/benchmarks/corelib/kernel/events/main.cpp new file mode 100644 index 0000000..0dd2c18 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/events/main.cpp @@ -0,0 +1,187 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + +#include +#include + +class PingPong : public QObject +{ +public: + void setPeer(QObject *peer); + void resetCounter() {m_counter = 100;} + +protected: + bool event(QEvent *e); + +private: + QObject *m_peer; + int m_counter; +}; + +void PingPong::setPeer(QObject *peer) +{ + m_peer = peer; + m_counter = 100; +} + +bool PingPong::event(QEvent *) +{ + --m_counter; + if (m_counter > 0) { + QEvent *e = new QEvent(QEvent::User); + QCoreApplication::postEvent(m_peer, e); + } else { + QTestEventLoop::instance().exitLoop(); + } + return true; +} + +class EventTester : public QObject +{ +public: + int foo(int bar); + +protected: + bool event(QEvent *e); +}; + +bool EventTester::event(QEvent *e) +{ + if (e->type() == QEvent::User+1) + return foo(e->type()) != 0; + return false; +} + +int EventTester::foo(int bar) +{ + return bar + 1; +} + +class EventsBench : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase(); + void cleanupTestCase(); + + void noEvent(); + void sendEvent_data(); + void sendEvent(); + void postEvent_data(); + void postEvent(); +}; + +void EventsBench::initTestCase() +{ +} + +void EventsBench::cleanupTestCase() +{ +} + +void EventsBench::noEvent() +{ + EventTester tst; + int val = 0; + QBENCHMARK { + val += tst.foo(1); + } +} + +void EventsBench::sendEvent_data() +{ + QTest::addColumn("filterEvents"); + QTest::newRow("no eventfilter") << false; + QTest::newRow("eventfilter") << true; +} + +void EventsBench::sendEvent() +{ + QFETCH(bool, filterEvents); + EventTester tst; + if (filterEvents) + tst.installEventFilter(this); + QEvent evt(QEvent::Type(QEvent::User+1)); + QBENCHMARK { + QCoreApplication::sendEvent(&tst, &evt); + } +} + +void EventsBench::postEvent_data() +{ + QTest::addColumn("filterEvents"); + // The first time an eventloop is executed, the case runs radically slower at least + // on some platforms, so test the "no eventfilter" case to get a comparable results + // with the "eventfilter" case. + QTest::newRow("first time, no eventfilter") << false; + QTest::newRow("no eventfilter") << false; + QTest::newRow("eventfilter") << true; +} + +void EventsBench::postEvent() +{ + QFETCH(bool, filterEvents); + PingPong ping; + PingPong pong; + ping.setPeer(&pong); + pong.setPeer(&ping); + if (filterEvents) { + ping.installEventFilter(this); + pong.installEventFilter(this); + } + + QBENCHMARK { + // In case multiple iterations are done, event needs to be created inside the QBENCHMARK, + // or it gets deleted once first iteration exits and can cause a crash. Similarly, + // ping and pong need their counters reset. + QEvent *e = new QEvent(QEvent::User); + ping.resetCounter(); + pong.resetCounter(); + QCoreApplication::postEvent(&ping, e); + QTestEventLoop::instance().enterLoop( 61 ); + } +} + +QTEST_MAIN(EventsBench) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro new file mode 100644 index 0000000..91cf3c5 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/kernel.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +SUBDIRS = \ + events \ + qmetaobject \ + qobject \ + qvariant diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp new file mode 100644 index 0000000..c375a16 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp @@ -0,0 +1,159 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +class tst_qmetaobject: public QObject +{ +Q_OBJECT +private slots: + void initTestCase(); + void cleanupTestCase(); + + void indexOfProperty_data(); + void indexOfProperty(); + void indexOfMethod_data(); + void indexOfMethod(); + void indexOfSignal_data(); + void indexOfSignal(); + void indexOfSlot_data(); + void indexOfSlot(); +}; + +void tst_qmetaobject::initTestCase() +{ +} + +void tst_qmetaobject::cleanupTestCase() +{ +} + +void tst_qmetaobject::indexOfProperty_data() +{ + QTest::addColumn("name"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->propertyCount(); ++i) { + QMetaProperty prop = mo->property(i); + QTest::newRow(prop.name()) << QByteArray(prop.name()); + } +} + +void tst_qmetaobject::indexOfProperty() +{ + QFETCH(QByteArray, name); + const char *p = name.constData(); + const QMetaObject *mo = &QTreeView::staticMetaObject; + QBENCHMARK { + (void)mo->indexOfProperty(p); + } +} + +void tst_qmetaobject::indexOfMethod_data() +{ + QTest::addColumn("method"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->methodCount(); ++i) { + QMetaMethod method = mo->method(i); + QByteArray sig = method.signature(); + QTest::newRow(sig) << sig; + } +} + +void tst_qmetaobject::indexOfMethod() +{ + QFETCH(QByteArray, method); + const char *p = method.constData(); + const QMetaObject *mo = &QTreeView::staticMetaObject; + QBENCHMARK { + (void)mo->indexOfMethod(p); + } +} + +void tst_qmetaobject::indexOfSignal_data() +{ + QTest::addColumn("signal"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->methodCount(); ++i) { + QMetaMethod method = mo->method(i); + if (method.methodType() != QMetaMethod::Signal) + continue; + QByteArray sig = method.signature(); + QTest::newRow(sig) << sig; + } +} + +void tst_qmetaobject::indexOfSignal() +{ + QFETCH(QByteArray, signal); + const char *p = signal.constData(); + const QMetaObject *mo = &QTreeView::staticMetaObject; + QBENCHMARK { + (void)mo->indexOfSignal(p); + } +} + +void tst_qmetaobject::indexOfSlot_data() +{ + QTest::addColumn("slot"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->methodCount(); ++i) { + QMetaMethod method = mo->method(i); + if (method.methodType() != QMetaMethod::Slot) + continue; + QByteArray sig = method.signature(); + QTest::newRow(sig) << sig; + } +} + +void tst_qmetaobject::indexOfSlot() +{ + QFETCH(QByteArray, slot); + const char *p = slot.constData(); + const QMetaObject *mo = &QTreeView::staticMetaObject; + QBENCHMARK { + (void)mo->indexOfSlot(p); + } +} + +QTEST_MAIN(tst_qmetaobject) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro new file mode 100644 index 0000000..78300f6 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qmetaobject + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp new file mode 100644 index 0000000..7f24ebd --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp @@ -0,0 +1,180 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include "object.h" +#include +#include + +enum { + CreationDeletionBenckmarkConstant = 34567, + SignalsAndSlotsBenchmarkConstant = 456789 +}; + +class QObjectBenchmark : public QObject +{ +Q_OBJECT +private slots: + void signal_slot_benchmark(); + void signal_slot_benchmark_data(); + void qproperty_benchmark_data(); + void qproperty_benchmark(); + void dynamic_property_benchmark(); + void connect_disconnect_benchmark_data(); + void connect_disconnect_benchmark(); +}; + +void QObjectBenchmark::signal_slot_benchmark_data() +{ + QTest::addColumn("type"); + QTest::newRow("simple function") << 0; + QTest::newRow("single signal/slot") << 1; + QTest::newRow("multi signal/slot") << 2; +} + +void QObjectBenchmark::signal_slot_benchmark() +{ + QFETCH(int, type); + + Object singleObject; + Object multiObject; + singleObject.setObjectName("single"); + multiObject.setObjectName("multi"); + + singleObject.connect(&singleObject, SIGNAL(signal0()), SLOT(slot0())); + + multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(slot0())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal1())); + multiObject.connect(&multiObject, SIGNAL(signal1()), SLOT(slot1())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal2())); + multiObject.connect(&multiObject, SIGNAL(signal2()), SLOT(slot2())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal3())); + multiObject.connect(&multiObject, SIGNAL(signal3()), SLOT(slot3())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal4())); + multiObject.connect(&multiObject, SIGNAL(signal4()), SLOT(slot4())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal5())); + multiObject.connect(&multiObject, SIGNAL(signal5()), SLOT(slot5())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal6())); + multiObject.connect(&multiObject, SIGNAL(signal6()), SLOT(slot6())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal7())); + multiObject.connect(&multiObject, SIGNAL(signal7()), SLOT(slot7())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal8())); + multiObject.connect(&multiObject, SIGNAL(signal8()), SLOT(slot8())); + // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal9())); + multiObject.connect(&multiObject, SIGNAL(signal9()), SLOT(slot9())); + + if (type == 0) { + QBENCHMARK { + singleObject.slot0(); + } + } else if (type == 1) { + QBENCHMARK { + singleObject.emitSignal0(); + } + } else { + QBENCHMARK { + multiObject.emitSignal0(); + } + } +} + +void QObjectBenchmark::qproperty_benchmark_data() +{ + QTest::addColumn("name"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->propertyCount(); ++i) { + QMetaProperty prop = mo->property(i); + QTest::newRow(prop.name()) << QByteArray(prop.name()); + } +} + +void QObjectBenchmark::qproperty_benchmark() +{ + QFETCH(QByteArray, name); + const char *p = name.constData(); + QTreeView obj; + QVariant v = obj.property(p); + QBENCHMARK { + obj.setProperty(p, v); + (void)obj.property(p); + } +} + +void QObjectBenchmark::dynamic_property_benchmark() +{ + QTreeView obj; + QBENCHMARK { + obj.setProperty("myProperty", 123); + (void)obj.property("myProperty"); + obj.setProperty("myOtherProperty", 123); + (void)obj.property("myOtherProperty"); + } +} + +void QObjectBenchmark::connect_disconnect_benchmark_data() +{ + QTest::addColumn("signal"); + const QMetaObject *mo = &QTreeView::staticMetaObject; + for (int i = 0; i < mo->methodCount(); ++i) { + QMetaMethod method = mo->method(i); + if (method.methodType() != QMetaMethod::Signal) + continue; + QByteArray sig = method.signature(); + QTest::newRow(sig) << sig; + } +} + +void QObjectBenchmark::connect_disconnect_benchmark() +{ + QFETCH(QByteArray, signal); + signal.prepend('2'); + const char *p = signal.constData(); + QTreeView obj; + QBENCHMARK { + QObject::connect(&obj, p, &obj, p); + QObject::disconnect(&obj, p, &obj, p); + } +} + +QTEST_MAIN(QObjectBenchmark) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/kernel/qobject/object.cpp b/tests/benchmarks/corelib/kernel/qobject/object.cpp new file mode 100644 index 0000000..d775a32 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/object.cpp @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "object.h" + +void Object::emitSignal0() +{ emit signal0(); } + +void Object::slot0() +{ } +void Object::slot1() +{ } +void Object::slot2() +{ } +void Object::slot3() +{ } +void Object::slot4() +{ } +void Object::slot5() +{ } +void Object::slot6() +{ } +void Object::slot7() +{ } +void Object::slot8() +{ } +void Object::slot9() +{ } diff --git a/tests/benchmarks/corelib/kernel/qobject/object.h b/tests/benchmarks/corelib/kernel/qobject/object.h new file mode 100644 index 0000000..7e4933f --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/object.h @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef OBJECT_H +#define OBJECT_H + +#include + +class Object : public QObject +{ + Q_OBJECT +public: + void emitSignal0(); +signals: + void signal0(); + void signal1(); + void signal2(); + void signal3(); + void signal4(); + void signal5(); + void signal6(); + void signal7(); + void signal8(); + void signal9(); +public slots: + void slot0(); + void slot1(); + void slot2(); + void slot3(); + void slot4(); + void slot5(); + void slot6(); + void slot7(); + void slot8(); + void slot9(); +}; + +#endif // OBJECT_H diff --git a/tests/benchmarks/corelib/kernel/qobject/qobject.pro b/tests/benchmarks/corelib/kernel/qobject/qobject.pro new file mode 100644 index 0000000..2855de4 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/qobject.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qobject +DEPENDPATH += . +INCLUDEPATH += . + +# Input +HEADERS += object.h +SOURCES += main.cpp object.cpp diff --git a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro new file mode 100644 index 0000000..63b5442 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro @@ -0,0 +1,11 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qvariant +DEPENDPATH += . +INCLUDEPATH += . + +CONFIG += release +#CONFIG += debug + + +SOURCES += tst_qvariant.cpp diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp new file mode 100644 index 0000000..82dc7dd --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp @@ -0,0 +1,180 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#define ITERATION_COUNT 1e5 + +class tst_qvariant : public QObject +{ + Q_OBJECT +private slots: + void testBound(); + + void doubleVariantCreation(); + void floatVariantCreation(); + void rectVariantCreation(); + void stringVariantCreation(); + void pixmapVariantCreation(); + + void doubleVariantSetValue(); + void floatVariantSetValue(); + void rectVariantSetValue(); + void stringVariantSetValue(); + + void doubleVariantAssignment(); + void floatVariantAssignment(); + void rectVariantAssignment(); + void stringVariantAssignment(); +}; + +void tst_qvariant::testBound() +{ + qreal d = qreal(.5); + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + d = qBound(0, d, 1); + } + } +} + +template +static void variantCreation(T val) +{ + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + QVariant v(val); + } + } +} + +void tst_qvariant::doubleVariantCreation() +{ + variantCreation(0.0); +} + +void tst_qvariant::floatVariantCreation() +{ + variantCreation(0.0f); +} + +void tst_qvariant::rectVariantCreation() +{ + variantCreation(QRect(1, 2, 3, 4)); +} + +void tst_qvariant::stringVariantCreation() +{ + variantCreation(QString()); +} + +void tst_qvariant::pixmapVariantCreation() +{ + variantCreation(QPixmap()); +} + +template +static void variantSetValue(T d) +{ + QVariant v; + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + qVariantSetValue(v, d); + } + } +} + +void tst_qvariant::doubleVariantSetValue() +{ + variantSetValue(0.0); +} + +void tst_qvariant::floatVariantSetValue() +{ + variantSetValue(0.0f); +} + +void tst_qvariant::rectVariantSetValue() +{ + variantSetValue(QRect()); +} + +void tst_qvariant::stringVariantSetValue() +{ + variantSetValue(QString()); +} + +template +static void variantAssignment(T d) +{ + QVariant v; + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + v = d; + } + } +} + +void tst_qvariant::doubleVariantAssignment() +{ + variantAssignment(0.0); +} + +void tst_qvariant::floatVariantAssignment() +{ + variantAssignment(0.0f); +} + +void tst_qvariant::rectVariantAssignment() +{ + variantAssignment(QRect()); +} + +void tst_qvariant::stringVariantAssignment() +{ + variantAssignment(QString()); +} + +QTEST_MAIN(tst_qvariant) + +#include "tst_qvariant.moc" diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro new file mode 100644 index 0000000..f9c1978 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qthreadstorage + +SOURCES += tst_qthreadstorage.cpp + diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp new file mode 100644 index 0000000..faae4d7 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +//TESTED_FILES= + +QThreadStorage dummy[8]; + +QThreadStorage tls1; + +class tst_QThreadStorage : public QObject +{ + Q_OBJECT + +public: + tst_QThreadStorage(); + virtual ~tst_QThreadStorage(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void get(); + void set(); +}; + +tst_QThreadStorage::tst_QThreadStorage() +{ +} + +tst_QThreadStorage::~tst_QThreadStorage() +{ +} + +void tst_QThreadStorage::init() +{ + dummy[1].setLocalData(new int(5)); + dummy[2].setLocalData(new int(4)); + dummy[3].setLocalData(new int(3)); + tls1.setLocalData(new QString()); +} + +void tst_QThreadStorage::cleanup() +{ +} + +void tst_QThreadStorage::construct() +{ + QBENCHMARK { + QThreadStorage ts; + } +} + + +void tst_QThreadStorage::get() +{ + QThreadStorage ts; + ts.setLocalData(new int(45)); + + int count = 0; + QBENCHMARK { + int *i = ts.localData(); + count += *i; + } + ts.setLocalData(0); +} + +void tst_QThreadStorage::set() +{ + QThreadStorage ts; + + int count = 0; + QBENCHMARK { + ts.setLocalData(new int(count)); + count++; + } + ts.setLocalData(0); +} + + +QTEST_MAIN(tst_QThreadStorage) +#include "tst_qthreadstorage.moc" diff --git a/tests/benchmarks/corelib/thread/thread.pro b/tests/benchmarks/corelib/thread/thread.pro new file mode 100644 index 0000000..26570ba --- /dev/null +++ b/tests/benchmarks/corelib/thread/thread.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qthreadstorage diff --git a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro new file mode 100644 index 0000000..c6f3fa6 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_containers-associative +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp new file mode 100644 index 0000000..4c6dae4 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include + +#include + +class tst_associative_containers : public QObject +{ + Q_OBJECT +private slots: + void insert_data(); + void insert(); + void lookup_data(); + void lookup(); +}; + +template +void testInsert(int size) +{ + T container; + + QBENCHMARK { + for (int i = 0; i < size; ++i) + container.insert(i, i); + } +} + +void tst_associative_containers::insert_data() +{ + QTest::addColumn("useHash"); + QTest::addColumn("size"); + + for (int size = 10; size < 20000; size += 100) { + + const QByteArray sizeString = QByteArray::number(size); + + QTest::newRow(("hash--" + sizeString).constData()) << true << size; + QTest::newRow(("map--" + sizeString).constData()) << false << size; + } +} + +void tst_associative_containers::insert() +{ + QFETCH(bool, useHash); + QFETCH(int, size); + + QHash testHash; + QMap testMap; + + if (useHash) { + testInsert >(size); + } else { + testInsert >(size); + } +} + +void tst_associative_containers::lookup_data() +{ +// setReportType(LineChartReport); +// setChartTitle("Time to call value(), with an increasing number of items in the container"); + + QTest::addColumn("useHash"); + QTest::addColumn("size"); + + for (int size = 10; size < 20000; size += 100) { + + const QByteArray sizeString = QByteArray::number(size); + + QTest::newRow(("hash--" + sizeString).constData()) << true << size; + QTest::newRow(("map--" + sizeString).constData()) << false << size; + } +} + +template +void testLookup(int size) +{ + T container; + + for (int i = 0; i < size; ++i) + container.insert(i, i); + + int val; + + QBENCHMARK { + for (int i = 0; i < size; ++i) + val = container.value(i); + + } +} + +void tst_associative_containers::lookup() +{ + QFETCH(bool, useHash); + QFETCH(int, size); + + if (useHash) { + testLookup >(size); + } else { + testLookup >(size); + } +} + +QTEST_MAIN(tst_associative_containers) +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro new file mode 100644 index 0000000..bf6db44 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_containers-sequential +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp new file mode 100644 index 0000000..a6e405c --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp @@ -0,0 +1,265 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +// This file contains benchmarks for comparing QVector against std::vector + +#include +#include +#include + +#include + +template // T is the item type +class UseCases { +public: + virtual ~UseCases() {} + + // Use case: Insert \a size items into the vector. + virtual void insert(int size) = 0; + + // Use case: Lookup \a size items from the vector. + virtual void lookup(int size) = 0; +}; + +template +T * f(T *ts) // dummy function to prevent code from being optimized away by the compiler +{ + return ts; +} + +// This subclass implements the use cases using QVector as efficiently as possible. +template +class UseCases_QVector : public UseCases +{ + void insert(int size) + { + QVector v; + T t; + QBENCHMARK { + for (int i = 0; i < size; ++i) + v.append(t); + } + } + + void lookup(int size) + { + QVector v; + + T t; + for (int i = 0; i < size; ++i) + v.append(t); + + T *ts = new T[size]; + QBENCHMARK { + for (int i = 0; i < size; ++i) + ts[i] = v.value(i); + } + f(ts); + delete[] ts; + } +}; + +// This subclass implements the use cases using std::vector as efficiently as possible. +template +class UseCases_stdvector : public UseCases +{ + void insert(int size) + { + std::vector v; + T t; + QBENCHMARK { + for (int i = 0; i < size; ++i) + v.push_back(t); + } + } + + void lookup(int size) + { + std::vector v; + + T t; + for (int i = 0; i < size; ++i) + v.push_back(t); + + T *ts = new T[size]; + QBENCHMARK { + for (int i = 0; i < size; ++i) + ts[i] = v[i]; + } + f(ts); + delete[] ts; + } +}; + +struct Large { // A "large" item type + int x[1000]; +}; + +// Symbian devices typically have limited memory +#ifdef Q_OS_SYMBIAN +# define LARGE_MAX_SIZE 2000 +#else +# define LARGE_MAX_SIZE 20000 +#endif + +class tst_vector_vs_std : public QObject +{ + Q_OBJECT +public: + tst_vector_vs_std() + { + useCases_QVector_int = new UseCases_QVector; + useCases_stdvector_int = new UseCases_stdvector; + + useCases_QVector_Large = new UseCases_QVector; + useCases_stdvector_Large = new UseCases_stdvector; + } + +private: + UseCases *useCases_QVector_int; + UseCases *useCases_stdvector_int; + UseCases *useCases_QVector_Large; + UseCases *useCases_stdvector_Large; + +private slots: + void insert_int_data(); + void insert_int(); + void insert_Large_data(); + void insert_Large(); + void lookup_int_data(); + void lookup_int(); + void lookup_Large_data(); + void lookup_Large(); +}; + +void tst_vector_vs_std::insert_int_data() +{ + QTest::addColumn("useStd"); + QTest::addColumn("size"); + + for (int size = 10; size < 20000; size += 100) { + const QByteArray sizeString = QByteArray::number(size); + QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size; + QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size; + } +} + +void tst_vector_vs_std::insert_int() +{ + QFETCH(bool, useStd); + QFETCH(int, size); + + if (useStd) + useCases_stdvector_int->insert(size); + else + useCases_QVector_int->insert(size); +} + +void tst_vector_vs_std::insert_Large_data() +{ + QTest::addColumn("useStd"); + QTest::addColumn("size"); + + for (int size = 10; size < LARGE_MAX_SIZE; size += 100) { + const QByteArray sizeString = QByteArray::number(size); + QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size; + QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size; + } +} + +void tst_vector_vs_std::insert_Large() +{ + QFETCH(bool, useStd); + QFETCH(int, size); + + if (useStd) + useCases_stdvector_Large->insert(size); + else + useCases_QVector_Large->insert(size); +} + +void tst_vector_vs_std::lookup_int_data() +{ + QTest::addColumn("useStd"); + QTest::addColumn("size"); + + for (int size = 10; size < 20000; size += 100) { + const QByteArray sizeString = QByteArray::number(size); + QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size; + QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size; + } +} + +void tst_vector_vs_std::lookup_int() +{ + QFETCH(bool, useStd); + QFETCH(int, size); + + if (useStd) + useCases_stdvector_int->lookup(size); + else + useCases_QVector_int->lookup(size); +} + +void tst_vector_vs_std::lookup_Large_data() +{ + QTest::addColumn("useStd"); + QTest::addColumn("size"); + + for (int size = 10; size < LARGE_MAX_SIZE; size += 100) { + const QByteArray sizeString = QByteArray::number(size); + QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size; + QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size; + } +} + +void tst_vector_vs_std::lookup_Large() +{ + QFETCH(bool, useStd); + QFETCH(int, size); + + if (useStd) + useCases_stdvector_Large->lookup(size); + else + useCases_QVector_Large->lookup(size); +} + +QTEST_MAIN(tst_vector_vs_std) +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp new file mode 100644 index 0000000..22d4815 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include + +#include + + +class tst_qbytearray : public QObject +{ + Q_OBJECT +private slots: + void append(); + void append_data(); +}; + + +void tst_qbytearray::append_data() +{ + QTest::addColumn("size"); + QTest::newRow("1") << int(1); + QTest::newRow("10") << int(10); + QTest::newRow("100") << int(100); + QTest::newRow("1000") << int(1000); + QTest::newRow("10000") << int(10000); + QTest::newRow("100000") << int(100000); + QTest::newRow("1000000") << int(1000000); + QTest::newRow("10000000") << int(10000000); + QTest::newRow("100000000") << int(100000000); +} + +void tst_qbytearray::append() +{ + QFETCH(int, size); + +#ifdef Q_OS_SYMBIAN + if (size > 1000000) + QSKIP("Skipped due to limited memory in many Symbian devices.", SkipSingle); +#endif + + QByteArray ba; + QBENCHMARK { + QByteArray ba2(size, 'x'); + ba.append(ba2); + ba.clear(); + } +} + + +QTEST_MAIN(tst_qbytearray) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro new file mode 100755 index 0000000..a0bf021 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qbytearray +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp new file mode 100644 index 0000000..e293bfa --- /dev/null +++ b/tests/benchmarks/corelib/tools/qrect/main.cpp @@ -0,0 +1,329 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +// This file contains benchmarks for QRect/QRectF functions. + +#include +#include + +class tst_qrect : public QObject +{ + Q_OBJECT +private slots: + // QRect functions: + void contains_point_data(); + void contains_point(); + void contains_rect_data(); + void contains_rect(); + void intersects_data(); + void intersects(); + void intersected_data(); + void intersected(); + void united_data(); + void united(); + + // QRectF functions: + void contains_point_f_data(); + void contains_point_f(); + void contains_rect_f_data(); + void contains_rect_f(); + void intersects_f_data(); + void intersects_f(); + void intersected_f_data(); + void intersected_f(); + void united_f_data(); + void united_f(); +}; + +struct RectRectCombination +{ + QString tag; + qreal x1, y1, w1, h1, x2, y2, w2, h2; + RectRectCombination( + const QString &tag, + const qreal x1, const qreal y1, const qreal w1, const qreal h1, + const qreal x2, const qreal y2, const qreal w2, const qreal h2) + : tag(tag), x1(x1), y1(y1), w1(w1), h1(h1), x2(x2), y2(y2), w2(w2), h2(h2) {} +}; + +static QList createRectRectCombinations() +{ + QList result; + result << RectRectCombination("null", 0, 0, 0, 0, 0, 0, 0, 0); + result << RectRectCombination("null1", 0, 0, 0, 0, 0, 0, 10, 10); + result << RectRectCombination("null2", 0, 0, 10, 10, 0, 0, 0, 0); + + result << RectRectCombination("miss", 0, 0, 10, 10, 11, 11, 10, 10); + result << RectRectCombination("intersect", 0, 0, 10, 10, 5, 5, 10, 10); + result << RectRectCombination("contain1", 0, 0, 10, 10, 1, 1, 8, 8); + result << RectRectCombination("contain2", 1, 1, 8, 8, 0, 0, 10, 10); + + result << RectRectCombination("miss_flip1", 9, 9, -10, -10, 11, 11, 10, 10); + result << RectRectCombination("intersect_flip1", 9, 9, -10, -10, 5, 5, 10, 10); + result << RectRectCombination("contain1_flip1", 9, 9, -10, -10, 1, 1, 8, 8); + result << RectRectCombination("contain2_flip1", 8, 8, -8, -8, 0, 0, 10, 10); + + result << RectRectCombination("miss_flip2", 0, 0, 10, 10, 20, 20, -10, -10); + result << RectRectCombination("intersect_flip2", 0, 0, 10, 10, 14, 14, -10, -10); + result << RectRectCombination("contain1_flip2", 0, 0, 10, 10, 8, 8, -8, -8); + result << RectRectCombination("contain2_flip2", 1, 1, 8, 8, 9, 9, -10, -10); + + return result; +} + +static void addRectRectData(bool includeProperArg = false) +{ + QTest::addColumn("rf1"); + QTest::addColumn("rf2"); + if (includeProperArg) + QTest::addColumn("proper"); + for (int i = 0; i < (includeProperArg ? 2 : 1); ++i) { + QList combinations = createRectRectCombinations(); + foreach (RectRectCombination c, combinations) { + QTestData &testData = QTest::newRow(c.tag.toLatin1().data()); + QRectF r1(c.x1, c.y1, c.w1, c.h1); + QRectF r2(c.x2, c.y2, c.w2, c.h2); + testData << r1 << r2; + if (includeProperArg) + testData << (i == 0); + } + } +} + +struct RectPointCombination +{ + QString tag; + qreal x, y, w, h, px, py; + RectPointCombination( + const QString &tag, + const qreal x, const qreal y, const qreal w, const qreal h, const qreal px, const qreal py) + : tag(tag), x(x), y(y), w(w), h(h), px(px), py(py) {} +}; + +static QList createRectPointCombinations() +{ + QList result; + result << RectPointCombination("null", 0, 0, 0, 0, 0, 0); + + result << RectPointCombination("miss", 0, 0, 10, 10, -1, -1); + result << RectPointCombination("contain", 0, 0, 10, 10, 0, 0); + result << RectPointCombination("contain_proper", 0, 0, 10, 10, 1, 1); + + result << RectPointCombination("miss_flip", 9, 9, -10, -10, -1, -1); + result << RectPointCombination("contain_flip", 9, 9, -10, -10, 0, 0); + result << RectPointCombination("contain_flip_proper", 9, 9, -10, -10, 1, 1); + + return result; +} + +static void addRectPointData(bool includeProperArg = false) +{ + QTest::addColumn("rf"); + QTest::addColumn("pf"); + if (includeProperArg) + QTest::addColumn("proper"); + for (int i = 0; i < (includeProperArg ? 2 : 1); ++i) { + QList combinations = createRectPointCombinations(); + foreach (RectPointCombination c, combinations) { + QTestData &testData = QTest::newRow(c.tag.toLatin1().data()); + QRectF r(c.x, c.y, c.w, c.h); + QPointF p(c.px, c.py); + testData << r << p; + if (includeProperArg) + testData << (i == 0); + } + } +} + +void tst_qrect::contains_point_data() +{ + addRectPointData(true); +} + +void tst_qrect::contains_point() +{ + QFETCH(QRectF, rf); + QFETCH(QPointF, pf); + QFETCH(bool, proper); + QRect r(rf.toRect()); + QPoint p(pf.toPoint()); + QBENCHMARK { + r.contains(p, proper); + } +} + +void tst_qrect::contains_rect_data() +{ + addRectRectData(true); +} + +void tst_qrect::contains_rect() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QFETCH(bool, proper); + QRect r1(rf1.toRect()); + QRect r2(rf2.toRect()); + QBENCHMARK { + r1.contains(r2, proper); + } +} + +void tst_qrect::intersects_data() +{ + addRectRectData(); +} + +void tst_qrect::intersects() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QRect r1(rf1.toRect()); + QRect r2(rf2.toRect()); + QBENCHMARK { + r1.intersects(r2); + } +} + +void tst_qrect::intersected_data() +{ + addRectRectData(); +} + +void tst_qrect::intersected() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QRect r1(rf1.toRect()); + QRect r2(rf2.toRect()); + QBENCHMARK { + r1.intersected(r2); + } +} + +void tst_qrect::united_data() +{ + addRectRectData(); +} + +void tst_qrect::united() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QRect r1(rf1.toRect()); + QRect r2(rf2.toRect()); + QBENCHMARK { + r1.united(r2); + } +} + +void tst_qrect::contains_point_f_data() +{ + addRectPointData(); +} + +void tst_qrect::contains_point_f() +{ + QFETCH(QRectF, rf); + QFETCH(QPointF, pf); + QBENCHMARK { + rf.contains(pf); + } +} + +void tst_qrect::contains_rect_f_data() +{ + addRectRectData(); +} + +void tst_qrect::contains_rect_f() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QBENCHMARK { + rf1.contains(rf2); + } +} + +void tst_qrect::intersects_f_data() +{ + addRectRectData(); +} + +void tst_qrect::intersects_f() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QBENCHMARK { + rf1.intersects(rf2); + } +} + +void tst_qrect::intersected_f_data() +{ + addRectRectData(); +} + +void tst_qrect::intersected_f() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QBENCHMARK { + rf1.intersected(rf2); + } +} + +void tst_qrect::united_f_data() +{ + addRectRectData(); +} + +void tst_qrect::united_f() +{ + QFETCH(QRectF, rf1); + QFETCH(QRectF, rf2); + QBENCHMARK { + rf1.united(rf2); + } +} + +QTEST_MAIN(tst_qrect) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qrect/qrect.pro b/tests/benchmarks/corelib/tools/qrect/qrect.pro new file mode 100644 index 0000000..6e35119 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qrect/qrect.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qrect +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp new file mode 100644 index 0000000..ab9ed71 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp @@ -0,0 +1,290 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +#include + + +class tst_qregexp : public QObject +{ + Q_OBJECT +private slots: + void escape_old(); + void escape_old_data() { escape_data(); } + void escape_new1(); + void escape_new1_data() { escape_data(); } + void escape_new2(); + void escape_new2_data() { escape_data(); } + void escape_new3(); + void escape_new3_data() { escape_data(); } + void escape_new4(); + void escape_new4_data() { escape_data(); } +private: + void escape_data(); +}; + + +static void verify(const QString "ed, const QString &expected) +{ + if (quoted != expected) + qDebug() << "ERROR:" << quoted << expected; +} + +void tst_qregexp::escape_data() +{ + QTest::addColumn("pattern"); + QTest::addColumn("expected"); + + QTest::newRow("escape 0") << "Hello world" << "Hello world"; + QTest::newRow("escape 1") << "(Hello world)" << "\\(Hello world\\)"; + { + QString s; + for (int i = 0; i < 10; ++i) + s += "(escape)"; + QTest::newRow("escape 10") << s << QRegExp::escape(s); + } + { + QString s; + for (int i = 0; i < 100; ++i) + s += "(escape)"; + QTest::newRow("escape 100") << s << QRegExp::escape(s); + } +} + +void tst_qregexp::escape_old() +{ + QFETCH(QString, pattern); + QFETCH(QString, expected); + + QBENCHMARK { + static const char meta[] = "$()*+.?[\\]^{|}"; + QString quoted = pattern; + int i = 0; + + while (i < quoted.length()) { + if (strchr(meta, quoted.at(i).toLatin1()) != 0) + quoted.insert(i++, QLatin1Char('\\')); + ++i; + } + + verify(quoted, expected); + } +} + +void tst_qregexp::escape_new1() +{ + QFETCH(QString, pattern); + QFETCH(QString, expected); + + QBENCHMARK { + QString quoted; + const int count = pattern.count(); + quoted.reserve(count * 2); + const QLatin1Char backslash('\\'); + for (int i = 0; i < count; i++) { + switch (pattern.at(i).toLatin1()) { + case '$': + case '(': + case ')': + case '*': + case '+': + case '.': + case '?': + case '[': + case '\\': + case ']': + case '^': + case '{': + case '|': + case '}': + quoted.append(backslash); + } + quoted.append(pattern.at(i)); + } + verify(quoted, expected); + } +} + +void tst_qregexp::escape_new2() +{ + QFETCH(QString, pattern); + QFETCH(QString, expected); + + QBENCHMARK { + int count = pattern.count(); + const QLatin1Char backslash('\\'); + QString quoted(count * 2, backslash); + const QChar *patternData = pattern.data(); + QChar *quotedData = quoted.data(); + int escaped = 0; + for ( ; --count >= 0; ++patternData) { + const QChar c = *patternData; + switch (c.unicode()) { + case '$': + case '(': + case ')': + case '*': + case '+': + case '.': + case '?': + case '[': + case '\\': + case ']': + case '^': + case '{': + case '|': + case '}': + ++escaped; + ++quotedData; + } + *quotedData = c; + ++quotedData; + } + quoted.resize(pattern.size() + escaped); + + verify(quoted, expected); + } +} + +void tst_qregexp::escape_new3() +{ + QFETCH(QString, pattern); + QFETCH(QString, expected); + + QBENCHMARK { + QString quoted; + const int count = pattern.count(); + quoted.reserve(count * 2); + const QLatin1Char backslash('\\'); + for (int i = 0; i < count; i++) { + switch (pattern.at(i).toLatin1()) { + case '$': + case '(': + case ')': + case '*': + case '+': + case '.': + case '?': + case '[': + case '\\': + case ']': + case '^': + case '{': + case '|': + case '}': + quoted += backslash; + } + quoted += pattern.at(i); + } + + verify(quoted, expected); + } +} + + +static inline bool needsEscaping(int c) +{ + switch (c) { + case '$': + case '(': + case ')': + case '*': + case '+': + case '.': + case '?': + case '[': + case '\\': + case ']': + case '^': + case '{': + case '|': + case '}': + return true; + } + return false; +} + +void tst_qregexp::escape_new4() +{ + QFETCH(QString, pattern); + QFETCH(QString, expected); + + QBENCHMARK { + const int n = pattern.size(); + const QChar *patternData = pattern.data(); + // try to prevent copy if no escape is needed + int i = 0; + for (int i = 0; i != n; ++i) { + const QChar c = patternData[i]; + if (needsEscaping(c.unicode())) + break; + } + if (i == n) { + verify(pattern, expected); + // no escaping needed, "return pattern" should be done here. + return; + } + const QLatin1Char backslash('\\'); + QString quoted(n * 2, backslash); + QChar *quotedData = quoted.data(); + for (int j = 0; j != i; ++j) + *quotedData++ = *patternData++; + int escaped = 0; + for (; i != n; ++i) { + const QChar c = *patternData; + if (needsEscaping(c.unicode())) { + ++escaped; + ++quotedData; + } + *quotedData = c; + ++quotedData; + ++patternData; + } + quoted.resize(n + escaped); + verify(quoted, expected); + // "return quoted" + } +} +QTEST_MAIN(tst_qregexp) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro new file mode 100644 index 0000000..83d723c --- /dev/null +++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qregexp +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp new file mode 100644 index 0000000..12826eb --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -0,0 +1,147 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Application private dir is default serach path for files, so SRCDIR can be set to empty +#define SRCDIR "" +#endif + +class tst_QString: public QObject +{ + Q_OBJECT +private slots: + void equals() const; + void equals_data() const; + void fromUtf8() const; +}; + +void tst_QString::equals() const +{ + QFETCH(QString, a); + QFETCH(QString, b); + + QBENCHMARK { + a == b; + } +} + +void tst_QString::equals_data() const +{ + static const struct { + ushort data[80]; + int dummy; // just to ensure 4-byte alignment + } data = { + { + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, // 16 + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, // 32 + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, // 48 + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, // 64 + 64, 64, 64, 64, 96, 96, 96, 96, + 64, 64, 96, 96, 96, 96, 96, 96 // 80 + }, 0 + }; + const QChar *ptr = reinterpret_cast(data.data); + + QTest::addColumn("a"); + QTest::addColumn("b"); + QString base = QString::fromRawData(ptr, 64); + + QTest::newRow("different-length") << base << QString::fromRawData(ptr, 4); + QTest::newRow("same-string") << base << base; + QTest::newRow("same-data") << base << QString::fromRawData(ptr, 64); + + // try to avoid crossing a cache line (that is, at ptr[64]) + QTest::newRow("aligned-aligned-4n") + << QString::fromRawData(ptr, 60) << QString::fromRawData(ptr + 2, 60); + QTest::newRow("aligned-unaligned-4n") + << QString::fromRawData(ptr, 60) << QString::fromRawData(ptr + 1, 60); + QTest::newRow("unaligned-unaligned-4n") + << QString::fromRawData(ptr + 1, 60) << QString::fromRawData(ptr + 3, 60); + + QTest::newRow("aligned-aligned-4n+1") + << QString::fromRawData(ptr, 61) << QString::fromRawData(ptr + 2, 61); + QTest::newRow("aligned-unaligned-4n+1") + << QString::fromRawData(ptr, 61) << QString::fromRawData(ptr + 1, 61); + QTest::newRow("unaligned-unaligned-4n+1") + << QString::fromRawData(ptr + 1, 61) << QString::fromRawData(ptr + 3, 61); + + QTest::newRow("aligned-aligned-4n-1") + << QString::fromRawData(ptr, 59) << QString::fromRawData(ptr + 2, 59); + QTest::newRow("aligned-unaligned-4n-1") + << QString::fromRawData(ptr, 59) << QString::fromRawData(ptr + 1, 59); + QTest::newRow("unaligned-unaligned-4n-1") + << QString::fromRawData(ptr + 1, 59) << QString::fromRawData(ptr + 3, 59); + + QTest::newRow("aligned-aligned-2n") + << QString::fromRawData(ptr, 58) << QString::fromRawData(ptr + 2, 58); + QTest::newRow("aligned-unaligned-2n") + << QString::fromRawData(ptr, 58) << QString::fromRawData(ptr + 1, 58); + QTest::newRow("unaligned-unaligned-2n") + << QString::fromRawData(ptr + 1, 58) << QString::fromRawData(ptr + 3, 58); +} + +void tst_QString::fromUtf8() const +{ + QFile file(SRCDIR "utf-8.txt"); + if (!file.open(QFile::ReadOnly)) { + qFatal("Cannot open input file"); + return; + } + QByteArray data = file.readAll(); + const char *d = data.constData(); + int size = data.size(); + + QBENCHMARK { + QString::fromUtf8(d, size); + } +} + +QTEST_MAIN(tst_QString) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qstring/qstring.pro b/tests/benchmarks/corelib/tools/qstring/qstring.pro new file mode 100644 index 0000000..2e7c86a --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/qstring.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +TARGET = tst_qstring +QT -= gui +SOURCES += main.cpp + +wince*:{ + DEFINES += SRCDIR=\\\"\\\" +} else:symbian* { + addFiles.sources = utf-8.txt + addFiles.path = . + DEPLOYMENT += addFiles + TARGET.EPOCHEAPSIZE="0x100 0x1000000" +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + diff --git a/tests/benchmarks/corelib/tools/qstring/utf-8.txt b/tests/benchmarks/corelib/tools/qstring/utf-8.txt new file mode 100644 index 0000000..a8a58de --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/utf-8.txt @@ -0,0 +1,72 @@ +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp new file mode 100644 index 0000000..9bd146f --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp @@ -0,0 +1,464 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Select one of the scenarios below +#define SCENARIO 1 + +#if SCENARIO == 1 +// this is the "no harm done" version. Only operator% is active, +// with NO_CAST * defined +#define P % +#undef QT_USE_FAST_OPERATOR_PLUS +#undef QT_USE_FAST_CONCATENATION +#define QT_NO_CAST_FROM_ASCII +#define QT_NO_CAST_TO_ASCII +#endif + + +#if SCENARIO == 2 +// this is the "full" version. Operator+ is replaced by a QStringBuilder +// based version +// with NO_CAST * defined +#define P + +#define QT_USE_FAST_OPERATOR_PLUS +#define QT_USE_FAST_CONCATENATION +#define QT_NO_CAST_FROM_ASCII +#define QT_NO_CAST_TO_ASCII +#endif + +#if SCENARIO == 3 +// this is the "no harm done" version. Only operator% is active, +// with NO_CAST * _not_ defined +#define P % +#undef QT_USE_FAST_OPERATOR_PLUS +#undef QT_USE_FAST_CONCATENATION +#undef QT_NO_CAST_FROM_ASCII +#undef QT_NO_CAST_TO_ASCII +#endif + +#if SCENARIO == 4 +// this is the "full" version. Operator+ is replaced by a QStringBuilder +// based version +// with NO_CAST * _not_ defined +#define P + +#define QT_USE_FAST_OPERATOR_PLUS +#define QT_USE_FAST_CONCATENATION +#undef QT_NO_CAST_FROM_ASCII +#undef QT_NO_CAST_TO_ASCII +#endif + + +#include +#include +#include +#include + +#include + +#include + +#define COMPARE(a, b) QCOMPARE(a, b) +//#define COMPARE(a, b) + +#define SEP(s) qDebug() << "\n\n-------- " s " ---------"; + +#define LITERAL "some string literal" + +class tst_qstringbuilder : public QObject +{ + Q_OBJECT + +public: + tst_qstringbuilder() + : l1literal(LITERAL), + l1string(LITERAL), + ba(LITERAL), + string(l1string), + stdstring(LITERAL), + stringref(&string, 2, 10), + achar('c'), + r2(QLatin1String(LITERAL LITERAL)), + r3(QLatin1String(LITERAL LITERAL LITERAL)), + r4(QLatin1String(LITERAL LITERAL LITERAL LITERAL)), + r5(QLatin1String(LITERAL LITERAL LITERAL LITERAL LITERAL)) + {} + + +public: + enum { N = 10000 }; + + int run_traditional() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1string + l1string).size(); + s += QString(l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string + l1string).size(); +#endif + s += QString(achar + l1string + achar).size(); + } + return s; + } + + int run_builder() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1literal P l1literal).size(); + s += QString(l1literal P l1literal P l1literal).size(); + s += QString(l1literal P l1literal P l1literal P l1literal).size(); + s += QString(l1literal P l1literal P l1literal P l1literal P l1literal).size(); +#endif + s += QString(achar % l1literal % achar).size(); + } + return s; + } + +private slots: + + void separator_0() { + qDebug() << "\nIn each block the QStringBuilder based result appear first " + "(with a 'b_' prefix), QStringBased second ('q_' prefix), std::string " + "last ('s_' prefix)\n"; + } + + void separator_1() { SEP("literal + literal (builder first)"); } + + void b_2_l1literal() { + QBENCHMARK { r = l1literal P l1literal; } + COMPARE(r, r2); + } + #ifndef QT_NO_CAST_FROM_ASCII + void b_l1literal_LITERAL() { + QBENCHMARK { r = l1literal P LITERAL; } + COMPARE(r, r2); + } + #endif + void q_2_l1string() { + QBENCHMARK { r = l1string + l1string; } + COMPARE(r, r2); + } + + + void separator_2() { SEP("2 strings"); } + + void b_2_string() { + QBENCHMARK { r = string P string; } + COMPARE(r, r2); + } + void q_2_string() { + QBENCHMARK { r = string + string; } + COMPARE(r, r2); + } + void s_2_string() { + QBENCHMARK { stdr = stdstring + stdstring; } + COMPARE(stdr, stdstring + stdstring); + } + + + void separator_2c() { SEP("2 string refs"); } + + void b_2_stringref() { + QBENCHMARK { r = stringref % stringref; } + COMPARE(r, QString(stringref.toString() + stringref.toString())); + } + void q_2_stringref() { + QBENCHMARK { r = stringref.toString() + stringref.toString(); } + COMPARE(r, QString(stringref % stringref)); + } + + + void separator_2b() { SEP("3 strings"); } + + void b_3_string() { + QBENCHMARK { r = string P string P string; } + COMPARE(r, r3); + } + void q_3_string() { + QBENCHMARK { r = string + string + string; } + COMPARE(r, r3); + } + void s_3_string() { + QBENCHMARK { stdr = stdstring + stdstring + stdstring; } + COMPARE(stdr, stdstring + stdstring + stdstring); + } + + void separator_2e() { SEP("4 strings"); } + + void b_4_string() { + QBENCHMARK { r = string P string P string P string; } + COMPARE(r, r4); + } + void q_4_string() { + QBENCHMARK { r = string + string + string + string; } + COMPARE(r, r4); + } + void s_4_string() { + QBENCHMARK { stdr = stdstring + stdstring + stdstring + stdstring; } + COMPARE(stdr, stdstring + stdstring + stdstring + stdstring); + } + + + + void separator_2a() { SEP("string + literal (builder first)"); } + + void b_string_l1literal() { + QBENCHMARK { r = string % l1literal; } + COMPARE(r, r2); + } + #ifndef QT_NO_CAST_FROM_ASCII + void b_string_LITERAL() { + QBENCHMARK { r = string P LITERAL; } + COMPARE(r, r2); + } + void b_LITERAL_string() { + QBENCHMARK { r = LITERAL P string; } + COMPARE(r, r2); + } + #endif + void b_string_l1string() { + QBENCHMARK { r = string P l1string; } + COMPARE(r, r2); + } + void q_string_l1literal() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, r2); + } + void q_string_l1string() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, r2); + } + void s_LITERAL_string() { + QBENCHMARK { stdr = LITERAL + stdstring; } + COMPARE(stdr, stdstring + stdstring); + } + + + void separator_3() { SEP("3 literals"); } + + void b_3_l1literal() { + QBENCHMARK { r = l1literal P l1literal P l1literal; } + COMPARE(r, r3); + } + void q_3_l1string() { + QBENCHMARK { r = l1string + l1string + l1string; } + COMPARE(r, r3); + } + void s_3_l1string() { + QBENCHMARK { stdr = stdstring + LITERAL + LITERAL; } + COMPARE(stdr, stdstring + stdstring + stdstring); + } + + + void separator_4() { SEP("4 literals"); } + + void b_4_l1literal() { + QBENCHMARK { r = l1literal P l1literal P l1literal P l1literal; } + COMPARE(r, r4); + } + void q_4_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string; } + COMPARE(r, r4); + } + + + void separator_5() { SEP("5 literals"); } + + void b_5_l1literal() { + QBENCHMARK { r = l1literal P l1literal P l1literal P l1literal P l1literal; } + COMPARE(r, r5); + } + + void q_5_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string + l1string; } + COMPARE(r, r5); + } + + + void separator_6() { SEP("4 chars"); } + + void b_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string P achar P achar P achar P achar)); + } + + void q_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string P achar P achar P achar P achar)); + } + + void s_string_4_char() { + QBENCHMARK { stdr = stdstring + 'c' + 'c' + 'c' + 'c'; } + COMPARE(stdr, stdstring + 'c' + 'c' + 'c' + 'c'); + } + + + void separator_7() { SEP("char + string + char"); } + + void b_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar P string P achar)); + } + + void q_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar P string P achar)); + } + + void s_char_string_char() { + QBENCHMARK { stdr = 'c' + stdstring + 'c'; } + COMPARE(stdr, 'c' + stdstring + 'c'); + } + + + void separator_8() { SEP("string.arg"); } + + void b_string_arg() { + const QString pattern = l1string + QString::fromLatin1("%1") + l1string; + QBENCHMARK { r = l1literal P string P l1literal; } + COMPARE(r, r3); + } + + void q_string_arg() { + const QString pattern = l1string + QLatin1String("%1") + l1string; + QBENCHMARK { r = pattern.arg(string); } + COMPARE(r, r3); + } + + void q_bytearray_arg() { + QByteArray result; + QBENCHMARK { result = ba + ba + ba; } + } + + + void separator_9() { SEP("QString::reserve()"); } + + void b_reserve() { + QBENCHMARK { + r.clear(); + r = string P string P string P string; + } + COMPARE(r, r4); + } + void b_reserve_lit() { + QBENCHMARK { + r.clear(); + r = string P l1literal P string P string; + } + COMPARE(r, r4); + } + void s_reserve() { + QBENCHMARK { + r.clear(); + r.reserve(string.size() + string.size() + string.size() + string.size()); + r += string; + r += string; + r += string; + r += string; + } + COMPARE(r, r4); + } + void s_reserve_lit() { + QBENCHMARK { + r.clear(); + //r.reserve(string.size() + qstrlen(l1string.latin1()) + // + string.size() + string.size()); + r.reserve(1024); + r += string; + r += l1string; + r += string; + r += string; + } + COMPARE(r, r4); + } + +private: + const QLatin1Literal l1literal; + const QLatin1String l1string; + const QByteArray ba; + const QString string; + const std::string stdstring; + const QStringRef stringref; + const QLatin1Char achar; + const QString r2, r3, r4, r5; + + // short cuts for results + QString r; + std::string stdr; +}; + + +//void operator%(QString, int) {} + +int main(int argc, char *argv[]) +{ + //qDebug() << (QString("xx") * QLatin1String("y")).toString(); + //42 % 3; // Sanity test, should always work. + //QString("x") % 2; // Sanity test, should only compile when the + // operator%(QString, int) is visible. + + if (argc == 2 && (QLatin1String(argv[1]) == QLatin1String("--run-builder") + || QLatin1String(argv[1]) == QLatin1String("-b"))) { + tst_qstringbuilder test; + return test.run_builder(); + } + + if (argc == 2 && (QLatin1String(argv[1]) == QLatin1String("--run-traditional") + || QLatin1String(argv[1]) == QLatin1String("-t"))) { + tst_qstringbuilder test; + return test.run_traditional(); + } + + if (argc == 1) { + QCoreApplication app(argc, argv); + QStringList args = app.arguments(); + tst_qstringbuilder test; + return QTest::qExec(&test, argc, argv); + } + + qDebug() << "Usage: " << argv[0] << " [--run-builder|-r|--run-traditional|-t]"; +} + + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro new file mode 100644 index 0000000..79171b4 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qstringbuilder + +QMAKE_CXXFLAGS += -g +QMAKE_CFLAGS += -g + +QT -= gui + +CONFIG += release + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qstringlist/.gitignore b/tests/benchmarks/corelib/tools/qstringlist/.gitignore new file mode 100644 index 0000000..3e0cdc9 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstringlist/.gitignore @@ -0,0 +1 @@ +tst_qstringlist diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp new file mode 100644 index 0000000..3fac598 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include +#include +#include + +class tst_QStringList: public QObject +{ + Q_OBJECT + +private slots: + void join() const; + void join_data() const; + + void split() const; + void split_data() const; + + void split_std() const; + void split_std_data() const { return split_data(); } + + void split_stdw() const; + void split_stdw_data() const { return split_data(); } + + void split_ba() const; + void split_ba_data() const { return split_data(); } + +private: + static QStringList populateList(const int count, const QString &unit); + static QString populateString(const int count, const QString &unit); +}; + +QStringList tst_QStringList::populateList(const int count, const QString &unit) +{ + QStringList retval; + + for (int i = 0; i < count; ++i) + retval.append(unit); + + return retval; +} + +QString tst_QStringList::populateString(const int count, const QString &unit) +{ + QString retval; + + for (int i = 0; i < count; ++i) { + retval.append(unit); + retval.append(QLatin1Char(':')); + } + + return retval; +} + +void tst_QStringList::join() const +{ + QFETCH(QStringList, input); + QFETCH(QString, separator); + + QBENCHMARK { + input.join(separator); + } +} + +void tst_QStringList::join_data() const +{ + QTest::addColumn("input"); + QTest::addColumn("separator"); + + QTest::newRow("") + << populateList(100, QLatin1String("unit")) + << QString(); + + QTest::newRow("") + << populateList(1000, QLatin1String("unit")) + << QString(); + + QTest::newRow("") + << populateList(10000, QLatin1String("unit")) + << QString(); + + QTest::newRow("") + << populateList(100000, QLatin1String("unit")) + << QString(); +} + +void tst_QStringList::split() const +{ + QFETCH(QString, input); + const QChar splitChar = ':'; + + QBENCHMARK { + input.split(splitChar); + } +} + +void tst_QStringList::split_data() const +{ + QTest::addColumn("input"); + QString unit = QLatin1String("unit"); + QTest::newRow("") << populateString(10, unit); + QTest::newRow("") << populateString(100, unit); + QTest::newRow("") << populateString(1000, unit); + QTest::newRow("") << populateString(10000, unit); +} + +void tst_QStringList::split_std() const +{ + QFETCH(QString, input); + const char split_char = ':'; + std::string stdinput = input.toStdString(); + + QBENCHMARK { + std::istringstream split(stdinput); + std::vector token; + for (std::string each; + std::getline(split, each, split_char); + token.push_back(each)) + ; + } +} + +void tst_QStringList::split_stdw() const +{ + QFETCH(QString, input); + const wchar_t split_char = ':'; + std::wstring stdinput = input.toStdWString(); + + QBENCHMARK { + std::wistringstream split(stdinput); + std::vector token; + for (std::wstring each; + std::getline(split, each, split_char); + token.push_back(each)) + ; + } +} + +void tst_QStringList::split_ba() const +{ + QFETCH(QString, input); + const char splitChar = ':'; + QByteArray ba = input.toLatin1(); + + QBENCHMARK { + ba.split(splitChar); + } +} + +QTEST_MAIN(tst_QStringList) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro new file mode 100644 index 0000000..11cceb0 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TARGET = tst_qstringlist +QT -= gui +SOURCES += main.cpp + +symbian: LIBS += -llibpthread diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro new file mode 100644 index 0000000..12c23fc --- /dev/null +++ b/tests/benchmarks/corelib/tools/tools.pro @@ -0,0 +1,10 @@ +TEMPLATE = subdirs +SUBDIRS = \ + containers-associative \ + containers-sequential \ + qbytearray \ + qrect \ + qregexp \ + qstring \ + qstringbuilder \ + qstringlist diff --git a/tests/benchmarks/events/events.pro b/tests/benchmarks/events/events.pro deleted file mode 100644 index adf2317..0000000 --- a/tests/benchmarks/events/events.pro +++ /dev/null @@ -1,7 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_events -DEPENDPATH += . -INCLUDEPATH += . -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/events/main.cpp b/tests/benchmarks/events/main.cpp deleted file mode 100644 index 0dd2c18..0000000 --- a/tests/benchmarks/events/main.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include - -#include -#include - -class PingPong : public QObject -{ -public: - void setPeer(QObject *peer); - void resetCounter() {m_counter = 100;} - -protected: - bool event(QEvent *e); - -private: - QObject *m_peer; - int m_counter; -}; - -void PingPong::setPeer(QObject *peer) -{ - m_peer = peer; - m_counter = 100; -} - -bool PingPong::event(QEvent *) -{ - --m_counter; - if (m_counter > 0) { - QEvent *e = new QEvent(QEvent::User); - QCoreApplication::postEvent(m_peer, e); - } else { - QTestEventLoop::instance().exitLoop(); - } - return true; -} - -class EventTester : public QObject -{ -public: - int foo(int bar); - -protected: - bool event(QEvent *e); -}; - -bool EventTester::event(QEvent *e) -{ - if (e->type() == QEvent::User+1) - return foo(e->type()) != 0; - return false; -} - -int EventTester::foo(int bar) -{ - return bar + 1; -} - -class EventsBench : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - - void noEvent(); - void sendEvent_data(); - void sendEvent(); - void postEvent_data(); - void postEvent(); -}; - -void EventsBench::initTestCase() -{ -} - -void EventsBench::cleanupTestCase() -{ -} - -void EventsBench::noEvent() -{ - EventTester tst; - int val = 0; - QBENCHMARK { - val += tst.foo(1); - } -} - -void EventsBench::sendEvent_data() -{ - QTest::addColumn("filterEvents"); - QTest::newRow("no eventfilter") << false; - QTest::newRow("eventfilter") << true; -} - -void EventsBench::sendEvent() -{ - QFETCH(bool, filterEvents); - EventTester tst; - if (filterEvents) - tst.installEventFilter(this); - QEvent evt(QEvent::Type(QEvent::User+1)); - QBENCHMARK { - QCoreApplication::sendEvent(&tst, &evt); - } -} - -void EventsBench::postEvent_data() -{ - QTest::addColumn("filterEvents"); - // The first time an eventloop is executed, the case runs radically slower at least - // on some platforms, so test the "no eventfilter" case to get a comparable results - // with the "eventfilter" case. - QTest::newRow("first time, no eventfilter") << false; - QTest::newRow("no eventfilter") << false; - QTest::newRow("eventfilter") << true; -} - -void EventsBench::postEvent() -{ - QFETCH(bool, filterEvents); - PingPong ping; - PingPong pong; - ping.setPeer(&pong); - pong.setPeer(&ping); - if (filterEvents) { - ping.installEventFilter(this); - pong.installEventFilter(this); - } - - QBENCHMARK { - // In case multiple iterations are done, event needs to be created inside the QBENCHMARK, - // or it gets deleted once first iteration exits and can cause a crash. Similarly, - // ping and pong need their counters reset. - QEvent *e = new QEvent(QEvent::User); - ping.resetCounter(); - pong.resetCounter(); - QCoreApplication::postEvent(&ping, e); - QTestEventLoop::instance().enterLoop( 61 ); - } -} - -QTEST_MAIN(EventsBench) - -#include "main.moc" diff --git a/tests/benchmarks/gui/animation/animation.pro b/tests/benchmarks/gui/animation/animation.pro new file mode 100644 index 0000000..a4ba273 --- /dev/null +++ b/tests/benchmarks/gui/animation/animation.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = qanimation diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp new file mode 100644 index 0000000..f79cc5b --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "dummyanimation.h" +#include "dummyobject.h" + + +DummyAnimation::DummyAnimation(DummyObject *d) : m_dummy(d) +{ +} + +void DummyAnimation::updateCurrentValue(const QVariant &value) +{ + if (state() == Stopped) + return; + if (m_dummy) + m_dummy->setRect(value.toRect()); +} + +void DummyAnimation::updateState(State state) +{ + Q_UNUSED(state); +} diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h new file mode 100644 index 0000000..1df76be --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifndef _DUMMYANIMATION_H__ + +class DummyObject; + +class DummyAnimation : public QVariantAnimation +{ +public: + DummyAnimation(DummyObject *d); + + void updateCurrentValue(const QVariant &value); + void updateState(State state); + +private: + DummyObject *m_dummy; +}; + +#endif diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp new file mode 100644 index 0000000..2b66cda --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "dummyobject.h" + +DummyObject::DummyObject() +{ +} + +QRect DummyObject::rect() const +{ + return m_rect; +} + +void DummyObject::setRect(const QRect &r) +{ + m_rect = r; +} + +float DummyObject::opacity() const +{ + return m_opacity; +} + +void DummyObject::setOpacity(float o) +{ + m_opacity = o; +} diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.h b/tests/benchmarks/gui/animation/qanimation/dummyobject.h new file mode 100644 index 0000000..31614fd --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifndef _DUMMYOBJECT_H__ + +class DummyObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(QRect rect READ rect WRITE setRect) + Q_PROPERTY(float opacity READ opacity WRITE setOpacity) +public: + DummyObject(); + QRect rect() const; + void setRect(const QRect &r); + float opacity() const; + void setOpacity(float); + +private: + QRect m_rect; + float m_opacity; +}; + + +#endif diff --git a/tests/benchmarks/gui/animation/qanimation/main.cpp b/tests/benchmarks/gui/animation/qanimation/main.cpp new file mode 100644 index 0000000..8b9884e --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/main.cpp @@ -0,0 +1,191 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include "dummyobject.h" +#include "dummyanimation.h" +#include "rectanimation.h" + +#define ITERATION_COUNT 10e3 + +class tst_qanimation : public QObject +{ + Q_OBJECT +private slots: + void itemPropertyAnimation(); + void itemPropertyAnimation_data() { data();} + void dummyAnimation(); + void dummyAnimation_data() { data();} + void dummyPropertyAnimation(); + void dummyPropertyAnimation_data() { data();} + void rectAnimation(); + void rectAnimation_data() { data();} + + void floatAnimation_data() { data(); } + void floatAnimation(); + +private: + void data(); +}; + + +void tst_qanimation::data() +{ + QTest::addColumn("started"); + QTest::newRow("NotRunning") << false; + QTest::newRow("Running") << true; +} + +void tst_qanimation::itemPropertyAnimation() +{ + QFETCH(bool, started); + QGraphicsWidget item; + + //then the property animation + { + QPropertyAnimation anim(&item, "pos"); + anim.setDuration(ITERATION_COUNT); + anim.setStartValue(QPointF(0,0)); + anim.setEndValue(QPointF(ITERATION_COUNT,ITERATION_COUNT)); + if (started) + anim.start(); + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + anim.setCurrentTime(i); + } + } + } + +} + +void tst_qanimation::dummyAnimation() +{ + QFETCH(bool, started); + DummyObject dummy; + + //first the dummy animation + { + DummyAnimation anim(&dummy); + anim.setDuration(ITERATION_COUNT); + anim.setStartValue(QRect(0, 0, 0, 0)); + anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); + if (started) + anim.start(); + QBENCHMARK { + for(int i = 0; i < anim.duration(); ++i) { + anim.setCurrentTime(i); + } + } + } +} + +void tst_qanimation::dummyPropertyAnimation() +{ + QFETCH(bool, started); + DummyObject dummy; + + //then the property animation + { + QPropertyAnimation anim(&dummy, "rect"); + anim.setDuration(ITERATION_COUNT); + anim.setStartValue(QRect(0, 0, 0, 0)); + anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); + if (started) + anim.start(); + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + anim.setCurrentTime(i); + } + } + } +} + +void tst_qanimation::rectAnimation() +{ + //this is the simplest animation you can do + QFETCH(bool, started); + DummyObject dummy; + + //then the property animation + { + RectAnimation anim(&dummy); + anim.setDuration(ITERATION_COUNT); + anim.setStartValue(QRect(0, 0, 0, 0)); + anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); + if (started) + anim.start(); + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + anim.setCurrentTime(i); + } + } + } +} + +void tst_qanimation::floatAnimation() +{ + //this is the simplest animation you can do + QFETCH(bool, started); + DummyObject dummy; + + //then the property animation + { + QPropertyAnimation anim(&dummy, "opacity"); + anim.setDuration(ITERATION_COUNT); + anim.setStartValue(0.f); + anim.setEndValue(1.f); + if (started) + anim.start(); + QBENCHMARK { + for(int i = 0; i < ITERATION_COUNT; ++i) { + anim.setCurrentTime(i); + } + } + } +} + + + +QTEST_MAIN(tst_qanimation) + +#include "main.moc" diff --git a/tests/benchmarks/gui/animation/qanimation/qanimation.pro b/tests/benchmarks/gui/animation/qanimation/qanimation.pro new file mode 100644 index 0000000..55cd75e --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/qanimation.pro @@ -0,0 +1,18 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qanimation +DEPENDPATH += . +INCLUDEPATH += . + +CONFIG += release +#CONFIG += debug + + +SOURCES += main.cpp \ + dummyobject.cpp \ + dummyanimation.cpp \ + rectanimation.cpp + +HEADERS += dummyobject.h \ + dummyanimation.h \ + rectanimation.h diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp new file mode 100644 index 0000000..e6d7a7e --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "rectanimation.h" +#include "dummyobject.h" + +static inline int interpolateInteger(int from, int to, qreal progress) +{ + return from + (to - from) * progress; +} + + +RectAnimation::RectAnimation(DummyObject *obj) : m_object(obj), m_dura(250) +{ +} + +void RectAnimation::setEndValue(const QRect &rect) +{ + m_end = rect; +} + +void RectAnimation::setStartValue(const QRect &rect) +{ + m_start = rect; +} + +void RectAnimation::setDuration(int d) +{ + m_dura = d; +} + +int RectAnimation::duration() const +{ + return m_dura; +} + + +void RectAnimation::updateCurrentTime(int currentTime) +{ + qreal progress = m_easing.valueForProgress( currentTime / qreal(m_dura) ); + QRect now; + now.setCoords(interpolateInteger(m_start.left(), m_end.left(), progress), + interpolateInteger(m_start.top(), m_end.top(), progress), + interpolateInteger(m_start.right(), m_end.right(), progress), + interpolateInteger(m_start.bottom(), m_end.bottom(), progress)); + + bool changed = (now != m_current); + if (changed) + m_current = now; + + if (state() == Stopped) + return; + + if (m_object) + m_object->setRect(m_current); +} diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.h b/tests/benchmarks/gui/animation/qanimation/rectanimation.h new file mode 100644 index 0000000..42b9376 --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifndef _RECTANIMATION_H__ + +class DummyObject; + +//this class is even simpler than the dummy +//and uses no QVariant at all +class RectAnimation : public QAbstractAnimation +{ +public: + RectAnimation(DummyObject *obj); + + void setEndValue(const QRect &rect); + void setStartValue(const QRect &rect); + + void setDuration(int d); + int duration() const; + + virtual void updateCurrentTime(int currentTime); + +private: + DummyObject *m_object; + QEasingCurve m_easing; + QRect m_start, m_end, m_current; + int m_dura; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/graphicsview.pro b/tests/benchmarks/gui/graphicsview/graphicsview.pro new file mode 100644 index 0000000..93c00d2 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/graphicsview.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qgraphicsanchorlayout \ + qgraphicsitem \ + qgraphicsscene \ + qgraphicsview \ + qgraphicswidget diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro new file mode 100644 index 0000000..0d563b9 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicsanchorlayout + +SOURCES += tst_qgraphicsanchorlayout.cpp + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp new file mode 100644 index 0000000..faacec4 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -0,0 +1,433 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +class tst_QGraphicsAnchorLayout : public QObject +{ + Q_OBJECT +public: + tst_QGraphicsAnchorLayout() {} + ~tst_QGraphicsAnchorLayout() {} + +private slots: + void s60_hard_complex_data(); + void s60_hard_complex(); + void linearVsAnchorSizeHints_data(); + void linearVsAnchorSizeHints(); + void linearVsAnchorSetGeometry_data(); + void linearVsAnchorSetGeometry(); + void linearVsAnchorNested_data(); + void linearVsAnchorNested(); +}; + + +class RectWidget : public QGraphicsWidget +{ +public: + RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){} + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) + { + Q_UNUSED(option); + Q_UNUSED(widget); + painter->drawRoundRect(rect()); + painter->drawLine(rect().topLeft(), rect().bottomRight()); + painter->drawLine(rect().bottomLeft(), rect().topRight()); + } +}; + +static QGraphicsWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 100.0), + const QSizeF &preferred = QSize(150.0, 100.0), + const QSizeF &maximum = QSizeF(200.0, 100.0), + const QString &name = QString()) +{ + QGraphicsWidget *w = new RectWidget; + w->setMinimumSize(minimum); + w->setPreferredSize(preferred); + w->setMaximumSize(maximum); + w->setData(0, name); + return w; +} + +static void setAnchor(QGraphicsAnchorLayout *l, + QGraphicsLayoutItem *firstItem, + Qt::AnchorPoint firstEdge, + QGraphicsLayoutItem *secondItem, + Qt::AnchorPoint secondEdge, + qreal spacing) +{ + QGraphicsAnchor *anchor = l->addAnchor(firstItem, firstEdge, secondItem, secondEdge); + anchor->setSpacing(spacing); +} + +void tst_QGraphicsAnchorLayout::s60_hard_complex_data() +{ + QTest::addColumn("whichSizeHint"); + QTest::newRow("minimumSizeHint") + << int(Qt::MinimumSize); + QTest::newRow("preferredSizeHint") + << int(Qt::PreferredSize); + QTest::newRow("maximumSizeHint") + << int(Qt::MaximumSize); + // Add it as a reference to see how much overhead the body of effectiveSizeHint takes. + QTest::newRow("noSizeHint") + << -1; +} + +void tst_QGraphicsAnchorLayout::s60_hard_complex() +{ + QFETCH(int, whichSizeHint); + + // Test for "hard" complex case, taken from wiki + // https://cwiki.nokia.com/S60QTUI/AnchorLayoutComplexCases + QSizeF min(0, 10); + QSizeF pref(50, 10); + QSizeF max(100, 10); + + QGraphicsWidget *a = createItem(min, pref, max, "a"); + QGraphicsWidget *b = createItem(min, pref, max, "b"); + QGraphicsWidget *c = createItem(min, pref, max, "c"); + QGraphicsWidget *d = createItem(min, pref, max, "d"); + QGraphicsWidget *e = createItem(min, pref, max, "e"); + QGraphicsWidget *f = createItem(min, pref, max, "f"); + QGraphicsWidget *g = createItem(min, pref, max, "g"); + + QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; + l->setContentsMargins(0, 0, 0, 0); + + // + setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 10); + setAnchor(l, a, Qt::AnchorRight, b, Qt::AnchorLeft, 10); + setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft, 10); + setAnchor(l, c, Qt::AnchorRight, d, Qt::AnchorLeft, 10); + setAnchor(l, d, Qt::AnchorRight, l, Qt::AnchorRight, 10); + + // + setAnchor(l, b, Qt::AnchorLeft, e, Qt::AnchorLeft, 10); + setAnchor(l, e, Qt::AnchorRight, d, Qt::AnchorLeft, 10); + + // + setAnchor(l, a, Qt::AnchorHorizontalCenter, g, Qt::AnchorLeft, 10); + setAnchor(l, g, Qt::AnchorRight, f, Qt::AnchorHorizontalCenter, 10); + setAnchor(l, c, Qt::AnchorLeft, f, Qt::AnchorLeft, 10); + setAnchor(l, f, Qt::AnchorRight, d, Qt::AnchorRight, 10); + + // + setAnchor(l, l, Qt::AnchorTop, e, Qt::AnchorTop, 0); + setAnchor(l, e, Qt::AnchorBottom, a, Qt::AnchorTop, 0); + setAnchor(l, e, Qt::AnchorBottom, b, Qt::AnchorTop, 0); + setAnchor(l, e, Qt::AnchorBottom, c, Qt::AnchorTop, 0); + setAnchor(l, e, Qt::AnchorBottom, d, Qt::AnchorTop, 0); + setAnchor(l, a, Qt::AnchorBottom, f, Qt::AnchorTop, 0); + setAnchor(l, a, Qt::AnchorBottom, b, Qt::AnchorBottom, 0); + setAnchor(l, a, Qt::AnchorBottom, c, Qt::AnchorBottom, 0); + setAnchor(l, a, Qt::AnchorBottom, d, Qt::AnchorBottom, 0); + setAnchor(l, f, Qt::AnchorBottom, g, Qt::AnchorTop, 0); + setAnchor(l, g, Qt::AnchorBottom, l, Qt::AnchorBottom, 0); + + // It won't query the size hint if it already has a size set. + // If only one of the sizes is unset it will query sizeHint only of for that hint type. + l->setMinimumSize(60,40); + l->setPreferredSize(220,40); + l->setMaximumSize(240,40); + + switch (whichSizeHint) { + case Qt::MinimumSize: + l->setMinimumSize(-1, -1); + break; + case Qt::PreferredSize: + l->setPreferredSize(-1, -1); + break; + case Qt::MaximumSize: + l->setMaximumSize(-1, -1); + break; + default: + break; + } + + QSizeF sizeHint; + // warm up instruction cache + l->invalidate(); + sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); + // ...then measure... + QBENCHMARK { + l->invalidate(); + sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); + } +} + +static QGraphicsLayout* createLayouts(int whichLayout) +{ + QSizeF min(0, 10); + QSizeF pref(50, 10); + QSizeF max(100, 10); + + QGraphicsWidget *a = createItem(min, pref, max, "a"); + QGraphicsWidget *b = createItem(min, pref, max, "b"); + QGraphicsWidget *c = createItem(min, pref, max, "c"); + QGraphicsWidget *d = createItem(min, pref, max, "d"); + + QGraphicsLayout *l; + if (whichLayout == 0) { + l = new QGraphicsLinearLayout; + QGraphicsLinearLayout *linear = static_cast(l); + linear->setContentsMargins(0, 0, 0, 0); + + linear->addItem(a); + linear->addItem(b); + linear->addItem(c); + linear->addItem(d); + } else { + l = new QGraphicsAnchorLayout; + QGraphicsAnchorLayout *anchor = static_cast(l); + anchor->setContentsMargins(0, 0, 0, 0); + + // Horizontal + setAnchor(anchor, anchor, Qt::AnchorLeft, a, Qt::AnchorLeft, 0); + setAnchor(anchor, a, Qt::AnchorRight, b, Qt::AnchorLeft, 0); + setAnchor(anchor, b, Qt::AnchorRight, c, Qt::AnchorLeft, 0); + setAnchor(anchor, c, Qt::AnchorRight, d, Qt::AnchorLeft, 0); + setAnchor(anchor, d, Qt::AnchorRight, anchor, Qt::AnchorRight, 0); + + // Vertical + anchor->addAnchors(anchor, a, Qt::Vertical); + anchor->addAnchors(anchor, b, Qt::Vertical); + anchor->addAnchors(anchor, c, Qt::Vertical); + anchor->addAnchors(anchor, d, Qt::Vertical); + } + + return l; +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorSizeHints_data() +{ + QTest::addColumn("whichLayout"); + QTest::addColumn("whichSizeHint"); + + QTest::newRow("QGraphicsLinearLayout::minimum") + << 0 << int(Qt::MinimumSize); + QTest::newRow("QGraphicsLinearLayout::preferred") + << 0 << int(Qt::PreferredSize); + QTest::newRow("QGraphicsLinearLayout::maximum") + << 0 << int(Qt::MaximumSize); + QTest::newRow("QGraphicsLinearLayout::noSizeHint") + << 0 << -1; + + QTest::newRow("QGraphicsAnchorLayout::minimum") + << 1 << int(Qt::MinimumSize); + QTest::newRow("QGraphicsAnchorLayout::preferred") + << 1 << int(Qt::PreferredSize); + QTest::newRow("QGraphicsAnchorLayout::maximum") + << 1 << int(Qt::MaximumSize); + QTest::newRow("QGraphicsAnchorLayout::noSizeHint") + << 1 << -1; +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorSizeHints() +{ + QFETCH(int, whichSizeHint); + QFETCH(int, whichLayout); + + QGraphicsLayout *l = createLayouts(whichLayout); + + QSizeF sizeHint; + // warm up instruction cache + l->invalidate(); + sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); + // ...then measure... + + QBENCHMARK { + l->invalidate(); + sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); + } +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorSetGeometry_data() +{ + QTest::addColumn("whichLayout"); + + QTest::newRow("QGraphicsLinearLayout") + << 0; + QTest::newRow("QGraphicsAnchorLayout") + << 1; +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorSetGeometry() +{ + QFETCH(int, whichLayout); + + QGraphicsLayout *l = createLayouts(whichLayout); + + QRectF sizeHint; + qreal maxWidth; + qreal increment; + // warm up instruction cache + l->invalidate(); + sizeHint.setSize(l->effectiveSizeHint(Qt::MinimumSize)); + maxWidth = l->effectiveSizeHint(Qt::MaximumSize).width(); + increment = (maxWidth - sizeHint.width()) / 100; + l->setGeometry(sizeHint); + // ...then measure... + + QBENCHMARK { + l->invalidate(); + for (qreal width = sizeHint.width(); width <= maxWidth; width += increment) { + sizeHint.setWidth(width); + l->setGeometry(sizeHint); + } + } +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorNested_data() +{ + QTest::addColumn("whichLayout"); + QTest::newRow("LinearLayout") + << 0; + QTest::newRow("AnchorLayout setup with null-anchors knot") + << 1; + QTest::newRow("AnchorLayout setup easy to simplificate") + << 2; +} + +void tst_QGraphicsAnchorLayout::linearVsAnchorNested() +{ + QFETCH(int, whichLayout); + + QSizeF min(10, 10); + QSizeF pref(80, 80); + QSizeF max(150, 150); + + QGraphicsWidget *a = createItem(min, pref, max, "a"); + QGraphicsWidget *b = createItem(min, pref, max, "b"); + QGraphicsWidget *c = createItem(min, pref, max, "c"); + QGraphicsWidget *d = createItem(min, pref, max, "d"); + + QGraphicsLayout *layout; + + if (whichLayout == 0) { + QGraphicsLinearLayout *linear1 = new QGraphicsLinearLayout; + QGraphicsLinearLayout *linear2 = new QGraphicsLinearLayout(Qt::Vertical); + QGraphicsLinearLayout *linear3 = new QGraphicsLinearLayout; + + linear1->addItem(a); + linear1->addItem(linear2); + linear2->addItem(b); + linear2->addItem(linear3); + linear3->addItem(c); + linear3->addItem(d); + + layout = linear1; + } else if (whichLayout == 1) { + QGraphicsAnchorLayout *anchor = new QGraphicsAnchorLayout; + + // A + anchor->addCornerAnchors(a, Qt::TopLeftCorner, anchor, Qt::TopLeftCorner); + anchor->addCornerAnchors(a, Qt::TopRightCorner, b, Qt::TopLeftCorner); + anchor->addCornerAnchors(a, Qt::BottomLeftCorner, anchor, Qt::BottomLeftCorner); + anchor->addCornerAnchors(a, Qt::BottomRightCorner, c, Qt::BottomLeftCorner); + + // B + anchor->addCornerAnchors(b, Qt::TopRightCorner, anchor, Qt::TopRightCorner); + anchor->addCornerAnchors(b, Qt::BottomLeftCorner, c, Qt::TopLeftCorner); + anchor->addCornerAnchors(b, Qt::BottomRightCorner, d, Qt::TopRightCorner); + + // C + anchor->addCornerAnchors(c, Qt::TopRightCorner, d, Qt::TopLeftCorner); + anchor->addCornerAnchors(c, Qt::BottomRightCorner, d, Qt::BottomLeftCorner); + + // D + anchor->addCornerAnchors(d, Qt::BottomRightCorner, anchor, Qt::BottomRightCorner); + + layout = anchor; + } else { + QGraphicsAnchorLayout *anchor = new QGraphicsAnchorLayout; + + // A + anchor->addAnchor(a, Qt::AnchorLeft, anchor, Qt::AnchorLeft); + anchor->addAnchors(a, anchor, Qt::Vertical); + anchor->addAnchor(a, Qt::AnchorRight, b, Qt::AnchorLeft); + anchor->addAnchor(a, Qt::AnchorRight, c, Qt::AnchorLeft); + + // B + anchor->addAnchor(b, Qt::AnchorTop, anchor, Qt::AnchorTop); + anchor->addAnchor(b, Qt::AnchorRight, anchor, Qt::AnchorRight); + anchor->addAnchor(b, Qt::AnchorBottom, c, Qt::AnchorTop); + anchor->addAnchor(b, Qt::AnchorBottom, d, Qt::AnchorTop); + + // C + anchor->addAnchor(c, Qt::AnchorRight, d, Qt::AnchorLeft); + anchor->addAnchor(c, Qt::AnchorBottom, anchor, Qt::AnchorBottom); + + // D + anchor->addAnchor(d, Qt::AnchorRight, anchor, Qt::AnchorRight); + anchor->addAnchor(d, Qt::AnchorBottom, anchor, Qt::AnchorBottom); + + layout = anchor; + } + + QSizeF sizeHint; + // warm up instruction cache + layout->invalidate(); + sizeHint = layout->effectiveSizeHint(Qt::PreferredSize); + + // ...then measure... + QBENCHMARK { + // To ensure that all sizeHints caches are invalidated in + // the LinearLayout setup, we must call updateGeometry on the + // children. If we didn't, only the top level layout would be + // re-calculated. + static_cast(a)->updateGeometry(); + static_cast(b)->updateGeometry(); + static_cast(c)->updateGeometry(); + static_cast(d)->updateGeometry(); + layout->invalidate(); + sizeHint = layout->effectiveSizeHint(Qt::PreferredSize); + } +} + +QTEST_MAIN(tst_QGraphicsAnchorLayout) + +#include "tst_qgraphicsanchorlayout.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro new file mode 100644 index 0000000..726bb96 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicsitem + +SOURCES += tst_qgraphicsitem.cpp diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp new file mode 100644 index 0000000..ac51072 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -0,0 +1,243 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +//TESTED_FILES= + +class tst_QGraphicsItem : public QObject +{ + Q_OBJECT + +public: + tst_QGraphicsItem(); + virtual ~tst_QGraphicsItem(); + +public slots: + void init(); + void cleanup(); + +private slots: + void setParentItem(); + void setParentItem_deep(); + void setParentItem_deep_reversed(); + void deleteItemWithManyChildren(); + void setPos_data(); + void setPos(); + void setTransform_data(); + void setTransform(); + void rotate(); + void scale(); + void shear(); + void translate(); + void setRotation(); +}; + +tst_QGraphicsItem::tst_QGraphicsItem() +{ +} + +tst_QGraphicsItem::~tst_QGraphicsItem() +{ +} + +void tst_QGraphicsItem::init() +{ +} + +void tst_QGraphicsItem::cleanup() +{ +} + +void tst_QGraphicsItem::setParentItem() +{ + QBENCHMARK { + QGraphicsRectItem rect; + QGraphicsRectItem *childRect = new QGraphicsRectItem; + childRect->setParentItem(&rect); + } +} + +void tst_QGraphicsItem::setParentItem_deep() +{ + QBENCHMARK { + QGraphicsRectItem rect; + QGraphicsRectItem *lastRect = ▭ + for (int i = 0; i < 10; ++i) { + QGraphicsRectItem *childRect = new QGraphicsRectItem; + childRect->setParentItem(lastRect); + lastRect = childRect; + } + QGraphicsItem *first = rect.children().first(); + first->setParentItem(0); + } +} + +void tst_QGraphicsItem::setParentItem_deep_reversed() +{ + QBENCHMARK { + QGraphicsRectItem *lastRect = new QGraphicsRectItem; + for (int i = 0; i < 100; ++i) { + QGraphicsRectItem *parentRect = new QGraphicsRectItem; + lastRect->setParentItem(parentRect); + lastRect = parentRect; + } + delete lastRect; + } +} + +void tst_QGraphicsItem::deleteItemWithManyChildren() +{ + QBENCHMARK { + QGraphicsRectItem *rect = new QGraphicsRectItem; + for (int i = 0; i < 1000; ++i) + new QGraphicsRectItem(rect); + delete rect; + } +} + +void tst_QGraphicsItem::setPos_data() +{ + QTest::addColumn("pos"); + + QTest::newRow("0, 0") << QPointF(0, 0); + QTest::newRow("10, 10") << QPointF(10, 10); + QTest::newRow("-10, -10") << QPointF(-10, -10); +} + +void tst_QGraphicsItem::setPos() +{ + QFETCH(QPointF, pos); + + QGraphicsScene scene; + QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + rect->setPos(10, 10); + rect->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::setTransform_data() +{ + QTest::addColumn("transform"); + + QTest::newRow("id") << QTransform(); + QTest::newRow("rotate 45z") << QTransform().rotate(45); + QTest::newRow("scale 2x2") << QTransform().scale(2, 2); + QTest::newRow("translate 100, 100") << QTransform().translate(100, 100); + QTest::newRow("rotate 45x 45y 45z") << QTransform().rotate(45, Qt::XAxis) + .rotate(45, Qt::YAxis).rotate(45, Qt::ZAxis); +} + +void tst_QGraphicsItem::setTransform() +{ + QFETCH(QTransform, transform); + + QGraphicsScene scene; + QGraphicsRectItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->setTransform(transform); + item->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::rotate() +{ + QGraphicsScene scene; + QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->rotate(45); + item->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::scale() +{ + QGraphicsScene scene; + QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->scale(2, 2); + item->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::shear() +{ + QGraphicsScene scene; + QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->shear(1.5, 1.5); + item->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::translate() +{ + QGraphicsScene scene; + QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->translate(100, 100); + item->transform(); // prevent lazy optimizing + } +} + +void tst_QGraphicsItem::setRotation() +{ + QGraphicsScene scene; + QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); + + QBENCHMARK { + item->setRotation(45); + item->transform(); // prevent lazy optimizing + } +} + +QTEST_MAIN(tst_QGraphicsItem) +#include "tst_qgraphicsitem.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro new file mode 100644 index 0000000..b460e2a --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicsscene + +SOURCES += tst_qgraphicsscene.cpp + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp new file mode 100644 index 0000000..5bd07f9 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -0,0 +1,248 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +//TESTED_FILES= + +class tst_QGraphicsScene : public QObject +{ + Q_OBJECT + +public: + tst_QGraphicsScene(); + virtual ~tst_QGraphicsScene(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void addItem_data(); + void addItem(); + void itemAt_data(); + void itemAt(); + void initialShow(); +}; + +tst_QGraphicsScene::tst_QGraphicsScene() +{ +} + +tst_QGraphicsScene::~tst_QGraphicsScene() +{ +} + +void tst_QGraphicsScene::init() +{ +} + +void tst_QGraphicsScene::cleanup() +{ +} + +void tst_QGraphicsScene::construct() +{ + QBENCHMARK { + QGraphicsScene scene; + } +} + +void tst_QGraphicsScene::addItem_data() +{ + QTest::addColumn("indexMethod"); + QTest::addColumn("sceneRect"); + QTest::addColumn("numItems_X"); + QTest::addColumn("numItems_Y"); + QTest::addColumn("itemType"); + QTest::addColumn("itemRect"); + + QTest::newRow("null") << 0 << QRectF() << 0 << 0 << 0 << QRectF(); + QTest::newRow("0 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,0)") << 0 << QRectF() << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("0 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); + QTest::newRow("1 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); +} + +void tst_QGraphicsScene::addItem() +{ + QFETCH(int, indexMethod); + QFETCH(QRectF, sceneRect); + QFETCH(int, numItems_X); + QFETCH(int, numItems_Y); + QFETCH(int, itemType); + QFETCH(QRectF, itemRect); + + QGraphicsScene scene; + scene.setItemIndexMethod(indexMethod ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); + if (!sceneRect.isNull()) + scene.setSceneRect(sceneRect); + + QBENCHMARK { + QGraphicsItem *item = 0; + for (int y = 0; y < numItems_Y; ++y) { + for (int x = 0; x < numItems_X; ++x) { + switch (itemType) { + case QGraphicsRectItem::Type: + item = new QGraphicsRectItem(itemRect); + break; + case QGraphicsEllipseItem::Type: + default: + item = new QGraphicsEllipseItem(itemRect); + break; + } + item->setPos(x * itemRect.width(), y * itemRect.height()); + scene.addItem(item); + } + } + scene.itemAt(0, 0); + } + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); +} + +void tst_QGraphicsScene::itemAt_data() +{ + QTest::addColumn("bspTreeDepth"); + QTest::addColumn("sceneRect"); + QTest::addColumn("numItems_X"); + QTest::addColumn("numItems_Y"); + QTest::addColumn("itemRect"); + + QTest::newRow("null") << 0 << QRectF() << 0 << 0 << QRectF(); + QTest::newRow("NoIndex 10x10") << -1 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); + QTest::newRow("NoIndex 25x25") << -1 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); + QTest::newRow("NoIndex 100x100") << -1 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); + QTest::newRow("NoIndex 250x250") << -1 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=auto 10x10") << 0 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=auto 25x25") << 0 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=auto 100x100") << 0 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=auto 250x250") << 0 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=16 10x10") << 16 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=16 25x25") << 16 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=16 100x100") << 16 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); + QTest::newRow("BspTreeIndex depth=16 250x250") << 16 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); +} + +void tst_QGraphicsScene::itemAt() +{ + QFETCH(int, bspTreeDepth); + QFETCH(QRectF, sceneRect); + QFETCH(int, numItems_X); + QFETCH(int, numItems_Y); + QFETCH(QRectF, itemRect); + + QGraphicsScene scene; + scene.setItemIndexMethod(bspTreeDepth >= 0 ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); + if (bspTreeDepth > 0) + scene.setBspTreeDepth(bspTreeDepth); + if (!sceneRect.isNull()) + scene.setSceneRect(sceneRect); + + QGraphicsItem *item = 0; + for (int y = 0; y < numItems_Y; ++y) { + for (int x = 0; x < numItems_X; ++x) { + QGraphicsRectItem *item = new QGraphicsRectItem(itemRect); + item->setPos((x - numItems_X/2) * itemRect.width(), (y - numItems_Y/2) * itemRect.height()); + scene.addItem(item); + } + } + + scene.itemAt(0, 0); // triggers indexing + + QBENCHMARK { + scene.itemAt(0, 0); + } + + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); +} + +void tst_QGraphicsScene::initialShow() +{ + QGraphicsScene scene; + + QBENCHMARK { + for (int y = 0; y < 30000; ++y) { + QGraphicsRectItem *item = new QGraphicsRectItem(0, 0, 50, 50); + item->setPos((y/2) * item->rect().width(), (y/2) * item->rect().height()); + scene.addItem(item); + } + scene.itemAt(0, 0); // triggers indexing + //This call polish the items so we bench their processing too. + qApp->processEvents(); + } +} + +QTEST_MAIN(tst_QGraphicsScene) +#include "tst_qgraphicsscene.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp new file mode 100644 index 0000000..77b86c1 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp @@ -0,0 +1,176 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "chip.h" + +#include + +Chip::Chip(const QColor &color, int x, int y) +{ + this->x = x; + this->y = y; + this->color = color; + setZValue((x + y) % 2); + + setFlags(ItemIsSelectable | ItemIsMovable); + setAcceptsHoverEvents(true); +} + +QRectF Chip::boundingRect() const +{ + return QRectF(0, 0, 110, 70); +} + +QPainterPath Chip::shape() const +{ + QPainterPath path; + path.addRect(14, 14, 82, 42); + return path; +} + +void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(widget); + + QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color; + if (option->state & QStyle::State_MouseOver) + fillColor = fillColor.light(125); + + if (option->levelOfDetail < 0.2) { + if (option->levelOfDetail < 0.125) { + painter->fillRect(QRectF(0, 0, 110, 70), fillColor); + return; + } + + painter->setPen(QPen(Qt::black, 0)); + painter->setBrush(fillColor); + painter->drawRect(13, 13, 97, 57); + return; + } + + QPen oldPen = painter->pen(); + QPen pen = oldPen; + int width = 0; + if (option->state & QStyle::State_Selected) + width += 2; + + pen.setWidth(width); + painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100))); + + painter->drawRect(QRect(14, 14, 79, 39)); + if (option->levelOfDetail >= 1) { + painter->setPen(QPen(Qt::gray, 1)); + painter->drawLine(15, 54, 94, 54); + painter->drawLine(94, 53, 94, 15); + painter->setPen(QPen(Qt::black, 0)); + } + + // Draw text + if (option->levelOfDetail >= 2) { + QFont font("Times", 10); + font.setStyleStrategy(QFont::ForceOutline); + painter->setFont(font); + painter->save(); + painter->scale(0.1, 0.1); + painter->drawText(170, 180, QString("Model: VSC-2000 (Very Small Chip) at %1x%2").arg(x).arg(y)); + painter->drawText(170, 200, QString("Serial number: DLWR-WEER-123L-ZZ33-SDSJ")); + painter->drawText(170, 220, QString("Manufacturer: Chip Manufacturer")); + painter->restore(); + } + + // Draw lines + QVarLengthArray lines; + if (option->levelOfDetail >= 0.5) { + for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { + lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5)); + lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62)); + } + for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { + lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5)); + lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5)); + } + } + if (option->levelOfDetail >= 0.4) { + const QLineF lineData[] = { + QLineF(25, 35, 35, 35), + QLineF(35, 30, 35, 40), + QLineF(35, 30, 45, 35), + QLineF(35, 40, 45, 35), + QLineF(45, 30, 45, 40), + QLineF(45, 35, 55, 35) + }; + lines.append(lineData, 6); + } + painter->drawLines(lines.data(), lines.size()); + + // Draw red ink + if (stuff.size() > 1) { + painter->setPen(QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter->setBrush(Qt::NoBrush); + QPainterPath path; + path.moveTo(stuff.first()); + for (int i = 1; i < stuff.size(); ++i) + path.lineTo(stuff.at(i)); + painter->drawPath(path); + } +} + +void Chip::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsItem::mousePressEvent(event); + update(); +} + +void Chip::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->modifiers() & Qt::ShiftModifier) { + stuff << event->pos(); + update(); + return; + } + QGraphicsItem::mouseMoveEvent(event); +} + +void Chip::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsItem::mouseReleaseEvent(event); + update(); +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug new file mode 100644 index 0000000..8fe1e5b Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h new file mode 100644 index 0000000..9db23f9 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef CHIP_H +#define CHIP_H + +#include +#include + +class Chip : public QGraphicsItem +{ +public: + Chip(const QColor &color, int x, int y); + + QRectF boundingRect() const; + QPainterPath shape() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + +private: + int x, y; + QColor color; + QList stuff; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro new file mode 100644 index 0000000..53fa23b --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro @@ -0,0 +1,19 @@ +RESOURCES += images.qrc + +HEADERS += mainwindow.h view.h chip.h +SOURCES += main.cpp +SOURCES += mainwindow.cpp view.cpp chip.cpp + +contains(QT_CONFIG, opengl):QT += opengl + +build_all:!build_pass { + CONFIG -= build_all + CONFIG += release +} + +# install +target.path = $$[QT_INSTALL_DEMOS]/chip +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.pro *.html *.doc images +sources.path = $$[QT_INSTALL_DEMOS]/chip +INSTALLS += target sources + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png new file mode 100644 index 0000000..ba7c02d Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc new file mode 100644 index 0000000..c7cdf0c --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc @@ -0,0 +1,10 @@ + + + qt4logo.png + zoomin.png + zoomout.png + rotateleft.png + rotateright.png + fileprint.png + + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp new file mode 100644 index 0000000..ea2f94a --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mainwindow.h" + +#include + +int main(int argc, char **argv) +{ + Q_INIT_RESOURCE(images); + + QApplication app(argc, argv); + app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); + + MainWindow window; + window.show(); + + return app.exec(); +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp new file mode 100644 index 0000000..452b42c --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mainwindow.h" +#include "view.h" +#include "chip.h" + +#include + +MainWindow::MainWindow(QWidget *parent) + : QWidget(parent) +{ + populateScene(); + + View *view = new View("Top left view"); + view->view()->setScene(scene); + QHBoxLayout *layout = new QHBoxLayout; + layout->addWidget(view); + setLayout(layout); + + setWindowTitle(tr("Chip Demo")); +} + +void MainWindow::populateScene() +{ + scene = new QGraphicsScene; + + QImage image(":/qt4logo.png"); + + // Populate scene + int xx = 0; + int nitems = 0; + for (int i = -11000; i < 11000; i += 110) { + ++xx; + int yy = 0; + for (int j = -7000; j < 7000; j += 70) { + ++yy; + qreal x = (i + 11000) / 22000.0; + qreal y = (j + 7000) / 14000.0; + + QColor color(image.pixel(int(image.width() * x), int(image.height() * y))); + QGraphicsItem *item = new Chip(color, xx, yy); + item->setPos(QPointF(i, j)); + scene->addItem(item); + + ++nitems; + } + } +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h new file mode 100644 index 0000000..558bbef --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +QT_FORWARD_DECLARE_CLASS(QGraphicsScene) +QT_FORWARD_DECLARE_CLASS(QGraphicsView) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QSplitter) + +class MainWindow : public QWidget +{ + Q_OBJECT +public: + MainWindow(QWidget *parent = 0); + +private: + void setupMatrix(); + void populateScene(); + + QGraphicsScene *scene; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png new file mode 100644 index 0000000..157e86e Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png new file mode 100644 index 0000000..8cfa931 Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png new file mode 100644 index 0000000..ec5e866 Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp new file mode 100644 index 0000000..1028f42 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "view.h" + +#include +#include "valgrind/callgrind.h" +#ifndef QT_NO_OPENGL +#include +#endif + +#include + +class CountView : public QGraphicsView +{ +protected: + void paintEvent(QPaintEvent *event) + { + static int n = 0; + if (n) + CALLGRIND_START_INSTRUMENTATION + QGraphicsView::paintEvent(event); + if (n) + CALLGRIND_STOP_INSTRUMENTATION + if (++n == 500) + qApp->quit(); + } +}; + +View::View(const QString &name, QWidget *parent) + : QFrame(parent) +{ + setFrameStyle(Sunken | StyledPanel); + graphicsView = new CountView; + graphicsView->setRenderHint(QPainter::Antialiasing, false); + graphicsView->setDragMode(QGraphicsView::RubberBandDrag); + graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate); + + int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize); + QSize iconSize(size, size); + + QToolButton *zoomInIcon = new QToolButton; + zoomInIcon->setAutoRepeat(true); + zoomInIcon->setAutoRepeatInterval(33); + zoomInIcon->setAutoRepeatDelay(0); + zoomInIcon->setIcon(QPixmap(":/zoomin.png")); + zoomInIcon->setIconSize(iconSize); + QToolButton *zoomOutIcon = new QToolButton; + zoomOutIcon->setAutoRepeat(true); + zoomOutIcon->setAutoRepeatInterval(33); + zoomOutIcon->setAutoRepeatDelay(0); + zoomOutIcon->setIcon(QPixmap(":/zoomout.png")); + zoomOutIcon->setIconSize(iconSize); + zoomSlider = new QSlider; + zoomSlider->setMinimum(0); + zoomSlider->setMaximum(500); + zoomSlider->setValue(250); + zoomSlider->setTickPosition(QSlider::TicksRight); + + // Zoom slider layout + QVBoxLayout *zoomSliderLayout = new QVBoxLayout; + zoomSliderLayout->addWidget(zoomInIcon); + zoomSliderLayout->addWidget(zoomSlider); + zoomSliderLayout->addWidget(zoomOutIcon); + + QToolButton *rotateLeftIcon = new QToolButton; + rotateLeftIcon->setIcon(QPixmap(":/rotateleft.png")); + rotateLeftIcon->setIconSize(iconSize); + QToolButton *rotateRightIcon = new QToolButton; + rotateRightIcon->setIcon(QPixmap(":/rotateright.png")); + rotateRightIcon->setIconSize(iconSize); + rotateSlider = new QSlider; + rotateSlider->setOrientation(Qt::Horizontal); + rotateSlider->setMinimum(-360); + rotateSlider->setMaximum(360); + rotateSlider->setValue(0); + rotateSlider->setTickPosition(QSlider::TicksBelow); + + // Rotate slider layout + QHBoxLayout *rotateSliderLayout = new QHBoxLayout; + rotateSliderLayout->addWidget(rotateLeftIcon); + rotateSliderLayout->addWidget(rotateSlider); + rotateSliderLayout->addWidget(rotateRightIcon); + + resetButton = new QToolButton; + resetButton->setText(tr("0")); + resetButton->setEnabled(false); + + // Label layout + QHBoxLayout *labelLayout = new QHBoxLayout; + label = new QLabel(name); + antialiasButton = new QToolButton; + antialiasButton->setText(tr("Antialiasing")); + antialiasButton->setCheckable(true); + antialiasButton->setChecked(false); + openGlButton = new QToolButton; + openGlButton->setText(tr("OpenGL")); + openGlButton->setCheckable(true); +#ifndef QT_NO_OPENGL + openGlButton->setEnabled(QGLFormat::hasOpenGL()); +#else + openGlButton->setEnabled(false); +#endif + printButton = new QToolButton; + printButton->setIcon(QIcon(QPixmap(":/fileprint.png"))); + + labelLayout->addWidget(label); + labelLayout->addStretch(); + labelLayout->addWidget(antialiasButton); + labelLayout->addWidget(openGlButton); + labelLayout->addWidget(printButton); + + QGridLayout *topLayout = new QGridLayout; + topLayout->addLayout(labelLayout, 0, 0); + topLayout->addWidget(graphicsView, 1, 0); + topLayout->addLayout(zoomSliderLayout, 1, 1); + topLayout->addLayout(rotateSliderLayout, 2, 0); + topLayout->addWidget(resetButton, 2, 1); + setLayout(topLayout); + + connect(resetButton, SIGNAL(clicked()), this, SLOT(resetView())); + connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix())); + connect(rotateSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix())); + connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); + connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); + connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing())); + connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL())); + connect(rotateLeftIcon, SIGNAL(clicked()), this, SLOT(rotateLeft())); + connect(rotateRightIcon, SIGNAL(clicked()), this, SLOT(rotateRight())); + connect(zoomInIcon, SIGNAL(clicked()), this, SLOT(zoomIn())); + connect(zoomOutIcon, SIGNAL(clicked()), this, SLOT(zoomOut())); + connect(printButton, SIGNAL(clicked()), this, SLOT(print())); + + setupMatrix(); + + startTimer(0); +} + +QGraphicsView *View::view() const +{ + return graphicsView; +} + +void View::resetView() +{ + zoomSlider->setValue(250); + rotateSlider->setValue(0); + setupMatrix(); + graphicsView->ensureVisible(QRectF(0, 0, 0, 0)); + + resetButton->setEnabled(false); +} + +void View::setResetButtonEnabled() +{ + resetButton->setEnabled(true); +} + +void View::setupMatrix() +{ + qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50)); + + QMatrix matrix; + matrix.scale(scale, scale); + matrix.rotate(rotateSlider->value()); + + graphicsView->setMatrix(matrix); + setResetButtonEnabled(); +} + +void View::toggleOpenGL() +{ +#ifndef QT_NO_OPENGL + graphicsView->setViewport(openGlButton->isChecked() ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget); +#endif +} + +void View::toggleAntialiasing() +{ + graphicsView->setRenderHint(QPainter::Antialiasing, antialiasButton->isChecked()); +} + +void View::print() +{ +#ifndef QT_NO_PRINTER + QPrinter printer; + QPrintDialog dialog(&printer, this); + if (dialog.exec() == QDialog::Accepted) { + QPainter painter(&printer); + graphicsView->render(&painter); + } +#endif +} + +void View::zoomIn() +{ + zoomSlider->setValue(zoomSlider->value() + 1); +} + +void View::zoomOut() +{ + zoomSlider->setValue(zoomSlider->value() - 1); +} + +void View::rotateLeft() +{ + rotateSlider->setValue(rotateSlider->value() - 10); +} + +void View::rotateRight() +{ + rotateSlider->setValue(rotateSlider->value() + 10); +} + +void View::timerEvent(QTimerEvent *) +{ + graphicsView->horizontalScrollBar()->setValue(graphicsView->horizontalScrollBar()->value() + 1); +} + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h new file mode 100644 index 0000000..fc5c226 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIEW_H +#define VIEW_H + +#include + +QT_FORWARD_DECLARE_CLASS(QGraphicsView) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QToolButton) + +class View : public QFrame +{ + Q_OBJECT +public: + View(const QString &name, QWidget *parent = 0); + + QGraphicsView *view() const; + +private slots: + void resetView(); + void setResetButtonEnabled(); + void setupMatrix(); + void toggleOpenGL(); + void toggleAntialiasing(); + void print(); + + void zoomIn(); + void zoomOut(); + void rotateLeft(); + void rotateRight(); + + void timerEvent(QTimerEvent *); + +private: + QGraphicsView *graphicsView; + QLabel *label; + QToolButton *openGlButton; + QToolButton *antialiasButton; + QToolButton *printButton; + QToolButton *resetButton; + QSlider *zoomSlider; + QSlider *rotateSlider; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png new file mode 100644 index 0000000..8b0daee Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png new file mode 100644 index 0000000..1575dd2 Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp new file mode 100644 index 0000000..527713f --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include "valgrind/callgrind.h" + +#ifdef Q_WS_X11 +extern void qt_x11_wait_for_window_manager(QWidget *); +#endif + +class View : public QGraphicsView +{ + Q_OBJECT +public: + View(QGraphicsScene *scene, QGraphicsItem *item) + : QGraphicsView(scene), _item(item) + { + } + +protected: + void paintEvent(QPaintEvent *event) + { + static int n = 0; + if (n) + CALLGRIND_START_INSTRUMENTATION + QGraphicsView::paintEvent(event); + _item->moveBy(1, 1); + if (n) + CALLGRIND_STOP_INSTRUMENTATION + if (++n == 200) + qApp->quit(); + } + +private: + QGraphicsItem *_item; +}; + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + if (argc < 2) { + qDebug("usage: ./%s ", argv[0]); + return 1; + } + + QGraphicsScene scene(-150, -150, 300, 300); + scene.setItemIndexMethod(QGraphicsScene::NoIndex); + + QGraphicsRectItem *item = scene.addRect(-50, -50, 100, 100, QPen(Qt::NoPen), QBrush(Qt::blue)); + item->setFlag(QGraphicsItem::ItemIsMovable); + + for (int i = 0; i < atoi(argv[1]); ++i) { + QGraphicsRectItem *child = scene.addRect(-5, -5, 10, 10, QPen(Qt::NoPen), QBrush(Qt::blue)); + child->setPos(-50 + qrand() % 100, -50 + qrand() % 100); + child->setParentItem(item); + } + + View view(&scene, item); + view.resize(300, 300); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + return app.exec(); +} + +#include "main.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp new file mode 100644 index 0000000..7419206 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include "valgrind/callgrind.h" + +class ItemMover : public QObject +{ + Q_OBJECT +public: + ItemMover(QGraphicsItem *item) + : _item(item) + { + startTimer(0); + } + +protected: + void timerEvent(QTimerEvent *event) + { + _item->moveBy(-1, 0); + } + +private: + QGraphicsItem *_item; +}; + +class ClipItem : public QGraphicsRectItem +{ +public: + ClipItem(qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) + : QGraphicsRectItem(x, y, w, h) + { + setPen(pen); + setBrush(brush); + } + + QPainterPath shape() const + { + QPainterPath path; + path.addRect(rect()); + return path; + } +}; + +class CountView : public QGraphicsView +{ +protected: + void paintEvent(QPaintEvent *event) + { + static int n = 0; + if (n) + CALLGRIND_START_INSTRUMENTATION + QGraphicsView::paintEvent(event); + if (n) + CALLGRIND_STOP_INSTRUMENTATION + if (++n == 500) + qApp->quit(); + } +}; + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QGraphicsScene scene; + scene.setItemIndexMethod(QGraphicsScene::NoIndex); + + ClipItem *clipItem = new ClipItem(0, 0, 100, 100, QPen(), QBrush(Qt::blue)); + clipItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + clipItem->setData(0, "clipItem"); + scene.addItem(clipItem); + + QGraphicsRectItem *scrollItem = scene.addRect(0, 0, 10, 10, QPen(Qt::NoPen), QBrush(Qt::NoBrush)); + scrollItem->setParentItem(clipItem); + scrollItem->setFlag(QGraphicsItem::ItemIsMovable); + scrollItem->setData(0, "scrollItem"); + + for (int y = 0; y < 25; ++y) { + for (int x = 0; x < 25; ++x) { + ClipItem *rect = new ClipItem(0, 0, 90, 20, QPen(Qt::NoPen), QBrush(Qt::green)); + rect->setParentItem(scrollItem); + rect->setPos(x * 95, y * 25); + rect->setData(0, qPrintable(QString("rect %1 %2").arg(x).arg(y))); + rect->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + + QGraphicsEllipseItem *ellipse = new QGraphicsEllipseItem(-5, -5, 10, 10); + ellipse->setPen(QPen(Qt::NoPen)); + ellipse->setBrush(QBrush(Qt::yellow)); + ellipse->setParentItem(rect); + ellipse->setData(0, qPrintable(QString("ellipse %1 %2").arg(x).arg(y))); + } + } + + scrollItem->setRect(scrollItem->childrenBoundingRect()); + +#if 0 + ItemMover mover(scrollItem); +#endif + + CountView view; + view.setScene(&scene); + view.setSceneRect(-25, -25, 150, 150); + view.resize(300, 300); + view.show(); + + return app.exec(); +} + +#include "main.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro new file mode 100644 index 0000000..28dcadc --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro @@ -0,0 +1 @@ +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp new file mode 100644 index 0000000..4c1020a --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp @@ -0,0 +1,182 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "chip.h" + +#include + +Chip::Chip(const QColor &color, int x, int y) +{ + this->x = x; + this->y = y; + this->color = color; + setZValue((x + y) % 2); + + setFlags(ItemIsSelectable | ItemIsMovable); + setAcceptsHoverEvents(true); +} + +QRectF Chip::boundingRect() const +{ + return QRectF(0, 0, 110, 70); +} + +QPainterPath Chip::shape() const +{ + QPainterPath path; + path.addRect(14, 14, 82, 42); + return path; +} + +void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(widget); + + QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color; + if (option->state & QStyle::State_MouseOver) + fillColor = fillColor.light(125); + + if (option->levelOfDetail < 0.2) { + if (option->levelOfDetail < 0.125) { + painter->fillRect(QRectF(0, 0, 110, 70), fillColor); + return; + } + + QBrush b = painter->brush(); + painter->setBrush(fillColor); + painter->drawRect(13, 13, 97, 57); + painter->setBrush(b); + return; + } + + QPen oldPen = painter->pen(); + QPen pen = oldPen; + int width = 0; + if (option->state & QStyle::State_Selected) + width += 2; + + pen.setWidth(width); + QBrush b = painter->brush(); + painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100))); + + painter->drawRect(QRect(14, 14, 79, 39)); + painter->setBrush(b); + + if (option->levelOfDetail >= 1) { + painter->setPen(QPen(Qt::gray, 1)); + painter->drawLine(15, 54, 94, 54); + painter->drawLine(94, 53, 94, 15); + painter->setPen(QPen(Qt::black, 0)); + } + + // Draw text + if (option->levelOfDetail >= 2) { + QFont font("Times", 10); + font.setStyleStrategy(QFont::ForceOutline); + painter->setFont(font); + painter->save(); + painter->scale(0.1, 0.1); + painter->drawText(170, 180, QString("Model: VSC-2000 (Very Small Chip) at %1x%2").arg(x).arg(y)); + painter->drawText(170, 200, QString("Serial number: DLWR-WEER-123L-ZZ33-SDSJ")); + painter->drawText(170, 220, QString("Manufacturer: Chip Manufacturer")); + painter->restore(); + } + + // Draw lines + QVarLengthArray lines; + if (option->levelOfDetail >= 0.5) { + for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { + lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5)); + lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62)); + } + for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { + lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5)); + lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5)); + } + } + if (option->levelOfDetail >= 0.4) { + const QLineF lineData[] = { + QLineF(25, 35, 35, 35), + QLineF(35, 30, 35, 40), + QLineF(35, 30, 45, 35), + QLineF(35, 40, 45, 35), + QLineF(45, 30, 45, 40), + QLineF(45, 35, 55, 35) + }; + lines.append(lineData, 6); + } + painter->drawLines(lines.data(), lines.size()); + + // Draw red ink + if (stuff.size() > 1) { + QPen p = painter->pen(); + painter->setPen(QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter->setBrush(Qt::NoBrush); + QPainterPath path; + path.moveTo(stuff.first()); + for (int i = 1; i < stuff.size(); ++i) + path.lineTo(stuff.at(i)); + painter->drawPath(path); + painter->setPen(p); + } +} + +void Chip::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsItem::mousePressEvent(event); + update(); +} + +void Chip::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->modifiers() & Qt::ShiftModifier) { + stuff << event->pos(); + update(); + return; + } + QGraphicsItem::mouseMoveEvent(event); +} + +void Chip::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsItem::mouseReleaseEvent(event); + update(); +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h new file mode 100644 index 0000000..9db23f9 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef CHIP_H +#define CHIP_H + +#include +#include + +class Chip : public QGraphicsItem +{ +public: + Chip(const QColor &color, int x, int y); + + QRectF boundingRect() const; + QPainterPath shape() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + +private: + int x, y; + QColor color; + QList stuff; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp new file mode 100644 index 0000000..8cada67 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "chiptester.h" +#include "chip.h" + +#include +#ifndef QT_NO_OPENGL +#include +#endif + +ChipTester::ChipTester(QWidget *parent) + : QGraphicsView(parent), + npaints(0) +{ + resize(400, 300); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setFrameStyle(0); + setTransformationAnchor(NoAnchor); + + populateScene(); + setScene(scene); + + setWindowTitle(tr("Chip Demo")); +} + +void ChipTester::setAntialias(bool enabled) +{ + setRenderHint(QPainter::Antialiasing, enabled); +} + +void ChipTester::setOpenGL(bool enabled) +{ +#ifndef QT_NO_OPENGL + setViewport(enabled ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : 0); +#endif +} + +void ChipTester::setOperation(Operation operation) +{ + this->operation = operation; +} + +void ChipTester::runBenchmark() +{ + npaints = 0; + timerId = startTimer(0); + stopWatch.start(); + eventLoop.exec(); + killTimer(timerId); +} + +void ChipTester::paintEvent(QPaintEvent *event) +{ + QGraphicsView::paintEvent(event); + if (++npaints == 50) + eventLoop.quit(); +} + +void ChipTester::timerEvent(QTimerEvent *) +{ + switch (operation) { + case Rotate360: + rotate(1); + break; + case ZoomInOut: { + qreal s = 0.05 + (npaints / 20.0); + setTransform(QTransform().scale(s, s)); + break; + } + case Translate: { + int offset = horizontalScrollBar()->minimum() + + (npaints % (horizontalScrollBar()->maximum() - horizontalScrollBar()->minimum())); + horizontalScrollBar()->setValue(offset); + break; + } + } +} + +void ChipTester::populateScene() +{ + scene = new QGraphicsScene; + + QImage image(":/qt4logo.png"); + + // Populate scene + int xx = 0; + int nitems = 0; + for (int i = -1100; i < 1100; i += 110) { + ++xx; + int yy = 0; + for (int j = -700; j < 700; j += 70) { + ++yy; + qreal x = (i + 1100) / 2200.0; + qreal y = (j + 700) / 1400.0; + + QColor color(image.pixel(int(image.width() * x), int(image.height() * y))); + QGraphicsItem *item = new Chip(color, xx, yy); + item->setPos(QPointF(i, j)); + scene->addItem(item); + + ++nitems; + } + } +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h new file mode 100644 index 0000000..1a73bb7 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef CHIPTESTER_H +#define CHIPTESTER_H + +#include + +QT_FORWARD_DECLARE_CLASS(QGraphicsScene) +QT_FORWARD_DECLARE_CLASS(QGraphicsView) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QSplitter) + +class ChipTester : public QGraphicsView +{ + Q_OBJECT +public: + enum Operation { + Rotate360, + ZoomInOut, + Translate + }; + ChipTester(QWidget *parent = 0); + + void setAntialias(bool enabled); + void setOpenGL(bool enabled); + void runBenchmark(); + void setOperation(Operation operation); + +protected: + void paintEvent(QPaintEvent *event); + void timerEvent(QTimerEvent *event); + +private: + void populateScene(); + + QGraphicsView *view; + QGraphicsScene *scene; + int npaints; + int timerId; + QEventLoop eventLoop; + QTime stopWatch; + Operation operation; +}; + +#endif diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri new file mode 100644 index 0000000..a9e0bf8 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri @@ -0,0 +1,12 @@ +SOURCES += \ + chiptester/chiptester.cpp \ + chiptester/chip.cpp + +HEADERS += \ + chiptester/chiptester.h \ + chiptester/chip.h + +RESOURCES += \ + chiptester/images.qrc + +contains(QT_CONFIG, opengl) QT += opengl diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc new file mode 100644 index 0000000..73e8620 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc @@ -0,0 +1,5 @@ + + + qt4logo.png + + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png new file mode 100644 index 0000000..157e86e Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png new file mode 100644 index 0000000..0988fce Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg new file mode 100644 index 0000000..9900a50 Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg new file mode 100644 index 0000000..8fe1d3a Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro new file mode 100644 index 0000000..927d731 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicsview + +SOURCES += tst_qgraphicsview.cpp +RESOURCES += qgraphicsview.qrc + +include(chiptester/chiptester.pri) + +symbian { + qt_not_deployed { + plugins.sources = qjpeg.dll + plugins.path = imageformats + DEPLOYMENT += plugins + } +} diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc new file mode 100644 index 0000000..3681648 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc @@ -0,0 +1,9 @@ + + + images/designer.png + images/wine.jpeg + images/wine-big.jpeg + random.data + + + diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/random.data b/tests/benchmarks/gui/graphicsview/qgraphicsview/random.data new file mode 100644 index 0000000..190a36c Binary files /dev/null and b/tests/benchmarks/gui/graphicsview/qgraphicsview/random.data differ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp new file mode 100644 index 0000000..4cb07db --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -0,0 +1,908 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#ifdef Q_WS_X11 +QT_BEGIN_NAMESPACE +extern void qt_x11_wait_for_window_manager(QWidget *); +QT_END_NAMESPACE +#endif +#include "chiptester/chiptester.h" +//#define CALLGRIND_DEBUG +#ifdef CALLGRIND_DEBUG +#include "valgrind/callgrind.h" +#endif + +//TESTED_FILES= + +class QEventWaiter : public QEventLoop +{ +public: + QEventWaiter(QObject *receiver, QEvent::Type type) + : waiting(false), t(type) + { + receiver->installEventFilter(this); + } + + void wait() + { + waiting = true; + exec(); + } + + bool eventFilter(QObject *receiver, QEvent *event) + { + Q_UNUSED(receiver); + if (waiting && event->type() == t) { + waiting = false; + exit(); + } + return false; + } + +private: + bool waiting; + QEvent::Type t; +}; + +class tst_QGraphicsView : public QObject +{ + Q_OBJECT + +public: + tst_QGraphicsView(); + virtual ~tst_QGraphicsView(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void paintSingleItem(); + void paintDeepStackingItems(); + void paintDeepStackingItems_clipped(); + void moveSingleItem(); + void mapPointToScene_data(); + void mapPointToScene(); + void mapPointFromScene_data(); + void mapPointFromScene(); + void mapRectToScene_data(); + void mapRectToScene(); + void mapRectFromScene_data(); + void mapRectFromScene(); + void chipTester_data(); + void chipTester(); + void deepNesting_data(); + void deepNesting(); + void imageRiver_data(); + void imageRiver(); + void textRiver_data(); + void textRiver(); + void moveItemCache_data(); + void moveItemCache(); + void paintItemCache_data(); + void paintItemCache(); +}; + +tst_QGraphicsView::tst_QGraphicsView() +{ +} + +tst_QGraphicsView::~tst_QGraphicsView() +{ +} + +void tst_QGraphicsView::init() +{ +} + +void tst_QGraphicsView::cleanup() +{ +} + +void tst_QGraphicsView::construct() +{ + QBENCHMARK { + QGraphicsView view; + } +} + +void tst_QGraphicsView::paintSingleItem() +{ + QGraphicsScene scene(0, 0, 100, 100); + scene.addRect(0, 0, 10, 10); + + QGraphicsView view(&scene); + view.show(); + view.resize(100, 100); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); + QPainter painter(&image); + QBENCHMARK { + view.viewport()->render(&painter); + } +} + +#ifdef Q_OS_SYMBIAN +# define DEEP_STACKING_COUNT 85 +#else +# define DEEP_STACKING_COUNT 1000 +#endif + +void tst_QGraphicsView::paintDeepStackingItems() +{ + QGraphicsScene scene(0, 0, 100, 100); + QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); + QGraphicsRectItem *lastRect = item; + for (int i = 0; i < DEEP_STACKING_COUNT; ++i) { + QGraphicsRectItem *rect = scene.addRect(0, 0, 10, 10); + rect->setPos(1, 1); + rect->setParentItem(lastRect); + lastRect = rect; + } + + QGraphicsView view(&scene); + view.show(); + view.resize(100, 100); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); + QPainter painter(&image); + QBENCHMARK { + view.viewport()->render(&painter); + } +} + +void tst_QGraphicsView::paintDeepStackingItems_clipped() +{ + QGraphicsScene scene(0, 0, 100, 100); + QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); + item->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + QGraphicsRectItem *lastRect = item; + for (int i = 0; i < DEEP_STACKING_COUNT; ++i) { + QGraphicsRectItem *rect = scene.addRect(0, 0, 10, 10); + rect->setPos(1, 1); + rect->setParentItem(lastRect); + lastRect = rect; + } + + QGraphicsView view(&scene); + view.show(); + view.resize(100, 100); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); + QPainter painter(&image); + QBENCHMARK { + view.viewport()->render(&painter); + } +} + +void tst_QGraphicsView::moveSingleItem() +{ + QGraphicsScene scene(0, 0, 100, 100); + QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); + + QGraphicsView view(&scene); + view.show(); + view.resize(100, 100); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + QEventWaiter waiter(view.viewport(), QEvent::Paint); + int n = 1; + QBENCHMARK { + item->setPos(25 * n, 25 * n); + waiter.wait(); + n = n ? 0 : 1; + } +} + +void tst_QGraphicsView::mapPointToScene_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("point"); + + QTest::newRow("null") << QTransform() << QPoint(); + QTest::newRow("identity QPoint(100, 100)") << QTransform() << QPoint(100, 100); + QTest::newRow("rotate QPoint(100, 100)") << QTransform().rotate(90) << QPoint(100, 100); + QTest::newRow("scale QPoint(100, 100)") << QTransform().scale(5, 5) << QPoint(100, 100); + QTest::newRow("translate QPoint(100, 100)") << QTransform().translate(5, 5) << QPoint(100, 100); + QTest::newRow("shear QPoint(100, 100)") << QTransform().shear(1.5, 1.5) << QPoint(100, 100); + QTest::newRow("perspect QPoint(100, 100)") << QTransform().rotate(45, Qt::XAxis) << QPoint(100, 100); +} + +void tst_QGraphicsView::mapPointToScene() +{ + QFETCH(QTransform, transform); + QFETCH(QPoint, point); + + QGraphicsView view; + view.setTransform(transform); + QBENCHMARK { + view.mapToScene(point); + } +} + +void tst_QGraphicsView::mapPointFromScene_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("point"); + + QTest::newRow("null") << QTransform() << QPointF(); + QTest::newRow("identity QPointF(100, 100)") << QTransform() << QPointF(100, 100); + QTest::newRow("rotate QPointF(100, 100)") << QTransform().rotate(90) << QPointF(100, 100); + QTest::newRow("scale QPointF(100, 100)") << QTransform().scale(5, 5) << QPointF(100, 100); + QTest::newRow("translate QPointF(100, 100)") << QTransform().translate(5, 5) << QPointF(100, 100); + QTest::newRow("shear QPointF(100, 100)") << QTransform().shear(1.5, 1.5) << QPointF(100, 100); + QTest::newRow("perspect QPointF(100, 100)") << QTransform().rotate(45, Qt::XAxis) << QPointF(100, 100); +} + +void tst_QGraphicsView::mapPointFromScene() +{ + QFETCH(QTransform, transform); + QFETCH(QPointF, point); + + QGraphicsView view; + view.setTransform(transform); + QBENCHMARK { + view.mapFromScene(point); + } +} + +void tst_QGraphicsView::mapRectToScene_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("rect"); + + QTest::newRow("null") << QTransform() << QRect(); + QTest::newRow("identity QRect(0, 0, 100, 100)") << QTransform() << QRect(0, 0, 100, 100); + QTest::newRow("rotate QRect(0, 0, 100, 100)") << QTransform().rotate(90) << QRect(0, 0, 100, 100); + QTest::newRow("scale QRect(0, 0, 100, 100)") << QTransform().scale(5, 5) << QRect(0, 0, 100, 100); + QTest::newRow("translate QRect(0, 0, 100, 100)") << QTransform().translate(5, 5) << QRect(0, 0, 100, 100); + QTest::newRow("shear QRect(0, 0, 100, 100)") << QTransform().shear(1.5, 1.5) << QRect(0, 0, 100, 100); + QTest::newRow("perspect QRect(0, 0, 100, 100)") << QTransform().rotate(45, Qt::XAxis) << QRect(0, 0, 100, 100); +} + +void tst_QGraphicsView::mapRectToScene() +{ + QFETCH(QTransform, transform); + QFETCH(QRect, rect); + + QGraphicsView view; + view.setTransform(transform); + QBENCHMARK { + view.mapToScene(rect); + } +} + +void tst_QGraphicsView::mapRectFromScene_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("rect"); + + QTest::newRow("null") << QTransform() << QRectF(); + QTest::newRow("identity QRectF(0, 0, 100, 100)") << QTransform() << QRectF(0, 0, 100, 100); + QTest::newRow("rotate QRectF(0, 0, 100, 100)") << QTransform().rotate(90) << QRectF(0, 0, 100, 100); + QTest::newRow("scale QRectF(0, 0, 100, 100)") << QTransform().scale(5, 5) << QRectF(0, 0, 100, 100); + QTest::newRow("translate QRectF(0, 0, 100, 100)") << QTransform().translate(5, 5) << QRectF(0, 0, 100, 100); + QTest::newRow("shear QRectF(0, 0, 100, 100)") << QTransform().shear(1.5, 1.5) << QRectF(0, 0, 100, 100); + QTest::newRow("perspect QRectF(0, 0, 100, 100)") << QTransform().rotate(45, Qt::XAxis) << QRectF(0, 0, 100, 100); +} + +void tst_QGraphicsView::mapRectFromScene() +{ + QFETCH(QTransform, transform); + QFETCH(QRectF, rect); + + QGraphicsView view; + view.setTransform(transform); + QBENCHMARK { + view.mapFromScene(rect); + } +} + +void tst_QGraphicsView::chipTester_data() +{ + QTest::addColumn("antialias"); + QTest::addColumn("opengl"); + QTest::addColumn("operation"); + QTest::newRow("rotate, normal") << false << false << 0; + QTest::newRow("rotate, normal, antialias") << true << false << 0; + QTest::newRow("rotate, opengl") << false << true << 0; + QTest::newRow("rotate, opengl, antialias") << true << true << 0; + QTest::newRow("zoom, normal") << false << false << 1; + QTest::newRow("zoom, normal, antialias") << true << false << 1; + QTest::newRow("zoom, opengl") << false << true << 1; + QTest::newRow("zoom, opengl, antialias") << true << true << 1; + QTest::newRow("translate, normal") << false << false << 2; + QTest::newRow("translate, normal, antialias") << true << false << 2; + QTest::newRow("translate, opengl") << false << true << 2; + QTest::newRow("translate, opengl, antialias") << true << true << 2; +} + +void tst_QGraphicsView::chipTester() +{ + QFETCH(bool, antialias); + QFETCH(bool, opengl); + QFETCH(int, operation); + + ChipTester tester; + tester.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&tester); +#endif + tester.setAntialias(antialias); + tester.setOpenGL(opengl); + tester.setOperation(ChipTester::Operation(operation)); + QBENCHMARK { + tester.runBenchmark(); + } +} + +static void addChildHelper(QGraphicsItem *parent, int n, bool rotate) +{ + if (!n) + return; + QGraphicsRectItem *item = new QGraphicsRectItem(QRectF(0, 0, 50, 50), parent); + item->setPos(10, 10); + if (rotate) + item->rotate(10); + addChildHelper(item, n - 1, rotate); +} + +void tst_QGraphicsView::deepNesting_data() +{ + QTest::addColumn("rotate"); + QTest::addColumn("sortCache"); + QTest::addColumn("bsp"); + + QTest::newRow("bsp, no transform") << false << false << true; + QTest::newRow("bsp, rotation") << true << false << true; + QTest::newRow("bsp, no transform, sort cache") << false << true << true; + QTest::newRow("bsp, rotation, sort cache") << true << true << true; + QTest::newRow("no transform") << false << false << false; + QTest::newRow("rotation") << true << false << false; + QTest::newRow("no transform, sort cache") << false << true << false; + QTest::newRow("rotation, sort cache") << true << true << false; +} + +void tst_QGraphicsView::deepNesting() +{ + QFETCH(bool, rotate); + QFETCH(bool, sortCache); + QFETCH(bool, bsp); + + QGraphicsScene scene; + for (int y = 0; y < 15; ++y) { + for (int x = 0; x < 15; ++x) { + QGraphicsItem *item1 = scene.addRect(QRectF(0, 0, 50, 50)); + if (rotate) item1->rotate(10); + item1->setPos(x * 25, y * 25); + addChildHelper(item1, 30, rotate); + } + } + scene.setItemIndexMethod(bsp ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); + scene.setSortCacheEnabled(sortCache); + + QGraphicsView view(&scene); + view.setRenderHint(QPainter::Antialiasing); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QTest::qWait(250); + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + view.viewport()->repaint(); +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + +class AnimatedPixmapItem : public QGraphicsPixmapItem +{ +public: + AnimatedPixmapItem(int x, int y, bool rot, bool scal, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(parent), rotateFactor(0), scaleFactor(0) + { + rotate = rot; + scale = scal; + xspeed = x; + yspeed = y; + } + +protected: + void advance(int i) + { + if (!i) + return; + int x = int(pos().x()) + pixmap().width(); + x += xspeed; + x = (x % (300 + pixmap().width() * 2)) - pixmap().width(); + int y = int(pos().y()) + pixmap().width(); + y += yspeed; + y = (y % (300 + pixmap().width() * 2)) - pixmap().width(); + setPos(x, y); + + int rot = rotateFactor; + int sca = scaleFactor; + if (rotate) + rotateFactor = 1 + (rot + xspeed) % 360; + if (scale) + scaleFactor = 1 + (sca + yspeed) % 50; + + if (rotate || scale) { + qreal s = 0.5 + scaleFactor / 50.0; + setTransform(QTransform().rotate(rotateFactor).scale(s, s)); + } + } + +private: + int xspeed; + int yspeed; + int rotateFactor; + int scaleFactor; + bool rotate; + bool scale; +}; + +class CountPaintEventView : public QGraphicsView +{ +public: + CountPaintEventView(QGraphicsScene *scene = 0) + : QGraphicsView(scene), count(0) + { } + + int count; + +protected: + void paintEvent(QPaintEvent *event) + { + ++count; + QGraphicsView::paintEvent(event); + }; +}; + +void tst_QGraphicsView::imageRiver_data() +{ + QTest::addColumn("direction"); + QTest::addColumn("rotation"); + QTest::addColumn("scale"); + QTest::newRow("horizontal") << 0 << false << false; + QTest::newRow("vertical") << 1 << false << false; + QTest::newRow("both") << 2 << false << false; + QTest::newRow("horizontal rot") << 0 << true << false; + QTest::newRow("horizontal scale") << 0 << false << true; + QTest::newRow("horizontal rot + scale") << 0 << true << true; +} + +void tst_QGraphicsView::imageRiver() +{ + QFETCH(int, direction); + QFETCH(bool, rotation); + QFETCH(bool, scale); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(300, 300); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/designer.png"); + QVERIFY(!pix.isNull()); + + QList items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + for (int i = 0; i < 100; ++i) { + AnimatedPixmapItem *item; + if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale); + if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale); + if (direction == 2) item = new AnimatedPixmapItem((i % 4) + 1, (i % 4) + 1, rotation, scale); + item->setPixmap(pix); + int rnd1, rnd2; + str >> rnd1 >> rnd2; + item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), + -pix.height() + rnd2 % (view.height() + pix.height())); + scene.addItem(item); + } + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 100; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + +class AnimatedTextItem : public QGraphicsSimpleTextItem +{ +public: + AnimatedTextItem(int x, int y, bool rot, bool scal, QGraphicsItem *parent = 0) + : QGraphicsSimpleTextItem(parent), rotateFactor(0), scaleFactor(25) + { + setText("River of text"); + rotate = rot; + scale = scal; + xspeed = x; + yspeed = y; + } + +protected: + void advance(int i) + { + if (!i) + return; + QRect r = boundingRect().toRect(); + int x = int(pos().x()) + r.width(); + x += xspeed; + x = (x % (300 + r.width() * 2)) - r.width(); + int y = int(pos().y()) + r.width(); + y += yspeed; + y = (y % (300 + r.width() * 2)) - r.width(); + setPos(x, y); + + int rot = rotateFactor; + int sca = scaleFactor; + if (rotate) + rotateFactor = 1 + (rot + xspeed) % 360; + if (scale) + scaleFactor = 1 + (sca + yspeed) % 50; + + if (rotate || scale) { + qreal s = 0.5 + scaleFactor / 50.0; + setTransform(QTransform().rotate(rotateFactor).scale(s, s)); + } + } + +private: + int xspeed; + int yspeed; + int rotateFactor; + int scaleFactor; + bool rotate; + bool scale; +}; + +void tst_QGraphicsView::textRiver_data() +{ + QTest::addColumn("direction"); + QTest::addColumn("rotation"); + QTest::addColumn("scale"); + QTest::newRow("horizontal") << 0 << false << false; + QTest::newRow("vertical") << 1 << false << false; + QTest::newRow("both") << 2 << false << false; + QTest::newRow("horizontal rot") << 0 << true << false; + QTest::newRow("horizontal scale") << 0 << false << true; + QTest::newRow("horizontal rot + scale") << 0 << true << true; +} + +void tst_QGraphicsView::textRiver() +{ + QFETCH(int, direction); + QFETCH(bool, rotation); + QFETCH(bool, scale); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(300, 300); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/designer.png"); + QVERIFY(!pix.isNull()); + + QList items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + for (int i = 0; i < 100; ++i) { + AnimatedTextItem *item; + if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale); + if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale); + if (direction == 2) item = new AnimatedTextItem((i % 4) + 1, (i % 4) + 1, rotation, scale); + int rnd1, rnd2; + str >> rnd1 >> rnd2; + item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), + -pix.height() + rnd2 % (view.height() + pix.height())); + scene.addItem(item); + } + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 100; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + +class AnimatedPixmapCacheItem : public QGraphicsPixmapItem +{ +public: + AnimatedPixmapCacheItem(int x, int y, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(parent) + { + xspeed = x; + yspeed = y; + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + { + QGraphicsPixmapItem::paint(painter,option,widget); + //We just want to wait, and we don't want to process the event loop with qWait + QTest::qSleep(3); + } +protected: + void advance(int i) + { + if (!i) + return; + int x = int(pos().x()) + pixmap().width(); + x += xspeed; + x = (x % (300 + pixmap().width() * 2)) - pixmap().width(); + int y = int(pos().y()) + pixmap().width(); + y += yspeed; + y = (y % (300 + pixmap().width() * 2)) - pixmap().width(); + setPos(x, y); + } + +private: + int xspeed; + int yspeed; +}; + +void tst_QGraphicsView::moveItemCache_data() +{ + QTest::addColumn("direction"); + QTest::addColumn("rotation"); + QTest::addColumn("cacheMode"); + QTest::newRow("Horizontal movement : ItemCoordinate Cache") << 0 << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Horizontal movement : DeviceCoordinate Cache") << 0 << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Horizontal movement : No Cache") << 0 << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Vertical + Horizontal movement : ItemCoordinate Cache") << 2 << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Vertical + Horizontal movement : DeviceCoordinate Cache") << 2 << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Vertical + Horizontal movement : No Cache") << 2 << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Horizontal movement + Rotation : ItemCoordinate Cache") << 0 << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Horizontal movement + Rotation : DeviceCoordinate Cache") << 0 << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Horizontal movement + Rotation : No Cache") << 0 << true << (int)QGraphicsItem::NoCache; +} + +void tst_QGraphicsView::moveItemCache() +{ + QFETCH(int, direction); + QFETCH(bool, rotation); + QFETCH(int, cacheMode); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(600, 600); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/wine.jpeg"); + QVERIFY(!pix.isNull()); + + QList items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + for (int i = 0; i < 50; ++i) { + AnimatedPixmapCacheItem *item; + if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0); + if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1); + if (direction == 2) item = new AnimatedPixmapCacheItem((i % 4) + 1, (i % 4) + 1); + item->setPixmap(pix); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + int rnd1, rnd2; + str >> rnd1 >> rnd2; + item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), + -pix.height() + rnd2 % (view.height() + pix.height())); + scene.addItem(item); + } + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 100; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + +class UpdatedPixmapCacheItem : public QGraphicsPixmapItem +{ +public: + UpdatedPixmapCacheItem(bool partial, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(parent), partial(partial) + { + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + { + QGraphicsPixmapItem::paint(painter,option,widget); + } +protected: + void advance(int i) + { + if (partial) + update(QRectF(boundingRect().center().x(), boundingRect().center().x(), 30, 30)); + else + update(); + } + +private: + bool partial; +}; + +void tst_QGraphicsView::paintItemCache_data() +{ + QTest::addColumn("updatePartial"); + QTest::addColumn("rotation"); + QTest::addColumn("cacheMode"); + QTest::newRow("Partial Update : ItemCoordinate Cache") << true << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache") << true << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache") << true << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache") << false << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache") << false << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache") << false << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Partial Update : ItemCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache item rotated") << true << true << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache item rotated") << false << true <<(int)QGraphicsItem::NoCache; +} + +void tst_QGraphicsView::paintItemCache() +{ + QFETCH(bool, updatePartial); + QFETCH(bool, rotation); + QFETCH(int, cacheMode); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(600, 600); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/wine.jpeg"); + QVERIFY(!pix.isNull()); + + QList items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + UpdatedPixmapCacheItem *item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(-100, -100); + scene.addItem(item); + + QPixmap pix2(":/images/wine-big.jpeg"); + item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix2); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(0, 0); + scene.addItem(item); + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 50; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + +QTEST_MAIN(tst_QGraphicsView) +#include "tst_qgraphicsview.moc" diff --git a/tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro b/tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro new file mode 100644 index 0000000..f1ec54e --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicswidget +TEMPLATE = app +# Input +SOURCES += tst_qgraphicswidget.cpp diff --git a/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp new file mode 100644 index 0000000..7db98ce --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +//TESTED_FILES= + +class tst_QGraphicsWidget : public QObject +{ + Q_OBJECT + +public: + tst_QGraphicsWidget(); + virtual ~tst_QGraphicsWidget(); + +public slots: + void init(); + void cleanup(); + +private slots: + void move(); +}; + +tst_QGraphicsWidget::tst_QGraphicsWidget() +{ +} + +tst_QGraphicsWidget::~tst_QGraphicsWidget() +{ +} + +void tst_QGraphicsWidget::init() +{ +} + +void tst_QGraphicsWidget::cleanup() +{ +} + +void tst_QGraphicsWidget::move() +{ + QGraphicsScene scene; + QGraphicsWidget *widget = new QGraphicsWidget(); + scene.addItem(widget); + QGraphicsView view(&scene); + view.show(); + QBENCHMARK { + widget->setPos(qrand(),qrand()); + } +} + +QTEST_MAIN(tst_QGraphicsWidget) +#include "tst_qgraphicswidget.moc" diff --git a/tests/benchmarks/gui/gui.pro b/tests/benchmarks/gui/gui.pro new file mode 100644 index 0000000..946f184 --- /dev/null +++ b/tests/benchmarks/gui/gui.pro @@ -0,0 +1,11 @@ +TEMPLATE = subdirs +SUBDIRS = \ + animation \ + graphicsview \ + image \ + itemviews \ + kernel \ + math3d \ + painting \ + styles \ + text diff --git a/tests/benchmarks/gui/image/blendbench/blendbench.pro b/tests/benchmarks/gui/image/blendbench/blendbench.pro new file mode 100644 index 0000000..a3228c5 --- /dev/null +++ b/tests/benchmarks/gui/image/blendbench/blendbench.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_blendbench +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/image/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp new file mode 100644 index 0000000..92d1633 --- /dev/null +++ b/tests/benchmarks/gui/image/blendbench/main.cpp @@ -0,0 +1,152 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include + +#include + +void paint(QPaintDevice *device) +{ + QPainter p(device); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, device->width(), device->height(), Qt::transparent); + + QLinearGradient g(QPoint(0, 0), QPoint(1, 1)); +// g.setCoordinateMode(QGradient::ObjectBoundingMode); + g.setColorAt(0, Qt::magenta); + g.setColorAt(0, Qt::white); + +// p.setOpacity(0.8); + p.setPen(Qt::NoPen); + p.setBrush(g); + p.setRenderHint(QPainter::Antialiasing); + p.setOpacity(0.9); + p.drawEllipse(0, 0, device->width(), device->height()); +} + +QLatin1String compositionModes[] = { + QLatin1String("SourceOver"), + QLatin1String("DestinationOver"), + QLatin1String("Clear"), + QLatin1String("Source"), + QLatin1String("Destination"), + QLatin1String("SourceIn"), + QLatin1String("DestinationIn"), + QLatin1String("SourceOut"), + QLatin1String("DestinationOut"), + QLatin1String("SourceAtop"), + QLatin1String("DestinationAtop"), + QLatin1String("Xor"), + + //svg 1.2 blend modes + QLatin1String("Plus"), + QLatin1String("Multiply"), + QLatin1String("Screen"), + QLatin1String("Overlay"), + QLatin1String("Darken"), + QLatin1String("Lighten"), + QLatin1String("ColorDodge"), + QLatin1String("ColorBurn"), + QLatin1String("HardLight"), + QLatin1String("SoftLight"), + QLatin1String("Difference"), + QLatin1String("Exclusion") +}; + +enum BrushType { ImageBrush, SolidBrush }; +QLatin1String brushTypes[] = { + QLatin1String("ImageBrush"), + QLatin1String("SolidBrush"), +}; + +class BlendBench : public QObject +{ + Q_OBJECT +private slots: + void blendBench_data(); + void blendBench(); +}; + +void BlendBench::blendBench_data() +{ + int first = 0; + int limit = 12; + if (qApp->arguments().contains("--extended")) { + first = 12; + limit = 24; + } + + QTest::addColumn("brushType"); + QTest::addColumn("compositionMode"); + + for (int brush = ImageBrush; brush <= SolidBrush; ++brush) + for (int mode = first; mode < limit; ++mode) + QTest::newRow(QString("brush=%1; mode=%2") + .arg(brushTypes[brush]).arg(compositionModes[mode]).toAscii().data()) + << brush << mode; +} + +void BlendBench::blendBench() +{ + QFETCH(int, brushType); + QFETCH(int, compositionMode); + + QImage img(512, 512, QImage::Format_ARGB32_Premultiplied); + QImage src(512, 512, QImage::Format_ARGB32_Premultiplied); + paint(&src); + QPainter p(&img); + p.setPen(Qt::NoPen); + + p.setCompositionMode(QPainter::CompositionMode(compositionMode)); + if (brushType == ImageBrush) { + p.setBrush(QBrush(src)); + } else if (brushType == SolidBrush) { + p.setBrush(QColor(127, 127, 127, 127)); + } + + QBENCHMARK { + p.drawRect(0, 0, 512, 512); + } +} + +QTEST_MAIN(BlendBench) + +#include "main.moc" diff --git a/tests/benchmarks/gui/image/image.pro b/tests/benchmarks/gui/image/image.pro new file mode 100644 index 0000000..3094e72 --- /dev/null +++ b/tests/benchmarks/gui/image/image.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +SUBDIRS = \ + blendbench \ + qimagereader \ + qpixmap \ + qpixmapcache diff --git a/tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp b/tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp new file mode 100644 index 0000000..74ce63e Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp b/tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp new file mode 100644 index 0000000..ae71e67 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg new file mode 100644 index 0000000..b8aa9ea Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png new file mode 100644 index 0000000..a24db1b Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg new file mode 100644 index 0000000..8771224 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/away.png b/tests/benchmarks/gui/image/qimagereader/images/away.png new file mode 100644 index 0000000..0e21a37 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/away.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/ball.mng b/tests/benchmarks/gui/image/qimagereader/images/ball.mng new file mode 100644 index 0000000..8154478 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/ball.mng differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/bat1.gif b/tests/benchmarks/gui/image/qimagereader/images/bat1.gif new file mode 100644 index 0000000..cb6f4f7 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/bat1.gif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/bat2.gif b/tests/benchmarks/gui/image/qimagereader/images/bat2.gif new file mode 100644 index 0000000..fbbda4e Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/bat2.gif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/beavis.jpg b/tests/benchmarks/gui/image/qimagereader/images/beavis.jpg new file mode 100644 index 0000000..d555047 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/beavis.jpg differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/black.png b/tests/benchmarks/gui/image/qimagereader/images/black.png new file mode 100644 index 0000000..6c94085 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/black.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/black.xpm b/tests/benchmarks/gui/image/qimagereader/images/black.xpm new file mode 100644 index 0000000..d7925bf --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/black.xpm @@ -0,0 +1,65 @@ +/* XPM */ +static char * ddd_xpm[] = { +/* $Id: ddd.xpm,v 1.5 1999/08/19 11:30:07 andreas Exp $ + * DDD Logo. Copyright (C) 1997 TU Braunschweig, Germany. + * For details on DDD, see `http://www.gnu.org/software/ddd/'. + * width height ncolors chars_per_pixel */ +" 48 48 8 1", +/* Colors */ +" c None m None g None g4 None s Background ", +". c black m black g black g4 black s Legs ", +"X c grey m white g grey g4 grey s Body ", +"- c grey m white g grey g4 grey s Border ", +"o c #000040 m black g grey25 g4 grey25 s Handle1 ", +"O c blue4 m black g grey25 g4 grey25 s Handle2 ", +"+ c white m white g white g4 white s Light ", +"* c DarkGreen m black g grey25 g4 grey25 s Eye ", +/* Pixels */ +" . . ", +" . .. ", +" . . ", +" .. . ", +" .. .. .. ", +" .. . . . ", +" . . . . .. ", +" . .X. . ", +" . *.X.* .. ", +" .. .. .XXX. .. ... ", +" . .X...XXX...X. . ", +" .. ..XXX.XXX.XXX. .. ", +" .....XXXX...XXXX. . ", +" .. ..XXXXXXXXX.. .. ", +" ...XXXXXXX..... ", +" ......... ", +" .XXXXXXX. ", +" .....XXX..... ", +" .XXXXXoOOOOOOX. ... ", +" .. ..XXXoOOO-----OOO..... ", +" .........XXoO-----..----O .. ", +" .. ..X..oO--.........--O .. ", +" . ..XXXoO--..++.......--O .. ", +" .. .XXXXO-XXX+++XXXXXXXXX-O . ", +" .. .....oO-XX+++XXXXXXXXXXX-O .. ", +" .. .XXXoO--XX++XXXXXXXXXXXX-O .. ", +" .. ..XXXoO-..+++............-O .. ", +" . .. .XXoO--..++.............-OO .. ", +" . ... ...oO--..................-O ", +".. . .XXoO-XXXXXXXXXXXXXXXXXXX-O ", +" .. .XXoO-XXXXXXXXXXXXXXXXXXX-O ", +" .. .XoO-XXXXXXXXXXXXXXXXXXX-O. ", +" . ...oO-.................-O .. ", +" . .XXoO-.................-O .. ", +" . ..XoO-.................-O .. ", +" . ...oO-XXXXXXXXXXXXXXX-OOO . ", +" .. .XoOO-XXXXXXXXXXXXX-OOOOO . ", +" .. ..XoOO---.......---OOOOOO . ", +" .. ....oOO---...----OOOOOOOO ", +" . .XX..oOO-----OOOOOOOOOOO ", +" . .....OOOOOOOOooOOOOOOOOO ", +" . .XXooooooOo oOOOOOOOOO ", +" . .XXX. ooOOOOOOO ", +" .. ... ooOOOOOO ", +" . ooOOOOOO ", +" ooOOOOOO ", +" ooOOOOOO ", +" ooOOOOOO "}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/colorful.bmp b/tests/benchmarks/gui/image/qimagereader/images/colorful.bmp new file mode 100644 index 0000000..8ea6f4a Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/colorful.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm b/tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm new file mode 100644 index 0000000..f8d80ed --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static const char *marble_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 240 240 223 2", +/* colors */ +".. c #959595", +".# c #c5c5c5", +".a c #adadad", +".b c #dedede", +".c c #b7b7b7", +".d c #d2d2d2", +".e c #bebebe", +".f c #c9c9c9", +".g c #b8b8b8", +".h c #d6d6d6", +".i c #9e9e9e", +".j c #eaeaea", +".k c #b2b2b2", +".l c #cecece", +".m c #a5a5a5", +".n c #e4e4e4", +".o c #c4c4c4", +".p c #d9d9d9", +".q c #b1b1b1", +/* pixels */ +"aYbla9aN.N#x", diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif b/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif new file mode 100644 index 0000000..d63c688 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm b/tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm new file mode 100644 index 0000000..21031ee --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm @@ -0,0 +1,7 @@ +/* XPM */ +static char * test_xpm[] = { +"256 256 1 1", +" c grey", +" ", +" ", +" "}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp b/tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp new file mode 100644 index 0000000..824190b Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.gif b/tests/benchmarks/gui/image/qimagereader/images/corrupt.gif new file mode 100644 index 0000000..0725945 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt.gif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg b/tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg new file mode 100644 index 0000000..1959662 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng b/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng new file mode 100644 index 0000000..17fd43a Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.png b/tests/benchmarks/gui/image/qimagereader/images/corrupt.png new file mode 100644 index 0000000..9d8911c Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/corrupt.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm b/tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm new file mode 100644 index 0000000..8510634 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm @@ -0,0 +1,5 @@ +#define noname_width 271 +#define noname_height 273 +static char noname_bits[] = { + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp b/tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp new file mode 100644 index 0000000..b35cda6 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/earth.gif b/tests/benchmarks/gui/image/qimagereader/images/earth.gif new file mode 100644 index 0000000..2c229eb Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/earth.gif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/fire.mng b/tests/benchmarks/gui/image/qimagereader/images/fire.mng new file mode 100644 index 0000000..c6695c8 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/fire.mng differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/font.bmp b/tests/benchmarks/gui/image/qimagereader/images/font.bmp new file mode 100644 index 0000000..28b8c66 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/font.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/gnus.xbm b/tests/benchmarks/gui/image/qimagereader/images/gnus.xbm new file mode 100644 index 0000000..58d1ac8 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/gnus.xbm @@ -0,0 +1,622 @@ +#define noname_width 271 +#define noname_height 273 +static char noname_bits[] = { + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x49,0xe0,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x97,0xaa,0x8a,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x57,0x2a,0x41,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa9,0x52,0x16,0xfe,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0x49,0x05, + 0xf9,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x95,0xaa,0x58,0xf4,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xa5,0x54,0x26,0xe1,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x54,0x49,0x49,0xe4,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x2a,0xa5, + 0x2a,0xd1,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xaf,0x52,0x95,0x54,0xc4,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab, + 0x24,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x57,0x29,0xa9,0x92,0x11,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x57,0xd5,0xfa,0xff,0xff,0xab,0xea,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x4a,0x55,0x2a,0x41,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x25,0x29,0xe5,0xff,0xff,0x95,0xa4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa7,0xa4, + 0x24,0xa5,0x14,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0xa5,0xd4,0xff, + 0x3f,0x52,0xa9,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x29,0x55,0x55,0x55,0x41,0x7e,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xa9,0x54,0xea,0xff,0xdf,0x2a,0x55,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x4a,0x49,0x12,0x7e,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x55,0xa5,0x92,0xff,0x23,0xa5,0x4a,0xd6,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa5,0xa4,0x94,0xaa,0x42, + 0x7d,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0x4a,0x2a,0xa9,0xff,0xad,0x92,0x24, + 0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a, + 0x95,0x52,0x52,0x29,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x52,0x49,0x55, + 0xfe,0x91,0x54,0x55,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x49,0x29,0x55,0x25,0x85,0x7c,0xff,0xff,0xff,0xff,0xff,0xff, + 0x4f,0x95,0xaa,0x92,0x7e,0x55,0x55,0xa9,0x4a,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a,0x50,0x95,0xaa,0x24,0x7e,0xff,0xff, + 0xff,0xff,0xff,0xff,0x57,0x2a,0x95,0x54,0x79,0x95,0x92,0x92,0x94,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xb9,0x62,0x29,0x49, + 0x85,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x49,0x49,0x95,0xba,0xa4,0x54, + 0xaa,0x52,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf, + 0x1a,0xf8,0xa7,0xaa,0x22,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x52, + 0x2a,0x75,0x55,0xa5,0x24,0xa5,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xbf,0x5a,0xfd,0x57,0x92,0x94,0x7e,0xff,0xff,0xff,0xff,0xff, + 0xff,0x4a,0x4a,0x55,0x49,0x89,0x92,0x94,0xaa,0x94,0xf4,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x1a,0xfc,0x2f,0x55,0x05,0x7c,0xff, + 0xff,0xff,0xff,0xff,0xff,0x55,0xa9,0x4a,0x55,0x2a,0x55,0x55,0x55,0x55,0xe5, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x4e,0xfd,0x5f, + 0x29,0xa5,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0xa4,0x54,0x52,0x4a,0x55,0xa9, + 0xa4,0x24,0xa5,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x2f,0x1d,0xfe,0x3f,0x95,0x04,0x7c,0xff,0xfd,0xff,0xff,0xff,0x3f,0x49,0xa5, + 0x54,0xa9,0xa4,0x92,0x4a,0x49,0x4a,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xaf,0x44,0xfe,0x5f,0xa9,0x52,0x7d,0xff,0xe5,0xff,0xff, + 0xff,0x5f,0x55,0x92,0x2a,0x95,0x52,0x4a,0x52,0xaa,0x52,0x4a,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x16,0xff,0xbf,0x4a,0x05,0x7c, + 0xff,0xd9,0xff,0xff,0xff,0x5f,0x95,0x42,0xa5,0x52,0x95,0xaa,0xaa,0xaa,0x94, + 0x54,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x43,0xfe, + 0xbf,0x54,0x52,0x7d,0x7f,0x25,0xff,0xff,0xff,0xa7,0xa4,0x28,0x92,0x54,0x4a, + 0xa5,0x4a,0x92,0xaa,0x4a,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xab,0x12,0xfe,0x7f,0xa5,0x02,0x7c,0x7f,0x55,0xfd,0xff,0xff,0x95,0x2a, + 0x82,0x54,0xa5,0x54,0x2a,0xa9,0x2a,0xa5,0x52,0xf5,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x27,0x4b,0xff,0xff,0x4a,0x29,0x7d,0xff,0x92,0xfe, + 0xff,0xff,0x55,0x92,0x20,0xa8,0x94,0x2a,0xa5,0x94,0x52,0x29,0xa9,0xf4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x01,0xff,0x7f,0x52,0x42, + 0x7c,0xff,0x25,0xf9,0xff,0x7f,0xaa,0x02,0x8a,0x40,0x29,0x49,0x09,0x41,0x4a, + 0x55,0x25,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x57, + 0xff,0xff,0x95,0x12,0x7d,0xff,0xa9,0xfa,0xff,0x7f,0x25,0xa9,0x20,0x2a,0xa5, + 0xaa,0x42,0x92,0x54,0x92,0x54,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xaf,0x83,0xff,0xff,0xa9,0x42,0x7e,0xff,0xaa,0xf4,0xff,0xaf,0x54, + 0x01,0x82,0x80,0xaa,0x54,0x14,0x08,0xa2,0xaa,0x4a,0xd2,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xef,0xcf,0xd7,0xff,0xff,0x52,0x12,0x7f,0xff,0x4a, + 0xea,0xff,0x57,0x92,0xaa,0x28,0x24,0x29,0x25,0x81,0x82,0x08,0x49,0x52,0x55, + 0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xdf,0xef,0xe7,0xff,0xff,0x2a, + 0x05,0x7e,0xff,0x55,0xd5,0xff,0xa5,0x2a,0x00,0x8e,0x10,0x4a,0x89,0x24,0x28, + 0xa0,0xaa,0x2a,0x49,0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xe7,0xff, + 0xef,0xff,0xff,0xa5,0x50,0x7e,0xff,0x25,0xe5,0xff,0x2a,0xa5,0x52,0x7f,0x85, + 0x54,0x35,0x08,0x82,0x0a,0x55,0x95,0xaa,0xfc,0xff,0xff,0xff,0xcf,0xff,0xff, + 0xff,0xff,0xd7,0xff,0xff,0xff,0x7f,0x52,0x85,0x7e,0xff,0xab,0x94,0x1e,0x55, + 0x2a,0xc8,0xff,0x10,0x90,0x92,0xa0,0x08,0x20,0x24,0x52,0x25,0xfd,0xff,0xff, + 0xff,0xef,0xff,0xff,0xff,0xff,0xe9,0xff,0xff,0xff,0xff,0x94,0x10,0x7e,0xff, + 0x93,0xaa,0x6a,0x49,0x49,0xf2,0xff,0x85,0x52,0x09,0x0a,0xa2,0x4a,0x92,0x29, + 0xa9,0xf2,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0x7f, + 0x55,0x25,0x7f,0xff,0x55,0x49,0x49,0x95,0x0a,0xf9,0xff,0x17,0x48,0x26,0x50, + 0x08,0x00,0xa9,0x4a,0x95,0xfa,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xf2, + 0xff,0xff,0xff,0xff,0x92,0x80,0x7e,0xff,0xa7,0x54,0xaa,0xa4,0x52,0xfc,0xff, + 0xaf,0x42,0x89,0xfa,0xbf,0x54,0x20,0xa9,0xa4,0xd4,0xff,0xff,0xff,0xcb,0xff, + 0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0xff,0x54,0x29,0x7f,0xff,0x4b,0xa5,0x92, + 0x2a,0x01,0xff,0xff,0x1f,0xa8,0x22,0xff,0xff,0x01,0xa5,0x2a,0x55,0xa9,0xff, + 0xff,0xff,0xd4,0xff,0xff,0xff,0x7f,0xfa,0xff,0xff,0xff,0x7f,0xa5,0x04,0x7f, + 0xff,0x57,0x2a,0x55,0xa9,0x54,0xfe,0xff,0x3f,0x05,0x89,0xff,0xff,0x5f,0x48, + 0x92,0x2a,0x95,0xff,0xff,0xff,0xea,0xff,0xff,0xff,0xff,0xd2,0xff,0xff,0xff, + 0x7f,0x2a,0x91,0x7f,0xff,0xa9,0x54,0x4a,0x52,0x02,0xff,0xff,0xff,0x50,0xd1, + 0xff,0xff,0x1f,0x81,0xaa,0xa4,0x52,0xfe,0xff,0x3f,0xe9,0xff,0xff,0xff,0x7f, + 0x1d,0xff,0xff,0xff,0xff,0x54,0x41,0x7f,0xff,0x93,0x92,0x52,0x95,0xc8,0xff, + 0xff,0xff,0x8b,0xc4,0xff,0xff,0x7f,0x24,0xa5,0x2a,0x49,0xf9,0xff,0x7f,0xd5, + 0xff,0xff,0xff,0xbf,0x4a,0xff,0xff,0xff,0xff,0x4a,0x14,0x7f,0xff,0x28,0xa5, + 0x94,0x2a,0xa0,0xff,0xff,0x7f,0x22,0xf0,0xff,0xff,0x7f,0x12,0x94,0xa4,0xaa, + 0xea,0xff,0xaf,0xea,0xff,0xff,0xff,0x5f,0x8e,0xff,0xff,0xff,0x7f,0xa9,0x40, + 0x7f,0xff,0x48,0x55,0x55,0x12,0xca,0xff,0xff,0xff,0x0a,0xf5,0xff,0xff,0xff, + 0x80,0x52,0x95,0x54,0xaa,0xfe,0x55,0xc4,0xff,0xff,0xff,0x5f,0xa5,0xff,0xff, + 0xff,0xff,0x94,0x14,0x7f,0xff,0x52,0x2a,0xa9,0x4a,0xe1,0xff,0xff,0xbf,0x24, + 0xf0,0xff,0xff,0xff,0x0b,0x28,0xa9,0x92,0x24,0x55,0x49,0xe5,0xd7,0xff,0xff, + 0xa7,0x8a,0xff,0xff,0xff,0x7f,0xa5,0xc0,0x7f,0xff,0x50,0x49,0x95,0x04,0xf8, + 0xff,0xff,0x5f,0x1f,0xfd,0xff,0xff,0xff,0x47,0x45,0x55,0xaa,0xaa,0x4a,0xaa, + 0xea,0xaf,0xff,0xff,0x2b,0xc3,0xff,0xff,0xff,0x7f,0x55,0x94,0x7f,0x7f,0x4a, + 0x55,0x52,0x51,0xfe,0xff,0xff,0x5f,0x4e,0xf8,0xff,0xff,0xff,0x1f,0x50,0x92, + 0x52,0x49,0xa9,0x92,0xe4,0xd3,0xff,0xff,0x4b,0xd5,0xff,0xff,0xff,0xff,0x94, + 0xc0,0x7f,0x3f,0xa0,0xa4,0xaa,0x04,0xfe,0xff,0xff,0xa7,0x1d,0xfd,0xff,0xff, + 0xff,0x9f,0x84,0xaa,0x4a,0xaa,0x24,0x55,0xf2,0x2b,0xff,0x7f,0xa9,0xc1,0xff, + 0xff,0xff,0x7f,0x4a,0x95,0x7f,0xbf,0x2a,0x95,0x24,0x50,0xff,0xff,0xff,0x97, + 0x5e,0xfe,0xff,0xff,0xff,0x3f,0x92,0x24,0x95,0x92,0xaa,0xa4,0xf2,0xcb,0xff, + 0x5f,0xd5,0xe5,0xff,0xff,0xff,0xff,0x52,0x80,0x7f,0x3f,0xa0,0x52,0x15,0x85, + 0xff,0xff,0xff,0xd7,0x38,0xfe,0xff,0xff,0xff,0xff,0x20,0xaa,0x52,0x55,0x55, + 0x55,0xf9,0x29,0xfd,0xab,0xa4,0xf0,0xff,0xff,0xff,0x7f,0x29,0xa9,0x7f,0xff, + 0x42,0x25,0x49,0xe8,0xff,0xff,0xff,0x69,0x7a,0xff,0xff,0xff,0xff,0xff,0x82, + 0x52,0xaa,0x24,0x89,0x4a,0xf8,0x55,0x2a,0x49,0x95,0xf5,0xff,0xff,0xff,0xbf, + 0x2a,0xc4,0x7f,0x7f,0x90,0x54,0x15,0xe2,0xff,0xff,0xff,0x25,0xbc,0xff,0xff, + 0xff,0xff,0xff,0x29,0x48,0x49,0xaa,0xaa,0xa4,0xfa,0x95,0x92,0x54,0x52,0xf0, + 0xff,0xff,0xff,0xbf,0x4a,0xd1,0x7f,0xff,0x05,0xaa,0x40,0xf8,0xff,0xff,0x7f, + 0xaa,0xfc,0xff,0xff,0xff,0xff,0xff,0x43,0xa9,0xaa,0x4a,0x52,0xa9,0xf8,0xa4, + 0xaa,0x52,0x95,0xfc,0xff,0xff,0xff,0x7f,0x52,0xc0,0x7f,0xff,0xa1,0x00,0x24, + 0xfa,0xff,0xff,0xff,0x0a,0xfe,0xff,0xff,0xff,0xff,0xff,0x17,0x92,0x24,0xa5, + 0x2a,0x55,0xfe,0xaa,0xa4,0x2a,0x29,0xf9,0xff,0xff,0xff,0xbf,0x2a,0xea,0x7f, + 0xff,0x05,0x92,0x90,0xfc,0xff,0xff,0xbf,0xa4,0xff,0xff,0xff,0xff,0xff,0xff, + 0x4f,0xa0,0xaa,0x54,0x49,0x25,0x7c,0x49,0x95,0xa4,0x12,0xfc,0xff,0xff,0xff, + 0x7f,0x8a,0xe0,0x7f,0xff,0xa3,0x04,0x05,0xfe,0xff,0xff,0xbf,0x06,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x49,0x95,0x52,0xaa,0x12,0x7f,0x55,0x52,0x55,0x0a, + 0xfd,0xff,0xff,0xff,0x3f,0x29,0xe8,0x7f,0xff,0x0f,0x50,0x50,0xff,0xff,0xff, + 0x5f,0xca,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x04,0xa9,0x4a,0x25,0x45,0x3e, + 0xa9,0x2a,0xa9,0xa2,0xfc,0xff,0xff,0xff,0x7f,0x55,0xe1,0x7f,0xff,0x27,0x05, + 0xc4,0xff,0xff,0xff,0x9f,0x91,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x41,0x4a, + 0x29,0xa9,0x12,0x5e,0x95,0x94,0x4a,0x0a,0xfe,0xff,0xff,0xff,0xbf,0x12,0xf4, + 0x7f,0xff,0x8f,0x50,0xf1,0xff,0xff,0xff,0xa7,0xc2,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x14,0x92,0xaa,0x4a,0xa2,0xbf,0xa4,0x52,0x95,0x22,0xff,0xff,0xff, + 0xff,0x3f,0x45,0xf2,0x7f,0xff,0x3f,0x04,0xf4,0xff,0xff,0xff,0xd7,0xe8,0xff, + 0xff,0xff,0xff,0x5f,0xff,0xff,0x83,0xa8,0x94,0x54,0x09,0x2f,0x55,0x4a,0x52, + 0x49,0xff,0xff,0xff,0xff,0x5f,0x99,0xf0,0x7f,0xff,0x7f,0x51,0xfc,0xff,0xff, + 0xff,0x6b,0xf1,0xff,0xff,0xff,0xff,0x5f,0xfd,0xff,0x2b,0x2a,0xa9,0x12,0x20, + 0x5f,0xa9,0xaa,0x54,0x00,0xff,0xff,0xff,0xff,0x5f,0x15,0xf2,0x7f,0xff,0xff, + 0x8f,0xff,0xff,0xff,0xff,0x2b,0xfc,0xff,0xff,0xff,0xff,0x2f,0xfd,0xff,0x87, + 0xa0,0x4a,0xaa,0x8a,0x9f,0x4a,0x52,0x15,0xa9,0xff,0xff,0xff,0xff,0x5f,0x8a, + 0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xf8,0xff,0xff,0xff,0xff, + 0x57,0xf2,0xff,0x2f,0x82,0x52,0x05,0xd0,0x2f,0x95,0x4a,0x49,0x84,0xff,0xff, + 0xff,0xff,0xbf,0x24,0xf8,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x12,0xfd, + 0xff,0xff,0xff,0xff,0x4b,0xd5,0xff,0x9f,0x28,0x54,0x48,0xc5,0xbf,0x52,0x55, + 0x0a,0xe1,0xff,0xff,0xff,0xff,0x9f,0x4a,0xfa,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1a,0xfe,0xff,0xff,0xff,0xff,0x57,0xa9,0xff,0x3f,0x82,0x00,0x21, + 0xf0,0x5f,0x2a,0x49,0x21,0xc4,0xff,0xff,0xff,0xff,0xaf,0x1a,0xfd,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x85,0xff,0xff,0xff,0xff,0xff,0x29,0xa5,0xff, + 0xff,0x24,0x52,0x88,0xfc,0xbf,0x92,0x2a,0x09,0xf1,0xff,0xff,0xff,0xff,0x9f, + 0x4c,0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x15,0xff,0xff,0xff,0x7f, + 0xff,0xa5,0x4a,0xff,0xff,0x90,0x08,0x01,0xfe,0x3f,0x55,0x52,0x24,0xf4,0xff, + 0xff,0xff,0xff,0xaf,0x02,0xfd,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xc6, + 0xff,0xff,0xff,0xbf,0xfe,0x95,0x54,0xff,0xff,0x05,0x42,0xa8,0xfe,0xbf,0xa4, + 0x2a,0x41,0xf9,0xff,0xff,0xff,0xff,0x5f,0x55,0xfc,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0x4f,0xd0,0xff,0xff,0xff,0xbf,0x7c,0xaa,0x92,0xfc,0xff,0x53,0x08, + 0x01,0xff,0x1f,0x4a,0x01,0x04,0xfc,0xff,0xff,0xff,0xff,0x27,0x05,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xc5,0xff,0xff,0xff,0x4f,0xbf,0x52,0xaa, + 0xfe,0xff,0x07,0x42,0xea,0xff,0xbf,0x50,0x54,0x51,0xff,0xff,0xff,0xff,0xff, + 0x97,0x56,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xf0,0xff,0xff,0xff, + 0x2f,0x7f,0xa5,0x54,0xfd,0xff,0x3f,0x09,0xe0,0xff,0x1f,0x02,0x01,0x04,0xff, + 0xff,0xff,0xff,0xff,0xaf,0x02,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x4b, + 0xf5,0xff,0xff,0xff,0xab,0x9f,0x94,0x92,0xfc,0xff,0xff,0x40,0xfd,0xff,0x9f, + 0x48,0x48,0xa1,0xff,0xff,0xff,0xff,0xff,0xa7,0x56,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0x6b,0xf8,0xff,0xff,0xff,0xa4,0x5f,0xa9,0x2a,0xfd,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x22,0x21,0xc4,0xff,0xff,0xff,0xff,0xff,0x2f,0x03,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0xfa,0xff,0xff,0x7f,0xd5,0x2f,0xa5, + 0xa4,0xfa,0xff,0xff,0xff,0xff,0xff,0xbf,0x08,0x08,0xf9,0xff,0xff,0xff,0xff, + 0xff,0x97,0x4a,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xfc,0xff,0xff, + 0x7f,0x69,0xac,0x2a,0x55,0xf9,0xff,0xff,0xff,0xff,0xff,0x7f,0xa2,0x22,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x53,0x21,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0x15,0xfe,0xff,0xff,0x9f,0x2a,0x95,0x94,0x92,0xf4,0xff,0xff,0xff,0xff,0xff, + 0xff,0x08,0x88,0xfe,0xff,0xff,0xff,0xff,0xff,0x57,0x8b,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xa9,0xfe,0xff,0xff,0x5f,0x52,0xbc,0x52,0x55,0xf5,0xff, + 0xff,0xff,0xff,0xff,0xff,0x21,0x21,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xa1, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x7f,0x0d,0xff,0xff,0xff,0x57,0x15,0x3f, + 0x55,0x49,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xc8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xd7,0x89,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xbf,0xd6,0xff,0xff, + 0xff,0x4b,0x45,0x3f,0x49,0xaa,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf9, + 0xff,0xff,0xff,0xff,0xff,0xff,0xc9,0xe2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x81,0xff,0xff,0xff,0x29,0x11,0x5f,0x28,0x55,0xf5,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0xc8,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0x5f,0xd6,0xff,0xff,0x7f,0xaa,0xc2,0x0f,0x55,0x49,0xea, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa5, + 0xe2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x9f,0xe1,0xff,0xff,0xbf,0x4a,0xd1, + 0x5f,0x48,0xa5,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xe9,0xe0,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x27,0xf4,0xff, + 0xff,0xbf,0x94,0xc4,0x07,0x91,0x2a,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xea,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xaf,0xf1,0xff,0xff,0x9f,0x52,0xe0,0x4b,0x44,0x52,0xe9,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6a,0xe0,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0x4b,0xfc,0xff,0xff,0xab,0x2a,0xf5,0x0f,0x51,0xa5, + 0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x69,0xe5,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x55,0xf8,0xff,0xff,0x95,0x14, + 0xf0,0x5f,0x84,0x54,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x75,0xf0,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x13,0xfd, + 0xff,0xff,0xa5,0x42,0xf9,0x7f,0x91,0x4a,0xf5,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0xfa,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0x54,0xfe,0xff,0x7f,0x52,0x12,0xfa,0xff,0x20,0xa5,0xe4,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x34,0xf8,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0x25,0xff,0xff,0xaf,0xaa,0x48,0xfc,0xff,0x0b, + 0x29,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xb5,0xf8,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x52,0xff,0xff,0x2f,0x49, + 0x02,0xfe,0xff,0x43,0xaa,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x3a,0xfa,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x4a, + 0xff,0xff,0xa5,0x2a,0xa9,0xff,0xff,0x17,0x25,0xe9,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x9a,0xfc,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0x2a,0xff,0x7f,0x95,0x54,0x80,0xff,0xff,0x07,0xa9,0xea,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x1d,0xfc, + 0xff,0x7f,0xff,0xff,0xff,0xff,0x3f,0xa9,0xfe,0x7f,0xa9,0x12,0xe5,0xff,0xff, + 0x5f,0x4a,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x5f,0xad,0xfe,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x95,0xea,0x97,0x54, + 0x4a,0xf0,0xff,0xff,0x1f,0xa8,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x5f,0x0e,0xfe,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f, + 0x52,0x55,0xa9,0x92,0x02,0xfd,0xff,0xff,0x5f,0x53,0xf5,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x5e,0xfe,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xbf,0x2a,0x49,0x4a,0x55,0x49,0xfc,0xff,0xff,0x3f,0x94,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x0f, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4f,0xa5,0xaa,0x92,0xa4,0x20,0xff,0xff, + 0xff,0xbf,0xa4,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x5f,0x57,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f,0x52,0x52,0xaa, + 0x2a,0x0a,0xff,0xff,0xff,0x7f,0x54,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0x07,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xa7,0x94,0x4a,0x55,0x4a,0xa0,0xff,0xff,0xff,0xff,0xa8,0xfa,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x57,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x2f,0x55,0xa9,0x92,0x12,0xe9,0xff,0xff,0xff,0x7f,0x24, + 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf, + 0x87,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0xa5,0x4a,0xaa,0x44,0xf4,0xff, + 0xff,0xff,0xff,0x55,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0xab,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xab,0x94,0xa4, + 0x92,0x12,0xf9,0xff,0xff,0xff,0xff,0xa8,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xab,0x83,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0x47,0xa9,0x2a,0x55,0x40,0xfc,0xff,0xff,0xff,0xff,0x25,0xf5,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xd7,0x97,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0x33,0x55,0xa9,0x24,0x15,0xfe,0xff,0xff,0xff,0xff, + 0x95,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xff, + 0x93,0xc3,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0x25,0xa5,0x2a,0x40,0xff, + 0xff,0xff,0xff,0xff,0xa9,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xff, + 0xff,0xff,0xff,0xff,0xe7,0xd5,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4b,0x92, + 0x54,0x92,0xd4,0xff,0xff,0xff,0xff,0xff,0x55,0xf5,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xe9,0xff,0xff,0xff,0xff,0xff,0xd5,0xc1,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0x97,0xaa,0x4a,0x05,0xe2,0xff,0xff,0xff,0xff,0xff,0x25,0xf1,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xfd,0xff,0xff,0xff,0xff,0xd5,0xea,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0x55,0x25,0xa1,0xf0,0xff,0xff,0xff,0xff, + 0xff,0x95,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe8,0xfa,0xff,0xff,0xff, + 0xff,0xea,0xe0,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xa7,0x24,0x59,0x04,0xfa, + 0xff,0xff,0xff,0xff,0xff,0xa9,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe2, + 0xfd,0xff,0xff,0xff,0xff,0xc9,0xe9,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4f, + 0x52,0x05,0xa1,0xfc,0xff,0xff,0xff,0xff,0xff,0xa5,0xfa,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x70,0xf9,0xff,0xff,0xff,0xff,0x74,0xe2,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0x47,0x95,0x92,0x04,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe2,0xfa,0xff,0xff,0xff,0xff,0x72,0xe8, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x97,0xaa,0x20,0xd0,0xff,0xff,0xff,0xff, + 0xff,0xff,0x55,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xb8,0xfc,0xff,0xff, + 0xff,0xff,0xea,0xe2,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x07,0x04,0x82,0xc2, + 0xff,0xff,0xff,0xff,0xff,0xff,0x29,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x71,0xfd,0xff,0xff,0xff,0x7f,0x2a,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0x4f,0x91,0x28,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x54,0xfe,0xff,0xff,0xff,0x7f,0x75,0xf2,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x27,0x44,0x82,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x29, + 0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xb8,0xfc,0xff,0xff,0xff,0xbf,0x14, + 0xf1,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x0f,0x11,0x20,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x55,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x9a,0xfe,0xff, + 0xff,0xff,0x7f,0x5a,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f,0x40,0x85, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x09,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x4f,0x2d,0xfd,0xff,0xff,0xff,0x9f,0x12,0xf9,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0x3f,0x14,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0xa6,0xfe,0xff,0xff,0xff,0x5f,0x4d,0xfa,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0x40,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x09,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x4b,0xfe,0xff,0xff,0xff,0xbf, + 0x2c,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x43,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x57,0xff, + 0xff,0xff,0xff,0x5f,0x0a,0xfe,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x89,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xd5,0xa9,0xff,0xff,0xff,0xff,0xaf,0x5a,0xfc,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa3,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x81,0x95,0xff,0xff,0xff,0xff,0x9f,0x06,0xfd,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xa5,0xff,0xff,0xff,0xff, + 0x2f,0x95,0xfc,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xea, + 0xff,0xff,0xff,0xff,0xaf,0x26,0xfe,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd5,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xf5,0xf4,0xff,0xff,0xff,0xff,0xaf,0x86,0xfe,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc1,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x70,0xe5,0xff,0xff,0xff,0xff,0x4f,0x2e,0xfe, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xb2,0xfa,0xff,0xff,0xff, + 0xff,0x57,0x83,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x78, + 0xf2,0xff,0xff,0xff,0xff,0xa7,0x22,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x5f,0x5d,0xfd,0xff,0xff,0xff,0xff,0x97,0x87,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x3c,0xfd,0xff,0xff,0xff,0xff,0x53,0xa3, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xac,0xfe,0xff,0xff, + 0xff,0xff,0x57,0x95,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x9e,0xfe,0xff,0xff,0xff,0xff,0x97,0x81,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0x57,0xfe,0xff,0xff,0xff,0xff,0xa9,0xa5,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xaf,0xff,0xff,0xff,0xff,0xff,0x4b, + 0x89,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x93,0xff,0xff, + 0xff,0xff,0xff,0x95,0xa2,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x83,0xab,0xff,0xff,0xff,0xff,0xff,0xd3,0xc8,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xff, + 0xff,0xff,0xff,0xff,0xe9,0xa5,0xff,0xff,0xff,0xff,0xff,0xa5,0xe1,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xd5,0xff,0xff,0xff,0xff,0xff, + 0xd5,0xc8,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xea,0xea,0xff, + 0xff,0xff,0xff,0xff,0x14,0xc1,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff, + 0xff,0xe0,0xe4,0xff,0xff,0xff,0xff,0xff,0x65,0xe8,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf, + 0xff,0xff,0xff,0xff,0x3f,0x72,0xe9,0xff,0xff,0xff,0xff,0xff,0x6a,0xe1,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xbf,0xb8,0xfa,0xff,0xff,0xff,0xff, + 0xff,0x52,0xea,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0x1f,0x7a,0xf5, + 0xff,0xff,0xff,0xff,0x7f,0x2a,0xe0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff, + 0xff,0x8f,0x58,0xfa,0xff,0xff,0xff,0xff,0x7f,0x25,0xf5,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xb5,0xff,0xff,0xdf,0xff,0x57,0x5e,0xfd,0xff,0xff,0xff,0xff,0xff,0x34,0xe0, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xca,0xff,0xff,0x8f,0xff,0x07,0xac,0xfc,0xff,0xff,0xff, + 0xff,0x7f,0x2a,0xf5,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd4,0xff,0xff,0x57,0xff,0x2b,0x2d, + 0xfd,0xff,0xff,0xff,0xff,0xff,0xb2,0xf0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xff,0xff, + 0x07,0xff,0x43,0x4a,0xff,0xff,0xff,0xff,0xff,0xbf,0x2a,0xf8,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0xc5,0xff,0xff,0x2b,0xfe,0x08,0xab,0xfe,0xff,0xff,0xff,0xff,0x7f,0xaa, + 0xf2,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0xea,0xff,0xff,0x83,0x36,0x20,0x55,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x15,0xf0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xc2,0xff,0xff,0x48,0x4a,0x85, + 0x49,0xff,0xff,0xff,0xff,0xff,0x7f,0x59,0xfa,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xf5,0xff, + 0x7f,0x10,0x29,0x50,0xa5,0xff,0xff,0xff,0xff,0xff,0x3f,0x15,0xf9,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x97,0xe4,0xff,0x7f,0x05,0x95,0x42,0xd5,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x35,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xab,0xea,0xff,0xbf,0xa0,0x24,0xa8,0xd4,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x19,0xf9,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x27,0xe5,0xff,0x3f,0x92,0xaa, + 0x50,0xe9,0xff,0xff,0xff,0xff,0xff,0x9f,0x4a,0xfc,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa9,0xe2, + 0xff,0x9f,0xa0,0xaa,0x2a,0xf5,0xff,0xff,0xff,0xff,0xff,0x5f,0x1a,0xf9,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x95,0xf8,0xff,0x5f,0x4a,0x92,0x4a,0xf5,0xff,0xff,0xff,0xff,0xff, + 0xbf,0x4a,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x52,0xf2,0xff,0x1f,0x20,0x49,0xa5,0xfa,0xff, + 0xff,0xff,0xff,0xff,0x5f,0x1a,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaa,0xf8,0xff,0x47,0xa9, + 0x2a,0x29,0xf9,0xff,0xff,0xff,0xff,0xff,0xbf,0x0a,0xfc,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x49, + 0xf2,0xff,0x17,0x92,0xaa,0xaa,0xfe,0xff,0xff,0xff,0xff,0xff,0x9f,0xac,0xfe, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x9f,0x2a,0xf8,0xff,0x43,0xa8,0x24,0x25,0xff,0xff,0xff,0xff,0xff, + 0xff,0xaf,0x0a,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x94,0xfa,0xff,0x91,0x54,0xaa,0x52,0xff, + 0xff,0xff,0xff,0xff,0xff,0x2f,0x4d,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x45,0xfc,0xff,0x03, + 0x92,0x52,0xaa,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x06,0xfc,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf, + 0x12,0xfe,0xff,0x50,0xaa,0x2a,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xa5, + 0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0x44,0xff,0xff,0x0a,0x25,0xa5,0xa4,0xff,0xff,0xff,0xff, + 0xff,0xff,0x97,0x06,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x15,0xff,0xff,0x40,0xa9,0x92,0xea, + 0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x55,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xa1,0xff,0x7f, + 0x92,0x4a,0xaa,0xd4,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x06,0xfc,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x95,0x8a,0xff,0x3f,0x84,0x54,0xa9,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0x2f, + 0x25,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x52,0xe0,0xff,0xbf,0x50,0xa9,0x4a,0xf2,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0x8e,0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa9,0xea,0xff,0x3f,0x24,0x95,0x54, + 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x23,0xfe,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x4a,0xf0,0xff, + 0x9f,0x50,0x69,0x49,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x8b,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xa5,0xf4,0xff,0x0f,0x2d,0x75,0xaa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, + 0xaf,0x03,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x9f,0x14,0xfa,0xff,0x2f,0xa8,0xfa,0x25,0xfd,0xff,0xff, + 0xff,0xff,0xff,0xff,0x97,0xd7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xaa,0xfc,0xff,0x0f,0x4d,0xfd, + 0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x83,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x12,0xfc, + 0xff,0x27,0x92,0xfe,0xcb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd7,0xd7,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x97,0x0a,0xff,0xff,0x83,0x56,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xef,0xc7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xab,0x24,0xff,0xff,0x2b,0xaa,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xe7,0xef,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x45,0xff,0xff,0x05,0x95, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0x82, + 0xff,0xff,0x51,0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xa9,0xe8,0xff,0xff,0x85,0xca,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x52,0xc1,0xff,0xff,0x90,0xd5,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x4d,0xe8,0xff,0xff,0xa5, + 0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x51, + 0xf2,0xff,0x7f,0x40,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x95,0xf8,0xff,0x7f,0xa9,0xea,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x15,0xfa,0xff,0x3f,0xa4,0xf4,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xa4,0xfc,0xff,0x7f, + 0x71,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f, + 0x15,0xfe,0xff,0x3f,0x94,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0x0a,0xff,0xff,0x1f,0x79,0xf2,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0xa4,0xff,0xff,0x5f,0x8c,0xfa,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x53,0x82,0xff,0xff, + 0x1f,0x5c,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xa4,0x92,0xff,0xff,0xbf,0x56,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x9a,0xc4,0xff,0xff,0x0f,0x2e,0xfd,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa2,0xf0,0xff,0xff,0xaf,0xa7,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x55,0xe4,0xff, + 0xff,0x0f,0x57,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xbf,0x54,0xf2,0xff,0xff,0x9f,0x4b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x9f,0x92,0xf8,0xff,0xff,0xc7,0xab,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x15,0xfe,0xff,0xff,0x97,0xd7, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa7,0x94,0xfc, + 0xff,0xff,0xc7,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x2f,0x05,0xfe,0xff,0xff,0xcf,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x53,0xa9,0xff,0xff,0xff,0xd3,0xeb,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x05,0xff,0xff,0xff,0xe3, + 0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x54,0xc2, + 0xff,0xff,0xff,0xeb,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x95,0xc8,0xff,0xff,0xff,0xf3,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xd2,0xff,0xff,0xff,0xff,0xf5,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xaa,0xe0,0xff,0xff,0xff, + 0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x49, + 0xf8,0xff,0xff,0xff,0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x9f,0x2a,0xf5,0xff,0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x4a,0xf8,0xff,0xff,0xff,0xff,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x14,0xfd,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97, + 0x4a,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xab,0x04,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0x52,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x53,0x85,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x54,0xa2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x4a,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xe0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x94,0xe4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x5f,0x55,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0x12,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x54,0xfa,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x0a,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x53,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x97,0x14,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x45,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x54,0x82, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x4a,0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x52,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0xe8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x24, + 0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x55,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x24,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x15,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f, + 0x49,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x2f,0x95,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x01,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x57,0x81,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x97,0xd4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xe0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x93,0xf4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x57,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x2b,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x89,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x05,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x49,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x22,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x89, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xe9,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0x9f,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0x6f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/image.pbm b/tests/benchmarks/gui/image/qimagereader/images/image.pbm new file mode 100644 index 0000000..67e5efa --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/image.pbm @@ -0,0 +1,8 @@ +P1 +16 6 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 diff --git a/tests/benchmarks/gui/image/qimagereader/images/image.pgm b/tests/benchmarks/gui/image/qimagereader/images/image.pgm new file mode 100644 index 0000000..443bf40 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/image.pgm @@ -0,0 +1,10 @@ +P2 +24 7 +15 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 +0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 +0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 +0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 +0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/benchmarks/gui/image/qimagereader/images/image.png b/tests/benchmarks/gui/image/qimagereader/images/image.png new file mode 100644 index 0000000..7d4890a Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/image.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/image.ppm b/tests/benchmarks/gui/image/qimagereader/images/image.ppm new file mode 100644 index 0000000..2a5640e --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/image.ppm @@ -0,0 +1,7 @@ +P3 +4 4 +15 + 0 0 0 0 0 0 0 0 0 15 0 15 + 0 0 0 0 15 7 0 0 0 0 0 0 + 0 0 0 0 0 0 0 15 7 0 0 0 +15 0 15 0 0 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/tests/benchmarks/gui/image/qimagereader/images/kollada-noext b/tests/benchmarks/gui/image/qimagereader/images/kollada-noext new file mode 100644 index 0000000..2abd4bb Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/kollada-noext differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/kollada.png b/tests/benchmarks/gui/image/qimagereader/images/kollada.png new file mode 100644 index 0000000..2abd4bb Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/kollada.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/marble.xpm b/tests/benchmarks/gui/image/qimagereader/images/marble.xpm new file mode 100644 index 0000000..1c08049 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/marble.xpm @@ -0,0 +1,470 @@ +/* XPM */ +static const char *marble_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 240 240 223 2", +/* colors */ +".. c #959595", +".# c #c5c5c5", +".a c #adadad", +".b c #dedede", +".c c #b7b7b7", +".d c #d2d2d2", +".e c #bebebe", +".f c #c9c9c9", +".g c #b8b8b8", +".h c #d6d6d6", +".i c #9e9e9e", +".j c #eaeaea", +".k c #b2b2b2", +".l c #cecece", +".m c #a5a5a5", +".n c #e4e4e4", +".o c #c4c4c4", +".p c #d9d9d9", +".q c #b1b1b1", +".r c #d8d8d8", +".s c #e0e0e0", +".t c #d6d6d6", +".u c #b6b6b6", +".v c #bfbfbf", +".w c #cbcbcb", +".x c #a5a5a5", +".y c #d1d1d1", +".z c #cdcdcd", +".A c #aaaaaa", +".B c #9a9a9a", +".C c #dedede", +".D c #aeaeae", +".E c #e6e6e6", +".F c #d3d3d3", +".G c #c8c8c8", +".H c #bababa", +".I c #c4c4c4", +".J c #cccccc", +".K c #bcbcbc", +".L c #f0f0f0", +".M c #b5b5b5", +".N c #e3e3e3", +".O c #c2c2c2", +".P c #adadad", +".Q c #c9c9c9", +".R c #e1e1e1", +".S c #a2a2a2", +".T c #d1d1d1", +".U c #bebebe", +".V c #dbdbdb", +".W c #dbdbdb", +".X c #c8c8c8", +".Y c #b9b9b9", +".Z c #a8a8a8", +".0 c #d3d3d3", +".1 c #9f9f9f", +".2 c #c1c1c1", +".3 c #ebebeb", +".4 c #b4b4b4", +".5 c #d9d9d9", +".6 c #cecece", +".7 c #e8e8e8", +".8 c #d6d6d6", +".9 c #c5c5c5", +"#. c #b0b0b0", +"## c #dadada", +"#a c #c5c5c5", +"#b c #d1d1d1", +"#c c #afafaf", +"#d c #b1b1b1", +"#e c #cbcbcb", +"#f c #c1c1c1", +"#g c #eeeeee", +"#h c #9b9b9b", +"#i c #c6c6c6", +"#j c #c0c0c0", +"#k c #cbcbcb", +"#l c #bdbdbd", +"#m c #a1a1a1", +"#n c #b7b7b7", +"#o c #a7a7a7", +"#p c #e6e6e6", +"#q c #c9c9c9", +"#r c #bbbbbb", +"#s c #e2e2e2", +"#t c #b8b8b8", +"#u c #cdcdcd", +"#v c #d3d3d3", +"#w c #cfcfcf", +"#x c #e0e0e0", +"#y c #d5d5d5", +"#z c #bdbdbd", +"#A c #cecece", +"#B c #c0c0c0", +"#C c #b7b7b7", +"#D c #e5e5e5", +"#E c #c4c4c4", +"#F c #e3e3e3", +"#G c #d3d3d3", +"#H c #dddddd", +"#I c #dddddd", +"#J c #acacac", +"#K c #a3a3a3", +"#L c #eaeaea", +"#M c #e1e1e1", +"#N c #b9b9b9", +"#O c #d5d5d5", +"#P c #bababa", +"#Q c #d7d7d7", +"#R c #b5b5b5", +"#S c #d1d1d1", +"#T c #c6c6c6", +"#U c #dcdcdc", +"#V c #b4b4b4", +"#W c #c6c6c6", +"#X c #a8a8a8", +"#Y c #a0a0a0", +"#Z c #cbcbcb", +"#0 c #bfbfbf", +"#1 c #cbcbcb", +"#2 c #a4a4a4", +"#3 c #c0c0c0", +"#4 c #bbbbbb", +"#5 c #9c9c9c", +"#6 c #a2a2a2", +"#7 c #dcdcdc", +"#8 c #c3c3c3", +"#9 c #9d9d9d", +"a. c #aaaaaa", +"a# c #d5d5d5", +"aa c #eeeeee", +"ab c #b6b6b6", +"ac c #b0b0b0", +"ad c #b3b3b3", +"ae c #c9c9c9", +"af c #e9e9e9", +"ag c #bdbdbd", +"ah c #a0a0a0", +"ai c #b0b0b0", +"aj c #e8e8e8", +"ak c #cacaca", +"al c #c3c3c3", +"am c #dbdbdb", +"an c #d0d0d0", +"ao c #d8d8d8", +"ap c #c7c7c7", +"aq c #dcdcdc", +"ar c #c7c7c7", +"as c #f0f0f0", +"at c #a3a3a3", +"au c #bfbfbf", +"av c #d9d9d9", +"aw c #dfdfdf", +"ax c #d3d3d3", +"ay c #c0c0c0", +"az c #cacaca", +"aA c #b3b3b3", +"aB c #cfcfcf", +"aC c #dadada", +"aD c #b2b2b2", +"aE c #e2e2e2", +"aF c #d7d7d7", +"aG c #c4c4c4", +"aH c #b8b8b8", +"aI c #cdcdcd", +"aJ c #a6a6a6", +"aK c #d2d2d2", +"aL c #cecece", +"aM c #acacac", +"aN c #dfdfdf", +"aO c #d5d5d5", +"aP c #c9c9c9", +"aQ c #bcbcbc", +"aR c #c6c6c6", +"aS c #cdcdcd", +"aT c #bebebe", +"aU c #f2f2f2", +"aV c #b6b6b6", +"aW c #e4e4e4", +"aX c #c3c3c3", +"aY c #e2e2e2", +"aZ c #d2d2d2", +"a0 c #dddddd", +"a1 c #dcdcdc", +"a2 c #ececec", +"a3 c #eaeaea", +"a4 c #cccccc", +"a5 c #c7c7c7", +"a6 c #c2c2c2", +"a7 c #cccccc", +"a8 c #a8a8a8", +"a9 c #e7e7e7", +"b. c #e4e4e4", +"b# c #d9d9d9", +"ba c #bababa", +"bb c #cfcfcf", +"bc c #d4d4d4", +"bd c #d0d0d0", +"be c #aeaeae", +"bf c #e1e1e1", +"bg c #d7d7d7", +"bh c #cfcfcf", +"bi c #b8b8b8", +"bj c #e6e6e6", +"bk c #c5c5c5", +"bl c #e4e4e4", +"bm c #d4d4d4", +"bn c #dfdfdf", +"bo c #dedede", +"bp c #ececec", +"bq c #bababa", +"br c #bcbcbc", +"bs c #b0b0b0", +"bt c #cccccc", +"bu c #a6a6a6", +"bv c #c1c1c1", +"bw c #bcbcbc", +"bx c #ababab", +"by c #d7d7d7", +"bz c #b7b7b7", +"bA c #b2b2b2", +"bB c #b4b4b4", +"bC c #bfbfbf", +/* pixels */ +"aYbla9a9a9.7#D.N#L#La9.7a9#D#D.7#D#D#DaY#x#xa0ama0ama0am#xbnbnbnaYaYaYaYaY#DaYaYaYbn#x#x#xaY.N#Da9a9a9a9a9a9a9a9a9.7a9a9a9#Da9#D#L#L#L#L#L#La2#La2a2a2a2a2a2#ga2#ga2#ga2a2#ga2a2#L#L#L#Lafa9a9a9bl#Dbl#Da9a9a9#L#L#Laf#L#Laf#L#L#L#L#L#L#L#L#L#La2#La2a2a2#La2#L#L#Laf#L#Laf#L#Laf#L#Laf#L#Laf#Laf#Laf#Laf#Laf#L#D#DblblaYaYaCa0.t.Fb#bnbnaCbnblblblblblaYaY.RaYblblblblblblblbla9a9a9a9a9a9#pa9a9#pa9#pa9#pa9#pa9#pa9a9bl#D#D#D#pa9#pafa9a9a9a9#L#Lafa9a9a9#D#D#pbl#U.V.Vb#.8am#xbn#IaYbl.N.N#x", +"am#I#Da9a9a9bj#D#La9.7#D#Da9#D#D#p#DaYaY#xbna0amamamb#a0a0a0a0bnawaYaYaYaYaYaYaY#xbnaY.R#xaYaY.Nafa9afa9afa9afa9.7a9.7a9bja9bja9#Lafa2afa2af#L#L.3#La2#La2bpa2#La2#ga2a2#ga2a2#g#L#Laf#L#La9afa9bl#Dbl#Da9afa9#L#Laf#L#Laf#L#Laf#L#L#L#L#L#L#L.7a2#La2a2#La2#La2#Laf#L#Laf#Laf#Lafajaf#L#Laf#L#L#Lafajafajafajaf.na9#s#Daw#xbnaCb#bg.Vbnbn.RaYaY#Mbl#pblaYblaYaYa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a9.7aw#xaCa0#IaYa9#D#D#D#D#D.NaY.saY#Dbl#DaYaYaYaY.na9#pa9a9#p.na9af#p#pa9a9a9#pa9#Dbl#Da9.na9#L#Laf#L#Lafajaf#Lafafafafafafafa9a9afa9a9bja9bj#D#D#D#DaY#x.Wa0av.5.pamaCa0#Ua0#x#xa0bnaYaw.R.Cb#am", +"amam#xbla9a9a9a9a9a9.7a9.7afa2#Laf#Laf#La2#La2#La2a2a2a2a2a2a2a2#Laf#Laf#La2#L.3a2a2a2a2asa2#La2#gafa9blaYawaYaYawbn#IaYawaw#D#Da9.Ea9#Lafaf#L#L#L#La2a2a2a2a2a2a2a2#La2af#L#Lafajaf#L.na9bja9#D#p#pbl#M#x#Ia0bn#I.NaY#D#Da9a9.7af.Eafa9aja9#Lafa9a9a9a9#Lafa9afajafafafaf#Lafafa2.ja2afajaf#L.na2a9aY.Cbgam#x#Ma9.n#Lajafa9.N.N#pa9bl.N#MaYaYaY#p#pa9#pa9#pa9#p#pa9#p.n#p#p.n#pa9#pa9a9#paf#pa9a9.n#pafafafafafafafa9afa9afa9a9.na9a9a9a9a9#D#D.n#paYaYa0amb#amb#a0a0a0.Ca0#I#xaw#xaY#x#xaCa0aC", +"ama0#xbla9.na9a9bja9#Da9a9ajaf#La2aj#Lafa2#La2#La2a2#La2#La2#La2af#Lafa2#Laf#L#La2a2a2asa2a2a2a2a2#La9blaYaYaYawaYaY#xawaY.N#s#Daja9#Lafajaf#Laf#L.j#La2#La2#La2#La2#La2#L#L#L#L#L#Laf.7a9#D.n#Da9.nblblaYaY#xaC#x#IaY.s#D#sa9.na9a9a9a9a9a9a9a9a9afa9afa9a9#La9afafaj#Lafaf#Lafa2#La2#Lafafaj#La2.naw.CamaC#xaY#D#D#La9a9#sbl.Na9#M#DblaYaYaY#xbla9#p#pa9#pa9#pa9#pa9#p#pa9#p#p#pa9.n#pa9a9a9af#pafa9afa9a9afa9#La9af.7afa9afafa9afa9a9.na9#Dbl#p#pblbn#U.5bg.5a0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2#ga2a2#ga2aaasa2a2#La2a2#L#L#L.3#La9.7a9#DaYblaYblbla9a9ajaf#Laf#L#Lafajaf#Lafafaf#Laf#L#La2#L#L#L#L#L.7.7a9a9a9a9a9.na9a9.na9a9a9a9a9a9.na9a9.n#D#D#D#D#D#MblawawbnaC.F.t.Fb#.Vb#.Vbnaw#xaYaYaYaY.NaY#D#Da9#pa9a9#p.n#pa9.nbla9#pa9#pa9#pa9#p#p#pa9.na9afafafafafafafafafa9a9afa9af#pafafafafa9#p#Dblblaw#xbn#Ubn#x#IbnaCb#aCbnawaY#D.na9", +"#pa9#pa9a9#Dbla9a9a9af#D#Da9#D#D#xbn#xbnaYaYblaYaYaYaYaYaYaYaYaYbnaYaYaYaYaYaYaY.R.R.RbnaYaYaYaY#D.7#Da9#La2#Lafajafafa9a9a9a9#Dafafafaf#La2#L#La2a2#ga2a2#gaaa2asaaa2a2a2a2a2a2a2#L#L#La9a9.7a9#D.saY#D.n#pafaf#Lafaj#L#Laf#L#Laf#L#L#L#L#Lafaja2a2a2a2#L.E#L#La9a9a9.7a9a9a9a9a9.7a9.na9a9a9a9.E#L.7.7#D#s#D#s#Fblbl#M#xbnbg.t.F.t.V.V.VaCa0aY#DaYaYaYaY.Nblbl.na9#p.na9a9#pa9#p#pa9#pa9#pa9#pa9#p#D#pa9#p#pa9afafafaf#Lafafa9af#pa9#pa9afa9afafaf#pa9a9#D#DaYbnbn#xbn#Ua0bna0bg.Va0aYblbl#pa9" +}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm b/tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm new file mode 100644 index 0000000..f6485d5 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm @@ -0,0 +1,18 @@ +/* XPM */ +static char *xman[] = { +/* width height ncolors chars_per_pixel */ +"8 8 3 1", +/* colors */ +"e g4 black c pale turquoise 4", +"f m white c light golden rod yellow g4 grey", +"g g white c lemon chiffon m black", +/* pixels */ +"eeeeeeee", +"ffffffff", +"gggggggg", +"gggggggg", +"gggggggg", +"gggggggg", +"gggggggg", +"gggggggg" +}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp b/tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp new file mode 100644 index 0000000..875887a Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp new file mode 100644 index 0000000..1a5ca9c Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif new file mode 100644 index 0000000..27784d6 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm b/tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm new file mode 100644 index 0000000..00c21ef --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm @@ -0,0 +1,788 @@ +/* XPM */ +static char *dummy[]={ +"8 8 777 2", +"#R c #000000", +"fn c #000001", +".e c #000069", +".f c #00006d", +".g c #00006e", +"#d c #0042b4", +"aJ c #010101", +"g0 c #010102", +"dr c #010202", +"gd c #010203", +"#J c #0157bb", +"e. c #020202", +"du c #020304", +"fR c #030303", +"jJ c #040404", +"hf c #040608", +"fE c #040609", +"cO c #04070a", +"k# c #050505", +"gC c #050709", +"ka c #060606", +"br c #06080a", +"dY c #06090d", +"hI c #070707", +"in c #07090b", +"cL c #070a0e", +"cd c #070b0f", +"e0 c #080808", +"gZ c #080b0e", +"eu c #080b0f", +"dz c #080c10", +"hD c #090909", +"fq c #090d11", +"cH c #090e13", +"jB c #0a0a0a", +"#U c #0a0d0f", +"a4 c #0a0d10", +"g3 c #0a0d11", +"fu c #0a0f14", +"cj c #0a1016", +"kb c #0b0b0b", +"#n c #0b0d0f", +"a1 c #0b0e10", +"g8 c #0b0f13", +"f4 c #0b0f14", +"hE c #0c0c0c", +"bf c #0c0f12", +".X c #0c28a0", +"bT c #0d0d0d", +"ax c #0d1014", +"hr c #0d1217", +"dH c #0d141b", +"jy c #0e0e0e", +"aW c #0e1115", +"eH c #0e141b", +"bE c #0f0f0f", +"ar c #0f1317", +"g5 c #0f1419", +"hg c #0f151a", +"fh c #0f151c", +"dJ c #0f171f", +"gI c #101010", +".z c #101094", +"h. c #10161b", +"gm c #10161c", +"eL c #10171f", +"hK c #111111", +"at c #11161b", +"fC c #111820", +"dA c #111922", +"aj c #1163c4", +"bJ c #121212", +"#Z c #12161a", +"ba c #12171c", +"ho c #12181e", +"jK c #131313", +"iq c #13191d", +"cA c #131e2a", +"c7 c #141414", +"dR c #141e29", +"jr c #151515", +"aA c #151a1f", +"hq c #151c23", +"fl c #151e28", +"eV c #151e29", +"d4 c #161616", +"hw c #161e25", +"jk c #171717", +"bs c #171d23", +"g9 c #171f27", +"eC c #17212b", +"b9 c #172432", +"d5 c #181818", +"as c #181e24", +"bn c #181f25", +"bS c #191919", +"gr c #19232d", +"ed c #1a1a1a", +".d c #1a1a6e", +"gB c #1a242e", +"eK c #1a2531", +"dQ c #1a2633", +"hL c #1b1b1b", +"g1 c #1b242d", +"g# c #1b252f", +"eJ c #1b2734", +"d1 c #1b2937", +"bW c #1c1c1c", +"gW c #1c262f", +"ci c #1c2b3b", +"cs c #1c2c3c", +"e# c #1d1d1d", +"#3 c #1d232a", +"f8 c #1d2833", +"fI c #1d2936", +"eO c #1d2a38", +"cw c #1d2e3f", +"jR c #1e1e1e", +"a2 c #1e262e", +"eP c #1e2b39", +"dE c #1e2d3d", +"cF c #1e2f41", +"aO c #1e6ec9", +"c4 c #1f1f1f", +"gx c #1f2a36", +"c# c #1f3043", +"j2 c #202020", +"bk c #202931", +"ht c #202c36", +"eF c #202f3e", +"b7 c #203245", +"cB c #203246", +"hG c #212121", +"aE c #212932", +"bp c #212a32", +"hl c #212d38", +"cc c #213347", +".M c #214eb7", +"hF c #222222", +"#7 c #222a32", +"fw c #223040", +"eU c #223141", +"jC c #232323", +"bb c #232c35", +"ga c #23303d", +"cv c #23364a", +"cn c #23364b", +"jl c #242424", +"gj c #243240", +"cm c #24374c", +"c. c #24384d", +"bF c #252525", +"be c #252f39", +"gt c #253341", +"dU c #253649", +".Y c #256cc9", +"jG c #262626", +"h8 c #26333d", +"hb c #263440", +"gs c #263443", +"cr c #263b51", +"cW c #272727", +"aC c #27313b", +"a9 c #27313c", +"fk c #273748", +"eR c #27384b", +"cq c #273d55", +"jV c #282828", +"#5 c #28313b", +"b0 c #2877ce", +"gL c #292929", +"#Y c #29323c", +"hu c #293744", +"fK c #293a4d", +"jP c #2a2a2a", +"#w c #2a323b", +"bg c #2a3540", +"dF c #2a3f55", +"jn c #2b2b2b", +"a6 c #2b3641", +"jY c #2c2c2c", +"h5 c #2c3b47", +"hp c #2c3c4a", +"gp c #2c3c4d", +"cx c #2c445e", +"bU c #2d2d2d", +"h# c #2d3e4c", +"dS c #2d435b", +"e5 c #2e2e2e", +"cG c #2e4762", +"jF c #2f2f2f", +"aG c #2f3b48", +"gU c #2f3f4e", +"ck c #2f4966", +"j0 c #303030", +"a0 c #303d4a", +"he c #304251", +"cQ c #307ace", +"e4 c #313131", +"ew c #31465d", +"dW c #314862", +"ce c #314b68", +"jm c #323232", +"bm c #323f4d", +"k. c #333333", +"e3 c #343434", +"hi c #344757", +"eT c #344b64", +"b8 c #34506f", +"dj c #347fd1", +"bX c #353535", +"f9 c #35485c", +"ac c #363636", +"#V c #36434f", +"fv c #364c64", +"dV c #36506d", +"c2 c #373737", +"ev c #37506a", +"bI c #383838", +"bw c #384655", +"h4 c #384b5a", +"hk c #384c5d", +"ea c #393939", +"bh c #394857", +"gX c #394d5f", +"#e c #3981d2", +"e6 c #3a3a3a", +"eS c #3a546f", +"em c #3a81d2", +"#F c #3b3b3b", +"eQ c #3b5571", +"dT c #3b5776", +"cI c #3b5c7f", +"gJ c #3c3c3c", +"hX c #3c5060", +"fi c #3c546f", +"gG c #3d3d3d", +"jv c #3e3e3e", +"az c #3e4e5e", +"fL c #3e5772", +"bK c #3f3f3f", +"gD c #3f576f", +"fJ c #3f5874", +"d2 c #3f86d5", +"jx c #404040", +"#8 c #404e5d", +"bv c #405161", +"cf c #406389", +"jL c #414141", +"iG c #415561", +"im c #415663", +"gz c #415971", +"et c #415d7c", +"cz c #41658c", +"f# c #418ad7", +"jT c #424242", +"gy c #425b74", +"fs c #425d7a", +"#K c #4288d4", +"jQ c #434343", +"eX c #438cda", +"j8 c #444444", +".L c #44449a", +"eZ c #454545", +"#s c #455362", +"fx c #45617f", +"cK c #456b94", +"aP c #458cd5", +"ab c #464646", +".n c #46469f", +"aH c #46586a", +"gV c #465f74", +"d0 c #46678c", +"c9 c #474747", +"aF c #47596c", +"a3 c #475a6d", +"ex c #476687", +"jU c #484848", +"by c #485b6e", +"gq c #48627d", +"dI c #486b91", +"cC c #48709b", +"js c #494949", +"#2 c #495a6b", +"ih c #49606f", +"hm c #49637a", +"gk c #49647f", +"j7 c #4a4a4a", +"dt c #4a6e94", +"ak c #4a8dd7", +"b1 c #4a90db", +"c1 c #4b4b4b", +"bx c #4b5f72", +"fr c #4b698a", +"dG c #4b6e95", +"co c #4b75a2", +"fW c #4b91db", +"bD c #4c4c4c", +"hc c #4c687f", +"j6 c #4d4d4d", +"#Q c #4d5f71", +"ik c #4d6676", +"hH c #4e4e4e", +"#0 c #4e5f72", +"aD c #4e6277", +"b. c #4e6377", +"gN c #4e91dc", +"c0 c #4f4f4f", +"bj c #4f6378", +"dZ c #4f759e", +"cD c #4f7aa9", +"hN c #4f8dcd", +"kd c #505050", +"#S c #506275", +"#6 c #506376", +"ge c #506e8c", +"af c #515151", +"b# c #51667b", +"dk c #5195df", +"cT c #525252", +".c c #525280", +"bq c #52677d", +"iH c #526b79", +"fj c #527397", +"eW c #52769d", +"dy c #527aa5", +"hJ c #535353", +"#x c #536476", +"eG c #53789f", +"jM c #545454", +"#r c #546577", +"bz c #546a80", +"dM c #547ca8", +"fP c #5499e2", +"jp c #555555", +"iK c #556f7e", +"bM c #565656", +"fB c #56799f", +"dC c #567fab", +"gE c #569be2", +"cU c #575757", +"h7 c #57748b", +"gc c #577797", +"fN c #577ba1", +"dx c #5780ad", +"cg c #5787bb", +"i4 c #585858", +"iF c #587483", +"hy c #587792", +"g2 c #587893", +"fy c #587ca3", +"eA c #587ea7", +"jW c #595959", +"bu c #597087", +"ia c #5984b2", +"ae c #5a5a5a", +"#t c #5a6c7f", +"bd c #5a7189", +"ij c #5a7789", +"eI c #5a81ab", +"bR c #5b5b5b", +"ch c #5b8dc3", +"en c #5b9be1", +"ke c #5c5c5c", +"cP c #5c8fc5", +"j5 c #5d5d5d", +"iN c #5d7fa0", +"gl c #5d80a3", +"fp c #5d83ac", +"cl c #5d8fc6", +"b2 c #5d9de6", +"c8 c #5e5e5e", +"hh c #5e7f9c", +"hn c #5e809d", +"i3 c #5f5f5f", +"#1 c #5f758c", +"a8 c #5f7890", +"g7 c #5f819e", +"cJ c #5f93cc", +"jz c #606060", +"ct c #6094cd", +"bO c #616161", +"eN c #618cb9", +"jH c #626262", +"iW c #627c8d", +"hd c #6285a3", +"ey c #628dbb", +"dO c #6290c4", +"ca c #6297d1", +"jI c #636363", +"eM c #638fbd", +"jN c #646464", +"fH c #648db9", +"eE c #648fbe", +"cb c #649ad5", +"hA c #64a8e2", +"jw c #656565", +"#k c #65798f", +"fF c #658eba", +"fA c #658fbb", +"fa c #65a4e7", +"b3 c #65a6e8", +"jX c #666666", +"hW c #6688a3", +"gh c #668cb2", +"aI c #6696cb", +"dN c #6697cc", +"bA c #6699ce", +"cu c #669edb", +"#C c #676767", +"f3 c #678db4", +"dl c #67a6eb", +"kc c #686868", +"cS c #696969", +"dK c #699bd2", +"cN c #69a2e0", +"cy c #69a3e1", +"fX c #69a6e8", +"jD c #6a6a6a", +"av c #6a84a1", +"ds c #6a9cd3", +"dL c #6a9cd4", +"jt c #6b6b6b", +"fo c #6b97c6", +"cE c #6ba5e4", +"jS c #6c6c6c", +"aV c #6c88a4", +"ir c #6c8ea4", +"il c #6c8fa5", +"eD c #6c9bce", +"dB c #6c9ed7", +"dq c #6c9fd8", +"cM c #6ca7e7", +"cp c #6ca8e8", +"eo c #6cabed", +"i2 c #6d6d6d", +"#T c #6d869f", +"#W c #6d87a0", +"gY c #6d94b5", +"aa c #6d9bcb", +"eB c #6d9dd0", +"dw c #6da0d9", +"dD c #6da1da", +"b4 c #6dacee", +"h9 c #6dafe2", +"i6 c #6e6e6e", +"bt c #6e8aa7", +"fM c #6e9bcb", +"dP c #6ea3dc", +"b5 c #6eabee", +"jd c #707070", +"ix c #7088a2", +"hx c #7098ba", +"f7 c #7099c3", +"dv c #70a5df", +"b6 c #70adef", +"iy c #70aff1", +"dm c #70aff2", +"jE c #717171", +"#m c #7188a0", +"#u c #7189a1", +"aY c #718eac", +"gO c #71aced", +"jq c #727272", +"gb c #729cc6", +"hO c #72afee", +"ib c #72afef", +"e7 c #737373", +"#y c #738ba4", +"#A c #739eca", +".j c #747474", +"#9 c #748fab", +"hs c #749ec1", +"f6 c #749fca", +".i c #757575", +"#q c #758da6", +"a5 c #7593b1", +"bo c #7594b2", +"ii c #759bb3", +"fb c #75b3f4", +"ep c #75b4f3", +"is c #75b8e2", +"ag c #767676", +"fz c #76a6da", +"ez c #76a9e0", +"dX c #76adeb", +".h c #777777", +".m c #777794", +"iX c #77a6b3", +"dn c #77b1f4", +"gK c #787878", +"#4 c #7894b0", +"fG c #78a9dd", +"j# c #797979", +"bV c #7a7a7a", +"do c #7ab4f4", +"jA c #7b7b7b", +"io c #7ba3bc", +"dp c #7bb5f5", +".k c #7c7c7c", +"bc c #7c9cbd", +"gi c #7caad8", +"aQ c #7cb0e7", +"fY c #7cb8f9", +"iM c #7cbee2", +"j1 c #7d7d7d", +"aX c #7d9ebf", +"fm c #7db0e7", +"j4 c #7e7e7e", +".8 c #7ea5ce", +"#D c #7f7f7f", +"hv c #7facd3", +"gn c #7faedd", +"eb c #808080", +"er c #80bdf9", +"j3 c #818181", +"hz c #81afd6", +"gu c #81b0e0", +"eq c #81bbf9", +"fc c #81bbfc", +"#b c #828282", +"iE c #82aac0", +"i5 c #838383", +"ha c #83b1d9", +"es c #83bcf9", +"ad c #848484", +"go c #84b5e6", +".v c #858585", +"#p c #85a0bc", +"bN c #868686", +"hZ c #86b3d6", +"fD c #86bcf6", +"fO c #86bcf7", +"gP c #86c1ff", +"di c #878787", +"ft c #87bdf8", +"bH c #888888", +"iT c #88cfe2", +"jZ c #898989", +"#z c #89a5c3", +"g. c #89bbee", +"fg c #89c0fc", +"fd c #89c2fd", +"hP c #89c3ff", +"jb c #8a8a8a", +"#o c #8aa6c4", +"jc c #8b8b8b", +".S c #8baccf", +"iI c #8bb6ce", +"al c #8bb9e8", +"hj c #8bbde7", +"gw c #8bbef2", +"ff c #8bc3ff", +"fe c #8bc4ff", +"fZ c #8bc6ff", +"ec c #8c8c8c", +"gv c #8cbff3", +"jO c #8d8d8d", +"a# c #8dadce", +"ic c #8dc7ff", +"#H c #8e8e8e", +"a. c #8eaed0", +"#L c #8ebae8", +"hY c #8ebee3", +"g4 c #8ec1ec", +"iO c #8ecbff", +"ju c #8f8f8f", +"bi c #8fb5da", +"h6 c #8fc0e5", +"f5 c #8fc4f9", +"jf c #909090", +"bl c #90b6dc", +"i1 c #90dfe2", +"bC c #919191", +"aB c #91b5dc", +"aZ c #91b7dd", +"hV c #91c2e8", +"gf c #91c6fc", +"gg c #91c7fd", +"f0 c #91c8ff", +"i7 c #929292", +"gA c #92c8fe", +"iz c #92ccff", +"iU c #939393", +"a7 c #93b9e0", +"f2 c #93c9ff", +"gQ c #93ccff", +"e8 c #949494", +".y c #9494b0", +"h1 c #94c6ec", +"f1 c #94caff", +"j9 c #959595", +"#X c #95b7da", +"cX c #969696", +"ay c #96bbe3", +"#f c #96bde8", +"aR c #96c3ee", +"gR c #96cfff", +".J c #979797", +"hQ c #97cfff", +"fT c #989898", +"#j c #98b6d7", +"#l c #98b7d8", +"iJ c #98c7e1", +"g6 c #98cffd", +"jj c #999999", +"aS c #99c4ee", +"h3 c #99ccf4", +"gS c #99d0ff", +".l c #9a9a9a", +".b c #9a9aa4", +"aw c #9ac1ea", +"gT c #9ad1ff", +"dg c #9b9b9b", +".N c #9bbee8", +"aq c #9bc1eb", +"am c #9bc4ee", +"eg c #9c9c9c", +"au c #9cc3ed", +"ao c #9cc5ee", +"c5 c #9d9d9d", +"aT c #9dc7ef", +"hU c #9dd2fb", +"hR c #9dd3ff", +"dh c #9e9e9e", +"#v c #9ebee0", +".Z c #9ec3e8", +"#M c #9ec3ed", +"#N c #9ec5ed", +"ap c #9ec5ef", +"aU c #9ec7f0", +"h2 c #9ed4fd", +"id c #9ed6ff", +"df c #9f9f9f", +"an c #9fc5ee", +"h0 c #9fd5fe", +"aM c #a0a0a0", +"hT c #a0d6ff", +"jh c #a1a1a1", +"hS c #a1d7ff", +"ji c #a2a2a2", +"#P c #a2c7ed", +"i8 c #a3a3a3", +"#O c #a3c8ed", +"iA c #a3daff", +"j. c #a4a4a4", +"je c #a5a5a5", +"#g c #a5c8ed", +"ip c #a5dafb", +"iv c #a6a6a6", +".F c #a6bed4", +"de c #a7a7a7", +"#h c #a7c9ed", +"if c #a7ddff", +"ie c #a7deff", +"eh c #a8a8a8", +"#i c #a8caee", +"iL c #a8dbf8", +"ig c #a8deff", +"iP c #a8e0ff", +"iY c #a8e2e6", +"hC c #a9a9a9", +".0 c #a9caed", +"#B c #aaaaaa", +"fU c #ababab", +".5 c #abc9e9", +"iB c #abe3ff", +"e2 c #acacac", +".6 c #accaea", +"jo c #adadad", +".1 c #adcbed", +".7 c #adccec", +"iD c #ade2ff", +"iC c #ade3ff", +"fS c #aeaeae", +".4 c #aecded", +"db c #afafaf", +".A c #afbbe7", +".2 c #afccee", +".3 c #afceee", +"d6 c #b0b0b0", +"iQ c #b0e9ff", +"bG c #b1b1b1", +"jg c #b2b2b2", +"#E c #b3b3b3", +".O c #b3d1ed", +"gF c #b4b4b4", +"cY c #b5b5b5", +"iR c #b5ebff", +"hM c #b6b6b6", +"iS c #b6ecff", +"d9 c #b7b7b7", +".U c #b8b8b8", +".u c #b9b9b9", +"dd c #bababa", +".P c #bad4ee", +"bL c #bbbbbb", +".Q c #bbd4ef", +".R c #bbd5f0", +"e9 c #bcbcbc", +"c3 c #bdbdbd", +"f. c #bebebe", +"d8 c #bfbfbf", +".o c #bfc2e8", +"iZ c #bffdff", +"iw c #c0c0c0", +"iV c #c1c1c1", +"i0 c #c1feff", +"ei c #c2c2c2", +"ej c #c3c3c3", +"#a c #c4c4c4", +"el c #c5c5c5", +"d7 c #c6c6c6", +".r c #c6cbda", +"ek c #c7c7c7", +"aN c #c8c8c8", +"#G c #c9c9c9", +"aL c #cacaca", +"ai c #cbcbcb", +".B c #cbddf2", +"bZ c #cccccc", +".C c #cce0f3", +"dc c #cdcdcd", +"ah c #cecece", +"da c #cfcfcf", +".E c #cfe1f3", +".D c #cfe1f4", +"#I c #d0d0d0", +"cV c #d1d1d1", +"fQ c #d2d2d2", +"bB c #d3d3d3", +"#c c #d4d4d4", +"d# c #d5d5d5", +"aK c #d6d6d6", +"cZ c #d7d7d7", +"c6 c #d8d8d8", +"gH c #d9d9d9", +".W c #dadada", +"gM c #dbdbdb", +"bQ c #dcdcdc", +"e1 c #dddddd", +"cR c #dedede", +"d. c #dfdfdf", +"bP c #e0e0e0", +"i# c #e1e1e1", +"bY c #e2e2e2", +".K c #e3e3e3", +"ee c #e4e4e4", +"d3 c #e5e5e5", +"ef c #e6e6e6", +".p c #e6e9f6", +"fV c #e7e7e7", +"eY c #e8e8e8", +".a c #e9e9e9", +".q c #e9edf8", +".V c #eaeaea", +"## c #ebebeb", +"Qt c #ececec", +".w c #ededed", +".x c #eeeeee", +"#. c #efefef", +".# c #f0f0f0", +".9 c #f1f1f1", +".I c #f2f2f2", +".T c #f3f3f3", +"ja c #f4f4f4", +"i9 c #f5f5f5", +"hB c #f6f6f6", +".H c #f7f7f7", +".G c #f8f8f8", +"i. c #f9f9f9", +"kg c #fafafa", +"kf c #fbfbfb", +".t c #fcfcfc", +".s c #fdfdfd", +"it c #fefefe", +"iu c #ffffff", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQt"}; diff --git a/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png new file mode 100644 index 0000000..01b2270 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png new file mode 100644 index 0000000..5d93799 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif new file mode 100644 index 0000000..78868b0 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif new file mode 100644 index 0000000..107eab7 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif new file mode 100644 index 0000000..c314bae Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif new file mode 100644 index 0000000..4f820f6 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif new file mode 100644 index 0000000..ddeec38 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif new file mode 100644 index 0000000..50a3024 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/runners.ppm b/tests/benchmarks/gui/image/qimagereader/images/runners.ppm new file mode 100644 index 0000000..fda1c97 Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/runners.ppm differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/task210380.jpg b/tests/benchmarks/gui/image/qimagereader/images/task210380.jpg new file mode 100644 index 0000000..fd045ea Binary files /dev/null and b/tests/benchmarks/gui/image/qimagereader/images/task210380.jpg differ diff --git a/tests/benchmarks/gui/image/qimagereader/images/teapot.ppm b/tests/benchmarks/gui/image/qimagereader/images/teapot.ppm new file mode 100644 index 0000000..b8ab85f --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/images/teapot.ppm @@ -0,0 +1,31 @@ +P6 +256 256 +255 +\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDhDhDhCh&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBgBgBgBfBfBf&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY;GY3("D::B41RB=YG@wcZ}g\k_nbrdug}aRdTgViXkYqrstp^q^w`x`y`z`za{axxwwwvvvuutssrrqqppoovWnnnnnnmtVsVsVsVsVsWsWsXsXpppsYsYrZr[r\q\p]ttssh\{e[vbYo^XhZV`USXPQNJMECJRS[47A+((MYkMYkMYkMZk(5F(5F(5FOHJT=+YML_SRZQQMGJABI2:H/TUyUyUyUyUyUy݇݇݇݇݇އއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއވވވވވވވImImImImImImImImImImImImވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBg&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY>DM>DM;HY89<:+#9&B52I94ZHAxd[}g^k`ncrey_R}bTeVgXiYk[l\n]o^vvvawaxaybzb{b{axx|a|a|`{`{_{_{^z^uttssrrwZwZvYvYvYuXuXuXuXpppppppqqtZt[s\s\s]r]r^q^p^o^n^l^j^h]{f\ub[n^YgZW_UTWPQOKOEEKST]JNY>=?JJIMYkMYk(5F(5F(5F(5F(5F)5G)5GK=4S<*XMLbWVYPPLGJ@AI/T/TUyUyUyއއއއއއއއއއއވވވވވވވImImImImވވވވވވވވވވވވވވވވވވވވވވވވވImImImImImImImImވވވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}'K}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s[Ow]Py^PqbpXMdH5R<,Q;, &%%#'-"'-&3DS_qP\nR_p>J\?K]AG@B::@66:-29'),)'%BBBFFFEEE)))))))))&&& @@@FFFACFZ\_[ajagpEQcGRcKTdPWd⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰LpLpLqLqLqLqLqLqLq㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMqMqMqۅۅۅۅۅۅ܅܅܅܅܅܅܅܅܅܅܆HlHlHlHlHl܆܆܆܆܆܆܆܆܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇HlHlHlHlHlHlHl݇݇݇݇݇݇݇݇އއއށ>J\>J\=J[=J[=J[=J[FLU39B#*2(/7)/7)/8$*3$*3$*3)/8)08*09*09*19',5(-5*.6.17338@<=G@BH@BXW]UUXLPWFHKDFHKKKHHH+++%%%%%%$$$###!!!!!!777777777777777777777AAAFFFACFACF\^aeltbhqDQbDQbDQbERcERcERcERcHScLUdRXd|nj⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱MqMqMqMqMqMq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMq܅܅܅܅܅܅܅܅܅܅܆܆܆܆HlHlHlHlHlHlHlHlHl܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇HlHlHlHlHl݇݇݇އއއއއއއއއއށ>J\=J[=J[FLUFLU(/7(/7*08*08%+3$*3$+3$+3*09*09*19&,5&,5'-6).6*/7-18NPURRVXUVc]^f^_[X]\XYTUZLQYKMPFHJ)))(((&&&%%%%%%$$$$$$###!!!!!!!!!777777777BBBEEEACGADGFIL\ckZ`iTZcDQbDQbDQbagpbiqcircirY`hY_hERcERcERcGSdJTdNVdTYeLpLp㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMq㍱㍱㍱䍱䍱䍱䍱䍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲MqMqMqMqMqMqMqMqMqMqMq܅܅܅܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHl݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇HmއއއއއއއއއއއވވވވވށFLUFLUFLU)/8+08+08&+3&+3%+4%+4%+4*19+1:&,5'-5'-6(.6FLTHMTINUKOVOQWSTXYWX`[^lbac]_f_\a_aY\aRX_,.1*,.*+-***((('''&&&%%%%%%$$$$$$$$$###!!!!!!!!!!!!!!!%%%%%%%%%%%%"""""""""KKKJJJFFFGIL]_b^dm\bkV]eDQbEQcEQcEQccirdjsdksektdjsdjscir[ajZ`iOU^ERcERcFRdFRdITdLUdPWeVZeLpLqLqLq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱䍱䍱䍱䍱䍱䍲䍲䍲Mq䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲MrMrMrMrMrMrMrMrMrMr܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇އއއއHmHmHmއއއއވވވވވވވވވވވވށ-18,18',3',4',4&,4%,4+1:,2:'-5DJSEKSEKTFLTFLUHMUINVKOWLPWQSYTUZWWZpjje^`offb\_h`]eaaCCG8;A27?-/2+-/.+)******)))((('''&&&&&&%%%%%%$$$$$$$$$$$$$$$$$$######???EEEEEEEEE((((((###&&&%%%HJMHJMHJMHJM_en]dlZ`i_enEQcEQcEQcEQcbhqektflufluflufluektektdksdjscjr\ckQW`[ajZaiOU^FRdFRdFRdHSdKUdNVeRXeX\fLqMqMqMqMq㍱㍱㍱㍱㍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲MrMrMrMrMr䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲厲厲厲厲厲厲厲厲NrNrNrNrNrNrNrNr܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇އއއއއއއއHmHmHmHmImImImވވވވވވވވވވވވވވވނPT[KOVJOV(-4(-4'-5'-5JOXEKSEKSEKTFLTFLTGMUGMUHNVIOWKPWLQXMRYPTZTV[\]a_^asljd^azporjkE@CLEBIEFEDG29A28A17@135,.1+-0+,/./1..0'),)))++++++++++++***FFFFFFACFACFEEEACFACFJLOJLOKQZ_en]clY_hU[dEQcEQcEQcEQcEQcagp[aj\bk\bkgnvgnvgmvgmvfluflueltektdksdjscjrcirTZcSYbRYaRXaQW`[bj[ajZ`iFSdFSdGSdJTdLVePXeTZfZ]fMqMqMqMqMqMqMq䍲䍲䍲䍲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲NrNrNrNrNrNrNrNrNr厲厲厲厳厳厳厳厳厳厳厳厳厳厳厳厳厳厳厳右右右右右右右NrNrNrNrNr右冪܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇އއއއއއއއއއއއImImImImImImImImImImވވވވވވވވވ߈߈߈߈߈߈߂LPVLPWKPWFLTFLTFLUGMUGMUHMVHNVINWIOWKPXLQYMRYNSZTX`X[a[]b]^c__ccacib`JDGi__aYYPJLD@C=;AKEDTQR@?A>>A;/5>.4=-4 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef QMap QStringMap; +typedef QList QIntList; +Q_DECLARE_METATYPE(QImage) +Q_DECLARE_METATYPE(QRect) +Q_DECLARE_METATYPE(QSize) +Q_DECLARE_METATYPE(QColor) +Q_DECLARE_METATYPE(QStringMap) +Q_DECLARE_METATYPE(QIntList) +Q_DECLARE_METATYPE(QIODevice *) + +//TESTED_FILES= + +class tst_QImageReader : public QObject +{ + Q_OBJECT + +public: + tst_QImageReader(); + virtual ~tst_QImageReader(); + +public slots: + void init(); + void cleanup(); + +private slots: + void readImage_data(); + void readImage(); + + void setScaledSize_data(); + void setScaledSize(); + + void setClipRect_data(); + void setClipRect(); + + void setScaledClipRect_data(); + void setScaledClipRect(); + +private: + QList< QPair > images; // filename, format +}; + +tst_QImageReader::tst_QImageReader() +{ + images << QPair(QLatin1String("colorful.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("font.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("crash-signed-char.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("4bpp-rle.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("tst7.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("16bpp.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("negativeheight.bmp"), QByteArray("bmp")); + images << QPair(QLatin1String("marble.xpm"), QByteArray("xpm")); + images << QPair(QLatin1String("kollada.png"), QByteArray("png")); + images << QPair(QLatin1String("teapot.ppm"), QByteArray("ppm")); + images << QPair(QLatin1String("runners.ppm"), QByteArray("ppm")); + images << QPair(QLatin1String("test.ppm"), QByteArray("ppm")); + images << QPair(QLatin1String("gnus.xbm"), QByteArray("xbm")); +#if defined QTEST_HAVE_JPEG + images << QPair(QLatin1String("beavis.jpg"), QByteArray("jpeg")); + images << QPair(QLatin1String("YCbCr_cmyk.jpg"), QByteArray("jpeg")); + images << QPair(QLatin1String("YCbCr_rgb.jpg"), QByteArray("jpeg")); + images << QPair(QLatin1String("task210380.jpg"), QByteArray("jpeg")); +#endif +#if defined QTEST_HAVE_GIF + images << QPair(QLatin1String("earth.gif"), QByteArray("gif")); + images << QPair(QLatin1String("trolltech.gif"), QByteArray("gif")); +#endif +#if defined QTEST_HAVE_MNG + images << QPair(QLatin1String("ball.mng"), QByteArray("mng")); + images << QPair(QLatin1String("fire.mng"), QByteArray("mng")); +#endif +} + +tst_QImageReader::~tst_QImageReader() +{ +} + +void tst_QImageReader::init() +{ +} + +void tst_QImageReader::cleanup() +{ +} + +void tst_QImageReader::readImage_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("format"); + + for (int i = 0; i < images.size(); ++i) { + const QString file = images[i].first; + const QByteArray format = images[i].second; + QTest::newRow(qPrintable(file)) << file << format; + } +} + +void tst_QImageReader::readImage() +{ + QFETCH(QString, fileName); + QFETCH(QByteArray, format); + + QBENCHMARK { + QImageReader io("images/" + fileName, format); + QImage image = io.read(); + QVERIFY(!image.isNull()); + } +} + +void tst_QImageReader::setScaledSize_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("format"); + QTest::addColumn("newSize"); + + for (int i = 0; i < images.size(); ++i) { + const QString file = images[i].first; + const QByteArray format = images[i].second; + QSize size(200, 200); + if (file == QLatin1String("teapot")) + size = QSize(400, 400); + else if (file == QLatin1String("test.ppm")) + size = QSize(10, 10); + QTest::newRow(qPrintable(file)) << file << format << size; + } +} + +void tst_QImageReader::setScaledSize() +{ + QFETCH(QString, fileName); + QFETCH(QSize, newSize); + QFETCH(QByteArray, format); + + QBENCHMARK { + QImageReader reader("images/" + fileName, format); + reader.setScaledSize(newSize); + QImage image = reader.read(); + QCOMPARE(image.size(), newSize); + } +} + +void tst_QImageReader::setClipRect_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("format"); + QTest::addColumn("newRect"); + + for (int i = 0; i < images.size(); ++i) { + const QString file = images[i].first; + const QByteArray format = images[i].second; + QTest::newRow(qPrintable(file)) << file << format << QRect(0, 0, 50, 50); + } +} + +void tst_QImageReader::setClipRect() +{ + QFETCH(QString, fileName); + QFETCH(QRect, newRect); + QFETCH(QByteArray, format); + + QBENCHMARK { + QImageReader reader("images/" + fileName, format); + reader.setClipRect(newRect); + QImage image = reader.read(); + QCOMPARE(image.rect(), newRect); + } +} + +void tst_QImageReader::setScaledClipRect_data() +{ + setClipRect_data(); +} + +void tst_QImageReader::setScaledClipRect() +{ + QFETCH(QString, fileName); + QFETCH(QRect, newRect); + QFETCH(QByteArray, format); + + QBENCHMARK { + QImageReader reader("images/" + fileName, format); + reader.setScaledSize(QSize(300, 300)); + reader.setScaledClipRect(newRect); + QImage image = reader.read(); + QCOMPARE(image.rect(), newRect); + } +} + +QTEST_MAIN(tst_QImageReader) +#include "tst_qimagereader.moc" diff --git a/tests/benchmarks/gui/image/qpixmap/qpixmap.pro b/tests/benchmarks/gui/image/qpixmap/qpixmap.pro new file mode 100644 index 0000000..e8330bd --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmap/qpixmap.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qpixmap + +SOURCES += tst_qpixmap.cpp diff --git a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp new file mode 100644 index 0000000..9ffbefb --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp @@ -0,0 +1,227 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +class tst_QPixmap : public QObject +{ + Q_OBJECT + +public: + tst_QPixmap(); + +private slots: + void fill_data(); + void fill(); + + void scaled_data(); + void scaled(); + void transformed_data(); + void transformed(); + void mask_data(); + void mask(); +}; + +Q_DECLARE_METATYPE(QImage::Format) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(Qt::TransformationMode) + +tst_QPixmap::tst_QPixmap() +{ +} + +void tst_QPixmap::fill_data() +{ + QTest::addColumn("opaque"); + QTest::addColumn("width"); + QTest::addColumn("height"); + + QTest::newRow("opaque 16x16") << true << 16 << 16; + QTest::newRow("!opaque 16x16") << false << 16 << 16; + QTest::newRow("opaque 587x128") << true << 587 << 128; + QTest::newRow("!opaque 587x128") << false << 587 << 128; +} + +void tst_QPixmap::fill() +{ + QFETCH(bool, opaque); + QFETCH(int, width); + QFETCH(int, height); + + const QColor color = opaque ? QColor(255, 0, 0) : QColor(255, 0, 0, 200); + QPixmap pixmap(width, height); + + QBENCHMARK { + pixmap.fill(color); + } +} + +void tst_QPixmap::scaled_data() +{ + QTest::addColumn("size"); + QTest::addColumn("scale"); + QTest::addColumn("ratioMode"); + QTest::addColumn("transformMode"); + + QTest::newRow("16x16 => 32x32") << QSize(16, 16) << QSize(32, 32) + << Qt::IgnoreAspectRatio + << Qt::FastTransformation; + QTest::newRow("100x100 => 200x200") << QSize(100, 100) << QSize(200, 200) + << Qt::IgnoreAspectRatio + << Qt::FastTransformation; + QTest::newRow("100x100 => 200x200") << QSize(100, 100) << QSize(200, 200) + << Qt::IgnoreAspectRatio + << Qt::FastTransformation; + QTest::newRow("80x80 => 200x200") << QSize(137, 137) << QSize(200, 200) + << Qt::IgnoreAspectRatio + << Qt::FastTransformation; + +} + +void tst_QPixmap::scaled() +{ + QFETCH(QSize, size); + QFETCH(QSize, scale); + QFETCH(Qt::AspectRatioMode, ratioMode); + QFETCH(Qt::TransformationMode, transformMode); + + QPixmap opaque(size); + QPixmap transparent(size); + opaque.fill(QColor(255, 0, 0)); + transparent.fill(QColor(255, 0, 0, 200)); + + QPixmap scaled1; + QPixmap scaled2; + QBENCHMARK { + scaled1 = opaque.scaled(scale, ratioMode, transformMode); + scaled2 = transparent.scaled(scale, ratioMode, transformMode); + } +} + +void tst_QPixmap::transformed_data() +{ + QTest::addColumn("size"); + QTest::addColumn("transform"); + QTest::addColumn("transformMode"); + + QTest::newRow("16x16 rotate(90)") << QSize(16, 16) + << QTransform().rotate(90) + << Qt::FastTransformation; + QTest::newRow("16x16 rotate(199)") << QSize(16, 16) + << QTransform().rotate(199) + << Qt::FastTransformation; + QTest::newRow("16x16 shear(2,1)") << QSize(16, 16) + << QTransform().shear(2, 1) + << Qt::FastTransformation; + QTest::newRow("16x16 rotate(199).shear(2,1)") << QSize(16, 16) + << QTransform().rotate(199).shear(2, 1) + << Qt::FastTransformation; + QTest::newRow("100x100 rotate(90)") << QSize(100, 100) + << QTransform().rotate(90) + << Qt::FastTransformation; + QTest::newRow("100x100 rotate(199)") << QSize(100, 100) + << QTransform().rotate(199) + << Qt::FastTransformation; + QTest::newRow("100x100 shear(2,1)") << QSize(100, 100) + << QTransform().shear(2, 1) + << Qt::FastTransformation; + QTest::newRow("100x100 shear(2,1) smooth") << QSize(100, 100) + << QTransform().shear(2, 1) + << Qt::SmoothTransformation; + QTest::newRow("100x100 rotate(199).shear(2,1)") << QSize(100, 100) + << QTransform().rotate(199).shear(2, 1) + << Qt::FastTransformation; +} + +void tst_QPixmap::transformed() +{ + QFETCH(QSize, size); + QFETCH(QTransform, transform); + QFETCH(Qt::TransformationMode, transformMode); + + QPixmap opaque(size); + QPixmap transparent(size); + opaque.fill(QColor(255, 0, 0)); + transparent.fill(QColor(255, 0, 0, 200)); + + QPixmap transformed1; + QPixmap transformed2; + QBENCHMARK { + transformed1 = opaque.transformed(transform, transformMode); + transformed2 = transparent.transformed(transform, transformMode); + } +} + +void tst_QPixmap::mask_data() +{ + QTest::addColumn("size"); + + QTest::newRow("1x1") << QSize(1, 1); + QTest::newRow("9x9") << QSize(9, 9); + QTest::newRow("16x16") << QSize(16, 16); + QTest::newRow("128x128") << QSize(128, 128); + QTest::newRow("333x333") << QSize(333, 333); + QTest::newRow("2048x128") << QSize(2048, 128); +} + +void tst_QPixmap::mask() +{ + QFETCH(QSize, size); + + QPixmap src(size); + src.fill(Qt::transparent); + { + QPainter p(&src); + p.drawLine(QPoint(0, 0), QPoint(src.width(), src.height())); + } + + QBENCHMARK { + QBitmap bitmap = src.mask(); + QVERIFY(bitmap.size() == src.size()); + } +} + +QTEST_MAIN(tst_QPixmap) + +#include "tst_qpixmap.moc" diff --git a/tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro b/tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro new file mode 100644 index 0000000..e0d7543 --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qpixmapcache +TEMPLATE = app +# Input +SOURCES += tst_qpixmapcache.cpp diff --git a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp new file mode 100644 index 0000000..1031ba7 --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +//TESTED_FILES= + +class tst_QPixmapCache : public QObject +{ + Q_OBJECT + +public: + tst_QPixmapCache(); + virtual ~tst_QPixmapCache(); + +public slots: + void init(); + void cleanup(); + +private slots: + void insert_data(); + void insert(); + void find_data(); + void find(); + void styleUseCaseComplexKey(); + void styleUseCaseComplexKey_data(); +}; + +tst_QPixmapCache::tst_QPixmapCache() +{ +} + +tst_QPixmapCache::~tst_QPixmapCache() +{ +} + +void tst_QPixmapCache::init() +{ +} + +void tst_QPixmapCache::cleanup() +{ +} + +void tst_QPixmapCache::insert_data() +{ + QTest::addColumn("cacheType"); + QTest::newRow("QPixmapCache") << true; + QTest::newRow("QPixmapCache (int API)") << false; +} + +QList keys; + +void tst_QPixmapCache::insert() +{ + QFETCH(bool, cacheType); + QPixmap p; + if (cacheType) { + QBENCHMARK { + for (int i = 0 ; i <= 10000 ; i++) + { + QString tmp; + tmp.sprintf("my-key-%d", i); + QPixmapCache::insert(tmp, p); + } + } + } else { + QBENCHMARK { + for (int i = 0 ; i <= 10000 ; i++) + keys.append(QPixmapCache::insert(p)); + } + } +} + +void tst_QPixmapCache::find_data() +{ + QTest::addColumn("cacheType"); + QTest::newRow("QPixmapCache") << true; + QTest::newRow("QPixmapCache (int API)") << false; +} + +void tst_QPixmapCache::find() +{ + QFETCH(bool, cacheType); + QPixmap p; + if (cacheType) { + QBENCHMARK { + QString tmp; + for (int i = 0 ; i <= 10000 ; i++) + { + tmp.sprintf("my-key-%d", i); + QPixmapCache::find(tmp, p); + } + } + } else { + QBENCHMARK { + for (int i = 0 ; i <= 10000 ; i++) + QPixmapCache::find(keys.at(i), &p); + } + } + +} + +void tst_QPixmapCache::styleUseCaseComplexKey_data() +{ + QTest::addColumn("cacheType"); + QTest::newRow("QPixmapCache") << true; + QTest::newRow("QPixmapCache (int API)") << false; +} + +struct styleStruct { + QString key; + uint state; + uint direction; + uint complex; + uint palette; + int width; + int height; + bool operator==(const styleStruct &str) const + { + return str.state == state && str.direction == direction + && str.complex == complex && str.palette == palette && str.width == width + && str.height == height && str.key == key; + } +}; + +uint qHash(const styleStruct &myStruct) +{ + return qHash(myStruct.state); +} + +void tst_QPixmapCache::styleUseCaseComplexKey() +{ + QFETCH(bool, cacheType); + QPixmap p; + if (cacheType) { + QBENCHMARK { + for (int i = 0 ; i <= 10000 ; i++) + { + QString tmp; + tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200); + QPixmapCache::insert(tmp, p); + } + + for (int i = 0 ; i <= 10000 ; i++) + { + QString tmp; + tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200); + QPixmapCache::find(tmp, p); + } + } + } else { + QHash hash; + QBENCHMARK { + for (int i = 0 ; i <= 10000 ; i++) + { + styleStruct myStruct; + myStruct.key = QString("my-progressbar-%1").arg(i); + myStruct.key = 5; + myStruct.key = 4; + myStruct.key = 3; + myStruct.palette = 358; + myStruct.width = 100; + myStruct.key = 200; + QPixmapCache::Key key = QPixmapCache::insert(p); + hash.insert(myStruct, key); + } + for (int i = 0 ; i <= 10000 ; i++) + { + styleStruct myStruct; + myStruct.key = QString("my-progressbar-%1").arg(i); + myStruct.key = 5; + myStruct.key = 4; + myStruct.key = 3; + myStruct.palette = 358; + myStruct.width = 100; + myStruct.key = 200; + QPixmapCache::Key key = hash.value(myStruct); + QPixmapCache::find(key, &p); + } + } + } + +} + + +QTEST_MAIN(tst_QPixmapCache) +#include "tst_qpixmapcache.moc" diff --git a/tests/benchmarks/gui/itemviews/itemviews.pro b/tests/benchmarks/gui/itemviews/itemviews.pro new file mode 100644 index 0000000..be0ee55 --- /dev/null +++ b/tests/benchmarks/gui/itemviews/itemviews.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qtableview diff --git a/tests/benchmarks/gui/itemviews/qtableview/qtableview.pro b/tests/benchmarks/gui/itemviews/qtableview/qtableview.pro new file mode 100644 index 0000000..02bc530 --- /dev/null +++ b/tests/benchmarks/gui/itemviews/qtableview/qtableview.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qtableview + +SOURCES += tst_qtableview.cpp + diff --git a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp new file mode 100644 index 0000000..a84d8b5 --- /dev/null +++ b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp @@ -0,0 +1,367 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +//TESTED_FILES= + +class QtTestTableModel: public QAbstractTableModel +{ + Q_OBJECT + + +public: + QtTestTableModel(int rows = 0, int columns = 0, QObject *parent = 0) + : QAbstractTableModel(parent), + row_count(rows), + column_count(columns) {} + + int rowCount(const QModelIndex& = QModelIndex()) const { return row_count; } + int columnCount(const QModelIndex& = QModelIndex()) const { return column_count; } + bool isEditable(const QModelIndex &) const { return true; } + + QVariant data(const QModelIndex &idx, int role) const + { + if (!idx.isValid() || idx.row() >= row_count || idx.column() >= column_count) { + qWarning() << "Invalid modelIndex [%d,%d,%p]" << idx; + return QVariant(); + } + + if (role == Qt::DisplayRole || role == Qt::EditRole) + return QString("[%1,%2,%3]").arg(idx.row()).arg(idx.column()).arg(0); + + return QVariant(); + } + + bool insertRows(int start, int count, const QModelIndex &parent = QModelIndex()) + { + if (start < 0 || start > row_count) + return false; + + beginInsertRows(parent, start, start + count - 1); + row_count += count; + endInsertRows(); + return true; + } + + bool removeRows(int start, int count, const QModelIndex &parent = QModelIndex()) + { + if (start < 0 || start >= row_count || row_count < count) + return false; + + beginRemoveRows(parent, start, start + count - 1); + row_count -= count; + endRemoveRows(); + return true; + } + + bool insertColumns(int start, int count, const QModelIndex &parent = QModelIndex()) + { + if (start < 0 || start > column_count) + return false; + + beginInsertColumns(parent, start, start + count - 1); + column_count += count; + endInsertColumns(); + return true; + } + + bool removeColumns(int start, int count, const QModelIndex &parent = QModelIndex()) + { + if (start < 0 || start >= column_count || column_count < count) + return false; + + beginRemoveColumns(parent, start, start + count - 1); + column_count -= count; + endRemoveColumns(); + return true; + } + + int row_count; + int column_count; +}; + + + + +class tst_QTableView : public QObject +{ + Q_OBJECT + +public: + tst_QTableView(); + virtual ~tst_QTableView(); + +public slots: + void init(); + void cleanup(); + +private slots: + void spanInit(); + void spanDraw(); + void spanSelectColumn(); + void spanSelectAll(); + void rowInsertion_data(); + void rowInsertion(); + void rowRemoval_data(); + void rowRemoval(); + void columnInsertion_data(); + void columnInsertion(); + void columnRemoval_data(); + void columnRemoval(); +private: + static inline void spanInit_helper(QTableView *); +}; + +tst_QTableView::tst_QTableView() +{ +} + +tst_QTableView::~tst_QTableView() +{ +} + +void tst_QTableView::init() +{ +} + +void tst_QTableView::cleanup() +{ +} + +void tst_QTableView::spanInit_helper(QTableView *view) +{ + for (int i=0; i < 40; i++) { + view->setSpan(1+i%2, 1+4*i, 1+i%3, 2); + } + + for (int i=1; i < 40; i++) { + view->setSpan(6 + i*7, 4, 4, 50); + } +} + +void tst_QTableView::spanInit() +{ + QtTestTableModel model(500, 500); + QTableView v; + v.setModel(&model); + + QBENCHMARK { + spanInit_helper(&v); + } +} + +void tst_QTableView::spanDraw() +{ + QtTestTableModel model(500, 500); + QTableView v; + v.setModel(&model); + + spanInit_helper(&v); + v.show(); + v.resize(500,500); + QTest::qWait(30); + + QImage image(500, 500, QImage::Format_ARGB32_Premultiplied); + QPainter painter(&image); + QBENCHMARK { + v.render(&painter); + } +} + +void tst_QTableView::spanSelectAll() +{ + QtTestTableModel model(500, 500); + QTableView v; + v.setModel(&model); + + spanInit_helper(&v); + v.show(); + QTest::qWait(30); + + QBENCHMARK { + v.selectAll(); + } +} + +void tst_QTableView::spanSelectColumn() +{ + QtTestTableModel model(500, 500); + QTableView v; + v.setModel(&model); + + spanInit_helper(&v); + v.show(); + QTest::qWait(30); + + QBENCHMARK { + v.selectColumn(22); + } +} + +typedef QVector SpanList; +Q_DECLARE_METATYPE(SpanList) + +void spansData() +{ + QTest::addColumn("spans"); + + QTest::newRow("Without spans") + << SpanList(); + + QTest::newRow("With spans") + << (SpanList() + << QRect(0, 1, 1, 2) + << QRect(1, 2, 1, 2) + << QRect(2, 2, 1, 5) + << QRect(2, 8, 1, 2) + << QRect(3, 4, 1, 2) + << QRect(4, 4, 1, 4) + << QRect(5, 6, 1, 3) + << QRect(6, 7, 1, 3)); +} + +void tst_QTableView::rowInsertion_data() +{ + spansData(); +} + +void tst_QTableView::rowInsertion() +{ + QFETCH(SpanList, spans); + + QtTestTableModel model(10, 10); + QTableView view; + view.setModel(&model); + + foreach (QRect span, spans) + view.setSpan(span.top(), span.left(), span.height(), span.width()); + view.show(); + QTest::qWait(50); + + QBENCHMARK_ONCE { + view.model()->insertRows(0, 2); + view.model()->insertRows(5, 2); + view.model()->insertRows(8, 2); + view.model()->insertRows(12, 2); + } +} + +void tst_QTableView::rowRemoval_data() +{ + spansData(); +} + +void tst_QTableView::rowRemoval() +{ + QFETCH(SpanList, spans); + + QtTestTableModel model(10, 10); + QTableView view; + view.setModel(&model); + + foreach (QRect span, spans) + view.setSpan(span.top(), span.left(), span.height(), span.width()); + view.show(); + QTest::qWait(50); + + QBENCHMARK_ONCE { + view.model()->removeRows(3, 3); + } +} + +void tst_QTableView::columnInsertion_data() +{ + spansData(); +} + +void tst_QTableView::columnInsertion() +{ + QFETCH(SpanList, spans); + + QtTestTableModel model(10, 10); + QTableView view; + view.setModel(&model); + + // Same set as for rowInsertion, just swapping columns and rows. + foreach (QRect span, spans) + view.setSpan(span.left(), span.top(), span.width(), span.height()); + view.show(); + QTest::qWait(50); + + QBENCHMARK_ONCE { + view.model()->insertColumns(0, 2); + view.model()->insertColumns(5, 2); + view.model()->insertColumns(8, 2); + view.model()->insertColumns(12, 2); + } +} + +void tst_QTableView::columnRemoval_data() +{ + spansData(); +} + +void tst_QTableView::columnRemoval() +{ + QFETCH(SpanList, spans); + + QtTestTableModel model(10, 10); + QTableView view; + view.setModel(&model); + + // Same set as for rowRemoval, just swapping columns and rows. + foreach (QRect span, spans) + view.setSpan(span.left(), span.top(), span.width(), span.height()); + view.show(); + QTest::qWait(50); + + QBENCHMARK_ONCE { + view.model()->removeColumns(3, 3); + } +} + +QTEST_MAIN(tst_QTableView) +#include "tst_qtableview.moc" diff --git a/tests/benchmarks/gui/kernel/kernel.pro b/tests/benchmarks/gui/kernel/kernel.pro new file mode 100644 index 0000000..a50aad2 --- /dev/null +++ b/tests/benchmarks/gui/kernel/kernel.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qapplication \ + qwidget diff --git a/tests/benchmarks/gui/kernel/qapplication/main.cpp b/tests/benchmarks/gui/kernel/qapplication/main.cpp new file mode 100644 index 0000000..c912497 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qapplication/main.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + +#include + + +class tst_qapplication : public QObject +{ + Q_OBJECT +private slots: + void ctor(); +}; + +/* + Test the performance of the QApplication constructor. + + Note: results from the second start on can be misleading, + since all global statics are already initialized. +*/ +void tst_qapplication::ctor() +{ + // simulate reasonable argc, argv + int argc = 1; + char *argv[] = { "tst_qapplication" }; + QBENCHMARK { + QApplication app(argc, argv); + } +} + +QTEST_APPLESS_MAIN(tst_qapplication) + +#include "main.moc" diff --git a/tests/benchmarks/gui/kernel/qapplication/qapplication.pro b/tests/benchmarks/gui/kernel/qapplication/qapplication.pro new file mode 100644 index 0000000..f8601e4 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qapplication/qapplication.pro @@ -0,0 +1,10 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qapplication +DEPENDPATH += . +INCLUDEPATH += . + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/kernel/qwidget/qwidget.pro b/tests/benchmarks/gui/kernel/qwidget/qwidget.pro new file mode 100644 index 0000000..ff47445 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qwidget/qwidget.pro @@ -0,0 +1,4 @@ +load(qttest_p4) + +TARGET = tst_qwidget +SOURCES += tst_qwidget.cpp diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp new file mode 100644 index 0000000..f21bd44 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp @@ -0,0 +1,332 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class tst_QWidget : public QObject +{ + Q_OBJECT + + +private slots: + void update_data(); + void updateOpaque_data(); + void updateOpaque(); + void updateTransparent_data(); + void updateTransparent(); + void updatePartial_data(); + void updatePartial(); + void updateComplex_data(); + void updateComplex(); + + void complexToplevelResize(); +}; + +class UpdateWidget : public QWidget +{ +public: + UpdateWidget(int rows, int columns) : QWidget(0) + { + QGridLayout *layout = new QGridLayout; + for (int row = 0; row < rows; ++row) { + for (int column = 0; column < columns; ++column) { + UpdateWidget *widget = new UpdateWidget; + widget->setFixedSize(20, 20); + layout->addWidget(widget, row, column); + children.append(widget); + } + } + setLayout(layout); + } + + UpdateWidget(QWidget *parent = 0) : QWidget(parent) {} + + void paintEvent(QPaintEvent *) + { + static int color = Qt::black; + + QPainter painter(this); + painter.fillRect(rect(), Qt::GlobalColor(color)); + + if (++color > Qt::darkYellow) + color = Qt::black; + } + + QRegion updateRegion; + QList children; +}; + +void tst_QWidget::update_data() +{ + QTest::addColumn("rows"); + QTest::addColumn("columns"); + QTest::addColumn("numUpdates"); + + QTest::newRow("10x10x1") << 10 << 10 << 1; + QTest::newRow("10x10x10") << 10 << 10 << 10; + QTest::newRow("25x25x1") << 25 << 25 << 1; + QTest::newRow("25x25x10") << 25 << 25 << 10; + QTest::newRow("25x25x100") << 25 << 25 << 100; +} + +void tst_QWidget::updateOpaque_data() +{ + update_data(); +} + +void tst_QWidget::updateOpaque() +{ + QFETCH(int, rows); + QFETCH(int, columns); + QFETCH(int, numUpdates); + + UpdateWidget widget(rows, columns); + foreach (QWidget *w, widget.children) { + w->setAttribute(Qt::WA_OpaquePaintEvent); + } + + widget.show(); + QApplication::processEvents(); + + int i = 0; + const int n = widget.children.size(); + QBENCHMARK { + for (int j = 0; j < numUpdates; ++j) { + widget.children[i]->update(); + QApplication::processEvents(); + i = (i + 1) % n; + } + } +} + +void tst_QWidget::updateTransparent_data() +{ + update_data(); +} + +void tst_QWidget::updateTransparent() +{ + QFETCH(int, rows); + QFETCH(int, columns); + QFETCH(int, numUpdates); + + UpdateWidget widget(rows, columns); + widget.show(); + QApplication::processEvents(); + + int i = 0; + const int n = widget.children.size(); + QBENCHMARK { + for (int j = 0; j < numUpdates; ++j) { + widget.children[i]->update(); + QApplication::processEvents(); + i = (i + 1) % n; + } + } +} + +void tst_QWidget::updatePartial_data() +{ + update_data(); +} + +void tst_QWidget::updatePartial() +{ + QFETCH(int, rows); + QFETCH(int, columns); + QFETCH(int, numUpdates); + + UpdateWidget widget(rows, columns); + widget.show(); + QApplication::processEvents(); + + int i = 0; + const int n = widget.children.size(); + QBENCHMARK { + for (int j = 0; j < numUpdates; ++j) { + QWidget *w = widget.children[i]; + const int x = w->width() / 2; + const int y = w->height() / 2; + w->update(0, 0, x, y); + w->update(x, 0, x, y); + w->update(0, y, x, y); + w->update(x, y, x, y); + QApplication::processEvents(); + i = (i + 1) % n; + } + } +} + +void tst_QWidget::updateComplex_data() +{ + update_data(); +} + +void tst_QWidget::updateComplex() +{ + QFETCH(int, rows); + QFETCH(int, columns); + QFETCH(int, numUpdates); + + UpdateWidget widget(rows, columns); + widget.show(); + QApplication::processEvents(); + + int i = 0; + const int n = widget.children.size(); + QBENCHMARK { + for (int j = 0; j < numUpdates; ++j) { + QWidget *w = widget.children[i]; + const int x = w->width() / 2; + const int y = w->height() / 2; + w->update(QRegion(0, 0, x, y, QRegion::Ellipse)); + w->update(QRegion(x, y, x, y, QRegion::Ellipse)); + QApplication::processEvents(); + i = (i + 1) % n; + } + } +} + +class ResizeWidget : public QWidget +{ +public: + ResizeWidget(); +}; + +ResizeWidget::ResizeWidget() : QWidget(0) +{ + QBoxLayout *topLayout = new QVBoxLayout; + + QMenuBar *menubar = new QMenuBar; + QMenu* popup = menubar->addMenu("&File"); + popup->addAction("&Quit", qApp, SLOT(quit())); + topLayout->setMenuBar(menubar); + + QBoxLayout *buttons = new QHBoxLayout; + buttons->setMargin(5); + buttons->addStretch(10); + for (int i = 1; i <= 4; i++ ) { + QPushButton* button = new QPushButton; + button->setText(QString("Button %1").arg(i)); + buttons->addWidget(button); + } + topLayout->addLayout(buttons); + + buttons = new QHBoxLayout; + buttons->addStretch(10); + for (int i = 11; i <= 16; i++) { + QPushButton* button = new QPushButton; + button->setText(QString("Button %1").arg(i)); + buttons->addWidget(button); + } + topLayout->addLayout(buttons); + + QBoxLayout *buttons2 = new QHBoxLayout; + buttons2->addStretch(10); + topLayout->addLayout(buttons2); + + QPushButton *button = new QPushButton; + button->setText("Button five"); + buttons2->addWidget(button); + + button = new QPushButton; + button->setText("Button 6"); + buttons2->addWidget(button); + + QTextEdit *bigWidget = new QTextEdit; + bigWidget->setText("This widget will get all the remaining space"); + bigWidget->setFrameStyle(QFrame::Panel | QFrame::Plain); + topLayout->addWidget(bigWidget); + + const int numRows = 6; + const int labelCol = 0; + const int linedCol = 1; + const int multiCol = 2; + + QGridLayout *grid = new QGridLayout; + for (int row = 0; row < numRows; row++) { + QLineEdit *lineEdit = new QLineEdit; + grid->addWidget(lineEdit, row, linedCol); + QLabel *label = new QLabel(QString("Line &%1").arg(row + 1)); + grid->addWidget(label, row, labelCol); + } + topLayout->addLayout(grid); + + QTextEdit *multiLineEdit = new QTextEdit; + grid->addWidget(multiLineEdit, 0, labelCol + 1, multiCol, multiCol); + + grid->setColumnStretch(linedCol, 10); + grid->setColumnStretch(multiCol, 20); + + QLabel* statusBar = new QLabel; + statusBar->setText("Let's pretend this is a status bar"); + statusBar->setFrameStyle(QFrame::Panel | QFrame::Sunken); + statusBar->setFixedHeight(statusBar->sizeHint().height()); + statusBar->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); + topLayout->addWidget(statusBar); + + topLayout->activate(); + setLayout(topLayout); +} + +void tst_QWidget::complexToplevelResize() +{ + ResizeWidget w; + w.show(); + + QApplication::processEvents(); + + const int minSize = 100; + const int maxSize = 800; + int size = minSize; + + QBENCHMARK { + w.resize(size, size); + size = qMax(minSize, (size + 10) % maxSize); + QApplication::processEvents(); + QApplication::processEvents(); + } +} + +QTEST_MAIN(tst_QWidget) + +#include "tst_qwidget.moc" diff --git a/tests/benchmarks/gui/math3d/math3d.pro b/tests/benchmarks/gui/math3d/math3d.pro new file mode 100644 index 0000000..c511d9a --- /dev/null +++ b/tests/benchmarks/gui/math3d/math3d.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qmatrix4x4 \ + qquaternion diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro b/tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro new file mode 100644 index 0000000..e82d9de --- /dev/null +++ b/tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qmatrix4x4 + +SOURCES += tst_qmatrix4x4.cpp + diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp new file mode 100644 index 0000000..e962198 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp @@ -0,0 +1,672 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtOpenGL module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class tst_QMatrix4x4 : public QObject +{ + Q_OBJECT +public: + tst_QMatrix4x4() {} + ~tst_QMatrix4x4() {} + +private slots: + void multiply_data(); + void multiply(); + + void multiplyInPlace_data(); + void multiplyInPlace(); + + void multiplyDirect_data(); + void multiplyDirect(); + + void mapVector3D_data(); + void mapVector3D(); + + void mapVector2D_data(); + void mapVector2D(); + + void mapVectorDirect_data(); + void mapVectorDirect(); + + void compareTranslate_data(); + void compareTranslate(); + + void compareTranslateAfterScale_data(); + void compareTranslateAfterScale(); + + void compareTranslateAfterRotate_data(); + void compareTranslateAfterRotate(); + + void compareScale_data(); + void compareScale(); + + void compareScaleAfterTranslate_data(); + void compareScaleAfterTranslate(); + + void compareScaleAfterRotate_data(); + void compareScaleAfterRotate(); + + void compareRotate_data(); + void compareRotate(); + + void compareRotateAfterTranslate_data(); + void compareRotateAfterTranslate(); + + void compareRotateAfterScale_data(); + void compareRotateAfterScale(); +}; + +static qreal const generalValues[16] = + {1.0f, 2.0f, 3.0f, 4.0f, + 5.0f, 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f, 12.0f, + 13.0f, 14.0f, 15.0f, 16.0f}; + +void tst_QMatrix4x4::multiply_data() +{ + QTest::addColumn("m1"); + QTest::addColumn("m2"); + + QTest::newRow("identity * identity") + << QMatrix4x4() << QMatrix4x4(); + QTest::newRow("identity * general") + << QMatrix4x4() << QMatrix4x4(generalValues); + QTest::newRow("general * identity") + << QMatrix4x4(generalValues) << QMatrix4x4(); + QTest::newRow("general * general") + << QMatrix4x4(generalValues) << QMatrix4x4(generalValues); +} + +QMatrix4x4 mresult; + +void tst_QMatrix4x4::multiply() +{ + QFETCH(QMatrix4x4, m1); + QFETCH(QMatrix4x4, m2); + + QMatrix4x4 m3; + + QBENCHMARK { + m3 = m1 * m2; + } + + // Force the result to be stored so the compiler doesn't + // optimize away the contents of the benchmark loop. + mresult = m3; +} + +void tst_QMatrix4x4::multiplyInPlace_data() +{ + multiply_data(); +} + +void tst_QMatrix4x4::multiplyInPlace() +{ + QFETCH(QMatrix4x4, m1); + QFETCH(QMatrix4x4, m2); + + QMatrix4x4 m3; + + QBENCHMARK { + m3 = m1; + m3 *= m2; + } + + // Force the result to be stored so the compiler doesn't + // optimize away the contents of the benchmark loop. + mresult = m3; +} + +// Use a direct naive multiplication algorithm. This is used +// to compare against the optimized routines to see if they are +// actually faster than the naive implementation. +void tst_QMatrix4x4::multiplyDirect_data() +{ + multiply_data(); +} +void tst_QMatrix4x4::multiplyDirect() +{ + QFETCH(QMatrix4x4, m1); + QFETCH(QMatrix4x4, m2); + + QMatrix4x4 m3; + + const qreal *m1data = m1.constData(); + const qreal *m2data = m2.constData(); + qreal *m3data = m3.data(); + + QBENCHMARK { + for (int row = 0; row < 4; ++row) { + for (int col = 0; col < 4; ++col) { + m3data[col * 4 + row] = 0.0f; + for (int j = 0; j < 4; ++j) { + m3data[col * 4 + row] += + m1data[j * 4 + row] * m2data[col * 4 + j]; + } + } + } + } +} + +QVector3D vresult; + +void tst_QMatrix4x4::mapVector3D_data() +{ + QTest::addColumn("m1"); + + QTest::newRow("identity") << QMatrix4x4(); + QTest::newRow("general") << QMatrix4x4(generalValues); + + QMatrix4x4 t1; + t1.translate(-100.5f, 64.0f, 75.25f); + QTest::newRow("translate3D") << t1; + + QMatrix4x4 t2; + t2.translate(-100.5f, 64.0f); + QTest::newRow("translate2D") << t2; + + QMatrix4x4 s1; + s1.scale(-100.5f, 64.0f, 75.25f); + QTest::newRow("scale3D") << s1; + + QMatrix4x4 s2; + s2.scale(-100.5f, 64.0f); + QTest::newRow("scale2D") << s2; +} +void tst_QMatrix4x4::mapVector3D() +{ + QFETCH(QMatrix4x4, m1); + + QVector3D v(10.5f, -2.0f, 3.0f); + QVector3D result; + + m1.optimize(); + + QBENCHMARK { + result = m1 * v; + } + + // Force the result to be stored so the compiler doesn't + // optimize away the contents of the benchmark loop. + vresult = result; +} + +QPointF vresult2; + +void tst_QMatrix4x4::mapVector2D_data() +{ + mapVector3D_data(); +} +void tst_QMatrix4x4::mapVector2D() +{ + QFETCH(QMatrix4x4, m1); + + QPointF v(10.5f, -2.0f); + QPointF result; + + m1.optimize(); + + QBENCHMARK { + result = m1 * v; + } + + // Force the result to be stored so the compiler doesn't + // optimize away the contents of the benchmark loop. + vresult2 = result; +} + +// Use a direct naive multiplication algorithm. This is used +// to compare against the optimized routines to see if they are +// actually faster than the naive implementation. +void tst_QMatrix4x4::mapVectorDirect_data() +{ + mapVector3D_data(); +} +void tst_QMatrix4x4::mapVectorDirect() +{ + QFETCH(QMatrix4x4, m1); + + const qreal *m1data = m1.constData(); + qreal v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; + qreal result[4]; + + QBENCHMARK { + for (int row = 0; row < 4; ++row) { + result[row] = 0.0f; + for (int col = 0; col < 4; ++col) { + result[row] += m1data[col * 4 + row] * v[col]; + } + } + result[0] /= result[3]; + result[1] /= result[3]; + result[2] /= result[3]; + } +} + +// Compare the performance of QTransform::translate() to +// QMatrix4x4::translate(). +void tst_QMatrix4x4::compareTranslate_data() +{ + QTest::addColumn("useQTransform"); + QTest::addColumn("translation"); + + QTest::newRow("QTransform::translate(0, 0, 0)") + << true << QVector3D(0, 0, 0); + QTest::newRow("QMatrix4x4::translate(0, 0, 0)") + << false << QVector3D(0, 0, 0); + + QTest::newRow("QTransform::translate(1, 2, 0)") + << true << QVector3D(1, 2, 0); + QTest::newRow("QMatrix4x4::translate(1, 2, 0)") + << false << QVector3D(1, 2, 0); + + QTest::newRow("QTransform::translate(1, 2, 4)") + << true << QVector3D(1, 2, 4); + QTest::newRow("QMatrix4x4::translate(1, 2, 4)") + << false << QVector3D(1, 2, 4); +} +void tst_QMatrix4x4::compareTranslate() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, translation); + + qreal x = translation.x(); + qreal y = translation.y(); + qreal z = translation.z(); + + if (useQTransform) { + QTransform t; + QBENCHMARK { + t.translate(x, y); + } + } else if (z == 0.0f) { + QMatrix4x4 m; + QBENCHMARK { + m.translate(x, y); + } + } else { + QMatrix4x4 m; + QBENCHMARK { + m.translate(x, y, z); + } + } +} + +// Compare the performance of QTransform::translate() to +// QMatrix4x4::translate() after priming the matrix with a scale(). +void tst_QMatrix4x4::compareTranslateAfterScale_data() +{ + compareTranslate_data(); +} +void tst_QMatrix4x4::compareTranslateAfterScale() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, translation); + + qreal x = translation.x(); + qreal y = translation.y(); + qreal z = translation.z(); + + if (useQTransform) { + QTransform t; + t.scale(3, 4); + QBENCHMARK { + t.translate(x, y); + } + } else if (z == 0.0f) { + QMatrix4x4 m; + m.scale(3, 4); + QBENCHMARK { + m.translate(x, y); + } + } else { + QMatrix4x4 m; + m.scale(3, 4, 5); + QBENCHMARK { + m.translate(x, y, z); + } + } +} + +// Compare the performance of QTransform::translate() to +// QMatrix4x4::translate() after priming the matrix with a rotate(). +void tst_QMatrix4x4::compareTranslateAfterRotate_data() +{ + compareTranslate_data(); +} +void tst_QMatrix4x4::compareTranslateAfterRotate() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, translation); + + qreal x = translation.x(); + qreal y = translation.y(); + qreal z = translation.z(); + + if (useQTransform) { + QTransform t; + t.rotate(45.0f); + QBENCHMARK { + t.translate(x, y); + } + } else if (z == 0.0f) { + QMatrix4x4 m; + m.rotate(45.0f, 0, 0, 1); + QBENCHMARK { + m.translate(x, y); + } + } else { + QMatrix4x4 m; + m.rotate(45.0f, 0, 0, 1); + QBENCHMARK { + m.translate(x, y, z); + } + } +} + +// Compare the performance of QTransform::scale() to +// QMatrix4x4::scale(). +void tst_QMatrix4x4::compareScale_data() +{ + QTest::addColumn("useQTransform"); + QTest::addColumn("scale"); + + QTest::newRow("QTransform::scale(1, 1, 1)") + << true << QVector3D(1, 1, 1); + QTest::newRow("QMatrix4x4::scale(1, 1, 1)") + << false << QVector3D(1, 1, 1); + + QTest::newRow("QTransform::scale(3, 6, 1)") + << true << QVector3D(3, 6, 1); + QTest::newRow("QMatrix4x4::scale(3, 6, 1)") + << false << QVector3D(3, 6, 1); + + QTest::newRow("QTransform::scale(3, 6, 4)") + << true << QVector3D(3, 6, 4); + QTest::newRow("QMatrix4x4::scale(3, 6, 4)") + << false << QVector3D(3, 6, 4); +} +void tst_QMatrix4x4::compareScale() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, scale); + + qreal x = scale.x(); + qreal y = scale.y(); + qreal z = scale.z(); + + if (useQTransform) { + QTransform t; + QBENCHMARK { + t.scale(x, y); + } + } else if (z == 1.0f) { + QMatrix4x4 m; + QBENCHMARK { + m.scale(x, y); + } + } else { + QMatrix4x4 m; + QBENCHMARK { + m.scale(x, y, z); + } + } +} + +// Compare the performance of QTransform::scale() to +// QMatrix4x4::scale() after priming the matrix with a translate(). +void tst_QMatrix4x4::compareScaleAfterTranslate_data() +{ + compareScale_data(); +} +void tst_QMatrix4x4::compareScaleAfterTranslate() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, scale); + + qreal x = scale.x(); + qreal y = scale.y(); + qreal z = scale.z(); + + if (useQTransform) { + QTransform t; + t.translate(20, 34); + QBENCHMARK { + t.scale(x, y); + } + } else if (z == 1.0f) { + QMatrix4x4 m; + m.translate(20, 34); + QBENCHMARK { + m.scale(x, y); + } + } else { + QMatrix4x4 m; + m.translate(20, 34, 42); + QBENCHMARK { + m.scale(x, y, z); + } + } +} + +// Compare the performance of QTransform::scale() to +// QMatrix4x4::scale() after priming the matrix with a rotate(). +void tst_QMatrix4x4::compareScaleAfterRotate_data() +{ + compareScale_data(); +} +void tst_QMatrix4x4::compareScaleAfterRotate() +{ + QFETCH(bool, useQTransform); + QFETCH(QVector3D, scale); + + qreal x = scale.x(); + qreal y = scale.y(); + qreal z = scale.z(); + + if (useQTransform) { + QTransform t; + t.rotate(45.0f); + QBENCHMARK { + t.scale(x, y); + } + } else if (z == 1.0f) { + QMatrix4x4 m; + m.rotate(45.0f, 0, 0, 1); + QBENCHMARK { + m.scale(x, y); + } + } else { + QMatrix4x4 m; + m.rotate(45.0f, 0, 0, 1); + QBENCHMARK { + m.scale(x, y, z); + } + } +} + +// Compare the performance of QTransform::rotate() to +// QMatrix4x4::rotate(). +void tst_QMatrix4x4::compareRotate_data() +{ + QTest::addColumn("useQTransform"); + QTest::addColumn("angle"); + QTest::addColumn("rotation"); + QTest::addColumn("axis"); + + QTest::newRow("QTransform::rotate(0, ZAxis)") + << true << qreal(0.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + QTest::newRow("QMatrix4x4::rotate(0, ZAxis)") + << false << qreal(0.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + + QTest::newRow("QTransform::rotate(45, ZAxis)") + << true << qreal(45.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + QTest::newRow("QMatrix4x4::rotate(45, ZAxis)") + << false << qreal(45.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + + QTest::newRow("QTransform::rotate(90, ZAxis)") + << true << qreal(90.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + QTest::newRow("QMatrix4x4::rotate(90, ZAxis)") + << false << qreal(90.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); + + QTest::newRow("QTransform::rotate(0, YAxis)") + << true << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + QTest::newRow("QMatrix4x4::rotate(0, YAxis)") + << false << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + + QTest::newRow("QTransform::rotate(45, YAxis)") + << true << qreal(45.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + QTest::newRow("QMatrix4x4::rotate(45, YAxis)") + << false << qreal(45.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + + QTest::newRow("QTransform::rotate(90, YAxis)") + << true << qreal(90.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + QTest::newRow("QMatrix4x4::rotate(90, YAxis)") + << false << qreal(90.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); + + QTest::newRow("QTransform::rotate(0, XAxis)") + << true << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::XAxis); + QTest::newRow("QMatrix4x4::rotate(0, XAxis)") + << false << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::XAxis); + + QTest::newRow("QTransform::rotate(45, XAxis)") + << true << qreal(45.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); + QTest::newRow("QMatrix4x4::rotate(45, XAxis)") + << false << qreal(45.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); + + QTest::newRow("QTransform::rotate(90, XAxis)") + << true << qreal(90.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); + QTest::newRow("QMatrix4x4::rotate(90, XAxis)") + << false << qreal(90.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); +} +void tst_QMatrix4x4::compareRotate() +{ + QFETCH(bool, useQTransform); + QFETCH(qreal, angle); + QFETCH(QVector3D, rotation); + QFETCH(int, axis); + + qreal x = rotation.x(); + qreal y = rotation.y(); + qreal z = rotation.z(); + + if (useQTransform) { + QTransform t; + QBENCHMARK { + t.rotate(angle, Qt::Axis(axis)); + } + } else { + QMatrix4x4 m; + QBENCHMARK { + m.rotate(angle, x, y, z); + } + } +} + +// Compare the performance of QTransform::rotate() to +// QMatrix4x4::rotate() after priming the matrix with a translate(). +void tst_QMatrix4x4::compareRotateAfterTranslate_data() +{ + compareRotate_data(); +} +void tst_QMatrix4x4::compareRotateAfterTranslate() +{ + QFETCH(bool, useQTransform); + QFETCH(qreal, angle); + QFETCH(QVector3D, rotation); + QFETCH(int, axis); + + qreal x = rotation.x(); + qreal y = rotation.y(); + qreal z = rotation.z(); + + if (useQTransform) { + QTransform t; + t.translate(3, 4); + QBENCHMARK { + t.rotate(angle, Qt::Axis(axis)); + } + } else { + QMatrix4x4 m; + m.translate(3, 4, 5); + QBENCHMARK { + m.rotate(angle, x, y, z); + } + } +} + +// Compare the performance of QTransform::rotate() to +// QMatrix4x4::rotate() after priming the matrix with a scale(). +void tst_QMatrix4x4::compareRotateAfterScale_data() +{ + compareRotate_data(); +} +void tst_QMatrix4x4::compareRotateAfterScale() +{ + QFETCH(bool, useQTransform); + QFETCH(qreal, angle); + QFETCH(QVector3D, rotation); + QFETCH(int, axis); + + qreal x = rotation.x(); + qreal y = rotation.y(); + qreal z = rotation.z(); + + if (useQTransform) { + QTransform t; + t.scale(3, 4); + QBENCHMARK { + t.rotate(angle, Qt::Axis(axis)); + } + } else { + QMatrix4x4 m; + m.scale(3, 4, 5); + QBENCHMARK { + m.rotate(angle, x, y, z); + } + } +} + +QTEST_MAIN(tst_QMatrix4x4) + +#include "tst_qmatrix4x4.moc" diff --git a/tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro b/tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro new file mode 100644 index 0000000..cd68423 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qquaternion + +SOURCES += tst_qquaternion.cpp + diff --git a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp new file mode 100644 index 0000000..7930092 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +//TESTED_FILES= + +class tst_QQuaternion : public QObject +{ + Q_OBJECT + +public: + tst_QQuaternion(); + virtual ~tst_QQuaternion(); + +public slots: + void init(); + void cleanup(); + +private slots: + void multiply_data(); + void multiply(); +}; + +tst_QQuaternion::tst_QQuaternion() +{ +} + +tst_QQuaternion::~tst_QQuaternion() +{ +} + +void tst_QQuaternion::init() +{ +} + +void tst_QQuaternion::cleanup() +{ +} + +void tst_QQuaternion::multiply_data() +{ + QTest::addColumn("x1"); + QTest::addColumn("y1"); + QTest::addColumn("z1"); + QTest::addColumn("w1"); + QTest::addColumn("x2"); + QTest::addColumn("y2"); + QTest::addColumn("z2"); + QTest::addColumn("w2"); + + QTest::newRow("null") + << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f + << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f; + + QTest::newRow("unitvec") + << (qreal)1.0f << (qreal)0.0f << (qreal)0.0f << (qreal)1.0f + << (qreal)0.0f << (qreal)1.0f << (qreal)0.0f << (qreal)1.0f; + + QTest::newRow("complex") + << (qreal)1.0f << (qreal)2.0f << (qreal)3.0f << (qreal)7.0f + << (qreal)4.0f << (qreal)5.0f << (qreal)6.0f << (qreal)8.0f; +} + +void tst_QQuaternion::multiply() +{ + QFETCH(qreal, x1); + QFETCH(qreal, y1); + QFETCH(qreal, z1); + QFETCH(qreal, w1); + QFETCH(qreal, x2); + QFETCH(qreal, y2); + QFETCH(qreal, z2); + QFETCH(qreal, w2); + + QQuaternion q1(w1, x1, y1, z1); + QQuaternion q2(w2, x2, y2, z2); + + QBENCHMARK { + QQuaternion q3 = q1 * q2; + } +} + +QTEST_MAIN(tst_QQuaternion) +#include "tst_qquaternion.moc" diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro new file mode 100644 index 0000000..878567d --- /dev/null +++ b/tests/benchmarks/gui/painting/painting.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qpainter \ + qregion \ + qtransform diff --git a/tests/benchmarks/gui/painting/qpainter/qpainter.pro b/tests/benchmarks/gui/painting/qpainter/qpainter.pro new file mode 100644 index 0000000..5ac8c64 --- /dev/null +++ b/tests/benchmarks/gui/painting/qpainter/qpainter.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qpainter + +SOURCES += tst_qpainter.cpp diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp new file mode 100644 index 0000000..39b2244 --- /dev/null +++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp @@ -0,0 +1,1633 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +Q_DECLARE_METATYPE(QLine) +Q_DECLARE_METATYPE(QRect) +Q_DECLARE_METATYPE(QSize) +Q_DECLARE_METATYPE(QPoint) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QPainter::RenderHint) +Q_DECLARE_METATYPE(QPainter::CompositionMode) +Q_DECLARE_METATYPE(QImage::Format) + +enum PrimitiveType { + Primitive_Int_DiagLine, + Primitive_Int_VerLine, + Primitive_Int_HorLine, + Primitive_Int_Rect, + Primitive_Int_Ellipse, + Primitive_Int_Pie, + Primitive_Int_Arc, + Primitive_Int_Chord, + Primitive_Int_TriPoly, + Primitive_Int_RectPoly, + Primitive_Int_2RectPoly, + + Primitive_Float_DiagLine, + Primitive_Float_VerLine, + Primitive_Float_HorLine, + Primitive_Float_Rect, + Primitive_Float_Ellipse, + Primitive_Float_Pie, + Primitive_Float_Arc, + Primitive_Float_Chord, + Primitive_Float_TriPoly, + Primitive_Float_RectPoly, + Primitive_Float_2RectPoly, + + Primitive_Float_TriPath, + Primitive_Float_RectPath, + Primitive_Float_2RectPath, + Primitive_Float_EllipsePath, + Primitive_Last_Primitive + +}; + + +enum StateChanges { + ChangePen = 0x0001, + ChangeBrush = 0x0002, + ChangeClip = 0x0004, + ChangeTransform = 0x0008 +}; + + +struct PrimitiveSet { + QRect i_rect; + QLine i_line_diag; + QLine i_line_ver; + QLine i_line_hor; + QPolygon i_poly_tri; + QPolygon i_poly_2rects; + QPolygon i_poly_rect; + + QRectF f_rect; + QLineF f_line_diag; + QLineF f_line_ver; + QLineF f_line_hor; + QPolygonF f_poly_tri; + QPolygonF f_poly_2rects; + QPolygonF f_poly_rect; + + QPainterPath f_path_tri; + QPainterPath f_path_2rects; + QPainterPath f_path_rect; + QPainterPath f_path_ellipse; +}; + + +class tst_QPainter : public QObject +{ + Q_OBJECT + + public: + tst_QPainter() + { + setupBrushes(); + createPrimitives(); + m_surface = surface(); + } + +private slots: + void beginAndEnd(); + + void saveRestore_data(); + void saveRestore(); + + void drawLine_data(); + void drawLine(); + void drawLine_clipped_data(); + void drawLine_clipped(); + void drawLine_antialiased_clipped_data(); + void drawLine_antialiased_clipped(); + + void drawPixmap_data(); + void drawPixmap(); + + void drawImage_data(); + void drawImage(); + + void drawTiledPixmap_data(); + void drawTiledPixmap(); + + void compositionModes_data(); + void compositionModes(); + + void fillPrimitives_10_data() { drawPrimitives_data_helper(false); } + void fillPrimitives_100_data() { drawPrimitives_data_helper(false); } + void fillPrimitives_1000_data() { drawPrimitives_data_helper(false); } + void fillPrimitives_10(); + void fillPrimitives_100(); + void fillPrimitives_1000(); + + void strokePrimitives_10_data() { drawPrimitives_data_helper(true); } + void strokePrimitives_100_data() { drawPrimitives_data_helper(true); } + void strokePrimitives_1000_data() { drawPrimitives_data_helper(true); } + void strokePrimitives_10(); + void strokePrimitives_100(); + void strokePrimitives_1000(); + + void drawText_data(); + void drawText(); + + void clipAndFill_data(); + void clipAndFill(); + + void drawRoundedRect(); + void drawScaledRoundedRect(); + void drawTransformedRoundedRect(); + + void drawScaledAntialiasedRoundedRect_data(); + void drawTransformedAntialiasedRoundedRect_data(); + void drawAntialiasedRoundedRect(); + void drawScaledAntialiasedRoundedRect(); + void drawTransformedAntialiasedRoundedRect(); + + void drawScaledImageRoundedRect_data(); + void drawTransformedImageRoundedRect_data(); + void drawImageRoundedRect(); + void drawScaledImageRoundedRect(); + void drawTransformedImageRoundedRect(); + + void drawScaledBorderPixmapRoundedRect_data(); + void drawTransformedBorderPixmapRoundedRect_data(); + void drawBorderPixmapRoundedRect(); + void drawScaledBorderPixmapRoundedRect(); + void drawTransformedBorderPixmapRoundedRect(); + + void drawTransformedTransparentImage_data(); + void drawTransformedSemiTransparentImage_data(); + void drawTransformedFilledImage_data(); + void drawTransformedTransparentImage(); + void drawTransformedSemiTransparentImage(); + void drawTransformedFilledImage(); + +private: + void setupBrushes(); + void createPrimitives(); + + void drawPrimitives_data_helper(bool fancypens); + void fillPrimitives_helper(QPainter *painter, PrimitiveType type, PrimitiveSet *s); + + QTransform transformForAngle(qreal angle); + + QPaintDevice *surface() + { + return new QPixmap(1024, 1024); + } + + + QMap m_pens; + QMap m_brushes; + + PrimitiveSet m_primitives_10; + PrimitiveSet m_primitives_100; + PrimitiveSet m_primitives_1000; + + QPaintDevice *m_surface; + QPainter m_painter; + +}; + +void tst_QPainter::createPrimitives() +{ + for (int i=0; i<3; ++i) { + PrimitiveSet *ps; + int size; + switch (i) { + case 0: + ps = &m_primitives_10; + size = 10; + break; + case 1: + ps = &m_primitives_100; + size = 100; + break; + case 2: + ps = &m_primitives_1000; + size = 1000; + break; + } + + ps->f_rect = QRectF(0, 0, size, size); + ps->f_line_diag = QLineF(0, 0, size, size); + ps->f_line_ver = QLineF(10, 0, 10, size); + ps->f_line_hor = QLineF(0, 10, size, 10); + ps->f_poly_rect = QPolygonF() << QPointF(0, 0) + << QPointF(size, 0) + << QPointF(size, size) + << QPointF(0, size); + ps->f_poly_2rects = QPolygonF() << QPointF(0, 0) + << QPointF(size * 0.75, 0) + << QPointF(size * 0.75, size * 0.75) + << QPointF(size * 0.25, size * 0.75) + << QPointF(size * 0.25, size * 0.25) + << QPointF(size, size * 0.25) + << QPointF(size, size) + << QPointF(0, size); + ps->f_poly_tri = QPolygonF() << QPointF(size / 2.0, 0) + << QPointF(0, size) + << QPointF(size, size); + + ps->f_path_tri.addPolygon(ps->f_poly_tri); + ps->f_path_rect.addRect(ps->f_rect); + ps->f_path_2rects.addPolygon(ps->f_poly_2rects); + ps->f_path_ellipse.addEllipse(ps->f_rect); + + ps->i_rect = ps->f_rect.toRect(); + ps->i_line_diag = ps->f_line_diag.toLine(); + ps->i_line_hor = ps->f_line_hor.toLine(); + ps->i_line_ver = ps->f_line_ver.toLine(); + ps->i_poly_tri = ps->f_poly_tri.toPolygon(); + ps->i_poly_rect = ps->f_poly_rect.toPolygon(); + ps->i_poly_2rects = ps->f_poly_2rects.toPolygon(); + } +} + +void tst_QPainter::drawLine_data() +{ + QTest::addColumn("line"); + QTest::addColumn("pen"); + + QVector pens; + pens << QPen(Qt::black) + << QPen(Qt::black, 0, Qt::DashDotLine) + << QPen(Qt::black, 4) + << QPen(Qt::black, 4, Qt::DashDotLine) + << QPen(QColor(255, 0, 0, 200)) + << QPen(QColor(255, 0, 0, 200), 0, Qt::DashDotLine) + << QPen(QColor(255, 0, 0, 200), 4) + << QPen(QColor(255, 0, 0, 200), 4, Qt::DashDotLine); + + QStringList penNames; + penNames << "black-0" + << "black-0-dashdot" + << "black-4" + << "black-4-dashdot" + << "alpha-0" + << "alpha-0-dashdot" + << "alpha-4" + << "alpha-4-dashdot"; + + int i = 0; + foreach (QPen pen, pens) { + const QString s = QString(QLatin1String("%1:%2")).arg(penNames[i]); + QTest::newRow(qPrintable(s.arg("horizontal"))) + << QLine(0, 20, 100, 20) << pen; + QTest::newRow(qPrintable(s.arg("vertical:"))) + << QLine(20, 0, 20, 100) << pen; + QTest::newRow(qPrintable(s.arg("0-45:"))) + << QLine(0, 20, 100, 0) << pen; + QTest::newRow(qPrintable(s.arg("45-90:"))) + << QLine(0, 100, 20, 0) << pen; + QTest::newRow(qPrintable(s.arg("90-135:"))) + << QLine(20, 100, 0, 0) << pen; + QTest::newRow(qPrintable(s.arg("135-180:"))) + << QLine(100, 20, 0, 0) << pen; + QTest::newRow(qPrintable(s.arg("180-225:"))) + << QLine(100, 0, 0, 20) << pen; + QTest::newRow(qPrintable(s.arg("225-270:"))) + << QLine(20, 0, 0, 100) << pen; + QTest::newRow(qPrintable(s.arg("270-315:"))) + << QLine(0, 0, 20, 100) << pen; + QTest::newRow(qPrintable(s.arg("315-360:"))) + << QLine(0, 0, 100, 20) << pen; + ++i; + } +} + +void tst_QPainter::setupBrushes() +{ + // Solid brushes... + m_brushes["black-brush"] = QBrush(Qt::black); + m_brushes["white-brush"] = QBrush(Qt::white); + m_brushes["transparent-brush"] = QBrush(QColor(255, 255, 255, 0)); + m_brushes["alpha1-brush"] = QBrush(QColor(255, 255, 255, 100)); + m_brushes["alpha2-brush"] = QBrush(QColor(255, 255, 255, 200)); + + + // Patterns + m_brushes["dense1-brush"] = QBrush(Qt::Dense1Pattern); + m_brushes["dense2-brush"] = QBrush(Qt::Dense2Pattern); + m_brushes["dense3-brush"] = QBrush(Qt::Dense3Pattern); + m_brushes["dense4-brush"] = QBrush(Qt::Dense4Pattern); + m_brushes["dense5-brush"] = QBrush(Qt::Dense5Pattern); + m_brushes["dense6-brush"] = QBrush(Qt::Dense6Pattern); + m_brushes["dense7-brush"] = QBrush(Qt::Dense7Pattern); + m_brushes["hor-brush"] = QBrush(Qt::HorPattern); + m_brushes["ver-brush"] = QBrush(Qt::VerPattern); + m_brushes["cross-brush"] = QBrush(Qt::CrossPattern); + m_brushes["bdiag-brush"] = QBrush(Qt::BDiagPattern); + m_brushes["fdiag-brush"] = QBrush(Qt::FDiagPattern); + m_brushes["diagcross-brush"] = QBrush(Qt::DiagCrossPattern); + + // Gradients + QGradientStops gradient_white_black; + gradient_white_black << QPair(0, QColor(Qt::white)); + gradient_white_black << QPair(1, QColor(Qt::black)); + + QGradientStops gradient_white_black10; + for (int i=0; i<10; ++i) { + gradient_white_black10 << QPair(i/10.0, QColor(Qt::white)); + gradient_white_black10 << QPair(i/10.0+0.05, QColor(Qt::black)); + } + + QGradientStops gradient_white_alpha; + gradient_white_alpha << QPair(0, QColor(Qt::white)); + gradient_white_alpha << QPair(0, QColor(Qt::transparent)); + + QGradientStops gradient_white_alpha10; + for (int i=0; i<10; ++i) { + gradient_white_alpha10 << QPair(i/10.0, QColor(Qt::white)); + gradient_white_alpha10 << QPair(i/10.0+0.05, QColor(Qt::black)); + } + + + for (int j=0; j<4; ++j) { + QLinearGradient lg; + lg.setStart(0, 0); + + QRadialGradient rg; + QConicalGradient cg; + + QGradientStops stops; + if (j == 0) stops = gradient_white_black; + else if (j == 1) stops = gradient_white_black10; + else if (j == 2) stops = gradient_white_alpha; + else if (j == 3) stops = gradient_white_alpha10; + lg.setStops(stops); + rg.setStops(stops); + cg.setStops(stops); + + for (int i=0; i<6; ++i) { + lg.setSpread((QGradient::Spread) (i % 3)); + lg.setCoordinateMode((QGradient::CoordinateMode) (j / 3)); + + QString name = QString::fromLatin1("-%1%2") + .arg(lg.spread()) + .arg(lg.coordinateMode()); + + lg.setFinalStop(100, 0); + m_brushes["hor-lingrad-w/b-brush" + name] = QBrush(lg); + + lg.setFinalStop(0, 100); + m_brushes["ver-lingrad-w/b-brush" + name] = QBrush(lg); + + lg.setFinalStop(100, 100); + m_brushes["diag-lingrad-w/b-brush" + name] = QBrush(lg); + + rg.setRadius(100); + rg.setCenter(0, 0); + rg.setFocalPoint(50, 50); + m_brushes["radgrad-brush" + name] = QBrush(rg); + + cg.setCenter(0, 0); + cg.setAngle(40); + m_brushes["congrad-brush" + name] = QBrush(cg); + } + } + + // Set up pens... + + +// m_pens["black-pen"] = QPen(Qt::black); +// m_pens["white-pen"] = QPen(Qt::white); +// m_pens["transparent-pen"] = QPen(QColor(255, 255, 255, 0)); +// m_pens["translucent1-pen"] = QPen(QColor(255, 255, 255, 100)); +// m_pens["translucent2-pen"] = QPen(QColor(255, 255, 255, 200)); + + + +} + + +// void QPainter_Primitives::fillRect_data() { + +// QTest::addColumn("brush"); +// QTest::addColumn("size"); + +// for (QMap::const_iterator it = m_brushes.constBegin(); +// it != m_brushes.constEnd(); ++it) { +// for (int w=2; w<1025; w*=2) { +// for (int h=2; h<1025; h*=2) { +// QTest::newRow(QString("brush=%1; size=[%2,%3]").arg(it.key()).arg(w).arg(h).toAscii().data()) +// << *it << QSize(w, h); +// } +// } +// } +// } + + + + + +// void QPainter_Primitives::fillRect() +// { +// QFETCH(QBrush, brush); +// QFETCH(QSize, size); + +// QImage img(1024, 1024, QImage::Format_ARGB32_Premultiplied); +// QPainter p(&img); +// p.setPen(Qt::NoPen); +// p.setBrush(brush); +// QRect rect(QPoint(0, 0), size); +// QBENCHMARK { +// p.drawRect(rect); +// } +// } + + + + +void tst_QPainter::beginAndEnd() +{ + QPixmap pixmap(100, 100); + + QBENCHMARK { + QPainter p; + p.begin(&pixmap); + p.end(); + } +} + +void tst_QPainter::drawLine() +{ + QFETCH(QLine, line); + QFETCH(QPen, pen); + + const int offset = 5; + QPixmap pixmapUnclipped(qMin(line.x1(), line.x2()) + + 2*offset + qAbs(line.dx()), + qMin(line.y1(), line.y2()) + + 2*offset + qAbs(line.dy())); + pixmapUnclipped.fill(Qt::white); + + QPainter p(&pixmapUnclipped); + p.translate(offset, offset); + p.setPen(pen); + p.paintEngine()->syncState(); + + QBENCHMARK { + p.drawLine(line); + } + + p.end(); + +} + +void tst_QPainter::drawLine_clipped_data() +{ + drawLine_data(); +} + +void tst_QPainter::drawLine_clipped() +{ + QFETCH(QLine, line); + QFETCH(QPen, pen); + + const int offset = 5; + QPixmap pixmapClipped(qMin(line.x1(), line.x2()) + + 2*offset + qAbs(line.dx()), + qMin(line.y1(), line.y2()) + + 2*offset + qAbs(line.dy())); + + const QRect clip = QRect(line.p1(), line.p2()).normalized(); + + pixmapClipped.fill(Qt::white); + QPainter p(&pixmapClipped); + p.translate(offset, offset); + p.setClipRect(clip); + p.setPen(pen); + p.paintEngine()->syncState(); + + QBENCHMARK { + p.drawLine(line); + } + + p.end(); +} + + +void tst_QPainter::drawLine_antialiased_clipped_data() +{ + drawLine_data(); +} + + +void tst_QPainter::drawLine_antialiased_clipped() +{ + QFETCH(QLine, line); + QFETCH(QPen, pen); + + const int offset = 5; + QPixmap pixmapClipped(qMin(line.x1(), line.x2()) + + 2*offset + qAbs(line.dx()), + qMin(line.y1(), line.y2()) + + 2*offset + qAbs(line.dy())); + + const QRect clip = QRect(line.p1(), line.p2()).normalized(); + + pixmapClipped.fill(Qt::white); + QPainter p(&pixmapClipped); + p.setRenderHint(QPainter::Antialiasing); + p.translate(offset, offset); + p.setClipRect(clip); + p.setPen(pen); + p.paintEngine()->syncState(); + + QBENCHMARK { + p.drawLine(line); + } + + p.end(); +} + +void tst_QPainter::drawPixmap_data() +{ + QTest::addColumn("sourceFormat"); + QTest::addColumn("targetFormat"); + QTest::addColumn("size"); + QTest::addColumn("type"); // 0 = circle, 1 = diag line, 2 = solid rect, 3 = alpharect + + QList sizes; + sizes << QSize(1, 1) + << QSize(10, 10) + << QSize(100, 100) + << QSize(1000, 1000); + + const char *typeNames[] = { + "circle", + "line", + "solidrect", + "alpharect" + }; + + const char *formatNames[] = { + "Invalid", + "Mono", + "MonoLSB", + "Indexed8", + "RGB32", + "ARGB32", + "ARGB32_pm", + "RGB16", + "ARGB8565_pm", + "RGB666", + "ARGB6666_pm", + "RGB555", + "ARGB8555_pm", + "RGB888", + "RGB444", + "ARGB4444_pm" + }; + + for (int tar=4; tar("mode"); + QTest::addColumn("size"); + QTest::addColumn("color"); + + const int n = QPainter::RasterOp_SourceAndNotDestination; + for (int i = 0; i <= n; ++i) { + QString title("%1:%2"); + QTest::newRow(qPrintable(title.arg(i).arg("10x10:opaque"))) + << (QPainter::CompositionMode)(i) + << QSize(10, 10) << QColor(255, 0, 0); + QTest::newRow(qPrintable(title.arg(i).arg("10x10:!opaque"))) + << (QPainter::CompositionMode)(i) + << QSize(10, 10) << QColor(127, 127, 127, 127); + QTest::newRow(qPrintable(title.arg(i).arg("300x300:opaque"))) + << (QPainter::CompositionMode)(i) + << QSize(300, 300) << QColor(255, 0, 0); + QTest::newRow(qPrintable(title.arg(i).arg("300x300:!opaque"))) + << (QPainter::CompositionMode)(i) + << QSize(300, 300) << QColor(127, 127, 127, 127); + } +} + +void tst_QPainter::compositionModes() +{ + QFETCH(QPainter::CompositionMode, mode); + QFETCH(QSize, size); + QFETCH(QColor, color); + + QPixmap src(size); + src.fill(color); + + QPixmap dest(size); + if (mode < QPainter::RasterOp_SourceOrDestination) + color.setAlpha(127); // porter-duff needs an alpha channel + dest.fill(color); + + QPainter p(&dest); + p.setCompositionMode(mode); + + QBENCHMARK { + p.drawPixmap(0, 0, src); + } +} + +void tst_QPainter::drawTiledPixmap_data() +{ + QTest::addColumn("srcSize"); + QTest::addColumn("dstSize"); + QTest::addColumn("transform"); + QTest::addColumn("color"); + QTest::addColumn("renderHint"); + + QTest::newRow("10x10=>20x20") + << QSize(10, 10) << QSize(20, 20) << (QTransform()) + << QColor(Qt::black) << QPainter::RenderHint(0); + QTest::newRow("10x10=>20x20, smooth") + << QSize(10, 10) << QSize(20, 20) << (QTransform()) + << QColor(Qt::black) << QPainter::SmoothPixmapTransform; + QTest::newRow("10x10=>20x20, !opaque") + << QSize(10, 10) << QSize(20, 20) << (QTransform()) + << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); + QTest::newRow("10x10=>20x20, !opaque, smooth") + << QSize(10, 10) << QSize(20, 20) << (QTransform()) + << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; + + QTest::newRow("10x10=>20x20, rotate(30)") + << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) + << QColor(Qt::black) << QPainter::RenderHint(0); + QTest::newRow("10x10=>20x20, rotate(30), smooth") + << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) + << QColor(Qt::black) << QPainter::SmoothPixmapTransform; + QTest::newRow("10x10=>20x20, rotate(30), !opaque") + << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) + << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); + QTest::newRow("10x10=>20x20, rotate(30), !opaque, smooth") + << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) + << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; + + QTest::newRow("100x100=>200x200") + << QSize(100, 100) << QSize(200, 200) << (QTransform()) + << QColor(Qt::black) << QPainter::RenderHint(0); + QTest::newRow("100x100=>200x200, smooth") + << QSize(100, 100) << QSize(200, 200) << (QTransform()) + << QColor(Qt::black) << QPainter::SmoothPixmapTransform; + QTest::newRow("100x100=>200x200, !opaque") + << QSize(100, 100) << QSize(200, 200) << (QTransform()) + << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); + QTest::newRow("100x100=>200x200, !opaque, smooth") + << QSize(100, 100) << QSize(200, 200) << (QTransform()) + << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; + + QTest::newRow("100x100=>200x200, rotate(30)") + << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) + << QColor(Qt::black) << QPainter::RenderHint(0); + QTest::newRow("100x100=>200x200, rotate(30), smooth") + << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) + << QColor(Qt::black) << QPainter::SmoothPixmapTransform; + QTest::newRow("100x100=>200x200, rotate(30), !opaque") + << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) + << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); + QTest::newRow("100x100=>200x200, rotate(30), !opaque, smooth") + << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) + << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; +} + +void tst_QPainter::drawTiledPixmap() +{ + QFETCH(QSize, srcSize); + QFETCH(QSize, dstSize); + QFETCH(QTransform, transform); + QFETCH(QColor, color); + QFETCH(QPainter::RenderHint, renderHint); + + QPixmap src(srcSize); + src.fill(color); + + const QRect dstRect = transform.mapRect(QRect(QPoint(), dstSize)); + QPixmap dst(dstRect.right() + 5, dstRect.bottom() + 5); + QPainter p(&dst); + p.setTransform(transform); + p.setRenderHint(renderHint); + + QBENCHMARK { + p.drawTiledPixmap(QRect(QPoint(), dstSize), src); + } +} + +void tst_QPainter::fillPrimitives_helper(QPainter *p, PrimitiveType type, PrimitiveSet *s) +{ + p->paintEngine()->syncState(); + + switch (type) { + case Primitive_Int_DiagLine: QBENCHMARK { p->drawLine(s->i_line_diag); } break; + case Primitive_Int_VerLine: QBENCHMARK { p->drawLine(s->i_line_ver); } break; + case Primitive_Int_HorLine: QBENCHMARK { p->drawLine(s->i_line_hor); } break; + case Primitive_Int_Rect: QBENCHMARK { p->drawRect(s->i_rect); } break; + case Primitive_Int_Ellipse: QBENCHMARK { p->drawEllipse(s->i_rect); } break; + case Primitive_Int_Pie: QBENCHMARK { p->drawPie(s->i_rect, 45*16, 270*16); } break; + case Primitive_Int_Arc: QBENCHMARK { p->drawArc(s->i_rect, 45*16, 270*16); } break; + case Primitive_Int_Chord: QBENCHMARK { p->drawChord(s->i_rect, 45*16, 270*16); } break; + case Primitive_Int_TriPoly: QBENCHMARK { p->drawPolygon(s->i_poly_tri); } break; + case Primitive_Int_RectPoly: QBENCHMARK { p->drawPolygon(s->i_poly_rect); } break; + case Primitive_Int_2RectPoly: QBENCHMARK { p->drawPolygon(s->i_poly_2rects); } break; + + case Primitive_Float_DiagLine: QBENCHMARK { p->drawLine(s->f_line_diag); } break; + case Primitive_Float_VerLine: QBENCHMARK { p->drawLine(s->f_line_ver); } break; + case Primitive_Float_HorLine: QBENCHMARK { p->drawLine(s->f_line_hor); } break; + case Primitive_Float_Rect: QBENCHMARK { p->drawRect(s->f_rect); } break; + case Primitive_Float_Ellipse: QBENCHMARK { p->drawEllipse(s->f_rect); } break; + case Primitive_Float_Pie: QBENCHMARK { p->drawPie(s->f_rect, 45*16, 270*16); } break; + case Primitive_Float_Arc: QBENCHMARK { p->drawArc(s->f_rect, 45*16, 270*16); } break; + case Primitive_Float_Chord: QBENCHMARK { p->drawChord(s->f_rect, 45*16, 270*16); } break; + case Primitive_Float_TriPoly: QBENCHMARK { p->drawPolygon(s->f_poly_tri); } break; + case Primitive_Float_RectPoly: QBENCHMARK { p->drawPolygon(s->f_poly_rect); } break; + case Primitive_Float_2RectPoly: QBENCHMARK { p->drawPolygon(s->f_poly_2rects); } break; + + case Primitive_Float_TriPath: QBENCHMARK { p->drawPath(s->f_path_tri); } break; + case Primitive_Float_RectPath: QBENCHMARK { p->drawPath(s->f_path_rect); } break; + case Primitive_Float_2RectPath: QBENCHMARK { p->drawPath(s->f_path_2rects); } break; + case Primitive_Float_EllipsePath: QBENCHMARK { p->drawPath(s->f_path_ellipse); } break; + } +} + +void tst_QPainter::drawPrimitives_data_helper(bool fancypens) +{ + QTest::addColumn("type"); + QTest::addColumn("aa"); + QTest::addColumn("dash"); + QTest::addColumn("width"); + + const char * const names[] = { + "IDLine", + "IVLine", + "IHLine", + "IRect", + "IElli", + "IPie", + "IArc", + "IChord", + "ITriPol", + "IRectPol", + "I2RectPol", + "FDLine", + "FVLine", + "FHLine", + "FRect", + "FElli", + "FPie", + "FArc", + "FChord", + "FTriPol", + "FRectPol", + "F2RectPol", + "FTriPa", + "FRectPa", + "F2RectPa", + "FElliPa" + }; + + if (fancypens) { + for (int dash=0; dash<2; ++dash) { + for (int width=0; width<=4; width+=4) { + for (int aa=0; aa<2; ++aa) { + for (int type=0; type("text"); + + QTest::newRow("a") << QString::fromLatin1("a"); + QTest::newRow("ab") << QString::fromLatin1("ab"); + QTest::newRow("abc") << QString::fromLatin1("abc"); + QTest::newRow("abcd") << QString::fromLatin1("abcd"); + QTest::newRow("abcde") << QString::fromLatin1("abcde"); + QTest::newRow("abcdef") << QString::fromLatin1("abcdef"); + QTest::newRow("abcdefg") << QString::fromLatin1("abcdefg"); +} + +void tst_QPainter::drawText() +{ + QFETCH(QString, text); + + QPainter p(m_surface); + + QBENCHMARK { + p.drawText(QPointF(5, 5), text); + } +} + +void tst_QPainter::saveRestore_data() +{ + QTest::addColumn("change"); + + for (int i=0; i<16; ++i) { + QString change = "change="; + if (i == 0) change += " none"; + if (i & ChangePen) change += " pen"; + if (i & ChangeBrush) change += " brush"; + if (i & ChangeClip) change += " clip"; + if (i & ChangeTransform) change += " xform"; + + QTest::newRow(change.toLatin1()) << i; + } +} + +void tst_QPainter::saveRestore() +{ + QFETCH(int, change); + + QPen pen(Qt::blue); + QBrush brush(Qt::green); + QRect r(100, 100, 100, 20); + + QPainter p(m_surface); + + p.setPen(Qt::NoPen); + p.setBrush(Qt::NoBrush); + + QBENCHMARK { + p.save(); + if (change & ChangePen) { p.setPen(pen); p.setPen(Qt::NoPen); } + if (change & ChangeBrush) { p.setBrush(brush); p.setBrush(Qt::NoBrush); } + if (change & ChangeClip) p.setClipRect(r); + if (change & ChangeTransform) { p.scale(3, 5); p.scale(1/3.0, 1/5.0); } + p.drawRect(0, 0, 1, 1); + p.restore(); + }; +} + +enum ClipType { + RectClipType, + RectPathClipType, + RectRegionClipType, + RegionClipType, + PathClipType +}; + +void tst_QPainter::clipAndFill_data() +{ + QTest::addColumn("type"); + + QTest::newRow("rect") << (int) RectClipType; + QTest::newRow("rectpath") << (int) RectPathClipType; + QTest::newRow("rectregion") << (int) RectRegionClipType; + QTest::newRow("ellipseRegion") << (int) RegionClipType; + QTest::newRow("ellipsePath") << (int) PathClipType; +} + + +void tst_QPainter::clipAndFill() +{ + QFETCH(int, type); + + QRegion region; + QPainterPath path; + QRectF rect; + + switch (type) { + case RectClipType: + rect = QRectF(100, 100, 100, 100); + break; + case RectPathClipType: + path.addRect(100, 100, 100, 100); + break; + case RectRegionClipType: + region = QRegion(100, 100, 100, 100); + break; + case RegionClipType: + region = QRegion(100, 100, 100, 100, QRegion::Ellipse); + break; + case PathClipType: + path.addEllipse(100, 100, 100, 100); + break; + } + + QPainter p(m_surface); + + p.setPen(Qt::NoPen); + p.setBrush(Qt::red); + + QBENCHMARK { + if (type == RectClipType) + p.setClipRect(rect); + else if (type == RectPathClipType || type == PathClipType) + p.setClipPath(path); + else + p.setClipRegion(region); + p.drawRect(110, 110, 10, 10); + } +} + +QTransform tst_QPainter::transformForAngle(qreal angle) +{ + const qreal inv_dist_to_plane = 1. / 1024.; + + QTransform transform; + + QTransform rotTrans; + rotTrans.translate(-40, 0); + QTransform rotTrans2; + rotTrans2.translate(40, 0); + + qreal rad = angle * 2. * M_PI / 360.; + qreal c = ::cos(rad); + qreal s = ::sin(rad); + + qreal x = 0; + qreal y = 80; + qreal z = 0; + + qreal len = x * x + y * y + z * z; + if (len != 1.) { + len = ::sqrt(len); + x /= len; + y /= len; + z /= len; + } + + QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*inv_dist_to_plane, + y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*inv_dist_to_plane, + 0, 0, 1); + + transform *= rotTrans; + transform *= rot; + transform *= rotTrans2; + + return transform; +} + +void tst_QPainter::drawRoundedRect() +{ + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); + } +} + +void tst_QPainter::drawScaledRoundedRect() +{ + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + p.scale(3, 3); + + QBENCHMARK { + p.drawRoundedRect(10, 10, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawTransformedRoundedRect() +{ + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawRoundedRect(100, 100, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawAntialiasedRoundedRect() +{ + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); + } +} + +void tst_QPainter::drawScaledAntialiasedRoundedRect_data() +{ + QTest::addColumn("scale"); + + for (float i = 0; i < 3; i += .1) + QTest::newRow(QString(QLatin1String("scale=%1")).arg(i).toLatin1()) << i; +} + +void tst_QPainter::drawScaledAntialiasedRoundedRect() +{ + QFETCH(float, scale); + + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + p.scale(scale, scale); + + QBENCHMARK { + p.drawRoundedRect(10, 10, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawTransformedAntialiasedRoundedRect_data() +{ + QTest::addColumn("transform"); + + for (float angle = 0; angle < 360; angle += 10) + QTest::newRow(QString(QLatin1String("angle=%1")).arg(angle).toLatin1()) << transformForAngle(angle); +} + +void tst_QPainter::drawTransformedAntialiasedRoundedRect() +{ + QFETCH(QTransform, transform); + + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(QPen(Qt::black, 1)); + p.setBrush(Qt::red); + + QBENCHMARK { + p.setWorldTransform(transform); + p.drawRoundedRect(100, 100, 80, 80, 10, 10); + } +} + +void tst_QPainter::drawImageRoundedRect() +{ + //setup image + const int radius = 10; + QImage rectImage(81, 81, QImage::Format_ARGB32_Premultiplied); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.drawImage(0,0, rectImage); + } +} + +void tst_QPainter::drawScaledImageRoundedRect_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawScaledImageRoundedRect() +{ + QFETCH(int, imageType); + + //setup image + const int radius = 10; + QImage rectImage(81, 81, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + p.scale(3, 3); + + QBENCHMARK { + p.drawImage(0,0, rectImage); + } +} + +void tst_QPainter::drawTransformedImageRoundedRect_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedImageRoundedRect() +{ + QFETCH(int, imageType); + + //setup image + const int radius = 10; + QImage rectImage(81, 81, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(100,100, rectImage); + } +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawBorderPixmapRoundedRect() +{ + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, QImage::Format_ARGB32_Premultiplied); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(100, 100, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawScaledBorderPixmapRoundedRect_data() +{ + QTest::addColumn("scale"); + QTest::addColumn("imageType"); + + for (float i = 0; i < 3; i += .1) + QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB32_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB32_Premultiplied; + //for (float i = 0; i < 3; i += .1) + // QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied; +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawScaledBorderPixmapRoundedRect() +{ + QFETCH(float, scale); + QFETCH(int, imageType); + + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + p.scale(scale, scale); + + QBENCHMARK { + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawTransformedBorderPixmapRoundedRect_data() +{ + QTest::addColumn("transform"); + QTest::addColumn("imageType"); + + for (float angle = 0; angle < 360; angle += 10) + QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB32_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB32_Premultiplied; + //for (float angle = 0; angle < 360; angle += 10) + // QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB8565_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB8565_Premultiplied; + +} + +//code from QmlGraphicsRectangle for drawing rounded rects +void tst_QPainter::drawTransformedBorderPixmapRoundedRect() +{ + QFETCH(QTransform, transform); + QFETCH(int, imageType); + + //setup image + const int pw = 1; + const int radius = 10; + QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); + rectImage.fill(0); + QPainter rp(&rectImage); + rp.setRenderHint(QPainter::Antialiasing); + rp.setPen(Qt::black); + rp.setBrush(Qt::red); + if (pw%2) + rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); + else + rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); + + QPixmap rectPixmap = QPixmap::fromImage(rectImage); + + //setup surface + QImage surface(400, 400, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(transform); + const int pw = 2; + int width = 80; + int height = 80; + + int xOffset = (rectPixmap.width()-1)/2; + int yOffset = (rectPixmap.height()-1)/2; + Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); + Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); + + QMargins margins(xOffset, yOffset, xOffset, yOffset); + QTileRules rules(Qt::StretchTile, Qt::StretchTile); + qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); + } +} + +void tst_QPainter::drawTransformedTransparentImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedTransparentImage() +{ + QFETCH(int, imageType); + + //setup image + QImage transImage(200, 200, (QImage::Format)imageType); + transImage.fill(0); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, transImage); + } +} + +void tst_QPainter::drawTransformedSemiTransparentImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedSemiTransparentImage() +{ + QFETCH(int, imageType); + + //setup image + QImage transImage(200, 200, (QImage::Format)imageType); + transImage.fill(QColor(0,0,0, 128).rgba()); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, transImage); + } +} + +void tst_QPainter::drawTransformedFilledImage_data() +{ + QTest::addColumn("imageType"); + + QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; + QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; +} + +void tst_QPainter::drawTransformedFilledImage() +{ + QFETCH(int, imageType); + + //setup image + QImage filledImage(200, 200, (QImage::Format)imageType); + filledImage.fill(QColor(0,0,0).rgb()); + + //setup surface + QImage surface(200, 200, QImage::Format_RGB16); + surface.fill(QColor(255,255,255).rgb()); + QPainter p(&surface); + + QBENCHMARK { + p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); + p.drawImage(0,0, filledImage); + } +} + + +QTEST_MAIN(tst_QPainter) + +#include "tst_qpainter.moc" diff --git a/tests/benchmarks/gui/painting/qregion/main.cpp b/tests/benchmarks/gui/painting/qregion/main.cpp new file mode 100644 index 0000000..3d16e41 --- /dev/null +++ b/tests/benchmarks/gui/painting/qregion/main.cpp @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +// This file contains benchmarks for QRegion functions. + +#include +#include + +class tst_qregion : public QObject +{ + Q_OBJECT +private slots: + void map_data(); + void map(); +}; + + +void tst_qregion::map_data() +{ + QTest::addColumn("region"); + + { + QRegion region(0, 0, 100, 100); + QTest::newRow("single rect") << region; + } + { + QRegion region; + region = region.united(QRect(0, 0, 100, 100)); + region = region.united(QRect(120, 20, 100, 100)); + + QTest::newRow("two rects") << region; + } + { + QRegion region(0, 0, 100, 100, QRegion::Ellipse); + QTest::newRow("ellipse") << region; + } +} + +void tst_qregion::map() +{ + QFETCH(QRegion, region); + + QTransform transform; + transform.rotate(30); + QBENCHMARK { + transform.map(region); + } +} + +QTEST_MAIN(tst_qregion) + +#include "main.moc" diff --git a/tests/benchmarks/gui/painting/qregion/qregion.pro b/tests/benchmarks/gui/painting/qregion/qregion.pro new file mode 100644 index 0000000..fc67177 --- /dev/null +++ b/tests/benchmarks/gui/painting/qregion/qregion.pro @@ -0,0 +1,10 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qregion +DEPENDPATH += . +INCLUDEPATH += . + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/painting/qtransform/qtransform.pro b/tests/benchmarks/gui/painting/qtransform/qtransform.pro new file mode 100644 index 0000000..8d87656 --- /dev/null +++ b/tests/benchmarks/gui/painting/qtransform/qtransform.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qtransform + +SOURCES += tst_qtransform.cpp + diff --git a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp new file mode 100644 index 0000000..b33cf58 --- /dev/null +++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp @@ -0,0 +1,592 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +//TESTED_FILES= + +class tst_QTransform : public QObject +{ + Q_OBJECT + +public: + tst_QTransform(); + virtual ~tst_QTransform(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void translate_data(); + void translate(); + void scale_data(); + void scale(); + void shear_data(); + void shear(); + void rotate_data(); + void rotate(); + void rotateXYZ_data(); + void rotateXYZ(); + void operatorAssign_data(); + void operatorAssign(); + void operatorEqual_data(); + void operatorEqual(); + void operatorNotEqual_data(); + void operatorNotEqual(); + void operatorMultiply_data(); + void operatorMultiply(); + void operatorPlusEqualScalar_data(); + void operatorPlusEqualScalar(); + void operatorMinusEqualScalar_data(); + void operatorMinusEqualScalar(); + void operatorMultiplyEqual_data(); + void operatorMultiplyEqual(); + void operatorMultiplyEqualScalar_data(); + void operatorMultiplyEqualScalar(); + void operatorDivideEqualScalar_data(); + void operatorDivideEqualScalar(); + void mapQPoint_data(); + void mapQPoint(); + void mapQPointF_data(); + void mapQPointF(); + void mapRect_data(); + void mapRect(); + void mapRectF_data(); + void mapRectF(); + void mapQPolygon_data(); + void mapQPolygon(); + void mapQPolygonF_data(); + void mapQPolygonF(); + void mapQRegion_data(); + void mapQRegion(); + void mapToPolygon_data(); + void mapToPolygon(); + void mapQPainterPath_data(); + void mapQPainterPath(); + void isIdentity_data(); + void isIdentity(); + void isAffine_data(); + void isAffine(); + void isInvertible_data(); + void isInvertible(); + void isRotating_data(); + void isRotating(); + void isScaling_data(); + void isScaling(); + void isTranslating_data(); + void isTranslating(); + void type_data(); + void type(); + void determinant_data(); + void determinant(); + void adjoint_data(); + void adjoint(); + void transposed_data(); + void transposed(); + void inverted_data(); + void inverted(); + +private: + QMap generateTransforms() const; +}; + +tst_QTransform::tst_QTransform() +{ +} + +tst_QTransform::~tst_QTransform() +{ +} + +void tst_QTransform::init() +{ +} + +void tst_QTransform::cleanup() +{ +} + +QMap tst_QTransform::generateTransforms() const +{ + QMap x; + x["0: identity"] = QTransform(); + x["1: translate"] = QTransform().translate(10, 10); + x["2: translate"] = QTransform().translate(-10, -10); + x["3: rotate45"] = QTransform().rotate(45); + x["4: rotate90"] = QTransform().rotate(90); + x["5: rotate180"] = QTransform().rotate(180); + x["6: shear2,2"] = QTransform().shear(2, 2); + x["7: shear-2,-2"] = QTransform().shear(-2, -2); + x["8: scaleUp2,2"] = QTransform().scale(2, 2); + x["9: scaleUp2,3"] = QTransform().scale(2, 3); + x["10: scaleDown0.5,0.5"] = QTransform().scale(0.5, 0.5); + x["11: scaleDown0.5,0.25"] = QTransform().scale(0.5, 0.25); + x["12: rotateX"] = QTransform().rotate(45, Qt::XAxis); + x["13: rotateY"] = QTransform().rotate(45, Qt::YAxis); + x["14: rotateXY"] = QTransform().rotate(45, Qt::XAxis).rotate(45, Qt::YAxis); + x["15: rotateYZ"] = QTransform().rotate(45, Qt::YAxis).rotate(45, Qt::ZAxis); + x["16: full"] = QTransform().translate(10, 10).rotate(45).shear(2, 2).scale(2, 2).rotate(45, Qt::YAxis).rotate(45, Qt::XAxis).rotate(45, Qt::ZAxis); + return x; +} + +void tst_QTransform::construct() +{ + QBENCHMARK { + QTransform x; + } +} + +#define SINGLE_DATA_IMPLEMENTATION(func) \ +void tst_QTransform::func##_data() \ +{ \ + QTest::addColumn("transform"); \ + QMap x = generateTransforms(); \ + QMapIterator it(x); \ + while (it.hasNext()) { \ + it.next(); \ + QTest::newRow(it.key()) << it.value(); \ + } \ +} + +#define DOUBLE_DATA_IMPLEMENTATION(func) \ +void tst_QTransform::func##_data() \ +{ \ + QTest::addColumn("x1"); \ + QTest::addColumn("x2"); \ + QMap x = generateTransforms(); \ + QMapIterator it(x); \ + while (it.hasNext()) { \ + it.next(); \ + const char *key1 = it.key(); \ + QTransform x1 = it.value(); \ + QMapIterator it2(x); \ + while (it2.hasNext()) { \ + it2.next(); \ + QTest::newRow(QString("%1 + %2").arg(key1).arg(it2.key()).toLatin1().constData()) \ + << x1 << it2.value(); \ + } \ + } \ +} + +SINGLE_DATA_IMPLEMENTATION(translate) + +void tst_QTransform::translate() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.translate(10, 10); + } +} + +SINGLE_DATA_IMPLEMENTATION(scale) + +void tst_QTransform::scale() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.scale(2, 2); + } +} + +SINGLE_DATA_IMPLEMENTATION(shear) + +void tst_QTransform::shear() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.shear(2, 2); + } +} + +SINGLE_DATA_IMPLEMENTATION(rotate) + +void tst_QTransform::rotate() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.rotate(45); + } +} + +SINGLE_DATA_IMPLEMENTATION(rotateXYZ) + +void tst_QTransform::rotateXYZ() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.rotate(45, Qt::XAxis); + x.rotate(45, Qt::YAxis); + x.rotate(45, Qt::ZAxis); + } +} + +DOUBLE_DATA_IMPLEMENTATION(operatorAssign) + +void tst_QTransform::operatorAssign() +{ + QFETCH(QTransform, x1); + QFETCH(QTransform, x2); + QTransform x = x1; + QBENCHMARK { + x = x2; + } +} + +DOUBLE_DATA_IMPLEMENTATION(operatorEqual) + +void tst_QTransform::operatorEqual() +{ + QFETCH(QTransform, x1); + QFETCH(QTransform, x2); + QTransform x = x1; + QBENCHMARK { + x == x2; + } +} + +DOUBLE_DATA_IMPLEMENTATION(operatorNotEqual) + +void tst_QTransform::operatorNotEqual() +{ + QFETCH(QTransform, x1); + QFETCH(QTransform, x2); + QTransform x = x1; + QBENCHMARK { + x != x2; + } +} + +DOUBLE_DATA_IMPLEMENTATION(operatorMultiply) + +void tst_QTransform::operatorMultiply() +{ + QFETCH(QTransform, x1); + QFETCH(QTransform, x2); + QTransform x = x1; + QBENCHMARK { + x * x2; + } +} + +SINGLE_DATA_IMPLEMENTATION(operatorPlusEqualScalar) + +void tst_QTransform::operatorPlusEqualScalar() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x += 3.14; + } +} + +SINGLE_DATA_IMPLEMENTATION(operatorMinusEqualScalar) + +void tst_QTransform::operatorMinusEqualScalar() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x -= 3.14; + } +} + +DOUBLE_DATA_IMPLEMENTATION(operatorMultiplyEqual) + +void tst_QTransform::operatorMultiplyEqual() +{ + QFETCH(QTransform, x1); + QFETCH(QTransform, x2); + QTransform x = x1; + QBENCHMARK { + x *= x2; + } +} + +SINGLE_DATA_IMPLEMENTATION(operatorMultiplyEqualScalar) + +void tst_QTransform::operatorMultiplyEqualScalar() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x * 3; + } +} + +SINGLE_DATA_IMPLEMENTATION(operatorDivideEqualScalar) + +void tst_QTransform::operatorDivideEqualScalar() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x /= 3; + } +} + +SINGLE_DATA_IMPLEMENTATION(mapQPoint) + +void tst_QTransform::mapQPoint() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.map(QPoint(3, 3)); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapQPointF) + +void tst_QTransform::mapQPointF() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.map(QPointF(3, 3)); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapRect) + +void tst_QTransform::mapRect() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.mapRect(QRect(0, 0, 100, 100)); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapRectF) + +void tst_QTransform::mapRectF() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.mapRect(QRectF(0, 0, 100, 100)); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapQPolygon) + +void tst_QTransform::mapQPolygon() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QPolygon poly = QPolygon(QRect(0, 0, 100, 100)); + QBENCHMARK { + x.map(poly); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapQPolygonF) + +void tst_QTransform::mapQPolygonF() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QPolygonF poly = QPolygonF(QRectF(0, 0, 100, 100)); + QBENCHMARK { + x.map(poly); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapQRegion) + +void tst_QTransform::mapQRegion() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QRegion region; + for (int i = 0; i < 10; ++i) + region += QRect(i * 10, i * 10, 100, 100); + QBENCHMARK { + x.map(region); + } +} + +SINGLE_DATA_IMPLEMENTATION(mapToPolygon) + +void tst_QTransform::mapToPolygon() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QBENCHMARK { + x.mapToPolygon(QRect(0, 0, 100, 100)); + } +} + + +SINGLE_DATA_IMPLEMENTATION(mapQPainterPath) + +void tst_QTransform::mapQPainterPath() +{ + QFETCH(QTransform, transform); + QTransform x = transform; + QPainterPath path; + for (int i = 0; i < 10; ++i) + path.addEllipse(i * 10, i * 10, 100, 100); + QBENCHMARK { + x.map(path); + } +} + +SINGLE_DATA_IMPLEMENTATION(isIdentity) + +void tst_QTransform::isIdentity() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isIdentity(); + } +} + +SINGLE_DATA_IMPLEMENTATION(isAffine) + +void tst_QTransform::isAffine() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isAffine(); + } +} + +SINGLE_DATA_IMPLEMENTATION(isInvertible) + +void tst_QTransform::isInvertible() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isInvertible(); + } +} + +SINGLE_DATA_IMPLEMENTATION(isRotating) + +void tst_QTransform::isRotating() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isRotating(); + } +} + +SINGLE_DATA_IMPLEMENTATION(isScaling) + +void tst_QTransform::isScaling() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isScaling(); + } +} + +SINGLE_DATA_IMPLEMENTATION(isTranslating) + +void tst_QTransform::isTranslating() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.isTranslating(); + } +} + +SINGLE_DATA_IMPLEMENTATION(type) + +void tst_QTransform::type() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.type(); + } +} + +SINGLE_DATA_IMPLEMENTATION(determinant) + +void tst_QTransform::determinant() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.determinant(); + } +} + +SINGLE_DATA_IMPLEMENTATION(adjoint) + +void tst_QTransform::adjoint() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.adjoint(); + } +} + +SINGLE_DATA_IMPLEMENTATION(transposed) + +void tst_QTransform::transposed() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.transposed(); + } +} + +SINGLE_DATA_IMPLEMENTATION(inverted) + +void tst_QTransform::inverted() +{ + QFETCH(QTransform, transform); + QBENCHMARK { + transform.inverted(); + } +} + +QTEST_MAIN(tst_QTransform) +#include "tst_qtransform.moc" diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp new file mode 100644 index 0000000..226b661 --- /dev/null +++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp @@ -0,0 +1,192 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +// This file contains benchmarks for QRect/QRectF functions. + +#include +#include + +class tst_qstylesheetstyle : public QObject +{ + Q_OBJECT +private slots: + void empty(); + void empty_events(); + + void simple(); + void simple_events(); + + void grid_data(); + void grid(); + +private: + QWidget *buildSimpleWidgets(); + +}; + + +QWidget *tst_qstylesheetstyle::buildSimpleWidgets() +{ + QWidget *w = new QWidget(); + QGridLayout *layout = new QGridLayout(w); + w->setLayout(layout); + layout->addWidget(new QPushButton("pushButton") ,0,0); + layout->addWidget(new QComboBox() ,0,1); + layout->addWidget(new QCheckBox("checkBox") ,0,2); + layout->addWidget(new QRadioButton("radioButton") ,0,3); + layout->addWidget(new QLineEdit() ,1,0); + layout->addWidget(new QLabel("label") ,1,1); + layout->addWidget(new QSpinBox() ,1,2); + layout->addWidget(new QProgressBar() ,1,3); + return w; +} + +void tst_qstylesheetstyle::empty() +{ + QWidget *w = buildSimpleWidgets(); + w->setStyleSheet("/* */"); + int i = 0; + QBENCHMARK { + w->setStyleSheet("/*" + QString::number(i) + "*/"); + i++; // we want a different string in case we have severals iterations + } + delete w; +} + +void tst_qstylesheetstyle::empty_events() +{ + QWidget *w = buildSimpleWidgets(); + w->setStyleSheet("/* */"); + int i = 0; + QBENCHMARK { + w->setStyleSheet("/*" + QString::number(i) + "*/"); + i++; // we want a different string in case we have severals iterations + qApp->processEvents(); + } + delete w; +} + +static const char *simple_css = + " QLineEdit { background: red; } QPushButton { border: 1px solid yellow; color: pink; } \n" + " QCheckBox { margin: 3px 5px; background-color:red; } QAbstractButton { background-color: #456; } \n" + " QFrame { padding: 3px; } QLabel { color: black } QSpinBox:hover { background-color:blue; } "; + +void tst_qstylesheetstyle::simple() +{ + QWidget *w = buildSimpleWidgets(); + w->setStyleSheet("/* */"); + int i = 0; + QBENCHMARK { + w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/"); + i++; // we want a different string in case we have severals iterations + } + delete w; +} + +void tst_qstylesheetstyle::simple_events() +{ + QWidget *w = buildSimpleWidgets(); + w->setStyleSheet("/* */"); + int i = 0; + QBENCHMARK { + w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/"); + i++; // we want a different string in case we have severals iterations + qApp->processEvents(); + } + delete w; +} + +void tst_qstylesheetstyle::grid_data() +{ + QTest::addColumn("events"); + QTest::addColumn("show"); + QTest::addColumn("N"); + for (int n = 5; n <= 25; n += 5) { + const QByteArray nString = QByteArray::number(n*n); + QTest::newRow(("simple--" + nString).constData()) << false << false << n; + QTest::newRow(("events--" + nString).constData()) << true << false << n; + QTest::newRow(("show--" + nString).constData()) << true << true << n; + } +} + + +void tst_qstylesheetstyle::grid() +{ + QFETCH(bool, events); + QFETCH(bool, show); + QFETCH(int, N); + +#ifdef Q_OS_SYMBIAN + // Symbian has limited stack (max 80k), which will run out when N >= 20 due to + // QWidget::show() using recursion among grid labels somewhere down the line. + if (show && N >= 20) + QSKIP("Grid too big for device to show", SkipSingle); +#endif + + QWidget *w = new QWidget(); + QGridLayout *layout = new QGridLayout(w); + w->setLayout(layout); + QString stylesheet; + for(int x=0; xaddWidget(label ,x,y); + label->setObjectName(QString("label%1").arg(y * N + x)); + stylesheet += QString("#label%1 { background-color: rgb(0,%2,%3); color: rgb(%2,%3,255); } ").arg(y*N+x).arg(y*255/N).arg(x*255/N); + } + + w->setStyleSheet("/* */"); + if(show) { + w->show(); + QTest::qWait(30); + } + int i = 0; + QBENCHMARK { + w->setStyleSheet(stylesheet + "/*" + QString::number(i) + "*/"); + i++; // we want a different string in case we have severals iterations + if(events) + qApp->processEvents(); + } + delete w; +} + +QTEST_MAIN(tst_qstylesheetstyle) + +#include "main.moc" diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro new file mode 100644 index 0000000..c097307 --- /dev/null +++ b/tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro @@ -0,0 +1,11 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qstylesheetstyle +DEPENDPATH += . +INCLUDEPATH += . + + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/styles/styles.pro b/tests/benchmarks/gui/styles/styles.pro new file mode 100644 index 0000000..7c1d069 --- /dev/null +++ b/tests/benchmarks/gui/styles/styles.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qstylesheetstyle diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp new file mode 100644 index 0000000..d3f85ef --- /dev/null +++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include + +//this test benchmarks the once-off (per font configuration) cost +//associated with using QFontMetrics +class tst_QFontMetrics : public QObject +{ + Q_OBJECT +public: + tst_QFontMetrics() {} +private slots: + void fontmetrics_create(); + void fontmetrics_create_once_loaded(); + + void fontmetrics_height(); + void fontmetrics_height_once_loaded(); + +private: + void testQFontMetrics(const QFontMetrics &fm); +}; + +void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm ) +{ + int fontHeight = fm.height(); +} + +void tst_QFontMetrics::fontmetrics_create() +{ + QBENCHMARK { + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + } +} + +void tst_QFontMetrics::fontmetrics_create_once_loaded() +{ + QBENCHMARK { + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + } +} + +void tst_QFontMetrics::fontmetrics_height() +{ + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + + QBENCHMARK { testQFontMetrics(bfm); } +} + +void tst_QFontMetrics::fontmetrics_height_once_loaded() +{ + QFont boldfont = QApplication::font(); + boldfont.setBold( true ); + boldfont.setPointSize(boldfont.pointSize() * 1.5 ); + QFontMetrics bfm( boldfont ); + QBENCHMARK { testQFontMetrics(bfm); } +} + +QTEST_MAIN(tst_QFontMetrics) + +#include "main.moc" diff --git a/tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro new file mode 100644 index 0000000..b6c7b92 --- /dev/null +++ b/tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_QFontMetrics + +SOURCES += main.cpp diff --git a/tests/benchmarks/gui/text/qtext/bidi.txt b/tests/benchmarks/gui/text/qtext/bidi.txt new file mode 100644 index 0000000..7c74cb4 --- /dev/null +++ b/tests/benchmarks/gui/text/qtext/bidi.txt @@ -0,0 +1,4 @@ +chinese +欧洲,软件+互联网 
 用统一码 (Unicode) 走遍世界
将于1997年 3 月10日-12日在德国 Mainz 市举行的第十届统一码国际研讨会现在开始注册。 本次会议将汇集各方面的专家。 涉及的领域包括: 国际互联网和统一码 ,国际化和本地化 ,统一码在操作系统和应用软件中的实现 ,字型 ,文本格式以及多文种计算等。 
当世界需要沟通时,请用Unicode! +hebrew-bidi +אײראָפּע: פּראָגראַמװאַרג און די װעלטנעץ: אוניקאָד איבער דער גאָרער װעלט פֿאַרשרײַבט זיך שױן אױף דער צענטער אינטערנאַציאָנאַלער אוניקאָד-קאָנפֿערענץ, װאָס װעט פֿאָרקומען דעם 10טן ביזן 12טן מאַרץ, 1997, אין מײַנץ, דײַטשלאַנד. די קאָנפֿערענץ װעט צוזאַמענברענגן מבֿינים פֿון װעלטנעץ, אוניקאָד, אי אַלװעלטלעכן אי סבֿיבֿהדיקן פּראָגראַמװאַרג, אַרײַנשטעלן אוניקאָד אין אָפּעריר-סיסטעמען און אָנװענדונגען, שריפֿטן, טעקסט-אױסשטעל, און מערשפּראַכיקע קאָמפּיוטערײַ. diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp new file mode 100644 index 0000000..d4f3165 --- /dev/null +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -0,0 +1,415 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Application private dir is default serach path for files, so SRCDIR can be set to empty +#define SRCDIR "" +#endif + +Q_DECLARE_METATYPE(QTextDocument*) + +class tst_QText: public QObject +{ + Q_OBJECT +public: + tst_QText() { + m_lorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."); + m_shortLorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."); + } + +private slots: + void loadHtml_data(); + void loadHtml(); + + void shaping_data(); + void shaping(); + + void odfWriting_empty(); + void odfWriting_text(); + void odfWriting_images(); + + void constructControl(); + void constructDocument(); + + void layout(); + void paintLayoutToPixmap(); + void paintLayoutToPixmap_painterFill(); + + void document(); + void paintDocToPixmap(); + void paintDocToPixmap_painterFill(); + + void control(); + void paintControlToPixmap(); + void paintControlToPixmap_painterFill(); + +private: + QSize setupTextLayout(QTextLayout *layout); + + QString m_lorem; + QString m_shortLorem; +}; + +void tst_QText::loadHtml_data() +{ + QTest::addColumn("source"); + QTest::newRow("empty") << QString(); + QTest::newRow("simple") << QString::fromLatin1("Foo"); + QTest::newRow("simple2") << QString::fromLatin1("Foo"); + + QString parag = QString::fromLatin1("

%1

").arg(m_lorem); + QString header = QString::fromLatin1("test"); + QTest::newRow("long") << QString::fromLatin1("test") + parag + parag + parag + + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + + QString::fromLatin1(""); + QTest::newRow("table") << header + QLatin1String("
xx
") + + parag + QLatin1String("
xx") + + parag; +} + +void tst_QText::loadHtml() +{ + QFETCH(QString, source); + QTextDocument doc; + QBENCHMARK { + doc.setHtml(source); + } +} + +void tst_QText::shaping_data() +{ + QTest::addColumn("parag"); + QTest::newRow("empty") << QString(); + QTest::newRow("lorem") << m_lorem; + QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet"); + +#if !defined(Q_OS_SYMBIAN) + QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt")); +#else + QFile file( SRCDIR "bidi.txt" ); +#endif + QVERIFY(file.open(QFile::ReadOnly)); + QByteArray data = file.readAll(); + QVERIFY(data.count() > 1000); + QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), QString::SkipEmptyParts); + QVERIFY(list.count() %2 == 0); // even amount as we have title and then content. + for (int i=0; i < list.count(); i+=2) { + QTest::newRow(list.at(i).toLatin1()) << list.at(i+1); + } +} + +void tst_QText::shaping() +{ + QFETCH(QString, parag); + + QTextLayout lay(parag); + lay.setCacheEnabled(false); + + // do one run to make sure any fonts are loaded. + lay.beginLayout(); + lay.createLine(); + lay.endLayout(); + + QBENCHMARK { + lay.beginLayout(); + lay.createLine(); + lay.endLayout(); + } +} + +void tst_QText::odfWriting_empty() +{ + QVERIFY(QTextDocumentWriter::supportedDocumentFormats().contains("ODF")); // odf compiled in + QTextDocument *doc = new QTextDocument(); + // write it + QBENCHMARK { + QBuffer buffer; + buffer.open(QIODevice::WriteOnly); + QTextDocumentWriter writer(&buffer, "ODF"); + writer.write(doc); + } + delete doc; +} + +void tst_QText::odfWriting_text() +{ + QTextDocument *doc = new QTextDocument(); + QTextCursor cursor(doc); + QTextBlockFormat bf; + bf.setIndent(2); + cursor.insertBlock(bf); + cursor.insertText(m_lorem); + bf.setTopMargin(10); + cursor.insertBlock(bf); + cursor.insertText(m_lorem); + bf.setRightMargin(30); + cursor.insertBlock(bf); + cursor.insertText(m_lorem); + + // write it + QBENCHMARK { + QBuffer buffer; + buffer.open(QIODevice::WriteOnly); + QTextDocumentWriter writer(&buffer, "ODF"); + writer.write(doc); + } + delete doc; +} + +void tst_QText::odfWriting_images() +{ + QTextDocument *doc = new QTextDocument(); + QTextCursor cursor(doc); + cursor.insertText(m_lorem); + QImage image(400, 200, QImage::Format_ARGB32_Premultiplied); + cursor.insertImage(image); + cursor.insertText(m_lorem); + + // write it + QBENCHMARK { + QBuffer buffer; + buffer.open(QIODevice::WriteOnly); + QTextDocumentWriter writer(&buffer, "ODF"); + writer.write(doc); + } + delete doc; +} + +QSize tst_QText::setupTextLayout(QTextLayout *layout) +{ + bool wrap = true; + int wrapWidth = 300; + layout->setCacheEnabled(true); + + int height = 0; + qreal widthUsed = 0; + qreal lineWidth = 0; + + //set manual width + if (wrap) + lineWidth = wrapWidth; + + layout->beginLayout(); + + while (1) { + QTextLine line = layout->createLine(); + if (!line.isValid()) + break; + + if (wrap) + line.setLineWidth(lineWidth); + } + layout->endLayout(); + + for (int i = 0; i < layout->lineCount(); ++i) { + QTextLine line = layout->lineAt(i); + widthUsed = qMax(widthUsed, line.naturalTextWidth()); + line.setPosition(QPointF(0, height)); + height += int(line.height()); + } + return QSize(qCeil(widthUsed), height); +} + +void tst_QText::constructControl() +{ + QTextControl *control = new QTextControl; + delete control; + + QBENCHMARK { + QTextControl *control = new QTextControl; + delete control; + } +} + +void tst_QText::constructDocument() +{ + QTextDocument *doc = new QTextDocument; + delete doc; + + QBENCHMARK { + QTextDocument *doc = new QTextDocument; + delete doc; + } +} + +void tst_QText::layout() +{ + QTextLayout layout(m_shortLorem); + setupTextLayout(&layout); + + QBENCHMARK { + QTextLayout layout(m_shortLorem); + setupTextLayout(&layout); + } +} + +void tst_QText::paintLayoutToPixmap() +{ + QTextLayout layout(m_shortLorem); + QSize size = setupTextLayout(&layout); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + layout.draw(&p, QPointF(0, 0)); + } +} + +void tst_QText::paintLayoutToPixmap_painterFill() +{ + QTextLayout layout(m_shortLorem); + QSize size = setupTextLayout(&layout); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + layout.draw(&p, QPointF(0, 0)); + } +} + +void tst_QText::document() +{ + QTextDocument *doc = new QTextDocument; + + QBENCHMARK { + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + } +} + +void tst_QText::paintDocToPixmap() +{ + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + doc->drawContents(&p); + } +} + +void tst_QText::paintDocToPixmap_painterFill() +{ + QTextDocument *doc = new QTextDocument; + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + doc->drawContents(&p); + } +} + +void tst_QText::control() +{ + QTextControl *control = new QTextControl(m_shortLorem); + + QBENCHMARK { + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + } +} + +void tst_QText::paintControlToPixmap() +{ + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + img.fill(Qt::transparent); + QPainter p(&img); + control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); + } +} + +void tst_QText::paintControlToPixmap_painterFill() +{ + QTextControl *control = new QTextControl; + QTextDocument *doc = control->document(); + doc->setHtml(m_shortLorem); + doc->setTextWidth(300); + QSize size = doc->size().toSize(); + + QBENCHMARK { + QPixmap img(size); + QPainter p(&img); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); + } +} + +QTEST_MAIN(tst_QText) + +#include "main.moc" diff --git a/tests/benchmarks/gui/text/qtext/qtext.pro b/tests/benchmarks/gui/text/qtext/qtext.pro new file mode 100644 index 0000000..9e8860f --- /dev/null +++ b/tests/benchmarks/gui/text/qtext/qtext.pro @@ -0,0 +1,14 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_QText + +SOURCES += main.cpp + +symbian* { + TARGET.CAPABILITY = ALL -TCB + addFiles.sources = bidi.txt + addFiles.path = . + DEPLOYMENT += addFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} \ No newline at end of file diff --git a/tests/benchmarks/gui/text/text.pro b/tests/benchmarks/gui/text/text.pro new file mode 100644 index 0000000..34e548b --- /dev/null +++ b/tests/benchmarks/gui/text/text.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qfontmetrics \ + qtext diff --git a/tests/benchmarks/network/access/access.pro b/tests/benchmarks/network/access/access.pro new file mode 100644 index 0000000..43357e2 --- /dev/null +++ b/tests/benchmarks/network/access/access.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qfile_vs_qnetworkaccessmanager \ + qnetworkreply diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp new file mode 100644 index 0000000..23e07db --- /dev/null +++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../auto/network-settings.h" + +class qfile_vs_qnetworkaccessmanager : public QObject +{ + Q_OBJECT + // do not use on symbian.. 100 MB is too large.. + // but.. this is a manual test anyway, so :) +protected: + void qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request); + void qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request); + void qfileFileRead_iteration(); + static const int iterations = 10; + +private slots: + void qnamFileRead(); + void qnamImmediateFileRead(); + void qfileFileRead(); + + void initTestCase(); + void cleanupTestCase(); + +public: + qint64 size; + QTemporaryFile testFile; + + qfile_vs_qnetworkaccessmanager() : QObject(), size(0) {}; +}; + +void qfile_vs_qnetworkaccessmanager::initTestCase() +{ + testFile.open(); + QByteArray qba(1*1024*1024, 'x'); // 1 MB + for (int i = 0; i < 100; i++) { + testFile.write(qba); + testFile.flush(); + size += qba.size(); + } // 100 MB + testFile.reset(); +} + +void qfile_vs_qnetworkaccessmanager::cleanupTestCase() +{ + +} + +void qfile_vs_qnetworkaccessmanager::qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request) +{ + QNetworkReply* reply = manager.get(request); + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(10); + QVERIFY(!QTestEventLoop::instance().timeout()); + QByteArray qba = reply->readAll(); + delete reply; +} + +void qfile_vs_qnetworkaccessmanager::qnamFileRead() +{ + QNetworkAccessManager manager; + QTime t; + QNetworkRequest request(QUrl(testFile.fileName())); + + // do 3 dry runs for cache warmup + qnamFileRead_iteration(manager, request); + qnamFileRead_iteration(manager, request); + qnamFileRead_iteration(manager, request); + + t.start(); + // 10 real runs + QBENCHMARK_ONCE { + for (int i = 0; i < iterations; i++) { + qnamFileRead_iteration(manager, request); + } + } + + qint64 elapsed = t.elapsed(); + qDebug() << endl << "Finished!"; + qDebug() << "Bytes:" << size; + qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; +} + +void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request) +{ + QNetworkReply* reply = manager.get(request); + QVERIFY(reply->isFinished()); // should be like that! + QByteArray qba = reply->readAll(); + delete reply; +} + +void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead() +{ + QNetworkAccessManager manager; + QTime t; + QNetworkRequest request(QUrl(testFile.fileName())); + + // do 3 dry runs for cache warmup + qnamImmediateFileRead_iteration(manager, request); + qnamImmediateFileRead_iteration(manager, request); + qnamImmediateFileRead_iteration(manager, request); + + t.start(); + // 10 real runs + QBENCHMARK_ONCE { + for (int i = 0; i < iterations; i++) { + qnamImmediateFileRead_iteration(manager, request); + } + } + + qint64 elapsed = t.elapsed(); + qDebug() << endl << "Finished!"; + qDebug() << "Bytes:" << size; + qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; +} + +void qfile_vs_qnetworkaccessmanager::qfileFileRead_iteration() +{ + testFile.reset(); + QByteArray qba = testFile.readAll(); +} + +void qfile_vs_qnetworkaccessmanager::qfileFileRead() +{ + QTime t; + + // do 3 dry runs for cache warmup + qfileFileRead_iteration(); + qfileFileRead_iteration(); + qfileFileRead_iteration(); + + t.start(); + // 10 real runs + QBENCHMARK_ONCE { + for (int i = 0; i < iterations; i++) { + qfileFileRead_iteration(); + } + } + + qint64 elapsed = t.elapsed(); + qDebug() << endl << "Finished!"; + qDebug() << "Bytes:" << size; + qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; +} + +QTEST_MAIN(qfile_vs_qnetworkaccessmanager) + +#include "main.moc" diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro new file mode 100644 index 0000000..99d1935 --- /dev/null +++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = qfile_vs_qnetworkaccessmanager +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro b/tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro new file mode 100644 index 0000000..1e67d81 --- /dev/null +++ b/tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qnetworkreply +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network + +CONFIG += release + +# Input +SOURCES += tst_qnetworkreply.cpp diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp new file mode 100644 index 0000000..a92359f --- /dev/null +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -0,0 +1,656 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +// This file contains benchmarks for QNetworkReply functions. + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../auto/network-settings.h" + + +class TimedSender: public QThread +{ + Q_OBJECT + qint64 totalBytes; + QSemaphore ready; + QByteArray dataToSend; + QTcpSocket *client; + int timeout; + int port; +public: + int transferRate; + TimedSender(int ms) + : totalBytes(0), timeout(ms), port(-1), transferRate(-1) + { + dataToSend = QByteArray(16*1024, '@'); + start(); + ready.acquire(); + } + + inline int serverPort() const { return port; } + +private slots: + void writeMore() + { + while (client->bytesToWrite() < 128 * 1024) { + writePacket(dataToSend); + } + } + +protected: + void run() + { + QTcpServer server; + server.listen(); + port = server.serverPort(); + ready.release(); + + server.waitForNewConnection(-1); + client = server.nextPendingConnection(); + + writeMore(); + connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection); + + QEventLoop eventLoop; + QTimer::singleShot(timeout, &eventLoop, SLOT(quit())); + + QTime timer; + timer.start(); + eventLoop.exec(); + disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0); + + // wait for the connection to shut down + client->disconnectFromHost(); + if (!client->waitForDisconnected(10000)) + return; + + transferRate = totalBytes * 1000 / timer.elapsed(); + qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in" + << timer.elapsed() << "ms"; + } + + void writePacket(const QByteArray &array) + { + client->write(array); + totalBytes += array.size(); + } +}; + + +class QNetworkReplyPtr: public QSharedPointer +{ +public: + inline QNetworkReplyPtr(QNetworkReply *ptr = 0) + : QSharedPointer(ptr) + { } + + inline operator QNetworkReply *() const { return data(); } +}; + + +class DataReader: public QObject +{ + Q_OBJECT +public: + qint64 totalBytes; + QByteArray data; + QIODevice *device; + bool accumulate; + DataReader(QIODevice *dev, bool acc = true) : totalBytes(0), device(dev), accumulate(acc) + { + connect(device, SIGNAL(readyRead()), SLOT(doRead())); + } + +public slots: + void doRead() + { + QByteArray buffer; + buffer.resize(device->bytesAvailable()); + qint64 bytesRead = device->read(buffer.data(), device->bytesAvailable()); + if (bytesRead == -1) { + QTestEventLoop::instance().exitLoop(); + return; + } + buffer.truncate(bytesRead); + totalBytes += bytesRead; + + if (accumulate) + data += buffer; + } +}; + +class ThreadedDataReader: public QThread +{ + Q_OBJECT + // used to make the constructor only return after the tcp server started listening + QSemaphore ready; + QTcpSocket *client; + int timeout; + int port; +public: + qint64 transferRate; + ThreadedDataReader() + : port(-1), transferRate(-1) + { + start(); + ready.acquire(); + } + + inline int serverPort() const { return port; } + +protected: + void run() + { + QTcpServer server; + server.listen(); + port = server.serverPort(); + ready.release(); + + server.waitForNewConnection(-1); + client = server.nextPendingConnection(); + + QEventLoop eventLoop; + DataReader reader(client, false); + QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit())); + + QTime timer; + timer.start(); + eventLoop.exec(); + qint64 elapsed = timer.elapsed(); + + transferRate = reader.totalBytes * 1000 / elapsed; + qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec"; + } +}; + +class DataGenerator: public QIODevice +{ + Q_OBJECT + enum { Idle, Started, Stopped } state; +public: + DataGenerator() : state(Idle) + { open(ReadOnly); } + + virtual bool isSequential() const { return true; } + virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; } + +public slots: + void start() { state = Started; emit readyRead(); } + void stop() { state = Stopped; emit readyRead(); } + +protected: + virtual qint64 readData(char *data, qint64 maxlen) + { + if (state == Stopped) + return -1; // EOF + + // return as many bytes as are wanted + memset(data, '@', maxlen); + return maxlen; + } + virtual qint64 writeData(const char *, qint64) + { return -1; } +}; + +class ThreadedDataReaderHttpServer: public QThread +{ + Q_OBJECT + // used to make the constructor only return after the tcp server started listening + QSemaphore ready; + QTcpSocket *client; + int timeout; + int port; +public: + qint64 transferRate; + ThreadedDataReaderHttpServer() + : port(-1), transferRate(-1) + { + start(); + ready.acquire(); + } + + inline int serverPort() const { return port; } + +protected: + void run() + { + QTcpServer server; + server.listen(); + port = server.serverPort(); + ready.release(); + + QVERIFY(server.waitForNewConnection(10*1000)); + client = server.nextPendingConnection(); + + // read lines until we read the empty line seperating HTTP request from HTTP request body + do { + if (client->canReadLine()) { + QString line = client->readLine(); + if (line == "\n" || line == "\r\n") + break; // empty line + } + if (!client->waitForReadyRead(10*1000)) { + client->close(); + return; + } + } while (client->state() == QAbstractSocket::ConnectedState); + + client->write("HTTP/1.0 200 OK\r\n"); + client->write("Content-length: 0\r\n"); + client->write("\r\n"); + client->flush(); + + QCoreApplication::processEvents(); + + QEventLoop eventLoop; + DataReader reader(client, false); + QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit())); + + QTime timer; + timer.start(); + eventLoop.exec(); + qint64 elapsed = timer.elapsed(); + + transferRate = reader.totalBytes * 1000 / elapsed; + qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec"; + } +}; + + +class FixedSizeDataGenerator : public QIODevice +{ + Q_OBJECT + enum { Idle, Started, Stopped } state; +public: + FixedSizeDataGenerator(qint64 size) : state(Idle) + { open(ReadOnly | Unbuffered); + toBeGeneratedTotalCount = toBeGeneratedCount = size; + } + + virtual qint64 bytesAvailable() const + { + return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0; + } + + virtual bool isSequential() const{ + return false; + } + + virtual bool reset() const{ + return false; + } + + qint64 size() const { + return toBeGeneratedTotalCount; + } + +public slots: + void start() { state = Started; emit readyRead(); } + +protected: + virtual qint64 readData(char *data, qint64 maxlen) + { + memset(data, '@', maxlen); + + if (toBeGeneratedCount <= 0) { + return -1; + } + + qint64 n = qMin(maxlen, toBeGeneratedCount); + toBeGeneratedCount -= n; + + if (toBeGeneratedCount <= 0) { + // make sure this is a queued connection! + emit readChannelFinished(); + } + + return n; + } + virtual qint64 writeData(const char *, qint64) + { return -1; } + + qint64 toBeGeneratedCount; + qint64 toBeGeneratedTotalCount; +}; + +class HttpDownloadPerformanceServer : QObject { + Q_OBJECT; + qint64 dataSize; + qint64 dataSent; + QTcpServer server; + QTcpSocket *client; + bool serverSendsContentLength; + bool chunkedEncoding; + +public: + HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0), + client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) { + server.listen(); + connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot())); + } + + int serverPort() { + return server.serverPort(); + } + +public slots: + + void newConnectionSlot() { + client = server.nextPendingConnection(); + client->setParent(this); + connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); + connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64))); + } + + void readyReadSlot() { + client->readAll(); + client->write("HTTP/1.0 200 OK\n"); + if (serverSendsContentLength) + client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii()); + if (chunkedEncoding) + client->write(QString("Transfer-Encoding: chunked\n").toAscii()); + client->write("Connection: close\n\n"); + } + + void bytesWrittenSlot(qint64 amount) { + Q_UNUSED(amount); + if (dataSent == dataSize && client) { + // close eventually + + // chunked encoding: we have to send a last "empty" chunk + if (chunkedEncoding) + client->write(QString("0\r\n\r\n").toAscii()); + + client->disconnectFromHost(); + server.close(); + client = 0; + return; + } + + // send data + if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) { + qint64 amount = qMin(qint64(16*1024), dataSize - dataSent); + QByteArray data(amount, '@'); + + if (chunkedEncoding) { + client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii()); + client->write(data.constData(), amount); + client->write(QString("\r\n").toAscii()); + } else { + client->write(data.constData(), amount); + } + + dataSent += amount; + } + } +}; + +class HttpDownloadPerformanceClient : QObject { + Q_OBJECT; + QIODevice *device; + public: + HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){ + connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); + } + + public slots: + void readyReadSlot() { + device->readAll(); + } + +}; + + + + +class tst_qnetworkreply : public QObject +{ + Q_OBJECT + + QNetworkAccessManager manager; +private slots: + void httpLatency(); + +#ifndef QT_NO_OPENSSL + void echoPerformance_data(); + void echoPerformance(); +#endif + + void downloadPerformance(); + void uploadPerformance(); + void performanceControlRate(); + void httpUploadPerformance(); + void httpDownloadPerformance_data(); + void httpDownloadPerformance(); + +}; + +void tst_qnetworkreply::httpLatency() +{ + QNetworkAccessManager manager; + QBENCHMARK{ + QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/")); + QNetworkReply* reply = manager.get(request); + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(5); + QVERIFY(!QTestEventLoop::instance().timeout()); + delete reply; + } +} + +#ifndef QT_NO_OPENSSL +void tst_qnetworkreply::echoPerformance_data() +{ + QTest::addColumn("ssl"); + QTest::newRow("no_ssl") << false; + QTest::newRow("ssl") << true; +} + +void tst_qnetworkreply::echoPerformance() +{ + QFETCH(bool, ssl); + QNetworkAccessManager manager; + QNetworkRequest request(QUrl((ssl ? "https://" : "http://") + QtNetworkSettings::serverName() + "/qtest/cgi-bin/echo.cgi")); + + QByteArray data; + data.resize(1024*1024*10); // 10 MB + // init with garbage. needed so ssl cannot compress it in an efficient way. + for (int i = 0; i < data.size() / sizeof(int); i++) { + int r = qrand(); + data.data()[i*sizeof(int)] = r; + } + + QBENCHMARK{ + QNetworkReply* reply = manager.post(request, data); + connect(reply, SIGNAL(sslErrors( const QList &)), reply, SLOT(ignoreSslErrors())); + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(5); + QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(reply->error() == QNetworkReply::NoError); + delete reply; + } +} +#endif + +void tst_qnetworkreply::downloadPerformance() +{ + // unlike the above function, this one tries to send as fast as possible + // and measures how fast it was. + TimedSender sender(5000); + QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1"); + QNetworkReplyPtr reply = manager.get(request); + DataReader reader(reply, false); + + QTime loopTime; + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + loopTime.start(); + QTestEventLoop::instance().enterLoop(40); + int elapsedTime = loopTime.elapsed(); + sender.wait(); + + qint64 receivedBytes = reader.totalBytes; + qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and" + << elapsedTime << "ms"; +} + +void tst_qnetworkreply::uploadPerformance() +{ + ThreadedDataReader reader; + DataGenerator generator; + + + QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"); + QNetworkReplyPtr reply = manager.put(request, &generator); + generator.start(); + connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTimer::singleShot(5000, &generator, SLOT(stop())); + + QTestEventLoop::instance().enterLoop(30); + QCOMPARE(reply->error(), QNetworkReply::NoError); + QVERIFY(!QTestEventLoop::instance().timeout()); +} + +void tst_qnetworkreply::httpUploadPerformance() +{ +#ifdef Q_OS_SYMBIAN + // SHow some mercy for non-desktop platform/s + enum {UploadSize = 4*1024*1024}; // 4 MB +#else + enum {UploadSize = 128*1024*1024}; // 128 MB +#endif + ThreadedDataReaderHttpServer reader; + FixedSizeDataGenerator generator(UploadSize); + + QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1")); + request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize); + + QNetworkReplyPtr reply = manager.put(request, &generator); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + + QTime time; + generator.start(); + time.start(); + QTestEventLoop::instance().enterLoop(40); + qint64 elapsed = time.elapsed(); + reader.exit(); + reader.wait(); + QVERIFY(reply->isFinished()); + QCOMPARE(reply->error(), QNetworkReply::NoError); + QVERIFY(!QTestEventLoop::instance().timeout()); + + qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, " + << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; +} + + +void tst_qnetworkreply::performanceControlRate() +{ + // this is a control comparison for the other two above + // it does the same thing, but instead bypasses the QNetworkAccess system + qDebug() << "The following are the maximum transfer rates that we can get in this system" + " (bypassing QNetworkAccess)"; + + TimedSender sender(5000); + QTcpSocket sink; + sink.connectToHost("127.0.0.1", sender.serverPort()); + DataReader reader(&sink, false); + + QTime loopTime; + connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop())); + loopTime.start(); + QTestEventLoop::instance().enterLoop(40); + int elapsedTime = loopTime.elapsed(); + sender.wait(); + + qint64 receivedBytes = reader.totalBytes; + qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and" + << elapsedTime << "ms"; +} + +void tst_qnetworkreply::httpDownloadPerformance_data() +{ + QTest::addColumn("serverSendsContentLength"); + QTest::addColumn("chunkedEncoding"); + + QTest::newRow("Server sends no Content-Length") << false << false; + QTest::newRow("Server sends Content-Length") << true << false; + QTest::newRow("Server uses chunked encoding") << false << true; + +} + +void tst_qnetworkreply::httpDownloadPerformance() +{ + QFETCH(bool, serverSendsContentLength); + QFETCH(bool, chunkedEncoding); +#ifdef Q_OS_SYMBIAN + // Show some mercy to non-desktop platform/s + enum {UploadSize = 4*1024*1024}; // 4 MB +#else + enum {UploadSize = 128*1024*1024}; // 128 MB +#endif + HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding); + + QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1")); + QNetworkReplyPtr reply = manager.get(request); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + HttpDownloadPerformanceClient client(reply); + + QTime time; + time.start(); + QTestEventLoop::instance().enterLoop(40); + QCOMPARE(reply->error(), QNetworkReply::NoError); + QVERIFY(!QTestEventLoop::instance().timeout()); + + qint64 elapsed = time.elapsed(); + qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, " + << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; +} + +QTEST_MAIN(tst_qnetworkreply) + +#include "tst_qnetworkreply.moc" diff --git a/tests/benchmarks/network/kernel/kernel.pro b/tests/benchmarks/network/kernel/kernel.pro new file mode 100644 index 0000000..1ec3071 --- /dev/null +++ b/tests/benchmarks/network/kernel/kernel.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qhostinfo diff --git a/tests/benchmarks/network/kernel/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp new file mode 100644 index 0000000..0ae1b7f --- /dev/null +++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include +#include + +#include +#include + +class tst_qhostinfo : public QObject +{ + Q_OBJECT +private slots: + void lookupSpeed(); +}; + +class SignalReceiver : public QObject +{ + Q_OBJECT +public: + SignalReceiver(int nrc) : receiveCount(0), neededReceiveCount(nrc) {}; + int receiveCount; + int neededReceiveCount; +public slots: + void resultsReady(const QHostInfo) { + receiveCount++; + if (receiveCount == neededReceiveCount) + QTestEventLoop::instance().exitLoop(); + } +}; + +void tst_qhostinfo::lookupSpeed() +{ + QStringList hostnameList; + hostnameList << "www.ovi.com" << "www.nokia.com" << "qt.nokia.com" << "www.trolltech.com" << "troll.no" + << "www.qtcentre.org" << "forum.nokia.com" << "www.forum.nokia.com" << "wiki.forum.nokia.com" + << "www.nokia.no" << "nokia.de" << "127.0.0.1" << "----"; + // also add some duplicates: + hostnameList << "www.nokia.com" << "127.0.0.1" << "www.trolltech.com"; + const int COUNT = hostnameList.size(); + + SignalReceiver receiver(COUNT); + + QBENCHMARK { + for (int i = 0; i < hostnameList.size(); i++) + QHostInfo::lookupHost(hostnameList.at(i), &receiver, SLOT(resultsReady(const QHostInfo))); + QTestEventLoop::instance().enterLoop(20); + QVERIFY(!QTestEventLoop::instance().timeout()); + } +} + + +QTEST_MAIN(tst_qhostinfo) + +#include "main.moc" diff --git a/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro new file mode 100755 index 0000000..f18d6d7 --- /dev/null +++ b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qhostinfo +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/network/network.pro b/tests/benchmarks/network/network.pro new file mode 100644 index 0000000..4e83db2 --- /dev/null +++ b/tests/benchmarks/network/network.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +SUBDIRS = \ + access \ + kernel \ + socket diff --git a/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro new file mode 100644 index 0000000..e7bf13a --- /dev/null +++ b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qtcpserver +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network + +CONFIG += release + +# Input +SOURCES += tst_qtcpserver.cpp diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp new file mode 100644 index 0000000..b6b55c3 --- /dev/null +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -0,0 +1,277 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Just to get Q_OS_SYMBIAN +#include + +#include + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +Q_DECLARE_METATYPE(QNetworkProxy) +Q_DECLARE_METATYPE(QList) + +#include "../../auto/network-settings.h" + +//TESTED_CLASS= +//TESTED_FILES= + +class tst_QTcpServer : public QObject +{ + Q_OBJECT + +public: + tst_QTcpServer(); + virtual ~tst_QTcpServer(); + + +public slots: + void initTestCase_data(); + void init(); + void cleanup(); +private slots: + void ipv4LoopbackPerformanceTest(); + void ipv6LoopbackPerformanceTest(); + void ipv4PerformanceTest(); +}; + +tst_QTcpServer::tst_QTcpServer() +{ + Q_SET_DEFAULT_IAP +} + +tst_QTcpServer::~tst_QTcpServer() +{ +} + +void tst_QTcpServer::initTestCase_data() +{ + QTest::addColumn("setProxy"); + QTest::addColumn("proxyType"); + + QTest::newRow("WithoutProxy") << false << 0; + QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); +} + +void tst_QTcpServer::init() +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) { + QFETCH_GLOBAL(int, proxyType); + if (proxyType == QNetworkProxy::Socks5Proxy) { + QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); + } + } +} + +void tst_QTcpServer::cleanup() +{ + QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +} + +//---------------------------------------------------------------------------------- +void tst_QTcpServer::ipv4LoopbackPerformanceTest() +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + return; + + QTcpServer server; + QVERIFY(server.listen(QHostAddress::LocalHost)); + + QVERIFY(server.isListening()); + + QTcpSocket clientA; + clientA.connectToHost(QHostAddress::LocalHost, server.serverPort()); + QVERIFY(clientA.waitForConnected(5000)); + QVERIFY(clientA.state() == QAbstractSocket::ConnectedState); + + QVERIFY(server.waitForNewConnection()); + QTcpSocket *clientB = server.nextPendingConnection(); + QVERIFY(clientB); + + QByteArray buffer(16384, '@'); + QTime stopWatch; + stopWatch.start(); + qlonglong totalWritten = 0; + while (stopWatch.elapsed() < 5000) { + QVERIFY(clientA.write(buffer.data(), buffer.size()) > 0); + clientA.flush(); + totalWritten += buffer.size(); + while (clientB->waitForReadyRead(100)) { + if (clientB->bytesAvailable() == 16384) + break; + } + clientB->read(buffer.data(), buffer.size()); + clientB->write(buffer.data(), buffer.size()); + clientB->flush(); + totalWritten += buffer.size(); + while (clientA.waitForReadyRead(100)) { + if (clientA.bytesAvailable() == 16384) + break; + } + clientA.read(buffer.data(), buffer.size()); + } + + qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", + server.serverAddress().toString().toLatin1().constData(), + totalWritten / (1024.0 * 1024.0), + stopWatch.elapsed() / 1000.0, + (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); + + delete clientB; +} + +//---------------------------------------------------------------------------------- +void tst_QTcpServer::ipv6LoopbackPerformanceTest() +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + return; + +#if defined(Q_OS_SYMBIAN) + QSKIP("Symbian: IPv6 is not yet supported", SkipAll); +#endif + QTcpServer server; + if (!server.listen(QHostAddress::LocalHostIPv6, 0)) { + QVERIFY(server.serverError() == QAbstractSocket::UnsupportedSocketOperationError); + } else { + QTcpSocket clientA; + clientA.connectToHost(server.serverAddress(), server.serverPort()); + QVERIFY(clientA.waitForConnected(5000)); + + QVERIFY(server.waitForNewConnection(5000)); + QTcpSocket *clientB = server.nextPendingConnection(); + QVERIFY(clientB); + + QByteArray buffer(16384, '@'); + QTime stopWatch; + stopWatch.start(); + qlonglong totalWritten = 0; + while (stopWatch.elapsed() < 5000) { + clientA.write(buffer.data(), buffer.size()); + clientA.flush(); + totalWritten += buffer.size(); + while (clientB->waitForReadyRead(100)) { + if (clientB->bytesAvailable() == 16384) + break; + } + clientB->read(buffer.data(), buffer.size()); + clientB->write(buffer.data(), buffer.size()); + clientB->flush(); + totalWritten += buffer.size(); + while (clientA.waitForReadyRead(100)) { + if (clientA.bytesAvailable() == 16384) + break; + } + clientA.read(buffer.data(), buffer.size()); + } + + qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", + server.serverAddress().toString().toLatin1().constData(), + totalWritten / (1024.0 * 1024.0), + stopWatch.elapsed() / 1000.0, + (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); + delete clientB; + } +} + +//---------------------------------------------------------------------------------- +void tst_QTcpServer::ipv4PerformanceTest() +{ + QTcpSocket probeSocket; + probeSocket.connectToHost(QtNetworkSettings::serverName(), 143); + QVERIFY(probeSocket.waitForConnected(5000)); + + QTcpServer server; + QVERIFY(server.listen(probeSocket.localAddress(), 0)); + + QTcpSocket clientA; + clientA.connectToHost(server.serverAddress(), server.serverPort()); + QVERIFY(clientA.waitForConnected(5000)); + + QVERIFY(server.waitForNewConnection(5000)); + QTcpSocket *clientB = server.nextPendingConnection(); + QVERIFY(clientB); + + QByteArray buffer(16384, '@'); + QTime stopWatch; + stopWatch.start(); + qlonglong totalWritten = 0; + while (stopWatch.elapsed() < 5000) { + qlonglong writtenA = clientA.write(buffer.data(), buffer.size()); + clientA.flush(); + totalWritten += buffer.size(); + while (clientB->waitForReadyRead(100)) { + if (clientB->bytesAvailable() == writtenA) + break; + } + clientB->read(buffer.data(), buffer.size()); + qlonglong writtenB = clientB->write(buffer.data(), buffer.size()); + clientB->flush(); + totalWritten += buffer.size(); + while (clientA.waitForReadyRead(100)) { + if (clientA.bytesAvailable() == writtenB) + break; + } + clientA.read(buffer.data(), buffer.size()); + } + + qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", + probeSocket.localAddress().toString().toLatin1().constData(), + totalWritten / (1024.0 * 1024.0), + stopWatch.elapsed() / 1000.0, + (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); + + delete clientB; +} + +QTEST_MAIN(tst_QTcpServer) +#include "tst_qtcpserver.moc" diff --git a/tests/benchmarks/network/socket/socket.pro b/tests/benchmarks/network/socket/socket.pro new file mode 100644 index 0000000..2d676a2 --- /dev/null +++ b/tests/benchmarks/network/socket/socket.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qtcpserver diff --git a/tests/benchmarks/qanimation/dummyanimation.cpp b/tests/benchmarks/qanimation/dummyanimation.cpp deleted file mode 100644 index f79cc5b..0000000 --- a/tests/benchmarks/qanimation/dummyanimation.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "dummyanimation.h" -#include "dummyobject.h" - - -DummyAnimation::DummyAnimation(DummyObject *d) : m_dummy(d) -{ -} - -void DummyAnimation::updateCurrentValue(const QVariant &value) -{ - if (state() == Stopped) - return; - if (m_dummy) - m_dummy->setRect(value.toRect()); -} - -void DummyAnimation::updateState(State state) -{ - Q_UNUSED(state); -} diff --git a/tests/benchmarks/qanimation/dummyanimation.h b/tests/benchmarks/qanimation/dummyanimation.h deleted file mode 100644 index 1df76be..0000000 --- a/tests/benchmarks/qanimation/dummyanimation.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#ifndef _DUMMYANIMATION_H__ - -class DummyObject; - -class DummyAnimation : public QVariantAnimation -{ -public: - DummyAnimation(DummyObject *d); - - void updateCurrentValue(const QVariant &value); - void updateState(State state); - -private: - DummyObject *m_dummy; -}; - -#endif diff --git a/tests/benchmarks/qanimation/dummyobject.cpp b/tests/benchmarks/qanimation/dummyobject.cpp deleted file mode 100644 index 2b66cda..0000000 --- a/tests/benchmarks/qanimation/dummyobject.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "dummyobject.h" - -DummyObject::DummyObject() -{ -} - -QRect DummyObject::rect() const -{ - return m_rect; -} - -void DummyObject::setRect(const QRect &r) -{ - m_rect = r; -} - -float DummyObject::opacity() const -{ - return m_opacity; -} - -void DummyObject::setOpacity(float o) -{ - m_opacity = o; -} diff --git a/tests/benchmarks/qanimation/dummyobject.h b/tests/benchmarks/qanimation/dummyobject.h deleted file mode 100644 index 31614fd..0000000 --- a/tests/benchmarks/qanimation/dummyobject.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#ifndef _DUMMYOBJECT_H__ - -class DummyObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(QRect rect READ rect WRITE setRect) - Q_PROPERTY(float opacity READ opacity WRITE setOpacity) -public: - DummyObject(); - QRect rect() const; - void setRect(const QRect &r); - float opacity() const; - void setOpacity(float); - -private: - QRect m_rect; - float m_opacity; -}; - - -#endif diff --git a/tests/benchmarks/qanimation/main.cpp b/tests/benchmarks/qanimation/main.cpp deleted file mode 100644 index 8b9884e..0000000 --- a/tests/benchmarks/qanimation/main.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include "dummyobject.h" -#include "dummyanimation.h" -#include "rectanimation.h" - -#define ITERATION_COUNT 10e3 - -class tst_qanimation : public QObject -{ - Q_OBJECT -private slots: - void itemPropertyAnimation(); - void itemPropertyAnimation_data() { data();} - void dummyAnimation(); - void dummyAnimation_data() { data();} - void dummyPropertyAnimation(); - void dummyPropertyAnimation_data() { data();} - void rectAnimation(); - void rectAnimation_data() { data();} - - void floatAnimation_data() { data(); } - void floatAnimation(); - -private: - void data(); -}; - - -void tst_qanimation::data() -{ - QTest::addColumn("started"); - QTest::newRow("NotRunning") << false; - QTest::newRow("Running") << true; -} - -void tst_qanimation::itemPropertyAnimation() -{ - QFETCH(bool, started); - QGraphicsWidget item; - - //then the property animation - { - QPropertyAnimation anim(&item, "pos"); - anim.setDuration(ITERATION_COUNT); - anim.setStartValue(QPointF(0,0)); - anim.setEndValue(QPointF(ITERATION_COUNT,ITERATION_COUNT)); - if (started) - anim.start(); - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - anim.setCurrentTime(i); - } - } - } - -} - -void tst_qanimation::dummyAnimation() -{ - QFETCH(bool, started); - DummyObject dummy; - - //first the dummy animation - { - DummyAnimation anim(&dummy); - anim.setDuration(ITERATION_COUNT); - anim.setStartValue(QRect(0, 0, 0, 0)); - anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); - if (started) - anim.start(); - QBENCHMARK { - for(int i = 0; i < anim.duration(); ++i) { - anim.setCurrentTime(i); - } - } - } -} - -void tst_qanimation::dummyPropertyAnimation() -{ - QFETCH(bool, started); - DummyObject dummy; - - //then the property animation - { - QPropertyAnimation anim(&dummy, "rect"); - anim.setDuration(ITERATION_COUNT); - anim.setStartValue(QRect(0, 0, 0, 0)); - anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); - if (started) - anim.start(); - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - anim.setCurrentTime(i); - } - } - } -} - -void tst_qanimation::rectAnimation() -{ - //this is the simplest animation you can do - QFETCH(bool, started); - DummyObject dummy; - - //then the property animation - { - RectAnimation anim(&dummy); - anim.setDuration(ITERATION_COUNT); - anim.setStartValue(QRect(0, 0, 0, 0)); - anim.setEndValue(QRect(0, 0, ITERATION_COUNT,ITERATION_COUNT)); - if (started) - anim.start(); - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - anim.setCurrentTime(i); - } - } - } -} - -void tst_qanimation::floatAnimation() -{ - //this is the simplest animation you can do - QFETCH(bool, started); - DummyObject dummy; - - //then the property animation - { - QPropertyAnimation anim(&dummy, "opacity"); - anim.setDuration(ITERATION_COUNT); - anim.setStartValue(0.f); - anim.setEndValue(1.f); - if (started) - anim.start(); - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - anim.setCurrentTime(i); - } - } - } -} - - - -QTEST_MAIN(tst_qanimation) - -#include "main.moc" diff --git a/tests/benchmarks/qanimation/qanimation.pro b/tests/benchmarks/qanimation/qanimation.pro deleted file mode 100644 index 55cd75e..0000000 --- a/tests/benchmarks/qanimation/qanimation.pro +++ /dev/null @@ -1,18 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qanimation -DEPENDPATH += . -INCLUDEPATH += . - -CONFIG += release -#CONFIG += debug - - -SOURCES += main.cpp \ - dummyobject.cpp \ - dummyanimation.cpp \ - rectanimation.cpp - -HEADERS += dummyobject.h \ - dummyanimation.h \ - rectanimation.h diff --git a/tests/benchmarks/qanimation/rectanimation.cpp b/tests/benchmarks/qanimation/rectanimation.cpp deleted file mode 100644 index e6d7a7e..0000000 --- a/tests/benchmarks/qanimation/rectanimation.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "rectanimation.h" -#include "dummyobject.h" - -static inline int interpolateInteger(int from, int to, qreal progress) -{ - return from + (to - from) * progress; -} - - -RectAnimation::RectAnimation(DummyObject *obj) : m_object(obj), m_dura(250) -{ -} - -void RectAnimation::setEndValue(const QRect &rect) -{ - m_end = rect; -} - -void RectAnimation::setStartValue(const QRect &rect) -{ - m_start = rect; -} - -void RectAnimation::setDuration(int d) -{ - m_dura = d; -} - -int RectAnimation::duration() const -{ - return m_dura; -} - - -void RectAnimation::updateCurrentTime(int currentTime) -{ - qreal progress = m_easing.valueForProgress( currentTime / qreal(m_dura) ); - QRect now; - now.setCoords(interpolateInteger(m_start.left(), m_end.left(), progress), - interpolateInteger(m_start.top(), m_end.top(), progress), - interpolateInteger(m_start.right(), m_end.right(), progress), - interpolateInteger(m_start.bottom(), m_end.bottom(), progress)); - - bool changed = (now != m_current); - if (changed) - m_current = now; - - if (state() == Stopped) - return; - - if (m_object) - m_object->setRect(m_current); -} diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h deleted file mode 100644 index 42b9376..0000000 --- a/tests/benchmarks/qanimation/rectanimation.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#ifndef _RECTANIMATION_H__ - -class DummyObject; - -//this class is even simpler than the dummy -//and uses no QVariant at all -class RectAnimation : public QAbstractAnimation -{ -public: - RectAnimation(DummyObject *obj); - - void setEndValue(const QRect &rect); - void setStartValue(const QRect &rect); - - void setDuration(int d); - int duration() const; - - virtual void updateCurrentTime(int currentTime); - -private: - DummyObject *m_object; - QEasingCurve m_easing; - QRect m_start, m_end, m_current; - int m_dura; -}; - -#endif diff --git a/tests/benchmarks/qapplication/main.cpp b/tests/benchmarks/qapplication/main.cpp deleted file mode 100644 index c912497..0000000 --- a/tests/benchmarks/qapplication/main.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include - -#include - - -class tst_qapplication : public QObject -{ - Q_OBJECT -private slots: - void ctor(); -}; - -/* - Test the performance of the QApplication constructor. - - Note: results from the second start on can be misleading, - since all global statics are already initialized. -*/ -void tst_qapplication::ctor() -{ - // simulate reasonable argc, argv - int argc = 1; - char *argv[] = { "tst_qapplication" }; - QBENCHMARK { - QApplication app(argc, argv); - } -} - -QTEST_APPLESS_MAIN(tst_qapplication) - -#include "main.moc" diff --git a/tests/benchmarks/qapplication/qapplication.pro b/tests/benchmarks/qapplication/qapplication.pro deleted file mode 100644 index f8601e4..0000000 --- a/tests/benchmarks/qapplication/qapplication.pro +++ /dev/null @@ -1,10 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qapplication -DEPENDPATH += . -INCLUDEPATH += . - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qbytearray/main.cpp b/tests/benchmarks/qbytearray/main.cpp deleted file mode 100644 index 22d4815..0000000 --- a/tests/benchmarks/qbytearray/main.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include - -#include - - -class tst_qbytearray : public QObject -{ - Q_OBJECT -private slots: - void append(); - void append_data(); -}; - - -void tst_qbytearray::append_data() -{ - QTest::addColumn("size"); - QTest::newRow("1") << int(1); - QTest::newRow("10") << int(10); - QTest::newRow("100") << int(100); - QTest::newRow("1000") << int(1000); - QTest::newRow("10000") << int(10000); - QTest::newRow("100000") << int(100000); - QTest::newRow("1000000") << int(1000000); - QTest::newRow("10000000") << int(10000000); - QTest::newRow("100000000") << int(100000000); -} - -void tst_qbytearray::append() -{ - QFETCH(int, size); - -#ifdef Q_OS_SYMBIAN - if (size > 1000000) - QSKIP("Skipped due to limited memory in many Symbian devices.", SkipSingle); -#endif - - QByteArray ba; - QBENCHMARK { - QByteArray ba2(size, 'x'); - ba.append(ba2); - ba.clear(); - } -} - - -QTEST_MAIN(tst_qbytearray) - -#include "main.moc" diff --git a/tests/benchmarks/qbytearray/qbytearray.pro b/tests/benchmarks/qbytearray/qbytearray.pro deleted file mode 100755 index a0bf021..0000000 --- a/tests/benchmarks/qbytearray/qbytearray.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qbytearray -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qdir/qdir.pro b/tests/benchmarks/qdir/qdir.pro deleted file mode 100644 index 2cdebfd..0000000 --- a/tests/benchmarks/qdir/qdir.pro +++ /dev/null @@ -1,8 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qdir -DEPENDPATH += . -INCLUDEPATH += . - -# Input -SOURCES += tst_qdir.cpp diff --git a/tests/benchmarks/qdir/tst_qdir.cpp b/tests/benchmarks/qdir/tst_qdir.cpp deleted file mode 100644 index aea9fd0..0000000 --- a/tests/benchmarks/qdir/tst_qdir.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#ifdef Q_OS_WIN -# include -#else -# include -# include -# include -# include -#endif - -class Test : public QObject{ - Q_OBJECT -public slots: - void initTestCase() { - QDir testdir = QDir::tempPath(); - - const QString subfolder_name = QLatin1String("test_speed"); - QVERIFY(testdir.mkdir(subfolder_name)); - QVERIFY(testdir.cd(subfolder_name)); - - for (uint i=0; i<10000; ++i) { - QFile file(testdir.absolutePath() + "/testfile_" + QString::number(i)); - file.open(QIODevice::WriteOnly); - } - } - void cleanupTestCase() { - { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - testdir.setSorting(QDir::Unsorted); - testdir.setFilter(QDir::AllEntries | QDir::System | QDir::Hidden); - foreach (const QString &filename, testdir.entryList()) { - testdir.remove(filename); - } - } - const QDir temp = QDir(QDir::tempPath()); - temp.rmdir(QLatin1String("test_speed")); - } -private slots: - void baseline() {} - - void sizeSpeed() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - QBENCHMARK { - QFileInfoList fileInfoList = testdir.entryInfoList(QDir::Files, QDir::Unsorted); - foreach (const QFileInfo &fileInfo, fileInfoList) { - fileInfo.isDir(); - fileInfo.size(); - } - } - } - void sizeSpeedIterator() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - QBENCHMARK { - QDirIterator dit(testdir.path(), QDir::Files); - while (dit.hasNext()) { - dit.fileInfo().isDir(); - dit.fileInfo().size(); - dit.next(); - } - } - } - - void sizeSpeedWithoutFilter() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - QBENCHMARK { - QFileInfoList fileInfoList = testdir.entryInfoList(QDir::NoFilter, QDir::Unsorted); - foreach (const QFileInfo &fileInfo, fileInfoList) { - fileInfo.size(); - } - } - } - void sizeSpeedWithoutFilterIterator() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - QBENCHMARK { - QDirIterator dit(testdir.path()); - while (dit.hasNext()) { - dit.fileInfo().isDir(); - dit.fileInfo().size(); - dit.next(); - } - } - } - - void sizeSpeedWithoutFileInfoList() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - testdir.setSorting(QDir::Unsorted); - QBENCHMARK { - QStringList fileList = testdir.entryList(QDir::NoFilter, QDir::Unsorted); - foreach (const QString &filename, fileList) { - QFileInfo fileInfo(filename); - fileInfo.size(); - } - } - } - - void iDontWantAnyStat() { - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - testdir.setSorting(QDir::Unsorted); - testdir.setFilter(QDir::AllEntries | QDir::System | QDir::Hidden); - QBENCHMARK { - QStringList fileList = testdir.entryList(QDir::NoFilter, QDir::Unsorted); - foreach (const QString &filename, fileList) { - - } - } - } - void iDontWantAnyStatIterator() { - QBENCHMARK { - QDirIterator dit(QDir::tempPath() + QLatin1String("/test_speed")); - while (dit.hasNext()) { - dit.next(); - } - } - } - - void sizeSpeedWithoutFilterLowLevel() { -#ifdef Q_OS_WIN - const wchar_t *dirpath = (wchar_t*)testdir.absolutePath().utf16(); - wchar_t appendedPath[MAX_PATH]; - wcscpy(appendedPath, dirpath); - wcscat(appendedPath, L"\\*"); - - WIN32_FIND_DATA fd; - HANDLE hSearch = FindFirstFileW(appendedPath, &fd); - QVERIFY(hSearch == INVALID_HANDLE_VALUE); - - QBENCHMARK { - do { - - } while (FindNextFile(hSearch, &fd)); - } - FindClose(hSearch); -#else - QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); - DIR *dir = opendir(qPrintable(testdir.absolutePath())); - QVERIFY(dir); - - QVERIFY(!chdir(qPrintable(testdir.absolutePath()))); - QBENCHMARK { - struct dirent *item = readdir(dir); - while (item) { - char *fileName = item->d_name; - - struct stat fileStat; - QVERIFY(!stat(fileName, &fileStat)); - - item = readdir(dir); - } - } - closedir(dir); -#endif - } -}; - -QTEST_MAIN(Test) -#include "tst_qdir.moc" diff --git a/tests/benchmarks/qdiriterator/main.cpp b/tests/benchmarks/qdiriterator/main.cpp deleted file mode 100644 index afa6b7b..0000000 --- a/tests/benchmarks/qdiriterator/main.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include - -#ifdef Q_OS_WIN -# include -# include -#else -# include -# include -# include -# include -# include -#endif - -#include - -#include "qfilesystemiterator.h" - -class tst_qdiriterator : public QObject -{ - Q_OBJECT -private slots: - void posix(); - void posix_data() { data(); } - void diriterator(); - void diriterator_data() { data(); } - void fsiterator(); - void fsiterator_data() { data(); } - void data(); -}; - - -void tst_qdiriterator::data() -{ -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QByteArray qtdir = qPrintable(QCoreApplication::applicationDirPath()); - qtdir += "/depot"; -#else -#if defined(Q_OS_WIN) - const char *qtdir = "C:\\depot\\qt\\main"; -#else - const char *qtdir = ::getenv("QTDIR"); -#endif - if (!qtdir) { - fprintf(stderr, "QTDIR not set\n"); - exit(1); - } -#endif - - QTest::addColumn("dirpath"); - QByteArray ba = QByteArray(qtdir) + "/src/corelib"; - QByteArray ba1 = ba + "/io"; - QTest::newRow(ba) << ba; - //QTest::newRow(ba1) << ba1; -} - -#ifdef Q_OS_WIN -static int posix_helper(const wchar_t *dirpath) -{ - int count = 0; - HANDLE hSearch; - WIN32_FIND_DATA fd; - - const size_t origDirPathLength = wcslen(dirpath); - - wchar_t appendedPath[MAX_PATH]; - wcscpy(appendedPath, dirpath); - wcscat(appendedPath, L"\\*"); - hSearch = FindFirstFile(appendedPath, &fd); - appendedPath[origDirPathLength] = 0; - - if (hSearch == INVALID_HANDLE_VALUE) { - qWarning("FindFirstFile failed"); - return count; - } - - do { - if (!(fd.cFileName[0] == L'.' && fd.cFileName[1] == 0) && - !(fd.cFileName[0] == L'.' && fd.cFileName[1] == L'.' && fd.cFileName[2] == 0)) - { - if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - wcscat(appendedPath, L"\\"); - wcscat(appendedPath, fd.cFileName); - count += posix_helper(appendedPath); - appendedPath[origDirPathLength] = 0; - } - else { - ++count; - } - } - } while (FindNextFile(hSearch, &fd)); - FindClose(hSearch); - - return count; -} - -#else - -static int posix_helper(const char *dirpath) -{ - //qDebug() << "DIR" << dirpath; - DIR *dir = ::opendir(dirpath); - if (!dir) - return 0; - - dirent *entry = 0; - - int count = 0; - while ((entry = ::readdir(dir))) { - if (qstrcmp(entry->d_name, ".") == 0) - continue; - if (qstrcmp(entry->d_name, "..") == 0) - continue; - ++count; - QByteArray ba = dirpath; - ba += '/'; - ba += entry->d_name; - struct stat st; - lstat(ba.constData(), &st); - if (S_ISDIR(st.st_mode)) - count += posix_helper(ba.constData()); - } - - ::closedir(dir); - return count; -} -#endif - - -void tst_qdiriterator::posix() -{ - QFETCH(QByteArray, dirpath); - - int count = 0; - QString path(dirpath); - QBENCHMARK { -#ifdef Q_OS_WIN - count = posix_helper(path.utf16()); -#else - count = posix_helper(dirpath.constData()); -#endif - } - qDebug() << count; -} - -void tst_qdiriterator::diriterator() -{ - QFETCH(QByteArray, dirpath); - - int count = 0; - - QBENCHMARK { - int c = 0; - - QDirIterator dir(dirpath, - //QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot, - //QDir::AllEntries | QDir::Hidden, - QDir::Files, - QDirIterator::Subdirectories); - - while (dir.hasNext()) { - dir.next(); - //printf("%s\n", qPrintable(dir.fileName())); - 0 && printf("%d %s\n", - dir.fileInfo().isDir(), - //qPrintable(dir.fileInfo().absoluteFilePath()), - //qPrintable(dir.path()), - qPrintable(dir.filePath())); - ++c; - } - count = c; - } - qDebug() << count; -} - -void tst_qdiriterator::fsiterator() -{ - QFETCH(QByteArray, dirpath); - - int count = 0; - int dump = 0; - - QBENCHMARK { - int c = 0; - - dump && printf("\n\n\n\n"); - QFileSystemIterator dir(dirpath, - //QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot, - //QDir::AllEntries | QDir::Hidden, - //QDir::Files | QDir::NoDotAndDotDot, - QDir::Files, - QFileSystemIterator::Subdirectories); - - for (; !dir.atEnd(); dir.next()) { - dump && printf("%d %s\n", - dir.fileInfo().isDir(), - //qPrintable(dir.fileInfo().absoluteFilePath()), - //qPrintable(dir.path()), - qPrintable(dir.filePath()) - ); - ++c; - } - count = c; - } - qDebug() << count; -} - -QTEST_MAIN(tst_qdiriterator) - -#include "main.moc" diff --git a/tests/benchmarks/qdiriterator/qdiriterator.pro b/tests/benchmarks/qdiriterator/qdiriterator.pro deleted file mode 100755 index e06d746..0000000 --- a/tests/benchmarks/qdiriterator/qdiriterator.pro +++ /dev/null @@ -1,23 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qdiriterator -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release -CONFIG += debug - - -SOURCES += main.cpp - -SOURCES += qfilesystemiterator.cpp -HEADERS += qfilesystemiterator.h - -wince*|symbian: { - corelibdir.sources = $$QT_SOURCE_TREE/src/corelib - corelibdir.path = ./depot/src - DEPLOYMENT += corelibdir -} - diff --git a/tests/benchmarks/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/qdiriterator/qfilesystemiterator.cpp deleted file mode 100644 index 267d53f..0000000 --- a/tests/benchmarks/qdiriterator/qfilesystemiterator.cpp +++ /dev/null @@ -1,678 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \since 4.5 - \class QFileSystemIterator - \brief The QFileSystemIterator class provides an iterator for directory entrylists. - - You can use QFileSystemIterator to navigate entries of a directory one at a time. - It is similar to QDir::entryList() and QDir::entryInfoList(), but because - it lists entries one at a time instead of all at once, it scales better - and is more suitable for large directories. It also supports listing - directory contents recursively, and following symbolic links. Unlike - QDir::entryList(), QFileSystemIterator does not support sorting. - - The QFileSystemIterator constructor takes a QDir or a directory as - argument. After construction, the iterator is located before the first - directory entry. Here's how to iterate over all the entries sequentially: - - \snippet doc/src/snippets/code/src.corelib.io.qdiriterator.cpp 0 - - The next() function returns the path to the next directory entry and - advances the iterator. You can also call filePath() to get the current - file path without advancing the iterator. The fileName() function returns - only the name of the file, similar to how QDir::entryList() works. You can - also call fileInfo() to get a QFileInfo for the current entry. - - Unlike Qt's container iterators, QFileSystemIterator is uni-directional (i.e., - you cannot iterate directories in reverse order) and does not allow random - access. - - QFileSystemIterator works with all supported file engines, and is implemented - using QAbstractFileEngineIterator. - - \sa QDir, QDir::entryList(), QAbstractFileEngineIterator -*/ - -/*! \enum QFileSystemIterator::IteratorFlag - - This enum describes flags that you can combine to configure the behavior - of QFileSystemIterator. - - \value NoIteratorFlags The default value, representing no flags. The - iterator will return entries for the assigned path. - - \value Subdirectories List entries inside all subdirectories as well. - - \value FollowSymlinks When combined with Subdirectories, this flag - enables iterating through all subdirectories of the assigned path, - following all symbolic links. Symbolic link loops (e.g., "link" => "." or - "link" => "..") are automatically detected and ignored. -*/ - -#include "qfilesystemiterator.h" - -#include -#include -#include -#include - -#ifdef Q_OS_WIN -# include -# include -#else -# include -# include -# include -# include -#endif - -QT_BEGIN_NAMESPACE - -class QFileSystemIteratorPrivate -{ -public: - QFileSystemIteratorPrivate(const QString &path, const QStringList &nameFilters, - QDir::Filters filters, QFileSystemIterator::IteratorFlags flags); - ~QFileSystemIteratorPrivate(); - - void pushSubDirectory(const QByteArray &path); - void advance(); - bool isAcceptable() const; - bool shouldFollowDirectory(const QFileInfo &); - //bool matchesFilters(const QAbstractFileEngineIterator *it) const; - inline bool atEnd() const { return m_dirPaths.isEmpty(); } - -#ifdef Q_OS_WIN - QStack m_dirStructs; - WIN32_FIND_DATA* m_entry; - WIN32_FIND_DATA m_fileSearchResult; - bool m_bFirstSearchResult; -#else - QStack m_dirStructs; - dirent *m_entry; -#endif - - QSet visitedLinks; - QStack m_dirPaths; - QFileInfo fileInfo; - QString currentFilePath; - QFileSystemIterator::IteratorFlags iteratorFlags; - QDir::Filters filters; - QStringList nameFilters; - - enum { DontShowDir, ShowDotDotDir, ShowDotDir, ShowDir } - m_currentDirShown, m_nextDirShown; - - QFileSystemIterator *q; - -private: - bool advanceHelper(); // returns true if we know we have something suitable -}; - -/*! - \internal -*/ -QFileSystemIteratorPrivate::QFileSystemIteratorPrivate(const QString &path, - const QStringList &nameFilters, QDir::Filters filters, - QFileSystemIterator::IteratorFlags flags) - : iteratorFlags(flags) -{ - if (filters == QDir::NoFilter) - filters = QDir::AllEntries; - this->filters = filters; - this->nameFilters = nameFilters; - - fileInfo.setFile(path); - QString dir = fileInfo.isSymLink() ? fileInfo.canonicalFilePath() : path; - pushSubDirectory(dir.toLocal8Bit()); - // skip to acceptable entry - while (true) { - if (atEnd()) - return; - if (isAcceptable()) - return; - if (advanceHelper()) - return; - } -} - -/*! - \internal -*/ -QFileSystemIteratorPrivate::~QFileSystemIteratorPrivate() -{ -#ifdef Q_OS_WIN - while (!m_dirStructs.isEmpty()) - ::FindClose(m_dirStructs.pop()); -#else - while (!m_dirStructs.isEmpty()) - ::closedir(m_dirStructs.pop()); -#endif -} - -#ifdef Q_OS_WIN -static bool isDotOrDotDot(const wchar_t* name) -{ - if (name[0] == L'.' && name[1] == 0) - return true; - if (name[0] == L'.' && name[1] == L'.' && name[2] == 0) - return true; - return false; -} -#else -static bool isDotOrDotDot(const char *name) -{ - if (name[0] == '.' && name[1] == 0) - return true; - if (name[0] == '.' && name[1] == '.' && name[2] == 0) - return true; - return false; -} -#endif - -/*! - \internal -*/ -void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path) -{ -/* - if (iteratorFlags & QFileSystemIterator::FollowSymlinks) { - if (fileInfo.filePath() != path) - fileInfo.setFile(path); - if (fileInfo.isSymLink()) { - visitedLinks << fileInfo.canonicalFilePath(); - } else { - visitedLinks << fileInfo.absoluteFilePath(); - } - } -*/ - -#ifdef Q_OS_WIN - wchar_t szSearchPath[MAX_PATH]; - wcscpy(szSearchPath, QString(path).utf16()); - wcscat(szSearchPath, L"\\*"); - HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult); - m_bFirstSearchResult = true; -#else - DIR *dir = ::opendir(path.constData()); - //m_entry = ::readdir(dir); - //while (m_entry && isDotOrDotDot(m_entry->d_name)) - // m_entry = ::readdir(m_dirStructs.top()); -#endif - m_dirStructs.append(dir); - m_dirPaths.append(path); - m_entry = 0; - if (filters & QDir::Dirs) - m_nextDirShown = ShowDir; - else - m_nextDirShown = DontShowDir; - m_currentDirShown = DontShowDir; -} - -/*! - \internal -*/ -bool QFileSystemIteratorPrivate::isAcceptable() const -{ - if (!m_entry) - return false; - return true; -} - -/*! - \internal -*/ - - -void QFileSystemIteratorPrivate::advance() -{ - while (true) { - if (advanceHelper()) - return; - if (atEnd()) - return; - if (isAcceptable()) - return; - } -} - -bool QFileSystemIteratorPrivate::advanceHelper() -{ - if (m_dirStructs.isEmpty()) - return true; - - //printf("ADV %d %d\n", int(m_currentDirShown), int(m_nextDirShown)); - - if ((filters & QDir::Dirs)) { - m_currentDirShown = m_nextDirShown; - if (m_nextDirShown == ShowDir) { - //printf("RESTING ON DIR %s %x\n", m_dirPaths.top().constData(), int(filters)); - m_nextDirShown = (filters & QDir::NoDotAndDotDot) ? DontShowDir : ShowDotDir; - // skip start directory itself - if (m_dirStructs.size() == 1 && m_currentDirShown == ShowDir) - return advanceHelper(); - return true; - } - if (m_nextDirShown == ShowDotDir) { - //printf("RESTING ON DOT %s %x\n", m_dirPaths.top().constData(), int(filters)); - m_nextDirShown = ShowDotDotDir; - return true; - } - if (m_nextDirShown == ShowDotDotDir) { - //printf("RESTING ON DOTDOT %s %x\n", m_dirPaths.top().constData(), int(filters)); - m_nextDirShown = DontShowDir; - return true; - } - m_currentDirShown = DontShowDir; - } - -#ifdef Q_OS_WIN - m_entry = &m_fileSearchResult; - if (m_bFirstSearchResult) { - m_bFirstSearchResult = false; - } else { - if (!FindNextFile(m_dirStructs.top(), m_entry)) - m_entry = 0; - } - - while (m_entry && isDotOrDotDot(m_entry->cFileName)) - if (!FindNextFile(m_dirStructs.top(), m_entry)) - m_entry = 0; - - if (!m_entry) { - m_dirPaths.pop(); - FindClose(m_dirStructs.pop()); - return false; - } - - if (m_entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - QByteArray ba = m_dirPaths.top(); - ba += '\\'; - ba += QString::fromWCharArray(m_entry->cFileName); - pushSubDirectory(ba); - } -#else - m_entry = ::readdir(m_dirStructs.top()); - while (m_entry && isDotOrDotDot(m_entry->d_name)) - m_entry = ::readdir(m_dirStructs.top()); - //return false; // further iteration possibly needed - //printf("READ %p %s\n", m_entry, m_entry ? m_entry->d_name : ""); - - if (!m_entry) { - m_dirPaths.pop(); - DIR *dir = m_dirStructs.pop(); - ::closedir(dir); - return false; // further iteration possibly needed - } - - const char *name = m_entry->d_name; - - QByteArray ba = m_dirPaths.top(); - ba += '/'; - ba += name; - struct stat st; - lstat(ba.constData(), &st); - - if (S_ISDIR(st.st_mode)) { - pushSubDirectory(ba); - return false; // further iteration possibly needed - } -#endif - return false; // further iteration possiblye needed -} - -/*! - \internal - */ -bool QFileSystemIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo) -{ - // If we're doing flat iteration, we're done. - if (!(iteratorFlags & QFileSystemIterator::Subdirectories)) - return false; - - // Never follow non-directory entries - if (!fileInfo.isDir()) - return false; - - - // Never follow . and .. - if (fileInfo.fileName() == QLatin1String(".") || fileInfo.fileName() == QLatin1String("..")) - return false; - - - // Check symlinks - if (fileInfo.isSymLink() && !(iteratorFlags & QFileSystemIterator::FollowSymlinks)) { - // Follow symlinks only if FollowSymlinks was passed - return false; - } - - // Stop link loops - if (visitedLinks.contains(fileInfo.canonicalFilePath())) - return false; - - return true; -} - - -/*! - \internal - - This convenience function implements the iterator's filtering logics and - applies then to the current directory entry. - - It returns true if the current entry matches the filters (i.e., the - current entry will be returned as part of the directory iteration); - otherwise, false is returned. -*/ -#if 0 -bool QFileSystemIteratorPrivate::matchesFilters(const QAbstractFileEngineIterator *it) const -{ - const bool filterPermissions = ((filters & QDir::PermissionMask) - && (filters & QDir::PermissionMask) != QDir::PermissionMask); - const bool skipDirs = !(filters & (QDir::Dirs | QDir::AllDirs)); - const bool skipFiles = !(filters & QDir::Files); - const bool skipSymlinks = (filters & QDir::NoSymLinks); - const bool doReadable = !filterPermissions || (filters & QDir::Readable); - const bool doWritable = !filterPermissions || (filters & QDir::Writable); - const bool doExecutable = !filterPermissions || (filters & QDir::Executable); - const bool includeHidden = (filters & QDir::Hidden); - const bool includeSystem = (filters & QDir::System); - -#ifndef QT_NO_REGEXP - // Prepare name filters - QList regexps; - bool hasNameFilters = !nameFilters.isEmpty() && !(nameFilters.contains(QLatin1String("*"))); - if (hasNameFilters) { - for (int i = 0; i < nameFilters.size(); ++i) { - regexps << QRegExp(nameFilters.at(i), - (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, - QRegExp::Wildcard); - } - } -#endif - - QString fileName = it->currentFileName(); - if (fileName.isEmpty()) { - // invalid entry - return false; - } - - QFileInfo fi = it->currentFileInfo(); - QString filePath = it->currentFilePath(); - -#ifndef QT_NO_REGEXP - // Pass all entries through name filters, except dirs if the AllDirs - // filter is passed. - if (hasNameFilters && !((filters & QDir::AllDirs) && fi.isDir())) { - bool matched = false; - for (int i = 0; i < regexps.size(); ++i) { - if (regexps.at(i).exactMatch(fileName)) { - matched = true; - break; - } - } - if (!matched) - return false; - } -#endif - - bool dotOrDotDot = (fileName == QLatin1String(".") || fileName == QLatin1String("..")); - if ((filters & QDir::NoDotAndDotDot) && dotOrDotDot) - return false; - - bool isHidden = !dotOrDotDot && fi.isHidden(); - if (!includeHidden && isHidden) - return false; - - bool isSystem = (!fi.isFile() && !fi.isDir() && !fi.isSymLink()) - || (!fi.exists() && fi.isSymLink()); - if (!includeSystem && isSystem) - return false; - - bool alwaysShow = (filters & QDir::TypeMask) == 0 - && ((isHidden && includeHidden) - || (includeSystem && isSystem)); - - // Skip files and directories - if ((filters & QDir::AllDirs) == 0 && skipDirs && fi.isDir()) { - if (!alwaysShow) - return false; - } - - if ((skipFiles && (fi.isFile() || !fi.exists())) - || (skipSymlinks && fi.isSymLink())) { - if (!alwaysShow) - return false; - } - - if (filterPermissions - && ((doReadable && !fi.isReadable()) - || (doWritable && !fi.isWritable()) - || (doExecutable && !fi.isExecutable()))) { - return false; - } - - if (!includeSystem && !dotOrDotDot && ((fi.exists() && !fi.isFile() && !fi.isDir() && !fi.isSymLink()) - || (!fi.exists() && fi.isSymLink()))) { - return false; - } - - return true; -} -#endif - -/*! - Constructs a QFileSystemIterator that can iterate over \a dir's entrylist, using - \a dir's name filters and regular filters. You can pass options via \a - flags to decide how the directory should be iterated. - - By default, \a flags is NoIteratorFlags, which provides the same behavior - as in QDir::entryList(). - - The sorting in \a dir is ignored. - - \sa atEnd(), next(), IteratorFlags -*/ -QFileSystemIterator::QFileSystemIterator(const QDir &dir, IteratorFlags flags) - : d(new QFileSystemIteratorPrivate(dir.path(), dir.nameFilters(), dir.filter(), flags)) -{ - d->q = this; -} - -/*! - Constructs a QFileSystemIterator that can iterate over \a path, with no name - filtering and \a filters for entry filtering. You can pass options via \a - flags to decide how the directory should be iterated. - - By default, \a filters is QDir::NoFilter, and \a flags is NoIteratorFlags, - which provides the same behavior as in QDir::entryList(). - - \sa atEnd(), next(), IteratorFlags -*/ -QFileSystemIterator::QFileSystemIterator(const QString &path, QDir::Filters filters, IteratorFlags flags) - : d(new QFileSystemIteratorPrivate(path, QStringList(QLatin1String("*")), filters, flags)) -{ - d->q = this; -} - -/*! - Constructs a QFileSystemIterator that can iterate over \a path. You can pass - options via \a flags to decide how the directory should be iterated. - - By default, \a flags is NoIteratorFlags, which provides the same behavior - as in QDir::entryList(). - - \sa atEnd(), next(), IteratorFlags -*/ -QFileSystemIterator::QFileSystemIterator(const QString &path, IteratorFlags flags) - : d(new QFileSystemIteratorPrivate(path, QStringList(QLatin1String("*")), QDir::NoFilter, flags)) -{ - d->q = this; -} - -/*! - Constructs a QFileSystemIterator that can iterate over \a path, using \a - nameFilters and \a filters. You can pass options via \a flags to decide - how the directory should be iterated. - - By default, \a flags is NoIteratorFlags, which provides the same behavior - as QDir::entryList(). - - \sa atEnd(), next(), IteratorFlags -*/ -QFileSystemIterator::QFileSystemIterator(const QString &path, const QStringList &nameFilters, - QDir::Filters filters, IteratorFlags flags) - : d(new QFileSystemIteratorPrivate(path, nameFilters, filters, flags)) -{ - d->q = this; -} - -/*! - Destroys the QFileSystemIterator. -*/ -QFileSystemIterator::~QFileSystemIterator() -{ - delete d; -} - -/*! - Advances the iterator to the next entry, and returns the file path of this - new entry. If atEnd() returns true, this function does nothing, and - returns a null QString. - - You can call fileName() or filePath() to get the current entry file name - or path, or fileInfo() to get a QFileInfo for the current entry. - - \sa hasNext(), fileName(), filePath(), fileInfo() -*/ -void QFileSystemIterator::next() -{ - d->advance(); -} - -/*! - Returns true if there is at least one more entry in the directory; - otherwise, false is returned. - - \sa next(), fileName(), filePath(), fileInfo() -*/ -bool QFileSystemIterator::atEnd() const -{ - return d->atEnd(); -} - -/*! - Returns the file name for the current directory entry, without the path - prepended. If the current entry is invalid (i.e., isValid() returns - false), a null QString is returned. - - This function is provided for the convenience when iterating single - directories. For recursive iteration, you should call filePath() or - fileInfo() instead. - - \sa filePath(), fileInfo() -*/ -QString QFileSystemIterator::fileName() const -{ - if (d->atEnd() || !d->m_entry) - return QString(); - if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDir) - return QString(); - if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDir) - return QLatin1String("@"); - if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDotDir) - return QLatin1String("@@"); -#ifdef Q_OS_WIN - return QString::fromWCharArray(d->m_entry->cFileName); -#else - return QString::fromLocal8Bit(d->m_entry->d_name); -#endif -} - -/*! - Returns the full file path for the current directory entry. If the current - entry is invalid (i.e., isValid() returns false), a null QString is - returned. - - \sa fileInfo(), fileName() -*/ -QString QFileSystemIterator::filePath() const -{ - if (d->atEnd()) - return QString(); - QByteArray ba = d->m_dirPaths.top(); - if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDir) - ba += "/."; - else if (d->m_currentDirShown == QFileSystemIteratorPrivate::ShowDotDotDir) - ba += "/.."; - else if (d->m_entry) { - ba += '/'; -#ifdef Q_OS_WIN - ba += QString::fromWCharArray(d->m_entry->cFileName); -#else - ba += d->m_entry->d_name; -#endif - } - return QString::fromLocal8Bit(ba); -} - -/*! - Returns a QFileInfo for the current directory entry. If the current entry - is invalid (i.e., isValid() returns false), a null QFileInfo is returned. - - \sa filePath(), fileName() -*/ -QFileInfo QFileSystemIterator::fileInfo() const -{ - return QFileInfo(filePath()); -} - -/*! - Returns the base directory of the iterator. -*/ -QString QFileSystemIterator::path() const -{ - return QString::fromLocal8Bit(d->m_dirPaths.top()); -} - -QT_END_NAMESPACE diff --git a/tests/benchmarks/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/qdiriterator/qfilesystemiterator.h deleted file mode 100644 index 4aad3a1..0000000 --- a/tests/benchmarks/qdiriterator/qfilesystemiterator.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QFILESYSTEMITERATOR_H -#define QFILESYSTEMITERATOR_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Core) - -class QFileSystemIteratorPrivate; -class //Q_CORE_EXPORT -QFileSystemIterator -{ -public: - enum IteratorFlag { - NoIteratorFlags = 0x0, - FollowSymlinks = 0x1, - Subdirectories = 0x2 - }; - Q_DECLARE_FLAGS(IteratorFlags, IteratorFlag) - - QFileSystemIterator(const QDir &dir, IteratorFlags flags = NoIteratorFlags); - QFileSystemIterator(const QString &path, - IteratorFlags flags = NoIteratorFlags); - QFileSystemIterator(const QString &path, - QDir::Filters filter, - IteratorFlags flags = NoIteratorFlags); - QFileSystemIterator(const QString &path, - const QStringList &nameFilters, - QDir::Filters filters = QDir::NoFilter, - IteratorFlags flags = NoIteratorFlags); - - virtual ~QFileSystemIterator(); - - void next(); - bool atEnd() const; - - QString fileName() const; - QString filePath() const; - QFileInfo fileInfo() const; - QString path() const; - -private: - Q_DISABLE_COPY(QFileSystemIterator) - - QFileSystemIteratorPrivate *d; - friend class QDir; -}; - -Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemIterator::IteratorFlags) - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif diff --git a/tests/benchmarks/qfile/main.cpp b/tests/benchmarks/qfile/main.cpp deleted file mode 100644 index 103b77c..0000000 --- a/tests/benchmarks/qfile/main.cpp +++ /dev/null @@ -1,675 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include - -#include - -#include - -#ifdef Q_OS_WIN -# include -# include -#endif - -#define BUFSIZE 1024*512 -#define FACTOR 1024*512 -#define TF_SIZE FACTOR*81 - -// 10 predefined (but random() seek positions -// hardcoded to be comparable over several runs -const int seekpos[] = {TF_SIZE*0.52, - TF_SIZE*0.23, - TF_SIZE*0.73, - TF_SIZE*0.77, - TF_SIZE*0.80, - TF_SIZE*0.12, - TF_SIZE*0.53, - TF_SIZE*0.21, - TF_SIZE*0.27, - TF_SIZE*0.78}; - -const int sp_size = sizeof(seekpos)/sizeof(int); - -class tst_qfile: public QObject -{ -Q_ENUMS(BenchmarkType) -Q_OBJECT -public: - enum BenchmarkType { - QFileBenchmark = 1, - QFSFileEngineBenchmark, - Win32Benchmark, - PosixBenchmark, - QFileFromPosixBenchmark - }; -private slots: - void initTestCase(); - void cleanupTestCase(); - - void open_data(); - void open(); - void seek_data(); - void seek(); - - void readSmallFiles_QFile(); - void readSmallFiles_QFSFileEngine(); - void readSmallFiles_posix(); - void readSmallFiles_Win32(); - - void readSmallFiles_QFile_data(); - void readSmallFiles_QFSFileEngine_data(); - void readSmallFiles_posix_data(); - void readSmallFiles_Win32_data(); - - void readBigFile_QFile_data(); - void readBigFile_QFSFileEngine_data(); - void readBigFile_posix_data(); - void readBigFile_Win32_data(); - - void readBigFile_QFile(); - void readBigFile_QFSFileEngine(); - void readBigFile_posix(); - void readBigFile_Win32(); - -private: - void readBigFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b); - void readBigFile(); - void readSmallFiles_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b); - void readSmallFiles(); - void createFile(); - void fillFile(int factor=FACTOR); - void removeFile(); - void createSmallFiles(); - void removeSmallFiles(); - QString filename; - QString tmpDirName; -}; - -Q_DECLARE_METATYPE(tst_qfile::BenchmarkType) -Q_DECLARE_METATYPE(QIODevice::OpenMode) -Q_DECLARE_METATYPE(QIODevice::OpenModeFlag) - -void tst_qfile::createFile() -{ - removeFile(); // Cleanup in case previous test case aborted before cleaning up - - QTemporaryFile tmpFile; - tmpFile.setAutoRemove(false); - if (!tmpFile.open()) - ::exit(1); - filename = tmpFile.fileName(); - tmpFile.close(); -} - -void tst_qfile::removeFile() -{ - if (!filename.isEmpty()) - QFile::remove(filename); -} - -void tst_qfile::fillFile(int factor) -{ - QFile tmpFile(filename); - tmpFile.open(QIODevice::WriteOnly); - //for (int row=0; row("testType"); - QTest::addColumn("blockSize"); - QTest::addColumn("textMode"); - QTest::addColumn("bufferedMode"); - - const int bs[] = {1024, 1024*2, 1024*8, 1024*16, 1024*32,1024*512}; - int bs_entries = sizeof(bs)/sizeof(const int); - - QString flagstring; - if (t & QIODevice::Text) flagstring += "textMode "; - if (b & QIODevice::Unbuffered) flagstring += "unbuffered "; - if (flagstring.isEmpty()) flagstring = "none"; - - for (int i=0; i("testType"); - QTest::newRow("QFile") << QFileBenchmark; - QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; - QTest::newRow("Posix FILE*") << PosixBenchmark; -#ifdef Q_OS_WIN - QTest::newRow("Win32 API") << Win32Benchmark; -#endif -} - -void tst_qfile::seek() -{ - QFETCH(tst_qfile::BenchmarkType, testType); - int i = 0; - - createFile(); - fillFile(); - - switch (testType) { - case(QFileBenchmark): { - QFile file(filename); - file.open(QIODevice::ReadOnly); - QBENCHMARK { - i=(i+1)%sp_size; - file.seek(seekpos[i]); - } - file.close(); - } - break; - case(QFSFileEngineBenchmark): { - QFSFileEngine fse(filename); - fse.open(QIODevice::ReadOnly); - QBENCHMARK { - i=(i+1)%sp_size; - fse.seek(seekpos[i]); - } - fse.close(); - } - break; - case(PosixBenchmark): { - QByteArray data = filename.toLocal8Bit(); - const char* cfilename = data.constData(); - FILE* cfile = ::fopen(cfilename, "rb"); - QBENCHMARK { - i=(i+1)%sp_size; - ::fseek(cfile, seekpos[i], SEEK_SET); - } - ::fclose(cfile); - } - break; - case(QFileFromPosixBenchmark): { - // No gain in benchmarking this case - } - break; - case(Win32Benchmark): { -#ifdef Q_OS_WIN - HANDLE hndl; - - // ensure we don't account string conversion - wchar_t* cfilename = (wchar_t*)filename.utf16(); - - hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); - Q_ASSERT(hndl); - QBENCHMARK { - i=(i+1)%sp_size; - SetFilePointer(hndl, seekpos[i], NULL, 0); - } - CloseHandle(hndl); -#else - QFAIL("Not running on a Windows plattform!"); -#endif - } - break; - } - - removeFile(); -} - -void tst_qfile::open_data() -{ - QTest::addColumn("testType"); - QTest::newRow("QFile") << QFileBenchmark; - QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; - QTest::newRow("Posix FILE*") << PosixBenchmark; - QTest::newRow("QFile from FILE*") << QFileFromPosixBenchmark; -#ifdef Q_OS_WIN - QTest::newRow("Win32 API") << Win32Benchmark; -#endif -} - -void tst_qfile::open() -{ - QFETCH(tst_qfile::BenchmarkType, testType); - - createFile(); - - switch (testType) { - case(QFileBenchmark): { - QBENCHMARK { - QFile file( filename ); - file.open( QIODevice::ReadOnly ); - file.close(); - } - } - break; - case(QFSFileEngineBenchmark): { - QBENCHMARK { - QFSFileEngine fse(filename); - fse.open(QIODevice::ReadOnly); - fse.close(); - } - } - break; - - case(PosixBenchmark): { - // ensure we don't account toLocal8Bit() - QByteArray data = filename.toLocal8Bit(); - const char* cfilename = data.constData(); - - QBENCHMARK { - FILE* cfile = ::fopen(cfilename, "rb"); - ::fclose(cfile); - } - } - break; - case(QFileFromPosixBenchmark): { - // ensure we don't account toLocal8Bit() - QByteArray data = filename.toLocal8Bit(); - const char* cfilename = data.constData(); - FILE* cfile = ::fopen(cfilename, "rb"); - - QBENCHMARK { - QFile file; - file.open(cfile, QIODevice::ReadOnly); - file.close(); - } - ::fclose(cfile); - } - break; - case(Win32Benchmark): { -#ifdef Q_OS_WIN - HANDLE hndl; - - // ensure we don't account string conversion - wchar_t* cfilename = (wchar_t*)filename.utf16(); - - QBENCHMARK { - hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); - Q_ASSERT(hndl); - CloseHandle(hndl); - } -#else - QFAIL("Not running on a non-Windows platform!"); -#endif - } - break; - } - - removeFile(); -} - - -void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); } -void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); } -void tst_qfile::readSmallFiles_posix() { readSmallFiles(); } -void tst_qfile::readSmallFiles_Win32() { readSmallFiles(); } - -void tst_qfile::readSmallFiles_QFile_data() -{ - readSmallFiles_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); - readSmallFiles_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); - readSmallFiles_data(QFileBenchmark, QIODevice::Text, QIODevice::NotOpen); - readSmallFiles_data(QFileBenchmark, QIODevice::Text, QIODevice::Unbuffered); - -} - -void tst_qfile::readSmallFiles_QFSFileEngine_data() -{ - readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); - readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); - readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::NotOpen); - readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::Unbuffered); -} - -void tst_qfile::readSmallFiles_posix_data() -{ - readSmallFiles_data(PosixBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); -} - -void tst_qfile::readSmallFiles_Win32_data() -{ - readSmallFiles_data(Win32Benchmark, QIODevice::NotOpen, QIODevice::NotOpen); -} - - -void tst_qfile::readSmallFiles_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b) -{ - QTest::addColumn("testType"); - QTest::addColumn("blockSize"); - QTest::addColumn("textMode"); - QTest::addColumn("bufferedMode"); - - const int bs[] = {1024, 1024*2, 1024*8, 1024*16, 1024*32,1024*512}; - int bs_entries = sizeof(bs)/sizeof(const int); - - QString flagstring; - if (t & QIODevice::Text) flagstring += "textMode "; - if (b & QIODevice::Unbuffered) flagstring += "unbuffered "; - if (flagstring.isEmpty()) flagstring = "none"; - - for (int i=0; i fileList; - Q_FOREACH(QString file, files) { - QFile *f = new QFile(tmpDirName+ "/" + file); - f->open(QIODevice::ReadOnly|textMode|bufferedMode); - fileList.append(f); - } - - QBENCHMARK { - Q_FOREACH(QFile *file, fileList) { - while (!file->atEnd()) { - file->read(buffer, blockSize); - } - } - } - - Q_FOREACH(QFile *file, fileList) { - file->close(); - delete file; - } - } - break; - case(QFSFileEngineBenchmark): { - QList fileList; - Q_FOREACH(QString file, files) { - QFSFileEngine *fse = new QFSFileEngine(tmpDirName+ "/" + file); - fse->open(QIODevice::ReadOnly|textMode|bufferedMode); - fileList.append(fse); - } - - QBENCHMARK { - Q_FOREACH(QFSFileEngine *fse, fileList) { - while (fse->read(buffer, blockSize)); - } - } - - Q_FOREACH(QFSFileEngine *fse, fileList) { - fse->close(); - delete fse; - } - } - break; - case(PosixBenchmark): { - QList fileList; - Q_FOREACH(QString file, files) { - fileList.append(::fopen(QFile::encodeName(tmpDirName+ "/" + file).constData(), "rb")); - } - - QBENCHMARK { - Q_FOREACH(FILE* cfile, fileList) { - while(!feof(cfile)) - ::fread(buffer, blockSize, 1, cfile); - ::fseek(cfile, 0, SEEK_SET); - } - } - - Q_FOREACH(FILE* cfile, fileList) { - ::fclose(cfile); - } - } - break; - case(QFileFromPosixBenchmark): { - // No gain in benchmarking this case - } - break; - case(Win32Benchmark): { -#ifdef Q_OS_WIN - HANDLE hndl; - - // ensure we don't account string conversion - wchar_t* cfilename = (wchar_t*)filename.utf16(); - - hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); - Q_ASSERT(hndl); - wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; - DWORD numberOfBytesRead; - QBENCHMARK { - do { - ReadFile(hndl, nativeBuffer, blockSize, &numberOfBytesRead, NULL); - } while(numberOfBytesRead != 0); - } - delete nativeBuffer; - CloseHandle(hndl); -#else - QFAIL("Not running on a non-Windows platform!"); -#endif - } - break; - } - - removeSmallFiles(); - delete[] buffer; -} - -QTEST_MAIN(tst_qfile) - -#include "main.moc" diff --git a/tests/benchmarks/qfile/qfile.pro b/tests/benchmarks/qfile/qfile.pro deleted file mode 100644 index 99505c3..0000000 --- a/tests/benchmarks/qfile/qfile.pro +++ /dev/null @@ -1,7 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qfile -QT -= gui -win32: DEFINES+= _CRT_SECURE_NO_WARNINGS - -SOURCES += main.cpp diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp deleted file mode 100644 index 23e07db..0000000 --- a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../auto/network-settings.h" - -class qfile_vs_qnetworkaccessmanager : public QObject -{ - Q_OBJECT - // do not use on symbian.. 100 MB is too large.. - // but.. this is a manual test anyway, so :) -protected: - void qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request); - void qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request); - void qfileFileRead_iteration(); - static const int iterations = 10; - -private slots: - void qnamFileRead(); - void qnamImmediateFileRead(); - void qfileFileRead(); - - void initTestCase(); - void cleanupTestCase(); - -public: - qint64 size; - QTemporaryFile testFile; - - qfile_vs_qnetworkaccessmanager() : QObject(), size(0) {}; -}; - -void qfile_vs_qnetworkaccessmanager::initTestCase() -{ - testFile.open(); - QByteArray qba(1*1024*1024, 'x'); // 1 MB - for (int i = 0; i < 100; i++) { - testFile.write(qba); - testFile.flush(); - size += qba.size(); - } // 100 MB - testFile.reset(); -} - -void qfile_vs_qnetworkaccessmanager::cleanupTestCase() -{ - -} - -void qfile_vs_qnetworkaccessmanager::qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request) -{ - QNetworkReply* reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - QByteArray qba = reply->readAll(); - delete reply; -} - -void qfile_vs_qnetworkaccessmanager::qnamFileRead() -{ - QNetworkAccessManager manager; - QTime t; - QNetworkRequest request(QUrl(testFile.fileName())); - - // do 3 dry runs for cache warmup - qnamFileRead_iteration(manager, request); - qnamFileRead_iteration(manager, request); - qnamFileRead_iteration(manager, request); - - t.start(); - // 10 real runs - QBENCHMARK_ONCE { - for (int i = 0; i < iterations; i++) { - qnamFileRead_iteration(manager, request); - } - } - - qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; - qDebug() << "Bytes:" << size; - qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; -} - -void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request) -{ - QNetworkReply* reply = manager.get(request); - QVERIFY(reply->isFinished()); // should be like that! - QByteArray qba = reply->readAll(); - delete reply; -} - -void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead() -{ - QNetworkAccessManager manager; - QTime t; - QNetworkRequest request(QUrl(testFile.fileName())); - - // do 3 dry runs for cache warmup - qnamImmediateFileRead_iteration(manager, request); - qnamImmediateFileRead_iteration(manager, request); - qnamImmediateFileRead_iteration(manager, request); - - t.start(); - // 10 real runs - QBENCHMARK_ONCE { - for (int i = 0; i < iterations; i++) { - qnamImmediateFileRead_iteration(manager, request); - } - } - - qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; - qDebug() << "Bytes:" << size; - qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; -} - -void qfile_vs_qnetworkaccessmanager::qfileFileRead_iteration() -{ - testFile.reset(); - QByteArray qba = testFile.readAll(); -} - -void qfile_vs_qnetworkaccessmanager::qfileFileRead() -{ - QTime t; - - // do 3 dry runs for cache warmup - qfileFileRead_iteration(); - qfileFileRead_iteration(); - qfileFileRead_iteration(); - - t.start(); - // 10 real runs - QBENCHMARK_ONCE { - for (int i = 0; i < iterations; i++) { - qfileFileRead_iteration(); - } - } - - qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; - qDebug() << "Bytes:" << size; - qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; -} - -QTEST_MAIN(qfile_vs_qnetworkaccessmanager) - -#include "main.moc" diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro deleted file mode 100644 index 99d1935..0000000 --- a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = qfile_vs_qnetworkaccessmanager -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui -QT += network - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qfileinfo/main.cpp b/tests/benchmarks/qfileinfo/main.cpp deleted file mode 100644 index 025787f..0000000 --- a/tests/benchmarks/qfileinfo/main.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#include - -#include "private/qfsfileengine_p.h" - -class qfileinfo : public QObject -{ - Q_OBJECT -private slots: - void canonicalFileNamePerformance(); - - void initTestCase(); - void cleanupTestCase(); -public: - qfileinfo() : QObject() {}; -}; - -void qfileinfo::initTestCase() -{ -} - -void qfileinfo::cleanupTestCase() -{ -} - -void qfileinfo::canonicalFileNamePerformance() -{ - QString appPath = QCoreApplication::applicationFilePath(); - QFSFileEnginePrivate::canonicalized(appPath); // warmup - QFSFileEnginePrivate::canonicalized(appPath); // more warmup - QBENCHMARK { - for (int i = 0; i < 5000; i++) { - QFSFileEnginePrivate::canonicalized(appPath); - } - } -} - -QTEST_MAIN(qfileinfo) - -#include "main.moc" diff --git a/tests/benchmarks/qfileinfo/qfileinfo.pro b/tests/benchmarks/qfileinfo/qfileinfo.pro deleted file mode 100644 index 295cb50..0000000 --- a/tests/benchmarks/qfileinfo/qfileinfo.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = qfileinfo -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qfontmetrics/main.cpp b/tests/benchmarks/qfontmetrics/main.cpp deleted file mode 100644 index d3f85ef..0000000 --- a/tests/benchmarks/qfontmetrics/main.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include - -//this test benchmarks the once-off (per font configuration) cost -//associated with using QFontMetrics -class tst_QFontMetrics : public QObject -{ - Q_OBJECT -public: - tst_QFontMetrics() {} -private slots: - void fontmetrics_create(); - void fontmetrics_create_once_loaded(); - - void fontmetrics_height(); - void fontmetrics_height_once_loaded(); - -private: - void testQFontMetrics(const QFontMetrics &fm); -}; - -void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm ) -{ - int fontHeight = fm.height(); -} - -void tst_QFontMetrics::fontmetrics_create() -{ - QBENCHMARK { - QFont boldfont = QApplication::font(); - boldfont.setBold( true ); - boldfont.setPointSize(boldfont.pointSize() * 1.5 ); - QFontMetrics bfm( boldfont ); - } -} - -void tst_QFontMetrics::fontmetrics_create_once_loaded() -{ - QBENCHMARK { - QFont boldfont = QApplication::font(); - boldfont.setBold( true ); - boldfont.setPointSize(boldfont.pointSize() * 1.5 ); - QFontMetrics bfm( boldfont ); - } -} - -void tst_QFontMetrics::fontmetrics_height() -{ - QFont boldfont = QApplication::font(); - boldfont.setBold( true ); - boldfont.setPointSize(boldfont.pointSize() * 1.5 ); - QFontMetrics bfm( boldfont ); - - QBENCHMARK { testQFontMetrics(bfm); } -} - -void tst_QFontMetrics::fontmetrics_height_once_loaded() -{ - QFont boldfont = QApplication::font(); - boldfont.setBold( true ); - boldfont.setPointSize(boldfont.pointSize() * 1.5 ); - QFontMetrics bfm( boldfont ); - QBENCHMARK { testQFontMetrics(bfm); } -} - -QTEST_MAIN(tst_QFontMetrics) - -#include "main.moc" diff --git a/tests/benchmarks/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/qfontmetrics/qfontmetrics.pro deleted file mode 100644 index b6c7b92..0000000 --- a/tests/benchmarks/qfontmetrics/qfontmetrics.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_QFontMetrics - -SOURCES += main.cpp diff --git a/tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro b/tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro deleted file mode 100644 index 0d563b9..0000000 --- a/tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qgraphicsanchorlayout - -SOURCES += tst_qgraphicsanchorlayout.cpp - diff --git a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp deleted file mode 100644 index faacec4..0000000 --- a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ /dev/null @@ -1,433 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include - -class tst_QGraphicsAnchorLayout : public QObject -{ - Q_OBJECT -public: - tst_QGraphicsAnchorLayout() {} - ~tst_QGraphicsAnchorLayout() {} - -private slots: - void s60_hard_complex_data(); - void s60_hard_complex(); - void linearVsAnchorSizeHints_data(); - void linearVsAnchorSizeHints(); - void linearVsAnchorSetGeometry_data(); - void linearVsAnchorSetGeometry(); - void linearVsAnchorNested_data(); - void linearVsAnchorNested(); -}; - - -class RectWidget : public QGraphicsWidget -{ -public: - RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){} - - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) - { - Q_UNUSED(option); - Q_UNUSED(widget); - painter->drawRoundRect(rect()); - painter->drawLine(rect().topLeft(), rect().bottomRight()); - painter->drawLine(rect().bottomLeft(), rect().topRight()); - } -}; - -static QGraphicsWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 100.0), - const QSizeF &preferred = QSize(150.0, 100.0), - const QSizeF &maximum = QSizeF(200.0, 100.0), - const QString &name = QString()) -{ - QGraphicsWidget *w = new RectWidget; - w->setMinimumSize(minimum); - w->setPreferredSize(preferred); - w->setMaximumSize(maximum); - w->setData(0, name); - return w; -} - -static void setAnchor(QGraphicsAnchorLayout *l, - QGraphicsLayoutItem *firstItem, - Qt::AnchorPoint firstEdge, - QGraphicsLayoutItem *secondItem, - Qt::AnchorPoint secondEdge, - qreal spacing) -{ - QGraphicsAnchor *anchor = l->addAnchor(firstItem, firstEdge, secondItem, secondEdge); - anchor->setSpacing(spacing); -} - -void tst_QGraphicsAnchorLayout::s60_hard_complex_data() -{ - QTest::addColumn("whichSizeHint"); - QTest::newRow("minimumSizeHint") - << int(Qt::MinimumSize); - QTest::newRow("preferredSizeHint") - << int(Qt::PreferredSize); - QTest::newRow("maximumSizeHint") - << int(Qt::MaximumSize); - // Add it as a reference to see how much overhead the body of effectiveSizeHint takes. - QTest::newRow("noSizeHint") - << -1; -} - -void tst_QGraphicsAnchorLayout::s60_hard_complex() -{ - QFETCH(int, whichSizeHint); - - // Test for "hard" complex case, taken from wiki - // https://cwiki.nokia.com/S60QTUI/AnchorLayoutComplexCases - QSizeF min(0, 10); - QSizeF pref(50, 10); - QSizeF max(100, 10); - - QGraphicsWidget *a = createItem(min, pref, max, "a"); - QGraphicsWidget *b = createItem(min, pref, max, "b"); - QGraphicsWidget *c = createItem(min, pref, max, "c"); - QGraphicsWidget *d = createItem(min, pref, max, "d"); - QGraphicsWidget *e = createItem(min, pref, max, "e"); - QGraphicsWidget *f = createItem(min, pref, max, "f"); - QGraphicsWidget *g = createItem(min, pref, max, "g"); - - QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; - l->setContentsMargins(0, 0, 0, 0); - - // - setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 10); - setAnchor(l, a, Qt::AnchorRight, b, Qt::AnchorLeft, 10); - setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft, 10); - setAnchor(l, c, Qt::AnchorRight, d, Qt::AnchorLeft, 10); - setAnchor(l, d, Qt::AnchorRight, l, Qt::AnchorRight, 10); - - // - setAnchor(l, b, Qt::AnchorLeft, e, Qt::AnchorLeft, 10); - setAnchor(l, e, Qt::AnchorRight, d, Qt::AnchorLeft, 10); - - // - setAnchor(l, a, Qt::AnchorHorizontalCenter, g, Qt::AnchorLeft, 10); - setAnchor(l, g, Qt::AnchorRight, f, Qt::AnchorHorizontalCenter, 10); - setAnchor(l, c, Qt::AnchorLeft, f, Qt::AnchorLeft, 10); - setAnchor(l, f, Qt::AnchorRight, d, Qt::AnchorRight, 10); - - // - setAnchor(l, l, Qt::AnchorTop, e, Qt::AnchorTop, 0); - setAnchor(l, e, Qt::AnchorBottom, a, Qt::AnchorTop, 0); - setAnchor(l, e, Qt::AnchorBottom, b, Qt::AnchorTop, 0); - setAnchor(l, e, Qt::AnchorBottom, c, Qt::AnchorTop, 0); - setAnchor(l, e, Qt::AnchorBottom, d, Qt::AnchorTop, 0); - setAnchor(l, a, Qt::AnchorBottom, f, Qt::AnchorTop, 0); - setAnchor(l, a, Qt::AnchorBottom, b, Qt::AnchorBottom, 0); - setAnchor(l, a, Qt::AnchorBottom, c, Qt::AnchorBottom, 0); - setAnchor(l, a, Qt::AnchorBottom, d, Qt::AnchorBottom, 0); - setAnchor(l, f, Qt::AnchorBottom, g, Qt::AnchorTop, 0); - setAnchor(l, g, Qt::AnchorBottom, l, Qt::AnchorBottom, 0); - - // It won't query the size hint if it already has a size set. - // If only one of the sizes is unset it will query sizeHint only of for that hint type. - l->setMinimumSize(60,40); - l->setPreferredSize(220,40); - l->setMaximumSize(240,40); - - switch (whichSizeHint) { - case Qt::MinimumSize: - l->setMinimumSize(-1, -1); - break; - case Qt::PreferredSize: - l->setPreferredSize(-1, -1); - break; - case Qt::MaximumSize: - l->setMaximumSize(-1, -1); - break; - default: - break; - } - - QSizeF sizeHint; - // warm up instruction cache - l->invalidate(); - sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); - // ...then measure... - QBENCHMARK { - l->invalidate(); - sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); - } -} - -static QGraphicsLayout* createLayouts(int whichLayout) -{ - QSizeF min(0, 10); - QSizeF pref(50, 10); - QSizeF max(100, 10); - - QGraphicsWidget *a = createItem(min, pref, max, "a"); - QGraphicsWidget *b = createItem(min, pref, max, "b"); - QGraphicsWidget *c = createItem(min, pref, max, "c"); - QGraphicsWidget *d = createItem(min, pref, max, "d"); - - QGraphicsLayout *l; - if (whichLayout == 0) { - l = new QGraphicsLinearLayout; - QGraphicsLinearLayout *linear = static_cast(l); - linear->setContentsMargins(0, 0, 0, 0); - - linear->addItem(a); - linear->addItem(b); - linear->addItem(c); - linear->addItem(d); - } else { - l = new QGraphicsAnchorLayout; - QGraphicsAnchorLayout *anchor = static_cast(l); - anchor->setContentsMargins(0, 0, 0, 0); - - // Horizontal - setAnchor(anchor, anchor, Qt::AnchorLeft, a, Qt::AnchorLeft, 0); - setAnchor(anchor, a, Qt::AnchorRight, b, Qt::AnchorLeft, 0); - setAnchor(anchor, b, Qt::AnchorRight, c, Qt::AnchorLeft, 0); - setAnchor(anchor, c, Qt::AnchorRight, d, Qt::AnchorLeft, 0); - setAnchor(anchor, d, Qt::AnchorRight, anchor, Qt::AnchorRight, 0); - - // Vertical - anchor->addAnchors(anchor, a, Qt::Vertical); - anchor->addAnchors(anchor, b, Qt::Vertical); - anchor->addAnchors(anchor, c, Qt::Vertical); - anchor->addAnchors(anchor, d, Qt::Vertical); - } - - return l; -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorSizeHints_data() -{ - QTest::addColumn("whichLayout"); - QTest::addColumn("whichSizeHint"); - - QTest::newRow("QGraphicsLinearLayout::minimum") - << 0 << int(Qt::MinimumSize); - QTest::newRow("QGraphicsLinearLayout::preferred") - << 0 << int(Qt::PreferredSize); - QTest::newRow("QGraphicsLinearLayout::maximum") - << 0 << int(Qt::MaximumSize); - QTest::newRow("QGraphicsLinearLayout::noSizeHint") - << 0 << -1; - - QTest::newRow("QGraphicsAnchorLayout::minimum") - << 1 << int(Qt::MinimumSize); - QTest::newRow("QGraphicsAnchorLayout::preferred") - << 1 << int(Qt::PreferredSize); - QTest::newRow("QGraphicsAnchorLayout::maximum") - << 1 << int(Qt::MaximumSize); - QTest::newRow("QGraphicsAnchorLayout::noSizeHint") - << 1 << -1; -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorSizeHints() -{ - QFETCH(int, whichSizeHint); - QFETCH(int, whichLayout); - - QGraphicsLayout *l = createLayouts(whichLayout); - - QSizeF sizeHint; - // warm up instruction cache - l->invalidate(); - sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); - // ...then measure... - - QBENCHMARK { - l->invalidate(); - sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint); - } -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorSetGeometry_data() -{ - QTest::addColumn("whichLayout"); - - QTest::newRow("QGraphicsLinearLayout") - << 0; - QTest::newRow("QGraphicsAnchorLayout") - << 1; -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorSetGeometry() -{ - QFETCH(int, whichLayout); - - QGraphicsLayout *l = createLayouts(whichLayout); - - QRectF sizeHint; - qreal maxWidth; - qreal increment; - // warm up instruction cache - l->invalidate(); - sizeHint.setSize(l->effectiveSizeHint(Qt::MinimumSize)); - maxWidth = l->effectiveSizeHint(Qt::MaximumSize).width(); - increment = (maxWidth - sizeHint.width()) / 100; - l->setGeometry(sizeHint); - // ...then measure... - - QBENCHMARK { - l->invalidate(); - for (qreal width = sizeHint.width(); width <= maxWidth; width += increment) { - sizeHint.setWidth(width); - l->setGeometry(sizeHint); - } - } -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorNested_data() -{ - QTest::addColumn("whichLayout"); - QTest::newRow("LinearLayout") - << 0; - QTest::newRow("AnchorLayout setup with null-anchors knot") - << 1; - QTest::newRow("AnchorLayout setup easy to simplificate") - << 2; -} - -void tst_QGraphicsAnchorLayout::linearVsAnchorNested() -{ - QFETCH(int, whichLayout); - - QSizeF min(10, 10); - QSizeF pref(80, 80); - QSizeF max(150, 150); - - QGraphicsWidget *a = createItem(min, pref, max, "a"); - QGraphicsWidget *b = createItem(min, pref, max, "b"); - QGraphicsWidget *c = createItem(min, pref, max, "c"); - QGraphicsWidget *d = createItem(min, pref, max, "d"); - - QGraphicsLayout *layout; - - if (whichLayout == 0) { - QGraphicsLinearLayout *linear1 = new QGraphicsLinearLayout; - QGraphicsLinearLayout *linear2 = new QGraphicsLinearLayout(Qt::Vertical); - QGraphicsLinearLayout *linear3 = new QGraphicsLinearLayout; - - linear1->addItem(a); - linear1->addItem(linear2); - linear2->addItem(b); - linear2->addItem(linear3); - linear3->addItem(c); - linear3->addItem(d); - - layout = linear1; - } else if (whichLayout == 1) { - QGraphicsAnchorLayout *anchor = new QGraphicsAnchorLayout; - - // A - anchor->addCornerAnchors(a, Qt::TopLeftCorner, anchor, Qt::TopLeftCorner); - anchor->addCornerAnchors(a, Qt::TopRightCorner, b, Qt::TopLeftCorner); - anchor->addCornerAnchors(a, Qt::BottomLeftCorner, anchor, Qt::BottomLeftCorner); - anchor->addCornerAnchors(a, Qt::BottomRightCorner, c, Qt::BottomLeftCorner); - - // B - anchor->addCornerAnchors(b, Qt::TopRightCorner, anchor, Qt::TopRightCorner); - anchor->addCornerAnchors(b, Qt::BottomLeftCorner, c, Qt::TopLeftCorner); - anchor->addCornerAnchors(b, Qt::BottomRightCorner, d, Qt::TopRightCorner); - - // C - anchor->addCornerAnchors(c, Qt::TopRightCorner, d, Qt::TopLeftCorner); - anchor->addCornerAnchors(c, Qt::BottomRightCorner, d, Qt::BottomLeftCorner); - - // D - anchor->addCornerAnchors(d, Qt::BottomRightCorner, anchor, Qt::BottomRightCorner); - - layout = anchor; - } else { - QGraphicsAnchorLayout *anchor = new QGraphicsAnchorLayout; - - // A - anchor->addAnchor(a, Qt::AnchorLeft, anchor, Qt::AnchorLeft); - anchor->addAnchors(a, anchor, Qt::Vertical); - anchor->addAnchor(a, Qt::AnchorRight, b, Qt::AnchorLeft); - anchor->addAnchor(a, Qt::AnchorRight, c, Qt::AnchorLeft); - - // B - anchor->addAnchor(b, Qt::AnchorTop, anchor, Qt::AnchorTop); - anchor->addAnchor(b, Qt::AnchorRight, anchor, Qt::AnchorRight); - anchor->addAnchor(b, Qt::AnchorBottom, c, Qt::AnchorTop); - anchor->addAnchor(b, Qt::AnchorBottom, d, Qt::AnchorTop); - - // C - anchor->addAnchor(c, Qt::AnchorRight, d, Qt::AnchorLeft); - anchor->addAnchor(c, Qt::AnchorBottom, anchor, Qt::AnchorBottom); - - // D - anchor->addAnchor(d, Qt::AnchorRight, anchor, Qt::AnchorRight); - anchor->addAnchor(d, Qt::AnchorBottom, anchor, Qt::AnchorBottom); - - layout = anchor; - } - - QSizeF sizeHint; - // warm up instruction cache - layout->invalidate(); - sizeHint = layout->effectiveSizeHint(Qt::PreferredSize); - - // ...then measure... - QBENCHMARK { - // To ensure that all sizeHints caches are invalidated in - // the LinearLayout setup, we must call updateGeometry on the - // children. If we didn't, only the top level layout would be - // re-calculated. - static_cast(a)->updateGeometry(); - static_cast(b)->updateGeometry(); - static_cast(c)->updateGeometry(); - static_cast(d)->updateGeometry(); - layout->invalidate(); - sizeHint = layout->effectiveSizeHint(Qt::PreferredSize); - } -} - -QTEST_MAIN(tst_QGraphicsAnchorLayout) - -#include "tst_qgraphicsanchorlayout.moc" diff --git a/tests/benchmarks/qgraphicsitem/qgraphicsitem.pro b/tests/benchmarks/qgraphicsitem/qgraphicsitem.pro deleted file mode 100644 index 726bb96..0000000 --- a/tests/benchmarks/qgraphicsitem/qgraphicsitem.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qgraphicsitem - -SOURCES += tst_qgraphicsitem.cpp diff --git a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp deleted file mode 100644 index ac51072..0000000 --- a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include - -//TESTED_FILES= - -class tst_QGraphicsItem : public QObject -{ - Q_OBJECT - -public: - tst_QGraphicsItem(); - virtual ~tst_QGraphicsItem(); - -public slots: - void init(); - void cleanup(); - -private slots: - void setParentItem(); - void setParentItem_deep(); - void setParentItem_deep_reversed(); - void deleteItemWithManyChildren(); - void setPos_data(); - void setPos(); - void setTransform_data(); - void setTransform(); - void rotate(); - void scale(); - void shear(); - void translate(); - void setRotation(); -}; - -tst_QGraphicsItem::tst_QGraphicsItem() -{ -} - -tst_QGraphicsItem::~tst_QGraphicsItem() -{ -} - -void tst_QGraphicsItem::init() -{ -} - -void tst_QGraphicsItem::cleanup() -{ -} - -void tst_QGraphicsItem::setParentItem() -{ - QBENCHMARK { - QGraphicsRectItem rect; - QGraphicsRectItem *childRect = new QGraphicsRectItem; - childRect->setParentItem(&rect); - } -} - -void tst_QGraphicsItem::setParentItem_deep() -{ - QBENCHMARK { - QGraphicsRectItem rect; - QGraphicsRectItem *lastRect = ▭ - for (int i = 0; i < 10; ++i) { - QGraphicsRectItem *childRect = new QGraphicsRectItem; - childRect->setParentItem(lastRect); - lastRect = childRect; - } - QGraphicsItem *first = rect.children().first(); - first->setParentItem(0); - } -} - -void tst_QGraphicsItem::setParentItem_deep_reversed() -{ - QBENCHMARK { - QGraphicsRectItem *lastRect = new QGraphicsRectItem; - for (int i = 0; i < 100; ++i) { - QGraphicsRectItem *parentRect = new QGraphicsRectItem; - lastRect->setParentItem(parentRect); - lastRect = parentRect; - } - delete lastRect; - } -} - -void tst_QGraphicsItem::deleteItemWithManyChildren() -{ - QBENCHMARK { - QGraphicsRectItem *rect = new QGraphicsRectItem; - for (int i = 0; i < 1000; ++i) - new QGraphicsRectItem(rect); - delete rect; - } -} - -void tst_QGraphicsItem::setPos_data() -{ - QTest::addColumn("pos"); - - QTest::newRow("0, 0") << QPointF(0, 0); - QTest::newRow("10, 10") << QPointF(10, 10); - QTest::newRow("-10, -10") << QPointF(-10, -10); -} - -void tst_QGraphicsItem::setPos() -{ - QFETCH(QPointF, pos); - - QGraphicsScene scene; - QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - rect->setPos(10, 10); - rect->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::setTransform_data() -{ - QTest::addColumn("transform"); - - QTest::newRow("id") << QTransform(); - QTest::newRow("rotate 45z") << QTransform().rotate(45); - QTest::newRow("scale 2x2") << QTransform().scale(2, 2); - QTest::newRow("translate 100, 100") << QTransform().translate(100, 100); - QTest::newRow("rotate 45x 45y 45z") << QTransform().rotate(45, Qt::XAxis) - .rotate(45, Qt::YAxis).rotate(45, Qt::ZAxis); -} - -void tst_QGraphicsItem::setTransform() -{ - QFETCH(QTransform, transform); - - QGraphicsScene scene; - QGraphicsRectItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->setTransform(transform); - item->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::rotate() -{ - QGraphicsScene scene; - QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->rotate(45); - item->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::scale() -{ - QGraphicsScene scene; - QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->scale(2, 2); - item->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::shear() -{ - QGraphicsScene scene; - QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->shear(1.5, 1.5); - item->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::translate() -{ - QGraphicsScene scene; - QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->translate(100, 100); - item->transform(); // prevent lazy optimizing - } -} - -void tst_QGraphicsItem::setRotation() -{ - QGraphicsScene scene; - QGraphicsItem *item = scene.addRect(QRectF(0, 0, 100, 100)); - - QBENCHMARK { - item->setRotation(45); - item->transform(); // prevent lazy optimizing - } -} - -QTEST_MAIN(tst_QGraphicsItem) -#include "tst_qgraphicsitem.moc" diff --git a/tests/benchmarks/qgraphicsscene/qgraphicsscene.pro b/tests/benchmarks/qgraphicsscene/qgraphicsscene.pro deleted file mode 100644 index b460e2a..0000000 --- a/tests/benchmarks/qgraphicsscene/qgraphicsscene.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qgraphicsscene - -SOURCES += tst_qgraphicsscene.cpp - diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp deleted file mode 100644 index 5bd07f9..0000000 --- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include - -//TESTED_FILES= - -class tst_QGraphicsScene : public QObject -{ - Q_OBJECT - -public: - tst_QGraphicsScene(); - virtual ~tst_QGraphicsScene(); - -public slots: - void init(); - void cleanup(); - -private slots: - void construct(); - void addItem_data(); - void addItem(); - void itemAt_data(); - void itemAt(); - void initialShow(); -}; - -tst_QGraphicsScene::tst_QGraphicsScene() -{ -} - -tst_QGraphicsScene::~tst_QGraphicsScene() -{ -} - -void tst_QGraphicsScene::init() -{ -} - -void tst_QGraphicsScene::cleanup() -{ -} - -void tst_QGraphicsScene::construct() -{ - QBENCHMARK { - QGraphicsScene scene; - } -} - -void tst_QGraphicsScene::addItem_data() -{ - QTest::addColumn("indexMethod"); - QTest::addColumn("sceneRect"); - QTest::addColumn("numItems_X"); - QTest::addColumn("numItems_Y"); - QTest::addColumn("itemType"); - QTest::addColumn("itemRect"); - - QTest::newRow("null") << 0 << QRectF() << 0 << 0 << 0 << QRectF(); - QTest::newRow("0 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF() << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,0)") << 0 << QRectF() << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF() << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 0 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("0 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 0 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF() << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF() << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 10 x 10 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 25 x 25 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 100 x 100 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 250 x 250 QGraphicsRectItem (0,0,10,10)") << 1 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsRectItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 10 x 10 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 100, 100) << 10 << 10 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 25 x 25 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 250, 250) << 25 << 25 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 100 x 100 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 1000, 1000) << 100 << 100 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); - QTest::newRow("1 QRectF() 250 x 250 QGraphicsEllipseItem (0,0,10,10)") << 1 << QRectF(0, 0, 2500, 2500) << 250 << 250 << int(QGraphicsEllipseItem::Type) << QRectF(0, 0, 10, 10); -} - -void tst_QGraphicsScene::addItem() -{ - QFETCH(int, indexMethod); - QFETCH(QRectF, sceneRect); - QFETCH(int, numItems_X); - QFETCH(int, numItems_Y); - QFETCH(int, itemType); - QFETCH(QRectF, itemRect); - - QGraphicsScene scene; - scene.setItemIndexMethod(indexMethod ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); - if (!sceneRect.isNull()) - scene.setSceneRect(sceneRect); - - QBENCHMARK { - QGraphicsItem *item = 0; - for (int y = 0; y < numItems_Y; ++y) { - for (int x = 0; x < numItems_X; ++x) { - switch (itemType) { - case QGraphicsRectItem::Type: - item = new QGraphicsRectItem(itemRect); - break; - case QGraphicsEllipseItem::Type: - default: - item = new QGraphicsEllipseItem(itemRect); - break; - } - item->setPos(x * itemRect.width(), y * itemRect.height()); - scene.addItem(item); - } - } - scene.itemAt(0, 0); - } - //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list - qApp->processEvents(); -} - -void tst_QGraphicsScene::itemAt_data() -{ - QTest::addColumn("bspTreeDepth"); - QTest::addColumn("sceneRect"); - QTest::addColumn("numItems_X"); - QTest::addColumn("numItems_Y"); - QTest::addColumn("itemRect"); - - QTest::newRow("null") << 0 << QRectF() << 0 << 0 << QRectF(); - QTest::newRow("NoIndex 10x10") << -1 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); - QTest::newRow("NoIndex 25x25") << -1 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); - QTest::newRow("NoIndex 100x100") << -1 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); - QTest::newRow("NoIndex 250x250") << -1 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=auto 10x10") << 0 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=auto 25x25") << 0 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=auto 100x100") << 0 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=auto 250x250") << 0 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=16 10x10") << 16 << QRectF() << 10 << 10 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=16 25x25") << 16 << QRectF() << 25 << 25 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=16 100x100") << 16 << QRectF() << 100 << 100 << QRectF(-10, -10, 20, 20); - QTest::newRow("BspTreeIndex depth=16 250x250") << 16 << QRectF() << 250 << 250 << QRectF(-10, -10, 20, 20); -} - -void tst_QGraphicsScene::itemAt() -{ - QFETCH(int, bspTreeDepth); - QFETCH(QRectF, sceneRect); - QFETCH(int, numItems_X); - QFETCH(int, numItems_Y); - QFETCH(QRectF, itemRect); - - QGraphicsScene scene; - scene.setItemIndexMethod(bspTreeDepth >= 0 ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); - if (bspTreeDepth > 0) - scene.setBspTreeDepth(bspTreeDepth); - if (!sceneRect.isNull()) - scene.setSceneRect(sceneRect); - - QGraphicsItem *item = 0; - for (int y = 0; y < numItems_Y; ++y) { - for (int x = 0; x < numItems_X; ++x) { - QGraphicsRectItem *item = new QGraphicsRectItem(itemRect); - item->setPos((x - numItems_X/2) * itemRect.width(), (y - numItems_Y/2) * itemRect.height()); - scene.addItem(item); - } - } - - scene.itemAt(0, 0); // triggers indexing - - QBENCHMARK { - scene.itemAt(0, 0); - } - - //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list - qApp->processEvents(); -} - -void tst_QGraphicsScene::initialShow() -{ - QGraphicsScene scene; - - QBENCHMARK { - for (int y = 0; y < 30000; ++y) { - QGraphicsRectItem *item = new QGraphicsRectItem(0, 0, 50, 50); - item->setPos((y/2) * item->rect().width(), (y/2) * item->rect().height()); - scene.addItem(item); - } - scene.itemAt(0, 0); // triggers indexing - //This call polish the items so we bench their processing too. - qApp->processEvents(); - } -} - -QTEST_MAIN(tst_QGraphicsScene) -#include "tst_qgraphicsscene.moc" diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp deleted file mode 100644 index 77b86c1..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "chip.h" - -#include - -Chip::Chip(const QColor &color, int x, int y) -{ - this->x = x; - this->y = y; - this->color = color; - setZValue((x + y) % 2); - - setFlags(ItemIsSelectable | ItemIsMovable); - setAcceptsHoverEvents(true); -} - -QRectF Chip::boundingRect() const -{ - return QRectF(0, 0, 110, 70); -} - -QPainterPath Chip::shape() const -{ - QPainterPath path; - path.addRect(14, 14, 82, 42); - return path; -} - -void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) -{ - Q_UNUSED(widget); - - QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color; - if (option->state & QStyle::State_MouseOver) - fillColor = fillColor.light(125); - - if (option->levelOfDetail < 0.2) { - if (option->levelOfDetail < 0.125) { - painter->fillRect(QRectF(0, 0, 110, 70), fillColor); - return; - } - - painter->setPen(QPen(Qt::black, 0)); - painter->setBrush(fillColor); - painter->drawRect(13, 13, 97, 57); - return; - } - - QPen oldPen = painter->pen(); - QPen pen = oldPen; - int width = 0; - if (option->state & QStyle::State_Selected) - width += 2; - - pen.setWidth(width); - painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100))); - - painter->drawRect(QRect(14, 14, 79, 39)); - if (option->levelOfDetail >= 1) { - painter->setPen(QPen(Qt::gray, 1)); - painter->drawLine(15, 54, 94, 54); - painter->drawLine(94, 53, 94, 15); - painter->setPen(QPen(Qt::black, 0)); - } - - // Draw text - if (option->levelOfDetail >= 2) { - QFont font("Times", 10); - font.setStyleStrategy(QFont::ForceOutline); - painter->setFont(font); - painter->save(); - painter->scale(0.1, 0.1); - painter->drawText(170, 180, QString("Model: VSC-2000 (Very Small Chip) at %1x%2").arg(x).arg(y)); - painter->drawText(170, 200, QString("Serial number: DLWR-WEER-123L-ZZ33-SDSJ")); - painter->drawText(170, 220, QString("Manufacturer: Chip Manufacturer")); - painter->restore(); - } - - // Draw lines - QVarLengthArray lines; - if (option->levelOfDetail >= 0.5) { - for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { - lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5)); - lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62)); - } - for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { - lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5)); - lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5)); - } - } - if (option->levelOfDetail >= 0.4) { - const QLineF lineData[] = { - QLineF(25, 35, 35, 35), - QLineF(35, 30, 35, 40), - QLineF(35, 30, 45, 35), - QLineF(35, 40, 45, 35), - QLineF(45, 30, 45, 40), - QLineF(45, 35, 55, 35) - }; - lines.append(lineData, 6); - } - painter->drawLines(lines.data(), lines.size()); - - // Draw red ink - if (stuff.size() > 1) { - painter->setPen(QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setBrush(Qt::NoBrush); - QPainterPath path; - path.moveTo(stuff.first()); - for (int i = 1; i < stuff.size(); ++i) - path.lineTo(stuff.at(i)); - painter->drawPath(path); - } -} - -void Chip::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - QGraphicsItem::mousePressEvent(event); - update(); -} - -void Chip::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - if (event->modifiers() & Qt::ShiftModifier) { - stuff << event->pos(); - update(); - return; - } - QGraphicsItem::mouseMoveEvent(event); -} - -void Chip::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - QGraphicsItem::mouseReleaseEvent(event); - update(); -} diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug b/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug deleted file mode 100644 index 8fe1e5b..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h deleted file mode 100644 index 9db23f9..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CHIP_H -#define CHIP_H - -#include -#include - -class Chip : public QGraphicsItem -{ -public: - Chip(const QColor &color, int x, int y); - - QRectF boundingRect() const; - QPainterPath shape() const; - void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget); - -protected: - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - -private: - int x, y; - QColor color; - QList stuff; -}; - -#endif diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro b/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro deleted file mode 100644 index 53fa23b..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro +++ /dev/null @@ -1,19 +0,0 @@ -RESOURCES += images.qrc - -HEADERS += mainwindow.h view.h chip.h -SOURCES += main.cpp -SOURCES += mainwindow.cpp view.cpp chip.cpp - -contains(QT_CONFIG, opengl):QT += opengl - -build_all:!build_pass { - CONFIG -= build_all - CONFIG += release -} - -# install -target.path = $$[QT_INSTALL_DEMOS]/chip -sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.pro *.html *.doc images -sources.path = $$[QT_INSTALL_DEMOS]/chip -INSTALLS += target sources - diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png deleted file mode 100644 index ba7c02d..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc b/tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc deleted file mode 100644 index c7cdf0c..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc +++ /dev/null @@ -1,10 +0,0 @@ - - - qt4logo.png - zoomin.png - zoomout.png - rotateleft.png - rotateright.png - fileprint.png - - diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp deleted file mode 100644 index ea2f94a..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mainwindow.h" - -#include - -int main(int argc, char **argv) -{ - Q_INIT_RESOURCE(images); - - QApplication app(argc, argv); - app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); - - MainWindow window; - window.show(); - - return app.exec(); -} diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp deleted file mode 100644 index 452b42c..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mainwindow.h" -#include "view.h" -#include "chip.h" - -#include - -MainWindow::MainWindow(QWidget *parent) - : QWidget(parent) -{ - populateScene(); - - View *view = new View("Top left view"); - view->view()->setScene(scene); - QHBoxLayout *layout = new QHBoxLayout; - layout->addWidget(view); - setLayout(layout); - - setWindowTitle(tr("Chip Demo")); -} - -void MainWindow::populateScene() -{ - scene = new QGraphicsScene; - - QImage image(":/qt4logo.png"); - - // Populate scene - int xx = 0; - int nitems = 0; - for (int i = -11000; i < 11000; i += 110) { - ++xx; - int yy = 0; - for (int j = -7000; j < 7000; j += 70) { - ++yy; - qreal x = (i + 11000) / 22000.0; - qreal y = (j + 7000) / 14000.0; - - QColor color(image.pixel(int(image.width() * x), int(image.height() * y))); - QGraphicsItem *item = new Chip(color, xx, yy); - item->setPos(QPointF(i, j)); - scene->addItem(item); - - ++nitems; - } - } -} diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h deleted file mode 100644 index 558bbef..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -QT_FORWARD_DECLARE_CLASS(QGraphicsScene) -QT_FORWARD_DECLARE_CLASS(QGraphicsView) -QT_FORWARD_DECLARE_CLASS(QLabel) -QT_FORWARD_DECLARE_CLASS(QSlider) -QT_FORWARD_DECLARE_CLASS(QSplitter) - -class MainWindow : public QWidget -{ - Q_OBJECT -public: - MainWindow(QWidget *parent = 0); - -private: - void setupMatrix(); - void populateScene(); - - QGraphicsScene *scene; -}; - -#endif diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png deleted file mode 100644 index 157e86e..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png deleted file mode 100644 index 8cfa931..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png deleted file mode 100644 index ec5e866..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp deleted file mode 100644 index 1028f42..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "view.h" - -#include -#include "valgrind/callgrind.h" -#ifndef QT_NO_OPENGL -#include -#endif - -#include - -class CountView : public QGraphicsView -{ -protected: - void paintEvent(QPaintEvent *event) - { - static int n = 0; - if (n) - CALLGRIND_START_INSTRUMENTATION - QGraphicsView::paintEvent(event); - if (n) - CALLGRIND_STOP_INSTRUMENTATION - if (++n == 500) - qApp->quit(); - } -}; - -View::View(const QString &name, QWidget *parent) - : QFrame(parent) -{ - setFrameStyle(Sunken | StyledPanel); - graphicsView = new CountView; - graphicsView->setRenderHint(QPainter::Antialiasing, false); - graphicsView->setDragMode(QGraphicsView::RubberBandDrag); - graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate); - - int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize); - QSize iconSize(size, size); - - QToolButton *zoomInIcon = new QToolButton; - zoomInIcon->setAutoRepeat(true); - zoomInIcon->setAutoRepeatInterval(33); - zoomInIcon->setAutoRepeatDelay(0); - zoomInIcon->setIcon(QPixmap(":/zoomin.png")); - zoomInIcon->setIconSize(iconSize); - QToolButton *zoomOutIcon = new QToolButton; - zoomOutIcon->setAutoRepeat(true); - zoomOutIcon->setAutoRepeatInterval(33); - zoomOutIcon->setAutoRepeatDelay(0); - zoomOutIcon->setIcon(QPixmap(":/zoomout.png")); - zoomOutIcon->setIconSize(iconSize); - zoomSlider = new QSlider; - zoomSlider->setMinimum(0); - zoomSlider->setMaximum(500); - zoomSlider->setValue(250); - zoomSlider->setTickPosition(QSlider::TicksRight); - - // Zoom slider layout - QVBoxLayout *zoomSliderLayout = new QVBoxLayout; - zoomSliderLayout->addWidget(zoomInIcon); - zoomSliderLayout->addWidget(zoomSlider); - zoomSliderLayout->addWidget(zoomOutIcon); - - QToolButton *rotateLeftIcon = new QToolButton; - rotateLeftIcon->setIcon(QPixmap(":/rotateleft.png")); - rotateLeftIcon->setIconSize(iconSize); - QToolButton *rotateRightIcon = new QToolButton; - rotateRightIcon->setIcon(QPixmap(":/rotateright.png")); - rotateRightIcon->setIconSize(iconSize); - rotateSlider = new QSlider; - rotateSlider->setOrientation(Qt::Horizontal); - rotateSlider->setMinimum(-360); - rotateSlider->setMaximum(360); - rotateSlider->setValue(0); - rotateSlider->setTickPosition(QSlider::TicksBelow); - - // Rotate slider layout - QHBoxLayout *rotateSliderLayout = new QHBoxLayout; - rotateSliderLayout->addWidget(rotateLeftIcon); - rotateSliderLayout->addWidget(rotateSlider); - rotateSliderLayout->addWidget(rotateRightIcon); - - resetButton = new QToolButton; - resetButton->setText(tr("0")); - resetButton->setEnabled(false); - - // Label layout - QHBoxLayout *labelLayout = new QHBoxLayout; - label = new QLabel(name); - antialiasButton = new QToolButton; - antialiasButton->setText(tr("Antialiasing")); - antialiasButton->setCheckable(true); - antialiasButton->setChecked(false); - openGlButton = new QToolButton; - openGlButton->setText(tr("OpenGL")); - openGlButton->setCheckable(true); -#ifndef QT_NO_OPENGL - openGlButton->setEnabled(QGLFormat::hasOpenGL()); -#else - openGlButton->setEnabled(false); -#endif - printButton = new QToolButton; - printButton->setIcon(QIcon(QPixmap(":/fileprint.png"))); - - labelLayout->addWidget(label); - labelLayout->addStretch(); - labelLayout->addWidget(antialiasButton); - labelLayout->addWidget(openGlButton); - labelLayout->addWidget(printButton); - - QGridLayout *topLayout = new QGridLayout; - topLayout->addLayout(labelLayout, 0, 0); - topLayout->addWidget(graphicsView, 1, 0); - topLayout->addLayout(zoomSliderLayout, 1, 1); - topLayout->addLayout(rotateSliderLayout, 2, 0); - topLayout->addWidget(resetButton, 2, 1); - setLayout(topLayout); - - connect(resetButton, SIGNAL(clicked()), this, SLOT(resetView())); - connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix())); - connect(rotateSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix())); - connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); - connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); - connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing())); - connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL())); - connect(rotateLeftIcon, SIGNAL(clicked()), this, SLOT(rotateLeft())); - connect(rotateRightIcon, SIGNAL(clicked()), this, SLOT(rotateRight())); - connect(zoomInIcon, SIGNAL(clicked()), this, SLOT(zoomIn())); - connect(zoomOutIcon, SIGNAL(clicked()), this, SLOT(zoomOut())); - connect(printButton, SIGNAL(clicked()), this, SLOT(print())); - - setupMatrix(); - - startTimer(0); -} - -QGraphicsView *View::view() const -{ - return graphicsView; -} - -void View::resetView() -{ - zoomSlider->setValue(250); - rotateSlider->setValue(0); - setupMatrix(); - graphicsView->ensureVisible(QRectF(0, 0, 0, 0)); - - resetButton->setEnabled(false); -} - -void View::setResetButtonEnabled() -{ - resetButton->setEnabled(true); -} - -void View::setupMatrix() -{ - qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50)); - - QMatrix matrix; - matrix.scale(scale, scale); - matrix.rotate(rotateSlider->value()); - - graphicsView->setMatrix(matrix); - setResetButtonEnabled(); -} - -void View::toggleOpenGL() -{ -#ifndef QT_NO_OPENGL - graphicsView->setViewport(openGlButton->isChecked() ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget); -#endif -} - -void View::toggleAntialiasing() -{ - graphicsView->setRenderHint(QPainter::Antialiasing, antialiasButton->isChecked()); -} - -void View::print() -{ -#ifndef QT_NO_PRINTER - QPrinter printer; - QPrintDialog dialog(&printer, this); - if (dialog.exec() == QDialog::Accepted) { - QPainter painter(&printer); - graphicsView->render(&painter); - } -#endif -} - -void View::zoomIn() -{ - zoomSlider->setValue(zoomSlider->value() + 1); -} - -void View::zoomOut() -{ - zoomSlider->setValue(zoomSlider->value() - 1); -} - -void View::rotateLeft() -{ - rotateSlider->setValue(rotateSlider->value() - 10); -} - -void View::rotateRight() -{ - rotateSlider->setValue(rotateSlider->value() + 10); -} - -void View::timerEvent(QTimerEvent *) -{ - graphicsView->horizontalScrollBar()->setValue(graphicsView->horizontalScrollBar()->value() + 1); -} - diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h deleted file mode 100644 index fc5c226..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef VIEW_H -#define VIEW_H - -#include - -QT_FORWARD_DECLARE_CLASS(QGraphicsView) -QT_FORWARD_DECLARE_CLASS(QLabel) -QT_FORWARD_DECLARE_CLASS(QSlider) -QT_FORWARD_DECLARE_CLASS(QToolButton) - -class View : public QFrame -{ - Q_OBJECT -public: - View(const QString &name, QWidget *parent = 0); - - QGraphicsView *view() const; - -private slots: - void resetView(); - void setResetButtonEnabled(); - void setupMatrix(); - void toggleOpenGL(); - void toggleAntialiasing(); - void print(); - - void zoomIn(); - void zoomOut(); - void rotateLeft(); - void rotateRight(); - - void timerEvent(QTimerEvent *); - -private: - QGraphicsView *graphicsView; - QLabel *label; - QToolButton *openGlButton; - QToolButton *antialiasButton; - QToolButton *printButton; - QToolButton *resetButton; - QSlider *zoomSlider; - QSlider *rotateSlider; -}; - -#endif diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png deleted file mode 100644 index 8b0daee..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png b/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png deleted file mode 100644 index 1575dd2..0000000 Binary files a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp deleted file mode 100644 index 527713f..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include "valgrind/callgrind.h" - -#ifdef Q_WS_X11 -extern void qt_x11_wait_for_window_manager(QWidget *); -#endif - -class View : public QGraphicsView -{ - Q_OBJECT -public: - View(QGraphicsScene *scene, QGraphicsItem *item) - : QGraphicsView(scene), _item(item) - { - } - -protected: - void paintEvent(QPaintEvent *event) - { - static int n = 0; - if (n) - CALLGRIND_START_INSTRUMENTATION - QGraphicsView::paintEvent(event); - _item->moveBy(1, 1); - if (n) - CALLGRIND_STOP_INSTRUMENTATION - if (++n == 200) - qApp->quit(); - } - -private: - QGraphicsItem *_item; -}; - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - if (argc < 2) { - qDebug("usage: ./%s ", argv[0]); - return 1; - } - - QGraphicsScene scene(-150, -150, 300, 300); - scene.setItemIndexMethod(QGraphicsScene::NoIndex); - - QGraphicsRectItem *item = scene.addRect(-50, -50, 100, 100, QPen(Qt::NoPen), QBrush(Qt::blue)); - item->setFlag(QGraphicsItem::ItemIsMovable); - - for (int i = 0; i < atoi(argv[1]); ++i) { - QGraphicsRectItem *child = scene.addRect(-5, -5, 10, 10, QPen(Qt::NoPen), QBrush(Qt::blue)); - child->setPos(-50 + qrand() % 100, -50 + qrand() % 100); - child->setParentItem(item); - } - - View view(&scene, item); - view.resize(300, 300); - view.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - - return app.exec(); -} - -#include "main.moc" diff --git a/tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro b/tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro deleted file mode 100644 index 28dcadc..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp deleted file mode 100644 index 7419206..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include "valgrind/callgrind.h" - -class ItemMover : public QObject -{ - Q_OBJECT -public: - ItemMover(QGraphicsItem *item) - : _item(item) - { - startTimer(0); - } - -protected: - void timerEvent(QTimerEvent *event) - { - _item->moveBy(-1, 0); - } - -private: - QGraphicsItem *_item; -}; - -class ClipItem : public QGraphicsRectItem -{ -public: - ClipItem(qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) - : QGraphicsRectItem(x, y, w, h) - { - setPen(pen); - setBrush(brush); - } - - QPainterPath shape() const - { - QPainterPath path; - path.addRect(rect()); - return path; - } -}; - -class CountView : public QGraphicsView -{ -protected: - void paintEvent(QPaintEvent *event) - { - static int n = 0; - if (n) - CALLGRIND_START_INSTRUMENTATION - QGraphicsView::paintEvent(event); - if (n) - CALLGRIND_STOP_INSTRUMENTATION - if (++n == 500) - qApp->quit(); - } -}; - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QGraphicsScene scene; - scene.setItemIndexMethod(QGraphicsScene::NoIndex); - - ClipItem *clipItem = new ClipItem(0, 0, 100, 100, QPen(), QBrush(Qt::blue)); - clipItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape); - clipItem->setData(0, "clipItem"); - scene.addItem(clipItem); - - QGraphicsRectItem *scrollItem = scene.addRect(0, 0, 10, 10, QPen(Qt::NoPen), QBrush(Qt::NoBrush)); - scrollItem->setParentItem(clipItem); - scrollItem->setFlag(QGraphicsItem::ItemIsMovable); - scrollItem->setData(0, "scrollItem"); - - for (int y = 0; y < 25; ++y) { - for (int x = 0; x < 25; ++x) { - ClipItem *rect = new ClipItem(0, 0, 90, 20, QPen(Qt::NoPen), QBrush(Qt::green)); - rect->setParentItem(scrollItem); - rect->setPos(x * 95, y * 25); - rect->setData(0, qPrintable(QString("rect %1 %2").arg(x).arg(y))); - rect->setFlag(QGraphicsItem::ItemClipsChildrenToShape); - - QGraphicsEllipseItem *ellipse = new QGraphicsEllipseItem(-5, -5, 10, 10); - ellipse->setPen(QPen(Qt::NoPen)); - ellipse->setBrush(QBrush(Qt::yellow)); - ellipse->setParentItem(rect); - ellipse->setData(0, qPrintable(QString("ellipse %1 %2").arg(x).arg(y))); - } - } - - scrollItem->setRect(scrollItem->childrenBoundingRect()); - -#if 0 - ItemMover mover(scrollItem); -#endif - - CountView view; - view.setScene(&scene); - view.setSceneRect(-25, -25, 150, 150); - view.resize(300, 300); - view.show(); - - return app.exec(); -} - -#include "main.moc" diff --git a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro b/tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro deleted file mode 100644 index 28dcadc..0000000 --- a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/tests/benchmarks/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/qgraphicsview/chiptester/chip.cpp deleted file mode 100644 index 4c1020a..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/chip.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "chip.h" - -#include - -Chip::Chip(const QColor &color, int x, int y) -{ - this->x = x; - this->y = y; - this->color = color; - setZValue((x + y) % 2); - - setFlags(ItemIsSelectable | ItemIsMovable); - setAcceptsHoverEvents(true); -} - -QRectF Chip::boundingRect() const -{ - return QRectF(0, 0, 110, 70); -} - -QPainterPath Chip::shape() const -{ - QPainterPath path; - path.addRect(14, 14, 82, 42); - return path; -} - -void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) -{ - Q_UNUSED(widget); - - QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color; - if (option->state & QStyle::State_MouseOver) - fillColor = fillColor.light(125); - - if (option->levelOfDetail < 0.2) { - if (option->levelOfDetail < 0.125) { - painter->fillRect(QRectF(0, 0, 110, 70), fillColor); - return; - } - - QBrush b = painter->brush(); - painter->setBrush(fillColor); - painter->drawRect(13, 13, 97, 57); - painter->setBrush(b); - return; - } - - QPen oldPen = painter->pen(); - QPen pen = oldPen; - int width = 0; - if (option->state & QStyle::State_Selected) - width += 2; - - pen.setWidth(width); - QBrush b = painter->brush(); - painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100))); - - painter->drawRect(QRect(14, 14, 79, 39)); - painter->setBrush(b); - - if (option->levelOfDetail >= 1) { - painter->setPen(QPen(Qt::gray, 1)); - painter->drawLine(15, 54, 94, 54); - painter->drawLine(94, 53, 94, 15); - painter->setPen(QPen(Qt::black, 0)); - } - - // Draw text - if (option->levelOfDetail >= 2) { - QFont font("Times", 10); - font.setStyleStrategy(QFont::ForceOutline); - painter->setFont(font); - painter->save(); - painter->scale(0.1, 0.1); - painter->drawText(170, 180, QString("Model: VSC-2000 (Very Small Chip) at %1x%2").arg(x).arg(y)); - painter->drawText(170, 200, QString("Serial number: DLWR-WEER-123L-ZZ33-SDSJ")); - painter->drawText(170, 220, QString("Manufacturer: Chip Manufacturer")); - painter->restore(); - } - - // Draw lines - QVarLengthArray lines; - if (option->levelOfDetail >= 0.5) { - for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { - lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5)); - lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62)); - } - for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) { - lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5)); - lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5)); - } - } - if (option->levelOfDetail >= 0.4) { - const QLineF lineData[] = { - QLineF(25, 35, 35, 35), - QLineF(35, 30, 35, 40), - QLineF(35, 30, 45, 35), - QLineF(35, 40, 45, 35), - QLineF(45, 30, 45, 40), - QLineF(45, 35, 55, 35) - }; - lines.append(lineData, 6); - } - painter->drawLines(lines.data(), lines.size()); - - // Draw red ink - if (stuff.size() > 1) { - QPen p = painter->pen(); - painter->setPen(QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setBrush(Qt::NoBrush); - QPainterPath path; - path.moveTo(stuff.first()); - for (int i = 1; i < stuff.size(); ++i) - path.lineTo(stuff.at(i)); - painter->drawPath(path); - painter->setPen(p); - } -} - -void Chip::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - QGraphicsItem::mousePressEvent(event); - update(); -} - -void Chip::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - if (event->modifiers() & Qt::ShiftModifier) { - stuff << event->pos(); - update(); - return; - } - QGraphicsItem::mouseMoveEvent(event); -} - -void Chip::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - QGraphicsItem::mouseReleaseEvent(event); - update(); -} diff --git a/tests/benchmarks/qgraphicsview/chiptester/chip.h b/tests/benchmarks/qgraphicsview/chiptester/chip.h deleted file mode 100644 index 9db23f9..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/chip.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CHIP_H -#define CHIP_H - -#include -#include - -class Chip : public QGraphicsItem -{ -public: - Chip(const QColor &color, int x, int y); - - QRectF boundingRect() const; - QPainterPath shape() const; - void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget); - -protected: - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - -private: - int x, y; - QColor color; - QList stuff; -}; - -#endif diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp deleted file mode 100644 index 8cada67..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "chiptester.h" -#include "chip.h" - -#include -#ifndef QT_NO_OPENGL -#include -#endif - -ChipTester::ChipTester(QWidget *parent) - : QGraphicsView(parent), - npaints(0) -{ - resize(400, 300); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setFrameStyle(0); - setTransformationAnchor(NoAnchor); - - populateScene(); - setScene(scene); - - setWindowTitle(tr("Chip Demo")); -} - -void ChipTester::setAntialias(bool enabled) -{ - setRenderHint(QPainter::Antialiasing, enabled); -} - -void ChipTester::setOpenGL(bool enabled) -{ -#ifndef QT_NO_OPENGL - setViewport(enabled ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : 0); -#endif -} - -void ChipTester::setOperation(Operation operation) -{ - this->operation = operation; -} - -void ChipTester::runBenchmark() -{ - npaints = 0; - timerId = startTimer(0); - stopWatch.start(); - eventLoop.exec(); - killTimer(timerId); -} - -void ChipTester::paintEvent(QPaintEvent *event) -{ - QGraphicsView::paintEvent(event); - if (++npaints == 50) - eventLoop.quit(); -} - -void ChipTester::timerEvent(QTimerEvent *) -{ - switch (operation) { - case Rotate360: - rotate(1); - break; - case ZoomInOut: { - qreal s = 0.05 + (npaints / 20.0); - setTransform(QTransform().scale(s, s)); - break; - } - case Translate: { - int offset = horizontalScrollBar()->minimum() - + (npaints % (horizontalScrollBar()->maximum() - horizontalScrollBar()->minimum())); - horizontalScrollBar()->setValue(offset); - break; - } - } -} - -void ChipTester::populateScene() -{ - scene = new QGraphicsScene; - - QImage image(":/qt4logo.png"); - - // Populate scene - int xx = 0; - int nitems = 0; - for (int i = -1100; i < 1100; i += 110) { - ++xx; - int yy = 0; - for (int j = -700; j < 700; j += 70) { - ++yy; - qreal x = (i + 1100) / 2200.0; - qreal y = (j + 700) / 1400.0; - - QColor color(image.pixel(int(image.width() * x), int(image.height() * y))); - QGraphicsItem *item = new Chip(color, xx, yy); - item->setPos(QPointF(i, j)); - scene->addItem(item); - - ++nitems; - } - } -} diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/qgraphicsview/chiptester/chiptester.h deleted file mode 100644 index 1a73bb7..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CHIPTESTER_H -#define CHIPTESTER_H - -#include - -QT_FORWARD_DECLARE_CLASS(QGraphicsScene) -QT_FORWARD_DECLARE_CLASS(QGraphicsView) -QT_FORWARD_DECLARE_CLASS(QLabel) -QT_FORWARD_DECLARE_CLASS(QSlider) -QT_FORWARD_DECLARE_CLASS(QSplitter) - -class ChipTester : public QGraphicsView -{ - Q_OBJECT -public: - enum Operation { - Rotate360, - ZoomInOut, - Translate - }; - ChipTester(QWidget *parent = 0); - - void setAntialias(bool enabled); - void setOpenGL(bool enabled); - void runBenchmark(); - void setOperation(Operation operation); - -protected: - void paintEvent(QPaintEvent *event); - void timerEvent(QTimerEvent *event); - -private: - void populateScene(); - - QGraphicsView *view; - QGraphicsScene *scene; - int npaints; - int timerId; - QEventLoop eventLoop; - QTime stopWatch; - Operation operation; -}; - -#endif diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.pri b/tests/benchmarks/qgraphicsview/chiptester/chiptester.pri deleted file mode 100644 index a9e0bf8..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.pri +++ /dev/null @@ -1,12 +0,0 @@ -SOURCES += \ - chiptester/chiptester.cpp \ - chiptester/chip.cpp - -HEADERS += \ - chiptester/chiptester.h \ - chiptester/chip.h - -RESOURCES += \ - chiptester/images.qrc - -contains(QT_CONFIG, opengl) QT += opengl diff --git a/tests/benchmarks/qgraphicsview/chiptester/images.qrc b/tests/benchmarks/qgraphicsview/chiptester/images.qrc deleted file mode 100644 index 73e8620..0000000 --- a/tests/benchmarks/qgraphicsview/chiptester/images.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - qt4logo.png - - diff --git a/tests/benchmarks/qgraphicsview/chiptester/qt4logo.png b/tests/benchmarks/qgraphicsview/chiptester/qt4logo.png deleted file mode 100644 index 157e86e..0000000 Binary files a/tests/benchmarks/qgraphicsview/chiptester/qt4logo.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/images/designer.png b/tests/benchmarks/qgraphicsview/images/designer.png deleted file mode 100644 index 0988fce..0000000 Binary files a/tests/benchmarks/qgraphicsview/images/designer.png and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg b/tests/benchmarks/qgraphicsview/images/wine-big.jpeg deleted file mode 100644 index 9900a50..0000000 Binary files a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/images/wine.jpeg b/tests/benchmarks/qgraphicsview/images/wine.jpeg deleted file mode 100644 index 8fe1d3a..0000000 Binary files a/tests/benchmarks/qgraphicsview/images/wine.jpeg and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.pro b/tests/benchmarks/qgraphicsview/qgraphicsview.pro deleted file mode 100644 index 927d731..0000000 --- a/tests/benchmarks/qgraphicsview/qgraphicsview.pro +++ /dev/null @@ -1,16 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qgraphicsview - -SOURCES += tst_qgraphicsview.cpp -RESOURCES += qgraphicsview.qrc - -include(chiptester/chiptester.pri) - -symbian { - qt_not_deployed { - plugins.sources = qjpeg.dll - plugins.path = imageformats - DEPLOYMENT += plugins - } -} diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc b/tests/benchmarks/qgraphicsview/qgraphicsview.qrc deleted file mode 100644 index 3681648..0000000 --- a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc +++ /dev/null @@ -1,9 +0,0 @@ - - - images/designer.png - images/wine.jpeg - images/wine-big.jpeg - random.data - - - diff --git a/tests/benchmarks/qgraphicsview/random.data b/tests/benchmarks/qgraphicsview/random.data deleted file mode 100644 index 190a36c..0000000 Binary files a/tests/benchmarks/qgraphicsview/random.data and /dev/null differ diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp deleted file mode 100644 index 4cb07db..0000000 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ /dev/null @@ -1,908 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#ifdef Q_WS_X11 -QT_BEGIN_NAMESPACE -extern void qt_x11_wait_for_window_manager(QWidget *); -QT_END_NAMESPACE -#endif -#include "chiptester/chiptester.h" -//#define CALLGRIND_DEBUG -#ifdef CALLGRIND_DEBUG -#include "valgrind/callgrind.h" -#endif - -//TESTED_FILES= - -class QEventWaiter : public QEventLoop -{ -public: - QEventWaiter(QObject *receiver, QEvent::Type type) - : waiting(false), t(type) - { - receiver->installEventFilter(this); - } - - void wait() - { - waiting = true; - exec(); - } - - bool eventFilter(QObject *receiver, QEvent *event) - { - Q_UNUSED(receiver); - if (waiting && event->type() == t) { - waiting = false; - exit(); - } - return false; - } - -private: - bool waiting; - QEvent::Type t; -}; - -class tst_QGraphicsView : public QObject -{ - Q_OBJECT - -public: - tst_QGraphicsView(); - virtual ~tst_QGraphicsView(); - -public slots: - void init(); - void cleanup(); - -private slots: - void construct(); - void paintSingleItem(); - void paintDeepStackingItems(); - void paintDeepStackingItems_clipped(); - void moveSingleItem(); - void mapPointToScene_data(); - void mapPointToScene(); - void mapPointFromScene_data(); - void mapPointFromScene(); - void mapRectToScene_data(); - void mapRectToScene(); - void mapRectFromScene_data(); - void mapRectFromScene(); - void chipTester_data(); - void chipTester(); - void deepNesting_data(); - void deepNesting(); - void imageRiver_data(); - void imageRiver(); - void textRiver_data(); - void textRiver(); - void moveItemCache_data(); - void moveItemCache(); - void paintItemCache_data(); - void paintItemCache(); -}; - -tst_QGraphicsView::tst_QGraphicsView() -{ -} - -tst_QGraphicsView::~tst_QGraphicsView() -{ -} - -void tst_QGraphicsView::init() -{ -} - -void tst_QGraphicsView::cleanup() -{ -} - -void tst_QGraphicsView::construct() -{ - QBENCHMARK { - QGraphicsView view; - } -} - -void tst_QGraphicsView::paintSingleItem() -{ - QGraphicsScene scene(0, 0, 100, 100); - scene.addRect(0, 0, 10, 10); - - QGraphicsView view(&scene); - view.show(); - view.resize(100, 100); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - - QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); - QPainter painter(&image); - QBENCHMARK { - view.viewport()->render(&painter); - } -} - -#ifdef Q_OS_SYMBIAN -# define DEEP_STACKING_COUNT 85 -#else -# define DEEP_STACKING_COUNT 1000 -#endif - -void tst_QGraphicsView::paintDeepStackingItems() -{ - QGraphicsScene scene(0, 0, 100, 100); - QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); - QGraphicsRectItem *lastRect = item; - for (int i = 0; i < DEEP_STACKING_COUNT; ++i) { - QGraphicsRectItem *rect = scene.addRect(0, 0, 10, 10); - rect->setPos(1, 1); - rect->setParentItem(lastRect); - lastRect = rect; - } - - QGraphicsView view(&scene); - view.show(); - view.resize(100, 100); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - - QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); - QPainter painter(&image); - QBENCHMARK { - view.viewport()->render(&painter); - } -} - -void tst_QGraphicsView::paintDeepStackingItems_clipped() -{ - QGraphicsScene scene(0, 0, 100, 100); - QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); - item->setFlag(QGraphicsItem::ItemClipsChildrenToShape); - QGraphicsRectItem *lastRect = item; - for (int i = 0; i < DEEP_STACKING_COUNT; ++i) { - QGraphicsRectItem *rect = scene.addRect(0, 0, 10, 10); - rect->setPos(1, 1); - rect->setParentItem(lastRect); - lastRect = rect; - } - - QGraphicsView view(&scene); - view.show(); - view.resize(100, 100); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - - QImage image(100, 100, QImage::Format_ARGB32_Premultiplied); - QPainter painter(&image); - QBENCHMARK { - view.viewport()->render(&painter); - } -} - -void tst_QGraphicsView::moveSingleItem() -{ - QGraphicsScene scene(0, 0, 100, 100); - QGraphicsRectItem *item = scene.addRect(0, 0, 10, 10); - - QGraphicsView view(&scene); - view.show(); - view.resize(100, 100); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - - QEventWaiter waiter(view.viewport(), QEvent::Paint); - int n = 1; - QBENCHMARK { - item->setPos(25 * n, 25 * n); - waiter.wait(); - n = n ? 0 : 1; - } -} - -void tst_QGraphicsView::mapPointToScene_data() -{ - QTest::addColumn("transform"); - QTest::addColumn("point"); - - QTest::newRow("null") << QTransform() << QPoint(); - QTest::newRow("identity QPoint(100, 100)") << QTransform() << QPoint(100, 100); - QTest::newRow("rotate QPoint(100, 100)") << QTransform().rotate(90) << QPoint(100, 100); - QTest::newRow("scale QPoint(100, 100)") << QTransform().scale(5, 5) << QPoint(100, 100); - QTest::newRow("translate QPoint(100, 100)") << QTransform().translate(5, 5) << QPoint(100, 100); - QTest::newRow("shear QPoint(100, 100)") << QTransform().shear(1.5, 1.5) << QPoint(100, 100); - QTest::newRow("perspect QPoint(100, 100)") << QTransform().rotate(45, Qt::XAxis) << QPoint(100, 100); -} - -void tst_QGraphicsView::mapPointToScene() -{ - QFETCH(QTransform, transform); - QFETCH(QPoint, point); - - QGraphicsView view; - view.setTransform(transform); - QBENCHMARK { - view.mapToScene(point); - } -} - -void tst_QGraphicsView::mapPointFromScene_data() -{ - QTest::addColumn("transform"); - QTest::addColumn("point"); - - QTest::newRow("null") << QTransform() << QPointF(); - QTest::newRow("identity QPointF(100, 100)") << QTransform() << QPointF(100, 100); - QTest::newRow("rotate QPointF(100, 100)") << QTransform().rotate(90) << QPointF(100, 100); - QTest::newRow("scale QPointF(100, 100)") << QTransform().scale(5, 5) << QPointF(100, 100); - QTest::newRow("translate QPointF(100, 100)") << QTransform().translate(5, 5) << QPointF(100, 100); - QTest::newRow("shear QPointF(100, 100)") << QTransform().shear(1.5, 1.5) << QPointF(100, 100); - QTest::newRow("perspect QPointF(100, 100)") << QTransform().rotate(45, Qt::XAxis) << QPointF(100, 100); -} - -void tst_QGraphicsView::mapPointFromScene() -{ - QFETCH(QTransform, transform); - QFETCH(QPointF, point); - - QGraphicsView view; - view.setTransform(transform); - QBENCHMARK { - view.mapFromScene(point); - } -} - -void tst_QGraphicsView::mapRectToScene_data() -{ - QTest::addColumn("transform"); - QTest::addColumn("rect"); - - QTest::newRow("null") << QTransform() << QRect(); - QTest::newRow("identity QRect(0, 0, 100, 100)") << QTransform() << QRect(0, 0, 100, 100); - QTest::newRow("rotate QRect(0, 0, 100, 100)") << QTransform().rotate(90) << QRect(0, 0, 100, 100); - QTest::newRow("scale QRect(0, 0, 100, 100)") << QTransform().scale(5, 5) << QRect(0, 0, 100, 100); - QTest::newRow("translate QRect(0, 0, 100, 100)") << QTransform().translate(5, 5) << QRect(0, 0, 100, 100); - QTest::newRow("shear QRect(0, 0, 100, 100)") << QTransform().shear(1.5, 1.5) << QRect(0, 0, 100, 100); - QTest::newRow("perspect QRect(0, 0, 100, 100)") << QTransform().rotate(45, Qt::XAxis) << QRect(0, 0, 100, 100); -} - -void tst_QGraphicsView::mapRectToScene() -{ - QFETCH(QTransform, transform); - QFETCH(QRect, rect); - - QGraphicsView view; - view.setTransform(transform); - QBENCHMARK { - view.mapToScene(rect); - } -} - -void tst_QGraphicsView::mapRectFromScene_data() -{ - QTest::addColumn("transform"); - QTest::addColumn("rect"); - - QTest::newRow("null") << QTransform() << QRectF(); - QTest::newRow("identity QRectF(0, 0, 100, 100)") << QTransform() << QRectF(0, 0, 100, 100); - QTest::newRow("rotate QRectF(0, 0, 100, 100)") << QTransform().rotate(90) << QRectF(0, 0, 100, 100); - QTest::newRow("scale QRectF(0, 0, 100, 100)") << QTransform().scale(5, 5) << QRectF(0, 0, 100, 100); - QTest::newRow("translate QRectF(0, 0, 100, 100)") << QTransform().translate(5, 5) << QRectF(0, 0, 100, 100); - QTest::newRow("shear QRectF(0, 0, 100, 100)") << QTransform().shear(1.5, 1.5) << QRectF(0, 0, 100, 100); - QTest::newRow("perspect QRectF(0, 0, 100, 100)") << QTransform().rotate(45, Qt::XAxis) << QRectF(0, 0, 100, 100); -} - -void tst_QGraphicsView::mapRectFromScene() -{ - QFETCH(QTransform, transform); - QFETCH(QRectF, rect); - - QGraphicsView view; - view.setTransform(transform); - QBENCHMARK { - view.mapFromScene(rect); - } -} - -void tst_QGraphicsView::chipTester_data() -{ - QTest::addColumn("antialias"); - QTest::addColumn("opengl"); - QTest::addColumn("operation"); - QTest::newRow("rotate, normal") << false << false << 0; - QTest::newRow("rotate, normal, antialias") << true << false << 0; - QTest::newRow("rotate, opengl") << false << true << 0; - QTest::newRow("rotate, opengl, antialias") << true << true << 0; - QTest::newRow("zoom, normal") << false << false << 1; - QTest::newRow("zoom, normal, antialias") << true << false << 1; - QTest::newRow("zoom, opengl") << false << true << 1; - QTest::newRow("zoom, opengl, antialias") << true << true << 1; - QTest::newRow("translate, normal") << false << false << 2; - QTest::newRow("translate, normal, antialias") << true << false << 2; - QTest::newRow("translate, opengl") << false << true << 2; - QTest::newRow("translate, opengl, antialias") << true << true << 2; -} - -void tst_QGraphicsView::chipTester() -{ - QFETCH(bool, antialias); - QFETCH(bool, opengl); - QFETCH(int, operation); - - ChipTester tester; - tester.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&tester); -#endif - tester.setAntialias(antialias); - tester.setOpenGL(opengl); - tester.setOperation(ChipTester::Operation(operation)); - QBENCHMARK { - tester.runBenchmark(); - } -} - -static void addChildHelper(QGraphicsItem *parent, int n, bool rotate) -{ - if (!n) - return; - QGraphicsRectItem *item = new QGraphicsRectItem(QRectF(0, 0, 50, 50), parent); - item->setPos(10, 10); - if (rotate) - item->rotate(10); - addChildHelper(item, n - 1, rotate); -} - -void tst_QGraphicsView::deepNesting_data() -{ - QTest::addColumn("rotate"); - QTest::addColumn("sortCache"); - QTest::addColumn("bsp"); - - QTest::newRow("bsp, no transform") << false << false << true; - QTest::newRow("bsp, rotation") << true << false << true; - QTest::newRow("bsp, no transform, sort cache") << false << true << true; - QTest::newRow("bsp, rotation, sort cache") << true << true << true; - QTest::newRow("no transform") << false << false << false; - QTest::newRow("rotation") << true << false << false; - QTest::newRow("no transform, sort cache") << false << true << false; - QTest::newRow("rotation, sort cache") << true << true << false; -} - -void tst_QGraphicsView::deepNesting() -{ - QFETCH(bool, rotate); - QFETCH(bool, sortCache); - QFETCH(bool, bsp); - - QGraphicsScene scene; - for (int y = 0; y < 15; ++y) { - for (int x = 0; x < 15; ++x) { - QGraphicsItem *item1 = scene.addRect(QRectF(0, 0, 50, 50)); - if (rotate) item1->rotate(10); - item1->setPos(x * 25, y * 25); - addChildHelper(item1, 30, rotate); - } - } - scene.setItemIndexMethod(bsp ? QGraphicsScene::BspTreeIndex : QGraphicsScene::NoIndex); - scene.setSortCacheEnabled(sortCache); - - QGraphicsView view(&scene); - view.setRenderHint(QPainter::Antialiasing); - view.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - QTest::qWait(250); - - QBENCHMARK { -#ifdef CALLGRIND_DEBUG - CALLGRIND_START_INSTRUMENTATION -#endif - view.viewport()->repaint(); -#ifdef CALLGRIND_DEBUG - CALLGRIND_STOP_INSTRUMENTATION -#endif - } -} - -class AnimatedPixmapItem : public QGraphicsPixmapItem -{ -public: - AnimatedPixmapItem(int x, int y, bool rot, bool scal, QGraphicsItem *parent = 0) - : QGraphicsPixmapItem(parent), rotateFactor(0), scaleFactor(0) - { - rotate = rot; - scale = scal; - xspeed = x; - yspeed = y; - } - -protected: - void advance(int i) - { - if (!i) - return; - int x = int(pos().x()) + pixmap().width(); - x += xspeed; - x = (x % (300 + pixmap().width() * 2)) - pixmap().width(); - int y = int(pos().y()) + pixmap().width(); - y += yspeed; - y = (y % (300 + pixmap().width() * 2)) - pixmap().width(); - setPos(x, y); - - int rot = rotateFactor; - int sca = scaleFactor; - if (rotate) - rotateFactor = 1 + (rot + xspeed) % 360; - if (scale) - scaleFactor = 1 + (sca + yspeed) % 50; - - if (rotate || scale) { - qreal s = 0.5 + scaleFactor / 50.0; - setTransform(QTransform().rotate(rotateFactor).scale(s, s)); - } - } - -private: - int xspeed; - int yspeed; - int rotateFactor; - int scaleFactor; - bool rotate; - bool scale; -}; - -class CountPaintEventView : public QGraphicsView -{ -public: - CountPaintEventView(QGraphicsScene *scene = 0) - : QGraphicsView(scene), count(0) - { } - - int count; - -protected: - void paintEvent(QPaintEvent *event) - { - ++count; - QGraphicsView::paintEvent(event); - }; -}; - -void tst_QGraphicsView::imageRiver_data() -{ - QTest::addColumn("direction"); - QTest::addColumn("rotation"); - QTest::addColumn("scale"); - QTest::newRow("horizontal") << 0 << false << false; - QTest::newRow("vertical") << 1 << false << false; - QTest::newRow("both") << 2 << false << false; - QTest::newRow("horizontal rot") << 0 << true << false; - QTest::newRow("horizontal scale") << 0 << false << true; - QTest::newRow("horizontal rot + scale") << 0 << true << true; -} - -void tst_QGraphicsView::imageRiver() -{ - QFETCH(int, direction); - QFETCH(bool, rotation); - QFETCH(bool, scale); - - QGraphicsScene scene(0, 0, 300, 300); - - CountPaintEventView view(&scene); - view.resize(300, 300); - view.setFrameStyle(0); - view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.show(); - - QPixmap pix(":/images/designer.png"); - QVERIFY(!pix.isNull()); - - QList items; - QFile file(":/random.data"); - QVERIFY(file.open(QIODevice::ReadOnly)); - QDataStream str(&file); - for (int i = 0; i < 100; ++i) { - AnimatedPixmapItem *item; - if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale); - if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale); - if (direction == 2) item = new AnimatedPixmapItem((i % 4) + 1, (i % 4) + 1, rotation, scale); - item->setPixmap(pix); - int rnd1, rnd2; - str >> rnd1 >> rnd2; - item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), - -pix.height() + rnd2 % (view.height() + pix.height())); - scene.addItem(item); - } - - view.count = 0; - - QBENCHMARK { -#ifdef CALLGRIND_DEBUG - CALLGRIND_START_INSTRUMENTATION -#endif - for (int i = 0; i < 100; ++i) { - scene.advance(); - while (view.count < (i+1)) - qApp->processEvents(); - } -#ifdef CALLGRIND_DEBUG - CALLGRIND_STOP_INSTRUMENTATION -#endif - } -} - -class AnimatedTextItem : public QGraphicsSimpleTextItem -{ -public: - AnimatedTextItem(int x, int y, bool rot, bool scal, QGraphicsItem *parent = 0) - : QGraphicsSimpleTextItem(parent), rotateFactor(0), scaleFactor(25) - { - setText("River of text"); - rotate = rot; - scale = scal; - xspeed = x; - yspeed = y; - } - -protected: - void advance(int i) - { - if (!i) - return; - QRect r = boundingRect().toRect(); - int x = int(pos().x()) + r.width(); - x += xspeed; - x = (x % (300 + r.width() * 2)) - r.width(); - int y = int(pos().y()) + r.width(); - y += yspeed; - y = (y % (300 + r.width() * 2)) - r.width(); - setPos(x, y); - - int rot = rotateFactor; - int sca = scaleFactor; - if (rotate) - rotateFactor = 1 + (rot + xspeed) % 360; - if (scale) - scaleFactor = 1 + (sca + yspeed) % 50; - - if (rotate || scale) { - qreal s = 0.5 + scaleFactor / 50.0; - setTransform(QTransform().rotate(rotateFactor).scale(s, s)); - } - } - -private: - int xspeed; - int yspeed; - int rotateFactor; - int scaleFactor; - bool rotate; - bool scale; -}; - -void tst_QGraphicsView::textRiver_data() -{ - QTest::addColumn("direction"); - QTest::addColumn("rotation"); - QTest::addColumn("scale"); - QTest::newRow("horizontal") << 0 << false << false; - QTest::newRow("vertical") << 1 << false << false; - QTest::newRow("both") << 2 << false << false; - QTest::newRow("horizontal rot") << 0 << true << false; - QTest::newRow("horizontal scale") << 0 << false << true; - QTest::newRow("horizontal rot + scale") << 0 << true << true; -} - -void tst_QGraphicsView::textRiver() -{ - QFETCH(int, direction); - QFETCH(bool, rotation); - QFETCH(bool, scale); - - QGraphicsScene scene(0, 0, 300, 300); - - CountPaintEventView view(&scene); - view.resize(300, 300); - view.setFrameStyle(0); - view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.show(); - - QPixmap pix(":/images/designer.png"); - QVERIFY(!pix.isNull()); - - QList items; - QFile file(":/random.data"); - QVERIFY(file.open(QIODevice::ReadOnly)); - QDataStream str(&file); - for (int i = 0; i < 100; ++i) { - AnimatedTextItem *item; - if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale); - if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale); - if (direction == 2) item = new AnimatedTextItem((i % 4) + 1, (i % 4) + 1, rotation, scale); - int rnd1, rnd2; - str >> rnd1 >> rnd2; - item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), - -pix.height() + rnd2 % (view.height() + pix.height())); - scene.addItem(item); - } - - view.count = 0; - - QBENCHMARK { -#ifdef CALLGRIND_DEBUG - CALLGRIND_START_INSTRUMENTATION -#endif - for (int i = 0; i < 100; ++i) { - scene.advance(); - while (view.count < (i+1)) - qApp->processEvents(); - } -#ifdef CALLGRIND_DEBUG - CALLGRIND_STOP_INSTRUMENTATION -#endif - } -} - -class AnimatedPixmapCacheItem : public QGraphicsPixmapItem -{ -public: - AnimatedPixmapCacheItem(int x, int y, QGraphicsItem *parent = 0) - : QGraphicsPixmapItem(parent) - { - xspeed = x; - yspeed = y; - } - - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) - { - QGraphicsPixmapItem::paint(painter,option,widget); - //We just want to wait, and we don't want to process the event loop with qWait - QTest::qSleep(3); - } -protected: - void advance(int i) - { - if (!i) - return; - int x = int(pos().x()) + pixmap().width(); - x += xspeed; - x = (x % (300 + pixmap().width() * 2)) - pixmap().width(); - int y = int(pos().y()) + pixmap().width(); - y += yspeed; - y = (y % (300 + pixmap().width() * 2)) - pixmap().width(); - setPos(x, y); - } - -private: - int xspeed; - int yspeed; -}; - -void tst_QGraphicsView::moveItemCache_data() -{ - QTest::addColumn("direction"); - QTest::addColumn("rotation"); - QTest::addColumn("cacheMode"); - QTest::newRow("Horizontal movement : ItemCoordinate Cache") << 0 << false << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Horizontal movement : DeviceCoordinate Cache") << 0 << false << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Horizontal movement : No Cache") << 0 << false << (int)QGraphicsItem::NoCache; - QTest::newRow("Vertical + Horizontal movement : ItemCoordinate Cache") << 2 << false << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Vertical + Horizontal movement : DeviceCoordinate Cache") << 2 << false << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Vertical + Horizontal movement : No Cache") << 2 << false << (int)QGraphicsItem::NoCache; - QTest::newRow("Horizontal movement + Rotation : ItemCoordinate Cache") << 0 << true << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Horizontal movement + Rotation : DeviceCoordinate Cache") << 0 << true << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Horizontal movement + Rotation : No Cache") << 0 << true << (int)QGraphicsItem::NoCache; -} - -void tst_QGraphicsView::moveItemCache() -{ - QFETCH(int, direction); - QFETCH(bool, rotation); - QFETCH(int, cacheMode); - - QGraphicsScene scene(0, 0, 300, 300); - - CountPaintEventView view(&scene); - view.resize(600, 600); - view.setFrameStyle(0); - view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.show(); - - QPixmap pix(":/images/wine.jpeg"); - QVERIFY(!pix.isNull()); - - QList items; - QFile file(":/random.data"); - QVERIFY(file.open(QIODevice::ReadOnly)); - QDataStream str(&file); - for (int i = 0; i < 50; ++i) { - AnimatedPixmapCacheItem *item; - if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0); - if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1); - if (direction == 2) item = new AnimatedPixmapCacheItem((i % 4) + 1, (i % 4) + 1); - item->setPixmap(pix); - item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); - if (rotation) - item->setTransform(QTransform().rotate(45)); - int rnd1, rnd2; - str >> rnd1 >> rnd2; - item->setPos(-pix.width() + rnd1 % (view.width() + pix.width()), - -pix.height() + rnd2 % (view.height() + pix.height())); - scene.addItem(item); - } - - view.count = 0; - - QBENCHMARK { -#ifdef CALLGRIND_DEBUG - CALLGRIND_START_INSTRUMENTATION -#endif - for (int i = 0; i < 100; ++i) { - scene.advance(); - while (view.count < (i+1)) - qApp->processEvents(); - } -#ifdef CALLGRIND_DEBUG - CALLGRIND_STOP_INSTRUMENTATION -#endif - } -} - -class UpdatedPixmapCacheItem : public QGraphicsPixmapItem -{ -public: - UpdatedPixmapCacheItem(bool partial, QGraphicsItem *parent = 0) - : QGraphicsPixmapItem(parent), partial(partial) - { - } - - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) - { - QGraphicsPixmapItem::paint(painter,option,widget); - } -protected: - void advance(int i) - { - if (partial) - update(QRectF(boundingRect().center().x(), boundingRect().center().x(), 30, 30)); - else - update(); - } - -private: - bool partial; -}; - -void tst_QGraphicsView::paintItemCache_data() -{ - QTest::addColumn("updatePartial"); - QTest::addColumn("rotation"); - QTest::addColumn("cacheMode"); - QTest::newRow("Partial Update : ItemCoordinate Cache") << true << false << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Partial Update : DeviceCoordinate Cache") << true << false << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Partial Update : No Cache") << true << false << (int)QGraphicsItem::NoCache; - QTest::newRow("Full Update : ItemCoordinate Cache") << false << false << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Full Update : DeviceCoordinate Cache") << false << false << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Full Update : No Cache") << false << false << (int)QGraphicsItem::NoCache; - QTest::newRow("Partial Update : ItemCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Partial Update : DeviceCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Partial Update : No Cache item rotated") << true << true << (int)QGraphicsItem::NoCache; - QTest::newRow("Full Update : ItemCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::ItemCoordinateCache; - QTest::newRow("Full Update : DeviceCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::DeviceCoordinateCache; - QTest::newRow("Full Update : No Cache item rotated") << false << true <<(int)QGraphicsItem::NoCache; -} - -void tst_QGraphicsView::paintItemCache() -{ - QFETCH(bool, updatePartial); - QFETCH(bool, rotation); - QFETCH(int, cacheMode); - - QGraphicsScene scene(0, 0, 300, 300); - - CountPaintEventView view(&scene); - view.resize(600, 600); - view.setFrameStyle(0); - view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - view.show(); - - QPixmap pix(":/images/wine.jpeg"); - QVERIFY(!pix.isNull()); - - QList items; - QFile file(":/random.data"); - QVERIFY(file.open(QIODevice::ReadOnly)); - QDataStream str(&file); - UpdatedPixmapCacheItem *item = new UpdatedPixmapCacheItem(updatePartial); - item->setPixmap(pix); - item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); - if (rotation) - item->setTransform(QTransform().rotate(45)); - item->setPos(-100, -100); - scene.addItem(item); - - QPixmap pix2(":/images/wine-big.jpeg"); - item = new UpdatedPixmapCacheItem(updatePartial); - item->setPixmap(pix2); - item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); - if (rotation) - item->setTransform(QTransform().rotate(45)); - item->setPos(0, 0); - scene.addItem(item); - - view.count = 0; - - QBENCHMARK { -#ifdef CALLGRIND_DEBUG - CALLGRIND_START_INSTRUMENTATION -#endif - for (int i = 0; i < 50; ++i) { - scene.advance(); - while (view.count < (i+1)) - qApp->processEvents(); - } -#ifdef CALLGRIND_DEBUG - CALLGRIND_STOP_INSTRUMENTATION -#endif - } -} - -QTEST_MAIN(tst_QGraphicsView) -#include "tst_qgraphicsview.moc" diff --git a/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro b/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro deleted file mode 100644 index f1ec54e..0000000 --- a/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qgraphicswidget -TEMPLATE = app -# Input -SOURCES += tst_qgraphicswidget.cpp diff --git a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp deleted file mode 100644 index 7db98ce..0000000 --- a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -//TESTED_FILES= - -class tst_QGraphicsWidget : public QObject -{ - Q_OBJECT - -public: - tst_QGraphicsWidget(); - virtual ~tst_QGraphicsWidget(); - -public slots: - void init(); - void cleanup(); - -private slots: - void move(); -}; - -tst_QGraphicsWidget::tst_QGraphicsWidget() -{ -} - -tst_QGraphicsWidget::~tst_QGraphicsWidget() -{ -} - -void tst_QGraphicsWidget::init() -{ -} - -void tst_QGraphicsWidget::cleanup() -{ -} - -void tst_QGraphicsWidget::move() -{ - QGraphicsScene scene; - QGraphicsWidget *widget = new QGraphicsWidget(); - scene.addItem(widget); - QGraphicsView view(&scene); - view.show(); - QBENCHMARK { - widget->setPos(qrand(),qrand()); - } -} - -QTEST_MAIN(tst_QGraphicsWidget) -#include "tst_qgraphicswidget.moc" diff --git a/tests/benchmarks/qhostinfo/main.cpp b/tests/benchmarks/qhostinfo/main.cpp deleted file mode 100644 index 0ae1b7f..0000000 --- a/tests/benchmarks/qhostinfo/main.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include -#include -#include -#include - -#include -#include - -class tst_qhostinfo : public QObject -{ - Q_OBJECT -private slots: - void lookupSpeed(); -}; - -class SignalReceiver : public QObject -{ - Q_OBJECT -public: - SignalReceiver(int nrc) : receiveCount(0), neededReceiveCount(nrc) {}; - int receiveCount; - int neededReceiveCount; -public slots: - void resultsReady(const QHostInfo) { - receiveCount++; - if (receiveCount == neededReceiveCount) - QTestEventLoop::instance().exitLoop(); - } -}; - -void tst_qhostinfo::lookupSpeed() -{ - QStringList hostnameList; - hostnameList << "www.ovi.com" << "www.nokia.com" << "qt.nokia.com" << "www.trolltech.com" << "troll.no" - << "www.qtcentre.org" << "forum.nokia.com" << "www.forum.nokia.com" << "wiki.forum.nokia.com" - << "www.nokia.no" << "nokia.de" << "127.0.0.1" << "----"; - // also add some duplicates: - hostnameList << "www.nokia.com" << "127.0.0.1" << "www.trolltech.com"; - const int COUNT = hostnameList.size(); - - SignalReceiver receiver(COUNT); - - QBENCHMARK { - for (int i = 0; i < hostnameList.size(); i++) - QHostInfo::lookupHost(hostnameList.at(i), &receiver, SLOT(resultsReady(const QHostInfo))); - QTestEventLoop::instance().enterLoop(20); - QVERIFY(!QTestEventLoop::instance().timeout()); - } -} - - -QTEST_MAIN(tst_qhostinfo) - -#include "main.moc" diff --git a/tests/benchmarks/qhostinfo/qhostinfo.pro b/tests/benchmarks/qhostinfo/qhostinfo.pro deleted file mode 100755 index f18d6d7..0000000 --- a/tests/benchmarks/qhostinfo/qhostinfo.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qhostinfo -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui -QT += network - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qimagereader/images/16bpp.bmp b/tests/benchmarks/qimagereader/images/16bpp.bmp deleted file mode 100644 index 74ce63e..0000000 Binary files a/tests/benchmarks/qimagereader/images/16bpp.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/4bpp-rle.bmp b/tests/benchmarks/qimagereader/images/4bpp-rle.bmp deleted file mode 100644 index ae71e67..0000000 Binary files a/tests/benchmarks/qimagereader/images/4bpp-rle.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg b/tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg deleted file mode 100644 index b8aa9ea..0000000 Binary files a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.png b/tests/benchmarks/qimagereader/images/YCbCr_cmyk.png deleted file mode 100644 index a24db1b..0000000 Binary files a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg b/tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg deleted file mode 100644 index 8771224..0000000 Binary files a/tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/away.png b/tests/benchmarks/qimagereader/images/away.png deleted file mode 100644 index 0e21a37..0000000 Binary files a/tests/benchmarks/qimagereader/images/away.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/ball.mng b/tests/benchmarks/qimagereader/images/ball.mng deleted file mode 100644 index 8154478..0000000 Binary files a/tests/benchmarks/qimagereader/images/ball.mng and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/bat1.gif b/tests/benchmarks/qimagereader/images/bat1.gif deleted file mode 100644 index cb6f4f7..0000000 Binary files a/tests/benchmarks/qimagereader/images/bat1.gif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/bat2.gif b/tests/benchmarks/qimagereader/images/bat2.gif deleted file mode 100644 index fbbda4e..0000000 Binary files a/tests/benchmarks/qimagereader/images/bat2.gif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/beavis.jpg b/tests/benchmarks/qimagereader/images/beavis.jpg deleted file mode 100644 index d555047..0000000 Binary files a/tests/benchmarks/qimagereader/images/beavis.jpg and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/black.png b/tests/benchmarks/qimagereader/images/black.png deleted file mode 100644 index 6c94085..0000000 Binary files a/tests/benchmarks/qimagereader/images/black.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/black.xpm b/tests/benchmarks/qimagereader/images/black.xpm deleted file mode 100644 index d7925bf..0000000 --- a/tests/benchmarks/qimagereader/images/black.xpm +++ /dev/null @@ -1,65 +0,0 @@ -/* XPM */ -static char * ddd_xpm[] = { -/* $Id: ddd.xpm,v 1.5 1999/08/19 11:30:07 andreas Exp $ - * DDD Logo. Copyright (C) 1997 TU Braunschweig, Germany. - * For details on DDD, see `http://www.gnu.org/software/ddd/'. - * width height ncolors chars_per_pixel */ -" 48 48 8 1", -/* Colors */ -" c None m None g None g4 None s Background ", -". c black m black g black g4 black s Legs ", -"X c grey m white g grey g4 grey s Body ", -"- c grey m white g grey g4 grey s Border ", -"o c #000040 m black g grey25 g4 grey25 s Handle1 ", -"O c blue4 m black g grey25 g4 grey25 s Handle2 ", -"+ c white m white g white g4 white s Light ", -"* c DarkGreen m black g grey25 g4 grey25 s Eye ", -/* Pixels */ -" . . ", -" . .. ", -" . . ", -" .. . ", -" .. .. .. ", -" .. . . . ", -" . . . . .. ", -" . .X. . ", -" . *.X.* .. ", -" .. .. .XXX. .. ... ", -" . .X...XXX...X. . ", -" .. ..XXX.XXX.XXX. .. ", -" .....XXXX...XXXX. . ", -" .. ..XXXXXXXXX.. .. ", -" ...XXXXXXX..... ", -" ......... ", -" .XXXXXXX. ", -" .....XXX..... ", -" .XXXXXoOOOOOOX. ... ", -" .. ..XXXoOOO-----OOO..... ", -" .........XXoO-----..----O .. ", -" .. ..X..oO--.........--O .. ", -" . ..XXXoO--..++.......--O .. ", -" .. .XXXXO-XXX+++XXXXXXXXX-O . ", -" .. .....oO-XX+++XXXXXXXXXXX-O .. ", -" .. .XXXoO--XX++XXXXXXXXXXXX-O .. ", -" .. ..XXXoO-..+++............-O .. ", -" . .. .XXoO--..++.............-OO .. ", -" . ... ...oO--..................-O ", -".. . .XXoO-XXXXXXXXXXXXXXXXXXX-O ", -" .. .XXoO-XXXXXXXXXXXXXXXXXXX-O ", -" .. .XoO-XXXXXXXXXXXXXXXXXXX-O. ", -" . ...oO-.................-O .. ", -" . .XXoO-.................-O .. ", -" . ..XoO-.................-O .. ", -" . ...oO-XXXXXXXXXXXXXXX-OOO . ", -" .. .XoOO-XXXXXXXXXXXXX-OOOOO . ", -" .. ..XoOO---.......---OOOOOO . ", -" .. ....oOO---...----OOOOOOOO ", -" . .XX..oOO-----OOOOOOOOOOO ", -" . .....OOOOOOOOooOOOOOOOOO ", -" . .XXooooooOo oOOOOOOOOO ", -" . .XXX. ooOOOOOOO ", -" .. ... ooOOOOOO ", -" . ooOOOOOO ", -" ooOOOOOO ", -" ooOOOOOO ", -" ooOOOOOO "}; diff --git a/tests/benchmarks/qimagereader/images/colorful.bmp b/tests/benchmarks/qimagereader/images/colorful.bmp deleted file mode 100644 index 8ea6f4a..0000000 Binary files a/tests/benchmarks/qimagereader/images/colorful.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt-colors.xpm b/tests/benchmarks/qimagereader/images/corrupt-colors.xpm deleted file mode 100644 index f8d80ed..0000000 --- a/tests/benchmarks/qimagereader/images/corrupt-colors.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static const char *marble_xpm[] = { -/* width height num_colors chars_per_pixel */ -" 240 240 223 2", -/* colors */ -".. c #959595", -".# c #c5c5c5", -".a c #adadad", -".b c #dedede", -".c c #b7b7b7", -".d c #d2d2d2", -".e c #bebebe", -".f c #c9c9c9", -".g c #b8b8b8", -".h c #d6d6d6", -".i c #9e9e9e", -".j c #eaeaea", -".k c #b2b2b2", -".l c #cecece", -".m c #a5a5a5", -".n c #e4e4e4", -".o c #c4c4c4", -".p c #d9d9d9", -".q c #b1b1b1", -/* pixels */ -"aYbla9aN.N#x", diff --git a/tests/benchmarks/qimagereader/images/corrupt-data.tif b/tests/benchmarks/qimagereader/images/corrupt-data.tif deleted file mode 100644 index d63c688..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt-data.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt-pixels.xpm b/tests/benchmarks/qimagereader/images/corrupt-pixels.xpm deleted file mode 100644 index 21031ee..0000000 --- a/tests/benchmarks/qimagereader/images/corrupt-pixels.xpm +++ /dev/null @@ -1,7 +0,0 @@ -/* XPM */ -static char * test_xpm[] = { -"256 256 1 1", -" c grey", -" ", -" ", -" "}; diff --git a/tests/benchmarks/qimagereader/images/corrupt.bmp b/tests/benchmarks/qimagereader/images/corrupt.bmp deleted file mode 100644 index 824190b..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt.gif b/tests/benchmarks/qimagereader/images/corrupt.gif deleted file mode 100644 index 0725945..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt.gif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt.jpg b/tests/benchmarks/qimagereader/images/corrupt.jpg deleted file mode 100644 index 1959662..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt.jpg and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt.mng b/tests/benchmarks/qimagereader/images/corrupt.mng deleted file mode 100644 index 17fd43a..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt.mng and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt.png b/tests/benchmarks/qimagereader/images/corrupt.png deleted file mode 100644 index 9d8911c..0000000 Binary files a/tests/benchmarks/qimagereader/images/corrupt.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/corrupt.xbm b/tests/benchmarks/qimagereader/images/corrupt.xbm deleted file mode 100644 index 8510634..0000000 --- a/tests/benchmarks/qimagereader/images/corrupt.xbm +++ /dev/null @@ -1,5 +0,0 @@ -#define noname_width 271 -#define noname_height 273 -static char noname_bits[] = { - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f}; diff --git a/tests/benchmarks/qimagereader/images/crash-signed-char.bmp b/tests/benchmarks/qimagereader/images/crash-signed-char.bmp deleted file mode 100644 index b35cda6..0000000 Binary files a/tests/benchmarks/qimagereader/images/crash-signed-char.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/earth.gif b/tests/benchmarks/qimagereader/images/earth.gif deleted file mode 100644 index 2c229eb..0000000 Binary files a/tests/benchmarks/qimagereader/images/earth.gif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/fire.mng b/tests/benchmarks/qimagereader/images/fire.mng deleted file mode 100644 index c6695c8..0000000 Binary files a/tests/benchmarks/qimagereader/images/fire.mng and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/font.bmp b/tests/benchmarks/qimagereader/images/font.bmp deleted file mode 100644 index 28b8c66..0000000 Binary files a/tests/benchmarks/qimagereader/images/font.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/gnus.xbm b/tests/benchmarks/qimagereader/images/gnus.xbm deleted file mode 100644 index 58d1ac8..0000000 --- a/tests/benchmarks/qimagereader/images/gnus.xbm +++ /dev/null @@ -1,622 +0,0 @@ -#define noname_width 271 -#define noname_height 273 -static char noname_bits[] = { - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x49,0xe0,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x97,0xaa,0x8a,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x57,0x2a,0x41,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa9,0x52,0x16,0xfe,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0x49,0x05, - 0xf9,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0x95,0xaa,0x58,0xf4,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xa5,0x54,0x26,0xe1,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x54,0x49,0x49,0xe4,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x2a,0xa5, - 0x2a,0xd1,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xaf,0x52,0x95,0x54,0xc4,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab, - 0x24,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x57,0x29,0xa9,0x92,0x11,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x57,0xd5,0xfa,0xff,0xff,0xab,0xea,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x4a,0x55,0x2a,0x41,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x25,0x29,0xe5,0xff,0xff,0x95,0xa4,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa7,0xa4, - 0x24,0xa5,0x14,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0xa5,0xd4,0xff, - 0x3f,0x52,0xa9,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x29,0x55,0x55,0x55,0x41,0x7e,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xa9,0x54,0xea,0xff,0xdf,0x2a,0x55,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x4a,0x49,0x12,0x7e,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0x55,0xa5,0x92,0xff,0x23,0xa5,0x4a,0xd6,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa5,0xa4,0x94,0xaa,0x42, - 0x7d,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0x4a,0x2a,0xa9,0xff,0xad,0x92,0x24, - 0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a, - 0x95,0x52,0x52,0x29,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x52,0x49,0x55, - 0xfe,0x91,0x54,0x55,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0x49,0x29,0x55,0x25,0x85,0x7c,0xff,0xff,0xff,0xff,0xff,0xff, - 0x4f,0x95,0xaa,0x92,0x7e,0x55,0x55,0xa9,0x4a,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a,0x50,0x95,0xaa,0x24,0x7e,0xff,0xff, - 0xff,0xff,0xff,0xff,0x57,0x2a,0x95,0x54,0x79,0x95,0x92,0x92,0x94,0xfc,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xb9,0x62,0x29,0x49, - 0x85,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x49,0x49,0x95,0xba,0xa4,0x54, - 0xaa,0x52,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf, - 0x1a,0xf8,0xa7,0xaa,0x22,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x52, - 0x2a,0x75,0x55,0xa5,0x24,0xa5,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xbf,0x5a,0xfd,0x57,0x92,0x94,0x7e,0xff,0xff,0xff,0xff,0xff, - 0xff,0x4a,0x4a,0x55,0x49,0x89,0x92,0x94,0xaa,0x94,0xf4,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x1a,0xfc,0x2f,0x55,0x05,0x7c,0xff, - 0xff,0xff,0xff,0xff,0xff,0x55,0xa9,0x4a,0x55,0x2a,0x55,0x55,0x55,0x55,0xe5, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x4e,0xfd,0x5f, - 0x29,0xa5,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0xa4,0x54,0x52,0x4a,0x55,0xa9, - 0xa4,0x24,0xa5,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x2f,0x1d,0xfe,0x3f,0x95,0x04,0x7c,0xff,0xfd,0xff,0xff,0xff,0x3f,0x49,0xa5, - 0x54,0xa9,0xa4,0x92,0x4a,0x49,0x4a,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xaf,0x44,0xfe,0x5f,0xa9,0x52,0x7d,0xff,0xe5,0xff,0xff, - 0xff,0x5f,0x55,0x92,0x2a,0x95,0x52,0x4a,0x52,0xaa,0x52,0x4a,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x16,0xff,0xbf,0x4a,0x05,0x7c, - 0xff,0xd9,0xff,0xff,0xff,0x5f,0x95,0x42,0xa5,0x52,0x95,0xaa,0xaa,0xaa,0x94, - 0x54,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x43,0xfe, - 0xbf,0x54,0x52,0x7d,0x7f,0x25,0xff,0xff,0xff,0xa7,0xa4,0x28,0x92,0x54,0x4a, - 0xa5,0x4a,0x92,0xaa,0x4a,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xab,0x12,0xfe,0x7f,0xa5,0x02,0x7c,0x7f,0x55,0xfd,0xff,0xff,0x95,0x2a, - 0x82,0x54,0xa5,0x54,0x2a,0xa9,0x2a,0xa5,0x52,0xf5,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x27,0x4b,0xff,0xff,0x4a,0x29,0x7d,0xff,0x92,0xfe, - 0xff,0xff,0x55,0x92,0x20,0xa8,0x94,0x2a,0xa5,0x94,0x52,0x29,0xa9,0xf4,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x01,0xff,0x7f,0x52,0x42, - 0x7c,0xff,0x25,0xf9,0xff,0x7f,0xaa,0x02,0x8a,0x40,0x29,0x49,0x09,0x41,0x4a, - 0x55,0x25,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x57, - 0xff,0xff,0x95,0x12,0x7d,0xff,0xa9,0xfa,0xff,0x7f,0x25,0xa9,0x20,0x2a,0xa5, - 0xaa,0x42,0x92,0x54,0x92,0x54,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xaf,0x83,0xff,0xff,0xa9,0x42,0x7e,0xff,0xaa,0xf4,0xff,0xaf,0x54, - 0x01,0x82,0x80,0xaa,0x54,0x14,0x08,0xa2,0xaa,0x4a,0xd2,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xef,0xcf,0xd7,0xff,0xff,0x52,0x12,0x7f,0xff,0x4a, - 0xea,0xff,0x57,0x92,0xaa,0x28,0x24,0x29,0x25,0x81,0x82,0x08,0x49,0x52,0x55, - 0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xdf,0xef,0xe7,0xff,0xff,0x2a, - 0x05,0x7e,0xff,0x55,0xd5,0xff,0xa5,0x2a,0x00,0x8e,0x10,0x4a,0x89,0x24,0x28, - 0xa0,0xaa,0x2a,0x49,0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xe7,0xff, - 0xef,0xff,0xff,0xa5,0x50,0x7e,0xff,0x25,0xe5,0xff,0x2a,0xa5,0x52,0x7f,0x85, - 0x54,0x35,0x08,0x82,0x0a,0x55,0x95,0xaa,0xfc,0xff,0xff,0xff,0xcf,0xff,0xff, - 0xff,0xff,0xd7,0xff,0xff,0xff,0x7f,0x52,0x85,0x7e,0xff,0xab,0x94,0x1e,0x55, - 0x2a,0xc8,0xff,0x10,0x90,0x92,0xa0,0x08,0x20,0x24,0x52,0x25,0xfd,0xff,0xff, - 0xff,0xef,0xff,0xff,0xff,0xff,0xe9,0xff,0xff,0xff,0xff,0x94,0x10,0x7e,0xff, - 0x93,0xaa,0x6a,0x49,0x49,0xf2,0xff,0x85,0x52,0x09,0x0a,0xa2,0x4a,0x92,0x29, - 0xa9,0xf2,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0x7f, - 0x55,0x25,0x7f,0xff,0x55,0x49,0x49,0x95,0x0a,0xf9,0xff,0x17,0x48,0x26,0x50, - 0x08,0x00,0xa9,0x4a,0x95,0xfa,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xf2, - 0xff,0xff,0xff,0xff,0x92,0x80,0x7e,0xff,0xa7,0x54,0xaa,0xa4,0x52,0xfc,0xff, - 0xaf,0x42,0x89,0xfa,0xbf,0x54,0x20,0xa9,0xa4,0xd4,0xff,0xff,0xff,0xcb,0xff, - 0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0xff,0x54,0x29,0x7f,0xff,0x4b,0xa5,0x92, - 0x2a,0x01,0xff,0xff,0x1f,0xa8,0x22,0xff,0xff,0x01,0xa5,0x2a,0x55,0xa9,0xff, - 0xff,0xff,0xd4,0xff,0xff,0xff,0x7f,0xfa,0xff,0xff,0xff,0x7f,0xa5,0x04,0x7f, - 0xff,0x57,0x2a,0x55,0xa9,0x54,0xfe,0xff,0x3f,0x05,0x89,0xff,0xff,0x5f,0x48, - 0x92,0x2a,0x95,0xff,0xff,0xff,0xea,0xff,0xff,0xff,0xff,0xd2,0xff,0xff,0xff, - 0x7f,0x2a,0x91,0x7f,0xff,0xa9,0x54,0x4a,0x52,0x02,0xff,0xff,0xff,0x50,0xd1, - 0xff,0xff,0x1f,0x81,0xaa,0xa4,0x52,0xfe,0xff,0x3f,0xe9,0xff,0xff,0xff,0x7f, - 0x1d,0xff,0xff,0xff,0xff,0x54,0x41,0x7f,0xff,0x93,0x92,0x52,0x95,0xc8,0xff, - 0xff,0xff,0x8b,0xc4,0xff,0xff,0x7f,0x24,0xa5,0x2a,0x49,0xf9,0xff,0x7f,0xd5, - 0xff,0xff,0xff,0xbf,0x4a,0xff,0xff,0xff,0xff,0x4a,0x14,0x7f,0xff,0x28,0xa5, - 0x94,0x2a,0xa0,0xff,0xff,0x7f,0x22,0xf0,0xff,0xff,0x7f,0x12,0x94,0xa4,0xaa, - 0xea,0xff,0xaf,0xea,0xff,0xff,0xff,0x5f,0x8e,0xff,0xff,0xff,0x7f,0xa9,0x40, - 0x7f,0xff,0x48,0x55,0x55,0x12,0xca,0xff,0xff,0xff,0x0a,0xf5,0xff,0xff,0xff, - 0x80,0x52,0x95,0x54,0xaa,0xfe,0x55,0xc4,0xff,0xff,0xff,0x5f,0xa5,0xff,0xff, - 0xff,0xff,0x94,0x14,0x7f,0xff,0x52,0x2a,0xa9,0x4a,0xe1,0xff,0xff,0xbf,0x24, - 0xf0,0xff,0xff,0xff,0x0b,0x28,0xa9,0x92,0x24,0x55,0x49,0xe5,0xd7,0xff,0xff, - 0xa7,0x8a,0xff,0xff,0xff,0x7f,0xa5,0xc0,0x7f,0xff,0x50,0x49,0x95,0x04,0xf8, - 0xff,0xff,0x5f,0x1f,0xfd,0xff,0xff,0xff,0x47,0x45,0x55,0xaa,0xaa,0x4a,0xaa, - 0xea,0xaf,0xff,0xff,0x2b,0xc3,0xff,0xff,0xff,0x7f,0x55,0x94,0x7f,0x7f,0x4a, - 0x55,0x52,0x51,0xfe,0xff,0xff,0x5f,0x4e,0xf8,0xff,0xff,0xff,0x1f,0x50,0x92, - 0x52,0x49,0xa9,0x92,0xe4,0xd3,0xff,0xff,0x4b,0xd5,0xff,0xff,0xff,0xff,0x94, - 0xc0,0x7f,0x3f,0xa0,0xa4,0xaa,0x04,0xfe,0xff,0xff,0xa7,0x1d,0xfd,0xff,0xff, - 0xff,0x9f,0x84,0xaa,0x4a,0xaa,0x24,0x55,0xf2,0x2b,0xff,0x7f,0xa9,0xc1,0xff, - 0xff,0xff,0x7f,0x4a,0x95,0x7f,0xbf,0x2a,0x95,0x24,0x50,0xff,0xff,0xff,0x97, - 0x5e,0xfe,0xff,0xff,0xff,0x3f,0x92,0x24,0x95,0x92,0xaa,0xa4,0xf2,0xcb,0xff, - 0x5f,0xd5,0xe5,0xff,0xff,0xff,0xff,0x52,0x80,0x7f,0x3f,0xa0,0x52,0x15,0x85, - 0xff,0xff,0xff,0xd7,0x38,0xfe,0xff,0xff,0xff,0xff,0x20,0xaa,0x52,0x55,0x55, - 0x55,0xf9,0x29,0xfd,0xab,0xa4,0xf0,0xff,0xff,0xff,0x7f,0x29,0xa9,0x7f,0xff, - 0x42,0x25,0x49,0xe8,0xff,0xff,0xff,0x69,0x7a,0xff,0xff,0xff,0xff,0xff,0x82, - 0x52,0xaa,0x24,0x89,0x4a,0xf8,0x55,0x2a,0x49,0x95,0xf5,0xff,0xff,0xff,0xbf, - 0x2a,0xc4,0x7f,0x7f,0x90,0x54,0x15,0xe2,0xff,0xff,0xff,0x25,0xbc,0xff,0xff, - 0xff,0xff,0xff,0x29,0x48,0x49,0xaa,0xaa,0xa4,0xfa,0x95,0x92,0x54,0x52,0xf0, - 0xff,0xff,0xff,0xbf,0x4a,0xd1,0x7f,0xff,0x05,0xaa,0x40,0xf8,0xff,0xff,0x7f, - 0xaa,0xfc,0xff,0xff,0xff,0xff,0xff,0x43,0xa9,0xaa,0x4a,0x52,0xa9,0xf8,0xa4, - 0xaa,0x52,0x95,0xfc,0xff,0xff,0xff,0x7f,0x52,0xc0,0x7f,0xff,0xa1,0x00,0x24, - 0xfa,0xff,0xff,0xff,0x0a,0xfe,0xff,0xff,0xff,0xff,0xff,0x17,0x92,0x24,0xa5, - 0x2a,0x55,0xfe,0xaa,0xa4,0x2a,0x29,0xf9,0xff,0xff,0xff,0xbf,0x2a,0xea,0x7f, - 0xff,0x05,0x92,0x90,0xfc,0xff,0xff,0xbf,0xa4,0xff,0xff,0xff,0xff,0xff,0xff, - 0x4f,0xa0,0xaa,0x54,0x49,0x25,0x7c,0x49,0x95,0xa4,0x12,0xfc,0xff,0xff,0xff, - 0x7f,0x8a,0xe0,0x7f,0xff,0xa3,0x04,0x05,0xfe,0xff,0xff,0xbf,0x06,0xff,0xff, - 0xff,0xff,0xff,0xff,0x1f,0x49,0x95,0x52,0xaa,0x12,0x7f,0x55,0x52,0x55,0x0a, - 0xfd,0xff,0xff,0xff,0x3f,0x29,0xe8,0x7f,0xff,0x0f,0x50,0x50,0xff,0xff,0xff, - 0x5f,0xca,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x04,0xa9,0x4a,0x25,0x45,0x3e, - 0xa9,0x2a,0xa9,0xa2,0xfc,0xff,0xff,0xff,0x7f,0x55,0xe1,0x7f,0xff,0x27,0x05, - 0xc4,0xff,0xff,0xff,0x9f,0x91,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x41,0x4a, - 0x29,0xa9,0x12,0x5e,0x95,0x94,0x4a,0x0a,0xfe,0xff,0xff,0xff,0xbf,0x12,0xf4, - 0x7f,0xff,0x8f,0x50,0xf1,0xff,0xff,0xff,0xa7,0xc2,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x14,0x92,0xaa,0x4a,0xa2,0xbf,0xa4,0x52,0x95,0x22,0xff,0xff,0xff, - 0xff,0x3f,0x45,0xf2,0x7f,0xff,0x3f,0x04,0xf4,0xff,0xff,0xff,0xd7,0xe8,0xff, - 0xff,0xff,0xff,0x5f,0xff,0xff,0x83,0xa8,0x94,0x54,0x09,0x2f,0x55,0x4a,0x52, - 0x49,0xff,0xff,0xff,0xff,0x5f,0x99,0xf0,0x7f,0xff,0x7f,0x51,0xfc,0xff,0xff, - 0xff,0x6b,0xf1,0xff,0xff,0xff,0xff,0x5f,0xfd,0xff,0x2b,0x2a,0xa9,0x12,0x20, - 0x5f,0xa9,0xaa,0x54,0x00,0xff,0xff,0xff,0xff,0x5f,0x15,0xf2,0x7f,0xff,0xff, - 0x8f,0xff,0xff,0xff,0xff,0x2b,0xfc,0xff,0xff,0xff,0xff,0x2f,0xfd,0xff,0x87, - 0xa0,0x4a,0xaa,0x8a,0x9f,0x4a,0x52,0x15,0xa9,0xff,0xff,0xff,0xff,0x5f,0x8a, - 0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xf8,0xff,0xff,0xff,0xff, - 0x57,0xf2,0xff,0x2f,0x82,0x52,0x05,0xd0,0x2f,0x95,0x4a,0x49,0x84,0xff,0xff, - 0xff,0xff,0xbf,0x24,0xf8,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x12,0xfd, - 0xff,0xff,0xff,0xff,0x4b,0xd5,0xff,0x9f,0x28,0x54,0x48,0xc5,0xbf,0x52,0x55, - 0x0a,0xe1,0xff,0xff,0xff,0xff,0x9f,0x4a,0xfa,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x1a,0xfe,0xff,0xff,0xff,0xff,0x57,0xa9,0xff,0x3f,0x82,0x00,0x21, - 0xf0,0x5f,0x2a,0x49,0x21,0xc4,0xff,0xff,0xff,0xff,0xaf,0x1a,0xfd,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0x3f,0x85,0xff,0xff,0xff,0xff,0xff,0x29,0xa5,0xff, - 0xff,0x24,0x52,0x88,0xfc,0xbf,0x92,0x2a,0x09,0xf1,0xff,0xff,0xff,0xff,0x9f, - 0x4c,0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x15,0xff,0xff,0xff,0x7f, - 0xff,0xa5,0x4a,0xff,0xff,0x90,0x08,0x01,0xfe,0x3f,0x55,0x52,0x24,0xf4,0xff, - 0xff,0xff,0xff,0xaf,0x02,0xfd,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xc6, - 0xff,0xff,0xff,0xbf,0xfe,0x95,0x54,0xff,0xff,0x05,0x42,0xa8,0xfe,0xbf,0xa4, - 0x2a,0x41,0xf9,0xff,0xff,0xff,0xff,0x5f,0x55,0xfc,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0x4f,0xd0,0xff,0xff,0xff,0xbf,0x7c,0xaa,0x92,0xfc,0xff,0x53,0x08, - 0x01,0xff,0x1f,0x4a,0x01,0x04,0xfc,0xff,0xff,0xff,0xff,0x27,0x05,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xc5,0xff,0xff,0xff,0x4f,0xbf,0x52,0xaa, - 0xfe,0xff,0x07,0x42,0xea,0xff,0xbf,0x50,0x54,0x51,0xff,0xff,0xff,0xff,0xff, - 0x97,0x56,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xf0,0xff,0xff,0xff, - 0x2f,0x7f,0xa5,0x54,0xfd,0xff,0x3f,0x09,0xe0,0xff,0x1f,0x02,0x01,0x04,0xff, - 0xff,0xff,0xff,0xff,0xaf,0x02,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x4b, - 0xf5,0xff,0xff,0xff,0xab,0x9f,0x94,0x92,0xfc,0xff,0xff,0x40,0xfd,0xff,0x9f, - 0x48,0x48,0xa1,0xff,0xff,0xff,0xff,0xff,0xa7,0x56,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0x6b,0xf8,0xff,0xff,0xff,0xa4,0x5f,0xa9,0x2a,0xfd,0xff,0xff, - 0xff,0xff,0xff,0x3f,0x22,0x21,0xc4,0xff,0xff,0xff,0xff,0xff,0x2f,0x03,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0xfa,0xff,0xff,0x7f,0xd5,0x2f,0xa5, - 0xa4,0xfa,0xff,0xff,0xff,0xff,0xff,0xbf,0x08,0x08,0xf9,0xff,0xff,0xff,0xff, - 0xff,0x97,0x4a,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xfc,0xff,0xff, - 0x7f,0x69,0xac,0x2a,0x55,0xf9,0xff,0xff,0xff,0xff,0xff,0x7f,0xa2,0x22,0xf8, - 0xff,0xff,0xff,0xff,0xff,0x53,0x21,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0x15,0xfe,0xff,0xff,0x9f,0x2a,0x95,0x94,0x92,0xf4,0xff,0xff,0xff,0xff,0xff, - 0xff,0x08,0x88,0xfe,0xff,0xff,0xff,0xff,0xff,0x57,0x8b,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xa9,0xfe,0xff,0xff,0x5f,0x52,0xbc,0x52,0x55,0xf5,0xff, - 0xff,0xff,0xff,0xff,0xff,0x21,0x21,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xa1, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x7f,0x0d,0xff,0xff,0xff,0x57,0x15,0x3f, - 0x55,0x49,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xc8,0xff,0xff,0xff,0xff, - 0xff,0xff,0xd7,0x89,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xbf,0xd6,0xff,0xff, - 0xff,0x4b,0x45,0x3f,0x49,0xaa,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf9, - 0xff,0xff,0xff,0xff,0xff,0xff,0xc9,0xe2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0x3f,0x81,0xff,0xff,0xff,0x29,0x11,0x5f,0x28,0x55,0xf5,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0xc8,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0x5f,0xd6,0xff,0xff,0x7f,0xaa,0xc2,0x0f,0x55,0x49,0xea, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa5, - 0xe2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x9f,0xe1,0xff,0xff,0xbf,0x4a,0xd1, - 0x5f,0x48,0xa5,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xe9,0xe0,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x27,0xf4,0xff, - 0xff,0xbf,0x94,0xc4,0x07,0x91,0x2a,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xea,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xaf,0xf1,0xff,0xff,0x9f,0x52,0xe0,0x4b,0x44,0x52,0xe9,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6a,0xe0,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0x4b,0xfc,0xff,0xff,0xab,0x2a,0xf5,0x0f,0x51,0xa5, - 0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0x69,0xe5,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x55,0xf8,0xff,0xff,0x95,0x14, - 0xf0,0x5f,0x84,0x54,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0x75,0xf0,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x13,0xfd, - 0xff,0xff,0xa5,0x42,0xf9,0x7f,0x91,0x4a,0xf5,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0xfa,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0x54,0xfe,0xff,0x7f,0x52,0x12,0xfa,0xff,0x20,0xa5,0xe4,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x34,0xf8,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0x25,0xff,0xff,0xaf,0xaa,0x48,0xfc,0xff,0x0b, - 0x29,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xb5,0xf8,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x52,0xff,0xff,0x2f,0x49, - 0x02,0xfe,0xff,0x43,0xaa,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x3f,0x3a,0xfa,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x4a, - 0xff,0xff,0xa5,0x2a,0xa9,0xff,0xff,0x17,0x25,0xe9,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x9a,0xfc,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0x2a,0xff,0x7f,0x95,0x54,0x80,0xff,0xff,0x07,0xa9,0xea,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x1d,0xfc, - 0xff,0x7f,0xff,0xff,0xff,0xff,0x3f,0xa9,0xfe,0x7f,0xa9,0x12,0xe5,0xff,0xff, - 0x5f,0x4a,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x5f,0xad,0xfe,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x95,0xea,0x97,0x54, - 0x4a,0xf0,0xff,0xff,0x1f,0xa8,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x5f,0x0e,0xfe,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f, - 0x52,0x55,0xa9,0x92,0x02,0xfd,0xff,0xff,0x5f,0x53,0xf5,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x5e,0xfe,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xbf,0x2a,0x49,0x4a,0x55,0x49,0xfc,0xff,0xff,0x3f,0x94,0xf8, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x0f, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4f,0xa5,0xaa,0x92,0xa4,0x20,0xff,0xff, - 0xff,0xbf,0xa4,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x5f,0x57,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f,0x52,0x52,0xaa, - 0x2a,0x0a,0xff,0xff,0xff,0x7f,0x54,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0x07,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xa7,0x94,0x4a,0x55,0x4a,0xa0,0xff,0xff,0xff,0xff,0xa8,0xfa,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x57,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0x2f,0x55,0xa9,0x92,0x12,0xe9,0xff,0xff,0xff,0x7f,0x24, - 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf, - 0x87,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0xa5,0x4a,0xaa,0x44,0xf4,0xff, - 0xff,0xff,0xff,0x55,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xa7,0xab,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xab,0x94,0xa4, - 0x92,0x12,0xf9,0xff,0xff,0xff,0xff,0xa8,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xab,0x83,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0x47,0xa9,0x2a,0x55,0x40,0xfc,0xff,0xff,0xff,0xff,0x25,0xf5,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xd7,0x97,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0x33,0x55,0xa9,0x24,0x15,0xfe,0xff,0xff,0xff,0xff, - 0x95,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xff, - 0x93,0xc3,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0x25,0xa5,0x2a,0x40,0xff, - 0xff,0xff,0xff,0xff,0xa9,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xff, - 0xff,0xff,0xff,0xff,0xe7,0xd5,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4b,0x92, - 0x54,0x92,0xd4,0xff,0xff,0xff,0xff,0xff,0x55,0xf5,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xe9,0xff,0xff,0xff,0xff,0xff,0xd5,0xc1,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0x97,0xaa,0x4a,0x05,0xe2,0xff,0xff,0xff,0xff,0xff,0x25,0xf1,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xfd,0xff,0xff,0xff,0xff,0xd5,0xea,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0x55,0x25,0xa1,0xf0,0xff,0xff,0xff,0xff, - 0xff,0x95,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe8,0xfa,0xff,0xff,0xff, - 0xff,0xea,0xe0,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xa7,0x24,0x59,0x04,0xfa, - 0xff,0xff,0xff,0xff,0xff,0xa9,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe2, - 0xfd,0xff,0xff,0xff,0xff,0xc9,0xe9,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4f, - 0x52,0x05,0xa1,0xfc,0xff,0xff,0xff,0xff,0xff,0xa5,0xfa,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x70,0xf9,0xff,0xff,0xff,0xff,0x74,0xe2,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0x47,0x95,0x92,0x04,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xf8, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe2,0xfa,0xff,0xff,0xff,0xff,0x72,0xe8, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x97,0xaa,0x20,0xd0,0xff,0xff,0xff,0xff, - 0xff,0xff,0x55,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xb8,0xfc,0xff,0xff, - 0xff,0xff,0xea,0xe2,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x07,0x04,0x82,0xc2, - 0xff,0xff,0xff,0xff,0xff,0xff,0x29,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0x71,0xfd,0xff,0xff,0xff,0x7f,0x2a,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0x4f,0x91,0x28,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xfc,0xff,0xff,0xff, - 0xff,0xff,0xff,0x1f,0x54,0xfe,0xff,0xff,0xff,0x7f,0x75,0xf2,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0x27,0x44,0x82,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x29, - 0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xb8,0xfc,0xff,0xff,0xff,0xbf,0x14, - 0xf1,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x0f,0x11,0x20,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x55,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x9a,0xfe,0xff, - 0xff,0xff,0x7f,0x5a,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f,0x40,0x85, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x09,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x4f,0x2d,0xfd,0xff,0xff,0xff,0x9f,0x12,0xf9,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0x3f,0x14,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xfe,0xff,0xff, - 0xff,0xff,0xff,0xff,0x07,0xa6,0xfe,0xff,0xff,0xff,0x5f,0x4d,0xfa,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0x40,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x09,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x4b,0xfe,0xff,0xff,0xff,0xbf, - 0x2c,0xf8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x43,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x57,0xff, - 0xff,0xff,0xff,0x5f,0x0a,0xfe,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x89,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xd5,0xa9,0xff,0xff,0xff,0xff,0xaf,0x5a,0xfc,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa3,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x81,0x95,0xff,0xff,0xff,0xff,0x9f,0x06,0xfd,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xa5,0xff,0xff,0xff,0xff, - 0x2f,0x95,0xfc,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xea, - 0xff,0xff,0xff,0xff,0xaf,0x26,0xfe,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd5,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xf5,0xf4,0xff,0xff,0xff,0xff,0xaf,0x86,0xfe,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc1,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0x70,0xe5,0xff,0xff,0xff,0xff,0x4f,0x2e,0xfe, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xb2,0xfa,0xff,0xff,0xff, - 0xff,0x57,0x83,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x78, - 0xf2,0xff,0xff,0xff,0xff,0xa7,0x22,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x5f,0x5d,0xfd,0xff,0xff,0xff,0xff,0x97,0x87,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x3c,0xfd,0xff,0xff,0xff,0xff,0x53,0xa3, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xac,0xfe,0xff,0xff, - 0xff,0xff,0x57,0x95,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, - 0x9e,0xfe,0xff,0xff,0xff,0xff,0x97,0x81,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xa7,0x57,0xfe,0xff,0xff,0xff,0xff,0xa9,0xa5,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xaf,0xff,0xff,0xff,0xff,0xff,0x4b, - 0x89,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x93,0xff,0xff, - 0xff,0xff,0xff,0x95,0xa2,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x83,0xab,0xff,0xff,0xff,0xff,0xff,0xd3,0xc8,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xff, - 0xff,0xff,0xff,0xff,0xe9,0xa5,0xff,0xff,0xff,0xff,0xff,0xa5,0xe1,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xd5,0xff,0xff,0xff,0xff,0xff, - 0xd5,0xc8,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xea,0xea,0xff, - 0xff,0xff,0xff,0xff,0x14,0xc1,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff, - 0xff,0xe0,0xe4,0xff,0xff,0xff,0xff,0xff,0x65,0xe8,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf, - 0xff,0xff,0xff,0xff,0x3f,0x72,0xe9,0xff,0xff,0xff,0xff,0xff,0x6a,0xe1,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xbf,0xb8,0xfa,0xff,0xff,0xff,0xff, - 0xff,0x52,0xea,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0x1f,0x7a,0xf5, - 0xff,0xff,0xff,0xff,0x7f,0x2a,0xe0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff, - 0xff,0x8f,0x58,0xfa,0xff,0xff,0xff,0xff,0x7f,0x25,0xf5,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xb5,0xff,0xff,0xdf,0xff,0x57,0x5e,0xfd,0xff,0xff,0xff,0xff,0xff,0x34,0xe0, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xca,0xff,0xff,0x8f,0xff,0x07,0xac,0xfc,0xff,0xff,0xff, - 0xff,0x7f,0x2a,0xf5,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd4,0xff,0xff,0x57,0xff,0x2b,0x2d, - 0xfd,0xff,0xff,0xff,0xff,0xff,0xb2,0xf0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xff,0xff, - 0x07,0xff,0x43,0x4a,0xff,0xff,0xff,0xff,0xff,0xbf,0x2a,0xf8,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x3f,0xc5,0xff,0xff,0x2b,0xfe,0x08,0xab,0xfe,0xff,0xff,0xff,0xff,0x7f,0xaa, - 0xf2,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xbf,0xea,0xff,0xff,0x83,0x36,0x20,0x55,0xff,0xff,0xff, - 0xff,0xff,0x3f,0x15,0xf0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xc2,0xff,0xff,0x48,0x4a,0x85, - 0x49,0xff,0xff,0xff,0xff,0xff,0x7f,0x59,0xfa,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xf5,0xff, - 0x7f,0x10,0x29,0x50,0xa5,0xff,0xff,0xff,0xff,0xff,0x3f,0x15,0xf9,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x97,0xe4,0xff,0x7f,0x05,0x95,0x42,0xd5,0xff,0xff,0xff,0xff,0xff,0x7f, - 0x35,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xab,0xea,0xff,0xbf,0xa0,0x24,0xa8,0xd4,0xff,0xff, - 0xff,0xff,0xff,0x7f,0x19,0xf9,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x27,0xe5,0xff,0x3f,0x92,0xaa, - 0x50,0xe9,0xff,0xff,0xff,0xff,0xff,0x9f,0x4a,0xfc,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa9,0xe2, - 0xff,0x9f,0xa0,0xaa,0x2a,0xf5,0xff,0xff,0xff,0xff,0xff,0x5f,0x1a,0xf9,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x95,0xf8,0xff,0x5f,0x4a,0x92,0x4a,0xf5,0xff,0xff,0xff,0xff,0xff, - 0xbf,0x4a,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0x52,0xf2,0xff,0x1f,0x20,0x49,0xa5,0xfa,0xff, - 0xff,0xff,0xff,0xff,0x5f,0x1a,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaa,0xf8,0xff,0x47,0xa9, - 0x2a,0x29,0xf9,0xff,0xff,0xff,0xff,0xff,0xbf,0x0a,0xfc,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x49, - 0xf2,0xff,0x17,0x92,0xaa,0xaa,0xfe,0xff,0xff,0xff,0xff,0xff,0x9f,0xac,0xfe, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x9f,0x2a,0xf8,0xff,0x43,0xa8,0x24,0x25,0xff,0xff,0xff,0xff,0xff, - 0xff,0xaf,0x0a,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x94,0xfa,0xff,0x91,0x54,0xaa,0x52,0xff, - 0xff,0xff,0xff,0xff,0xff,0x2f,0x4d,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x45,0xfc,0xff,0x03, - 0x92,0x52,0xaa,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x06,0xfc,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf, - 0x12,0xfe,0xff,0x50,0xaa,0x2a,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xa5, - 0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xa7,0x44,0xff,0xff,0x0a,0x25,0xa5,0xa4,0xff,0xff,0xff,0xff, - 0xff,0xff,0x97,0x06,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x15,0xff,0xff,0x40,0xa9,0x92,0xea, - 0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x55,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xa1,0xff,0x7f, - 0x92,0x4a,0xaa,0xd4,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x06,0xfc,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x95,0x8a,0xff,0x3f,0x84,0x54,0xa9,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0x2f, - 0x25,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x52,0xe0,0xff,0xbf,0x50,0xa9,0x4a,0xf2,0xff,0xff,0xff, - 0xff,0xff,0xff,0xa7,0x8e,0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa9,0xea,0xff,0x3f,0x24,0x95,0x54, - 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x23,0xfe,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x4a,0xf0,0xff, - 0x9f,0x50,0x69,0x49,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x8b,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xa5,0xf4,0xff,0x0f,0x2d,0x75,0xaa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, - 0xaf,0x03,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x9f,0x14,0xfa,0xff,0x2f,0xa8,0xfa,0x25,0xfd,0xff,0xff, - 0xff,0xff,0xff,0xff,0x97,0xd7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xaa,0xfc,0xff,0x0f,0x4d,0xfd, - 0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x83,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x12,0xfc, - 0xff,0x27,0x92,0xfe,0xcb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd7,0xd7,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x97,0x0a,0xff,0xff,0x83,0x56,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xef,0xc7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xab,0x24,0xff,0xff,0x2b,0xaa,0xfe,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xe7,0xef,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x45,0xff,0xff,0x05,0x95, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0x82, - 0xff,0xff,0x51,0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xa9,0xe8,0xff,0xff,0x85,0xca,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0x52,0xc1,0xff,0xff,0x90,0xd5,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x4d,0xe8,0xff,0xff,0xa5, - 0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x51, - 0xf2,0xff,0x7f,0x40,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x3f,0x95,0xf8,0xff,0x7f,0xa9,0xea,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x15,0xfa,0xff,0x3f,0xa4,0xf4,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xa4,0xfc,0xff,0x7f, - 0x71,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f, - 0x15,0xfe,0xff,0x3f,0x94,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xa7,0x0a,0xff,0xff,0x1f,0x79,0xf2,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0xa4,0xff,0xff,0x5f,0x8c,0xfa,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x53,0x82,0xff,0xff, - 0x1f,0x5c,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xa4,0x92,0xff,0xff,0xbf,0x56,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x9a,0xc4,0xff,0xff,0x0f,0x2e,0xfd,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa2,0xf0,0xff,0xff,0xaf,0xa7,0xfe, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x55,0xe4,0xff, - 0xff,0x0f,0x57,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xbf,0x54,0xf2,0xff,0xff,0x9f,0x4b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x9f,0x92,0xf8,0xff,0xff,0xc7,0xab,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x15,0xfe,0xff,0xff,0x97,0xd7, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa7,0x94,0xfc, - 0xff,0xff,0xc7,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x2f,0x05,0xfe,0xff,0xff,0xcf,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x53,0xa9,0xff,0xff,0xff,0xd3,0xeb,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x05,0xff,0xff,0xff,0xe3, - 0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x54,0xc2, - 0xff,0xff,0xff,0xeb,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x95,0xc8,0xff,0xff,0xff,0xf3,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xd2,0xff,0xff,0xff,0xff,0xf5,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xaa,0xe0,0xff,0xff,0xff, - 0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x49, - 0xf8,0xff,0xff,0xff,0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x9f,0x2a,0xf5,0xff,0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x4a,0xf8,0xff,0xff,0xff,0xff,0xfc,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x14,0xfd,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97, - 0x4a,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xab,0x04,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0x52,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x53,0x85,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x54,0xa2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x4a,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xe0,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x94,0xe4,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x5f,0x55,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xbf,0x12,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x54,0xfa,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x0a,0xfc, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x53,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x97,0x14,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x45,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x54,0x82, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x4a,0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x52,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0xe8,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x24, - 0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0x55,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x24,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x15,0xfe,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f, - 0x49,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x2f,0x95,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x01,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x57,0x81,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x97,0xd4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xe0,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x93,0xf4,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x57,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x2b,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x89,0xfc,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xfc, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x05,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x49,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x22,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x89, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xe9,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, - 0xff,0xff,0xff,0x9f,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, - 0x6f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xbf,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, - 0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, - 0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f}; diff --git a/tests/benchmarks/qimagereader/images/image.pbm b/tests/benchmarks/qimagereader/images/image.pbm deleted file mode 100644 index 67e5efa..0000000 --- a/tests/benchmarks/qimagereader/images/image.pbm +++ /dev/null @@ -1,8 +0,0 @@ -P1 -16 6 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 diff --git a/tests/benchmarks/qimagereader/images/image.pgm b/tests/benchmarks/qimagereader/images/image.pgm deleted file mode 100644 index 443bf40..0000000 --- a/tests/benchmarks/qimagereader/images/image.pgm +++ /dev/null @@ -1,10 +0,0 @@ -P2 -24 7 -15 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 -0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 -0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 -0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 -0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/benchmarks/qimagereader/images/image.png b/tests/benchmarks/qimagereader/images/image.png deleted file mode 100644 index 7d4890a..0000000 Binary files a/tests/benchmarks/qimagereader/images/image.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/image.ppm b/tests/benchmarks/qimagereader/images/image.ppm deleted file mode 100644 index 2a5640e..0000000 --- a/tests/benchmarks/qimagereader/images/image.ppm +++ /dev/null @@ -1,7 +0,0 @@ -P3 -4 4 -15 - 0 0 0 0 0 0 0 0 0 15 0 15 - 0 0 0 0 15 7 0 0 0 0 0 0 - 0 0 0 0 0 0 0 15 7 0 0 0 -15 0 15 0 0 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/tests/benchmarks/qimagereader/images/kollada-noext b/tests/benchmarks/qimagereader/images/kollada-noext deleted file mode 100644 index 2abd4bb..0000000 Binary files a/tests/benchmarks/qimagereader/images/kollada-noext and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/kollada.png b/tests/benchmarks/qimagereader/images/kollada.png deleted file mode 100644 index 2abd4bb..0000000 Binary files a/tests/benchmarks/qimagereader/images/kollada.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/marble.xpm b/tests/benchmarks/qimagereader/images/marble.xpm deleted file mode 100644 index 1c08049..0000000 --- a/tests/benchmarks/qimagereader/images/marble.xpm +++ /dev/null @@ -1,470 +0,0 @@ -/* XPM */ -static const char *marble_xpm[] = { -/* width height num_colors chars_per_pixel */ -" 240 240 223 2", -/* colors */ -".. c #959595", -".# c #c5c5c5", -".a c #adadad", -".b c #dedede", -".c c #b7b7b7", -".d c #d2d2d2", -".e c #bebebe", -".f c #c9c9c9", -".g c #b8b8b8", -".h c #d6d6d6", -".i c #9e9e9e", -".j c #eaeaea", -".k c #b2b2b2", -".l c #cecece", -".m c #a5a5a5", -".n c #e4e4e4", -".o c #c4c4c4", -".p c #d9d9d9", -".q c #b1b1b1", -".r c #d8d8d8", -".s c #e0e0e0", -".t c #d6d6d6", -".u c #b6b6b6", -".v c #bfbfbf", -".w c #cbcbcb", -".x c #a5a5a5", -".y c #d1d1d1", -".z c #cdcdcd", -".A c #aaaaaa", -".B c #9a9a9a", -".C c #dedede", -".D c #aeaeae", -".E c #e6e6e6", -".F c #d3d3d3", -".G c #c8c8c8", -".H c #bababa", -".I c #c4c4c4", -".J c #cccccc", -".K c #bcbcbc", -".L c #f0f0f0", -".M c #b5b5b5", -".N c #e3e3e3", -".O c #c2c2c2", -".P c #adadad", -".Q c #c9c9c9", -".R c #e1e1e1", -".S c #a2a2a2", -".T c #d1d1d1", -".U c #bebebe", -".V c #dbdbdb", -".W c #dbdbdb", -".X c #c8c8c8", -".Y c #b9b9b9", -".Z c #a8a8a8", -".0 c #d3d3d3", -".1 c #9f9f9f", -".2 c #c1c1c1", -".3 c #ebebeb", -".4 c #b4b4b4", -".5 c #d9d9d9", -".6 c #cecece", -".7 c #e8e8e8", -".8 c #d6d6d6", -".9 c #c5c5c5", -"#. c #b0b0b0", -"## c #dadada", -"#a c #c5c5c5", -"#b c #d1d1d1", -"#c c #afafaf", -"#d c #b1b1b1", -"#e c #cbcbcb", -"#f c #c1c1c1", -"#g c #eeeeee", -"#h c #9b9b9b", -"#i c #c6c6c6", -"#j c #c0c0c0", -"#k c #cbcbcb", -"#l c #bdbdbd", -"#m c #a1a1a1", -"#n c #b7b7b7", -"#o c #a7a7a7", -"#p c #e6e6e6", -"#q c #c9c9c9", -"#r c #bbbbbb", -"#s c #e2e2e2", -"#t c #b8b8b8", -"#u c #cdcdcd", -"#v c #d3d3d3", -"#w c #cfcfcf", -"#x c #e0e0e0", -"#y c #d5d5d5", -"#z c #bdbdbd", -"#A c #cecece", -"#B c #c0c0c0", -"#C c #b7b7b7", -"#D c #e5e5e5", -"#E c #c4c4c4", -"#F c #e3e3e3", -"#G c #d3d3d3", -"#H c #dddddd", -"#I c #dddddd", -"#J c #acacac", -"#K c #a3a3a3", -"#L c #eaeaea", -"#M c #e1e1e1", -"#N c #b9b9b9", -"#O c #d5d5d5", -"#P c #bababa", -"#Q c #d7d7d7", -"#R c #b5b5b5", -"#S c #d1d1d1", -"#T c #c6c6c6", -"#U c #dcdcdc", -"#V c #b4b4b4", -"#W c #c6c6c6", -"#X c #a8a8a8", -"#Y c #a0a0a0", -"#Z c #cbcbcb", -"#0 c #bfbfbf", -"#1 c #cbcbcb", -"#2 c #a4a4a4", -"#3 c #c0c0c0", -"#4 c #bbbbbb", -"#5 c #9c9c9c", -"#6 c #a2a2a2", -"#7 c #dcdcdc", -"#8 c #c3c3c3", -"#9 c #9d9d9d", -"a. c #aaaaaa", -"a# c #d5d5d5", -"aa c #eeeeee", -"ab c #b6b6b6", -"ac c #b0b0b0", -"ad c #b3b3b3", -"ae c #c9c9c9", -"af c #e9e9e9", -"ag c #bdbdbd", -"ah c #a0a0a0", -"ai c #b0b0b0", -"aj c #e8e8e8", -"ak c #cacaca", -"al c #c3c3c3", -"am c #dbdbdb", -"an c #d0d0d0", -"ao c #d8d8d8", -"ap c #c7c7c7", -"aq c #dcdcdc", -"ar c #c7c7c7", -"as c #f0f0f0", -"at c #a3a3a3", -"au c #bfbfbf", -"av c #d9d9d9", -"aw c #dfdfdf", -"ax c #d3d3d3", -"ay c #c0c0c0", -"az c #cacaca", -"aA c #b3b3b3", -"aB c #cfcfcf", -"aC c #dadada", -"aD c #b2b2b2", -"aE c #e2e2e2", -"aF c #d7d7d7", -"aG c #c4c4c4", -"aH c #b8b8b8", -"aI c #cdcdcd", -"aJ c #a6a6a6", -"aK c #d2d2d2", -"aL c #cecece", -"aM c #acacac", -"aN c #dfdfdf", -"aO c #d5d5d5", -"aP c #c9c9c9", -"aQ c #bcbcbc", -"aR c #c6c6c6", -"aS c #cdcdcd", -"aT c #bebebe", -"aU c #f2f2f2", -"aV c #b6b6b6", -"aW c #e4e4e4", -"aX c #c3c3c3", -"aY c #e2e2e2", -"aZ c #d2d2d2", -"a0 c #dddddd", -"a1 c #dcdcdc", -"a2 c #ececec", -"a3 c #eaeaea", -"a4 c #cccccc", -"a5 c #c7c7c7", -"a6 c #c2c2c2", -"a7 c #cccccc", -"a8 c #a8a8a8", -"a9 c #e7e7e7", -"b. c #e4e4e4", -"b# c #d9d9d9", -"ba c #bababa", -"bb c #cfcfcf", -"bc c #d4d4d4", -"bd c #d0d0d0", -"be c #aeaeae", -"bf c #e1e1e1", -"bg c #d7d7d7", -"bh c #cfcfcf", -"bi c #b8b8b8", -"bj c #e6e6e6", -"bk c #c5c5c5", -"bl c #e4e4e4", -"bm c #d4d4d4", -"bn c #dfdfdf", -"bo c #dedede", -"bp c #ececec", -"bq c #bababa", -"br c #bcbcbc", -"bs c #b0b0b0", -"bt c #cccccc", -"bu c #a6a6a6", -"bv c #c1c1c1", -"bw c #bcbcbc", -"bx c #ababab", -"by c #d7d7d7", -"bz c #b7b7b7", -"bA c #b2b2b2", -"bB c #b4b4b4", -"bC c #bfbfbf", -/* pixels */ -"aYbla9a9a9.7#D.N#L#La9.7a9#D#D.7#D#D#DaY#x#xa0ama0ama0am#xbnbnbnaYaYaYaYaY#DaYaYaYbn#x#x#xaY.N#Da9a9a9a9a9a9a9a9a9.7a9a9a9#Da9#D#L#L#L#L#L#La2#La2a2a2a2a2a2#ga2#ga2#ga2a2#ga2a2#L#L#L#Lafa9a9a9bl#Dbl#Da9a9a9#L#L#Laf#L#Laf#L#L#L#L#L#L#L#L#L#La2#La2a2a2#La2#L#L#Laf#L#Laf#L#Laf#L#Laf#L#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aj.7.7.7aja9#saw#x#I.N#saY#I.NaY.s#I#x#I#x#I#xaC.CaoamaO.yaB.waz#uaZ.8bc.8.8#Q.y.Q.w#4#4.wa##vaB.Qaz#vaFama0#x#x.N.s.N#D#sa9.7a9.E#D.E#L.7aj.7#Laja9aj.7#L#L#La2.ja2af#Lajafajafaj#Lafafajaf#Lafajaf#L#L#La2a2.j#ga2.jas#gas#g.jas#gasa2#g.j#g.j#g#g#g#g#g.j#g.jas.ja2#gas.ja2.j#g#g", -"as.jas#g#gas.j#ga2as#g#gas.j#g.j#g#g#ga2a2#g#g.j#g.jas#gas.jas#g#gas#gasas#gasasa2#g.jbp#LajafafaYbnaYaYblaYaY#MaY#D#sa9a9.7#L#L#Laj#L#La2afa2#L#L#Laja2#Laf#L#La2.j#L.3aj#La9.7a9a9a9a9.n.7a9a9afaj#La9aj#L.7#L#D.na9#s.naw#x#Ibl.Naw.Naw.NaY#xawaYaw#x#I#xaC#I.8aO.yan.w.G.w#vb#by.8.8bc.ybb.Qay.Y.G#u#1a5.GaBamamaobn.s#Da9.7aY#Da9.7a9.7.7#Da9aj.7af.7af.7#L.7afaj#La2a2a2.j#Laf#Laf#Laf#Laf#La2#La2#La2a2a2.7.j#La2#gaa.jasas#gas.jasasas.j#g.j#gas#gas#gas.jas.j#gas#g#gas#ga2.j#ga2#ga2a2", -"a2#ga2.jas#gasas#gas.j#g#g#gas#g.ja2a2a2.ja2a2#ga2#ga2.jas#gas#gas#gas.j#gas#gas#g.j#ga2bp#L#Laj#L.naY.R#xaYaY#D#Dbl#D.7#saf.7.n#L#L#L#L#Laj#L#Laja9#La9aj#L#L#La2a2a2.j#L#Lajafa9#sa9.7a9a9a9.E#Lafafajafa9.na9aj.na9#s#D.N#IaY#s.sbl.s#D#s#D#s.N#I#x.W.Cavam.5.8aF.0azal#T.w.0.8#v.8byaKbbaIaP#aba#N.O.GazaB.5#xaw.N.NaY#D#D#s.7.n.7#L#La9.7a9#L.7af.E#L.E#L#L#L#L#La2#La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.C.C.C.W#x.W#xamamamaoam.5aoaF#v.y.0#uaB.wal.2ayal.2aya6aTa6alaR.2ayayaT#P#t.K.e.X.GaSaZaBaFb#amaoa0a0bna0aYaYawblbl#sa9bj.n.7#D.7a9bja9#Dafa9afa9bl.Naw.N#U.CaCaFaoamama0aYaY#D#D#Da9#L.7", -"a9a9.na9.7a9a9a9a9#D#D.N#s#DaY.saY#x.C.Ca0aoamao.0aZaBaZaB.0aBa#amb#a0aCaC.pa0a0aob#ama0am.C.Ca0.5b#amaCam.W.C.CaCa0ao.5amaOaF#vaF.8amamama0aqa0aYaw.Naw#D#Da9.7.n.7a9.7.7af.E#L#Da9#Da9#Da9#Da9#Da9#Da9#Da9#Da9a9a9afa9afa9afa9a9a9a9a9a9a9a9a9bl#D#Dbl.N.NaYaYaY.RawbnaY#x#I#xawa0b##Sazbha##vamaqao.Cavamao.5ao.5.8.8aF#v.0.yaZaB.waza7az.G.G#aararar.X#a.Xar#eazazaralalalayayaya6.Ial.XaSaS#va#aFaO.5aC.CaC#xbnaY.N#M#D#D#D.7a9.7.Ea9.7.7.Eaf#La9#D#D.N.NaYbnbnamamb#aoama0aYawblaY#D#D#D.7", -".7a9.7a9a9a9.Ea9bja9#s.NaYaw.NaYa0.Wa0aCamamao.5a7az.waZa#aFaFaFamamaC#xbn#xam.5amamamaoama0aoa0aOaFaoambgamaCam.8aFaOaFaOaFaF#vaFaFaOb#aoamaCamawaY.Naw#D#D.Ea9.7a9.7.n.7.7a9.7#D#D#D#D#D#D#D#D#D#Dbl#D#Mbl#D#Ma9a9a9a9a9a9a9a9.na9a9.na9a9.na9#D#D#D#DblaY.saYaYaYaY#xaY#xaY#xaYbnaObmazaZ#Sa#.8.8.8.5am.8.5.8a##va#.ybbbb.w#uazarar#a#eazaSaz#ua7aZaZaZaZ.Tbm#SbmbmaZan#uaSaz#aalaR.2.IaGaraSaZaBa#aFaoama0aC.R#IawaYbl#D#D#Da9.7.7a9.7.7a9.7af#L.na9#D#s.N.NaYa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#p#p.n#pa9#pa9a9#paf#pa9a9.n#pafafafafafafafa9afa9afa9a9.na9a9a9a9a9#D#D.n#paYaYa0amb#amb#a0a0a0.Ca0#I#xaw#xaY#x#xaCa0aC", -"ama0#xbla9.na9a9bja9#Da9a9ajaf#La2aj#Lafa2#La2#La2a2#La2#La2#La2af#Lafa2#Laf#L#La2a2a2asa2a2a2a2a2#La9blaYaYaYawaYaY#xawaY.N#s#Daja9#Lafajaf#Laf#L.j#La2#La2#La2#La2#La2#L#L#L#L#L#Laf.7a9#D.n#Da9.nblblaYaY#xaC#x#IaY.s#D#sa9.na9a9a9a9a9a9a9a9a9afa9afa9a9#La9afafaj#Lafaf#Lafa2#La2#Lafafaj#La2.naw.CamaC#xaY#D#D#La9a9#sbl.Na9#M#DblaYaYaY#xbla9#p#pa9#pa9#pa9#pa9#p#pa9#p#p#pa9.n#pa9a9a9af#pafa9afa9a9afa9#La9af.7afa9afafa9afa9a9.na9#Dbl#p#pblbn#U.5bg.5a0aoa0a0#Ua0#xbnaYaYaY#U#xbn#xa0", -"amaCaYaYaw#Dbl#sa9#D.7a9.7af#L#Lafaf#L#La2#La2#La2a2a2a2a2a2a2a2#L#L#Lafaja2#L.3a2a2a2#La2a2a2a2#ga9#D#MaYaY#UaY#xaw#Ibl.Naw#D#Dafafaja9#L#Laf#La2#La2a2a2a2a2a2a2.jafa2#Laf#Laf#Laf#La9a9.7#Da9a9a9#sblawaY#x#x#IaY.NaY#D#D#D#D#sbl#s#D#sa9a9.na9.na9a9.nafa9afafafafafafafajafa2#L.3#L#Laja9#Daj#DaY.Ca0aoa0aY#D#Ma9.na9#D#DaYblblblaYaYaYaYaYbl#pa9#pa9#pa9#pa9#p#Ma9bl#p#D#pa9a9#pa9#pa9#pa9#pa9#pa9#paf#pa9afa9afa9afa9afa9a9a9a9a9a9a9#Da9bla9awaYa0a0ama0b#a0a0a0#x#U#x#xaw#xaw#xbn#I#xa0", -"b#b#aCaYaYbl#Dblbja9#D.na9#Lajaf#L#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#L#L#L#L#Lafaja2a2a2a2#L.E#L#La9a9a9.7a9a9a9a9a9.7a9.na9a9a9a9.E#L.7.7#D#s#D#s#Fblbl#M#xbnbg.t.F.t.V.V.VaCa0aY#DaYaYaYaY.Nblbl.na9#p.na9a9#pa9#p#pa9#pa9#pa9#pa9#p#D#pa9#p#pa9afafafaf#Lafafa9af#pa9#pa9afa9afafaf#pa9a9#D#DaYbnbn#xbn#Ua0bna0bg.Va0aYblbl#pa9" -}; diff --git a/tests/benchmarks/qimagereader/images/namedcolors.xpm b/tests/benchmarks/qimagereader/images/namedcolors.xpm deleted file mode 100644 index f6485d5..0000000 --- a/tests/benchmarks/qimagereader/images/namedcolors.xpm +++ /dev/null @@ -1,18 +0,0 @@ -/* XPM */ -static char *xman[] = { -/* width height ncolors chars_per_pixel */ -"8 8 3 1", -/* colors */ -"e g4 black c pale turquoise 4", -"f m white c light golden rod yellow g4 grey", -"g g white c lemon chiffon m black", -/* pixels */ -"eeeeeeee", -"ffffffff", -"gggggggg", -"gggggggg", -"gggggggg", -"gggggggg", -"gggggggg", -"gggggggg" -}; diff --git a/tests/benchmarks/qimagereader/images/negativeheight.bmp b/tests/benchmarks/qimagereader/images/negativeheight.bmp deleted file mode 100644 index 875887a..0000000 Binary files a/tests/benchmarks/qimagereader/images/negativeheight.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/noclearcode.bmp b/tests/benchmarks/qimagereader/images/noclearcode.bmp deleted file mode 100644 index 1a5ca9c..0000000 Binary files a/tests/benchmarks/qimagereader/images/noclearcode.bmp and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/noclearcode.gif b/tests/benchmarks/qimagereader/images/noclearcode.gif deleted file mode 100644 index 27784d6..0000000 Binary files a/tests/benchmarks/qimagereader/images/noclearcode.gif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/nontransparent.xpm b/tests/benchmarks/qimagereader/images/nontransparent.xpm deleted file mode 100644 index 00c21ef..0000000 --- a/tests/benchmarks/qimagereader/images/nontransparent.xpm +++ /dev/null @@ -1,788 +0,0 @@ -/* XPM */ -static char *dummy[]={ -"8 8 777 2", -"#R c #000000", -"fn c #000001", -".e c #000069", -".f c #00006d", -".g c #00006e", -"#d c #0042b4", -"aJ c #010101", -"g0 c #010102", -"dr c #010202", -"gd c #010203", -"#J c #0157bb", -"e. c #020202", -"du c #020304", -"fR c #030303", -"jJ c #040404", -"hf c #040608", -"fE c #040609", -"cO c #04070a", -"k# c #050505", -"gC c #050709", -"ka c #060606", -"br c #06080a", -"dY c #06090d", -"hI c #070707", -"in c #07090b", -"cL c #070a0e", -"cd c #070b0f", -"e0 c #080808", -"gZ c #080b0e", -"eu c #080b0f", -"dz c #080c10", -"hD c #090909", -"fq c #090d11", -"cH c #090e13", -"jB c #0a0a0a", -"#U c #0a0d0f", -"a4 c #0a0d10", -"g3 c #0a0d11", -"fu c #0a0f14", -"cj c #0a1016", -"kb c #0b0b0b", -"#n c #0b0d0f", -"a1 c #0b0e10", -"g8 c #0b0f13", -"f4 c #0b0f14", -"hE c #0c0c0c", -"bf c #0c0f12", -".X c #0c28a0", -"bT c #0d0d0d", -"ax c #0d1014", -"hr c #0d1217", -"dH c #0d141b", -"jy c #0e0e0e", -"aW c #0e1115", -"eH c #0e141b", -"bE c #0f0f0f", -"ar c #0f1317", -"g5 c #0f1419", -"hg c #0f151a", -"fh c #0f151c", -"dJ c #0f171f", -"gI c #101010", -".z c #101094", -"h. c #10161b", -"gm c #10161c", -"eL c #10171f", -"hK c #111111", -"at c #11161b", -"fC c #111820", -"dA c #111922", -"aj c #1163c4", -"bJ c #121212", -"#Z c #12161a", -"ba c #12171c", -"ho c #12181e", -"jK c #131313", -"iq c #13191d", -"cA c #131e2a", -"c7 c #141414", -"dR c #141e29", -"jr c #151515", -"aA c #151a1f", -"hq c #151c23", -"fl c #151e28", -"eV c #151e29", -"d4 c #161616", -"hw c #161e25", -"jk c #171717", -"bs c #171d23", -"g9 c #171f27", -"eC c #17212b", -"b9 c #172432", -"d5 c #181818", -"as c #181e24", -"bn c #181f25", -"bS c #191919", -"gr c #19232d", -"ed c #1a1a1a", -".d c #1a1a6e", -"gB c #1a242e", -"eK c #1a2531", -"dQ c #1a2633", -"hL c #1b1b1b", -"g1 c #1b242d", -"g# c #1b252f", -"eJ c #1b2734", -"d1 c #1b2937", -"bW c #1c1c1c", -"gW c #1c262f", -"ci c #1c2b3b", -"cs c #1c2c3c", -"e# c #1d1d1d", -"#3 c #1d232a", -"f8 c #1d2833", -"fI c #1d2936", -"eO c #1d2a38", -"cw c #1d2e3f", -"jR c #1e1e1e", -"a2 c #1e262e", -"eP c #1e2b39", -"dE c #1e2d3d", -"cF c #1e2f41", -"aO c #1e6ec9", -"c4 c #1f1f1f", -"gx c #1f2a36", -"c# c #1f3043", -"j2 c #202020", -"bk c #202931", -"ht c #202c36", -"eF c #202f3e", -"b7 c #203245", -"cB c #203246", -"hG c #212121", -"aE c #212932", -"bp c #212a32", -"hl c #212d38", -"cc c #213347", -".M c #214eb7", -"hF c #222222", -"#7 c #222a32", -"fw c #223040", -"eU c #223141", -"jC c #232323", -"bb c #232c35", -"ga c #23303d", -"cv c #23364a", -"cn c #23364b", -"jl c #242424", -"gj c #243240", -"cm c #24374c", -"c. c #24384d", -"bF c #252525", -"be c #252f39", -"gt c #253341", -"dU c #253649", -".Y c #256cc9", -"jG c #262626", -"h8 c #26333d", -"hb c #263440", -"gs c #263443", -"cr c #263b51", -"cW c #272727", -"aC c #27313b", -"a9 c #27313c", -"fk c #273748", -"eR c #27384b", -"cq c #273d55", -"jV c #282828", -"#5 c #28313b", -"b0 c #2877ce", -"gL c #292929", -"#Y c #29323c", -"hu c #293744", -"fK c #293a4d", -"jP c #2a2a2a", -"#w c #2a323b", -"bg c #2a3540", -"dF c #2a3f55", -"jn c #2b2b2b", -"a6 c #2b3641", -"jY c #2c2c2c", -"h5 c #2c3b47", -"hp c #2c3c4a", -"gp c #2c3c4d", -"cx c #2c445e", -"bU c #2d2d2d", -"h# c #2d3e4c", -"dS c #2d435b", -"e5 c #2e2e2e", -"cG c #2e4762", -"jF c #2f2f2f", -"aG c #2f3b48", -"gU c #2f3f4e", -"ck c #2f4966", -"j0 c #303030", -"a0 c #303d4a", -"he c #304251", -"cQ c #307ace", -"e4 c #313131", -"ew c #31465d", -"dW c #314862", -"ce c #314b68", -"jm c #323232", -"bm c #323f4d", -"k. c #333333", -"e3 c #343434", -"hi c #344757", -"eT c #344b64", -"b8 c #34506f", -"dj c #347fd1", -"bX c #353535", -"f9 c #35485c", -"ac c #363636", -"#V c #36434f", -"fv c #364c64", -"dV c #36506d", -"c2 c #373737", -"ev c #37506a", -"bI c #383838", -"bw c #384655", -"h4 c #384b5a", -"hk c #384c5d", -"ea c #393939", -"bh c #394857", -"gX c #394d5f", -"#e c #3981d2", -"e6 c #3a3a3a", -"eS c #3a546f", -"em c #3a81d2", -"#F c #3b3b3b", -"eQ c #3b5571", -"dT c #3b5776", -"cI c #3b5c7f", -"gJ c #3c3c3c", -"hX c #3c5060", -"fi c #3c546f", -"gG c #3d3d3d", -"jv c #3e3e3e", -"az c #3e4e5e", -"fL c #3e5772", -"bK c #3f3f3f", -"gD c #3f576f", -"fJ c #3f5874", -"d2 c #3f86d5", -"jx c #404040", -"#8 c #404e5d", -"bv c #405161", -"cf c #406389", -"jL c #414141", -"iG c #415561", -"im c #415663", -"gz c #415971", -"et c #415d7c", -"cz c #41658c", -"f# c #418ad7", -"jT c #424242", -"gy c #425b74", -"fs c #425d7a", -"#K c #4288d4", -"jQ c #434343", -"eX c #438cda", -"j8 c #444444", -".L c #44449a", -"eZ c #454545", -"#s c #455362", -"fx c #45617f", -"cK c #456b94", -"aP c #458cd5", -"ab c #464646", -".n c #46469f", -"aH c #46586a", -"gV c #465f74", -"d0 c #46678c", -"c9 c #474747", -"aF c #47596c", -"a3 c #475a6d", -"ex c #476687", -"jU c #484848", -"by c #485b6e", -"gq c #48627d", -"dI c #486b91", -"cC c #48709b", -"js c #494949", -"#2 c #495a6b", -"ih c #49606f", -"hm c #49637a", -"gk c #49647f", -"j7 c #4a4a4a", -"dt c #4a6e94", -"ak c #4a8dd7", -"b1 c #4a90db", -"c1 c #4b4b4b", -"bx c #4b5f72", -"fr c #4b698a", -"dG c #4b6e95", -"co c #4b75a2", -"fW c #4b91db", -"bD c #4c4c4c", -"hc c #4c687f", -"j6 c #4d4d4d", -"#Q c #4d5f71", -"ik c #4d6676", -"hH c #4e4e4e", -"#0 c #4e5f72", -"aD c #4e6277", -"b. c #4e6377", -"gN c #4e91dc", -"c0 c #4f4f4f", -"bj c #4f6378", -"dZ c #4f759e", -"cD c #4f7aa9", -"hN c #4f8dcd", -"kd c #505050", -"#S c #506275", -"#6 c #506376", -"ge c #506e8c", -"af c #515151", -"b# c #51667b", -"dk c #5195df", -"cT c #525252", -".c c #525280", -"bq c #52677d", -"iH c #526b79", -"fj c #527397", -"eW c #52769d", -"dy c #527aa5", -"hJ c #535353", -"#x c #536476", -"eG c #53789f", -"jM c #545454", -"#r c #546577", -"bz c #546a80", -"dM c #547ca8", -"fP c #5499e2", -"jp c #555555", -"iK c #556f7e", -"bM c #565656", -"fB c #56799f", -"dC c #567fab", -"gE c #569be2", -"cU c #575757", -"h7 c #57748b", -"gc c #577797", -"fN c #577ba1", -"dx c #5780ad", -"cg c #5787bb", -"i4 c #585858", -"iF c #587483", -"hy c #587792", -"g2 c #587893", -"fy c #587ca3", -"eA c #587ea7", -"jW c #595959", -"bu c #597087", -"ia c #5984b2", -"ae c #5a5a5a", -"#t c #5a6c7f", -"bd c #5a7189", -"ij c #5a7789", -"eI c #5a81ab", -"bR c #5b5b5b", -"ch c #5b8dc3", -"en c #5b9be1", -"ke c #5c5c5c", -"cP c #5c8fc5", -"j5 c #5d5d5d", -"iN c #5d7fa0", -"gl c #5d80a3", -"fp c #5d83ac", -"cl c #5d8fc6", -"b2 c #5d9de6", -"c8 c #5e5e5e", -"hh c #5e7f9c", -"hn c #5e809d", -"i3 c #5f5f5f", -"#1 c #5f758c", -"a8 c #5f7890", -"g7 c #5f819e", -"cJ c #5f93cc", -"jz c #606060", -"ct c #6094cd", -"bO c #616161", -"eN c #618cb9", -"jH c #626262", -"iW c #627c8d", -"hd c #6285a3", -"ey c #628dbb", -"dO c #6290c4", -"ca c #6297d1", -"jI c #636363", -"eM c #638fbd", -"jN c #646464", -"fH c #648db9", -"eE c #648fbe", -"cb c #649ad5", -"hA c #64a8e2", -"jw c #656565", -"#k c #65798f", -"fF c #658eba", -"fA c #658fbb", -"fa c #65a4e7", -"b3 c #65a6e8", -"jX c #666666", -"hW c #6688a3", -"gh c #668cb2", -"aI c #6696cb", -"dN c #6697cc", -"bA c #6699ce", -"cu c #669edb", -"#C c #676767", -"f3 c #678db4", -"dl c #67a6eb", -"kc c #686868", -"cS c #696969", -"dK c #699bd2", -"cN c #69a2e0", -"cy c #69a3e1", -"fX c #69a6e8", -"jD c #6a6a6a", -"av c #6a84a1", -"ds c #6a9cd3", -"dL c #6a9cd4", -"jt c #6b6b6b", -"fo c #6b97c6", -"cE c #6ba5e4", -"jS c #6c6c6c", -"aV c #6c88a4", -"ir c #6c8ea4", -"il c #6c8fa5", -"eD c #6c9bce", -"dB c #6c9ed7", -"dq c #6c9fd8", -"cM c #6ca7e7", -"cp c #6ca8e8", -"eo c #6cabed", -"i2 c #6d6d6d", -"#T c #6d869f", -"#W c #6d87a0", -"gY c #6d94b5", -"aa c #6d9bcb", -"eB c #6d9dd0", -"dw c #6da0d9", -"dD c #6da1da", -"b4 c #6dacee", -"h9 c #6dafe2", -"i6 c #6e6e6e", -"bt c #6e8aa7", -"fM c #6e9bcb", -"dP c #6ea3dc", -"b5 c #6eabee", -"jd c #707070", -"ix c #7088a2", -"hx c #7098ba", -"f7 c #7099c3", -"dv c #70a5df", -"b6 c #70adef", -"iy c #70aff1", -"dm c #70aff2", -"jE c #717171", -"#m c #7188a0", -"#u c #7189a1", -"aY c #718eac", -"gO c #71aced", -"jq c #727272", -"gb c #729cc6", -"hO c #72afee", -"ib c #72afef", -"e7 c #737373", -"#y c #738ba4", -"#A c #739eca", -".j c #747474", -"#9 c #748fab", -"hs c #749ec1", -"f6 c #749fca", -".i c #757575", -"#q c #758da6", -"a5 c #7593b1", -"bo c #7594b2", -"ii c #759bb3", -"fb c #75b3f4", -"ep c #75b4f3", -"is c #75b8e2", -"ag c #767676", -"fz c #76a6da", -"ez c #76a9e0", -"dX c #76adeb", -".h c #777777", -".m c #777794", -"iX c #77a6b3", -"dn c #77b1f4", -"gK c #787878", -"#4 c #7894b0", -"fG c #78a9dd", -"j# c #797979", -"bV c #7a7a7a", -"do c #7ab4f4", -"jA c #7b7b7b", -"io c #7ba3bc", -"dp c #7bb5f5", -".k c #7c7c7c", -"bc c #7c9cbd", -"gi c #7caad8", -"aQ c #7cb0e7", -"fY c #7cb8f9", -"iM c #7cbee2", -"j1 c #7d7d7d", -"aX c #7d9ebf", -"fm c #7db0e7", -"j4 c #7e7e7e", -".8 c #7ea5ce", -"#D c #7f7f7f", -"hv c #7facd3", -"gn c #7faedd", -"eb c #808080", -"er c #80bdf9", -"j3 c #818181", -"hz c #81afd6", -"gu c #81b0e0", -"eq c #81bbf9", -"fc c #81bbfc", -"#b c #828282", -"iE c #82aac0", -"i5 c #838383", -"ha c #83b1d9", -"es c #83bcf9", -"ad c #848484", -"go c #84b5e6", -".v c #858585", -"#p c #85a0bc", -"bN c #868686", -"hZ c #86b3d6", -"fD c #86bcf6", -"fO c #86bcf7", -"gP c #86c1ff", -"di c #878787", -"ft c #87bdf8", -"bH c #888888", -"iT c #88cfe2", -"jZ c #898989", -"#z c #89a5c3", -"g. c #89bbee", -"fg c #89c0fc", -"fd c #89c2fd", -"hP c #89c3ff", -"jb c #8a8a8a", -"#o c #8aa6c4", -"jc c #8b8b8b", -".S c #8baccf", -"iI c #8bb6ce", -"al c #8bb9e8", -"hj c #8bbde7", -"gw c #8bbef2", -"ff c #8bc3ff", -"fe c #8bc4ff", -"fZ c #8bc6ff", -"ec c #8c8c8c", -"gv c #8cbff3", -"jO c #8d8d8d", -"a# c #8dadce", -"ic c #8dc7ff", -"#H c #8e8e8e", -"a. c #8eaed0", -"#L c #8ebae8", -"hY c #8ebee3", -"g4 c #8ec1ec", -"iO c #8ecbff", -"ju c #8f8f8f", -"bi c #8fb5da", -"h6 c #8fc0e5", -"f5 c #8fc4f9", -"jf c #909090", -"bl c #90b6dc", -"i1 c #90dfe2", -"bC c #919191", -"aB c #91b5dc", -"aZ c #91b7dd", -"hV c #91c2e8", -"gf c #91c6fc", -"gg c #91c7fd", -"f0 c #91c8ff", -"i7 c #929292", -"gA c #92c8fe", -"iz c #92ccff", -"iU c #939393", -"a7 c #93b9e0", -"f2 c #93c9ff", -"gQ c #93ccff", -"e8 c #949494", -".y c #9494b0", -"h1 c #94c6ec", -"f1 c #94caff", -"j9 c #959595", -"#X c #95b7da", -"cX c #969696", -"ay c #96bbe3", -"#f c #96bde8", -"aR c #96c3ee", -"gR c #96cfff", -".J c #979797", -"hQ c #97cfff", -"fT c #989898", -"#j c #98b6d7", -"#l c #98b7d8", -"iJ c #98c7e1", -"g6 c #98cffd", -"jj c #999999", -"aS c #99c4ee", -"h3 c #99ccf4", -"gS c #99d0ff", -".l c #9a9a9a", -".b c #9a9aa4", -"aw c #9ac1ea", -"gT c #9ad1ff", -"dg c #9b9b9b", -".N c #9bbee8", -"aq c #9bc1eb", -"am c #9bc4ee", -"eg c #9c9c9c", -"au c #9cc3ed", -"ao c #9cc5ee", -"c5 c #9d9d9d", -"aT c #9dc7ef", -"hU c #9dd2fb", -"hR c #9dd3ff", -"dh c #9e9e9e", -"#v c #9ebee0", -".Z c #9ec3e8", -"#M c #9ec3ed", -"#N c #9ec5ed", -"ap c #9ec5ef", -"aU c #9ec7f0", -"h2 c #9ed4fd", -"id c #9ed6ff", -"df c #9f9f9f", -"an c #9fc5ee", -"h0 c #9fd5fe", -"aM c #a0a0a0", -"hT c #a0d6ff", -"jh c #a1a1a1", -"hS c #a1d7ff", -"ji c #a2a2a2", -"#P c #a2c7ed", -"i8 c #a3a3a3", -"#O c #a3c8ed", -"iA c #a3daff", -"j. c #a4a4a4", -"je c #a5a5a5", -"#g c #a5c8ed", -"ip c #a5dafb", -"iv c #a6a6a6", -".F c #a6bed4", -"de c #a7a7a7", -"#h c #a7c9ed", -"if c #a7ddff", -"ie c #a7deff", -"eh c #a8a8a8", -"#i c #a8caee", -"iL c #a8dbf8", -"ig c #a8deff", -"iP c #a8e0ff", -"iY c #a8e2e6", -"hC c #a9a9a9", -".0 c #a9caed", -"#B c #aaaaaa", -"fU c #ababab", -".5 c #abc9e9", -"iB c #abe3ff", -"e2 c #acacac", -".6 c #accaea", -"jo c #adadad", -".1 c #adcbed", -".7 c #adccec", -"iD c #ade2ff", -"iC c #ade3ff", -"fS c #aeaeae", -".4 c #aecded", -"db c #afafaf", -".A c #afbbe7", -".2 c #afccee", -".3 c #afceee", -"d6 c #b0b0b0", -"iQ c #b0e9ff", -"bG c #b1b1b1", -"jg c #b2b2b2", -"#E c #b3b3b3", -".O c #b3d1ed", -"gF c #b4b4b4", -"cY c #b5b5b5", -"iR c #b5ebff", -"hM c #b6b6b6", -"iS c #b6ecff", -"d9 c #b7b7b7", -".U c #b8b8b8", -".u c #b9b9b9", -"dd c #bababa", -".P c #bad4ee", -"bL c #bbbbbb", -".Q c #bbd4ef", -".R c #bbd5f0", -"e9 c #bcbcbc", -"c3 c #bdbdbd", -"f. c #bebebe", -"d8 c #bfbfbf", -".o c #bfc2e8", -"iZ c #bffdff", -"iw c #c0c0c0", -"iV c #c1c1c1", -"i0 c #c1feff", -"ei c #c2c2c2", -"ej c #c3c3c3", -"#a c #c4c4c4", -"el c #c5c5c5", -"d7 c #c6c6c6", -".r c #c6cbda", -"ek c #c7c7c7", -"aN c #c8c8c8", -"#G c #c9c9c9", -"aL c #cacaca", -"ai c #cbcbcb", -".B c #cbddf2", -"bZ c #cccccc", -".C c #cce0f3", -"dc c #cdcdcd", -"ah c #cecece", -"da c #cfcfcf", -".E c #cfe1f3", -".D c #cfe1f4", -"#I c #d0d0d0", -"cV c #d1d1d1", -"fQ c #d2d2d2", -"bB c #d3d3d3", -"#c c #d4d4d4", -"d# c #d5d5d5", -"aK c #d6d6d6", -"cZ c #d7d7d7", -"c6 c #d8d8d8", -"gH c #d9d9d9", -".W c #dadada", -"gM c #dbdbdb", -"bQ c #dcdcdc", -"e1 c #dddddd", -"cR c #dedede", -"d. c #dfdfdf", -"bP c #e0e0e0", -"i# c #e1e1e1", -"bY c #e2e2e2", -".K c #e3e3e3", -"ee c #e4e4e4", -"d3 c #e5e5e5", -"ef c #e6e6e6", -".p c #e6e9f6", -"fV c #e7e7e7", -"eY c #e8e8e8", -".a c #e9e9e9", -".q c #e9edf8", -".V c #eaeaea", -"## c #ebebeb", -"Qt c #ececec", -".w c #ededed", -".x c #eeeeee", -"#. c #efefef", -".# c #f0f0f0", -".9 c #f1f1f1", -".I c #f2f2f2", -".T c #f3f3f3", -"ja c #f4f4f4", -"i9 c #f5f5f5", -"hB c #f6f6f6", -".H c #f7f7f7", -".G c #f8f8f8", -"i. c #f9f9f9", -"kg c #fafafa", -"kf c #fbfbfb", -".t c #fcfcfc", -".s c #fdfdfd", -"it c #fefefe", -"iu c #ffffff", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQt"}; diff --git a/tests/benchmarks/qimagereader/images/pngwithcompressedtext.png b/tests/benchmarks/qimagereader/images/pngwithcompressedtext.png deleted file mode 100644 index 01b2270..0000000 Binary files a/tests/benchmarks/qimagereader/images/pngwithcompressedtext.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/pngwithtext.png b/tests/benchmarks/qimagereader/images/pngwithtext.png deleted file mode 100644 index 5d93799..0000000 Binary files a/tests/benchmarks/qimagereader/images/pngwithtext.png and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif b/tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif deleted file mode 100644 index 78868b0..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif b/tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif deleted file mode 100644 index 107eab7..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif b/tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif deleted file mode 100644 index c314bae..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif b/tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif deleted file mode 100644 index 4f820f6..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif b/tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif deleted file mode 100644 index ddeec38..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif b/tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif deleted file mode 100644 index 50a3024..0000000 Binary files a/tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/runners.ppm b/tests/benchmarks/qimagereader/images/runners.ppm deleted file mode 100644 index fda1c97..0000000 Binary files a/tests/benchmarks/qimagereader/images/runners.ppm and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/task210380.jpg b/tests/benchmarks/qimagereader/images/task210380.jpg deleted file mode 100644 index fd045ea..0000000 Binary files a/tests/benchmarks/qimagereader/images/task210380.jpg and /dev/null differ diff --git a/tests/benchmarks/qimagereader/images/teapot.ppm b/tests/benchmarks/qimagereader/images/teapot.ppm deleted file mode 100644 index b8ab85f..0000000 --- a/tests/benchmarks/qimagereader/images/teapot.ppm +++ /dev/null @@ -1,31 +0,0 @@ -P6 -256 256 -255 -\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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f;HY;HY;GY;GY;GY;GY;,#I=:H82YF?^JA|e[j]n`qctewgyi|k~lnopqssu]v^w^x_y_z_z_{_wwvvv“u“u“t{\{\z[zZyZyYxXpowWvVvVuUuUuTtTlkkkkkksTrTrTrTrTrUrUrVnnnoooppqYqqrrrrqgZ{dYvaXp^WiYU`TRVNOb]aEBH<+[NL^SQWNNKFJ?AI2:HTxTyTyTyUyUyUyUyUy݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇ImImImIm݇݇݇݇އއއއއއއއއއއއއއއއImImImImImImImImImImImImImImImIm'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDhDhDhCh&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBgBgBgBfBfBf&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY;GY3("D::B41RB=YG@wcZ}g\k_nbrdug}aRdTgViXkYqrstp^q^w`x`y`z`za{axxwwwvvvuutssrrqqppoovWnnnnnnmtVsVsVsVsVsWsWsXsXpppsYsYrZr[r\q\p]ttssh\{e[vbYo^XhZV`USXPQNJMECJRS[47A+((MYkMYkMYkMZk(5F(5F(5FOHJT=+YML_SRZQQMGJABI2:H/TUyUyUyUyUyUy݇݇݇݇݇އއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއވވވވވވވImImImImImImImImImImImImވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBg&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY>DM>DM;HY89<:+#9&B52I94ZHAxd[}g^k`ncrey_R}bTeVgXiYk[l\n]o^vvvawaxaybzb{b{axx|a|a|`{`{_{_{^z^uttssrrwZwZvYvYvYuXuXuXuXpppppppqqtZt[s\s\s]r]r^q^p^o^n^l^j^h]{f\ub[n^YgZW_UTWPQOKOEEKST]JNY>=?JJIMYkMYk(5F(5F(5F(5F(5F)5G)5GK=4S<*XMLbWVYPPLGJ@AI/T/TUyUyUyއއއއއއއއއއއވވވވވވވImImImImވވވވވވވވވވވވވވވވވވވވވވވވވImImImImImImImImވވވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}ChChCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCg&J|&J|&J|&J|&J|BgBgBgBfBfBfBfBfBf;HY;HY;HY;HY;HY;HYCIR>DMCIR;HYCIR.$0"8&?*G/V=+w[F{g^kanXMs\Px_S{bU~dWfYhZj\l]m^vwxyyzzzzz{b{b{b{b{a{a{`{`z_z_z^uy]y]x]x\w\w[w[v[v[v[v[rrrsssstuut^s_s_r_r`q`p`wvvu~twd]sb[l^ZeYW]TUUORLJOYYaRU^JOZ>>@!$)RXaMYk39B-3<-3<(5F)5G)5G)5G)5G)5GFDJK9*^K=YONg\\TLMIFJ:>I0T0TImވވވވވވވވވވވވވވވވވImImInInInInInInވވވވވވވވވ߈߈߈߈߈߈߈߈߈߈߈߈߈߈߈InInInInIn߈߈߈߈߈'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DiDiDh'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}ChChChChChCgCgCgCgCgCgCgCgCgCgCg&J}&J}&J}&J}&J|&J|&J|&J|&J|BgBgBgBgBgBfBfEM>EMCIR;HY;HYCIRCIR)6&8&@*H0I1!\B0}_JhTKjM8q[Pt]Sw`U{cW~eYg[i\k^m_vwxyzz{{{{{zdzdzczczcyyy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⌰⌰⌰⌰⌰⌰⌰LpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpۄۄۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅ܅܅GlGl܅܅܅܅܅܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇DhDhDhDh=J[=J[=J[=J[=J[=J[ ->(/7#)2#)2(.7(.7(.7#*2(/7)/8)/8)/8)/8)08*0903:56:88@KBB=;@348*08&(+'(*%%%$$$(((EEE(((&&&">-"bF3oXMs[Ow]Py^PqbpXMdH5R<,Q;, &%%#'-"'-&3DS_qP\nR_p>J\?K]AG@B::@66:-29'),)'%BBBFFFEEE)))))))))&&& @@@FFFACFZ\_[ajagpEQcGRcKTdPWd⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰LpLpLqLqLqLqLqLqLq㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMqMqMqۅۅۅۅۅۅ܅܅܅܅܅܅܅܅܅܅܆HlHlHlHlHl܆܆܆܆܆܆܆܆܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇HlHlHlHlHlHlHl݇݇݇݇݇݇݇݇އއއށ>J\>J\=J[=J[=J[=J[FLU39B#*2(/7)/7)/8$*3$*3$*3)/8)08*09*09*19',5(-5*.6.17338@<=G@BH@BXW]UUXLPWFHKDFHKKKHHH+++%%%%%%$$$###!!!!!!777777777777777777777AAAFFFACFACF\^aeltbhqDQbDQbDQbERcERcERcERcHScLUdRXd|nj⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱MqMqMqMqMqMq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMq܅܅܅܅܅܅܅܅܅܅܆܆܆܆HlHlHlHlHlHlHlHlHl܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇HlHlHlHlHl݇݇݇އއއއއއއއއއށ>J\=J[=J[FLUFLU(/7(/7*08*08%+3$*3$+3$+3*09*09*19&,5&,5'-6).6*/7-18NPURRVXUVc]^f^_[X]\XYTUZLQYKMPFHJ)))(((&&&%%%%%%$$$$$$###!!!!!!!!!777777777BBBEEEACGADGFIL\ckZ`iTZcDQbDQbDQbagpbiqcircirY`hY_hERcERcERcGSdJTdNVdTYeLpLp㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMq㍱㍱㍱䍱䍱䍱䍱䍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲MqMqMqMqMqMqMqMqMqMqMq܅܅܅܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHl݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇HmއއއއއއއއއއއވވވވވށFLUFLUFLU)/8+08+08&+3&+3%+4%+4%+4*19+1:&,5'-5'-6(.6FLTHMTINUKOVOQWSTXYWX`[^lbac]_f_\a_aY\aRX_,.1*,.*+-***((('''&&&%%%%%%$$$$$$$$$###!!!!!!!!!!!!!!!%%%%%%%%%%%%"""""""""KKKJJJFFFGIL]_b^dm\bkV]eDQbEQcEQcEQccirdjsdksektdjsdjscir[ajZ`iOU^ERcERcFRdFRdITdLUdPWeVZeLpLqLqLq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱䍱䍱䍱䍱䍱䍲䍲䍲Mq䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲MrMrMrMrMrMrMrMrMrMr܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇އއއއHmHmHmއއއއވވވވވވވވވވވވށ-18,18',3',4',4&,4%,4+1:,2:'-5DJSEKSEKTFLTFLUHMUINVKOWLPWQSYTUZWWZpjje^`offb\_h`]eaaCCG8;A27?-/2+-/.+)******)))((('''&&&&&&%%%%%%$$$$$$$$$$$$$$$$$$######???EEEEEEEEE((((((###&&&%%%HJMHJMHJMHJM_en]dlZ`i_enEQcEQcEQcEQcbhqektflufluflufluektektdksdjscjr\ckQW`[ajZaiOU^FRdFRdFRdHSdKUdNVeRXeX\fLqMqMqMqMq㍱㍱㍱㍱㍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲MrMrMrMrMr䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲厲厲厲厲厲厲厲厲NrNrNrNrNrNrNrNr܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇އއއއއއއއHmHmHmHmImImImވވވވވވވވވވވވވވވނPT[KOVJOV(-4(-4'-5'-5JOXEKSEKSEKTFLTFLTGMUGMUHNVIOWKPWLQXMRYPTZTV[\]a_^asljd^azporjkE@CLEBIEFEDG29A28A17@135,.1+-0+,/./1..0'),)))++++++++++++***FFFFFFACFACFEEEACFACFJLOJLOKQZ_en]clY_hU[dEQcEQcEQcEQcEQcagp[aj\bk\bkgnvgnvgmvgmvfluflueltektdksdjscjrcirTZcSYbRYaRXaQW`[bj[ajZ`iFSdFSdGSdJTdLVePXeTZfZ]fMqMqMqMqMqMqMq䍲䍲䍲䍲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲NrNrNrNrNrNrNrNrNr厲厲厲厳厳厳厳厳厳厳厳厳厳厳厳厳厳厳厳右右右右右右右NrNrNrNrNr右冪܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇އއއއއއއއއއއއImImImImImImImImImImވވވވވވވވވ߈߈߈߈߈߈߂LPVLPWKPWFLTFLTFLUGMUGMUHMVHNVINWIOWKPXLQYMRYNSZTX`X[a[]b]^c__ccacib`JDGi__aYYPJLD@C=;AKEDTQR@?A>>A;/5>.4=-4 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef QMap QStringMap; -typedef QList QIntList; -Q_DECLARE_METATYPE(QImage) -Q_DECLARE_METATYPE(QRect) -Q_DECLARE_METATYPE(QSize) -Q_DECLARE_METATYPE(QColor) -Q_DECLARE_METATYPE(QStringMap) -Q_DECLARE_METATYPE(QIntList) -Q_DECLARE_METATYPE(QIODevice *) - -//TESTED_FILES= - -class tst_QImageReader : public QObject -{ - Q_OBJECT - -public: - tst_QImageReader(); - virtual ~tst_QImageReader(); - -public slots: - void init(); - void cleanup(); - -private slots: - void readImage_data(); - void readImage(); - - void setScaledSize_data(); - void setScaledSize(); - - void setClipRect_data(); - void setClipRect(); - - void setScaledClipRect_data(); - void setScaledClipRect(); - -private: - QList< QPair > images; // filename, format -}; - -tst_QImageReader::tst_QImageReader() -{ - images << QPair(QLatin1String("colorful.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("font.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("crash-signed-char.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("4bpp-rle.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("tst7.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("16bpp.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("negativeheight.bmp"), QByteArray("bmp")); - images << QPair(QLatin1String("marble.xpm"), QByteArray("xpm")); - images << QPair(QLatin1String("kollada.png"), QByteArray("png")); - images << QPair(QLatin1String("teapot.ppm"), QByteArray("ppm")); - images << QPair(QLatin1String("runners.ppm"), QByteArray("ppm")); - images << QPair(QLatin1String("test.ppm"), QByteArray("ppm")); - images << QPair(QLatin1String("gnus.xbm"), QByteArray("xbm")); -#if defined QTEST_HAVE_JPEG - images << QPair(QLatin1String("beavis.jpg"), QByteArray("jpeg")); - images << QPair(QLatin1String("YCbCr_cmyk.jpg"), QByteArray("jpeg")); - images << QPair(QLatin1String("YCbCr_rgb.jpg"), QByteArray("jpeg")); - images << QPair(QLatin1String("task210380.jpg"), QByteArray("jpeg")); -#endif -#if defined QTEST_HAVE_GIF - images << QPair(QLatin1String("earth.gif"), QByteArray("gif")); - images << QPair(QLatin1String("trolltech.gif"), QByteArray("gif")); -#endif -#if defined QTEST_HAVE_MNG - images << QPair(QLatin1String("ball.mng"), QByteArray("mng")); - images << QPair(QLatin1String("fire.mng"), QByteArray("mng")); -#endif -} - -tst_QImageReader::~tst_QImageReader() -{ -} - -void tst_QImageReader::init() -{ -} - -void tst_QImageReader::cleanup() -{ -} - -void tst_QImageReader::readImage_data() -{ - QTest::addColumn("fileName"); - QTest::addColumn("format"); - - for (int i = 0; i < images.size(); ++i) { - const QString file = images[i].first; - const QByteArray format = images[i].second; - QTest::newRow(qPrintable(file)) << file << format; - } -} - -void tst_QImageReader::readImage() -{ - QFETCH(QString, fileName); - QFETCH(QByteArray, format); - - QBENCHMARK { - QImageReader io("images/" + fileName, format); - QImage image = io.read(); - QVERIFY(!image.isNull()); - } -} - -void tst_QImageReader::setScaledSize_data() -{ - QTest::addColumn("fileName"); - QTest::addColumn("format"); - QTest::addColumn("newSize"); - - for (int i = 0; i < images.size(); ++i) { - const QString file = images[i].first; - const QByteArray format = images[i].second; - QSize size(200, 200); - if (file == QLatin1String("teapot")) - size = QSize(400, 400); - else if (file == QLatin1String("test.ppm")) - size = QSize(10, 10); - QTest::newRow(qPrintable(file)) << file << format << size; - } -} - -void tst_QImageReader::setScaledSize() -{ - QFETCH(QString, fileName); - QFETCH(QSize, newSize); - QFETCH(QByteArray, format); - - QBENCHMARK { - QImageReader reader("images/" + fileName, format); - reader.setScaledSize(newSize); - QImage image = reader.read(); - QCOMPARE(image.size(), newSize); - } -} - -void tst_QImageReader::setClipRect_data() -{ - QTest::addColumn("fileName"); - QTest::addColumn("format"); - QTest::addColumn("newRect"); - - for (int i = 0; i < images.size(); ++i) { - const QString file = images[i].first; - const QByteArray format = images[i].second; - QTest::newRow(qPrintable(file)) << file << format << QRect(0, 0, 50, 50); - } -} - -void tst_QImageReader::setClipRect() -{ - QFETCH(QString, fileName); - QFETCH(QRect, newRect); - QFETCH(QByteArray, format); - - QBENCHMARK { - QImageReader reader("images/" + fileName, format); - reader.setClipRect(newRect); - QImage image = reader.read(); - QCOMPARE(image.rect(), newRect); - } -} - -void tst_QImageReader::setScaledClipRect_data() -{ - setClipRect_data(); -} - -void tst_QImageReader::setScaledClipRect() -{ - QFETCH(QString, fileName); - QFETCH(QRect, newRect); - QFETCH(QByteArray, format); - - QBENCHMARK { - QImageReader reader("images/" + fileName, format); - reader.setScaledSize(QSize(300, 300)); - reader.setScaledClipRect(newRect); - QImage image = reader.read(); - QCOMPARE(image.rect(), newRect); - } -} - -QTEST_MAIN(tst_QImageReader) -#include "tst_qimagereader.moc" diff --git a/tests/benchmarks/qiodevice/main.cpp b/tests/benchmarks/qiodevice/main.cpp deleted file mode 100644 index 4af697c..0000000 --- a/tests/benchmarks/qiodevice/main.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include - -#include - - -class tst_qiodevice : public QObject -{ - Q_OBJECT -private slots: - void read_old(); - void read_old_data() { read_data(); } - //void read_new(); - //void read_new_data() { read_data(); } -private: - void read_data(); -}; - - -void tst_qiodevice::read_data() -{ - QTest::addColumn("size"); - QTest::newRow("10k") << qint64(10 * 1024); - QTest::newRow("100k") << qint64(100 * 1024); - QTest::newRow("1000k") << qint64(1000 * 1024); - QTest::newRow("10000k") << qint64(10000 * 1024); -#ifndef Q_OS_SYMBIAN // Symbian devices don't (yet) have enough available RAM to run these - QTest::newRow("100000k") << qint64(100000 * 1024); - QTest::newRow("1000000k") << qint64(1000000 * 1024); -#endif -} - -void tst_qiodevice::read_old() -{ - QFETCH(qint64, size); - - QString name = "tmp" + QString::number(size); - - { - QFile file(name); - file.open(QIODevice::WriteOnly); - file.seek(size); - file.write("x", 1); - file.close(); - } - - QBENCHMARK { - QFile file(name); - file.open(QIODevice::ReadOnly); - QByteArray ba; - qint64 s = size - 1024; - file.seek(512); - ba = file.read(s); // crash happens during this read / assignment operation - } - - { - QFile file(name); - file.remove(); - } -} - - -QTEST_MAIN(tst_qiodevice) - -#include "main.moc" diff --git a/tests/benchmarks/qiodevice/qiodevice.pro b/tests/benchmarks/qiodevice/qiodevice.pro deleted file mode 100755 index 749a4d6..0000000 --- a/tests/benchmarks/qiodevice/qiodevice.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qiodevice -TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qmatrix4x4/qmatrix4x4.pro b/tests/benchmarks/qmatrix4x4/qmatrix4x4.pro deleted file mode 100644 index e82d9de..0000000 --- a/tests/benchmarks/qmatrix4x4/qmatrix4x4.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qmatrix4x4 - -SOURCES += tst_qmatrix4x4.cpp - diff --git a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp deleted file mode 100644 index e962198..0000000 --- a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp +++ /dev/null @@ -1,672 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtOpenGL module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -class tst_QMatrix4x4 : public QObject -{ - Q_OBJECT -public: - tst_QMatrix4x4() {} - ~tst_QMatrix4x4() {} - -private slots: - void multiply_data(); - void multiply(); - - void multiplyInPlace_data(); - void multiplyInPlace(); - - void multiplyDirect_data(); - void multiplyDirect(); - - void mapVector3D_data(); - void mapVector3D(); - - void mapVector2D_data(); - void mapVector2D(); - - void mapVectorDirect_data(); - void mapVectorDirect(); - - void compareTranslate_data(); - void compareTranslate(); - - void compareTranslateAfterScale_data(); - void compareTranslateAfterScale(); - - void compareTranslateAfterRotate_data(); - void compareTranslateAfterRotate(); - - void compareScale_data(); - void compareScale(); - - void compareScaleAfterTranslate_data(); - void compareScaleAfterTranslate(); - - void compareScaleAfterRotate_data(); - void compareScaleAfterRotate(); - - void compareRotate_data(); - void compareRotate(); - - void compareRotateAfterTranslate_data(); - void compareRotateAfterTranslate(); - - void compareRotateAfterScale_data(); - void compareRotateAfterScale(); -}; - -static qreal const generalValues[16] = - {1.0f, 2.0f, 3.0f, 4.0f, - 5.0f, 6.0f, 7.0f, 8.0f, - 9.0f, 10.0f, 11.0f, 12.0f, - 13.0f, 14.0f, 15.0f, 16.0f}; - -void tst_QMatrix4x4::multiply_data() -{ - QTest::addColumn("m1"); - QTest::addColumn("m2"); - - QTest::newRow("identity * identity") - << QMatrix4x4() << QMatrix4x4(); - QTest::newRow("identity * general") - << QMatrix4x4() << QMatrix4x4(generalValues); - QTest::newRow("general * identity") - << QMatrix4x4(generalValues) << QMatrix4x4(); - QTest::newRow("general * general") - << QMatrix4x4(generalValues) << QMatrix4x4(generalValues); -} - -QMatrix4x4 mresult; - -void tst_QMatrix4x4::multiply() -{ - QFETCH(QMatrix4x4, m1); - QFETCH(QMatrix4x4, m2); - - QMatrix4x4 m3; - - QBENCHMARK { - m3 = m1 * m2; - } - - // Force the result to be stored so the compiler doesn't - // optimize away the contents of the benchmark loop. - mresult = m3; -} - -void tst_QMatrix4x4::multiplyInPlace_data() -{ - multiply_data(); -} - -void tst_QMatrix4x4::multiplyInPlace() -{ - QFETCH(QMatrix4x4, m1); - QFETCH(QMatrix4x4, m2); - - QMatrix4x4 m3; - - QBENCHMARK { - m3 = m1; - m3 *= m2; - } - - // Force the result to be stored so the compiler doesn't - // optimize away the contents of the benchmark loop. - mresult = m3; -} - -// Use a direct naive multiplication algorithm. This is used -// to compare against the optimized routines to see if they are -// actually faster than the naive implementation. -void tst_QMatrix4x4::multiplyDirect_data() -{ - multiply_data(); -} -void tst_QMatrix4x4::multiplyDirect() -{ - QFETCH(QMatrix4x4, m1); - QFETCH(QMatrix4x4, m2); - - QMatrix4x4 m3; - - const qreal *m1data = m1.constData(); - const qreal *m2data = m2.constData(); - qreal *m3data = m3.data(); - - QBENCHMARK { - for (int row = 0; row < 4; ++row) { - for (int col = 0; col < 4; ++col) { - m3data[col * 4 + row] = 0.0f; - for (int j = 0; j < 4; ++j) { - m3data[col * 4 + row] += - m1data[j * 4 + row] * m2data[col * 4 + j]; - } - } - } - } -} - -QVector3D vresult; - -void tst_QMatrix4x4::mapVector3D_data() -{ - QTest::addColumn("m1"); - - QTest::newRow("identity") << QMatrix4x4(); - QTest::newRow("general") << QMatrix4x4(generalValues); - - QMatrix4x4 t1; - t1.translate(-100.5f, 64.0f, 75.25f); - QTest::newRow("translate3D") << t1; - - QMatrix4x4 t2; - t2.translate(-100.5f, 64.0f); - QTest::newRow("translate2D") << t2; - - QMatrix4x4 s1; - s1.scale(-100.5f, 64.0f, 75.25f); - QTest::newRow("scale3D") << s1; - - QMatrix4x4 s2; - s2.scale(-100.5f, 64.0f); - QTest::newRow("scale2D") << s2; -} -void tst_QMatrix4x4::mapVector3D() -{ - QFETCH(QMatrix4x4, m1); - - QVector3D v(10.5f, -2.0f, 3.0f); - QVector3D result; - - m1.optimize(); - - QBENCHMARK { - result = m1 * v; - } - - // Force the result to be stored so the compiler doesn't - // optimize away the contents of the benchmark loop. - vresult = result; -} - -QPointF vresult2; - -void tst_QMatrix4x4::mapVector2D_data() -{ - mapVector3D_data(); -} -void tst_QMatrix4x4::mapVector2D() -{ - QFETCH(QMatrix4x4, m1); - - QPointF v(10.5f, -2.0f); - QPointF result; - - m1.optimize(); - - QBENCHMARK { - result = m1 * v; - } - - // Force the result to be stored so the compiler doesn't - // optimize away the contents of the benchmark loop. - vresult2 = result; -} - -// Use a direct naive multiplication algorithm. This is used -// to compare against the optimized routines to see if they are -// actually faster than the naive implementation. -void tst_QMatrix4x4::mapVectorDirect_data() -{ - mapVector3D_data(); -} -void tst_QMatrix4x4::mapVectorDirect() -{ - QFETCH(QMatrix4x4, m1); - - const qreal *m1data = m1.constData(); - qreal v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; - qreal result[4]; - - QBENCHMARK { - for (int row = 0; row < 4; ++row) { - result[row] = 0.0f; - for (int col = 0; col < 4; ++col) { - result[row] += m1data[col * 4 + row] * v[col]; - } - } - result[0] /= result[3]; - result[1] /= result[3]; - result[2] /= result[3]; - } -} - -// Compare the performance of QTransform::translate() to -// QMatrix4x4::translate(). -void tst_QMatrix4x4::compareTranslate_data() -{ - QTest::addColumn("useQTransform"); - QTest::addColumn("translation"); - - QTest::newRow("QTransform::translate(0, 0, 0)") - << true << QVector3D(0, 0, 0); - QTest::newRow("QMatrix4x4::translate(0, 0, 0)") - << false << QVector3D(0, 0, 0); - - QTest::newRow("QTransform::translate(1, 2, 0)") - << true << QVector3D(1, 2, 0); - QTest::newRow("QMatrix4x4::translate(1, 2, 0)") - << false << QVector3D(1, 2, 0); - - QTest::newRow("QTransform::translate(1, 2, 4)") - << true << QVector3D(1, 2, 4); - QTest::newRow("QMatrix4x4::translate(1, 2, 4)") - << false << QVector3D(1, 2, 4); -} -void tst_QMatrix4x4::compareTranslate() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, translation); - - qreal x = translation.x(); - qreal y = translation.y(); - qreal z = translation.z(); - - if (useQTransform) { - QTransform t; - QBENCHMARK { - t.translate(x, y); - } - } else if (z == 0.0f) { - QMatrix4x4 m; - QBENCHMARK { - m.translate(x, y); - } - } else { - QMatrix4x4 m; - QBENCHMARK { - m.translate(x, y, z); - } - } -} - -// Compare the performance of QTransform::translate() to -// QMatrix4x4::translate() after priming the matrix with a scale(). -void tst_QMatrix4x4::compareTranslateAfterScale_data() -{ - compareTranslate_data(); -} -void tst_QMatrix4x4::compareTranslateAfterScale() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, translation); - - qreal x = translation.x(); - qreal y = translation.y(); - qreal z = translation.z(); - - if (useQTransform) { - QTransform t; - t.scale(3, 4); - QBENCHMARK { - t.translate(x, y); - } - } else if (z == 0.0f) { - QMatrix4x4 m; - m.scale(3, 4); - QBENCHMARK { - m.translate(x, y); - } - } else { - QMatrix4x4 m; - m.scale(3, 4, 5); - QBENCHMARK { - m.translate(x, y, z); - } - } -} - -// Compare the performance of QTransform::translate() to -// QMatrix4x4::translate() after priming the matrix with a rotate(). -void tst_QMatrix4x4::compareTranslateAfterRotate_data() -{ - compareTranslate_data(); -} -void tst_QMatrix4x4::compareTranslateAfterRotate() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, translation); - - qreal x = translation.x(); - qreal y = translation.y(); - qreal z = translation.z(); - - if (useQTransform) { - QTransform t; - t.rotate(45.0f); - QBENCHMARK { - t.translate(x, y); - } - } else if (z == 0.0f) { - QMatrix4x4 m; - m.rotate(45.0f, 0, 0, 1); - QBENCHMARK { - m.translate(x, y); - } - } else { - QMatrix4x4 m; - m.rotate(45.0f, 0, 0, 1); - QBENCHMARK { - m.translate(x, y, z); - } - } -} - -// Compare the performance of QTransform::scale() to -// QMatrix4x4::scale(). -void tst_QMatrix4x4::compareScale_data() -{ - QTest::addColumn("useQTransform"); - QTest::addColumn("scale"); - - QTest::newRow("QTransform::scale(1, 1, 1)") - << true << QVector3D(1, 1, 1); - QTest::newRow("QMatrix4x4::scale(1, 1, 1)") - << false << QVector3D(1, 1, 1); - - QTest::newRow("QTransform::scale(3, 6, 1)") - << true << QVector3D(3, 6, 1); - QTest::newRow("QMatrix4x4::scale(3, 6, 1)") - << false << QVector3D(3, 6, 1); - - QTest::newRow("QTransform::scale(3, 6, 4)") - << true << QVector3D(3, 6, 4); - QTest::newRow("QMatrix4x4::scale(3, 6, 4)") - << false << QVector3D(3, 6, 4); -} -void tst_QMatrix4x4::compareScale() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, scale); - - qreal x = scale.x(); - qreal y = scale.y(); - qreal z = scale.z(); - - if (useQTransform) { - QTransform t; - QBENCHMARK { - t.scale(x, y); - } - } else if (z == 1.0f) { - QMatrix4x4 m; - QBENCHMARK { - m.scale(x, y); - } - } else { - QMatrix4x4 m; - QBENCHMARK { - m.scale(x, y, z); - } - } -} - -// Compare the performance of QTransform::scale() to -// QMatrix4x4::scale() after priming the matrix with a translate(). -void tst_QMatrix4x4::compareScaleAfterTranslate_data() -{ - compareScale_data(); -} -void tst_QMatrix4x4::compareScaleAfterTranslate() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, scale); - - qreal x = scale.x(); - qreal y = scale.y(); - qreal z = scale.z(); - - if (useQTransform) { - QTransform t; - t.translate(20, 34); - QBENCHMARK { - t.scale(x, y); - } - } else if (z == 1.0f) { - QMatrix4x4 m; - m.translate(20, 34); - QBENCHMARK { - m.scale(x, y); - } - } else { - QMatrix4x4 m; - m.translate(20, 34, 42); - QBENCHMARK { - m.scale(x, y, z); - } - } -} - -// Compare the performance of QTransform::scale() to -// QMatrix4x4::scale() after priming the matrix with a rotate(). -void tst_QMatrix4x4::compareScaleAfterRotate_data() -{ - compareScale_data(); -} -void tst_QMatrix4x4::compareScaleAfterRotate() -{ - QFETCH(bool, useQTransform); - QFETCH(QVector3D, scale); - - qreal x = scale.x(); - qreal y = scale.y(); - qreal z = scale.z(); - - if (useQTransform) { - QTransform t; - t.rotate(45.0f); - QBENCHMARK { - t.scale(x, y); - } - } else if (z == 1.0f) { - QMatrix4x4 m; - m.rotate(45.0f, 0, 0, 1); - QBENCHMARK { - m.scale(x, y); - } - } else { - QMatrix4x4 m; - m.rotate(45.0f, 0, 0, 1); - QBENCHMARK { - m.scale(x, y, z); - } - } -} - -// Compare the performance of QTransform::rotate() to -// QMatrix4x4::rotate(). -void tst_QMatrix4x4::compareRotate_data() -{ - QTest::addColumn("useQTransform"); - QTest::addColumn("angle"); - QTest::addColumn("rotation"); - QTest::addColumn("axis"); - - QTest::newRow("QTransform::rotate(0, ZAxis)") - << true << qreal(0.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - QTest::newRow("QMatrix4x4::rotate(0, ZAxis)") - << false << qreal(0.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - - QTest::newRow("QTransform::rotate(45, ZAxis)") - << true << qreal(45.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - QTest::newRow("QMatrix4x4::rotate(45, ZAxis)") - << false << qreal(45.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - - QTest::newRow("QTransform::rotate(90, ZAxis)") - << true << qreal(90.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - QTest::newRow("QMatrix4x4::rotate(90, ZAxis)") - << false << qreal(90.0f) << QVector3D(0, 0, 1) << int(Qt::ZAxis); - - QTest::newRow("QTransform::rotate(0, YAxis)") - << true << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - QTest::newRow("QMatrix4x4::rotate(0, YAxis)") - << false << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - - QTest::newRow("QTransform::rotate(45, YAxis)") - << true << qreal(45.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - QTest::newRow("QMatrix4x4::rotate(45, YAxis)") - << false << qreal(45.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - - QTest::newRow("QTransform::rotate(90, YAxis)") - << true << qreal(90.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - QTest::newRow("QMatrix4x4::rotate(90, YAxis)") - << false << qreal(90.0f) << QVector3D(0, 1, 0) << int(Qt::YAxis); - - QTest::newRow("QTransform::rotate(0, XAxis)") - << true << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::XAxis); - QTest::newRow("QMatrix4x4::rotate(0, XAxis)") - << false << qreal(0.0f) << QVector3D(0, 1, 0) << int(Qt::XAxis); - - QTest::newRow("QTransform::rotate(45, XAxis)") - << true << qreal(45.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); - QTest::newRow("QMatrix4x4::rotate(45, XAxis)") - << false << qreal(45.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); - - QTest::newRow("QTransform::rotate(90, XAxis)") - << true << qreal(90.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); - QTest::newRow("QMatrix4x4::rotate(90, XAxis)") - << false << qreal(90.0f) << QVector3D(1, 0, 0) << int(Qt::XAxis); -} -void tst_QMatrix4x4::compareRotate() -{ - QFETCH(bool, useQTransform); - QFETCH(qreal, angle); - QFETCH(QVector3D, rotation); - QFETCH(int, axis); - - qreal x = rotation.x(); - qreal y = rotation.y(); - qreal z = rotation.z(); - - if (useQTransform) { - QTransform t; - QBENCHMARK { - t.rotate(angle, Qt::Axis(axis)); - } - } else { - QMatrix4x4 m; - QBENCHMARK { - m.rotate(angle, x, y, z); - } - } -} - -// Compare the performance of QTransform::rotate() to -// QMatrix4x4::rotate() after priming the matrix with a translate(). -void tst_QMatrix4x4::compareRotateAfterTranslate_data() -{ - compareRotate_data(); -} -void tst_QMatrix4x4::compareRotateAfterTranslate() -{ - QFETCH(bool, useQTransform); - QFETCH(qreal, angle); - QFETCH(QVector3D, rotation); - QFETCH(int, axis); - - qreal x = rotation.x(); - qreal y = rotation.y(); - qreal z = rotation.z(); - - if (useQTransform) { - QTransform t; - t.translate(3, 4); - QBENCHMARK { - t.rotate(angle, Qt::Axis(axis)); - } - } else { - QMatrix4x4 m; - m.translate(3, 4, 5); - QBENCHMARK { - m.rotate(angle, x, y, z); - } - } -} - -// Compare the performance of QTransform::rotate() to -// QMatrix4x4::rotate() after priming the matrix with a scale(). -void tst_QMatrix4x4::compareRotateAfterScale_data() -{ - compareRotate_data(); -} -void tst_QMatrix4x4::compareRotateAfterScale() -{ - QFETCH(bool, useQTransform); - QFETCH(qreal, angle); - QFETCH(QVector3D, rotation); - QFETCH(int, axis); - - qreal x = rotation.x(); - qreal y = rotation.y(); - qreal z = rotation.z(); - - if (useQTransform) { - QTransform t; - t.scale(3, 4); - QBENCHMARK { - t.rotate(angle, Qt::Axis(axis)); - } - } else { - QMatrix4x4 m; - m.scale(3, 4, 5); - QBENCHMARK { - m.rotate(angle, x, y, z); - } - } -} - -QTEST_MAIN(tst_QMatrix4x4) - -#include "tst_qmatrix4x4.moc" diff --git a/tests/benchmarks/qmetaobject/main.cpp b/tests/benchmarks/qmetaobject/main.cpp deleted file mode 100644 index c375a16..0000000 --- a/tests/benchmarks/qmetaobject/main.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include - -class tst_qmetaobject: public QObject -{ -Q_OBJECT -private slots: - void initTestCase(); - void cleanupTestCase(); - - void indexOfProperty_data(); - void indexOfProperty(); - void indexOfMethod_data(); - void indexOfMethod(); - void indexOfSignal_data(); - void indexOfSignal(); - void indexOfSlot_data(); - void indexOfSlot(); -}; - -void tst_qmetaobject::initTestCase() -{ -} - -void tst_qmetaobject::cleanupTestCase() -{ -} - -void tst_qmetaobject::indexOfProperty_data() -{ - QTest::addColumn("name"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->propertyCount(); ++i) { - QMetaProperty prop = mo->property(i); - QTest::newRow(prop.name()) << QByteArray(prop.name()); - } -} - -void tst_qmetaobject::indexOfProperty() -{ - QFETCH(QByteArray, name); - const char *p = name.constData(); - const QMetaObject *mo = &QTreeView::staticMetaObject; - QBENCHMARK { - (void)mo->indexOfProperty(p); - } -} - -void tst_qmetaobject::indexOfMethod_data() -{ - QTest::addColumn("method"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->methodCount(); ++i) { - QMetaMethod method = mo->method(i); - QByteArray sig = method.signature(); - QTest::newRow(sig) << sig; - } -} - -void tst_qmetaobject::indexOfMethod() -{ - QFETCH(QByteArray, method); - const char *p = method.constData(); - const QMetaObject *mo = &QTreeView::staticMetaObject; - QBENCHMARK { - (void)mo->indexOfMethod(p); - } -} - -void tst_qmetaobject::indexOfSignal_data() -{ - QTest::addColumn("signal"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->methodCount(); ++i) { - QMetaMethod method = mo->method(i); - if (method.methodType() != QMetaMethod::Signal) - continue; - QByteArray sig = method.signature(); - QTest::newRow(sig) << sig; - } -} - -void tst_qmetaobject::indexOfSignal() -{ - QFETCH(QByteArray, signal); - const char *p = signal.constData(); - const QMetaObject *mo = &QTreeView::staticMetaObject; - QBENCHMARK { - (void)mo->indexOfSignal(p); - } -} - -void tst_qmetaobject::indexOfSlot_data() -{ - QTest::addColumn("slot"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->methodCount(); ++i) { - QMetaMethod method = mo->method(i); - if (method.methodType() != QMetaMethod::Slot) - continue; - QByteArray sig = method.signature(); - QTest::newRow(sig) << sig; - } -} - -void tst_qmetaobject::indexOfSlot() -{ - QFETCH(QByteArray, slot); - const char *p = slot.constData(); - const QMetaObject *mo = &QTreeView::staticMetaObject; - QBENCHMARK { - (void)mo->indexOfSlot(p); - } -} - -QTEST_MAIN(tst_qmetaobject) - -#include "main.moc" diff --git a/tests/benchmarks/qmetaobject/qmetaobject.pro b/tests/benchmarks/qmetaobject/qmetaobject.pro deleted file mode 100644 index 78300f6..0000000 --- a/tests/benchmarks/qmetaobject/qmetaobject.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qmetaobject - -SOURCES += main.cpp diff --git a/tests/benchmarks/qnetworkreply/qnetworkreply.pro b/tests/benchmarks/qnetworkreply/qnetworkreply.pro deleted file mode 100644 index 1e67d81..0000000 --- a/tests/benchmarks/qnetworkreply/qnetworkreply.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qnetworkreply -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui -QT += network - -CONFIG += release - -# Input -SOURCES += tst_qnetworkreply.cpp diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp deleted file mode 100644 index a92359f..0000000 --- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp +++ /dev/null @@ -1,656 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -// This file contains benchmarks for QNetworkReply functions. - -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../auto/network-settings.h" - - -class TimedSender: public QThread -{ - Q_OBJECT - qint64 totalBytes; - QSemaphore ready; - QByteArray dataToSend; - QTcpSocket *client; - int timeout; - int port; -public: - int transferRate; - TimedSender(int ms) - : totalBytes(0), timeout(ms), port(-1), transferRate(-1) - { - dataToSend = QByteArray(16*1024, '@'); - start(); - ready.acquire(); - } - - inline int serverPort() const { return port; } - -private slots: - void writeMore() - { - while (client->bytesToWrite() < 128 * 1024) { - writePacket(dataToSend); - } - } - -protected: - void run() - { - QTcpServer server; - server.listen(); - port = server.serverPort(); - ready.release(); - - server.waitForNewConnection(-1); - client = server.nextPendingConnection(); - - writeMore(); - connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection); - - QEventLoop eventLoop; - QTimer::singleShot(timeout, &eventLoop, SLOT(quit())); - - QTime timer; - timer.start(); - eventLoop.exec(); - disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0); - - // wait for the connection to shut down - client->disconnectFromHost(); - if (!client->waitForDisconnected(10000)) - return; - - transferRate = totalBytes * 1000 / timer.elapsed(); - qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in" - << timer.elapsed() << "ms"; - } - - void writePacket(const QByteArray &array) - { - client->write(array); - totalBytes += array.size(); - } -}; - - -class QNetworkReplyPtr: public QSharedPointer -{ -public: - inline QNetworkReplyPtr(QNetworkReply *ptr = 0) - : QSharedPointer(ptr) - { } - - inline operator QNetworkReply *() const { return data(); } -}; - - -class DataReader: public QObject -{ - Q_OBJECT -public: - qint64 totalBytes; - QByteArray data; - QIODevice *device; - bool accumulate; - DataReader(QIODevice *dev, bool acc = true) : totalBytes(0), device(dev), accumulate(acc) - { - connect(device, SIGNAL(readyRead()), SLOT(doRead())); - } - -public slots: - void doRead() - { - QByteArray buffer; - buffer.resize(device->bytesAvailable()); - qint64 bytesRead = device->read(buffer.data(), device->bytesAvailable()); - if (bytesRead == -1) { - QTestEventLoop::instance().exitLoop(); - return; - } - buffer.truncate(bytesRead); - totalBytes += bytesRead; - - if (accumulate) - data += buffer; - } -}; - -class ThreadedDataReader: public QThread -{ - Q_OBJECT - // used to make the constructor only return after the tcp server started listening - QSemaphore ready; - QTcpSocket *client; - int timeout; - int port; -public: - qint64 transferRate; - ThreadedDataReader() - : port(-1), transferRate(-1) - { - start(); - ready.acquire(); - } - - inline int serverPort() const { return port; } - -protected: - void run() - { - QTcpServer server; - server.listen(); - port = server.serverPort(); - ready.release(); - - server.waitForNewConnection(-1); - client = server.nextPendingConnection(); - - QEventLoop eventLoop; - DataReader reader(client, false); - QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit())); - - QTime timer; - timer.start(); - eventLoop.exec(); - qint64 elapsed = timer.elapsed(); - - transferRate = reader.totalBytes * 1000 / elapsed; - qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec"; - } -}; - -class DataGenerator: public QIODevice -{ - Q_OBJECT - enum { Idle, Started, Stopped } state; -public: - DataGenerator() : state(Idle) - { open(ReadOnly); } - - virtual bool isSequential() const { return true; } - virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; } - -public slots: - void start() { state = Started; emit readyRead(); } - void stop() { state = Stopped; emit readyRead(); } - -protected: - virtual qint64 readData(char *data, qint64 maxlen) - { - if (state == Stopped) - return -1; // EOF - - // return as many bytes as are wanted - memset(data, '@', maxlen); - return maxlen; - } - virtual qint64 writeData(const char *, qint64) - { return -1; } -}; - -class ThreadedDataReaderHttpServer: public QThread -{ - Q_OBJECT - // used to make the constructor only return after the tcp server started listening - QSemaphore ready; - QTcpSocket *client; - int timeout; - int port; -public: - qint64 transferRate; - ThreadedDataReaderHttpServer() - : port(-1), transferRate(-1) - { - start(); - ready.acquire(); - } - - inline int serverPort() const { return port; } - -protected: - void run() - { - QTcpServer server; - server.listen(); - port = server.serverPort(); - ready.release(); - - QVERIFY(server.waitForNewConnection(10*1000)); - client = server.nextPendingConnection(); - - // read lines until we read the empty line seperating HTTP request from HTTP request body - do { - if (client->canReadLine()) { - QString line = client->readLine(); - if (line == "\n" || line == "\r\n") - break; // empty line - } - if (!client->waitForReadyRead(10*1000)) { - client->close(); - return; - } - } while (client->state() == QAbstractSocket::ConnectedState); - - client->write("HTTP/1.0 200 OK\r\n"); - client->write("Content-length: 0\r\n"); - client->write("\r\n"); - client->flush(); - - QCoreApplication::processEvents(); - - QEventLoop eventLoop; - DataReader reader(client, false); - QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit())); - - QTime timer; - timer.start(); - eventLoop.exec(); - qint64 elapsed = timer.elapsed(); - - transferRate = reader.totalBytes * 1000 / elapsed; - qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec"; - } -}; - - -class FixedSizeDataGenerator : public QIODevice -{ - Q_OBJECT - enum { Idle, Started, Stopped } state; -public: - FixedSizeDataGenerator(qint64 size) : state(Idle) - { open(ReadOnly | Unbuffered); - toBeGeneratedTotalCount = toBeGeneratedCount = size; - } - - virtual qint64 bytesAvailable() const - { - return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0; - } - - virtual bool isSequential() const{ - return false; - } - - virtual bool reset() const{ - return false; - } - - qint64 size() const { - return toBeGeneratedTotalCount; - } - -public slots: - void start() { state = Started; emit readyRead(); } - -protected: - virtual qint64 readData(char *data, qint64 maxlen) - { - memset(data, '@', maxlen); - - if (toBeGeneratedCount <= 0) { - return -1; - } - - qint64 n = qMin(maxlen, toBeGeneratedCount); - toBeGeneratedCount -= n; - - if (toBeGeneratedCount <= 0) { - // make sure this is a queued connection! - emit readChannelFinished(); - } - - return n; - } - virtual qint64 writeData(const char *, qint64) - { return -1; } - - qint64 toBeGeneratedCount; - qint64 toBeGeneratedTotalCount; -}; - -class HttpDownloadPerformanceServer : QObject { - Q_OBJECT; - qint64 dataSize; - qint64 dataSent; - QTcpServer server; - QTcpSocket *client; - bool serverSendsContentLength; - bool chunkedEncoding; - -public: - HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0), - client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) { - server.listen(); - connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot())); - } - - int serverPort() { - return server.serverPort(); - } - -public slots: - - void newConnectionSlot() { - client = server.nextPendingConnection(); - client->setParent(this); - connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); - connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64))); - } - - void readyReadSlot() { - client->readAll(); - client->write("HTTP/1.0 200 OK\n"); - if (serverSendsContentLength) - client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii()); - if (chunkedEncoding) - client->write(QString("Transfer-Encoding: chunked\n").toAscii()); - client->write("Connection: close\n\n"); - } - - void bytesWrittenSlot(qint64 amount) { - Q_UNUSED(amount); - if (dataSent == dataSize && client) { - // close eventually - - // chunked encoding: we have to send a last "empty" chunk - if (chunkedEncoding) - client->write(QString("0\r\n\r\n").toAscii()); - - client->disconnectFromHost(); - server.close(); - client = 0; - return; - } - - // send data - if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) { - qint64 amount = qMin(qint64(16*1024), dataSize - dataSent); - QByteArray data(amount, '@'); - - if (chunkedEncoding) { - client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii()); - client->write(data.constData(), amount); - client->write(QString("\r\n").toAscii()); - } else { - client->write(data.constData(), amount); - } - - dataSent += amount; - } - } -}; - -class HttpDownloadPerformanceClient : QObject { - Q_OBJECT; - QIODevice *device; - public: - HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){ - connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); - } - - public slots: - void readyReadSlot() { - device->readAll(); - } - -}; - - - - -class tst_qnetworkreply : public QObject -{ - Q_OBJECT - - QNetworkAccessManager manager; -private slots: - void httpLatency(); - -#ifndef QT_NO_OPENSSL - void echoPerformance_data(); - void echoPerformance(); -#endif - - void downloadPerformance(); - void uploadPerformance(); - void performanceControlRate(); - void httpUploadPerformance(); - void httpDownloadPerformance_data(); - void httpDownloadPerformance(); - -}; - -void tst_qnetworkreply::httpLatency() -{ - QNetworkAccessManager manager; - QBENCHMARK{ - QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/")); - QNetworkReply* reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - QTestEventLoop::instance().enterLoop(5); - QVERIFY(!QTestEventLoop::instance().timeout()); - delete reply; - } -} - -#ifndef QT_NO_OPENSSL -void tst_qnetworkreply::echoPerformance_data() -{ - QTest::addColumn("ssl"); - QTest::newRow("no_ssl") << false; - QTest::newRow("ssl") << true; -} - -void tst_qnetworkreply::echoPerformance() -{ - QFETCH(bool, ssl); - QNetworkAccessManager manager; - QNetworkRequest request(QUrl((ssl ? "https://" : "http://") + QtNetworkSettings::serverName() + "/qtest/cgi-bin/echo.cgi")); - - QByteArray data; - data.resize(1024*1024*10); // 10 MB - // init with garbage. needed so ssl cannot compress it in an efficient way. - for (int i = 0; i < data.size() / sizeof(int); i++) { - int r = qrand(); - data.data()[i*sizeof(int)] = r; - } - - QBENCHMARK{ - QNetworkReply* reply = manager.post(request, data); - connect(reply, SIGNAL(sslErrors( const QList &)), reply, SLOT(ignoreSslErrors())); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - QTestEventLoop::instance().enterLoop(5); - QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(reply->error() == QNetworkReply::NoError); - delete reply; - } -} -#endif - -void tst_qnetworkreply::downloadPerformance() -{ - // unlike the above function, this one tries to send as fast as possible - // and measures how fast it was. - TimedSender sender(5000); - QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1"); - QNetworkReplyPtr reply = manager.get(request); - DataReader reader(reply, false); - - QTime loopTime; - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - loopTime.start(); - QTestEventLoop::instance().enterLoop(40); - int elapsedTime = loopTime.elapsed(); - sender.wait(); - - qint64 receivedBytes = reader.totalBytes; - qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and" - << elapsedTime << "ms"; -} - -void tst_qnetworkreply::uploadPerformance() -{ - ThreadedDataReader reader; - DataGenerator generator; - - - QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"); - QNetworkReplyPtr reply = manager.put(request, &generator); - generator.start(); - connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTimer::singleShot(5000, &generator, SLOT(stop())); - - QTestEventLoop::instance().enterLoop(30); - QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); -} - -void tst_qnetworkreply::httpUploadPerformance() -{ -#ifdef Q_OS_SYMBIAN - // SHow some mercy for non-desktop platform/s - enum {UploadSize = 4*1024*1024}; // 4 MB -#else - enum {UploadSize = 128*1024*1024}; // 128 MB -#endif - ThreadedDataReaderHttpServer reader; - FixedSizeDataGenerator generator(UploadSize); - - QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1")); - request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize); - - QNetworkReplyPtr reply = manager.put(request, &generator); - - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - - QTime time; - generator.start(); - time.start(); - QTestEventLoop::instance().enterLoop(40); - qint64 elapsed = time.elapsed(); - reader.exit(); - reader.wait(); - QVERIFY(reply->isFinished()); - QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); - - qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, " - << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; -} - - -void tst_qnetworkreply::performanceControlRate() -{ - // this is a control comparison for the other two above - // it does the same thing, but instead bypasses the QNetworkAccess system - qDebug() << "The following are the maximum transfer rates that we can get in this system" - " (bypassing QNetworkAccess)"; - - TimedSender sender(5000); - QTcpSocket sink; - sink.connectToHost("127.0.0.1", sender.serverPort()); - DataReader reader(&sink, false); - - QTime loopTime; - connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop())); - loopTime.start(); - QTestEventLoop::instance().enterLoop(40); - int elapsedTime = loopTime.elapsed(); - sender.wait(); - - qint64 receivedBytes = reader.totalBytes; - qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and" - << elapsedTime << "ms"; -} - -void tst_qnetworkreply::httpDownloadPerformance_data() -{ - QTest::addColumn("serverSendsContentLength"); - QTest::addColumn("chunkedEncoding"); - - QTest::newRow("Server sends no Content-Length") << false << false; - QTest::newRow("Server sends Content-Length") << true << false; - QTest::newRow("Server uses chunked encoding") << false << true; - -} - -void tst_qnetworkreply::httpDownloadPerformance() -{ - QFETCH(bool, serverSendsContentLength); - QFETCH(bool, chunkedEncoding); -#ifdef Q_OS_SYMBIAN - // Show some mercy to non-desktop platform/s - enum {UploadSize = 4*1024*1024}; // 4 MB -#else - enum {UploadSize = 128*1024*1024}; // 128 MB -#endif - HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding); - - QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1")); - QNetworkReplyPtr reply = manager.get(request); - - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - HttpDownloadPerformanceClient client(reply); - - QTime time; - time.start(); - QTestEventLoop::instance().enterLoop(40); - QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); - - qint64 elapsed = time.elapsed(); - qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, " - << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; -} - -QTEST_MAIN(tst_qnetworkreply) - -#include "tst_qnetworkreply.moc" diff --git a/tests/benchmarks/qobject/main.cpp b/tests/benchmarks/qobject/main.cpp deleted file mode 100644 index 7f24ebd..0000000 --- a/tests/benchmarks/qobject/main.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include "object.h" -#include -#include - -enum { - CreationDeletionBenckmarkConstant = 34567, - SignalsAndSlotsBenchmarkConstant = 456789 -}; - -class QObjectBenchmark : public QObject -{ -Q_OBJECT -private slots: - void signal_slot_benchmark(); - void signal_slot_benchmark_data(); - void qproperty_benchmark_data(); - void qproperty_benchmark(); - void dynamic_property_benchmark(); - void connect_disconnect_benchmark_data(); - void connect_disconnect_benchmark(); -}; - -void QObjectBenchmark::signal_slot_benchmark_data() -{ - QTest::addColumn("type"); - QTest::newRow("simple function") << 0; - QTest::newRow("single signal/slot") << 1; - QTest::newRow("multi signal/slot") << 2; -} - -void QObjectBenchmark::signal_slot_benchmark() -{ - QFETCH(int, type); - - Object singleObject; - Object multiObject; - singleObject.setObjectName("single"); - multiObject.setObjectName("multi"); - - singleObject.connect(&singleObject, SIGNAL(signal0()), SLOT(slot0())); - - multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(slot0())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal1())); - multiObject.connect(&multiObject, SIGNAL(signal1()), SLOT(slot1())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal2())); - multiObject.connect(&multiObject, SIGNAL(signal2()), SLOT(slot2())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal3())); - multiObject.connect(&multiObject, SIGNAL(signal3()), SLOT(slot3())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal4())); - multiObject.connect(&multiObject, SIGNAL(signal4()), SLOT(slot4())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal5())); - multiObject.connect(&multiObject, SIGNAL(signal5()), SLOT(slot5())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal6())); - multiObject.connect(&multiObject, SIGNAL(signal6()), SLOT(slot6())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal7())); - multiObject.connect(&multiObject, SIGNAL(signal7()), SLOT(slot7())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal8())); - multiObject.connect(&multiObject, SIGNAL(signal8()), SLOT(slot8())); - // multiObject.connect(&multiObject, SIGNAL(signal0()), SLOT(signal9())); - multiObject.connect(&multiObject, SIGNAL(signal9()), SLOT(slot9())); - - if (type == 0) { - QBENCHMARK { - singleObject.slot0(); - } - } else if (type == 1) { - QBENCHMARK { - singleObject.emitSignal0(); - } - } else { - QBENCHMARK { - multiObject.emitSignal0(); - } - } -} - -void QObjectBenchmark::qproperty_benchmark_data() -{ - QTest::addColumn("name"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->propertyCount(); ++i) { - QMetaProperty prop = mo->property(i); - QTest::newRow(prop.name()) << QByteArray(prop.name()); - } -} - -void QObjectBenchmark::qproperty_benchmark() -{ - QFETCH(QByteArray, name); - const char *p = name.constData(); - QTreeView obj; - QVariant v = obj.property(p); - QBENCHMARK { - obj.setProperty(p, v); - (void)obj.property(p); - } -} - -void QObjectBenchmark::dynamic_property_benchmark() -{ - QTreeView obj; - QBENCHMARK { - obj.setProperty("myProperty", 123); - (void)obj.property("myProperty"); - obj.setProperty("myOtherProperty", 123); - (void)obj.property("myOtherProperty"); - } -} - -void QObjectBenchmark::connect_disconnect_benchmark_data() -{ - QTest::addColumn("signal"); - const QMetaObject *mo = &QTreeView::staticMetaObject; - for (int i = 0; i < mo->methodCount(); ++i) { - QMetaMethod method = mo->method(i); - if (method.methodType() != QMetaMethod::Signal) - continue; - QByteArray sig = method.signature(); - QTest::newRow(sig) << sig; - } -} - -void QObjectBenchmark::connect_disconnect_benchmark() -{ - QFETCH(QByteArray, signal); - signal.prepend('2'); - const char *p = signal.constData(); - QTreeView obj; - QBENCHMARK { - QObject::connect(&obj, p, &obj, p); - QObject::disconnect(&obj, p, &obj, p); - } -} - -QTEST_MAIN(QObjectBenchmark) - -#include "main.moc" diff --git a/tests/benchmarks/qobject/object.cpp b/tests/benchmarks/qobject/object.cpp deleted file mode 100644 index d775a32..0000000 --- a/tests/benchmarks/qobject/object.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "object.h" - -void Object::emitSignal0() -{ emit signal0(); } - -void Object::slot0() -{ } -void Object::slot1() -{ } -void Object::slot2() -{ } -void Object::slot3() -{ } -void Object::slot4() -{ } -void Object::slot5() -{ } -void Object::slot6() -{ } -void Object::slot7() -{ } -void Object::slot8() -{ } -void Object::slot9() -{ } diff --git a/tests/benchmarks/qobject/object.h b/tests/benchmarks/qobject/object.h deleted file mode 100644 index 7e4933f..0000000 --- a/tests/benchmarks/qobject/object.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef OBJECT_H -#define OBJECT_H - -#include - -class Object : public QObject -{ - Q_OBJECT -public: - void emitSignal0(); -signals: - void signal0(); - void signal1(); - void signal2(); - void signal3(); - void signal4(); - void signal5(); - void signal6(); - void signal7(); - void signal8(); - void signal9(); -public slots: - void slot0(); - void slot1(); - void slot2(); - void slot3(); - void slot4(); - void slot5(); - void slot6(); - void slot7(); - void slot8(); - void slot9(); -}; - -#endif // OBJECT_H diff --git a/tests/benchmarks/qobject/qobject.pro b/tests/benchmarks/qobject/qobject.pro deleted file mode 100644 index 2855de4..0000000 --- a/tests/benchmarks/qobject/qobject.pro +++ /dev/null @@ -1,9 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qobject -DEPENDPATH += . -INCLUDEPATH += . - -# Input -HEADERS += object.h -SOURCES += main.cpp object.cpp diff --git a/tests/benchmarks/qpainter/qpainter.pro b/tests/benchmarks/qpainter/qpainter.pro deleted file mode 100644 index 5ac8c64..0000000 --- a/tests/benchmarks/qpainter/qpainter.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qpainter - -SOURCES += tst_qpainter.cpp diff --git a/tests/benchmarks/qpainter/tst_qpainter.cpp b/tests/benchmarks/qpainter/tst_qpainter.cpp deleted file mode 100644 index 39b2244..0000000 --- a/tests/benchmarks/qpainter/tst_qpainter.cpp +++ /dev/null @@ -1,1633 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -Q_DECLARE_METATYPE(QLine) -Q_DECLARE_METATYPE(QRect) -Q_DECLARE_METATYPE(QSize) -Q_DECLARE_METATYPE(QPoint) -Q_DECLARE_METATYPE(QPainterPath) -Q_DECLARE_METATYPE(QPainter::RenderHint) -Q_DECLARE_METATYPE(QPainter::CompositionMode) -Q_DECLARE_METATYPE(QImage::Format) - -enum PrimitiveType { - Primitive_Int_DiagLine, - Primitive_Int_VerLine, - Primitive_Int_HorLine, - Primitive_Int_Rect, - Primitive_Int_Ellipse, - Primitive_Int_Pie, - Primitive_Int_Arc, - Primitive_Int_Chord, - Primitive_Int_TriPoly, - Primitive_Int_RectPoly, - Primitive_Int_2RectPoly, - - Primitive_Float_DiagLine, - Primitive_Float_VerLine, - Primitive_Float_HorLine, - Primitive_Float_Rect, - Primitive_Float_Ellipse, - Primitive_Float_Pie, - Primitive_Float_Arc, - Primitive_Float_Chord, - Primitive_Float_TriPoly, - Primitive_Float_RectPoly, - Primitive_Float_2RectPoly, - - Primitive_Float_TriPath, - Primitive_Float_RectPath, - Primitive_Float_2RectPath, - Primitive_Float_EllipsePath, - Primitive_Last_Primitive - -}; - - -enum StateChanges { - ChangePen = 0x0001, - ChangeBrush = 0x0002, - ChangeClip = 0x0004, - ChangeTransform = 0x0008 -}; - - -struct PrimitiveSet { - QRect i_rect; - QLine i_line_diag; - QLine i_line_ver; - QLine i_line_hor; - QPolygon i_poly_tri; - QPolygon i_poly_2rects; - QPolygon i_poly_rect; - - QRectF f_rect; - QLineF f_line_diag; - QLineF f_line_ver; - QLineF f_line_hor; - QPolygonF f_poly_tri; - QPolygonF f_poly_2rects; - QPolygonF f_poly_rect; - - QPainterPath f_path_tri; - QPainterPath f_path_2rects; - QPainterPath f_path_rect; - QPainterPath f_path_ellipse; -}; - - -class tst_QPainter : public QObject -{ - Q_OBJECT - - public: - tst_QPainter() - { - setupBrushes(); - createPrimitives(); - m_surface = surface(); - } - -private slots: - void beginAndEnd(); - - void saveRestore_data(); - void saveRestore(); - - void drawLine_data(); - void drawLine(); - void drawLine_clipped_data(); - void drawLine_clipped(); - void drawLine_antialiased_clipped_data(); - void drawLine_antialiased_clipped(); - - void drawPixmap_data(); - void drawPixmap(); - - void drawImage_data(); - void drawImage(); - - void drawTiledPixmap_data(); - void drawTiledPixmap(); - - void compositionModes_data(); - void compositionModes(); - - void fillPrimitives_10_data() { drawPrimitives_data_helper(false); } - void fillPrimitives_100_data() { drawPrimitives_data_helper(false); } - void fillPrimitives_1000_data() { drawPrimitives_data_helper(false); } - void fillPrimitives_10(); - void fillPrimitives_100(); - void fillPrimitives_1000(); - - void strokePrimitives_10_data() { drawPrimitives_data_helper(true); } - void strokePrimitives_100_data() { drawPrimitives_data_helper(true); } - void strokePrimitives_1000_data() { drawPrimitives_data_helper(true); } - void strokePrimitives_10(); - void strokePrimitives_100(); - void strokePrimitives_1000(); - - void drawText_data(); - void drawText(); - - void clipAndFill_data(); - void clipAndFill(); - - void drawRoundedRect(); - void drawScaledRoundedRect(); - void drawTransformedRoundedRect(); - - void drawScaledAntialiasedRoundedRect_data(); - void drawTransformedAntialiasedRoundedRect_data(); - void drawAntialiasedRoundedRect(); - void drawScaledAntialiasedRoundedRect(); - void drawTransformedAntialiasedRoundedRect(); - - void drawScaledImageRoundedRect_data(); - void drawTransformedImageRoundedRect_data(); - void drawImageRoundedRect(); - void drawScaledImageRoundedRect(); - void drawTransformedImageRoundedRect(); - - void drawScaledBorderPixmapRoundedRect_data(); - void drawTransformedBorderPixmapRoundedRect_data(); - void drawBorderPixmapRoundedRect(); - void drawScaledBorderPixmapRoundedRect(); - void drawTransformedBorderPixmapRoundedRect(); - - void drawTransformedTransparentImage_data(); - void drawTransformedSemiTransparentImage_data(); - void drawTransformedFilledImage_data(); - void drawTransformedTransparentImage(); - void drawTransformedSemiTransparentImage(); - void drawTransformedFilledImage(); - -private: - void setupBrushes(); - void createPrimitives(); - - void drawPrimitives_data_helper(bool fancypens); - void fillPrimitives_helper(QPainter *painter, PrimitiveType type, PrimitiveSet *s); - - QTransform transformForAngle(qreal angle); - - QPaintDevice *surface() - { - return new QPixmap(1024, 1024); - } - - - QMap m_pens; - QMap m_brushes; - - PrimitiveSet m_primitives_10; - PrimitiveSet m_primitives_100; - PrimitiveSet m_primitives_1000; - - QPaintDevice *m_surface; - QPainter m_painter; - -}; - -void tst_QPainter::createPrimitives() -{ - for (int i=0; i<3; ++i) { - PrimitiveSet *ps; - int size; - switch (i) { - case 0: - ps = &m_primitives_10; - size = 10; - break; - case 1: - ps = &m_primitives_100; - size = 100; - break; - case 2: - ps = &m_primitives_1000; - size = 1000; - break; - } - - ps->f_rect = QRectF(0, 0, size, size); - ps->f_line_diag = QLineF(0, 0, size, size); - ps->f_line_ver = QLineF(10, 0, 10, size); - ps->f_line_hor = QLineF(0, 10, size, 10); - ps->f_poly_rect = QPolygonF() << QPointF(0, 0) - << QPointF(size, 0) - << QPointF(size, size) - << QPointF(0, size); - ps->f_poly_2rects = QPolygonF() << QPointF(0, 0) - << QPointF(size * 0.75, 0) - << QPointF(size * 0.75, size * 0.75) - << QPointF(size * 0.25, size * 0.75) - << QPointF(size * 0.25, size * 0.25) - << QPointF(size, size * 0.25) - << QPointF(size, size) - << QPointF(0, size); - ps->f_poly_tri = QPolygonF() << QPointF(size / 2.0, 0) - << QPointF(0, size) - << QPointF(size, size); - - ps->f_path_tri.addPolygon(ps->f_poly_tri); - ps->f_path_rect.addRect(ps->f_rect); - ps->f_path_2rects.addPolygon(ps->f_poly_2rects); - ps->f_path_ellipse.addEllipse(ps->f_rect); - - ps->i_rect = ps->f_rect.toRect(); - ps->i_line_diag = ps->f_line_diag.toLine(); - ps->i_line_hor = ps->f_line_hor.toLine(); - ps->i_line_ver = ps->f_line_ver.toLine(); - ps->i_poly_tri = ps->f_poly_tri.toPolygon(); - ps->i_poly_rect = ps->f_poly_rect.toPolygon(); - ps->i_poly_2rects = ps->f_poly_2rects.toPolygon(); - } -} - -void tst_QPainter::drawLine_data() -{ - QTest::addColumn("line"); - QTest::addColumn("pen"); - - QVector pens; - pens << QPen(Qt::black) - << QPen(Qt::black, 0, Qt::DashDotLine) - << QPen(Qt::black, 4) - << QPen(Qt::black, 4, Qt::DashDotLine) - << QPen(QColor(255, 0, 0, 200)) - << QPen(QColor(255, 0, 0, 200), 0, Qt::DashDotLine) - << QPen(QColor(255, 0, 0, 200), 4) - << QPen(QColor(255, 0, 0, 200), 4, Qt::DashDotLine); - - QStringList penNames; - penNames << "black-0" - << "black-0-dashdot" - << "black-4" - << "black-4-dashdot" - << "alpha-0" - << "alpha-0-dashdot" - << "alpha-4" - << "alpha-4-dashdot"; - - int i = 0; - foreach (QPen pen, pens) { - const QString s = QString(QLatin1String("%1:%2")).arg(penNames[i]); - QTest::newRow(qPrintable(s.arg("horizontal"))) - << QLine(0, 20, 100, 20) << pen; - QTest::newRow(qPrintable(s.arg("vertical:"))) - << QLine(20, 0, 20, 100) << pen; - QTest::newRow(qPrintable(s.arg("0-45:"))) - << QLine(0, 20, 100, 0) << pen; - QTest::newRow(qPrintable(s.arg("45-90:"))) - << QLine(0, 100, 20, 0) << pen; - QTest::newRow(qPrintable(s.arg("90-135:"))) - << QLine(20, 100, 0, 0) << pen; - QTest::newRow(qPrintable(s.arg("135-180:"))) - << QLine(100, 20, 0, 0) << pen; - QTest::newRow(qPrintable(s.arg("180-225:"))) - << QLine(100, 0, 0, 20) << pen; - QTest::newRow(qPrintable(s.arg("225-270:"))) - << QLine(20, 0, 0, 100) << pen; - QTest::newRow(qPrintable(s.arg("270-315:"))) - << QLine(0, 0, 20, 100) << pen; - QTest::newRow(qPrintable(s.arg("315-360:"))) - << QLine(0, 0, 100, 20) << pen; - ++i; - } -} - -void tst_QPainter::setupBrushes() -{ - // Solid brushes... - m_brushes["black-brush"] = QBrush(Qt::black); - m_brushes["white-brush"] = QBrush(Qt::white); - m_brushes["transparent-brush"] = QBrush(QColor(255, 255, 255, 0)); - m_brushes["alpha1-brush"] = QBrush(QColor(255, 255, 255, 100)); - m_brushes["alpha2-brush"] = QBrush(QColor(255, 255, 255, 200)); - - - // Patterns - m_brushes["dense1-brush"] = QBrush(Qt::Dense1Pattern); - m_brushes["dense2-brush"] = QBrush(Qt::Dense2Pattern); - m_brushes["dense3-brush"] = QBrush(Qt::Dense3Pattern); - m_brushes["dense4-brush"] = QBrush(Qt::Dense4Pattern); - m_brushes["dense5-brush"] = QBrush(Qt::Dense5Pattern); - m_brushes["dense6-brush"] = QBrush(Qt::Dense6Pattern); - m_brushes["dense7-brush"] = QBrush(Qt::Dense7Pattern); - m_brushes["hor-brush"] = QBrush(Qt::HorPattern); - m_brushes["ver-brush"] = QBrush(Qt::VerPattern); - m_brushes["cross-brush"] = QBrush(Qt::CrossPattern); - m_brushes["bdiag-brush"] = QBrush(Qt::BDiagPattern); - m_brushes["fdiag-brush"] = QBrush(Qt::FDiagPattern); - m_brushes["diagcross-brush"] = QBrush(Qt::DiagCrossPattern); - - // Gradients - QGradientStops gradient_white_black; - gradient_white_black << QPair(0, QColor(Qt::white)); - gradient_white_black << QPair(1, QColor(Qt::black)); - - QGradientStops gradient_white_black10; - for (int i=0; i<10; ++i) { - gradient_white_black10 << QPair(i/10.0, QColor(Qt::white)); - gradient_white_black10 << QPair(i/10.0+0.05, QColor(Qt::black)); - } - - QGradientStops gradient_white_alpha; - gradient_white_alpha << QPair(0, QColor(Qt::white)); - gradient_white_alpha << QPair(0, QColor(Qt::transparent)); - - QGradientStops gradient_white_alpha10; - for (int i=0; i<10; ++i) { - gradient_white_alpha10 << QPair(i/10.0, QColor(Qt::white)); - gradient_white_alpha10 << QPair(i/10.0+0.05, QColor(Qt::black)); - } - - - for (int j=0; j<4; ++j) { - QLinearGradient lg; - lg.setStart(0, 0); - - QRadialGradient rg; - QConicalGradient cg; - - QGradientStops stops; - if (j == 0) stops = gradient_white_black; - else if (j == 1) stops = gradient_white_black10; - else if (j == 2) stops = gradient_white_alpha; - else if (j == 3) stops = gradient_white_alpha10; - lg.setStops(stops); - rg.setStops(stops); - cg.setStops(stops); - - for (int i=0; i<6; ++i) { - lg.setSpread((QGradient::Spread) (i % 3)); - lg.setCoordinateMode((QGradient::CoordinateMode) (j / 3)); - - QString name = QString::fromLatin1("-%1%2") - .arg(lg.spread()) - .arg(lg.coordinateMode()); - - lg.setFinalStop(100, 0); - m_brushes["hor-lingrad-w/b-brush" + name] = QBrush(lg); - - lg.setFinalStop(0, 100); - m_brushes["ver-lingrad-w/b-brush" + name] = QBrush(lg); - - lg.setFinalStop(100, 100); - m_brushes["diag-lingrad-w/b-brush" + name] = QBrush(lg); - - rg.setRadius(100); - rg.setCenter(0, 0); - rg.setFocalPoint(50, 50); - m_brushes["radgrad-brush" + name] = QBrush(rg); - - cg.setCenter(0, 0); - cg.setAngle(40); - m_brushes["congrad-brush" + name] = QBrush(cg); - } - } - - // Set up pens... - - -// m_pens["black-pen"] = QPen(Qt::black); -// m_pens["white-pen"] = QPen(Qt::white); -// m_pens["transparent-pen"] = QPen(QColor(255, 255, 255, 0)); -// m_pens["translucent1-pen"] = QPen(QColor(255, 255, 255, 100)); -// m_pens["translucent2-pen"] = QPen(QColor(255, 255, 255, 200)); - - - -} - - -// void QPainter_Primitives::fillRect_data() { - -// QTest::addColumn("brush"); -// QTest::addColumn("size"); - -// for (QMap::const_iterator it = m_brushes.constBegin(); -// it != m_brushes.constEnd(); ++it) { -// for (int w=2; w<1025; w*=2) { -// for (int h=2; h<1025; h*=2) { -// QTest::newRow(QString("brush=%1; size=[%2,%3]").arg(it.key()).arg(w).arg(h).toAscii().data()) -// << *it << QSize(w, h); -// } -// } -// } -// } - - - - - -// void QPainter_Primitives::fillRect() -// { -// QFETCH(QBrush, brush); -// QFETCH(QSize, size); - -// QImage img(1024, 1024, QImage::Format_ARGB32_Premultiplied); -// QPainter p(&img); -// p.setPen(Qt::NoPen); -// p.setBrush(brush); -// QRect rect(QPoint(0, 0), size); -// QBENCHMARK { -// p.drawRect(rect); -// } -// } - - - - -void tst_QPainter::beginAndEnd() -{ - QPixmap pixmap(100, 100); - - QBENCHMARK { - QPainter p; - p.begin(&pixmap); - p.end(); - } -} - -void tst_QPainter::drawLine() -{ - QFETCH(QLine, line); - QFETCH(QPen, pen); - - const int offset = 5; - QPixmap pixmapUnclipped(qMin(line.x1(), line.x2()) - + 2*offset + qAbs(line.dx()), - qMin(line.y1(), line.y2()) - + 2*offset + qAbs(line.dy())); - pixmapUnclipped.fill(Qt::white); - - QPainter p(&pixmapUnclipped); - p.translate(offset, offset); - p.setPen(pen); - p.paintEngine()->syncState(); - - QBENCHMARK { - p.drawLine(line); - } - - p.end(); - -} - -void tst_QPainter::drawLine_clipped_data() -{ - drawLine_data(); -} - -void tst_QPainter::drawLine_clipped() -{ - QFETCH(QLine, line); - QFETCH(QPen, pen); - - const int offset = 5; - QPixmap pixmapClipped(qMin(line.x1(), line.x2()) - + 2*offset + qAbs(line.dx()), - qMin(line.y1(), line.y2()) - + 2*offset + qAbs(line.dy())); - - const QRect clip = QRect(line.p1(), line.p2()).normalized(); - - pixmapClipped.fill(Qt::white); - QPainter p(&pixmapClipped); - p.translate(offset, offset); - p.setClipRect(clip); - p.setPen(pen); - p.paintEngine()->syncState(); - - QBENCHMARK { - p.drawLine(line); - } - - p.end(); -} - - -void tst_QPainter::drawLine_antialiased_clipped_data() -{ - drawLine_data(); -} - - -void tst_QPainter::drawLine_antialiased_clipped() -{ - QFETCH(QLine, line); - QFETCH(QPen, pen); - - const int offset = 5; - QPixmap pixmapClipped(qMin(line.x1(), line.x2()) - + 2*offset + qAbs(line.dx()), - qMin(line.y1(), line.y2()) - + 2*offset + qAbs(line.dy())); - - const QRect clip = QRect(line.p1(), line.p2()).normalized(); - - pixmapClipped.fill(Qt::white); - QPainter p(&pixmapClipped); - p.setRenderHint(QPainter::Antialiasing); - p.translate(offset, offset); - p.setClipRect(clip); - p.setPen(pen); - p.paintEngine()->syncState(); - - QBENCHMARK { - p.drawLine(line); - } - - p.end(); -} - -void tst_QPainter::drawPixmap_data() -{ - QTest::addColumn("sourceFormat"); - QTest::addColumn("targetFormat"); - QTest::addColumn("size"); - QTest::addColumn("type"); // 0 = circle, 1 = diag line, 2 = solid rect, 3 = alpharect - - QList sizes; - sizes << QSize(1, 1) - << QSize(10, 10) - << QSize(100, 100) - << QSize(1000, 1000); - - const char *typeNames[] = { - "circle", - "line", - "solidrect", - "alpharect" - }; - - const char *formatNames[] = { - "Invalid", - "Mono", - "MonoLSB", - "Indexed8", - "RGB32", - "ARGB32", - "ARGB32_pm", - "RGB16", - "ARGB8565_pm", - "RGB666", - "ARGB6666_pm", - "RGB555", - "ARGB8555_pm", - "RGB888", - "RGB444", - "ARGB4444_pm" - }; - - for (int tar=4; tar("mode"); - QTest::addColumn("size"); - QTest::addColumn("color"); - - const int n = QPainter::RasterOp_SourceAndNotDestination; - for (int i = 0; i <= n; ++i) { - QString title("%1:%2"); - QTest::newRow(qPrintable(title.arg(i).arg("10x10:opaque"))) - << (QPainter::CompositionMode)(i) - << QSize(10, 10) << QColor(255, 0, 0); - QTest::newRow(qPrintable(title.arg(i).arg("10x10:!opaque"))) - << (QPainter::CompositionMode)(i) - << QSize(10, 10) << QColor(127, 127, 127, 127); - QTest::newRow(qPrintable(title.arg(i).arg("300x300:opaque"))) - << (QPainter::CompositionMode)(i) - << QSize(300, 300) << QColor(255, 0, 0); - QTest::newRow(qPrintable(title.arg(i).arg("300x300:!opaque"))) - << (QPainter::CompositionMode)(i) - << QSize(300, 300) << QColor(127, 127, 127, 127); - } -} - -void tst_QPainter::compositionModes() -{ - QFETCH(QPainter::CompositionMode, mode); - QFETCH(QSize, size); - QFETCH(QColor, color); - - QPixmap src(size); - src.fill(color); - - QPixmap dest(size); - if (mode < QPainter::RasterOp_SourceOrDestination) - color.setAlpha(127); // porter-duff needs an alpha channel - dest.fill(color); - - QPainter p(&dest); - p.setCompositionMode(mode); - - QBENCHMARK { - p.drawPixmap(0, 0, src); - } -} - -void tst_QPainter::drawTiledPixmap_data() -{ - QTest::addColumn("srcSize"); - QTest::addColumn("dstSize"); - QTest::addColumn("transform"); - QTest::addColumn("color"); - QTest::addColumn("renderHint"); - - QTest::newRow("10x10=>20x20") - << QSize(10, 10) << QSize(20, 20) << (QTransform()) - << QColor(Qt::black) << QPainter::RenderHint(0); - QTest::newRow("10x10=>20x20, smooth") - << QSize(10, 10) << QSize(20, 20) << (QTransform()) - << QColor(Qt::black) << QPainter::SmoothPixmapTransform; - QTest::newRow("10x10=>20x20, !opaque") - << QSize(10, 10) << QSize(20, 20) << (QTransform()) - << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); - QTest::newRow("10x10=>20x20, !opaque, smooth") - << QSize(10, 10) << QSize(20, 20) << (QTransform()) - << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; - - QTest::newRow("10x10=>20x20, rotate(30)") - << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) - << QColor(Qt::black) << QPainter::RenderHint(0); - QTest::newRow("10x10=>20x20, rotate(30), smooth") - << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) - << QColor(Qt::black) << QPainter::SmoothPixmapTransform; - QTest::newRow("10x10=>20x20, rotate(30), !opaque") - << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) - << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); - QTest::newRow("10x10=>20x20, rotate(30), !opaque, smooth") - << QSize(10, 10) << QSize(20, 20) << (QTransform().rotate(30)) - << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; - - QTest::newRow("100x100=>200x200") - << QSize(100, 100) << QSize(200, 200) << (QTransform()) - << QColor(Qt::black) << QPainter::RenderHint(0); - QTest::newRow("100x100=>200x200, smooth") - << QSize(100, 100) << QSize(200, 200) << (QTransform()) - << QColor(Qt::black) << QPainter::SmoothPixmapTransform; - QTest::newRow("100x100=>200x200, !opaque") - << QSize(100, 100) << QSize(200, 200) << (QTransform()) - << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); - QTest::newRow("100x100=>200x200, !opaque, smooth") - << QSize(100, 100) << QSize(200, 200) << (QTransform()) - << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; - - QTest::newRow("100x100=>200x200, rotate(30)") - << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) - << QColor(Qt::black) << QPainter::RenderHint(0); - QTest::newRow("100x100=>200x200, rotate(30), smooth") - << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) - << QColor(Qt::black) << QPainter::SmoothPixmapTransform; - QTest::newRow("100x100=>200x200, rotate(30), !opaque") - << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) - << QColor(127, 127, 127, 127) << QPainter::RenderHint(0); - QTest::newRow("100x100=>200x200, rotate(30), !opaque, smooth") - << QSize(100, 100) << QSize(200, 200) << (QTransform().rotate(30)) - << QColor(127, 127, 127, 127) << QPainter::SmoothPixmapTransform; -} - -void tst_QPainter::drawTiledPixmap() -{ - QFETCH(QSize, srcSize); - QFETCH(QSize, dstSize); - QFETCH(QTransform, transform); - QFETCH(QColor, color); - QFETCH(QPainter::RenderHint, renderHint); - - QPixmap src(srcSize); - src.fill(color); - - const QRect dstRect = transform.mapRect(QRect(QPoint(), dstSize)); - QPixmap dst(dstRect.right() + 5, dstRect.bottom() + 5); - QPainter p(&dst); - p.setTransform(transform); - p.setRenderHint(renderHint); - - QBENCHMARK { - p.drawTiledPixmap(QRect(QPoint(), dstSize), src); - } -} - -void tst_QPainter::fillPrimitives_helper(QPainter *p, PrimitiveType type, PrimitiveSet *s) -{ - p->paintEngine()->syncState(); - - switch (type) { - case Primitive_Int_DiagLine: QBENCHMARK { p->drawLine(s->i_line_diag); } break; - case Primitive_Int_VerLine: QBENCHMARK { p->drawLine(s->i_line_ver); } break; - case Primitive_Int_HorLine: QBENCHMARK { p->drawLine(s->i_line_hor); } break; - case Primitive_Int_Rect: QBENCHMARK { p->drawRect(s->i_rect); } break; - case Primitive_Int_Ellipse: QBENCHMARK { p->drawEllipse(s->i_rect); } break; - case Primitive_Int_Pie: QBENCHMARK { p->drawPie(s->i_rect, 45*16, 270*16); } break; - case Primitive_Int_Arc: QBENCHMARK { p->drawArc(s->i_rect, 45*16, 270*16); } break; - case Primitive_Int_Chord: QBENCHMARK { p->drawChord(s->i_rect, 45*16, 270*16); } break; - case Primitive_Int_TriPoly: QBENCHMARK { p->drawPolygon(s->i_poly_tri); } break; - case Primitive_Int_RectPoly: QBENCHMARK { p->drawPolygon(s->i_poly_rect); } break; - case Primitive_Int_2RectPoly: QBENCHMARK { p->drawPolygon(s->i_poly_2rects); } break; - - case Primitive_Float_DiagLine: QBENCHMARK { p->drawLine(s->f_line_diag); } break; - case Primitive_Float_VerLine: QBENCHMARK { p->drawLine(s->f_line_ver); } break; - case Primitive_Float_HorLine: QBENCHMARK { p->drawLine(s->f_line_hor); } break; - case Primitive_Float_Rect: QBENCHMARK { p->drawRect(s->f_rect); } break; - case Primitive_Float_Ellipse: QBENCHMARK { p->drawEllipse(s->f_rect); } break; - case Primitive_Float_Pie: QBENCHMARK { p->drawPie(s->f_rect, 45*16, 270*16); } break; - case Primitive_Float_Arc: QBENCHMARK { p->drawArc(s->f_rect, 45*16, 270*16); } break; - case Primitive_Float_Chord: QBENCHMARK { p->drawChord(s->f_rect, 45*16, 270*16); } break; - case Primitive_Float_TriPoly: QBENCHMARK { p->drawPolygon(s->f_poly_tri); } break; - case Primitive_Float_RectPoly: QBENCHMARK { p->drawPolygon(s->f_poly_rect); } break; - case Primitive_Float_2RectPoly: QBENCHMARK { p->drawPolygon(s->f_poly_2rects); } break; - - case Primitive_Float_TriPath: QBENCHMARK { p->drawPath(s->f_path_tri); } break; - case Primitive_Float_RectPath: QBENCHMARK { p->drawPath(s->f_path_rect); } break; - case Primitive_Float_2RectPath: QBENCHMARK { p->drawPath(s->f_path_2rects); } break; - case Primitive_Float_EllipsePath: QBENCHMARK { p->drawPath(s->f_path_ellipse); } break; - } -} - -void tst_QPainter::drawPrimitives_data_helper(bool fancypens) -{ - QTest::addColumn("type"); - QTest::addColumn("aa"); - QTest::addColumn("dash"); - QTest::addColumn("width"); - - const char * const names[] = { - "IDLine", - "IVLine", - "IHLine", - "IRect", - "IElli", - "IPie", - "IArc", - "IChord", - "ITriPol", - "IRectPol", - "I2RectPol", - "FDLine", - "FVLine", - "FHLine", - "FRect", - "FElli", - "FPie", - "FArc", - "FChord", - "FTriPol", - "FRectPol", - "F2RectPol", - "FTriPa", - "FRectPa", - "F2RectPa", - "FElliPa" - }; - - if (fancypens) { - for (int dash=0; dash<2; ++dash) { - for (int width=0; width<=4; width+=4) { - for (int aa=0; aa<2; ++aa) { - for (int type=0; type("text"); - - QTest::newRow("a") << QString::fromLatin1("a"); - QTest::newRow("ab") << QString::fromLatin1("ab"); - QTest::newRow("abc") << QString::fromLatin1("abc"); - QTest::newRow("abcd") << QString::fromLatin1("abcd"); - QTest::newRow("abcde") << QString::fromLatin1("abcde"); - QTest::newRow("abcdef") << QString::fromLatin1("abcdef"); - QTest::newRow("abcdefg") << QString::fromLatin1("abcdefg"); -} - -void tst_QPainter::drawText() -{ - QFETCH(QString, text); - - QPainter p(m_surface); - - QBENCHMARK { - p.drawText(QPointF(5, 5), text); - } -} - -void tst_QPainter::saveRestore_data() -{ - QTest::addColumn("change"); - - for (int i=0; i<16; ++i) { - QString change = "change="; - if (i == 0) change += " none"; - if (i & ChangePen) change += " pen"; - if (i & ChangeBrush) change += " brush"; - if (i & ChangeClip) change += " clip"; - if (i & ChangeTransform) change += " xform"; - - QTest::newRow(change.toLatin1()) << i; - } -} - -void tst_QPainter::saveRestore() -{ - QFETCH(int, change); - - QPen pen(Qt::blue); - QBrush brush(Qt::green); - QRect r(100, 100, 100, 20); - - QPainter p(m_surface); - - p.setPen(Qt::NoPen); - p.setBrush(Qt::NoBrush); - - QBENCHMARK { - p.save(); - if (change & ChangePen) { p.setPen(pen); p.setPen(Qt::NoPen); } - if (change & ChangeBrush) { p.setBrush(brush); p.setBrush(Qt::NoBrush); } - if (change & ChangeClip) p.setClipRect(r); - if (change & ChangeTransform) { p.scale(3, 5); p.scale(1/3.0, 1/5.0); } - p.drawRect(0, 0, 1, 1); - p.restore(); - }; -} - -enum ClipType { - RectClipType, - RectPathClipType, - RectRegionClipType, - RegionClipType, - PathClipType -}; - -void tst_QPainter::clipAndFill_data() -{ - QTest::addColumn("type"); - - QTest::newRow("rect") << (int) RectClipType; - QTest::newRow("rectpath") << (int) RectPathClipType; - QTest::newRow("rectregion") << (int) RectRegionClipType; - QTest::newRow("ellipseRegion") << (int) RegionClipType; - QTest::newRow("ellipsePath") << (int) PathClipType; -} - - -void tst_QPainter::clipAndFill() -{ - QFETCH(int, type); - - QRegion region; - QPainterPath path; - QRectF rect; - - switch (type) { - case RectClipType: - rect = QRectF(100, 100, 100, 100); - break; - case RectPathClipType: - path.addRect(100, 100, 100, 100); - break; - case RectRegionClipType: - region = QRegion(100, 100, 100, 100); - break; - case RegionClipType: - region = QRegion(100, 100, 100, 100, QRegion::Ellipse); - break; - case PathClipType: - path.addEllipse(100, 100, 100, 100); - break; - } - - QPainter p(m_surface); - - p.setPen(Qt::NoPen); - p.setBrush(Qt::red); - - QBENCHMARK { - if (type == RectClipType) - p.setClipRect(rect); - else if (type == RectPathClipType || type == PathClipType) - p.setClipPath(path); - else - p.setClipRegion(region); - p.drawRect(110, 110, 10, 10); - } -} - -QTransform tst_QPainter::transformForAngle(qreal angle) -{ - const qreal inv_dist_to_plane = 1. / 1024.; - - QTransform transform; - - QTransform rotTrans; - rotTrans.translate(-40, 0); - QTransform rotTrans2; - rotTrans2.translate(40, 0); - - qreal rad = angle * 2. * M_PI / 360.; - qreal c = ::cos(rad); - qreal s = ::sin(rad); - - qreal x = 0; - qreal y = 80; - qreal z = 0; - - qreal len = x * x + y * y + z * z; - if (len != 1.) { - len = ::sqrt(len); - x /= len; - y /= len; - z /= len; - } - - QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*inv_dist_to_plane, - y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*inv_dist_to_plane, - 0, 0, 1); - - transform *= rotTrans; - transform *= rot; - transform *= rotTrans2; - - return transform; -} - -void tst_QPainter::drawRoundedRect() -{ - QImage surface(100, 100, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - - QBENCHMARK { - p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); - } -} - -void tst_QPainter::drawScaledRoundedRect() -{ - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - p.scale(3, 3); - - QBENCHMARK { - p.drawRoundedRect(10, 10, 80, 80, 10, 10); - } -} - -void tst_QPainter::drawTransformedRoundedRect() -{ - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - - QBENCHMARK { - p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); - p.drawRoundedRect(100, 100, 80, 80, 10, 10); - } -} - -void tst_QPainter::drawAntialiasedRoundedRect() -{ - QImage surface(100, 100, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setRenderHint(QPainter::Antialiasing, true); - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - - QBENCHMARK { - p.drawRoundedRect(QRectF(.5, .5, 80, 80), 10, 10); - } -} - -void tst_QPainter::drawScaledAntialiasedRoundedRect_data() -{ - QTest::addColumn("scale"); - - for (float i = 0; i < 3; i += .1) - QTest::newRow(QString(QLatin1String("scale=%1")).arg(i).toLatin1()) << i; -} - -void tst_QPainter::drawScaledAntialiasedRoundedRect() -{ - QFETCH(float, scale); - - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setRenderHint(QPainter::Antialiasing, true); - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - p.scale(scale, scale); - - QBENCHMARK { - p.drawRoundedRect(10, 10, 80, 80, 10, 10); - } -} - -void tst_QPainter::drawTransformedAntialiasedRoundedRect_data() -{ - QTest::addColumn("transform"); - - for (float angle = 0; angle < 360; angle += 10) - QTest::newRow(QString(QLatin1String("angle=%1")).arg(angle).toLatin1()) << transformForAngle(angle); -} - -void tst_QPainter::drawTransformedAntialiasedRoundedRect() -{ - QFETCH(QTransform, transform); - - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - p.setRenderHint(QPainter::Antialiasing, true); - p.setPen(QPen(Qt::black, 1)); - p.setBrush(Qt::red); - - QBENCHMARK { - p.setWorldTransform(transform); - p.drawRoundedRect(100, 100, 80, 80, 10, 10); - } -} - -void tst_QPainter::drawImageRoundedRect() -{ - //setup image - const int radius = 10; - QImage rectImage(81, 81, QImage::Format_ARGB32_Premultiplied); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); - - //setup surface - QImage surface(100, 100, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.drawImage(0,0, rectImage); - } -} - -void tst_QPainter::drawScaledImageRoundedRect_data() -{ - QTest::addColumn("imageType"); - - QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; - QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; -} - -void tst_QPainter::drawScaledImageRoundedRect() -{ - QFETCH(int, imageType); - - //setup image - const int radius = 10; - QImage rectImage(81, 81, (QImage::Format)imageType); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); - - //setup surface - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - p.scale(3, 3); - - QBENCHMARK { - p.drawImage(0,0, rectImage); - } -} - -void tst_QPainter::drawTransformedImageRoundedRect_data() -{ - QTest::addColumn("imageType"); - - QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; - QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; -} - -void tst_QPainter::drawTransformedImageRoundedRect() -{ - QFETCH(int, imageType); - - //setup image - const int radius = 10; - QImage rectImage(81, 81, (QImage::Format)imageType); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - rp.drawRoundedRect(QRectF(.5, .5, 80, 80), radius, radius); - - //setup surface - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); - p.drawImage(100,100, rectImage); - } -} - -//code from QmlGraphicsRectangle for drawing rounded rects -void tst_QPainter::drawBorderPixmapRoundedRect() -{ - //setup image - const int pw = 1; - const int radius = 10; - QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, QImage::Format_ARGB32_Premultiplied); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - if (pw%2) - rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); - else - rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); - QPixmap rectPixmap = QPixmap::fromImage(rectImage); - - //setup surface - QImage surface(100, 100, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - const int pw = 2; - int width = 80; - int height = 80; - - int xOffset = (rectPixmap.width()-1)/2; - int yOffset = (rectPixmap.height()-1)/2; - Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); - Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); - - QMargins margins(xOffset, yOffset, xOffset, yOffset); - QTileRules rules(Qt::StretchTile, Qt::StretchTile); - //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects - qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); - } -} - -void tst_QPainter::drawScaledBorderPixmapRoundedRect_data() -{ - QTest::addColumn("scale"); - QTest::addColumn("imageType"); - - for (float i = 0; i < 3; i += .1) - QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB32_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB32_Premultiplied; - //for (float i = 0; i < 3; i += .1) - // QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied; -} - -//code from QmlGraphicsRectangle for drawing rounded rects -void tst_QPainter::drawScaledBorderPixmapRoundedRect() -{ - QFETCH(float, scale); - QFETCH(int, imageType); - - //setup image - const int pw = 1; - const int radius = 10; - QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - if (pw%2) - rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); - else - rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); - - QPixmap rectPixmap = QPixmap::fromImage(rectImage); - - //setup surface - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - p.scale(scale, scale); - - QBENCHMARK { - const int pw = 2; - int width = 80; - int height = 80; - - int xOffset = (rectPixmap.width()-1)/2; - int yOffset = (rectPixmap.height()-1)/2; - Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); - Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); - - QMargins margins(xOffset, yOffset, xOffset, yOffset); - QTileRules rules(Qt::StretchTile, Qt::StretchTile); - qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); - } -} - -void tst_QPainter::drawTransformedBorderPixmapRoundedRect_data() -{ - QTest::addColumn("transform"); - QTest::addColumn("imageType"); - - for (float angle = 0; angle < 360; angle += 10) - QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB32_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB32_Premultiplied; - //for (float angle = 0; angle < 360; angle += 10) - // QTest::newRow(QString(QLatin1String("angle=%1; imagetype=ARGB8565_Pre")).arg(angle).toLatin1()) << transformForAngle(angle) << (int)QImage::Format_ARGB8565_Premultiplied; - -} - -//code from QmlGraphicsRectangle for drawing rounded rects -void tst_QPainter::drawTransformedBorderPixmapRoundedRect() -{ - QFETCH(QTransform, transform); - QFETCH(int, imageType); - - //setup image - const int pw = 1; - const int radius = 10; - QImage rectImage(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2, (QImage::Format)imageType); - rectImage.fill(0); - QPainter rp(&rectImage); - rp.setRenderHint(QPainter::Antialiasing); - rp.setPen(Qt::black); - rp.setBrush(Qt::red); - if (pw%2) - rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius); - else - rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius); - - QPixmap rectPixmap = QPixmap::fromImage(rectImage); - - //setup surface - QImage surface(400, 400, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.setWorldTransform(transform); - const int pw = 2; - int width = 80; - int height = 80; - - int xOffset = (rectPixmap.width()-1)/2; - int yOffset = (rectPixmap.height()-1)/2; - Q_ASSERT(rectPixmap.width() == 2*xOffset + 1); - Q_ASSERT(rectPixmap.height() == 2*yOffset + 1); - - QMargins margins(xOffset, yOffset, xOffset, yOffset); - QTileRules rules(Qt::StretchTile, Qt::StretchTile); - qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width+pw, height+pw), margins, rectPixmap, rectPixmap.rect(), margins, rules); - } -} - -void tst_QPainter::drawTransformedTransparentImage_data() -{ - QTest::addColumn("imageType"); - - QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; - QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; -} - -void tst_QPainter::drawTransformedTransparentImage() -{ - QFETCH(int, imageType); - - //setup image - QImage transImage(200, 200, (QImage::Format)imageType); - transImage.fill(0); - - //setup surface - QImage surface(200, 200, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); - p.drawImage(0,0, transImage); - } -} - -void tst_QPainter::drawTransformedSemiTransparentImage_data() -{ - QTest::addColumn("imageType"); - - QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; - QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; -} - -void tst_QPainter::drawTransformedSemiTransparentImage() -{ - QFETCH(int, imageType); - - //setup image - QImage transImage(200, 200, (QImage::Format)imageType); - transImage.fill(QColor(0,0,0, 128).rgba()); - - //setup surface - QImage surface(200, 200, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); - p.drawImage(0,0, transImage); - } -} - -void tst_QPainter::drawTransformedFilledImage_data() -{ - QTest::addColumn("imageType"); - - QTest::newRow("imagetype=ARGB32_Pre") << (int)QImage::Format_ARGB32_Premultiplied; - QTest::newRow("imagetype=ARGB8565_Pre") << (int)QImage::Format_ARGB8565_Premultiplied; -} - -void tst_QPainter::drawTransformedFilledImage() -{ - QFETCH(int, imageType); - - //setup image - QImage filledImage(200, 200, (QImage::Format)imageType); - filledImage.fill(QColor(0,0,0).rgb()); - - //setup surface - QImage surface(200, 200, QImage::Format_RGB16); - surface.fill(QColor(255,255,255).rgb()); - QPainter p(&surface); - - QBENCHMARK { - p.setWorldTransform(QTransform(0.956957, 0, 0.000704124, 0, 1, 0, 16.141, 0, 0.735953)); - p.drawImage(0,0, filledImage); - } -} - - -QTEST_MAIN(tst_QPainter) - -#include "tst_qpainter.moc" diff --git a/tests/benchmarks/qpixmap/qpixmap.pro b/tests/benchmarks/qpixmap/qpixmap.pro deleted file mode 100644 index e8330bd..0000000 --- a/tests/benchmarks/qpixmap/qpixmap.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qpixmap - -SOURCES += tst_qpixmap.cpp diff --git a/tests/benchmarks/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/qpixmap/tst_qpixmap.cpp deleted file mode 100644 index 9ffbefb..0000000 --- a/tests/benchmarks/qpixmap/tst_qpixmap.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include - -class tst_QPixmap : public QObject -{ - Q_OBJECT - -public: - tst_QPixmap(); - -private slots: - void fill_data(); - void fill(); - - void scaled_data(); - void scaled(); - void transformed_data(); - void transformed(); - void mask_data(); - void mask(); -}; - -Q_DECLARE_METATYPE(QImage::Format) -Q_DECLARE_METATYPE(Qt::AspectRatioMode) -Q_DECLARE_METATYPE(Qt::TransformationMode) - -tst_QPixmap::tst_QPixmap() -{ -} - -void tst_QPixmap::fill_data() -{ - QTest::addColumn("opaque"); - QTest::addColumn("width"); - QTest::addColumn("height"); - - QTest::newRow("opaque 16x16") << true << 16 << 16; - QTest::newRow("!opaque 16x16") << false << 16 << 16; - QTest::newRow("opaque 587x128") << true << 587 << 128; - QTest::newRow("!opaque 587x128") << false << 587 << 128; -} - -void tst_QPixmap::fill() -{ - QFETCH(bool, opaque); - QFETCH(int, width); - QFETCH(int, height); - - const QColor color = opaque ? QColor(255, 0, 0) : QColor(255, 0, 0, 200); - QPixmap pixmap(width, height); - - QBENCHMARK { - pixmap.fill(color); - } -} - -void tst_QPixmap::scaled_data() -{ - QTest::addColumn("size"); - QTest::addColumn("scale"); - QTest::addColumn("ratioMode"); - QTest::addColumn("transformMode"); - - QTest::newRow("16x16 => 32x32") << QSize(16, 16) << QSize(32, 32) - << Qt::IgnoreAspectRatio - << Qt::FastTransformation; - QTest::newRow("100x100 => 200x200") << QSize(100, 100) << QSize(200, 200) - << Qt::IgnoreAspectRatio - << Qt::FastTransformation; - QTest::newRow("100x100 => 200x200") << QSize(100, 100) << QSize(200, 200) - << Qt::IgnoreAspectRatio - << Qt::FastTransformation; - QTest::newRow("80x80 => 200x200") << QSize(137, 137) << QSize(200, 200) - << Qt::IgnoreAspectRatio - << Qt::FastTransformation; - -} - -void tst_QPixmap::scaled() -{ - QFETCH(QSize, size); - QFETCH(QSize, scale); - QFETCH(Qt::AspectRatioMode, ratioMode); - QFETCH(Qt::TransformationMode, transformMode); - - QPixmap opaque(size); - QPixmap transparent(size); - opaque.fill(QColor(255, 0, 0)); - transparent.fill(QColor(255, 0, 0, 200)); - - QPixmap scaled1; - QPixmap scaled2; - QBENCHMARK { - scaled1 = opaque.scaled(scale, ratioMode, transformMode); - scaled2 = transparent.scaled(scale, ratioMode, transformMode); - } -} - -void tst_QPixmap::transformed_data() -{ - QTest::addColumn("size"); - QTest::addColumn("transform"); - QTest::addColumn("transformMode"); - - QTest::newRow("16x16 rotate(90)") << QSize(16, 16) - << QTransform().rotate(90) - << Qt::FastTransformation; - QTest::newRow("16x16 rotate(199)") << QSize(16, 16) - << QTransform().rotate(199) - << Qt::FastTransformation; - QTest::newRow("16x16 shear(2,1)") << QSize(16, 16) - << QTransform().shear(2, 1) - << Qt::FastTransformation; - QTest::newRow("16x16 rotate(199).shear(2,1)") << QSize(16, 16) - << QTransform().rotate(199).shear(2, 1) - << Qt::FastTransformation; - QTest::newRow("100x100 rotate(90)") << QSize(100, 100) - << QTransform().rotate(90) - << Qt::FastTransformation; - QTest::newRow("100x100 rotate(199)") << QSize(100, 100) - << QTransform().rotate(199) - << Qt::FastTransformation; - QTest::newRow("100x100 shear(2,1)") << QSize(100, 100) - << QTransform().shear(2, 1) - << Qt::FastTransformation; - QTest::newRow("100x100 shear(2,1) smooth") << QSize(100, 100) - << QTransform().shear(2, 1) - << Qt::SmoothTransformation; - QTest::newRow("100x100 rotate(199).shear(2,1)") << QSize(100, 100) - << QTransform().rotate(199).shear(2, 1) - << Qt::FastTransformation; -} - -void tst_QPixmap::transformed() -{ - QFETCH(QSize, size); - QFETCH(QTransform, transform); - QFETCH(Qt::TransformationMode, transformMode); - - QPixmap opaque(size); - QPixmap transparent(size); - opaque.fill(QColor(255, 0, 0)); - transparent.fill(QColor(255, 0, 0, 200)); - - QPixmap transformed1; - QPixmap transformed2; - QBENCHMARK { - transformed1 = opaque.transformed(transform, transformMode); - transformed2 = transparent.transformed(transform, transformMode); - } -} - -void tst_QPixmap::mask_data() -{ - QTest::addColumn("size"); - - QTest::newRow("1x1") << QSize(1, 1); - QTest::newRow("9x9") << QSize(9, 9); - QTest::newRow("16x16") << QSize(16, 16); - QTest::newRow("128x128") << QSize(128, 128); - QTest::newRow("333x333") << QSize(333, 333); - QTest::newRow("2048x128") << QSize(2048, 128); -} - -void tst_QPixmap::mask() -{ - QFETCH(QSize, size); - - QPixmap src(size); - src.fill(Qt::transparent); - { - QPainter p(&src); - p.drawLine(QPoint(0, 0), QPoint(src.width(), src.height())); - } - - QBENCHMARK { - QBitmap bitmap = src.mask(); - QVERIFY(bitmap.size() == src.size()); - } -} - -QTEST_MAIN(tst_QPixmap) - -#include "tst_qpixmap.moc" diff --git a/tests/benchmarks/qpixmapcache/qpixmapcache.pro b/tests/benchmarks/qpixmapcache/qpixmapcache.pro deleted file mode 100644 index e0d7543..0000000 --- a/tests/benchmarks/qpixmapcache/qpixmapcache.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qpixmapcache -TEMPLATE = app -# Input -SOURCES += tst_qpixmapcache.cpp diff --git a/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp deleted file mode 100644 index 1031ba7..0000000 --- a/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -//TESTED_FILES= - -class tst_QPixmapCache : public QObject -{ - Q_OBJECT - -public: - tst_QPixmapCache(); - virtual ~tst_QPixmapCache(); - -public slots: - void init(); - void cleanup(); - -private slots: - void insert_data(); - void insert(); - void find_data(); - void find(); - void styleUseCaseComplexKey(); - void styleUseCaseComplexKey_data(); -}; - -tst_QPixmapCache::tst_QPixmapCache() -{ -} - -tst_QPixmapCache::~tst_QPixmapCache() -{ -} - -void tst_QPixmapCache::init() -{ -} - -void tst_QPixmapCache::cleanup() -{ -} - -void tst_QPixmapCache::insert_data() -{ - QTest::addColumn("cacheType"); - QTest::newRow("QPixmapCache") << true; - QTest::newRow("QPixmapCache (int API)") << false; -} - -QList keys; - -void tst_QPixmapCache::insert() -{ - QFETCH(bool, cacheType); - QPixmap p; - if (cacheType) { - QBENCHMARK { - for (int i = 0 ; i <= 10000 ; i++) - { - QString tmp; - tmp.sprintf("my-key-%d", i); - QPixmapCache::insert(tmp, p); - } - } - } else { - QBENCHMARK { - for (int i = 0 ; i <= 10000 ; i++) - keys.append(QPixmapCache::insert(p)); - } - } -} - -void tst_QPixmapCache::find_data() -{ - QTest::addColumn("cacheType"); - QTest::newRow("QPixmapCache") << true; - QTest::newRow("QPixmapCache (int API)") << false; -} - -void tst_QPixmapCache::find() -{ - QFETCH(bool, cacheType); - QPixmap p; - if (cacheType) { - QBENCHMARK { - QString tmp; - for (int i = 0 ; i <= 10000 ; i++) - { - tmp.sprintf("my-key-%d", i); - QPixmapCache::find(tmp, p); - } - } - } else { - QBENCHMARK { - for (int i = 0 ; i <= 10000 ; i++) - QPixmapCache::find(keys.at(i), &p); - } - } - -} - -void tst_QPixmapCache::styleUseCaseComplexKey_data() -{ - QTest::addColumn("cacheType"); - QTest::newRow("QPixmapCache") << true; - QTest::newRow("QPixmapCache (int API)") << false; -} - -struct styleStruct { - QString key; - uint state; - uint direction; - uint complex; - uint palette; - int width; - int height; - bool operator==(const styleStruct &str) const - { - return str.state == state && str.direction == direction - && str.complex == complex && str.palette == palette && str.width == width - && str.height == height && str.key == key; - } -}; - -uint qHash(const styleStruct &myStruct) -{ - return qHash(myStruct.state); -} - -void tst_QPixmapCache::styleUseCaseComplexKey() -{ - QFETCH(bool, cacheType); - QPixmap p; - if (cacheType) { - QBENCHMARK { - for (int i = 0 ; i <= 10000 ; i++) - { - QString tmp; - tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200); - QPixmapCache::insert(tmp, p); - } - - for (int i = 0 ; i <= 10000 ; i++) - { - QString tmp; - tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200); - QPixmapCache::find(tmp, p); - } - } - } else { - QHash hash; - QBENCHMARK { - for (int i = 0 ; i <= 10000 ; i++) - { - styleStruct myStruct; - myStruct.key = QString("my-progressbar-%1").arg(i); - myStruct.key = 5; - myStruct.key = 4; - myStruct.key = 3; - myStruct.palette = 358; - myStruct.width = 100; - myStruct.key = 200; - QPixmapCache::Key key = QPixmapCache::insert(p); - hash.insert(myStruct, key); - } - for (int i = 0 ; i <= 10000 ; i++) - { - styleStruct myStruct; - myStruct.key = QString("my-progressbar-%1").arg(i); - myStruct.key = 5; - myStruct.key = 4; - myStruct.key = 3; - myStruct.palette = 358; - myStruct.width = 100; - myStruct.key = 200; - QPixmapCache::Key key = hash.value(myStruct); - QPixmapCache::find(key, &p); - } - } - } - -} - - -QTEST_MAIN(tst_QPixmapCache) -#include "tst_qpixmapcache.moc" diff --git a/tests/benchmarks/qquaternion/qquaternion.pro b/tests/benchmarks/qquaternion/qquaternion.pro deleted file mode 100644 index cd68423..0000000 --- a/tests/benchmarks/qquaternion/qquaternion.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qquaternion - -SOURCES += tst_qquaternion.cpp - diff --git a/tests/benchmarks/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/qquaternion/tst_qquaternion.cpp deleted file mode 100644 index 7930092..0000000 --- a/tests/benchmarks/qquaternion/tst_qquaternion.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -//TESTED_FILES= - -class tst_QQuaternion : public QObject -{ - Q_OBJECT - -public: - tst_QQuaternion(); - virtual ~tst_QQuaternion(); - -public slots: - void init(); - void cleanup(); - -private slots: - void multiply_data(); - void multiply(); -}; - -tst_QQuaternion::tst_QQuaternion() -{ -} - -tst_QQuaternion::~tst_QQuaternion() -{ -} - -void tst_QQuaternion::init() -{ -} - -void tst_QQuaternion::cleanup() -{ -} - -void tst_QQuaternion::multiply_data() -{ - QTest::addColumn("x1"); - QTest::addColumn("y1"); - QTest::addColumn("z1"); - QTest::addColumn("w1"); - QTest::addColumn("x2"); - QTest::addColumn("y2"); - QTest::addColumn("z2"); - QTest::addColumn("w2"); - - QTest::newRow("null") - << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f - << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f; - - QTest::newRow("unitvec") - << (qreal)1.0f << (qreal)0.0f << (qreal)0.0f << (qreal)1.0f - << (qreal)0.0f << (qreal)1.0f << (qreal)0.0f << (qreal)1.0f; - - QTest::newRow("complex") - << (qreal)1.0f << (qreal)2.0f << (qreal)3.0f << (qreal)7.0f - << (qreal)4.0f << (qreal)5.0f << (qreal)6.0f << (qreal)8.0f; -} - -void tst_QQuaternion::multiply() -{ - QFETCH(qreal, x1); - QFETCH(qreal, y1); - QFETCH(qreal, z1); - QFETCH(qreal, w1); - QFETCH(qreal, x2); - QFETCH(qreal, y2); - QFETCH(qreal, z2); - QFETCH(qreal, w2); - - QQuaternion q1(w1, x1, y1, z1); - QQuaternion q2(w2, x2, y2, z2); - - QBENCHMARK { - QQuaternion q3 = q1 * q2; - } -} - -QTEST_MAIN(tst_QQuaternion) -#include "tst_qquaternion.moc" diff --git a/tests/benchmarks/qrect/main.cpp b/tests/benchmarks/qrect/main.cpp deleted file mode 100644 index e293bfa..0000000 --- a/tests/benchmarks/qrect/main.cpp +++ /dev/null @@ -1,329 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -// This file contains benchmarks for QRect/QRectF functions. - -#include -#include - -class tst_qrect : public QObject -{ - Q_OBJECT -private slots: - // QRect functions: - void contains_point_data(); - void contains_point(); - void contains_rect_data(); - void contains_rect(); - void intersects_data(); - void intersects(); - void intersected_data(); - void intersected(); - void united_data(); - void united(); - - // QRectF functions: - void contains_point_f_data(); - void contains_point_f(); - void contains_rect_f_data(); - void contains_rect_f(); - void intersects_f_data(); - void intersects_f(); - void intersected_f_data(); - void intersected_f(); - void united_f_data(); - void united_f(); -}; - -struct RectRectCombination -{ - QString tag; - qreal x1, y1, w1, h1, x2, y2, w2, h2; - RectRectCombination( - const QString &tag, - const qreal x1, const qreal y1, const qreal w1, const qreal h1, - const qreal x2, const qreal y2, const qreal w2, const qreal h2) - : tag(tag), x1(x1), y1(y1), w1(w1), h1(h1), x2(x2), y2(y2), w2(w2), h2(h2) {} -}; - -static QList createRectRectCombinations() -{ - QList result; - result << RectRectCombination("null", 0, 0, 0, 0, 0, 0, 0, 0); - result << RectRectCombination("null1", 0, 0, 0, 0, 0, 0, 10, 10); - result << RectRectCombination("null2", 0, 0, 10, 10, 0, 0, 0, 0); - - result << RectRectCombination("miss", 0, 0, 10, 10, 11, 11, 10, 10); - result << RectRectCombination("intersect", 0, 0, 10, 10, 5, 5, 10, 10); - result << RectRectCombination("contain1", 0, 0, 10, 10, 1, 1, 8, 8); - result << RectRectCombination("contain2", 1, 1, 8, 8, 0, 0, 10, 10); - - result << RectRectCombination("miss_flip1", 9, 9, -10, -10, 11, 11, 10, 10); - result << RectRectCombination("intersect_flip1", 9, 9, -10, -10, 5, 5, 10, 10); - result << RectRectCombination("contain1_flip1", 9, 9, -10, -10, 1, 1, 8, 8); - result << RectRectCombination("contain2_flip1", 8, 8, -8, -8, 0, 0, 10, 10); - - result << RectRectCombination("miss_flip2", 0, 0, 10, 10, 20, 20, -10, -10); - result << RectRectCombination("intersect_flip2", 0, 0, 10, 10, 14, 14, -10, -10); - result << RectRectCombination("contain1_flip2", 0, 0, 10, 10, 8, 8, -8, -8); - result << RectRectCombination("contain2_flip2", 1, 1, 8, 8, 9, 9, -10, -10); - - return result; -} - -static void addRectRectData(bool includeProperArg = false) -{ - QTest::addColumn("rf1"); - QTest::addColumn("rf2"); - if (includeProperArg) - QTest::addColumn("proper"); - for (int i = 0; i < (includeProperArg ? 2 : 1); ++i) { - QList combinations = createRectRectCombinations(); - foreach (RectRectCombination c, combinations) { - QTestData &testData = QTest::newRow(c.tag.toLatin1().data()); - QRectF r1(c.x1, c.y1, c.w1, c.h1); - QRectF r2(c.x2, c.y2, c.w2, c.h2); - testData << r1 << r2; - if (includeProperArg) - testData << (i == 0); - } - } -} - -struct RectPointCombination -{ - QString tag; - qreal x, y, w, h, px, py; - RectPointCombination( - const QString &tag, - const qreal x, const qreal y, const qreal w, const qreal h, const qreal px, const qreal py) - : tag(tag), x(x), y(y), w(w), h(h), px(px), py(py) {} -}; - -static QList createRectPointCombinations() -{ - QList result; - result << RectPointCombination("null", 0, 0, 0, 0, 0, 0); - - result << RectPointCombination("miss", 0, 0, 10, 10, -1, -1); - result << RectPointCombination("contain", 0, 0, 10, 10, 0, 0); - result << RectPointCombination("contain_proper", 0, 0, 10, 10, 1, 1); - - result << RectPointCombination("miss_flip", 9, 9, -10, -10, -1, -1); - result << RectPointCombination("contain_flip", 9, 9, -10, -10, 0, 0); - result << RectPointCombination("contain_flip_proper", 9, 9, -10, -10, 1, 1); - - return result; -} - -static void addRectPointData(bool includeProperArg = false) -{ - QTest::addColumn("rf"); - QTest::addColumn("pf"); - if (includeProperArg) - QTest::addColumn("proper"); - for (int i = 0; i < (includeProperArg ? 2 : 1); ++i) { - QList combinations = createRectPointCombinations(); - foreach (RectPointCombination c, combinations) { - QTestData &testData = QTest::newRow(c.tag.toLatin1().data()); - QRectF r(c.x, c.y, c.w, c.h); - QPointF p(c.px, c.py); - testData << r << p; - if (includeProperArg) - testData << (i == 0); - } - } -} - -void tst_qrect::contains_point_data() -{ - addRectPointData(true); -} - -void tst_qrect::contains_point() -{ - QFETCH(QRectF, rf); - QFETCH(QPointF, pf); - QFETCH(bool, proper); - QRect r(rf.toRect()); - QPoint p(pf.toPoint()); - QBENCHMARK { - r.contains(p, proper); - } -} - -void tst_qrect::contains_rect_data() -{ - addRectRectData(true); -} - -void tst_qrect::contains_rect() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QFETCH(bool, proper); - QRect r1(rf1.toRect()); - QRect r2(rf2.toRect()); - QBENCHMARK { - r1.contains(r2, proper); - } -} - -void tst_qrect::intersects_data() -{ - addRectRectData(); -} - -void tst_qrect::intersects() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QRect r1(rf1.toRect()); - QRect r2(rf2.toRect()); - QBENCHMARK { - r1.intersects(r2); - } -} - -void tst_qrect::intersected_data() -{ - addRectRectData(); -} - -void tst_qrect::intersected() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QRect r1(rf1.toRect()); - QRect r2(rf2.toRect()); - QBENCHMARK { - r1.intersected(r2); - } -} - -void tst_qrect::united_data() -{ - addRectRectData(); -} - -void tst_qrect::united() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QRect r1(rf1.toRect()); - QRect r2(rf2.toRect()); - QBENCHMARK { - r1.united(r2); - } -} - -void tst_qrect::contains_point_f_data() -{ - addRectPointData(); -} - -void tst_qrect::contains_point_f() -{ - QFETCH(QRectF, rf); - QFETCH(QPointF, pf); - QBENCHMARK { - rf.contains(pf); - } -} - -void tst_qrect::contains_rect_f_data() -{ - addRectRectData(); -} - -void tst_qrect::contains_rect_f() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QBENCHMARK { - rf1.contains(rf2); - } -} - -void tst_qrect::intersects_f_data() -{ - addRectRectData(); -} - -void tst_qrect::intersects_f() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QBENCHMARK { - rf1.intersects(rf2); - } -} - -void tst_qrect::intersected_f_data() -{ - addRectRectData(); -} - -void tst_qrect::intersected_f() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QBENCHMARK { - rf1.intersected(rf2); - } -} - -void tst_qrect::united_f_data() -{ - addRectRectData(); -} - -void tst_qrect::united_f() -{ - QFETCH(QRectF, rf1); - QFETCH(QRectF, rf2); - QBENCHMARK { - rf1.united(rf2); - } -} - -QTEST_MAIN(tst_qrect) - -#include "main.moc" diff --git a/tests/benchmarks/qrect/qrect.pro b/tests/benchmarks/qrect/qrect.pro deleted file mode 100644 index 6e35119..0000000 --- a/tests/benchmarks/qrect/qrect.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qrect -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qregexp/main.cpp b/tests/benchmarks/qregexp/main.cpp deleted file mode 100644 index ab9ed71..0000000 --- a/tests/benchmarks/qregexp/main.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include - -#include - - -class tst_qregexp : public QObject -{ - Q_OBJECT -private slots: - void escape_old(); - void escape_old_data() { escape_data(); } - void escape_new1(); - void escape_new1_data() { escape_data(); } - void escape_new2(); - void escape_new2_data() { escape_data(); } - void escape_new3(); - void escape_new3_data() { escape_data(); } - void escape_new4(); - void escape_new4_data() { escape_data(); } -private: - void escape_data(); -}; - - -static void verify(const QString "ed, const QString &expected) -{ - if (quoted != expected) - qDebug() << "ERROR:" << quoted << expected; -} - -void tst_qregexp::escape_data() -{ - QTest::addColumn("pattern"); - QTest::addColumn("expected"); - - QTest::newRow("escape 0") << "Hello world" << "Hello world"; - QTest::newRow("escape 1") << "(Hello world)" << "\\(Hello world\\)"; - { - QString s; - for (int i = 0; i < 10; ++i) - s += "(escape)"; - QTest::newRow("escape 10") << s << QRegExp::escape(s); - } - { - QString s; - for (int i = 0; i < 100; ++i) - s += "(escape)"; - QTest::newRow("escape 100") << s << QRegExp::escape(s); - } -} - -void tst_qregexp::escape_old() -{ - QFETCH(QString, pattern); - QFETCH(QString, expected); - - QBENCHMARK { - static const char meta[] = "$()*+.?[\\]^{|}"; - QString quoted = pattern; - int i = 0; - - while (i < quoted.length()) { - if (strchr(meta, quoted.at(i).toLatin1()) != 0) - quoted.insert(i++, QLatin1Char('\\')); - ++i; - } - - verify(quoted, expected); - } -} - -void tst_qregexp::escape_new1() -{ - QFETCH(QString, pattern); - QFETCH(QString, expected); - - QBENCHMARK { - QString quoted; - const int count = pattern.count(); - quoted.reserve(count * 2); - const QLatin1Char backslash('\\'); - for (int i = 0; i < count; i++) { - switch (pattern.at(i).toLatin1()) { - case '$': - case '(': - case ')': - case '*': - case '+': - case '.': - case '?': - case '[': - case '\\': - case ']': - case '^': - case '{': - case '|': - case '}': - quoted.append(backslash); - } - quoted.append(pattern.at(i)); - } - verify(quoted, expected); - } -} - -void tst_qregexp::escape_new2() -{ - QFETCH(QString, pattern); - QFETCH(QString, expected); - - QBENCHMARK { - int count = pattern.count(); - const QLatin1Char backslash('\\'); - QString quoted(count * 2, backslash); - const QChar *patternData = pattern.data(); - QChar *quotedData = quoted.data(); - int escaped = 0; - for ( ; --count >= 0; ++patternData) { - const QChar c = *patternData; - switch (c.unicode()) { - case '$': - case '(': - case ')': - case '*': - case '+': - case '.': - case '?': - case '[': - case '\\': - case ']': - case '^': - case '{': - case '|': - case '}': - ++escaped; - ++quotedData; - } - *quotedData = c; - ++quotedData; - } - quoted.resize(pattern.size() + escaped); - - verify(quoted, expected); - } -} - -void tst_qregexp::escape_new3() -{ - QFETCH(QString, pattern); - QFETCH(QString, expected); - - QBENCHMARK { - QString quoted; - const int count = pattern.count(); - quoted.reserve(count * 2); - const QLatin1Char backslash('\\'); - for (int i = 0; i < count; i++) { - switch (pattern.at(i).toLatin1()) { - case '$': - case '(': - case ')': - case '*': - case '+': - case '.': - case '?': - case '[': - case '\\': - case ']': - case '^': - case '{': - case '|': - case '}': - quoted += backslash; - } - quoted += pattern.at(i); - } - - verify(quoted, expected); - } -} - - -static inline bool needsEscaping(int c) -{ - switch (c) { - case '$': - case '(': - case ')': - case '*': - case '+': - case '.': - case '?': - case '[': - case '\\': - case ']': - case '^': - case '{': - case '|': - case '}': - return true; - } - return false; -} - -void tst_qregexp::escape_new4() -{ - QFETCH(QString, pattern); - QFETCH(QString, expected); - - QBENCHMARK { - const int n = pattern.size(); - const QChar *patternData = pattern.data(); - // try to prevent copy if no escape is needed - int i = 0; - for (int i = 0; i != n; ++i) { - const QChar c = patternData[i]; - if (needsEscaping(c.unicode())) - break; - } - if (i == n) { - verify(pattern, expected); - // no escaping needed, "return pattern" should be done here. - return; - } - const QLatin1Char backslash('\\'); - QString quoted(n * 2, backslash); - QChar *quotedData = quoted.data(); - for (int j = 0; j != i; ++j) - *quotedData++ = *patternData++; - int escaped = 0; - for (; i != n; ++i) { - const QChar c = *patternData; - if (needsEscaping(c.unicode())) { - ++escaped; - ++quotedData; - } - *quotedData = c; - ++quotedData; - ++patternData; - } - quoted.resize(n + escaped); - verify(quoted, expected); - // "return quoted" - } -} -QTEST_MAIN(tst_qregexp) - -#include "main.moc" diff --git a/tests/benchmarks/qregexp/qregexp.pro b/tests/benchmarks/qregexp/qregexp.pro deleted file mode 100644 index 83d723c..0000000 --- a/tests/benchmarks/qregexp/qregexp.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qregexp -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qregion/main.cpp b/tests/benchmarks/qregion/main.cpp deleted file mode 100644 index 3d16e41..0000000 --- a/tests/benchmarks/qregion/main.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -// This file contains benchmarks for QRegion functions. - -#include -#include - -class tst_qregion : public QObject -{ - Q_OBJECT -private slots: - void map_data(); - void map(); -}; - - -void tst_qregion::map_data() -{ - QTest::addColumn("region"); - - { - QRegion region(0, 0, 100, 100); - QTest::newRow("single rect") << region; - } - { - QRegion region; - region = region.united(QRect(0, 0, 100, 100)); - region = region.united(QRect(120, 20, 100, 100)); - - QTest::newRow("two rects") << region; - } - { - QRegion region(0, 0, 100, 100, QRegion::Ellipse); - QTest::newRow("ellipse") << region; - } -} - -void tst_qregion::map() -{ - QFETCH(QRegion, region); - - QTransform transform; - transform.rotate(30); - QBENCHMARK { - transform.map(region); - } -} - -QTEST_MAIN(tst_qregion) - -#include "main.moc" diff --git a/tests/benchmarks/qregion/qregion.pro b/tests/benchmarks/qregion/qregion.pro deleted file mode 100644 index fc67177..0000000 --- a/tests/benchmarks/qregion/qregion.pro +++ /dev/null @@ -1,10 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qregion -DEPENDPATH += . -INCLUDEPATH += . - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qscriptclass/qscriptclass.pro b/tests/benchmarks/qscriptclass/qscriptclass.pro deleted file mode 100644 index f0ffeb7..0000000 --- a/tests/benchmarks/qscriptclass/qscriptclass.pro +++ /dev/null @@ -1,7 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qscriptclass - -SOURCES += tst_qscriptclass.cpp - -QT += script diff --git a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp b/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp deleted file mode 100644 index 7985028..0000000 --- a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp +++ /dev/null @@ -1,511 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -Q_DECLARE_METATYPE(QScriptContext*) -Q_DECLARE_METATYPE(QScriptValue) -Q_DECLARE_METATYPE(QScriptValueList) - -//TESTED_FILES= - -class TestClass : public QScriptClass -{ -public: - struct CustomProperty { - QueryFlags qflags; - uint id; - QScriptValue::PropertyFlags pflags; - QScriptValue value; - - CustomProperty(QueryFlags qf, uint i, QScriptValue::PropertyFlags pf, - const QScriptValue &val) - : qflags(qf), id(i), pflags(pf), value(val) { } - }; - - enum CallableMode { - NotCallable, - CallableReturnsSum, - CallableReturnsArgument, - CallableReturnsInvalidVariant - }; - - TestClass(QScriptEngine *engine); - ~TestClass(); - - void addCustomProperty(const QScriptString &name, QueryFlags qflags, - uint id, QScriptValue::PropertyFlags pflags, - const QScriptValue &value); - void removeCustomProperty(const QScriptString &name); - - QueryFlags queryProperty(const QScriptValue &object, - const QScriptString &name, - QueryFlags flags, uint *id); - - QScriptValue property(const QScriptValue &object, - const QScriptString &name, uint id); - - void setProperty(QScriptValue &object, const QScriptString &name, - uint id, const QScriptValue &value); - - QScriptValue::PropertyFlags propertyFlags( - const QScriptValue &object, const QScriptString &name, uint id); - - QScriptClassPropertyIterator *newIterator(const QScriptValue &object); - - QScriptValue prototype() const; - - QString name() const; - - bool supportsExtension(Extension extension) const; - QVariant extension(Extension extension, - const QVariant &argument = QVariant()); - - void setIterationEnabled(bool enable); - bool isIterationEnabled() const; - - void setCallableMode(CallableMode mode); - CallableMode callableMode() const; - - void setHasInstance(bool hasInstance); - bool hasInstance() const; - -private: - inline CustomProperty *findCustomProperty(const QScriptString &name); - - QHash customProperties; - - QScriptValue m_prototype; - bool m_iterationEnabled; - CallableMode m_callableMode; - bool m_hasInstance; -}; - -class TestClassPropertyIterator : public QScriptClassPropertyIterator -{ -public: - TestClassPropertyIterator(const QHash &props, - const QScriptValue &object); - ~TestClassPropertyIterator(); - - bool hasNext() const; - void next(); - - bool hasPrevious() const; - void previous(); - - void toFront(); - void toBack(); - - QScriptString name() const; - uint id() const; - QScriptValue::PropertyFlags flags() const; - -private: - int m_index; - int m_last; - QHash m_props; -}; - -TestClass::TestClass(QScriptEngine *engine) - : QScriptClass(engine), m_iterationEnabled(true), - m_callableMode(NotCallable), m_hasInstance(false) -{ - m_prototype = engine->newObject(); -} - -TestClass::~TestClass() -{ - qDeleteAll(customProperties); -} - -TestClass::CustomProperty* TestClass::findCustomProperty(const QScriptString &name) -{ - QHash::const_iterator it; - it = customProperties.constFind(name); - if (it == customProperties.constEnd()) - return 0; - return it.value(); - -} - -void TestClass::addCustomProperty(const QScriptString &name, QueryFlags qflags, - uint id, QScriptValue::PropertyFlags pflags, - const QScriptValue &value) -{ - customProperties.insert(name, new CustomProperty(qflags, id, pflags, value)); -} - -void TestClass::removeCustomProperty(const QScriptString &name) -{ - CustomProperty *prop = customProperties.take(name); - if (prop) - delete prop; -} - -QScriptClass::QueryFlags TestClass::queryProperty(const QScriptValue &/*object*/, - const QScriptString &name, - QueryFlags flags, uint *id) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return 0; - *id = prop->id; - return prop->qflags & flags; -} - -QScriptValue TestClass::property(const QScriptValue &/*object*/, - const QScriptString &name, uint /*id*/) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return QScriptValue(); - return prop->value; -} - -void TestClass::setProperty(QScriptValue &/*object*/, const QScriptString &name, - uint /*id*/, const QScriptValue &value) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return; - prop->value = value; -} - -QScriptValue::PropertyFlags TestClass::propertyFlags( - const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return 0; - return prop->pflags; -} - -QScriptClassPropertyIterator *TestClass::newIterator(const QScriptValue &object) -{ - if (!m_iterationEnabled) - return 0; - return new TestClassPropertyIterator(customProperties, object); -} - -QScriptValue TestClass::prototype() const -{ - return m_prototype; -} - -QString TestClass::name() const -{ - return QLatin1String("TestClass"); -} - -bool TestClass::supportsExtension(Extension extension) const -{ - if (extension == Callable) - return (m_callableMode != NotCallable); - if (extension == HasInstance) - return m_hasInstance; - return false; -} - -QVariant TestClass::extension(Extension extension, - const QVariant &argument) -{ - if (extension == Callable) { - Q_ASSERT(m_callableMode != NotCallable); - QScriptContext *ctx = qvariant_cast(argument); - if (m_callableMode == CallableReturnsSum) { - qsreal sum = 0; - for (int i = 0; i < ctx->argumentCount(); ++i) - sum += ctx->argument(i).toNumber(); - QScriptValueIterator it(ctx->thisObject()); - while (it.hasNext()) { - it.next(); - sum += it.value().toNumber(); - } - return sum; - } else if (m_callableMode == CallableReturnsArgument) { - return qVariantFromValue(ctx->argument(0)); - } else if (m_callableMode == CallableReturnsInvalidVariant) { - return QVariant(); - } - } else if (extension == HasInstance) { - Q_ASSERT(m_hasInstance); - QScriptValueList args = qvariant_cast(argument); - QScriptValue obj = args.at(0); - QScriptValue value = args.at(1); - return value.property("foo").equals(obj.property("foo")); - } - return QVariant(); -} - -void TestClass::setIterationEnabled(bool enable) -{ - m_iterationEnabled = enable; -} - -bool TestClass::isIterationEnabled() const -{ - return m_iterationEnabled; -} - -void TestClass::setCallableMode(CallableMode mode) -{ - m_callableMode = mode; -} - -TestClass::CallableMode TestClass::callableMode() const -{ - return m_callableMode; -} - -void TestClass::setHasInstance(bool hasInstance) -{ - m_hasInstance = hasInstance; -} - -bool TestClass::hasInstance() const -{ - return m_hasInstance; -} - -TestClassPropertyIterator::TestClassPropertyIterator(const QHash &props, - const QScriptValue &object) - : QScriptClassPropertyIterator(object) -{ - m_props = props; - toFront(); -} - -TestClassPropertyIterator::~TestClassPropertyIterator() -{ -} - -bool TestClassPropertyIterator::hasNext() const -{ - return m_index < m_props.size(); -} - -void TestClassPropertyIterator::next() -{ - m_last = m_index; - ++m_index; -} - -bool TestClassPropertyIterator::hasPrevious() const -{ - return m_index > 0; -} - -void TestClassPropertyIterator::previous() -{ - --m_index; - m_last = m_index; -} - -void TestClassPropertyIterator::toFront() -{ - m_index = 0; - m_last = -1; -} - -void TestClassPropertyIterator::toBack() -{ - m_index = m_props.size(); - m_last = -1; -} - -QScriptString TestClassPropertyIterator::name() const -{ - return m_props.keys().value(m_last); -} - -uint TestClassPropertyIterator::id() const -{ - QScriptString key = m_props.keys().value(m_last); - if (!key.isValid()) - return 0; - TestClass::CustomProperty *prop = m_props.value(key); - return prop->id; -} - -QScriptValue::PropertyFlags TestClassPropertyIterator::flags() const -{ - QScriptString key = m_props.keys().value(m_last); - if (!key.isValid()) - return 0; - TestClass::CustomProperty *prop = m_props.value(key); - return prop->pflags; -} - -class tst_QScriptClass : public QObject -{ - Q_OBJECT - -public: - tst_QScriptClass(); - virtual ~tst_QScriptClass(); - -public slots: - void init(); - void cleanup(); - -private slots: - void noSuchProperty(); - void property(); - void setProperty(); - void propertyFlags(); - void call(); - void hasInstance(); - void iterate(); -}; - -tst_QScriptClass::tst_QScriptClass() -{ -} - -tst_QScriptClass::~tst_QScriptClass() -{ -} - -void tst_QScriptClass::init() -{ -} - -void tst_QScriptClass::cleanup() -{ -} - -void tst_QScriptClass::noSuchProperty() -{ - QScriptEngine eng; - TestClass cls(&eng); - QScriptValue obj = eng.newObject(&cls); - QString propertyName = QString::fromLatin1("foo"); - QBENCHMARK { - (void)obj.property(propertyName); - } -} - -void tst_QScriptClass::property() -{ - QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); - QScriptValue obj = eng.newObject(&cls); - QBENCHMARK { - (void)obj.property(foo); - } -} - -void tst_QScriptClass::setProperty() -{ - QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesWriteAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); - QScriptValue obj = eng.newObject(&cls); - QScriptValue value(456); - QBENCHMARK { - obj.setProperty(foo, value); - } -} - -void tst_QScriptClass::propertyFlags() -{ - QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, QScriptValue::ReadOnly, /*value=*/123); - QScriptValue obj = eng.newObject(&cls); - QBENCHMARK { - (void)obj.propertyFlags(foo); - } -} - -void tst_QScriptClass::call() -{ - QScriptEngine eng; - TestClass cls(&eng); - cls.setCallableMode(TestClass::CallableReturnsArgument); - QScriptValue obj = eng.newObject(&cls); - QScriptValue thisObject; - QScriptValueList args; - args.append(123); - QBENCHMARK { - (void)obj.call(thisObject, args); - } -} - -void tst_QScriptClass::hasInstance() -{ - QScriptEngine eng; - TestClass cls(&eng); - cls.setHasInstance(true); - QScriptValue obj = eng.newObject(&cls); - obj.setProperty("foo", 123); - QScriptValue plain = eng.newObject(); - plain.setProperty("foo", obj.property("foo")); - QBENCHMARK { - (void)plain.instanceOf(obj); - } -} - -void tst_QScriptClass::iterate() -{ - QScriptEngine eng; - TestClass cls(&eng); - cls.setIterationEnabled(true); - cls.addCustomProperty(eng.toStringHandle("foo"), QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); - cls.addCustomProperty(eng.toStringHandle("bar"), QScriptClass::HandlesReadAccess, /*id=*/2, /*attributes=*/0, /*value=*/456); - QScriptValue obj = eng.newObject(&cls); - QBENCHMARK { - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - (void)it.scriptName(); - } - } -} - -QTEST_MAIN(tst_QScriptClass) -#include "tst_qscriptclass.moc" diff --git a/tests/benchmarks/qscriptengine/qscriptengine.pro b/tests/benchmarks/qscriptengine/qscriptengine.pro deleted file mode 100644 index df6dbb3..0000000 --- a/tests/benchmarks/qscriptengine/qscriptengine.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qscriptengine - -SOURCES += tst_qscriptengine.cpp - -QT += script - -symbian* { - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB - TARGET.EPOCSTACKSIZE = 0x14000 -} diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp deleted file mode 100644 index 6c6f0b1..0000000 --- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -//TESTED_FILES= - -class tst_QScriptEngine : public QObject -{ - Q_OBJECT - -public: - tst_QScriptEngine(); - virtual ~tst_QScriptEngine(); - -public slots: - void init(); - void cleanup(); - -private slots: - void constructor(); - void evaluate_data(); - void evaluate(); - void evaluateProgram_data(); - void evaluateProgram(); - void connectAndDisconnect(); - void newObject(); - void newQObject(); - void newFunction(); - void newVariant(); - void collectGarbage(); - void pushAndPopContext(); - void toStringHandle(); - void castValueToQreal(); - void nativeCall(); - void translation_data(); - void translation(); -}; - -tst_QScriptEngine::tst_QScriptEngine() -{ -} - -tst_QScriptEngine::~tst_QScriptEngine() -{ -} - -void tst_QScriptEngine::init() -{ -} - -void tst_QScriptEngine::cleanup() -{ -} - -void tst_QScriptEngine::constructor() -{ - QBENCHMARK { - QScriptEngine engine; - (void)engine.parent(); - } -} - -void tst_QScriptEngine::evaluate_data() -{ - QTest::addColumn("code"); - QTest::newRow("empty script") << QString::fromLatin1(""); - QTest::newRow("number literal") << QString::fromLatin1("123"); - QTest::newRow("string literal") << QString::fromLatin1("'ciao'"); - QTest::newRow("regexp literal") << QString::fromLatin1("/foo/gim"); - QTest::newRow("null literal") << QString::fromLatin1("null"); - QTest::newRow("undefined literal") << QString::fromLatin1("undefined"); - QTest::newRow("null literal") << QString::fromLatin1("null"); - QTest::newRow("empty object literal") << QString::fromLatin1("{}"); - QTest::newRow("this") << QString::fromLatin1("this"); - QTest::newRow("object literal with one property") << QString::fromLatin1("{ foo: 123 }"); - QTest::newRow("object literal with two properties") << QString::fromLatin1("{ foo: 123, bar: 456 }"); - QTest::newRow("object literal with many properties") << QString::fromLatin1("{ a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10 }"); - QTest::newRow("empty array literal") << QString::fromLatin1("[]"); - QTest::newRow("array literal with one element") << QString::fromLatin1("[1]"); - QTest::newRow("array literal with two elements") << QString::fromLatin1("[1,2]"); - QTest::newRow("array literal with many elements") << QString::fromLatin1("[1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1]"); - QTest::newRow("empty function definition") << QString::fromLatin1("function foo() { }"); - QTest::newRow("function definition") << QString::fromLatin1("function foo() { return 123; }"); - QTest::newRow("for loop with empty body (1000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000; ++i) {}"); - QTest::newRow("for loop with empty body (10000 iterations)") << QString::fromLatin1("for (i = 0; i < 10000; ++i) {}"); - QTest::newRow("for loop with empty body (100000 iterations)") << QString::fromLatin1("for (i = 0; i < 100000; ++i) {}"); - QTest::newRow("for loop with empty body (1000000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000000; ++i) {}"); - QTest::newRow("for loop (1000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000; ++i) { j += i; }; j"); - QTest::newRow("for loop (10000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 10000; ++i) { j += i; }; j"); - QTest::newRow("for loop (100000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 100000; ++i) { j += i; }; j"); - QTest::newRow("for loop (1000000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000000; ++i) { j += i; }; j"); - QTest::newRow("assignments") << QString::fromLatin1("a = 1; b = 2; c = 3; d = 4"); - QTest::newRow("while loop (1000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000) { ++i; }; i"); - QTest::newRow("while loop (10000 iterations)") << QString::fromLatin1("i = 0; while (i < 10000) { ++i; }; i"); - QTest::newRow("while loop (100000 iterations)") << QString::fromLatin1("i = 0; while (i < 100000) { ++i; }; i"); - QTest::newRow("while loop (1000000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000000) { ++i; }; i"); - QTest::newRow("function expression") << QString::fromLatin1("(function(a, b, c){ return a + b + c; })(1, 2, 3)"); -} - -void tst_QScriptEngine::evaluate() -{ - QFETCH(QString, code); - QScriptEngine engine; - - QBENCHMARK { - (void)engine.evaluate(code); - } -} - -void tst_QScriptEngine::connectAndDisconnect() -{ - QScriptEngine engine; - QScriptValue fun = engine.evaluate("(function() { })"); - QBENCHMARK { - qScriptConnect(&engine, SIGNAL(destroyed()), QScriptValue(), fun); - qScriptDisconnect(&engine, SIGNAL(destroyed()), QScriptValue(), fun); - } -} - -void tst_QScriptEngine::evaluateProgram_data() -{ - evaluate_data(); -} - -void tst_QScriptEngine::evaluateProgram() -{ - QFETCH(QString, code); - QScriptEngine engine; - QScriptProgram program(code); - - QBENCHMARK { - (void)engine.evaluate(program); - } -} - -void tst_QScriptEngine::newObject() -{ - QScriptEngine engine; - QBENCHMARK { - (void)engine.newObject(); - } -} - -void tst_QScriptEngine::newQObject() -{ - QScriptEngine engine; - QBENCHMARK { - (void)engine.newQObject(QCoreApplication::instance()); - } -} - -static QScriptValue testFunction(QScriptContext *, QScriptEngine *) -{ - return 0; -} - -void tst_QScriptEngine::newFunction() -{ - QScriptEngine engine; - QBENCHMARK { - (void)engine.newFunction(testFunction); - } -} - -void tst_QScriptEngine::newVariant() -{ - QScriptEngine engine; - QVariant var(123); - QBENCHMARK { - (void)engine.newVariant(var); - } -} - -void tst_QScriptEngine::collectGarbage() -{ - QScriptEngine engine; - QBENCHMARK { - engine.collectGarbage(); - } -} - -void tst_QScriptEngine::pushAndPopContext() -{ - QScriptEngine engine; - QBENCHMARK { - (void)engine.pushContext(); - engine.popContext(); - } -} - -void tst_QScriptEngine::toStringHandle() -{ - QScriptEngine engine; - QString str = QString::fromLatin1("foobarbaz"); - QBENCHMARK { - (void)engine.toStringHandle(str); - } -} - -void tst_QScriptEngine::castValueToQreal() -{ - QScriptEngine engine; - QScriptValue val(123); - QBENCHMARK { - (void)qscriptvalue_cast(val); - } -} - -static QScriptValue native_function(QScriptContext *, QScriptEngine *) -{ - return 42; -} - -void tst_QScriptEngine::nativeCall() -{ - QScriptEngine eng; - eng.globalObject().setProperty("fun", eng.newFunction(native_function)); - QBENCHMARK{ -#if !defined(Q_OS_SYMBIAN) - eng.evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n" - " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); -#else - eng.evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n" - " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); -#endif - } -} - -void tst_QScriptEngine::translation_data() -{ - QTest::addColumn("text"); - QTest::newRow("no translation") << "\"hello world\""; - QTest::newRow("qsTr") << "qsTr(\"hello world\")"; - QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")"; -} - -void tst_QScriptEngine::translation() -{ - QFETCH(QString, text); - QScriptEngine engine; - engine.installTranslatorFunctions(); - - QBENCHMARK { - (void)engine.evaluate(text); - } -} - -QTEST_MAIN(tst_QScriptEngine) -#include "tst_qscriptengine.moc" diff --git a/tests/benchmarks/qscriptvalue/qscriptvalue.pro b/tests/benchmarks/qscriptvalue/qscriptvalue.pro deleted file mode 100644 index 04ea324..0000000 --- a/tests/benchmarks/qscriptvalue/qscriptvalue.pro +++ /dev/null @@ -1,7 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qscriptvalue - -SOURCES += tst_qscriptvalue.cpp - -QT += script diff --git a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp deleted file mode 100644 index 3bfc21c..0000000 --- a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -//TESTED_FILES= - -class tst_QScriptValue : public QObject -{ - Q_OBJECT - -public: - tst_QScriptValue(); - virtual ~tst_QScriptValue(); - -public slots: - void init(); - void cleanup(); - -private slots: - void numberConstructor(); - void stringConstructor(); - void call_data(); - void call(); - void construct_data(); - void construct(); - void toString_data(); - void toString(); - void toQObject(); - void property(); - void setProperty(); - void propertyFlags(); -}; - -tst_QScriptValue::tst_QScriptValue() -{ -} - -tst_QScriptValue::~tst_QScriptValue() -{ -} - -void tst_QScriptValue::init() -{ -} - -void tst_QScriptValue::cleanup() -{ -} - -void tst_QScriptValue::numberConstructor() -{ - QBENCHMARK { - (void)QScriptValue(123); - } -} - -void tst_QScriptValue::stringConstructor() -{ - QString str = QString::fromLatin1("ciao"); - QBENCHMARK { - (void)QScriptValue(str); - } -} - -void tst_QScriptValue::call_data() -{ - QTest::addColumn("code"); - QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); - QTest::newRow("function returning number") << QString::fromLatin1("(function(){ return 123; })"); - QTest::newRow("closure") << QString::fromLatin1("(function(a, b){ return function() { return a + b; }; })(1, 2)"); -} - -void tst_QScriptValue::call() -{ - QFETCH(QString, code); - QScriptEngine engine; - QScriptValue fun = engine.evaluate(code); - QVERIFY(fun.isFunction()); - QBENCHMARK { - (void)fun.call(); - } -} - -void tst_QScriptValue::construct_data() -{ - QTest::addColumn("code"); - QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); - QTest::newRow("simple constructor") << QString::fromLatin1("(function(){ this.x = 10; this.y = 20; })"); -} - -void tst_QScriptValue::construct() -{ - QFETCH(QString, code); - QScriptEngine engine; - QScriptValue fun = engine.evaluate(code); - QVERIFY(fun.isFunction()); - QBENCHMARK { - (void)fun.construct(); - } -} - -void tst_QScriptValue::toString_data() -{ - QTest::addColumn("code"); - QTest::newRow("number") << QString::fromLatin1("123"); - QTest::newRow("string") << QString::fromLatin1("'ciao'"); - QTest::newRow("null") << QString::fromLatin1("null"); - QTest::newRow("undefined") << QString::fromLatin1("undefined"); - QTest::newRow("function") << QString::fromLatin1("(function foo(a, b, c) { return a + b + c; })"); -} - -void tst_QScriptValue::toString() -{ - QFETCH(QString, code); - QScriptEngine engine; - QScriptValue val = engine.evaluate(code); - QBENCHMARK { - (void)val.toString(); - } -} - -void tst_QScriptValue::toQObject() -{ - QScriptEngine engine; - QScriptValue obj = engine.newQObject(QCoreApplication::instance()); - QBENCHMARK { - (void)obj.toQObject(); - } -} - -void tst_QScriptValue::property() -{ - QScriptEngine engine; - QScriptValue obj = engine.newObject(); - QString propertyName = QString::fromLatin1("foo"); - obj.setProperty(propertyName, 123); - QBENCHMARK { - (void)obj.property(propertyName); - } -} - -void tst_QScriptValue::setProperty() -{ - QScriptEngine engine; - QScriptValue obj = engine.newObject(); - QString propertyName = QString::fromLatin1("foo"); - QScriptValue val(123); - QBENCHMARK { - obj.setProperty(propertyName, val); - } -} - -void tst_QScriptValue::propertyFlags() -{ - QScriptEngine engine; - QScriptValue obj = engine.newObject(); - QString propertyName = QString::fromLatin1("foo"); - obj.setProperty(propertyName, 123, QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); - QBENCHMARK { - (void)obj.propertyFlags(propertyName); - } -} - -QTEST_MAIN(tst_QScriptValue) -#include "tst_qscriptvalue.moc" diff --git a/tests/benchmarks/qstring/main.cpp b/tests/benchmarks/qstring/main.cpp deleted file mode 100644 index 12826eb..0000000 --- a/tests/benchmarks/qstring/main.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -// In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" -#endif - -class tst_QString: public QObject -{ - Q_OBJECT -private slots: - void equals() const; - void equals_data() const; - void fromUtf8() const; -}; - -void tst_QString::equals() const -{ - QFETCH(QString, a); - QFETCH(QString, b); - - QBENCHMARK { - a == b; - } -} - -void tst_QString::equals_data() const -{ - static const struct { - ushort data[80]; - int dummy; // just to ensure 4-byte alignment - } data = { - { - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, // 16 - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, // 32 - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, // 48 - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, // 64 - 64, 64, 64, 64, 96, 96, 96, 96, - 64, 64, 96, 96, 96, 96, 96, 96 // 80 - }, 0 - }; - const QChar *ptr = reinterpret_cast(data.data); - - QTest::addColumn("a"); - QTest::addColumn("b"); - QString base = QString::fromRawData(ptr, 64); - - QTest::newRow("different-length") << base << QString::fromRawData(ptr, 4); - QTest::newRow("same-string") << base << base; - QTest::newRow("same-data") << base << QString::fromRawData(ptr, 64); - - // try to avoid crossing a cache line (that is, at ptr[64]) - QTest::newRow("aligned-aligned-4n") - << QString::fromRawData(ptr, 60) << QString::fromRawData(ptr + 2, 60); - QTest::newRow("aligned-unaligned-4n") - << QString::fromRawData(ptr, 60) << QString::fromRawData(ptr + 1, 60); - QTest::newRow("unaligned-unaligned-4n") - << QString::fromRawData(ptr + 1, 60) << QString::fromRawData(ptr + 3, 60); - - QTest::newRow("aligned-aligned-4n+1") - << QString::fromRawData(ptr, 61) << QString::fromRawData(ptr + 2, 61); - QTest::newRow("aligned-unaligned-4n+1") - << QString::fromRawData(ptr, 61) << QString::fromRawData(ptr + 1, 61); - QTest::newRow("unaligned-unaligned-4n+1") - << QString::fromRawData(ptr + 1, 61) << QString::fromRawData(ptr + 3, 61); - - QTest::newRow("aligned-aligned-4n-1") - << QString::fromRawData(ptr, 59) << QString::fromRawData(ptr + 2, 59); - QTest::newRow("aligned-unaligned-4n-1") - << QString::fromRawData(ptr, 59) << QString::fromRawData(ptr + 1, 59); - QTest::newRow("unaligned-unaligned-4n-1") - << QString::fromRawData(ptr + 1, 59) << QString::fromRawData(ptr + 3, 59); - - QTest::newRow("aligned-aligned-2n") - << QString::fromRawData(ptr, 58) << QString::fromRawData(ptr + 2, 58); - QTest::newRow("aligned-unaligned-2n") - << QString::fromRawData(ptr, 58) << QString::fromRawData(ptr + 1, 58); - QTest::newRow("unaligned-unaligned-2n") - << QString::fromRawData(ptr + 1, 58) << QString::fromRawData(ptr + 3, 58); -} - -void tst_QString::fromUtf8() const -{ - QFile file(SRCDIR "utf-8.txt"); - if (!file.open(QFile::ReadOnly)) { - qFatal("Cannot open input file"); - return; - } - QByteArray data = file.readAll(); - const char *d = data.constData(); - int size = data.size(); - - QBENCHMARK { - QString::fromUtf8(d, size); - } -} - -QTEST_MAIN(tst_QString) - -#include "main.moc" diff --git a/tests/benchmarks/qstring/qstring.pro b/tests/benchmarks/qstring/qstring.pro deleted file mode 100644 index 2e7c86a..0000000 --- a/tests/benchmarks/qstring/qstring.pro +++ /dev/null @@ -1,16 +0,0 @@ -load(qttest_p4) -TARGET = tst_qstring -QT -= gui -SOURCES += main.cpp - -wince*:{ - DEFINES += SRCDIR=\\\"\\\" -} else:symbian* { - addFiles.sources = utf-8.txt - addFiles.path = . - DEPLOYMENT += addFiles - TARGET.EPOCHEAPSIZE="0x100 0x1000000" -} else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} - diff --git a/tests/benchmarks/qstring/utf-8.txt b/tests/benchmarks/qstring/utf-8.txt deleted file mode 100644 index a8a58de..0000000 --- a/tests/benchmarks/qstring/utf-8.txt +++ /dev/null @@ -1,72 +0,0 @@ -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français diff --git a/tests/benchmarks/qstringbuilder/main.cpp b/tests/benchmarks/qstringbuilder/main.cpp deleted file mode 100644 index 9bd146f..0000000 --- a/tests/benchmarks/qstringbuilder/main.cpp +++ /dev/null @@ -1,464 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Select one of the scenarios below -#define SCENARIO 1 - -#if SCENARIO == 1 -// this is the "no harm done" version. Only operator% is active, -// with NO_CAST * defined -#define P % -#undef QT_USE_FAST_OPERATOR_PLUS -#undef QT_USE_FAST_CONCATENATION -#define QT_NO_CAST_FROM_ASCII -#define QT_NO_CAST_TO_ASCII -#endif - - -#if SCENARIO == 2 -// this is the "full" version. Operator+ is replaced by a QStringBuilder -// based version -// with NO_CAST * defined -#define P + -#define QT_USE_FAST_OPERATOR_PLUS -#define QT_USE_FAST_CONCATENATION -#define QT_NO_CAST_FROM_ASCII -#define QT_NO_CAST_TO_ASCII -#endif - -#if SCENARIO == 3 -// this is the "no harm done" version. Only operator% is active, -// with NO_CAST * _not_ defined -#define P % -#undef QT_USE_FAST_OPERATOR_PLUS -#undef QT_USE_FAST_CONCATENATION -#undef QT_NO_CAST_FROM_ASCII -#undef QT_NO_CAST_TO_ASCII -#endif - -#if SCENARIO == 4 -// this is the "full" version. Operator+ is replaced by a QStringBuilder -// based version -// with NO_CAST * _not_ defined -#define P + -#define QT_USE_FAST_OPERATOR_PLUS -#define QT_USE_FAST_CONCATENATION -#undef QT_NO_CAST_FROM_ASCII -#undef QT_NO_CAST_TO_ASCII -#endif - - -#include -#include -#include -#include - -#include - -#include - -#define COMPARE(a, b) QCOMPARE(a, b) -//#define COMPARE(a, b) - -#define SEP(s) qDebug() << "\n\n-------- " s " ---------"; - -#define LITERAL "some string literal" - -class tst_qstringbuilder : public QObject -{ - Q_OBJECT - -public: - tst_qstringbuilder() - : l1literal(LITERAL), - l1string(LITERAL), - ba(LITERAL), - string(l1string), - stdstring(LITERAL), - stringref(&string, 2, 10), - achar('c'), - r2(QLatin1String(LITERAL LITERAL)), - r3(QLatin1String(LITERAL LITERAL LITERAL)), - r4(QLatin1String(LITERAL LITERAL LITERAL LITERAL)), - r5(QLatin1String(LITERAL LITERAL LITERAL LITERAL LITERAL)) - {} - - -public: - enum { N = 10000 }; - - int run_traditional() - { - int s = 0; - for (int i = 0; i < N; ++i) { -#if 0 - s += QString(l1string + l1string).size(); - s += QString(l1string + l1string + l1string).size(); - s += QString(l1string + l1string + l1string + l1string).size(); - s += QString(l1string + l1string + l1string + l1string + l1string).size(); -#endif - s += QString(achar + l1string + achar).size(); - } - return s; - } - - int run_builder() - { - int s = 0; - for (int i = 0; i < N; ++i) { -#if 0 - s += QString(l1literal P l1literal).size(); - s += QString(l1literal P l1literal P l1literal).size(); - s += QString(l1literal P l1literal P l1literal P l1literal).size(); - s += QString(l1literal P l1literal P l1literal P l1literal P l1literal).size(); -#endif - s += QString(achar % l1literal % achar).size(); - } - return s; - } - -private slots: - - void separator_0() { - qDebug() << "\nIn each block the QStringBuilder based result appear first " - "(with a 'b_' prefix), QStringBased second ('q_' prefix), std::string " - "last ('s_' prefix)\n"; - } - - void separator_1() { SEP("literal + literal (builder first)"); } - - void b_2_l1literal() { - QBENCHMARK { r = l1literal P l1literal; } - COMPARE(r, r2); - } - #ifndef QT_NO_CAST_FROM_ASCII - void b_l1literal_LITERAL() { - QBENCHMARK { r = l1literal P LITERAL; } - COMPARE(r, r2); - } - #endif - void q_2_l1string() { - QBENCHMARK { r = l1string + l1string; } - COMPARE(r, r2); - } - - - void separator_2() { SEP("2 strings"); } - - void b_2_string() { - QBENCHMARK { r = string P string; } - COMPARE(r, r2); - } - void q_2_string() { - QBENCHMARK { r = string + string; } - COMPARE(r, r2); - } - void s_2_string() { - QBENCHMARK { stdr = stdstring + stdstring; } - COMPARE(stdr, stdstring + stdstring); - } - - - void separator_2c() { SEP("2 string refs"); } - - void b_2_stringref() { - QBENCHMARK { r = stringref % stringref; } - COMPARE(r, QString(stringref.toString() + stringref.toString())); - } - void q_2_stringref() { - QBENCHMARK { r = stringref.toString() + stringref.toString(); } - COMPARE(r, QString(stringref % stringref)); - } - - - void separator_2b() { SEP("3 strings"); } - - void b_3_string() { - QBENCHMARK { r = string P string P string; } - COMPARE(r, r3); - } - void q_3_string() { - QBENCHMARK { r = string + string + string; } - COMPARE(r, r3); - } - void s_3_string() { - QBENCHMARK { stdr = stdstring + stdstring + stdstring; } - COMPARE(stdr, stdstring + stdstring + stdstring); - } - - void separator_2e() { SEP("4 strings"); } - - void b_4_string() { - QBENCHMARK { r = string P string P string P string; } - COMPARE(r, r4); - } - void q_4_string() { - QBENCHMARK { r = string + string + string + string; } - COMPARE(r, r4); - } - void s_4_string() { - QBENCHMARK { stdr = stdstring + stdstring + stdstring + stdstring; } - COMPARE(stdr, stdstring + stdstring + stdstring + stdstring); - } - - - - void separator_2a() { SEP("string + literal (builder first)"); } - - void b_string_l1literal() { - QBENCHMARK { r = string % l1literal; } - COMPARE(r, r2); - } - #ifndef QT_NO_CAST_FROM_ASCII - void b_string_LITERAL() { - QBENCHMARK { r = string P LITERAL; } - COMPARE(r, r2); - } - void b_LITERAL_string() { - QBENCHMARK { r = LITERAL P string; } - COMPARE(r, r2); - } - #endif - void b_string_l1string() { - QBENCHMARK { r = string P l1string; } - COMPARE(r, r2); - } - void q_string_l1literal() { - QBENCHMARK { r = string + l1string; } - COMPARE(r, r2); - } - void q_string_l1string() { - QBENCHMARK { r = string + l1string; } - COMPARE(r, r2); - } - void s_LITERAL_string() { - QBENCHMARK { stdr = LITERAL + stdstring; } - COMPARE(stdr, stdstring + stdstring); - } - - - void separator_3() { SEP("3 literals"); } - - void b_3_l1literal() { - QBENCHMARK { r = l1literal P l1literal P l1literal; } - COMPARE(r, r3); - } - void q_3_l1string() { - QBENCHMARK { r = l1string + l1string + l1string; } - COMPARE(r, r3); - } - void s_3_l1string() { - QBENCHMARK { stdr = stdstring + LITERAL + LITERAL; } - COMPARE(stdr, stdstring + stdstring + stdstring); - } - - - void separator_4() { SEP("4 literals"); } - - void b_4_l1literal() { - QBENCHMARK { r = l1literal P l1literal P l1literal P l1literal; } - COMPARE(r, r4); - } - void q_4_l1string() { - QBENCHMARK { r = l1string + l1string + l1string + l1string; } - COMPARE(r, r4); - } - - - void separator_5() { SEP("5 literals"); } - - void b_5_l1literal() { - QBENCHMARK { r = l1literal P l1literal P l1literal P l1literal P l1literal; } - COMPARE(r, r5); - } - - void q_5_l1string() { - QBENCHMARK { r = l1string + l1string + l1string + l1string + l1string; } - COMPARE(r, r5); - } - - - void separator_6() { SEP("4 chars"); } - - void b_string_4_char() { - QBENCHMARK { r = string + achar + achar + achar + achar; } - COMPARE(r, QString(string P achar P achar P achar P achar)); - } - - void q_string_4_char() { - QBENCHMARK { r = string + achar + achar + achar + achar; } - COMPARE(r, QString(string P achar P achar P achar P achar)); - } - - void s_string_4_char() { - QBENCHMARK { stdr = stdstring + 'c' + 'c' + 'c' + 'c'; } - COMPARE(stdr, stdstring + 'c' + 'c' + 'c' + 'c'); - } - - - void separator_7() { SEP("char + string + char"); } - - void b_char_string_char() { - QBENCHMARK { r = achar + string + achar; } - COMPARE(r, QString(achar P string P achar)); - } - - void q_char_string_char() { - QBENCHMARK { r = achar + string + achar; } - COMPARE(r, QString(achar P string P achar)); - } - - void s_char_string_char() { - QBENCHMARK { stdr = 'c' + stdstring + 'c'; } - COMPARE(stdr, 'c' + stdstring + 'c'); - } - - - void separator_8() { SEP("string.arg"); } - - void b_string_arg() { - const QString pattern = l1string + QString::fromLatin1("%1") + l1string; - QBENCHMARK { r = l1literal P string P l1literal; } - COMPARE(r, r3); - } - - void q_string_arg() { - const QString pattern = l1string + QLatin1String("%1") + l1string; - QBENCHMARK { r = pattern.arg(string); } - COMPARE(r, r3); - } - - void q_bytearray_arg() { - QByteArray result; - QBENCHMARK { result = ba + ba + ba; } - } - - - void separator_9() { SEP("QString::reserve()"); } - - void b_reserve() { - QBENCHMARK { - r.clear(); - r = string P string P string P string; - } - COMPARE(r, r4); - } - void b_reserve_lit() { - QBENCHMARK { - r.clear(); - r = string P l1literal P string P string; - } - COMPARE(r, r4); - } - void s_reserve() { - QBENCHMARK { - r.clear(); - r.reserve(string.size() + string.size() + string.size() + string.size()); - r += string; - r += string; - r += string; - r += string; - } - COMPARE(r, r4); - } - void s_reserve_lit() { - QBENCHMARK { - r.clear(); - //r.reserve(string.size() + qstrlen(l1string.latin1()) - // + string.size() + string.size()); - r.reserve(1024); - r += string; - r += l1string; - r += string; - r += string; - } - COMPARE(r, r4); - } - -private: - const QLatin1Literal l1literal; - const QLatin1String l1string; - const QByteArray ba; - const QString string; - const std::string stdstring; - const QStringRef stringref; - const QLatin1Char achar; - const QString r2, r3, r4, r5; - - // short cuts for results - QString r; - std::string stdr; -}; - - -//void operator%(QString, int) {} - -int main(int argc, char *argv[]) -{ - //qDebug() << (QString("xx") * QLatin1String("y")).toString(); - //42 % 3; // Sanity test, should always work. - //QString("x") % 2; // Sanity test, should only compile when the - // operator%(QString, int) is visible. - - if (argc == 2 && (QLatin1String(argv[1]) == QLatin1String("--run-builder") - || QLatin1String(argv[1]) == QLatin1String("-b"))) { - tst_qstringbuilder test; - return test.run_builder(); - } - - if (argc == 2 && (QLatin1String(argv[1]) == QLatin1String("--run-traditional") - || QLatin1String(argv[1]) == QLatin1String("-t"))) { - tst_qstringbuilder test; - return test.run_traditional(); - } - - if (argc == 1) { - QCoreApplication app(argc, argv); - QStringList args = app.arguments(); - tst_qstringbuilder test; - return QTest::qExec(&test, argc, argv); - } - - qDebug() << "Usage: " << argv[0] << " [--run-builder|-r|--run-traditional|-t]"; -} - - -#include "main.moc" diff --git a/tests/benchmarks/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/qstringbuilder/qstringbuilder.pro deleted file mode 100644 index 79171b4..0000000 --- a/tests/benchmarks/qstringbuilder/qstringbuilder.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qstringbuilder - -QMAKE_CXXFLAGS += -g -QMAKE_CFLAGS += -g - -QT -= gui - -CONFIG += release - -SOURCES += main.cpp diff --git a/tests/benchmarks/qstringlist/.gitignore b/tests/benchmarks/qstringlist/.gitignore deleted file mode 100644 index 3e0cdc9..0000000 --- a/tests/benchmarks/qstringlist/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tst_qstringlist diff --git a/tests/benchmarks/qstringlist/main.cpp b/tests/benchmarks/qstringlist/main.cpp deleted file mode 100644 index 3fac598..0000000 --- a/tests/benchmarks/qstringlist/main.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include -#include -#include - -class tst_QStringList: public QObject -{ - Q_OBJECT - -private slots: - void join() const; - void join_data() const; - - void split() const; - void split_data() const; - - void split_std() const; - void split_std_data() const { return split_data(); } - - void split_stdw() const; - void split_stdw_data() const { return split_data(); } - - void split_ba() const; - void split_ba_data() const { return split_data(); } - -private: - static QStringList populateList(const int count, const QString &unit); - static QString populateString(const int count, const QString &unit); -}; - -QStringList tst_QStringList::populateList(const int count, const QString &unit) -{ - QStringList retval; - - for (int i = 0; i < count; ++i) - retval.append(unit); - - return retval; -} - -QString tst_QStringList::populateString(const int count, const QString &unit) -{ - QString retval; - - for (int i = 0; i < count; ++i) { - retval.append(unit); - retval.append(QLatin1Char(':')); - } - - return retval; -} - -void tst_QStringList::join() const -{ - QFETCH(QStringList, input); - QFETCH(QString, separator); - - QBENCHMARK { - input.join(separator); - } -} - -void tst_QStringList::join_data() const -{ - QTest::addColumn("input"); - QTest::addColumn("separator"); - - QTest::newRow("") - << populateList(100, QLatin1String("unit")) - << QString(); - - QTest::newRow("") - << populateList(1000, QLatin1String("unit")) - << QString(); - - QTest::newRow("") - << populateList(10000, QLatin1String("unit")) - << QString(); - - QTest::newRow("") - << populateList(100000, QLatin1String("unit")) - << QString(); -} - -void tst_QStringList::split() const -{ - QFETCH(QString, input); - const QChar splitChar = ':'; - - QBENCHMARK { - input.split(splitChar); - } -} - -void tst_QStringList::split_data() const -{ - QTest::addColumn("input"); - QString unit = QLatin1String("unit"); - QTest::newRow("") << populateString(10, unit); - QTest::newRow("") << populateString(100, unit); - QTest::newRow("") << populateString(1000, unit); - QTest::newRow("") << populateString(10000, unit); -} - -void tst_QStringList::split_std() const -{ - QFETCH(QString, input); - const char split_char = ':'; - std::string stdinput = input.toStdString(); - - QBENCHMARK { - std::istringstream split(stdinput); - std::vector token; - for (std::string each; - std::getline(split, each, split_char); - token.push_back(each)) - ; - } -} - -void tst_QStringList::split_stdw() const -{ - QFETCH(QString, input); - const wchar_t split_char = ':'; - std::wstring stdinput = input.toStdWString(); - - QBENCHMARK { - std::wistringstream split(stdinput); - std::vector token; - for (std::wstring each; - std::getline(split, each, split_char); - token.push_back(each)) - ; - } -} - -void tst_QStringList::split_ba() const -{ - QFETCH(QString, input); - const char splitChar = ':'; - QByteArray ba = input.toLatin1(); - - QBENCHMARK { - ba.split(splitChar); - } -} - -QTEST_MAIN(tst_QStringList) - -#include "main.moc" diff --git a/tests/benchmarks/qstringlist/qstringlist.pro b/tests/benchmarks/qstringlist/qstringlist.pro deleted file mode 100644 index 11cceb0..0000000 --- a/tests/benchmarks/qstringlist/qstringlist.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TARGET = tst_qstringlist -QT -= gui -SOURCES += main.cpp - -symbian: LIBS += -llibpthread diff --git a/tests/benchmarks/qstylesheetstyle/main.cpp b/tests/benchmarks/qstylesheetstyle/main.cpp deleted file mode 100644 index 226b661..0000000 --- a/tests/benchmarks/qstylesheetstyle/main.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -// This file contains benchmarks for QRect/QRectF functions. - -#include -#include - -class tst_qstylesheetstyle : public QObject -{ - Q_OBJECT -private slots: - void empty(); - void empty_events(); - - void simple(); - void simple_events(); - - void grid_data(); - void grid(); - -private: - QWidget *buildSimpleWidgets(); - -}; - - -QWidget *tst_qstylesheetstyle::buildSimpleWidgets() -{ - QWidget *w = new QWidget(); - QGridLayout *layout = new QGridLayout(w); - w->setLayout(layout); - layout->addWidget(new QPushButton("pushButton") ,0,0); - layout->addWidget(new QComboBox() ,0,1); - layout->addWidget(new QCheckBox("checkBox") ,0,2); - layout->addWidget(new QRadioButton("radioButton") ,0,3); - layout->addWidget(new QLineEdit() ,1,0); - layout->addWidget(new QLabel("label") ,1,1); - layout->addWidget(new QSpinBox() ,1,2); - layout->addWidget(new QProgressBar() ,1,3); - return w; -} - -void tst_qstylesheetstyle::empty() -{ - QWidget *w = buildSimpleWidgets(); - w->setStyleSheet("/* */"); - int i = 0; - QBENCHMARK { - w->setStyleSheet("/*" + QString::number(i) + "*/"); - i++; // we want a different string in case we have severals iterations - } - delete w; -} - -void tst_qstylesheetstyle::empty_events() -{ - QWidget *w = buildSimpleWidgets(); - w->setStyleSheet("/* */"); - int i = 0; - QBENCHMARK { - w->setStyleSheet("/*" + QString::number(i) + "*/"); - i++; // we want a different string in case we have severals iterations - qApp->processEvents(); - } - delete w; -} - -static const char *simple_css = - " QLineEdit { background: red; } QPushButton { border: 1px solid yellow; color: pink; } \n" - " QCheckBox { margin: 3px 5px; background-color:red; } QAbstractButton { background-color: #456; } \n" - " QFrame { padding: 3px; } QLabel { color: black } QSpinBox:hover { background-color:blue; } "; - -void tst_qstylesheetstyle::simple() -{ - QWidget *w = buildSimpleWidgets(); - w->setStyleSheet("/* */"); - int i = 0; - QBENCHMARK { - w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/"); - i++; // we want a different string in case we have severals iterations - } - delete w; -} - -void tst_qstylesheetstyle::simple_events() -{ - QWidget *w = buildSimpleWidgets(); - w->setStyleSheet("/* */"); - int i = 0; - QBENCHMARK { - w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/"); - i++; // we want a different string in case we have severals iterations - qApp->processEvents(); - } - delete w; -} - -void tst_qstylesheetstyle::grid_data() -{ - QTest::addColumn("events"); - QTest::addColumn("show"); - QTest::addColumn("N"); - for (int n = 5; n <= 25; n += 5) { - const QByteArray nString = QByteArray::number(n*n); - QTest::newRow(("simple--" + nString).constData()) << false << false << n; - QTest::newRow(("events--" + nString).constData()) << true << false << n; - QTest::newRow(("show--" + nString).constData()) << true << true << n; - } -} - - -void tst_qstylesheetstyle::grid() -{ - QFETCH(bool, events); - QFETCH(bool, show); - QFETCH(int, N); - -#ifdef Q_OS_SYMBIAN - // Symbian has limited stack (max 80k), which will run out when N >= 20 due to - // QWidget::show() using recursion among grid labels somewhere down the line. - if (show && N >= 20) - QSKIP("Grid too big for device to show", SkipSingle); -#endif - - QWidget *w = new QWidget(); - QGridLayout *layout = new QGridLayout(w); - w->setLayout(layout); - QString stylesheet; - for(int x=0; xaddWidget(label ,x,y); - label->setObjectName(QString("label%1").arg(y * N + x)); - stylesheet += QString("#label%1 { background-color: rgb(0,%2,%3); color: rgb(%2,%3,255); } ").arg(y*N+x).arg(y*255/N).arg(x*255/N); - } - - w->setStyleSheet("/* */"); - if(show) { - w->show(); - QTest::qWait(30); - } - int i = 0; - QBENCHMARK { - w->setStyleSheet(stylesheet + "/*" + QString::number(i) + "*/"); - i++; // we want a different string in case we have severals iterations - if(events) - qApp->processEvents(); - } - delete w; -} - -QTEST_MAIN(tst_qstylesheetstyle) - -#include "main.moc" diff --git a/tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro b/tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro deleted file mode 100644 index c097307..0000000 --- a/tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro +++ /dev/null @@ -1,11 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qstylesheetstyle -DEPENDPATH += . -INCLUDEPATH += . - - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qsvgrenderer/data/tiger.svg b/tests/benchmarks/qsvgrenderer/data/tiger.svg deleted file mode 100644 index 983e570..0000000 --- a/tests/benchmarks/qsvgrenderer/data/tiger.svg +++ /dev/null @@ -1,730 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro b/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro deleted file mode 100644 index 8222a09..0000000 --- a/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro +++ /dev/null @@ -1,9 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qsvgrenderer - -SOURCES += tst_qsvgrenderer.cpp -RESOURCES += qsvgrenderer.qrc - -QT += svg - diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc b/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc deleted file mode 100644 index bdf4a31..0000000 --- a/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - data/tiger.svg - - - diff --git a/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp deleted file mode 100644 index 895ffe0..0000000 --- a/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include -#include - -//TESTED_FILES= - -class tst_QSvgRenderer : public QObject -{ - Q_OBJECT - -public: - tst_QSvgRenderer(); - virtual ~tst_QSvgRenderer(); - -public slots: - void init(); - void cleanup(); - -private slots: - void construct(); - void load(); -}; - -tst_QSvgRenderer::tst_QSvgRenderer() -{ -} - -tst_QSvgRenderer::~tst_QSvgRenderer() -{ -} - -void tst_QSvgRenderer::init() -{ -} - -void tst_QSvgRenderer::cleanup() -{ -} - -void tst_QSvgRenderer::construct() -{ - QBENCHMARK { - QSvgRenderer renderer; - } -} - -void tst_QSvgRenderer::load() -{ - QFile file(":/data/tiger.svg"); - if (!file.open(QFile::ReadOnly)) - QFAIL("Can not open tiger.svg"); - QByteArray data = file.readAll(); - QSvgRenderer renderer; - - QBENCHMARK { - renderer.load(data); - } -} - -QTEST_MAIN(tst_QSvgRenderer) -#include "tst_qsvgrenderer.moc" diff --git a/tests/benchmarks/qtableview/qtableview.pro b/tests/benchmarks/qtableview/qtableview.pro deleted file mode 100644 index 02bc530..0000000 --- a/tests/benchmarks/qtableview/qtableview.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qtableview - -SOURCES += tst_qtableview.cpp - diff --git a/tests/benchmarks/qtableview/tst_qtableview.cpp b/tests/benchmarks/qtableview/tst_qtableview.cpp deleted file mode 100644 index a84d8b5..0000000 --- a/tests/benchmarks/qtableview/tst_qtableview.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include - -//TESTED_FILES= - -class QtTestTableModel: public QAbstractTableModel -{ - Q_OBJECT - - -public: - QtTestTableModel(int rows = 0, int columns = 0, QObject *parent = 0) - : QAbstractTableModel(parent), - row_count(rows), - column_count(columns) {} - - int rowCount(const QModelIndex& = QModelIndex()) const { return row_count; } - int columnCount(const QModelIndex& = QModelIndex()) const { return column_count; } - bool isEditable(const QModelIndex &) const { return true; } - - QVariant data(const QModelIndex &idx, int role) const - { - if (!idx.isValid() || idx.row() >= row_count || idx.column() >= column_count) { - qWarning() << "Invalid modelIndex [%d,%d,%p]" << idx; - return QVariant(); - } - - if (role == Qt::DisplayRole || role == Qt::EditRole) - return QString("[%1,%2,%3]").arg(idx.row()).arg(idx.column()).arg(0); - - return QVariant(); - } - - bool insertRows(int start, int count, const QModelIndex &parent = QModelIndex()) - { - if (start < 0 || start > row_count) - return false; - - beginInsertRows(parent, start, start + count - 1); - row_count += count; - endInsertRows(); - return true; - } - - bool removeRows(int start, int count, const QModelIndex &parent = QModelIndex()) - { - if (start < 0 || start >= row_count || row_count < count) - return false; - - beginRemoveRows(parent, start, start + count - 1); - row_count -= count; - endRemoveRows(); - return true; - } - - bool insertColumns(int start, int count, const QModelIndex &parent = QModelIndex()) - { - if (start < 0 || start > column_count) - return false; - - beginInsertColumns(parent, start, start + count - 1); - column_count += count; - endInsertColumns(); - return true; - } - - bool removeColumns(int start, int count, const QModelIndex &parent = QModelIndex()) - { - if (start < 0 || start >= column_count || column_count < count) - return false; - - beginRemoveColumns(parent, start, start + count - 1); - column_count -= count; - endRemoveColumns(); - return true; - } - - int row_count; - int column_count; -}; - - - - -class tst_QTableView : public QObject -{ - Q_OBJECT - -public: - tst_QTableView(); - virtual ~tst_QTableView(); - -public slots: - void init(); - void cleanup(); - -private slots: - void spanInit(); - void spanDraw(); - void spanSelectColumn(); - void spanSelectAll(); - void rowInsertion_data(); - void rowInsertion(); - void rowRemoval_data(); - void rowRemoval(); - void columnInsertion_data(); - void columnInsertion(); - void columnRemoval_data(); - void columnRemoval(); -private: - static inline void spanInit_helper(QTableView *); -}; - -tst_QTableView::tst_QTableView() -{ -} - -tst_QTableView::~tst_QTableView() -{ -} - -void tst_QTableView::init() -{ -} - -void tst_QTableView::cleanup() -{ -} - -void tst_QTableView::spanInit_helper(QTableView *view) -{ - for (int i=0; i < 40; i++) { - view->setSpan(1+i%2, 1+4*i, 1+i%3, 2); - } - - for (int i=1; i < 40; i++) { - view->setSpan(6 + i*7, 4, 4, 50); - } -} - -void tst_QTableView::spanInit() -{ - QtTestTableModel model(500, 500); - QTableView v; - v.setModel(&model); - - QBENCHMARK { - spanInit_helper(&v); - } -} - -void tst_QTableView::spanDraw() -{ - QtTestTableModel model(500, 500); - QTableView v; - v.setModel(&model); - - spanInit_helper(&v); - v.show(); - v.resize(500,500); - QTest::qWait(30); - - QImage image(500, 500, QImage::Format_ARGB32_Premultiplied); - QPainter painter(&image); - QBENCHMARK { - v.render(&painter); - } -} - -void tst_QTableView::spanSelectAll() -{ - QtTestTableModel model(500, 500); - QTableView v; - v.setModel(&model); - - spanInit_helper(&v); - v.show(); - QTest::qWait(30); - - QBENCHMARK { - v.selectAll(); - } -} - -void tst_QTableView::spanSelectColumn() -{ - QtTestTableModel model(500, 500); - QTableView v; - v.setModel(&model); - - spanInit_helper(&v); - v.show(); - QTest::qWait(30); - - QBENCHMARK { - v.selectColumn(22); - } -} - -typedef QVector SpanList; -Q_DECLARE_METATYPE(SpanList) - -void spansData() -{ - QTest::addColumn("spans"); - - QTest::newRow("Without spans") - << SpanList(); - - QTest::newRow("With spans") - << (SpanList() - << QRect(0, 1, 1, 2) - << QRect(1, 2, 1, 2) - << QRect(2, 2, 1, 5) - << QRect(2, 8, 1, 2) - << QRect(3, 4, 1, 2) - << QRect(4, 4, 1, 4) - << QRect(5, 6, 1, 3) - << QRect(6, 7, 1, 3)); -} - -void tst_QTableView::rowInsertion_data() -{ - spansData(); -} - -void tst_QTableView::rowInsertion() -{ - QFETCH(SpanList, spans); - - QtTestTableModel model(10, 10); - QTableView view; - view.setModel(&model); - - foreach (QRect span, spans) - view.setSpan(span.top(), span.left(), span.height(), span.width()); - view.show(); - QTest::qWait(50); - - QBENCHMARK_ONCE { - view.model()->insertRows(0, 2); - view.model()->insertRows(5, 2); - view.model()->insertRows(8, 2); - view.model()->insertRows(12, 2); - } -} - -void tst_QTableView::rowRemoval_data() -{ - spansData(); -} - -void tst_QTableView::rowRemoval() -{ - QFETCH(SpanList, spans); - - QtTestTableModel model(10, 10); - QTableView view; - view.setModel(&model); - - foreach (QRect span, spans) - view.setSpan(span.top(), span.left(), span.height(), span.width()); - view.show(); - QTest::qWait(50); - - QBENCHMARK_ONCE { - view.model()->removeRows(3, 3); - } -} - -void tst_QTableView::columnInsertion_data() -{ - spansData(); -} - -void tst_QTableView::columnInsertion() -{ - QFETCH(SpanList, spans); - - QtTestTableModel model(10, 10); - QTableView view; - view.setModel(&model); - - // Same set as for rowInsertion, just swapping columns and rows. - foreach (QRect span, spans) - view.setSpan(span.left(), span.top(), span.width(), span.height()); - view.show(); - QTest::qWait(50); - - QBENCHMARK_ONCE { - view.model()->insertColumns(0, 2); - view.model()->insertColumns(5, 2); - view.model()->insertColumns(8, 2); - view.model()->insertColumns(12, 2); - } -} - -void tst_QTableView::columnRemoval_data() -{ - spansData(); -} - -void tst_QTableView::columnRemoval() -{ - QFETCH(SpanList, spans); - - QtTestTableModel model(10, 10); - QTableView view; - view.setModel(&model); - - // Same set as for rowRemoval, just swapping columns and rows. - foreach (QRect span, spans) - view.setSpan(span.left(), span.top(), span.width(), span.height()); - view.show(); - QTest::qWait(50); - - QBENCHMARK_ONCE { - view.model()->removeColumns(3, 3); - } -} - -QTEST_MAIN(tst_QTableView) -#include "tst_qtableview.moc" diff --git a/tests/benchmarks/qtcpserver/qtcpserver.pro b/tests/benchmarks/qtcpserver/qtcpserver.pro deleted file mode 100644 index e7bf13a..0000000 --- a/tests/benchmarks/qtcpserver/qtcpserver.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qtcpserver -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui -QT += network - -CONFIG += release - -# Input -SOURCES += tst_qtcpserver.cpp diff --git a/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp deleted file mode 100644 index b6b55c3..0000000 --- a/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Just to get Q_OS_SYMBIAN -#include - -#include - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -Q_DECLARE_METATYPE(QNetworkProxy) -Q_DECLARE_METATYPE(QList) - -#include "../../auto/network-settings.h" - -//TESTED_CLASS= -//TESTED_FILES= - -class tst_QTcpServer : public QObject -{ - Q_OBJECT - -public: - tst_QTcpServer(); - virtual ~tst_QTcpServer(); - - -public slots: - void initTestCase_data(); - void init(); - void cleanup(); -private slots: - void ipv4LoopbackPerformanceTest(); - void ipv6LoopbackPerformanceTest(); - void ipv4PerformanceTest(); -}; - -tst_QTcpServer::tst_QTcpServer() -{ - Q_SET_DEFAULT_IAP -} - -tst_QTcpServer::~tst_QTcpServer() -{ -} - -void tst_QTcpServer::initTestCase_data() -{ - QTest::addColumn("setProxy"); - QTest::addColumn("proxyType"); - - QTest::newRow("WithoutProxy") << false << 0; - QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); -} - -void tst_QTcpServer::init() -{ - QFETCH_GLOBAL(bool, setProxy); - if (setProxy) { - QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); - } - } -} - -void tst_QTcpServer::cleanup() -{ - QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); -} - -//---------------------------------------------------------------------------------- -void tst_QTcpServer::ipv4LoopbackPerformanceTest() -{ - QFETCH_GLOBAL(bool, setProxy); - if (setProxy) - return; - - QTcpServer server; - QVERIFY(server.listen(QHostAddress::LocalHost)); - - QVERIFY(server.isListening()); - - QTcpSocket clientA; - clientA.connectToHost(QHostAddress::LocalHost, server.serverPort()); - QVERIFY(clientA.waitForConnected(5000)); - QVERIFY(clientA.state() == QAbstractSocket::ConnectedState); - - QVERIFY(server.waitForNewConnection()); - QTcpSocket *clientB = server.nextPendingConnection(); - QVERIFY(clientB); - - QByteArray buffer(16384, '@'); - QTime stopWatch; - stopWatch.start(); - qlonglong totalWritten = 0; - while (stopWatch.elapsed() < 5000) { - QVERIFY(clientA.write(buffer.data(), buffer.size()) > 0); - clientA.flush(); - totalWritten += buffer.size(); - while (clientB->waitForReadyRead(100)) { - if (clientB->bytesAvailable() == 16384) - break; - } - clientB->read(buffer.data(), buffer.size()); - clientB->write(buffer.data(), buffer.size()); - clientB->flush(); - totalWritten += buffer.size(); - while (clientA.waitForReadyRead(100)) { - if (clientA.bytesAvailable() == 16384) - break; - } - clientA.read(buffer.data(), buffer.size()); - } - - qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", - server.serverAddress().toString().toLatin1().constData(), - totalWritten / (1024.0 * 1024.0), - stopWatch.elapsed() / 1000.0, - (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); - - delete clientB; -} - -//---------------------------------------------------------------------------------- -void tst_QTcpServer::ipv6LoopbackPerformanceTest() -{ - QFETCH_GLOBAL(bool, setProxy); - if (setProxy) - return; - -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian: IPv6 is not yet supported", SkipAll); -#endif - QTcpServer server; - if (!server.listen(QHostAddress::LocalHostIPv6, 0)) { - QVERIFY(server.serverError() == QAbstractSocket::UnsupportedSocketOperationError); - } else { - QTcpSocket clientA; - clientA.connectToHost(server.serverAddress(), server.serverPort()); - QVERIFY(clientA.waitForConnected(5000)); - - QVERIFY(server.waitForNewConnection(5000)); - QTcpSocket *clientB = server.nextPendingConnection(); - QVERIFY(clientB); - - QByteArray buffer(16384, '@'); - QTime stopWatch; - stopWatch.start(); - qlonglong totalWritten = 0; - while (stopWatch.elapsed() < 5000) { - clientA.write(buffer.data(), buffer.size()); - clientA.flush(); - totalWritten += buffer.size(); - while (clientB->waitForReadyRead(100)) { - if (clientB->bytesAvailable() == 16384) - break; - } - clientB->read(buffer.data(), buffer.size()); - clientB->write(buffer.data(), buffer.size()); - clientB->flush(); - totalWritten += buffer.size(); - while (clientA.waitForReadyRead(100)) { - if (clientA.bytesAvailable() == 16384) - break; - } - clientA.read(buffer.data(), buffer.size()); - } - - qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", - server.serverAddress().toString().toLatin1().constData(), - totalWritten / (1024.0 * 1024.0), - stopWatch.elapsed() / 1000.0, - (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); - delete clientB; - } -} - -//---------------------------------------------------------------------------------- -void tst_QTcpServer::ipv4PerformanceTest() -{ - QTcpSocket probeSocket; - probeSocket.connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(probeSocket.waitForConnected(5000)); - - QTcpServer server; - QVERIFY(server.listen(probeSocket.localAddress(), 0)); - - QTcpSocket clientA; - clientA.connectToHost(server.serverAddress(), server.serverPort()); - QVERIFY(clientA.waitForConnected(5000)); - - QVERIFY(server.waitForNewConnection(5000)); - QTcpSocket *clientB = server.nextPendingConnection(); - QVERIFY(clientB); - - QByteArray buffer(16384, '@'); - QTime stopWatch; - stopWatch.start(); - qlonglong totalWritten = 0; - while (stopWatch.elapsed() < 5000) { - qlonglong writtenA = clientA.write(buffer.data(), buffer.size()); - clientA.flush(); - totalWritten += buffer.size(); - while (clientB->waitForReadyRead(100)) { - if (clientB->bytesAvailable() == writtenA) - break; - } - clientB->read(buffer.data(), buffer.size()); - qlonglong writtenB = clientB->write(buffer.data(), buffer.size()); - clientB->flush(); - totalWritten += buffer.size(); - while (clientA.waitForReadyRead(100)) { - if (clientA.bytesAvailable() == writtenB) - break; - } - clientA.read(buffer.data(), buffer.size()); - } - - qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s", - probeSocket.localAddress().toString().toLatin1().constData(), - totalWritten / (1024.0 * 1024.0), - stopWatch.elapsed() / 1000.0, - (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); - - delete clientB; -} - -QTEST_MAIN(tst_QTcpServer) -#include "tst_qtcpserver.moc" diff --git a/tests/benchmarks/qtemporaryfile/main.cpp b/tests/benchmarks/qtemporaryfile/main.cpp deleted file mode 100644 index 8b71189..0000000 --- a/tests/benchmarks/qtemporaryfile/main.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#include -#include - - -class tst_qtemporaryfile : public QObject -{ - Q_OBJECT -private slots: - void openclose_data(); - void openclose(); - void readwrite_data() { openclose_data(); } - void readwrite(); - -private: -}; - -void tst_qtemporaryfile::openclose_data() -{ - QTest::addColumn("amount"); - QTest::newRow("100") << qint64(100); - QTest::newRow("1000") << qint64(1000); - QTest::newRow("10000") << qint64(10000); -} - -void tst_qtemporaryfile::openclose() -{ - QFETCH(qint64, amount); - - QBENCHMARK { - for (qint64 i = 0; i < amount; ++i) { - QTemporaryFile file; - file.open(); - file.close(); - } - } -} - -void tst_qtemporaryfile::readwrite() -{ - QFETCH(qint64, amount); - - const int dataSize = 4096; - QByteArray data; - data.fill('a', dataSize); - QBENCHMARK { - for (qint64 i = 0; i < amount; ++i) { - QTemporaryFile file; - file.open(); - file.write(data); - file.seek(0); - file.read(dataSize); - file.close(); - } - } -} - -QTEST_MAIN(tst_qtemporaryfile) - -#include "main.moc" diff --git a/tests/benchmarks/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/qtemporaryfile/qtemporaryfile.pro deleted file mode 100644 index c1b04f4..0000000 --- a/tests/benchmarks/qtemporaryfile/qtemporaryfile.pro +++ /dev/null @@ -1,12 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qtemporaryfile -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui - -CONFIG += release - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qtext/bidi.txt b/tests/benchmarks/qtext/bidi.txt deleted file mode 100644 index 7c74cb4..0000000 --- a/tests/benchmarks/qtext/bidi.txt +++ /dev/null @@ -1,4 +0,0 @@ -chinese -欧洲,软件+互联网 
 用统一码 (Unicode) 走遍世界
将于1997年 3 月10日-12日在德国 Mainz 市举行的第十届统一码国际研讨会现在开始注册。 本次会议将汇集各方面的专家。 涉及的领域包括: 国际互联网和统一码 ,国际化和本地化 ,统一码在操作系统和应用软件中的实现 ,字型 ,文本格式以及多文种计算等。 
当世界需要沟通时,请用Unicode! -hebrew-bidi -אײראָפּע: פּראָגראַמװאַרג און די װעלטנעץ: אוניקאָד איבער דער גאָרער װעלט פֿאַרשרײַבט זיך שױן אױף דער צענטער אינטערנאַציאָנאַלער אוניקאָד-קאָנפֿערענץ, װאָס װעט פֿאָרקומען דעם 10טן ביזן 12טן מאַרץ, 1997, אין מײַנץ, דײַטשלאַנד. די קאָנפֿערענץ װעט צוזאַמענברענגן מבֿינים פֿון װעלטנעץ, אוניקאָד, אי אַלװעלטלעכן אי סבֿיבֿהדיקן פּראָגראַמװאַרג, אַרײַנשטעלן אוניקאָד אין אָפּעריר-סיסטעמען און אָנװענדונגען, שריפֿטן, טעקסט-אױסשטעל, און מערשפּראַכיקע קאָמפּיוטערײַ. diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp deleted file mode 100644 index d4f3165..0000000 --- a/tests/benchmarks/qtext/main.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -// In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" -#endif - -Q_DECLARE_METATYPE(QTextDocument*) - -class tst_QText: public QObject -{ - Q_OBJECT -public: - tst_QText() { - m_lorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."); - m_shortLorem = QString::fromLatin1("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."); - } - -private slots: - void loadHtml_data(); - void loadHtml(); - - void shaping_data(); - void shaping(); - - void odfWriting_empty(); - void odfWriting_text(); - void odfWriting_images(); - - void constructControl(); - void constructDocument(); - - void layout(); - void paintLayoutToPixmap(); - void paintLayoutToPixmap_painterFill(); - - void document(); - void paintDocToPixmap(); - void paintDocToPixmap_painterFill(); - - void control(); - void paintControlToPixmap(); - void paintControlToPixmap_painterFill(); - -private: - QSize setupTextLayout(QTextLayout *layout); - - QString m_lorem; - QString m_shortLorem; -}; - -void tst_QText::loadHtml_data() -{ - QTest::addColumn("source"); - QTest::newRow("empty") << QString(); - QTest::newRow("simple") << QString::fromLatin1("Foo"); - QTest::newRow("simple2") << QString::fromLatin1("Foo"); - - QString parag = QString::fromLatin1("

%1

").arg(m_lorem); - QString header = QString::fromLatin1("test"); - QTest::newRow("long") << QString::fromLatin1("test") + parag + parag + parag - + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag + parag - + QString::fromLatin1(""); - QTest::newRow("table") << header + QLatin1String("
xx
") - + parag + QLatin1String("
xx") - + parag; -} - -void tst_QText::loadHtml() -{ - QFETCH(QString, source); - QTextDocument doc; - QBENCHMARK { - doc.setHtml(source); - } -} - -void tst_QText::shaping_data() -{ - QTest::addColumn("parag"); - QTest::newRow("empty") << QString(); - QTest::newRow("lorem") << m_lorem; - QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet"); - -#if !defined(Q_OS_SYMBIAN) - QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt")); -#else - QFile file( SRCDIR "bidi.txt" ); -#endif - QVERIFY(file.open(QFile::ReadOnly)); - QByteArray data = file.readAll(); - QVERIFY(data.count() > 1000); - QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), QString::SkipEmptyParts); - QVERIFY(list.count() %2 == 0); // even amount as we have title and then content. - for (int i=0; i < list.count(); i+=2) { - QTest::newRow(list.at(i).toLatin1()) << list.at(i+1); - } -} - -void tst_QText::shaping() -{ - QFETCH(QString, parag); - - QTextLayout lay(parag); - lay.setCacheEnabled(false); - - // do one run to make sure any fonts are loaded. - lay.beginLayout(); - lay.createLine(); - lay.endLayout(); - - QBENCHMARK { - lay.beginLayout(); - lay.createLine(); - lay.endLayout(); - } -} - -void tst_QText::odfWriting_empty() -{ - QVERIFY(QTextDocumentWriter::supportedDocumentFormats().contains("ODF")); // odf compiled in - QTextDocument *doc = new QTextDocument(); - // write it - QBENCHMARK { - QBuffer buffer; - buffer.open(QIODevice::WriteOnly); - QTextDocumentWriter writer(&buffer, "ODF"); - writer.write(doc); - } - delete doc; -} - -void tst_QText::odfWriting_text() -{ - QTextDocument *doc = new QTextDocument(); - QTextCursor cursor(doc); - QTextBlockFormat bf; - bf.setIndent(2); - cursor.insertBlock(bf); - cursor.insertText(m_lorem); - bf.setTopMargin(10); - cursor.insertBlock(bf); - cursor.insertText(m_lorem); - bf.setRightMargin(30); - cursor.insertBlock(bf); - cursor.insertText(m_lorem); - - // write it - QBENCHMARK { - QBuffer buffer; - buffer.open(QIODevice::WriteOnly); - QTextDocumentWriter writer(&buffer, "ODF"); - writer.write(doc); - } - delete doc; -} - -void tst_QText::odfWriting_images() -{ - QTextDocument *doc = new QTextDocument(); - QTextCursor cursor(doc); - cursor.insertText(m_lorem); - QImage image(400, 200, QImage::Format_ARGB32_Premultiplied); - cursor.insertImage(image); - cursor.insertText(m_lorem); - - // write it - QBENCHMARK { - QBuffer buffer; - buffer.open(QIODevice::WriteOnly); - QTextDocumentWriter writer(&buffer, "ODF"); - writer.write(doc); - } - delete doc; -} - -QSize tst_QText::setupTextLayout(QTextLayout *layout) -{ - bool wrap = true; - int wrapWidth = 300; - layout->setCacheEnabled(true); - - int height = 0; - qreal widthUsed = 0; - qreal lineWidth = 0; - - //set manual width - if (wrap) - lineWidth = wrapWidth; - - layout->beginLayout(); - - while (1) { - QTextLine line = layout->createLine(); - if (!line.isValid()) - break; - - if (wrap) - line.setLineWidth(lineWidth); - } - layout->endLayout(); - - for (int i = 0; i < layout->lineCount(); ++i) { - QTextLine line = layout->lineAt(i); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - line.setPosition(QPointF(0, height)); - height += int(line.height()); - } - return QSize(qCeil(widthUsed), height); -} - -void tst_QText::constructControl() -{ - QTextControl *control = new QTextControl; - delete control; - - QBENCHMARK { - QTextControl *control = new QTextControl; - delete control; - } -} - -void tst_QText::constructDocument() -{ - QTextDocument *doc = new QTextDocument; - delete doc; - - QBENCHMARK { - QTextDocument *doc = new QTextDocument; - delete doc; - } -} - -void tst_QText::layout() -{ - QTextLayout layout(m_shortLorem); - setupTextLayout(&layout); - - QBENCHMARK { - QTextLayout layout(m_shortLorem); - setupTextLayout(&layout); - } -} - -void tst_QText::paintLayoutToPixmap() -{ - QTextLayout layout(m_shortLorem); - QSize size = setupTextLayout(&layout); - - QBENCHMARK { - QPixmap img(size); - img.fill(Qt::transparent); - QPainter p(&img); - layout.draw(&p, QPointF(0, 0)); - } -} - -void tst_QText::paintLayoutToPixmap_painterFill() -{ - QTextLayout layout(m_shortLorem); - QSize size = setupTextLayout(&layout); - - QBENCHMARK { - QPixmap img(size); - QPainter p(&img); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); - p.setCompositionMode(QPainter::CompositionMode_SourceOver); - layout.draw(&p, QPointF(0, 0)); - } -} - -void tst_QText::document() -{ - QTextDocument *doc = new QTextDocument; - - QBENCHMARK { - QTextDocument *doc = new QTextDocument; - doc->setHtml(m_shortLorem); - } -} - -void tst_QText::paintDocToPixmap() -{ - QTextDocument *doc = new QTextDocument; - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - img.fill(Qt::transparent); - QPainter p(&img); - doc->drawContents(&p); - } -} - -void tst_QText::paintDocToPixmap_painterFill() -{ - QTextDocument *doc = new QTextDocument; - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - QPainter p(&img); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); - p.setCompositionMode(QPainter::CompositionMode_SourceOver); - doc->drawContents(&p); - } -} - -void tst_QText::control() -{ - QTextControl *control = new QTextControl(m_shortLorem); - - QBENCHMARK { - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - } -} - -void tst_QText::paintControlToPixmap() -{ - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - img.fill(Qt::transparent); - QPainter p(&img); - control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); - } -} - -void tst_QText::paintControlToPixmap_painterFill() -{ - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - QPainter p(&img); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); - p.setCompositionMode(QPainter::CompositionMode_SourceOver); - control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); - } -} - -QTEST_MAIN(tst_QText) - -#include "main.moc" diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/qtext/qtext.pro deleted file mode 100644 index 9e8860f..0000000 --- a/tests/benchmarks/qtext/qtext.pro +++ /dev/null @@ -1,14 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_QText - -SOURCES += main.cpp - -symbian* { - TARGET.CAPABILITY = ALL -TCB - addFiles.sources = bidi.txt - addFiles.path = . - DEPLOYMENT += addFiles -} else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} \ No newline at end of file diff --git a/tests/benchmarks/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/qthreadstorage/qthreadstorage.pro deleted file mode 100644 index f9c1978..0000000 --- a/tests/benchmarks/qthreadstorage/qthreadstorage.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qthreadstorage - -SOURCES += tst_qthreadstorage.cpp - diff --git a/tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp deleted file mode 100644 index faae4d7..0000000 --- a/tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -//TESTED_FILES= - -QThreadStorage dummy[8]; - -QThreadStorage tls1; - -class tst_QThreadStorage : public QObject -{ - Q_OBJECT - -public: - tst_QThreadStorage(); - virtual ~tst_QThreadStorage(); - -public slots: - void init(); - void cleanup(); - -private slots: - void construct(); - void get(); - void set(); -}; - -tst_QThreadStorage::tst_QThreadStorage() -{ -} - -tst_QThreadStorage::~tst_QThreadStorage() -{ -} - -void tst_QThreadStorage::init() -{ - dummy[1].setLocalData(new int(5)); - dummy[2].setLocalData(new int(4)); - dummy[3].setLocalData(new int(3)); - tls1.setLocalData(new QString()); -} - -void tst_QThreadStorage::cleanup() -{ -} - -void tst_QThreadStorage::construct() -{ - QBENCHMARK { - QThreadStorage ts; - } -} - - -void tst_QThreadStorage::get() -{ - QThreadStorage ts; - ts.setLocalData(new int(45)); - - int count = 0; - QBENCHMARK { - int *i = ts.localData(); - count += *i; - } - ts.setLocalData(0); -} - -void tst_QThreadStorage::set() -{ - QThreadStorage ts; - - int count = 0; - QBENCHMARK { - ts.setLocalData(new int(count)); - count++; - } - ts.setLocalData(0); -} - - -QTEST_MAIN(tst_QThreadStorage) -#include "tst_qthreadstorage.moc" diff --git a/tests/benchmarks/qtransform/qtransform.pro b/tests/benchmarks/qtransform/qtransform.pro deleted file mode 100644 index 8d87656..0000000 --- a/tests/benchmarks/qtransform/qtransform.pro +++ /dev/null @@ -1,6 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qtransform - -SOURCES += tst_qtransform.cpp - diff --git a/tests/benchmarks/qtransform/tst_qtransform.cpp b/tests/benchmarks/qtransform/tst_qtransform.cpp deleted file mode 100644 index b33cf58..0000000 --- a/tests/benchmarks/qtransform/tst_qtransform.cpp +++ /dev/null @@ -1,592 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -//TESTED_FILES= - -class tst_QTransform : public QObject -{ - Q_OBJECT - -public: - tst_QTransform(); - virtual ~tst_QTransform(); - -public slots: - void init(); - void cleanup(); - -private slots: - void construct(); - void translate_data(); - void translate(); - void scale_data(); - void scale(); - void shear_data(); - void shear(); - void rotate_data(); - void rotate(); - void rotateXYZ_data(); - void rotateXYZ(); - void operatorAssign_data(); - void operatorAssign(); - void operatorEqual_data(); - void operatorEqual(); - void operatorNotEqual_data(); - void operatorNotEqual(); - void operatorMultiply_data(); - void operatorMultiply(); - void operatorPlusEqualScalar_data(); - void operatorPlusEqualScalar(); - void operatorMinusEqualScalar_data(); - void operatorMinusEqualScalar(); - void operatorMultiplyEqual_data(); - void operatorMultiplyEqual(); - void operatorMultiplyEqualScalar_data(); - void operatorMultiplyEqualScalar(); - void operatorDivideEqualScalar_data(); - void operatorDivideEqualScalar(); - void mapQPoint_data(); - void mapQPoint(); - void mapQPointF_data(); - void mapQPointF(); - void mapRect_data(); - void mapRect(); - void mapRectF_data(); - void mapRectF(); - void mapQPolygon_data(); - void mapQPolygon(); - void mapQPolygonF_data(); - void mapQPolygonF(); - void mapQRegion_data(); - void mapQRegion(); - void mapToPolygon_data(); - void mapToPolygon(); - void mapQPainterPath_data(); - void mapQPainterPath(); - void isIdentity_data(); - void isIdentity(); - void isAffine_data(); - void isAffine(); - void isInvertible_data(); - void isInvertible(); - void isRotating_data(); - void isRotating(); - void isScaling_data(); - void isScaling(); - void isTranslating_data(); - void isTranslating(); - void type_data(); - void type(); - void determinant_data(); - void determinant(); - void adjoint_data(); - void adjoint(); - void transposed_data(); - void transposed(); - void inverted_data(); - void inverted(); - -private: - QMap generateTransforms() const; -}; - -tst_QTransform::tst_QTransform() -{ -} - -tst_QTransform::~tst_QTransform() -{ -} - -void tst_QTransform::init() -{ -} - -void tst_QTransform::cleanup() -{ -} - -QMap tst_QTransform::generateTransforms() const -{ - QMap x; - x["0: identity"] = QTransform(); - x["1: translate"] = QTransform().translate(10, 10); - x["2: translate"] = QTransform().translate(-10, -10); - x["3: rotate45"] = QTransform().rotate(45); - x["4: rotate90"] = QTransform().rotate(90); - x["5: rotate180"] = QTransform().rotate(180); - x["6: shear2,2"] = QTransform().shear(2, 2); - x["7: shear-2,-2"] = QTransform().shear(-2, -2); - x["8: scaleUp2,2"] = QTransform().scale(2, 2); - x["9: scaleUp2,3"] = QTransform().scale(2, 3); - x["10: scaleDown0.5,0.5"] = QTransform().scale(0.5, 0.5); - x["11: scaleDown0.5,0.25"] = QTransform().scale(0.5, 0.25); - x["12: rotateX"] = QTransform().rotate(45, Qt::XAxis); - x["13: rotateY"] = QTransform().rotate(45, Qt::YAxis); - x["14: rotateXY"] = QTransform().rotate(45, Qt::XAxis).rotate(45, Qt::YAxis); - x["15: rotateYZ"] = QTransform().rotate(45, Qt::YAxis).rotate(45, Qt::ZAxis); - x["16: full"] = QTransform().translate(10, 10).rotate(45).shear(2, 2).scale(2, 2).rotate(45, Qt::YAxis).rotate(45, Qt::XAxis).rotate(45, Qt::ZAxis); - return x; -} - -void tst_QTransform::construct() -{ - QBENCHMARK { - QTransform x; - } -} - -#define SINGLE_DATA_IMPLEMENTATION(func) \ -void tst_QTransform::func##_data() \ -{ \ - QTest::addColumn("transform"); \ - QMap x = generateTransforms(); \ - QMapIterator it(x); \ - while (it.hasNext()) { \ - it.next(); \ - QTest::newRow(it.key()) << it.value(); \ - } \ -} - -#define DOUBLE_DATA_IMPLEMENTATION(func) \ -void tst_QTransform::func##_data() \ -{ \ - QTest::addColumn("x1"); \ - QTest::addColumn("x2"); \ - QMap x = generateTransforms(); \ - QMapIterator it(x); \ - while (it.hasNext()) { \ - it.next(); \ - const char *key1 = it.key(); \ - QTransform x1 = it.value(); \ - QMapIterator it2(x); \ - while (it2.hasNext()) { \ - it2.next(); \ - QTest::newRow(QString("%1 + %2").arg(key1).arg(it2.key()).toLatin1().constData()) \ - << x1 << it2.value(); \ - } \ - } \ -} - -SINGLE_DATA_IMPLEMENTATION(translate) - -void tst_QTransform::translate() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.translate(10, 10); - } -} - -SINGLE_DATA_IMPLEMENTATION(scale) - -void tst_QTransform::scale() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.scale(2, 2); - } -} - -SINGLE_DATA_IMPLEMENTATION(shear) - -void tst_QTransform::shear() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.shear(2, 2); - } -} - -SINGLE_DATA_IMPLEMENTATION(rotate) - -void tst_QTransform::rotate() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.rotate(45); - } -} - -SINGLE_DATA_IMPLEMENTATION(rotateXYZ) - -void tst_QTransform::rotateXYZ() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.rotate(45, Qt::XAxis); - x.rotate(45, Qt::YAxis); - x.rotate(45, Qt::ZAxis); - } -} - -DOUBLE_DATA_IMPLEMENTATION(operatorAssign) - -void tst_QTransform::operatorAssign() -{ - QFETCH(QTransform, x1); - QFETCH(QTransform, x2); - QTransform x = x1; - QBENCHMARK { - x = x2; - } -} - -DOUBLE_DATA_IMPLEMENTATION(operatorEqual) - -void tst_QTransform::operatorEqual() -{ - QFETCH(QTransform, x1); - QFETCH(QTransform, x2); - QTransform x = x1; - QBENCHMARK { - x == x2; - } -} - -DOUBLE_DATA_IMPLEMENTATION(operatorNotEqual) - -void tst_QTransform::operatorNotEqual() -{ - QFETCH(QTransform, x1); - QFETCH(QTransform, x2); - QTransform x = x1; - QBENCHMARK { - x != x2; - } -} - -DOUBLE_DATA_IMPLEMENTATION(operatorMultiply) - -void tst_QTransform::operatorMultiply() -{ - QFETCH(QTransform, x1); - QFETCH(QTransform, x2); - QTransform x = x1; - QBENCHMARK { - x * x2; - } -} - -SINGLE_DATA_IMPLEMENTATION(operatorPlusEqualScalar) - -void tst_QTransform::operatorPlusEqualScalar() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x += 3.14; - } -} - -SINGLE_DATA_IMPLEMENTATION(operatorMinusEqualScalar) - -void tst_QTransform::operatorMinusEqualScalar() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x -= 3.14; - } -} - -DOUBLE_DATA_IMPLEMENTATION(operatorMultiplyEqual) - -void tst_QTransform::operatorMultiplyEqual() -{ - QFETCH(QTransform, x1); - QFETCH(QTransform, x2); - QTransform x = x1; - QBENCHMARK { - x *= x2; - } -} - -SINGLE_DATA_IMPLEMENTATION(operatorMultiplyEqualScalar) - -void tst_QTransform::operatorMultiplyEqualScalar() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x * 3; - } -} - -SINGLE_DATA_IMPLEMENTATION(operatorDivideEqualScalar) - -void tst_QTransform::operatorDivideEqualScalar() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x /= 3; - } -} - -SINGLE_DATA_IMPLEMENTATION(mapQPoint) - -void tst_QTransform::mapQPoint() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.map(QPoint(3, 3)); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapQPointF) - -void tst_QTransform::mapQPointF() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.map(QPointF(3, 3)); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapRect) - -void tst_QTransform::mapRect() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.mapRect(QRect(0, 0, 100, 100)); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapRectF) - -void tst_QTransform::mapRectF() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.mapRect(QRectF(0, 0, 100, 100)); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapQPolygon) - -void tst_QTransform::mapQPolygon() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QPolygon poly = QPolygon(QRect(0, 0, 100, 100)); - QBENCHMARK { - x.map(poly); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapQPolygonF) - -void tst_QTransform::mapQPolygonF() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QPolygonF poly = QPolygonF(QRectF(0, 0, 100, 100)); - QBENCHMARK { - x.map(poly); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapQRegion) - -void tst_QTransform::mapQRegion() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QRegion region; - for (int i = 0; i < 10; ++i) - region += QRect(i * 10, i * 10, 100, 100); - QBENCHMARK { - x.map(region); - } -} - -SINGLE_DATA_IMPLEMENTATION(mapToPolygon) - -void tst_QTransform::mapToPolygon() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QBENCHMARK { - x.mapToPolygon(QRect(0, 0, 100, 100)); - } -} - - -SINGLE_DATA_IMPLEMENTATION(mapQPainterPath) - -void tst_QTransform::mapQPainterPath() -{ - QFETCH(QTransform, transform); - QTransform x = transform; - QPainterPath path; - for (int i = 0; i < 10; ++i) - path.addEllipse(i * 10, i * 10, 100, 100); - QBENCHMARK { - x.map(path); - } -} - -SINGLE_DATA_IMPLEMENTATION(isIdentity) - -void tst_QTransform::isIdentity() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isIdentity(); - } -} - -SINGLE_DATA_IMPLEMENTATION(isAffine) - -void tst_QTransform::isAffine() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isAffine(); - } -} - -SINGLE_DATA_IMPLEMENTATION(isInvertible) - -void tst_QTransform::isInvertible() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isInvertible(); - } -} - -SINGLE_DATA_IMPLEMENTATION(isRotating) - -void tst_QTransform::isRotating() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isRotating(); - } -} - -SINGLE_DATA_IMPLEMENTATION(isScaling) - -void tst_QTransform::isScaling() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isScaling(); - } -} - -SINGLE_DATA_IMPLEMENTATION(isTranslating) - -void tst_QTransform::isTranslating() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.isTranslating(); - } -} - -SINGLE_DATA_IMPLEMENTATION(type) - -void tst_QTransform::type() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.type(); - } -} - -SINGLE_DATA_IMPLEMENTATION(determinant) - -void tst_QTransform::determinant() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.determinant(); - } -} - -SINGLE_DATA_IMPLEMENTATION(adjoint) - -void tst_QTransform::adjoint() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.adjoint(); - } -} - -SINGLE_DATA_IMPLEMENTATION(transposed) - -void tst_QTransform::transposed() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.transposed(); - } -} - -SINGLE_DATA_IMPLEMENTATION(inverted) - -void tst_QTransform::inverted() -{ - QFETCH(QTransform, transform); - QBENCHMARK { - transform.inverted(); - } -} - -QTEST_MAIN(tst_QTransform) -#include "tst_qtransform.moc" diff --git a/tests/benchmarks/qvariant/qvariant.pro b/tests/benchmarks/qvariant/qvariant.pro deleted file mode 100644 index 63b5442..0000000 --- a/tests/benchmarks/qvariant/qvariant.pro +++ /dev/null @@ -1,11 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qvariant -DEPENDPATH += . -INCLUDEPATH += . - -CONFIG += release -#CONFIG += debug - - -SOURCES += tst_qvariant.cpp diff --git a/tests/benchmarks/qvariant/tst_qvariant.cpp b/tests/benchmarks/qvariant/tst_qvariant.cpp deleted file mode 100644 index 82dc7dd..0000000 --- a/tests/benchmarks/qvariant/tst_qvariant.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#define ITERATION_COUNT 1e5 - -class tst_qvariant : public QObject -{ - Q_OBJECT -private slots: - void testBound(); - - void doubleVariantCreation(); - void floatVariantCreation(); - void rectVariantCreation(); - void stringVariantCreation(); - void pixmapVariantCreation(); - - void doubleVariantSetValue(); - void floatVariantSetValue(); - void rectVariantSetValue(); - void stringVariantSetValue(); - - void doubleVariantAssignment(); - void floatVariantAssignment(); - void rectVariantAssignment(); - void stringVariantAssignment(); -}; - -void tst_qvariant::testBound() -{ - qreal d = qreal(.5); - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - d = qBound(0, d, 1); - } - } -} - -template -static void variantCreation(T val) -{ - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - QVariant v(val); - } - } -} - -void tst_qvariant::doubleVariantCreation() -{ - variantCreation(0.0); -} - -void tst_qvariant::floatVariantCreation() -{ - variantCreation(0.0f); -} - -void tst_qvariant::rectVariantCreation() -{ - variantCreation(QRect(1, 2, 3, 4)); -} - -void tst_qvariant::stringVariantCreation() -{ - variantCreation(QString()); -} - -void tst_qvariant::pixmapVariantCreation() -{ - variantCreation(QPixmap()); -} - -template -static void variantSetValue(T d) -{ - QVariant v; - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - qVariantSetValue(v, d); - } - } -} - -void tst_qvariant::doubleVariantSetValue() -{ - variantSetValue(0.0); -} - -void tst_qvariant::floatVariantSetValue() -{ - variantSetValue(0.0f); -} - -void tst_qvariant::rectVariantSetValue() -{ - variantSetValue(QRect()); -} - -void tst_qvariant::stringVariantSetValue() -{ - variantSetValue(QString()); -} - -template -static void variantAssignment(T d) -{ - QVariant v; - QBENCHMARK { - for(int i = 0; i < ITERATION_COUNT; ++i) { - v = d; - } - } -} - -void tst_qvariant::doubleVariantAssignment() -{ - variantAssignment(0.0); -} - -void tst_qvariant::floatVariantAssignment() -{ - variantAssignment(0.0f); -} - -void tst_qvariant::rectVariantAssignment() -{ - variantAssignment(QRect()); -} - -void tst_qvariant::stringVariantAssignment() -{ - variantAssignment(QString()); -} - -QTEST_MAIN(tst_qvariant) - -#include "tst_qvariant.moc" diff --git a/tests/benchmarks/qwidget/qwidget.pro b/tests/benchmarks/qwidget/qwidget.pro deleted file mode 100644 index ff47445..0000000 --- a/tests/benchmarks/qwidget/qwidget.pro +++ /dev/null @@ -1,4 +0,0 @@ -load(qttest_p4) - -TARGET = tst_qwidget -SOURCES += tst_qwidget.cpp diff --git a/tests/benchmarks/qwidget/tst_qwidget.cpp b/tests/benchmarks/qwidget/tst_qwidget.cpp deleted file mode 100644 index f21bd44..0000000 --- a/tests/benchmarks/qwidget/tst_qwidget.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -class tst_QWidget : public QObject -{ - Q_OBJECT - - -private slots: - void update_data(); - void updateOpaque_data(); - void updateOpaque(); - void updateTransparent_data(); - void updateTransparent(); - void updatePartial_data(); - void updatePartial(); - void updateComplex_data(); - void updateComplex(); - - void complexToplevelResize(); -}; - -class UpdateWidget : public QWidget -{ -public: - UpdateWidget(int rows, int columns) : QWidget(0) - { - QGridLayout *layout = new QGridLayout; - for (int row = 0; row < rows; ++row) { - for (int column = 0; column < columns; ++column) { - UpdateWidget *widget = new UpdateWidget; - widget->setFixedSize(20, 20); - layout->addWidget(widget, row, column); - children.append(widget); - } - } - setLayout(layout); - } - - UpdateWidget(QWidget *parent = 0) : QWidget(parent) {} - - void paintEvent(QPaintEvent *) - { - static int color = Qt::black; - - QPainter painter(this); - painter.fillRect(rect(), Qt::GlobalColor(color)); - - if (++color > Qt::darkYellow) - color = Qt::black; - } - - QRegion updateRegion; - QList children; -}; - -void tst_QWidget::update_data() -{ - QTest::addColumn("rows"); - QTest::addColumn("columns"); - QTest::addColumn("numUpdates"); - - QTest::newRow("10x10x1") << 10 << 10 << 1; - QTest::newRow("10x10x10") << 10 << 10 << 10; - QTest::newRow("25x25x1") << 25 << 25 << 1; - QTest::newRow("25x25x10") << 25 << 25 << 10; - QTest::newRow("25x25x100") << 25 << 25 << 100; -} - -void tst_QWidget::updateOpaque_data() -{ - update_data(); -} - -void tst_QWidget::updateOpaque() -{ - QFETCH(int, rows); - QFETCH(int, columns); - QFETCH(int, numUpdates); - - UpdateWidget widget(rows, columns); - foreach (QWidget *w, widget.children) { - w->setAttribute(Qt::WA_OpaquePaintEvent); - } - - widget.show(); - QApplication::processEvents(); - - int i = 0; - const int n = widget.children.size(); - QBENCHMARK { - for (int j = 0; j < numUpdates; ++j) { - widget.children[i]->update(); - QApplication::processEvents(); - i = (i + 1) % n; - } - } -} - -void tst_QWidget::updateTransparent_data() -{ - update_data(); -} - -void tst_QWidget::updateTransparent() -{ - QFETCH(int, rows); - QFETCH(int, columns); - QFETCH(int, numUpdates); - - UpdateWidget widget(rows, columns); - widget.show(); - QApplication::processEvents(); - - int i = 0; - const int n = widget.children.size(); - QBENCHMARK { - for (int j = 0; j < numUpdates; ++j) { - widget.children[i]->update(); - QApplication::processEvents(); - i = (i + 1) % n; - } - } -} - -void tst_QWidget::updatePartial_data() -{ - update_data(); -} - -void tst_QWidget::updatePartial() -{ - QFETCH(int, rows); - QFETCH(int, columns); - QFETCH(int, numUpdates); - - UpdateWidget widget(rows, columns); - widget.show(); - QApplication::processEvents(); - - int i = 0; - const int n = widget.children.size(); - QBENCHMARK { - for (int j = 0; j < numUpdates; ++j) { - QWidget *w = widget.children[i]; - const int x = w->width() / 2; - const int y = w->height() / 2; - w->update(0, 0, x, y); - w->update(x, 0, x, y); - w->update(0, y, x, y); - w->update(x, y, x, y); - QApplication::processEvents(); - i = (i + 1) % n; - } - } -} - -void tst_QWidget::updateComplex_data() -{ - update_data(); -} - -void tst_QWidget::updateComplex() -{ - QFETCH(int, rows); - QFETCH(int, columns); - QFETCH(int, numUpdates); - - UpdateWidget widget(rows, columns); - widget.show(); - QApplication::processEvents(); - - int i = 0; - const int n = widget.children.size(); - QBENCHMARK { - for (int j = 0; j < numUpdates; ++j) { - QWidget *w = widget.children[i]; - const int x = w->width() / 2; - const int y = w->height() / 2; - w->update(QRegion(0, 0, x, y, QRegion::Ellipse)); - w->update(QRegion(x, y, x, y, QRegion::Ellipse)); - QApplication::processEvents(); - i = (i + 1) % n; - } - } -} - -class ResizeWidget : public QWidget -{ -public: - ResizeWidget(); -}; - -ResizeWidget::ResizeWidget() : QWidget(0) -{ - QBoxLayout *topLayout = new QVBoxLayout; - - QMenuBar *menubar = new QMenuBar; - QMenu* popup = menubar->addMenu("&File"); - popup->addAction("&Quit", qApp, SLOT(quit())); - topLayout->setMenuBar(menubar); - - QBoxLayout *buttons = new QHBoxLayout; - buttons->setMargin(5); - buttons->addStretch(10); - for (int i = 1; i <= 4; i++ ) { - QPushButton* button = new QPushButton; - button->setText(QString("Button %1").arg(i)); - buttons->addWidget(button); - } - topLayout->addLayout(buttons); - - buttons = new QHBoxLayout; - buttons->addStretch(10); - for (int i = 11; i <= 16; i++) { - QPushButton* button = new QPushButton; - button->setText(QString("Button %1").arg(i)); - buttons->addWidget(button); - } - topLayout->addLayout(buttons); - - QBoxLayout *buttons2 = new QHBoxLayout; - buttons2->addStretch(10); - topLayout->addLayout(buttons2); - - QPushButton *button = new QPushButton; - button->setText("Button five"); - buttons2->addWidget(button); - - button = new QPushButton; - button->setText("Button 6"); - buttons2->addWidget(button); - - QTextEdit *bigWidget = new QTextEdit; - bigWidget->setText("This widget will get all the remaining space"); - bigWidget->setFrameStyle(QFrame::Panel | QFrame::Plain); - topLayout->addWidget(bigWidget); - - const int numRows = 6; - const int labelCol = 0; - const int linedCol = 1; - const int multiCol = 2; - - QGridLayout *grid = new QGridLayout; - for (int row = 0; row < numRows; row++) { - QLineEdit *lineEdit = new QLineEdit; - grid->addWidget(lineEdit, row, linedCol); - QLabel *label = new QLabel(QString("Line &%1").arg(row + 1)); - grid->addWidget(label, row, labelCol); - } - topLayout->addLayout(grid); - - QTextEdit *multiLineEdit = new QTextEdit; - grid->addWidget(multiLineEdit, 0, labelCol + 1, multiCol, multiCol); - - grid->setColumnStretch(linedCol, 10); - grid->setColumnStretch(multiCol, 20); - - QLabel* statusBar = new QLabel; - statusBar->setText("Let's pretend this is a status bar"); - statusBar->setFrameStyle(QFrame::Panel | QFrame::Sunken); - statusBar->setFixedHeight(statusBar->sizeHint().height()); - statusBar->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); - topLayout->addWidget(statusBar); - - topLayout->activate(); - setLayout(topLayout); -} - -void tst_QWidget::complexToplevelResize() -{ - ResizeWidget w; - w.show(); - - QApplication::processEvents(); - - const int minSize = 100; - const int maxSize = 800; - int size = minSize; - - QBENCHMARK { - w.resize(size, size); - size = qMax(minSize, (size + 10) % maxSize); - QApplication::processEvents(); - QApplication::processEvents(); - } -} - -QTEST_MAIN(tst_QWidget) - -#include "tst_qwidget.moc" diff --git a/tests/benchmarks/script/qscriptclass/qscriptclass.pro b/tests/benchmarks/script/qscriptclass/qscriptclass.pro new file mode 100644 index 0000000..f0ffeb7 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass/qscriptclass.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qscriptclass + +SOURCES += tst_qscriptclass.cpp + +QT += script diff --git a/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp b/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp new file mode 100644 index 0000000..7985028 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp @@ -0,0 +1,511 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +Q_DECLARE_METATYPE(QScriptContext*) +Q_DECLARE_METATYPE(QScriptValue) +Q_DECLARE_METATYPE(QScriptValueList) + +//TESTED_FILES= + +class TestClass : public QScriptClass +{ +public: + struct CustomProperty { + QueryFlags qflags; + uint id; + QScriptValue::PropertyFlags pflags; + QScriptValue value; + + CustomProperty(QueryFlags qf, uint i, QScriptValue::PropertyFlags pf, + const QScriptValue &val) + : qflags(qf), id(i), pflags(pf), value(val) { } + }; + + enum CallableMode { + NotCallable, + CallableReturnsSum, + CallableReturnsArgument, + CallableReturnsInvalidVariant + }; + + TestClass(QScriptEngine *engine); + ~TestClass(); + + void addCustomProperty(const QScriptString &name, QueryFlags qflags, + uint id, QScriptValue::PropertyFlags pflags, + const QScriptValue &value); + void removeCustomProperty(const QScriptString &name); + + QueryFlags queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id); + + QScriptValue property(const QScriptValue &object, + const QScriptString &name, uint id); + + void setProperty(QScriptValue &object, const QScriptString &name, + uint id, const QScriptValue &value); + + QScriptValue::PropertyFlags propertyFlags( + const QScriptValue &object, const QScriptString &name, uint id); + + QScriptClassPropertyIterator *newIterator(const QScriptValue &object); + + QScriptValue prototype() const; + + QString name() const; + + bool supportsExtension(Extension extension) const; + QVariant extension(Extension extension, + const QVariant &argument = QVariant()); + + void setIterationEnabled(bool enable); + bool isIterationEnabled() const; + + void setCallableMode(CallableMode mode); + CallableMode callableMode() const; + + void setHasInstance(bool hasInstance); + bool hasInstance() const; + +private: + inline CustomProperty *findCustomProperty(const QScriptString &name); + + QHash customProperties; + + QScriptValue m_prototype; + bool m_iterationEnabled; + CallableMode m_callableMode; + bool m_hasInstance; +}; + +class TestClassPropertyIterator : public QScriptClassPropertyIterator +{ +public: + TestClassPropertyIterator(const QHash &props, + const QScriptValue &object); + ~TestClassPropertyIterator(); + + bool hasNext() const; + void next(); + + bool hasPrevious() const; + void previous(); + + void toFront(); + void toBack(); + + QScriptString name() const; + uint id() const; + QScriptValue::PropertyFlags flags() const; + +private: + int m_index; + int m_last; + QHash m_props; +}; + +TestClass::TestClass(QScriptEngine *engine) + : QScriptClass(engine), m_iterationEnabled(true), + m_callableMode(NotCallable), m_hasInstance(false) +{ + m_prototype = engine->newObject(); +} + +TestClass::~TestClass() +{ + qDeleteAll(customProperties); +} + +TestClass::CustomProperty* TestClass::findCustomProperty(const QScriptString &name) +{ + QHash::const_iterator it; + it = customProperties.constFind(name); + if (it == customProperties.constEnd()) + return 0; + return it.value(); + +} + +void TestClass::addCustomProperty(const QScriptString &name, QueryFlags qflags, + uint id, QScriptValue::PropertyFlags pflags, + const QScriptValue &value) +{ + customProperties.insert(name, new CustomProperty(qflags, id, pflags, value)); +} + +void TestClass::removeCustomProperty(const QScriptString &name) +{ + CustomProperty *prop = customProperties.take(name); + if (prop) + delete prop; +} + +QScriptClass::QueryFlags TestClass::queryProperty(const QScriptValue &/*object*/, + const QScriptString &name, + QueryFlags flags, uint *id) +{ + CustomProperty *prop = findCustomProperty(name); + if (!prop) + return 0; + *id = prop->id; + return prop->qflags & flags; +} + +QScriptValue TestClass::property(const QScriptValue &/*object*/, + const QScriptString &name, uint /*id*/) +{ + CustomProperty *prop = findCustomProperty(name); + if (!prop) + return QScriptValue(); + return prop->value; +} + +void TestClass::setProperty(QScriptValue &/*object*/, const QScriptString &name, + uint /*id*/, const QScriptValue &value) +{ + CustomProperty *prop = findCustomProperty(name); + if (!prop) + return; + prop->value = value; +} + +QScriptValue::PropertyFlags TestClass::propertyFlags( + const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) +{ + CustomProperty *prop = findCustomProperty(name); + if (!prop) + return 0; + return prop->pflags; +} + +QScriptClassPropertyIterator *TestClass::newIterator(const QScriptValue &object) +{ + if (!m_iterationEnabled) + return 0; + return new TestClassPropertyIterator(customProperties, object); +} + +QScriptValue TestClass::prototype() const +{ + return m_prototype; +} + +QString TestClass::name() const +{ + return QLatin1String("TestClass"); +} + +bool TestClass::supportsExtension(Extension extension) const +{ + if (extension == Callable) + return (m_callableMode != NotCallable); + if (extension == HasInstance) + return m_hasInstance; + return false; +} + +QVariant TestClass::extension(Extension extension, + const QVariant &argument) +{ + if (extension == Callable) { + Q_ASSERT(m_callableMode != NotCallable); + QScriptContext *ctx = qvariant_cast(argument); + if (m_callableMode == CallableReturnsSum) { + qsreal sum = 0; + for (int i = 0; i < ctx->argumentCount(); ++i) + sum += ctx->argument(i).toNumber(); + QScriptValueIterator it(ctx->thisObject()); + while (it.hasNext()) { + it.next(); + sum += it.value().toNumber(); + } + return sum; + } else if (m_callableMode == CallableReturnsArgument) { + return qVariantFromValue(ctx->argument(0)); + } else if (m_callableMode == CallableReturnsInvalidVariant) { + return QVariant(); + } + } else if (extension == HasInstance) { + Q_ASSERT(m_hasInstance); + QScriptValueList args = qvariant_cast(argument); + QScriptValue obj = args.at(0); + QScriptValue value = args.at(1); + return value.property("foo").equals(obj.property("foo")); + } + return QVariant(); +} + +void TestClass::setIterationEnabled(bool enable) +{ + m_iterationEnabled = enable; +} + +bool TestClass::isIterationEnabled() const +{ + return m_iterationEnabled; +} + +void TestClass::setCallableMode(CallableMode mode) +{ + m_callableMode = mode; +} + +TestClass::CallableMode TestClass::callableMode() const +{ + return m_callableMode; +} + +void TestClass::setHasInstance(bool hasInstance) +{ + m_hasInstance = hasInstance; +} + +bool TestClass::hasInstance() const +{ + return m_hasInstance; +} + +TestClassPropertyIterator::TestClassPropertyIterator(const QHash &props, + const QScriptValue &object) + : QScriptClassPropertyIterator(object) +{ + m_props = props; + toFront(); +} + +TestClassPropertyIterator::~TestClassPropertyIterator() +{ +} + +bool TestClassPropertyIterator::hasNext() const +{ + return m_index < m_props.size(); +} + +void TestClassPropertyIterator::next() +{ + m_last = m_index; + ++m_index; +} + +bool TestClassPropertyIterator::hasPrevious() const +{ + return m_index > 0; +} + +void TestClassPropertyIterator::previous() +{ + --m_index; + m_last = m_index; +} + +void TestClassPropertyIterator::toFront() +{ + m_index = 0; + m_last = -1; +} + +void TestClassPropertyIterator::toBack() +{ + m_index = m_props.size(); + m_last = -1; +} + +QScriptString TestClassPropertyIterator::name() const +{ + return m_props.keys().value(m_last); +} + +uint TestClassPropertyIterator::id() const +{ + QScriptString key = m_props.keys().value(m_last); + if (!key.isValid()) + return 0; + TestClass::CustomProperty *prop = m_props.value(key); + return prop->id; +} + +QScriptValue::PropertyFlags TestClassPropertyIterator::flags() const +{ + QScriptString key = m_props.keys().value(m_last); + if (!key.isValid()) + return 0; + TestClass::CustomProperty *prop = m_props.value(key); + return prop->pflags; +} + +class tst_QScriptClass : public QObject +{ + Q_OBJECT + +public: + tst_QScriptClass(); + virtual ~tst_QScriptClass(); + +public slots: + void init(); + void cleanup(); + +private slots: + void noSuchProperty(); + void property(); + void setProperty(); + void propertyFlags(); + void call(); + void hasInstance(); + void iterate(); +}; + +tst_QScriptClass::tst_QScriptClass() +{ +} + +tst_QScriptClass::~tst_QScriptClass() +{ +} + +void tst_QScriptClass::init() +{ +} + +void tst_QScriptClass::cleanup() +{ +} + +void tst_QScriptClass::noSuchProperty() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptValue obj = eng.newObject(&cls); + QString propertyName = QString::fromLatin1("foo"); + QBENCHMARK { + (void)obj.property(propertyName); + } +} + +void tst_QScriptClass::property() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptString foo = eng.toStringHandle("foo"); + cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); + QScriptValue obj = eng.newObject(&cls); + QBENCHMARK { + (void)obj.property(foo); + } +} + +void tst_QScriptClass::setProperty() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptString foo = eng.toStringHandle("foo"); + cls.addCustomProperty(foo, QScriptClass::HandlesWriteAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); + QScriptValue obj = eng.newObject(&cls); + QScriptValue value(456); + QBENCHMARK { + obj.setProperty(foo, value); + } +} + +void tst_QScriptClass::propertyFlags() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptString foo = eng.toStringHandle("foo"); + cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, QScriptValue::ReadOnly, /*value=*/123); + QScriptValue obj = eng.newObject(&cls); + QBENCHMARK { + (void)obj.propertyFlags(foo); + } +} + +void tst_QScriptClass::call() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.setCallableMode(TestClass::CallableReturnsArgument); + QScriptValue obj = eng.newObject(&cls); + QScriptValue thisObject; + QScriptValueList args; + args.append(123); + QBENCHMARK { + (void)obj.call(thisObject, args); + } +} + +void tst_QScriptClass::hasInstance() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.setHasInstance(true); + QScriptValue obj = eng.newObject(&cls); + obj.setProperty("foo", 123); + QScriptValue plain = eng.newObject(); + plain.setProperty("foo", obj.property("foo")); + QBENCHMARK { + (void)plain.instanceOf(obj); + } +} + +void tst_QScriptClass::iterate() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.setIterationEnabled(true); + cls.addCustomProperty(eng.toStringHandle("foo"), QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); + cls.addCustomProperty(eng.toStringHandle("bar"), QScriptClass::HandlesReadAccess, /*id=*/2, /*attributes=*/0, /*value=*/456); + QScriptValue obj = eng.newObject(&cls); + QBENCHMARK { + QScriptValueIterator it(obj); + while (it.hasNext()) { + it.next(); + (void)it.scriptName(); + } + } +} + +QTEST_MAIN(tst_QScriptClass) +#include "tst_qscriptclass.moc" diff --git a/tests/benchmarks/script/qscriptengine/qscriptengine.pro b/tests/benchmarks/script/qscriptengine/qscriptengine.pro new file mode 100644 index 0000000..df6dbb3 --- /dev/null +++ b/tests/benchmarks/script/qscriptengine/qscriptengine.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qscriptengine + +SOURCES += tst_qscriptengine.cpp + +QT += script + +symbian* { + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB + TARGET.EPOCSTACKSIZE = 0x14000 +} diff --git a/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp new file mode 100644 index 0000000..6c6f0b1 --- /dev/null +++ b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp @@ -0,0 +1,289 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +//TESTED_FILES= + +class tst_QScriptEngine : public QObject +{ + Q_OBJECT + +public: + tst_QScriptEngine(); + virtual ~tst_QScriptEngine(); + +public slots: + void init(); + void cleanup(); + +private slots: + void constructor(); + void evaluate_data(); + void evaluate(); + void evaluateProgram_data(); + void evaluateProgram(); + void connectAndDisconnect(); + void newObject(); + void newQObject(); + void newFunction(); + void newVariant(); + void collectGarbage(); + void pushAndPopContext(); + void toStringHandle(); + void castValueToQreal(); + void nativeCall(); + void translation_data(); + void translation(); +}; + +tst_QScriptEngine::tst_QScriptEngine() +{ +} + +tst_QScriptEngine::~tst_QScriptEngine() +{ +} + +void tst_QScriptEngine::init() +{ +} + +void tst_QScriptEngine::cleanup() +{ +} + +void tst_QScriptEngine::constructor() +{ + QBENCHMARK { + QScriptEngine engine; + (void)engine.parent(); + } +} + +void tst_QScriptEngine::evaluate_data() +{ + QTest::addColumn("code"); + QTest::newRow("empty script") << QString::fromLatin1(""); + QTest::newRow("number literal") << QString::fromLatin1("123"); + QTest::newRow("string literal") << QString::fromLatin1("'ciao'"); + QTest::newRow("regexp literal") << QString::fromLatin1("/foo/gim"); + QTest::newRow("null literal") << QString::fromLatin1("null"); + QTest::newRow("undefined literal") << QString::fromLatin1("undefined"); + QTest::newRow("null literal") << QString::fromLatin1("null"); + QTest::newRow("empty object literal") << QString::fromLatin1("{}"); + QTest::newRow("this") << QString::fromLatin1("this"); + QTest::newRow("object literal with one property") << QString::fromLatin1("{ foo: 123 }"); + QTest::newRow("object literal with two properties") << QString::fromLatin1("{ foo: 123, bar: 456 }"); + QTest::newRow("object literal with many properties") << QString::fromLatin1("{ a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10 }"); + QTest::newRow("empty array literal") << QString::fromLatin1("[]"); + QTest::newRow("array literal with one element") << QString::fromLatin1("[1]"); + QTest::newRow("array literal with two elements") << QString::fromLatin1("[1,2]"); + QTest::newRow("array literal with many elements") << QString::fromLatin1("[1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1]"); + QTest::newRow("empty function definition") << QString::fromLatin1("function foo() { }"); + QTest::newRow("function definition") << QString::fromLatin1("function foo() { return 123; }"); + QTest::newRow("for loop with empty body (1000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000; ++i) {}"); + QTest::newRow("for loop with empty body (10000 iterations)") << QString::fromLatin1("for (i = 0; i < 10000; ++i) {}"); + QTest::newRow("for loop with empty body (100000 iterations)") << QString::fromLatin1("for (i = 0; i < 100000; ++i) {}"); + QTest::newRow("for loop with empty body (1000000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000000; ++i) {}"); + QTest::newRow("for loop (1000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000; ++i) { j += i; }; j"); + QTest::newRow("for loop (10000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 10000; ++i) { j += i; }; j"); + QTest::newRow("for loop (100000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 100000; ++i) { j += i; }; j"); + QTest::newRow("for loop (1000000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000000; ++i) { j += i; }; j"); + QTest::newRow("assignments") << QString::fromLatin1("a = 1; b = 2; c = 3; d = 4"); + QTest::newRow("while loop (1000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000) { ++i; }; i"); + QTest::newRow("while loop (10000 iterations)") << QString::fromLatin1("i = 0; while (i < 10000) { ++i; }; i"); + QTest::newRow("while loop (100000 iterations)") << QString::fromLatin1("i = 0; while (i < 100000) { ++i; }; i"); + QTest::newRow("while loop (1000000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000000) { ++i; }; i"); + QTest::newRow("function expression") << QString::fromLatin1("(function(a, b, c){ return a + b + c; })(1, 2, 3)"); +} + +void tst_QScriptEngine::evaluate() +{ + QFETCH(QString, code); + QScriptEngine engine; + + QBENCHMARK { + (void)engine.evaluate(code); + } +} + +void tst_QScriptEngine::connectAndDisconnect() +{ + QScriptEngine engine; + QScriptValue fun = engine.evaluate("(function() { })"); + QBENCHMARK { + qScriptConnect(&engine, SIGNAL(destroyed()), QScriptValue(), fun); + qScriptDisconnect(&engine, SIGNAL(destroyed()), QScriptValue(), fun); + } +} + +void tst_QScriptEngine::evaluateProgram_data() +{ + evaluate_data(); +} + +void tst_QScriptEngine::evaluateProgram() +{ + QFETCH(QString, code); + QScriptEngine engine; + QScriptProgram program(code); + + QBENCHMARK { + (void)engine.evaluate(program); + } +} + +void tst_QScriptEngine::newObject() +{ + QScriptEngine engine; + QBENCHMARK { + (void)engine.newObject(); + } +} + +void tst_QScriptEngine::newQObject() +{ + QScriptEngine engine; + QBENCHMARK { + (void)engine.newQObject(QCoreApplication::instance()); + } +} + +static QScriptValue testFunction(QScriptContext *, QScriptEngine *) +{ + return 0; +} + +void tst_QScriptEngine::newFunction() +{ + QScriptEngine engine; + QBENCHMARK { + (void)engine.newFunction(testFunction); + } +} + +void tst_QScriptEngine::newVariant() +{ + QScriptEngine engine; + QVariant var(123); + QBENCHMARK { + (void)engine.newVariant(var); + } +} + +void tst_QScriptEngine::collectGarbage() +{ + QScriptEngine engine; + QBENCHMARK { + engine.collectGarbage(); + } +} + +void tst_QScriptEngine::pushAndPopContext() +{ + QScriptEngine engine; + QBENCHMARK { + (void)engine.pushContext(); + engine.popContext(); + } +} + +void tst_QScriptEngine::toStringHandle() +{ + QScriptEngine engine; + QString str = QString::fromLatin1("foobarbaz"); + QBENCHMARK { + (void)engine.toStringHandle(str); + } +} + +void tst_QScriptEngine::castValueToQreal() +{ + QScriptEngine engine; + QScriptValue val(123); + QBENCHMARK { + (void)qscriptvalue_cast(val); + } +} + +static QScriptValue native_function(QScriptContext *, QScriptEngine *) +{ + return 42; +} + +void tst_QScriptEngine::nativeCall() +{ + QScriptEngine eng; + eng.globalObject().setProperty("fun", eng.newFunction(native_function)); + QBENCHMARK{ +#if !defined(Q_OS_SYMBIAN) + eng.evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n" + " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); +#else + eng.evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n" + " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); +#endif + } +} + +void tst_QScriptEngine::translation_data() +{ + QTest::addColumn("text"); + QTest::newRow("no translation") << "\"hello world\""; + QTest::newRow("qsTr") << "qsTr(\"hello world\")"; + QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")"; +} + +void tst_QScriptEngine::translation() +{ + QFETCH(QString, text); + QScriptEngine engine; + engine.installTranslatorFunctions(); + + QBENCHMARK { + (void)engine.evaluate(text); + } +} + +QTEST_MAIN(tst_QScriptEngine) +#include "tst_qscriptengine.moc" diff --git a/tests/benchmarks/script/qscriptvalue/qscriptvalue.pro b/tests/benchmarks/script/qscriptvalue/qscriptvalue.pro new file mode 100644 index 0000000..04ea324 --- /dev/null +++ b/tests/benchmarks/script/qscriptvalue/qscriptvalue.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qscriptvalue + +SOURCES += tst_qscriptvalue.cpp + +QT += script diff --git a/tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp new file mode 100644 index 0000000..3bfc21c --- /dev/null +++ b/tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp @@ -0,0 +1,205 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +//TESTED_FILES= + +class tst_QScriptValue : public QObject +{ + Q_OBJECT + +public: + tst_QScriptValue(); + virtual ~tst_QScriptValue(); + +public slots: + void init(); + void cleanup(); + +private slots: + void numberConstructor(); + void stringConstructor(); + void call_data(); + void call(); + void construct_data(); + void construct(); + void toString_data(); + void toString(); + void toQObject(); + void property(); + void setProperty(); + void propertyFlags(); +}; + +tst_QScriptValue::tst_QScriptValue() +{ +} + +tst_QScriptValue::~tst_QScriptValue() +{ +} + +void tst_QScriptValue::init() +{ +} + +void tst_QScriptValue::cleanup() +{ +} + +void tst_QScriptValue::numberConstructor() +{ + QBENCHMARK { + (void)QScriptValue(123); + } +} + +void tst_QScriptValue::stringConstructor() +{ + QString str = QString::fromLatin1("ciao"); + QBENCHMARK { + (void)QScriptValue(str); + } +} + +void tst_QScriptValue::call_data() +{ + QTest::addColumn("code"); + QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); + QTest::newRow("function returning number") << QString::fromLatin1("(function(){ return 123; })"); + QTest::newRow("closure") << QString::fromLatin1("(function(a, b){ return function() { return a + b; }; })(1, 2)"); +} + +void tst_QScriptValue::call() +{ + QFETCH(QString, code); + QScriptEngine engine; + QScriptValue fun = engine.evaluate(code); + QVERIFY(fun.isFunction()); + QBENCHMARK { + (void)fun.call(); + } +} + +void tst_QScriptValue::construct_data() +{ + QTest::addColumn("code"); + QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); + QTest::newRow("simple constructor") << QString::fromLatin1("(function(){ this.x = 10; this.y = 20; })"); +} + +void tst_QScriptValue::construct() +{ + QFETCH(QString, code); + QScriptEngine engine; + QScriptValue fun = engine.evaluate(code); + QVERIFY(fun.isFunction()); + QBENCHMARK { + (void)fun.construct(); + } +} + +void tst_QScriptValue::toString_data() +{ + QTest::addColumn("code"); + QTest::newRow("number") << QString::fromLatin1("123"); + QTest::newRow("string") << QString::fromLatin1("'ciao'"); + QTest::newRow("null") << QString::fromLatin1("null"); + QTest::newRow("undefined") << QString::fromLatin1("undefined"); + QTest::newRow("function") << QString::fromLatin1("(function foo(a, b, c) { return a + b + c; })"); +} + +void tst_QScriptValue::toString() +{ + QFETCH(QString, code); + QScriptEngine engine; + QScriptValue val = engine.evaluate(code); + QBENCHMARK { + (void)val.toString(); + } +} + +void tst_QScriptValue::toQObject() +{ + QScriptEngine engine; + QScriptValue obj = engine.newQObject(QCoreApplication::instance()); + QBENCHMARK { + (void)obj.toQObject(); + } +} + +void tst_QScriptValue::property() +{ + QScriptEngine engine; + QScriptValue obj = engine.newObject(); + QString propertyName = QString::fromLatin1("foo"); + obj.setProperty(propertyName, 123); + QBENCHMARK { + (void)obj.property(propertyName); + } +} + +void tst_QScriptValue::setProperty() +{ + QScriptEngine engine; + QScriptValue obj = engine.newObject(); + QString propertyName = QString::fromLatin1("foo"); + QScriptValue val(123); + QBENCHMARK { + obj.setProperty(propertyName, val); + } +} + +void tst_QScriptValue::propertyFlags() +{ + QScriptEngine engine; + QScriptValue obj = engine.newObject(); + QString propertyName = QString::fromLatin1("foo"); + obj.setProperty(propertyName, 123, QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); + QBENCHMARK { + (void)obj.propertyFlags(propertyName); + } +} + +QTEST_MAIN(tst_QScriptValue) +#include "tst_qscriptvalue.moc" diff --git a/tests/benchmarks/script/script.pro b/tests/benchmarks/script/script.pro new file mode 100644 index 0000000..8d689b6 --- /dev/null +++ b/tests/benchmarks/script/script.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qscriptclass \ + qscriptengine \ + qscriptvalue diff --git a/tests/benchmarks/svg/qsvgrenderer/data/tiger.svg b/tests/benchmarks/svg/qsvgrenderer/data/tiger.svg new file mode 100644 index 0000000..983e570 --- /dev/null +++ b/tests/benchmarks/svg/qsvgrenderer/data/tiger.svg @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro new file mode 100644 index 0000000..8222a09 --- /dev/null +++ b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qsvgrenderer + +SOURCES += tst_qsvgrenderer.cpp +RESOURCES += qsvgrenderer.qrc + +QT += svg + diff --git a/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc new file mode 100644 index 0000000..bdf4a31 --- /dev/null +++ b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc @@ -0,0 +1,6 @@ + + + data/tiger.svg + + + diff --git a/tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp new file mode 100644 index 0000000..895ffe0 --- /dev/null +++ b/tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include +#include + +//TESTED_FILES= + +class tst_QSvgRenderer : public QObject +{ + Q_OBJECT + +public: + tst_QSvgRenderer(); + virtual ~tst_QSvgRenderer(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void load(); +}; + +tst_QSvgRenderer::tst_QSvgRenderer() +{ +} + +tst_QSvgRenderer::~tst_QSvgRenderer() +{ +} + +void tst_QSvgRenderer::init() +{ +} + +void tst_QSvgRenderer::cleanup() +{ +} + +void tst_QSvgRenderer::construct() +{ + QBENCHMARK { + QSvgRenderer renderer; + } +} + +void tst_QSvgRenderer::load() +{ + QFile file(":/data/tiger.svg"); + if (!file.open(QFile::ReadOnly)) + QFAIL("Can not open tiger.svg"); + QByteArray data = file.readAll(); + QSvgRenderer renderer; + + QBENCHMARK { + renderer.load(data); + } +} + +QTEST_MAIN(tst_QSvgRenderer) +#include "tst_qsvgrenderer.moc" diff --git a/tests/benchmarks/svg/svg.pro b/tests/benchmarks/svg/svg.pro new file mode 100644 index 0000000..cdc2ca5 --- /dev/null +++ b/tests/benchmarks/svg/svg.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + qsvgrenderer diff --git a/tests/tests.pro b/tests/tests.pro index 7fbc8a9..75ca120 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,2 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = auto +SUBDIRS = auto \ + benchmarks -- cgit v0.12 From 379fedb59934fae63618f50ea327369c17a214db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 8 Feb 2010 14:40:49 +0100 Subject: Delete benchmark examples (qtestlib-simple and qtwidgets). These have no real value anymore now that we have plenty of other benchmarks. They served as examples on how to use the QBENCHMARK macro. --- tests/benchmarks/qtestlib-simple/main.cpp | 117 -- .../benchmarks/qtestlib-simple/qtestlib-simple.pro | 8 - tests/benchmarks/qtwidgets/advanced.ui | 319 ------ tests/benchmarks/qtwidgets/icons/big.png | Bin 1323 -> 0 bytes tests/benchmarks/qtwidgets/icons/folder.png | Bin 4069 -> 0 bytes tests/benchmarks/qtwidgets/icons/icon.bmp | Bin 246 -> 0 bytes tests/benchmarks/qtwidgets/icons/icon.png | Bin 344 -> 0 bytes tests/benchmarks/qtwidgets/mainwindow.cpp | 313 ----- tests/benchmarks/qtwidgets/mainwindow.h | 80 -- tests/benchmarks/qtwidgets/qtstyles.qrc | 8 - tests/benchmarks/qtwidgets/qtwidgets.pro | 9 - tests/benchmarks/qtwidgets/standard.ui | 1207 -------------------- tests/benchmarks/qtwidgets/system.ui | 658 ----------- tests/benchmarks/qtwidgets/tst_qtwidgets.cpp | 67 -- 14 files changed, 2786 deletions(-) delete mode 100644 tests/benchmarks/qtestlib-simple/main.cpp delete mode 100644 tests/benchmarks/qtestlib-simple/qtestlib-simple.pro delete mode 100644 tests/benchmarks/qtwidgets/advanced.ui delete mode 100644 tests/benchmarks/qtwidgets/icons/big.png delete mode 100644 tests/benchmarks/qtwidgets/icons/folder.png delete mode 100644 tests/benchmarks/qtwidgets/icons/icon.bmp delete mode 100644 tests/benchmarks/qtwidgets/icons/icon.png delete mode 100644 tests/benchmarks/qtwidgets/mainwindow.cpp delete mode 100644 tests/benchmarks/qtwidgets/mainwindow.h delete mode 100644 tests/benchmarks/qtwidgets/qtstyles.qrc delete mode 100644 tests/benchmarks/qtwidgets/qtwidgets.pro delete mode 100644 tests/benchmarks/qtwidgets/standard.ui delete mode 100644 tests/benchmarks/qtwidgets/system.ui delete mode 100644 tests/benchmarks/qtwidgets/tst_qtwidgets.cpp diff --git a/tests/benchmarks/qtestlib-simple/main.cpp b/tests/benchmarks/qtestlib-simple/main.cpp deleted file mode 100644 index a8dabe9..0000000 --- a/tests/benchmarks/qtestlib-simple/main.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include - -#include - - -class tst_QHash : public QObject -{ - Q_OBJECT -private slots: - void foo1_data(); - void foo1(); - void foo2_data(); - void foo2(); - void foo3(); -}; - -void tst_QHash::foo1_data() -{ - QTest::addColumn("x"); - QTest::addColumn("y"); - QTest::newRow("tag1.1") << 16 << 17; - QTest::newRow("tag2.1") << 18 << 19; -} - -void tst_QHash::foo1() -{ - QFETCH(int, x); - QFETCH(int, y); - Q_UNUSED(x); - Q_UNUSED(y); - - QHash testHash; - - QBENCHMARK { - testHash.insertMulti(1, 1); - } -} - -void tst_QHash::foo2_data() -{ - QTest::addColumn("x"); - QTest::addColumn("y"); - QTest::newRow("tag1.1") << 16 << 17; - QTest::newRow("tag2.1") << 18 << 19; -} - -void tst_QHash::foo2() -{ - QFETCH(int, x); - QFETCH(int, y); - Q_UNUSED(x); - Q_UNUSED(y); - - QHash testHash; - - QBENCHMARK { - testHash.insertMulti(1, 1); - } - - QBENCHMARK { - testHash.insertMulti(1, 1); - } -} - -void tst_QHash::foo3() -{ - QHash testHash; - - QBENCHMARK { - testHash.insertMulti(1, 1); - } -} - - -QTEST_MAIN(tst_QHash) -#include "main.moc" diff --git a/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro b/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro deleted file mode 100644 index 7c49883..0000000 --- a/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro +++ /dev/null @@ -1,8 +0,0 @@ -load(qttest_p4) -TEMPLATE = app -TARGET = tst_qtestlib-simple -DEPENDPATH += . -INCLUDEPATH += . - -# Input -SOURCES += main.cpp diff --git a/tests/benchmarks/qtwidgets/advanced.ui b/tests/benchmarks/qtwidgets/advanced.ui deleted file mode 100644 index ce27374..0000000 --- a/tests/benchmarks/qtwidgets/advanced.ui +++ /dev/null @@ -1,319 +0,0 @@ - - - - - Advanced - - - Advanced - - - - 0 - 0 - 400 - 300 - - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - pushButton - - - - 1 - 1 - 80 - 23 - - - - - - - - - - - pushButton_2 - - - - 87 - 1 - 80 - 23 - - - - Text - - - - - - - checkBox - - - - 173 - 6 - 23 - 13 - - - - - - - - - - - - - - radioButton - - - - 202 - 6 - 22 - 12 - - - - - - - - - - - - - - checkBox_2 - - - - 230 - 3 - 44 - 18 - - - - Text - - - - - - - radioButton_2 - - - - 280 - 3 - 43 - 18 - - - - Text - - - - - - - - - - - - 1 - - - 6 - - - - - listWidget - - - - 1 - 1 - 186 - 91 - - - - - - - - listWidget_3 - - - - 193 - 96 - 188 - 60 - - - - - - - - treeWidget_2 - - - - 1 - 96 - 186 - 60 - - - - - - - - - - - 1 - - - 6 - - - - - listWidget_2 - - - - 1 - 1 - 186 - 43 - - - - - - - - treeWidget - - - - 1 - 48 - 186 - 43 - - - - - - - - - - - - tabWidget - - - - 9 - 201 - 382 - 90 - - - - - 0 - 90 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 380 - 63 - - - - Tab Page 1 - - - - - widget - - - - 0 - 0 - 459 - 66 - - - - Tab Page 2 - - - - - - - - - diff --git a/tests/benchmarks/qtwidgets/icons/big.png b/tests/benchmarks/qtwidgets/icons/big.png deleted file mode 100644 index 6032804..0000000 Binary files a/tests/benchmarks/qtwidgets/icons/big.png and /dev/null differ diff --git a/tests/benchmarks/qtwidgets/icons/folder.png b/tests/benchmarks/qtwidgets/icons/folder.png deleted file mode 100644 index 981a25d..0000000 Binary files a/tests/benchmarks/qtwidgets/icons/folder.png and /dev/null differ diff --git a/tests/benchmarks/qtwidgets/icons/icon.bmp b/tests/benchmarks/qtwidgets/icons/icon.bmp deleted file mode 100644 index 196de6a..0000000 Binary files a/tests/benchmarks/qtwidgets/icons/icon.bmp and /dev/null differ diff --git a/tests/benchmarks/qtwidgets/icons/icon.png b/tests/benchmarks/qtwidgets/icons/icon.png deleted file mode 100644 index 8f9c562..0000000 Binary files a/tests/benchmarks/qtwidgets/icons/icon.png and /dev/null differ diff --git a/tests/benchmarks/qtwidgets/mainwindow.cpp b/tests/benchmarks/qtwidgets/mainwindow.cpp deleted file mode 100644 index bb19567..0000000 --- a/tests/benchmarks/qtwidgets/mainwindow.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mainwindow.h" -#include -#include - -StyleWidget::StyleWidget(QWidget *parent, Qt::WFlags f) - : QWidget(parent, f) -{ - QHBoxLayout *hbox = new QHBoxLayout(this); - QSplitter *spl = new QSplitter(this); - - // standard widgets - QWidget *leftWidget = new QWidget(this); - m_staWidget.setupUi(leftWidget); - - // advanced/system widgets - QGroupBox *rightWidget = new QGroupBox("Advanced", this); - QVBoxLayout *vbox = new QVBoxLayout(rightWidget); - QWidget *adv = new QWidget(rightWidget); - m_advWidget.setupUi(adv); - QWidget *sys = new QWidget(rightWidget); - m_sysWidget.setupUi(sys); - vbox->addWidget(adv); - vbox->addWidget(sys); - - spl->addWidget(leftWidget); - spl->addWidget(rightWidget); - - hbox->setMargin(4); - hbox->addWidget(spl); - - m_small1 = QIcon(":/icons/icon.bmp"); - m_small2 = QIcon(":/icons/icon.png"); - m_big = QIcon(":/icons/big.png"); - - addComboBoxItems(); - addTreeItems(); - addTreeListItems(); - addListItems(); - addTextEdit(); - setupOtherWidgets(); - setupButtons(); - - foreach(QWidget *w, qFindChildren(parentWidget())) - w->setWhatsThis(w->metaObject()->className()); -} - -StyleWidget::~StyleWidget() -{ - -} - -void StyleWidget::addTextEdit() -{ - m_staWidget.textEdit->setPlainText( - "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text"); - m_staWidget.textEdit_2->setPlainText( - "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text"); - m_staWidget.textEdit_3->setPlainText( - "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text" \ - "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\n"); -} - -void StyleWidget::addComboBoxItems() -{ - m_staWidget.comboBox->addItem("Item 1"); - m_staWidget.comboBox->addItem("Item 2"); - m_staWidget.comboBox->addItem("Item 3"); - m_staWidget.comboBox->addItem("Item 4"); - m_staWidget.comboBox->addItem("Item 5"); -} - -void StyleWidget::addListItems() -{ - m_staWidget.listWidget->addItem("Item 1"); - m_staWidget.listWidget->addItem("Item 2"); - m_staWidget.listWidget->addItem("Item 3"); - m_staWidget.listWidget->addItem("Item 4"); - m_staWidget.listWidget->addItem("Item 5"); - - QListWidgetItem *tmp = new QListWidgetItem("Item 1", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 2", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 3", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 4", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 5", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - - m_advWidget.listWidget->setViewMode(QListView::IconMode); - QIcon folder(":/icons/folder.png"); - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget); - tmp->setIcon(folder); - - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); -} - -void StyleWidget::setupOtherWidgets() -{ - m_sysWidget.tableWidget->setRowCount(100); - m_sysWidget.tableWidget->setColumnCount(100); -} - -void StyleWidget::addTreeItems() -{ - //standard tree - m_staWidget.treeWidget_2->setColumnCount(1); - m_staWidget.treeWidget_2->header()->hide(); - - QTreeWidgetItem *tmp; - QTreeWidgetItem *subtmp; - QTreeWidgetItem *root1 = new QTreeWidgetItem(m_staWidget.treeWidget_2); - root1->setText(0, "Root 1"); - QTreeWidgetItem *root2 = new QTreeWidgetItem(m_staWidget.treeWidget_2); - root2->setText(0, "Root 2"); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - } - } - - // standard checked tree - m_staWidget.treeWidget_4->setColumnCount(1); - m_staWidget.treeWidget_4->header()->hide(); - - root1 = new QTreeWidgetItem(m_staWidget.treeWidget_4); - root1->setText(0, "Root 1"); - root1->setCheckState(0, Qt::Checked); - root2 = new QTreeWidgetItem(m_staWidget.treeWidget_4); - root2->setText(0, "Root 2"); - root2->setCheckState(0, Qt::Checked); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - tmp->setCheckState(0, Qt::Checked); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - subtmp->setCheckState(0, Qt::Checked); - } - } - - // advanced (images) tree - m_advWidget.treeWidget_2->setColumnCount(1); - m_advWidget.treeWidget_2->header()->hide(); - - root1 = new QTreeWidgetItem(m_advWidget.treeWidget_2); - root1->setText(0, "Root 1"); - root1->setIcon(0, m_small1); - root2 = new QTreeWidgetItem(m_advWidget.treeWidget_2); - root2->setText(0, "Root 2"); - root2->setIcon(0, m_small1); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - tmp->setIcon(0, m_small2); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - tmp->setIcon(0, m_small1); - } - } - -} - -void StyleWidget::addTreeListItems() -{ - //standard list - QTreeWidgetItem *tmp; - m_staWidget.treeWidget->setColumnCount(3); - m_staWidget.treeWidget->headerItem()->setText(0, "Col1"); - m_staWidget.treeWidget->headerItem()->setText(1, "Col2"); - m_staWidget.treeWidget->headerItem()->setText(2, "Col3"); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_staWidget.treeWidget); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setText(1, QString("Item%11").arg(i)); - tmp->setText(2, QString("Item%12").arg(i)); - } - - //standard checked list - m_staWidget.treeWidget_3->setColumnCount(3); - m_staWidget.treeWidget_3->headerItem()->setText(0, "Col1"); - m_staWidget.treeWidget_3->headerItem()->setText(1, "Col2"); - m_staWidget.treeWidget_3->headerItem()->setText(2, "Col3"); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_staWidget.treeWidget_3); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setCheckState(0, Qt::Checked); - tmp->setText(1, QString("Item%11").arg(i)); - tmp->setText(2, QString("Item%12").arg(i)); - } - - //with images - m_advWidget.treeWidget->setColumnCount(2); - m_advWidget.treeWidget->headerItem()->setText(0, "Col1"); - m_advWidget.treeWidget->headerItem()->setIcon(0, m_small2); - m_advWidget.treeWidget->headerItem()->setText(1, "Col2"); - m_advWidget.treeWidget->headerItem()->setIcon(1, m_small2); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_advWidget.treeWidget); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setIcon(0, m_small1); - tmp->setText(1, QString("Item%11").arg(i)); - } -} - -void StyleWidget::setupButtons() -{ - m_advWidget.pushButton->setIcon(m_small1); - m_advWidget.pushButton_2->setIcon(m_small1); - m_advWidget.checkBox->setIcon(m_small2); - m_advWidget.checkBox_2->setIcon(m_small2); - m_advWidget.radioButton->setIcon(m_small2); - m_advWidget.radioButton_2->setIcon(m_small2); - - // tab page images - m_advWidget.tabWidget->setTabIcon(0, m_small2); - m_advWidget.tabWidget->setTabIcon(1, m_small2); -} diff --git a/tests/benchmarks/qtwidgets/mainwindow.h b/tests/benchmarks/qtwidgets/mainwindow.h deleted file mode 100644 index 8a4521a..0000000 --- a/tests/benchmarks/qtwidgets/mainwindow.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include -#include -#include "ui_standard.h" -#include "ui_advanced.h" -#include "ui_system.h" - -class StyleWidget : public QWidget -{ - Q_OBJECT - -public: - StyleWidget(QWidget *parent = 0, Qt::WFlags f = 0); - ~StyleWidget(); - -public slots: - void onWhatsThis() { QWhatsThis::enterWhatsThisMode(); } - -private: - void addComboBoxItems(); - void addListItems(); - void addTextEdit(); - void setupOtherWidgets(); - void setupButtons(); - void addTreeItems(); - void addTreeListItems(); - - Ui::Standard m_staWidget; - Ui::Advanced m_advWidget; - Ui::System m_sysWidget; - - QIcon m_small1; - QIcon m_small2; - QIcon m_big; -}; - -#endif //MAINWINDOW_H - diff --git a/tests/benchmarks/qtwidgets/qtstyles.qrc b/tests/benchmarks/qtwidgets/qtstyles.qrc deleted file mode 100644 index 772891d..0000000 --- a/tests/benchmarks/qtwidgets/qtstyles.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - ./icons/icon.png - ./icons/icon.bmp - ./icons/big.png - ./icons/folder.png - - diff --git a/tests/benchmarks/qtwidgets/qtwidgets.pro b/tests/benchmarks/qtwidgets/qtwidgets.pro deleted file mode 100644 index ad5e7ac..0000000 --- a/tests/benchmarks/qtwidgets/qtwidgets.pro +++ /dev/null @@ -1,9 +0,0 @@ -load(qttest_p4) - -SOURCES += tst_qtwidgets.cpp mainwindow.cpp -HEADERS += mainwindow.h -QT += network -RESOURCES = qtstyles.qrc -FORMS += advanced.ui system.ui standard.ui - - diff --git a/tests/benchmarks/qtwidgets/standard.ui b/tests/benchmarks/qtwidgets/standard.ui deleted file mode 100644 index 9764a66..0000000 --- a/tests/benchmarks/qtwidgets/standard.ui +++ /dev/null @@ -1,1207 +0,0 @@ - - - - - Standard - - - Standard - - - - 0 - 0 - 400 - 300 - - - - - - - - 0 - - - 0 - - - - - groupBox - - - - 0 - 0 - 400 - 300 - - - - Standard - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - checkBox - - - - 1 - 1 - 114 - 3 - - - - Enabled &CheckBox - - - - - - - checkBox_2 - - - false - - - - 121 - 1 - 116 - 3 - - - - Disabled Check&Box - - - - - - - - - - - 243 - 1 - 80 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - comboBox - - - - 1 - 1 - 41 - 3 - - - - - - - - comboBox_2 - - - - 48 - 1 - 41 - 3 - - - - - - - - comboBox_3 - - - false - - - - 95 - 1 - 41 - 3 - - - - - - - - - - - - - 1 - - - 6 - - - - - pushButton - - - - 1 - 1 - 80 - 3 - - - - &Enabled - - - - - - - pushButton_2 - - - false - - - - 87 - 1 - 80 - 3 - - - - Di&sabled - - - - - - - - - - - 173 - 1 - 150 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - label - - - - 1 - 1 - 99 - 3 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Label with some text. - - - Qt::AutoText - - - - - - - label_2 - - - false - - - - 106 - 1 - 139 - 3 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Disabled label with some text. - - - Qt::AutoText - - - - - - - - - - - 251 - 1 - 72 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - lineEdit - - - - 1 - 1 - 135 - 3 - - - - Enabled - - - QLineEdit::Normal - - - - - - - lineEdit_2 - - - false - - - - 142 - 1 - 134 - 3 - - - - Disabled - - - QLineEdit::Normal - - - - - - - spinBox - - - - 282 - 1 - 41 - 3 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - - - - - - 1 - - - 6 - - - - - radioButton - - - - 1 - 1 - 123 - 3 - - - - Enabled RadioButton - - - - - - - radioButton_2 - - - false - - - - 130 - 1 - 125 - 3 - - - - Disabled RadioButton - - - - - - - - - - - 261 - 1 - 62 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - horizontalScrollBar - - - - 1 - 1 - 90 - 3 - - - - - 0 - 0 - 0 - 0 - - - - - 90 - 0 - - - - Qt::Horizontal - - - - - - - horizontalScrollBar_2 - - - - 97 - 1 - 30 - 3 - - - - Qt::Horizontal - - - - - - - - - - - verticalScrollBar - - - - 333 - 1 - 17 - 37 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - - - - - slider - - - - 356 - 1 - 21 - 37 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - QSlider::TicksBelow - - - 0 - - - - - - - - - - - - 1 - - - 6 - - - - - slider_2 - - - - 1 - 6 - 90 - 16 - - - - Qt::Horizontal - - - QSlider::NoTicks - - - - - - - slider_3 - - - - 97 - 3 - 89 - 21 - - - - Qt::Horizontal - - - QSlider::TicksBelow - - - - - - - slider_4 - - - - 192 - 3 - 90 - 21 - - - - Qt::Horizontal - - - QSlider::TicksAbove - - - - - - - slider_5 - - - - 288 - 1 - 89 - 26 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - - - - - - - - - - 1 - - - 6 - - - - - textEdit - - - - 1 - 1 - 89 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - - - - - textEdit_2 - - - - 96 - 1 - 90 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOn - - - - - - - textEdit_3 - - - - 192 - 1 - 89 - 100 - - - - - 0 - 100 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOn - - - - - - - textEdit_4 - - - - 287 - 1 - 90 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAsNeeded - - - Qt::ScrollBarAsNeeded - - - - - - - - - groupBox_2 - - - - 11 - 132 - 378 - 39 - - - - GroupBox - - - - - - - 9 - - - 6 - - - - - progressBar - - - - 11 - 20 - 356 - 8 - - - - 50 - - - false - - - - - - - - - - - - - 1 - - - 6 - - - - - listWidget - - - - 1 - 1 - 107 - 37 - - - - - - - - listWidget_2 - - - - 114 - 1 - 107 - 37 - - - - - - - - tabWidget - - - - 227 - 1 - 150 - 37 - - - - - 150 - 0 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - - - - - 0 - 0 - 148 - 10 - - - - Tab Page 1 - - - - - - - - - 0 - 0 - 116 - 56 - - - - Tab Page 2 - - - - - widget - - - - 0 - 0 - 116 - 56 - - - - Tab Page 3 - - - - - widget - - - - 0 - 0 - 146 - 36 - - - - Tab Page 4 - - - - - - - - - - tabWidget_2 - - - - 11 - 214 - 378 - 90 - - - - - 0 - 90 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 376 - 63 - - - - Tab Page 1 - - - - - widget - - - - 0 - 0 - 424 - 66 - - - - Tab Page 2 - - - - - - - - - - - 1 - - - 6 - - - - - treeWidget_2 - - - - 192 - 1 - 185 - 18 - - - - - - - - treeWidget_3 - - - - 1 - 20 - 185 - 18 - - - - - - - - treeWidget - - - - 1 - 1 - 185 - 18 - - - - - - - - treeWidget_4 - - - - 192 - 20 - 185 - 18 - - - - - - - - - - - - - - diff --git a/tests/benchmarks/qtwidgets/system.ui b/tests/benchmarks/qtwidgets/system.ui deleted file mode 100644 index a641e0e..0000000 --- a/tests/benchmarks/qtwidgets/system.ui +++ /dev/null @@ -1,658 +0,0 @@ - - - - - System - - - System - - - - 0 - 0 - 400 - 604 - - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - toolButton - - - - 340 - 138 - 15 - 19 - - - - ... - - - - - - - horizontalLine - - - - 1 - 146 - 333 - 3 - - - - QFrame::HLine - - - QFrame::Sunken - - - - - - - verticalLine - - - - 361 - 1 - 3 - 131 - - - - QFrame::VLine - - - QFrame::Sunken - - - - - - - - - - 1 - - - 6 - - - - - dateTimeEdit_2 - - - false - - - - 1 - 108 - 113 - 20 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - dateTimeEdit - - - - 1 - 41 - 113 - 20 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - dial - - - - 120 - 1 - 114 - 100 - - - - Qt::Horizontal - - - - - - - lcdNumber - - - - 120 - 107 - 114 - 23 - - - - QFrame::Box - - - QFrame::Raised - - - QLCDNumber::Dec - - - QLCDNumber::Outline - - - - - - - lcdNumber_2 - - - false - - - - 240 - 107 - 113 - 23 - - - - QFrame::Box - - - QFrame::Raised - - - QLCDNumber::Dec - - - QLCDNumber::Outline - - - - - - - dial_2 - - - false - - - - 240 - 1 - 113 - 100 - - - - Qt::Horizontal - - - - - - - - - - - - - - 1 - - - 6 - - - - - tableWidget - - - - 1 - 1 - 256 - 193 - - - - - - - - toolBox - - - - 263 - 1 - 118 - 193 - - - - QFrame::Box - - - QFrame::Plain - - - 0 - - - - widget - - - - 0 - 0 - 98 - 119 - - - - Tool Page 1 - - - - - widget - - - - 0 - 0 - 115 - 56 - - - - Tool Page 2 - - - - - - - - - - tabWidget - - - - 9 - 375 - 382 - 220 - - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 378 - 196 - - - - Tab Page 1 - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - comboBox_3 - - - - 1 - 1 - 332 - 20 - - - - - - - - - - - 1 - - - 6 - - - - - pushButton_5 - - - - 1 - 1 - 80 - 23 - - - - &Enabled - - - - - - - pushButton_6 - - - - 87 - 1 - 80 - 23 - - - - Di&sabled - - - - - - - - - - - 173 - 1 - 158 - 23 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - radioButton_3 - - - - 1 - 2 - 123 - 18 - - - - Enabled RadioButton - - - - - - - radioButton_4 - - - - 130 - 2 - 125 - 18 - - - - Disabled RadioButton - - - - - - - - - - - 261 - 1 - 70 - 20 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - progressBar - - - - 1 - 86 - 332 - 22 - - - - 24 - - - - - - - horizontalScrollBar - - - - 1 - 114 - 332 - 17 - - - - Qt::Horizontal - - - - - - - - - verticalScrollBar - - - - 349 - 9 - 17 - 132 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - - - - - - - - - 9 - 147 - 334 - 40 - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - widget - - - - 0 - 0 - 377 - 187 - - - - Tab Page 2 - - - - - - - - - diff --git a/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp b/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp deleted file mode 100644 index 8d2a31b..0000000 --- a/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "mainwindow.h" - -class tst_QtWidgets: public QObject -{ - Q_OBJECT - -private slots: - void snapshot(); -}; - -void tst_QtWidgets::snapshot() -{ - QBENCHMARK { - StyleWidget widget(0, Qt::X11BypassWindowManagerHint); - widget.show(); - QApplication::processEvents(); - } -} - -QTEST_MAIN(tst_QtWidgets) - -#include "tst_qtwidgets.moc" -- cgit v0.12 From c624935a958783d3314fe6c2f6845e6b51a97f95 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 8 Feb 2010 16:08:04 +0100 Subject: Add a pixmap modification hook to blur pixmap filter cache We probably want to kick out filtered pixmaps from the cache when the source pixmap is modified as well as just destroyed. Reviewed-By: Samuel --- src/opengl/qglpixmapfilter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 37bb7c0..d5a11d9 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -394,6 +394,7 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe static bool hookAdded = false; if (!hookAdded) { QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed); + QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(pixmapDestroyed); hookAdded = true; } -- cgit v0.12 From 49b01a107262a8edca92b12a65b54f63017d9d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 8 Feb 2010 16:33:49 +0100 Subject: Compile fix for network benchmarks. --- tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp | 2 +- tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp | 2 +- tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp index 23e07db..26308e9 100644 --- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp +++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp @@ -46,7 +46,7 @@ #include #include #include -#include "../../auto/network-settings.h" +#include "../../../../auto/network-settings.h" class qfile_vs_qnetworkaccessmanager : public QObject { diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index a92359f..f173ed1 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -48,7 +48,7 @@ #include #include #include -#include "../../auto/network-settings.h" +#include "../../../../auto/network-settings.h" class TimedSender: public QThread diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp index b6b55c3..022bf3d 100644 --- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -58,7 +58,7 @@ Q_DECLARE_METATYPE(QNetworkProxy) Q_DECLARE_METATYPE(QList) -#include "../../auto/network-settings.h" +#include "../../../../auto/network-settings.h" //TESTED_CLASS= //TESTED_FILES= -- cgit v0.12 From 8ce0a7dfac6955ab3b5bf6cd0ee4abe63f753618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 8 Feb 2010 16:34:30 +0100 Subject: Updated the docs for QPainter::begin/endNativePainting() Task-number: QTBUG-7661 Reviewed-by: Kim --- src/gui/painting/qpainter.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index bf12c6b..3bcaf8c 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1986,12 +1986,25 @@ QPaintEngine *QPainter::paintEngine() const endNativePainting(). Note that only the states the underlying paint engine changes will be reset - to their respective default states. If, for example, the OpenGL polygon - mode is changed by the user inside a beginNativePaint()/endNativePainting() - block, it will not be reset to the default state by endNativePainting(). + to their respective default states. The states we reset may change from + release to release. The following states are currently reset in the OpenGL + 2 engine: - Here is an example that shows intermixing of painter commands - and raw OpenGL commands: + \list + \i blending is disabled + \i the depth, stencil and scissor tests are disabled + \i the active texture unit is reset to 0 + \i the depth mask, depth function and the clear depth are reset to their + default values + \i the stencil mask, stencil operation and stencil function are reset to + their default values + \i the current color is reset to solid white + \endlist + + If, for example, the OpenGL polygon mode is changed by the user inside a + beginNativePaint()/endNativePainting() block, it will not be reset to the + default state by endNativePainting(). Here is an example that shows + intermixing of painter commands and raw OpenGL commands: \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21 -- cgit v0.12 From de5ce297da04d1246711d28095d6cd1f52cfc97b Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 8 Feb 2010 15:35:08 +0100 Subject: Make generate uid3 (symbian) work on 64 bit host platform. On a 64 bit system the old code used to make; UID "0xEffffffff9d8cb14". Which doesn't get accepted by the symbian tool chain ;) The patch makes this normal size hex uid3 again. Reviewed-by: Miikka Heikkinen --- qmake/generators/symbian/initprojectdeploy_symbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index f3e3c3a..5fbff58 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -207,7 +207,7 @@ QString generate_uid(const QString& target) return tmp; } - unsigned long hash = 5381; + quint32 hash = 5381; int c; for (int i = 0; i < target.size(); ++i) { -- cgit v0.12 From 1042478921b5b3e7a4e9713d9f7778bd10654463 Mon Sep 17 00:00:00 2001 From: Thomas Sondergaard Date: Mon, 8 Feb 2010 17:19:54 +0100 Subject: Handle Shift+Tab correctly on X11. This fixes incorrect handling of Shift+Tab keysyms. Most typically Shift+Tab generates Shift+ISO_Left_Tab, but VNC clients generate Shift+Tab in accordance with the RFB specification. Merge-request: 458 Reviewed-by: Denis Dzyubenko --- src/gui/kernel/qkeymapper_x11.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp index 70574e7..4e6c847 100644 --- a/src/gui/kernel/qkeymapper_x11.cpp +++ b/src/gui/kernel/qkeymapper_x11.cpp @@ -360,6 +360,13 @@ QList QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event) if (code && code < 0xfffe) code = QChar(code).toUpper().unicode(); + + if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) { + // map shift+tab to shift+backtab + code = Qt::Key_Backtab; + text = QString(); + } + if (code == baseCode) continue; @@ -448,6 +455,13 @@ QList QKeyMapperPrivate::possibleKeysCore(QKeyEvent *event) if (code && code < 0xfffe) code = QChar(code).toUpper().unicode(); + + if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) { + // map shift+tab to shift+backtab + code = Qt::Key_Backtab; + text = QString(); + } + if (code == baseCode) continue; -- cgit v0.12 From 245295435f40b663fc164165ec788d8872e91624 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 8 Feb 2010 17:00:25 +0000 Subject: Documentation: clarified RVCT support for Symbian Task-number: QTBUG-8012 Reviewed-by: Iain --- doc/src/getting-started/installation.qdoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 5f95c5a..b679250 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1038,8 +1038,9 @@ If you are using pre-built binaries, follow the instructions given in the \list \o \bold{Note:} This is not required if you are using pre-built binary package. \endlist - \o Building Qt libraries requires \l{http://www.arm.com/products/DevTools/RVCT.html}{RVCT} 2.2 [build 686] or later, - which is not available free of charge. + \o Building Qt libraries requires \l{http://www.arm.com/products/DevTools/RVCT.html}{RVCT} version 2.2 (build 686 or later), + which is not available free of charge. Usage of later versions of RVCT, including the 3.x and 4.x series, is not supported + in this release. \endlist Running Qt on real device requires the Open C to be installed on the device. -- cgit v0.12 From 96ce91dedc2aea60377d9008b806ebbe8cc53169 Mon Sep 17 00:00:00 2001 From: Constantin Makshin Date: Mon, 8 Feb 2010 19:11:47 +0100 Subject: Added QMake directory to INCPATH so the compiler can find required headers Reviewed-by: Benjamin Poulain --- qmake/qmake.pro | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/qmake/qmake.pro b/qmake/qmake.pro index 560aee9..00dcbce 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -17,9 +17,15 @@ VPATH += $$QT_SOURCE_TREE/src/corelib/global \ $$QT_SOURCE_TREE/src/corelib/kernel \ $$QT_SOURCE_TREE/src/corelib/codecs \ $$QT_SOURCE_TREE/src/corelib/plugin \ - $$QT_SOURCE_TREE/src/corelib/xml \ - $$QT_SOURCE_TREE/src/corelib/io -INCPATH += generators generators/unix generators/win32 generators/mac generators/symbian \ - $$QT_SOURCE_TREE/include $$QT_SOURCE_TREE/include/QtCore + $$QT_SOURCE_TREE/src/corelib/xml \ + $$QT_SOURCE_TREE/src/corelib/io +INCPATH += generators \ + generators/unix \ + generators/win32 \ + generators/mac \ + generators/symbian \ + $$QT_SOURCE_TREE/include \ + $$QT_SOURCE_TREE/include/QtCore \ + $$QT_SOURCE_TREE/qmake include(qmake.pri) -- cgit v0.12 From 72f3caa5d7821b93a4e807fb61c5cda9f2c6f393 Mon Sep 17 00:00:00 2001 From: Bill King Date: Tue, 9 Feb 2010 13:14:50 +1000 Subject: (sqlite) Allow shared cache mode This modification is needed to allow performance optimisations necessary for QML. Reviewed-by: Warwick Allison --- src/sql/drivers/sqlite/qsql_sqlite.cpp | 47 +++++++++++----------------- src/sql/kernel/qsqldatabase.cpp | 1 + tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 20 ++++++++++++ 3 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 9fff552..d3be304 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -500,32 +500,6 @@ bool QSQLiteDriver::hasFeature(DriverFeature f) const return false; } -static int qGetSqliteTimeout(QString opts) -{ - enum { DefaultTimeout = 5000 }; - - opts.remove(QLatin1Char(' ')); - foreach(QString option, opts.split(QLatin1Char(';'))) { - if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) { - bool ok; - int nt = option.mid(21).toInt(&ok); - if (ok) - return nt; - } - } - return DefaultTimeout; -} - -static int qGetSqliteOpenMode(QString opts) -{ - opts.remove(QLatin1Char(' ')); - foreach(QString option, opts.split(QLatin1Char(';'))) { - if (option == QLatin1String("QSQLITE_OPEN_READONLY")) - return SQLITE_OPEN_READONLY; - } - return SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE; -} - /* SQLite dbs have no user name, passwords, hosts or ports. just file names. @@ -537,9 +511,26 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c if (db.isEmpty()) return false; + bool sharedCache = false; + int openMode = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, timeOut=5000; + QStringList opts=QString(conOpts).remove(QLatin1Char(' ')).split(QLatin1Char(';')); + foreach(const QString &option, opts) { + if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) { + bool ok; + int nt = option.mid(21).toInt(&ok); + if (ok) + timeOut = nt; + } + if (option == QLatin1String("QSQLITE_OPEN_READONLY")) + openMode = SQLITE_OPEN_READONLY; + if (option == QLatin1String("QSQLITE_ENABLE_SHARED_CACHE")) + sharedCache = true; + } + + sqlite3_enable_shared_cache(sharedCache); - if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, qGetSqliteOpenMode(conOpts), NULL) == SQLITE_OK) { - sqlite3_busy_timeout(d->access, qGetSqliteTimeout(conOpts)); + if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) == SQLITE_OK) { + sqlite3_busy_timeout(d->access, timeOut); setOpen(true); setOpenError(false); return true; diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index 031261d..1416ee3 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -1267,6 +1267,7 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const \list \i QSQLITE_BUSY_TIMEOUT \i QSQLITE_OPEN_READONLY + \i QSQLITE_ENABLE_SHARED_CACHE \endlist \i diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 5b61da2..fe084fa 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -202,6 +202,8 @@ private slots: void sqlStatementUseIsNull_189093_data() { generic_data(); } void sqlStatementUseIsNull_189093(); + void sqlite_enable_cache_mode_data() { generic_data("QSQLITE"); } + void sqlite_enable_cache_mode(); private: void createTestTables(QSqlDatabase db); @@ -2485,5 +2487,23 @@ void tst_QSqlDatabase::oci_tables() QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper())); } +void tst_QSqlDatabase::sqlite_enable_cache_mode() +{ + QFETCH(QString, dbName); + if(dbName.endsWith(":memory:")) + QSKIP( "cache mode is meaningless for :memory: databases", SkipSingle ); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + db.close(); + db.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE"); + QVERIFY_SQL(db, open()); + QSqlDatabase db2 = QSqlDatabase::cloneDatabase(db, dbName+":cachemodeconn2"); + db2.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE"); + QVERIFY_SQL(db2, open()); + QSqlQuery q(db), q2(db2); + QVERIFY_SQL(q, exec("select * from "+qTableName("qtest"))); + QVERIFY_SQL(q2, exec("select * from "+qTableName("qtest"))); +} + QTEST_MAIN(tst_QSqlDatabase) #include "tst_qsqldatabase.moc" -- cgit v0.12 From b37ac454832a23c17418f5ebca8928b63fe02289 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 8 Feb 2010 18:19:19 +0200 Subject: Streamlined smart installer package creation in Symbian - Added make target for creating smart installer packages - Application sis is automatically generated if missing when "make installer_sis" is invoked - No need to specify installer pkg UID if self signing is enough - Related docs fixed - Fixed smartinstaller.sis name to be correct Task-number: QTBUG-8026 Reviewed-by: axis --- bin/createpackage.pl | 16 ++++++++---- doc/src/deployment/deployment.qdoc | 17 +++---------- doc/src/getting-started/installation.qdoc | 2 +- doc/src/platforms/symbian-introduction.qdoc | 4 +++ doc/src/snippets/code/doc_src_deployment.qdoc | 17 +++---------- qmake/generators/symbian/symmake.cpp | 35 +++++++++++++++++++++++++-- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 460df31..6d4614e 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -95,10 +95,10 @@ Example with certfile: # This is comment line, also the empty lines are ignored rd.cer;rd-key.pem .\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword - X:\\QtS60\\selfsigned.cer;X:\\QtS60\\selfsigned.key + X:\\QtS60\\s60installs\\selfsigned.cer;X:\\QtS60\\s60installs\\selfsigned.key If no certificate and key files are provided, either a RnD certificate or -a self-signed certificate from Qt installation root directory is used. +a self-signed certificate from QtDir\\src\\s60installs directory is used. ============================================================================================== ENDUSAGESTRING @@ -149,8 +149,10 @@ $pkgoutputbasename = lc($pkgoutputbasename); # Store output file names to variables my $pkgoutput = lc($pkgoutputbasename.".pkg"); -my $unsigned_sis_name = $pkgoutputbasename."_unsigned.sis"; -my $signed_sis_name = $pkgoutputbasename.".sis"; +my $sisoutputbasename = lc($pkgoutputbasename); +$sisoutputbasename =~ s/_$targetplatform//g; +my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; +my $signed_sis_name = $sisoutputbasename.".sis"; # Store some utility variables my $scriptpath = dirname(__FILE__); @@ -263,7 +265,11 @@ system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphra # Check if creating signed SIS Succeeded stat($signed_sis_name); if( -e _ ) { - print ("\nSuccessfully created $signed_sis_name using certificate: $certtext!\n"); + my $targetInsert = ""; + if ($targetplatform ne "-") { + $targetInsert = "for $targetplatform "; + } + print ("\nSuccessfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); # Sign with additional certificates & keys for my $row ( @certificates ) { diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 575a6dc..41babd9 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1573,28 +1573,17 @@ By default \c .pkg file generated by \c qmake adds support for all S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices. - As a last step we will instruct qmake to generate smart installer \c .pkg file by defining - the UID of the installation package. The UID needs to be different than the application UID, - and should be reserved via normal Symbian mechanisms. You can use a random UID starting with - \c 0xE for testing purposes: - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 - Now we are ready to compile the application and create the application deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss) and deployment packaging files (\c .pkg). And do build to create the application binaries and resources. - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 If everything compiled and linked without any errors, we are now ready to create - an application package (\c wiggly.sis): - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60 + an application installation package (\c wiggly_installer.sis): - Now you can create the smart installer package for the application: - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 61 + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 If all binaries and dependencies were found, you should now have a self signed \c wiggly_installer.sis ready to be installed on a device. The smart installer diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index b679250..abdfcd2 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -677,7 +677,7 @@ If you are using pre-built binaries, follow the instructions given in the \snippet doc/src/snippets/code/doc_src_installation.qdoc 30 - This will create a self-signed \c fluidlauncher_armv5_urel.sis and + This will create a self-signed \c fluidlauncher.sis and install it to your device. To run the demos on the emulator simply navigate to the directory of the demo diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 427f45a..94075f5 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -127,6 +127,10 @@ \row \o \c run \o Run the application on the emulator. \row \o \c runonphone \o Run the application on a device. \row \o \c sis \o Create signed \c .sis file for project. + \row \o \c installer_sis \o Create signed smart installer \c .sis file for project. + Smart installer will attempt to download + missing dependencies in addition to + just installing the application. \endtable The following lines perform a debug build for the emulator diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index 9c00681..3b0cda1 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -475,19 +475,10 @@ default_deployment.pkg_prerules += supported_platforms //! [57] //! [58] -DEPLOYMENT.installer_header = 0xE2345678 -//! [58] - -//! [59] qmake make release-gcce -//! [59] - -//! [60] -make sis -ren wiggly_release-gcce.sis wiggly.sis -//! [60] +//! [58] -//! [61] -createpackage wiggly_installer.pkg -//! [61] \ No newline at end of file +//! [59] +make installer_sis +//! [59] \ No newline at end of file diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 6c44f0b..3ee3b3a 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -87,7 +87,9 @@ #define MMP_END_RESOURCE "END" #define SIS_TARGET "sis" +#define INSTALLER_SIS_TARGET "installer_sis" #define OK_SIS_TARGET "ok_sis" +#define OK_INSTALLER_SIS_TARGET "ok_installer_sis" #define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg" #define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache" @@ -295,6 +297,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme QTextStream t(&pkgFile); QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); + if (installerSisHeader.isEmpty()) + installerSisHeader = "0xA000D7CE"; // Use default self-signable UID if not defined + QString wrapperStreamBuffer; QTextStream tw(&wrapperStreamBuffer); @@ -517,7 +522,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); - bootStrapPath.append("/bootstrap.sis"); + bootStrapPath.append("/smartinstaller.sis"); QFileInfo fi(fileInfo(bootStrapPath)); twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; } @@ -1901,8 +1906,34 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t) t << pkgcommand << endl; t << endl; + QString sisName = fixedTarget; + sisName += ".sis"; + + t << sisName << ":" << endl; + t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl; + + t << INSTALLER_SIS_TARGET ": " << sisName << endl; + siscommand = QString("\t$(if $(wildcard %1_installer.%2)," \ + "$(MAKE) -s -f $(MAKEFILE) %3," \ + "$(MAKE) -s -f $(MAKEFILE) %4)") + .arg(fixedTarget) + .arg("pkg") + .arg(OK_INSTALLER_SIS_TARGET) + .arg(FAIL_SIS_NOPKG_TARGET); + t << siscommand << endl; + t << endl; + + t << OK_INSTALLER_SIS_TARGET ": " << endl; + + pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \ + "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)") + .arg(fixedTarget) + .arg("pkg"); + t << pkgcommand << endl; + t << endl; + t << FAIL_SIS_NOPKG_TARGET ":" << endl; - t << "\t$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)" << endl; + t << "\t$(error PKG file does not exist, '" SIS_TARGET "' and '" INSTALLER_SIS_TARGET "' target are only supported for executables or projects with DEPLOYMENT statement)" << endl; t << endl; t << FAIL_SIS_NOCACHE_TARGET ":" << endl; -- cgit v0.12 From 94630819258edef96c434add7bbd4b1b425ea71a Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 09:58:22 +0100 Subject: QNAM HTTP: Fix issue with some servers The call to eatWhitespace() must only be done before reading the status, not while reading it. (We can be in ReadingStatusState for multiple loop iterations) Task-number: QTBUG-7673 Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkconnectionchannel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 70a301d..5bd972c 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -305,9 +305,12 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() while (socket->bytesAvailable()) { QHttpNetworkReplyPrivate::ReplyState state = reply ? reply->d_func()->state : QHttpNetworkReplyPrivate::AllDoneState; switch (state) { - case QHttpNetworkReplyPrivate::NothingDoneState: - case QHttpNetworkReplyPrivate::ReadingStatusState: { + case QHttpNetworkReplyPrivate::NothingDoneState: { + // only eat whitespace on the first call eatWhitespace(); + state = reply->d_func()->state = QHttpNetworkReplyPrivate::ReadingStatusState; + } + case QHttpNetworkReplyPrivate::ReadingStatusState: { qint64 statusBytes = reply->d_func()->readStatus(socket); if (statusBytes == -1 && reconnectAttempts <= 0) { // too many errors reading/receiving/parsing the status, close the socket and emit error -- cgit v0.12 From 1bb05bf5230ac41c47ce09fcc1e85e26db150322 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 9 Feb 2010 10:30:06 +0100 Subject: Stabilize QLineEdit test on X11 --- tests/auto/qlineedit/tst_qlineedit.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 69e7699..ca84b38 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -3455,10 +3455,8 @@ void tst_QLineEdit::task210502_caseInsensitiveInlineCompletion() completer.setCompletionMode(QCompleter::InlineCompletion); lineEdit.setCompleter(&completer); lineEdit.show(); -#ifdef Q_WS_X11 - // to be safe and avoid failing setFocus with window managers - qt_x11_wait_for_window_manager(&lineEdit); -#endif + QTest::qWaitForWindowShown(&lineEdit); + QApplication::setActiveWindow(&lineEdit); lineEdit.setFocus(); QTRY_VERIFY(lineEdit.hasFocus()); QTest::keyPress(&lineEdit, 'a'); @@ -3651,10 +3649,11 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut() le.addAction(&action); le.show(); - QApplication::setActiveWindow(&le); QTest::qWaitForWindowShown(&le); + QApplication::setActiveWindow(&le); le.setFocus(); QTRY_VERIFY(le.hasFocus()); + QTest::keyClick(0, Qt::Key_P); QCOMPARE(spy.count(), 1); } -- cgit v0.12 From 1f28c7c3391cef8760836b61146e556adf217596 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 9 Feb 2010 10:28:08 +0100 Subject: Improve the benchmark of QScriptClass The benchmarks has been stabilised and modified so the number are more representative of QSCriptClass and not other part of Qt: -the "iteration numbmer" has been introduced to ensure a minimal number of call, indpendant of QTestLib. -the subclasses of QScriptClass have been rewritten to have less impact on the results --- tests/benchmarks/qscriptclass/tst_qscriptclass.cpp | 536 ++++++--------------- 1 file changed, 155 insertions(+), 381 deletions(-) diff --git a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp b/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp index 7985028..6ab78b1 100644 --- a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp +++ b/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp @@ -46,348 +46,15 @@ Q_DECLARE_METATYPE(QScriptContext*) Q_DECLARE_METATYPE(QScriptValue) Q_DECLARE_METATYPE(QScriptValueList) -//TESTED_FILES= - -class TestClass : public QScriptClass -{ -public: - struct CustomProperty { - QueryFlags qflags; - uint id; - QScriptValue::PropertyFlags pflags; - QScriptValue value; - - CustomProperty(QueryFlags qf, uint i, QScriptValue::PropertyFlags pf, - const QScriptValue &val) - : qflags(qf), id(i), pflags(pf), value(val) { } - }; - - enum CallableMode { - NotCallable, - CallableReturnsSum, - CallableReturnsArgument, - CallableReturnsInvalidVariant - }; - - TestClass(QScriptEngine *engine); - ~TestClass(); - - void addCustomProperty(const QScriptString &name, QueryFlags qflags, - uint id, QScriptValue::PropertyFlags pflags, - const QScriptValue &value); - void removeCustomProperty(const QScriptString &name); - - QueryFlags queryProperty(const QScriptValue &object, - const QScriptString &name, - QueryFlags flags, uint *id); - - QScriptValue property(const QScriptValue &object, - const QScriptString &name, uint id); - - void setProperty(QScriptValue &object, const QScriptString &name, - uint id, const QScriptValue &value); - - QScriptValue::PropertyFlags propertyFlags( - const QScriptValue &object, const QScriptString &name, uint id); - - QScriptClassPropertyIterator *newIterator(const QScriptValue &object); - - QScriptValue prototype() const; - - QString name() const; - - bool supportsExtension(Extension extension) const; - QVariant extension(Extension extension, - const QVariant &argument = QVariant()); - - void setIterationEnabled(bool enable); - bool isIterationEnabled() const; - - void setCallableMode(CallableMode mode); - CallableMode callableMode() const; - - void setHasInstance(bool hasInstance); - bool hasInstance() const; - -private: - inline CustomProperty *findCustomProperty(const QScriptString &name); - - QHash customProperties; - - QScriptValue m_prototype; - bool m_iterationEnabled; - CallableMode m_callableMode; - bool m_hasInstance; -}; - -class TestClassPropertyIterator : public QScriptClassPropertyIterator -{ -public: - TestClassPropertyIterator(const QHash &props, - const QScriptValue &object); - ~TestClassPropertyIterator(); - - bool hasNext() const; - void next(); - - bool hasPrevious() const; - void previous(); - - void toFront(); - void toBack(); - - QScriptString name() const; - uint id() const; - QScriptValue::PropertyFlags flags() const; - -private: - int m_index; - int m_last; - QHash m_props; -}; - -TestClass::TestClass(QScriptEngine *engine) - : QScriptClass(engine), m_iterationEnabled(true), - m_callableMode(NotCallable), m_hasInstance(false) -{ - m_prototype = engine->newObject(); -} - -TestClass::~TestClass() -{ - qDeleteAll(customProperties); -} - -TestClass::CustomProperty* TestClass::findCustomProperty(const QScriptString &name) -{ - QHash::const_iterator it; - it = customProperties.constFind(name); - if (it == customProperties.constEnd()) - return 0; - return it.value(); - -} - -void TestClass::addCustomProperty(const QScriptString &name, QueryFlags qflags, - uint id, QScriptValue::PropertyFlags pflags, - const QScriptValue &value) -{ - customProperties.insert(name, new CustomProperty(qflags, id, pflags, value)); -} - -void TestClass::removeCustomProperty(const QScriptString &name) -{ - CustomProperty *prop = customProperties.take(name); - if (prop) - delete prop; -} - -QScriptClass::QueryFlags TestClass::queryProperty(const QScriptValue &/*object*/, - const QScriptString &name, - QueryFlags flags, uint *id) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return 0; - *id = prop->id; - return prop->qflags & flags; -} - -QScriptValue TestClass::property(const QScriptValue &/*object*/, - const QScriptString &name, uint /*id*/) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return QScriptValue(); - return prop->value; -} - -void TestClass::setProperty(QScriptValue &/*object*/, const QScriptString &name, - uint /*id*/, const QScriptValue &value) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return; - prop->value = value; -} - -QScriptValue::PropertyFlags TestClass::propertyFlags( - const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) -{ - CustomProperty *prop = findCustomProperty(name); - if (!prop) - return 0; - return prop->pflags; -} - -QScriptClassPropertyIterator *TestClass::newIterator(const QScriptValue &object) -{ - if (!m_iterationEnabled) - return 0; - return new TestClassPropertyIterator(customProperties, object); -} - -QScriptValue TestClass::prototype() const -{ - return m_prototype; -} - -QString TestClass::name() const -{ - return QLatin1String("TestClass"); -} - -bool TestClass::supportsExtension(Extension extension) const -{ - if (extension == Callable) - return (m_callableMode != NotCallable); - if (extension == HasInstance) - return m_hasInstance; - return false; -} - -QVariant TestClass::extension(Extension extension, - const QVariant &argument) -{ - if (extension == Callable) { - Q_ASSERT(m_callableMode != NotCallable); - QScriptContext *ctx = qvariant_cast(argument); - if (m_callableMode == CallableReturnsSum) { - qsreal sum = 0; - for (int i = 0; i < ctx->argumentCount(); ++i) - sum += ctx->argument(i).toNumber(); - QScriptValueIterator it(ctx->thisObject()); - while (it.hasNext()) { - it.next(); - sum += it.value().toNumber(); - } - return sum; - } else if (m_callableMode == CallableReturnsArgument) { - return qVariantFromValue(ctx->argument(0)); - } else if (m_callableMode == CallableReturnsInvalidVariant) { - return QVariant(); - } - } else if (extension == HasInstance) { - Q_ASSERT(m_hasInstance); - QScriptValueList args = qvariant_cast(argument); - QScriptValue obj = args.at(0); - QScriptValue value = args.at(1); - return value.property("foo").equals(obj.property("foo")); - } - return QVariant(); -} - -void TestClass::setIterationEnabled(bool enable) -{ - m_iterationEnabled = enable; -} - -bool TestClass::isIterationEnabled() const -{ - return m_iterationEnabled; -} - -void TestClass::setCallableMode(CallableMode mode) -{ - m_callableMode = mode; -} - -TestClass::CallableMode TestClass::callableMode() const -{ - return m_callableMode; -} - -void TestClass::setHasInstance(bool hasInstance) -{ - m_hasInstance = hasInstance; -} - -bool TestClass::hasInstance() const -{ - return m_hasInstance; -} - -TestClassPropertyIterator::TestClassPropertyIterator(const QHash &props, - const QScriptValue &object) - : QScriptClassPropertyIterator(object) -{ - m_props = props; - toFront(); -} - -TestClassPropertyIterator::~TestClassPropertyIterator() -{ -} - -bool TestClassPropertyIterator::hasNext() const -{ - return m_index < m_props.size(); -} - -void TestClassPropertyIterator::next() -{ - m_last = m_index; - ++m_index; -} - -bool TestClassPropertyIterator::hasPrevious() const -{ - return m_index > 0; -} - -void TestClassPropertyIterator::previous() -{ - --m_index; - m_last = m_index; -} - -void TestClassPropertyIterator::toFront() -{ - m_index = 0; - m_last = -1; -} - -void TestClassPropertyIterator::toBack() -{ - m_index = m_props.size(); - m_last = -1; -} - -QScriptString TestClassPropertyIterator::name() const -{ - return m_props.keys().value(m_last); -} - -uint TestClassPropertyIterator::id() const -{ - QScriptString key = m_props.keys().value(m_last); - if (!key.isValid()) - return 0; - TestClass::CustomProperty *prop = m_props.value(key); - return prop->id; -} - -QScriptValue::PropertyFlags TestClassPropertyIterator::flags() const -{ - QScriptString key = m_props.keys().value(m_last); - if (!key.isValid()) - return 0; - TestClass::CustomProperty *prop = m_props.value(key); - return prop->pflags; -} +// We want reliable numbers so we don't want to rely too much +// on the number of iterations done by testlib. +// this also make the results of valgrind more interesting +const int iterationNumber = 5000; class tst_QScriptClass : public QObject { Q_OBJECT -public: - tst_QScriptClass(); - virtual ~tst_QScriptClass(); - -public slots: - void init(); - void cleanup(); - private slots: void noSuchProperty(); void property(); @@ -398,111 +65,218 @@ private slots: void iterate(); }; -tst_QScriptClass::tst_QScriptClass() -{ -} - -tst_QScriptClass::~tst_QScriptClass() -{ -} - -void tst_QScriptClass::init() -{ -} - -void tst_QScriptClass::cleanup() -{ -} - +// Test the overhead of checking for an inexisting property of a QScriptClass void tst_QScriptClass::noSuchProperty() { QScriptEngine eng; - TestClass cls(&eng); + QScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); QString propertyName = QString::fromLatin1("foo"); QBENCHMARK { - (void)obj.property(propertyName); + for (int i = 0; i < iterationNumber; ++i) + (void)obj.property(propertyName); } + Q_ASSERT(!obj.property(propertyName).isValid()); } + +class FooScriptClass : public QScriptClass +{ +public: + FooScriptClass(QScriptEngine *engine) + : QScriptClass(engine) + { + foo = engine->toStringHandle("foo"); + } + + QueryFlags queryProperty(const QScriptValue &, + const QScriptString &, + QueryFlags flags, + uint *id) + { + *id = 1; + return flags; + } + + QScriptValue property(const QScriptValue &, + const QScriptString &, + uint) + { + return QScriptValue(engine(), 35); + } + + void setProperty(QScriptValue &, const QScriptString &, + uint, const QScriptValue &) + {} + + QScriptValue::PropertyFlags propertyFlags(const QScriptValue &, const QScriptString &, uint) + { + return QScriptValue::Undeletable; + } +private: + QScriptString foo; +}; + +// Test the overhead of getting a value of QScriptClass accross the Javascript engine void tst_QScriptClass::property() { QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); + FooScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); + QScriptString foo = eng.toStringHandle("foo"); QBENCHMARK { - (void)obj.property(foo); + for (int i = 0; i < iterationNumber; ++i) + (void)obj.property(foo); } } +// Test the overhead of setting a value on QScriptClass accross the Javascript engine void tst_QScriptClass::setProperty() { QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesWriteAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); + FooScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); QScriptValue value(456); + QScriptString foo = eng.toStringHandle("foo"); QBENCHMARK { - obj.setProperty(foo, value); + for (int i = 0; i < iterationNumber; ++i) + obj.setProperty(foo, value); } } +// Test the time taken to get the propeties flags accross the engine void tst_QScriptClass::propertyFlags() { QScriptEngine eng; - TestClass cls(&eng); - QScriptString foo = eng.toStringHandle("foo"); - cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, QScriptValue::ReadOnly, /*value=*/123); + FooScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); + QScriptString foo = eng.toStringHandle("foo"); QBENCHMARK { - (void)obj.propertyFlags(foo); + for (int i = 0; i < iterationNumber; ++i) + (void)obj.propertyFlags(foo); } } + + +class ExtensionScriptClass : public QScriptClass +{ +public: + ExtensionScriptClass(QScriptEngine *engine) + : QScriptClass(engine) + { + } + + bool supportsExtension(Extension) const + { + return true; + } + + QVariant extension(Extension, const QVariant &argument = QVariant()) + { + Q_UNUSED(argument); + return QVariant(); + } +}; + +// Check the overhead of the extension "call" void tst_QScriptClass::call() { QScriptEngine eng; - TestClass cls(&eng); - cls.setCallableMode(TestClass::CallableReturnsArgument); + ExtensionScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); QScriptValue thisObject; QScriptValueList args; args.append(123); QBENCHMARK { - (void)obj.call(thisObject, args); + for (int i = 0; i < iterationNumber; ++i) + (void)obj.call(thisObject, args); } } +// Check the overhead of the extension "instanceOf" void tst_QScriptClass::hasInstance() { QScriptEngine eng; - TestClass cls(&eng); - cls.setHasInstance(true); + ExtensionScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); obj.setProperty("foo", 123); QScriptValue plain = eng.newObject(); plain.setProperty("foo", obj.property("foo")); QBENCHMARK { - (void)plain.instanceOf(obj); + for (int i = 0; i < iterationNumber; ++i) + (void)plain.instanceOf(obj); } } + + +static const int iteratorValuesNumber = 100; +class TestClassPropertyIterator : public QScriptClassPropertyIterator +{ +public: + TestClassPropertyIterator(const QScriptValue &object, QVector names) + : QScriptClassPropertyIterator(object) + , m_index(0) + , names(names) + { + } + + bool hasNext() const + { + return m_index < iteratorValuesNumber - 1; + } + void next() { ++m_index; } + + bool hasPrevious() const { return m_index > 0; } + void previous() { --m_index; } + + void toFront() { m_index = 0; } + void toBack() { m_index = iteratorValuesNumber - 1; } + + QScriptString name() const { return names[m_index]; } + uint id() const { return m_index; } + QScriptValue::PropertyFlags flags() const { return 0; } + +private: + int m_index; + QVector names; +}; + + +class IteratorScriptClass : public QScriptClass +{ +public: + IteratorScriptClass(QScriptEngine *engine) + : QScriptClass(engine) + { + for (int i = 0; i < iteratorValuesNumber; ++i) + names.append(engine->toStringHandle(QString("property%1").arg(i))); + } + + QScriptClassPropertyIterator *newIterator(const QScriptValue &object) + { + return new TestClassPropertyIterator(object, names); + } +private: + QVector names; + friend class TestClassPropertyIterator; +}; + +// Measure the performance of the interface to iterate over QScriptClassPropertyIterator void tst_QScriptClass::iterate() { QScriptEngine eng; - TestClass cls(&eng); - cls.setIterationEnabled(true); - cls.addCustomProperty(eng.toStringHandle("foo"), QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123); - cls.addCustomProperty(eng.toStringHandle("bar"), QScriptClass::HandlesReadAccess, /*id=*/2, /*attributes=*/0, /*value=*/456); + IteratorScriptClass cls(&eng); QScriptValue obj = eng.newObject(&cls); + int iterationNumberIterate = iterationNumber / iteratorValuesNumber; QBENCHMARK { - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - (void)it.scriptName(); + for (int i = 0; i < iterationNumberIterate; ++i) { + QScriptValueIterator it(obj); + while (it.hasNext()) { + it.next(); + (void)it.scriptName(); + } } } } -- cgit v0.12 From a3d3d2b746f515e197a40a9f87e767d68e25cb1a Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 9 Feb 2010 10:58:48 +0100 Subject: Fix Float Conversion in xmlpatterns On Maemo5 devices there is an automatic conversion to Float. So qtToXDMType() needs a special case. Reviewed By: Peter Hartmann --- src/xmlpatterns/data/qatomicvalue.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xmlpatterns/data/qatomicvalue.cpp b/src/xmlpatterns/data/qatomicvalue.cpp index 6858e27..c4f3578 100644 --- a/src/xmlpatterns/data/qatomicvalue.cpp +++ b/src/xmlpatterns/data/qatomicvalue.cpp @@ -226,6 +226,8 @@ ItemType::Ptr AtomicValue::qtToXDMType(const QXmlItem &item) /* Fallthrough. */ case QVariant::Time: return BuiltinTypes::xsDateTime; + case QMetaType::Float: + return BuiltinTypes::xsFloat; case QVariant::Double: return BuiltinTypes::xsDouble; default: -- cgit v0.12 From 709238ecfefdea82ec192267a4a33180078dbad8 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Tue, 9 Feb 2010 11:58:08 +0100 Subject: Setting some parameters to reliably run on Tb9.2, Tb 9.2 ATM is more memory sensitive. Reviewed-by: TrustMe --- .../benchmarks/qgraphicsview/tst_qgraphicsview.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp index 4cb07db..10e00a6 100644 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp @@ -555,7 +555,11 @@ void tst_QGraphicsView::imageRiver() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif AnimatedPixmapItem *item; if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale); if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale); @@ -574,7 +578,11 @@ void tst_QGraphicsView::imageRiver() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -669,7 +677,11 @@ void tst_QGraphicsView::textRiver() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif AnimatedTextItem *item; if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale); if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale); @@ -687,7 +699,11 @@ void tst_QGraphicsView::textRiver() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -771,7 +787,11 @@ void tst_QGraphicsView::moveItemCache() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 5; ++i) { +#else for (int i = 0; i < 50; ++i) { +#endif AnimatedPixmapCacheItem *item; if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0); if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1); @@ -793,7 +813,11 @@ void tst_QGraphicsView::moveItemCache() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -893,7 +917,11 @@ void tst_QGraphicsView::paintItemCache() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 5; ++i) { +#else for (int i = 0; i < 50; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); -- cgit v0.12 From 16f89107f9c8019b05d5ccee1b6deccfdff6f98e Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Tue, 9 Feb 2010 11:57:58 +0100 Subject: fix a few mistakes in German translation Merge-request: 2302 Reviewed-by: Oswald Buddenhagen --- translations/qt_de.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 8cbf402..6447451 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -7572,7 +7572,7 @@ Bitte wählen Sie einen anderen Dateinamen. Play movie in full-screen mode Media controller element - FIlm im Vollbildmodus abspielen + Film im Vollbildmodus abspielen @@ -8245,7 +8245,7 @@ Bitte wählen Sie einen anderen Dateinamen. Warning in %1, at line %2, column %3: %4 - Fehler in %1, bei Zeile %2, Spalte %3: %4 + Warnung in %1, bei Zeile %2, Spalte %3: %4 @@ -9466,7 +9466,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 is not allowed to derive from %2 by list as the latter defines it as final. - %1 darf nicht durch Listen von %2 abgeleitet werden, da sie letzterer sie als final deklariert. + %1 darf nicht durch Listen von %2 abgeleitet werden, da letzterer sie als final deklariert. @@ -9917,7 +9917,7 @@ Bitte wählen Sie einen anderen Dateinamen. Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model. - Der komplexe Typ % kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein '%3'-Element in seinem Inhaltsmodell hat. + Der komplexe Typ %1 kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein '%3'-Element in seinem Inhaltsmodell hat. -- cgit v0.12 From 9be25c3847bb90eb2a6cf9cd6d357e83b7ad89a2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 9 Feb 2010 13:13:31 +0100 Subject: doc: Updated deployment OS X requirements for 4.6 Beginning with Qt 4.6, OS X 103 (Panther) is no longer supported. --- doc/src/deployment/deployment.qdoc | 84 +++++++++++++---------------------- doc/src/platforms/platform-notes.qdoc | 3 ++ 2 files changed, 33 insertions(+), 54 deletions(-) diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 575a6dc..9557365 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -963,14 +963,14 @@ \title Deploying an Application on Mac OS X - Starting with version 4.5, Qt now includes a \l {macdeploy}{deployment tool} - that automates the prodecures described in this document. - - This documentation will describe how to create a bundle, and how - to make sure that the application will find the resources it needs - at run-time. We will demonstrate the procedures in terms of - deploying the \l {tools/plugandpaint}{Plug & Paint} application - that is provided in Qt's examples directory. + Beginning with Qt 4.5, a \l {macdeploy}{deployment tool} is + included that automates the prodecures described here. + + This document describes how to create a bundle and how to make + sure that the application will find the resources it needs at + run-time. We demonstrate the procedures in terms of deploying the + \l {tools/plugandpaint}{Plug & Paint} application that is provided + in Qt's examples directory. \tableofcontents @@ -1380,63 +1380,38 @@ \section2 Mac OS X Version Dependencies - Qt 4.2 has been designed to be built and deployed on Mac OS X 10.3 - up until the current version as of this writing, Mac OS X 10.4 and - all their minor releases. Qt achieves this by using "weak - linking." This means that Qt tests if a function added in newer - versions of Mac OS X is available on the computer it is running on - before it uses it. This results in getting access to newer - features when running on newer versions of OS X while still - remaining compatible on older versions. + From Qt 4.6, Mac OS X 10.3 (Panther) is no longer supported. Qt + 4.6 applications can be built and deployed on Mac OS X 10.4 + (Tiger) and higher. This is achieved using \e{weak linking}. In + \e{weak linking}, Qt tests whether a function added in a newer + version of Mac OS X is available on the computer it is running + on. This allows Qt to use newer features, when it runs on a newer + version of OS X, while remaining compatible on the older versions. For more information about cross development issues on Mac OS X, see \l {http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/index.html}{Apple's Developer Website}. - Since the linker is set to be compatible with all OS X version, you have to - change the \c MACOSX_DEPLOYMENT_TARGET environment variable to get weak - linking to work for your application. You can add: + Since the linker is set to be compatible with all OS X versions, + you must change the \c MACOSX_DEPLOYMENT_TARGET environment + variable to get \e{weak linking} to work for your application. You + can add: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51 - to your .pro file and qmake will take care of this for you. - - However, there is a bit of a wrinkle to keep in mind when your are - deploying. Mac OS X 10.4 ("Tiger") ships GCC 4.0 as its default - compiler. This is also the GCC compiler we use for building the - binary Qt package. If you use GCC 4.0 to build your application, - it will link against a dynamic libstdc++ that is only available on - Mac OS X 10.4 and Mac OS X 10.3.9. The application will refuse to - run on older versions of the operating system. + to your .pro file, and qmake will take care of this for you. For more information about C++ runtime environment, see \l {http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/index.html}{Apple's Developer Website} - If you want to deploy to versions of Mac OS X earlier than 10.3.9, - you must build with GCC 3.3 which is the default on Mac OS X - 10.3. GCC 3.3 is also available on the Mac OS X 10.4 "Xcode Tools" - CD and as a download for earlier versions of Mac OS X from Apple - (\l {https://connect.apple.com/}{connect.apple.com}). You can use - Apple's \c gcc_select(1) command line tool to switch the default - complier on your system. - \section3 Deploying Phonon Applications on Mac OS X \list - \o If you build your Phonon application on Tiger, it will work on - Tiger, Leopard and Panther. - \o If you build your application on Leopard, it will \bold not work - on Panther unless you rename the libraries with the following command - after you have built your application: - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51a - This command must be invoked in the directory where - \c{libphonon_qt7.dylib} is located, usually in - \c{yourapp.app/Contents/plugins/phonon_backend/}. - \o The \l {macdeploy}{deployment tool} will perform this step for you. + \o If you build your Qt 4.6 Phonon application on OS X 10.4 + (Tiger), it will run on OS X 10.4 and higher. - \o If you are using Leopard, but would like to build your application + \o If you are using Leopard but would like to build your application against Tiger, you can use: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51b @@ -1444,12 +1419,13 @@ \section2 Architecture Dependencies - The Qt for Mac OS X libraries, tools, and examples can be built "universal" - (i.e. they run natively on both Intel and PowerPC machines). This - is accomplished by passing \c -universal on the \c configure line - of the source package, and requires that you use GCC 4.0.x. On - PowerPC hardware you will need to pass the universal SDK as a - command line argument to the Qt configure command. For example: + The Qt for Mac OS X libraries, tools, and examples can be built + "universal" (i.e. they run natively on both Intel and PowerPC + machines). This is accomplished by passing \c -universal on the + \c configure line of the source package, and requires that you use + GCC 4.0.x. On PowerPC hardware you will need to pass the universal + SDK as a command line argument to the Qt configure command. For + example: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 52 diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index e08bf1a..f513181 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -293,6 +293,9 @@ \section1 General Information + Qt 4.6 applications can only be deployed on Mac OS X 10.4 (Tiger) + and higher. + Qt 4.4 and Qt 4.5 development is only supported on Mac OS X 10.4 and up. Applications built against these version of Qt can be deployed on Mac OS X 10.3, but cannot be developed on that version of the operating system due -- cgit v0.12 From 4519080aacc480acea59758e4ca4efeed599aaec Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 11:06:44 +0100 Subject: demo browser: Fix the way warnings were (not) displayed Reviewed-by: TrustMe --- demos/browser/browser.pro | 2 -- demos/browser/networkaccessmanager.cpp | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro index a42aa60..f038c61 100644 --- a/demos/browser/browser.pro +++ b/demos/browser/browser.pro @@ -6,8 +6,6 @@ CONFIG += qt warn_on contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools else: DEFINES += QT_NO_UITOOLS -release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT - FORMS += \ addbookmarkdialog.ui \ bookmarks.ui \ diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp index b0b00a2..70a9305 100644 --- a/demos/browser/networkaccessmanager.cpp +++ b/demos/browser/networkaccessmanager.cpp @@ -112,8 +112,9 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply) double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount)); double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount)); double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount)); +#ifdef QT_DEBUG qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); - +#endif } void NetworkAccessManager::loadSettings() -- cgit v0.12 From 74d3ef60ac8dfa12c90442062307e0c4b2600d03 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 11:29:24 +0100 Subject: Demo browser: Better handleUnsupportedContent implementation Do warnings instead of downloads for sub resources. Show error message for main resources. Reviewed-by: Tor Arne --- demos/browser/webview.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp index 1a7e38a..2f9b3e6 100644 --- a/demos/browser/webview.cpp +++ b/demos/browser/webview.cpp @@ -143,11 +143,19 @@ QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QS void WebPage::handleUnsupportedContent(QNetworkReply *reply) { - if (reply->error() == QNetworkReply::NoError) { - BrowserApplication::downloadManager()->handleUnsupportedContent(reply); + QString errorString = reply->errorString(); + + if (m_loadingUrl != reply->url()) { + // sub resource of this page + qWarning() << "Resource" << reply->url().toEncoded() << "has unknown Content-Type, will be ignored."; + reply->deleteLater(); return; } + if (reply->error() == QNetworkReply::NoError && !reply->header(QNetworkRequest::ContentTypeHeader).isValid()) { + errorString = "Unknown Content-Type"; + } + QFile file(QLatin1String(":/notfound.html")); bool isOpened = file.open(QIODevice::ReadOnly); Q_ASSERT(isOpened); @@ -156,7 +164,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) QString title = tr("Error loading page: %1").arg(reply->url().toString()); QString html = QString(QLatin1String(file.readAll())) .arg(title) - .arg(reply->errorString()) + .arg(errorString) .arg(reply->url().toString()); QBuffer imageBuffer; -- cgit v0.12 From c034670d71247954eb918dfc84536ace02c33304 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 12:56:55 +0100 Subject: QNAM HTTP: Improve parseStatus() of HTTP reply Just read() instead us using peek() and bytesAvailable() Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkreply.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index a5223d1..b411467 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -425,11 +425,19 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) { qint64 bytes = 0; char c; + qint64 haveRead = 0; + + do { + haveRead = socket->read(&c, 1); + if (haveRead == -1) + return -1; // unexpected EOF + else if (haveRead == 0) + break; // read more later + + bytes++; - while (socket->bytesAvailable()) { // allow both CRLF & LF (only) line endings - if (socket->peek(&c, 1) == 1 && c == '\n') { - bytes += socket->read(&c, 1); // read the "n" + if (c == '\n') { // remove the CR at the end if (fragment.endsWith('\r')) { fragment.truncate(fragment.length()-1); @@ -442,11 +450,6 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) } break; } else { - c = 0; - int haveRead = socket->read(&c, 1); - if (haveRead == -1) - return -1; - bytes += haveRead; fragment.append(c); } @@ -456,8 +459,7 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) fragment.clear(); return -1; } - - } + } while (haveRead == 1); return bytes; } -- cgit v0.12 From 1263253f298b4cb3f0679cc67b010766b58a4fd9 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 9 Feb 2010 13:21:44 +0200 Subject: Add QSKIP to functionEntryAndExit_builtin. The function fails on Mac and Windows, but it will be fixed in next JSC update. Lets skip it for now. Reviewed-by: Kent Hansen --- tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 8e26696..ac9ca46 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -832,6 +832,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data() /** check behaiviour of built-in function */ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() { + QSKIP("The test fails on platforms others than Linux. The issue will be fixed with next JSC update", SkipAll); QFETCH(QString, script); QFETCH(QString, result); QScriptEngine eng; -- cgit v0.12 From f38f61df31b708e1f4e50c5fdcc30099f9a1fe8f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 9 Feb 2010 12:46:41 +0100 Subject: =?UTF-8?q?Fix=20warnings=20~QX11PixmapData():=20QPixmap=20objects?= =?UTF-8?q?=20must=20be=20destroyed..=20Reviewed-by:=20Trond=20Kjern=C3=A5?= =?UTF-8?q?sen=20=20Task-number:=20QTBUG-8046?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/designer/src/lib/shared/actionrepository.cpp | 21 ++++++++++----------- tools/designer/src/lib/shared/actionrepository_p.h | 9 +++++++-- tools/designer/src/lib/shared/iconloader.cpp | 3 +-- tools/designer/src/lib/shared/qdesigner_menu.cpp | 11 +++++------ tools/designer/src/lib/shared/qdesigner_menu_p.h | 2 ++ 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp index e3ff2c1..1076ff4 100644 --- a/tools/designer/src/lib/shared/actionrepository.cpp +++ b/tools/designer/src/lib/shared/actionrepository.cpp @@ -77,18 +77,12 @@ static inline QAction *actionOfItem(const QStandardItem* item) return qvariant_cast(item->data(qdesigner_internal::ActionModel::ActionRole)); } -static QIcon fixActionIcon(const QIcon &icon) -{ - if (icon.isNull()) - return qdesigner_internal::emptyIcon(); - return icon; -} - namespace qdesigner_internal { // ----------- ActionModel ActionModel::ActionModel(QWidget *parent ) : QStandardItemModel(parent), + m_emptyIcon(emptyIcon()), m_core(0) { QStringList headers; @@ -127,7 +121,7 @@ void ActionModel::update(int row) for (int i = 0; i < NumColumns; i++) list += item(row, i); - setItems(m_core, actionOfItem(list.front()), list); + setItems(m_core, actionOfItem(list.front()), m_emptyIcon, list); } void ActionModel::remove(int row) @@ -150,7 +144,7 @@ QModelIndex ActionModel::addAction(QAction *action) item->setFlags(flags); items.push_back(item); } - setItems(m_core, action, items); + setItems(m_core, action, m_emptyIcon, items); appendRow(items); return indexFromItem(items.front()); } @@ -185,7 +179,9 @@ PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropert return qvariant_cast(sheet->property(index)); } -void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, QStandardItemList &sl) +void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, + const QIcon &defaultIcon, + QStandardItemList &sl) { // Tooltip, mostly for icon view mode @@ -200,7 +196,10 @@ void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, QStandardItem *item = sl[NameColumn]; item->setText(action->objectName()); - item->setIcon(fixActionIcon(action->icon())); + QIcon icon = action->icon(); + if (icon.isNull()) + icon = defaultIcon; + item->setIcon(icon); item->setToolTip(firstTooltip); item->setWhatsThis(firstTooltip); // Used diff --git a/tools/designer/src/lib/shared/actionrepository_p.h b/tools/designer/src/lib/shared/actionrepository_p.h index 65adc5d..6e17e7b 100644 --- a/tools/designer/src/lib/shared/actionrepository_p.h +++ b/tools/designer/src/lib/shared/actionrepository_p.h @@ -59,6 +59,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -110,10 +111,14 @@ signals: void resourceImageDropped(const QString &path, QAction *action); private: + typedef QList QStandardItemList; + void initializeHeaders(); + static void setItems(QDesignerFormEditorInterface *core, QAction *a, + const QIcon &defaultIcon, + QStandardItemList &sl); - typedef QList QStandardItemList; - static void setItems(QDesignerFormEditorInterface *core, QAction *a, QStandardItemList &sl); + const QIcon m_emptyIcon; QDesignerFormEditorInterface *m_core; }; diff --git a/tools/designer/src/lib/shared/iconloader.cpp b/tools/designer/src/lib/shared/iconloader.cpp index df0bb7e..ed312b8 100644 --- a/tools/designer/src/lib/shared/iconloader.cpp +++ b/tools/designer/src/lib/shared/iconloader.cpp @@ -70,8 +70,7 @@ QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name) QDESIGNER_SHARED_EXPORT QIcon emptyIcon() { - static const QIcon empty_icon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png")); - return empty_icon; + return QIcon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png")); } } // namespace qdesigner_internal diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp index c83abad..ba512e4 100644 --- a/tools/designer/src/lib/shared/qdesigner_menu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp @@ -88,6 +88,7 @@ static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection d QDesignerMenu::QDesignerMenu(QWidget *parent) : QMenu(parent), + m_subMenuPixmap(QPixmap(QLatin1String(":/trolltech/formeditor/images/submenu.png"))), m_currentIndex(0), m_addItem(new SpecialMenuAction(this)), m_addSeparator(new SpecialMenuAction(this)), @@ -550,11 +551,10 @@ void QDesignerMenu::deleteAction(QAction *a) QRect QDesignerMenu::subMenuPixmapRect(QAction *action) const { - static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png")); const QRect g = actionGeometry(action); - const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - pm.width() - 2) : 2; - const int y = g.top() + (g.height() - pm.height())/2 + 1; - return QRect(x, y, pm.width(), pm.height()); + const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - m_subMenuPixmap.width() - 2) : 2; + const int y = g.top() + (g.height() - m_subMenuPixmap.height())/2 + 1; + return QRect(x, y, m_subMenuPixmap.width(), m_subMenuPixmap.height()); } bool QDesignerMenu::hasSubMenuPixmap(QAction *action) const @@ -591,8 +591,7 @@ void QDesignerMenu::paintEvent(QPaintEvent *event) p.fillRect(g, lg); } else if (hasSubMenuPixmap(a)) { - static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png")); - p.drawPixmap(subMenuPixmapRect(a).topLeft(), pm); + p.drawPixmap(subMenuPixmapRect(a).topLeft(), m_subMenuPixmap); } } diff --git a/tools/designer/src/lib/shared/qdesigner_menu_p.h b/tools/designer/src/lib/shared/qdesigner_menu_p.h index 9c9a311..ae1e0e7 100644 --- a/tools/designer/src/lib/shared/qdesigner_menu_p.h +++ b/tools/designer/src/lib/shared/qdesigner_menu_p.h @@ -57,6 +57,7 @@ #include #include +#include #include QT_BEGIN_NAMESPACE @@ -183,6 +184,7 @@ protected: private: bool hideSubMenuOnCursorKey(); bool showSubMenuOnCursorKey(); + const QPixmap m_subMenuPixmap; QPoint m_startPosition; int m_currentIndex; -- cgit v0.12 From 884a36d300bbe9068d912550a4aeb581f8ce8b37 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Tue, 9 Feb 2010 11:58:12 +0100 Subject: Fixed warnings and crash when painting graphics effects outside scene. The problem was that when an item had a QGraphicsEffect on itself and that item was outside of the sceneRect, the cached pixmap of the item was just an empty pixmap (when using DeviceCoordinates mode). Therefore the effect filter was trying to paint into an unformatted and empty image. Now, paint() for all pixmap filters just return immediatly when the pixmap is empty. Task-number: QTBUG-5358 Reviewed-by: sroedal --- src/gui/image/qpixmapfilter.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 37a6a18..7cf942c 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -422,6 +422,9 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q if(d->kernelWidth<=0 || d->kernelHeight <= 0) return; + if (src.isNull()) + return; + QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ? static_cast(painter->paintEngine())->pixmapFilter(type(), this) : 0; QPixmapConvolutionFilter *convolutionFilter = static_cast(filter); @@ -902,6 +905,9 @@ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap if (!painter->isActive()) return; + if (src.isNull()) + return; + QRectF srcRect = rect; if (srcRect.isNull()) srcRect = src.rect(); @@ -1082,6 +1088,10 @@ void QPixmapColorizeFilter::setStrength(qreal strength) void QPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect) const { Q_D(const QPixmapColorizeFilter); + + if (src.isNull()) + return; + QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ? static_cast(painter->paintEngine())->pixmapFilter(type(), this) : 0; QPixmapColorizeFilter *colorizeFilter = static_cast(filter); @@ -1312,6 +1322,10 @@ void QPixmapDropShadowFilter::draw(QPainter *p, const QRectF &src) const { Q_D(const QPixmapDropShadowFilter); + + if (px.isNull()) + return; + QPixmapFilter *filter = p->paintEngine() && p->paintEngine()->isExtended() ? static_cast(p->paintEngine())->pixmapFilter(type(), this) : 0; QPixmapDropShadowFilter *dropShadowFilter = static_cast(filter); -- cgit v0.12 From 997490b36b28bca877409de97a506c969840bc43 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 9 Feb 2010 13:05:09 +0100 Subject: QListView: fix crash when hiding many of the lasts item in a QListView Since 6c1388ee5a3c4796d hidden items are not taken in account when counting the scrollbar position, and so the vector may be smaller. Reviewed-by: Gabriel Task-number: QTBUG-7929 --- src/gui/itemviews/qlistview.cpp | 2 +- tests/auto/qlistview/tst_qlistview.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 19b1e8c..b2def39 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -2160,7 +2160,7 @@ void QListModeViewBase::scrollContentsBy(int dx, int dy, bool scrollElasticBand) } else { if (flowPositions.isEmpty()) return; - const int max = flowPositions.count() - 1; + const int max = scrollValueMap.count() - 1; if (vertical && flow() == QListView::TopToBottom && dy != 0) { int currentValue = qBound(0, verticalValue, max); int previousValue = qBound(0, currentValue + dy, max); diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 7109213..1e6d36a 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -1834,6 +1834,23 @@ void tst_QListView::taskQTBUG_2233_scrollHiddenItems() QVERIFY(index.isValid()); QCOMPARE(index.row(), 2 * i + 1); } + + //QTBUG-7929 should not crash + view.show(); + QTest::qWaitForWindowShown(&view); + QScrollBar *bar = view.flow() == QListView::TopToBottom + ? view.verticalScrollBar() : view.horizontalScrollBar(); + + int nbVisibleItem = rowCount / 2 - bar->maximum(); + + bar->setValue(bar->maximum()); + QApplication::processEvents(); + for (int i = rowCount; i > rowCount / 2; i--) { + view.setRowHidden(i, true); + } + QApplication::processEvents(); + QCOMPARE(bar->value(), bar->maximum()); + QCOMPARE(bar->maximum(), rowCount/4 - nbVisibleItem); } void tst_QListView::taskQTBUG_633_changeModelData() -- cgit v0.12 From 3b56735e8d90cb760bf56fc07fbd87e48ca08619 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 9 Feb 2010 13:38:18 +0100 Subject: Speed up QListView test (from 31s to 7s) --- tests/auto/qlistview/tst_qlistview.cpp | 67 ++++++++++++++++------------------ 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 1e6d36a..2c31d8b 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -606,9 +606,8 @@ void tst_QListView::indexAt() view2.setWrapping(true); // We really want to make sure it is shown, because the layout won't be known until it is shown view2.show(); - for (int i = 0; i < 5 && !view2.m_shown; ++i) { - QTest::qWait(500); - } + QTest::qWaitForWindowShown(&view2); + QTRY_VERIFY(view2.m_shown); QVERIFY(view2.m_index.isValid()); QVERIFY(view2.m_index.row() != 0); @@ -760,7 +759,8 @@ void tst_QListView::hideFirstRow() view.setUniformItemSizes(true); view.setRowHidden(0,true); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTest::qWait(10); } void tst_QListView::batchedMode() @@ -778,10 +778,9 @@ void tst_QListView::batchedMode() view.setBatchSize(2); view.resize(200,400); view.show(); + QTest::qWaitForWindowShown(&view); -#if !defined(Q_OS_WINCE) - QTest::qWait(100); -#else +#if defined(Q_OS_WINCE) QTest::qWait(2000); #endif QBitArray ba; @@ -1203,9 +1202,9 @@ void tst_QListView::scrollTo() //we click the item QPoint p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).y(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).y(),0); //we scroll down. As the item is to tall for the view, it will disappear QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier); @@ -1222,9 +1221,9 @@ void tst_QListView::scrollTo() //we click the item p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).x(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).x(),0); //we scroll right. As the item is too wide for the view, it will disappear QTest::keyClick(lv.viewport(), Qt::Key_Right, Qt::NoModifier); @@ -1243,9 +1242,9 @@ void tst_QListView::scrollTo() //we click the item p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).y(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).y(),0); //we scroll down. As the item is too tall for the view, it will partially disappear QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier); @@ -1277,7 +1276,7 @@ void tst_QListView::scrollBarRanges() for (int h = 30; h <= 210; ++h) { lv.resize(250, h); - QTest::qWait(100); // wait for the layout to be done + QApplication::processEvents(); // wait for the layout to be done int visibleRowCount = lv.viewport()->size().height() / rowHeight; int invisibleRowCount = rowCount - visibleRowCount; QCOMPARE(lv.verticalScrollBar()->maximum(), invisibleRowCount); @@ -1366,7 +1365,7 @@ void tst_QListView::scrollBarAsNeeded() model.setStringList(list); QApplication::processEvents(); - QTest::qWait(100); + QTest::qWait(50); QStringList replacement; for (i = 0; i < itemCount; ++i) { @@ -1375,10 +1374,9 @@ void tst_QListView::scrollBarAsNeeded() model.setStringList(replacement); QApplication::processEvents(); - QTest::qWait(100); - QCOMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible); - QCOMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible); + QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible); + QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible); } } @@ -1433,10 +1431,9 @@ void tst_QListView::wordWrap() lv.setFixedSize(150, 150); lv.show(); QApplication::processEvents(); - QTest::qWait(100); - QCOMPARE(lv.horizontalScrollBar()->isVisible(), false); - QCOMPARE(lv.verticalScrollBar()->isVisible(), true); + QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), false); + QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true); } #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) @@ -1557,7 +1554,8 @@ void tst_QListView::task248430_crashWith0SizedItem() QStringListModel model(QStringList() << QLatin1String("item1") << QString()); view.setModel(&model); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTest::qWait(20); } void tst_QListView::task250446_scrollChanged() @@ -1569,21 +1567,21 @@ void tst_QListView::task250446_scrollChanged() QVERIFY(index.isValid()); view.setCurrentIndex(index); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); const int scrollValue = view.verticalScrollBar()->maximum(); view.verticalScrollBar()->setValue(scrollValue); QCOMPARE(view.verticalScrollBar()->value(), scrollValue); QCOMPARE(view.currentIndex(), index); view.showMinimized(); - QTest::qWait(100); - QCOMPARE(view.verticalScrollBar()->value(), scrollValue); - QCOMPARE(view.currentIndex(), index); + QTest::qWait(50); + QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue); + QTRY_COMPARE(view.currentIndex(), index); view.showNormal(); - QTest::qWait(100); - QCOMPARE(view.verticalScrollBar()->value(), scrollValue); - QCOMPARE(view.currentIndex(), index); + QTest::qWait(50); + QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue); + QTRY_COMPARE(view.currentIndex(), index); } void tst_QListView::task196118_visualRegionForSelection() @@ -1699,7 +1697,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes() view.setViewMode(QListView::IconMode); view.setModel(&model); view.show(); - QTest::qWait(30); + QTest::qWaitForWindowShown(&view); // Verfify that item sizes are non-uniform QVERIFY(view.sizeHintForIndex(model.index(0, 0)).height() > view.sizeHintForIndex(model.index(1, 0)).height()); @@ -1729,7 +1727,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes() view.setViewMode(QListView::IconMode); view.setModel(&model); view.show(); - QTest::qWait(30); + QTest::qWaitForWindowShown(&view); // Verfify that item sizes are non-uniform QVERIFY(view.sizeHintForIndex(model.index(0, 0)).width() > view.sizeHintForIndex(model.index(1, 0)).width()); @@ -1789,7 +1787,6 @@ void tst_QListView::task262152_setModelColumnNavigate() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTest::qWait(30); QTRY_COMPARE(static_cast(&view), QApplication::activeWindow()); QTest::keyClick(&view, Qt::Key_Down); QTest::qWait(30); -- cgit v0.12 From 057532393ad96cd90a616cb7eccf762ddd0ff4dd Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 13:30:24 +0100 Subject: QNAM HTTP: Improve readHeader() of the HTTP reply Just read() instead us using peek() and bytesAvailable() Also don't use the obfuscated line ending checking code. Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkreply.cpp | 36 ++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index b411467..c56a3a3 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -505,17 +505,31 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket) qint64 bytes = 0; char c = 0; bool allHeaders = false; - while (!allHeaders && socket->bytesAvailable()) { - if (socket->peek(&c, 1) == 1 && c == '\n') { - // check for possible header endings. As per HTTP rfc, - // the header endings will be marked by CRLFCRLF. But - // we will allow CRLFLF, LFLF & CRLFCRLF - if (fragment.endsWith("\n\r") || fragment.endsWith('\n')) - allHeaders = true; + qint64 haveRead = 0; + do { + haveRead = socket->read(&c, 1); + if (haveRead == 0) { + // read more later + break; + } else if (haveRead == -1) { + // connection broke down + return -1; + } else { + fragment.append(c); + bytes++; + + if (c == '\n') { + // check for possible header endings. As per HTTP rfc, + // the header endings will be marked by CRLFCRLF. But + // we will allow CRLFCRLF, CRLFLF, LFLF + if (fragment.endsWith("\r\n\r\n") + || fragment.endsWith("\r\n\n") + || fragment.endsWith("\n\n")) + allHeaders = true; + } } - bytes += socket->read(&c, 1); - fragment.append(c); - } + } while (!allHeaders && haveRead > 0); + // we received all headers now parse them if (allHeaders) { parseHeader(fragment); @@ -565,7 +579,7 @@ void QHttpNetworkReplyPrivate::parseHeader(const QByteArray &header) } while (i < header.count() && (header.at(i) == ' ' || header.at(i) == '\t')); if (i == -1) break; // something is wrong - + qDebug() << "added header" << field << value; fields.append(qMakePair(field, value)); } } -- cgit v0.12 From 7177a8d02bdec25b1c64dd65c7c7f5803809a244 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 9 Feb 2010 13:54:33 +0100 Subject: QNetworkCookie(Jar): fix includes we need to include the module preefix in public headers Reviewed-by: Denis Dzyubenko --- src/network/access/qnetworkcookie.h | 2 +- src/network/access/qnetworkcookiejar.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index f34396f..3cc4cee 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -114,7 +114,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QNetworkCookie &); QT_END_NAMESPACE // ### Qt5 remove this include -#include "qnetworkcookiejar.h" +#include Q_DECLARE_METATYPE(QNetworkCookie) Q_DECLARE_METATYPE(QList) diff --git a/src/network/access/qnetworkcookiejar.h b/src/network/access/qnetworkcookiejar.h index 813bf3e..8086f38 100644 --- a/src/network/access/qnetworkcookiejar.h +++ b/src/network/access/qnetworkcookiejar.h @@ -46,7 +46,7 @@ #include // ### Qt5 remove this include -#include "qnetworkcookie.h" +#include QT_BEGIN_HEADER -- cgit v0.12 From 9d8af1a5a11571d3f514e4ad73a0712ea5d89b0e Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 9 Feb 2010 11:40:39 +0100 Subject: Skip test that crashes on win32-g++ --- tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 147896e..9514cd6 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -245,6 +245,10 @@ tst_Suite::tst_Suite() addTestExclusion("string-case", "V8-specific behavior? (Doesn't pass on SpiderMonkey either)"); +#ifdef Q_CC_MINGW + addTestExclusion("date$", "QTBUG-7698: Date.prototype.setMonth() crashes on win32-g++"); +#endif + #ifdef Q_OS_WINCE addTestExclusion("deep-recursion", "Demands too much memory on WinCE"); addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on WinCE"); -- cgit v0.12 From 416155f9078d9d055f72b383f7cce113cdc42645 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 9 Feb 2010 12:29:03 +0100 Subject: Add platform-specific expected failures for JS test suite --- .../qscriptjstestsuite/tst_qscriptjstestsuite.cpp | 53 ++++++++++++++++++++++ .../qscriptv8testsuite/tst_qscriptv8testsuite.cpp | 10 ++++ 2 files changed, 63 insertions(+) diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index b2a85d7..ffcb56e 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -686,6 +686,59 @@ tst_Suite::tst_Suite() addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage); addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage); +#ifdef Q_OS_WIN + addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056"); + addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.7.3 >>>", "QTBUG-8056"); + addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 >>>=", "QTBUG-8056"); +#endif + +#ifdef Q_OS_SOLARIS + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= -Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = 1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.POSITIVE_INFINITY / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.NEGATIVE_INFINITY / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "1 / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "-1 / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-0.0000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.11.js", "Infinity/Math.max(-0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(-0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-Infinity, -1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -0.5)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1000)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 3)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-0, -2)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.49)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.5)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.17.js", "Infinity/Math.sqrt(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.18.js", "Infinity/Math.tan(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(1.00000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(1.000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Infinity/Math.asin(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.4.js", "Infinity/Math.atan(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(0, -0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Infinity/Math.atan2(-0, 1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil('-0')", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-Number.MIN_VALUE)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0.9)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.9.js", "Infinity/Math.floor(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "var z = 0; print(1/-z)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "1/-1e-2000", willFixInNextReleaseMessage); +#endif + static const char klass[] = "tst_QScriptJsTestSuite"; QVector *data = qt_meta_data_tst_Suite(); diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 9514cd6..a3dfd6c 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -236,6 +236,16 @@ tst_Suite::tst_Suite() addExpectedFailure("global-const-var-conflicts", "false", "true", willFixInNextReleaseMessage); addExpectedFailure("string-lastindexof", "0", "-1", "test is wrong?"); +#ifndef Q_OS_LINUX + addExpectedFailure("to-precision", "1.235e+27", "1.234e+27", "QTBUG-8053: toPrecision(4) gives wrong result on Mac"); +#endif + +#ifdef Q_OS_SOLARIS + addExpectedFailure("math-min-max", "Infinity", "-Infinity", willFixInNextReleaseMessage); + addExpectedFailure("negate-zero", "false", "true", willFixInNextReleaseMessage); + addExpectedFailure("str-to-num", "Infinity", "-Infinity", willFixInNextReleaseMessage); +#endif + addTestExclusion("debug-*", "not applicable"); addTestExclusion("mirror-*", "not applicable"); -- cgit v0.12 From 79a7572bf2aa42ca246cb7efd53e3dac2cd426bc Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 14:09:24 +0100 Subject: QNAM HTTP: Reserve bytes for HTTP parsing Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkreply.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index c56a3a3..6615410 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -423,6 +423,11 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) { + if (fragment.isEmpty()) { + // reserve bytes for the status line. This is better than always append() which reallocs the byte array + fragment.reserve(32); + } + qint64 bytes = 0; char c; qint64 haveRead = 0; @@ -502,6 +507,13 @@ bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status) qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket) { + if (fragment.isEmpty()) { + // according to http://dev.opera.com/articles/view/mama-http-headers/ the average size of the header + // block is 381 bytes. + // reserve bytes. This is better than always append() which reallocs the byte array. + fragment.reserve(512); + } + qint64 bytes = 0; char c = 0; bool allHeaders = false; -- cgit v0.12 From 169dd653a730342d90b39a0744d2c82d318d8d07 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 9 Feb 2010 14:37:46 +0100 Subject: QNAM HTTP: Forgot to remove a qDebug() Reviewed-by: TrustMe --- src/network/access/qhttpnetworkreply.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 6615410..512c045 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -591,7 +591,7 @@ void QHttpNetworkReplyPrivate::parseHeader(const QByteArray &header) } while (i < header.count() && (header.at(i) == ' ' || header.at(i) == '\t')); if (i == -1) break; // something is wrong - qDebug() << "added header" << field << value; + fields.append(qMakePair(field, value)); } } -- cgit v0.12 From 0a9c7a44c6a9ca134c7a23a33a9285787a7a6d19 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 9 Feb 2010 16:05:50 +0100 Subject: Fix tst_QAbstractItemView::task250754_fontChange and tst_QAbstractItemView::QTBUG6407_extendedSelection for Symbian & 5800 We should consider the difference between Point and Pixel for font size. And also the margin and some other settings in style for views. Reviewed-by: TrustMe --- tests/auto/qabstractitemview/tst_qabstractitemview.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index 504ceac..ea86c16 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -1213,14 +1213,14 @@ void tst_QAbstractItemView::task250754_fontChange() tree.setModel(m); w.show(); - w.resize(150,150); + w.resize(150,240); QTest::qWait(30); QFont font = tree.font(); - font.setPointSize(5); + font.setPixelSize(10); tree.setFont(font); QTRY_VERIFY(!tree.verticalScrollBar()->isVisible()); - font.setPointSize(45); + font.setPixelSize(60); tree.setFont(font); //now with the huge items, the scrollbar must be visible QTRY_VERIFY(tree.verticalScrollBar()->isVisible()); @@ -1444,7 +1444,10 @@ void tst_QAbstractItemView::QTBUG6407_extendedSelection() for(int i = 0; i < 50; ++i) view.addItem(QString::number(i)); - view.resize(200,200); + QFont font = view.font(); + font.setPixelSize(10); + view.setFont(font); + view.resize(200,240); view.show(); QApplication::setActiveWindow(&view); -- cgit v0.12 From 43f76aaa733f66895fd672a9243e950d410ef918 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 9 Feb 2010 15:38:44 +0100 Subject: Add mingw-specific expected failures for JS test suite --- tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index ffcb56e..41df98c 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -683,8 +683,10 @@ tst_Suite::tst_Suite() addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 7", willFixInNextReleaseMessage); addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 26", willFixInNextReleaseMessage); +#ifndef Q_CC_MINGW addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage); addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage); +#endif #ifdef Q_OS_WIN addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056"); @@ -692,6 +694,15 @@ tst_Suite::tst_Suite() addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 >>>=", "QTBUG-8056"); #endif +#ifdef Q_CC_MINGW + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage); +#endif + #ifdef Q_OS_SOLARIS addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= -Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); -- cgit v0.12 From dadfdfaa320aa5951d8512428d59e762b0da79f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 9 Feb 2010 16:10:40 +0100 Subject: Fixed some global QIcon/QPixmap instances that leaked handles on X11. Never ever create global cache objects that deletes QPixmaps when destructed! Task-number: QTBUG-8046 Reviewed-by: Friedemann Kleint --- src/gui/image/qicon.cpp | 17 +++++++++----- src/qt3support/dialogs/q3filedialog.cpp | 40 ++++++++++++++++++++------------- src/qt3support/itemviews/q3iconview.cpp | 13 ++++++++--- src/qt3support/itemviews/q3listview.cpp | 3 --- 4 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index ac1d303..bf6eb8d 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -104,6 +104,15 @@ QT_BEGIN_NAMESPACE static QBasicAtomicInt serialNumCounter = Q_BASIC_ATOMIC_INITIALIZER(1); +static void qt_cleanup_icon_cache(); +typedef QCache IconCache; +Q_GLOBAL_STATIC_WITH_INITIALIZER(IconCache, qtIconCache, qAddPostRoutine(qt_cleanup_icon_cache)) + +static void qt_cleanup_icon_cache() +{ + qtIconCache()->clear(); +} + QIconPrivate::QIconPrivate() : engine(0), ref(1), serialNum(serialNumCounter.fetchAndAddRelaxed(1)), @@ -963,15 +972,13 @@ QString QIcon::themeName() */ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) { - static QCache iconCache; - QIcon icon; - if (iconCache.contains(name)) { - icon = *iconCache.object(name); + if (qtIconCache()->contains(name)) { + icon = *qtIconCache()->object(name); } else { QIcon *cachedIcon = new QIcon(new QIconLoaderEngine(name)); - iconCache.insert(name, cachedIcon); + qtIconCache()->insert(name, cachedIcon); icon = *cachedIcon; } diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index 9b8e4d3..35f7890 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -475,9 +475,17 @@ static int sortFilesBy = (int)QDir::Name; static bool sortAscending = true; static bool detailViewMode = false; -static Q3CleanupHandler qfd_cleanup_pixmap; static Q3CleanupHandler qfd_cleanup_string; +static void qt_cleanup_fd_pixmaps(); +typedef QList FDPixmaps; +Q_GLOBAL_STATIC_WITH_INITIALIZER(FDPixmaps, qfd_pixmaps, qAddPostRoutine(qt_cleanup_fd_pixmaps)) + +static void qt_cleanup_fd_pixmaps() +{ + qDeleteAll(*qfd_pixmaps()); +} + static QString toRootIfNotExists( const QString &path ) { if ( !path.isEmpty() ) @@ -533,37 +541,37 @@ static void makeVariables() { qfd_cleanup_string.add(&workingDirectory); openFolderIcon = new QPixmap((const char **)open_xpm); - qfd_cleanup_pixmap.add(&openFolderIcon); + qfd_pixmaps()->append(openFolderIcon); symLinkDirIcon = new QPixmap((const char **)link_dir_xpm); - qfd_cleanup_pixmap.add(&symLinkDirIcon); + qfd_pixmaps()->append(symLinkDirIcon); symLinkFileIcon = new QPixmap((const char **)link_file_xpm); - qfd_cleanup_pixmap.add(&symLinkFileIcon); + qfd_pixmaps()->append(symLinkFileIcon); fileIcon = new QPixmap((const char **)file_xpm); - qfd_cleanup_pixmap.add(&fileIcon); + qfd_pixmaps()->append(fileIcon); closedFolderIcon = new QPixmap((const char **)closed_xpm); - qfd_cleanup_pixmap.add(&closedFolderIcon); + qfd_pixmaps()->append(closedFolderIcon); detailViewIcon = new QPixmap((const char **)detailedview_xpm); - qfd_cleanup_pixmap.add(&detailViewIcon); + qfd_pixmaps()->append(detailViewIcon); multiColumnListViewIcon = new QPixmap((const char **)mclistview_xpm); - qfd_cleanup_pixmap.add(&multiColumnListViewIcon); + qfd_pixmaps()->append(multiColumnListViewIcon); cdToParentIcon = new QPixmap((const char **)cdtoparent_xpm); - qfd_cleanup_pixmap.add(&cdToParentIcon); + qfd_pixmaps()->append(cdToParentIcon); newFolderIcon = new QPixmap((const char **)newfolder_xpm); - qfd_cleanup_pixmap.add(&newFolderIcon); + qfd_pixmaps()->append(newFolderIcon); previewInfoViewIcon = new QPixmap((const char **)previewinfoview_xpm); - qfd_cleanup_pixmap.add(&previewInfoViewIcon); + qfd_pixmaps()->append(previewInfoViewIcon); previewContentsViewIcon = new QPixmap((const char **)previewcontentsview_xpm); - qfd_cleanup_pixmap.add(&previewContentsViewIcon); + qfd_pixmaps()->append(previewContentsViewIcon); startCopyIcon = new QPixmap((const char **)start_xpm); - qfd_cleanup_pixmap.add(&startCopyIcon); + qfd_pixmaps()->append(startCopyIcon); endCopyIcon = new QPixmap((const char **)end_xpm); - qfd_cleanup_pixmap.add(&endCopyIcon); + qfd_pixmaps()->append(endCopyIcon); goBackIcon = new QPixmap((const char **)back_xpm); - qfd_cleanup_pixmap.add(&goBackIcon); + qfd_pixmaps()->append(goBackIcon); fifteenTransparentPixels = new QPixmap(closedFolderIcon->width(), 1); - qfd_cleanup_pixmap.add(&fifteenTransparentPixels); + qfd_pixmaps()->append(fifteenTransparentPixels); QBitmap m(fifteenTransparentPixels->width(), 1); m.fill(Qt::color0); fifteenTransparentPixels->setMask(m); diff --git a/src/qt3support/itemviews/q3iconview.cpp b/src/qt3support/itemviews/q3iconview.cpp index 67c956e..683e3d6 100644 --- a/src/qt3support/itemviews/q3iconview.cpp +++ b/src/qt3support/itemviews/q3iconview.cpp @@ -132,14 +132,21 @@ static QPixmap *qiv_selection = 0; #endif static bool optimize_layout = false; -static Q3CleanupHandler qiv_cleanup_pixmap; +static void qt_cleanup_iv_pixmaps(); +typedef QList IVPixmaps; +Q_GLOBAL_STATIC_WITH_INITIALIZER(IVPixmaps, qiv_pixmaps, qAddPostRoutine(qt_cleanup_iv_pixmaps)) + +static void qt_cleanup_iv_pixmaps() +{ + qDeleteAll(*qiv_pixmaps()); +} static QPixmap *get_qiv_buffer_pixmap(const QSize &s) { if (!qiv_buffer_pixmap) { qiv_buffer_pixmap = new QPixmap(s); - qiv_cleanup_pixmap.add(&qiv_buffer_pixmap); + qiv_pixmaps()->append(qiv_buffer_pixmap); return qiv_buffer_pixmap; } @@ -2580,7 +2587,7 @@ Q3IconView::Q3IconView(QWidget *parent, const char *name, Qt::WindowFlags f) { if (!unknown_icon) { unknown_icon = new QPixmap((const char **)unknown_xpm); - qiv_cleanup_pixmap.add(&unknown_icon); + qiv_pixmaps()->append(unknown_icon); } d = new Q3IconViewPrivate; diff --git a/src/qt3support/itemviews/q3listview.cpp b/src/qt3support/itemviews/q3listview.cpp index 2c15ad0..12dad84 100644 --- a/src/qt3support/itemviews/q3listview.cpp +++ b/src/qt3support/itemviews/q3listview.cpp @@ -70,9 +70,6 @@ QT_BEGIN_NAMESPACE const int Unsorted = 16383; -static Q3CleanupHandler qlv_cleanup_bitmap; - - struct Q3ListViewPrivate { // classes that are here to avoid polluting the global name space -- cgit v0.12 From 33aa8f4a035c1ce9231b40844e6e0793205d12aa Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 9 Feb 2010 11:37:18 +0000 Subject: Added qwidget test case which displays a native child widget As of commit bc82db, show()ing a native child widget causes a panic on Symbian. The panic code (WSERV-10) indicates that Activate() is being called on an already-active graphics context. This test case reproduces the defect. Task-number: QTBUG-7960 --- tests/auto/qwidget/tst_qwidget.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 03eddee..b59017b 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -250,6 +250,7 @@ private slots: #else void persistentWinId(); #endif + void showNativeChild(); void qobject_castInDestroyedSlot(); void showHideEvent_data(); @@ -4586,6 +4587,16 @@ void tst_QWidget::persistentWinId() } #endif // Q_OS_SYMBIAN +void tst_QWidget::showNativeChild() +{ + QWidget topLevel; + topLevel.setGeometry(0, 0, 100, 100); + QWidget child(&topLevel); + child.winId(); + topLevel.show(); + QTest::qWaitForWindowShown(&topLevel); +} + class ShowHideEventWidget : public QWidget { public: -- cgit v0.12 From 46df42af1a25fd06247bb96d9e0bf24bf19defe8 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 9 Feb 2010 09:41:29 +0000 Subject: Fixed defect in handling of expose events for Symbian Commit bc82db did not correctly handle native child widgets. Consider the case when we have a top-level widget A with a native child widget B. When QSymbianControl::Draw() is called on the control corresponding to B, the following occurs: 1. The inExpose flag is set in B's QWExtra structure. 2. The call to syncBackingStore() results in a call to QWidgetBackingStore::flush(), passing default parameters. 3. Because no target widget was passed to flush(), this function selects the top-level widget (A) as the target for the flush operation, passing A as the first argument of QS60WindowSurface::flush(). 4. QS60WindowSurface::flush() checks the inExpose flag from A's QWExtra structure, finds it to be false, and proceeds to call DrawNow() on A's control. Because QSymbianControl::Draw() uses the default graphics context, this context is shared between controls. This means that the DrawNow() call in step 4 causes a WSERV-10 panic (Activate() called on an already-active) graphics context. This patch moves the inExpose flag from B's QWExtra into A's QTLWExtra, with the result that the call to DrawNow() in step 4 is suppressed. Task-number: QTBUG-7960 Reviewed-by: axis --- src/gui/kernel/qapplication_s60.cpp | 11 +++++++---- src/gui/kernel/qwidget_p.h | 3 ++- src/gui/kernel/qwidget_s60.cpp | 2 +- src/gui/painting/qwindowsurface_s60.cpp | 11 +++++++---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4a137ee..bf3ad71 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -809,12 +809,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const void QSymbianControl::Draw(const TRect& controlRect) const { // Set flag to avoid calling DrawNow in window surface - QWExtra *extra = qwidget->d_func()->extraData(); - if (extra && !extra->inExpose) { - extra->inExpose = true; + QWidget *window = qwidget->window(); + Q_ASSERT(window); + QTLWExtra *topExtra = window->d_func()->maybeTopData(); + Q_ASSERT(topExtra); + if (!topExtra->inExpose) { + topExtra->inExpose = true; QRect exposeRect = qt_TRect2QRect(controlRect); qwidget->d_func()->syncBackingStore(exposeRect); - extra->inExpose = false; + topExtra->inExpose = false; } QWindowSurface *surface = qwidget->windowSurface(); diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index b1eb3c3..4b62074 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -173,6 +173,8 @@ struct QTLWExtra { #ifndef QT_NO_QWS_MANAGER QWSManager *qwsManager; #endif +#elif defined(Q_OS_SYMBIAN) + uint inExpose : 1; // Prevents drawing recursion #endif }; @@ -229,7 +231,6 @@ struct QWExtra { #endif #elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian uint activated : 1; // RWindowBase::Activated has been called - uint inExpose : 1; // Prevents drawing recursion /** * Defines the behaviour of QSymbianControl::Draw. diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index a844430..ebd289c 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -878,6 +878,7 @@ void QWidgetPrivate::registerDropSite(bool /* on */) void QWidgetPrivate::createTLSysExtra() { extra->topextra->backingStore = 0; + extra->topextra->inExpose = 0; } void QWidgetPrivate::deleteTLSysExtra() @@ -891,7 +892,6 @@ void QWidgetPrivate::createSysExtra() extra->activated = 0; extra->nativePaintMode = QWExtra::Default; extra->receiveNativePaintEvents = 0; - extra->inExpose = 0; } void QWidgetPrivate::deleteSysExtra() diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index b41dc2c..6cbf3d9 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -145,12 +145,15 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget) void QS60WindowSurface::flush(QWidget *widget, const QRegion ®ion, const QPoint &) { - QWExtra *extra = widget->d_func()->extraData(); - if (extra && !extra->inExpose) { - extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again + QWidget *window = widget->window(); + Q_ASSERT(window); + QTLWExtra *topExtra = window->d_func()->maybeTopData(); + Q_ASSERT(topExtra); + if (!topExtra->inExpose) { + topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again TRect tr = qt_QRect2TRect(region.boundingRect()); widget->winId()->DrawNow(tr); - extra->inExpose = false; + topExtra->inExpose = false; } } -- cgit v0.12 From 500f28f04a08e37525e3d1deb5cfe6e908c66b15 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 9 Feb 2010 14:52:16 +0100 Subject: Refactor comp_func_solid_Clear() and comp_func_solid_Source() Put the common code together with a #define. Remove the check for the length from comp_func_Clear_impl and move it to qt_memfill() --- src/gui/painting/qdrawhelper.cpp | 36 +++++++++++++++------------------- src/gui/painting/qdrawhelper_mmx_p.h | 38 +++++++++++++++--------------------- src/gui/painting/qdrawhelper_p.h | 3 +++ 3 files changed, 35 insertions(+), 42 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 660a2a8..7a3da20 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1267,32 +1267,28 @@ static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); result = 0 d = d * cia */ +#define comp_func_Clear_impl(dest, length, const_alpha)\ +{\ + if (const_alpha == 255) {\ + QT_MEMFILL_UINT(dest, length, 0);\ + } else {\ + int ialpha = 255 - const_alpha;\ + PRELOAD_INIT(dest)\ + for (int i = 0; i < length; ++i) {\ + PRELOAD_COND(dest)\ + dest[i] = BYTE_MUL(dest[i], ialpha);\ + }\ + }\ +} + static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) { - if (const_alpha == 255) { - QT_MEMFILL_UINT(dest, length, 0); - } else { - int ialpha = 255 - const_alpha; - PRELOAD_INIT(dest) - for (int i = 0; i < length; ++i) { - PRELOAD_COND(dest) - dest[i] = BYTE_MUL(dest[i], ialpha); - } - } + comp_func_Clear_impl(dest, length, const_alpha); } static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha) { - if (const_alpha == 255) { - QT_MEMFILL_UINT(dest, length, 0); - } else { - int ialpha = 255 - const_alpha; - PRELOAD_INIT(dest) - for (int i = 0; i < length; ++i) { - PRELOAD_COND(dest) - dest[i] = BYTE_MUL(dest[i], ialpha); - } - } + comp_func_Clear_impl(dest, length, const_alpha); } /* diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h index 8482262..f8bc480 100644 --- a/src/gui/painting/qdrawhelper_mmx_p.h +++ b/src/gui/painting/qdrawhelper_mmx_p.h @@ -146,36 +146,30 @@ struct QMMXCommonIntrinsics result = 0 d = d * cia */ +#define comp_func_Clear_impl(dest, length, const_alpha)\ +{\ + if (const_alpha == 255) {\ + qt_memfill(static_cast(dest), quint32(0), length);\ + } else {\ + C_FF; C_80; C_00;\ + m64 ia = MM::negate(MM::load_alpha(const_alpha));\ + for (int i = 0; i < length; ++i) {\ + dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));\ + }\ + MM::end();\ + }\ +} + template static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) { - if (!length) - return; - - if (const_alpha == 255) { - qt_memfill(static_cast(dest), quint32(0), length); - } else { - C_FF; C_80; C_00; - m64 ia = MM::negate(MM::load_alpha(const_alpha)); - for (int i = 0; i < length; ++i) { - dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia)); - } - } - MM::end(); + comp_func_Clear_impl(dest, length, const_alpha); } template static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha) { - if (const_alpha == 255) { - qt_memfill(static_cast(dest), quint32(0), length); - } else { - C_FF; C_80; C_00; - m64 ia = MM::negate(MM::load_alpha(const_alpha)); - for (int i = 0; i < length; ++i) - dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia)); - } - MM::end(); + comp_func_Clear_impl(dest, length, const_alpha); } /* diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 6c47aac..cb0db4f 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1549,6 +1549,9 @@ template<> inline void qt_memfill(quint8 *dest, quint8 color, int count) template inline void qt_memfill(T *dest, T value, int count) { + if (!count) + return; + int n = (count + 7) / 8; switch (count & 0x07) { -- cgit v0.12 From d9354e6e6863bc1f82b9581726c43f3bd76bc44b Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 9 Feb 2010 16:58:56 +0100 Subject: Skip the transparent pixels when doing the sourceOver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blending fully transparent pixels take a non-negligible time when webkit use transparent layer. We can avoid that be skipping those pixels since they have no impact on the final result. Reviewed-by: Samuel Rødal --- src/gui/painting/qdrawhelper_mmx_p.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h index f8bc480..59b3804 100644 --- a/src/gui/painting/qdrawhelper_mmx_p.h +++ b/src/gui/painting/qdrawhelper_mmx_p.h @@ -240,7 +240,10 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le C_FF; C_80; C_00; if (const_alpha == 255) { for (int i = 0; i < length; ++i) { - if ((0xff000000 & src[i]) == 0xff000000) { + const uint alphaMaskedSource = 0xff000000 & src[i]; + if (alphaMaskedSource == 0) + continue; + if (alphaMaskedSource == 0xff000000) { dest[i] = src[i]; } else { m64 s = MM::load(src[i]); @@ -251,6 +254,8 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le } else { m64 ca = MM::load_alpha(const_alpha); for (int i = 0; i < length; ++i) { + if ((0xff000000 & src[i]) == 0) + continue; m64 s = MM::byte_mul(MM::load(src[i]), ca); m64 ia = MM::negate(MM::alpha(s)); dest[i] = MM::store(MM::add(s, MM::byte_mul(MM::load(dest[i]), ia))); -- cgit v0.12 From cf6a427a94b615dcb7ab1e594b27a593dcc73c62 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 10 Feb 2010 04:38:49 +1000 Subject: Tidy the changes file. Reviewed-by: Trust Me --- dist/changes-4.6.2 | 274 +++++++++++++++++++---------------------------------- 1 file changed, 97 insertions(+), 177 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index aaaaacc..657aafc 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -16,22 +16,6 @@ Qt Bug Tracker: http://bugreports.qt.nokia.com Task Tracker: http://qt.nokia.com/developer/task-tracker Merge Request: http://qt.gitorious.org -**************************************************************************** -* General * -**************************************************************************** - -New features ------------- - - - SomeClass, SomeOtherClass - * New classes for foo, bar and baz - -Optimizations -------------- - - - Optimized foo in QSomeClass - * See list of Important Behavior Changes below - **************************************************************************** * Library * @@ -42,98 +26,88 @@ QtCore - QAtomicPointer * [QTBUG-7356] Fixed a compilation failure when using the Intel - compiler on IA-64 - + compiler on IA-64 - QFile * Fixed double-buffering issue when opening files in buffered mode. - * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the - same instance had been previously failed. This manisfested itself in - QTemporaryFile failing to auto-remove files and QFile::copy leaving + * [QTBUG-7285] QFile::remove would() fail if an unrelated operation on the + same instance had been previously failed. This manifested itself in + QTemporaryFile failing to auto-remove files and QFile::copy() leaving temporary files behind in certain situations. - - QFSFileEngine - * Fix typo that made realpath() not being used - + * Fix typo that made realpath() not be used. - QIODevice - * Optimized readAll() - + * Optimized readAll(). - QReadWriteLock - * [MR 426] Fixed documentation - + * [MR 426] Fixed documentation. - QXmlStreamWriter - * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a + .xml file. QtGui ----- + - QApplication + * [QTBUG-6098] Added a flag to avoid construction of application panes. + * [QTBUG-7029] Fixed a crash when re-creating QApplication object due + to a dangling gesture manager pointer. - QAbstractScrollArea - * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical scrollbar is hidden - + * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical + scrollbar is hidden - QBmpHandler - * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images. - + * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid + BMP images. - QGraphicsEffect * [QTBUG-6901] Fixed performance problem when translating items with graphics effects. - - QImage * [QTBUG-7231] Avoid an unnecessary copy in QImage::scaled(). - - - QPDFEngine - * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF engine. - - - QApplication - * [QTBUG-6098] Added a flag to avoid construction of application panes. - QInputContext - * [QTBUG-7439] Avoided the loss of preedit text when losing focus on Symbian. - - * [QT-2629] Implemented event filter functions for Symbian. - * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a - dangling gesture manager pointer. - * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. - * [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using a QPen - with a style other than SolidLine. - - - * [MR 2077] Integrated merge request 2077 + * [QTBUG-7439] Avoided the loss of preedit text when losing focus on + Symbian. + - QPDFEngine + * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF + engine. + - [QT-2629] Implemented event filter functions for Symbian. + - [QTBUG-7198] Setting a style sheet could break the checkbox position in + item views. + - [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using + a QPen with a style other than SolidLine. QtDBus ------ - QDBusConnection - * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui + * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui. QtNetwork --------- - QNetworkAccessManager * Optimizations - * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed - * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers - * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed. + * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all + layers. + * [QTBUG-7713] HTTP: Fix bug related to re-sending a request. * [QTBUG-7060] Fixed an issue with parsing of HTTP headers like - "private, max-age=300" - + "private, max-age=300". - QSslCertificate - * [QTBUG-6466] Fix issuerInfo() and subjectInfo() - + * [QTBUG-6466] Fix issuerInfo() and subjectInfo(). - QTcpSocket - * [QTBUG-7344] Fix performance degredation with write() on Windows - * [QTBUG-7316,QTBUG-7317] Also handle unknown errors from socket engine + * [QTBUG-7344] Fix performance degredation with write() on Windows. + * [QTBUG-7316,QTBUG-7317] Handle unknown errors from socket engine. QtOpenGL -------- - [QTBUG-7490] Better support for user-generated binary shaders. - - - QGLWidget - * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows. - - QGLPixelBuffer - * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers. - + * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to + QGLPixelBuffers. - QGL2PaintEngineEx * [QTBUG-7203] Reset the GL stencil mask, op and function in resetGLState(). + - QGLWidget + * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows. + QtOpenVG -------- @@ -141,137 +115,89 @@ QtOpenVG - [QTBUG-7791] Optimize single-rect IntersectClip in OpenVG using the scissor. - [QTBUG-7864] Use OpenVG scissor on 90/180/270 rotations and simple clips. -QtScript --------- - - - foo - * bar - -QtSql ------ - - - foo - * bar - -QtXml ------ - - - foo - * bar - QtMultimedia ------------ - QAudioInput - * [QTBUG-7044]: QAudioInput stopped working correctly after suspend()/resume() on linux. - -Qt Plugins ----------- - - - foo - * bar + * [QTBUG-7044]: QAudioInput stopped working correctly after + suspend()/resume() on linux. Examples -------- - QtMultimedia - * [MR 418] Fixed the example for QAudioOutput - + * [MR 418] Fixed the example for QAudioOutput. - WebKit - * [MR 2235] Added the framecapture example to the default build - -Third party components ----------------------- - - - Updated foo to version 2.3.9. - - - Updated bar to the latest version from baz.org. + * [MR 2235] Added the framecapture example to the default build. **************************************************************************** * Platform Specific Changes * **************************************************************************** -Qt for Unix (X11 and Mac OS X) ------------------------------- - - - - Qt for Linux/X11 ---------------- - * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap - in Qt/X11. - - * Fixed a crash when an input method tries to create a widget after the - application is destroyed. - - - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle - - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with - some GTK+ themes. - - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes. - -Qt for Windows --------------- + - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap + in Qt/X11. + - Fixed a crash when an input method tries to create a widget after the + application is destroyed. + - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle. + - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with + some GTK+ themes. + - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes. Qt for Mac OS X --------------- - [QTBUG-7832]: Restored missing margins around non-unified toolbars. - - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. - - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. - - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. - - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. - - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes. - - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar. - - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa. - - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left mode. - - -Qt for Embedded Linux ---------------------- - - - + - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget + on Cocoa. + - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for + Mac/Carbon. + - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 + lead to crash. + - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results + in top menu hiding. + - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode + changes. + - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with + native toolbar. + - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar + on Cocoa. + - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left + mode. DirectFB -------- - * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap - in DirectFB. - * Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes - QPixmap::scroll - * Fix a rendering issue for semi-transparent top level windows in DirectFB. - * Make it possible to fall back to the raster engine for stretch blits in - DirectFB using QT_NO_DIRECTFB_STRETCHBLIT - - - -Qt for Windows CE ------------------ - - + - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap + in DirectFB. + - Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes + QPixmap::scroll. + - Fix a rendering issue for semi-transparent top level windows in DirectFB. + - Make it possible to fall back to the raster engine for stretch blits in + DirectFB using QT_NO_DIRECTFB_STRETCHBLIT. Qt for Symbian -------------- - * [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/ - disable of DEF file usage (for use _during development only_ to decouple - the need to update the DEF files at the precise point that symbols are - removed, therefore allowing builds by CI systems to succeed even if symbols - have been removed. This does not remove the need to update the DEF files - before release. NOTE: Builds generated using this flag are not binary - compatible with previous versions of Qt.) - -- QProcess - * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished. - -- qmake - * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated - pkg files. - * [QTBUG-7908] Smart installer package generation support - -- Patch_capabilities script + - [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/ + disable of DEF file usage (for use _during development only_ to decouple + the need to update the DEF files at the precise point that symbols are + removed, therefore allowing builds by CI systems to succeed even if symbols + have been removed. This does not remove the need to update the DEF files + before release. NOTE: Builds generated using this flag are not binary + compatible with previous versions of Qt.) + - QProcess + * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished. + - qmake + * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated + pkg files. + * [QTBUG-7908] Smart installer package generation support. + - Patch_capabilities script * Added support for embedded sis name/uid patching. - -- Qt deployment - * [QTBUG-7518] Backup and restore support for Qt libs + - Qt deployment + * [QTBUG-7518] Backup and restore support for Qt libs. **************************************************************************** @@ -279,28 +205,22 @@ Qt for Symbian **************************************************************************** - Designer - * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties + * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties. * [QTBUG-6757] Fixed bug where selection handles would be affected by a style sheet set on the main form. - uic3 * [QTBUG-7404] Added option to preserve layout names set by Qt 3 Designer. - - qdoc3 - * bar - - - Linguist - * baz - **************************************************************************** * Important Behavior Changes * **************************************************************************** - QNetworkAccessManager cache - * QNetworkAccessManager will no longer return expired pages, as - stated in the documentation - * The behaviour of PreferCache and PreferNetwork modes now match - the documentation more closely + * QNetworkAccessManager will no longer return expired pages, as + stated in the documentation + * The behaviour of PreferCache and PreferNetwork modes now match + the documentation more closely - QUrl * QUrl will now accept hostnames ending in dot and will not treat -- cgit v0.12 From 3208a33a18d7eb666f0f47eff02ce4b21e248c10 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 9 Feb 2010 11:45:01 +0100 Subject: Catch up TRK library to creator f2b3e9f2dfbc580389b9b683a3e46e5a8422f55b This is the last SHA before trk directory is renamed. Note the \\.\ is prepended to windows com ports inside the library now, so main.cpp no longer has this windows specific code. commit f2b3e9f2dfbc580389b9b683a3e46e5a8422f55b Author: Friedemann Kleint Date: Fri Feb 5 12:24:46 2010 +0100 S60/Trk: Change trkutils to be a library of its own. To be able to share TrkDevices between Debugger and Qt4ProjectManager. commit 61c3a260b59433abf8c3ef481ec536af88f8026c Author: Sarika Kamisetty Date: Thu Feb 4 09:57:54 2010 +0100 Fix to App TRK connection with 'high COM port' does not work Merge-request: 111 Reviewed-by: hjk commit 2fd8b2d7ffa2ac032bfe3a17efe7d152c4cef14d Author: Friedemann Kleint Date: Mon Feb 1 12:43:56 2010 +0100 Fix some code scanning issues. QString: Use QChar where appropriate. commit 805b0a9cc165ef6cd596bd8f5e59f650cd0eebb2 Author: hjk Date: Mon Feb 1 11:45:44 2010 +0100 debugger: trk log output cosmetic commit 75b42f18d886b59dbf3380dd12f39f40005ef08b Merge: 4320314 a6ca348 Author: Oswald Buddenhagen Date: Fri Jan 29 22:49:55 2010 +0100 Merge remote branch 'origin/1.3' Trailing whitespace removal re-applied manually. commit a6ca348636dd92ab1445cff2286b3293163f5cea Author: Oswald Buddenhagen Date: Fri Jan 29 21:33:57 2010 +0100 remove trailing whitespace doing it in 1.3 as well to avoid possible later conflicts commit 4ec51219ed5c2150e164473b9c5326b6c68d096a Author: Friedemann Kleint Date: Thu Jan 28 17:04:05 2010 +0100 Trk: Fix source code scanning tool issues. showing up in Qt. --- tools/runonphone/main.cpp | 4 - tools/runonphone/trk/bluetoothlistener.cpp | 2 +- tools/runonphone/trk/bluetoothlistener.h | 4 +- tools/runonphone/trk/bluetoothlistener_gui.cpp | 6 +- tools/runonphone/trk/bluetoothlistener_gui.h | 8 +- tools/runonphone/trk/callback.h | 2 +- tools/runonphone/trk/communicationstarter.h | 8 +- tools/runonphone/trk/launcher.cpp | 25 +++--- tools/runonphone/trk/launcher.h | 2 +- tools/runonphone/trk/symbianutils_global.h | 55 +++++++++++++ tools/runonphone/trk/trk.pri | 4 +- tools/runonphone/trk/trkdevice.cpp | 18 +++-- tools/runonphone/trk/trkdevice.h | 3 +- tools/runonphone/trk/trkutils.cpp | 105 ++++++++++++------------- tools/runonphone/trk/trkutils.h | 45 +++++------ tools/runonphone/trk/trkutils_p.h | 62 +++++++++++++++ 16 files changed, 233 insertions(+), 120 deletions(-) create mode 100644 tools/runonphone/trk/symbianutils_global.h create mode 100644 tools/runonphone/trk/trkutils_p.h diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index a77e713..1a5cdee 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -174,11 +174,7 @@ int main(int argc, char *argv[]) } if(loglevel > 0) outstream << "Connecting to target via " << serialPortName << endl; -#ifdef Q_OS_WIN - launcher->setTrkServerName(QString("\\\\.\\") + serialPortName); -#else launcher->setTrkServerName(serialPortName); -#endif launcher->setFileName(QString("c:\\sys\\bin\\") + exeFile); launcher->setCommandLineArgs(cmdLine); diff --git a/tools/runonphone/trk/bluetoothlistener.cpp b/tools/runonphone/trk/bluetoothlistener.cpp index 8d45fb5..df04288 100644 --- a/tools/runonphone/trk/bluetoothlistener.cpp +++ b/tools/runonphone/trk/bluetoothlistener.cpp @@ -184,7 +184,7 @@ bool BluetoothListener::start(const QString &device, QString *errorMessage) return true; } -void BluetoothListener::slotStdOutput() +void BluetoothListener::slotStdOutput() { emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput())); } diff --git a/tools/runonphone/trk/bluetoothlistener.h b/tools/runonphone/trk/bluetoothlistener.h index 027f286..36894e7 100644 --- a/tools/runonphone/trk/bluetoothlistener.h +++ b/tools/runonphone/trk/bluetoothlistener.h @@ -42,6 +42,8 @@ #ifndef BLUETOOTHLISTENER_H #define BLUETOOTHLISTENER_H +#include "symbianutils_global.h" + #include #include @@ -53,7 +55,7 @@ struct BluetoothListenerPrivate; * The rfcomm command is used. It process can be started in the background * while connection attempts (TrkDevice::open()) are made in the foreground. */ -class BluetoothListener : public QObject +class SYMBIANUTILS_EXPORT BluetoothListener : public QObject { Q_OBJECT Q_DISABLE_COPY(BluetoothListener) diff --git a/tools/runonphone/trk/bluetoothlistener_gui.cpp b/tools/runonphone/trk/bluetoothlistener_gui.cpp index 6ffdaef..5994eb5 100644 --- a/tools/runonphone/trk/bluetoothlistener_gui.cpp +++ b/tools/runonphone/trk/bluetoothlistener_gui.cpp @@ -50,7 +50,7 @@ namespace trk { -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartCommunication(BaseCommunicationStarter &starter, const QString &msgBoxTitle, const QString &msgBoxText, @@ -88,7 +88,7 @@ PromptStartCommunicationResult return PromptStartCommunicationConnected; } -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartSerial(BaseCommunicationStarter &starter, QWidget *msgBoxParent, QString *errorMessage) @@ -98,7 +98,7 @@ PromptStartCommunicationResult return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage); } -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartBluetooth(BaseCommunicationStarter &starter, QWidget *msgBoxParent, QString *errorMessage) diff --git a/tools/runonphone/trk/bluetoothlistener_gui.h b/tools/runonphone/trk/bluetoothlistener_gui.h index d673ffe..10e7145 100644 --- a/tools/runonphone/trk/bluetoothlistener_gui.h +++ b/tools/runonphone/trk/bluetoothlistener_gui.h @@ -42,6 +42,8 @@ #ifndef BLUETOOTHLISTENER_GUI_H #define BLUETOOTHLISTENER_GUI_H +#include "symbianutils_global.h" + #include QT_BEGIN_NAMESPACE @@ -62,7 +64,7 @@ enum PromptStartCommunicationResult { PromptStartCommunicationError }; -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartCommunication(BaseCommunicationStarter &starter, const QString &msgBoxTitle, const QString &msgBoxText, @@ -71,14 +73,14 @@ PromptStartCommunicationResult // Convenience to start a serial connection (messages prompting // to launch Trk). -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartSerial(BaseCommunicationStarter &starter, QWidget *msgBoxParent, QString *errorMessage); // Convenience to start blue tooth connection (messages // prompting to connect). -PromptStartCommunicationResult +SYMBIANUTILS_EXPORT PromptStartCommunicationResult promptStartBluetooth(BaseCommunicationStarter &starter, QWidget *msgBoxParent, QString *errorMessage); diff --git a/tools/runonphone/trk/callback.h b/tools/runonphone/trk/callback.h index edc2c74..3996d73 100644 --- a/tools/runonphone/trk/callback.h +++ b/tools/runonphone/trk/callback.h @@ -42,7 +42,7 @@ #ifndef DEBUGGER_CALLBACK_H #define DEBUGGER_CALLBACK_H -#include +#include "symbianutils_global.h" namespace trk { namespace Internal { diff --git a/tools/runonphone/trk/communicationstarter.h b/tools/runonphone/trk/communicationstarter.h index 34cf398..2d7dc50 100644 --- a/tools/runonphone/trk/communicationstarter.h +++ b/tools/runonphone/trk/communicationstarter.h @@ -42,6 +42,8 @@ #ifndef COMMUNICATIONSTARTER_H #define COMMUNICATIONSTARTER_H +#include "symbianutils_global.h" + #include #include @@ -60,7 +62,7 @@ struct BaseCommunicationStarterPrivate; * The base class can be used as is to prompt the user to launch App TRK for a * serial communication as this requires no further resource setup. */ -class BaseCommunicationStarter : public QObject { +class SYMBIANUTILS_EXPORT BaseCommunicationStarter : public QObject { Q_OBJECT Q_DISABLE_COPY(BaseCommunicationStarter) public: @@ -117,7 +119,7 @@ private: * implement as a factory function that creates and sets up the * listener (mode, message connection, etc). */ -class AbstractBluetoothStarter : public BaseCommunicationStarter { +class SYMBIANUTILS_EXPORT AbstractBluetoothStarter : public BaseCommunicationStarter { Q_OBJECT Q_DISABLE_COPY(AbstractBluetoothStarter) public: @@ -134,7 +136,7 @@ protected: /* ConsoleBluetoothStarter: Convenience class for console processes. Creates a * listener in "Listen" mode with the messages redirected to standard output. */ -class ConsoleBluetoothStarter : public AbstractBluetoothStarter { +class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStarter { Q_OBJECT Q_DISABLE_COPY(ConsoleBluetoothStarter) public: diff --git a/tools/runonphone/trk/launcher.cpp b/tools/runonphone/trk/launcher.cpp index 1796fc5..4f91545 100644 --- a/tools/runonphone/trk/launcher.cpp +++ b/tools/runonphone/trk/launcher.cpp @@ -41,6 +41,7 @@ #include "launcher.h" #include "trkutils.h" +#include "trkutils_p.h" #include "trkdevice.h" #include "bluetoothlistener.h" @@ -595,17 +596,19 @@ void Launcher::handleSupportMask(const TrkResult &result) return; const char *data = result.data.data() + 1; - QByteArray str; + QString str = QLatin1String("SUPPORTED: "); for (int i = 0; i < 32; ++i) { //str.append(" [" + formatByte(data[i]) + "]: "); - for (int j = 0; j < 8; ++j) - if (data[i] & (1 << j)) - str.append(QByteArray::number(i * 8 + j, 16) + " "); + for (int j = 0; j < 8; ++j) { + if (data[i] & (1 << j)) { + str.append(QString::number(i * 8 + j, 16)); + str.append(QLatin1Char(' ')); + } + } } - logMessage("SUPPORTED: " + str); + logMessage(str); } - void Launcher::cleanUp() { // @@ -614,9 +617,7 @@ void Launcher::cleanUp() // Sub Cmd: Delete Process //ProcessID: 0x0000071F (1823) // [41 24 00 00 00 00 07 1F] - QByteArray ba; - appendByte(&ba, 0x00); - appendByte(&ba, 0x00); + QByteArray ba(2, char(0)); appendInt(&ba, d->m_session.pid); d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(), ba, "Delete process"); @@ -669,7 +670,7 @@ void Launcher::copyFileToRemote() { emit copyingStarted(); QByteArray ba; - appendByte(&ba, 0x10); + ba.append(char(10)); appendString(&ba, d->m_copyState.destinationFileName.toLocal8Bit(), TargetByteOrder, false); d->m_device->sendTrkMessage(TrkOpenFile, TrkCallback(this, &Launcher::handleFileCreation), ba); } @@ -678,7 +679,7 @@ void Launcher::installRemotePackageSilently() { emit installingStarted(); QByteArray ba; - appendByte(&ba, 'C'); + ba.append('C'); appendString(&ba, d->m_installFileName.toLocal8Bit(), TargetByteOrder, false); d->m_device->sendTrkMessage(TrkInstallFile, TrkCallback(this, &Launcher::handleInstallPackageFinished), ba); } @@ -705,7 +706,7 @@ QByteArray Launcher::startProcessMessage(const QString &executable, // It's not started yet QByteArray ba; appendShort(&ba, 0, TargetByteOrder); // create new process - appendByte(&ba, 0); // options - currently unused + ba.append(char(0)); // options - currently unused if(arguments.isEmpty()) { appendString(&ba, executable.toLocal8Bit(), TargetByteOrder); return ba; diff --git a/tools/runonphone/trk/launcher.h b/tools/runonphone/trk/launcher.h index 8dc6ebe..2b23fd8 100644 --- a/tools/runonphone/trk/launcher.h +++ b/tools/runonphone/trk/launcher.h @@ -56,7 +56,7 @@ struct LauncherPrivate; typedef QSharedPointer TrkDevicePtr; -class Launcher : public QObject +class SYMBIANUTILS_EXPORT Launcher : public QObject { Q_OBJECT Q_DISABLE_COPY(Launcher) diff --git a/tools/runonphone/trk/symbianutils_global.h b/tools/runonphone/trk/symbianutils_global.h new file mode 100644 index 0000000..a6ffbe7 --- /dev/null +++ b/tools/runonphone/trk/symbianutils_global.h @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef SYMBIANUTILS_GLOBAL_H +#define SYMBIANUTILS_GLOBAL_H + +#include + +#if defined(SYMBIANUTILS_BUILD_LIB) +# define SYMBIANUTILS_EXPORT Q_DECL_EXPORT +#elif defined(SYMBIANUTILS_BUILD_STATIC_LIB) || defined(SYMBIANUTILS_INCLUDE_PRI) +# define SYMBIANUTILS_EXPORT +#else +# define SYMBIANUTILS_EXPORT Q_DECL_IMPORT +#endif + +#endif // SYMBIANUTILS_GLOBAL_H diff --git a/tools/runonphone/trk/trk.pri b/tools/runonphone/trk/trk.pri index 2ce17c0..a54df76 100644 --- a/tools/runonphone/trk/trk.pri +++ b/tools/runonphone/trk/trk.pri @@ -1,8 +1,10 @@ INCLUDEPATH *= $$PWD # Input -HEADERS += $$PWD/callback.h \ +HEADERS += $$PWD/symbianutils_global.h \ + $$PWD/callback.h \ $$PWD/trkutils.h \ + $$PWD/trkutils_p.h \ $$PWD/trkdevice.h \ $$PWD/launcher.h \ $$PWD/bluetoothlistener.h \ diff --git a/tools/runonphone/trk/trkdevice.cpp b/tools/runonphone/trk/trkdevice.cpp index fe3261b..d587135 100644 --- a/tools/runonphone/trk/trkdevice.cpp +++ b/tools/runonphone/trk/trkdevice.cpp @@ -41,6 +41,7 @@ #include "trkdevice.h" #include "trkutils.h" +#include "trkutils_p.h" #include #include @@ -516,7 +517,7 @@ static inline bool overlappedSyncWrite(HANDLE file, bool WriterThread::write(const QByteArray &data, QString *errorMessage) { if (verboseTrk) - qDebug() << "Write raw data: " << data.toHex(); + qDebug() << "Write raw data: " << stringFromArray(data).toLatin1(); QMutexLocker locker(&m_context->mutex); #ifdef Q_OS_WIN DWORD charsWritten; @@ -856,8 +857,8 @@ void UnixReaderThread::terminate() { // Trigger select() by writing to the pipe char c = 0; - int written = write(m_terminatePipeFileDescriptors[1], &c, 1); - // FIXME: Use result. + const int written = write(m_terminatePipeFileDescriptors[1], &c, 1); + Q_UNUSED(written) wait(); } @@ -919,7 +920,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame(); close(); #ifdef Q_OS_WIN - d->deviceContext->device = CreateFile(port.toStdWString().c_str(), + d->deviceContext->device = CreateFile(QString("\\\\.\\").append(port).toStdWString().c_str(), GENERIC_READ | GENERIC_WRITE, 0, NULL, @@ -1061,8 +1062,13 @@ void TrkDevice::sendTrkMessage(byte code, TrkCallback callback, const QByteArray &data, const QVariant &cookie) { if (!d->writerThread.isNull()) { - if (d->verbose > 1) - qDebug() << "Sending " << code << data.toHex(); + if (d->verbose > 1) { + QByteArray msg = "Sending: "; + msg += QByteArray::number(code, 16); + msg += ": "; + msg += stringFromArray(data).toLatin1(); + qDebug("%s", msg.data()); + } d->writerThread->queueTrkMessage(code, callback, data, cookie); } } diff --git a/tools/runonphone/trk/trkdevice.h b/tools/runonphone/trk/trkdevice.h index e04f791..21a3cc1 100644 --- a/tools/runonphone/trk/trkdevice.h +++ b/tools/runonphone/trk/trkdevice.h @@ -42,6 +42,7 @@ #ifndef TRKDEVICE_H #define TRKDEVICE_H +#include "symbianutils_global.h" #include "callback.h" #include @@ -74,7 +75,7 @@ enum { TRK_WRITE_QUEUE_NOOP_CODE = 0x7f }; typedef trk::Callback TrkCallback; -class TrkDevice : public QObject +class SYMBIANUTILS_EXPORT TrkDevice : public QObject { Q_OBJECT Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame) diff --git a/tools/runonphone/trk/trkutils.cpp b/tools/runonphone/trk/trkutils.cpp index 3a96053..5cce950 100644 --- a/tools/runonphone/trk/trkutils.cpp +++ b/tools/runonphone/trk/trkutils.cpp @@ -86,7 +86,7 @@ void Session::reset() trkAppVersion.reset(); } -QString formatCpu(int major, int minor) +static QString formatCpu(int major, int minor) { //: CPU description of an S60 device //: %1 major verison, %2 minor version @@ -144,13 +144,44 @@ QString Session::deviceDescription(unsigned verbose) const } +QByteArray decode7d(const QByteArray &ba) +{ + QByteArray res; + res.reserve(ba.size()); + for (int i = 0; i < ba.size(); ++i) { + byte c = byte(ba.at(i)); + if (c == 0x7d) { + ++i; + c = 0x20 ^ byte(ba.at(i)); + } + res.append(c); + } + return res; +} + +QByteArray encode7d(const QByteArray &ba) +{ + QByteArray res; + res.reserve(ba.size() + 2); + for (int i = 0; i < ba.size(); ++i) { + byte c = byte(ba.at(i)); + if (c == 0x7e || c == 0x7d) { + res.append(0x7d); + res.append(0x20 ^ c); + } else { + res.append(c); + } + } + return res; +} + // FIXME: Use the QByteArray based version below? -QString stringFromByte(byte c) +static inline QString stringFromByte(byte c) { - return QString("%1 ").arg(c, 2, 16, QChar('0')); + return QString::fromLatin1("%1").arg(c, 2, 16, QChar('0')); } -QString stringFromArray(const QByteArray &ba, int maxLen) +SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen) { QString str; QString ascii; @@ -170,7 +201,7 @@ QString stringFromArray(const QByteArray &ba, int maxLen) return str + " " + ascii; } -QByteArray hexNumber(uint n, int digits) +SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits) { QByteArray ba = QByteArray::number(n, 16); if (digits == 0 || ba.size() == digits) @@ -178,7 +209,7 @@ QByteArray hexNumber(uint n, int digits) return QByteArray(digits - ba.size(), '0') + ba; } -QByteArray hexxNumber(uint n, int digits) +SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits) { return "0x" + hexNumber(n, digits); } @@ -200,9 +231,13 @@ void TrkResult::clear() QString TrkResult::toString() const { - QString res = stringFromByte(code) + "[" + stringFromByte(token); - res.chop(1); - return res + "] " + stringFromArray(data); + QString res = stringFromByte(code); + res += QLatin1String(" ["); + res += stringFromByte(token); + res += QLatin1Char(']'); + res += QLatin1Char(' '); + res += stringFromArray(data); + return res; } QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame) @@ -303,12 +338,12 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt return true; } -ushort extractShort(const char *data) +SYMBIANUTILS_EXPORT ushort extractShort(const char *data) { return byte(data[0]) * 256 + byte(data[1]); } -uint extractInt(const char *data) +SYMBIANUTILS_EXPORT uint extractInt(const char *data) { uint res = byte(data[0]); res *= 256; res += byte(data[1]); @@ -317,7 +352,7 @@ uint extractInt(const char *data) return res; } -QString quoteUnprintableLatin1(const QByteArray &ba) +SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba) { QString res; char buf[10]; @@ -333,49 +368,7 @@ QString quoteUnprintableLatin1(const QByteArray &ba) return res; } -QByteArray decode7d(const QByteArray &ba) -{ - QByteArray res; - res.reserve(ba.size()); - for (int i = 0; i < ba.size(); ++i) { - byte c = byte(ba.at(i)); - if (c == 0x7d) { - ++i; - c = 0x20 ^ byte(ba.at(i)); - } - res.append(c); - } - //if (res != ba) - // logMessage("DECODED: " << stringFromArray(ba) - // << " -> " << stringFromArray(res)); - return res; -} - -QByteArray encode7d(const QByteArray &ba) -{ - QByteArray res; - res.reserve(ba.size() + 2); - for (int i = 0; i < ba.size(); ++i) { - byte c = byte(ba.at(i)); - if (c == 0x7e || c == 0x7d) { - res.append(0x7d); - res.append(0x20 ^ c); - } else { - res.append(c); - } - } - //if (res != ba) - // logMessage("ENCODED: " << stringFromArray(ba) - // << " -> " << stringFromArray(res)); - return res; -} - -void appendByte(QByteArray *ba, byte b) -{ - ba->append(b); -} - -void appendShort(QByteArray *ba, ushort s, Endianness endian) +SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness endian) { if (endian == BigEndian) { ba->append(s / 256); @@ -386,7 +379,7 @@ void appendShort(QByteArray *ba, ushort s, Endianness endian) } } -void appendInt(QByteArray *ba, uint i, Endianness endian) +SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness endian) { const uchar b3 = i % 256; i /= 256; const uchar b2 = i % 256; i /= 256; diff --git a/tools/runonphone/trk/trkutils.h b/tools/runonphone/trk/trkutils.h index 328dd2b..3a485c7 100644 --- a/tools/runonphone/trk/trkutils.h +++ b/tools/runonphone/trk/trkutils.h @@ -42,19 +42,20 @@ #ifndef DEBUGGER_TRK_UTILS #define DEBUGGER_TRK_UTILS +#include "symbianutils_global.h" #include #include #include #include -typedef unsigned char byte; - QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE namespace trk { +typedef unsigned char byte; + enum Command { TrkPing = 0x00, TrkConnect = 0x01, @@ -85,17 +86,14 @@ enum Command { TrkNotifyProcessorReset = 0xa7 }; -QByteArray decode7d(const QByteArray &ba); -QByteArray encode7d(const QByteArray &ba); - inline byte extractByte(const char *data) { return *data; } -ushort extractShort(const char *data); -uint extractInt(const char *data); +SYMBIANUTILS_EXPORT ushort extractShort(const char *data); +SYMBIANUTILS_EXPORT uint extractInt(const char *data); -QString quoteUnprintableLatin1(const QByteArray &ba); +SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); // produces "xx xx xx " -QString stringFromArray(const QByteArray &ba, int maxLen = - 1); +SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen = - 1); enum Endianness { @@ -104,13 +102,11 @@ enum Endianness TargetByteOrder = BigEndian, }; -void appendByte(QByteArray *ba, byte b); -void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder); -void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder); -void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true); -void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder); +SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder); +SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder); +SYMBIANUTILS_EXPORT void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true); -struct Library +struct SYMBIANUTILS_EXPORT Library { Library() {} @@ -119,7 +115,7 @@ struct Library uint dataseg; }; -struct TrkAppVersion +struct SYMBIANUTILS_EXPORT TrkAppVersion { TrkAppVersion(); void reset(); @@ -130,7 +126,7 @@ struct TrkAppVersion int protocolMinor; }; -struct Session +struct SYMBIANUTILS_EXPORT Session { Session(); void reset(); @@ -163,7 +159,7 @@ struct Session QStringList modules; }; -struct TrkResult +struct SYMBIANUTILS_EXPORT TrkResult { TrkResult(); void clear(); @@ -179,15 +175,10 @@ struct TrkResult bool isDebugOutput; }; -// returns a QByteArray containing optionally -// the serial frame [0x01 0x90 ] and 0x7e encoded7d(ba) 0x7e -QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame); -ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame); -bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0); -QByteArray errorMessage(byte code); -QByteArray hexNumber(uint n, int digits = 0); -QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too -uint swapEndian(uint in); +SYMBIANUTILS_EXPORT QByteArray errorMessage(byte code); +SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits = 0); +SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too +SYMBIANUTILS_EXPORT uint swapEndian(uint in); } // namespace trk diff --git a/tools/runonphone/trk/trkutils_p.h b/tools/runonphone/trk/trkutils_p.h new file mode 100644 index 0000000..12b0109 --- /dev/null +++ b/tools/runonphone/trk/trkutils_p.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DEBUGGER_TRK_PRIVATE_UTILS +#define DEBUGGER_TRK_PRIVATE_UTILS + +#include "trkutils.h" +#include "symbianutils_global.h" + +QT_BEGIN_NAMESPACE +class QDateTime; +QT_END_NAMESPACE + +namespace trk { + +void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder); +// returns a QByteArray containing optionally +// the serial frame [0x01 0x90 ] and 0x7e encoded7d(ba) 0x7e +QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame); +bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0); + +} // namespace trk + +#endif // DEBUGGER_TRK_PRIVATE_UTILS -- cgit v0.12 From 9965d0e0484882d905c1f8a3bdf19f6eecd30226 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 9 Feb 2010 11:50:08 +0100 Subject: rename trk -> symbianutils commit 9c2676167a3aaeb99024a22343c3d998f191a75f Author: Friedemann Kleint Date: Fri Feb 5 12:32:32 2010 +0100 src/shared: Rename trk to symbianutils --- tools/runonphone/runonphone.pro | 4 +- .../runonphone/symbianutils/bluetoothlistener.cpp | 224 ++++ tools/runonphone/symbianutils/bluetoothlistener.h | 103 ++ .../symbianutils/bluetoothlistener_gui.cpp | 111 ++ .../symbianutils/bluetoothlistener_gui.h | 89 ++ tools/runonphone/symbianutils/callback.h | 160 +++ .../symbianutils/communicationstarter.cpp | 260 +++++ .../runonphone/symbianutils/communicationstarter.h | 162 +++ tools/runonphone/symbianutils/launcher.cpp | 741 +++++++++++++ tools/runonphone/symbianutils/launcher.h | 179 ++++ tools/runonphone/symbianutils/symbianutils.pri | 25 + .../runonphone/symbianutils/symbianutils_global.h | 55 + tools/runonphone/symbianutils/trkdevice.cpp | 1105 ++++++++++++++++++++ tools/runonphone/symbianutils/trkdevice.h | 134 +++ tools/runonphone/symbianutils/trkutils.cpp | 479 +++++++++ tools/runonphone/symbianutils/trkutils.h | 185 ++++ tools/runonphone/symbianutils/trkutils_p.h | 62 ++ tools/runonphone/trk/bluetoothlistener.cpp | 224 ---- tools/runonphone/trk/bluetoothlistener.h | 103 -- tools/runonphone/trk/bluetoothlistener_gui.cpp | 111 -- tools/runonphone/trk/bluetoothlistener_gui.h | 89 -- tools/runonphone/trk/callback.h | 160 --- tools/runonphone/trk/communicationstarter.cpp | 260 ----- tools/runonphone/trk/communicationstarter.h | 162 --- tools/runonphone/trk/launcher.cpp | 741 ------------- tools/runonphone/trk/launcher.h | 179 ---- tools/runonphone/trk/symbianutils_global.h | 55 - tools/runonphone/trk/trk.pri | 25 - tools/runonphone/trk/trkdevice.cpp | 1105 -------------------- tools/runonphone/trk/trkdevice.h | 134 --- tools/runonphone/trk/trkutils.cpp | 479 --------- tools/runonphone/trk/trkutils.h | 185 ---- tools/runonphone/trk/trkutils_p.h | 62 -- 33 files changed, 4077 insertions(+), 4075 deletions(-) create mode 100644 tools/runonphone/symbianutils/bluetoothlistener.cpp create mode 100644 tools/runonphone/symbianutils/bluetoothlistener.h create mode 100644 tools/runonphone/symbianutils/bluetoothlistener_gui.cpp create mode 100644 tools/runonphone/symbianutils/bluetoothlistener_gui.h create mode 100644 tools/runonphone/symbianutils/callback.h create mode 100644 tools/runonphone/symbianutils/communicationstarter.cpp create mode 100644 tools/runonphone/symbianutils/communicationstarter.h create mode 100644 tools/runonphone/symbianutils/launcher.cpp create mode 100644 tools/runonphone/symbianutils/launcher.h create mode 100644 tools/runonphone/symbianutils/symbianutils.pri create mode 100644 tools/runonphone/symbianutils/symbianutils_global.h create mode 100644 tools/runonphone/symbianutils/trkdevice.cpp create mode 100644 tools/runonphone/symbianutils/trkdevice.h create mode 100644 tools/runonphone/symbianutils/trkutils.cpp create mode 100644 tools/runonphone/symbianutils/trkutils.h create mode 100644 tools/runonphone/symbianutils/trkutils_p.h delete mode 100644 tools/runonphone/trk/bluetoothlistener.cpp delete mode 100644 tools/runonphone/trk/bluetoothlistener.h delete mode 100644 tools/runonphone/trk/bluetoothlistener_gui.cpp delete mode 100644 tools/runonphone/trk/bluetoothlistener_gui.h delete mode 100644 tools/runonphone/trk/callback.h delete mode 100644 tools/runonphone/trk/communicationstarter.cpp delete mode 100644 tools/runonphone/trk/communicationstarter.h delete mode 100644 tools/runonphone/trk/launcher.cpp delete mode 100644 tools/runonphone/trk/launcher.h delete mode 100644 tools/runonphone/trk/symbianutils_global.h delete mode 100644 tools/runonphone/trk/trk.pri delete mode 100644 tools/runonphone/trk/trkdevice.cpp delete mode 100644 tools/runonphone/trk/trkdevice.h delete mode 100644 tools/runonphone/trk/trkutils.cpp delete mode 100644 tools/runonphone/trk/trkutils.h delete mode 100644 tools/runonphone/trk/trkutils_p.h diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro index 2c1be98..7bed3e5 100644 --- a/tools/runonphone/runonphone.pro +++ b/tools/runonphone/runonphone.pro @@ -4,7 +4,7 @@ QT -= gui CONFIG += console CONFIG -= app_bundle -include(trk/trk.pri) +include(symbianutils/symbianutils.pri) SOURCES += main.cpp \ trksignalhandler.cpp @@ -12,6 +12,8 @@ SOURCES += main.cpp \ HEADERS += trksignalhandler.h \ serenum.h +DEFINES += SYMBIANUTILS_INCLUDE_PRI + windows { SOURCES += serenum_win.cpp LIBS += -lsetupapi \ diff --git a/tools/runonphone/symbianutils/bluetoothlistener.cpp b/tools/runonphone/symbianutils/bluetoothlistener.cpp new file mode 100644 index 0000000..df04288 --- /dev/null +++ b/tools/runonphone/symbianutils/bluetoothlistener.cpp @@ -0,0 +1,224 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "bluetoothlistener.h" +#include "trkdevice.h" + +#include + +#ifdef Q_OS_UNIX +# include +# include +#else +# include +#endif + +// Process id helpers. +#ifdef Q_OS_WIN +inline DWORD processId(const QProcess &p) +{ + if (const Q_PID processInfoStruct = p.pid()) + return processInfoStruct->dwProcessId; + return 0; +} +#else +inline Q_PID processId(const QProcess &p) +{ + return p.pid(); +} +#endif + + +enum { debug = 0 }; + +namespace trk { + +struct BluetoothListenerPrivate { + BluetoothListenerPrivate(); + QString device; + QProcess process; +#ifdef Q_OS_WIN + DWORD pid; +#else + Q_PID pid; +#endif + bool printConsoleMessages; + BluetoothListener::Mode mode; +}; + +BluetoothListenerPrivate::BluetoothListenerPrivate() : + pid(0), + printConsoleMessages(false), + mode(BluetoothListener::Listen) +{ +} + +BluetoothListener::BluetoothListener(QObject *parent) : + QObject(parent), + d(new BluetoothListenerPrivate) +{ + d->process.setProcessChannelMode(QProcess::MergedChannels); + + connect(&d->process, SIGNAL(readyReadStandardError()), + this, SLOT(slotStdError())); + connect(&d->process, SIGNAL(readyReadStandardOutput()), + this, SLOT(slotStdOutput())); + connect(&d->process, SIGNAL(finished(int, QProcess::ExitStatus)), + this, SLOT(slotProcessFinished(int,QProcess::ExitStatus))); + connect(&d->process, SIGNAL(error(QProcess::ProcessError)), + this, SLOT(slotProcessError(QProcess::ProcessError))); +} + +BluetoothListener::~BluetoothListener() +{ + const int trc = terminateProcess(); + if (debug) + qDebug() << "~BluetoothListener: terminated" << trc; + delete d; +} + +BluetoothListener::Mode BluetoothListener::mode() const +{ + return d->mode; +} + +void BluetoothListener::setMode(Mode m) +{ + d->mode = m; +} + +bool BluetoothListener::printConsoleMessages() const +{ + return d->printConsoleMessages; +} + +void BluetoothListener::setPrintConsoleMessages(bool p) +{ + d->printConsoleMessages = p; +} + +int BluetoothListener::terminateProcess() +{ + enum { TimeOutMS = 200 }; + if (debug) + qDebug() << "terminateProcess" << d->process.pid() << d->process.state(); + if (d->process.state() == QProcess::NotRunning) + return -1; + emitMessage(tr("%1: Stopping listener %2...").arg(d->device).arg(processId(d->process))); + // When listening, the process should terminate by itself after closing the connection + if (mode() == Listen && d->process.waitForFinished(TimeOutMS)) + return 0; +#ifdef Q_OS_UNIX + kill(d->process.pid(), SIGHUP); // Listens for SIGHUP + if (d->process.waitForFinished(TimeOutMS)) + return 1; +#endif + d->process.terminate(); + if (d->process.waitForFinished(TimeOutMS)) + return 2; + d->process.kill(); + return 3; +} + +bool BluetoothListener::start(const QString &device, QString *errorMessage) +{ + if (d->process.state() != QProcess::NotRunning) { + *errorMessage = QLatin1String("Internal error: Still running."); + return false; + } + d->device = device; + const QString binary = QLatin1String("rfcomm"); + QStringList arguments; + arguments << QLatin1String("-r") + << (d->mode == Listen ? QLatin1String("listen") : QLatin1String("watch")) + << device << QString(QLatin1Char('1')); + if (debug) + qDebug() << binary << arguments; + emitMessage(tr("%1: Starting Bluetooth listener %2...").arg(device, binary)); + d->pid = 0; + d->process.start(binary, arguments); + if (!d->process.waitForStarted()) { + *errorMessage = tr("Unable to run '%1': %2").arg(binary, d->process.errorString()); + return false; + } + d->pid = processId(d->process); // Forgets it after crash/termination + emitMessage(tr("%1: Bluetooth listener running (%2).").arg(device).arg(processId(d->process))); + return true; +} + +void BluetoothListener::slotStdOutput() +{ + emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput())); +} + +void BluetoothListener::emitMessage(const QString &m) +{ + if (d->printConsoleMessages || debug) + qDebug("%s\n", qPrintable(m)); + emit message(m); +} + +void BluetoothListener::slotStdError() +{ + emitMessage(QString::fromLocal8Bit(d->process.readAllStandardError())); +} + +void BluetoothListener::slotProcessFinished(int ex, QProcess::ExitStatus state) +{ + switch (state) { + case QProcess::NormalExit: + emitMessage(tr("%1: Process %2 terminated with exit code %3.") + .arg(d->device).arg(d->pid).arg(ex)); + break; + case QProcess::CrashExit: + emitMessage(tr("%1: Process %2 crashed.").arg(d->device).arg(d->pid)); + break; + } + emit terminated(); +} + +void BluetoothListener::slotProcessError(QProcess::ProcessError error) +{ + emitMessage(tr("%1: Process error %2: %3") + .arg(d->device).arg(error).arg(d->process.errorString())); +} + +} // namespace trk diff --git a/tools/runonphone/symbianutils/bluetoothlistener.h b/tools/runonphone/symbianutils/bluetoothlistener.h new file mode 100644 index 0000000..36894e7 --- /dev/null +++ b/tools/runonphone/symbianutils/bluetoothlistener.h @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef BLUETOOTHLISTENER_H +#define BLUETOOTHLISTENER_H + +#include "symbianutils_global.h" + +#include +#include + +namespace trk { +struct BluetoothListenerPrivate; + +/* BluetoothListener: Starts a helper process watching connections on a + * Bluetooth device, Linux only: + * The rfcomm command is used. It process can be started in the background + * while connection attempts (TrkDevice::open()) are made in the foreground. */ + +class SYMBIANUTILS_EXPORT BluetoothListener : public QObject +{ + Q_OBJECT + Q_DISABLE_COPY(BluetoothListener) +public: + // The Mode property must be set before calling start(). + enum Mode { + Listen, /* Terminate after client closed (read: Trk app + * on the phone terminated or disconnected).*/ + Watch // Keep running, watch for next connection from client + }; + + explicit BluetoothListener(QObject *parent = 0); + virtual ~BluetoothListener(); + + Mode mode() const; + void setMode(Mode m); + + bool start(const QString &device, QString *errorMessage); + + // Print messages on the console. + bool printConsoleMessages() const; + void setPrintConsoleMessages(bool p); + +signals: + void terminated(); + void message(const QString &); + +public slots: + void emitMessage(const QString &m); // accessed by starter + +private slots: + void slotStdOutput(); + void slotStdError(); + void slotProcessFinished(int, QProcess::ExitStatus); + void slotProcessError(QProcess::ProcessError error); + +private: + int terminateProcess(); + + BluetoothListenerPrivate *d; +}; + +} // namespace trk + +#endif // BLUETOOTHLISTENER_H diff --git a/tools/runonphone/symbianutils/bluetoothlistener_gui.cpp b/tools/runonphone/symbianutils/bluetoothlistener_gui.cpp new file mode 100644 index 0000000..5994eb5 --- /dev/null +++ b/tools/runonphone/symbianutils/bluetoothlistener_gui.cpp @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "bluetoothlistener_gui.h" +#include "bluetoothlistener.h" +#include "communicationstarter.h" + +#include +#include +#include +#include + +namespace trk { + +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartCommunication(BaseCommunicationStarter &starter, + const QString &msgBoxTitle, + const QString &msgBoxText, + QWidget *msgBoxParent, + QString *errorMessage) +{ + errorMessage->clear(); + // Initial connection attempt. + switch (starter.start()) { + case BaseCommunicationStarter::Started: + break; + case BaseCommunicationStarter::ConnectionSucceeded: + return PromptStartCommunicationConnected; + case BaseCommunicationStarter::StartError: + *errorMessage = starter.errorString(); + return PromptStartCommunicationError; + } + // Run the starter with the event loop of a message box, have the box + // closed by the signals of the starter. + QMessageBox messageBox(QMessageBox::Information, msgBoxTitle, msgBoxText, QMessageBox::Cancel, msgBoxParent); + QObject::connect(&starter, SIGNAL(connected()), &messageBox, SLOT(close())); + QObject::connect(&starter, SIGNAL(timeout()), &messageBox, SLOT(close())); + messageBox.exec(); + // Only starter.state() is reliable here to obtain the state. + switch (starter.state()) { + case AbstractBluetoothStarter::Running: + *errorMessage = QCoreApplication::translate("trk::promptStartCommunication", "Connection on %1 canceled.").arg(starter.device()); + return PromptStartCommunicationCanceled; + case AbstractBluetoothStarter::TimedOut: + *errorMessage = starter.errorString(); + return PromptStartCommunicationError; + case AbstractBluetoothStarter::Connected: + break; + } + return PromptStartCommunicationConnected; +} + +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartSerial(BaseCommunicationStarter &starter, + QWidget *msgBoxParent, + QString *errorMessage) +{ + const QString title = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for App TRK"); + const QString message = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for App TRK to start on %1...").arg(starter.device()); + return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage); +} + +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartBluetooth(BaseCommunicationStarter &starter, + QWidget *msgBoxParent, + QString *errorMessage) +{ + const QString title = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for Bluetooth Connection"); + const QString message = QCoreApplication::translate("trk::promptStartCommunication", "Connecting to %1...").arg(starter.device()); + return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage); +} + +} // namespace trk diff --git a/tools/runonphone/symbianutils/bluetoothlistener_gui.h b/tools/runonphone/symbianutils/bluetoothlistener_gui.h new file mode 100644 index 0000000..10e7145 --- /dev/null +++ b/tools/runonphone/symbianutils/bluetoothlistener_gui.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef BLUETOOTHLISTENER_GUI_H +#define BLUETOOTHLISTENER_GUI_H + +#include "symbianutils_global.h" + +#include + +QT_BEGIN_NAMESPACE +class QWidget; +QT_END_NAMESPACE + +namespace trk { +class BaseCommunicationStarter; + +/* promptStartCommunication(): Convenience functions that + * prompt the user to start a communication (launching or + * connecting TRK) using a modal message box in which they can cancel. + * Pass in the starter with device and parameters set up. */ + +enum PromptStartCommunicationResult { + PromptStartCommunicationConnected, + PromptStartCommunicationCanceled, + PromptStartCommunicationError +}; + +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartCommunication(BaseCommunicationStarter &starter, + const QString &msgBoxTitle, + const QString &msgBoxText, + QWidget *msgBoxParent, + QString *errorMessage); + +// Convenience to start a serial connection (messages prompting +// to launch Trk). +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartSerial(BaseCommunicationStarter &starter, + QWidget *msgBoxParent, + QString *errorMessage); + +// Convenience to start blue tooth connection (messages +// prompting to connect). +SYMBIANUTILS_EXPORT PromptStartCommunicationResult + promptStartBluetooth(BaseCommunicationStarter &starter, + QWidget *msgBoxParent, + QString *errorMessage); +} // namespace trk + +#endif // BLUETOOTHLISTENER_GUI_H diff --git a/tools/runonphone/symbianutils/callback.h b/tools/runonphone/symbianutils/callback.h new file mode 100644 index 0000000..3996d73 --- /dev/null +++ b/tools/runonphone/symbianutils/callback.h @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DEBUGGER_CALLBACK_H +#define DEBUGGER_CALLBACK_H + +#include "symbianutils_global.h" + +namespace trk { +namespace Internal { + +/* Helper class for the 1-argument functor: + * Cloneable base class for the implementation which is + * invokeable with the argument. */ +template +class CallbackImplBase +{ + Q_DISABLE_COPY(CallbackImplBase) +public: + CallbackImplBase() {} + virtual CallbackImplBase *clone() const = 0; + virtual void invoke(Argument a) = 0; + virtual ~CallbackImplBase() {} +}; + +/* Helper class for the 1-argument functor: Implementation for + * a class instance with a member function pointer. */ +template +class CallbackMemberPtrImpl : public CallbackImplBase +{ +public: + typedef void (Class::*MemberFuncPtr)(Argument); + + CallbackMemberPtrImpl(Class *instance, + MemberFuncPtr memberFunc) : + m_instance(instance), + m_memberFunc(memberFunc) {} + + virtual CallbackImplBase *clone() const + { + return new CallbackMemberPtrImpl(m_instance, m_memberFunc); + } + + virtual void invoke(Argument a) + { (m_instance->*m_memberFunc)(a); } +private: + Class *m_instance; + MemberFuncPtr m_memberFunc; +}; + +} // namespace Internal + +/* Default-constructible, copyable 1-argument functor providing an + * operator()(Argument) that invokes a member function of a class: + * \code +class Foo { +public: + void print(const std::string &); +}; +... +Foo foo; +Callback f1(&foo, &Foo::print); +f1("test"); +\endcode */ + +template +class Callback +{ +public: + Callback() : m_impl(0) {} + + template + Callback(Class *instance, void (Class::*memberFunc)(Argument)) : + m_impl(new Internal::CallbackMemberPtrImpl(instance, memberFunc)) + {} + + ~Callback() + { + clean(); + } + + Callback(const Callback &rhs) : + m_impl(0) + { + if (rhs.m_impl) + m_impl = rhs.m_impl->clone(); + } + + Callback &operator=(const Callback &rhs) + { + if (this != &rhs) { + clean(); + if (rhs.m_impl) + m_impl = rhs.m_impl->clone(); + } + return *this; + } + + bool isNull() const { return m_impl == 0; } + operator bool() const { return !isNull(); } + + void operator()(Argument a) + { + if (m_impl) + m_impl->invoke(a); + } + +private: + void clean() + { + if (m_impl) { + delete m_impl; + m_impl = 0; + } + } + + Internal::CallbackImplBase *m_impl; +}; + +} // namespace trk + +#endif // DEBUGGER_CALLBACK_H diff --git a/tools/runonphone/symbianutils/communicationstarter.cpp b/tools/runonphone/symbianutils/communicationstarter.cpp new file mode 100644 index 0000000..e5e556e --- /dev/null +++ b/tools/runonphone/symbianutils/communicationstarter.cpp @@ -0,0 +1,260 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "communicationstarter.h" +#include "bluetoothlistener.h" +#include "trkdevice.h" + +#include +#include + +namespace trk { + +// --------------- AbstractBluetoothStarter +struct BaseCommunicationStarterPrivate { + explicit BaseCommunicationStarterPrivate(const BaseCommunicationStarter::TrkDevicePtr &d); + + const BaseCommunicationStarter::TrkDevicePtr trkDevice; + BluetoothListener *listener; + QTimer *timer; + int intervalMS; + int attempts; + int n; + QString device; + QString errorString; + BaseCommunicationStarter::State state; +}; + +BaseCommunicationStarterPrivate::BaseCommunicationStarterPrivate(const BaseCommunicationStarter::TrkDevicePtr &d) : + trkDevice(d), + listener(0), + timer(0), + intervalMS(1000), + attempts(-1), + n(0), + device(QLatin1String("/dev/rfcomm0")), + state(BaseCommunicationStarter::TimedOut) +{ +} + +BaseCommunicationStarter::BaseCommunicationStarter(const TrkDevicePtr &trkDevice, QObject *parent) : + QObject(parent), + d(new BaseCommunicationStarterPrivate(trkDevice)) +{ +} + +BaseCommunicationStarter::~BaseCommunicationStarter() +{ + stopTimer(); + delete d; +} + +void BaseCommunicationStarter::stopTimer() +{ + if (d->timer && d->timer->isActive()) + d->timer->stop(); +} + +bool BaseCommunicationStarter::initializeStartupResources(QString *errorMessage) +{ + errorMessage->clear(); + return true; +} + +BaseCommunicationStarter::StartResult BaseCommunicationStarter::start() +{ + if (state() == Running) { + d->errorString = QLatin1String("Internal error, attempt to re-start BaseCommunicationStarter.\n"); + return StartError; + } + // Before we instantiate timers, and such, try to open the device, + // which should succeed if another listener is already running in + // 'Watch' mode + if (d->trkDevice->open(d->device , &(d->errorString))) + return ConnectionSucceeded; + // Pull up resources for next attempt + d->n = 0; + if (!initializeStartupResources(&(d->errorString))) + return StartError; + // Start timer + if (!d->timer) { + d->timer = new QTimer; + connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimer())); + } + d->timer->setInterval(d->intervalMS); + d->timer->setSingleShot(false); + d->timer->start(); + d->state = Running; + return Started; +} + +BaseCommunicationStarter::State BaseCommunicationStarter::state() const +{ + return d->state; +} + +int BaseCommunicationStarter::intervalMS() const +{ + return d->intervalMS; +} + +void BaseCommunicationStarter::setIntervalMS(int i) +{ + d->intervalMS = i; + if (d->timer) + d->timer->setInterval(i); +} + +int BaseCommunicationStarter::attempts() const +{ + return d->attempts; +} + +void BaseCommunicationStarter::setAttempts(int a) +{ + d->attempts = a; +} + +QString BaseCommunicationStarter::device() const +{ + return d->device; +} + +void BaseCommunicationStarter::setDevice(const QString &dv) +{ + d->device = dv; +} + +QString BaseCommunicationStarter::errorString() const +{ + return d->errorString; +} + +void BaseCommunicationStarter::slotTimer() +{ + ++d->n; + // Check for timeout + if (d->attempts >= 0 && d->n >= d->attempts) { + stopTimer(); + d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n) + .arg(d->device).arg(d->intervalMS); + d->state = TimedOut; + emit timeout(); + } else { + // Attempt n to connect? + if (d->trkDevice->open(d->device , &(d->errorString))) { + stopTimer(); + const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->device).arg(d->n); + emit message(msg); + d->state = Connected; + emit connected(); + } else { + const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...") + .arg(d->device).arg(d->n).arg(d->errorString); + emit message(msg); + } + } +} + +// --------------- AbstractBluetoothStarter + +AbstractBluetoothStarter::AbstractBluetoothStarter(const TrkDevicePtr &trkDevice, QObject *parent) : + BaseCommunicationStarter(trkDevice, parent) +{ +} + +bool AbstractBluetoothStarter::initializeStartupResources(QString *errorMessage) +{ + // Create the listener and forward messages to it. + BluetoothListener *listener = createListener(); + connect(this, SIGNAL(message(QString)), listener, SLOT(emitMessage(QString))); + return listener->start(device(), errorMessage); +} + +// -------- ConsoleBluetoothStarter +ConsoleBluetoothStarter::ConsoleBluetoothStarter(const TrkDevicePtr &trkDevice, + QObject *listenerParent, + QObject *parent) : +AbstractBluetoothStarter(trkDevice, parent), +m_listenerParent(listenerParent) +{ +} + +BluetoothListener *ConsoleBluetoothStarter::createListener() +{ + BluetoothListener *rc = new BluetoothListener(m_listenerParent); + rc->setMode(BluetoothListener::Listen); + rc->setPrintConsoleMessages(true); + return rc; +} + +bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice, + QObject *listenerParent, + const QString &device, + int attempts, + QString *errorMessage) +{ + // Set up a console starter to print to stdout. + ConsoleBluetoothStarter starter(trkDevice, listenerParent); + starter.setDevice(device); + starter.setAttempts(attempts); + switch (starter.start()) { + case Started: + break; + case ConnectionSucceeded: + return true; + case StartError: + *errorMessage = starter.errorString(); + return false; + } + // Run the starter with an event loop. @ToDo: Implement + // some asynchronous keypress read to cancel. + QEventLoop eventLoop; + connect(&starter, SIGNAL(connected()), &eventLoop, SLOT(quit())); + connect(&starter, SIGNAL(timeout()), &eventLoop, SLOT(quit())); + eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + if (starter.state() != AbstractBluetoothStarter::Connected) { + *errorMessage = starter.errorString(); + return false; + } + return true; +} +} // namespace trk diff --git a/tools/runonphone/symbianutils/communicationstarter.h b/tools/runonphone/symbianutils/communicationstarter.h new file mode 100644 index 0000000..2d7dc50 --- /dev/null +++ b/tools/runonphone/symbianutils/communicationstarter.h @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef COMMUNICATIONSTARTER_H +#define COMMUNICATIONSTARTER_H + +#include "symbianutils_global.h" + +#include +#include + +namespace trk { +class TrkDevice; +class BluetoothListener; +struct BaseCommunicationStarterPrivate; + +/* BaseCommunicationStarter: A QObject that repeatedly tries to open a + * trk device until a connection succeeds or a timeout occurs (emitting + * signals), allowing to do something else in the foreground (local event loop + * [say QMessageBox] or some asynchronous operation). If the initial + * connection attempt in start() fails, the + * virtual initializeStartupResources() is called to initialize resources + * required to pull up the communication (namely Bluetooth listeners). + * The base class can be used as is to prompt the user to launch App TRK for a + * serial communication as this requires no further resource setup. */ + +class SYMBIANUTILS_EXPORT BaseCommunicationStarter : public QObject { + Q_OBJECT + Q_DISABLE_COPY(BaseCommunicationStarter) +public: + typedef QSharedPointer TrkDevicePtr; + + enum State { Running, Connected, TimedOut }; + + explicit BaseCommunicationStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0); + virtual ~BaseCommunicationStarter(); + + int intervalMS() const; + void setIntervalMS(int i); + + int attempts() const; + void setAttempts(int a); + + QString device() const; + void setDevice(const QString &); + + State state() const; + QString errorString() const; + + enum StartResult { + Started, // Starter is now running. + ConnectionSucceeded, /* Initial connection attempt succeeded, + * no need to keep running. */ + StartError // Error occurred during start. + }; + + StartResult start(); + +signals: + void connected(); + void timeout(); + void message(const QString &); + +private slots: + void slotTimer(); + +protected: + virtual bool initializeStartupResources(QString *errorMessage); + +private: + inline void stopTimer(); + + BaseCommunicationStarterPrivate *d; +}; + +/* AbstractBluetoothStarter: Repeatedly tries to open a trk Bluetooth + * device. Note that in case a Listener is already running mode, the + * connection will succeed immediately. + * initializeStartupResources() is implemented to fire up the listener. + * Introduces a new virtual createListener() that derived classes must + * implement as a factory function that creates and sets up the + * listener (mode, message connection, etc). */ + +class SYMBIANUTILS_EXPORT AbstractBluetoothStarter : public BaseCommunicationStarter { + Q_OBJECT + Q_DISABLE_COPY(AbstractBluetoothStarter) +public: + +protected: + explicit AbstractBluetoothStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0); + + // Implemented to fire up the listener. + virtual bool initializeStartupResources(QString *errorMessage); + // New virtual: Overwrite to create and parametrize the listener. + virtual BluetoothListener *createListener() = 0; +}; + +/* ConsoleBluetoothStarter: Convenience class for console processes. Creates a + * listener in "Listen" mode with the messages redirected to standard output. */ + +class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStarter { + Q_OBJECT + Q_DISABLE_COPY(ConsoleBluetoothStarter) +public: + static bool startBluetooth(const TrkDevicePtr& trkDevice, + QObject *listenerParent, + const QString &device, + int attempts, + QString *errorMessage); + +protected: + virtual BluetoothListener *createListener(); + +private: + explicit ConsoleBluetoothStarter(const TrkDevicePtr& trkDevice, + QObject *listenerParent, + QObject *parent = 0); + + QObject *m_listenerParent; +}; + +} // namespace trk + +#endif // COMMUNICATIONSTARTER_H diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp new file mode 100644 index 0000000..4f91545 --- /dev/null +++ b/tools/runonphone/symbianutils/launcher.cpp @@ -0,0 +1,741 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "launcher.h" +#include "trkutils.h" +#include "trkutils_p.h" +#include "trkdevice.h" +#include "bluetoothlistener.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace trk { + +struct LauncherPrivate { + struct CopyState { + QString sourceFileName; + QString destinationFileName; + uint copyFileHandle; + QScopedPointer data; + int position; + }; + + explicit LauncherPrivate(const TrkDevicePtr &d); + + TrkDevicePtr m_device; + QString m_trkServerName; + QByteArray m_trkReadBuffer; + Launcher::State m_state; + + void logMessage(const QString &msg); + // Debuggee state + Session m_session; // global-ish data (process id, target information) + + CopyState m_copyState; + QString m_fileName; + QStringList m_commandLineArgs; + QString m_installFileName; + int m_verbose; + Launcher::Actions m_startupActions; + bool m_closeDevice; +}; + +LauncherPrivate::LauncherPrivate(const TrkDevicePtr &d) : + m_device(d), + m_state(Launcher::Disconnected), + m_verbose(0), + m_closeDevice(true) +{ + if (m_device.isNull()) + m_device = TrkDevicePtr(new TrkDevice); +} + +Launcher::Launcher(Actions startupActions, + const TrkDevicePtr &dev, + QObject *parent) : + QObject(parent), + d(new LauncherPrivate(dev)) +{ + d->m_startupActions = startupActions; + connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); + connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); +} + +Launcher::~Launcher() +{ + logMessage("Shutting down.\n"); + delete d; +} + +Launcher::State Launcher::state() const +{ + return d->m_state; +} + +void Launcher::setState(State s) +{ + if (s != d->m_state) { + d->m_state = s; + emit stateChanged(s); + } +} + +void Launcher::addStartupActions(trk::Launcher::Actions startupActions) +{ + d->m_startupActions = Actions(d->m_startupActions | startupActions); +} + +void Launcher::setTrkServerName(const QString &name) +{ + d->m_trkServerName = name; +} + +QString Launcher::trkServerName() const +{ + return d->m_trkServerName; +} + +TrkDevicePtr Launcher::trkDevice() const +{ + return d->m_device; +} + +void Launcher::setFileName(const QString &name) +{ + d->m_fileName = name; +} + +void Launcher::setCopyFileName(const QString &srcName, const QString &dstName) +{ + d->m_copyState.sourceFileName = srcName; + d->m_copyState.destinationFileName = dstName; +} + +void Launcher::setInstallFileName(const QString &name) +{ + d->m_installFileName = name; +} + +void Launcher::setCommandLineArgs(const QStringList &args) +{ + d->m_commandLineArgs = args; +} + +void Launcher::setSerialFrame(bool b) +{ + d->m_device->setSerialFrame(b); +} + +bool Launcher::serialFrame() const +{ + return d->m_device->serialFrame(); +} + + +bool Launcher::closeDevice() const +{ + return d->m_closeDevice; +} + +void Launcher::setCloseDevice(bool c) +{ + d->m_closeDevice = c; +} + +bool Launcher::startServer(QString *errorMessage) +{ + errorMessage->clear(); + if (d->m_verbose) { + const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6") + .arg(d->m_trkServerName, d->m_fileName, + d->m_commandLineArgs.join(QString(QLatin1Char(' '))), + d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName); + logMessage(msg); + } + if (d->m_startupActions & ActionCopy) { + if (d->m_copyState.sourceFileName.isEmpty()) { + qWarning("No local filename given for copying package."); + return false; + } else if (d->m_copyState.destinationFileName.isEmpty()) { + qWarning("No remote filename given for copying package."); + return false; + } + } + if (d->m_startupActions & ActionInstall && d->m_installFileName.isEmpty()) { + qWarning("No package name given for installing."); + return false; + } + if (d->m_startupActions & ActionRun && d->m_fileName.isEmpty()) { + qWarning("No remote executable given for running."); + return false; + } + if (!d->m_device->isOpen() && !d->m_device->open(d->m_trkServerName, errorMessage)) + return false; + if (d->m_closeDevice) { + connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); + } else { + disconnect(this, SIGNAL(finished()), d->m_device.data(), 0); + } + setState(Connecting); + // Set up the temporary 'waiting' state if we do not get immediate connection + QTimer::singleShot(1000, this, SLOT(slotWaitingForTrk())); + d->m_device->sendTrkInitialPing(); + d->m_device->sendTrkMessage(TrkDisconnect); // Disconnect, as trk might be still connected + d->m_device->sendTrkMessage(TrkSupported, TrkCallback(this, &Launcher::handleSupportMask)); + d->m_device->sendTrkMessage(TrkCpuType, TrkCallback(this, &Launcher::handleCpuType)); + d->m_device->sendTrkMessage(TrkVersions, TrkCallback(this, &Launcher::handleTrkVersion)); + if (d->m_startupActions != ActionPingOnly) + d->m_device->sendTrkMessage(TrkConnect, TrkCallback(this, &Launcher::handleConnect)); + return true; +} + +void Launcher::slotWaitingForTrk() +{ + // Set temporary state if we are still in connected state + if (state() == Connecting) + setState(WaitingForTrk); +} + +void Launcher::handleConnect(const TrkResult &result) +{ + if (result.errorCode()) { + emit canNotConnect(result.errorString()); + return; + } + setState(Connected); + if (d->m_startupActions & ActionCopy) + copyFileToRemote(); + else if (d->m_startupActions & ActionInstall) + installRemotePackageSilently(); + else if (d->m_startupActions & ActionRun) + startInferiorIfNeeded(); +} + +void Launcher::setVerbose(int v) +{ + d->m_verbose = v; + d->m_device->setVerbose(v); +} + +void Launcher::logMessage(const QString &msg) +{ + if (d->m_verbose) + qDebug() << "LAUNCHER: " << qPrintable(msg); +} + +void Launcher::terminate() +{ + switch (state()) { + case DeviceDescriptionReceived: + case Connected: + if (d->m_session.pid) { + QByteArray ba; + appendShort(&ba, 0x0000, TargetByteOrder); + appendInt(&ba, d->m_session.pid, TargetByteOrder); + d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(this, &Launcher::handleRemoteProcessKilled), ba); + return; + } + if (d->m_copyState.copyFileHandle) + closeRemoteFile(true); + disconnectTrk(); + break; + case Disconnected: + break; + case Connecting: + case WaitingForTrk: + setState(Disconnected); + emit finished(); + break; + } +} + +void Launcher::handleRemoteProcessKilled(const TrkResult &result) +{ + Q_UNUSED(result) + disconnectTrk(); +} + +QString Launcher::msgStopped(uint pid, uint tid, uint address, const QString &why) +{ + return QString::fromLatin1("Process %1, thread %2 stopped at 0x%3: %4"). + arg(pid).arg(tid).arg(address, 0, 16). + arg(why.isEmpty() ? QString::fromLatin1("") : why); +} + +bool Launcher::parseNotifyStopped(const QByteArray &dataBA, + uint *pid, uint *tid, uint *address, + QString *why /* = 0 */) +{ + if (why) + why->clear(); + *address = *pid = *tid = 0; + if (dataBA.size() < 12) + return false; + const char *data = dataBA.data(); + *address = extractInt(data); + *pid = extractInt(data + 4); + *tid = extractInt(data + 8); + if (why && dataBA.size() >= 14) { + const unsigned short len = extractShort(data + 12); + if (len > 0) + *why = QString::fromLatin1(data + 14, len); + } + return true; +} + +void Launcher::handleResult(const TrkResult &result) +{ + QByteArray prefix = "READ BUF: "; + QByteArray str = result.toString().toUtf8(); + if (result.isDebugOutput) { // handle application output + logMessage("APPLICATION OUTPUT: " + result.data); + emit applicationOutputReceived(result.data); + return; + } + switch (result.code) { + case TrkNotifyAck: + break; + case TrkNotifyNak: { // NAK + logMessage(prefix + "NAK: " + str); + //logMessage(prefix << "TOKEN: " << result.token); + logMessage(prefix + "ERROR: " + errorMessage(result.data.at(0))); + break; + } + case TrkNotifyStopped: { // Notified Stopped + QString reason; + uint pc; + uint pid; + uint tid; + parseNotifyStopped(result.data, &pid, &tid, &pc, &reason); + logMessage(prefix + msgStopped(pid, tid, pc, reason)); + emit(processStopped(pc, pid, tid, reason)); + d->m_device->sendTrkAck(result.token); + break; + } + case TrkNotifyException: { // Notify Exception (obsolete) + logMessage(prefix + "NOTE: EXCEPTION " + str); + d->m_device->sendTrkAck(result.token); + break; + } + case TrkNotifyInternalError: { // + logMessage(prefix + "NOTE: INTERNAL ERROR: " + str); + d->m_device->sendTrkAck(result.token); + break; + } + + // target->host OS notification + case TrkNotifyCreated: { // Notify Created + /* + const char *data = result.data.data(); + byte error = result.data.at(0); + byte type = result.data.at(1); // type: 1 byte; for dll item, this value is 2. + uint pid = extractInt(data + 2); // ProcessID: 4 bytes; + uint tid = extractInt(data + 6); //threadID: 4 bytes + uint codeseg = extractInt(data + 10); //code address: 4 bytes; code base address for the library + uint dataseg = extractInt(data + 14); //data address: 4 bytes; data base address for the library + uint len = extractShort(data + 18); //length: 2 bytes; length of the library name string to follow + QByteArray name = result.data.mid(20, len); // name: library name + + logMessage(prefix + "NOTE: LIBRARY LOAD: " + str); + logMessage(prefix + "TOKEN: " + result.token); + logMessage(prefix + "ERROR: " + int(error)); + logMessage(prefix + "TYPE: " + int(type)); + logMessage(prefix + "PID: " + pid); + logMessage(prefix + "TID: " + tid); + logMessage(prefix + "CODE: " + codeseg); + logMessage(prefix + "DATA: " + dataseg); + logMessage(prefix + "LEN: " + len); + logMessage(prefix + "NAME: " + name); + */ + + if (result.data.size() < 10) + break; + QByteArray ba; + ba.append(result.data.mid(2, 8)); + d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); + //d->m_device->sendTrkAck(result.token) + break; + } + case TrkNotifyDeleted: { // NotifyDeleted + const ushort itemType = (unsigned char)result.data.at(1); + const ushort len = result.data.size() > 12 ? extractShort(result.data.data() + 10) : ushort(0); + const QString name = len ? QString::fromAscii(result.data.mid(12, len)) : QString(); + logMessage(QString::fromLatin1("%1 %2 UNLOAD: %3"). + arg(QString::fromAscii(prefix)).arg(itemType ? QLatin1String("LIB") : QLatin1String("PROCESS")). + arg(name)); + d->m_device->sendTrkAck(result.token); + if (itemType == 0 // process + && result.data.size() >= 10 + && d->m_session.pid == extractInt(result.data.data() + 6)) { + disconnectTrk(); + } + break; + } + case TrkNotifyProcessorStarted: { // NotifyProcessorStarted + logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str); + d->m_device->sendTrkAck(result.token); + break; + } + case TrkNotifyProcessorStandBy: { // NotifyProcessorStandby + logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str); + d->m_device->sendTrkAck(result.token); + break; + } + case TrkNotifyProcessorReset: { // NotifyProcessorReset + logMessage(prefix + "NOTE: PROCESSOR RESET: " + str); + d->m_device->sendTrkAck(result.token); + break; + } + default: { + logMessage(prefix + "INVALID: " + str); + break; + } + } +} + +QString Launcher::deviceDescription(unsigned verbose) const +{ + return d->m_session.deviceDescription(verbose); +} + +void Launcher::handleTrkVersion(const TrkResult &result) +{ + if (result.errorCode() || result.data.size() < 5) { + if (d->m_startupActions == ActionPingOnly) { + setState(Disconnected); + emit finished(); + } + return; + } + d->m_session.trkAppVersion.trkMajor = result.data.at(1); + d->m_session.trkAppVersion.trkMinor = result.data.at(2); + d->m_session.trkAppVersion.protocolMajor = result.data.at(3); + d->m_session.trkAppVersion.protocolMinor = result.data.at(4); + setState(DeviceDescriptionReceived); + // Ping mode: Log & Terminate + if (d->m_startupActions == ActionPingOnly) { + qWarning("%s", qPrintable(deviceDescription())); + setState(Disconnected); + emit finished(); + } +} + +void Launcher::handleFileCreation(const TrkResult &result) +{ + if (result.errorCode() || result.data.size() < 6) { + emit canNotCreateFile(d->m_copyState.destinationFileName, result.errorString()); + disconnectTrk(); + return; + } + const char *data = result.data.data(); + d->m_copyState.copyFileHandle = extractInt(data + 2); + QFile file(d->m_copyState.sourceFileName); + file.open(QIODevice::ReadOnly); + d->m_copyState.data.reset(new QByteArray(file.readAll())); + d->m_copyState.position = 0; + file.close(); + continueCopying(); +} + +void Launcher::handleCopy(const TrkResult &result) +{ + if (result.errorCode() || result.data.size() < 4) { + closeRemoteFile(true); + emit canNotWriteFile(d->m_copyState.destinationFileName, result.errorString()); + disconnectTrk(); + } else { + continueCopying(extractShort(result.data.data() + 2)); + } +} + +void Launcher::continueCopying(uint lastCopiedBlockSize) +{ + int size = d->m_copyState.data->length(); + d->m_copyState.position += lastCopiedBlockSize; + if (size == 0) + emit copyProgress(100); + else { + int percent = qMin((d->m_copyState.position*100)/size, 100); + emit copyProgress(percent); + } + if (d->m_copyState.position < size) { + QByteArray ba; + appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder); + appendString(&ba, d->m_copyState.data->mid(d->m_copyState.position, 2048), TargetByteOrder, false); + d->m_device->sendTrkMessage(TrkWriteFile, TrkCallback(this, &Launcher::handleCopy), ba); + } else { + closeRemoteFile(); + } +} + +void Launcher::closeRemoteFile(bool failed) +{ + QByteArray ba; + appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder); + appendDateTime(&ba, QDateTime::currentDateTime(), TargetByteOrder); + d->m_device->sendTrkMessage(TrkCloseFile, + failed ? TrkCallback() : TrkCallback(this, &Launcher::handleFileCopied), + ba); + d->m_copyState.data.reset(); + d->m_copyState.copyFileHandle = 0; + d->m_copyState.position = 0; +} + +void Launcher::handleFileCopied(const TrkResult &result) +{ + if (result.errorCode()) + emit canNotCloseFile(d->m_copyState.destinationFileName, result.errorString()); + if (d->m_startupActions & ActionInstall) + installRemotePackageSilently(); + else if (d->m_startupActions & ActionRun) + startInferiorIfNeeded(); + else + disconnectTrk(); +} + +void Launcher::handleCpuType(const TrkResult &result) +{ + logMessage("HANDLE CPU TYPE: " + result.toString()); + if(result.errorCode() || result.data.size() < 7) + return; + //---TRK------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 + // [80 03 00 04 00 00 04 00 00 00] + d->m_session.cpuMajor = result.data.at(1); + d->m_session.cpuMinor = result.data.at(2); + d->m_session.bigEndian = result.data.at(3); + d->m_session.defaultTypeSize = result.data.at(4); + d->m_session.fpTypeSize = result.data.at(5); + d->m_session.extended1TypeSize = result.data.at(6); + //d->m_session.extended2TypeSize = result.data[6]; +} + +void Launcher::handleCreateProcess(const TrkResult &result) +{ + if (result.errorCode()) { + emit canNotRun(result.errorString()); + disconnectTrk(); + return; + } + // 40 00 00] + //logMessage(" RESULT: " + result.toString()); + // [80 08 00 00 00 01 B5 00 00 01 B6 78 67 40 00 00 40 00 00] + const char *data = result.data.data(); + d->m_session.pid = extractInt(data + 1); + d->m_session.tid = extractInt(data + 5); + d->m_session.codeseg = extractInt(data + 9); + d->m_session.dataseg = extractInt(data + 13); + if (d->m_verbose) { + const QString msg = QString::fromLatin1("Process id: %1 Thread id: %2 code: 0x%3 data: 0x%4"). + arg(d->m_session.pid).arg(d->m_session.tid).arg(d->m_session.codeseg, 0, 16). + arg(d->m_session.dataseg, 0 ,16); + logMessage(msg); + } + emit applicationRunning(d->m_session.pid); + QByteArray ba; + appendInt(&ba, d->m_session.pid); + appendInt(&ba, d->m_session.tid); + d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); +} + +void Launcher::handleWaitForFinished(const TrkResult &result) +{ + logMessage(" FINISHED: " + stringFromArray(result.data)); + setState(Disconnected); + emit finished(); +} + +void Launcher::handleSupportMask(const TrkResult &result) +{ + if (result.errorCode() || result.data.size() < 32) + return; + const char *data = result.data.data() + 1; + + QString str = QLatin1String("SUPPORTED: "); + for (int i = 0; i < 32; ++i) { + //str.append(" [" + formatByte(data[i]) + "]: "); + for (int j = 0; j < 8; ++j) { + if (data[i] & (1 << j)) { + str.append(QString::number(i * 8 + j, 16)); + str.append(QLatin1Char(' ')); + } + } + } + logMessage(str); +} + +void Launcher::cleanUp() +{ + // + //---IDE------------------------------------------------------ + // Command: 0x41 Delete Item + // Sub Cmd: Delete Process + //ProcessID: 0x0000071F (1823) + // [41 24 00 00 00 00 07 1F] + QByteArray ba(2, char(0)); + appendInt(&ba, d->m_session.pid); + d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(), ba, "Delete process"); + + //---TRK------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 + // [80 24 00] + + //---IDE------------------------------------------------------ + // Command: 0x1C Clear Break + // [1C 25 00 00 00 0A 78 6A 43 40] + + //---TRK------------------------------------------------------ + // Command: 0xA1 Notify Deleted + // [A1 09 00 00 00 00 00 00 00 00 07 1F] + //---IDE------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 + // [80 09 00] + + //---TRK------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 + // [80 25 00] + + //---IDE------------------------------------------------------ + // Command: 0x1C Clear Break + // [1C 26 00 00 00 0B 78 6A 43 70] + //---TRK------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 + // [80 26 00] + + + //---IDE------------------------------------------------------ + // Command: 0x02 Disconnect + // [02 27] +// sendTrkMessage(0x02, TrkCallback(this, &Launcher::handleDisconnect)); + //---TRK------------------------------------------------------ + // Command: 0x80 Acknowledge + // Error: 0x00 +} + +void Launcher::disconnectTrk() +{ + d->m_device->sendTrkMessage(TrkDisconnect, TrkCallback(this, &Launcher::handleWaitForFinished)); +} + +void Launcher::copyFileToRemote() +{ + emit copyingStarted(); + QByteArray ba; + ba.append(char(10)); + appendString(&ba, d->m_copyState.destinationFileName.toLocal8Bit(), TargetByteOrder, false); + d->m_device->sendTrkMessage(TrkOpenFile, TrkCallback(this, &Launcher::handleFileCreation), ba); +} + +void Launcher::installRemotePackageSilently() +{ + emit installingStarted(); + QByteArray ba; + ba.append('C'); + appendString(&ba, d->m_installFileName.toLocal8Bit(), TargetByteOrder, false); + d->m_device->sendTrkMessage(TrkInstallFile, TrkCallback(this, &Launcher::handleInstallPackageFinished), ba); +} + +void Launcher::handleInstallPackageFinished(const TrkResult &result) +{ + if (result.errorCode()) { + emit canNotInstall(d->m_installFileName, result.errorString()); + disconnectTrk(); + return; + } else { + emit installingFinished(); + } + if (d->m_startupActions & ActionRun) { + startInferiorIfNeeded(); + } else { + disconnectTrk(); + } +} + +QByteArray Launcher::startProcessMessage(const QString &executable, + const QStringList &arguments) +{ + // It's not started yet + QByteArray ba; + appendShort(&ba, 0, TargetByteOrder); // create new process + ba.append(char(0)); // options - currently unused + if(arguments.isEmpty()) { + appendString(&ba, executable.toLocal8Bit(), TargetByteOrder); + return ba; + } + // Append full command line as one string (leading length information). + QByteArray commandLineBa; + commandLineBa.append(executable.toLocal8Bit()); + commandLineBa.append('\0'); + commandLineBa.append(arguments.join(QString(QLatin1Char(' '))).toLocal8Bit()); + appendString(&ba, commandLineBa, TargetByteOrder); + return ba; +} + +void Launcher::startInferiorIfNeeded() +{ + emit startingApplication(); + if (d->m_session.pid != 0) { + logMessage("Process already 'started'"); + return; + } + d->m_device->sendTrkMessage(TrkCreateItem, TrkCallback(this, &Launcher::handleCreateProcess), + startProcessMessage(d->m_fileName, d->m_commandLineArgs)); // Create Item +} + +void Launcher::resumeProcess(uint pid, uint tid) +{ + QByteArray ba; + appendInt(&ba, pid, BigEndian); + appendInt(&ba, tid, BigEndian); + d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); +} +} // namespace trk diff --git a/tools/runonphone/symbianutils/launcher.h b/tools/runonphone/symbianutils/launcher.h new file mode 100644 index 0000000..2b23fd8 --- /dev/null +++ b/tools/runonphone/symbianutils/launcher.h @@ -0,0 +1,179 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef LAUNCHER_H +#define LAUNCHER_H + +#include "trkdevice.h" + +#include +#include +#include + +namespace trk { + +struct TrkResult; +struct TrkMessage; +struct LauncherPrivate; + +typedef QSharedPointer TrkDevicePtr; + +class SYMBIANUTILS_EXPORT Launcher : public QObject +{ + Q_OBJECT + Q_DISABLE_COPY(Launcher) +public: + typedef void (Launcher::*TrkCallBack)(const TrkResult &); + + enum Actions { + ActionPingOnly = 0x0, + ActionCopy = 0x1, + ActionInstall = 0x2, + ActionCopyInstall = ActionCopy | ActionInstall, + ActionRun = 0x4, + ActionCopyRun = ActionCopy | ActionRun, + ActionInstallRun = ActionInstall | ActionRun, + ActionCopyInstallRun = ActionCopy | ActionInstall | ActionRun + }; + + enum State { Disconnected, Connecting, Connected, + WaitingForTrk, // This occurs only if the initial ping times out after + // a reasonable timeout, indicating that Trk is not + // running. Note that this will never happen with + // Bluetooth as communication immediately starts + // after connecting. + DeviceDescriptionReceived }; + + explicit Launcher(trk::Launcher::Actions startupActions = trk::Launcher::ActionPingOnly, + const TrkDevicePtr &trkDevice = TrkDevicePtr(), + QObject *parent = 0); + ~Launcher(); + + State state() const; + + void addStartupActions(trk::Launcher::Actions startupActions); + void setTrkServerName(const QString &name); + QString trkServerName() const; + void setFileName(const QString &name); + void setCopyFileName(const QString &srcName, const QString &dstName); + void setInstallFileName(const QString &name); + void setCommandLineArgs(const QStringList &args); + bool startServer(QString *errorMessage); + void setVerbose(int v); + void setSerialFrame(bool b); + bool serialFrame() const; + // Close device or leave it open + bool closeDevice() const; + void setCloseDevice(bool c); + + TrkDevicePtr trkDevice() const; + + // becomes valid after successful execution of ActionPingOnly + QString deviceDescription(unsigned verbose = 0u) const; + + static QByteArray startProcessMessage(const QString &executable, + const QStringList &arguments); + // Parse a TrkNotifyStopped message + static bool parseNotifyStopped(const QByteArray &a, + uint *pid, uint *tid, uint *address, + QString *why = 0); + // Helper message + static QString msgStopped(uint pid, uint tid, uint address, const QString &why); + +signals: + void copyingStarted(); + void canNotConnect(const QString &errorMessage); + void canNotCreateFile(const QString &filename, const QString &errorMessage); + void canNotWriteFile(const QString &filename, const QString &errorMessage); + void canNotCloseFile(const QString &filename, const QString &errorMessage); + void installingStarted(); + void canNotInstall(const QString &packageFilename, const QString &errorMessage); + void installingFinished(); + void startingApplication(); + void applicationRunning(uint pid); + void canNotRun(const QString &errorMessage); + void finished(); + void applicationOutputReceived(const QString &output); + void copyProgress(int percent); + void stateChanged(int); + void processStopped(uint pc, uint pid, uint tid, const QString& reason); + +public slots: + void terminate(); + void resumeProcess(uint pid, uint tid); + +private slots: + void handleResult(const trk::TrkResult &data); + void slotWaitingForTrk(); + +private: + // kill process and breakpoints + void cleanUp(); + void disconnectTrk(); + + void handleRemoteProcessKilled(const TrkResult &result); + void handleConnect(const TrkResult &result); + void handleFileCreation(const TrkResult &result); + void handleCopy(const TrkResult &result); + void continueCopying(uint lastCopiedBlockSize = 0); + void closeRemoteFile(bool failed = false); + void handleFileCopied(const TrkResult &result); + void handleInstallPackageFinished(const TrkResult &result); + void handleCpuType(const TrkResult &result); + void handleCreateProcess(const TrkResult &result); + void handleWaitForFinished(const TrkResult &result); + void handleStop(const TrkResult &result); + void handleSupportMask(const TrkResult &result); + void handleTrkVersion(const TrkResult &result); + + void copyFileToRemote(); + void installRemotePackageSilently(); + void startInferiorIfNeeded(); + + void logMessage(const QString &msg); + void setState(State s); + + LauncherPrivate *d; +}; + +} // namespace Trk + +#endif // LAUNCHER_H diff --git a/tools/runonphone/symbianutils/symbianutils.pri b/tools/runonphone/symbianutils/symbianutils.pri new file mode 100644 index 0000000..a54df76 --- /dev/null +++ b/tools/runonphone/symbianutils/symbianutils.pri @@ -0,0 +1,25 @@ +INCLUDEPATH *= $$PWD + +# Input +HEADERS += $$PWD/symbianutils_global.h \ + $$PWD/callback.h \ + $$PWD/trkutils.h \ + $$PWD/trkutils_p.h \ + $$PWD/trkdevice.h \ + $$PWD/launcher.h \ + $$PWD/bluetoothlistener.h \ + $$PWD/communicationstarter.h + +SOURCES += $$PWD/trkutils.cpp \ + $$PWD/trkdevice.cpp \ + $$PWD/launcher.cpp \ + $$PWD/bluetoothlistener.cpp \ + $$PWD/communicationstarter.cpp + +# Tests/trklauncher is a console application +contains(QT, gui) { + HEADERS += $$PWD/bluetoothlistener_gui.h + SOURCES += $$PWD/bluetoothlistener_gui.cpp +} else { + message(Trk: Console ...) +} diff --git a/tools/runonphone/symbianutils/symbianutils_global.h b/tools/runonphone/symbianutils/symbianutils_global.h new file mode 100644 index 0000000..a6ffbe7 --- /dev/null +++ b/tools/runonphone/symbianutils/symbianutils_global.h @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef SYMBIANUTILS_GLOBAL_H +#define SYMBIANUTILS_GLOBAL_H + +#include + +#if defined(SYMBIANUTILS_BUILD_LIB) +# define SYMBIANUTILS_EXPORT Q_DECL_EXPORT +#elif defined(SYMBIANUTILS_BUILD_STATIC_LIB) || defined(SYMBIANUTILS_INCLUDE_PRI) +# define SYMBIANUTILS_EXPORT +#else +# define SYMBIANUTILS_EXPORT Q_DECL_IMPORT +#endif + +#endif // SYMBIANUTILS_GLOBAL_H diff --git a/tools/runonphone/symbianutils/trkdevice.cpp b/tools/runonphone/symbianutils/trkdevice.cpp new file mode 100644 index 0000000..d587135 --- /dev/null +++ b/tools/runonphone/symbianutils/trkdevice.cpp @@ -0,0 +1,1105 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "trkdevice.h" +#include "trkutils.h" +#include "trkutils_p.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef Q_OS_WIN +# include +#else +# include + +# include +# include +# include +# include +# include +# include +# include +/* Required headers for select() according to POSIX.1-2001 */ +# include +/* Required headers for select() according to earlier standards: + #include + #include + #include +*/ +#endif + +#ifdef Q_OS_WIN + +// Format windows error from GetLastError() value: +// TODO: Use the one provided by the utils lib. +QString winErrorMessage(unsigned long error) +{ + QString rc = QString::fromLatin1("#%1: ").arg(error); + ushort *lpMsgBuf; + + const int len = FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, error, 0, (LPTSTR)&lpMsgBuf, 0, NULL); + if (len) { + rc = QString::fromUtf16(lpMsgBuf, len); + LocalFree(lpMsgBuf); + } else { + rc += QString::fromLatin1(""); + } + return rc; +} + +#endif + +enum { verboseTrk = 0 }; + +namespace trk { + +/////////////////////////////////////////////////////////////////////// +// +// TrkMessage +// +/////////////////////////////////////////////////////////////////////// + +/* A message to be send to TRK, triggering a callback on receipt + * of the answer. */ +struct TrkMessage +{ + explicit TrkMessage(byte code = 0u, byte token = 0u, + TrkCallback callback = TrkCallback()); + + byte code; + byte token; + QByteArray data; + QVariant cookie; + TrkCallback callback; +}; + +TrkMessage::TrkMessage(byte c, byte t, TrkCallback cb) : + code(c), + token(t), + callback(cb) +{ +} + +QDebug operator<<(QDebug d, const TrkMessage &msg) +{ + return d << "Message: Code: " << msg.code + << " Token: " << msg.token << " " << msg.data.toHex(); +} + +} // namespace trk + +Q_DECLARE_METATYPE(trk::TrkMessage) +Q_DECLARE_METATYPE(trk::TrkResult) + +namespace trk { + +/////////////////////////////////////////////////////////////////////// +// +// TrkWriteQueue: Mixin class that manages a write queue of Trk messages. +// pendingMessage()/notifyWriteResult() should be called from a worked/timer +// that writes the messages. The class does not take precautions for multithreading. +// A no-op message is simply taken off the queue. The calling class +// can use the helper invokeNoopMessage() to trigger its callback. +// +/////////////////////////////////////////////////////////////////////// + +class TrkWriteQueue +{ + Q_DISABLE_COPY(TrkWriteQueue) +public: + explicit TrkWriteQueue(); + + // Enqueue messages. + void queueTrkMessage(byte code, TrkCallback callback, + const QByteArray &data, const QVariant &cookie); + void queueTrkInitialPing(); + + // Call this from the device read notification with the results. + void slotHandleResult(const TrkResult &result, QMutex *mutex = 0); + + // pendingMessage() can be called periodically in a timer to retrieve + // the pending messages to be sent. + enum PendingMessageResult { + NoMessage, // No message in queue. + PendingMessage, /* There is a queued message. The calling class + * can write it out and use notifyWriteResult() + * to notify about the result. */ + NoopMessageDequeued // A no-op message has been dequeued. see invokeNoopMessage(). + }; + + PendingMessageResult pendingMessage(TrkMessage *message); + // Notify the queue about the success of the write operation + // after taking the pendingMessage off. + enum WriteResult { + WriteOk, + WriteFailedDiscard, // Discard failed message + WriteFailedKeep, // Keep failed message + }; + void notifyWriteResult(WriteResult ok); + + // Helper function that invokes the callback of a no-op message + static void invokeNoopMessage(trk::TrkMessage); + +private: + typedef QMap TokenMessageMap; + + byte nextTrkWriteToken(); + + byte m_trkWriteToken; + QQueue m_trkWriteQueue; + TokenMessageMap m_writtenTrkMessages; + bool m_trkWriteBusy; +}; + +TrkWriteQueue::TrkWriteQueue() : + m_trkWriteToken(0), + m_trkWriteBusy(false) +{ +} + +byte TrkWriteQueue::nextTrkWriteToken() +{ + ++m_trkWriteToken; + if (m_trkWriteToken == 0) + ++m_trkWriteToken; + if (verboseTrk) + qDebug() << "Write token: " << m_trkWriteToken; + return m_trkWriteToken; +} + +void TrkWriteQueue::queueTrkMessage(byte code, TrkCallback callback, + const QByteArray &data, const QVariant &cookie) +{ + const byte token = code == TRK_WRITE_QUEUE_NOOP_CODE ? + byte(0) : nextTrkWriteToken(); + TrkMessage msg(code, token, callback); + msg.data = data; + msg.cookie = cookie; + m_trkWriteQueue.append(msg); +} + +TrkWriteQueue::PendingMessageResult TrkWriteQueue::pendingMessage(TrkMessage *message) +{ + // Invoked from timer, try to flush out message queue + if (m_trkWriteBusy || m_trkWriteQueue.isEmpty()) + return NoMessage; + // Handle the noop message, just invoke CB in slot (ower thread) + if (m_trkWriteQueue.front().code == TRK_WRITE_QUEUE_NOOP_CODE) { + *message = m_trkWriteQueue.dequeue(); + return NoopMessageDequeued; + } + // Insert into map fir answers (as reading threads might get an + // answer before notifyWriteResult(true)) is called. + *message = m_trkWriteQueue.front(); + m_writtenTrkMessages.insert(message->token, *message); + m_trkWriteBusy = true; + return PendingMessage; +} + +void TrkWriteQueue::invokeNoopMessage(trk::TrkMessage noopMessage) +{ + TrkResult result; + result.code = noopMessage.code; + result.token = noopMessage.token; + result.data = noopMessage.data; + result.cookie = noopMessage.cookie; + noopMessage.callback(result); +} + +void TrkWriteQueue::notifyWriteResult(WriteResult wr) +{ + // On success, dequeue message and await result + const byte token = m_trkWriteQueue.front().token; + switch (wr) { + case WriteOk: + m_trkWriteQueue.dequeue(); + break; + case WriteFailedKeep: + case WriteFailedDiscard: + m_writtenTrkMessages.remove(token); + m_trkWriteBusy = false; + if (wr == WriteFailedDiscard) + m_trkWriteQueue.dequeue(); + break; + } +} + +void TrkWriteQueue::slotHandleResult(const TrkResult &result, QMutex *mutex) +{ + // Find which request the message belongs to and invoke callback + // if ACK or on NAK if desired. + if (mutex) + mutex->lock(); + m_trkWriteBusy = false; + const TokenMessageMap::iterator it = m_writtenTrkMessages.find(result.token); + if (it == m_writtenTrkMessages.end()) { + if (mutex) + mutex->unlock(); + return; + } + TrkCallback callback = it.value().callback; + const QVariant cookie = it.value().cookie; + m_writtenTrkMessages.erase(it); + if (mutex) + mutex->unlock(); + // Invoke callback + if (callback) { + TrkResult result1 = result; + result1.cookie = cookie; + callback(result1); + } +} + +void TrkWriteQueue::queueTrkInitialPing() +{ + // Ping, reset sequence count + m_trkWriteToken = 0; + m_trkWriteQueue.append(TrkMessage(TrkPing, 0)); +} + +/////////////////////////////////////////////////////////////////////// +// +// DeviceContext to be shared between threads +// +/////////////////////////////////////////////////////////////////////// + +struct DeviceContext { + DeviceContext(); +#ifdef Q_OS_WIN + HANDLE device; + OVERLAPPED readOverlapped; + OVERLAPPED writeOverlapped; +#else + QFile file; +#endif + bool serialFrame; + QMutex mutex; +}; + +DeviceContext::DeviceContext() : +#ifdef Q_OS_WIN + device(INVALID_HANDLE_VALUE), +#endif + serialFrame(true) +{ +} + +/////////////////////////////////////////////////////////////////////// +// +// TrkWriterThread: A thread operating a TrkWriteQueue. +// with exception of the handling of the TRK_WRITE_QUEUE_NOOP_CODE +// synchronization message. The invocation of the callback is then +// done by the thread owning the TrkWriteQueue, while pendingMessage() is called +// from another thread. This happens via a Qt::BlockingQueuedConnection. + +/////////////////////////////////////////////////////////////////////// + +class WriterThread : public QThread +{ + Q_OBJECT + Q_DISABLE_COPY(WriterThread) +public: + explicit WriterThread(const QSharedPointer &context); + + // Enqueue messages. + void queueTrkMessage(byte code, TrkCallback callback, + const QByteArray &data, const QVariant &cookie); + void queueTrkInitialPing(); + + // Call this from the device read notification with the results. + void slotHandleResult(const TrkResult &result); + + virtual void run(); + +signals: + void error(const QString &); + void internalNoopMessageDequeued(const trk::TrkMessage&); + +public slots: + bool trkWriteRawMessage(const TrkMessage &msg); + void terminate(); + void tryWrite(); + +private slots: + void invokeNoopMessage(const trk::TrkMessage &); + +private: + bool write(const QByteArray &data, QString *errorMessage); + inline int writePendingMessage(); + + const QSharedPointer m_context; + QMutex m_dataMutex; + QMutex m_waitMutex; + QWaitCondition m_waitCondition; + TrkWriteQueue m_queue; + bool m_terminate; +}; + +WriterThread::WriterThread(const QSharedPointer &context) : + m_context(context), + m_terminate(false) +{ + static const int trkMessageMetaId = qRegisterMetaType(); + Q_UNUSED(trkMessageMetaId) + connect(this, SIGNAL(internalNoopMessageDequeued(trk::TrkMessage)), + this, SLOT(invokeNoopMessage(trk::TrkMessage)), Qt::BlockingQueuedConnection); +} + +void WriterThread::run() +{ + while (writePendingMessage() == 0) ; +} + +int WriterThread::writePendingMessage() +{ + enum { MaxAttempts = 100, RetryIntervalMS = 200 }; + + // Wait. Use a timeout in case something is already queued before we + // start up or some weird hanging exit condition + m_waitMutex.lock(); + m_waitCondition.wait(&m_waitMutex, 100); + m_waitMutex.unlock(); + if (m_terminate) + return 1; + + // Send off message + m_dataMutex.lock(); + TrkMessage message; + const TrkWriteQueue::PendingMessageResult pr = m_queue.pendingMessage(&message); + m_dataMutex.unlock(); + + switch (pr) { + case TrkWriteQueue::NoMessage: + break; + case TrkWriteQueue::PendingMessage: { + //qDebug() << "Write pending message " << message; + // Untested: try to re-send a few times + bool success = false; + for (int r = 0; !success && (r < MaxAttempts); r++) { + success = trkWriteRawMessage(message); + if (!success) { + emit error(QString::fromLatin1("Write failure, attempt %1 of %2.").arg(r).arg(int(MaxAttempts))); + if (m_terminate) + return 1; + QThread::msleep(RetryIntervalMS); + } + } + // Notify queue. If still failed, give up. + m_dataMutex.lock(); + m_queue.notifyWriteResult(success ? TrkWriteQueue::WriteOk : TrkWriteQueue::WriteFailedDiscard); + m_dataMutex.unlock(); + } + break; + case TrkWriteQueue::NoopMessageDequeued: + // Sync with thread that owns us via a blocking signal + if (verboseTrk) + qDebug() << "Noop message dequeued" << message; + emit internalNoopMessageDequeued(message); + break; + } // switch + return 0; +} + +void WriterThread::invokeNoopMessage(const trk::TrkMessage &msg) +{ + TrkWriteQueue::invokeNoopMessage(msg); +} + +void WriterThread::terminate() +{ + m_terminate = true; + m_waitCondition.wakeAll(); + wait(); + m_terminate = false; +} + +#ifdef Q_OS_WIN + +static inline QString msgTerminated(int size) +{ + return QString::fromLatin1("Terminated with %1 bytes pending.").arg(size); +} + +// Interruptible synchronous write function. +static inline bool overlappedSyncWrite(HANDLE file, + const bool &terminateFlag, + const char *data, + DWORD size, DWORD *charsWritten, + OVERLAPPED *overlapped, + QString *errorMessage) +{ + if (WriteFile(file, data, size, charsWritten, overlapped)) + return true; + const DWORD writeError = GetLastError(); + if (writeError != ERROR_IO_PENDING) { + *errorMessage = QString::fromLatin1("WriteFile failed: %1").arg(winErrorMessage(writeError)); + return false; + } + // Wait for written or thread terminated + const DWORD timeoutMS = 200; + const unsigned maxAttempts = 20; + DWORD wr = WaitForSingleObject(overlapped->hEvent, timeoutMS); + for (unsigned n = 0; wr == WAIT_TIMEOUT && n < maxAttempts && !terminateFlag; + wr = WaitForSingleObject(overlapped->hEvent, timeoutMS), n++); + if (terminateFlag) { + *errorMessage = msgTerminated(size); + return false; + } + switch (wr) { + case WAIT_OBJECT_0: + break; + case WAIT_TIMEOUT: + *errorMessage = QString::fromLatin1("Write timed out."); + return false; + default: + *errorMessage = QString::fromLatin1("Error while waiting for WriteFile results: %1").arg(winErrorMessage(GetLastError())); + return false; + } + if (!GetOverlappedResult(file, overlapped, charsWritten, TRUE)) { + *errorMessage = QString::fromLatin1("Error writing %1 bytes: %2").arg(size).arg(winErrorMessage(GetLastError())); + return false; + } + return true; +} +#endif + +bool WriterThread::write(const QByteArray &data, QString *errorMessage) +{ + if (verboseTrk) + qDebug() << "Write raw data: " << stringFromArray(data).toLatin1(); + QMutexLocker locker(&m_context->mutex); +#ifdef Q_OS_WIN + DWORD charsWritten; + if (!overlappedSyncWrite(m_context->device, m_terminate, data.data(), data.size(), &charsWritten, &m_context->writeOverlapped, errorMessage)) { + return false; + } + FlushFileBuffers(m_context->device); + return true; +#else + if (m_context->file.write(data) == -1 || !m_context->file.flush()) { + *errorMessage = QString::fromLatin1("Cannot write: %1").arg(m_context->file.errorString()); + return false; + } + return true; +#endif +} + +bool WriterThread::trkWriteRawMessage(const TrkMessage &msg) +{ + const QByteArray ba = frameMessage(msg.code, msg.token, msg.data, m_context->serialFrame); + QString errorMessage; + const bool rc = write(ba, &errorMessage); + if (!rc) { + qWarning("%s\n", qPrintable(errorMessage)); + emit error(errorMessage); + } + return rc; +} + +void WriterThread::tryWrite() +{ + m_waitCondition.wakeAll(); +} + +void WriterThread::queueTrkMessage(byte code, TrkCallback callback, + const QByteArray &data, const QVariant &cookie) +{ + m_dataMutex.lock(); + m_queue.queueTrkMessage(code, callback, data, cookie); + m_dataMutex.unlock(); + tryWrite(); +} + +void WriterThread::queueTrkInitialPing() +{ + m_dataMutex.lock(); + m_queue.queueTrkInitialPing(); + m_dataMutex.unlock(); + tryWrite(); +} + +// Call this from the device read notification with the results. +void WriterThread::slotHandleResult(const TrkResult &result) +{ + m_queue.slotHandleResult(result, &m_dataMutex); + tryWrite(); // Have messages been enqueued in-between? +} + + +/////////////////////////////////////////////////////////////////////// +// +// ReaderThreadBase: Base class for a thread that reads data from +// the device, decodes the messages and emit signals for the messages. +// A Qt::BlockingQueuedConnection should be used for the message signal +// to ensure messages are processed in the correct sequence. +// +/////////////////////////////////////////////////////////////////////// + +class ReaderThreadBase : public QThread +{ + Q_OBJECT + Q_DISABLE_COPY(ReaderThreadBase) +public: + +signals: + void messageReceived(const trk::TrkResult &result, const QByteArray &rawData); + +protected: + explicit ReaderThreadBase(const QSharedPointer &context); + void processData(const QByteArray &a); + void processData(char c); + + const QSharedPointer m_context; + +private: + void readMessages(); + + QByteArray m_trkReadBuffer; +}; + +ReaderThreadBase::ReaderThreadBase(const QSharedPointer &context) : + m_context(context) +{ + static const int trkResultMetaId = qRegisterMetaType(); + Q_UNUSED(trkResultMetaId) +} + +void ReaderThreadBase::processData(const QByteArray &a) +{ + m_trkReadBuffer += a; + readMessages(); +} + +void ReaderThreadBase::processData(char c) +{ + m_trkReadBuffer += c; + if (m_trkReadBuffer.size() > 1) + readMessages(); +} + +void ReaderThreadBase::readMessages() +{ + TrkResult r; + QByteArray rawData; + while (extractResult(&m_trkReadBuffer, m_context->serialFrame, &r, &rawData)) { + emit messageReceived(r, rawData); + } +} + +#ifdef Q_OS_WIN +/////////////////////////////////////////////////////////////////////// +// +// WinReaderThread: A thread reading from the device using Windows API. +// Waits on an overlapped I/O handle and an event that tells the thread to +// terminate. +// +/////////////////////////////////////////////////////////////////////// + +class WinReaderThread : public ReaderThreadBase +{ + Q_OBJECT + Q_DISABLE_COPY(WinReaderThread) +public: + explicit WinReaderThread(const QSharedPointer &context); + ~WinReaderThread(); + + virtual void run(); + +signals: + void error(const QString &); + +public slots: + void terminate(); + +private: + enum Handles { FileHandle, TerminateEventHandle, HandleCount }; + + inline int tryRead(); + + HANDLE m_handles[HandleCount]; +}; + +WinReaderThread::WinReaderThread(const QSharedPointer &context) : + ReaderThreadBase(context) +{ + m_handles[FileHandle] = NULL; + m_handles[TerminateEventHandle] = CreateEvent(NULL, FALSE, FALSE, NULL); +} + +WinReaderThread::~WinReaderThread() +{ + CloseHandle(m_handles[TerminateEventHandle]); +} + +// Return 0 to continue or error code +int WinReaderThread::tryRead() +{ + enum { BufSize = 1024 }; + char buffer[BufSize]; + // Check if there are already bytes waiting. If not, wait for first byte + COMSTAT comStat; + if (!ClearCommError(m_context->device, NULL, &comStat)){ + emit error(QString::fromLatin1("ClearCommError failed: %1").arg(winErrorMessage(GetLastError()))); + return -7; + } + const DWORD bytesToRead = qMax(DWORD(1), qMin(comStat.cbInQue, DWORD(BufSize))); + // Trigger read + DWORD bytesRead = 0; + if (ReadFile(m_context->device, &buffer, bytesToRead, &bytesRead, &m_context->readOverlapped)) { + if (bytesRead == 1) { + processData(buffer[0]); + } else { + processData(QByteArray(buffer, bytesRead)); + } + return 0; + } + const DWORD readError = GetLastError(); + if (readError != ERROR_IO_PENDING) { + emit error(QString::fromLatin1("Read error: %1").arg(winErrorMessage(readError))); + return -1; + } + // Wait for either termination or data + const DWORD wr = WaitForMultipleObjects(HandleCount, m_handles, false, INFINITE); + if (wr == WAIT_FAILED) { + emit error(QString::fromLatin1("Wait failed: %1").arg(winErrorMessage(GetLastError()))); + return -2; + } + if (wr - WAIT_OBJECT_0 == TerminateEventHandle) { + return 1; // Terminate + } + // Check data + if (!GetOverlappedResult(m_context->device, &m_context->readOverlapped, &bytesRead, true)) { + emit error(QString::fromLatin1("GetOverlappedResult failed: %1").arg(winErrorMessage(GetLastError()))); + return -3; + } + if (bytesRead == 1) { + processData(buffer[0]); + } else { + processData(QByteArray(buffer, bytesRead)); + } + return 0; +} + +void WinReaderThread::run() +{ + m_handles[FileHandle] = m_context->readOverlapped.hEvent; + while ( tryRead() == 0) ; +} + +void WinReaderThread::terminate() +{ + SetEvent(m_handles[TerminateEventHandle]); + wait(); +} + +typedef WinReaderThread ReaderThread; + +#else + +/////////////////////////////////////////////////////////////////////// +// +// UnixReaderThread: A thread reading from the device. +// Uses select() to wait and a special ioctl() to find out the number +// of bytes queued. For clean termination, the self-pipe trick is used. +// The class maintains a pipe, on whose read end the select waits besides +// the device file handle. To terminate, a byte is written to the pipe. +// +/////////////////////////////////////////////////////////////////////// + +static inline QString msgUnixCallFailedErrno(const char *func, int errorNumber) +{ + return QString::fromLatin1("Call to %1() failed: %2").arg(QLatin1String(func), QString::fromLocal8Bit(strerror(errorNumber))); +} + +class UnixReaderThread : public ReaderThreadBase { + Q_OBJECT + Q_DISABLE_COPY(UnixReaderThread) +public: + explicit UnixReaderThread(const QSharedPointer &context); + ~UnixReaderThread(); + + virtual void run(); + +signals: + void error(const QString &); + +public slots: + void terminate(); + +private: + inline int tryRead(); + + int m_terminatePipeFileDescriptors[2]; +}; + +UnixReaderThread::UnixReaderThread(const QSharedPointer &context) : + ReaderThreadBase(context) +{ + m_terminatePipeFileDescriptors[0] = m_terminatePipeFileDescriptors[1] = -1; + // Set up pipes for termination. Should not fail + if (pipe(m_terminatePipeFileDescriptors) < 0) + qWarning("%s\n", qPrintable(msgUnixCallFailedErrno("pipe", errno))); +} + +UnixReaderThread::~UnixReaderThread() +{ + close(m_terminatePipeFileDescriptors[0]); + close(m_terminatePipeFileDescriptors[1]); +} + +int UnixReaderThread::tryRead() +{ + fd_set readSet, tempReadSet, tempExceptionSet; + struct timeval timeOut; + const int fileDescriptor = m_context->file.handle(); + FD_ZERO(&readSet); + FD_SET(fileDescriptor, &readSet); + FD_SET(m_terminatePipeFileDescriptors[0], &readSet); + const int maxFileDescriptor = qMax(m_terminatePipeFileDescriptors[0], fileDescriptor); + int result = 0; + do { + memcpy(&tempReadSet, &readSet, sizeof(fd_set)); + memcpy(&tempExceptionSet, &readSet, sizeof(fd_set)); + timeOut.tv_sec = 1; + timeOut.tv_usec = 0; + result = select(maxFileDescriptor + 1, &tempReadSet, NULL, &tempExceptionSet, &timeOut); + } while ( result < 0 && errno == EINTR ); + // Timeout? + if (result == 0) + return 0; + // Something wrong? + if (result < 0) { + emit error(msgUnixCallFailedErrno("select", errno)); + return -1; + } + // Did the exception set trigger on the device? + if (FD_ISSET(fileDescriptor,&tempExceptionSet)) { + emit error(QLatin1String("An Exception occurred on the device.")); + return -2; + } + // Check termination pipe. + if (FD_ISSET(m_terminatePipeFileDescriptors[0], &tempReadSet) + || FD_ISSET(m_terminatePipeFileDescriptors[0], &tempExceptionSet)) + return 1; + + // determine number of pending bytes and read + int numBytes; + if (ioctl(fileDescriptor, FIONREAD, &numBytes) < 0) { + emit error(msgUnixCallFailedErrno("ioctl", errno)); + return -1; + } + m_context->mutex.lock(); + const QByteArray data = m_context->file.read(numBytes); + m_context->mutex.unlock(); + processData(data); + return 0; +} + +void UnixReaderThread::run() +{ + // Read loop + while (tryRead() == 0) + ; +} + +void UnixReaderThread::terminate() +{ + // Trigger select() by writing to the pipe + char c = 0; + const int written = write(m_terminatePipeFileDescriptors[1], &c, 1); + Q_UNUSED(written) + wait(); +} + +typedef UnixReaderThread ReaderThread; + +#endif + +/////////////////////////////////////////////////////////////////////// +// +// TrkDevicePrivate +// +/////////////////////////////////////////////////////////////////////// + +struct TrkDevicePrivate +{ + TrkDevicePrivate(); + + QSharedPointer deviceContext; + QSharedPointer writerThread; + QSharedPointer readerThread; + + QByteArray trkReadBuffer; + int verbose; + QString errorString; +}; + +/////////////////////////////////////////////////////////////////////// +// +// TrkDevice +// +/////////////////////////////////////////////////////////////////////// + +TrkDevicePrivate::TrkDevicePrivate() : + deviceContext(new DeviceContext), + verbose(0) +{ +} + +/////////////////////////////////////////////////////////////////////// +// +// TrkDevice +// +/////////////////////////////////////////////////////////////////////// + +TrkDevice::TrkDevice(QObject *parent) : + QObject(parent), + d(new TrkDevicePrivate) +{} + +TrkDevice::~TrkDevice() +{ + close(); + delete d; +} + +bool TrkDevice::open(const QString &port, QString *errorMessage) +{ + if (d->verbose) + qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame(); + close(); +#ifdef Q_OS_WIN + d->deviceContext->device = CreateFile(QString("\\\\.\\").append(port).toStdWString().c_str(), + GENERIC_READ | GENERIC_WRITE, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL|FILE_FLAG_NO_BUFFERING|FILE_FLAG_OVERLAPPED, + NULL); + + if (INVALID_HANDLE_VALUE == d->deviceContext->device) { + *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port, winErrorMessage(GetLastError())); + return false; + } + memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED)); + d->deviceContext->readOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + memset(&d->deviceContext->writeOverlapped, 0, sizeof(OVERLAPPED)); + d->deviceContext->writeOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (d->deviceContext->readOverlapped.hEvent == NULL || d->deviceContext->writeOverlapped.hEvent == NULL) { + *errorMessage = QString::fromLatin1("Failed to create events: %1").arg(winErrorMessage(GetLastError())); + return false; + } +#else + d->deviceContext->file.setFileName(port); + if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) { + *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(port, d->deviceContext->file.errorString()); + return false; + } + + struct termios termInfo; + if (tcgetattr(d->deviceContext->file.handle(), &termInfo) < 0) { + *errorMessage = QString::fromLatin1("Unable to retrieve terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); + return false; + } + // Turn off terminal echo as not get messages back, among other things + termInfo.c_cflag |= CREAD|CLOCAL; + termInfo.c_lflag &= (~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG)); + termInfo.c_iflag &= (~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY)); + termInfo.c_oflag &= (~OPOST); + termInfo.c_cc[VMIN] = 0; + termInfo.c_cc[VINTR] = _POSIX_VDISABLE; + termInfo.c_cc[VQUIT] = _POSIX_VDISABLE; + termInfo.c_cc[VSTART] = _POSIX_VDISABLE; + termInfo.c_cc[VSTOP] = _POSIX_VDISABLE; + termInfo.c_cc[VSUSP] = _POSIX_VDISABLE; + if (tcsetattr(d->deviceContext->file.handle(), TCSAFLUSH, &termInfo) < 0) { + *errorMessage = QString::fromLatin1("Unable to apply terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); + return false; + } +#endif + d->readerThread = QSharedPointer(new ReaderThread(d->deviceContext)); + connect(d->readerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), + Qt::QueuedConnection); + connect(d->readerThread.data(), SIGNAL(messageReceived(trk::TrkResult,QByteArray)), + this, SLOT(slotMessageReceived(trk::TrkResult,QByteArray)), + Qt::QueuedConnection); + d->readerThread->start(); + + d->writerThread = QSharedPointer(new WriterThread(d->deviceContext)); + connect(d->writerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), + Qt::QueuedConnection); + d->writerThread->start(); + + if (d->verbose) + qDebug() << "Opened" << port; + return true; +} + +void TrkDevice::close() +{ + if (!isOpen()) + return; + if (d->readerThread) + d->readerThread->terminate(); + if (d->writerThread) + d->writerThread->terminate(); +#ifdef Q_OS_WIN + CloseHandle(d->deviceContext->device); + d->deviceContext->device = INVALID_HANDLE_VALUE; + CloseHandle(d->deviceContext->readOverlapped.hEvent); + CloseHandle(d->deviceContext->writeOverlapped.hEvent); + d->deviceContext->readOverlapped.hEvent = d->deviceContext->writeOverlapped.hEvent = NULL; +#else + d->deviceContext->file.close(); +#endif + if (d->verbose) + emitLogMessage("Close"); +} + +bool TrkDevice::isOpen() const +{ +#ifdef Q_OS_WIN + return d->deviceContext->device != INVALID_HANDLE_VALUE; +#else + return d->deviceContext->file.isOpen(); +#endif +} + +QString TrkDevice::errorString() const +{ + return d->errorString; +} + +bool TrkDevice::serialFrame() const +{ + return d->deviceContext->serialFrame; +} + +void TrkDevice::setSerialFrame(bool f) +{ + d->deviceContext->serialFrame = f; +} + +int TrkDevice::verbose() const +{ + return d->verbose; +} + +void TrkDevice::setVerbose(int b) +{ + d->verbose = b; +} + +void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArray &rawData) +{ + d->writerThread->slotHandleResult(result); + if (d->verbose > 1) + qDebug() << "Received: " << result.toString(); + emit messageReceived(result); + if (!rawData.isEmpty()) + emit rawDataReceived(rawData); +} + +void TrkDevice::emitError(const QString &s) +{ + d->errorString = s; + qWarning("%s\n", qPrintable(s)); + emit error(s); +} + +void TrkDevice::sendTrkMessage(byte code, TrkCallback callback, + const QByteArray &data, const QVariant &cookie) +{ + if (!d->writerThread.isNull()) { + if (d->verbose > 1) { + QByteArray msg = "Sending: "; + msg += QByteArray::number(code, 16); + msg += ": "; + msg += stringFromArray(data).toLatin1(); + qDebug("%s", msg.data()); + } + d->writerThread->queueTrkMessage(code, callback, data, cookie); + } +} + +void TrkDevice::sendTrkInitialPing() +{ + if (!d->writerThread.isNull()) + d->writerThread->queueTrkInitialPing(); +} + +bool TrkDevice::sendTrkAck(byte token) +{ + if (d->writerThread.isNull()) + return false; + // The acknowledgement must not be queued! + TrkMessage msg(0x80, token); + msg.token = token; + msg.data.append('\0'); + if (verboseTrk) + qDebug() << "Write synchroneous message: " << msg; + return d->writerThread->trkWriteRawMessage(msg); + // 01 90 00 07 7e 80 01 00 7d 5e 7e +} + +void TrkDevice::emitLogMessage(const QString &msg) +{ + if (d->verbose) + qDebug("%s\n", qPrintable(msg)); + emit logMessage(msg); +} + +} // namespace trk + +#include "trkdevice.moc" diff --git a/tools/runonphone/symbianutils/trkdevice.h b/tools/runonphone/symbianutils/trkdevice.h new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/tools/runonphone/symbianutils/trkdevice.h @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef TRKDEVICE_H +#define TRKDEVICE_H + +#include "symbianutils_global.h" +#include "callback.h" + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE +class QIODevice; +QT_END_NAMESPACE + +namespace trk { + +struct TrkResult; +struct TrkMessage; +struct TrkDevicePrivate; + +/* TrkDevice: Implements a Windows COM or Linux device for + * Trk communications. Provides synchronous write and asynchronous + * read operation. + * The serialFrames property specifies whether packets are encapsulated in + * "0x90 " frames, which is currently the case for serial ports. + * Contains a write message queue allowing + * for queueing messages with a notification callback. If the message receives + * an ACK, the callback is invoked. + * The special message TRK_WRITE_QUEUE_NOOP_CODE code can be used for synchronisation. + * The respective message will not be sent, the callback is just invoked. */ + +enum { TRK_WRITE_QUEUE_NOOP_CODE = 0x7f }; + +typedef trk::Callback TrkCallback; + +class SYMBIANUTILS_EXPORT TrkDevice : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame) + Q_PROPERTY(bool verbose READ verbose WRITE setVerbose) +public: + explicit TrkDevice(QObject *parent = 0); + virtual ~TrkDevice(); + + bool open(const QString &port, QString *errorMessage); + bool isOpen() const; + + QString errorString() const; + + bool serialFrame() const; + void setSerialFrame(bool f); + + int verbose() const; + void setVerbose(int b); + + // Enqueue a message with a notification callback. + void sendTrkMessage(unsigned char code, + TrkCallback callBack = TrkCallback(), + const QByteArray &data = QByteArray(), + const QVariant &cookie = QVariant()); + + // Enqeue an initial ping + void sendTrkInitialPing(); + + // Send an Ack synchronously, bypassing the queue + bool sendTrkAck(unsigned char token); + +signals: + void messageReceived(const trk::TrkResult &result); + // Emitted with the contents of messages enclosed in 07e, not for log output + void rawDataReceived(const QByteArray &data); + void error(const QString &msg); + void logMessage(const QString &msg); + +private slots: + void slotMessageReceived(const trk::TrkResult &result, const QByteArray &a); + +protected slots: + void emitError(const QString &msg); + void emitLogMessage(const QString &msg); + +public slots: + void close(); + +private: + void readMessages(); + TrkDevicePrivate *d; +}; + +} // namespace trk + +#endif // TRKDEVICE_H diff --git a/tools/runonphone/symbianutils/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp new file mode 100644 index 0000000..5cce950 --- /dev/null +++ b/tools/runonphone/symbianutils/trkutils.cpp @@ -0,0 +1,479 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "trkutils.h" +#include + +#include +#include +#include +#include +#include + +#define logMessage(s) do { qDebug() << "TRKCLIENT: " << s; } while (0) + +namespace trk { + +TrkAppVersion::TrkAppVersion() +{ + reset(); +} + +void TrkAppVersion::reset() +{ + trkMajor = trkMinor= protocolMajor = protocolMinor = 0; +} + +Session::Session() +{ + reset(); +} + +void Session::reset() +{ + cpuMajor = 0; + cpuMinor = 0; + bigEndian = 0; + defaultTypeSize = 0; + fpTypeSize = 0; + extended1TypeSize = 0; + extended2TypeSize = 0; + pid = 0; + tid = 0; + codeseg = 0; + dataseg = 0; + + currentThread = 0; + libraries.clear(); + trkAppVersion.reset(); +} + +static QString formatCpu(int major, int minor) +{ + //: CPU description of an S60 device + //: %1 major verison, %2 minor version + //: %3 real name of major verison, %4 real name of minor version + const QString str = QCoreApplication::translate("trk::Session", "CPU: v%1.%2%3%4"); + QString majorStr; + QString minorStr; + switch (major) { + case 0x04: + majorStr = " ARM"; + break; + } + switch (minor) { + case 0x00: + minorStr = " 920T"; + break; + } + return str.arg(major).arg(minor).arg(majorStr).arg(minorStr); + } + +QString formatTrkVersion(const TrkAppVersion &version) +{ + QString str = QCoreApplication::translate("trk::Session", + "App TRK: v%1.%2 TRK protocol: v%3.%4"); + str = str.arg(version.trkMajor).arg(version.trkMinor); + return str.arg(version.protocolMajor).arg(version.protocolMinor); +} + +QString Session::deviceDescription(unsigned verbose) const +{ + if (!cpuMajor) + return QString(); + + //: s60description + //: description of an S60 device + //: %1 CPU description, %2 endianness + //: %3 default type size (if any), %4 float size (if any) + //: %5 TRK version + QString msg = QCoreApplication::translate("trk::Session", "%1, %2%3%4, %5"); + QString endianness = bigEndian + ? QCoreApplication::translate("trk::Session", "big endian") + : QCoreApplication::translate("trk::Session", "little endian"); + msg = msg.arg(formatCpu(cpuMajor, cpuMinor)).arg(endianness); + //: The separator in a list of strings + QString defaultTypeSizeStr; + QString fpTypeSizeStr; + if (verbose && defaultTypeSize) + //: will be inserted into s60description + defaultTypeSizeStr = QCoreApplication::translate("trk::Session", ", type size: %1").arg(defaultTypeSize); + if (verbose && fpTypeSize) + //: will be inserted into s60description + fpTypeSizeStr = QCoreApplication::translate("trk::Session", ", float size: %1").arg(fpTypeSize); + msg = msg.arg(defaultTypeSizeStr).arg(fpTypeSizeStr); + return msg.arg(formatTrkVersion(trkAppVersion)); +} + + +QByteArray decode7d(const QByteArray &ba) +{ + QByteArray res; + res.reserve(ba.size()); + for (int i = 0; i < ba.size(); ++i) { + byte c = byte(ba.at(i)); + if (c == 0x7d) { + ++i; + c = 0x20 ^ byte(ba.at(i)); + } + res.append(c); + } + return res; +} + +QByteArray encode7d(const QByteArray &ba) +{ + QByteArray res; + res.reserve(ba.size() + 2); + for (int i = 0; i < ba.size(); ++i) { + byte c = byte(ba.at(i)); + if (c == 0x7e || c == 0x7d) { + res.append(0x7d); + res.append(0x20 ^ c); + } else { + res.append(c); + } + } + return res; +} + +// FIXME: Use the QByteArray based version below? +static inline QString stringFromByte(byte c) +{ + return QString::fromLatin1("%1").arg(c, 2, 16, QChar('0')); +} + +SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen) +{ + QString str; + QString ascii; + const int size = maxLen == -1 ? ba.size() : qMin(ba.size(), maxLen); + for (int i = 0; i < size; ++i) { + //if (i == 5 || i == ba.size() - 2) + // str += " "; + int c = byte(ba.at(i)); + str += QString("%1 ").arg(c, 2, 16, QChar('0')); + if (i >= 8 && i < ba.size() - 2) + ascii += QChar(c).isPrint() ? QChar(c) : QChar('.'); + } + if (size != ba.size()) { + str += "..."; + ascii += "..."; + } + return str + " " + ascii; +} + +SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits) +{ + QByteArray ba = QByteArray::number(n, 16); + if (digits == 0 || ba.size() == digits) + return ba; + return QByteArray(digits - ba.size(), '0') + ba; +} + +SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits) +{ + return "0x" + hexNumber(n, digits); +} + +TrkResult::TrkResult() : + code(0), + token(0), + isDebugOutput(false) +{ +} + +void TrkResult::clear() +{ + code = token= 0; + isDebugOutput = false; + data.clear(); + cookie = QVariant(); +} + +QString TrkResult::toString() const +{ + QString res = stringFromByte(code); + res += QLatin1String(" ["); + res += stringFromByte(token); + res += QLatin1Char(']'); + res += QLatin1Char(' '); + res += stringFromArray(data); + return res; +} + +QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame) +{ + byte s = command + token; + for (int i = 0; i != data.size(); ++i) + s += data.at(i); + byte checksum = 255 - (s & 0xff); + //int x = s + ~s; + //logMessage("check: " << s << checksum << x; + + QByteArray response; + response.reserve(data.size() + 3); + response.append(char(command)); + response.append(char(token)); + response.append(data); + response.append(char(checksum)); + + QByteArray encodedData = encode7d(response); + + QByteArray ba; + ba.reserve(encodedData.size() + 6); + if (serialFrame) { + ba.append(char(0x01)); + ba.append(char(0x90)); + const ushort encodedSize = encodedData.size() + 2; // 2 x 0x7e + appendShort(&ba, encodedSize, BigEndian); + } + ba.append(char(0x7e)); + ba.append(encodedData); + ba.append(char(0x7e)); + + return ba; +} + +/* returns 0 if array doesn't represent a result, +otherwise returns the length of the result data */ +ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) +{ + if (serialFrame) { + // Serial protocol with length info + if (buffer.length() < 4) + return 0; + if (buffer.at(0) != 0x01 || byte(buffer.at(1)) != 0x90) + return 0; + const ushort len = extractShort(buffer.data() + 2); + return (buffer.size() >= len + 4) ? len : ushort(0); + } + // Frameless protocol without length info + const char delimiter = char(0x7e); + const int firstDelimiterPos = buffer.indexOf(delimiter); + // Regular message delimited by 0x7e..0x7e + if (firstDelimiterPos == 0) { + const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1); + return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0; + } + // Some ASCII log message up to first delimiter or all + return firstDelimiterPos != -1 ? firstDelimiterPos : buffer.size(); +} + +bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByteArray *rawData) +{ + result->clear(); + if(rawData) + rawData->clear(); + const ushort len = isValidTrkResult(*buffer, serialFrame); + if (!len) + return false; + // handle receiving application output, which is not a regular command + const int delimiterPos = serialFrame ? 4 : 0; + if (buffer->at(delimiterPos) != 0x7e) { + result->isDebugOutput = true; + result->data = buffer->mid(delimiterPos, len); + result->data.replace("\r\n", "\n"); + *buffer->remove(0, delimiterPos + len); + return true; + } + // FIXME: what happens if the length contains 0xfe? + // Assume for now that it passes unencoded! + const QByteArray data = decode7d(buffer->mid(delimiterPos + 1, len - 2)); + if(rawData) + *rawData = data; + *buffer->remove(0, delimiterPos + len); + + byte sum = 0; + for (int i = 0; i < data.size(); ++i) // 3 = 2 * 0xfe + sum + sum += byte(data.at(i)); + if (sum != 0xff) + logMessage("*** CHECKSUM ERROR: " << byte(sum)); + + result->code = data.at(0); + result->token = data.at(1); + result->data = data.mid(2, data.size() - 3); + //logMessage(" REST BUF: " << stringFromArray(*buffer)); + //logMessage(" CURR DATA: " << stringFromArray(data)); + //QByteArray prefix = "READ BUF: "; + //logMessage((prefix + "HEADER: " + stringFromArray(header).toLatin1()).data()); + return true; +} + +SYMBIANUTILS_EXPORT ushort extractShort(const char *data) +{ + return byte(data[0]) * 256 + byte(data[1]); +} + +SYMBIANUTILS_EXPORT uint extractInt(const char *data) +{ + uint res = byte(data[0]); + res *= 256; res += byte(data[1]); + res *= 256; res += byte(data[2]); + res *= 256; res += byte(data[3]); + return res; +} + +SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba) +{ + QString res; + char buf[10]; + for (int i = 0, n = ba.size(); i != n; ++i) { + const byte c = ba.at(i); + if (isprint(c)) { + res += c; + } else { + qsnprintf(buf, sizeof(buf) - 1, "\\%x", int(c)); + res += buf; + } + } + return res; +} + +SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness endian) +{ + if (endian == BigEndian) { + ba->append(s / 256); + ba->append(s % 256); + } else { + ba->append(s % 256); + ba->append(s / 256); + } +} + +SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness endian) +{ + const uchar b3 = i % 256; i /= 256; + const uchar b2 = i % 256; i /= 256; + const uchar b1 = i % 256; i /= 256; + const uchar b0 = i; + ba->reserve(ba->size() + 4); + if (endian == BigEndian) { + ba->append(b0); + ba->append(b1); + ba->append(b2); + ba->append(b3); + } else { + ba->append(b3); + ba->append(b2); + ba->append(b1); + ba->append(b0); + } +} + +void appendString(QByteArray *ba, const QByteArray &str, Endianness endian, bool appendNullTerminator) +{ + const int fullSize = str.size() + (appendNullTerminator ? 1 : 0); + appendShort(ba, fullSize, endian); // count the terminating \0 + ba->append(str); + if (appendNullTerminator) + ba->append('\0'); +} + +void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness endian) +{ + // convert the QDateTime to UTC and append its representation to QByteArray + // format is the same as in FAT file system + dateTime = dateTime.toUTC(); + const QTime utcTime = dateTime.time(); + const QDate utcDate = dateTime.date(); + uint fatDateTime = (utcTime.hour() << 11 | utcTime.minute() << 5 | utcTime.second()/2) << 16; + fatDateTime |= (utcDate.year()-1980) << 9 | utcDate.month() << 5 | utcDate.day(); + appendInt(ba, fatDateTime, endian); +} + +QByteArray errorMessage(byte code) +{ + switch (code) { + case 0x00: return "No error"; + case 0x01: return "Generic error in CWDS message"; + case 0x02: return "Unexpected packet size in send msg"; + case 0x03: return "Internal error occurred in CWDS"; + case 0x04: return "Escape followed by frame flag"; + case 0x05: return "Bad FCS in packet"; + case 0x06: return "Packet too long"; + case 0x07: return "Sequence ID not expected (gap in sequence)"; + + case 0x10: return "Command not supported"; + case 0x11: return "Command param out of range"; + case 0x12: return "An option was not supported"; + case 0x13: return "Read/write to invalid memory"; + case 0x14: return "Read/write invalid registers"; + case 0x15: return "Exception occurred in CWDS"; + case 0x16: return "Targeted system or thread is running"; + case 0x17: return "Breakpoint resources (HW or SW) exhausted"; + case 0x18: return "Requested breakpoint conflicts with existing one"; + + case 0x20: return "General OS-related error"; + case 0x21: return "Request specified invalid process"; + case 0x22: return "Request specified invalid thread"; + } + return "Unknown error"; +} + +uint swapEndian(uint in) +{ + return (in>>24) | ((in<<8) & 0x00FF0000) | ((in>>8) & 0x0000FF00) | (in<<24); +} + +int TrkResult::errorCode() const +{ + // NAK means always error, else data sized 1 with a non-null element + const bool isNAK = code == 0xff; + if (data.size() != 1 && !isNAK) + return 0; + if (const int errorCode = data.at(0)) + return errorCode; + return isNAK ? 0xff : 0; +} + +QString TrkResult::errorString() const +{ + // NAK means always error, else data sized 1 with a non-null element + if (code == 0xff) + return "NAK"; + if (data.size() < 1) + return "Unknown error packet"; + return errorMessage(data.at(0)); +} + +} // namespace trk + diff --git a/tools/runonphone/symbianutils/trkutils.h b/tools/runonphone/symbianutils/trkutils.h new file mode 100644 index 0000000..3a485c7 --- /dev/null +++ b/tools/runonphone/symbianutils/trkutils.h @@ -0,0 +1,185 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DEBUGGER_TRK_UTILS +#define DEBUGGER_TRK_UTILS + +#include "symbianutils_global.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE +class QDateTime; +QT_END_NAMESPACE + +namespace trk { + +typedef unsigned char byte; + +enum Command { + TrkPing = 0x00, + TrkConnect = 0x01, + TrkDisconnect = 0x02, + TrkVersions = 0x04, + TrkSupported = 0x05, + TrkCpuType = 0x06, + TrkHostVersions = 0x09, + TrkContinue = 0x18, + TrkCreateItem = 0x40, + TrkDeleteItem = 0x41, + + TrkWriteFile = 0x48, + TrkOpenFile = 0x4a, + TrkCloseFile = 0x4b, + TrkInstallFile = 0x4d, + TrkInstallFile2 = 0x4e, + + TrkNotifyAck = 0x80, + TrkNotifyNak = 0xff, + TrkNotifyStopped = 0x90, + TrkNotifyException = 0x91, + TrkNotifyInternalError = 0x92, + TrkNotifyCreated = 0xa0, + TrkNotifyDeleted = 0xa1, + TrkNotifyProcessorStarted = 0xa2, + TrkNotifyProcessorStandBy = 0xa6, + TrkNotifyProcessorReset = 0xa7 +}; + +inline byte extractByte(const char *data) { return *data; } +SYMBIANUTILS_EXPORT ushort extractShort(const char *data); +SYMBIANUTILS_EXPORT uint extractInt(const char *data); + +SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); + +// produces "xx xx xx " +SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen = - 1); + +enum Endianness +{ + LittleEndian, + BigEndian, + TargetByteOrder = BigEndian, +}; + +SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder); +SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder); +SYMBIANUTILS_EXPORT void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true); + +struct SYMBIANUTILS_EXPORT Library +{ + Library() {} + + QByteArray name; + uint codeseg; + uint dataseg; +}; + +struct SYMBIANUTILS_EXPORT TrkAppVersion +{ + TrkAppVersion(); + void reset(); + + int trkMajor; + int trkMinor; + int protocolMajor; + int protocolMinor; +}; + +struct SYMBIANUTILS_EXPORT Session +{ + Session(); + void reset(); + QString deviceDescription(unsigned verbose) const; + + // Trk feedback + byte cpuMajor; + byte cpuMinor; + byte bigEndian; + byte defaultTypeSize; + byte fpTypeSize; + byte extended1TypeSize; + byte extended2TypeSize; + TrkAppVersion trkAppVersion; + uint pid; + uint tid; + uint codeseg; + uint dataseg; + QHash addressToBP; + + typedef QList Libraries; + Libraries libraries; + + typedef uint Thread; + typedef QList Threads; + Threads threads; + + // Gdb request + uint currentThread; + QStringList modules; +}; + +struct SYMBIANUTILS_EXPORT TrkResult +{ + TrkResult(); + void clear(); + QString toString() const; + // 0 for no error. + int errorCode() const; + QString errorString() const; + + byte code; + byte token; + QByteArray data; + QVariant cookie; + bool isDebugOutput; +}; + +SYMBIANUTILS_EXPORT QByteArray errorMessage(byte code); +SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits = 0); +SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too +SYMBIANUTILS_EXPORT uint swapEndian(uint in); + +} // namespace trk + +#endif // DEBUGGER_TRK_UTILS diff --git a/tools/runonphone/symbianutils/trkutils_p.h b/tools/runonphone/symbianutils/trkutils_p.h new file mode 100644 index 0000000..12b0109 --- /dev/null +++ b/tools/runonphone/symbianutils/trkutils_p.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DEBUGGER_TRK_PRIVATE_UTILS +#define DEBUGGER_TRK_PRIVATE_UTILS + +#include "trkutils.h" +#include "symbianutils_global.h" + +QT_BEGIN_NAMESPACE +class QDateTime; +QT_END_NAMESPACE + +namespace trk { + +void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder); +// returns a QByteArray containing optionally +// the serial frame [0x01 0x90 ] and 0x7e encoded7d(ba) 0x7e +QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame); +bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0); + +} // namespace trk + +#endif // DEBUGGER_TRK_PRIVATE_UTILS diff --git a/tools/runonphone/trk/bluetoothlistener.cpp b/tools/runonphone/trk/bluetoothlistener.cpp deleted file mode 100644 index df04288..0000000 --- a/tools/runonphone/trk/bluetoothlistener.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "bluetoothlistener.h" -#include "trkdevice.h" - -#include - -#ifdef Q_OS_UNIX -# include -# include -#else -# include -#endif - -// Process id helpers. -#ifdef Q_OS_WIN -inline DWORD processId(const QProcess &p) -{ - if (const Q_PID processInfoStruct = p.pid()) - return processInfoStruct->dwProcessId; - return 0; -} -#else -inline Q_PID processId(const QProcess &p) -{ - return p.pid(); -} -#endif - - -enum { debug = 0 }; - -namespace trk { - -struct BluetoothListenerPrivate { - BluetoothListenerPrivate(); - QString device; - QProcess process; -#ifdef Q_OS_WIN - DWORD pid; -#else - Q_PID pid; -#endif - bool printConsoleMessages; - BluetoothListener::Mode mode; -}; - -BluetoothListenerPrivate::BluetoothListenerPrivate() : - pid(0), - printConsoleMessages(false), - mode(BluetoothListener::Listen) -{ -} - -BluetoothListener::BluetoothListener(QObject *parent) : - QObject(parent), - d(new BluetoothListenerPrivate) -{ - d->process.setProcessChannelMode(QProcess::MergedChannels); - - connect(&d->process, SIGNAL(readyReadStandardError()), - this, SLOT(slotStdError())); - connect(&d->process, SIGNAL(readyReadStandardOutput()), - this, SLOT(slotStdOutput())); - connect(&d->process, SIGNAL(finished(int, QProcess::ExitStatus)), - this, SLOT(slotProcessFinished(int,QProcess::ExitStatus))); - connect(&d->process, SIGNAL(error(QProcess::ProcessError)), - this, SLOT(slotProcessError(QProcess::ProcessError))); -} - -BluetoothListener::~BluetoothListener() -{ - const int trc = terminateProcess(); - if (debug) - qDebug() << "~BluetoothListener: terminated" << trc; - delete d; -} - -BluetoothListener::Mode BluetoothListener::mode() const -{ - return d->mode; -} - -void BluetoothListener::setMode(Mode m) -{ - d->mode = m; -} - -bool BluetoothListener::printConsoleMessages() const -{ - return d->printConsoleMessages; -} - -void BluetoothListener::setPrintConsoleMessages(bool p) -{ - d->printConsoleMessages = p; -} - -int BluetoothListener::terminateProcess() -{ - enum { TimeOutMS = 200 }; - if (debug) - qDebug() << "terminateProcess" << d->process.pid() << d->process.state(); - if (d->process.state() == QProcess::NotRunning) - return -1; - emitMessage(tr("%1: Stopping listener %2...").arg(d->device).arg(processId(d->process))); - // When listening, the process should terminate by itself after closing the connection - if (mode() == Listen && d->process.waitForFinished(TimeOutMS)) - return 0; -#ifdef Q_OS_UNIX - kill(d->process.pid(), SIGHUP); // Listens for SIGHUP - if (d->process.waitForFinished(TimeOutMS)) - return 1; -#endif - d->process.terminate(); - if (d->process.waitForFinished(TimeOutMS)) - return 2; - d->process.kill(); - return 3; -} - -bool BluetoothListener::start(const QString &device, QString *errorMessage) -{ - if (d->process.state() != QProcess::NotRunning) { - *errorMessage = QLatin1String("Internal error: Still running."); - return false; - } - d->device = device; - const QString binary = QLatin1String("rfcomm"); - QStringList arguments; - arguments << QLatin1String("-r") - << (d->mode == Listen ? QLatin1String("listen") : QLatin1String("watch")) - << device << QString(QLatin1Char('1')); - if (debug) - qDebug() << binary << arguments; - emitMessage(tr("%1: Starting Bluetooth listener %2...").arg(device, binary)); - d->pid = 0; - d->process.start(binary, arguments); - if (!d->process.waitForStarted()) { - *errorMessage = tr("Unable to run '%1': %2").arg(binary, d->process.errorString()); - return false; - } - d->pid = processId(d->process); // Forgets it after crash/termination - emitMessage(tr("%1: Bluetooth listener running (%2).").arg(device).arg(processId(d->process))); - return true; -} - -void BluetoothListener::slotStdOutput() -{ - emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput())); -} - -void BluetoothListener::emitMessage(const QString &m) -{ - if (d->printConsoleMessages || debug) - qDebug("%s\n", qPrintable(m)); - emit message(m); -} - -void BluetoothListener::slotStdError() -{ - emitMessage(QString::fromLocal8Bit(d->process.readAllStandardError())); -} - -void BluetoothListener::slotProcessFinished(int ex, QProcess::ExitStatus state) -{ - switch (state) { - case QProcess::NormalExit: - emitMessage(tr("%1: Process %2 terminated with exit code %3.") - .arg(d->device).arg(d->pid).arg(ex)); - break; - case QProcess::CrashExit: - emitMessage(tr("%1: Process %2 crashed.").arg(d->device).arg(d->pid)); - break; - } - emit terminated(); -} - -void BluetoothListener::slotProcessError(QProcess::ProcessError error) -{ - emitMessage(tr("%1: Process error %2: %3") - .arg(d->device).arg(error).arg(d->process.errorString())); -} - -} // namespace trk diff --git a/tools/runonphone/trk/bluetoothlistener.h b/tools/runonphone/trk/bluetoothlistener.h deleted file mode 100644 index 36894e7..0000000 --- a/tools/runonphone/trk/bluetoothlistener.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef BLUETOOTHLISTENER_H -#define BLUETOOTHLISTENER_H - -#include "symbianutils_global.h" - -#include -#include - -namespace trk { -struct BluetoothListenerPrivate; - -/* BluetoothListener: Starts a helper process watching connections on a - * Bluetooth device, Linux only: - * The rfcomm command is used. It process can be started in the background - * while connection attempts (TrkDevice::open()) are made in the foreground. */ - -class SYMBIANUTILS_EXPORT BluetoothListener : public QObject -{ - Q_OBJECT - Q_DISABLE_COPY(BluetoothListener) -public: - // The Mode property must be set before calling start(). - enum Mode { - Listen, /* Terminate after client closed (read: Trk app - * on the phone terminated or disconnected).*/ - Watch // Keep running, watch for next connection from client - }; - - explicit BluetoothListener(QObject *parent = 0); - virtual ~BluetoothListener(); - - Mode mode() const; - void setMode(Mode m); - - bool start(const QString &device, QString *errorMessage); - - // Print messages on the console. - bool printConsoleMessages() const; - void setPrintConsoleMessages(bool p); - -signals: - void terminated(); - void message(const QString &); - -public slots: - void emitMessage(const QString &m); // accessed by starter - -private slots: - void slotStdOutput(); - void slotStdError(); - void slotProcessFinished(int, QProcess::ExitStatus); - void slotProcessError(QProcess::ProcessError error); - -private: - int terminateProcess(); - - BluetoothListenerPrivate *d; -}; - -} // namespace trk - -#endif // BLUETOOTHLISTENER_H diff --git a/tools/runonphone/trk/bluetoothlistener_gui.cpp b/tools/runonphone/trk/bluetoothlistener_gui.cpp deleted file mode 100644 index 5994eb5..0000000 --- a/tools/runonphone/trk/bluetoothlistener_gui.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "bluetoothlistener_gui.h" -#include "bluetoothlistener.h" -#include "communicationstarter.h" - -#include -#include -#include -#include - -namespace trk { - -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartCommunication(BaseCommunicationStarter &starter, - const QString &msgBoxTitle, - const QString &msgBoxText, - QWidget *msgBoxParent, - QString *errorMessage) -{ - errorMessage->clear(); - // Initial connection attempt. - switch (starter.start()) { - case BaseCommunicationStarter::Started: - break; - case BaseCommunicationStarter::ConnectionSucceeded: - return PromptStartCommunicationConnected; - case BaseCommunicationStarter::StartError: - *errorMessage = starter.errorString(); - return PromptStartCommunicationError; - } - // Run the starter with the event loop of a message box, have the box - // closed by the signals of the starter. - QMessageBox messageBox(QMessageBox::Information, msgBoxTitle, msgBoxText, QMessageBox::Cancel, msgBoxParent); - QObject::connect(&starter, SIGNAL(connected()), &messageBox, SLOT(close())); - QObject::connect(&starter, SIGNAL(timeout()), &messageBox, SLOT(close())); - messageBox.exec(); - // Only starter.state() is reliable here to obtain the state. - switch (starter.state()) { - case AbstractBluetoothStarter::Running: - *errorMessage = QCoreApplication::translate("trk::promptStartCommunication", "Connection on %1 canceled.").arg(starter.device()); - return PromptStartCommunicationCanceled; - case AbstractBluetoothStarter::TimedOut: - *errorMessage = starter.errorString(); - return PromptStartCommunicationError; - case AbstractBluetoothStarter::Connected: - break; - } - return PromptStartCommunicationConnected; -} - -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartSerial(BaseCommunicationStarter &starter, - QWidget *msgBoxParent, - QString *errorMessage) -{ - const QString title = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for App TRK"); - const QString message = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for App TRK to start on %1...").arg(starter.device()); - return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage); -} - -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartBluetooth(BaseCommunicationStarter &starter, - QWidget *msgBoxParent, - QString *errorMessage) -{ - const QString title = QCoreApplication::translate("trk::promptStartCommunication", "Waiting for Bluetooth Connection"); - const QString message = QCoreApplication::translate("trk::promptStartCommunication", "Connecting to %1...").arg(starter.device()); - return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage); -} - -} // namespace trk diff --git a/tools/runonphone/trk/bluetoothlistener_gui.h b/tools/runonphone/trk/bluetoothlistener_gui.h deleted file mode 100644 index 10e7145..0000000 --- a/tools/runonphone/trk/bluetoothlistener_gui.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef BLUETOOTHLISTENER_GUI_H -#define BLUETOOTHLISTENER_GUI_H - -#include "symbianutils_global.h" - -#include - -QT_BEGIN_NAMESPACE -class QWidget; -QT_END_NAMESPACE - -namespace trk { -class BaseCommunicationStarter; - -/* promptStartCommunication(): Convenience functions that - * prompt the user to start a communication (launching or - * connecting TRK) using a modal message box in which they can cancel. - * Pass in the starter with device and parameters set up. */ - -enum PromptStartCommunicationResult { - PromptStartCommunicationConnected, - PromptStartCommunicationCanceled, - PromptStartCommunicationError -}; - -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartCommunication(BaseCommunicationStarter &starter, - const QString &msgBoxTitle, - const QString &msgBoxText, - QWidget *msgBoxParent, - QString *errorMessage); - -// Convenience to start a serial connection (messages prompting -// to launch Trk). -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartSerial(BaseCommunicationStarter &starter, - QWidget *msgBoxParent, - QString *errorMessage); - -// Convenience to start blue tooth connection (messages -// prompting to connect). -SYMBIANUTILS_EXPORT PromptStartCommunicationResult - promptStartBluetooth(BaseCommunicationStarter &starter, - QWidget *msgBoxParent, - QString *errorMessage); -} // namespace trk - -#endif // BLUETOOTHLISTENER_GUI_H diff --git a/tools/runonphone/trk/callback.h b/tools/runonphone/trk/callback.h deleted file mode 100644 index 3996d73..0000000 --- a/tools/runonphone/trk/callback.h +++ /dev/null @@ -1,160 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef DEBUGGER_CALLBACK_H -#define DEBUGGER_CALLBACK_H - -#include "symbianutils_global.h" - -namespace trk { -namespace Internal { - -/* Helper class for the 1-argument functor: - * Cloneable base class for the implementation which is - * invokeable with the argument. */ -template -class CallbackImplBase -{ - Q_DISABLE_COPY(CallbackImplBase) -public: - CallbackImplBase() {} - virtual CallbackImplBase *clone() const = 0; - virtual void invoke(Argument a) = 0; - virtual ~CallbackImplBase() {} -}; - -/* Helper class for the 1-argument functor: Implementation for - * a class instance with a member function pointer. */ -template -class CallbackMemberPtrImpl : public CallbackImplBase -{ -public: - typedef void (Class::*MemberFuncPtr)(Argument); - - CallbackMemberPtrImpl(Class *instance, - MemberFuncPtr memberFunc) : - m_instance(instance), - m_memberFunc(memberFunc) {} - - virtual CallbackImplBase *clone() const - { - return new CallbackMemberPtrImpl(m_instance, m_memberFunc); - } - - virtual void invoke(Argument a) - { (m_instance->*m_memberFunc)(a); } -private: - Class *m_instance; - MemberFuncPtr m_memberFunc; -}; - -} // namespace Internal - -/* Default-constructible, copyable 1-argument functor providing an - * operator()(Argument) that invokes a member function of a class: - * \code -class Foo { -public: - void print(const std::string &); -}; -... -Foo foo; -Callback f1(&foo, &Foo::print); -f1("test"); -\endcode */ - -template -class Callback -{ -public: - Callback() : m_impl(0) {} - - template - Callback(Class *instance, void (Class::*memberFunc)(Argument)) : - m_impl(new Internal::CallbackMemberPtrImpl(instance, memberFunc)) - {} - - ~Callback() - { - clean(); - } - - Callback(const Callback &rhs) : - m_impl(0) - { - if (rhs.m_impl) - m_impl = rhs.m_impl->clone(); - } - - Callback &operator=(const Callback &rhs) - { - if (this != &rhs) { - clean(); - if (rhs.m_impl) - m_impl = rhs.m_impl->clone(); - } - return *this; - } - - bool isNull() const { return m_impl == 0; } - operator bool() const { return !isNull(); } - - void operator()(Argument a) - { - if (m_impl) - m_impl->invoke(a); - } - -private: - void clean() - { - if (m_impl) { - delete m_impl; - m_impl = 0; - } - } - - Internal::CallbackImplBase *m_impl; -}; - -} // namespace trk - -#endif // DEBUGGER_CALLBACK_H diff --git a/tools/runonphone/trk/communicationstarter.cpp b/tools/runonphone/trk/communicationstarter.cpp deleted file mode 100644 index e5e556e..0000000 --- a/tools/runonphone/trk/communicationstarter.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "communicationstarter.h" -#include "bluetoothlistener.h" -#include "trkdevice.h" - -#include -#include - -namespace trk { - -// --------------- AbstractBluetoothStarter -struct BaseCommunicationStarterPrivate { - explicit BaseCommunicationStarterPrivate(const BaseCommunicationStarter::TrkDevicePtr &d); - - const BaseCommunicationStarter::TrkDevicePtr trkDevice; - BluetoothListener *listener; - QTimer *timer; - int intervalMS; - int attempts; - int n; - QString device; - QString errorString; - BaseCommunicationStarter::State state; -}; - -BaseCommunicationStarterPrivate::BaseCommunicationStarterPrivate(const BaseCommunicationStarter::TrkDevicePtr &d) : - trkDevice(d), - listener(0), - timer(0), - intervalMS(1000), - attempts(-1), - n(0), - device(QLatin1String("/dev/rfcomm0")), - state(BaseCommunicationStarter::TimedOut) -{ -} - -BaseCommunicationStarter::BaseCommunicationStarter(const TrkDevicePtr &trkDevice, QObject *parent) : - QObject(parent), - d(new BaseCommunicationStarterPrivate(trkDevice)) -{ -} - -BaseCommunicationStarter::~BaseCommunicationStarter() -{ - stopTimer(); - delete d; -} - -void BaseCommunicationStarter::stopTimer() -{ - if (d->timer && d->timer->isActive()) - d->timer->stop(); -} - -bool BaseCommunicationStarter::initializeStartupResources(QString *errorMessage) -{ - errorMessage->clear(); - return true; -} - -BaseCommunicationStarter::StartResult BaseCommunicationStarter::start() -{ - if (state() == Running) { - d->errorString = QLatin1String("Internal error, attempt to re-start BaseCommunicationStarter.\n"); - return StartError; - } - // Before we instantiate timers, and such, try to open the device, - // which should succeed if another listener is already running in - // 'Watch' mode - if (d->trkDevice->open(d->device , &(d->errorString))) - return ConnectionSucceeded; - // Pull up resources for next attempt - d->n = 0; - if (!initializeStartupResources(&(d->errorString))) - return StartError; - // Start timer - if (!d->timer) { - d->timer = new QTimer; - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimer())); - } - d->timer->setInterval(d->intervalMS); - d->timer->setSingleShot(false); - d->timer->start(); - d->state = Running; - return Started; -} - -BaseCommunicationStarter::State BaseCommunicationStarter::state() const -{ - return d->state; -} - -int BaseCommunicationStarter::intervalMS() const -{ - return d->intervalMS; -} - -void BaseCommunicationStarter::setIntervalMS(int i) -{ - d->intervalMS = i; - if (d->timer) - d->timer->setInterval(i); -} - -int BaseCommunicationStarter::attempts() const -{ - return d->attempts; -} - -void BaseCommunicationStarter::setAttempts(int a) -{ - d->attempts = a; -} - -QString BaseCommunicationStarter::device() const -{ - return d->device; -} - -void BaseCommunicationStarter::setDevice(const QString &dv) -{ - d->device = dv; -} - -QString BaseCommunicationStarter::errorString() const -{ - return d->errorString; -} - -void BaseCommunicationStarter::slotTimer() -{ - ++d->n; - // Check for timeout - if (d->attempts >= 0 && d->n >= d->attempts) { - stopTimer(); - d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n) - .arg(d->device).arg(d->intervalMS); - d->state = TimedOut; - emit timeout(); - } else { - // Attempt n to connect? - if (d->trkDevice->open(d->device , &(d->errorString))) { - stopTimer(); - const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->device).arg(d->n); - emit message(msg); - d->state = Connected; - emit connected(); - } else { - const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...") - .arg(d->device).arg(d->n).arg(d->errorString); - emit message(msg); - } - } -} - -// --------------- AbstractBluetoothStarter - -AbstractBluetoothStarter::AbstractBluetoothStarter(const TrkDevicePtr &trkDevice, QObject *parent) : - BaseCommunicationStarter(trkDevice, parent) -{ -} - -bool AbstractBluetoothStarter::initializeStartupResources(QString *errorMessage) -{ - // Create the listener and forward messages to it. - BluetoothListener *listener = createListener(); - connect(this, SIGNAL(message(QString)), listener, SLOT(emitMessage(QString))); - return listener->start(device(), errorMessage); -} - -// -------- ConsoleBluetoothStarter -ConsoleBluetoothStarter::ConsoleBluetoothStarter(const TrkDevicePtr &trkDevice, - QObject *listenerParent, - QObject *parent) : -AbstractBluetoothStarter(trkDevice, parent), -m_listenerParent(listenerParent) -{ -} - -BluetoothListener *ConsoleBluetoothStarter::createListener() -{ - BluetoothListener *rc = new BluetoothListener(m_listenerParent); - rc->setMode(BluetoothListener::Listen); - rc->setPrintConsoleMessages(true); - return rc; -} - -bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice, - QObject *listenerParent, - const QString &device, - int attempts, - QString *errorMessage) -{ - // Set up a console starter to print to stdout. - ConsoleBluetoothStarter starter(trkDevice, listenerParent); - starter.setDevice(device); - starter.setAttempts(attempts); - switch (starter.start()) { - case Started: - break; - case ConnectionSucceeded: - return true; - case StartError: - *errorMessage = starter.errorString(); - return false; - } - // Run the starter with an event loop. @ToDo: Implement - // some asynchronous keypress read to cancel. - QEventLoop eventLoop; - connect(&starter, SIGNAL(connected()), &eventLoop, SLOT(quit())); - connect(&starter, SIGNAL(timeout()), &eventLoop, SLOT(quit())); - eventLoop.exec(QEventLoop::ExcludeUserInputEvents); - if (starter.state() != AbstractBluetoothStarter::Connected) { - *errorMessage = starter.errorString(); - return false; - } - return true; -} -} // namespace trk diff --git a/tools/runonphone/trk/communicationstarter.h b/tools/runonphone/trk/communicationstarter.h deleted file mode 100644 index 2d7dc50..0000000 --- a/tools/runonphone/trk/communicationstarter.h +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef COMMUNICATIONSTARTER_H -#define COMMUNICATIONSTARTER_H - -#include "symbianutils_global.h" - -#include -#include - -namespace trk { -class TrkDevice; -class BluetoothListener; -struct BaseCommunicationStarterPrivate; - -/* BaseCommunicationStarter: A QObject that repeatedly tries to open a - * trk device until a connection succeeds or a timeout occurs (emitting - * signals), allowing to do something else in the foreground (local event loop - * [say QMessageBox] or some asynchronous operation). If the initial - * connection attempt in start() fails, the - * virtual initializeStartupResources() is called to initialize resources - * required to pull up the communication (namely Bluetooth listeners). - * The base class can be used as is to prompt the user to launch App TRK for a - * serial communication as this requires no further resource setup. */ - -class SYMBIANUTILS_EXPORT BaseCommunicationStarter : public QObject { - Q_OBJECT - Q_DISABLE_COPY(BaseCommunicationStarter) -public: - typedef QSharedPointer TrkDevicePtr; - - enum State { Running, Connected, TimedOut }; - - explicit BaseCommunicationStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0); - virtual ~BaseCommunicationStarter(); - - int intervalMS() const; - void setIntervalMS(int i); - - int attempts() const; - void setAttempts(int a); - - QString device() const; - void setDevice(const QString &); - - State state() const; - QString errorString() const; - - enum StartResult { - Started, // Starter is now running. - ConnectionSucceeded, /* Initial connection attempt succeeded, - * no need to keep running. */ - StartError // Error occurred during start. - }; - - StartResult start(); - -signals: - void connected(); - void timeout(); - void message(const QString &); - -private slots: - void slotTimer(); - -protected: - virtual bool initializeStartupResources(QString *errorMessage); - -private: - inline void stopTimer(); - - BaseCommunicationStarterPrivate *d; -}; - -/* AbstractBluetoothStarter: Repeatedly tries to open a trk Bluetooth - * device. Note that in case a Listener is already running mode, the - * connection will succeed immediately. - * initializeStartupResources() is implemented to fire up the listener. - * Introduces a new virtual createListener() that derived classes must - * implement as a factory function that creates and sets up the - * listener (mode, message connection, etc). */ - -class SYMBIANUTILS_EXPORT AbstractBluetoothStarter : public BaseCommunicationStarter { - Q_OBJECT - Q_DISABLE_COPY(AbstractBluetoothStarter) -public: - -protected: - explicit AbstractBluetoothStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0); - - // Implemented to fire up the listener. - virtual bool initializeStartupResources(QString *errorMessage); - // New virtual: Overwrite to create and parametrize the listener. - virtual BluetoothListener *createListener() = 0; -}; - -/* ConsoleBluetoothStarter: Convenience class for console processes. Creates a - * listener in "Listen" mode with the messages redirected to standard output. */ - -class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStarter { - Q_OBJECT - Q_DISABLE_COPY(ConsoleBluetoothStarter) -public: - static bool startBluetooth(const TrkDevicePtr& trkDevice, - QObject *listenerParent, - const QString &device, - int attempts, - QString *errorMessage); - -protected: - virtual BluetoothListener *createListener(); - -private: - explicit ConsoleBluetoothStarter(const TrkDevicePtr& trkDevice, - QObject *listenerParent, - QObject *parent = 0); - - QObject *m_listenerParent; -}; - -} // namespace trk - -#endif // COMMUNICATIONSTARTER_H diff --git a/tools/runonphone/trk/launcher.cpp b/tools/runonphone/trk/launcher.cpp deleted file mode 100644 index 4f91545..0000000 --- a/tools/runonphone/trk/launcher.cpp +++ /dev/null @@ -1,741 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "launcher.h" -#include "trkutils.h" -#include "trkutils_p.h" -#include "trkdevice.h" -#include "bluetoothlistener.h" - -#include -#include -#include -#include -#include -#include -#include - -namespace trk { - -struct LauncherPrivate { - struct CopyState { - QString sourceFileName; - QString destinationFileName; - uint copyFileHandle; - QScopedPointer data; - int position; - }; - - explicit LauncherPrivate(const TrkDevicePtr &d); - - TrkDevicePtr m_device; - QString m_trkServerName; - QByteArray m_trkReadBuffer; - Launcher::State m_state; - - void logMessage(const QString &msg); - // Debuggee state - Session m_session; // global-ish data (process id, target information) - - CopyState m_copyState; - QString m_fileName; - QStringList m_commandLineArgs; - QString m_installFileName; - int m_verbose; - Launcher::Actions m_startupActions; - bool m_closeDevice; -}; - -LauncherPrivate::LauncherPrivate(const TrkDevicePtr &d) : - m_device(d), - m_state(Launcher::Disconnected), - m_verbose(0), - m_closeDevice(true) -{ - if (m_device.isNull()) - m_device = TrkDevicePtr(new TrkDevice); -} - -Launcher::Launcher(Actions startupActions, - const TrkDevicePtr &dev, - QObject *parent) : - QObject(parent), - d(new LauncherPrivate(dev)) -{ - d->m_startupActions = startupActions; - connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); - connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); -} - -Launcher::~Launcher() -{ - logMessage("Shutting down.\n"); - delete d; -} - -Launcher::State Launcher::state() const -{ - return d->m_state; -} - -void Launcher::setState(State s) -{ - if (s != d->m_state) { - d->m_state = s; - emit stateChanged(s); - } -} - -void Launcher::addStartupActions(trk::Launcher::Actions startupActions) -{ - d->m_startupActions = Actions(d->m_startupActions | startupActions); -} - -void Launcher::setTrkServerName(const QString &name) -{ - d->m_trkServerName = name; -} - -QString Launcher::trkServerName() const -{ - return d->m_trkServerName; -} - -TrkDevicePtr Launcher::trkDevice() const -{ - return d->m_device; -} - -void Launcher::setFileName(const QString &name) -{ - d->m_fileName = name; -} - -void Launcher::setCopyFileName(const QString &srcName, const QString &dstName) -{ - d->m_copyState.sourceFileName = srcName; - d->m_copyState.destinationFileName = dstName; -} - -void Launcher::setInstallFileName(const QString &name) -{ - d->m_installFileName = name; -} - -void Launcher::setCommandLineArgs(const QStringList &args) -{ - d->m_commandLineArgs = args; -} - -void Launcher::setSerialFrame(bool b) -{ - d->m_device->setSerialFrame(b); -} - -bool Launcher::serialFrame() const -{ - return d->m_device->serialFrame(); -} - - -bool Launcher::closeDevice() const -{ - return d->m_closeDevice; -} - -void Launcher::setCloseDevice(bool c) -{ - d->m_closeDevice = c; -} - -bool Launcher::startServer(QString *errorMessage) -{ - errorMessage->clear(); - if (d->m_verbose) { - const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6") - .arg(d->m_trkServerName, d->m_fileName, - d->m_commandLineArgs.join(QString(QLatin1Char(' '))), - d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName); - logMessage(msg); - } - if (d->m_startupActions & ActionCopy) { - if (d->m_copyState.sourceFileName.isEmpty()) { - qWarning("No local filename given for copying package."); - return false; - } else if (d->m_copyState.destinationFileName.isEmpty()) { - qWarning("No remote filename given for copying package."); - return false; - } - } - if (d->m_startupActions & ActionInstall && d->m_installFileName.isEmpty()) { - qWarning("No package name given for installing."); - return false; - } - if (d->m_startupActions & ActionRun && d->m_fileName.isEmpty()) { - qWarning("No remote executable given for running."); - return false; - } - if (!d->m_device->isOpen() && !d->m_device->open(d->m_trkServerName, errorMessage)) - return false; - if (d->m_closeDevice) { - connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); - } else { - disconnect(this, SIGNAL(finished()), d->m_device.data(), 0); - } - setState(Connecting); - // Set up the temporary 'waiting' state if we do not get immediate connection - QTimer::singleShot(1000, this, SLOT(slotWaitingForTrk())); - d->m_device->sendTrkInitialPing(); - d->m_device->sendTrkMessage(TrkDisconnect); // Disconnect, as trk might be still connected - d->m_device->sendTrkMessage(TrkSupported, TrkCallback(this, &Launcher::handleSupportMask)); - d->m_device->sendTrkMessage(TrkCpuType, TrkCallback(this, &Launcher::handleCpuType)); - d->m_device->sendTrkMessage(TrkVersions, TrkCallback(this, &Launcher::handleTrkVersion)); - if (d->m_startupActions != ActionPingOnly) - d->m_device->sendTrkMessage(TrkConnect, TrkCallback(this, &Launcher::handleConnect)); - return true; -} - -void Launcher::slotWaitingForTrk() -{ - // Set temporary state if we are still in connected state - if (state() == Connecting) - setState(WaitingForTrk); -} - -void Launcher::handleConnect(const TrkResult &result) -{ - if (result.errorCode()) { - emit canNotConnect(result.errorString()); - return; - } - setState(Connected); - if (d->m_startupActions & ActionCopy) - copyFileToRemote(); - else if (d->m_startupActions & ActionInstall) - installRemotePackageSilently(); - else if (d->m_startupActions & ActionRun) - startInferiorIfNeeded(); -} - -void Launcher::setVerbose(int v) -{ - d->m_verbose = v; - d->m_device->setVerbose(v); -} - -void Launcher::logMessage(const QString &msg) -{ - if (d->m_verbose) - qDebug() << "LAUNCHER: " << qPrintable(msg); -} - -void Launcher::terminate() -{ - switch (state()) { - case DeviceDescriptionReceived: - case Connected: - if (d->m_session.pid) { - QByteArray ba; - appendShort(&ba, 0x0000, TargetByteOrder); - appendInt(&ba, d->m_session.pid, TargetByteOrder); - d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(this, &Launcher::handleRemoteProcessKilled), ba); - return; - } - if (d->m_copyState.copyFileHandle) - closeRemoteFile(true); - disconnectTrk(); - break; - case Disconnected: - break; - case Connecting: - case WaitingForTrk: - setState(Disconnected); - emit finished(); - break; - } -} - -void Launcher::handleRemoteProcessKilled(const TrkResult &result) -{ - Q_UNUSED(result) - disconnectTrk(); -} - -QString Launcher::msgStopped(uint pid, uint tid, uint address, const QString &why) -{ - return QString::fromLatin1("Process %1, thread %2 stopped at 0x%3: %4"). - arg(pid).arg(tid).arg(address, 0, 16). - arg(why.isEmpty() ? QString::fromLatin1("") : why); -} - -bool Launcher::parseNotifyStopped(const QByteArray &dataBA, - uint *pid, uint *tid, uint *address, - QString *why /* = 0 */) -{ - if (why) - why->clear(); - *address = *pid = *tid = 0; - if (dataBA.size() < 12) - return false; - const char *data = dataBA.data(); - *address = extractInt(data); - *pid = extractInt(data + 4); - *tid = extractInt(data + 8); - if (why && dataBA.size() >= 14) { - const unsigned short len = extractShort(data + 12); - if (len > 0) - *why = QString::fromLatin1(data + 14, len); - } - return true; -} - -void Launcher::handleResult(const TrkResult &result) -{ - QByteArray prefix = "READ BUF: "; - QByteArray str = result.toString().toUtf8(); - if (result.isDebugOutput) { // handle application output - logMessage("APPLICATION OUTPUT: " + result.data); - emit applicationOutputReceived(result.data); - return; - } - switch (result.code) { - case TrkNotifyAck: - break; - case TrkNotifyNak: { // NAK - logMessage(prefix + "NAK: " + str); - //logMessage(prefix << "TOKEN: " << result.token); - logMessage(prefix + "ERROR: " + errorMessage(result.data.at(0))); - break; - } - case TrkNotifyStopped: { // Notified Stopped - QString reason; - uint pc; - uint pid; - uint tid; - parseNotifyStopped(result.data, &pid, &tid, &pc, &reason); - logMessage(prefix + msgStopped(pid, tid, pc, reason)); - emit(processStopped(pc, pid, tid, reason)); - d->m_device->sendTrkAck(result.token); - break; - } - case TrkNotifyException: { // Notify Exception (obsolete) - logMessage(prefix + "NOTE: EXCEPTION " + str); - d->m_device->sendTrkAck(result.token); - break; - } - case TrkNotifyInternalError: { // - logMessage(prefix + "NOTE: INTERNAL ERROR: " + str); - d->m_device->sendTrkAck(result.token); - break; - } - - // target->host OS notification - case TrkNotifyCreated: { // Notify Created - /* - const char *data = result.data.data(); - byte error = result.data.at(0); - byte type = result.data.at(1); // type: 1 byte; for dll item, this value is 2. - uint pid = extractInt(data + 2); // ProcessID: 4 bytes; - uint tid = extractInt(data + 6); //threadID: 4 bytes - uint codeseg = extractInt(data + 10); //code address: 4 bytes; code base address for the library - uint dataseg = extractInt(data + 14); //data address: 4 bytes; data base address for the library - uint len = extractShort(data + 18); //length: 2 bytes; length of the library name string to follow - QByteArray name = result.data.mid(20, len); // name: library name - - logMessage(prefix + "NOTE: LIBRARY LOAD: " + str); - logMessage(prefix + "TOKEN: " + result.token); - logMessage(prefix + "ERROR: " + int(error)); - logMessage(prefix + "TYPE: " + int(type)); - logMessage(prefix + "PID: " + pid); - logMessage(prefix + "TID: " + tid); - logMessage(prefix + "CODE: " + codeseg); - logMessage(prefix + "DATA: " + dataseg); - logMessage(prefix + "LEN: " + len); - logMessage(prefix + "NAME: " + name); - */ - - if (result.data.size() < 10) - break; - QByteArray ba; - ba.append(result.data.mid(2, 8)); - d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); - //d->m_device->sendTrkAck(result.token) - break; - } - case TrkNotifyDeleted: { // NotifyDeleted - const ushort itemType = (unsigned char)result.data.at(1); - const ushort len = result.data.size() > 12 ? extractShort(result.data.data() + 10) : ushort(0); - const QString name = len ? QString::fromAscii(result.data.mid(12, len)) : QString(); - logMessage(QString::fromLatin1("%1 %2 UNLOAD: %3"). - arg(QString::fromAscii(prefix)).arg(itemType ? QLatin1String("LIB") : QLatin1String("PROCESS")). - arg(name)); - d->m_device->sendTrkAck(result.token); - if (itemType == 0 // process - && result.data.size() >= 10 - && d->m_session.pid == extractInt(result.data.data() + 6)) { - disconnectTrk(); - } - break; - } - case TrkNotifyProcessorStarted: { // NotifyProcessorStarted - logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str); - d->m_device->sendTrkAck(result.token); - break; - } - case TrkNotifyProcessorStandBy: { // NotifyProcessorStandby - logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str); - d->m_device->sendTrkAck(result.token); - break; - } - case TrkNotifyProcessorReset: { // NotifyProcessorReset - logMessage(prefix + "NOTE: PROCESSOR RESET: " + str); - d->m_device->sendTrkAck(result.token); - break; - } - default: { - logMessage(prefix + "INVALID: " + str); - break; - } - } -} - -QString Launcher::deviceDescription(unsigned verbose) const -{ - return d->m_session.deviceDescription(verbose); -} - -void Launcher::handleTrkVersion(const TrkResult &result) -{ - if (result.errorCode() || result.data.size() < 5) { - if (d->m_startupActions == ActionPingOnly) { - setState(Disconnected); - emit finished(); - } - return; - } - d->m_session.trkAppVersion.trkMajor = result.data.at(1); - d->m_session.trkAppVersion.trkMinor = result.data.at(2); - d->m_session.trkAppVersion.protocolMajor = result.data.at(3); - d->m_session.trkAppVersion.protocolMinor = result.data.at(4); - setState(DeviceDescriptionReceived); - // Ping mode: Log & Terminate - if (d->m_startupActions == ActionPingOnly) { - qWarning("%s", qPrintable(deviceDescription())); - setState(Disconnected); - emit finished(); - } -} - -void Launcher::handleFileCreation(const TrkResult &result) -{ - if (result.errorCode() || result.data.size() < 6) { - emit canNotCreateFile(d->m_copyState.destinationFileName, result.errorString()); - disconnectTrk(); - return; - } - const char *data = result.data.data(); - d->m_copyState.copyFileHandle = extractInt(data + 2); - QFile file(d->m_copyState.sourceFileName); - file.open(QIODevice::ReadOnly); - d->m_copyState.data.reset(new QByteArray(file.readAll())); - d->m_copyState.position = 0; - file.close(); - continueCopying(); -} - -void Launcher::handleCopy(const TrkResult &result) -{ - if (result.errorCode() || result.data.size() < 4) { - closeRemoteFile(true); - emit canNotWriteFile(d->m_copyState.destinationFileName, result.errorString()); - disconnectTrk(); - } else { - continueCopying(extractShort(result.data.data() + 2)); - } -} - -void Launcher::continueCopying(uint lastCopiedBlockSize) -{ - int size = d->m_copyState.data->length(); - d->m_copyState.position += lastCopiedBlockSize; - if (size == 0) - emit copyProgress(100); - else { - int percent = qMin((d->m_copyState.position*100)/size, 100); - emit copyProgress(percent); - } - if (d->m_copyState.position < size) { - QByteArray ba; - appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder); - appendString(&ba, d->m_copyState.data->mid(d->m_copyState.position, 2048), TargetByteOrder, false); - d->m_device->sendTrkMessage(TrkWriteFile, TrkCallback(this, &Launcher::handleCopy), ba); - } else { - closeRemoteFile(); - } -} - -void Launcher::closeRemoteFile(bool failed) -{ - QByteArray ba; - appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder); - appendDateTime(&ba, QDateTime::currentDateTime(), TargetByteOrder); - d->m_device->sendTrkMessage(TrkCloseFile, - failed ? TrkCallback() : TrkCallback(this, &Launcher::handleFileCopied), - ba); - d->m_copyState.data.reset(); - d->m_copyState.copyFileHandle = 0; - d->m_copyState.position = 0; -} - -void Launcher::handleFileCopied(const TrkResult &result) -{ - if (result.errorCode()) - emit canNotCloseFile(d->m_copyState.destinationFileName, result.errorString()); - if (d->m_startupActions & ActionInstall) - installRemotePackageSilently(); - else if (d->m_startupActions & ActionRun) - startInferiorIfNeeded(); - else - disconnectTrk(); -} - -void Launcher::handleCpuType(const TrkResult &result) -{ - logMessage("HANDLE CPU TYPE: " + result.toString()); - if(result.errorCode() || result.data.size() < 7) - return; - //---TRK------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 - // [80 03 00 04 00 00 04 00 00 00] - d->m_session.cpuMajor = result.data.at(1); - d->m_session.cpuMinor = result.data.at(2); - d->m_session.bigEndian = result.data.at(3); - d->m_session.defaultTypeSize = result.data.at(4); - d->m_session.fpTypeSize = result.data.at(5); - d->m_session.extended1TypeSize = result.data.at(6); - //d->m_session.extended2TypeSize = result.data[6]; -} - -void Launcher::handleCreateProcess(const TrkResult &result) -{ - if (result.errorCode()) { - emit canNotRun(result.errorString()); - disconnectTrk(); - return; - } - // 40 00 00] - //logMessage(" RESULT: " + result.toString()); - // [80 08 00 00 00 01 B5 00 00 01 B6 78 67 40 00 00 40 00 00] - const char *data = result.data.data(); - d->m_session.pid = extractInt(data + 1); - d->m_session.tid = extractInt(data + 5); - d->m_session.codeseg = extractInt(data + 9); - d->m_session.dataseg = extractInt(data + 13); - if (d->m_verbose) { - const QString msg = QString::fromLatin1("Process id: %1 Thread id: %2 code: 0x%3 data: 0x%4"). - arg(d->m_session.pid).arg(d->m_session.tid).arg(d->m_session.codeseg, 0, 16). - arg(d->m_session.dataseg, 0 ,16); - logMessage(msg); - } - emit applicationRunning(d->m_session.pid); - QByteArray ba; - appendInt(&ba, d->m_session.pid); - appendInt(&ba, d->m_session.tid); - d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); -} - -void Launcher::handleWaitForFinished(const TrkResult &result) -{ - logMessage(" FINISHED: " + stringFromArray(result.data)); - setState(Disconnected); - emit finished(); -} - -void Launcher::handleSupportMask(const TrkResult &result) -{ - if (result.errorCode() || result.data.size() < 32) - return; - const char *data = result.data.data() + 1; - - QString str = QLatin1String("SUPPORTED: "); - for (int i = 0; i < 32; ++i) { - //str.append(" [" + formatByte(data[i]) + "]: "); - for (int j = 0; j < 8; ++j) { - if (data[i] & (1 << j)) { - str.append(QString::number(i * 8 + j, 16)); - str.append(QLatin1Char(' ')); - } - } - } - logMessage(str); -} - -void Launcher::cleanUp() -{ - // - //---IDE------------------------------------------------------ - // Command: 0x41 Delete Item - // Sub Cmd: Delete Process - //ProcessID: 0x0000071F (1823) - // [41 24 00 00 00 00 07 1F] - QByteArray ba(2, char(0)); - appendInt(&ba, d->m_session.pid); - d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(), ba, "Delete process"); - - //---TRK------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 - // [80 24 00] - - //---IDE------------------------------------------------------ - // Command: 0x1C Clear Break - // [1C 25 00 00 00 0A 78 6A 43 40] - - //---TRK------------------------------------------------------ - // Command: 0xA1 Notify Deleted - // [A1 09 00 00 00 00 00 00 00 00 07 1F] - //---IDE------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 - // [80 09 00] - - //---TRK------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 - // [80 25 00] - - //---IDE------------------------------------------------------ - // Command: 0x1C Clear Break - // [1C 26 00 00 00 0B 78 6A 43 70] - //---TRK------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 - // [80 26 00] - - - //---IDE------------------------------------------------------ - // Command: 0x02 Disconnect - // [02 27] -// sendTrkMessage(0x02, TrkCallback(this, &Launcher::handleDisconnect)); - //---TRK------------------------------------------------------ - // Command: 0x80 Acknowledge - // Error: 0x00 -} - -void Launcher::disconnectTrk() -{ - d->m_device->sendTrkMessage(TrkDisconnect, TrkCallback(this, &Launcher::handleWaitForFinished)); -} - -void Launcher::copyFileToRemote() -{ - emit copyingStarted(); - QByteArray ba; - ba.append(char(10)); - appendString(&ba, d->m_copyState.destinationFileName.toLocal8Bit(), TargetByteOrder, false); - d->m_device->sendTrkMessage(TrkOpenFile, TrkCallback(this, &Launcher::handleFileCreation), ba); -} - -void Launcher::installRemotePackageSilently() -{ - emit installingStarted(); - QByteArray ba; - ba.append('C'); - appendString(&ba, d->m_installFileName.toLocal8Bit(), TargetByteOrder, false); - d->m_device->sendTrkMessage(TrkInstallFile, TrkCallback(this, &Launcher::handleInstallPackageFinished), ba); -} - -void Launcher::handleInstallPackageFinished(const TrkResult &result) -{ - if (result.errorCode()) { - emit canNotInstall(d->m_installFileName, result.errorString()); - disconnectTrk(); - return; - } else { - emit installingFinished(); - } - if (d->m_startupActions & ActionRun) { - startInferiorIfNeeded(); - } else { - disconnectTrk(); - } -} - -QByteArray Launcher::startProcessMessage(const QString &executable, - const QStringList &arguments) -{ - // It's not started yet - QByteArray ba; - appendShort(&ba, 0, TargetByteOrder); // create new process - ba.append(char(0)); // options - currently unused - if(arguments.isEmpty()) { - appendString(&ba, executable.toLocal8Bit(), TargetByteOrder); - return ba; - } - // Append full command line as one string (leading length information). - QByteArray commandLineBa; - commandLineBa.append(executable.toLocal8Bit()); - commandLineBa.append('\0'); - commandLineBa.append(arguments.join(QString(QLatin1Char(' '))).toLocal8Bit()); - appendString(&ba, commandLineBa, TargetByteOrder); - return ba; -} - -void Launcher::startInferiorIfNeeded() -{ - emit startingApplication(); - if (d->m_session.pid != 0) { - logMessage("Process already 'started'"); - return; - } - d->m_device->sendTrkMessage(TrkCreateItem, TrkCallback(this, &Launcher::handleCreateProcess), - startProcessMessage(d->m_fileName, d->m_commandLineArgs)); // Create Item -} - -void Launcher::resumeProcess(uint pid, uint tid) -{ - QByteArray ba; - appendInt(&ba, pid, BigEndian); - appendInt(&ba, tid, BigEndian); - d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE"); -} -} // namespace trk diff --git a/tools/runonphone/trk/launcher.h b/tools/runonphone/trk/launcher.h deleted file mode 100644 index 2b23fd8..0000000 --- a/tools/runonphone/trk/launcher.h +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef LAUNCHER_H -#define LAUNCHER_H - -#include "trkdevice.h" - -#include -#include -#include - -namespace trk { - -struct TrkResult; -struct TrkMessage; -struct LauncherPrivate; - -typedef QSharedPointer TrkDevicePtr; - -class SYMBIANUTILS_EXPORT Launcher : public QObject -{ - Q_OBJECT - Q_DISABLE_COPY(Launcher) -public: - typedef void (Launcher::*TrkCallBack)(const TrkResult &); - - enum Actions { - ActionPingOnly = 0x0, - ActionCopy = 0x1, - ActionInstall = 0x2, - ActionCopyInstall = ActionCopy | ActionInstall, - ActionRun = 0x4, - ActionCopyRun = ActionCopy | ActionRun, - ActionInstallRun = ActionInstall | ActionRun, - ActionCopyInstallRun = ActionCopy | ActionInstall | ActionRun - }; - - enum State { Disconnected, Connecting, Connected, - WaitingForTrk, // This occurs only if the initial ping times out after - // a reasonable timeout, indicating that Trk is not - // running. Note that this will never happen with - // Bluetooth as communication immediately starts - // after connecting. - DeviceDescriptionReceived }; - - explicit Launcher(trk::Launcher::Actions startupActions = trk::Launcher::ActionPingOnly, - const TrkDevicePtr &trkDevice = TrkDevicePtr(), - QObject *parent = 0); - ~Launcher(); - - State state() const; - - void addStartupActions(trk::Launcher::Actions startupActions); - void setTrkServerName(const QString &name); - QString trkServerName() const; - void setFileName(const QString &name); - void setCopyFileName(const QString &srcName, const QString &dstName); - void setInstallFileName(const QString &name); - void setCommandLineArgs(const QStringList &args); - bool startServer(QString *errorMessage); - void setVerbose(int v); - void setSerialFrame(bool b); - bool serialFrame() const; - // Close device or leave it open - bool closeDevice() const; - void setCloseDevice(bool c); - - TrkDevicePtr trkDevice() const; - - // becomes valid after successful execution of ActionPingOnly - QString deviceDescription(unsigned verbose = 0u) const; - - static QByteArray startProcessMessage(const QString &executable, - const QStringList &arguments); - // Parse a TrkNotifyStopped message - static bool parseNotifyStopped(const QByteArray &a, - uint *pid, uint *tid, uint *address, - QString *why = 0); - // Helper message - static QString msgStopped(uint pid, uint tid, uint address, const QString &why); - -signals: - void copyingStarted(); - void canNotConnect(const QString &errorMessage); - void canNotCreateFile(const QString &filename, const QString &errorMessage); - void canNotWriteFile(const QString &filename, const QString &errorMessage); - void canNotCloseFile(const QString &filename, const QString &errorMessage); - void installingStarted(); - void canNotInstall(const QString &packageFilename, const QString &errorMessage); - void installingFinished(); - void startingApplication(); - void applicationRunning(uint pid); - void canNotRun(const QString &errorMessage); - void finished(); - void applicationOutputReceived(const QString &output); - void copyProgress(int percent); - void stateChanged(int); - void processStopped(uint pc, uint pid, uint tid, const QString& reason); - -public slots: - void terminate(); - void resumeProcess(uint pid, uint tid); - -private slots: - void handleResult(const trk::TrkResult &data); - void slotWaitingForTrk(); - -private: - // kill process and breakpoints - void cleanUp(); - void disconnectTrk(); - - void handleRemoteProcessKilled(const TrkResult &result); - void handleConnect(const TrkResult &result); - void handleFileCreation(const TrkResult &result); - void handleCopy(const TrkResult &result); - void continueCopying(uint lastCopiedBlockSize = 0); - void closeRemoteFile(bool failed = false); - void handleFileCopied(const TrkResult &result); - void handleInstallPackageFinished(const TrkResult &result); - void handleCpuType(const TrkResult &result); - void handleCreateProcess(const TrkResult &result); - void handleWaitForFinished(const TrkResult &result); - void handleStop(const TrkResult &result); - void handleSupportMask(const TrkResult &result); - void handleTrkVersion(const TrkResult &result); - - void copyFileToRemote(); - void installRemotePackageSilently(); - void startInferiorIfNeeded(); - - void logMessage(const QString &msg); - void setState(State s); - - LauncherPrivate *d; -}; - -} // namespace Trk - -#endif // LAUNCHER_H diff --git a/tools/runonphone/trk/symbianutils_global.h b/tools/runonphone/trk/symbianutils_global.h deleted file mode 100644 index a6ffbe7..0000000 --- a/tools/runonphone/trk/symbianutils_global.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMBIANUTILS_GLOBAL_H -#define SYMBIANUTILS_GLOBAL_H - -#include - -#if defined(SYMBIANUTILS_BUILD_LIB) -# define SYMBIANUTILS_EXPORT Q_DECL_EXPORT -#elif defined(SYMBIANUTILS_BUILD_STATIC_LIB) || defined(SYMBIANUTILS_INCLUDE_PRI) -# define SYMBIANUTILS_EXPORT -#else -# define SYMBIANUTILS_EXPORT Q_DECL_IMPORT -#endif - -#endif // SYMBIANUTILS_GLOBAL_H diff --git a/tools/runonphone/trk/trk.pri b/tools/runonphone/trk/trk.pri deleted file mode 100644 index a54df76..0000000 --- a/tools/runonphone/trk/trk.pri +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDEPATH *= $$PWD - -# Input -HEADERS += $$PWD/symbianutils_global.h \ - $$PWD/callback.h \ - $$PWD/trkutils.h \ - $$PWD/trkutils_p.h \ - $$PWD/trkdevice.h \ - $$PWD/launcher.h \ - $$PWD/bluetoothlistener.h \ - $$PWD/communicationstarter.h - -SOURCES += $$PWD/trkutils.cpp \ - $$PWD/trkdevice.cpp \ - $$PWD/launcher.cpp \ - $$PWD/bluetoothlistener.cpp \ - $$PWD/communicationstarter.cpp - -# Tests/trklauncher is a console application -contains(QT, gui) { - HEADERS += $$PWD/bluetoothlistener_gui.h - SOURCES += $$PWD/bluetoothlistener_gui.cpp -} else { - message(Trk: Console ...) -} diff --git a/tools/runonphone/trk/trkdevice.cpp b/tools/runonphone/trk/trkdevice.cpp deleted file mode 100644 index d587135..0000000 --- a/tools/runonphone/trk/trkdevice.cpp +++ /dev/null @@ -1,1105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "trkdevice.h" -#include "trkutils.h" -#include "trkutils_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_WIN -# include -#else -# include - -# include -# include -# include -# include -# include -# include -# include -/* Required headers for select() according to POSIX.1-2001 */ -# include -/* Required headers for select() according to earlier standards: - #include - #include - #include -*/ -#endif - -#ifdef Q_OS_WIN - -// Format windows error from GetLastError() value: -// TODO: Use the one provided by the utils lib. -QString winErrorMessage(unsigned long error) -{ - QString rc = QString::fromLatin1("#%1: ").arg(error); - ushort *lpMsgBuf; - - const int len = FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, error, 0, (LPTSTR)&lpMsgBuf, 0, NULL); - if (len) { - rc = QString::fromUtf16(lpMsgBuf, len); - LocalFree(lpMsgBuf); - } else { - rc += QString::fromLatin1(""); - } - return rc; -} - -#endif - -enum { verboseTrk = 0 }; - -namespace trk { - -/////////////////////////////////////////////////////////////////////// -// -// TrkMessage -// -/////////////////////////////////////////////////////////////////////// - -/* A message to be send to TRK, triggering a callback on receipt - * of the answer. */ -struct TrkMessage -{ - explicit TrkMessage(byte code = 0u, byte token = 0u, - TrkCallback callback = TrkCallback()); - - byte code; - byte token; - QByteArray data; - QVariant cookie; - TrkCallback callback; -}; - -TrkMessage::TrkMessage(byte c, byte t, TrkCallback cb) : - code(c), - token(t), - callback(cb) -{ -} - -QDebug operator<<(QDebug d, const TrkMessage &msg) -{ - return d << "Message: Code: " << msg.code - << " Token: " << msg.token << " " << msg.data.toHex(); -} - -} // namespace trk - -Q_DECLARE_METATYPE(trk::TrkMessage) -Q_DECLARE_METATYPE(trk::TrkResult) - -namespace trk { - -/////////////////////////////////////////////////////////////////////// -// -// TrkWriteQueue: Mixin class that manages a write queue of Trk messages. -// pendingMessage()/notifyWriteResult() should be called from a worked/timer -// that writes the messages. The class does not take precautions for multithreading. -// A no-op message is simply taken off the queue. The calling class -// can use the helper invokeNoopMessage() to trigger its callback. -// -/////////////////////////////////////////////////////////////////////// - -class TrkWriteQueue -{ - Q_DISABLE_COPY(TrkWriteQueue) -public: - explicit TrkWriteQueue(); - - // Enqueue messages. - void queueTrkMessage(byte code, TrkCallback callback, - const QByteArray &data, const QVariant &cookie); - void queueTrkInitialPing(); - - // Call this from the device read notification with the results. - void slotHandleResult(const TrkResult &result, QMutex *mutex = 0); - - // pendingMessage() can be called periodically in a timer to retrieve - // the pending messages to be sent. - enum PendingMessageResult { - NoMessage, // No message in queue. - PendingMessage, /* There is a queued message. The calling class - * can write it out and use notifyWriteResult() - * to notify about the result. */ - NoopMessageDequeued // A no-op message has been dequeued. see invokeNoopMessage(). - }; - - PendingMessageResult pendingMessage(TrkMessage *message); - // Notify the queue about the success of the write operation - // after taking the pendingMessage off. - enum WriteResult { - WriteOk, - WriteFailedDiscard, // Discard failed message - WriteFailedKeep, // Keep failed message - }; - void notifyWriteResult(WriteResult ok); - - // Helper function that invokes the callback of a no-op message - static void invokeNoopMessage(trk::TrkMessage); - -private: - typedef QMap TokenMessageMap; - - byte nextTrkWriteToken(); - - byte m_trkWriteToken; - QQueue m_trkWriteQueue; - TokenMessageMap m_writtenTrkMessages; - bool m_trkWriteBusy; -}; - -TrkWriteQueue::TrkWriteQueue() : - m_trkWriteToken(0), - m_trkWriteBusy(false) -{ -} - -byte TrkWriteQueue::nextTrkWriteToken() -{ - ++m_trkWriteToken; - if (m_trkWriteToken == 0) - ++m_trkWriteToken; - if (verboseTrk) - qDebug() << "Write token: " << m_trkWriteToken; - return m_trkWriteToken; -} - -void TrkWriteQueue::queueTrkMessage(byte code, TrkCallback callback, - const QByteArray &data, const QVariant &cookie) -{ - const byte token = code == TRK_WRITE_QUEUE_NOOP_CODE ? - byte(0) : nextTrkWriteToken(); - TrkMessage msg(code, token, callback); - msg.data = data; - msg.cookie = cookie; - m_trkWriteQueue.append(msg); -} - -TrkWriteQueue::PendingMessageResult TrkWriteQueue::pendingMessage(TrkMessage *message) -{ - // Invoked from timer, try to flush out message queue - if (m_trkWriteBusy || m_trkWriteQueue.isEmpty()) - return NoMessage; - // Handle the noop message, just invoke CB in slot (ower thread) - if (m_trkWriteQueue.front().code == TRK_WRITE_QUEUE_NOOP_CODE) { - *message = m_trkWriteQueue.dequeue(); - return NoopMessageDequeued; - } - // Insert into map fir answers (as reading threads might get an - // answer before notifyWriteResult(true)) is called. - *message = m_trkWriteQueue.front(); - m_writtenTrkMessages.insert(message->token, *message); - m_trkWriteBusy = true; - return PendingMessage; -} - -void TrkWriteQueue::invokeNoopMessage(trk::TrkMessage noopMessage) -{ - TrkResult result; - result.code = noopMessage.code; - result.token = noopMessage.token; - result.data = noopMessage.data; - result.cookie = noopMessage.cookie; - noopMessage.callback(result); -} - -void TrkWriteQueue::notifyWriteResult(WriteResult wr) -{ - // On success, dequeue message and await result - const byte token = m_trkWriteQueue.front().token; - switch (wr) { - case WriteOk: - m_trkWriteQueue.dequeue(); - break; - case WriteFailedKeep: - case WriteFailedDiscard: - m_writtenTrkMessages.remove(token); - m_trkWriteBusy = false; - if (wr == WriteFailedDiscard) - m_trkWriteQueue.dequeue(); - break; - } -} - -void TrkWriteQueue::slotHandleResult(const TrkResult &result, QMutex *mutex) -{ - // Find which request the message belongs to and invoke callback - // if ACK or on NAK if desired. - if (mutex) - mutex->lock(); - m_trkWriteBusy = false; - const TokenMessageMap::iterator it = m_writtenTrkMessages.find(result.token); - if (it == m_writtenTrkMessages.end()) { - if (mutex) - mutex->unlock(); - return; - } - TrkCallback callback = it.value().callback; - const QVariant cookie = it.value().cookie; - m_writtenTrkMessages.erase(it); - if (mutex) - mutex->unlock(); - // Invoke callback - if (callback) { - TrkResult result1 = result; - result1.cookie = cookie; - callback(result1); - } -} - -void TrkWriteQueue::queueTrkInitialPing() -{ - // Ping, reset sequence count - m_trkWriteToken = 0; - m_trkWriteQueue.append(TrkMessage(TrkPing, 0)); -} - -/////////////////////////////////////////////////////////////////////// -// -// DeviceContext to be shared between threads -// -/////////////////////////////////////////////////////////////////////// - -struct DeviceContext { - DeviceContext(); -#ifdef Q_OS_WIN - HANDLE device; - OVERLAPPED readOverlapped; - OVERLAPPED writeOverlapped; -#else - QFile file; -#endif - bool serialFrame; - QMutex mutex; -}; - -DeviceContext::DeviceContext() : -#ifdef Q_OS_WIN - device(INVALID_HANDLE_VALUE), -#endif - serialFrame(true) -{ -} - -/////////////////////////////////////////////////////////////////////// -// -// TrkWriterThread: A thread operating a TrkWriteQueue. -// with exception of the handling of the TRK_WRITE_QUEUE_NOOP_CODE -// synchronization message. The invocation of the callback is then -// done by the thread owning the TrkWriteQueue, while pendingMessage() is called -// from another thread. This happens via a Qt::BlockingQueuedConnection. - -/////////////////////////////////////////////////////////////////////// - -class WriterThread : public QThread -{ - Q_OBJECT - Q_DISABLE_COPY(WriterThread) -public: - explicit WriterThread(const QSharedPointer &context); - - // Enqueue messages. - void queueTrkMessage(byte code, TrkCallback callback, - const QByteArray &data, const QVariant &cookie); - void queueTrkInitialPing(); - - // Call this from the device read notification with the results. - void slotHandleResult(const TrkResult &result); - - virtual void run(); - -signals: - void error(const QString &); - void internalNoopMessageDequeued(const trk::TrkMessage&); - -public slots: - bool trkWriteRawMessage(const TrkMessage &msg); - void terminate(); - void tryWrite(); - -private slots: - void invokeNoopMessage(const trk::TrkMessage &); - -private: - bool write(const QByteArray &data, QString *errorMessage); - inline int writePendingMessage(); - - const QSharedPointer m_context; - QMutex m_dataMutex; - QMutex m_waitMutex; - QWaitCondition m_waitCondition; - TrkWriteQueue m_queue; - bool m_terminate; -}; - -WriterThread::WriterThread(const QSharedPointer &context) : - m_context(context), - m_terminate(false) -{ - static const int trkMessageMetaId = qRegisterMetaType(); - Q_UNUSED(trkMessageMetaId) - connect(this, SIGNAL(internalNoopMessageDequeued(trk::TrkMessage)), - this, SLOT(invokeNoopMessage(trk::TrkMessage)), Qt::BlockingQueuedConnection); -} - -void WriterThread::run() -{ - while (writePendingMessage() == 0) ; -} - -int WriterThread::writePendingMessage() -{ - enum { MaxAttempts = 100, RetryIntervalMS = 200 }; - - // Wait. Use a timeout in case something is already queued before we - // start up or some weird hanging exit condition - m_waitMutex.lock(); - m_waitCondition.wait(&m_waitMutex, 100); - m_waitMutex.unlock(); - if (m_terminate) - return 1; - - // Send off message - m_dataMutex.lock(); - TrkMessage message; - const TrkWriteQueue::PendingMessageResult pr = m_queue.pendingMessage(&message); - m_dataMutex.unlock(); - - switch (pr) { - case TrkWriteQueue::NoMessage: - break; - case TrkWriteQueue::PendingMessage: { - //qDebug() << "Write pending message " << message; - // Untested: try to re-send a few times - bool success = false; - for (int r = 0; !success && (r < MaxAttempts); r++) { - success = trkWriteRawMessage(message); - if (!success) { - emit error(QString::fromLatin1("Write failure, attempt %1 of %2.").arg(r).arg(int(MaxAttempts))); - if (m_terminate) - return 1; - QThread::msleep(RetryIntervalMS); - } - } - // Notify queue. If still failed, give up. - m_dataMutex.lock(); - m_queue.notifyWriteResult(success ? TrkWriteQueue::WriteOk : TrkWriteQueue::WriteFailedDiscard); - m_dataMutex.unlock(); - } - break; - case TrkWriteQueue::NoopMessageDequeued: - // Sync with thread that owns us via a blocking signal - if (verboseTrk) - qDebug() << "Noop message dequeued" << message; - emit internalNoopMessageDequeued(message); - break; - } // switch - return 0; -} - -void WriterThread::invokeNoopMessage(const trk::TrkMessage &msg) -{ - TrkWriteQueue::invokeNoopMessage(msg); -} - -void WriterThread::terminate() -{ - m_terminate = true; - m_waitCondition.wakeAll(); - wait(); - m_terminate = false; -} - -#ifdef Q_OS_WIN - -static inline QString msgTerminated(int size) -{ - return QString::fromLatin1("Terminated with %1 bytes pending.").arg(size); -} - -// Interruptible synchronous write function. -static inline bool overlappedSyncWrite(HANDLE file, - const bool &terminateFlag, - const char *data, - DWORD size, DWORD *charsWritten, - OVERLAPPED *overlapped, - QString *errorMessage) -{ - if (WriteFile(file, data, size, charsWritten, overlapped)) - return true; - const DWORD writeError = GetLastError(); - if (writeError != ERROR_IO_PENDING) { - *errorMessage = QString::fromLatin1("WriteFile failed: %1").arg(winErrorMessage(writeError)); - return false; - } - // Wait for written or thread terminated - const DWORD timeoutMS = 200; - const unsigned maxAttempts = 20; - DWORD wr = WaitForSingleObject(overlapped->hEvent, timeoutMS); - for (unsigned n = 0; wr == WAIT_TIMEOUT && n < maxAttempts && !terminateFlag; - wr = WaitForSingleObject(overlapped->hEvent, timeoutMS), n++); - if (terminateFlag) { - *errorMessage = msgTerminated(size); - return false; - } - switch (wr) { - case WAIT_OBJECT_0: - break; - case WAIT_TIMEOUT: - *errorMessage = QString::fromLatin1("Write timed out."); - return false; - default: - *errorMessage = QString::fromLatin1("Error while waiting for WriteFile results: %1").arg(winErrorMessage(GetLastError())); - return false; - } - if (!GetOverlappedResult(file, overlapped, charsWritten, TRUE)) { - *errorMessage = QString::fromLatin1("Error writing %1 bytes: %2").arg(size).arg(winErrorMessage(GetLastError())); - return false; - } - return true; -} -#endif - -bool WriterThread::write(const QByteArray &data, QString *errorMessage) -{ - if (verboseTrk) - qDebug() << "Write raw data: " << stringFromArray(data).toLatin1(); - QMutexLocker locker(&m_context->mutex); -#ifdef Q_OS_WIN - DWORD charsWritten; - if (!overlappedSyncWrite(m_context->device, m_terminate, data.data(), data.size(), &charsWritten, &m_context->writeOverlapped, errorMessage)) { - return false; - } - FlushFileBuffers(m_context->device); - return true; -#else - if (m_context->file.write(data) == -1 || !m_context->file.flush()) { - *errorMessage = QString::fromLatin1("Cannot write: %1").arg(m_context->file.errorString()); - return false; - } - return true; -#endif -} - -bool WriterThread::trkWriteRawMessage(const TrkMessage &msg) -{ - const QByteArray ba = frameMessage(msg.code, msg.token, msg.data, m_context->serialFrame); - QString errorMessage; - const bool rc = write(ba, &errorMessage); - if (!rc) { - qWarning("%s\n", qPrintable(errorMessage)); - emit error(errorMessage); - } - return rc; -} - -void WriterThread::tryWrite() -{ - m_waitCondition.wakeAll(); -} - -void WriterThread::queueTrkMessage(byte code, TrkCallback callback, - const QByteArray &data, const QVariant &cookie) -{ - m_dataMutex.lock(); - m_queue.queueTrkMessage(code, callback, data, cookie); - m_dataMutex.unlock(); - tryWrite(); -} - -void WriterThread::queueTrkInitialPing() -{ - m_dataMutex.lock(); - m_queue.queueTrkInitialPing(); - m_dataMutex.unlock(); - tryWrite(); -} - -// Call this from the device read notification with the results. -void WriterThread::slotHandleResult(const TrkResult &result) -{ - m_queue.slotHandleResult(result, &m_dataMutex); - tryWrite(); // Have messages been enqueued in-between? -} - - -/////////////////////////////////////////////////////////////////////// -// -// ReaderThreadBase: Base class for a thread that reads data from -// the device, decodes the messages and emit signals for the messages. -// A Qt::BlockingQueuedConnection should be used for the message signal -// to ensure messages are processed in the correct sequence. -// -/////////////////////////////////////////////////////////////////////// - -class ReaderThreadBase : public QThread -{ - Q_OBJECT - Q_DISABLE_COPY(ReaderThreadBase) -public: - -signals: - void messageReceived(const trk::TrkResult &result, const QByteArray &rawData); - -protected: - explicit ReaderThreadBase(const QSharedPointer &context); - void processData(const QByteArray &a); - void processData(char c); - - const QSharedPointer m_context; - -private: - void readMessages(); - - QByteArray m_trkReadBuffer; -}; - -ReaderThreadBase::ReaderThreadBase(const QSharedPointer &context) : - m_context(context) -{ - static const int trkResultMetaId = qRegisterMetaType(); - Q_UNUSED(trkResultMetaId) -} - -void ReaderThreadBase::processData(const QByteArray &a) -{ - m_trkReadBuffer += a; - readMessages(); -} - -void ReaderThreadBase::processData(char c) -{ - m_trkReadBuffer += c; - if (m_trkReadBuffer.size() > 1) - readMessages(); -} - -void ReaderThreadBase::readMessages() -{ - TrkResult r; - QByteArray rawData; - while (extractResult(&m_trkReadBuffer, m_context->serialFrame, &r, &rawData)) { - emit messageReceived(r, rawData); - } -} - -#ifdef Q_OS_WIN -/////////////////////////////////////////////////////////////////////// -// -// WinReaderThread: A thread reading from the device using Windows API. -// Waits on an overlapped I/O handle and an event that tells the thread to -// terminate. -// -/////////////////////////////////////////////////////////////////////// - -class WinReaderThread : public ReaderThreadBase -{ - Q_OBJECT - Q_DISABLE_COPY(WinReaderThread) -public: - explicit WinReaderThread(const QSharedPointer &context); - ~WinReaderThread(); - - virtual void run(); - -signals: - void error(const QString &); - -public slots: - void terminate(); - -private: - enum Handles { FileHandle, TerminateEventHandle, HandleCount }; - - inline int tryRead(); - - HANDLE m_handles[HandleCount]; -}; - -WinReaderThread::WinReaderThread(const QSharedPointer &context) : - ReaderThreadBase(context) -{ - m_handles[FileHandle] = NULL; - m_handles[TerminateEventHandle] = CreateEvent(NULL, FALSE, FALSE, NULL); -} - -WinReaderThread::~WinReaderThread() -{ - CloseHandle(m_handles[TerminateEventHandle]); -} - -// Return 0 to continue or error code -int WinReaderThread::tryRead() -{ - enum { BufSize = 1024 }; - char buffer[BufSize]; - // Check if there are already bytes waiting. If not, wait for first byte - COMSTAT comStat; - if (!ClearCommError(m_context->device, NULL, &comStat)){ - emit error(QString::fromLatin1("ClearCommError failed: %1").arg(winErrorMessage(GetLastError()))); - return -7; - } - const DWORD bytesToRead = qMax(DWORD(1), qMin(comStat.cbInQue, DWORD(BufSize))); - // Trigger read - DWORD bytesRead = 0; - if (ReadFile(m_context->device, &buffer, bytesToRead, &bytesRead, &m_context->readOverlapped)) { - if (bytesRead == 1) { - processData(buffer[0]); - } else { - processData(QByteArray(buffer, bytesRead)); - } - return 0; - } - const DWORD readError = GetLastError(); - if (readError != ERROR_IO_PENDING) { - emit error(QString::fromLatin1("Read error: %1").arg(winErrorMessage(readError))); - return -1; - } - // Wait for either termination or data - const DWORD wr = WaitForMultipleObjects(HandleCount, m_handles, false, INFINITE); - if (wr == WAIT_FAILED) { - emit error(QString::fromLatin1("Wait failed: %1").arg(winErrorMessage(GetLastError()))); - return -2; - } - if (wr - WAIT_OBJECT_0 == TerminateEventHandle) { - return 1; // Terminate - } - // Check data - if (!GetOverlappedResult(m_context->device, &m_context->readOverlapped, &bytesRead, true)) { - emit error(QString::fromLatin1("GetOverlappedResult failed: %1").arg(winErrorMessage(GetLastError()))); - return -3; - } - if (bytesRead == 1) { - processData(buffer[0]); - } else { - processData(QByteArray(buffer, bytesRead)); - } - return 0; -} - -void WinReaderThread::run() -{ - m_handles[FileHandle] = m_context->readOverlapped.hEvent; - while ( tryRead() == 0) ; -} - -void WinReaderThread::terminate() -{ - SetEvent(m_handles[TerminateEventHandle]); - wait(); -} - -typedef WinReaderThread ReaderThread; - -#else - -/////////////////////////////////////////////////////////////////////// -// -// UnixReaderThread: A thread reading from the device. -// Uses select() to wait and a special ioctl() to find out the number -// of bytes queued. For clean termination, the self-pipe trick is used. -// The class maintains a pipe, on whose read end the select waits besides -// the device file handle. To terminate, a byte is written to the pipe. -// -/////////////////////////////////////////////////////////////////////// - -static inline QString msgUnixCallFailedErrno(const char *func, int errorNumber) -{ - return QString::fromLatin1("Call to %1() failed: %2").arg(QLatin1String(func), QString::fromLocal8Bit(strerror(errorNumber))); -} - -class UnixReaderThread : public ReaderThreadBase { - Q_OBJECT - Q_DISABLE_COPY(UnixReaderThread) -public: - explicit UnixReaderThread(const QSharedPointer &context); - ~UnixReaderThread(); - - virtual void run(); - -signals: - void error(const QString &); - -public slots: - void terminate(); - -private: - inline int tryRead(); - - int m_terminatePipeFileDescriptors[2]; -}; - -UnixReaderThread::UnixReaderThread(const QSharedPointer &context) : - ReaderThreadBase(context) -{ - m_terminatePipeFileDescriptors[0] = m_terminatePipeFileDescriptors[1] = -1; - // Set up pipes for termination. Should not fail - if (pipe(m_terminatePipeFileDescriptors) < 0) - qWarning("%s\n", qPrintable(msgUnixCallFailedErrno("pipe", errno))); -} - -UnixReaderThread::~UnixReaderThread() -{ - close(m_terminatePipeFileDescriptors[0]); - close(m_terminatePipeFileDescriptors[1]); -} - -int UnixReaderThread::tryRead() -{ - fd_set readSet, tempReadSet, tempExceptionSet; - struct timeval timeOut; - const int fileDescriptor = m_context->file.handle(); - FD_ZERO(&readSet); - FD_SET(fileDescriptor, &readSet); - FD_SET(m_terminatePipeFileDescriptors[0], &readSet); - const int maxFileDescriptor = qMax(m_terminatePipeFileDescriptors[0], fileDescriptor); - int result = 0; - do { - memcpy(&tempReadSet, &readSet, sizeof(fd_set)); - memcpy(&tempExceptionSet, &readSet, sizeof(fd_set)); - timeOut.tv_sec = 1; - timeOut.tv_usec = 0; - result = select(maxFileDescriptor + 1, &tempReadSet, NULL, &tempExceptionSet, &timeOut); - } while ( result < 0 && errno == EINTR ); - // Timeout? - if (result == 0) - return 0; - // Something wrong? - if (result < 0) { - emit error(msgUnixCallFailedErrno("select", errno)); - return -1; - } - // Did the exception set trigger on the device? - if (FD_ISSET(fileDescriptor,&tempExceptionSet)) { - emit error(QLatin1String("An Exception occurred on the device.")); - return -2; - } - // Check termination pipe. - if (FD_ISSET(m_terminatePipeFileDescriptors[0], &tempReadSet) - || FD_ISSET(m_terminatePipeFileDescriptors[0], &tempExceptionSet)) - return 1; - - // determine number of pending bytes and read - int numBytes; - if (ioctl(fileDescriptor, FIONREAD, &numBytes) < 0) { - emit error(msgUnixCallFailedErrno("ioctl", errno)); - return -1; - } - m_context->mutex.lock(); - const QByteArray data = m_context->file.read(numBytes); - m_context->mutex.unlock(); - processData(data); - return 0; -} - -void UnixReaderThread::run() -{ - // Read loop - while (tryRead() == 0) - ; -} - -void UnixReaderThread::terminate() -{ - // Trigger select() by writing to the pipe - char c = 0; - const int written = write(m_terminatePipeFileDescriptors[1], &c, 1); - Q_UNUSED(written) - wait(); -} - -typedef UnixReaderThread ReaderThread; - -#endif - -/////////////////////////////////////////////////////////////////////// -// -// TrkDevicePrivate -// -/////////////////////////////////////////////////////////////////////// - -struct TrkDevicePrivate -{ - TrkDevicePrivate(); - - QSharedPointer deviceContext; - QSharedPointer writerThread; - QSharedPointer readerThread; - - QByteArray trkReadBuffer; - int verbose; - QString errorString; -}; - -/////////////////////////////////////////////////////////////////////// -// -// TrkDevice -// -/////////////////////////////////////////////////////////////////////// - -TrkDevicePrivate::TrkDevicePrivate() : - deviceContext(new DeviceContext), - verbose(0) -{ -} - -/////////////////////////////////////////////////////////////////////// -// -// TrkDevice -// -/////////////////////////////////////////////////////////////////////// - -TrkDevice::TrkDevice(QObject *parent) : - QObject(parent), - d(new TrkDevicePrivate) -{} - -TrkDevice::~TrkDevice() -{ - close(); - delete d; -} - -bool TrkDevice::open(const QString &port, QString *errorMessage) -{ - if (d->verbose) - qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame(); - close(); -#ifdef Q_OS_WIN - d->deviceContext->device = CreateFile(QString("\\\\.\\").append(port).toStdWString().c_str(), - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL|FILE_FLAG_NO_BUFFERING|FILE_FLAG_OVERLAPPED, - NULL); - - if (INVALID_HANDLE_VALUE == d->deviceContext->device) { - *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port, winErrorMessage(GetLastError())); - return false; - } - memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED)); - d->deviceContext->readOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - memset(&d->deviceContext->writeOverlapped, 0, sizeof(OVERLAPPED)); - d->deviceContext->writeOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - if (d->deviceContext->readOverlapped.hEvent == NULL || d->deviceContext->writeOverlapped.hEvent == NULL) { - *errorMessage = QString::fromLatin1("Failed to create events: %1").arg(winErrorMessage(GetLastError())); - return false; - } -#else - d->deviceContext->file.setFileName(port); - if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) { - *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(port, d->deviceContext->file.errorString()); - return false; - } - - struct termios termInfo; - if (tcgetattr(d->deviceContext->file.handle(), &termInfo) < 0) { - *errorMessage = QString::fromLatin1("Unable to retrieve terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); - return false; - } - // Turn off terminal echo as not get messages back, among other things - termInfo.c_cflag |= CREAD|CLOCAL; - termInfo.c_lflag &= (~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG)); - termInfo.c_iflag &= (~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY)); - termInfo.c_oflag &= (~OPOST); - termInfo.c_cc[VMIN] = 0; - termInfo.c_cc[VINTR] = _POSIX_VDISABLE; - termInfo.c_cc[VQUIT] = _POSIX_VDISABLE; - termInfo.c_cc[VSTART] = _POSIX_VDISABLE; - termInfo.c_cc[VSTOP] = _POSIX_VDISABLE; - termInfo.c_cc[VSUSP] = _POSIX_VDISABLE; - if (tcsetattr(d->deviceContext->file.handle(), TCSAFLUSH, &termInfo) < 0) { - *errorMessage = QString::fromLatin1("Unable to apply terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); - return false; - } -#endif - d->readerThread = QSharedPointer(new ReaderThread(d->deviceContext)); - connect(d->readerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), - Qt::QueuedConnection); - connect(d->readerThread.data(), SIGNAL(messageReceived(trk::TrkResult,QByteArray)), - this, SLOT(slotMessageReceived(trk::TrkResult,QByteArray)), - Qt::QueuedConnection); - d->readerThread->start(); - - d->writerThread = QSharedPointer(new WriterThread(d->deviceContext)); - connect(d->writerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), - Qt::QueuedConnection); - d->writerThread->start(); - - if (d->verbose) - qDebug() << "Opened" << port; - return true; -} - -void TrkDevice::close() -{ - if (!isOpen()) - return; - if (d->readerThread) - d->readerThread->terminate(); - if (d->writerThread) - d->writerThread->terminate(); -#ifdef Q_OS_WIN - CloseHandle(d->deviceContext->device); - d->deviceContext->device = INVALID_HANDLE_VALUE; - CloseHandle(d->deviceContext->readOverlapped.hEvent); - CloseHandle(d->deviceContext->writeOverlapped.hEvent); - d->deviceContext->readOverlapped.hEvent = d->deviceContext->writeOverlapped.hEvent = NULL; -#else - d->deviceContext->file.close(); -#endif - if (d->verbose) - emitLogMessage("Close"); -} - -bool TrkDevice::isOpen() const -{ -#ifdef Q_OS_WIN - return d->deviceContext->device != INVALID_HANDLE_VALUE; -#else - return d->deviceContext->file.isOpen(); -#endif -} - -QString TrkDevice::errorString() const -{ - return d->errorString; -} - -bool TrkDevice::serialFrame() const -{ - return d->deviceContext->serialFrame; -} - -void TrkDevice::setSerialFrame(bool f) -{ - d->deviceContext->serialFrame = f; -} - -int TrkDevice::verbose() const -{ - return d->verbose; -} - -void TrkDevice::setVerbose(int b) -{ - d->verbose = b; -} - -void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArray &rawData) -{ - d->writerThread->slotHandleResult(result); - if (d->verbose > 1) - qDebug() << "Received: " << result.toString(); - emit messageReceived(result); - if (!rawData.isEmpty()) - emit rawDataReceived(rawData); -} - -void TrkDevice::emitError(const QString &s) -{ - d->errorString = s; - qWarning("%s\n", qPrintable(s)); - emit error(s); -} - -void TrkDevice::sendTrkMessage(byte code, TrkCallback callback, - const QByteArray &data, const QVariant &cookie) -{ - if (!d->writerThread.isNull()) { - if (d->verbose > 1) { - QByteArray msg = "Sending: "; - msg += QByteArray::number(code, 16); - msg += ": "; - msg += stringFromArray(data).toLatin1(); - qDebug("%s", msg.data()); - } - d->writerThread->queueTrkMessage(code, callback, data, cookie); - } -} - -void TrkDevice::sendTrkInitialPing() -{ - if (!d->writerThread.isNull()) - d->writerThread->queueTrkInitialPing(); -} - -bool TrkDevice::sendTrkAck(byte token) -{ - if (d->writerThread.isNull()) - return false; - // The acknowledgement must not be queued! - TrkMessage msg(0x80, token); - msg.token = token; - msg.data.append('\0'); - if (verboseTrk) - qDebug() << "Write synchroneous message: " << msg; - return d->writerThread->trkWriteRawMessage(msg); - // 01 90 00 07 7e 80 01 00 7d 5e 7e -} - -void TrkDevice::emitLogMessage(const QString &msg) -{ - if (d->verbose) - qDebug("%s\n", qPrintable(msg)); - emit logMessage(msg); -} - -} // namespace trk - -#include "trkdevice.moc" diff --git a/tools/runonphone/trk/trkdevice.h b/tools/runonphone/trk/trkdevice.h deleted file mode 100644 index 21a3cc1..0000000 --- a/tools/runonphone/trk/trkdevice.h +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TRKDEVICE_H -#define TRKDEVICE_H - -#include "symbianutils_global.h" -#include "callback.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE -class QIODevice; -QT_END_NAMESPACE - -namespace trk { - -struct TrkResult; -struct TrkMessage; -struct TrkDevicePrivate; - -/* TrkDevice: Implements a Windows COM or Linux device for - * Trk communications. Provides synchronous write and asynchronous - * read operation. - * The serialFrames property specifies whether packets are encapsulated in - * "0x90 " frames, which is currently the case for serial ports. - * Contains a write message queue allowing - * for queueing messages with a notification callback. If the message receives - * an ACK, the callback is invoked. - * The special message TRK_WRITE_QUEUE_NOOP_CODE code can be used for synchronisation. - * The respective message will not be sent, the callback is just invoked. */ - -enum { TRK_WRITE_QUEUE_NOOP_CODE = 0x7f }; - -typedef trk::Callback TrkCallback; - -class SYMBIANUTILS_EXPORT TrkDevice : public QObject -{ - Q_OBJECT - Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame) - Q_PROPERTY(bool verbose READ verbose WRITE setVerbose) -public: - explicit TrkDevice(QObject *parent = 0); - virtual ~TrkDevice(); - - bool open(const QString &port, QString *errorMessage); - bool isOpen() const; - - QString errorString() const; - - bool serialFrame() const; - void setSerialFrame(bool f); - - int verbose() const; - void setVerbose(int b); - - // Enqueue a message with a notification callback. - void sendTrkMessage(unsigned char code, - TrkCallback callBack = TrkCallback(), - const QByteArray &data = QByteArray(), - const QVariant &cookie = QVariant()); - - // Enqeue an initial ping - void sendTrkInitialPing(); - - // Send an Ack synchronously, bypassing the queue - bool sendTrkAck(unsigned char token); - -signals: - void messageReceived(const trk::TrkResult &result); - // Emitted with the contents of messages enclosed in 07e, not for log output - void rawDataReceived(const QByteArray &data); - void error(const QString &msg); - void logMessage(const QString &msg); - -private slots: - void slotMessageReceived(const trk::TrkResult &result, const QByteArray &a); - -protected slots: - void emitError(const QString &msg); - void emitLogMessage(const QString &msg); - -public slots: - void close(); - -private: - void readMessages(); - TrkDevicePrivate *d; -}; - -} // namespace trk - -#endif // TRKDEVICE_H diff --git a/tools/runonphone/trk/trkutils.cpp b/tools/runonphone/trk/trkutils.cpp deleted file mode 100644 index 5cce950..0000000 --- a/tools/runonphone/trk/trkutils.cpp +++ /dev/null @@ -1,479 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "trkutils.h" -#include - -#include -#include -#include -#include -#include - -#define logMessage(s) do { qDebug() << "TRKCLIENT: " << s; } while (0) - -namespace trk { - -TrkAppVersion::TrkAppVersion() -{ - reset(); -} - -void TrkAppVersion::reset() -{ - trkMajor = trkMinor= protocolMajor = protocolMinor = 0; -} - -Session::Session() -{ - reset(); -} - -void Session::reset() -{ - cpuMajor = 0; - cpuMinor = 0; - bigEndian = 0; - defaultTypeSize = 0; - fpTypeSize = 0; - extended1TypeSize = 0; - extended2TypeSize = 0; - pid = 0; - tid = 0; - codeseg = 0; - dataseg = 0; - - currentThread = 0; - libraries.clear(); - trkAppVersion.reset(); -} - -static QString formatCpu(int major, int minor) -{ - //: CPU description of an S60 device - //: %1 major verison, %2 minor version - //: %3 real name of major verison, %4 real name of minor version - const QString str = QCoreApplication::translate("trk::Session", "CPU: v%1.%2%3%4"); - QString majorStr; - QString minorStr; - switch (major) { - case 0x04: - majorStr = " ARM"; - break; - } - switch (minor) { - case 0x00: - minorStr = " 920T"; - break; - } - return str.arg(major).arg(minor).arg(majorStr).arg(minorStr); - } - -QString formatTrkVersion(const TrkAppVersion &version) -{ - QString str = QCoreApplication::translate("trk::Session", - "App TRK: v%1.%2 TRK protocol: v%3.%4"); - str = str.arg(version.trkMajor).arg(version.trkMinor); - return str.arg(version.protocolMajor).arg(version.protocolMinor); -} - -QString Session::deviceDescription(unsigned verbose) const -{ - if (!cpuMajor) - return QString(); - - //: s60description - //: description of an S60 device - //: %1 CPU description, %2 endianness - //: %3 default type size (if any), %4 float size (if any) - //: %5 TRK version - QString msg = QCoreApplication::translate("trk::Session", "%1, %2%3%4, %5"); - QString endianness = bigEndian - ? QCoreApplication::translate("trk::Session", "big endian") - : QCoreApplication::translate("trk::Session", "little endian"); - msg = msg.arg(formatCpu(cpuMajor, cpuMinor)).arg(endianness); - //: The separator in a list of strings - QString defaultTypeSizeStr; - QString fpTypeSizeStr; - if (verbose && defaultTypeSize) - //: will be inserted into s60description - defaultTypeSizeStr = QCoreApplication::translate("trk::Session", ", type size: %1").arg(defaultTypeSize); - if (verbose && fpTypeSize) - //: will be inserted into s60description - fpTypeSizeStr = QCoreApplication::translate("trk::Session", ", float size: %1").arg(fpTypeSize); - msg = msg.arg(defaultTypeSizeStr).arg(fpTypeSizeStr); - return msg.arg(formatTrkVersion(trkAppVersion)); -} - - -QByteArray decode7d(const QByteArray &ba) -{ - QByteArray res; - res.reserve(ba.size()); - for (int i = 0; i < ba.size(); ++i) { - byte c = byte(ba.at(i)); - if (c == 0x7d) { - ++i; - c = 0x20 ^ byte(ba.at(i)); - } - res.append(c); - } - return res; -} - -QByteArray encode7d(const QByteArray &ba) -{ - QByteArray res; - res.reserve(ba.size() + 2); - for (int i = 0; i < ba.size(); ++i) { - byte c = byte(ba.at(i)); - if (c == 0x7e || c == 0x7d) { - res.append(0x7d); - res.append(0x20 ^ c); - } else { - res.append(c); - } - } - return res; -} - -// FIXME: Use the QByteArray based version below? -static inline QString stringFromByte(byte c) -{ - return QString::fromLatin1("%1").arg(c, 2, 16, QChar('0')); -} - -SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen) -{ - QString str; - QString ascii; - const int size = maxLen == -1 ? ba.size() : qMin(ba.size(), maxLen); - for (int i = 0; i < size; ++i) { - //if (i == 5 || i == ba.size() - 2) - // str += " "; - int c = byte(ba.at(i)); - str += QString("%1 ").arg(c, 2, 16, QChar('0')); - if (i >= 8 && i < ba.size() - 2) - ascii += QChar(c).isPrint() ? QChar(c) : QChar('.'); - } - if (size != ba.size()) { - str += "..."; - ascii += "..."; - } - return str + " " + ascii; -} - -SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits) -{ - QByteArray ba = QByteArray::number(n, 16); - if (digits == 0 || ba.size() == digits) - return ba; - return QByteArray(digits - ba.size(), '0') + ba; -} - -SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits) -{ - return "0x" + hexNumber(n, digits); -} - -TrkResult::TrkResult() : - code(0), - token(0), - isDebugOutput(false) -{ -} - -void TrkResult::clear() -{ - code = token= 0; - isDebugOutput = false; - data.clear(); - cookie = QVariant(); -} - -QString TrkResult::toString() const -{ - QString res = stringFromByte(code); - res += QLatin1String(" ["); - res += stringFromByte(token); - res += QLatin1Char(']'); - res += QLatin1Char(' '); - res += stringFromArray(data); - return res; -} - -QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame) -{ - byte s = command + token; - for (int i = 0; i != data.size(); ++i) - s += data.at(i); - byte checksum = 255 - (s & 0xff); - //int x = s + ~s; - //logMessage("check: " << s << checksum << x; - - QByteArray response; - response.reserve(data.size() + 3); - response.append(char(command)); - response.append(char(token)); - response.append(data); - response.append(char(checksum)); - - QByteArray encodedData = encode7d(response); - - QByteArray ba; - ba.reserve(encodedData.size() + 6); - if (serialFrame) { - ba.append(char(0x01)); - ba.append(char(0x90)); - const ushort encodedSize = encodedData.size() + 2; // 2 x 0x7e - appendShort(&ba, encodedSize, BigEndian); - } - ba.append(char(0x7e)); - ba.append(encodedData); - ba.append(char(0x7e)); - - return ba; -} - -/* returns 0 if array doesn't represent a result, -otherwise returns the length of the result data */ -ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) -{ - if (serialFrame) { - // Serial protocol with length info - if (buffer.length() < 4) - return 0; - if (buffer.at(0) != 0x01 || byte(buffer.at(1)) != 0x90) - return 0; - const ushort len = extractShort(buffer.data() + 2); - return (buffer.size() >= len + 4) ? len : ushort(0); - } - // Frameless protocol without length info - const char delimiter = char(0x7e); - const int firstDelimiterPos = buffer.indexOf(delimiter); - // Regular message delimited by 0x7e..0x7e - if (firstDelimiterPos == 0) { - const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1); - return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0; - } - // Some ASCII log message up to first delimiter or all - return firstDelimiterPos != -1 ? firstDelimiterPos : buffer.size(); -} - -bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByteArray *rawData) -{ - result->clear(); - if(rawData) - rawData->clear(); - const ushort len = isValidTrkResult(*buffer, serialFrame); - if (!len) - return false; - // handle receiving application output, which is not a regular command - const int delimiterPos = serialFrame ? 4 : 0; - if (buffer->at(delimiterPos) != 0x7e) { - result->isDebugOutput = true; - result->data = buffer->mid(delimiterPos, len); - result->data.replace("\r\n", "\n"); - *buffer->remove(0, delimiterPos + len); - return true; - } - // FIXME: what happens if the length contains 0xfe? - // Assume for now that it passes unencoded! - const QByteArray data = decode7d(buffer->mid(delimiterPos + 1, len - 2)); - if(rawData) - *rawData = data; - *buffer->remove(0, delimiterPos + len); - - byte sum = 0; - for (int i = 0; i < data.size(); ++i) // 3 = 2 * 0xfe + sum - sum += byte(data.at(i)); - if (sum != 0xff) - logMessage("*** CHECKSUM ERROR: " << byte(sum)); - - result->code = data.at(0); - result->token = data.at(1); - result->data = data.mid(2, data.size() - 3); - //logMessage(" REST BUF: " << stringFromArray(*buffer)); - //logMessage(" CURR DATA: " << stringFromArray(data)); - //QByteArray prefix = "READ BUF: "; - //logMessage((prefix + "HEADER: " + stringFromArray(header).toLatin1()).data()); - return true; -} - -SYMBIANUTILS_EXPORT ushort extractShort(const char *data) -{ - return byte(data[0]) * 256 + byte(data[1]); -} - -SYMBIANUTILS_EXPORT uint extractInt(const char *data) -{ - uint res = byte(data[0]); - res *= 256; res += byte(data[1]); - res *= 256; res += byte(data[2]); - res *= 256; res += byte(data[3]); - return res; -} - -SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba) -{ - QString res; - char buf[10]; - for (int i = 0, n = ba.size(); i != n; ++i) { - const byte c = ba.at(i); - if (isprint(c)) { - res += c; - } else { - qsnprintf(buf, sizeof(buf) - 1, "\\%x", int(c)); - res += buf; - } - } - return res; -} - -SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness endian) -{ - if (endian == BigEndian) { - ba->append(s / 256); - ba->append(s % 256); - } else { - ba->append(s % 256); - ba->append(s / 256); - } -} - -SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness endian) -{ - const uchar b3 = i % 256; i /= 256; - const uchar b2 = i % 256; i /= 256; - const uchar b1 = i % 256; i /= 256; - const uchar b0 = i; - ba->reserve(ba->size() + 4); - if (endian == BigEndian) { - ba->append(b0); - ba->append(b1); - ba->append(b2); - ba->append(b3); - } else { - ba->append(b3); - ba->append(b2); - ba->append(b1); - ba->append(b0); - } -} - -void appendString(QByteArray *ba, const QByteArray &str, Endianness endian, bool appendNullTerminator) -{ - const int fullSize = str.size() + (appendNullTerminator ? 1 : 0); - appendShort(ba, fullSize, endian); // count the terminating \0 - ba->append(str); - if (appendNullTerminator) - ba->append('\0'); -} - -void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness endian) -{ - // convert the QDateTime to UTC and append its representation to QByteArray - // format is the same as in FAT file system - dateTime = dateTime.toUTC(); - const QTime utcTime = dateTime.time(); - const QDate utcDate = dateTime.date(); - uint fatDateTime = (utcTime.hour() << 11 | utcTime.minute() << 5 | utcTime.second()/2) << 16; - fatDateTime |= (utcDate.year()-1980) << 9 | utcDate.month() << 5 | utcDate.day(); - appendInt(ba, fatDateTime, endian); -} - -QByteArray errorMessage(byte code) -{ - switch (code) { - case 0x00: return "No error"; - case 0x01: return "Generic error in CWDS message"; - case 0x02: return "Unexpected packet size in send msg"; - case 0x03: return "Internal error occurred in CWDS"; - case 0x04: return "Escape followed by frame flag"; - case 0x05: return "Bad FCS in packet"; - case 0x06: return "Packet too long"; - case 0x07: return "Sequence ID not expected (gap in sequence)"; - - case 0x10: return "Command not supported"; - case 0x11: return "Command param out of range"; - case 0x12: return "An option was not supported"; - case 0x13: return "Read/write to invalid memory"; - case 0x14: return "Read/write invalid registers"; - case 0x15: return "Exception occurred in CWDS"; - case 0x16: return "Targeted system or thread is running"; - case 0x17: return "Breakpoint resources (HW or SW) exhausted"; - case 0x18: return "Requested breakpoint conflicts with existing one"; - - case 0x20: return "General OS-related error"; - case 0x21: return "Request specified invalid process"; - case 0x22: return "Request specified invalid thread"; - } - return "Unknown error"; -} - -uint swapEndian(uint in) -{ - return (in>>24) | ((in<<8) & 0x00FF0000) | ((in>>8) & 0x0000FF00) | (in<<24); -} - -int TrkResult::errorCode() const -{ - // NAK means always error, else data sized 1 with a non-null element - const bool isNAK = code == 0xff; - if (data.size() != 1 && !isNAK) - return 0; - if (const int errorCode = data.at(0)) - return errorCode; - return isNAK ? 0xff : 0; -} - -QString TrkResult::errorString() const -{ - // NAK means always error, else data sized 1 with a non-null element - if (code == 0xff) - return "NAK"; - if (data.size() < 1) - return "Unknown error packet"; - return errorMessage(data.at(0)); -} - -} // namespace trk - diff --git a/tools/runonphone/trk/trkutils.h b/tools/runonphone/trk/trkutils.h deleted file mode 100644 index 3a485c7..0000000 --- a/tools/runonphone/trk/trkutils.h +++ /dev/null @@ -1,185 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef DEBUGGER_TRK_UTILS -#define DEBUGGER_TRK_UTILS - -#include "symbianutils_global.h" -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE -class QDateTime; -QT_END_NAMESPACE - -namespace trk { - -typedef unsigned char byte; - -enum Command { - TrkPing = 0x00, - TrkConnect = 0x01, - TrkDisconnect = 0x02, - TrkVersions = 0x04, - TrkSupported = 0x05, - TrkCpuType = 0x06, - TrkHostVersions = 0x09, - TrkContinue = 0x18, - TrkCreateItem = 0x40, - TrkDeleteItem = 0x41, - - TrkWriteFile = 0x48, - TrkOpenFile = 0x4a, - TrkCloseFile = 0x4b, - TrkInstallFile = 0x4d, - TrkInstallFile2 = 0x4e, - - TrkNotifyAck = 0x80, - TrkNotifyNak = 0xff, - TrkNotifyStopped = 0x90, - TrkNotifyException = 0x91, - TrkNotifyInternalError = 0x92, - TrkNotifyCreated = 0xa0, - TrkNotifyDeleted = 0xa1, - TrkNotifyProcessorStarted = 0xa2, - TrkNotifyProcessorStandBy = 0xa6, - TrkNotifyProcessorReset = 0xa7 -}; - -inline byte extractByte(const char *data) { return *data; } -SYMBIANUTILS_EXPORT ushort extractShort(const char *data); -SYMBIANUTILS_EXPORT uint extractInt(const char *data); - -SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); - -// produces "xx xx xx " -SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen = - 1); - -enum Endianness -{ - LittleEndian, - BigEndian, - TargetByteOrder = BigEndian, -}; - -SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder); -SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder); -SYMBIANUTILS_EXPORT void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true); - -struct SYMBIANUTILS_EXPORT Library -{ - Library() {} - - QByteArray name; - uint codeseg; - uint dataseg; -}; - -struct SYMBIANUTILS_EXPORT TrkAppVersion -{ - TrkAppVersion(); - void reset(); - - int trkMajor; - int trkMinor; - int protocolMajor; - int protocolMinor; -}; - -struct SYMBIANUTILS_EXPORT Session -{ - Session(); - void reset(); - QString deviceDescription(unsigned verbose) const; - - // Trk feedback - byte cpuMajor; - byte cpuMinor; - byte bigEndian; - byte defaultTypeSize; - byte fpTypeSize; - byte extended1TypeSize; - byte extended2TypeSize; - TrkAppVersion trkAppVersion; - uint pid; - uint tid; - uint codeseg; - uint dataseg; - QHash addressToBP; - - typedef QList Libraries; - Libraries libraries; - - typedef uint Thread; - typedef QList Threads; - Threads threads; - - // Gdb request - uint currentThread; - QStringList modules; -}; - -struct SYMBIANUTILS_EXPORT TrkResult -{ - TrkResult(); - void clear(); - QString toString() const; - // 0 for no error. - int errorCode() const; - QString errorString() const; - - byte code; - byte token; - QByteArray data; - QVariant cookie; - bool isDebugOutput; -}; - -SYMBIANUTILS_EXPORT QByteArray errorMessage(byte code); -SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits = 0); -SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too -SYMBIANUTILS_EXPORT uint swapEndian(uint in); - -} // namespace trk - -#endif // DEBUGGER_TRK_UTILS diff --git a/tools/runonphone/trk/trkutils_p.h b/tools/runonphone/trk/trkutils_p.h deleted file mode 100644 index 12b0109..0000000 --- a/tools/runonphone/trk/trkutils_p.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef DEBUGGER_TRK_PRIVATE_UTILS -#define DEBUGGER_TRK_PRIVATE_UTILS - -#include "trkutils.h" -#include "symbianutils_global.h" - -QT_BEGIN_NAMESPACE -class QDateTime; -QT_END_NAMESPACE - -namespace trk { - -void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder); -// returns a QByteArray containing optionally -// the serial frame [0x01 0x90 ] and 0x7e encoded7d(ba) 0x7e -QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame); -bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0); - -} // namespace trk - -#endif // DEBUGGER_TRK_PRIVATE_UTILS -- cgit v0.12 From 39709d61fbd4a17edf5f141877d312d3872ccce0 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 9 Feb 2010 11:56:37 +0100 Subject: Catch up symbianutils to creator 3efdb87682a5785bac7b90f9f9a8bb819a1cb053 commit 3efdb87682a5785bac7b90f9f9a8bb819a1cb053 Author: Friedemann Kleint Date: Mon Feb 8 14:10:51 2010 +0100 S60/Trk: Make the port a property of TrkDevice. Associate the port with the device instead of passing it to open for better handling. commit 76872c6ed8a1477f1914266d6917ee4aad6ff7e9 Author: Friedemann Kleint Date: Fri Feb 5 17:34:02 2010 +0100 S60: Move serialdevicelister.cpp to symbianutils/symbiandevicemanager.cpp --- .../symbianutils/communicationstarter.cpp | 21 +- .../runonphone/symbianutils/communicationstarter.h | 2 - tools/runonphone/symbianutils/launcher.cpp | 9 +- .../symbianutils/symbiandevicemanager.cpp | 331 +++++++++++++++++++++ .../runonphone/symbianutils/symbiandevicemanager.h | 145 +++++++++ tools/runonphone/symbianutils/symbianutils.pri | 6 +- tools/runonphone/symbianutils/trkdevice.cpp | 31 +- tools/runonphone/symbianutils/trkdevice.h | 6 +- tools/runonphone/symbianutils/trkutils.cpp | 1 + 9 files changed, 520 insertions(+), 32 deletions(-) create mode 100644 tools/runonphone/symbianutils/symbiandevicemanager.cpp create mode 100644 tools/runonphone/symbianutils/symbiandevicemanager.h diff --git a/tools/runonphone/symbianutils/communicationstarter.cpp b/tools/runonphone/symbianutils/communicationstarter.cpp index e5e556e..cdee49f 100644 --- a/tools/runonphone/symbianutils/communicationstarter.cpp +++ b/tools/runonphone/symbianutils/communicationstarter.cpp @@ -58,7 +58,6 @@ struct BaseCommunicationStarterPrivate { int intervalMS; int attempts; int n; - QString device; QString errorString; BaseCommunicationStarter::State state; }; @@ -70,7 +69,6 @@ BaseCommunicationStarterPrivate::BaseCommunicationStarterPrivate(const BaseCommu intervalMS(1000), attempts(-1), n(0), - device(QLatin1String("/dev/rfcomm0")), state(BaseCommunicationStarter::TimedOut) { } @@ -108,7 +106,7 @@ BaseCommunicationStarter::StartResult BaseCommunicationStarter::start() // Before we instantiate timers, and such, try to open the device, // which should succeed if another listener is already running in // 'Watch' mode - if (d->trkDevice->open(d->device , &(d->errorString))) + if (d->trkDevice->open(&(d->errorString))) return ConnectionSucceeded; // Pull up resources for next attempt d->n = 0; @@ -155,12 +153,7 @@ void BaseCommunicationStarter::setAttempts(int a) QString BaseCommunicationStarter::device() const { - return d->device; -} - -void BaseCommunicationStarter::setDevice(const QString &dv) -{ - d->device = dv; + return d->trkDevice->port(); } QString BaseCommunicationStarter::errorString() const @@ -175,20 +168,20 @@ void BaseCommunicationStarter::slotTimer() if (d->attempts >= 0 && d->n >= d->attempts) { stopTimer(); d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n) - .arg(d->device).arg(d->intervalMS); + .arg(d->trkDevice->port()).arg(d->intervalMS); d->state = TimedOut; emit timeout(); } else { // Attempt n to connect? - if (d->trkDevice->open(d->device , &(d->errorString))) { + if (d->trkDevice->open(&(d->errorString))) { stopTimer(); - const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->device).arg(d->n); + const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->trkDevice->port()).arg(d->n); emit message(msg); d->state = Connected; emit connected(); } else { const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...") - .arg(d->device).arg(d->n).arg(d->errorString); + .arg(d->trkDevice->port()).arg(d->n).arg(d->errorString); emit message(msg); } } @@ -228,13 +221,11 @@ BluetoothListener *ConsoleBluetoothStarter::createListener() bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice, QObject *listenerParent, - const QString &device, int attempts, QString *errorMessage) { // Set up a console starter to print to stdout. ConsoleBluetoothStarter starter(trkDevice, listenerParent); - starter.setDevice(device); starter.setAttempts(attempts); switch (starter.start()) { case Started: diff --git a/tools/runonphone/symbianutils/communicationstarter.h b/tools/runonphone/symbianutils/communicationstarter.h index 2d7dc50..0a060ee 100644 --- a/tools/runonphone/symbianutils/communicationstarter.h +++ b/tools/runonphone/symbianutils/communicationstarter.h @@ -80,7 +80,6 @@ public: void setAttempts(int a); QString device() const; - void setDevice(const QString &); State state() const; QString errorString() const; @@ -142,7 +141,6 @@ class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStar public: static bool startBluetooth(const TrkDevicePtr& trkDevice, QObject *listenerParent, - const QString &device, int attempts, QString *errorMessage); diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp index 4f91545..408829b 100644 --- a/tools/runonphone/symbianutils/launcher.cpp +++ b/tools/runonphone/symbianutils/launcher.cpp @@ -67,7 +67,6 @@ struct LauncherPrivate { explicit LauncherPrivate(const TrkDevicePtr &d); TrkDevicePtr m_device; - QString m_trkServerName; QByteArray m_trkReadBuffer; Launcher::State m_state; @@ -131,12 +130,12 @@ void Launcher::addStartupActions(trk::Launcher::Actions startupActions) void Launcher::setTrkServerName(const QString &name) { - d->m_trkServerName = name; + d->m_device->setPort(name); } QString Launcher::trkServerName() const { - return d->m_trkServerName; + return d->m_device->port(); } TrkDevicePtr Launcher::trkDevice() const @@ -191,7 +190,7 @@ bool Launcher::startServer(QString *errorMessage) errorMessage->clear(); if (d->m_verbose) { const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6") - .arg(d->m_trkServerName, d->m_fileName, + .arg(trkServerName(), d->m_fileName, d->m_commandLineArgs.join(QString(QLatin1Char(' '))), d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName); logMessage(msg); @@ -213,7 +212,7 @@ bool Launcher::startServer(QString *errorMessage) qWarning("No remote executable given for running."); return false; } - if (!d->m_device->isOpen() && !d->m_device->open(d->m_trkServerName, errorMessage)) + if (!d->m_device->isOpen() && !d->m_device->open(errorMessage)) return false; if (d->m_closeDevice) { connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.cpp b/tools/runonphone/symbianutils/symbiandevicemanager.cpp new file mode 100644 index 0000000..f663816 --- /dev/null +++ b/tools/runonphone/symbianutils/symbiandevicemanager.cpp @@ -0,0 +1,331 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "symbiandevicemanager.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace SymbianUtils { + +enum { debug = 0 }; + +static const char REGKEY_CURRENT_CONTROL_SET[] = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet"; +static const char USBSER[] = "Services/usbser/Enum"; + +const char *SymbianDeviceManager::linuxBlueToothDeviceRootC = "/dev/rfcomm"; + +// ------------- SymbianDevice +class SymbianDeviceData : public QSharedData { +public: + SymbianDeviceData() : type(SerialPortCommunication) {} + + QString portName; + QString friendlyName; + QString deviceDesc; + QString manufacturer; + DeviceCommunicationType type; +}; + +SymbianDevice::SymbianDevice(SymbianDeviceData *data) : + m_data(data) +{ + +} + +SymbianDevice::SymbianDevice() : + m_data(new SymbianDeviceData) +{ +} +SymbianDevice::SymbianDevice(const SymbianDevice &rhs) : + m_data(rhs.m_data) +{ +} + +SymbianDevice &SymbianDevice::operator=(const SymbianDevice &rhs) +{ + if (this != &rhs) + m_data = rhs.m_data; + return *this; +} + +SymbianDevice::~SymbianDevice() +{ +} + +QString SymbianDevice::portName() const +{ + return m_data->portName; +} + +QString SymbianDevice::friendlyName() const +{ + return m_data->friendlyName; +} + +QString SymbianDevice::deviceDesc() const +{ + return m_data->deviceDesc; +} + +QString SymbianDevice::manufacturer() const +{ + return m_data->manufacturer; +} + +DeviceCommunicationType SymbianDevice::type() const +{ + return m_data->type; +} + +bool SymbianDevice::isNull() const +{ + return !m_data->portName.isEmpty(); +} + +QString SymbianDevice::toString() const +{ + QString rc; + QTextStream str(&rc); + format(str); + return rc; +} + +void SymbianDevice::format(QTextStream &str) const +{ + str << (m_data->type == BlueToothCommunication ? "Bluetooth: " : "Serial: ") + << m_data->portName; + if (!m_data->friendlyName.isEmpty()) { + str << " (" << m_data->friendlyName; + if (!m_data->deviceDesc.isEmpty()) + str << " / " << m_data->deviceDesc; + str << ')'; + } + if (!m_data->manufacturer.isEmpty()) + str << " [" << m_data->manufacturer << ']'; +} + +// Compare by port and friendly name +int SymbianDevice::compare(const SymbianDevice &rhs) const +{ + if (const int prc = m_data->portName.compare(rhs.m_data->portName)) + return prc; + if (const int frc = m_data->friendlyName.compare(rhs.m_data->friendlyName)) + return frc; + return 0; +} + +QDebug operator<<(QDebug d, const SymbianDevice &cd) +{ + d.nospace() << cd.toString(); + return d; +} + +// ------------- SymbianDeviceManagerPrivate +struct SymbianDeviceManagerPrivate { + SymbianDeviceManagerPrivate() : m_initialized(false) {} + + bool m_initialized; + SymbianDeviceManager::SymbianDeviceList m_devices; +}; + +SymbianDeviceManager::SymbianDeviceManager(QObject *parent) : + QObject(parent), + d(new SymbianDeviceManagerPrivate) +{ +} + +SymbianDeviceManager::~SymbianDeviceManager() +{ + delete d; +} + +SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::devices() const +{ + if (!d->m_initialized) + const_cast(this)->update(false); + return d->m_devices; +} + +QString SymbianDeviceManager::toString() const +{ + QString rc; + QTextStream str(&rc); + const int count = d->m_devices.size(); + for (int i = 0; i < count; i++) { + str << '#' << i << ' '; + d->m_devices.at(i).format(str); + str << '\n'; + } + return rc; +} + +QString SymbianDeviceManager::friendlyNameForPort(const QString &port) const +{ + foreach (const SymbianDevice &device, d->m_devices) { + if (device.portName() == port) + return device.friendlyName(); + } + return QString(); +} + +void SymbianDeviceManager::update() +{ + update(true); +} + +void SymbianDeviceManager::update(bool emitSignals) +{ + typedef SymbianDeviceList::iterator SymbianDeviceListIterator; + + if (debug) + qDebug(">SerialDeviceLister::update(%d)\n%s", int(emitSignals), + qPrintable(toString())); + + d->m_initialized = true; + // Get ordered new list + SymbianDeviceList newDevices = serialPorts() + blueToothDevices(); + if (newDevices.size() > 1) + qStableSort(newDevices.begin(), newDevices.end()); + if (d->m_devices == newDevices) // Happy, nothing changed. + return; + // Merge the lists and emit the respective added/removed signals, assuming + // no one can plug a different device on the same port at the speed of lightning + if (!d->m_devices.isEmpty()) { + // Find deleted devices + for (SymbianDeviceListIterator oldIt = d->m_devices.begin(); oldIt != d->m_devices.end(); ) { + if (newDevices.contains(*oldIt)) { + ++oldIt; + } else { + const SymbianDevice toBeDeleted = *oldIt; + oldIt = d->m_devices.erase(oldIt); + if (emitSignals) + emit deviceRemoved(toBeDeleted); + } + } + } + if (!newDevices.isEmpty()) { + // Find new devices and insert in order + foreach(const SymbianDevice &newDevice, newDevices) { + if (!d->m_devices.contains(newDevice)) { + d->m_devices.append(newDevice); + if (emitSignals) + emit deviceAdded(newDevice); + } + } + if (d->m_devices.size() > 1) + qStableSort(d->m_devices.begin(), d->m_devices.end()); + } + if (emitSignals) + emit updated(); + + if (debug) + qDebug(" 1) + qDebug() << "SerialDeviceLister::serialPorts(): Checking " << i << count + << REGKEY_CURRENT_CONTROL_SET << usbSerialRootKey << driverRootKey; + QScopedPointer device(new SymbianDeviceData); + device->type = SerialPortCommunication; + device->friendlyName = registry.value(driverRootKey + QLatin1String("FriendlyName")).toString(); + device->portName = registry.value(driverRootKey + QLatin1String("Device Parameters/PortName")).toString(); + device->deviceDesc = registry.value(driverRootKey + QLatin1String("DeviceDesc")).toString(); + device->manufacturer = registry.value(driverRootKey + QLatin1String("Mfg")).toString(); + rc.append(SymbianDevice(device.take())); + } + } +#endif + return rc; +} + +SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::blueToothDevices() const +{ + SymbianDeviceList rc; +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) + // Bluetooth devices are created on connection. List the existing ones + // or at least the first one. + const QString prefix = QLatin1String(linuxBlueToothDeviceRootC); + const QString friendlyFormat = QLatin1String("Bluetooth device (%1)"); + for (int d = 0; d < 4; d++) { + QScopedPointer device(new SymbianDeviceData); + device->type = BlueToothCommunication; + device->portName = prefix + QString::number(d); + if (d == 0 || QFileInfo(device->portName).exists()) { + device->friendlyName = friendlyFormat.arg(device->portName); + rc.push_back(SymbianDevice(device.take())); + } + } +#endif + return rc; +} + +Q_GLOBAL_STATIC(SymbianDeviceManager, symbianDeviceManager) + +SymbianDeviceManager *SymbianDeviceManager::instance() +{ + return symbianDeviceManager(); +} + +QDebug operator<<(QDebug d, const SymbianDeviceManager &sdm) +{ + d.nospace() << sdm.toString(); + return d; +} + +} // namespace SymbianUtilsInternal diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.h b/tools/runonphone/symbianutils/symbiandevicemanager.h new file mode 100644 index 0000000..dcf131a --- /dev/null +++ b/tools/runonphone/symbianutils/symbiandevicemanager.h @@ -0,0 +1,145 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef SYMBIANDEVICEMANAGER_H +#define SYMBIANDEVICEMANAGER_H + +#include "symbianutils_global.h" + +#include +#include + +QT_BEGIN_NAMESPACE +class QDebug; +class QTextStream; +QT_END_NAMESPACE + +namespace SymbianUtils { + +struct SymbianDeviceManagerPrivate; +class SymbianDeviceData; + +enum DeviceCommunicationType { + SerialPortCommunication = 0, + BlueToothCommunication = 1 +}; + +// SymbianDevice, explicitly shared. +class SYMBIANUTILS_EXPORT SymbianDevice { + explicit SymbianDevice(SymbianDeviceData *data); + friend class SymbianDeviceManager; +public: + SymbianDevice(); + SymbianDevice(const SymbianDevice &rhs); + SymbianDevice &operator=(const SymbianDevice &rhs); + ~SymbianDevice(); + int compare(const SymbianDevice &rhs) const; + + DeviceCommunicationType type() const; + bool isNull() const; + QString portName() const; + QString friendlyName() const; + + // Windows only. + QString deviceDesc() const; + QString manufacturer() const; + + void format(QTextStream &str) const; + QString toString() const; + +private: + QExplicitlySharedDataPointer m_data; +}; + +QDebug operator<<(QDebug d, const SymbianDevice &); + +inline bool operator==(const SymbianDevice &d1, const SymbianDevice &d2) + { return d1.compare(d2) == 0; } +inline bool operator!=(const SymbianDevice &d1, const SymbianDevice &d2) + { return d1.compare(d2) != 0; } +inline bool operator<(const SymbianDevice &d1, const SymbianDevice &d2) + { return d1.compare(d2) < 0; } + +/* SymbianDeviceManager: Singleton that maintains a list of Symbian devices. + * and emits change signals. + * On Windows, the update slot must be connected to a signal + * emitted from an event handler listening for WM_DEVICECHANGE. */ +class SYMBIANUTILS_EXPORT SymbianDeviceManager : public QObject +{ + Q_OBJECT +public: + typedef QList SymbianDeviceList; + + static const char *linuxBlueToothDeviceRootC; + + // Do not use this constructor, it is just public for Q_GLOBAL_STATIC + explicit SymbianDeviceManager(QObject *parent = 0); + virtual ~SymbianDeviceManager(); + + // Singleton access. + static SymbianDeviceManager *instance(); + + SymbianDeviceList devices() const; + QString toString() const; + + QString friendlyNameForPort(const QString &port) const; + +public slots: + void update(); + +signals: + void deviceRemoved(const SymbianDevice &d); + void deviceAdded(const SymbianDevice &d); + void updated(); + +private: + void update(bool emitSignals); + SymbianDeviceList serialPorts() const; + SymbianDeviceList blueToothDevices() const; + + SymbianDeviceManagerPrivate *d; +}; + +QDebug operator<<(QDebug d, const SymbianDeviceManager &); + +} // namespace SymbianUtils + +#endif // SYMBIANDEVICEMANAGER_H diff --git a/tools/runonphone/symbianutils/symbianutils.pri b/tools/runonphone/symbianutils/symbianutils.pri index a54df76..6309517 100644 --- a/tools/runonphone/symbianutils/symbianutils.pri +++ b/tools/runonphone/symbianutils/symbianutils.pri @@ -8,13 +8,15 @@ HEADERS += $$PWD/symbianutils_global.h \ $$PWD/trkdevice.h \ $$PWD/launcher.h \ $$PWD/bluetoothlistener.h \ - $$PWD/communicationstarter.h + $$PWD/communicationstarter.h \ + $$PWD/symbiandevicemanager.h SOURCES += $$PWD/trkutils.cpp \ $$PWD/trkdevice.cpp \ $$PWD/launcher.cpp \ $$PWD/bluetoothlistener.cpp \ - $$PWD/communicationstarter.cpp + $$PWD/communicationstarter.cpp \ + $$PWD/symbiandevicemanager.cpp # Tests/trklauncher is a console application contains(QT, gui) { diff --git a/tools/runonphone/symbianutils/trkdevice.cpp b/tools/runonphone/symbianutils/trkdevice.cpp index d587135..b327ab3 100644 --- a/tools/runonphone/symbianutils/trkdevice.cpp +++ b/tools/runonphone/symbianutils/trkdevice.cpp @@ -883,6 +883,7 @@ struct TrkDevicePrivate QByteArray trkReadBuffer; int verbose; QString errorString; + QString port; }; /////////////////////////////////////////////////////////////////////// @@ -914,13 +915,19 @@ TrkDevice::~TrkDevice() delete d; } -bool TrkDevice::open(const QString &port, QString *errorMessage) +bool TrkDevice::open(QString *errorMessage) { if (d->verbose) - qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame(); + qDebug() << "Opening" << port() << "is open: " << isOpen() << " serialFrame=" << serialFrame(); + if (d->port.isEmpty()) { + *errorMessage = QLatin1String("Internal error: No port set on TrkDevice"); + return false; + } + close(); #ifdef Q_OS_WIN - d->deviceContext->device = CreateFile(QString("\\\\.\\").append(port).toStdWString().c_str(), + const QString fullPort = QLatin1String("\\\\.\\") + d->port; + d->deviceContext->device = CreateFile(reinterpret_cast(fullPort.utf16()), GENERIC_READ | GENERIC_WRITE, 0, NULL, @@ -929,7 +936,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) NULL); if (INVALID_HANDLE_VALUE == d->deviceContext->device) { - *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port, winErrorMessage(GetLastError())); + *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port(), winErrorMessage(GetLastError())); return false; } memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED)); @@ -941,9 +948,9 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) return false; } #else - d->deviceContext->file.setFileName(port); + d->deviceContext->file.setFileName(d->port); if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) { - *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(port, d->deviceContext->file.errorString()); + *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(d->port, d->deviceContext->file.errorString()); return false; } @@ -982,7 +989,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) d->writerThread->start(); if (d->verbose) - qDebug() << "Opened" << port; + qDebug() << "Opened" << d->port; return true; } @@ -1016,6 +1023,16 @@ bool TrkDevice::isOpen() const #endif } +QString TrkDevice::port() const +{ + return d->port; +} + +void TrkDevice::setPort(const QString &p) +{ + d->port = p; +} + QString TrkDevice::errorString() const { return d->errorString; diff --git a/tools/runonphone/symbianutils/trkdevice.h b/tools/runonphone/symbianutils/trkdevice.h index 21a3cc1..78012fd 100644 --- a/tools/runonphone/symbianutils/trkdevice.h +++ b/tools/runonphone/symbianutils/trkdevice.h @@ -80,13 +80,17 @@ class SYMBIANUTILS_EXPORT TrkDevice : public QObject Q_OBJECT Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame) Q_PROPERTY(bool verbose READ verbose WRITE setVerbose) + Q_PROPERTY(QString port READ port WRITE setPort) public: explicit TrkDevice(QObject *parent = 0); virtual ~TrkDevice(); - bool open(const QString &port, QString *errorMessage); + bool open(QString *errorMessage); bool isOpen() const; + QString port() const; + void setPort(const QString &p); + QString errorString() const; bool serialFrame() const; diff --git a/tools/runonphone/symbianutils/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp index 5cce950..9b43c96 100644 --- a/tools/runonphone/symbianutils/trkutils.cpp +++ b/tools/runonphone/symbianutils/trkutils.cpp @@ -143,6 +143,7 @@ QString Session::deviceDescription(unsigned verbose) const return msg.arg(formatTrkVersion(trkAppVersion)); } +// -------------- QByteArray decode7d(const QByteArray &ba) { -- cgit v0.12 From b0c972dfd208411086b53ee2c2b0594ade3e2d10 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 9 Feb 2010 20:04:09 +0100 Subject: Add the download URI for smart installer package to documentation Task-number: QTBUG-8068 Reviewed-by: David Boddie --- doc/src/deployment/deployment.qdoc | 7 ++++++- doc/src/platforms/symbian-introduction.qdoc | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 41babd9..43f5d33 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1581,7 +1581,12 @@ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 If everything compiled and linked without any errors, we are now ready to create - an application installation package (\c wiggly_installer.sis): + an application installation package (\c wiggly_installer.sis). + + If you haven't done so already, download the latest release of the Smart Installer + from \l{http://get.qt.nokia.com/nokiasmartinstaller/}, and install it on top of the Qt package + + Then use this command to create the installer sis package: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 94075f5..5cebee3 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -127,7 +127,8 @@ \row \o \c run \o Run the application on the emulator. \row \o \c runonphone \o Run the application on a device. \row \o \c sis \o Create signed \c .sis file for project. - \row \o \c installer_sis \o Create signed smart installer \c .sis file for project. + \row \o \c installer_sis \o Create signed \l{Smart Installer}{smart installer} + \c .sis file for project. Smart installer will attempt to download missing dependencies in addition to just installing the application. @@ -141,6 +142,14 @@ To work on your project in Carbide, simply import the \c .pro file by right clicking on the project explorer and executing "Import...". + \section2 Smart Installer + + The Smart Installer makes sure that deployed applications have all the Qt dependencies + they need to run on a device. + + Download the latest release of the Smart Installer from \l{http://get.qt.nokia.com/nokiasmartinstaller/}, + and install it on top of the Qt package. + \section1 Installing your own applications To install your own applications on hardware, you need a signed \c .sis file. -- cgit v0.12 From 4935ec52fc07d4aaa7ae594cfe9986e25ca62dcb Mon Sep 17 00:00:00 2001 From: Bill King Date: Wed, 10 Feb 2010 10:50:59 +1000 Subject: (ODBC) Use wchar_t instead of assuming 2 bytes. On some platforms, especially iODBC, wchar_t is a 32bit value, not 16 Task-number: QTBUG-6928 --- src/sql/drivers/odbc/qsql_odbc.cpp | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 2049a76..4d3663e 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -144,6 +144,7 @@ public: QSqlRecord rInf; QVector fieldCache; + QVector paramCache; int fieldCacheIdx; int disconnectCount; bool hasSQLFetchScroll; @@ -202,7 +203,7 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode *nativeCode = nativeCode_; QString tmpstore; #ifdef UNICODE - tmpstore = QString((const QChar*)description_.data(), msgLen); + tmpstore = QString::fromWCharArray((const wchar_t*)description_, msgLen); #else tmpstore = QString::fromLocal8Bit((const char*)description_.data(), msgLen); #endif @@ -332,7 +333,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni } else { colSize++; // make sure there is room for more than the 0 termination if (unicode) { - colSize *= 2; // a tiny bit faster, since it saves a SQLGetData() call + colSize *= sizeof(wchar_t); // a tiny bit faster, since it saves a SQLGetData() call } } QVarLengthArray buf(colSize); @@ -353,9 +354,9 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni // contain the number of bytes returned - it contains the // total number of bytes that CAN be fetched // colSize-1: remove 0 termination when there is more data to fetch - int rSize = (r == SQL_SUCCESS_WITH_INFO) ? (unicode ? colSize-2 : colSize-1) : lengthIndicator; + int rSize = (r == SQL_SUCCESS_WITH_INFO) ? (unicode ? colSize-sizeof(wchar_t) : colSize-1) : lengthIndicator; if (unicode) { - fieldVal += QString((const QChar*) buf.constData(), rSize / 2); + fieldVal += QString::fromWCharArray((wchar_t*)buf.constData(), rSize / sizeof(wchar_t)); } else { fieldVal += QString::fromAscii(buf.constData(), rSize); } @@ -551,7 +552,7 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i ) } #ifdef UNICODE - QString qColName((const QChar*)colName, colNameLen); + QString qColName = QString::fromWCharArray((const wchar_t*)colName, colNameLen); #else QString qColName = QString::fromLocal8Bit((const char*)colName); #endif @@ -1270,9 +1271,12 @@ bool QODBCResult::exec() // bind parameters - only positional binding allowed QVector& values = boundValues(); + QVector wcharstorage; + int i; SQLRETURN r; for (i = 0; i < values.count(); ++i) { + wcharstorage.append(NULL); if (bindValueType(i) & QSql::Out) values[i].detach(); const QVariant &val = values.at(i); @@ -1435,13 +1439,14 @@ bool QODBCResult::exec() #ifndef Q_ODBC_VERSION_2 if (d->unicode) { QString str = val.toString(); - str.utf16(); + int strSize = str.length() * sizeof(wchar_t); if (*ind != SQL_NULL_DATA) - *ind = str.length() * sizeof(QChar); - int strSize = str.length() * sizeof(QChar); + *ind = strSize; if (bindValueType(i) & QSql::Out) { - QByteArray ba((char*)str.constData(), str.capacity() * sizeof(QChar)); + wchar_t *temp=new wchar_t[str.capacity()*sizeof(wchar_t)]; + str.toWCharArray(temp); + QByteArray ba((char*)temp, str.capacity() * sizeof(wchar_t)); r = SQLBindParameter(d->hStmt, i + 1, qParamType[(QFlag)(bindValueType(i)) & QSql::InOut], @@ -1453,9 +1458,13 @@ bool QODBCResult::exec() ba.size(), ind); tmpStorage.append(ba); + wcharstorage.replace(i,temp); break; } + wchar_t *temp=new wchar_t[(1+str.length())*sizeof(wchar_t)]; + str.toWCharArray(temp); + temp[str.length()]=0; r = SQLBindParameter(d->hStmt, i + 1, qParamType[(QFlag)(bindValueType(i)) & QSql::InOut], @@ -1463,9 +1472,10 @@ bool QODBCResult::exec() strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR, strSize, 0, - (void *)str.constData(), + (void *)temp, strSize, ind); + wcharstorage.replace(i,temp); break; } else @@ -1515,6 +1525,13 @@ bool QODBCResult::exec() } } r = SQLExecute(d->hStmt); + + for(int i=0;i Date: Tue, 9 Feb 2010 18:12:12 +0100 Subject: Cannot drag actions in Designer on Mac OS X/Cocoa. QMimeData sub classes reimplementing the formats() might not expose the temporary "application/x-qt-mime-type-name" mimetype used by DnD. So make sure that the NSDragPboard PasteBoard will contain this dummy mime type. Task-number: QTBUG-7981 Reviewed-by: mortens --- src/gui/kernel/qclipboard_mac.cpp | 12 ++++++++++++ src/gui/kernel/qcocoaview_mac.mm | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp index f3a971d..49a6cc8 100644 --- a/src/gui/kernel/qclipboard_mac.cpp +++ b/src/gui/kernel/qclipboard_mac.cpp @@ -388,6 +388,18 @@ QMacPasteboard::setMimeData(QMimeData *mime_src) clear_helper(); QStringList formats = mime_src->formats(); +#ifdef QT_MAC_USE_COCOA + // QMimeData sub classes reimplementing the formats() might not expose the + // temporary "application/x-qt-mime-type-name" mimetype. So check the existence + // of this mime type while doing drag and drop. + QString dummyMimeType(QLatin1String("application/x-qt-mime-type-name")); + if (!formats.contains(dummyMimeType)) { + QByteArray dummyType = mime_src->data(dummyMimeType); + if (!dummyType.isEmpty()) { + formats.append(dummyMimeType); + } + } +#endif for(int f = 0; f < formats.size(); ++f) { QString mimeType = formats.at(f); for (QList::Iterator it = availableConverters.begin(); it != availableConverters.end(); ++it) { diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 2c35be2..756cf92 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1404,7 +1404,7 @@ Qt::DropAction QDragManager::drag(QDrag *o) // setup the data QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacPasteboardMime::MIME_DND); - dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray()); + dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); dragBoard.setMimeData(dragPrivate()->data); // create the image -- cgit v0.12 From 3930b896eba50eb657c88923b2922a2fba0d6385 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 10 Feb 2010 10:27:32 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 36fe058a9001e6d47f0fd41c6304cdfdf3a735ed ) Changes in WebKit/qt since the last update: * Missing fileSystemPath() method in Qt KURL implementation --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 12 ++++++++++++ src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp | 6 ++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 4348cbc..2b39e81 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - da5d96a26e80162027bc95ce7e5725fe4b277ff7 + 36fe058a9001e6d47f0fd41c6304cdfdf3a735ed diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 1f6f290..61c2227 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2010-01-14 Diego Gonzalez + + Reviewed by Kenneth Christiansen. + + [Qt] Missing fileSystemPath() method in Qt KURL implementation + https://bugs.webkit.org/show_bug.cgi?id=33614 + + No new tests. + + * platform/qt/KURLQt.cpp: + (WebCore::KURL::fileSystemPath): + 2010-02-01 Andreas Kling Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp index 0763fe0..1f62006 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp @@ -95,8 +95,10 @@ KURL::operator QUrl() const String KURL::fileSystemPath() const { - notImplemented(); - return String(); + if (!isValid() || !protocolIs("file")) + return String(); + + return String(path()); } } -- cgit v0.12 From 8c8aabdfac1518f9d62097ea5c80cea3d50131a3 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 9 Feb 2010 16:32:10 +0200 Subject: Fix an unhandled exception in QScriptValue's test generator. $QT_END_LICENSE was interpreted as a template key by Template() object, causing substitute() call to throw a KeyError exception. The bug was introduced in 9962e2d96a212c518054220167eb6f61e1052bcc. Reviewed-by: TrustMe --- tests/auto/qscriptvalue/testgen/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py index 7161e6b..b3c81b9 100755 --- a/tests/auto/qscriptvalue/testgen/gen.py +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -231,7 +231,7 @@ if __name__ == '__main__': row_esc = escape(row) out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc)) - result = mainTempl.substitute(dump= "".join(out) \ + result = mainTempl.safe_substitute(dump= "".join(out) \ , values = (11 * ' ' + '<< ').join(qsv) \ , count = len(qsv) \ , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv))) -- cgit v0.12 From e6f401fb1a25f133bd3476ff327b2ba45fd741b7 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 9 Feb 2010 16:39:03 +0200 Subject: Add new test values to QScriptValue test generator. Two new values were added; results from QScriptEngine::nullValue() and QScriptEngine::undefinedValue(). Reviewed-by: Kent Hansen --- tests/auto/qscriptvalue/testgen/data.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt index 8e7026e..a041c9b 100644 --- a/tests/auto/qscriptvalue/testgen/data.txt +++ b/tests/auto/qscriptvalue/testgen/data.txt @@ -114,3 +114,7 @@ engine->evaluate("/foo/") engine->evaluate("new Object()") engine->evaluate("new Array()") engine->evaluate("new Error()") + +#other +engine->nullValue() +engine->undefinedValue() \ No newline at end of file -- cgit v0.12 From caf93a2b6d3df012055ab70ad4bba1bb7b29141d Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 9 Feb 2010 16:47:51 +0200 Subject: Apply newly generated test values. Apply test results for values created directly from QScriptEngine (results of nullValue() and undefinedValue()) Reviewed-by: Kent Hansen --- .../qscriptvalue/tst_qscriptvalue_generated.cpp | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp index 1d105b4..4e621b3 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -152,6 +152,8 @@ void tst_QScriptValue::initScriptValues() DEFINE_TEST_VALUE(engine->evaluate("new Object()")); DEFINE_TEST_VALUE(engine->evaluate("new Array()")); DEFINE_TEST_VALUE(engine->evaluate("new Error()")); + DEFINE_TEST_VALUE(engine->nullValue()); + DEFINE_TEST_VALUE(engine->undefinedValue()); } @@ -267,6 +269,8 @@ void tst_QScriptValue::isValid_makeData(const char* expr) << "engine->evaluate(\"new Object()\")" << "engine->evaluate(\"new Array()\")" << "engine->evaluate(\"new Error()\")" + << "engine->nullValue()" + << "engine->undefinedValue()" ; } newRow(expr) << isValid.contains(expr); @@ -453,6 +457,7 @@ void tst_QScriptValue::isNull_makeData(const char* expr) isNull << "QScriptValue(QScriptValue::NullValue)" << "QScriptValue(0, QScriptValue::NullValue)" << "QScriptValue(engine, QScriptValue::NullValue)" + << "engine->nullValue()" ; } newRow(expr) << isNull.contains(expr); @@ -535,6 +540,7 @@ void tst_QScriptValue::isUndefined_makeData(const char* expr) << "QScriptValue(0, QScriptValue::UndefinedValue)" << "QScriptValue(engine, QScriptValue::UndefinedValue)" << "engine->evaluate(\"{}\")" + << "engine->undefinedValue()" ; } newRow(expr) << isUndefined.contains(expr); @@ -810,6 +816,8 @@ void tst_QScriptValue::toString_makeData(const char* expr) toString.insert("engine->evaluate(\"new Object()\")", "[object Object]"); toString.insert("engine->evaluate(\"new Array()\")", ""); toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + toString.insert("engine->nullValue()", "null"); + toString.insert("engine->undefinedValue()", "undefined"); } newRow(expr) << toString.value(expr); } @@ -936,6 +944,8 @@ void tst_QScriptValue::toNumber_makeData(const char* expr) toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN()); toNumber.insert("engine->evaluate(\"new Array()\")", 0); toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN()); + toNumber.insert("engine->nullValue()", 0); + toNumber.insert("engine->undefinedValue()", qQNaN()); } newRow(expr) << toNumber.value(expr); } @@ -1070,6 +1080,8 @@ void tst_QScriptValue::toBool_makeData(const char* expr) toBool.insert("engine->evaluate(\"new Object()\")", true); toBool.insert("engine->evaluate(\"new Array()\")", true); toBool.insert("engine->evaluate(\"new Error()\")", true); + toBool.insert("engine->nullValue()", false); + toBool.insert("engine->undefinedValue()", false); } newRow(expr) << toBool.value(expr); } @@ -1196,6 +1208,8 @@ void tst_QScriptValue::toBoolean_makeData(const char* expr) toBoolean.insert("engine->evaluate(\"new Object()\")", true); toBoolean.insert("engine->evaluate(\"new Array()\")", true); toBoolean.insert("engine->evaluate(\"new Error()\")", true); + toBoolean.insert("engine->nullValue()", false); + toBoolean.insert("engine->undefinedValue()", false); } newRow(expr) << toBoolean.value(expr); } @@ -1322,6 +1336,8 @@ void tst_QScriptValue::toInteger_makeData(const char* expr) toInteger.insert("engine->evaluate(\"new Object()\")", 0); toInteger.insert("engine->evaluate(\"new Array()\")", 0); toInteger.insert("engine->evaluate(\"new Error()\")", 0); + toInteger.insert("engine->nullValue()", 0); + toInteger.insert("engine->undefinedValue()", 0); } newRow(expr) << toInteger.value(expr); } @@ -1452,6 +1468,8 @@ void tst_QScriptValue::toInt32_makeData(const char* expr) toInt32.insert("engine->evaluate(\"new Object()\")", 0); toInt32.insert("engine->evaluate(\"new Array()\")", 0); toInt32.insert("engine->evaluate(\"new Error()\")", 0); + toInt32.insert("engine->nullValue()", 0); + toInt32.insert("engine->undefinedValue()", 0); } newRow(expr) << toInt32.value(expr); } @@ -1578,6 +1596,8 @@ void tst_QScriptValue::toUInt32_makeData(const char* expr) toUInt32.insert("engine->evaluate(\"new Object()\")", 0); toUInt32.insert("engine->evaluate(\"new Array()\")", 0); toUInt32.insert("engine->evaluate(\"new Error()\")", 0); + toUInt32.insert("engine->nullValue()", 0); + toUInt32.insert("engine->undefinedValue()", 0); } newRow(expr) << toUInt32.value(expr); } @@ -1704,6 +1724,8 @@ void tst_QScriptValue::toUInt16_makeData(const char* expr) toUInt16.insert("engine->evaluate(\"new Object()\")", 0); toUInt16.insert("engine->evaluate(\"new Array()\")", 0); toUInt16.insert("engine->evaluate(\"new Error()\")", 0); + toUInt16.insert("engine->nullValue()", 0); + toUInt16.insert("engine->undefinedValue()", 0); } newRow(expr) << toUInt16.value(expr); } @@ -1736,6 +1758,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -1743,6 +1767,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(true) <=> QScriptValue(true)"); equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); @@ -1937,6 +1963,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -1944,6 +1972,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); @@ -2138,6 +2168,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -2145,6 +2177,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); @@ -2355,6 +2389,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"{}\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)"); @@ -2401,6 +2437,24 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->nullValue() <=> engine->nullValue()"); + equals.insert("engine->nullValue() <=> engine->undefinedValue()"); + equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->undefinedValue() <=> engine->nullValue()"); + equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); } QHash::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -2435,9 +2489,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(true) <=> QScriptValue(true)"); equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); @@ -2530,9 +2586,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); @@ -2625,9 +2683,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); @@ -2721,6 +2781,7 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); @@ -2737,6 +2798,15 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> engine->nullValue()"); + equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); } QHash::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -3090,6 +3160,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->nullValue()"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())"); @@ -3180,6 +3251,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->nullValue()"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -3291,6 +3363,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")"); @@ -3903,6 +3976,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->nullValue()"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())"); @@ -3993,6 +4067,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->nullValue()"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -4104,6 +4179,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->nullValue()"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")"); @@ -4717,6 +4793,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())"); @@ -4807,6 +4884,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -4918,6 +4996,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")"); @@ -5533,6 +5612,42 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->nullValue() <=> QScriptValue(true)"); + equals.insert("engine->nullValue() <=> QScriptValue(int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, true)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, true)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))"); } QHash::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -5718,6 +5833,8 @@ void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", "[object Object]"); value.insert("engine->evaluate(\"new Array()\")", ""); value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + value.insert("engine->nullValue()", ""); + value.insert("engine->undefinedValue()", ""); } newRow(expr) << value.value(expr); } @@ -5844,6 +5961,8 @@ void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", qQNaN()); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", qQNaN()); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", qQNaN()); } newRow(expr) << value.value(expr); } @@ -5978,6 +6097,8 @@ void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", true); value.insert("engine->evaluate(\"new Array()\")", true); value.insert("engine->evaluate(\"new Error()\")", true); + value.insert("engine->nullValue()", false); + value.insert("engine->undefinedValue()", false); } newRow(expr) << value.value(expr); } @@ -6104,6 +6225,8 @@ void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); } newRow(expr) << value.value(expr); } @@ -6230,6 +6353,8 @@ void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); } newRow(expr) << value.value(expr); } @@ -6356,6 +6481,8 @@ void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); } newRow(expr) << value.value(expr); } -- cgit v0.12 From 37ffa8f59c5dc1f4a1174a07e0a6df6e266d40c0 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 10 Feb 2010 10:05:41 +0100 Subject: Stabilize QListView test on Mac --- tests/auto/qlistview/tst_qlistview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 2c31d8b..d2181f8 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -779,6 +779,7 @@ void tst_QListView::batchedMode() view.resize(200,400); view.show(); QTest::qWaitForWindowShown(&view); + QTest::qWait(100); #if defined(Q_OS_WINCE) QTest::qWait(2000); @@ -1846,6 +1847,7 @@ void tst_QListView::taskQTBUG_2233_scrollHiddenItems() view.setRowHidden(i, true); } QApplication::processEvents(); + QTest::qWait(50); QCOMPARE(bar->value(), bar->maximum()); QCOMPARE(bar->maximum(), rowCount/4 - nbVisibleItem); } -- cgit v0.12 From 31ba9218c63b6c0177fabae3ff33cc5f3c2df8d5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 10 Feb 2010 11:05:59 +0100 Subject: Fix warnings ~QX11PixmapData(): QPixmap objects must be destroyed.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in the property browser solution. Reviewed-by: Trond Kjernåsen Task-number: QTBUG-8046 --- .../qtpropertybrowser/qtpropertybrowserutils.cpp | 16 +++-- .../qtpropertybrowser/qtpropertybrowserutils_p.h | 1 + .../shared/qtpropertybrowser/qtpropertymanager.cpp | 82 +++++++++++++--------- 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp index b84de11..0b14292 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp @@ -93,15 +93,23 @@ QtCursorDatabase::QtCursorDatabase() QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png"))); } +void QtCursorDatabase::clear() +{ + m_cursorNames.clear(); + m_cursorIcons.clear(); + m_valueToCursorShape.clear(); + m_cursorShapeToValue.clear(); +} + void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) { if (m_cursorShapeToValue.contains(shape)) return; - int value = m_cursorNames.count(); + const int value = m_cursorNames.count(); m_cursorNames.append(name); - m_cursorIcons[value] = icon; - m_valueToCursorShape[value] = shape; - m_cursorShapeToValue[shape] = value; + m_cursorIcons.insert(value, icon); + m_valueToCursorShape.insert(value, shape); + m_cursorShapeToValue.insert(shape, value); } QStringList QtCursorDatabase::cursorShapeNames() const diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h index b60fb94..baa7a4a 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h +++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h @@ -68,6 +68,7 @@ class QtCursorDatabase { public: QtCursorDatabase(); + void clear(); QStringList cursorShapeNames() const; QMap cursorShapeIcons() const; diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp index 67ab2fb..d9ff10a 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp @@ -1391,16 +1391,54 @@ void QtStringPropertyManager::uninitializeProperty(QtProperty *property) } // QtBoolPropertyManager +// Return an icon containing a check box indicator +static QIcon drawCheckBox(bool value) +{ + QStyleOptionButton opt; + opt.state |= value ? QStyle::State_On : QStyle::State_Off; + opt.state |= QStyle::State_Enabled; + const QStyle *style = QApplication::style(); + // Figure out size of an indicator and make sure it is not scaled down in a list view item + // by making the pixmap as big as a list view icon and centering the indicator in it. + // (if it is smaller, it can't be helped) + const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); + const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); + const int listViewIconSize = indicatorWidth; + const int pixmapWidth = indicatorWidth; + const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); + + opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); + QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); + pixmap.fill(Qt::transparent); + { + // Center? + const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; + const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; + QPainter painter(&pixmap); + painter.translate(xoff, yoff); + style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); + } + return QIcon(pixmap); +} class QtBoolPropertyManagerPrivate { QtBoolPropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtBoolPropertyManager) public: + QtBoolPropertyManagerPrivate(); QMap m_values; + const QIcon m_checkedIcon; + const QIcon m_uncheckedIcon; }; +QtBoolPropertyManagerPrivate::QtBoolPropertyManagerPrivate() : + m_checkedIcon(drawCheckBox(true)), + m_uncheckedIcon(drawCheckBox(false)) +{ +} + /*! \class QtBoolPropertyManager \internal @@ -1471,36 +1509,6 @@ QString QtBoolPropertyManager::valueText(const QtProperty *property) const return it.value() ? trueText : falseText; } -// Return an icon containing a check box indicator -static QIcon drawCheckBox(bool value) -{ - QStyleOptionButton opt; - opt.state |= value ? QStyle::State_On : QStyle::State_Off; - opt.state |= QStyle::State_Enabled; - const QStyle *style = QApplication::style(); - // Figure out size of an indicator and make sure it is not scaled down in a list view item - // by making the pixmap as big as a list view icon and centering the indicator in it. - // (if it is smaller, it can't be helped) - const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); - const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); - const int listViewIconSize = indicatorWidth; - const int pixmapWidth = indicatorWidth; - const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); - - opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); - QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); - pixmap.fill(Qt::transparent); - { - // Center? - const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; - const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; - QPainter painter(&pixmap); - painter.translate(xoff, yoff); - style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); - } - return QIcon(pixmap); -} - /*! \reimp */ @@ -1510,9 +1518,7 @@ QIcon QtBoolPropertyManager::valueIcon(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QIcon(); - static const QIcon checkedIcon = drawCheckBox(true); - static const QIcon uncheckedIcon = drawCheckBox(false); - return it.value() ? checkedIcon : uncheckedIcon; + return it.value() ? d_ptr->m_checkedIcon : d_ptr->m_uncheckedIcon; } /*! @@ -6287,7 +6293,15 @@ void QtColorPropertyManager::uninitializeProperty(QtProperty *property) // QtCursorPropertyManager -Q_GLOBAL_STATIC(QtCursorDatabase, cursorDatabase) +// Make sure icons are removed as soon as QApplication is destroyed, otherwise, +// handles are leaked on X11. +static void clearCursorDatabase(); +Q_GLOBAL_STATIC_WITH_INITIALIZER(QtCursorDatabase, cursorDatabase, qAddPostRoutine(clearCursorDatabase)) + +static void clearCursorDatabase() +{ + cursorDatabase()->clear(); +} class QtCursorPropertyManagerPrivate { -- cgit v0.12 From de88b9663c01691c64e2677444aab5c1b806c4c2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 10 Feb 2010 12:12:00 +0200 Subject: Removed dependency to moc.exe from Symbian builds Having dependency to moc.exe makes no sense since we cannot build it anyway when building with Symbian toolchain. Task-number: QTBUG-7836 Reviewed-by: Janne Koskinen --- mkspecs/features/moc.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 42ce1bc..e4b7dae 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -97,7 +97,7 @@ equals(MOC_DIR, .) { } #auto depend on moc -unix:!no_mocdepend { +unix:!symbian:!no_mocdepend { moc_source.depends += $$first(QMAKE_MOC) moc_header.depends += $$first(QMAKE_MOC) !contains(TARGET, moc) { #auto build moc -- cgit v0.12 From d7f8be6ec47bc8c241df95f7d13547a60362677b Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 10 Feb 2010 11:24:27 +0100 Subject: Make compile Reviewed-By: Alessandro Portale --- src/gui/text/qfontengine_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 9dd4af7..3ea084b 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -44,7 +44,7 @@ #include "qglobal.h" #include #include "qimage.h" -#include "qt_s60_p.h" +#include #include #include -- cgit v0.12 From 72b510e78973e47c31ae60070cb74b41f291b1ec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 10 Feb 2010 12:18:39 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ffae5e11181a3961193fa21ea405851cad714d4b ) Changes in WebKit/qt since the last update: * https://bugs.webkit.org/show_bug.cgi?id=34170 -- [Qt] Javascript undefined > 0 returns true on Symbian --- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 13 +++++++++++++ src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp | 4 ++++ src/3rdparty/webkit/VERSION | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index b943840..6446773 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,16 @@ +2010-02-09 Janne Koskinen + + Reviewed by Laszlo Gombos. + + [Qt] use nanval() for Symbian as nonInlineNaN + https://bugs.webkit.org/show_bug.cgi?id=34170 + + numeric_limits::quiet_NaN is broken in Symbian + causing NaN to be evaluated as a number. + + * runtime/JSValue.cpp: + (JSC::nonInlineNaN): + 2010-01-07 Norbert Leser Reviewed by NOBODY (OOPS!). diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp index 699c1cd..502312c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp @@ -174,7 +174,11 @@ uint32_t toUInt32SlowCase(double d, bool& ok) NEVER_INLINE double nonInlineNaN() { +#if OS(SYMBIAN) + return nanval(); +#else return std::numeric_limits::quiet_NaN(); +#endif } } // namespace JSC diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 2b39e81..cc0e04f 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 36fe058a9001e6d47f0fd41c6304cdfdf3a735ed + ffae5e11181a3961193fa21ea405851cad714d4b -- cgit v0.12 From 64233a38fe5a1755a6426caf55eaf8abbd4187ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 10 Feb 2010 12:48:55 +0100 Subject: Clarify QFont::rawName() docs. Task-number: related to QTBUG-8038 Reviewed-by: Kim --- src/gui/text/qfont.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index bbd35f1..dd9e69e 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -629,8 +629,9 @@ QFontEngineData::~QFontEngineData() Returns the name of the font within the underlying window system. - Only on X11 when Qt was built without FontConfig support the XLFD (X Logical Font Description) - is returned; otherwise an empty string. + On X11, this function will return an empty string if Qt is built with + FontConfig support; otherwise the XLFD (X Logical Font Description) is + returned. Using the return value of this function is usually \e not \e portable. -- cgit v0.12 From 709a3a4b96f4cc483e63958494adbc5efdf6c57d Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 10 Feb 2010 14:08:17 +0200 Subject: License update as requested by legal for file relicensed from S60. Rev-By: TrustMe --- src/3rdparty/s60/eiksoftkeyimage.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h index 84f6108a..a658421 100644 --- a/src/3rdparty/s60/eiksoftkeyimage.h +++ b/src/3rdparty/s60/eiksoftkeyimage.h @@ -39,23 +39,6 @@ ** ****************************************************************************/ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Changes cba button's label to image. -* -*/ - #ifndef EIKSOFTKEYIMAGE_H #define EIKSOFTKEYIMAGE_H -- cgit v0.12 From f04f014835e9fd4c41e9113e8036ba71ff884ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 10 Feb 2010 13:11:01 +0100 Subject: Prevented assert when using drop shadow effect in the GL 2 engine. The GL 2 pixmap filter uses Indexed8 images in the drop shadow case. Reviewed-by: Tom Cooksey --- src/gui/image/qpixmapfilter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 7cf942c..2792e45 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -713,7 +713,8 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp radius *= qreal(0.5); Q_ASSERT(img.format() == QImage::Format_ARGB32_Premultiplied - || img.format() == QImage::Format_RGB32); + || img.format() == QImage::Format_RGB32 + || img.format() == QImage::Format_Indexed8); // choose the alpha such that pixels at radius distance from a fully // saturated pixel will have an alpha component of no greater than -- cgit v0.12 From 0d1e1f26cd9c29e960117e23c57a84055f1cc9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 10 Feb 2010 13:26:21 +0100 Subject: Fixed drawing pixmaps onto bitmaps on X11 w/o Xrender support. Task-number: QTBUG-8032 Reviewed-by: Kim --- src/gui/painting/qpaintengine_x11.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index 147491e..da48fcb 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -1989,6 +1989,9 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect } XFillRectangle(d->dpy, d->hd, d->gc, x, y, sw, sh); restore_clip = true; + } else if (mono_dst && !mono_src) { + QBitmap bitmap(pixmap); + XCopyArea(d->dpy, bitmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y); } else { XCopyArea(d->dpy, pixmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y); } -- cgit v0.12 From e950fad2ab8b0c93da176ce2f07a4d45a3185cb4 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Wed, 10 Feb 2010 14:00:57 +0100 Subject: Take into account the solaris-cc-64-stlport mkspec Reviewed-by: Simon Hausmann --- src/corelib/arch/sparc/arch.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/arch/sparc/arch.pri b/src/corelib/arch/sparc/arch.pri index 3113dd3..9bb3a88 100644 --- a/src/corelib/arch/sparc/arch.pri +++ b/src/corelib/arch/sparc/arch.pri @@ -1,7 +1,7 @@ # # SPARC architecture # -*-64 { +*-64* { SOURCES += $$QT_ARCH_CPP/qatomic64.s } else { -- cgit v0.12 From 0d27306664188a61571d31a38fec1d9040aae5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 10 Feb 2010 14:19:08 +0100 Subject: Fixed drawing QPixmaps on QGLWidgets on different X11 screens. Don't try to use the texture_from_pixmap extension when drawing a pixmap from one X11 screen onto a different X11 screen in the GL 2 engine. For that to work, the pixmap will have to be re-created on the new screen, which is exactly what the default bind method does (via QImage conversion). Task-number: QTBUG-8054 Reviewed-by: Kim --- src/opengl/qgl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index fce9fdb..0a89412 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -104,6 +104,10 @@ QT_BEGIN_NAMESPACE QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs; #endif +#ifdef Q_WS_X11 +extern const QX11Info *qt_x11Info(const QPaintDevice *pd); +#endif + struct QGLThreadContext { QGLContext *context; }; @@ -2350,7 +2354,10 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, #if defined(Q_WS_X11) // Try to use texture_from_pixmap - if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) { + const QX11Info *xinfo = qt_x11Info(paintDevice); + if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType + && xinfo && xinfo->screen() == pixmap.x11Info().screen()) + { texture = bindTextureFromNativePixmap(pd, key, options); if (texture) { texture->options |= QGLContext::MemoryManagedBindOption; -- cgit v0.12 From 358bbd707bb5e0ce255559e45f8dedb9e9243a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 10 Feb 2010 14:37:58 +0100 Subject: Fixed usage of QGLPixelBuffer with share widgets on other X11 screens. When trying to share the internal pbo context with a widget context, the pbo context needs to be created on the same X11 screen as the widget context. Task-number: QTBUG-8047 Reviewed-by: Kim --- src/opengl/qglpixelbuffer_x11.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp index 5b34cbb..32a42a2 100644 --- a/src/opengl/qglpixelbuffer_x11.cpp +++ b/src/opengl/qglpixelbuffer_x11.cpp @@ -181,7 +181,11 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge qt_format_to_attrib_list(f, attribs); - GLXFBConfig *configs = glXChooseFBConfig(X11->display, X11->defaultScreen, attribs, &num_configs); + int screen = X11->defaultScreen; + if (shareWidget) + screen = shareWidget->x11Info().screen(); + + GLXFBConfig *configs = glXChooseFBConfig(X11->display, screen, attribs, &num_configs); if (configs && num_configs) { int res; glXGetFBConfigAttrib(X11->display, configs[0], GLX_LEVEL, &res); -- cgit v0.12 From 5ab191af20bf2b1fed2b8886ac247c2953087c14 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 9 Feb 2010 12:33:52 +0100 Subject: Fixed compilation with QT_NO_WHEELEVENT Reviewed-by: Prasanth --- src/gui/kernel/qapplication_mac.mm | 6 ++++++ src/gui/kernel/qapplication_p.h | 2 ++ src/gui/kernel/qapplication_x11.cpp | 8 ++++++++ src/gui/kernel/qcocoaview_mac.mm | 3 +++ src/gui/util/qsystemtrayicon_p.h | 2 ++ src/gui/util/qsystemtrayicon_x11.cpp | 2 ++ src/gui/widgets/qabstractslider.cpp | 6 +++++- src/gui/widgets/qabstractspinbox.h | 2 ++ src/gui/widgets/qcombobox.h | 2 ++ src/gui/widgets/qmenu.h | 2 ++ src/gui/widgets/qscrollbar.cpp | 2 ++ 11 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index e8b821af..54a4901 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -2143,6 +2143,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event } if (wheel_deltaX || wheel_deltaY) { +#ifndef QT_NO_WHEELEVENT if (wheel_deltaX) { QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal); QApplication::sendSpontaneousEvent(widget, &qwe); @@ -2165,6 +2166,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event handled_event = false; } } +#endif // QT_NO_WHEELEVENT } else { #ifdef QMAC_SPEAK_TO_ME const int speak_keys = Qt::AltModifier | Qt::ShiftModifier; @@ -2717,6 +2719,7 @@ int QApplication::keyboardInputInterval() return QApplicationPrivate::keyboard_input_time; } +#ifndef QT_NO_WHEELEVENT void QApplication::setWheelScrollLines(int n) { QApplicationPrivate::wheel_scroll_lines = n; @@ -2726,6 +2729,7 @@ int QApplication::wheelScrollLines() { return QApplicationPrivate::wheel_scroll_lines; } +#endif void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) { @@ -2888,9 +2892,11 @@ bool QApplicationPrivate::qt_mac_apply_settings() QApplication::cursorFlashTime()).toInt(); QApplication::setCursorFlashTime(num); +#ifndef QT_NO_WHEELEVENT num = settings.value(QLatin1String("wheelScrollLines"), QApplication::wheelScrollLines()).toInt(); QApplication::setWheelScrollLines(num); +#endif QString colorspec = settings.value(QLatin1String("colorSpec"), QVariant(QLatin1String("default"))).toString(); diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 9c001ab..b3ec732 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -427,7 +427,9 @@ public: static int cursor_flash_time; static int mouse_double_click_time; static int keyboard_input_time; +#ifndef QT_NO_WHEELEVENT static int wheel_scroll_lines; +#endif static bool animate_ui; static bool animate_menu; diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 2a1f655..afd927b 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -944,10 +944,12 @@ bool QApplicationPrivate::x11_apply_settings() QApplication::cursorFlashTime()).toInt(); QApplication::setCursorFlashTime(num); +#ifndef QT_NO_WHEELEVENT num = settings.value(QLatin1String("wheelScrollLines"), QApplication::wheelScrollLines()).toInt(); QApplication::setWheelScrollLines(num); +#endif QString colorspec = settings.value(QLatin1String("colorSpec"), QVariant(QLatin1String("default"))).toString(); @@ -4401,8 +4403,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta, QWidget* popup = qApp->activePopupWidget(); if (popup && window() != popup) popup->close(); +#ifndef QT_NO_WHEELEVENT QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient); if (QApplication::sendSpontaneousEvent(widget, &e)) +#endif return true; } @@ -4413,8 +4417,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta, QWidget* popup = qApp->activePopupWidget(); if (popup && widget != popup) popup->hide(); +#ifndef QT_NO_WHEELEVENT QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient); if (QApplication::sendSpontaneousEvent(widget, &e)) +#endif return true; } return false; @@ -5313,6 +5319,7 @@ int QApplication::keyboardInputInterval() return QApplicationPrivate::keyboard_input_time; } +#ifndef QT_NO_WHEELEVENT void QApplication::setWheelScrollLines(int n) { QApplicationPrivate::wheel_scroll_lines = n; @@ -5322,6 +5329,7 @@ int QApplication::wheelScrollLines() { return QApplicationPrivate::wheel_scroll_lines; } +#endif void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) { diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 756cf92..ad64a91 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -828,6 +828,7 @@ extern "C" { deltaZ = qBound(-120, int([theEvent deltaZ] * 10000), 120); } +#ifndef QT_NO_WHEELEVENT if (deltaX != 0) { QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal); qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); @@ -868,6 +869,8 @@ extern "C" { wheelOK = qwe2.isAccepted(); } } +#endif //QT_NO_WHEELEVENT + if (!wheelOK) { return [super scrollWheel:theEvent]; } diff --git a/src/gui/util/qsystemtrayicon_p.h b/src/gui/util/qsystemtrayicon_p.h index b881f68..e8bf197 100644 --- a/src/gui/util/qsystemtrayicon_p.h +++ b/src/gui/util/qsystemtrayicon_p.h @@ -164,7 +164,9 @@ protected: bool x11Event(XEvent *event); void mousePressEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); +#ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *event); +#endif bool event(QEvent *e); private: diff --git a/src/gui/util/qsystemtrayicon_x11.cpp b/src/gui/util/qsystemtrayicon_x11.cpp index a645050..82b4325 100644 --- a/src/gui/util/qsystemtrayicon_x11.cpp +++ b/src/gui/util/qsystemtrayicon_x11.cpp @@ -308,10 +308,12 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev) emit q->activated(QSystemTrayIcon::DoubleClick); } +#ifndef QT_NO_WHEELEVENT void QSystemTrayIconSys::wheelEvent(QWheelEvent *e) { QApplication::sendEvent(q, e); } +#endif bool QSystemTrayIconSys::event(QEvent *e) { diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 73c17db..4bd7b5a 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -705,7 +705,11 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb // Calculate how many lines to scroll. Depending on what delta is (and // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. - qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * effectiveSingleStep(); + qreal stepsToScrollF = +#ifndef QT_NO_WHEELEVENT + QApplication::wheelScrollLines() * +#endif + offset * effectiveSingleStep(); // Check if wheel changed direction since last event: if (offset_accumulated != 0 && (offset / offset_accumulated) < 0) offset_accumulated = 0; diff --git a/src/gui/widgets/qabstractspinbox.h b/src/gui/widgets/qabstractspinbox.h index 059943a..6c062c0 100644 --- a/src/gui/widgets/qabstractspinbox.h +++ b/src/gui/widgets/qabstractspinbox.h @@ -137,7 +137,9 @@ protected: void resizeEvent(QResizeEvent *event); void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); +#ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *event); +#endif void focusInEvent(QFocusEvent *event); void focusOutEvent(QFocusEvent *event); void contextMenuEvent(QContextMenuEvent *event); diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h index f332d31..9b19a66 100644 --- a/src/gui/widgets/qcombobox.h +++ b/src/gui/widgets/qcombobox.h @@ -245,7 +245,9 @@ protected: void mouseReleaseEvent(QMouseEvent *e); void keyPressEvent(QKeyEvent *e); void keyReleaseEvent(QKeyEvent *e); +#ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *e); +#endif void contextMenuEvent(QContextMenuEvent *e); void inputMethodEvent(QInputMethodEvent *); QVariant inputMethodQuery(Qt::InputMethodQuery) const; diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h index 5a6a5c7..47dff2b 100644 --- a/src/gui/widgets/qmenu.h +++ b/src/gui/widgets/qmenu.h @@ -162,7 +162,9 @@ protected: void mouseReleaseEvent(QMouseEvent *); void mousePressEvent(QMouseEvent *); void mouseMoveEvent(QMouseEvent *); +#ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *); +#endif void enterEvent(QEvent *); void leaveEvent(QEvent *); void hideEvent(QHideEvent *); diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp index 3eed3a9..4eff260 100644 --- a/src/gui/widgets/qscrollbar.cpp +++ b/src/gui/widgets/qscrollbar.cpp @@ -521,6 +521,7 @@ bool QScrollBar::event(QEvent *event) if (const QHoverEvent *he = static_cast(event)) d_func()->updateHoverControl(he->pos()); break; +#ifndef QT_NO_WHEELEVENT case QEvent::Wheel: { // override wheel event without adding virtual function override QWheelEvent *ev = static_cast(event); @@ -537,6 +538,7 @@ bool QScrollBar::event(QEvent *event) event->accept(); return true; } +#endif default: break; } -- cgit v0.12 From 620dd47c3b790b99f76793f4b4e6f22e3984558e Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 10 Feb 2010 17:26:24 +0100 Subject: Blinking cursors are 2 pixels wide on Mac OS X/Cocoa. Blinking cursors drawn in positions other than zero, can become 2 pixel wide. This is caused by a rendering bug in the paint engine used by Cocoa. If a fillRect() is called in a nox pixel boundary this engine draws them 2 pixels wide instead of one. So make sure this is always on a pixel boundary. Task-number: QTBUG-8100 Reviewed-by: Trond --- src/gui/text/qtextlayout.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 26c7c1e..af91603 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1331,7 +1331,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition QTextLine l(line, d); const QScriptLine &sl = d->lines[line]; - const qreal x = position.x() + l.cursorToX(cursorPosition); + qreal x = position.x() + l.cursorToX(cursorPosition); int itm = d->findItem(cursorPosition - 1); QFixed base = sl.base(); @@ -1350,6 +1350,10 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition && (p->transform().type() > QTransform::TxTranslate); if (toggleAntialiasing) p->setRenderHint(QPainter::Antialiasing); +#if defined(QT_MAC_USE_COCOA) + // Always draw the cursor aligned to pixel boundary. + x = qRound(x); +#endif p->fillRect(QRectF(x, y, qreal(width), (base + descent + 1).toReal()), p->pen().brush()); if (toggleAntialiasing) p->setRenderHint(QPainter::Antialiasing, false); -- cgit v0.12 From 1407f3c1815addf6b9cac7503d38b670bbeab895 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 10 Feb 2010 17:39:59 +0100 Subject: Fix the WebKit build It's PLATFORM(SYMBIAN) in 4.x, not OS() like in the trunk Reviewed-by: Trust me --- src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp index 502312c..bafb85b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp @@ -174,7 +174,7 @@ uint32_t toUInt32SlowCase(double d, bool& ok) NEVER_INLINE double nonInlineNaN() { -#if OS(SYMBIAN) +#if PLATFORM(SYMBIAN) return nanval(); #else return std::numeric_limits::quiet_NaN(); -- cgit v0.12 From 24239b56ab563a30facde3a5217536e7276f9bb8 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 14 Dec 2009 10:23:39 -0800 Subject: Export a function to get dfb-surface from a pixmap This function is only exported when DirectFB is built as part of libQtGui. Reviewed-by: Jervey Kong --- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index f27440e..ba50329 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -593,6 +593,17 @@ void QDirectFBPixmapData::invalidate() imageFormat = QImage::Format_Invalid; } +#ifndef QT_DIRECTFB_PLUGIN +Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap) +{ + const QPixmapData *data = pixmap.pixmapData(); + if (!data || data->classId() != QPixmapData::DirectFBClass) + return 0; + const QDirectFBPixmapData *dfbData = static_cast(data); + return dfbData->directFBSurface(); +} +#endif + QT_END_NAMESPACE #endif // QT_NO_QWS_DIRECTFB -- cgit v0.12 From f627b87822f92aaf060271ab16e64088df1be32e Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 10 Feb 2010 23:27:17 +0100 Subject: Update Symbian DEF files Reserve ordinal numbers in the WINSCW DEF file for EGL exports from QtGui (now added, but marked as ABSENT) Update OpenVG DEF files for EABI and WINSCW Update QtGui DEF file for WINSCW with 2 non-EGL-related exports Reviewed-by: TrustMe --- src/s60installs/bwins/QtGuiu.def | 53 +++++++++++++++++++++++++++++++++++++ src/s60installs/bwins/QtOpenVGu.def | 29 ++++++++++++++++++-- src/s60installs/eabi/QtOpenVGu.def | 23 ++++++++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index be7a6a0..4f30cb5 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12548,4 +12548,57 @@ EXPORTS ?timerEvent@QS60Style@@MAEXPAVQTimerEvent@@@Z @ 12547 NONAME ; void QS60Style::timerEvent(class QTimerEvent *) ?updateAncestorFlags@QGraphicsItemPrivate@@QAEXXZ @ 12548 NONAME ; void QGraphicsItemPrivate::updateAncestorFlags(void) ?updateChildWithGraphicsEffectFlagRecursively@QGraphicsItemPrivate@@QAEXXZ @ 12549 NONAME ; void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively(void) + ?isOpacityNull@QGraphicsItemPrivate@@SA_NM@Z @ 12550 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(float) + ?isOpacityNull@QGraphicsItemPrivate@@QBE_NXZ @ 12551 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(void) const + ?api@QEglContext@@QBE?AW4API@QEgl@@XZ @ 12552 NONAME ABSENT ; enum QEgl::API QEglContext::api(void) const + ?chooseConfig@QEglContext@@QAE_NABVQEglProperties@@W4PixelFormatMatch@QEgl@@@Z @ 12553 NONAME ABSENT ; bool QEglContext::chooseConfig(class QEglProperties const &, enum QEgl::PixelFormatMatch) + ?destroySurface@QEglContext@@QAEXH@Z @ 12554 NONAME ABSENT ; void QEglContext::destroySurface(int) + ?lazyDoneCurrent@QEglContext@@QAE_NXZ @ 12555 NONAME ABSENT ; bool QEglContext::lazyDoneCurrent(void) + ?waitNative@QEglContext@@QAEXXZ @ 12556 NONAME ABSENT ; void QEglContext::waitNative(void) + ?context@QEglContext@@QBEHXZ @ 12557 NONAME ABSENT ; int QEglContext::context(void) const + ?configAttrib@QEglContext@@QBE_NHPAH@Z @ 12558 NONAME ABSENT ; bool QEglContext::configAttrib(int, int *) const + ??0QEglProperties@@QAE@ABV0@@Z @ 12559 NONAME ABSENT ; QEglProperties::QEglProperties(class QEglProperties const &) + ?config@QEglContext@@QBEHXZ @ 12560 NONAME ABSENT ; int QEglContext::config(void) const + ?openDisplay@QEglContext@@QAE_NPAVQPaintDevice@@@Z @ 12561 NONAME ABSENT ; bool QEglContext::openDisplay(class QPaintDevice *) + ?error@QEglContext@@SAHXZ @ 12562 NONAME ABSENT ; int QEglContext::error(void) + ?swapBuffers@QEglContext@@QAE_NH@Z @ 12563 NONAME ABSENT ; bool QEglContext::swapBuffers(int) + ?setApi@QEglContext@@QAEXW4API@QEgl@@@Z @ 12564 NONAME ABSENT ; void QEglContext::setApi(enum QEgl::API) + ?makeCurrent@QEglContext@@QAE_NH@Z @ 12565 NONAME ABSENT ; bool QEglContext::makeCurrent(int) + ?createSurface@QEglContext@@QAEHPAVQPaintDevice@@PBVQEglProperties@@@Z @ 12566 NONAME ABSENT ; int QEglContext::createSurface(class QPaintDevice *, class QEglProperties const *) + ?dumpAllConfigs@QEglContext@@QAEXXZ @ 12567 NONAME ABSENT ; void QEglContext::dumpAllConfigs(void) + ?reduceConfiguration@QEglProperties@@QAE_NXZ @ 12568 NONAME ABSENT ; bool QEglProperties::reduceConfiguration(void) + ?removeValue@QEglProperties@@QAE_NH@Z @ 12569 NONAME ABSENT ; bool QEglProperties::removeValue(int) + ?toString@QEglProperties@@QBE?AVQString@@XZ @ 12570 NONAME ABSENT ; class QString QEglProperties::toString(void) const + ?dumpAllConfigs@QEglProperties@@SAXXZ @ 12571 NONAME ABSENT ; void QEglProperties::dumpAllConfigs(void) + ?defaultDisplay@QEglContext@@SAHPAVQPaintDevice@@@Z @ 12572 NONAME ABSENT ; int QEglContext::defaultDisplay(class QPaintDevice *) + ?configProperties@QEglContext@@QBE?AVQEglProperties@@H@Z @ 12573 NONAME ABSENT ; class QEglProperties QEglContext::configProperties(int) const + ?properties@QEglProperties@@QBEPBHXZ @ 12574 NONAME ABSENT ; int const * QEglProperties::properties(void) const + ??0QEglContext@@QAE@XZ @ 12575 NONAME ABSENT ; QEglContext::QEglContext(void) + ??1QEglContext@@QAE@XZ @ 12576 NONAME ABSENT ; QEglContext::~QEglContext(void) + ?isValid@QEglContext@@QBE_NXZ @ 12577 NONAME ABSENT ; bool QEglContext::isValid(void) const + ?value@QEglProperties@@QBEHH@Z @ 12578 NONAME ABSENT ; int QEglProperties::value(int) const + ?clearError@QEglContext@@SAXXZ @ 12579 NONAME ABSENT ; void QEglContext::clearError(void) + ??0QEglProperties@@QAE@H@Z @ 12580 NONAME ABSENT ; QEglProperties::QEglProperties(int) + ?setValue@QEglProperties@@QAEXHH@Z @ 12581 NONAME ABSENT ; void QEglProperties::setValue(int, int) + ?setPaintDeviceFormat@QEglProperties@@QAEXPAVQPaintDevice@@@Z @ 12582 NONAME ABSENT ; void QEglProperties::setPaintDeviceFormat(class QPaintDevice *) + ?destroy@QEglContext@@QAEXXZ @ 12583 NONAME ABSENT ; void QEglContext::destroy(void) + ?setRenderableType@QEglProperties@@QAEXW4API@QEgl@@@Z @ 12584 NONAME ABSENT ; void QEglProperties::setRenderableType(enum QEgl::API) + ?setContext@QEglContext@@QAEXH@Z @ 12585 NONAME ABSENT ; void QEglContext::setContext(int) + ?waitClient@QEglContext@@QAEXXZ @ 12586 NONAME ABSENT ; void QEglContext::waitClient(void) + ?isEmpty@QEglProperties@@QBE_NXZ @ 12587 NONAME ABSENT ; bool QEglProperties::isEmpty(void) const + ?getDisplay@QEglContext@@CAHPAVQPaintDevice@@@Z @ 12588 NONAME ABSENT ; int QEglContext::getDisplay(class QPaintDevice *) + ?isSharing@QEglContext@@QBE_NXZ @ 12589 NONAME ABSENT ; bool QEglContext::isSharing(void) const + ?isCurrent@QEglContext@@QBE_NXZ @ 12590 NONAME ABSENT ; bool QEglContext::isCurrent(void) const + ??0QEglProperties@@QAE@XZ @ 12591 NONAME ABSENT ; QEglProperties::QEglProperties(void) + ?extensions@QEglContext@@SA?AVQString@@XZ @ 12592 NONAME ABSENT ; class QString QEglContext::extensions(void) + ?setCurrentContext@QEglContext@@CAXW4API@QEgl@@PAV1@@Z @ 12593 NONAME ABSENT ; void QEglContext::setCurrentContext(enum QEgl::API, class QEglContext *) + ??1QEglProperties@@QAE@XZ @ 12594 NONAME ABSENT ; QEglProperties::~QEglProperties(void) + ?createContext@QEglContext@@QAE_NPAV1@PBVQEglProperties@@@Z @ 12595 NONAME ABSENT ; bool QEglContext::createContext(class QEglContext *, class QEglProperties const *) + ?setConfig@QEglContext@@QAEXH@Z @ 12596 NONAME ABSENT ; void QEglContext::setConfig(int) + ?hasExtension@QEglContext@@SA_NPBD@Z @ 12597 NONAME ABSENT ; bool QEglContext::hasExtension(char const *) + ?doneCurrent@QEglContext@@QAE_NXZ @ 12598 NONAME ABSENT ; bool QEglContext::doneCurrent(void) + ?display@QEglContext@@QBEHXZ @ 12599 NONAME ABSENT ; int QEglContext::display(void) const + ?setPixelFormat@QEglProperties@@QAEXW4Format@QImage@@@Z @ 12600 NONAME ABSENT ; void QEglProperties::setPixelFormat(enum QImage::Format) + ?currentContext@QEglContext@@CAPAV1@W4API@QEgl@@@Z @ 12601 NONAME ABSENT ; class QEglContext * QEglContext::currentContext(enum QEgl::API) + ?errorString@QEglContext@@SA?AVQString@@H@Z @ 12602 NONAME ABSENT ; class QString QEglContext::errorString(int) diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def index 88e724f..26ee862 100644 --- a/src/s60installs/bwins/QtOpenVGu.def +++ b/src/s60installs/bwins/QtOpenVGu.def @@ -48,7 +48,7 @@ EXPORTS ?paintEngine@QVGWindowSurface@@UBEPAVQPaintEngine@@XZ @ 47 NONAME ; class QPaintEngine * QVGWindowSurface::paintEngine(void) const ??0QVGPainterState@@QAE@XZ @ 48 NONAME ; QVGPainterState::QVGPainterState(void) ?d_func@QVGPaintEngine@@ABEPBVQVGPaintEnginePrivate@@XZ @ 49 NONAME ; class QVGPaintEnginePrivate const * QVGPaintEngine::d_func(void) const - ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *) + ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ABSENT ; class QEglContext * qt_vg_create_context(class QPaintDevice *) ?clip@QVGPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 51 NONAME ; void QVGPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation) ?endNativePainting@QVGPaintEngine@@UAEXXZ @ 52 NONAME ; void QVGPaintEngine::endNativePainting(void) ?brushChanged@QVGPaintEngine@@UAEXXZ @ 53 NONAME ; void QVGPaintEngine::brushChanged(void) @@ -78,7 +78,7 @@ EXPORTS ?beginPaint@QVGEGLWindowSurfaceVGImage@@UAEXPAVQWidget@@@Z @ 77 NONAME ; void QVGEGLWindowSurfaceVGImage::beginPaint(class QWidget *) ?createState@QVGPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 78 NONAME ; class QPainterState * QVGPaintEngine::createState(class QPainterState *) const ?buffer@QVGPixmapData@@UAEPAVQImage@@XZ @ 79 NONAME ; class QImage * QVGPixmapData::buffer(void) - ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ; void qt_vg_destroy_context(class QEglContext *) + ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ABSENT ; void qt_vg_destroy_context(class QEglContext *) ?clip@QVGPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 81 NONAME ; void QVGPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation) ?drawPolygon@QVGPaintEngine@@UAEXPBVQPoint@@HW4PolygonDrawMode@QPaintEngine@@@Z @ 82 NONAME ; void QVGPaintEngine::drawPolygon(class QPoint const *, int, enum QPaintEngine::PolygonDrawMode) ?fromImage@QVGPixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 83 NONAME ; void QVGPixmapData::fromImage(class QImage const &, class QFlags) @@ -139,4 +139,29 @@ EXPORTS ??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int) ?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation) ?vgPrivate@QVGPaintEngine@@QAEPAVQVGPaintEnginePrivate@@XZ @ 140 NONAME ; class QVGPaintEnginePrivate * QVGPaintEngine::vgPrivate(void) + ?removeFromLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 141 NONAME ; void QVGImagePool::removeFromLRU(class QVGPixmapData *) + ?releaseImage@QVGImagePool@@UAEXPAVQVGPixmapData@@K@Z @ 142 NONAME ; void QVGImagePool::releaseImage(class QVGPixmapData *, unsigned long) + ?d_func@QVGImagePool@@AAEPAVQVGImagePoolPrivate@@XZ @ 143 NONAME ; class QVGImagePoolPrivate * QVGImagePool::d_func(void) + ?detachImageFromPool@QVGPixmapData@@UAEXXZ @ 144 NONAME ; void QVGPixmapData::detachImageFromPool(void) + ?createImageForPixmap@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 145 NONAME ; unsigned long QVGImagePool::createImageForPixmap(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *) + ?destroyImageAndContext@QVGPixmapData@@IAEXXZ @ 146 NONAME ; void QVGPixmapData::destroyImageAndContext(void) + ?moveToHeadOfLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 147 NONAME ; void QVGImagePool::moveToHeadOfLRU(class QVGPixmapData *) + ?instance@QVGImagePool@@SAPAV1@XZ @ 148 NONAME ; class QVGImagePool * QVGImagePool::instance(void) + ?useImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 149 NONAME ; void QVGImagePool::useImage(class QVGPixmapData *) + ??1QVGImagePool@@UAE@XZ @ 150 NONAME ; QVGImagePool::~QVGImagePool(void) + ?destroyImages@QVGPixmapData@@IAEXXZ @ 151 NONAME ; void QVGPixmapData::destroyImages(void) + ?reclaimSpace@QVGImagePool@@UAE_NW4VGImageFormat@@JJPAVQVGPixmapData@@@Z @ 152 NONAME ; bool QVGImagePool::reclaimSpace(enum VGImageFormat, long, long, class QVGPixmapData *) + ?detachImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 153 NONAME ; void QVGImagePool::detachImage(class QVGPixmapData *) + ?createPermanentImage@QVGImagePool@@UAEKW4VGImageFormat@@JJK@Z @ 154 NONAME ; unsigned long QVGImagePool::createPermanentImage(enum VGImageFormat, long, long, unsigned long) + ?d_func@QVGImagePool@@ABEPBVQVGImagePoolPrivate@@XZ @ 155 NONAME ; class QVGImagePoolPrivate const * QVGImagePool::d_func(void) const + ?createTemporaryImage@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 156 NONAME ; unsigned long QVGImagePool::createTemporaryImage(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *) + ??_EQVGImagePool@@UAE@I@Z @ 157 NONAME ; QVGImagePool::~QVGImagePool(unsigned int) + ?hibernate@QVGImagePool@@UAEXXZ @ 158 NONAME ; void QVGImagePool::hibernate(void) + ?qt_vg_destroy_context@@YAXPAVQEglContext@@H@Z @ 159 NONAME ; void qt_vg_destroy_context(class QEglContext *, int) + ??0QVGImagePool@@QAE@XZ @ 160 NONAME ; QVGImagePool::QVGImagePool(void) + ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ; void QVGImagePool::setImagePool(class QVGImagePool *) + ?pixmapLRU@QVGImagePool@@IAEPAVQVGPixmapData@@XZ @ 162 NONAME ; class QVGPixmapData * QVGImagePool::pixmapLRU(void) + ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int) + ?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void) + ?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void) diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def index 7526632..eb4caef 100644 --- a/src/s60installs/eabi/QtOpenVGu.def +++ b/src/s60installs/eabi/QtOpenVGu.def @@ -173,4 +173,27 @@ EXPORTS _Z21qt_vg_destroy_contextP11QEglContexti @ 172 NONAME _ZN13QVGPixmapData22destroyImageAndContextEv @ 173 NONAME _ZN13QVGPixmapData9hibernateEv @ 174 NONAME + _ZN12QVGImagePool11detachImageEP13QVGPixmapData @ 175 NONAME + _ZN12QVGImagePool12reclaimSpaceE13VGImageFormatllP13QVGPixmapData @ 176 NONAME + _ZN12QVGImagePool12releaseImageEP13QVGPixmapDatam @ 177 NONAME + _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME + _ZN12QVGImagePool13removeFromLRUEP13QVGPixmapData @ 179 NONAME + _ZN12QVGImagePool15moveToHeadOfLRUEP13QVGPixmapData @ 180 NONAME + _ZN12QVGImagePool20createImageForPixmapE13VGImageFormatllmP13QVGPixmapData @ 181 NONAME + _ZN12QVGImagePool20createPermanentImageE13VGImageFormatllm @ 182 NONAME + _ZN12QVGImagePool20createTemporaryImageE13VGImageFormatllmP13QVGPixmapData @ 183 NONAME + _ZN12QVGImagePool8instanceEv @ 184 NONAME + _ZN12QVGImagePool8useImageEP13QVGPixmapData @ 185 NONAME + _ZN12QVGImagePool9hibernateEv @ 186 NONAME + _ZN12QVGImagePool9pixmapLRUEv @ 187 NONAME + _ZN12QVGImagePoolC1Ev @ 188 NONAME + _ZN12QVGImagePoolC2Ev @ 189 NONAME + _ZN12QVGImagePoolD0Ev @ 190 NONAME + _ZN12QVGImagePoolD1Ev @ 191 NONAME + _ZN12QVGImagePoolD2Ev @ 192 NONAME + _ZN13QVGPixmapData13destroyImagesEv @ 193 NONAME + _ZN13QVGPixmapData13reclaimImagesEv @ 194 NONAME + _ZN13QVGPixmapData19detachImageFromPoolEv @ 195 NONAME + _ZTI12QVGImagePool @ 196 NONAME + _ZTV12QVGImagePool @ 197 NONAME -- cgit v0.12 From 84ef315a9ff6014056d7b6313cf9b1f8bdf06cdc Mon Sep 17 00:00:00 2001 From: Bill King Date: Thu, 11 Feb 2010 10:29:13 +1000 Subject: Revert "(ODBC) Use wchar_t instead of assuming 2 bytes." This reverts commit 4935ec52fc07d4aaa7ae594cfe9986e25ca62dcb. --- src/sql/drivers/odbc/qsql_odbc.cpp | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 4d3663e..2049a76 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -144,7 +144,6 @@ public: QSqlRecord rInf; QVector fieldCache; - QVector paramCache; int fieldCacheIdx; int disconnectCount; bool hasSQLFetchScroll; @@ -203,7 +202,7 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode *nativeCode = nativeCode_; QString tmpstore; #ifdef UNICODE - tmpstore = QString::fromWCharArray((const wchar_t*)description_, msgLen); + tmpstore = QString((const QChar*)description_.data(), msgLen); #else tmpstore = QString::fromLocal8Bit((const char*)description_.data(), msgLen); #endif @@ -333,7 +332,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni } else { colSize++; // make sure there is room for more than the 0 termination if (unicode) { - colSize *= sizeof(wchar_t); // a tiny bit faster, since it saves a SQLGetData() call + colSize *= 2; // a tiny bit faster, since it saves a SQLGetData() call } } QVarLengthArray buf(colSize); @@ -354,9 +353,9 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni // contain the number of bytes returned - it contains the // total number of bytes that CAN be fetched // colSize-1: remove 0 termination when there is more data to fetch - int rSize = (r == SQL_SUCCESS_WITH_INFO) ? (unicode ? colSize-sizeof(wchar_t) : colSize-1) : lengthIndicator; + int rSize = (r == SQL_SUCCESS_WITH_INFO) ? (unicode ? colSize-2 : colSize-1) : lengthIndicator; if (unicode) { - fieldVal += QString::fromWCharArray((wchar_t*)buf.constData(), rSize / sizeof(wchar_t)); + fieldVal += QString((const QChar*) buf.constData(), rSize / 2); } else { fieldVal += QString::fromAscii(buf.constData(), rSize); } @@ -552,7 +551,7 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i ) } #ifdef UNICODE - QString qColName = QString::fromWCharArray((const wchar_t*)colName, colNameLen); + QString qColName((const QChar*)colName, colNameLen); #else QString qColName = QString::fromLocal8Bit((const char*)colName); #endif @@ -1271,12 +1270,9 @@ bool QODBCResult::exec() // bind parameters - only positional binding allowed QVector& values = boundValues(); - QVector wcharstorage; - int i; SQLRETURN r; for (i = 0; i < values.count(); ++i) { - wcharstorage.append(NULL); if (bindValueType(i) & QSql::Out) values[i].detach(); const QVariant &val = values.at(i); @@ -1439,14 +1435,13 @@ bool QODBCResult::exec() #ifndef Q_ODBC_VERSION_2 if (d->unicode) { QString str = val.toString(); - int strSize = str.length() * sizeof(wchar_t); + str.utf16(); if (*ind != SQL_NULL_DATA) - *ind = strSize; + *ind = str.length() * sizeof(QChar); + int strSize = str.length() * sizeof(QChar); if (bindValueType(i) & QSql::Out) { - wchar_t *temp=new wchar_t[str.capacity()*sizeof(wchar_t)]; - str.toWCharArray(temp); - QByteArray ba((char*)temp, str.capacity() * sizeof(wchar_t)); + QByteArray ba((char*)str.constData(), str.capacity() * sizeof(QChar)); r = SQLBindParameter(d->hStmt, i + 1, qParamType[(QFlag)(bindValueType(i)) & QSql::InOut], @@ -1458,13 +1453,9 @@ bool QODBCResult::exec() ba.size(), ind); tmpStorage.append(ba); - wcharstorage.replace(i,temp); break; } - wchar_t *temp=new wchar_t[(1+str.length())*sizeof(wchar_t)]; - str.toWCharArray(temp); - temp[str.length()]=0; r = SQLBindParameter(d->hStmt, i + 1, qParamType[(QFlag)(bindValueType(i)) & QSql::InOut], @@ -1472,10 +1463,9 @@ bool QODBCResult::exec() strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR, strSize, 0, - (void *)temp, + (void *)str.constData(), strSize, ind); - wcharstorage.replace(i,temp); break; } else @@ -1525,13 +1515,6 @@ bool QODBCResult::exec() } } r = SQLExecute(d->hStmt); - - for(int i=0;i Date: Thu, 11 Feb 2010 10:10:54 +0100 Subject: now really fix the message editor for dark backgrounds of course, the palette was also set to explicitly white ... also remove the now obsolete transbox image. Task-number: QTBUG-7778 --- tools/linguist/linguist/images/transbox.png | Bin 782 -> 0 bytes tools/linguist/linguist/linguist.qrc | 3 +-- tools/linguist/linguist/messageeditor.cpp | 8 +------- 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 tools/linguist/linguist/images/transbox.png diff --git a/tools/linguist/linguist/images/transbox.png b/tools/linguist/linguist/images/transbox.png deleted file mode 100644 index 2d7219b..0000000 Binary files a/tools/linguist/linguist/images/transbox.png and /dev/null differ diff --git a/tools/linguist/linguist/linguist.qrc b/tools/linguist/linguist/linguist.qrc index a43f0ce..b70b9cd 100644 --- a/tools/linguist/linguist/linguist.qrc +++ b/tools/linguist/linguist/linguist.qrc @@ -1,5 +1,5 @@ - + images/appicon.png images/mac/accelerator.png images/mac/book.png @@ -28,7 +28,6 @@ images/s_check_on.png images/s_check_warning.png images/splash.png - images/transbox.png images/up.png images/down.png images/editdelete.png diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index b6c1688..3848723 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -98,14 +98,8 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) { setObjectName(QLatin1String("scroll area")); - // Use white explicitly as the background color for the editor page. QPalette p; - p.setColor(QPalette::Active, QPalette::Base, Qt::white); - p.setColor(QPalette::Inactive, QPalette::Base, Qt::white); - p.setColor(QPalette::Disabled, QPalette::Base, Qt::white); - p.setColor(QPalette::Active, QPalette::Window, Qt::white); - p.setColor(QPalette::Inactive, QPalette::Window, Qt::white); - p.setColor(QPalette::Disabled, QPalette::Window, Qt::white); + p.setBrush(QPalette::Window, p.brush(QPalette::Active, QPalette::Base)); setPalette(p); setupEditorPage(); -- cgit v0.12 From 8a8e6d8f0b5368710174726a1c9c2379541899c4 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 11 Feb 2010 10:31:40 +0100 Subject: We need to export qBadAlloc() on all platforms This supports the (documented) case when mixing Qt built without exception support with code that was built against Qt with exception support. Reviewed-by: Robert Griebl --- src/corelib/global/qglobal.cpp | 2 -- src/corelib/global/qglobal.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index f48c1b3..c8f836a 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1994,7 +1994,6 @@ void qt_check_pointer(const char *n, int l) qWarning("In file %s, line %d: Out of memory", n, l); } -#ifndef QT_NO_EXCEPTIONS /* \internal Allows you to throw an exception without including Called internally from Q_CHECK_PTR on certain OS combinations @@ -2003,7 +2002,6 @@ void qBadAlloc() { QT_THROW(std::bad_alloc()); } -#endif /* The Q_ASSERT macro calls this function when the test fails. diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index abdafc3..f51849b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1674,10 +1674,7 @@ Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char * #endif Q_CORE_EXPORT void qt_check_pointer(const char *, int); - -#ifndef QT_NO_EXCEPTIONS Q_CORE_EXPORT void qBadAlloc(); -#endif #ifdef QT_NO_EXCEPTIONS # if defined(QT_NO_DEBUG) -- cgit v0.12 From eab121a9023eee10b49813161867011dc9fb9689 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 11 Feb 2010 10:58:05 +0100 Subject: QXmlSchema: fix crash in schema parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit previously, annotations were only supposed to appear within elements of the form ; However, they can also appear in elements of the form Patch-by: Tobias König --- src/xmlpatterns/schema/qxsdschemaparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 6d878e8..6ed28af 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -4832,7 +4832,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) { const XsdAnnotation::Ptr annotation = parseAnnotation(); - element->addAnnotation(annotation); + term->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasRefAttribute) { error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") -- cgit v0.12 From 232defa5d084386a9cdeb229cefee0a4a09bca85 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 11 Feb 2010 13:21:57 +0100 Subject: QNAM HTTP: Set channel to IdleState at better place The readyRead() from the expand() function called from allDone() had a new request triggered for that channel even if it is not really finished yet. Move the assignment to IdleState inside allDone to avoid this error. Reviewed-by: Andreas Kling Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkconnectionchannel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 5bd972c..64969b0 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -286,7 +286,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() if (!socket->bytesAvailable()) { if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) { reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); } else { // try to reconnect/resend before sending an error. @@ -347,7 +346,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() emit reply->headerChanged(); if (!replyPrivate->expectContent()) { replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); return; } @@ -424,7 +422,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() // everything done, fall through } case QHttpNetworkReplyPrivate::AllDoneState: - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); break; default: @@ -570,6 +567,9 @@ void QHttpNetworkConnectionChannel::allDone() // in case of failures, each channel will attempt two reconnects before emitting error. reconnectAttempts = 2; + // now the channel can be seen as free/idle again, all signal emissions for the reply have been done + this->state = QHttpNetworkConnectionChannel::IdleState; + detectPipeliningSupport(); // move next from pipeline to current request -- cgit v0.12 From 439626ffafae7d0480e66a6795df647fd32bbc64 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 11 Feb 2010 13:47:19 +0100 Subject: QNAM HTTP: Optimize detectPipeliningSupport() Do cheap checks first. Reviewed-by: TrustMe --- src/network/access/qhttpnetworkconnectionchannel.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 64969b0..b0e632a 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -610,19 +610,19 @@ void QHttpNetworkConnectionChannel::allDone() void QHttpNetworkConnectionChannel::detectPipeliningSupport() { // detect HTTP Pipelining support - QByteArray serverHeaderField = reply->headerField("Server"); + QByteArray serverHeaderField; if ( - // check for broken servers in server reply header - // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining - (!serverHeaderField.contains("Microsoft-IIS/4.")) - && (!serverHeaderField.contains("Microsoft-IIS/5.")) - && (!serverHeaderField.contains("Netscape-Enterprise/3.")) // check for HTTP/1.1 - && (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1) + (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1) // check for not having connection close && (!reply->d_func()->isConnectionCloseEnabled()) // check if it is still connected && (socket->state() == QAbstractSocket::ConnectedState) + // check for broken servers in server reply header + // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining + && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4.")) + && (!serverHeaderField.contains("Microsoft-IIS/5.")) + && (!serverHeaderField.contains("Netscape-Enterprise/3.")) ) { pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported; } else { -- cgit v0.12 From 86d724590212825ba6db87da75117911880a30a8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 11 Feb 2010 14:51:47 +0100 Subject: Revert WebCore.pro part of 2761e6f57ecd00c3435dbb8a6cf5f40653195d5d to build QtWebKit with THUMB again This restores the library size and memory consumption. Reviewed-by: Janne Koskinen Reviewed-by: Iain --- src/3rdparty/webkit/WebCore/WebCore.pro | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 7b0366d..c9b622a 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -26,9 +26,7 @@ symbian: { # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. - MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" - MMP_RULES += ALWAYS_BUILD_AS_ARM - QMAKE_CXXFLAGS.ARMCC += -OTime -O3 + QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000 } include($$PWD/../WebKit.pri) -- cgit v0.12 From 898a85964830ac17e44675b75c6584866bcf767a Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 11 Feb 2010 16:37:24 +0200 Subject: Fixed the perl download link and description in docs Old link was defunct as the version it pointed is no longer available. Task-number: QTBUG-8134 Reviewed-by: TrustMe --- doc/src/getting-started/installation.qdoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index abdfcd2..561cc07 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1023,9 +1023,11 @@ If you are using pre-built binaries, follow the instructions given in the See \l{http://pepper.troll.no/s60prereleases/patches/}{here} for instructions how to check your compiler version and how to patch it, if needed. \endlist - \o \l{http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.msi}{ActivePerl v5.6.1 build 638} + \o \l{http://downloads.activestate.com/ActivePerl/releases}{ActivePerl 5.6.1 build 638 or higher} \list - \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors. + \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory for building Symbian applications, + but that version is no longer available from ActiveState. However, Qt for Symbian has been successfully + compiled using both 5.8.x and 5.10.x versions. \endlist \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher} \list -- cgit v0.12