diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-21 05:21:50 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-21 05:21:50 (GMT) |
commit | 656933462ccc4db33d92145c13d9b3d63d638775 (patch) | |
tree | 43b507a9bba41d288f709fc56489e6063959b01c /src | |
parent | 0cd3de1e75a39b00243894f23650092a41c3ed63 (diff) | |
parent | 947b30973c53c3dc336aafc5352c13a2a660e32e (diff) | |
download | Qt-656933462ccc4db33d92145c13d9b3d63d638775.zip Qt-656933462ccc4db33d92145c13d9b3d63d638775.tar.gz Qt-656933462ccc4db33d92145c13d9b3d63d638775.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Updates changes-4.7.0
Fixes the Oracle nchar bug when NLS_CHARSET is different with NLS_NCHAR_CHARSET.
Add a missing file in the config.test for SSE 4.2
Remove the masking when computing qAlpha()
Add support for more vector instructions on x86
Workaround gcc bug, disable test with old version of gcc
Do not crash due to a infinite recursion when using voiceover on MacOS
doc: Fix qdoc errors for text related files
QGraphicsItem: Animation leaves drawing artifacts when clipping is used.
moc: Slot with complex template default value does not compile
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/corelib.pro | 15 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 7 | ||||
-rw-r--r-- | src/gui/gui.pro | 5 | ||||
-rw-r--r-- | src/gui/painting/qrgb.h | 2 | ||||
-rw-r--r-- | src/gui/text/qstatictext.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qtextobject.cpp | 2 | ||||
-rw-r--r-- | src/plugins/accessible/widgets/qaccessiblewidgets.cpp | 4 | ||||
-rw-r--r-- | src/sql/drivers/oci/qsql_oci.cpp | 34 | ||||
-rw-r--r-- | src/tools/moc/moc.cpp | 22 |
9 files changed, 85 insertions, 10 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index dba2a42..bbf445f 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -66,6 +66,21 @@ sse { sse2 { DEFINES += QT_HAVE_SSE2 } +sse3 { + DEFINES += QT_HAVE_SSE3 +} +ssse3 { + DEFINES += QT_HAVE_SSSE3 +} +sse4_1 { + DEFINES += QT_HAVE_SSE4_1 +} +sse4_2 { + DEFINES += QT_HAVE_SSE4_2 +} +avx { + DEFINES += QT_HAVE_AVX +} iwmmxt { DEFINES += QT_HAVE_IWMMXT } diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 4bc7f4c..48a0093 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5178,7 +5178,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool // Process children. if (itemHasChildren && item->d_ptr->dirtyChildren) { const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape; - if (itemClipsChildrenToShape) { + // Items with no content are threated as 'dummy' items which means they are never drawn and + // 'processed', so the painted view bounding rect is never up-to-date. This means that whenever + // such an item changes geometry, its children have to take care of the update regardless + // of whether the item clips children to shape or not. + const bool bypassUpdateClip = !itemHasContents && wasDirtyParentViewBoundingRects; + if (itemClipsChildrenToShape && !bypassUpdateClip) { // Make sure child updates are clipped to the item's bounding rect. for (int i = 0; i < views.size(); ++i) views.at(i)->d_func()->setUpdateClip(item); diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 41f1904..3aee078 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -84,6 +84,11 @@ contains(QMAKE_MAC_XARCH, no) { 3dnow:DEFINES += QT_HAVE_3DNOW sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT sse2:DEFINES += QT_HAVE_SSE2 + sse3:DEFINES += QT_HAVE_SSE3 + ssse3:DEFINES += QT_HAVE_SSSE3 + sse4_1:DEFINES += QT_HAVE_SSE4_1 + sse4_2:DEFINES += QT_HAVE_SSE4_2 + avx:DEFINES += QT_HAVE_AVX iwmmxt:DEFINES += QT_HAVE_IWMMXT win32-g++*|!win32:!*-icc* { diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h index 8e635a8..ea5f353 100644 --- a/src/gui/painting/qrgb.h +++ b/src/gui/painting/qrgb.h @@ -64,7 +64,7 @@ Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB { return (rgb & 0xff); } Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA -{ return ((rgb >> 24) & 0xff); } +{ return rgb >> 24; } Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value { return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index ab518d0..f6daed8 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -148,9 +148,7 @@ QStaticText::QStaticText() } /*! - Constructs a QStaticText object with the given \a text and bounded by the given \a size. - - If an invalid size is passed for \a size the text will be unbounded. + Constructs a QStaticText object with the given \a text. */ QStaticText::QStaticText(const QString &text) : data(new QStaticTextPrivate) diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index f386871..5fb3384 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1148,7 +1148,7 @@ int QTextBlock::charFormatIndex() const direction from the blocks content. Returns either Qt::LeftToRight or Qt::RightToLeft. - \sa QTextBlock::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection + \sa QTextFormat::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection */ Qt::LayoutDirection QTextBlock::textDirection() const { diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index 499eb1d..662663d 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -984,7 +984,7 @@ int QAccessibleDockWidget::childCount() const int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const { if (child) { - if (qobject_cast<QDockWidget *>(child->object()) == dockWidget() && child->role(0) == TitleBar) { + if (child->role(0) == TitleBar) { return 1; } else { return 2; //### @@ -1214,7 +1214,7 @@ int QAccessibleTitleBar::childAt(int x, int y) const QObject *QAccessibleTitleBar::object() const { - return m_dockWidget; + return 0; } QDockWidgetLayout *QAccessibleTitleBar::dockWidgetLayout() const diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index c56b995..e11cf75 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -93,8 +93,17 @@ enum { QOCIEncoding = 2002 }; // AL16UTF16LE enum { QOCIEncoding = 2000 }; // AL16UTF16 #endif -static const ub1 CSID_NCHAR = SQLCS_NCHAR; +// Always set the OCI_ATTR_CHARSET_FORM to SQLCS_NCHAR is safe +// because Oracle server will deal with the implicit Conversion +// Between CHAR and NCHAR. +// see: http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89857/oci05bnd.htm#422705 +static const ub1 qOraCharsetForm = SQLCS_NCHAR; + +#if defined (OCI_UTF16ID) +static const ub2 qOraCharset = OCI_UTF16ID; +#else static const ub2 qOraCharset = OCI_UCS2ID; +#endif typedef QVarLengthArray<sb2, 32> IndicatorArray; typedef QVarLengthArray<ub2, 32> SizeArray; @@ -209,12 +218,24 @@ void QOCIResultPrivate::setCharset(OCIBind* hbnd) OCI_HTYPE_BIND, // this const cast is safe since OCI doesn't touch // the charset. + const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)), + 0, + OCI_ATTR_CHARSET_FORM, + err); + if (r != 0) + qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", err); + + r = OCIAttrSet(hbnd, + OCI_HTYPE_BIND, + // this const cast is safe since OCI doesn't touch + // the charset. const_cast<void *>(static_cast<const void *>(&qOraCharset)), 0, OCI_ATTR_CHARSET_ID, err); if (r != 0) qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_ID: ", err); + } int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, int pos, @@ -939,6 +960,17 @@ void QOCICols::setCharset(OCIDefine* dfn) OCI_HTYPE_DEFINE, // this const cast is safe since OCI doesn't touch // the charset. + const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)), + 0, + OCI_ATTR_CHARSET_FORM, + d->err); + if (r != 0) + qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", d->err); + + r = OCIAttrSet(dfn, + OCI_HTYPE_DEFINE, + // this const cast is safe since OCI doesn't touch + // the charset. const_cast<void *>(static_cast<const void *>(&qOraCharset)), 0, OCI_ATTR_CHARSET_ID, diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 10a80f3..84d1567 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -1208,6 +1208,12 @@ bool Moc::until(Token target) { default: break; } } + + //when searching commas within the default argument, we should take care of template depth (anglecount) + // unfortunatelly, we do not have enough semantic information to know if '<' is the operator< or + // the begining of a template type. so we just use heuristics. + int possible = -1; + while (index < symbols.size()) { Token t = symbols.at(index++).token; switch (t) { @@ -1226,8 +1232,16 @@ bool Moc::until(Token target) { && braceCount <= 0 && brackCount <= 0 && parenCount <= 0 - && (target != RANGLE || angleCount <= 0)) + && (target != RANGLE || angleCount <= 0)) { + if (target != COMMA || angleCount <= 0) + return true; + possible = index; + } + + if (target == COMMA && t == EQ && possible != -1) { + index = possible; return true; + } if (braceCount < 0 || brackCount < 0 || parenCount < 0 || (target == RANGLE && angleCount < 0)) { @@ -1235,6 +1249,12 @@ bool Moc::until(Token target) { break; } } + + if(target == COMMA && angleCount != 0 && possible != -1) { + index = possible; + return true; + } + return false; } |