Commit Graph

20248 Commits

Author SHA1 Message Date
Kai Koehne
568c26227d Silence moc warnings about 'argument mismatch'
The moc preprocessor is not necessarily fully compatible with the native
compiler preprocessor, which can lead to annoying warnings.

This fixes a problem particularly with the boost headers that rely on
MSVC only preprocessor features (to work around other MSVC preprocessor
deficiencies).

Task-number: QTBUG-29331
Change-Id: If884452969b512a746c81e235d31636b39c45b27
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-25 15:42:40 +02:00
Richard Moe Gustavsen
ee31bc59be iOS: don't show popup on call to setVisible
It turns out that setting visibility means whether or not the
menu should appear visible in a parent menu, and not to
actually show or hide the popup. This means that the only way
to show a popup is to call showPopup, which also makes
it simpler since we then always get a parent window as
argument that we can activate and get a focus object from.

Change-Id: Ie3866b5664294f9aa4d694fa422e8116e9c75ced
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 15:35:56 +02:00
Richard Moe Gustavsen
4dffab4c39 iOS: add support for submenus
Change-Id: I3816f2518125ad9c013ab578853295bf2c6bd02e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 15:35:52 +02:00
Richard Moe Gustavsen
28b5038d1b iOS: don't show separator in native menus
There might be menu types later that should show them, but
for now we just hide them.

Change-Id: Iac31e3204d8dcfd5beb5a2d5a372478ca811776c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 15:35:48 +02:00
Nico Vertriest
f1a8d7dc9b Doc: 2 minor corrections in corelib/plugin
Task-number: QTBUG-40362
Change-Id: I4fa4a69c13a60f8c7915b6c9659a4daaae4ecc1a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-25 11:52:38 +02:00
Joerg Bornemann
5e6dc39770 remove pointless initializations
Those initializations are done by the constructors already.

Change-Id: Ife58675e2ba4854ef66c813158cb4ed660f530d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-09-25 11:23:31 +02:00
Joerg Bornemann
9a2b588556 simplify VCXProjectWriter::outputFileConfig a bit
The fileAdded variable is used to save state between iterations.
There's no need for two variables.

Change-Id: I8144cf7c7b394255459295b82a7ca808bc3951da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-25 11:20:26 +02:00
Joerg Bornemann
8ee2e497ae simplify VCXProjectWriter::outputFileConfig a bit
We don't need the filtername parameter.

Change-Id: I653db4a200c83d095520b47e1451dfe59b956d92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-25 11:20:15 +02:00
Thomas McGuire
8b65e72b2d Use the correct QMake spec when running config tests
Task-number: QTBUG-41508
Change-Id: I0f27aad625117f931216b0cee987ed9463b7d0e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-25 11:11:23 +02:00
Jochen Seemann
faefd37db6 Fix MSVC2013-compiler warnings with QT_NO_FILESYSTEMWATCHER
dialogs\qfilesystemmodel.cpp(203,1667,1680): C4189: 'd': local variable is initialized but not referenced
dialogs\qfilesystemmodel.cpp(1547,1720,1847): C4100: 'variable': unreferenced formal parameter

Change-Id: Ic3cef264dcd0b939748bec914eb9c29f86f6ed0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-25 06:50:09 +02:00
Friedemann Kleint
8f2519660b Polish the mdi example.
Add a command line parser to be able to pass on files.

Task-number: QTBUG-35146
Change-Id: I32cbb9ec1e87667076e40a81c66674cf16836b54
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-24 23:07:25 +02:00
Friedemann Kleint
4b03b18548 Generate Show/Hide events for widgets when minimized state changes.
Fixes a regression against Qt 4, where Show/Hide events were received
when the minimized state changed.

It is restricted to QWidget so as not to introduce additional events
to QWindow (which already has signal visibilityChanged()) and cause
unexpected side effects in QQuickWindow.

Task-number: QTBUG-41312
Change-Id: Ib165a5daf7a7e5d8231ef8a94b70e8a2a3253057
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-24 23:07:15 +02:00
Joerg Bornemann
d41d4a0a35 remove special handling for the "Deployment Files" filter
Files in "Deployment Files" should be added as static content, which
happens to be the fallback in the case where checkDeploymentFiles is
false. Also, the calling code expects that an XML tag is added in all
cases. This did not happen for the "Resource Files" filter when
checkDeploymentFiles was false, which led to unmatched closing tags.

