From 991b6bc973238a6fd73c4c71e7c642b8cc455df3 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 4 Sep 2009 11:06:08 +0200 Subject: Fix a regression with QListView::setRowHidden() when a root index is set When setRowHidden() was called after a root index was set then it would not actually hide the row, if a root index is not set then it worked fine. Task-number: 260879 Reviewed-by: Jan-Arve --- src/gui/itemviews/qlistview.cpp | 8 ++++---- tests/auto/qlistview/tst_qlistview.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 35b44b4..1212194 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -549,16 +549,16 @@ void QListView::setRowHidden(int row, bool hide) const bool hidden = d->isHidden(row); if (d->viewMode == ListMode) { if (hide && !hidden) - d->hiddenRows.append(d->model->index(row, 0)); + d->hiddenRows.append(d->model->index(row, 0, rootIndex())); else if (!hide && hidden) - d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0))); + d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0, rootIndex()))); d->doDelayedItemsLayout(); } else { if (hide && !hidden) { d->dynamicListView->removeItem(row); - d->hiddenRows.append(d->model->index(row, 0)); + d->hiddenRows.append(d->model->index(row, 0, rootIndex())); } else if (!hide && hidden) { - d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0))); + d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0, rootIndex()))); d->dynamicListView->insertItem(row); } if (d->resizeMode == Adjust) diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index b52bef0..27c6a05 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -417,6 +417,18 @@ void tst_QListView::hideRows() view.setRowHidden(0, false); QVERIFY(!view.isRowHidden(0)); + QStandardItemModel sim(0); + QStandardItem *root = new QStandardItem("Root row"); + for (int i=0;i<5;i++) + root->appendRow(new QStandardItem(QString("Row %1").arg(i))); + sim.appendRow(root); + view.setModel(&sim); + view.setRootIndex(root->index()); + QVERIFY(!view.isRowHidden(0)); + view.setRowHidden(0, true); + QVERIFY(view.isRowHidden(0)); + view.setRowHidden(0, false); + QVERIFY(!view.isRowHidden(0)); } -- cgit v0.12 From 818ddd1409c3fb9fdb3ff3ff2f2f8c933c6f66cf Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 4 Sep 2009 11:43:29 +0200 Subject: Small corrections in the documentation 1. "is is" -> "it is" 2. remove excess use of the work "unexpected" --- src/gui/kernel/qevent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a61b6fa..0b282bc 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3648,13 +3648,13 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \i As mentioned above, enabling touch events means multiple widgets can be receiving touch events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents, this gives you great flexibility in designing multi-touch user interfaces. Be aware of the - implications. For example, is is possible that the user is moving a QSlider with one finger and + implications. For example, it is possible that the user is moving a QSlider with one finger and pressing a QPushButton with another. The signals emitted by these widgets will be interleaved. \i Recursion into the event loop using one of the exec() methods (e.g., QDialog::exec() or QMenu::exec()) in a QTouchEvent event handler is not supported. Since there are multiple event - recipients, unexpected recursion may cause problems, including but not limited to lost events + recipients, recursion may cause problems, including but not limited to lost events and unexpected infinite recursion. \i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an -- cgit v0.12 From 41b52eb4ad4f19221577059ce1447121e757b112 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Sep 2009 11:44:08 +0200 Subject: qtdemo now accept the -verbose option as specified in the help output. Reviewed-by: trustme --- demos/qtdemo/colors.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index e63417c..455ba0c 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -274,6 +274,8 @@ void Colors::parseArgs(int argc, char *argv[]) + "[-low] [-ticker-letters] [-ticker-speed] [-no-ticker-morph] " + "[-ticker-morph-speed] [-ticker-text]"); exit(0); + } else if (s == "-verbose") { + // this option was already handled above } else{ QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); exit(0); -- cgit v0.12 From 19a65fca4af242269b354f82212556f88eb03eaa Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 4 Sep 2009 12:05:41 +0200 Subject: fix text eliding for arabic and syriac Arabic and Syriac are connected scripts where the letter shape changes depending on the context. Text eliding should not affect that letter shape if the truncation happens in the middle of a word. The patch ensures that by adding a Unicode ZWJ character between the text and the eliding in case the character would connect in the full string. Reviewed-by: Simon Hausmann --- src/gui/text/qtextengine.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2b84c6c..ba9145e 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2245,6 +2245,28 @@ void QTextEngine::indexAdditionalFormats() } } +/* These two helper functions are used to determine whether we need to insert a ZWJ character + between the text that gets truncated and the ellipsis. This is important to get + correctly shaped results for arabic text. +*/ +static bool nextCharJoins(const QString &string, int pos) +{ + while (pos < string.length() && string.at(pos).category() == QChar::Mark_NonSpacing) + ++pos; + if (pos == string.length()) + return false; + return string.at(pos).joining() != QChar::OtherJoining; +} + +static bool prevCharJoins(const QString &string, int pos) +{ + while (pos > 0 && string.at(pos - 1).category() == QChar::Mark_NonSpacing) + --pos; + if (pos == 0) + return false; + return (string.at(pos - 1).joining() == QChar::Dual || string.at(pos - 1).joining() == QChar::Center); +} + QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags) const { // qDebug() << "elidedText; available width" << width.toReal() << "text width:" << this->width(0, layoutData->string.length()).toReal(); @@ -2345,6 +2367,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak < layoutData->string.length() && currentWidth < availableWidth); + if (nextCharJoins(layoutData->string, pos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(pos) + ellipsisText; } else if (mode == Qt::ElideLeft) { QFixed currentWidth; @@ -2362,6 +2387,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak > 0 && currentWidth < availableWidth); + if (prevCharJoins(layoutData->string, pos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return ellipsisText + layoutData->string.mid(pos); } else if (mode == Qt::ElideMiddle) { QFixed leftWidth; @@ -2391,6 +2419,11 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int && nextRightBreak > 0 && leftWidth + rightWidth < availableWidth); + if (nextCharJoins(layoutData->string, leftPos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + if (prevCharJoins(layoutData->string, rightPos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(leftPos) + ellipsisText + layoutData->string.mid(rightPos); } -- cgit v0.12 From 39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 4 Sep 2009 11:44:03 +0200 Subject: Fixed once-in-a-while failing tst_QGraphicsItem::selected test. Added event information in QTest::mouse* warning message. Reviewed-by: Olivier --- src/testlib/qtestmouse.h | 7 +++++-- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 9d23c8b..665b784 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -67,6 +67,7 @@ QT_MODULE(Test) namespace QTest { enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDClick, MouseMove }; + const char *mouseActionNames[] = { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) @@ -113,8 +114,10 @@ namespace QTest QTEST_ASSERT(false); } QSpontaneKeyEvent::setSpontaneous(&me); - if (!qApp->notify(widget, &me)) - QTest::qWarn("Mouse event not accepted by receiving widget"); + if (!qApp->notify(widget, &me)) { + QString warning("Mouse event \"%1\" not accepted by receiving widget"); + QTest::qWarn(warning.arg(mouseActionNames[static_cast(action)]).toAscii().data()); + } } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index aa1f2b8..408decc 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -1239,6 +1239,7 @@ void tst_QGraphicsItem::selected() QVERIFY(!item->isSelected()); // Click inside and check that it's selected + QTest::mouseMove(view.viewport()); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos())); QCOMPARE(item->values.size(), 11); QCOMPARE(item->values.last(), true); @@ -1246,7 +1247,6 @@ void tst_QGraphicsItem::selected() // Click outside and check that it's not selected QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos() + QPointF(item->boundingRect().width(), item->boundingRect().height()))); - QCOMPARE(item->values.size(), 12); QCOMPARE(item->values.last(), false); QVERIFY(!item->isSelected()); -- cgit v0.12 From 3944904b361b5a585a6e07bf17528d4739caed39 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 4 Sep 2009 12:17:34 +0200 Subject: Doc: Review of docs for QGraphicsItem::ItemUsesExtendedStyleOption. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: 253733 Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b7c2e26..cdcb0c4 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -303,13 +303,17 @@ drop shadow effects and for decoration objects that follow the parent item's geometry without drawing on top of it. - \value ItemUsesExtendedStyleOption The item makes use of either the - exposedRect or matrix member of the QStyleOptionGraphicsItem. Implementers - of QGraphicsItem subclasses should set that flag if this data is required. - By default, the exposedRect is initialized to the item's boundingRect and - the matrix is untransformed. Enable this flag for more fine-grained values. - Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() for a more - fine-grained value. + \value ItemUsesExtendedStyleOption The item makes use of either + \l{QStyleOptionGraphicsItem::}{exposedRect} or + \l{QStyleOptionGraphicsItem::}{matrix} in QStyleOptionGraphicsItem. By default, + the \l{QStyleOptionGraphicsItem::}{exposedRect} is initialized to the item's + boundingRect() and the \l{QStyleOptionGraphicsItem::}{matrix} is untransformed. + You can enable this flag for the style options to be set up with more + fine-grained values. + Note that QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag + and always initialized to 1. Use + QStyleOptionGraphicsItem::levelOfDetailFromTransform() if you need a higher + value. \value ItemHasNoContents The item does not paint anything (i.e., calling paint() on the item has no effect). You should set this flag on items that -- cgit v0.12 From 228153b29c3e235fa5d40ff09f8403fa2e8f7226 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 29 Jan 2009 16:07:27 +0100 Subject: Fix oversize-buffer support for aligning. Since Vector initialises VectorBase with the value of inlineBuffer(), it does so before the m_inlineBuffer member has had a chance to initialise. This lead to dereferencing of uninitialised pointers and, as was expected, crashes. --- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index e3cb718..11c20a9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -67,10 +67,11 @@ namespace WTF { template struct AlignedBuffer { AlignedBufferChar oversizebuffer[size + 64]; - AlignedBufferChar *buffer; - inline AlignedBuffer() : buffer(oversizebuffer) + AlignedBufferChar *buffer() { - buffer += 64 - (reinterpret_cast(buffer) & 0x3f); + AlignedBufferChar *ptr = oversizebuffer; + ptr += 64 - (reinterpret_cast(ptr) & 0x3f); + return ptr; } }; #endif @@ -440,7 +441,11 @@ namespace WTF { using Base::m_capacity; static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T); + #ifdef WTF_ALIGNED T* inlineBuffer() { return reinterpret_cast(m_inlineBuffer.buffer); } + #else + T* inlineBuffer() { return reinterpret_cast(m_inlineBuffer.buffer()); } + #endif AlignedBuffer m_inlineBuffer; }; -- cgit v0.12 From 6f1ff47beeee6a6af489df58813ebd87237c93b0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 23 Jul 2009 16:55:01 +0200 Subject: Fix linking with SunCC 5.9: de-inline the operator new and delete in ParserArenaDeletable. If you mark functions as "inline", the compiler doesn't have to emit out-of-line copies. What happens is that Nodes.h declares these functions, but the inline bodies are in NodeConstructors.h. ParserArena.cpp used these functions, but didn't include NodeConstructor.h. I could have added the missing #include, but this is error-prone, since you have to remember to do that. Moving the bodies into Nodes.h was also not possible, because it requires JSC::Parser to be defined and Parser.h needs to #include "Nodes.h". So the solution is to de-inline. --- .../webkit/JavaScriptCore/parser/NodeConstructors.h | 17 ----------------- .../webkit/JavaScriptCore/parser/ParserArena.cpp | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h index c256190..a4374d3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h @@ -27,23 +27,6 @@ namespace JSC { - inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) - { - ParserArenaDeletable* deletable = static_cast(fastMalloc(size)); - globalData->parser->arena().deleteWithArena(deletable); - return deletable; - } - - inline void* ParserArenaDeletable::operator new(size_t size) - { - return fastMalloc(size); - } - - inline void ParserArenaDeletable::operator delete(void* p) - { - fastFree(p); - } - inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData) { globalData->parser->arena().derefWithArena(adoptRef(this)); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp index 2617506..78c5196 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp @@ -24,6 +24,7 @@ */ #include "config.h" +#include "Parser.h" #include "ParserArena.h" #include "Nodes.h" @@ -57,4 +58,21 @@ void ParserArena::reset() m_refCountedObjects.shrink(0); } +void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) +{ + ParserArenaDeletable* deletable = static_cast(fastMalloc(size)); + globalData->parser->arena().deleteWithArena(deletable); + return deletable; +} + +void* ParserArenaDeletable::operator new(size_t size) +{ + return fastMalloc(size); +} + +void ParserArenaDeletable::operator delete(void* p) +{ + fastFree(p); +} + } -- cgit v0.12 From b9fdc5636c166e26195d783378ff4da43b755bc5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 19 Jul 2009 15:14:06 +0200 Subject: Fix compilation error on Solaris: mmap/munmap take/return a char*, not void*. "../JavaScriptCore/interpreter/RegisterFile.h", line 128: Error: Using static_cast to convert from char* to JSC::Register* not allowed. Error: Formal argument 1 of type char* in call to munmap(char*, unsigned) is being passed JSC::Register*. --- src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 06ddefc..29a13ca 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -34,7 +34,7 @@ namespace JSC { RegisterFile::~RegisterFile() { #if HAVE(MMAP) - munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); + munmap(reinterpret_cast(m_buffer), ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); #elif HAVE(VIRTUALALLOC) VirtualFree(m_buffer, 0, MEM_RELEASE); #else diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 5a34d11..14e189e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -105,7 +105,7 @@ namespace JSC { ReturnValueRegister = -4, ArgumentCount = -3, Callee = -2, - OptionalCalleeArguments = -1, + OptionalCalleeArguments = -1 }; enum { ProgramCodeThisRegister = -CallFrameHeaderSize - 1 }; @@ -174,7 +174,7 @@ namespace JSC { size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); #if HAVE(MMAP) - m_buffer = static_cast(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); + m_buffer = reinterpret_cast(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); if (m_buffer == MAP_FAILED) { #if PLATFORM(WINCE) fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); -- cgit v0.12 From bd3c95917dfe2c2740403176935bf84ada9df403 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Jul 2009 14:18:35 +0200 Subject: Fix compilation with Sun CC 5.9: moving elements in a vector requires source not to be const I don't know why the compiler couldn't call src->~T() on a const T *src, but fact is it couldn't. In any case, since move is copying the source and deleting it, formally the argument shouldn't be const anyway. --- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index 11c20a9..7decc4a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -129,7 +129,7 @@ namespace WTF { template struct VectorMover { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { while (src != srcEnd) { new (dst) T(*src); @@ -138,7 +138,7 @@ namespace WTF { ++src; } } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { if (src > dst) move(src, srcEnd, dst); @@ -157,11 +157,11 @@ namespace WTF { template struct VectorMover { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { memcpy(dst, src, reinterpret_cast(srcEnd) - reinterpret_cast(src)); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { memmove(dst, src, reinterpret_cast(srcEnd) - reinterpret_cast(src)); } @@ -254,12 +254,12 @@ namespace WTF { VectorInitializer::needsInitialization, VectorTraits::canInitializeWithMemset, T>::initialize(begin, end); } - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { VectorMover::canMoveWithMemcpy, T>::move(src, srcEnd, dst); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { VectorMover::canMoveWithMemcpy, T>::moveOverlapping(src, srcEnd, dst); } -- cgit v0.12 From 37b26723280e7fbda5fb3a5960105eda25f5c53f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Sep 2009 14:06:41 +0200 Subject: Remove comma at end of enum. Some compilers are more picky than others. Conflicts: src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h --- src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h | 2 +- src/3rdparty/webkit/WebCore/bridge/npapi.h | 3 ++- src/3rdparty/webkit/WebCore/dom/ExceptionCode.h | 2 +- src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h | 2 +- src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h | 2 +- src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h | 2 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 2 +- src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h | 2 +- src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h | 2 +- src/3rdparty/webkit/WebCore/platform/ScrollTypes.h | 4 ++-- src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h | 2 +- src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h | 2 +- src/3rdparty/webkit/WebCore/platform/text/StringImpl.h | 2 +- src/3rdparty/webkit/WebCore/platform/text/TextCodec.h | 2 +- src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderLayer.h | 2 +- 19 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h index 12291cc..070b76c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h @@ -41,7 +41,7 @@ namespace WTF { enum MessageQueueWaitResult { MessageQueueTerminated, // Queue was destroyed while waiting for message. MessageQueueTimeout, // Timeout was specified and it expired. - MessageQueueMessageReceived, // A message was successfully received and returned. + MessageQueueMessageReceived // A message was successfully received and returned. }; template diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 07fed86..2ff657e 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -350,9 +350,10 @@ typedef enum { NPPVpluginWantsAllNetworkStreams = 18, /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ - NPPVpluginCancelSrcStream = 20, + NPPVpluginCancelSrcStream = 20 #ifdef XP_MACOSX + , /* Used for negotiating drawing models */ NPPVpluginDrawingModel = 1000, /* Used for negotiating event models */ diff --git a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h index 58b18e2..08bffa6 100644 --- a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h +++ b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h @@ -57,7 +57,7 @@ namespace WebCore { NETWORK_ERR = 19, ABORT_ERR = 20, URL_MISMATCH_ERR = 21, - QUOTA_EXCEEDED_ERR = 22, + QUOTA_EXCEEDED_ERR = 22 }; enum ExceptionType { diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h index 3f8febc..f95f0045 100644 --- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h +++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h @@ -45,7 +45,7 @@ namespace WebCore { enum MessageDestination { InspectorControllerDestination, - ConsoleDestination, + ConsoleDestination }; class ScriptExecutionContext { diff --git a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h index 5b732dc..b8b137d 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h +++ b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h @@ -32,7 +32,7 @@ namespace WebCore { enum EditorInsertAction { EditorInsertActionTyped, EditorInsertActionPasted, - EditorInsertActionDropped, + EditorInsertActionDropped }; } // namespace diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h index cc3627d..fdd854c 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h @@ -275,7 +275,7 @@ enum CSSPropertyID { CSSPropertyGlyphOrientationVertical = 1268, CSSPropertyKerning = 1269, CSSPropertyTextAnchor = 1270, - CSSPropertyWritingMode = 1271, + CSSPropertyWritingMode = 1271 }; const int firstCSSProperty = 1001; diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h index 58bf2c0..c41e491 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h @@ -355,7 +355,7 @@ namespace WebCore { enum LocalLoadPolicy { AllowLocalLoadsForAll, // No restriction on local loads. AllowLocalLoadsForLocalAndSubstituteData, - AllowLocalLoadsForLocalOnly, + AllowLocalLoadsForLocalOnly }; static void setLocalLoadPolicy(LocalLoadPolicy); static bool restrictAccessToLocal(); diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h index c264b47..b3823ba 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h @@ -42,7 +42,7 @@ namespace WebCore { enum PolicyAction { PolicyUse, PolicyDownload, - PolicyIgnore, + PolicyIgnore }; enum FrameLoadType { diff --git a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h index 4a6bc9e..d9701b7 100644 --- a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h +++ b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h @@ -81,7 +81,7 @@ namespace WebCore { AltKey = 1 << 0, CtrlKey = 1 << 1, MetaKey = 1 << 2, - ShiftKey = 1 << 3, + ShiftKey = 1 << 3 }; Type type() const { return m_type; } diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h index eba9055..b0df470 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h +++ b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h @@ -53,7 +53,7 @@ namespace WebCore { enum ScrollbarControlStateMask { ActiveScrollbarState = 1, EnabledScrollbarState = 1 << 1, - PressedScrollbarState = 1 << 2, + PressedScrollbarState = 1 << 2 }; enum ScrollbarPart { @@ -67,7 +67,7 @@ namespace WebCore { ForwardButtonEndPart = 1 << 6, ScrollbarBGPart = 1 << 7, TrackBGPart = 1 << 8, - AllParts = 0xffffffff, + AllParts = 0xffffffff }; enum ScrollbarButtonsPlacement { diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h index 8b770a1..a3a0493 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h @@ -150,7 +150,7 @@ protected: enum RepetitionCountStatus { Unknown, // We haven't checked the source's repetition count. Uncertain, // We have a repetition count, but it might be wrong (some GIFs have a count after the image data, and will report "loop once" until all data has been decoded). - Certain, // The repetition count is known to be correct. + Certain // The repetition count is known to be correct. }; BitmapImage(NativeImagePtr, ImageObserver* = 0); diff --git a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h index 9c2a9d7..494e2bb 100644 --- a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h +++ b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h @@ -52,7 +52,7 @@ namespace WebCore { DisposeNotSpecified, // Leave frame in framebuffer DisposeKeep, // Leave frame in framebuffer DisposeOverwriteBgcolor, // Clear frame to transparent - DisposeOverwritePrevious, // Clear frame to previous framebuffer contents + DisposeOverwritePrevious // Clear frame to previous framebuffer contents }; #if PLATFORM(SKIA) typedef uint32_t PixelData; diff --git a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h index 9a73cff..b7d4574 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h @@ -46,7 +46,7 @@ enum ProtectionSpaceAuthenticationScheme { ProtectionSpaceAuthenticationSchemeHTTPDigest = 3, ProtectionSpaceAuthenticationSchemeHTMLForm = 4, ProtectionSpaceAuthenticationSchemeNTLM = 5, - ProtectionSpaceAuthenticationSchemeNegotiate = 6, + ProtectionSpaceAuthenticationSchemeNegotiate = 6 }; class ProtectionSpace { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h index c99be54..b8a8cbb 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h @@ -56,7 +56,7 @@ namespace WebCore { enum CacheStoragePolicy { StorageAllowed, StorageAllowedInMemoryOnly, - StorageNotAllowed, + StorageNotAllowed }; class ResourceHandleClient { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h index 2d87d6e..740ebed 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h @@ -41,7 +41,7 @@ namespace WebCore { UseProtocolCachePolicy, // normal load ReloadIgnoringCacheData, // reload ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data - ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache + ReturnCacheDataDontLoad // results of a post - allow stale data and only use cache }; const int unspecifiedTimeoutInterval = INT_MAX; diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h index 38439ed..4325925 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h @@ -199,7 +199,7 @@ private: enum StringImplFlags { HasTerminatingNullCharacter, - InTable, + InTable }; unsigned m_length; diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h index 3c74165..36d7c6e 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h +++ b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h @@ -51,7 +51,7 @@ namespace WebCore { // Encodes the character as en entity as above, but escaped // non-alphanumeric characters. This is used in URLs. // For example, U+6DE would be "%26%231758%3B". - URLEncodedEntitiesForUnencodables, + URLEncodedEntitiesForUnencodables }; typedef char UnencodableReplacementArray[32]; diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h index b652c6e..8183050 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h @@ -45,7 +45,7 @@ namespace WebCore { PluginQuirkDontClipToZeroRectWhenScrolling = 1 << 9, PluginQuirkDontSetNullWindowHandleOnDestroy = 1 << 10, PluginQuirkDontAllowMultipleInstances = 1 << 11, - PluginQuirkRequiresGtkToolKit = 1 << 12, + PluginQuirkRequiresGtkToolKit = 1 << 12 }; class PluginQuirkSet { diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h index 1772c66..541002f 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h @@ -298,7 +298,7 @@ public: enum UpdateLayerPositionsFlag { DoFullRepaint = 1, CheckForRepaint = 1 << 1, - UpdateCompositingLayers = 1 << 2, + UpdateCompositingLayers = 1 << 2 }; typedef unsigned UpdateLayerPositionsFlags; void updateLayerPositions(UpdateLayerPositionsFlags = DoFullRepaint | UpdateCompositingLayers); -- cgit v0.12 From fd348f0cc28db4a20b06102b419139c0f1473aec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Sep 2009 14:07:49 +0200 Subject: Fix compilation with Sun CC 5.9: ambiguity in ?: Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr" and third operand of type "int" can be converted to one another. Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr" and third operand of type "int" can be converted to one another. [and others similar] Conflicts: src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp --- .../webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 2 +- src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp | 2 +- src/3rdparty/webkit/WebCore/editing/markup.cpp | 2 +- src/3rdparty/webkit/WebCore/html/HTMLParser.cpp | 4 ++-- src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp | 2 +- .../webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp | 2 +- src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp | 2 +- src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp | 6 +++--- src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp | 2 +- src/3rdparty/webkit/WebCore/page/DOMWindow.cpp | 2 +- src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp | 4 ++-- src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGElement.cpp | 2 +- src/3rdparty/webkit/WebCore/workers/Worker.cpp | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index ce5518f..711beb4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -521,7 +521,7 @@ PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr