diff options
-rw-r--r-- | dist/changes-4.6.3 | 139 | ||||
-rw-r--r-- | mkspecs/features/qt.prf | 3 | ||||
-rw-r--r-- | mkspecs/features/symbian/qt.prf | 9 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiodeviceinfo.cpp | 62 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiooutput.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp | 11 |
6 files changed, 208 insertions, 27 deletions
diff --git a/dist/changes-4.6.3 b/dist/changes-4.6.3 index d8e9fb4..9383600 100644 --- a/dist/changes-4.6.3 +++ b/dist/changes-4.6.3 @@ -40,14 +40,85 @@ Optimizations QtCore ------ - - foo - * bar + - QStateMachine + * [QTBUG-8842] Ensure history configuration is cleared when a state + machine is restarted + - QXmlStreamReader + * [QTBUG-9196] fixed crash when parsing QtGui ----- - - foo - * bar + - QPainter + * [QTBUG-10421] Fixed WebKit-specific justification bug for text containing + more than one script. + + - QRegion + * [QTBUG-7699] Prevented crash on large x-coordinates. + + - QTextEdit + * [QTBUG-9599] Fixed crash when copying the current text cursor as a result + of deleting a character. + + - QTextEngine + * [QTBUG-9374] Fixed possible crash in QTextEngine::boundingBox() when using + multiscripted text. + + - QTextLayout + * [QTBUG-9074] Fixed performance regression that was introduced in Qt 4.6.0. + + - QTransform + * [QTBUG-8557] Fixed bug in QTransform::type() potentially occuring + after using operator/ or operator* or their overloads. + + - Improved scrolling horizontally with a mouse wheel over sliders. + - [QTBUG-7451] Gestures respect panels on QGraphicsView. + + - QCUPSSupport + * [QTBUG-10512] Fixed a potential crash with misconfigured CUPS printers. + * [QTBUG-6419] Make QCUPSSupport::printerHasPPD() release temporary file + handles. + + - QPDFBaseEngine + * [QTBUG-8451] Fixed line and point drawing in the PS and PDF generators. + + - QTextDocument + * [QTBUG-10301] Fixed a leak in QTextDocument::print(). + + - QFontEngine + * [QTBUG-3976] Fixed a leak for QFont objects used in threads. + + - QPSPrintEngine + * [QTBUG-10121] Fixed incorrect version setting for EPS files. + * [QTBUG-10140] Fixed generation of the %%BoundingBox operator to output + integer values instead of floating point values. + + - QWin32PrintEngine + * [QTBUG-9938] Fixed a crash on Windows 7 systems with invalid PrinterPorts + registry entries. + + - QTriangulatingStroker + * [QTBUG-9548] Fixed possible data corruption when certain paths were triangulated. + + - QRasterPaintEngine + * [QTBUG-9036] Fixed ClearType text rendering on translucent surfaces under Windows. + + - QPixmap + * [QTBUG-8606] Fixed QPixmap::load() to not modify referenced copies. + + - QPainter + * [QTBUG-8140] Speed up custom bitmap brushes under X11 without Xrender support. + * [QTBUG-8032] Fixed drawing pixmaps onto bitmaps on X11 without Xrender support. + + - QImageReader + * [QTBUG-7980] Fixed QImageReader::setAutoDetectImageFormat() to work with plugins. + + - QGifHandler + * [QTBUG-7037] Fixed QGifHandler::loopCount(). + * [QTBUG-6696] Cache the sizes of images in an animated GIF. + + - qDrawPixmaps() + * [QTBUG-8455] Fixed qDrawPixmaps() to draw on integer coordinates under Mac OS X. QtDBus ------ @@ -64,14 +135,47 @@ QtNetwork QtOpenGL -------- - - foo - * bar + - QOpenGLPaintEngine + * [QTBUG-10529] Fixed an issue where bound pixmaps were not released correctly + in the GL 1 engine. + + - QGL2PaintEngineEx + * [QTBUG-8681] Fixed an application exit crash that could occur in + the GL2 engine under X11. + + - QGLWidget + * [QTBUG-7545] Fixed QGLWidget::grabFrameBuffer() to honor the 'withAlpha' flag. + * [QTBUG-8054] Fixed drawing QPixmaps onto QGLWidgets on different X11 screens. + * [QTBUG-7865] Fixed bug where GL widgets were not fully updated on + Windows Vista/7 with Aero disabled. + * [QTBUG-8753] Worked around driver bug causing clipping errors on the N900. + * [QTBUG-10510] Workaround ATI driver bug when using QGraphicsEffect with GL. + + - QGLContext + * [QTBUG-5732] Fixed a GLX warning that occured with some Intel chipsets under X11. + + - QGLPixelBuffer + * [QTBUG-8047] Fixed usage of QGLPixelBuffer with share widgets on other X11 screens. QtScript -------- - - foo - * bar + - [QTBUG-7066] Fixed regression introduced in 4.6.0 that made it not + possible to change the prototype of the global object + - [QTBUG-8366] Fixed regression introduced in 4.6.0 that caused the + instanceof operator to throw an error when the right-hand-side is + generated by QScriptEngine::newQMetaObject() + - [QTBUG-8400] Fixed memory leak when lazily binding QScriptValue to an + engine + - [QTBUG-9775] Fixed regression introduced in 4.6.0 that caused the + qsTr() function not to resolve the translation context correctly when + invoked in the global scope + - QScriptClass + * [QTBUG-8364] Fixed regression introduced in 4.6.0 that could cause + the Callable extension to crash + - QScriptEngine + * [QTBUG-6437] Fixed regression introduced in 4.6.0 that made + installTranslatorFunctions() not work with custom global object QtSql ----- @@ -82,8 +186,13 @@ QtSql QtXml ----- - - foo - * bar + - [QTBUG-8398] QDom: prevent infinite loop when cloning a DTD + +QtXmlPatterns +------------- +- [QTBUG-8920] fixed crash with anonymous types in XsdSchemaChecker +- [QTBUG-8394] include/import/redefine schemas only once +- QXmlSchema: fix crash with referencing elements Qt Plugins ---------- @@ -106,17 +215,21 @@ Third party components Qt for Unix (X11 and Mac OS X) ------------------------------ - - + - Qt for Linux/X11 ---------------- - - + - [MR 458] Improved handling of Shift-Tab with VNC on X11. + - [QTBUG-7063] Changed key bindings (XF86XK_MyComputer, Qt::Key_Launch0, + Key_Calculator) on X11 back to how it was in Qt 4.5 before MR 1742 + accidentally changed it. Qt for Windows -------------- - - + - [QTBUG-6007] On Windows we query if there is a touch screen and do not try + to enable gestures otherwise. Qt for Mac OS X --------------- diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 62cce62..e8946de 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -31,6 +31,9 @@ plugin { #Qt plugins } } +#handle modules +for(mod,$$list($$files($$[QMAKE_MKSPECS]/modules/qt_*.pri))):include($$mod) + #handle includes INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picking up "stale" includes win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index b2156a9..e27ffc6 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -31,9 +31,16 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0 # Projects linking to webkit need dependency to webkit contains(QT, webkit): { + # these can be overridden by mkspecs/modules/qt_webkit.pri + isEmpty(QT_WEBKIT_MAJOR_VERSION) { + QT_WEBKIT_MAJOR_VERSION = $${QT_MAJOR_VERSION} + QT_WEBKIT_MINOR_VERSION = $${QT_MINOR_VERSION} + QT_WEBKIT_PATCH_VERSION = $${QT_PATCH_VERSION} + } + pkg_depends_webkit += \ "; Dependency to Qt Webkit" \ - "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {\"QtWebKit\"}" + "(0x200267C2), $${QT_WEBKIT_MAJOR_VERSION}, $${QT_WEBKIT_MINOR_VERSION}, $${QT_WEBKIT_PATCH_VERSION}, {\"QtWebKit\"}" } else { default_deployment.pkg_prerules -= pkg_depends_webkit } diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp index 092efc5..ae65b02 100644 --- a/src/multimedia/audio/qaudiodeviceinfo.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo.cpp @@ -43,6 +43,7 @@ #include <QtMultimedia/qaudioengine.h> #include <QtMultimedia/qaudiodeviceinfo.h> +#include <QtCore/qmap.h> QT_BEGIN_NAMESPACE @@ -238,7 +239,66 @@ QAudioFormat QAudioDeviceInfo::preferredFormat() const QAudioFormat QAudioDeviceInfo::nearestFormat(const QAudioFormat &settings) const { - return isNull() ? QAudioFormat() : d->info->nearestFormat(settings); + if (isFormatSupported(settings)) + return settings; + + QAudioFormat nearest = settings; + + nearest.setCodec(QLatin1String("audio/pcm")); + + if (nearest.sampleType() == QAudioFormat::Unknown) { + QAudioFormat preferred = preferredFormat(); + nearest.setSampleType(preferred.sampleType()); + } + + QMap<int,int> testFrequencies; + QList<int> frequenciesAvailable = supportedFrequencies(); + QMap<int,int> testSampleSizes; + QList<int> sampleSizesAvailable = supportedSampleSizes(); + + // Get sorted sampleSizes (equal to and ascending values only) + if (sampleSizesAvailable.contains(settings.sampleSize())) + testSampleSizes.insert(0,settings.sampleSize()); + sampleSizesAvailable.removeAll(settings.sampleSize()); + foreach (int size, sampleSizesAvailable) { + int larger = (size > settings.sampleSize()) ? size : settings.sampleSize(); + int smaller = (size > settings.sampleSize()) ? settings.sampleSize() : size; + if (size >= settings.sampleSize()) { + int diff = larger - smaller; + testSampleSizes.insert(diff, size); + } + } + + // Get sorted frequencies (equal to and ascending values only) + if (frequenciesAvailable.contains(settings.frequency())) + testFrequencies.insert(0,settings.frequency()); + frequenciesAvailable.removeAll(settings.frequency()); + foreach (int frequency, frequenciesAvailable) { + int larger = (frequency > settings.frequency()) ? frequency : settings.frequency(); + int smaller = (frequency > settings.frequency()) ? settings.frequency() : frequency; + if (frequency >= settings.frequency()) { + int diff = larger - smaller; + testFrequencies.insert(diff, frequency); + } + } + + // Try to find nearest + // Check ascending frequencies, ascending sampleSizes + QMapIterator<int, int> sz(testSampleSizes); + while (sz.hasNext()) { + sz.next(); + nearest.setSampleSize(sz.value()); + QMapIterator<int, int> i(testFrequencies); + while (i.hasNext()) { + i.next(); + nearest.setFrequency(i.value()); + if (isFormatSupported(nearest)) + return nearest; + } + } + + //Fallback + return preferredFormat(); } /*! diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp index 371773c..cf3b79c 100644 --- a/src/multimedia/audio/qaudiooutput.cpp +++ b/src/multimedia/audio/qaudiooutput.cpp @@ -369,8 +369,17 @@ int QAudioOutput::notifyInterval() const } /*! - Returns the amount of audio data processed since start() + Returns the amount of audio data processed by the class since start() was called in microseconds. + + Note: The amount of audio data played can be determined by subtracting + the microseconds of audio data still in the systems audio buffer. + + \code + qint64 bytesInBuffer = bufferSize() - bytesFree(); + qint64 usInBuffer = (qint64)(1000000) * bytesInBuffer / ( channels() * sampleSize() / 8 ) / frequency(); + qint64 usPlayed = processedUSecs() - usInBuffer; + \endcode */ qint64 QAudioOutput::processedUSecs() const diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp index d3d81e6..7e16ed9 100644 --- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp +++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp @@ -67,7 +67,6 @@ private slots: void frequencies(); void isformat(); void preferred(); - void nearest(); private: bool available; @@ -190,16 +189,6 @@ void tst_QAudioDeviceInfo::preferred() } } -void tst_QAudioDeviceInfo::nearest() -{ - if(available) { - QAudioFormat format1, format2; - format1.setFrequency(8000); - format2 = device->nearestFormat(format1); - QVERIFY(format2.frequency() == 44100); - } -} - QTEST_MAIN(tst_QAudioDeviceInfo) #include "tst_qaudiodeviceinfo.moc" |