qt:cutterpillows-qt-iphone-clone.git
8 years agoSmall optimisation in QFontMetrics multi-length-string 4.6-stable
Olivier Goffart [Tue, 15 Sep 2009 08:04:16 +0000 (10:04 +0200)]
Small optimisation in QFontMetrics multi-length-string

Change the len instead of copying the string.
Idea from Warwick

Reviewed-by: Warwick Allison
8 years agoImplemented the SAVE_TARGET in QClipboard on X11
Denis Dzyubenko [Tue, 15 Sep 2009 17:46:01 +0000 (19:46 +0200)]
Implemented the SAVE_TARGET in QClipboard on X11

Added support for the simpliest SAVE_TARGET mechanizm allowing us to
work nicely with clipboard managers, so that when Qt application that
owns the clipboard exits we delegate the content to the clipboard
manager if there is one.

The current implementation doesn't specify which targets to give to
the manager, so it will try to fetch as much as possible.  Also, right
now we do not support the TARGET_SIZES target, meaning that the
manager doesn't know how much data it is going to fetch, so it will
try to fetch everything even if it can take a lot of time.

Reviewed-by: Bradley T. Hughes
8 years agoAdded support for subpixel antialiasing on text in the GL2 engine.
Kim Motoyoshi Kalland [Tue, 8 Sep 2009 12:30:19 +0000 (14:30 +0200)]
Added support for subpixel antialiasing on text in the GL2 engine.

The antialiasing is currently not gamma corrected.

Reviewed-by: Samuel
8 years agoSeparate the copy of JavaScriptCore that QtScript uses from the copy that
Simon Hausmann [Wed, 16 Sep 2009 07:51:00 +0000 (09:51 +0200)]
Separate the copy of JavaScriptCore that QtScript uses from the copy that
QtWebKit uses.

This is needed to decouple QtScript from QtWebKit, as discussed in the
WebKit team.

Reviewed-by: Kent Hansen
8 years agoqdoc: Added the "All Functions" link back into the header.
Martin Smith [Wed, 16 Sep 2009 07:55:52 +0000 (09:55 +0200)]
qdoc: Added the "All Functions" link back into the header.

8 years agoHide getStaticMetaObject() on platforms without Q_NO_DATA_RELOCATION
Shane Kearns [Wed, 16 Sep 2009 07:10:34 +0000 (09:10 +0200)]
Hide getStaticMetaObject() on platforms without Q_NO_DATA_RELOCATION

getStaticMetaObject() is a workaround for linkage problems on symbian
platform, so it does not exist on other platforms.
This change makes the forward declaration inside Q_OBJECT only present
when Q_NO_DATA_RELOCATION is defined

Reviewed-by: axis
8 years agodoc: Fixed some qdoc errors.
Martin Smith [Wed, 16 Sep 2009 06:54:20 +0000 (08:54 +0200)]
doc: Fixed some qdoc errors.

8 years agoMerge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Gunnar Sletta [Wed, 16 Sep 2009 06:52:46 +0000 (08:52 +0200)]
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoFixed glsl warnings on mac and stop using texturecoords when not needed
Gunnar Sletta [Wed, 16 Sep 2009 06:18:10 +0000 (08:18 +0200)]
Fixed glsl warnings on mac and stop using texturecoords when not needed

The setTextureCoordsEnabled was enabled in two places, but never disabled
causing it to always be used. When using a varying in a vertex shader
and not using it again in the fragment shader this produces a warning,
and rightly so. Since the property is 100% detectable based on the
fragment shader used, move the logic into the shader selection code
and kill the property all together. This should also speed up
solid filling a bit...

8 years agoReduce overhead of paint engine-specific pixmap filters
Rhys Weatherley [Wed, 16 Sep 2009 01:46:41 +0000 (11:46 +1000)]
Reduce overhead of paint engine-specific pixmap filters

Engine-specific pixmap filters were being created, used, and destroyed
every time draw() was called on QPixmapColorizeFilter, QPixmapBlurFilter,
and so on.  This had a heavy performance penalty and made it difficult
for the GL paint engine to cache shaders from one request to the next.

A generic filter can request an engine-specific filter that matches its
parameters.  The engine can either create a new one or return a previously
allocated filter object.

Ownership of engine-specific pixmap filter objects is moved to the
paint engine itself.

Reviewed-by: Andrew den Exter
Reviewed-by: Michael Brasser
Reviewed-by: Michael Goddard
Reviewed-by: Sarah Smith
8 years agoMerge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Rhys Weatherley [Wed, 16 Sep 2009 01:13:21 +0000 (11:13 +1000)]
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoFix crash in QVGSharedContext shutdown
Rhys Weatherley [Wed, 16 Sep 2009 01:11:41 +0000 (11:11 +1000)]
Fix crash in QVGSharedContext shutdown

