profile/ivi/qtbase.git
13 years agoMac: buildfix for QtPlatformsupport
Richard Moe Gustavsen [Mon, 20 Jun 2011 11:20:49 +0000 (13:20 +0200)]
Mac: buildfix for QtPlatformsupport

13 years agoDon't crash if Clipboard and Selection hold the same mimedate
Lars Knoll [Mon, 20 Jun 2011 10:10:26 +0000 (12:10 +0200)]
Don't crash if Clipboard and Selection hold the same mimedate

Cliboard and Selection can hold the same QMimeData object.
Don't delete the mimedata in this case before when clearing
only one of them.

Reviewed-by: Samuel
13 years agouse selection changed events from XFixes
Lars Knoll [Sat, 18 Jun 2011 20:50:30 +0000 (22:50 +0200)]
use selection changed events from XFixes

properly initialize the XFixes extension and then
use the selection changed events to notify
Qt apps.

Reviewed-by: Samuel
13 years agoremove postscript related files
Lars Knoll [Fri, 17 Jun 2011 13:37:37 +0000 (15:37 +0200)]
remove postscript related files

We don't support postscript in Qt 5 anymore

Reviewed-by: Gunnar
13 years agoEnhance Xcb clipboard code
Lars Knoll [Wed, 8 Jun 2011 20:00:39 +0000 (22:00 +0200)]
Enhance Xcb clipboard code

Some cleanup on the data structures.
Properly implement support for timestamps on each
selection.
Transfer selections to the clipboard manager on
exit if it exists.
Properly clear our selection when X11 asks us to
do so.

13 years agoAdd a platform API for QClipboard::ownsMode()
Lars Knoll [Wed, 8 Jun 2011 19:59:33 +0000 (21:59 +0200)]
Add a platform API for QClipboard::ownsMode()

Simply forward ownsMode() to the QPlatformClipboard.

13 years agoRestoring QT_WAYLAND_GL_SUPPORT ifdefs.
Laszlo Agocs [Mon, 20 Jun 2011 10:21:29 +0000 (12:21 +0200)]
Restoring QT_WAYLAND_GL_SUPPORT ifdefs.

13 years agoMac: build fix. Make sure Platformsupport builds as a static lib.
Richard Moe Gustavsen [Mon, 20 Jun 2011 09:57:23 +0000 (11:57 +0200)]
Mac: build fix. Make sure Platformsupport builds as a static lib.

...and not as an .app, as It did.

Rev-By: Jørgen Lind
13 years agoMake glx wayland backends working.
Laszlo Agocs [Thu, 16 Jun 2011 10:56:00 +0000 (12:56 +0200)]
Make glx wayland backends working.

13 years agoRemove leftover xkb member variable in QXcbKeyboard.
Laszlo Agocs [Fri, 17 Jun 2011 12:39:00 +0000 (14:39 +0200)]
Remove leftover xkb member variable in QXcbKeyboard.

13 years agoCompile.
Friedemann Kleint [Tue, 14 Jun 2011 07:52:10 +0000 (09:52 +0200)]
Compile.

13 years agoAutodetect the xcb backend
Jørgen Lind [Fri, 10 Jun 2011 14:05:03 +0000 (16:05 +0200)]
Autodetect the xcb backend

13 years agoUse XCB_GRAVITY_STATIC in XCB plugin for frame independent geometry.
Samuel Rødal [Fri, 10 Jun 2011 14:04:22 +0000 (16:04 +0200)]
Use XCB_GRAVITY_STATIC in XCB plugin for frame independent geometry.

13 years agoMerge branch 'refactor' of scm.dev.nokia.troll.no:qt/qtbase-staging into refactor
Jørgen Lind [Fri, 10 Jun 2011 11:35:10 +0000 (13:35 +0200)]
Merge branch 'refactor' of scm.dev.nokia.troll.no:qt/qtbase-staging into refactor

13 years agoCompile fix, and remove warnings
Jørgen Lind [Fri, 10 Jun 2011 11:26:36 +0000 (13:26 +0200)]
Compile fix, and remove warnings

13 years agoMerge remote-tracking branch 'base/master' into refactor
Jørgen Lind [Fri, 10 Jun 2011 08:50:10 +0000 (10:50 +0200)]
Merge remote-tracking branch 'base/master' into refactor

Conflicts:
examples/animation/animatedtiles/animatedtiles.pro
examples/animation/appchooser/appchooser.pro
examples/animation/moveblocks/moveblocks.pro
examples/animation/states/states.pro
examples/animation/stickman/stickman.pro
examples/dialogs/configdialog/configdialog.pro
examples/dialogs/sipdialog/sipdialog.pro
examples/dialogs/standarddialogs/standarddialogs.pro
examples/dialogs/tabdialog/tabdialog.pro
examples/draganddrop/draggableicons/draggableicons.pro
examples/draganddrop/draggabletext/draggabletext.pro
examples/draganddrop/fridgemagnets/fridgemagnets.pro
examples/draganddrop/puzzle/puzzle.pro
examples/gestures/imagegestures/imagegestures.pro
examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
examples/graphicsview/collidingmice/collidingmice.pro
examples/graphicsview/elasticnodes/elasticnodes.pro
examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
examples/itemviews/addressbook/addressbook.pro
examples/itemviews/chart/chart.pro
examples/itemviews/fetchmore/fetchmore.pro
examples/itemviews/puzzle/puzzle.pro
examples/mainwindows/menus/menus.pro
examples/painting/basicdrawing/basicdrawing.pro
examples/painting/concentriccircles/concentriccircles.pro
examples/painting/imagecomposition/imagecomposition.pro
examples/painting/painterpaths/painterpaths.pro
examples/painting/transformations/transformations.pro
examples/qtconcurrent/imagescaling/imagescaling.pro
examples/qtestlib/tutorial1/tutorial1.pro
examples/qtestlib/tutorial2/tutorial2.pro
examples/qtestlib/tutorial3/tutorial3.pro
examples/qtestlib/tutorial4/tutorial4.pro
examples/qtestlib/tutorial5/tutorial5.pro
examples/qws/dbscreen/dbscreen.pro
examples/qws/svgalib/svgalib.pro
examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
examples/statemachine/rogue/rogue.pro
examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
examples/tools/styleplugin/plugin/plugin.pro
examples/uitools/multipleinheritance/multipleinheritance.pro
examples/widgets/analogclock/analogclock.pro
examples/widgets/calculator/calculator.pro
examples/widgets/calendarwidget/calendarwidget.pro
examples/widgets/codeeditor/codeeditor.pro
examples/widgets/icons/icons.pro
examples/widgets/imageviewer/imageviewer.pro
examples/widgets/lineedits/lineedits.pro
examples/widgets/movie/movie.pro
examples/widgets/shapedclock/shapedclock.pro
examples/widgets/softkeys/softkeys.pro
examples/widgets/tetrix/tetrix.pro
src/gui/painting/qpaintengine_raster.cpp
src/gui/painting/qpaintengine_raster_p.h
src/openvg/openvg.pro
src/openvg/qpaintengine_vg_p.h
src/plugins/graphicssystems/meego/meego.pro
src/plugins/platforms/fontdatabases/basicunix/basicunix.pri

13 years agoAdded frameMargins() API and support in XCB plugin.
Samuel Rødal [Fri, 10 Jun 2011 10:40:29 +0000 (12:40 +0200)]
Added frameMargins() API and support in XCB plugin.

13 years agoCompile Windows.
Friedemann Kleint [Fri, 10 Jun 2011 08:40:52 +0000 (10:40 +0200)]
Compile Windows.

13 years agoFix QtPlatformSupport when compiling with glx and xcb
Jørgen Lind [Fri, 10 Jun 2011 08:16:18 +0000 (10:16 +0200)]
Fix QtPlatformSupport when compiling with glx and xcb

13 years agoFix versionheader name for QtPlatformSupport
Jørgen Lind [Fri, 10 Jun 2011 08:04:35 +0000 (10:04 +0200)]
Fix versionheader name for QtPlatformSupport

13 years agoidc: Do not link against QtGui.
Friedemann Kleint [Fri, 10 Jun 2011 08:03:29 +0000 (10:03 +0200)]
idc: Do not link against QtGui.

(which throws off the build order).

13 years agoRemove the platforms/install_rules directory
Jørgen Lind [Fri, 10 Jun 2011 07:54:12 +0000 (09:54 +0200)]
Remove the platforms/install_rules directory

13 years agoUpdate dependency list in xcb README
Jørgen Lind [Fri, 10 Jun 2011 07:37:17 +0000 (09:37 +0200)]
Update dependency list in xcb README

13 years agoQtPlatformSupport: A helper library for platform plugins
Jørgen Lind [Thu, 9 Jun 2011 13:56:55 +0000 (15:56 +0200)]
QtPlatformSupport: A helper library for platform plugins

QtPlatformSupport is a static library. Platform plugins are meant to
link against this library to pull in dependencies such as fontengines
and convenience functions for finding the right GL configs. The linker
will only pull in the symbols used, so the size of the library doesn't
really matter

13 years agoFontengine buildfix for xcb platform plugin.
Tapani Mikola [Fri, 10 Jun 2011 06:25:54 +0000 (09:25 +0300)]
Fontengine buildfix for xcb platform plugin.

