From 1f6ec34d46bc36ff9396e5e865af81cecf310cc3 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 2 Dec 2011 14:56:28 +0000 Subject: symbian - don't export qsymbianbearer.qtplugin twice The file was being exported using both prj_exports and deployment lines. As deployment is copying to epoc32 z and c directories, the prj_exports is not needed. Moved the prj_exports rules into the S60 5.0 section, where deployment is not used but rather explicit rules added to the sis file. Task-number: ou1cimx1#946574 Reviewed-by: mread --- src/s60installs/s60installs.pro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 08c4829..d5281f4 100755 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -34,9 +34,6 @@ symbian: { pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) bearerPluginLocation = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) bearerStubZ = $${EPOCROOT}$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin - BLD_INF_RULES.prj_exports += \ - "$$S60_INSTALLS_SOURCE_DIR/qsymbianbearer.qtplugin /$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" \ - "$$S60_INSTALLS_SOURCE_DIR/qsymbianbearer.qtplugin /epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" } else { pluginLocations = $$QT_BUILD_TREE/plugins/s60 bearerPluginLocation = $$QT_BUILD_TREE/plugins/bearer @@ -54,6 +51,9 @@ symbian: { "ENDIF" \ " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\"" qtlibraries.pkg_postrules += qts60plugindeployment + BLD_INF_RULES.prj_exports += \ + "$$S60_INSTALLS_SOURCE_DIR/qsymbianbearer.qtplugin /$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" \ + "$$S60_INSTALLS_SOURCE_DIR/qsymbianbearer.qtplugin /epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" } else { # No need to deploy plugins for older platform versions when building on Symbian3 or later bearer_plugin.files = $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll -- cgit v0.12 From 147ea1d18482c1f64749db52c622dded075dc66c Mon Sep 17 00:00:00 2001 From: Honglei Zhang Date: Mon, 5 Dec 2011 15:05:16 +0200 Subject: QSqlRelationalTableModel doesn't follow relations on the first column QSqlRelationalTableModel doesn't follow relations on the first column of a table. The DisplayRole and the EditRole for indexes on column 0 are always the same. The bug is found in QSqlRelationalTableModel::data. Task-number: QTBUG-20038 Reviewed-by: Charles Yin --- src/sql/models/qsqlrelationaltablemodel.cpp | 2 +- .../tst_qsqlrelationaltablemodel.cpp | 55 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 0edfaf4..c5764a7 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -430,7 +430,7 @@ QVariant QSqlRelationalTableModel::data(const QModelIndex &index, int role) cons { Q_D(const QSqlRelationalTableModel); - if (role == Qt::DisplayRole && index.column() > 0 && index.column() < d->relations.count() && + if (role == Qt::DisplayRole && index.column() >= 0 && index.column() < d->relations.count() && d->relations.value(index.column()).isValid()) { QRelation &relation = d->relations[index.column()]; if (!relation.isDictionaryInitialized()) diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index 5f1a621..5ecf514 100644 --- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -93,6 +93,7 @@ private slots: void whiteSpaceInIdentifiers(); void psqlSchemaTest(); void selectAfterUpdate(); + void relationOnFirstColumn(); private: void dropTestTables( QSqlDatabase db ); @@ -1490,5 +1491,59 @@ void tst_QSqlRelationalTableModel::selectAfterUpdate() QCOMPARE(model.data(model.index(0,2)), QVariant("mrs")); } +/** + This test case verifies bug fix for QTBUG-20038. + */ +void tst_QSqlRelationalTableModel::relationOnFirstColumn() +{ + QFETCH_GLOBAL(QString, dbName); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + + QString testTable1 = qTableName("QTBUG_20038_test1", __FILE__); + QString testTable2 = qTableName("QTBUG_20038_test2", __FILE__); + tst_Databases::safeDropTables(db, QStringList() << testTable1 << testTable2); + + //prepare test1 table + QSqlQuery q(db); + QVERIFY_SQL(q, exec("CREATE TABLE " + testTable1 + " (val1 INTEGER, id1 INTEGER PRIMARY KEY);")); + QVERIFY_SQL(q, exec("DELETE FROM " + testTable1 + ";")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(1, 10);")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(2, 20);")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(3, 30);")); + + //prepare test2 table + QVERIFY_SQL(q, exec("CREATE TABLE " + testTable2 + " (id INTEGER PRIMARY KEY, name TEXT);")); + QVERIFY_SQL(q, exec("DELETE FROM " + testTable2 + ";")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (10, 'Hervanta');")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (20, 'Keskusta');")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (30, 'Annala');")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (40, 'Tammela');")); + QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (50, 'Amuri');")); + + //set test model + QSqlRelationalTableModel model(NULL, db); + model.setTable(testTable1); + model.setRelation(0, QSqlRelation(testTable2, "id", "name")); + QVERIFY_SQL(model, select()); + + //verify the data + QCOMPARE(model.data(model.index(0, 0)), QVariant("Hervanta")); + QCOMPARE(model.data(model.index(1, 0)), QVariant("Keskusta")); + QCOMPARE(model.data(model.index(2, 0)), QVariant("Annala")); + + //modify the model data + QVERIFY_SQL(model, setData(model.index(0, 0), 40)); + QVERIFY_SQL(model, setData(model.index(1, 0), 50)); + QVERIFY_SQL(model, setData(model.index(2, 0), 30)); + + //verify the data after modificaiton + QCOMPARE(model.data(model.index(0, 0)), QVariant("Tammela")); + QCOMPARE(model.data(model.index(1, 0)), QVariant("Amuri")); + QCOMPARE(model.data(model.index(2, 0)), QVariant("Annala")); + + tst_Databases::safeDropTables(db, QStringList() << testTable1 << testTable2); +} + QTEST_MAIN(tst_QSqlRelationalTableModel) #include "tst_qsqlrelationaltablemodel.moc" -- cgit v0.12 From be08fa8280d95c2edda7e2aaee6a5211062b0090 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 5 Dec 2011 13:30:31 +0000 Subject: Symbian: allow apps to disable GL multisampling On Symbian, QML apps had no way to disable GL multisampling if the hardware supported it. This caused some apps to run out of graphics memory and fail. This change adds a way for apps to indicate that they don't want multisampling, by setting an environment variable. For example: qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); This non-public API style was used as the use case is platform and application specific, and not appropriate for public API. Task-number: ou1cimx1#947771 Reviewed-by: Gareth Stockwell --- src/opengl/qgl_symbian.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp index 94c63fc..0148304 100644 --- a/src/opengl/qgl_symbian.cpp +++ b/src/opengl/qgl_symbian.cpp @@ -181,7 +181,10 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as d->ownsEglContext = true; d->eglContext->setApi(QEgl::OpenGL); - if (!QSymbianGraphicsSystemEx::hasBCM2727()) { + // Allow apps to override ability to use multisampling by setting an environment variable. Eg: + // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); + // Added to allow camera app to start with limited memory. + if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) { // Most likely we have hw support for multisampling // so let's enable it. d->glFormat.setSampleBuffers(1); -- cgit v0.12 From 73ee6ef3119df49c1fcc3c3478c9211379172a9a Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 6 Dec 2011 14:42:51 +0100 Subject: Fix declarative examples and demos issue on Windows On Windows, if the resulting binaries reside in /Delease and /Debug subdirs. Thus we require the same hack as on Meego where the binary alone resides in the /bin subdir. Reviewed-by: Alessandro Portale --- demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp | 2 -- examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp index 24f0659..4ad31c3 100644 --- a/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -90,7 +90,6 @@ class QmlApplicationViewerPrivate QString QmlApplicationViewerPrivate::adjustPath(const QString &path) { -#ifdef Q_OS_UNIX #ifdef Q_OS_MAC if (!QDir::isAbsolutePath(path)) return QString::fromLatin1("%1/../Resources/%2") @@ -101,7 +100,6 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path) if (QFileInfo(pathInInstallDir).exists()) return pathInInstallDir; #endif -#endif return path; } diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp index 24f0659..4ad31c3 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -90,7 +90,6 @@ class QmlApplicationViewerPrivate QString QmlApplicationViewerPrivate::adjustPath(const QString &path) { -#ifdef Q_OS_UNIX #ifdef Q_OS_MAC if (!QDir::isAbsolutePath(path)) return QString::fromLatin1("%1/../Resources/%2") @@ -101,7 +100,6 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path) if (QFileInfo(pathInInstallDir).exists()) return pathInInstallDir; #endif -#endif return path; } -- cgit v0.12 From 1290b1328c5168db0b922dfd19ba88db3cc265cf Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sun, 4 Dec 2011 02:59:31 +0100 Subject: tests: make tests compile or disable those which don't compile These changes are mostly a backport from qtbase and a fix to those tests that are dependent on private APIs. Change-Id: I6e647583d7aaddf525d719c3b61f59a0c9aedf74 Reviewed-by: Rohan McGovern Reviewed-by: Friedemann Kleint --- tests/auto/corelib.pro | 4 ++++ tests/auto/dbus.pro | 2 ++ tests/auto/gui.pro | 25 +++++++++++++++++----- tests/auto/network.pro | 6 ++++++ tests/auto/other.pro | 2 ++ tests/auto/qtipc/qsharedmemory/qsharedmemory.pro | 4 +++- tests/auto/qtipc/qtipc.pro | 4 ++++ tests/auto/script.pro | 2 ++ tests/auto/xmlpatterns.pro | 1 + tests/benchmarks/corelib/io/io.pro | 2 +- tests/benchmarks/corelib/io/qdiriterator/main.cpp | 5 +++-- .../corelib/io/qdiriterator/qdiriterator.pro | 2 -- .../io/qdiriterator/qfilesystemiterator.cpp | 2 +- tests/benchmarks/corelib/io/qfile/main.cpp | 1 - .../qtimer_vs_qmetaobject.pro | 2 -- .../corelib/kernel/qvariant/qvariant.pro | 2 -- tests/benchmarks/corelib/tools/qregexp/qregexp.pro | 2 +- tests/benchmarks/corelib/tools/qstring/main.cpp | 11 +++++++--- .../corelib/tools/qstringlist/qstringlist.pro | 1 - tests/benchmarks/corelib/tools/tools.pro | 4 +++- tests/benchmarks/declarative/declarative.pro | 6 ++++++ .../gui/animation/qanimation/qanimation.pro | 2 -- tests/benchmarks/gui/graphicsview/graphicsview.pro | 2 +- .../qgraphicsview/tst_qgraphicsview.cpp | 5 +---- tests/benchmarks/gui/kernel/qapplication/main.cpp | 2 +- tests/benchmarks/network/kernel/kernel.pro | 3 +++ 26 files changed, 73 insertions(+), 31 deletions(-) diff --git a/tests/auto/corelib.pro b/tests/auto/corelib.pro index 6810f76..cb1f2ef 100644 --- a/tests/auto/corelib.pro +++ b/tests/auto/corelib.pro @@ -105,6 +105,10 @@ SUBDIRS=\ qfilesystementry \ qabstractfileengine +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qfileinfo \ + qfilesystementry \ + symbian:SUBDIRS -= \ qtconcurrentfilter \ qtconcurrentiteratekernel \ diff --git a/tests/auto/dbus.pro b/tests/auto/dbus.pro index 31b46a3..7470bf8 100644 --- a/tests/auto/dbus.pro +++ b/tests/auto/dbus.pro @@ -17,3 +17,5 @@ SUBDIRS=\ qdbusthreading \ qdbusxmlparser \ +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qdbusmarshall \ diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index 17f56f2..cde39c2 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -209,11 +209,26 @@ SUBDIRS=\ win32:SUBDIRS -= qtextpiecetable !contains(QT_CONFIG, private_tests): SUBDIRS -= \ - qgraphicssceneindex \ - qnetworkreply \ - qpathclipper \ - qstylesheetstyle \ - qtextpiecetable \ + qcolumnview \ + qgraphicsanchorlayout \ + qgraphicsanchorlayout1 \ + qgraphicsitem \ + qgraphicsscene \ + qgraphicssceneindex \ + qlistwidget \ + qmainwindow \ + qnetworkreply \ + qpathclipper \ + qpixmapcache \ + qsidebar \ + qstatictext \ + qstylesheetstyle \ + qtcpsocket \ + qtextlayout \ + qtextpiecetable \ + qtipc \ + qtoolbar \ + qtreeview \ symbian:SUBDIRS -= \ qsystemtrayicon \ diff --git a/tests/auto/network.pro b/tests/auto/network.pro index e4cecce..9eb358f 100644 --- a/tests/auto/network.pro +++ b/tests/auto/network.pro @@ -46,9 +46,15 @@ SUBDIRS=\ !contains(QT_CONFIG, private_tests): SUBDIRS -= \ qauthenticator \ + qhostinfo \ qhttpnetworkconnection \ qhttpnetworkreply \ + qhttpsocketengine \ + qnetworkreply \ platformsocketengine \ qsocketnotifier \ qsocks5socketengine \ + qsslsocket \ + qsslsocket_onDemandCertificates_member \ + qsslsocket_onDemandCertificates_static \ diff --git a/tests/auto/other.pro b/tests/auto/other.pro index 655d666..b50e169 100644 --- a/tests/auto/other.pro +++ b/tests/auto/other.pro @@ -60,5 +60,7 @@ symbian { # Following tests depends on private API !contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qcombobox \ qcssparser \ + qtextedit \ diff --git a/tests/auto/qtipc/qsharedmemory/qsharedmemory.pro b/tests/auto/qtipc/qsharedmemory/qsharedmemory.pro index 9fef8e4..3193caa 100644 --- a/tests/auto/qtipc/qsharedmemory/qsharedmemory.pro +++ b/tests/auto/qtipc/qsharedmemory/qsharedmemory.pro @@ -1,4 +1,6 @@ TEMPLATE = subdirs SUBDIRS = test qsystemlock - +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + test \ + qsystemlock \ diff --git a/tests/auto/qtipc/qtipc.pro b/tests/auto/qtipc/qtipc.pro index 60037d2..fb32e51 100644 --- a/tests/auto/qtipc/qtipc.pro +++ b/tests/auto/qtipc/qtipc.pro @@ -4,3 +4,7 @@ SUBDIRS=\ qsharedmemory \ qsystemsemaphore \ +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + lackey \ + qsharedmemory \ + qsystemsemaphore \ diff --git a/tests/auto/script.pro b/tests/auto/script.pro index c4d0544..80d259d 100644 --- a/tests/auto/script.pro +++ b/tests/auto/script.pro @@ -16,3 +16,5 @@ SUBDIRS=\ qscriptvaluegenerated \ qscriptvalueiterator \ +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qscriptcontext \ diff --git a/tests/auto/xmlpatterns.pro b/tests/auto/xmlpatterns.pro index b9244d6..4940cc4 100644 --- a/tests/auto/xmlpatterns.pro +++ b/tests/auto/xmlpatterns.pro @@ -46,4 +46,5 @@ xmlpatternsxqts.depends = xmlpatternssdk xmlpatternssdk \ xmlpatternsxqts \ xmlpatternsxslts \ + xmlpatternsschemats \ diff --git a/tests/benchmarks/corelib/io/io.pro b/tests/benchmarks/corelib/io/io.pro index 97445d7..15ae0d2 100644 --- a/tests/benchmarks/corelib/io/io.pro +++ b/tests/benchmarks/corelib/io/io.pro @@ -3,7 +3,7 @@ SUBDIRS = \ qdir \ qdiriterator \ qfile \ - qfileinfo \ + #qfileinfo \ # FIXME: broken qiodevice \ qtemporaryfile diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp index 0d0251f..8b1dbe2 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -44,7 +44,6 @@ #ifdef Q_OS_WIN # include -# include #else # include # include @@ -176,7 +175,9 @@ void tst_qdiriterator::posix() QString path(dirpath); QBENCHMARK { #ifdef Q_OS_WIN - count = posix_helper(path.utf16()); + wchar_t wPath[MAX_PATH]; + path.toWCharArray(wPath); + count = posix_helper(wPath); #else count = posix_helper(dirpath.constData()); #endif diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro index 17d164d..a501b1b 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -7,8 +7,6 @@ INCLUDEPATH += . QT -= gui CONFIG += release -CONFIG += debug - SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp index 935bccd..ede398d 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp @@ -229,7 +229,7 @@ void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path) #ifdef Q_OS_WIN wchar_t szSearchPath[MAX_PATH]; - wcscpy(szSearchPath, QString(path).utf16()); + QString::fromAscii(path).toWCharArray(szSearchPath); wcscat(szSearchPath, L"\\*"); HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult); m_bFirstSearchResult = true; diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 6211751..e22637a 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -51,7 +51,6 @@ #ifdef Q_OS_WIN # include -# include #endif #define BUFSIZE 1024*512 diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro index 5ecb94c..3f1272d 100644 --- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro @@ -5,8 +5,6 @@ DEPENDPATH += . INCLUDEPATH += . CONFIG += release -#CONFIG += debug - SOURCES += tst_qtimer_vs_qmetaobject.cpp QT -= gui diff --git a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro index f3dd66a..59e0070 100644 --- a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro +++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro @@ -5,7 +5,5 @@ DEPENDPATH += . INCLUDEPATH += . CONFIG += release -#CONFIG += debug - SOURCES += tst_qvariant.cpp diff --git a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro index ffdad12..eea5d87 100644 --- a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro +++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro @@ -12,7 +12,7 @@ CONFIG += release # Input SOURCES += main.cpp -include( $${QT_SOURCE_TREE}/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri ) +include( $${QT_SOURCE_TREE}/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri ) exists( /usr/include/boost/regex.hpp ){ DEFINES+=HAVE_BOOST diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index daefe12..943302c 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -58,6 +58,11 @@ #include #endif +// MAP_ANON is deprecated on Linux, and MAP_ANONYMOUS is not present on Mac +#ifndef MAP_ANONYMOUS +# define MAP_ANONYMOUS MAP_ANON +#endif + #include #include "data.h" @@ -789,7 +794,7 @@ static void __attribute__((noinline)) equals2_selftest() void *page1, *page3; ushort *page2; page1 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0); + page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); page3 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); Q_ASSERT(quintptr(page2) == quintptr(page1) + pagesize || quintptr(page2) == quintptr(page1) - pagesize); @@ -938,7 +943,7 @@ static inline int ucstrncmp_short_tail(const ushort *p1, const ushort *p2, int l return 0; } -static inline int bsf_nonzero(register long val) +static inline int bsf_nonzero(register int val) { int result; # ifdef Q_CC_GNU @@ -1346,7 +1351,7 @@ void tst_QString::ucstrncmp() const void *page1, *page3; ushort *page2; page1 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0); + page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); page3 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); Q_ASSERT(quintptr(page2) == quintptr(page1) + pagesize || quintptr(page2) == quintptr(page1) - pagesize); diff --git a/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro index 06a5836..b4a4622 100644 --- a/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro +++ b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro @@ -1,6 +1,5 @@ load(qttest_p4) TARGET = tst_bench_qstringlist -CONFIG -= debug CONFIG += release QT -= gui SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro index 83a9411..9ad3950 100644 --- a/tests/benchmarks/corelib/tools/tools.pro +++ b/tests/benchmarks/corelib/tools/tools.pro @@ -6,8 +6,10 @@ SUBDIRS = \ qline \ qlist \ qrect \ - qregexp \ + #qregexp \ # FIXME: broken qstring \ qstringbuilder \ qstringlist \ qvector + +!*g++*: SUBDIRS -= qstring diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro index 73e40b2..4534d81 100644 --- a/tests/benchmarks/declarative/declarative.pro +++ b/tests/benchmarks/declarative/declarative.pro @@ -12,4 +12,10 @@ SUBDIRS += \ contains(QT_CONFIG, opengl): SUBDIRS += painting qmlshadersplugin +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + creation \ + pointers \ + qdeclarativeimage \ + script \ + include(../trusted-benchmarks.pri) diff --git a/tests/benchmarks/gui/animation/qanimation/qanimation.pro b/tests/benchmarks/gui/animation/qanimation/qanimation.pro index 53a139a..e42a830 100644 --- a/tests/benchmarks/gui/animation/qanimation/qanimation.pro +++ b/tests/benchmarks/gui/animation/qanimation/qanimation.pro @@ -5,8 +5,6 @@ DEPENDPATH += . INCLUDEPATH += . CONFIG += release -#CONFIG += debug - SOURCES += main.cpp \ dummyobject.cpp \ diff --git a/tests/benchmarks/gui/graphicsview/graphicsview.pro b/tests/benchmarks/gui/graphicsview/graphicsview.pro index 1509466..cd7d88e 100644 --- a/tests/benchmarks/gui/graphicsview/graphicsview.pro +++ b/tests/benchmarks/gui/graphicsview/graphicsview.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ - functional \ + #functional \ # FIXME: broken qgraphicsanchorlayout \ qgraphicsitem \ qgraphicslayout \ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 3b690da..9497227 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -40,11 +40,8 @@ ****************************************************************************/ #include +#include #include -#include -#include -#include -#include #include "chiptester/chiptester.h" //#define CALLGRIND_DEBUG diff --git a/tests/benchmarks/gui/kernel/qapplication/main.cpp b/tests/benchmarks/gui/kernel/qapplication/main.cpp index 6399168..6231980 100644 --- a/tests/benchmarks/gui/kernel/qapplication/main.cpp +++ b/tests/benchmarks/gui/kernel/qapplication/main.cpp @@ -38,7 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include +#include #include diff --git a/tests/benchmarks/network/kernel/kernel.pro b/tests/benchmarks/network/kernel/kernel.pro index 1ec3071..13345a5 100644 --- a/tests/benchmarks/network/kernel/kernel.pro +++ b/tests/benchmarks/network/kernel/kernel.pro @@ -1,3 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ qhostinfo + +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qhostinfo -- cgit v0.12