The reference count was reducing down to zero during paint engine
cleanup when we weren't ready to destroy the context.  Artificially
increase it to prevent the early context destroy.

Reviewed-by: Sarah Smith
8 years agoFix QLineEdit drag'n'drop
Alan Alpert [Tue, 15 Sep 2009 23:52:04 +0000 (09:52 +1000)]
Fix QLineEdit drag'n'drop

QLineEdit shouldn't have been moving the text cursor while dragging.

Task-number: 260457
Reviewed-by: mbm
8 years agoMerge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Alan Alpert [Tue, 15 Sep 2009 23:45:32 +0000 (09:45 +1000)]
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoFix QLineEdit::setPalette
Alan Alpert [Tue, 15 Sep 2009 23:43:45 +0000 (09:43 +1000)]
Fix QLineEdit::setPalette

QLineControl has a separate palette that wasn't getting updated.

Task-number: 261239
Reviewed-by: mbm
8 years agoOnly regenerate pixmap filter source if the parameters have changed.
Rhys Weatherley [Tue, 15 Sep 2009 23:31:01 +0000 (09:31 +1000)]
Only regenerate pixmap filter source if the parameters have changed.

Reviewed-by: trustme
8 years agoRemove unnecessary definitions in GL pixmap filter code.
Rhys Weatherley [Tue, 15 Sep 2009 22:55:41 +0000 (08:55 +1000)]
Remove unnecessary definitions in GL pixmap filter code.

The code does not use QGLShader directly any more.

Reviewed-by: trustme
8 years agoFix glMatrixMode() arguments for desktop OpenGL
Rhys Weatherley [Tue, 15 Sep 2009 22:40:46 +0000 (08:40 +1000)]
Fix glMatrixMode() arguments for desktop OpenGL

The defines are GL_MODELVIEW/GL_PROJECTION, not GL_MODELVIEW_MATRIX/etc.
The _MATRIX defines are for fetching the matrix, not setting it.

Reviewed-by: trustme
8 years agoCompilation fix for OpenGL/ES 2.0
Rhys Weatherley [Tue, 15 Sep 2009 22:31:47 +0000 (08:31 +1000)]
Compilation fix for OpenGL/ES 2.0

Matrix functions do not exist under OpenGL/ES 2.0.

Reviewed-by: trustme
8 years agoExport a function for getting a IDirectFBWindow
Anders Bakken [Tue, 15 Sep 2009 18:28:07 +0000 (11:28 -0700)]
Export a function for getting a IDirectFBWindow

This function is only exported when DirectFB is built into QtGui.

Reviewed-by: Donald Carr <donald.carr@nokia.com>
8 years agoExport two functions for getting a surface in dfb
Anders Bakken [Mon, 14 Sep 2009 18:02:11 +0000 (11:02 -0700)]
Export two functions for getting a surface in dfb

When building DirectFB as part of QtGui and not as a plugin this patch
will export two global functions for getting a surface given a widget.

Reviewed-by: Donald Carr <donald.carr@nokia.com>
8 years agoFix a bug in surfaceForWidget
Anders Bakken [Mon, 14 Sep 2009 18:23:09 +0000 (11:23 -0700)]
Fix a bug in surfaceForWidget

I had the logic of the assert wrong with the isAncestorOf call.

Reviewed-by: Donald Carr <donald.carr@nokia.com>
8 years agoStabilize tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup
Olivier Goffart [Tue, 15 Sep 2009 15:48:12 +0000 (17:48 +0200)]
Stabilize tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup

8 years agoSlightly better code for the test.
Alexis Menard [Tue, 15 Sep 2009 16:41:51 +0000 (18:41 +0200)]
Slightly better code for the test.

Then the test doesn't leak.

Reviewed-by:ogoffart

8 years agoFix macplist autotest
João Abecasis [Tue, 15 Sep 2009 16:04:55 +0000 (18:04 +0200)]
Fix macplist autotest

This goes to show that once a test is running no one will look at the
results...

8 years agoDoc: Added missing files for the Designer manual.
David Boddie [Tue, 15 Sep 2009 15:49:37 +0000 (17:49 +0200)]
Doc: Added missing files for the Designer manual.

Reviewed-by: Trust Me
Overcomplicated-workflow-by: Git
8 years agoDoc: Created a new Drawing Utility Functions page.
David Boddie [Tue, 15 Sep 2009 15:21:24 +0000 (17:21 +0200)]
Doc: Created a new Drawing Utility Functions page.

Reviewed-by: Trust Me
Inspired-by: Olivier Goffart's earlier change
Pain-by: Git
8 years agoDoc: Cleaned up the Designer main window and Embedded Linux pages.
David Boddie [Tue, 15 Sep 2009 15:17:07 +0000 (17:17 +0200)]
Doc: Cleaned up the Designer main window and Embedded Linux pages.

