summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
commitb7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (patch)
treeec8bb06f58f714d0b799164693e93bf0d51b6bcf /src
parente6dbbd0398d70ee64a3b8129e9621cfa15d70f8c (diff)
parenta62506aae40ede3fd8030312321759f669458909 (diff)
downloadQt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.zip
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.gz
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.cpp14
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp6
-rw-r--r--src/gui/painting/qrasterizer.cpp4
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c4
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp10
-rw-r--r--src/testlib/qtestcase.h2
7 files changed, 31 insertions, 11 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)