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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
We don't need the filtername parameter.
Change-Id: I653db4a200c83d095520b47e1451dfe59b956d92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Fix the position of the menu gutter.
Change-Id: Ia8e056f14315f314d1e7a8b95a1ac87f6843e466
Task-number: QTBUG-40277
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
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>
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>