diff options
-rw-r--r-- | src/3rdparty/phonon/gstreamer/mediaobject.cpp | 14 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qrasterizer.cpp | 4 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c | 4 | ||||
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 10 | ||||
-rw-r--r-- | src/testlib/qtestcase.h | 2 | ||||
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qkeysequence/qkeysequence.pro | 4 | ||||
-rw-r--r-- | tests/auto/qkeysequence/qkeysequence.qrc | 6 | ||||
-rw-r--r-- | tests/auto/qkeysequence/qt_de.qm | bin | 0 -> 186240 bytes | |||
-rw-r--r-- | tests/auto/qkeysequence/tst_qkeysequence.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qpainter/tst_qpainter.cpp | 25 | ||||
-rw-r--r-- | tests/auto/qsqlquery/tst_qsqlquery.cpp | 38 | ||||
-rw-r--r-- | tests/auto/qtwidgets/tst_qtwidgets.cpp | 2 | ||||
-rw-r--r-- | tools/designer/src/components/formeditor/deviceprofiledialog.ui | 84 | ||||
-rw-r--r-- | tools/qdoc3/test/eclipse-integration.qdocconf | 6 | ||||
-rw-r--r-- | tools/qdoc3/test/standalone-eclipse-integration.qdocconf | 2 |
18 files changed, 161 insertions, 63 deletions
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 74fc1b4..13f9734 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -965,11 +965,15 @@ void MediaObject::getStreamInfo() gint64 titleCount; GstFormat format = gst_format_get_by_nick("track"); if (gst_element_query_duration (m_pipeline, &format, &titleCount)) { - int oldAvailableTitles = m_availableTitles; - m_availableTitles = (int)titleCount; - if (m_availableTitles != oldAvailableTitles) { - emit availableTitlesChanged(m_availableTitles); - m_backend->logMessage(QString("Available titles changed: %0").arg(m_availableTitles), Backend::Info, this); + //check if returned format is still "track", + //gstreamer sometimes returns the total time, if tracks information is not available. + if (qstrcmp(gst_format_get_name(format), "track") == 0) { + int oldAvailableTitles = m_availableTitles; + m_availableTitles = (int)titleCount; + if (m_availableTitles != oldAvailableTitles) { + emit availableTitlesChanged(m_availableTitles); + m_backend->logMessage(QString("Available titles changed: %0").arg(m_availableTitles), Backend::Info, this); + } } } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index bac0a76..f41d7b4 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3551,7 +3551,7 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line, if (dash >= length) { dash = length; - *dashOffset += dash; + *dashOffset += dash / width; length = 0; } else { *dashOffset = 0; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index b3aef71..53d2102 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7535,7 +7535,11 @@ void qt_format_text(const QFont &fnt, const QRectF &_r, bool hidemnmemonic = (tf & Qt::TextHideMnemonic); Qt::LayoutDirection layout_direction; - if(option) + if (tf & Qt::TextForceLeftToRight) + layout_direction = Qt::LeftToRight; + else if (tf & Qt::TextForceRightToLeft) + layout_direction = Qt::RightToLeft; + else if (option) layout_direction = option->textDirection(); else if (painter) layout_direction = painter->layoutDirection(); diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 0b33369..66d0c9d 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -707,10 +707,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (a == b || width == 0 || d->clipRect.isEmpty()) return; + Q_ASSERT(width > 0.0); + QPointF pa = a; QPointF pb = b; - QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; + QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; if (squareCap) offs += QPointF(offs.y(), offs.x()); const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs); diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c index cc180f9..b26938b 100644 --- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c @@ -50,8 +50,8 @@ /* Capability information for the display */ static WSEGLCaps const wseglDisplayCaps[] = { - {WSEGL_CAP_WINDOWS_USE_MBX_SYNC, 1}, - {WSEGL_CAP_PIXMAPS_USE_MBX_SYNC, 1}, + {WSEGL_CAP_WINDOWS_USE_HW_SYNC, 1}, + {WSEGL_CAP_PIXMAPS_USE_HW_SYNC, 1}, {WSEGL_NO_CAPS, 0} }; diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 22f446d..7cf5e8b 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -882,6 +882,11 @@ bool QODBCResult::reset (const QString& query) return false; } + SQLINTEGER isScrollable, bufferLength; + r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength); + if(r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) + setForwardOnly(isScrollable==SQL_NONSCROLLABLE); + SQLSMALLINT count; SQLNumResultCols(d->hStmt, &count); if (count) { @@ -1500,6 +1505,11 @@ bool QODBCResult::exec() return false; } + SQLINTEGER isScrollable, bufferLength; + r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength); + if(r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) + setForwardOnly(isScrollable==SQL_NONSCROLLABLE); + SQLSMALLINT count; SQLNumResultCols(d->hStmt, &count); if (count) { diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index 3980883..1831728 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -220,7 +220,7 @@ namespace QTest template <typename T1, typename T2> bool qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int); -#if defined(QT_ARCH_WINDOWSCE) && defined(QT_COORD_TYPE) +#if defined(QT_COORD_TYPE) && (defined(QT_ARCH_ARM) || defined(QT_NO_FPU) || defined(QT_ARCH_WINDOWSCE)) template <> inline bool qCompare<qreal, float>(qreal const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index cab8fda..c0d5051 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -719,13 +719,14 @@ void tst_QImageReader::gifHandlerBugs() void tst_QImageReader::animatedGif() { - QImageReader io(prefix + "qt.gif"); - QImage image= io.read(); - int i=0; + QImageReader io(":images/qt.gif"); + QImage image = io.read(); + QVERIFY(!image.isNull()); + int i = 0; while(!image.isNull()){ - QString frameName = QString(prefix + "qt%1.gif").arg(++i); + QString frameName = QString(":images/qt%1.gif").arg(++i); QCOMPARE(image, QImage(frameName)); - image=io.read(); + image = io.read(); } } #endif diff --git a/tests/auto/qkeysequence/qkeysequence.pro b/tests/auto/qkeysequence/qkeysequence.pro index 6566340..bd85402 100644 --- a/tests/auto/qkeysequence/qkeysequence.pro +++ b/tests/auto/qkeysequence/qkeysequence.pro @@ -1,6 +1,4 @@ load(qttest_p4) SOURCES += tst_qkeysequence.cpp -TRANSLATIONS += keys_de.ts - - +RESOURCES += qkeysequence.qrc
\ No newline at end of file diff --git a/tests/auto/qkeysequence/qkeysequence.qrc b/tests/auto/qkeysequence/qkeysequence.qrc new file mode 100644 index 0000000..e224faa --- /dev/null +++ b/tests/auto/qkeysequence/qkeysequence.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource> + <file>keys_de.qm</file> + <file>qt_de.qm</file> + </qresource> +</RCC> diff --git a/tests/auto/qkeysequence/qt_de.qm b/tests/auto/qkeysequence/qt_de.qm Binary files differnew file mode 100644 index 0000000..595e4d7 --- /dev/null +++ b/tests/auto/qkeysequence/qt_de.qm diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 88d1d55..1c257bf 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -166,9 +166,9 @@ tst_QKeySequence::~tst_QKeySequence() void tst_QKeySequence::initTestCase() { ourTranslator = new QTranslator(this); - ourTranslator->load(QLatin1String("keys_de"), "."); + ourTranslator->load(":/keys_de"); qtTranslator = new QTranslator(this); - qtTranslator->load(QLatin1String("qt_de"), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + qtTranslator->load(":/qt_de"); } void tst_QKeySequence::operatorQString_data() diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 5d14d88..9515d87 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -236,6 +236,8 @@ private slots: void clippingBug(); void emptyClip(); + void taskQT4444_dontOverflowDashOffset(); + private: void fillData(); QColor baseColor( int k, int intensity=255 ); @@ -4287,5 +4289,28 @@ void tst_QPainter::drawImage_1x1() QCOMPARE(img, expected); } +void tst_QPainter::taskQT4444_dontOverflowDashOffset() +{ + QPainter p; + + QPen pen; + pen.setWidth(2); + pen.setStyle(Qt::DashDotLine); + + QPointF point[4]; + point[0] = QPointF(182.50868749707968,347.78457234212630); + point[1] = QPointF(182.50868749707968,107.22501998401277); + point[2] = QPointF(182.50868749707968,107.22501998401277); + point[3] = QPointF(520.46600762283651,107.22501998401277); + + QImage crashImage(QSize(1000, 120), QImage::Format_ARGB32_Premultiplied); + p.begin(&crashImage); + p.setPen(pen); + p.drawLines(point, 2); + p.end(); + + QVERIFY(true); // Don't crash +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index 4bea26d..eb95d611c 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -191,6 +191,9 @@ private slots: void task_233829_data() { generic_data("QPSQL"); } void task_233829(); + void sqlServerReturn0_data() { generic_data(); } + void sqlServerReturn0(); + private: // returns all database connections @@ -312,6 +315,13 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) tablenames << qTableName( "task_250026" ); tablenames << qTableName( "task_234422" ); + if (tst_Databases::isSqlServer( db )) { + QSqlQuery q( db ); + q.exec("DROP PROCEDURE " + qTableName("test141895_proc")); + } + + tablenames << qTableName("test141895"); + tst_Databases::safeDropTables( db, tablenames ); } @@ -2808,5 +2818,33 @@ void tst_QSqlQuery::task_233829() QVERIFY_SQL(q,exec()); } +void tst_QSqlQuery::sqlServerReturn0() +{ + QFETCH( QString, dbName ); + QSqlDatabase db = QSqlDatabase::database( dbName ); + CHECK_DATABASE( db ); + if (!tst_Databases::isSqlServer( db )) + QSKIP("SQL Server specific test", SkipSingle); + + QString tableName(qTableName("test141895")), procName(qTableName("test141895_proc")); + QSqlQuery q( db ); + q.exec("DROP TABLE " + tableName); + q.exec("DROP PROCEDURE " + procName); + QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+" (id integer)")); + QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" (id) VALUES (1)")); + QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" (id) VALUES (2)")); + QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" (id) VALUES (2)")); + QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" (id) VALUES (3)")); + QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" (id) VALUES (1)")); + QVERIFY_SQL(q, exec("CREATE PROCEDURE "+procName+ + " AS " + "SELECT * FROM "+tableName+" WHERE ID = 2 " + "RETURN 0")); + + QVERIFY_SQL(q, exec("{CALL "+procName+"}")); + + QVERIFY_SQL(q, next()); +} + QTEST_MAIN( tst_QSqlQuery ) #include "tst_qsqlquery.moc" diff --git a/tests/auto/qtwidgets/tst_qtwidgets.cpp b/tests/auto/qtwidgets/tst_qtwidgets.cpp index a765bde..fa5cd3e 100644 --- a/tests/auto/qtwidgets/tst_qtwidgets.cpp +++ b/tests/auto/qtwidgets/tst_qtwidgets.cpp @@ -74,6 +74,8 @@ void tst_QtWidgets::snapshot() { QSKIP("Jesper will fix this test when he has time.", SkipAll); #if 0 + QSKIP("This test doesn't do anything useful at the moment.", SkipAll); + StyleWidget widget(0, Qt::X11BypassWindowManagerHint); widget.show(); diff --git a/tools/designer/src/components/formeditor/deviceprofiledialog.ui b/tools/designer/src/components/formeditor/deviceprofiledialog.ui index 3186c57..17ee966 100644 --- a/tools/designer/src/components/formeditor/deviceprofiledialog.ui +++ b/tools/designer/src/components/formeditor/deviceprofiledialog.ui @@ -1,7 +1,8 @@ -<ui version="4.0" > - <class>DeviceProfileDialog</class> - <widget class="QDialog" name="dialog" > - <property name="geometry" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>dialog</class> + <widget class="QDialog" name="dialog"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -9,78 +10,78 @@ <height>209</height> </rect> </property> - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QWidget" native="1" name="SystemSettingsWidget" > - <layout class="QFormLayout" name="formLayout" > - <item row="1" column="0" > - <widget class="QLabel" name="m_systemFontFamilyLabel" > - <property name="text" > + <widget class="QWidget" name="SystemSettingsWidget" native="true"> + <layout class="QFormLayout" name="formLayout"> + <item row="1" column="0"> + <widget class="QLabel" name="m_systemFontFamilyLabel"> + <property name="text"> <string>&Family</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>m_systemFontComboBox</cstring> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QFontComboBox" name="m_systemFontComboBox" /> + <item row="1" column="1"> + <widget class="QFontComboBox" name="m_systemFontComboBox"/> </item> - <item row="2" column="0" > - <widget class="QLabel" name="m_systemFontSizeLabel" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="m_systemFontSizeLabel"> + <property name="text"> <string>&Point Size</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>m_systemFontSizeCombo</cstring> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QComboBox" name="m_systemFontSizeCombo" /> + <item row="2" column="1"> + <widget class="QComboBox" name="m_systemFontSizeCombo"/> </item> - <item row="3" column="0" > - <widget class="QLabel" name="m_styleLabel" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="m_styleLabel"> + <property name="text"> <string>Style</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>m_styleCombo</cstring> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QComboBox" name="m_styleCombo" /> + <item row="3" column="1"> + <widget class="QComboBox" name="m_styleCombo"/> </item> - <item row="4" column="0" > - <widget class="QLabel" name="m_systemDPILabel" > - <property name="text" > + <item row="4" column="0"> + <widget class="QLabel" name="m_systemDPILabel"> + <property name="text"> <string>Device DPI</string> </property> </widget> </item> - <item row="4" column="1" > - <widget class="qdesigner_internal::DPI_Chooser" native="1" name="m_dpiChooser" /> + <item row="4" column="1"> + <widget class="qdesigner_internal::DPI_Chooser" name="m_dpiChooser" native="true"/> </item> - <item row="0" column="0" > - <widget class="QLabel" name="m_nameLabel" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="m_nameLabel"> + <property name="text"> <string>Name</string> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLineEdit" name="m_nameLineEdit" /> + <item row="0" column="1"> + <widget class="QLineEdit" name="m_nameLineEdit"/> </item> </layout> </widget> </item> <item> - <widget class="QDialogButtonBox" name="buttonBox" > - <property name="orientation" > + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="standardButtons" > + <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Open|QDialogButtonBox::Save</set> </property> </widget> @@ -95,6 +96,13 @@ <container>1</container> </customwidget> </customwidgets> + <tabstops> + <tabstop>m_nameLineEdit</tabstop> + <tabstop>m_systemFontComboBox</tabstop> + <tabstop>m_systemFontSizeCombo</tabstop> + <tabstop>m_styleCombo</tabstop> + <tabstop>buttonBox</tabstop> + </tabstops> <resources/> <connections/> </ui> diff --git a/tools/qdoc3/test/eclipse-integration.qdocconf b/tools/qdoc3/test/eclipse-integration.qdocconf index aadaae6..13d8ab9 100644 --- a/tools/qdoc3/test/eclipse-integration.qdocconf +++ b/tools/qdoc3/test/eclipse-integration.qdocconf @@ -2,9 +2,9 @@ include(qt.qdocconf) headerdirs = sourcedirs = -sourcedirs = $QTDIR/../qteclipsetools/main/doc -imagedirs = $QTDIR/../qteclipsetools/main/doc -outputdir = $QTDIR/../qteclipsetools/main/doc/html +sourcedirs = $QTDIR/../qteclipsetools/eclipse_patched/doc +imagedirs = $QTDIR/../qteclipsetools/eclipse_patched/doc +outputdir = $QTDIR/../qteclipsetools/eclipse_patched/doc/html project = Qt Eclipse Integration description = "Qt Eclipse Integration" diff --git a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf index d61db54..b96c541 100644 --- a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf +++ b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf @@ -7,5 +7,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \ "<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \ "<td width=\"30%\" align=\"left\">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \ "<td width=\"40%\" align=\"center\"><a href=\"http://qt.nokia.com/doc/trademarks.html\">Trademarks</a></td>\n" \ - "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Eclipse Integration 1.5.2</div></td>\n" \ + "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Eclipse Integration 1.5.3</div></td>\n" \ "</tr></table></div></address>" |