From 05fff98a2434e505ebe077ece7cb070436aae4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 24 Aug 2009 12:07:29 +0200 Subject: Fixed comment See commit ff86781b9b18ba376a8983fcb83847a09820ef79, where it becomes clear that it was meant to say 7 bits, which explains the bit about the padding bit. --- src/xmlpatterns/acceltree/qacceltree_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h index a033c15..cebc6bd 100644 --- a/src/xmlpatterns/acceltree/qacceltree_p.h +++ b/src/xmlpatterns/acceltree/qacceltree_p.h @@ -217,7 +217,7 @@ namespace QPatternist Depth m_depth; /** - * Technically it is sufficient with 8 bits. However, at least MSVC + * Technically it is sufficient with 7 bits. However, at least MSVC * 2005 miscompiles it such that QXmlNodeModelIndex::Text becomes * -64 instead of 64 with hilarious crashes as result. * -- cgit v0.12 From db0ebfd97d14bf3c537957d9642ba014318f8418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 24 Aug 2009 12:50:29 +0200 Subject: Fixed compile error with gcc 4.3.3 Don't initialize the members of BasicNodeData. They don't need to be initialized, and m_kind has no sane default value anyway. Reviewed-by: Frans Englich --- src/xmlpatterns/acceltree/qacceltree_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h index cebc6bd..d91fdf4 100644 --- a/src/xmlpatterns/acceltree/qacceltree_p.h +++ b/src/xmlpatterns/acceltree/qacceltree_p.h @@ -128,8 +128,8 @@ namespace QPatternist class BasicNodeData { public: + /* No need to initialize the members. See AccelTreeBuilder. */ inline BasicNodeData() - : m_parent(0), m_size(0), m_depth(0), m_kind(0) { } -- cgit v0.12 From 3a801a667c7c78076fc4aa84e47432ddd4a382a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Mon, 24 Aug 2009 14:00:35 +0200 Subject: Fix QCombobox popup flicker on OS Don't disable updates when showing the popup. This was introduced by commit 5516c2165, the original bug in task 152840 is not reproducible on OS X. Task-number: Reviewed-by: Richard Moe Gustavsen --- src/gui/widgets/qcombobox.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index f04a415..2b6d5dd 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -2418,7 +2418,16 @@ void QComboBox::showPopup() && !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen)) qScrollEffect(container, scrollDown ? QEffects::DownScroll : QEffects::UpScroll, 150); #endif + +// Don't disable updates on Mac OS X. Windows are displayed immediately on this platform, +// which means that the window will be visible before the call to container->show() returns. +// If updates are disabled at this point we'll miss our chance at painting the popup +// menu before it's shown, causing flicker since the window then displays the standard gray +// background. +#ifndef Q_WS_MAC container->setUpdatesEnabled(false); +#endif + container->raise(); container->show(); container->updateScrollers(); @@ -2429,7 +2438,10 @@ void QComboBox::showPopup() ? QAbstractItemView::PositionAtCenter : QAbstractItemView::EnsureVisible); +#ifndef Q_WS_MAC container->setUpdatesEnabled(updatesEnabled); +#endif + container->update(); } -- cgit v0.12 From c9d2f14b2a814fd29c858d9519e82fc5cbc2afdf Mon Sep 17 00:00:00 2001 From: mae Date: Mon, 24 Aug 2009 12:21:02 +0200 Subject: Fix QPlainTextEdit painting errors With line wrapping enabled and very large text blocks, painting errors could occur. Reviewed-by: hjk (cherry picked from commit 82dba1d346a6f4a5d2602d930e0aed75c13bcafb) --- src/gui/widgets/qplaintextedit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 384889d..267de38 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -562,13 +562,14 @@ QRectF QPlainTextEditControl::blockBoundingRect(const QTextBlock &block) const { if (!block.isValid()) return QRectF(); QRectF r = documentLayout->blockBoundingRect(currentBlock); - while (currentBlockNumber < blockNumber && offset.y() <= 2* textEdit->viewport()->height()) { + int maxVerticalOffset = r.height(); + while (currentBlockNumber < blockNumber && offset.y() - maxVerticalOffset <= 2* textEdit->viewport()->height()) { offset.ry() += r.height(); currentBlock = currentBlock.next(); ++currentBlockNumber; r = documentLayout->blockBoundingRect(currentBlock); } - while (currentBlockNumber > blockNumber && offset.y() >= -textEdit->viewport()->height()) { + while (currentBlockNumber > blockNumber && offset.y() + maxVerticalOffset >= -textEdit->viewport()->height()) { currentBlock = currentBlock.previous(); if (!currentBlock.isValid()) break; -- cgit v0.12