Date: Fri, 28 Jan 2011 11:52:44 +0100
Subject: Make updating single baseline work again
---
tests/arthur/baselineserver/src/baselineserver.cpp | 4 ++--
tests/arthur/baselineserver/src/baselineserver.h | 2 +-
tests/arthur/baselineserver/src/report.cpp | 15 ++++++---------
tests/arthur/baselineserver/src/report.h | 3 ++-
4 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp
index fef592e..d3710ac 100644
--- a/tests/arthur/baselineserver/src/baselineserver.cpp
+++ b/tests/arthur/baselineserver/src/baselineserver.cpp
@@ -426,13 +426,13 @@ QString BaselineHandler::clearAllBaselines(const QString &context)
return QString(QLS("%1 of %2 baselines cleared from context ")).arg((tot-failed)/2).arg(tot/2) + context;
}
-QString BaselineHandler::updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemId)
+QString BaselineHandler::updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemFile)
{
int tot = 0;
int failed = 0;
QString storagePrefix = BaselineServer::storagePath() + QLC('/');
// If itemId is set, update just that one, otherwise, update all:
- QString filter = (itemId.isEmpty() ? QLS("*") : itemId) + QLS("_????."); // Match any checksum. #vulnerable to changes in file naming
+ QString filter = itemFile.isEmpty() ? QLS("*_????.") : itemFile;
QDirIterator it(storagePrefix + mismatchContext, QStringList() << filter + QLS(FileFormat) << filter + QLS(MetadataFileExt));
while (it.hasNext()) {
tot++;
diff --git a/tests/arthur/baselineserver/src/baselineserver.h b/tests/arthur/baselineserver/src/baselineserver.h
index 0f14c8c..33b2ed7 100644
--- a/tests/arthur/baselineserver/src/baselineserver.h
+++ b/tests/arthur/baselineserver/src/baselineserver.h
@@ -109,7 +109,7 @@ public:
// CGI callbacks:
static QString view(const QString &baseline, const QString &rendered, const QString &compared);
static QString clearAllBaselines(const QString &context);
- static QString updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemId);
+ static QString updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemFile);
static QString blacklistTest(const QString &context, const QString &itemId, bool removeFromBlacklist = false);
private slots:
diff --git a/tests/arthur/baselineserver/src/report.cpp b/tests/arthur/baselineserver/src/report.cpp
index 217b92c..88b5625 100644
--- a/tests/arthur/baselineserver/src/report.cpp
+++ b/tests/arthur/baselineserver/src/report.cpp
@@ -180,7 +180,8 @@ void Report::writeFunctionResults(const ImageItemList &list)
QString metadata = prefix + QLS(MetadataFileExt);
if (item.status == ImageItem::Mismatch) {
QString rendered = handler->pathForItem(item, false, false) + QLS(FileFormat);
- writeItem(baseline, rendered, item, ctx, misCtx, metadata);
+ QString itemFile = prefix.section(QLC('/'), -1);
+ writeItem(baseline, rendered, item, itemFile, ctx, misCtx, metadata);
}
else {
out << "image info | \n"
@@ -211,7 +212,8 @@ void Report::writeFunctionResults(const ImageItemList &list)
out << "\n";
}
-void Report::writeItem(const QString &baseline, const QString &rendered, const ImageItem &item, const QString &ctx, const QString &misCtx, const QString &metadata)
+void Report::writeItem(const QString &baseline, const QString &rendered, const ImageItem &item,
+ const QString &itemFile, const QString &ctx, const QString &misCtx, const QString &metadata)
{
QString compared = generateCompared(baseline, rendered);
QString pageUrl = BaselineServer::baseUrl() + path;
@@ -223,13 +225,8 @@ void Report::writeItem(const QString &baseline, const QString &rendered, const I
out << "\n"
<< " Mismatch reported \n"
<< "Baseline Info\n"
-#if 0
- << " Let this be the new baseline \n"
-#else
<< "Let this be the new baseline \n"
-#endif
+ << "&itemFile=" << itemFile << "&url=" << pageUrl << "\">Let this be the new baseline\n"
<< "Blacklist this item \n"
<< "
Date: Tue, 1 Mar 2011 12:24:23 +0100
Subject: Build fix for shadow built Qt
---
tests/auto/baselineexample/baselineexample.pro | 2 +-
tests/auto/lancelot/lancelot.pro | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/auto/baselineexample/baselineexample.pro b/tests/auto/baselineexample/baselineexample.pro
index 30feecc..13f03b8 100644
--- a/tests/auto/baselineexample/baselineexample.pro
+++ b/tests/auto/baselineexample/baselineexample.pro
@@ -15,4 +15,4 @@ TEMPLATE = app
SOURCES += tst_baselineexample.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
-include($$QT_SOURCE_TREE/tests/arthur/common/qbaselinetest.pri)
+include($$PWD/../../arthur/common/qbaselinetest.pri)
diff --git a/tests/auto/lancelot/lancelot.pro b/tests/auto/lancelot/lancelot.pro
index 93841a3..11beb7e 100644
--- a/tests/auto/lancelot/lancelot.pro
+++ b/tests/auto/lancelot/lancelot.pro
@@ -3,11 +3,11 @@ QT += xml svg
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
SOURCES += tst_lancelot.cpp \
- $$QT_SOURCE_TREE/tests/arthur/common/paintcommands.cpp
-HEADERS += $$QT_SOURCE_TREE/tests/arthur/common/paintcommands.h
-RESOURCES += $$QT_SOURCE_TREE/tests/arthur/common/images.qrc
+ $$PWD/../../arthur/common/paintcommands.cpp
+HEADERS += $$PWD/../../arthur/common/paintcommands.h
+RESOURCES += $$PWD/../../arthur/common/images.qrc
-include($$QT_SOURCE_TREE/tests/arthur/common/qbaselinetest.pri)
+include($$PWD/../../arthur/common/qbaselinetest.pri)
!symbian:!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\"
linux-g++-maemo:DEFINES += USE_RUNTIME_DIR
--
cgit v0.12
From a3a79fefe65ec12c4c34a69885c2d23d79538a97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20R=C3=B8dal?=
Date: Fri, 4 Mar 2011 10:29:46 +0100
Subject: Fail in a nicer way when QPixmap is used in a non-GUI application.
Show same fatal message as when trying to instantiate a QWidget.
Task-number: QTBUG-17873
Reviewed-by: Gunnar Sletta
---
src/gui/image/qpixmap.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index f896572..71fb079 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -112,8 +112,13 @@ void QPixmap::init(int w, int h, Type type)
init(w, h, int(type));
}
+extern QApplication::Type qt_appType;
+
void QPixmap::init(int w, int h, int type)
{
+ if (qt_appType == QApplication::Tty)
+ qFatal("QPixmap: Cannot create a QPixmap when no GUI is being used");
+
if ((w > 0 && h > 0) || type == QPixmapData::BitmapType)
data = QPixmapData::create(w, h, (QPixmapData::PixelType) type);
else
--
cgit v0.12
From bfcd2cabf7b5bc15105c968f80f71132efb65759 Mon Sep 17 00:00:00 2001
From: Jiang Jiang
Date: Thu, 3 Mar 2011 18:39:51 +0100
Subject: Place cursor at the end of the selected range
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Selected range is the range of the text that has been edited with
input method, but not yet committed, normally the cursor should be
placed that the end of it (or hidden).
Task-number: QTBUG-17923
Reviewed-by: Morten Sørvig
---
src/gui/kernel/qcocoaview_mac.mm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index ff2dfe7..5e8b37e 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -983,7 +983,7 @@ static int qCocoaViewCount = 0;
QString qtText;
// Cursor position is retrived from the range.
QList attrs;
- attrs<([aString string]));
composingLength = qtText.length();
--
cgit v0.12
From 9326d1b80e34a03bf221fca46eb46fbf6420b4d9 Mon Sep 17 00:00:00 2001
From: aavit
Date: Fri, 4 Mar 2011 14:47:10 +0100
Subject: Improved error msg
---
tests/arthur/common/baselineprotocol.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index e4445bd..cff74cc 100644
--- a/tests/arthur/common/baselineprotocol.cpp
+++ b/tests/arthur/common/baselineprotocol.cpp
@@ -310,7 +310,7 @@ bool BaselineProtocol::connect(const QString &testCase, bool *dryrun)
}
if (cmd == Abort) {
- errMsg += QLS("Server aborted connection. Reason: ") + QString::fromLatin1(block);
+ errMsg += QLS("Server rejected connection. Reason: ") + QString::fromLatin1(block);
return false;
}
--
cgit v0.12
From 39f2c09d9154e00409c73c6f6db90a4ddb06b8f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20R=C3=B8dal?=
Date: Mon, 7 Mar 2011 10:01:51 +0100
Subject: Fixed auto-test failures caused by a3a79fefe65ec12.
QPixmaps might be unintentionally created through QVariant streaming for
example, so to prevent breaking existing applications we should just use
a warning instead, when creating a QPixmap in a non-GUI application.
Task-number: QTBUG-17873
Reviewed-by: aavit
---
src/gui/image/qpixmap.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 71fb079..be0ad4a 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -116,8 +116,11 @@ extern QApplication::Type qt_appType;
void QPixmap::init(int w, int h, int type)
{
- if (qt_appType == QApplication::Tty)
- qFatal("QPixmap: Cannot create a QPixmap when no GUI is being used");
+ if (qt_appType == QApplication::Tty) {
+ qWarning("QPixmap: Cannot create a QPixmap when no GUI is being used");
+ data = 0;
+ return;
+ }
if ((w > 0 && h > 0) || type == QPixmapData::BitmapType)
data = QPixmapData::create(w, h, (QPixmapData::PixelType) type);
--
cgit v0.12
From fe02247a72467f8bd95c0e68c316c1d71f8e0c1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20R=C3=B8dal?=
Date: Mon, 7 Mar 2011 10:44:12 +0100
Subject: Removed obsolete documentation from QPixmap.
This documentation is misleading, as the internal representation of a
QPixmap is not guaranteed to be RGB32 or ARGB32_Premultiplied, and
whether it's stored client side or server side also depends on the
graphicssystem.
Reviewed-by: Jani Hautakangas
---
src/gui/image/qpixmap.cpp | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index be0ad4a..021f281 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1644,16 +1644,6 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
{Implicit Data Sharing} documentation. QPixmap objects can also be
streamed.
- Depending on the system, QPixmap is stored using a RGB32 or a
- premultiplied alpha format. If the image has an alpha channel, and
- if the system allows, the preferred format is premultiplied alpha.
- Note also that QPixmap, unlike QImage, may be hardware dependent.
- On X11, Mac and Symbian, a QPixmap is stored on the server side while
- a QImage is stored on the client side (on Windows, these two classes
- have an equivalent internal representation, i.e. both QImage and
- QPixmap are stored on the client side and don't use any GDI
- resources).
-
Note that the pixel data in a pixmap is internal and is managed by
the underlying window system. Because QPixmap is a QPaintDevice
subclass, QPainter can be used to draw directly onto pixmaps.
--
cgit v0.12
|