Change-Id: Ic909e1ac08163e62634643c68862e802a016b911
Reviewed-on: http://codereview.qt.nokia.com/442
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agoActually add QEventDispatcherMac.
Morten Sorvig [Fri, 10 Jun 2011 07:17:36 +0000 (09:17 +0200)]
Actually add QEventDispatcherMac.

13 years agoQWindowContext / QWindowFormat refactor.
Samuel Rødal [Tue, 7 Jun 2011 15:25:22 +0000 (17:25 +0200)]
QWindowContext / QWindowFormat refactor.

To enable having a single GL context used for multiple drawables we need
to de-couple the context class a bit more from the window class in the
plugin API. Now contexts are created stand-alone based on a GL format
and a share context, and when calling makeCurrent() a desired surface
is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all
support this use case.

QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed
to QGuiGLFormat. We have the ability to introduce a pbuffer or similar
other offscreen GL drawable abstraction in the future.

13 years agotst_qnetworkreply: Fix divide by zero crash on MacOS X
Shane [Wed, 8 Jun 2011 16:10:19 +0000 (17:10 +0100)]
tst_qnetworkreply: Fix divide by zero crash on MacOS X

Change-Id: Ie1b6d5aa25a745eb6c16041151141efe99c051aa
Reviewed-on: http://codereview.qt.nokia.com/422
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoUse XLookupString for translating key events.
Laszlo Agocs [Thu, 9 Jun 2011 14:47:07 +0000 (16:47 +0200)]
Use XLookupString for translating key events.

There seems to be no easy equivalent in the XCB world and the
fallback we currently have is really incomplete. Hence we will
call XLookupString with a fake XKeyEvent if XCB_USE_XLIB is
enabled.

Reviewed-by: Samuel Rødal
13 years agoAllow selecting fonts with irregular style names
Jiang Jiang [Sat, 4 Jun 2011 12:47:22 +0000 (14:47 +0200)]
Allow selecting fonts with irregular style names

Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black
Condensed" can't be selected in Qt because either they don't
report correct numeric values for weight/stretch/etc. or these
values are not mapped from QFont enums in a linear way. Thus
we provide a shortcut to select these fonts with PostScript
name or full name without resorting to family name matching in
QFontDatabase (these fonts are not registered in font database
anyway). After this, we can simply use:

    QFont font("Helvetica Neue");
    font.setStyleName("UltraLight");

to select these fonts. QCoreTextFontEngineMulti matched like
this can be created directly from the CTFontRef instance
instead of creating from the font name, making this process
faster.

The commit also cleaned up the font loading process in Mac
font database a bit, moving the code for family matching into
a separate function.

Add QFontInfo::styleName() and QRawFont::styleName() to access
the resolved style name for a font.

Task-number: QTBUG-19366
Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506
Reviewed-on: http://codereview.qt.nokia.com/333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoDuplicate some harfbuzz symbols inside Qt.
Gunnar Sletta [Wed, 8 Jun 2011 11:12:21 +0000 (13:12 +0200)]
Duplicate some harfbuzz symbols inside Qt.

This is done to remove a compile-time dependency on the harfbuzz
source files inside qtbase/src/3rdparty. These are not accessible
now that QT_SOURCE_TREE is not accessible as a qmake variable
anymore.

With the refactor branch we might solve this differently, but for
now this is how we get svg and declarative to compile.

Change-Id: I5dad23f2ea1f650e2621c1c1fcf39632a3a22ae8
Reviewed-on: http://codereview.qt.nokia.com/378
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoUse homePath instead of homeDirPath
Eckhart Koppen [Thu, 9 Jun 2011 08:21:26 +0000 (11:21 +0300)]
Use homePath instead of homeDirPath

homeDirPath requires Qt 3 support, which is not enabled in all
configurations.

Change-Id: I7d51b880574021ef4569a4a2b16f06a7786dbb7d
Reviewed-on: http://codereview.qt.nokia.com/415
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
13 years agoAdd QEventDispatcherMac.
Morten Sorvig [Thu, 9 Jun 2011 09:18:27 +0000 (11:18 +0200)]
Add QEventDispatcherMac.

Create it directly in QGuiApplication for now,
later on we'll move it to the cocoa plugin.

13 years agoRemove QPlatformEventLoopIntegration.
Morten Sorvig [Thu, 9 Jun 2011 09:13:49 +0000 (11:13 +0200)]
Remove QPlatformEventLoopIntegration.

Instead we'll let the platform plugins construct
an QEventDispatcherQPA subclass. This API will be
added later on.

This temporarily breaks cocoa, uikit and opencode.

13 years agoBail out from cursor creation when malloc fails.
Laszlo Agocs [Thu, 9 Jun 2011 09:05:56 +0000 (11:05 +0200)]
Bail out from cursor creation when malloc fails.