This fixes the issue that files added to RESOURCES in different build
variants produced invalid vcxproj files.

Task-number: QTBUG-30373
Change-Id: Ibb27e67641ba63150938cf826ea1881d182fb841
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-09-24 14:54:31 +02:00
Joerg Bornemann
990a413a2e refactor VCXProjectWriter::outputFileConfig
Put common code into a function.
Subsequent patches will become easier.

Change-Id: I0d549886585d90e4701a2430503bc0d2d716e341
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-09-24 14:52:30 +02:00
Joerg Bornemann
4f21eb0387 uncopy & -pastify code
Make use of the mythical C++ feature "function" to soothe the brain ache
of anyone who looks into this part of the code.

Change-Id: I740e29f1777d91d3b34a61fa62a5c23c222334b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-24 14:52:21 +02:00
Matt Broadstone
f84b00c6d2 Expose QSqlDriverPrivate dbmsType in public QSqlDriver api
dbmsType was previously kept as a private variable in QSqlDriverPrivate,
however it's particularly useful for QODBC users.

[ChangeLog][QtSql][QSqlDriver] Add support for determining DBMS type from SQL driver.

Change-Id: If1c221520da9ac4ccef85a02db078679d76eac92
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-09-24 14:44:49 +02:00
Andy Shaw
eef1e51f97 Ensure a window with no stays on top flag is not staying on top
On Windows, if a window was previously staying on top then it needs to be
explicitly told to have HWND_NOTOPMOST set when it is recreated. If it was
not staying on top before the flag has no effect so it is safe to always
set it in this case.

Task-number: QTBUG-30359
Change-Id: I8be546886d6ae61032113c241f5903bcce04c163
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-24 14:39:04 +02:00
BogDan Vatra
1168ed8f6e Handle InsetDrawable.
Remove an unused function.

Change-Id: I79fda0fb56b0621e062a0ccb5bd68291d9ccdf50
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-09-24 13:52:55 +02:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Tor Arne Vestbø
28a57799ce iOS: Don't update screen properties for statusbar frame while rotating
The rotation will already result in laying out of the root viewcontroller,
so we don't need to send explicit geometry changes for the statubar change.
The properties of the screen at that point are also not consistent, as the
screen is about to rotate.

Change-Id: I1b45bee1c1224ca56f9e37068d68c4ee1bfeb9b6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:19 +02:00
Tor Arne Vestbø
f14d86c0f9 iOS: Reflect changes in statusbar height as QScreen availableGeometry
We detect changes to the statusbar height, eg. when the in-call 40px tall
statusbar is active, and ensure that the root viewcontroller view is laid
out again with new screen properties applied. To make the layout match
the animation of the statusbar height we apply the layout inside a
animation block.

Change-Id: I751d9d1273e833ef052a3a4f3d2777e1dffec7dd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:14 +02:00
Tor Arne Vestbø
f1970c8916 iOS: Fix touch point translation when root view controller is offset
Instead of doing manual translation of the local touch point to global
screen (QScreen) coordinates we take advantage of the fact that QWindow
already has a position that's adjusted for all of the view-controller
offsets in its parent hierarchy.

Change-Id: Ib34173db5ac053c20712dfff469c4a1286f2a324
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:09 +02:00
Tor Arne Vestbø
0cd3416136 iOS: Simplify QWindow/UIView geometry mapping
As we now have a root viewcontroller that always has a geometry that matches
the containing UIWindow, we don't need to do any fancy calculations when
mapping between the two.

Change-Id: I08a7b9992be7b7238cbad2a2da20488bba1c0939
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:05 +02:00
Tor Arne Vestbø
e3a72a8aee iOS: Ensure root view controller always matches size of containing window
Change-Id: I249d847a1f4785b3e63e46759baed340b0d6362e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:58 +02:00
Tor Arne Vestbø
df734769d3 iOS: Move top level window management out of QIOSScreen to QIOSDesktopManagerView
The logic of how to deal with top level windows in the presence of rotation
or status bar changes should be confined to our custom QIOSViewController
that acts as a desktop manager for regular Qt applications.

We no longer treat windows with full-screen or maximized geometry but without
the matching window state flag as being targeted for auto-resizing. In the
future we might detect this case and warn the user that windows should have
the appropriate flags to be able to auto-resize on orientation changes.

