Commit Graph

20260 Commits

Author SHA1 Message Date
Marc Mutz
55fbf1db19 Widgets: remove references to QStyleOptionFrameV<n>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.

Change-Id: Icff45cbd3a47db8618a7f7a80f7252651969237c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-26 00:39:48 +02:00
Marc Mutz
10e5bcf9d0 tst_QSslError: cleanup unused functions
Change-Id: I4db7399e533805e1dddaa76d5a609d2006a97da6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-09-26 00:39:37 +02:00
Andrew Knight
e1ba711992 Add a way for qmake + configure to link dynamically to the CRT
The static CRT, libcpmt.lib, is not shipped with Visual Studio Express
for Windows (unlike VS Express for Windows Desktop or Professional
versions), causing configure and qmake to fail linking if this is the
only VS installed. By removing -MT (which is on by default) and adding
$(CFLAGS_CRT) to the compiler line, -MD can be added to the compiler
flags via the environment, providing a workaround for the issue.

Change-Id: I5613346d60a3a1889c121f04d53b09fbb147fc02
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-25 22:14:31 +02:00
Allan Sandfeld Jensen
8165a9c74b Clean up QImage::Format switches
Changes some switches on QImage::Format that needed to be updated
whenever a new image format was added. Two were changed to matching
formats supported by BMP and PPM instead of what they don't support,
and two were changed to now use QPixelFormat values.

Change-Id: I5a14f1d7b7cc0451c68e4d6ab2361a5bd8dc8915
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-25 18:34:30 +02:00
Alex Blasche
342533864b Fix smooth scaling of large QImages
Task-number: QTBUG-13448
Change-Id: Ie76f5b5deefabeae93ab17eb866aea303692f5ac
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-25 17:20:12 +02:00
Sze Howe Koh
a72d585f9b Doc: Restructure "Signal & Slots" article
Put sections with similar content together:
- Put "A Small Example" next to "A Real Example".
- Put "Signals and Slots", "Signals", and "Slots" together. Altogether,
  these 3 sections contain lots of repeated content and should be
  consolidated in a future commit.

This patch only moves content around without adding, removing, or
modifying content.

Change-Id: Ic6bf6a8b51f4785a8bbe6d230c2934f2c952104d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-09-25 16:50:45 +02:00
Sze Howe Koh
f5d58c0442 Doc: Remove irrelevant sections from "Signals & Slots"
- This article is not the right place to describe the low-level
  mechanisms of moc and qmake, or to discuss QMetaObject features that
  are unrelated to signals and slots.
- Most users never need to run moc directly.
- The current content only mentions qmake for moc automation, but CMake,
  QBS, and the Visual Studio Add-In can also do that.

In light of the above 3 points, let's simply link to the "Meta-Object
System" article for those who are interested in the behind-the-scenes
details.

Most of the content deleted by this patch are already discussed in
detail in the articles "The Meta-Object System" and "Using the Meta-
Object Compiler (moc)" (the former links to the latter). The exception
is Snippet 5 -- this is deleted without replacement because
qobject_cast() is a much safer alternative to QMetaObject::inherits()
with static_cast(), so we should encourage the former.

Change-Id: I638c888cedfcdfb818747edeb806213ebd54dfb6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-25 16:50:41 +02:00
Richard Moe Gustavsen
4c08e3dfd5 QIOSInputContext: animate screen from current transformation
Since we assign a fromValue to the scroll animation directly, the
UIViewAnimationOptionBeginFromCurrentState flag does not have
any effect. So we need to set the fromValue based on the current
presentation state explicit.

The reason why we need to ensure that we scroll from the current
state is to avoid screen 'jumping' as a result of the scroll function
being called many times during the same event loop cycle during after a
focus change (focus object/window change, cursor rect change etc).

Change-Id: Id98f43d60ec5d028b113361dab953569accf9b3f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 16:30:52 +02:00
Richard Moe Gustavsen
956e88f23e QIOSInputContext: change keyboard rect when focus window changes
Since keyboard rect should be in window coordinates, it needs to
change when focus window changes.

Change-Id: I052aa5cadf182841d7c4eb114ebd1ea5317ff39c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 16:30:29 +02:00
Richard Moe Gustavsen
bd1e52db33 QIOSInputContext: report keyboard rect relative to focus window
After changes to how we scroll the screen, we need to change
the implementation for calculating the keyboard rect as well.

Change-Id: I7f468d55f6e29604b9c276deccd9926e071552a9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 16:29:51 +02:00
Oliver Wolff
eedefa28bd Refactored qt_normalizePathSegments
There were several use cases that did not work with the old
implementation and it was not really readable.

Task-number: QTBUG-3472
Task-number: QTBUG-40067
Task-number: QTBUG-23892
Change-Id: I1e038792dc54cdc6f8d9bb59d80b11dd3c56fac6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-25 16:16:59 +02:00
Allan Sandfeld Jensen
cc3875c2e4 Balloon tip must follow systemtray icon
If the a message notification is created at the same time as the system
tray icon is embedded it may start at a wrong location, since the icon
location it bases its own location is not yet final.

This patch adds code to update the balloon tip location when the system
tray icon is moved or resized.

The bug and fix can be tested by the systray example by disabling the
icon and letting show message trigger both showing it and the message.

Change-Id: Ie1dc10489ad420e581e32afeb757c236fb5129ab
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-25 16:12:55 +02:00
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