13 years agoGet modifier mapping using standard X, no need for libxkbcommon here.
Laszlo Agocs [Thu, 9 Jun 2011 08:39:08 +0000 (10:39 +0200)]
Get modifier mapping using standard X, no need for libxkbcommon here.

Reviewed-by: Samuel Rødal
13 years agoCreate custom cursors via XRender.
Laszlo Agocs [Wed, 8 Jun 2011 15:41:12 +0000 (17:41 +0200)]
Create custom cursors via XRender.

Reviewed-by: Samuel Rødal
13 years agoAdd tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.
Pierre Rossi [Fri, 20 May 2011 12:16:33 +0000 (14:16 +0200)]
Add tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.

Task-number: QTBUG-3265

Change-Id: Id8062afe69e798e1f9cf3f4e967ae0d30c362b72
Reviewed-on: http://codereview.qt.nokia.com/411
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
13 years agoFix modules to load(qt_module) first
Marius Storm-Olsen [Wed, 8 Jun 2011 17:47:56 +0000 (12:47 -0500)]
Fix modules to load(qt_module) first

Change-Id: Iabdfffff09088243863a8661add73298ed8baaf3
Reviewed-on: http://codereview.qt.nokia.com/413
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoComplain if we don't load(qt_module) first
Marius Storm-Olsen [Wed, 8 Jun 2011 17:01:24 +0000 (12:01 -0500)]
Complain if we don't load(qt_module) first

Not having load(qt_module) first in a .pro file which later
does a load(qt_module_config) will likely overwrite
compiler/linker options in the .pro file.

This can be hard to figure out, and wasn't required before
when we used a global .qmake.cache for all modules, since
it 'preloaded' qmodule.pri file for all .pro files.

Change-Id: I8a9aa3247f938be0b3b13f8c8cc96c18a142ba7b
Reviewed-on: http://codereview.qt.nokia.com/412
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoCursor support in xcb plug-in.
Laszlo Agocs [Tue, 7 Jun 2011 13:38:45 +0000 (15:38 +0200)]
Cursor support in xcb plug-in.

Custom cursor pixmaps with depth greater than 1 are not yet supported
and will be converted to monochrome always.

Reviewed-by: Samuel Rødal
13 years agoAvoid out of bounds write
Lars Knoll [Wed, 8 Jun 2011 12:24:17 +0000 (14:24 +0200)]
Avoid out of bounds write

Reviewed-by: Samuel
13 years agoFix typo from 1835afe6
Marius Storm-Olsen [Wed, 8 Jun 2011 11:15:01 +0000 (06:15 -0500)]
Fix typo from 1835afe6

Change-Id: I99e4407bbcb82cb27057ada838d73b6582867937
Reviewed-on: http://codereview.qt.nokia.com/379
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoUndefine DrawText in qlineedit.cpp
Olli Werwolff [Wed, 8 Jun 2011 10:34:29 +0000 (12:34 +0200)]
Undefine DrawText in qlineedit.cpp

There is a #define DrawText DrawTextW in winuser.h which is included
in windows.h so that the enum value in line 1981 is seen as DrawTextW
and thus is not a valid enum value on Windows.

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agoMost checks for windows in widgets have to be ws specific
Olli Werwolff [Wed, 8 Jun 2011 09:48:38 +0000 (11:48 +0200)]
Most checks for windows in widgets have to be ws specific

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agouse correct includes in qaccessible_win.cpp/qwizard_win_p.h
Olli Werwolff [Wed, 8 Jun 2011 11:39:21 +0000 (13:39 +0200)]
use correct includes in qaccessible_win.cpp/qwizard_win_p.h

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agoDo not compile _win files when -qpa is used
Olli Werwolff [Wed, 8 Jun 2011 09:46:12 +0000 (11:46 +0200)]
Do not compile _win files when -qpa is used

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agoQTextDocumentLayout has to be exported as it is used in widgets
Olli Werwolff [Wed, 8 Jun 2011 07:36:27 +0000 (09:36 +0200)]
QTextDocumentLayout has to be exported as it is used in widgets

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agoFixed compilation with QT_NO_PRINTER
Olli Werwolff [Wed, 8 Jun 2011 07:35:38 +0000 (09:35 +0200)]
Fixed compilation with QT_NO_PRINTER

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
13 years agocosmetic changes
Lars Knoll [Wed, 8 Jun 2011 11:46:09 +0000 (13:46 +0200)]
cosmetic changes

13 years agoReorder member varibles in QGlyphRunPrivate to eliminate warning
Jiang Jiang [Wed, 8 Jun 2011 08:11:10 +0000 (10:11 +0200)]
Reorder member varibles in QGlyphRunPrivate to eliminate warning