Change-Id: Ibab09de5cf37e77c356fbf51a54a2fcec4bb5c51
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:50 +02:00
Tor Arne Vestbø
4f0cd0693a iOS: Calculate screen (available) geometry using [UIView convertRect]
Instead of custom logic to detect portrait/landscape and the height of
the status bar. The latter would fail when the statusbar/orientation was
set explicitly through [UIApplication setStatusBarOrientation], as the
statusbar would not follow the normal behavior of covering the top part
of the screen. The new code also handles upside-down portrait mode, as
well as iOS8's behavior of reporting screen bounds and application
frame in interface orientation instead of device orientation.

Change-Id: I54e3b99246a32e17aaba13960f456fa823768fd8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:40 +02:00
Tor Arne Vestbø
d2c925b977 iOS: Update screen properties more consistently
Instead of updating screen properties (and hence laying out top level
windows) in willAnimateRotationToInterfaceOrientation, we do it in
the more catch-all viewWillLayoutSubviews, which also handles changes
to the orientation while the application is in the background, as well
as changes to the statusbar frame/size, eg. while being in a call.

Change-Id: Ib4a08af2f3a56db426a10ff1ed819867895b5a5a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:38 +02:00
Tor Arne Vestbø
d61d638721 iOS: Scroll root view when keyboard is visible using sublayerTransform
We opt to use sublayerTransform instead of changing the root view's
bounds, so that we can keep the root view at the same position and
size regardless of statusbar height and visibility.

Change-Id: I3f04a4587f1108084208aefa990f91a130fb47b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:28 +02:00
Tor Arne Vestbø
6742b250b5 Make QScreenPrivate constructor a bit clearer
Easier to read/understand that the screen properties are initialized
from the platformScreen.

Change-Id: I3084c3ac30a08cb4e154536f949475459212d2de
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:18 +02:00
Alessandro Portale
1fc8e089d8 Windows: devicePixelRatio aware QWindowsTheme::standardPixmap
QWindowsTheme::standardPixmap() takes a size parameter which is in user
space coordinates. This patch causes it to calculate the size in device
pixels, to get the image from the OS in the correct resolution and to
set the devicePixelratio of the returned pixmap accordingly.

Change-Id: Ifad5d0a26d5fd5945e37e432787d63ee79269295
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-24 11:34:23 +02:00
Nico Vertriest
0fe2c75273 Doc: Fixed autolink errors qtbase/kernel
Task-number: QTBUG-40362
Change-Id: I54a1111e39fb7e85d34ea97b937d2764d29b27a0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 10:49:40 +02:00
Nico Vertriest
cf81bf2e2d Doc: corrected autolink errors qtbase/corelib/tools
Also corrected some minor language/spelling issues

Task-number: QTBUG-40362
Change-Id: I00d76521fc9beb4e7a4a83ff6dc3334a055a7148
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-09-24 10:49:09 +02:00
Eike Ziller
3ea0020d3b Abstract proxy model: Add missing delegation of supportedDragActions
Change-Id: I4d2519aaa46d3ca075330c6680dd3672249cbefe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-24 10:37:59 +02:00
Laszlo Agocs
276a5f5acf Change fallback OpenGL library name
Change-Id: I7f07699f860d0300f221b980b7d2fbe0dacbf4a1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-24 09:58:04 +02:00
Alex Blasche
b3bc6b9f7c Fix misleading documentation
Not every length parameter unit is accepted by Qt Style sheets.

Task-number: QTBUG-31907
Change-Id: I953c56caf68c1397ba24369f433d21c6f4772d0d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 09:54:49 +02:00
Alex Blasche
d1fabb49a3 QXmlSimpleReader shall handle external entity reference file over 1k
This commit fixes a bug that causes QXmlSimpleReader to handle only
external reference files less than 1k. Instead of reading the
first 1k of the reference file, it reads all data from the file into
memory. The change is not optimal for memory management, but there does
not seem to be better solution without breaking the existing API.

A similar but incomplete patch was already applied to Qt 4.7 but never
made it into Qt 5. This patch is based on a Qt 4.7 patch and adds the
missing cases.

Task-number: QTBUG-26910
Change-Id: Ia4d055ded80a40ce76b79fc61ad585e8ebb719db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-24 09:54:38 +02:00
Frederik Gladhorn
c96426f19f Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-09-24 12:04:52 +02:00
Sergey Radionov
2137cb7dc5 Windows: fix obvious mistyping in getSysColor
Change-Id: I1f215cdf17d85119535df35bbff1ee653ecc0ad5
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-24 09:46:57 +02:00
Friedemann Kleint
2d685b8316 Vista style: Scale hardcoded values in menu drawing code.
Fix the position of the menu gutter.

