Commit Graph

1122 Commits

Author SHA1 Message Date
Jørgen Lind
c70efdec0f 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
2011-06-10 13:09:57 +02:00
Samuel Rødal
6b0cd62e5e Added frameMargins() API and support in XCB plugin. 2011-06-10 12:40:56 +02:00
Eskil Abrahamsen Blomfeldt
11bbfb5882 Fix missing empty lines in Qt HTML when displayed in compliant browsers
When QTextDocument exports HTML, it makes an effort to be compatible
with its own importer, hence it has to be compatible with the dialect
of HTML which Qt has developed over the years. One incorrect
interpretation in Qt is that an empty paragraph is interpreted as an
empty line. So if you use a QTextDocument to produce HTML for text where
an empty line has been added, this empty line will not be visible when
the document is viewed in a compliant browser. The fix is to set the
height of the empty paragraph to 1em, so that it will match the current
pixel size of the font, thus look the same as a <p><br /></p> but
without altering the structure of the document.

Reviewed-by: Gunnar
(cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73)

Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149
Reviewed-on: http://codereview.qt.nokia.com/445
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-10 12:04:16 +02:00
Friedemann Kleint
f56a905ced Compile Windows. 2011-06-10 10:41:20 +02:00
Jørgen Lind
f30b8b96b8 Fix QtPlatformSupport when compiling with glx and xcb 2011-06-10 10:16:18 +02:00
Jørgen Lind
dfd07cb247 Fix versionheader name for QtPlatformSupport 2011-06-10 10:11:41 +02:00
Friedemann Kleint
288bf48388 idc: Do not link against QtGui.
(which throws off the build order).
2011-06-10 10:04:22 +02:00
Jørgen Lind
2aeefdddc1 Remove the platforms/install_rules directory 2011-06-10 09:54:12 +02:00
Jørgen Lind
f00f7a895b Update dependency list in xcb README 2011-06-10 09:46:56 +02:00
Jørgen Lind
6ee65dc478 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
2011-06-10 09:46:56 +02:00
Tapani Mikola
db37aa1004 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>
2011-06-10 09:40:55 +02:00
Morten Sorvig
17763a7b31 Actually add QEventDispatcherMac. 2011-06-10 09:26:16 +02:00
Samuel Rødal
4a189c188c 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.
2011-06-10 09:24:56 +02:00
Shane
afd5d43b0c 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>
2011-06-10 01:53:26 +02:00
Laszlo Agocs
4d10e64f2a 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
2011-06-09 16:49:03 +02:00
Jiang Jiang
97391be5eb 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>
2011-06-09 15:07:13 +02:00
Gunnar Sletta
b97215b04c 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>
2011-06-09 13:01:16 +02:00
Eckhart Koppen
dc25fb7278 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>
2011-06-09 11:43:30 +02:00
Morten Sorvig
e3410908a2 Add QEventDispatcherMac.
Create it directly in QGuiApplication for now, 
later on we'll move it to the cocoa plugin.
2011-06-09 11:19:12 +02:00
Morten Sorvig
0a4c2eae4b 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.
2011-06-09 11:19:12 +02:00
Laszlo Agocs
d88a773218 Bail out from cursor creation when malloc fails. 2011-06-09 11:08:05 +02:00
Laszlo Agocs
06c56cb464 Get modifier mapping using standard X, no need for libxkbcommon here.
Reviewed-by: Samuel Rødal
2011-06-09 11:01:35 +02:00
Laszlo Agocs
bd781231b2 Create custom cursors via XRender.
Reviewed-by: Samuel Rødal
2011-06-09 11:00:02 +02:00
Pierre Rossi
94c173de05 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>
2011-06-08 22:37:52 +02:00
Marius Storm-Olsen
15d6f1f031 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>
2011-06-08 21:04:48 +02:00
Marius Storm-Olsen
2e2ad7ec7f 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>
2011-06-08 21:04:48 +02:00
Laszlo Agocs
4469de4ce7 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
2011-06-08 14:47:22 +02:00
Lars Knoll
88f3b059a9 Avoid out of bounds write
Reviewed-by: Samuel
2011-06-08 14:46:50 +02:00
Marius Storm-Olsen
8fe0427cb8 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>
2011-06-08 14:42:23 +02:00
Olli Werwolff
2d09fe38ac 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
2011-06-08 13:57:30 +02:00
Olli Werwolff
4b566e5db9 Most checks for windows in widgets have to be ws specific
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:29 +02:00
Olli Werwolff
affaefe049 use correct includes in qaccessible_win.cpp/qwizard_win_p.h
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:28 +02:00
Olli Werwolff
aecd41c070 Do not compile _win files when -qpa is used
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:27 +02:00
Olli Werwolff
a844e23607 QTextDocumentLayout has to be exported as it is used in widgets
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:26 +02:00
Olli Werwolff
9a3e1dba27 Fixed compilation with QT_NO_PRINTER
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:25 +02:00
Lars Knoll
f2ff9036ae cosmetic changes 2011-06-08 13:46:09 +02:00
Jiang Jiang
3fb67767fc 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>
2011-06-08 12:25:23 +02:00
Jiang Jiang
c2dddd8322 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>
2011-06-08 12:25:22 +02:00
Jiang Jiang
d9e3d1a540 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>
2011-06-08 12:25:21 +02:00
Lars Knoll
b6b244efda 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.
2011-06-08 11:44:41 +02:00
Olli Werwolff
819f9ca965 Use Q_WIDGETS_EXPORT for widgets library
Reviewed-by: Lars Knoll
2011-06-08 10:43:55 +02:00
Marius Storm-Olsen
ed5a7e22be 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>
2011-06-07 22:18:35 +02:00
Lars Knoll
6a243e5559 revert accidental commit 2011-06-07 16:45:28 +02:00
Lars Knoll
1729785d1e remove unused code 2011-06-07 16:44:23 +02:00
Lars Knoll
52e5fd336b cleanups code
Make QXcbClipboard and QXcbDrag a QXcbObject to simplify
the code.
Use the predefined atoms in xproto.h instead of our own
defines.
2011-06-07 16:29:35 +02:00
Lars Knoll
4386425ce3 Implement QDropEvent::source() again
QDropEvent::source() now returns a QObject
instead of a widget, matching the implementation
in QDrag.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
71304aefd0 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
2011-06-07 15:50:54 +02:00
Lars Knoll
779e1aaa35 Protect against deleted windows
Check that the window is still there before
trying to deliver an event to it.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
689ac3631d Initialize variable
Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
1928e633a5 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
2011-06-07 15:50:54 +02:00