Reviewed-by: Eskil
(cherry picked from commit 74a1135341783449970d579b273d00c837ac14b0)

Change-Id: I8e1c6bdc7f0957d8f389531f5f5682c536cdc286
Reviewed-on: http://codereview.qt.nokia.com/374
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix warning in qtextengine compilation
Jiang Jiang [Sat, 4 Jun 2011 13:53:49 +0000 (15:53 +0200)]
Fix warning in qtextengine compilation

enableHarfbuzz() should only be defined on Mac.

Reviewed-by: Eskil
(cherry picked from commit 5ce3fbb67b79c3732fd47b296ef9421398ca520c)

Change-Id: I9ecb5db49478c3f5beb5d41cf99320f0faedce2e
Reviewed-on: http://codereview.qt.nokia.com/375
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix compile when configure with no fontconfig support
Jiang Jiang [Sat, 4 Jun 2011 15:47:13 +0000 (17:47 +0200)]
Fix compile when configure with no fontconfig support

Task-number: QTBUG-19716
Reviewed-by: Eskil
(cherry picked from commit 5a598afa3f1928e9ad18257e2fa48fe3d5739917)

Change-Id: I05107970e3273fce48303c9956e1c9aa928832b9
Reviewed-on: http://codereview.qt.nokia.com/376
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix behaviour after WM_TAKE_FOCUS
Lars Knoll [Tue, 7 Jun 2011 19:53:52 +0000 (21:53 +0200)]
Fix behaviour after WM_TAKE_FOCUS

We should not call requestActivateWindow() in
reaction to WM_TAKE_FOCUS. Looks like it should
only be done if the focus should in fact go
to a modal child of the widget.

13 years agoUse Q_WIDGETS_EXPORT for widgets library
Olli Werwolff [Wed, 8 Jun 2011 07:51:07 +0000 (09:51 +0200)]
Use Q_WIDGETS_EXPORT for widgets library

Reviewed-by: Lars Knoll
13 years agoFix usage of QT_SOURCE_TREE
Marius Storm-Olsen [Tue, 7 Jun 2011 18:43:17 +0000 (13:43 -0500)]
Fix usage of QT_SOURCE_TREE

Functionality has been moved into qt_example.prf

Change-Id: I81423eb4c5645f03b131932b2d37eceee9fea086
Reviewed-on: http://codereview.qt.nokia.com/371
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agorevert accidental commit
Lars Knoll [Tue, 7 Jun 2011 14:45:28 +0000 (16:45 +0200)]
revert accidental commit

13 years agoremove unused code
Lars Knoll [Tue, 7 Jun 2011 14:44:23 +0000 (16:44 +0200)]
remove unused code

13 years agocleanups code
Lars Knoll [Tue, 7 Jun 2011 14:29:35 +0000 (16:29 +0200)]
cleanups code

Make QXcbClipboard and QXcbDrag a QXcbObject to simplify
the code.
Use the predefined atoms in xproto.h instead of our own
defines.

13 years agoImplement QDropEvent::source() again
Lars Knoll [Tue, 7 Jun 2011 13:07:44 +0000 (15:07 +0200)]
Implement QDropEvent::source() again

QDropEvent::source() now returns a QObject
instead of a widget, matching the implementation
in QDrag.

Reviewed-by: Samuel
13 years agoreset certain global variables on deletion
Lars Knoll [Tue, 7 Jun 2011 13:06:53 +0000 (15:06 +0200)]
reset certain global variables on deletion

qt_button_down needs to be reset to 0 if it
points to the widget being deleted.

Reviewed-by: Samuel
13 years agoProtect against deleted windows
Lars Knoll [Tue, 7 Jun 2011 13:04:55 +0000 (15:04 +0200)]
Protect against deleted windows

Check that the window is still there before
trying to deliver an event to it.

Reviewed-by: Samuel
13 years agoInitialize variable
Lars Knoll [Tue, 7 Jun 2011 13:04:35 +0000 (15:04 +0200)]
Initialize variable

Reviewed-by: Samuel
13 years agoFix some remaining issues with DnD
Lars Knoll [Tue, 7 Jun 2011 11:35:12 +0000 (13:35 +0200)]
Fix some remaining issues with DnD

Do not set the event mask of the window
we drop onto to NO_EVENT. Always use the
clipboards requestor window to convert
selections.

Reviewed-by: Samuel
13 years agoadd WM support class
Lars Knoll [Tue, 7 Jun 2011 08:33:23 +0000 (10:33 +0200)]
add WM support class

Add a QXcbWMSupport class to better integrate with
NET_WM compliant window managers.

Suppport NET_WM_USER_TIME on windows.