Change-Id: Ia8e056f14315f314d1e7a8b95a1ac87f6843e466
Task-number: QTBUG-40277
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-09-24 09:46:48 +02:00
Allan Sandfeld Jensen
91b7d53154 Fix QPixelFormat values
The two mono formats are actually indexed and may have both color and
alpha values in the color-table, and Format_ARGB4444_Premultiplied and
Format_ARGB6666_Premultiplied both have the alpha value in the end.

Change-Id: I7f1efb2213710f5eb628d71356f9c8ed75b50f4d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-24 09:33:51 +02:00
Lars Knoll
44a381087e Add * as a valid token to our blacklisting
This helps to blacklist a test function on all platforms,
something that isn't easily possible currently. Adding

[testfunction]
*

to the BLACKLIST file will now blacklist the function
on all platforms.

Change-Id: I9e1a1daf94caa05408a6b3cd7ea7a3acdc962a43
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-24 08:58:42 +02:00
Nico Vertriest
2699d40b57 Doc: correction return statement QSqlDatabase QSqlTableModel::database()
Task-number: QTBUG-37358
Change-Id: I68a0110a01ac21871e8a369c7ab94d2dadf1d80b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-09-24 08:49:19 +02:00
Jake Petroules
4cb679d888 Fix doc typo with Q_FORWARD_DECLARE_MUTABLE_CF_TYPE.
Change-Id: I2e6b00513be87640dc20831aab4e972716445e63
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-24 08:27:27 +02:00
Frederik Gladhorn
0c307f45fd Accessibility OS X: Fix image role
Change-Id: I0839a30041dbe558c420c944da49abe8ea26e0ab
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-23 22:33:29 +02:00
Louai Al-Khanji
4073a3dd77 direct2d: Fix font size when display scaling is in use
Since we already tell direct2d that we are using pixel sizes in the
QWindowsDirect2DDeviceContextPrivate constructor and thereby enable
scaling inside direct2d, there is no need to scale the font size again.

Change-Id: Id9c9ed4d2848bcd09f997e41fb87802a3fe2432b
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-23 21:08:20 +02:00
Marc Mutz
1ce6e432b6 QVersionNumber: correctly fail for numerically very large segments
The result of qstrtoull() was unconditionally truncated to an int,
resulting in wrong values being appended to the segments vector
when the numerical segment value was above INT_MAX.

Prevent this by first checking the return value of qstrtoull
as a qulonglong for values larger than INT_MAX and stopping
processing in that case. That means that segments that
numerically overflow an int are now considered part of the
suffix.

Also added tests for the case where a segment value is larger
than ULLONG_MAX. That was already working correctly.

Change-Id: Ia4b89021dcfe6bfae27c8d89bb678ec5e0e3b847
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 20:42:01 +02:00
Marc Mutz
42d4e054a6 QCommonStyle: remove references to QStyleOptionFrameV<n>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.

Change-Id: I55539305df28267d0671a54a5cb7fcc17d045b8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 20:21:14 +02:00
Marc Mutz
d488153fc2 QStyleSheetStyle: remove references to QStyleOptionFrameV<n>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.

Change-Id: Ic165b524e8d86a0dd5355de338e87a33cd7429c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 20:20:43 +02:00
Jochen Seemann
fbc4bce710 winrt: fix compiler warning on Windows Phone
qwinrtscreen(1010): 'd': local variable is initialized but not referenced

Change-Id: Ic21a9bc087d8418ad9f01b263677438a4db8f493
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-23 18:55:30 +02:00
Joerg Bornemann
541b387c10 emulate mouse move in default implementation of QPlatformCursor::setPos
When QCursor::setPos() is called and the platform plugin doesn't
implement QPlatformCursor::setPos, a warning is printed.
Additionally, we now emulate a mouse move to have a default
implementation that's actually useful.

QPlatformCursor::pos() now returns the position that was set by
QPlatformCursor::setPos(), or other facilities that generate mouse events,
for example the Tslib plugin.

Change-Id: Ifc539202765f311baad085f72347aeb732f7b2ba
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 18:53:42 +02:00