From 8f16a4f1638fd661e74c6aa60822cd9ef17e5003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 2 Jun 2009 11:02:21 +0200 Subject: My 4.5.2 changes for the changelog. --- dist/changes-4.5.2 | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index 98ea59e..0cb3112 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -58,6 +58,26 @@ Third party components * [253448] Prevent a crash when using the Qt::WA_MacBrushedMetal attribute in conjunction with style sheets. +- QPainter + * [253783] Fixed text shaping bugs when using ligatures and different + scripts in a single text item. + * Fixed various inconsistencies for image drawing on non-integer + coordinates. + * Fixed bug with 0-opacity causing images to be drawn fully opaque. + * Fixed crash when drawing on a null pixmap. + * [251534] Fixed issue where text with non-opaque color from widget + palette would be blitted instead of blended. + +- QTransform + * Fixed issue in QTransform::type() causing a projective transform to be + treated as a scaling transform. + +- QtOpenGL + * [247083] Re-enabled antialiasing for large font sizes in OpenGL paint + engine. + * [251485] Fixed crash that could occur with projective transforms and + high quality antialiasing. + **************************************************************************** * Database Drivers * **************************************************************************** @@ -69,7 +89,11 @@ Third party components Qt for Linux/X11 ---------------- - +[253186] Fixed compile error in qfontengine_ft.cpp on 64-bit platforms with +legacy freetype headers. +[241361] Prevented asynchronous access to non-thread safe libfontconfig API. +[244362] Worked around X server crash when calling XFillPolygon with more than +200000 points by falling back to raster paint engine. Qt for Windows -------------- -- cgit v0.12 From 7314c07a3e443b1d5349b419a03db8d41ca43f7e Mon Sep 17 00:00:00 2001 From: jasplin Date: Tue, 2 Jun 2009 10:57:42 +0200 Subject: BT: Fixed crash on Mac caused by erroneous handling of native focus events. On Mac, a widget with a NoFocus policy could still get focus (if only temporarily) as the result of a native focus event. In particular, a line edit with a completer should not lose focus (if only for a brief moment) as a result of the completer popup being shown. This will for example cause an item delegate to think that the user has navigated away from the cell and delete the line edit as a result. This will in turn cause the completer to access a null pointer. Reviewed-by: Richard Moe Gustavsen Task-number: 254456 and 254460 --- src/gui/kernel/qwidget_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index f863428..c82b87d 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -1296,8 +1296,11 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event, if(part == kControlFocusNoPart){ if (widget->hasFocus()) QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason); - } else + } else if (widget->focusPolicy() != Qt::NoFocus) { widget->setFocus(); + } else { + handled_event = false; + } } if(!HIObjectIsOfClass((HIObjectRef)hiview, kObjectQWidget)) CallNextEventHandler(er, event); -- cgit v0.12 From 9b53bb583ca7e74c737683d85593e4a97107a777 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 2 Jun 2009 13:02:27 +0200 Subject: Doc - changing the "main layout" term to "top level widget's layout" to preserve some consistency. Also added a screenshot of the Object Insepector displaying a form where its widget has no top level layout. Reviewed-By: TrustMe --- doc/src/designer-manual.qdoc | 19 ++++++++++++------- doc/src/images/rgbController-no-toplevel-layout.png | Bin 0 -> 1343 bytes 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 doc/src/images/rgbController-no-toplevel-layout.png diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 4b8de32..fc3adcf 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -465,18 +465,23 @@ spin boxes and sliders as well. The next step is to combine all three layouts into one \bold{main layout}. - It is important that your form has a main layout; otherwise, the widgets - on your form will not resize when your form is resized. To set the main - layout, \gui{Right click} anywhere on your form, outside of the three - separate layouts, and select \gui{Lay Out Horizontally}. Alternatively, you - could also select \gui{Lay Out in a Grid} -- you will still see the same - arrangement (shown below). + The main layout is the top level widget's (in this case, the QWidget) + layout. It is important that your top level widget has a layout; otherwise, + the widgets on your window will not resize when your window is resized. To + set the layout, \gui{Right click} anywhere on your form, outside of the + three separate layouts, and select \gui{Lay Out Horizontally}. + Alternatively, you could also select \gui{Lay Out in a Grid} -- you will + still see the same arrangement (shown below). \image rgbController-final-layout.png \note Main layouts cannot be seen on the form. To check if you have a main layout installed, try resizing your form; your widgets should resize - accordingly. + accordingly. Alternatively, you can take a look at \QD's + \gui{Object Inspector}. If your top level widget does not have a layout, + you will see the broken layout icon next to it, + \inlineimage rgbController-no-toplevel-layout.png + . When you click on the slider and drag it to a certain value, you want the spin box to display the slider's position. To accomplish this behavior, you diff --git a/doc/src/images/rgbController-no-toplevel-layout.png b/doc/src/images/rgbController-no-toplevel-layout.png new file mode 100644 index 0000000..0a9bc29 Binary files /dev/null and b/doc/src/images/rgbController-no-toplevel-layout.png differ -- cgit v0.12 From 9dc7a011e798c24b4dd8b19a74b42c61f52a1328 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Jun 2009 13:08:10 +0200 Subject: Changelog for 4.5.2 --- dist/changes-4.5.2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index 0cb3112..423bbdd 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -94,10 +94,15 @@ legacy freetype headers. [241361] Prevented asynchronous access to non-thread safe libfontconfig API. [244362] Worked around X server crash when calling XFillPolygon with more than 200000 points by falling back to raster paint engine. +[250326] Titlebar wasn't shown on X11 with Qt::CustomizeWindowHint for + fixed-size windows. +[251925] Improved showing QMessageBox on small screens. Qt for Windows -------------- +[251259] Switching to another app left text cursor in line edits with + QtMfc framework. Qt for Mac OS X --------------- -- cgit v0.12 From 4ae7a683217eb2a7e9fc2fe2ed173e7da277038b Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 2 Jun 2009 13:44:24 +0200 Subject: My Changelog for 4.5.2 --- dist/changes-4.5.2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index 423bbdd..c87ad92 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -46,6 +46,9 @@ Third party components Plugins (r41346, r43550, r43915, r43917, r43923) Clipboard (r41360) +- QAbstractNetworkCache + * Only cache responses to HTTP GET by default, not HTTP PUT or POST + - QMacStyle * [253339] Don't draw arrows on toolbuttons that have a menu and text only. * [252301] Ensure that small and mini spin boxes are drawn correctly. @@ -53,6 +56,13 @@ Third party components - QFontDialog * [252000] Ensure that QFontDialog::getFont() works on Mac OS X. +- QNetworkCookie + * [251959] fix parsing of multiple cookies separated by a newline + +- QNetworkCookieJar + * [251467] do not allow cookies for domains like ".com" + * [228974] allow cookies whose domain attribute is missing a leading dot + - QWidget * [250668] Don't send extra wheel events when using the scroll wheel in Cocoa. * [253448] Prevent a crash when using the Qt::WA_MacBrushedMetal attribute -- cgit v0.12 From 5be3335436501c5e0d3f5cb047edba1371aeb187 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Tue, 2 Jun 2009 15:02:00 +0200 Subject: Use a QVarLengthArray instead of some hacky self-made container This won't leak on error case, and will work with arbitrary sizes. Also changed from int to short as instructed by Samuel. Reviewed-by: Samuel --- src/gui/painting/qpaintengine_raster.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 847904b..58ffb02 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3876,11 +3876,7 @@ static void qt_merge_clip(const QClipData *c1, const QClipData *c2, QClipData *r { Q_ASSERT(c1->clipSpanHeight == c2->clipSpanHeight && c1->clipSpanHeight == result->clipSpanHeight); - // ### buffer overflow possible - const int BUFFER_SIZE = 4096; - int buffer[BUFFER_SIZE]; - int *b = buffer; - int bsize = BUFFER_SIZE; + QVarLengthArray buffer; QClipData::ClipLine *c1ClipLines = const_cast(c1)->clipLines(); QClipData::ClipLine *c2ClipLines = const_cast(c2)->clipLines(); @@ -3907,11 +3903,8 @@ static void qt_merge_clip(const QClipData *c1, const QClipData *c2, QClipData *r // find required length int max = qMax(c1_spans[c1_count - 1].x + c1_spans[c1_count - 1].len, c2_spans[c2_count - 1].x + c2_spans[c2_count - 1].len); - if (max > bsize) { - b = (int *)realloc(bsize == BUFFER_SIZE ? 0 : b, max*sizeof(int)); - bsize = max; - } - memset(buffer, 0, BUFFER_SIZE * sizeof(int)); + buffer.resize(max); + memset(buffer.data(), 0, buffer.size() * sizeof(short)); // Fill with old spans. for (int i = 0; i < c1_count; ++i) { @@ -3947,8 +3940,6 @@ static void qt_merge_clip(const QClipData *c1, const QClipData *c2, QClipData *r result->appendSpan(sx, x - sx, y, coverage); } } - if (b != buffer) - free(b); } void QRasterPaintEnginePrivate::initializeRasterizer(QSpanData *data) -- cgit v0.12 From 7a095c52057633e9050e74622f8a990738c2741b Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 2 Jun 2009 15:20:04 +0200 Subject: Fixed aspect ratio on Windows - When changing the aspect ratio, the video wouldn't update. - The VMR9 can in some cases try to manage the aspect ratio itself and then fights our system. This is now disabled. --- src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp | 1 + src/3rdparty/phonon/ds9/videowidget.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp index 298e9fa..81ebb8b 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp +++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp @@ -169,6 +169,7 @@ namespace Phonon Q_ASSERT(SUCCEEDED(hr)); ComPointer windowlessControl(m_filter, IID_IVMRWindowlessControl9); windowlessControl->SetVideoClippingWindow(reinterpret_cast(target->winId())); + windowlessControl->SetAspectRatioMode(VMR9ARMode_None); //we're in control of the size } QImage VideoRendererVMR9::snapshot() const diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp index de7ce5f..0ef653f 100644 --- a/src/3rdparty/phonon/ds9/videowidget.cpp +++ b/src/3rdparty/phonon/ds9/videowidget.cpp @@ -261,6 +261,7 @@ namespace Phonon { m_aspectRatio = aspectRatio; updateVideoSize(); + m_widget->update(); } Phonon::VideoWidget::ScaleMode VideoWidget::scaleMode() const @@ -279,6 +280,7 @@ namespace Phonon { m_scaleMode = scaleMode; updateVideoSize(); + m_widget->update(); } void VideoWidget::setBrightness(qreal b) -- cgit v0.12 From d7700105933b3c4071f8df524915dbaa2092d82b Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 2 Jun 2009 15:48:27 +0200 Subject: Correct invalid font. QFont() returns the app font, not an invalid font. --- tests/auto/qcssparser/tst_cssparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qcssparser/tst_cssparser.cpp b/tests/auto/qcssparser/tst_cssparser.cpp index 7c4fac1..b41a745 100644 --- a/tests/auto/qcssparser/tst_cssparser.cpp +++ b/tests/auto/qcssparser/tst_cssparser.cpp @@ -1475,7 +1475,7 @@ void tst_CssParser::extractFontFamily_data() QTest::newRow("unquoted-family-name2") << "font-family: Times New Roman" << QString("Times New Roman"); QTest::newRow("multiple") << "font-family: Times New Roman , foobar, 'baz'" << QString("Times New Roman"); QTest::newRow("multiple2") << "font-family: invalid, Times New Roman " << QString("Times New Roman"); - QTest::newRow("invalid") << "font-family: invalid" << QFont().family(); + QTest::newRow("invalid") << "font-family: invalid" << QFontInfo(QFont("invalid font")).family(); QTest::newRow("shorthand") << "font: 12pt Times New Roman" << QString("Times New Roman"); QTest::newRow("shorthand multiple quote") << "font: 12pt invalid, \"Times New Roman\" " << QString("Times New Roman"); QTest::newRow("shorthand multiple") << "font: 12pt invalid, Times New Roman " << QString("Times New Roman"); -- cgit v0.12 From ad46e77420449ede2cb6c1ea2a810a2614520db9 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 2 Jun 2009 16:09:58 +0200 Subject: BT: Remove duplicate code and fix font parsing. QFont has a feature that you can pass a comma-separated list and it will walk through the list and match the font that it hits first. There's a nice static function that X11 and Windows uses, but the Mac was using an older copied version of it. This old version didn't handle quoting which is what happens in the style sheet. So, using the same code makes everything work well. As a bonus, Creator looks correct again. Reviewed-by: Simon Hausmann --- src/gui/text/qfontdatabase.cpp | 2 +- src/gui/text/qfontdatabase_mac.cpp | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index c3fc9f5..5fb294f 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -827,6 +827,7 @@ static void getEngineData(const QFontPrivate *d, const QFontCache::Key &key) d->engineData->ref.ref(); } } +#endif static QStringList familyList(const QFontDef &req) { @@ -855,7 +856,6 @@ static QStringList familyList(const QFontDef &req) return family_list; } -#endif Q_GLOBAL_STATIC(QFontDatabasePrivate, privateDb) Q_GLOBAL_STATIC_WITH_ARGS(QMutex, fontDatabaseMutex, (QMutex::Recursive)) diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp index 80ddbd5..26d8687 100644 --- a/src/gui/text/qfontdatabase_mac.cpp +++ b/src/gui/text/qfontdatabase_mac.cpp @@ -281,14 +281,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) } //find the font - QStringList family_list = req.family.split(QLatin1Char(',')); - // append the substitute list for each family in family_list - { - QStringList subs_list; - for(QStringList::ConstIterator it = family_list.constBegin(); it != family_list.constEnd(); ++it) - subs_list += QFont::substitutes(*it); - family_list += subs_list; - } + QStringList family_list = familyList(req); const char *stylehint = styleHint(req); if (stylehint) -- cgit v0.12 From a5b11b9031f9a2a97b65e9a6134244249845491a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Jun 2009 16:29:57 +0200 Subject: Avoid a crash when setting a focus in a widget hierarchy containing both visible and invisible widgets. This is a quick hack to avoid a crash in Qt when setting a focus on a visible widget that has invisible parent. Proper fix was committed into master 1a7da7096bbda17197738061902f4489af234bc0, see it's description for more details. Task-number: 254563 Reviewed-by: Thierry Bastian --- src/gui/kernel/qwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index bbf6758..baf3278 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5804,8 +5804,9 @@ void QWidget::setFocus(Qt::FocusReason reason) void QWidget::clearFocus() { QWidget *w = this; - while (w && w->d_func()->focus_child == this) { - w->d_func()->focus_child = 0; + while (w) { + if (w->d_func()->focus_child == this) + w->d_func()->focus_child = 0; w = w->parentWidget(); } #ifndef QT_NO_GRAPHICSVIEW -- cgit v0.12