This allows the menu to tell its containing item the menu got
deleted. This removes the need to reset the COCOA_MENU_ANCESTOR
property value, which would crash since QCocoaMenuItem::m_menu
would be a dangling pointer.
Task-number: QTBUG-41587
Change-Id: Ia3408ef85cf823bfddbc2c41d6534e43bf14ed29
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
MinGW static libs use libfoo.a format, and not foo.lib.
Change-Id: I899adca8ec0b1c8430f5b6c4f18ad0ea1dc6d398
Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
ToUnicode sometimes gives wrong results if it is used with a
keyboard buffer containing the ctrl modifier. Special cases
containing alt and control might trigger the third assignment
of a key, but if no alt modifier is used for the key event,
we temporarily disable the control modifier in order to obtain
the character with ToUnicode.
Task-number: QTBUG-35734
Change-Id: Ifd88c640541b42fa65ee1dc9b55af3386714b0b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Function EnumFontFamiliesEx with parameters (lfCharSet = DEFAULT_CHARSET, lfFaceName = '\0') enumerates only first installed font from many with same family name.
This patch calls EnumFontFamiliesEx twice:
1. Without family name to enumerate families;
2. With family name to enumerate fonts with same family.
Task-number: QTBUG-40828
Change-Id: Ic36a24a9e70f735a7324c05fe4b70f7c7e5710d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
On Unix, those functions are already #define'd to qt_safe_read and
qt_safe_write, which do the necessary EINTR handling. On Windows, EINTR
cannot happen.
Change-Id: I50c46472c04bd90a0bac51c725cc86311ae905c8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
IPv6 addresses can start with ":", for which QDir::isAbsolute() would
always return true (QResourceFileEngine::isRelativePath() returns
constant false) and would trip the calculation for local files.
Similarly, IPv6 addresses can start with strings that look like Windows
drives: "a:", "b:", "c:", "d:", "e:" and "f:" (though not today, as
those address blocks are unassigned). Since a valid IPv6 address will
definitely require at least one more colon and Windows file names cannot
contain ':', there's no ambiguity: a valid IPv6 address is never a valid
file on Windows.
This resolves the ambiguity in favor of IPv6 for Unix filenames (which
can contain a colon) and in case of an URL containing scheme, relative
path and no authority ("dead:beef::" for example could have been parsed
as scheme() == "dead" and path() == "beef::").
Task-number: QTBUG-41089
Change-Id: Id9119af1acf8a75a786519af3b48b4ca3dbf3719
Reviewed-by: David Faure <david.faure@kdab.com>
This change enables us to reorder the stacking order used by the
layout. This is necessary if we want to influence the drawing order.
Lowering or raising views are done separately for native views and
Qt surface views, that is, the two different view "types" are moved
relative to other views of the same type and Native views are always
placed on top.
Change-Id: I01cbb88f8efee08877b5972cf330fd25266a2aa9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The static QJNIEnvironmentPrivate::findClass() function exposes the
cache and the class finding code in qjni.
Change-Id: I42043dc993cf9cace042faf763f2a647ba79d97f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Adds:
- Improved geometry calculations (e.g, inside a parent)
- Change visibility
- proper stacking order. Native views now reserve the top of the stack
to ensure that they stay visible.
- React to application state changes.
Change-Id: I35de0396937fff37ffcd272c9a7d8e9873a91dfb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Giving instructions, rather than forcing one to grep qtbase for the error
message is always a good thing.
Change-Id: I0f5abed341368cdf817dc0110c2c250b377a30de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
There are a couple of code paths in which we return from a function
without freeing the memory pointed by a local pointer.
For the sake of not over-modifying the code, I chose not to turn
"ui" into a scoped pointer.
Change-Id: I0b23944f7526d250c1ebeca0bae9bdc36dceceed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This introduces a combined brush/dash pattern which can be used to
perform faster dashed straight-line drawing. The dash pattern is
prerendered to a tiled bitmap brush, resulting in a significant speedup
for lines with many elements.
As the result of non-rectilinear lines may lose quality compared to the
native dashed renderer, the slow/high quality codepath can be activated
by setting the QPainter::HighQualityAntialiasing render hint.
Task-number: QTBUG-40604
Change-Id: I771e9a81c042b4d8b6891dc9280932696e5a0694
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When the composition mode changes to a mode which is not supported by
Direct2D's primitive blending, the rendering follows the emulated (slow)
code path using rasterFill(). This allows the direct2d paint engine to
handle all composition modes supported by QImage.
Task-number: QTBUG-40602
Change-Id: I0ac0b5c89aab2483cb2ef7768d6dec8e16913249
Done-with: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
The "Fixed CE build of sqlite3" patch is *updated* in this change.
Since sqlite 3.8.6, SQLITE_OS_WINCE isn't defined early enough so we
have to check _WIN32_WCE directly.
(ea70ec8711)
Change-Id: I63ee5163fb915274c9780c169e1f8673755bba47
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
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>
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>
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>
My previous fix for CPU load issues between HTTP thread
and user thread was fragile if the upload QIODevice
emitted readyRead() multiple times.
[ChangeLog][QtNetwork][QNetworkAccessManager] Fix behavior of upload QIODevice
that generate data on readyRead() for HTTP PUT/POST
Change-Id: Idb1c2d5a382a704d8cc08fe03c55c883bfc95aa7
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Reviewed-by: Richard J. Moore <rich@kde.org>
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>
Radio button, checkbox and non-editable combobox, in normal,
small and mini sizes, and only in the inactive state.
This commit amends 982b9b7ec2.
Task-number: QTBUG-40833
Change-Id: If3f2bb215e9b8966cbf15f08fa252feb92483c7b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.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>