Reviewed-by: Samuel
13 years agoImplement XDnD in the xcb plugin
Lars Knoll [Sun, 5 Jun 2011 21:29:26 +0000 (23:29 +0200)]
Implement XDnD in the xcb plugin

Ported most of the code to support dragging
from qdnd_x11.cpp to xcb. Some features are still
not working 100% correct, but it's becoming
usable.

Reviewed-by: Samuel
13 years agoX11 DnD implementation
Lars Knoll [Thu, 2 Jun 2011 21:20:47 +0000 (23:20 +0200)]
X11 DnD implementation

Initial code for DnD on X11. Only Xdnd based,
Motif DnD is being ignored.

The code is currently limited to dropping
stuff onto the application. Starting drags
is not yet implemented.

Reviewed-by: Samuel
13 years agoAdd a startDrag to QPlatformDrag
Lars Knoll [Thu, 2 Jun 2011 21:19:36 +0000 (23:19 +0200)]
Add a startDrag to QPlatformDrag

This can be used to initialize data
when a drag starts. The Xdnd implementation
at least has a need for it.

Reviewed-by: Samuel
13 years agoFix regression that caused waitForXXX(-1) to fail.
Thiago Macieira [Mon, 16 May 2011 11:20:25 +0000 (13:20 +0200)]
Fix regression that caused waitForXXX(-1) to fail.

Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba
when it failed to check when msecs == -1. This manifested visibly in KDE
failing to connect to any SSL site -- kioslaves are synchronous and use
waitForXXX(-1) (in this particular case, waitForEncrypted, which calls
waitForReadyRead).

Also, take the opportunity to convert these tests in QTcpSocket to use
port 80 (a defined service in the test server) instead of port 22.

Reviewed-by: Martin Petersson
(cherry picked from commit cb5b6799333794496269aa7e6515f96c2ac96d37)

Change-Id: I256a1e138e43fd45844976fe84cd2bc938552e47
Reviewed-on: http://codereview.qt.nokia.com/359
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoCocoa: Implement raise() and lower().
Morten Sorvig [Tue, 7 Jun 2011 10:06:26 +0000 (12:06 +0200)]
Cocoa: Implement raise() and lower().

13 years agoCocoa: Implement setWindowTitle.
Morten Sorvig [Tue, 7 Jun 2011 09:12:38 +0000 (11:12 +0200)]
Cocoa: Implement setWindowTitle.

13 years agoFix Cocoa mouse position handling.
Morten Sorvig [Tue, 7 Jun 2011 08:48:21 +0000 (10:48 +0200)]
Fix Cocoa mouse position handling.

I'm not sure what "local" and "global" means for
QWindowSystemInterface::handleMouseEvent. Sending
the mouse position in window coordinates for both
works.

13 years agoAdd function QGlyphRun::setRawData()
Eskil Abrahamsen Blomfeldt [Tue, 10 May 2011 13:08:29 +0000 (15:08 +0200)]
Add function QGlyphRun::setRawData()

To provide an optimized way of constructing QGlyphRun objects with no
copying or allocation, we add function setRawData() (naming inspired by
QByteArray::setRawData()). Data retrieved from QRawFont can be passed
directly into this. The logic is now that the data pointers in
QGlyphRunPrivate should always point to the current valid data and is
what will be used in comparisons and drawing calls. The vectors are
optimizations to avoid unnecessary copying if the user wants to use
the QVector based API (which makes it easier to manage the memory.)
This reflected in the functions that return QVectors, which will
return the stored vector if and only if it is identical to the
current pointer. Otherwise we will have to copy the memory.

The internal addition operators in QGlyphRun have been removed since
they really provide no real optimization and have an unclear definition
if the two glyph runs are based on different fonts.

Reviewed-by: Jiang Jiang
(cherry picked from commit 86d88c5b719fd3d50336d9d8e7127b8045ee82ae)

Change-Id: Id5bb55ee3d93afb32ffca850f53382e856df7b3e
Reviewed-on: http://codereview.qt.nokia.com/342
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoBuildfix for Mac OS
Richard Moe Gustavsen [Mon, 6 Jun 2011 13:28:32 +0000 (15:28 +0200)]
Buildfix for Mac OS

Since 'widgets' now is a separate library outside GUI, some
previously hidden symbols now needs to be exported. This patch
will make 'widgets' build.

13 years agoAdded private header dependencies to MeeGo graphics system plugin
Eckhart Koppen [Mon, 6 Jun 2011 15:49:21 +0000 (18:49 +0300)]
Added private header dependencies to MeeGo graphics system plugin

Depends on core, gui and opengl private headers