Reviewed-by: Trust Me
8 years agoIncreasing a timeout on QProcess tests
João Abecasis [Tue, 15 Sep 2009 15:01:18 +0000 (17:01 +0200)]
Increasing a timeout on QProcess tests

Not a proper fix, but let's see if this increases reliability of the
results.

8 years agoI don't think this was intentional...
João Abecasis [Thu, 10 Sep 2009 16:31:39 +0000 (18:31 +0200)]
I don't think this was intentional...

Wonder how it survived for so long.

Reviewed-by: Peter Hartmann
8 years agoIncreased performance of blurpicker example with GL 2 engine.
Samuel Rødal [Tue, 15 Sep 2009 13:11:01 +0000 (15:11 +0200)]
Increased performance of blurpicker example with GL 2 engine.

Slightly increase threshold for when to shrink an FBO, and reduce the
number of calls to glBindFramebuffer.

Reviewed-by: Tom
8 years agoFix QGraphicsView::scrollAfterResize autotest on Mac.
Alexis Menard [Tue, 15 Sep 2009 11:29:04 +0000 (13:29 +0200)]
Fix QGraphicsView::scrollAfterResize autotest on Mac.

The auto-test was failing because it calculate the scrollbar indent
using style primitives. It's very fragile and doesn't work on MacOS
style (and may not work on other style too). Since we don't test style
stuff here, we can just apply the plastique style for this test.

Reviewed-by:TrustMe

8 years agoChange compile options for configure so it can be built using msvc2008
Shane Kearns [Tue, 15 Sep 2009 12:53:43 +0000 (14:53 +0200)]
Change compile options for configure so it can be built using msvc2008

Use the -MT command line option so it links statically with libc.
The reason for this is that not all windows versions have the DLL
"out of the box".

Reviewed-by: Marius Storm-Olsen
8 years agoQCursor support for Symbian OS
Shane Kearns [Tue, 15 Sep 2009 12:12:08 +0000 (14:12 +0200)]
QCursor support for Symbian OS

Reviewed-By: Jason Barron
Reviewed-By: Alessandro Portale
    Summary:
    QT_NO_CURSOR is now not defined for symbian builds
    Existing QCursor APIs are all supported
    New public API, QApplication::setNavigationMode, to allow the navigation
    mode to be set. I.E. on an S60 3.2 phone, some applications will want a
    virtual mouse cursor (web browser), while others are designed for keypad
    navigation.
    Symbian HAL is used for detecting input capabilities.

    Fix DND, code cleanup & comment

    QCursor visibility now uses a refcount, and is called from DND and the
    setNavigationMode so they are both simpler and don't interfere with each
    other.

    QApplication::setNavigationMode

    New public API for configuring cursor/keypad navi style.
    This links in with ongoing work on the 4-way keypad navi branch, but
    2-way and 4-way modes both act as 2-way mode until that is integrated
    Some of the demos/examples have cursor switched on (those that were not
    usable with keypad)

    Virtual mouse support for non touch, non mouse phones (tested on N78)

    add *.d and .metadata (carbide debug file / workspace dir) to .gitignore

    System pointers are unavailable when using sprite workaround, so the
    system cursor shapes are compiled into qtgui as resources.
    MAC port does this also for shapes that aren't standard on the MAC.

    Refactor Drag'n'Drop to use QCursor

    Add test case to check all system cursor shapes

    Simply a mainwindow containing a label widget for each cursor shape,
    with the cursor property set appropriately

    QCursor(QBitmap,QBitmap) supported

    Fixed problem with the image & mask being inverted when using the
    QCursor constructor that takes two mono bitmaps.

    add .make.cache files to .gitignore

    Correct implementation of QApplication::setOverrideCursor

    QApplication::restoreOverrideCursor and QApplication::setOverrideCursor
    are now working correctly on Symbian platform.
    Performance will be slower compared with other platforms, because the
    Symbian window server has a cursor associated with each native window.

    Add test case for custom cursors

    Create a pixmap cursor and associate it with a widget.
    No changes to production code, since test passed 1st time ;)

    Add manual test for QCursor

    Make cursor independent of construction order

    Updated to work around window server issue where contruction order
    affects what cursor is displayed in child windows.
    Also changed to effectiveWinId following review comments
    Also fixed a problem which would make qcursor not link if configured
    with QT_NO_CURSOR

    Moved some multiply declared extern functions from cpp to _p.h files
    Implemented Symbian versions of the cursor functions.

    Merged in work I'd done based on tower.
    Fill in bits of stub functions based on windows port

    Removed QT_NO_CURSOR from list of config options forced on symbian
    Recompiled configure.exe
    Added stub functions for the missing functions in s60 port

8 years agoSilenced GLSL compiler warning on Mac OS X
Gunnar Sletta [Tue, 15 Sep 2009 12:17:22 +0000 (14:17 +0200)]
Silenced GLSL compiler warning on Mac OS X

