summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp3
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
-rw-r--r--src/gui/painting/qtransform.h7
-rw-r--r--src/multimedia/audio/qaudioinput.cpp2
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp20
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp1
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp6
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp4
-rw-r--r--tests/auto/qtransform/tst_qtransform.cpp5
-rw-r--r--tools/linguist/linguist/mainwindow.cpp2
13 files changed, 59 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 6a2e75f..a2d5f37 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
- f3110d2f94c825477afac054ed448e45d47f5670
+ 266a6c4f1938dd9edf4a8125faf91c62495e3ce2
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 61c2227..a3f70d3 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Avoid double-buffering with Qt image decoders
+
+ Pass QIODevice::Unbuffered when opening the QBuffer that
+ wraps the image data, to hint to Qt that no extra buffering
+ is needed.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+
2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
Reviewed by Kenneth Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index b6823dd..9bcb3e9 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -79,7 +79,7 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
QByteArray imageData = QByteArray::fromRawData(m_data->data(), m_data->size());
m_buffer = new QBuffer;
m_buffer->setData(imageData);
- m_buffer->open(QBuffer::ReadOnly);
+ m_buffer->open(QBuffer::ReadOnly | QIODevice::Unbuffered);
m_reader = new QImageReader(m_buffer, m_format);
}
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 662100a..c93f0c3 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -282,8 +282,7 @@ QIODevicePrivate::~QIODevicePrivate()
Certain flags, such as \c Unbuffered and \c Truncate, are
meaningless when used with some subclasses. Some of these
restrictions are implied by the type of device that is represented
- by a subclass; for example, access to a QBuffer is always
- unbuffered. In other cases, the restriction may be due to the
+ by a subclass. In other cases, the restriction may be due to the
implementation, or may be imposed by the underlying platform; for
example, QTcpSocket does not support \c Unbuffered mode, and
limitations in the native API prevent QFile from supporting \c
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 5bce17f..bee93b5 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4682,8 +4682,10 @@ void QWidgetPrivate::syncCocoaMask()
if (!q->testAttribute(Qt::WA_WState_Created) || !extra)
return;
- if (extra->hasMask && extra->maskBits.size() != q->size()) {
- extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ if (extra->hasMask) {
+ if(extra->maskBits.size() != q->size()) {
+ extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ }
extra->maskBits.fill(QColor(Qt::color1).rgba());
extra->maskBits.setNumColors(2);
extra->maskBits.setColor(0, QColor(Qt::color0).rgba());
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 9909643..212a582 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -293,7 +293,8 @@ inline QTransform &QTransform::operator*=(qreal num)
affine._dx *= num;
affine._dy *= num;
m_33 *= num;
- m_dirty |= TxScale;
+ if (m_dirty < TxScale)
+ m_dirty = TxScale;
return *this;
}
inline QTransform &QTransform::operator/=(qreal div)
@@ -316,7 +317,7 @@ inline QTransform &QTransform::operator+=(qreal num)
affine._dx += num;
affine._dy += num;
m_33 += num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}
inline QTransform &QTransform::operator-=(qreal num)
@@ -332,7 +333,7 @@ inline QTransform &QTransform::operator-=(qreal num)
affine._dx -= num;
affine._dy -= num;
m_33 -= num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index fd892dd..10bab01 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleType(QAudioFormat::UnSignedInt);
- if (QAudioDeviceInfo info(QAudioDeviceInfo::defaultInputDevice());
+ QAudioDeviceInfo info = QAudioDeviceInfo::defaultInputDevice();
if (!info.isFormatSupported(format)) {
qWarning()<<"default format not supported try to use nearest";
format = info.nearestFormat(format);
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index 5eb23d0..ead9995 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -121,6 +121,11 @@ int QAudioInputPrivate::xrun_recovery(int err)
err = snd_pcm_prepare(handle);
if(err < 0)
reset = true;
+ else {
+ bytesAvailable = bytesReady();
+ if (bytesAvailable <= 0)
+ reset = true;
+ }
} else if((err == -ESTRPIPE)||(err == -EIO)) {
errorState = QAudio::IOError;
@@ -443,6 +448,7 @@ int QAudioInputPrivate::bytesReady() const
if(deviceState != QAudio::ActiveState && deviceState != QAudio::IdleState)
return 0;
int frames = snd_pcm_avail_update(handle);
+ if (frames < 0) return frames;
if((int)frames > (int)buffer_frames)
frames = buffer_frames;
@@ -459,6 +465,20 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
bytesAvailable = bytesReady();
+ if (bytesAvailable < 0) {
+ // bytesAvailable as negative is error code, try to recover from it.
+ xrun_recovery(bytesAvailable);
+ bytesAvailable = bytesReady();
+ if (bytesAvailable < 0) {
+ // recovery failed must stop and set error.
+ close();
+ errorState = QAudio::IOError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ return 0;
+ }
+ }
+
int count=0, err = 0;
while(count < 5) {
int chunks = bytesAvailable/period_size;
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index bd2de52..f394ca4 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -229,6 +229,7 @@ public:
QObject* parent):
QObject(parent),
m_deviceError(false),
+ m_audioConverter(0),
m_inputFormat(inputFormat),
m_outputFormat(outputFormat)
{
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 6cb93ad..98bd88f 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -1188,7 +1188,11 @@ bool QJpegHandler::canRead(QIODevice *device)
return false;
}
- return device->peek(2) == "\xFF\xD8";
+ char buffer[2];
+ if (device->peek(buffer, 2) != 2)
+ return false;
+
+ return uchar(buffer[0]) == 0xff && uchar(buffer[1]) == 0xd8;
}
bool QJpegHandler::read(QImage *image)
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 01c4124..4a211fc 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -517,7 +517,7 @@ QVariant::Type qDecodeOCIType(const QString& ocitype, QSql::NumericalPrecisionPo
}
else if (ocitype == QLatin1String("LONG") || ocitype == QLatin1String("NCLOB")
|| ocitype == QLatin1String("CLOB"))
- type = QVariant::String;
+ type = QVariant::ByteArray;
else if (ocitype == QLatin1String("RAW") || ocitype == QLatin1String("LONG RAW")
|| ocitype == QLatin1String("ROWID") || ocitype == QLatin1String("BLOB")
|| ocitype == QLatin1String("CFILE") || ocitype == QLatin1String("BFILE"))
@@ -543,7 +543,6 @@ QVariant::Type qDecodeOCIType(int ocitype, QSql::NumericalPrecisionPolicy precis
case SQLT_AVC:
case SQLT_RDD:
case SQLT_LNG:
- case SQLT_CLOB:
#ifdef SQLT_INTERVAL_YM
case SQLT_INTERVAL_YM:
#endif
@@ -581,6 +580,7 @@ QVariant::Type qDecodeOCIType(int ocitype, QSql::NumericalPrecisionPolicy precis
case SQLT_LVC:
case SQLT_LVB:
case SQLT_BLOB:
+ case SQLT_CLOB:
case SQLT_FILE:
case SQLT_NTY:
case SQLT_REF:
diff --git a/tests/auto/qtransform/tst_qtransform.cpp b/tests/auto/qtransform/tst_qtransform.cpp
index 827a486..a3ded8e 100644
--- a/tests/auto/qtransform/tst_qtransform.cpp
+++ b/tests/auto/qtransform/tst_qtransform.cpp
@@ -610,6 +610,11 @@ void tst_QTransform::types()
m4.rotate(45);
QCOMPARE(m4.type(), QTransform::TxRotate);
+
+ QTransform m5;
+ m5.scale(5, 5);
+ m5 = m5.adjoint() / m5.determinant();
+ QCOMPARE(m5.type(), QTransform::TxScale);
}
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 6e5c656..321fe8c 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -2370,7 +2370,7 @@ static bool haveMnemonic(const QString &str)
// because we get a lot of false positives.
if (c != '&' && c != ' ' && QChar(c).isPrint()) {
const ushort *pp = p;
- for (; ::isalpha(*p); p++) ;
+ for (; *p < 256 && ::isalpha(*p); p++) ;
if (pp == p || *p != ';')
return true;
// This looks like a HTML &entity;, so ignore it. As a HTML string