Change-Id: If3266c3b7233bf40b5ad80a8a99fd5f2c7eafcec
Reviewed-on: http://codereview.qt.nokia.com/336
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
13 years agoMade tst_QWidget::updateWhileMinimized() pass.
Samuel Rødal [Mon, 6 Jun 2011 13:54:11 +0000 (15:54 +0200)]
Made tst_QWidget::updateWhileMinimized() pass.

This requires adding a couple of window system interface events, namely
Map, Unmap, and Expose. When a widget is minimized on X11 it is
unmapped, and thus update requests should not be delivered. Instead the
event will delivered when the widget is mapped, which causes an Expose
event to be sent. The Unmap and Expose event thus need to be handled in
QWidgetWindow, and Map is also added for the purpose of API symmetry
(and for future needs).

13 years agoFixed warning about missing return in qmessagebox.cpp
Samuel Rødal [Mon, 6 Jun 2011 13:50:40 +0000 (15:50 +0200)]
Fixed warning about missing return in qmessagebox.cpp

13 years agoUse Raster pixmaps for the EglFS plugin
Gunnar Sletta [Mon, 6 Jun 2011 12:17:14 +0000 (14:17 +0200)]
Use Raster pixmaps for the EglFS plugin

Change-Id: Id94df7b5ebe298104d05bee3ae58e06201c596f7
Reviewed-on: http://codereview.qt.nokia.com/334
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoSet visibility state.
Morten Sorvig [Mon, 6 Jun 2011 12:48:37 +0000 (14:48 +0200)]
Set visibility state.

13 years agoMake building of platform plugins indifferent if its out of source
Jørgen Lind [Mon, 6 Jun 2011 06:45:02 +0000 (08:45 +0200)]
Make building of platform plugins indifferent if its out of source

This requires some source files to be shipped with the Qt install
They are now copied into QT_INSTALL_DATA/platform

13 years agoAdded module CONFIG to uitools.
axis [Wed, 18 May 2011 13:31:52 +0000 (15:31 +0200)]
Added module CONFIG to uitools.

This seems to be necessary for installing, and has no side effects
that I can tell.

Change-Id: Ic778b8a3937621ddd401ddd83d05831460db8f39
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/236
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoMade tst_QWidget::repaintWhenChildDeleted() pass.
Samuel Rødal [Mon, 6 Jun 2011 10:37:55 +0000 (12:37 +0200)]
Made tst_QWidget::repaintWhenChildDeleted() pass.

Implement some missing functionality in QWidget::destroy().

13 years agoPrevent tst_QWidget::showAndMoveChild() from failing on KDE.
Samuel Rødal [Mon, 6 Jun 2011 10:11:07 +0000 (12:11 +0200)]
Prevent tst_QWidget::showAndMoveChild() from failing on KDE.

Since we grab the desktop the KDE task bar appears on top of the window
we're interested in. It's preferable to make the window a bit smaller.

13 years agoMake qmake slightly more verbose with its syncqt output.
axis [Mon, 30 May 2011 12:14:28 +0000 (14:14 +0200)]
Make qmake slightly more verbose with its syncqt output.

It can be hidden with -silent, however.

Change-Id: I6dbd3c743779b8d2070e41f007df26b530987429
Reviewed-on: http://codereview.qt.nokia.com/235
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoDisable trying to compile network tests which require QtScript
Marius Storm-Olsen [Fri, 27 May 2011 17:10:43 +0000 (12:10 -0500)]
Disable trying to compile network tests which require QtScript

Those tests should be moved to QtScript/tests/auto

Change-Id: Icc0c50ef35ac08e604ab18cb87b0c2b19f2fc72c
Reviewed-on: http://codereview.qt.nokia.com/197
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoAvoid setting the active window to null when there is a FocusIn queued.
Laszlo Agocs [Mon, 6 Jun 2011 08:02:06 +0000 (10:02 +0200)]
Avoid setting the active window to null when there is a FocusIn queued.

13 years agoImplemented QXcbScreen::topLevelAt(const QPoint &p).
Samuel Rødal [Mon, 6 Jun 2011 07:07:46 +0000 (09:07 +0200)]
Implemented QXcbScreen::topLevelAt(const QPoint &p).

This makes the tst_QWidget::widgetAt() auto-test pass.

13 years agoMake XCB plugin work better in combination with auto-tests.
Samuel Rødal [Mon, 6 Jun 2011 07:00:13 +0000 (09:00 +0200)]
Make XCB plugin work better in combination with auto-tests.

When an auto-test calls processEvents() indirectly via QTest::qWait(),
QAbstractEventDispatcher::aboutToBlock() doesn't get emitted since
the processEvents() implementation gets called without
the QEventLoop::WaitForMoreEvents flag set. Since the auto-tests depend
on all events getting delivered, we need to process the XCB events on
awake() as well.