8 years agoMake the scrollUpdate test function work.
Jan-Arve Sæther [Tue, 15 Sep 2009 13:23:07 +0000 (15:23 +0200)]
Make the scrollUpdate test function work.

We could sometimes have more than two paint events even before reaching
QTRY_COMPARE, thus it would fail.
The test failed on Windows.

8 years agoFix a bug in FocusScopes; ensure subFocus is set correctly.
Andreas Aardal Hanssen [Tue, 15 Sep 2009 13:12:52 +0000 (15:12 +0200)]
Fix a bug in FocusScopes; ensure subFocus is set correctly.

The bug was triggered by setting focus on a parent scope (which then
passes focus to the innermost scope). Subfocus was set up for the
first scope, but not the inner scopes.

Reviewed-by: TrustMe
8 years agoRemove unused signal declaration.
Andreas Aardal Hanssen [Tue, 15 Sep 2009 13:02:36 +0000 (15:02 +0200)]
Remove unused signal declaration.

This came in with change c8bf9bd17a4520eefe4306b7b1bb4f93fb296d80, by
accident - it was a leftover after debugging.

Reviewed-by: Martin Smith
8 years agoRemoved a debug output that was a bit annoying
Thorbjørn Lindeijer [Tue, 15 Sep 2009 13:07:57 +0000 (15:07 +0200)]
Removed a debug output that was a bit annoying

Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
8 years agodoc: Fixed some qdoc errors.
Martin Smith [Tue, 15 Sep 2009 12:55:13 +0000 (14:55 +0200)]
doc: Fixed some qdoc errors.

8 years agoWhen parsing a java file do not simply ignore the first character.
Jan-Arve Sæther [Tue, 15 Sep 2009 12:33:18 +0000 (14:33 +0200)]
When parsing a java file do not simply ignore the first character.

If the file started with a comment (/* .. */) the parser would not see
the first '/' character, thus it would not treat it as a comment.

This was because we called getChar() just before we called parse(),
and just after we had entered parse().

8 years agoFix linenumbers.
Jan-Arve Sæther [Tue, 15 Sep 2009 12:32:40 +0000 (14:32 +0200)]
Fix linenumbers.

8 years agoRemoved GL1 pixmap filters and ported colorize filter to GL2 engine.
Samuel Rødal [Tue, 15 Sep 2009 12:19:57 +0000 (14:19 +0200)]
Removed GL1 pixmap filters and ported colorize filter to GL2 engine.

The GL1 engine will use the raster fall back for pixmap filters. We
anyhow use GLSL for the filters, which requires OpenGL 2 support, and in
that case the GL2 engine is the default.

Reviewed-by: Gunnar Sletta
8 years agoQNativeSocketEngine on Windows: don't bail out on non-fatal error
Peter Hartmann [Tue, 15 Sep 2009 11:04:11 +0000 (13:04 +0200)]
QNativeSocketEngine on Windows: don't bail out on non-fatal error

receiving the WSAEMSGSIZE error means we could not read all the data
because the buffer was too small, but still we should return the number
of bytes read and not return -1

Reviewed-by: Marius Storm-Olsen
8 years agoDon't do pixel tests in QGraphicsEffect on other than 32-bit display.
Ariya Hidayat [Tue, 15 Sep 2009 10:14:03 +0000 (12:14 +0200)]
Don't do pixel tests in QGraphicsEffect on other than 32-bit display.

Reviewed-by: Paul Olav Tvete
8 years agoFix ambiguous overload for QTileRules constructor
Olivier Goffart [Tue, 15 Sep 2009 12:19:43 +0000 (14:19 +0200)]
Fix ambiguous overload for QTileRules constructor

Also fix the relations in the documentation

Reviewed-by: David Boddie
8 years agoDoc: Added some snippets to the multimedia audio docs.
Geir Vattekar [Tue, 15 Sep 2009 11:01:45 +0000 (13:01 +0200)]
Doc: Added some snippets to the multimedia audio docs.

8 years agoMade QGraphicsBlurEffect use the high blur quality setting.
Samuel Rødal [Tue, 15 Sep 2009 10:35:17 +0000 (12:35 +0200)]
Made QGraphicsBlurEffect use the high blur quality setting.

This greatly increases the blur quality in the OpenGL implementation,
and doesn't affect the performance of the raster implementation.

Reviewed-by: Bjørn Erik Nilsen
8 years agoFixed QLineEdit to pass the tst_QLineEdit::displayText() autotest.
Kim Motoyoshi Kalland [Tue, 15 Sep 2009 10:32:42 +0000 (12:32 +0200)]
Fixed QLineEdit to pass the tst_QLineEdit::displayText() autotest.

Fetch the correct password character from the style.

Reviewed-by: Olivier
8 years agoFixed rendering errors in blurpicker with -graphicssystem opengl
Samuel Rødal [Tue, 15 Sep 2009 10:27:37 +0000 (12:27 +0200)]
Fixed rendering errors in blurpicker with -graphicssystem opengl

1) Need to transfer to brush drawing mode when switching active engine,
to make sure we reset the vertex / texture coordinate pointers for image
drawing.

2) QGLPixmapGLPaintDevice::beginPaint() was changed to use
QGLContext::drawTexture() for blitting the old texture contents to the
render FBO, which means that we also need to set up viewport, modelview,
and projection matrices, and ensure that clipping / stencil testing
is disabled.

3) Make sure stencil testing is disabled when clearing the FBO.

Reviewed-by: Tom
8 years agodoc: Fixed some qdoc errors.
Martin Smith [Tue, 15 Sep 2009 10:05:50 +0000 (12:05 +0200)]
doc: Fixed some qdoc errors.

8 years agoExport again qt_set_sequence_auto_mnemonic
Olivier Goffart [Tue, 15 Sep 2009 10:02:19 +0000 (12:02 +0200)]
Export again qt_set_sequence_auto_mnemonic

Became unexported from commit bcd23411c8

Task-number: 261250

8 years agoMake test pass on Windows
Paul Olav Tvete [Tue, 15 Sep 2009 09:44:42 +0000 (11:44 +0200)]
Make test pass on Windows

Reviewed-by: Jan-Arve
8 years agoMake the test work with shadow builds.
Paul Olav Tvete [Tue, 15 Sep 2009 09:13:23 +0000 (11:13 +0200)]
Make the test work with shadow builds.

Reviewed-by: Jesper
8 years agoSupport for focus scopes: QGraphicsItem::ItemIsFocusScope.
Andreas Aardal Hanssen [Fri, 11 Sep 2009 12:10:12 +0000 (14:10 +0200)]
Support for focus scopes: QGraphicsItem::ItemIsFocusScope.

This feature is essential for Declarative UI, but does not add much
value for C++ developers. A FocusScope provides a stack of focused
widgets, and it ensures that the topmost item on the stack has
focus if any of the items in the stack gains focus. When the topmost
loses focus, focus is passed to the "parent" focus scope, and so on.

You can get almost the same behavior using panels (ItemIsPanel),
except panels impose other behavior, like stopping clickfocus
propagation, and stopping event propagation in general. In a QML
world you would typically use FocusScope for controlling focus
locally, and panels when you need to maintain separate focus stacks.

Reviewed-by: akennedy
8 years agoFix bugs in handling of initial focus.
Andreas Aardal Hanssen [Fri, 11 Sep 2009 07:30:53 +0000 (09:30 +0200)]
Fix bugs in handling of initial focus.

Make sure you can't set focus on an inactive scene, allow items
with subfocus to gain focus even if added to a scene that's not
active, and finally ensure that activating a panel in an active,
but unfocused scene, gives focus to the scene.

Also added a test that checks adding normal vs. panel items to an
active vs. inactive scene, and what happens if you initially say
the item should have focus.

Reviewed-by: TrustMe
8 years agoRemove this line; which no longer has any effect.
Andreas Aardal Hanssen [Fri, 11 Sep 2009 07:18:49 +0000 (09:18 +0200)]
Remove this line; which no longer has any effect.

This line was added to fix crashes when deleting items that had
a subFocusItem pointing to a child that was already deleted. This
bug was fixed by ebb1162f54a29baeccb71d1e283146892629518f. After
this, subFocusItem is always 0 at this point.

The original change was eb3d5a73148cd7206c6b3b6672ed47b44611f745.

Reviewed-by: TrustMe
8 years agoFix tst_QWidget::inputFocus_task257832 on Windows
Jan-Arve Sæther [Tue, 15 Sep 2009 09:01:59 +0000 (11:01 +0200)]
Fix tst_QWidget::inputFocus_task257832 on Windows

The widget must be created before calling QInputContext::setFocusWidget.
Otherwise we run into an assertion. Yes, this only occurs in debug
configuration but its still annoying...

Cherry-pick of commit d6b8f81a2440e7a507ecbb1becd90ef284510787 from master.

Reviewed-by: thartman
Conflicts:

tests/auto/qwidget/tst_qwidget.cpp

8 years agoFix auto-test in QGraphicsItem.
Alexis Menard [Tue, 15 Sep 2009 08:49:45 +0000 (10:49 +0200)]
Fix auto-test in QGraphicsItem.

8 years agoBauhaus widgetbox drag and drop not working in Cocoa
Prasanth Ullattil [Tue, 15 Sep 2009 08:39:05 +0000 (10:39 +0200)]
Bauhaus widgetbox drag and drop not working in Cocoa

Bauhaus uses grabMouse to implement their own Drag and Drop mechanism.
Cocoa port never considered the grabber widget. All the mouse events
will now be routed to the mouse grabber widget.