13 years agoMade the tst_QWidget::widgetAt() test a bit more robust.
Samuel Rødal [Mon, 6 Jun 2011 06:57:37 +0000 (08:57 +0200)]
Made the tst_QWidget::widgetAt() test a bit more robust.

The QTRY_VERIFY() should include the whole test, not just whether we got
a widget or not, since it might be the wrong one.

13 years agoMoved common module profiles to be feature profiles.
axis [Wed, 18 May 2011 13:30:27 +0000 (15:30 +0200)]
Moved common module profiles to be feature profiles.

This enables external modules to also make use of them without having
access to the complete QtBase source code.

Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/234
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoCorrect antialias disabling logic for Core Text
Jiang Jiang [Fri, 3 Jun 2011 14:03:00 +0000 (16:03 +0200)]
Correct antialias disabling logic for Core Text

We should always turn antialias off when QFont::NoAntialias being
passed in styleStrategy. That corrects some QStaticText tests.

Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae
Reviewed-on: http://codereview.qt.nokia.com/328
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoCorrect QStaticText tests after recent changes
Jiang Jiang [Fri, 3 Jun 2011 14:08:54 +0000 (16:08 +0200)]
Correct QStaticText tests after recent changes

Raster engine on Mac now correctly handles transformation, so no
need to XFAIL anymore. Also fixes a drawStaticText origin mistake,
the y origin should be the top left point rather than the baseline.

Change-Id: I6058e7099b336d9d5a6586344a07be3c7d76fb64
Reviewed-on: http://codereview.qt.nokia.com/329
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoImplemented module-local caching of module profiles.
axis [Wed, 18 May 2011 13:23:51 +0000 (15:23 +0200)]
Implemented module-local caching of module profiles.

We use syncqt to generate .qmake.cache also for submodules, which
contains the location of forwarding module profiles for that module.
This enables us to build without having to put module profiles into
mkspecs/modules until install time.

Also added support for -developer-build to syncqt.

What it does is to point build directories for binaries and
libraries to a common location in QtBase. This is more
convenient when doing development, since you don't need to set your
path to every module's bin/ directory, but it cannot be used with
release builds, since they need to build independently of QtBase,
in their own directory.

Change-Id: I959c62c11c644f2147a98da894a72452d9c44327
Task: QTBUG-19585
Task: QTBUG-19583
Reviewed-on: http://codereview.qt.nokia.com/232
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoInstall some headers that were previously missing from install.
axis [Wed, 18 May 2011 13:28:25 +0000 (15:28 +0200)]
Install some headers that were previously missing from install.

Change-Id: I58a5f58e6e03e3e266de23beee47de0c823f3240
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/233
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoDon't base QTDIR detection on .qmake.cache.
axis [Fri, 13 May 2011 14:49:51 +0000 (16:49 +0200)]
Don't base QTDIR detection on .qmake.cache.

Change-Id: I4adc26c1c070d26277551d302f4638b819ddc311
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/231
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoMake sure that we error out if we cannot write forwarding profile.
axis [Fri, 13 May 2011 14:22:09 +0000 (16:22 +0200)]
Make sure that we error out if we cannot write forwarding profile.

Change-Id: Ic0b62532dd8a52cf6ab7a7c10c5ffbe3c9039ec1
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/229
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoChanges needed for Qt to accept module .qmake.cache files.
axis [Fri, 13 May 2011 14:48:06 +0000 (16:48 +0200)]
Changes needed for Qt to accept module .qmake.cache files.

Also introduced the QMAKE_EXTRA_MODULE_FORWARDS for specifying a
folder where forwarding profiles will be put.

Change-Id: I8cb242838a5a4d42dc5e3cfd0bd858ab0d2696cd
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/230
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoAdd basic static text drawing capability to lance
Jiang Jiang [Fri, 3 Jun 2011 11:31:05 +0000 (13:31 +0200)]
Add basic static text drawing capability to lance

Task-number: QTBUG-17514
Change-Id: Ife7cd8f940424d805f634ca190bcbf6fd83d8682
Reviewed-on: http://codereview.qt.nokia.com/321
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: aavit <qt_aavit@ovi.com>
13 years agoBasic QDesktopWidget support.
Samuel Rødal [Fri, 3 Jun 2011 12:35:09 +0000 (14:35 +0200)]
Basic QDesktopWidget support.

Makes it possible to use grabWindow on the desktop widget with the xcb
plugin, which gives us a few more passing tests in tst_QWidget.

13 years agoRemove tst_QWidget::painterRedirection().
Samuel Rødal [Fri, 3 Jun 2011 12:00:56 +0000 (14:00 +0200)]
Remove tst_QWidget::painterRedirection().

We've removed support for painter redirection, QWidget::render() should
be used instead.