Task-number: 261245
Reviewed-by: MortenS
8 years agoAdded support in qimagereader to base plugin selection on stream content
Gunnar Sletta [Tue, 15 Sep 2009 07:48:43 +0000 (09:48 +0200)]
Added support in qimagereader to base plugin selection on stream content

Reviewed-by: Trond
8 years agoTest if the direction influences the returned graphics anchor object.
Jan-Arve Sæther [Tue, 15 Sep 2009 08:08:25 +0000 (10:08 +0200)]
Test if the direction influences the returned graphics anchor object.

Pointed out by Caio.

8 years agoMerge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Rhys Weatherley [Tue, 15 Sep 2009 07:38:40 +0000 (17:38 +1000)]
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoDon't round-trip to GL server for glGetError() in release mode.
Rhys Weatherley [Tue, 15 Sep 2009 07:36:51 +0000 (17:36 +1000)]
Don't round-trip to GL server for glGetError() in release mode.

Reviewed-by: Samuel
Reviewed-by: Tom Cooksey
8 years agoFix update issues in QGraphicsView.
Alexis Menard [Tue, 15 Sep 2009 07:22:11 +0000 (09:22 +0200)]
Fix update issues in QGraphicsView.

The bug appeared only when calling collidingItems right after setPos.
When calling setPos on a parent the sceneTransform is mark as dirty, so
when we paint the parent and its children if the scene transform of the
parent was dirty then we update all children sceneTransform. In our
case here, collidingItems call ensureTransform on one of the children
which go recursively to the top most dirty item and update the
sceneTransform. The problem is that all sibling children are not mark
their sceneTransform dirty so next paint will skip them (since the parent
is not dirty anymore).

Task-number:260711
Reviewed-by:bnilsen

8 years agoqdoc: Shift snippets in QGLShaderProgram out into doc/src/snippets
Rhys Weatherley [Tue, 15 Sep 2009 06:28:19 +0000 (16:28 +1000)]
qdoc: Shift snippets in QGLShaderProgram out into doc/src/snippets

8 years agoMerge commit 'origin/4.5' into 4.6
Bill King [Mon, 14 Sep 2009 23:59:35 +0000 (09:59 +1000)]
Merge commit 'origin/4.5' into 4.6

8 years agoFixes QSqlTableModel: trying to delete the wrong row.
Bill King [Mon, 14 Sep 2009 06:45:26 +0000 (16:45 +1000)]
Fixes QSqlTableModel: trying to delete the wrong row.

Uses the primary key from the index in the query, not the resulting
location in the modified dataset.

Task-number: 222678

8 years agoFixes crash when calling numRows on unknown query type (ibase)
Bill King [Mon, 14 Sep 2009 06:39:26 +0000 (16:39 +1000)]
Fixes crash when calling numRows on unknown query type (ibase)

Reviewed-by: Justin McPherson
8 years agoRemove spurious, wrong semi-colon
Thiago Macieira [Mon, 14 Sep 2009 18:46:25 +0000 (20:46 +0200)]
Remove spurious, wrong semi-colon

There should be no semi-colon after Q_DISABLE_COPY.

Reviewed-By: Trust Me
8 years agoFix closing the menu of a QMenuBar with the mouse
Olivier Goffart [Mon, 14 Sep 2009 16:53:49 +0000 (18:53 +0200)]
Fix closing the menu of a QMenuBar with the mouse

Ammend commit 41dbc4406 and 21cf7b4c431742

We do not always get the mouseReleaseEvent (because the popups grabs the
mouse.  So set mouseDown to false in the mouseMoveEvent if no buttons are
pressed.

We also need to call setCurrentAction(0) in the case we are hovering on
the empty area with no popup open.  (in otder to remove the highlight)

The code is now much closer to the code before the two previous commit

Reviewed-by: Prasanth
8 years agoMerge branch '4.5' into 4.6
Thiago Macieira [Mon, 14 Sep 2009 17:07:36 +0000 (19:07 +0200)]
Merge branch '4.5' into 4.6

8 years agoMake qtest_gui.h define QT_GUI_LIB to enable GUI tests.
Thiago Macieira [Mon, 14 Sep 2009 16:51:07 +0000 (18:51 +0200)]
Make qtest_gui.h define QT_GUI_LIB to enable GUI tests.

This also creates a new header called QtTest/QtTestGui. This header is
not supported. You should #include <QtTest/QtTest>. But if you're
using a build system that is not qmake, QT_GUI_LIB isn't defined, so
it's possibly easier to #include this new header.

Reviewed-by: Trust Me
8 years agoMove the QT_GUI_LIB check to qtestevent.h instead of qtestmouse.h.
Thiago Macieira [Mon, 14 Sep 2009 16:49:23 +0000 (18:49 +0200)]
Move the QT_GUI_LIB check to qtestevent.h instead of qtestmouse.h.

This allows #including qtestmouse.h and qtestkeyboard directly to get
mouse testing. All QtTest headers are still unsupported (you should
always include QtTest/QtTest) but we can still fix issues like this.

I have verified with the preprocessor that no GUI code is enabled by
including QtTest if QT_GUI_LIB isn't defined. This should not bring
the MinGW autotest failures back that the a250ca3a3c0 commit was
trying to fix.

Reviewed-by: Trust Me
8 years agoAdd an example that shows strength animation QGraphicsColorizeEffect.
Ariya Hidayat [Sun, 13 Sep 2009 16:28:45 +0000 (18:28 +0200)]
Add an example that shows strength animation QGraphicsColorizeEffect.

When a button is pressed, a popup message is shown and the background
(everything, every items, behind the popup message) is faded to light
green.

Reviewed-by: Bjørn Erik Nilsen
8 years agoFixed gradient referencing in SVGs.
Kim Motoyoshi Kalland [Mon, 14 Sep 2009 15:50:30 +0000 (17:50 +0200)]
Fixed gradient referencing in SVGs.

An SVG element can now reference a gradient or solid-color defined
anywhere in the same SVG file.

Task-number: 245602
Reviewed-by: Trond
8 years agoAdd filter strength to QGraphics[Colorize,Grayscale]Effect.
Ariya Hidayat [Mon, 14 Sep 2009 14:14:54 +0000 (16:14 +0200)]
Add filter strength to QGraphics[Colorize,Grayscale]Effect.

Autotest: included
Reviewed-by: Bjørn Erik Nilsen
8 years agoAdd simple autotest for QGraphicsColorizeEffect.
Ariya Hidayat [Mon, 14 Sep 2009 14:09:47 +0000 (16:09 +0200)]
Add simple autotest for QGraphicsColorizeEffect.

Reviewed-by: Bjørn Erik Nilsen
8 years agoAdd simple autotest for QGraphicsGrayscaleEffect.
Ariya Hidayat [Mon, 14 Sep 2009 13:47:06 +0000 (15:47 +0200)]
Add simple autotest for QGraphicsGrayscaleEffect.

Reviewed-by: Bjørn Erik Nilsen
8 years agoQSslCertificate autotest: allow test from shadow directory
Peter Hartmann [Mon, 14 Sep 2009 14:36:39 +0000 (16:36 +0200)]
QSslCertificate autotest: allow test from shadow directory

Reviewed-by: TrustMe
8 years agoReally fixed clipping bug in portedcanvas with -graphicssystem opengl.
Samuel Rødal [Mon, 14 Sep 2009 14:36:10 +0000 (16:36 +0200)]
Really fixed clipping bug in portedcanvas with -graphicssystem opengl.

Change c72eaee91136bbe1a9fa99cdb0a7593bec60264b was wrong, we should
call ensureActive(), not syncState().

Task-number: 261113
Reviewed-by: Trond
8 years agoIf the font does not exist, then the right bearing becomes to big
Jørgen Lind [Mon, 14 Sep 2009 13:37:02 +0000 (15:37 +0200)]
If the font does not exist, then the right bearing becomes to big

In the QPF1 engine if the font does not exist, then the default
constructor of glyph_metrics_t is used which sets the x and y values to
the unlikely value of 100000. These glyph_metrics_t instances are not
suppose to be used in the text layout calculations.

Task-number: pending

8 years agoFixed clipping bug in GL 2 engine.
Samuel Rødal [Mon, 14 Sep 2009 13:25:07 +0000 (15:25 +0200)]
Fixed clipping bug in GL 2 engine.

When dumping the rectangle clip to the depth buffer due to needing to
intersect with a more complex clip, we didn't take into consideration
that writeClip will transform the path by the current matrix, whereas
the rectangle clip is in device coordinates. Thus, we need to map the
path by the inverse matrix.

Task-number: 260701
Reviewed-by: Trond
8 years agoMerge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Ariya Hidayat [Mon, 14 Sep 2009 13:15:58 +0000 (15:15 +0200)]
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoAdd strength factor to the colorize filter.
Ariya Hidayat [Mon, 14 Sep 2009 10:24:33 +0000 (12:24 +0200)]
Add strength factor to the colorize filter.

To allow fading between the original and the colorized version of the
pixmaps, a new strength factor is introduced, 0.0 means the filter
has no effect at all, 1.0 means full colorization.

Still missing is the non-raster implementation.

Autotest: included
Reviewed-by: Bjørn Erik Nilsen
8 years agoBring back the blurry drop shadow in the lighting example.
Ariya Hidayat [Mon, 14 Sep 2009 10:40:32 +0000 (12:40 +0200)]
Bring back the blurry drop shadow in the lighting example.

Reviewed-by: Bjørn Erik Nilsen
8 years agoSystem locale on Mac returns preferred language/country from sys prefs.
con [Mon, 14 Sep 2009 12:59:45 +0000 (14:59 +0200)]
System locale on Mac returns preferred language/country from sys prefs.

Previously it always returned the C locale's language, which is of not
much help for an application.

Reviewed-by: Morten Sorvig <msorvig@trolltech.com>
8 years agoFixed clipping bug in portedcanvas with -graphicssystem opengl
Samuel Rødal [Mon, 14 Sep 2009 13:00:39 +0000 (15:00 +0200)]
Fixed clipping bug in portedcanvas with -graphicssystem opengl

We need to call ensureActive() when save() is called, to make sure
systemStateChanged() gets called and updates the scissorTestEnabled
flag, so that we don't lose it on the next restore().

Task-number: 261113
Reviewed-by: Trond
8 years agoEnsured that we use GL 1 engine when -graphicssystem opengl1 is used.
Samuel Rødal [Mon, 14 Sep 2009 13:00:15 +0000 (15:00 +0200)]
Ensured that we use GL 1 engine when -graphicssystem opengl1 is used.

Reviewed-by: Trond
8 years agoImplement synthetic enter/leave events for QWS.
Paul Olav Tvete [Mon, 14 Sep 2009 12:23:06 +0000 (14:23 +0200)]
Implement synthetic enter/leave events for QWS.

QWS uses alien widgets too, so we need the same logic as the other
platforms.

Reviewed-by: bnilsen
8 years agoWorkaround QWS Enter/Leave problem.
Paul Olav Tvete [Mon, 14 Sep 2009 12:15:20 +0000 (14:15 +0200)]
Workaround QWS Enter/Leave problem.

Reviewed-by: bnilsen
8 years agoFixed off-by-one error in call to XGetKeyboardMapping that meant that max_keycode...
Thomas Sondergaard [Mon, 14 Sep 2009 12:33:39 +0000 (14:33 +0200)]
Fixed off-by-one error in call to XGetKeyboardMapping that meant that max_keycode wasn't retrieved.

Merge-request: 1308
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
8 years agoAPI change. This will get rid of the ugly setAnchorSpacing() method.
Jan-Arve Sæther [Fri, 11 Sep 2009 10:34:08 +0000 (12:34 +0200)]
API change. This will get rid of the ugly setAnchorSpacing() method.

Say hello to QGraphicsAnchor, move the spacing (and removeAnchor)
functionality over to that class.

This also opens up for a cleaner API when we add support for size
policies or min/pref/max sizes for anchors.

Also remove
 - addLeftAndRightAnchors()
 - addTopAndBottomAnchors()
 - addAllAnchors()

in favor of
 - addAnchors(itemA, itemB, Qt::Orientations)

API change discussed with Caio and Andreas.

Reviewed-by: Alexis
8 years agoFix QMenuBar hover effect.
Olivier Goffart [Mon, 14 Sep 2009 12:04:48 +0000 (14:04 +0200)]
Fix QMenuBar hover effect.

Regression introduced by commit 21cf7b4c431742

Task-number: 261199
Reviewed-by: Prasanth
8 years agoDoc: Fixed grammar.
David Boddie [Mon, 14 Sep 2009 11:22:27 +0000 (13:22 +0200)]
Doc: Fixed grammar.

Reviewed-by: Trust Me
8 years agoDoc: Ongoing improvements.
David Boddie [Mon, 14 Sep 2009 11:19:33 +0000 (13:19 +0200)]
Doc: Ongoing improvements.

Reviewed-by: Trust Me
8 years agoFix RTL text alignment in QComboBox items with SH_ComboBox_Popup
Eskil Abrahamsen Blomfeldt [Mon, 14 Sep 2009 10:59:39 +0000 (12:59 +0200)]
Fix RTL text alignment in QComboBox items with SH_ComboBox_Popup

Change 93ba0035f4eadfaf7217d95f18a442d418a064b8 removed truncation of
a listview item's bounding rect to the viewport as documented in the
commit log. An unwanted result was that the style option passed to the
item delegates would sometimes contain a rectangle which was larger than
the delegated area. The direct result was that a QComboBox drawn with a
style with the SH_Combobox_Popup style hint in an RTL language would
align its item text to the right edge of a rectangle which was wider
than the popup menu, and thus only part of the text would be visible.

Task-number: 260974
Reviewed-by: Olivier
8 years agoFixed a typo found during translation
Jure Repinc [Wed, 19 Aug 2009 10:01:40 +0000 (12:01 +0200)]
Fixed a typo found during translation

8 years agoMerge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Gunnar Sletta [Mon, 14 Sep 2009 10:16:55 +0000 (12:16 +0200)]
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6

8 years agoDon't call into paint engines when we don't have pens and brushes
Gunnar Sletta [Mon, 14 Sep 2009 09:25:11 +0000 (11:25 +0200)]
Don't call into paint engines when we don't have pens and brushes

Reviewed-by: sroedal