Fix copy-paste error identified by static analysis at
http://www.viva64.com/en/b/0251/
Change-Id: I2e454c2e7535924dd533c0ceb4fd2283a8f9862f
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
This is the case for QWidgets added as native menu items with
QWidgetAction. According to Cocoa's documentation [1], we should
rely on -[QNSView viewDidMoveToWindow] instead.
On 10.9 however, we receive NSWindowDidChangeOcclusionStateNotification
from the NSMenu window, which is preferable to using -[QNSView
viewDidMoveToWindow] as it guarantees the view is actually visible.
We do runtime symbol lookup to get this to work on 10.9 regardless
of the build SDK version.
[1] https://developer.apple.com/library/mac/documentation/cocoa/Conceptual/MenuList/Articles/ViewsInMenuItems.html
Task-number: QTBUG-19840
Change-Id: If4676df5d79c359965f09ef2e5eddf4c925e3533
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Includes the Cocoa implementation.
Task-number: QTBUG-19840
Change-Id: Id33bc8053b82116cf76ed591b6df823df3aef9bc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The widget's background is transparent, but Qt is not owning the
backing store in this case, so we must make sure it gets properly
cleared and flushed.
Task-number: QTBUG-19840
Change-Id: I1087ce80aae3620d64a8c180129d79b5b022750b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
In QWindowsPipeReader::waitForPipeClosed we must check for available
bytes in the internal buffer and trigger the notified signal.
This fixes tst_QLocalSocket::writeToClientAndDisconnect on Windows.
Change-Id: I0f4d6cd73a0a8eac5b438b82984457068a9551d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The file will not exist if the accessible plugin is not built.
Task-number: QTBUG-37849
Change-Id: I2983d01a085b11737bf49805edab5ca33fb5174a
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The cmake_parse_arguments macro is used already in the file. The
module happens to already be included via Qt5CoreMacros, so the
existing code is not currently a problem. Add the include to
comply with 'include what you use' and to ensure that it continues
to work even if Qt5CoreMacros is changed in the future.
Change-Id: I7369261bce9d0e58488e584ef0743e33e9f9ec9e
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fixes QFileSystemWatcher::addPath() auto test when polling file system
watcher is in use: adding the same path twice should fail.
Change-Id: I2a0df3ffa587fa90fae744858f4471d667443e6f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
We were incorrectly bailing out early in the text drawing code when there
was no pen. This is incorrect as drawing with only a brush should be
possible.
Change-Id: I94eaadd3cf6c4d82033b5d74d7ca47a05601083f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Refactor duplicate logic in painterPathToPathGeometry and
vectorPathToID2D1PathGeometry into one utility class. At the same time
make the naming of the two functions consistent with each other.
Change-Id: I03c8fc183863473b7337223e51835cf080914a41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Detect rectangle hints in the QVectorPath and react accordingly.
Change-Id: Ic72ce0c46d10e995c0824972854e2d88162eae45
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This change adds support for those gradients which can be expressed using
Direct2D. At the moment this means linear and radial gradient with pad
spread only.
Change-Id: Ib1b1bc38a793dd826a259bbf8a7b31c25906dd59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
destroy() or destructor complain when QOpenGLTexture is not created or
it is already destroyed.
Change-Id: I6b3135849e3ba2ce35678fcdbf1c9b6e588a063c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Some functions in qmath.h was documented under QtMath, and some under
QtCore/qmath.h, the latter does not appear to lead to functional links
in the function list, so we should move them all to QtMath.
Task-number: QTBUG-37799
Change-Id: I3118c65ccbfb2401bdc324dbef2885d4e7d1c8f6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
If D_FLAG_FILTER is set, duplicate name entries are filtered out, so
this flag has to be set along with D_FLAG_STAT in the call to dircntl.
Also releaved dependencies between defines__EXT_QNX__READDIR_R,
__EXT_QNX__READDIR64_R and _POSIX_THREAD_SAFE_FUNCTIONS
Task-number: QTBUG-38189
Change-Id: I4e620cb9967e3d1baf6f2109a7c83703702f805b
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
None is a valid return value for parent in xcb_query_tree_reply_t.
If that is used as the new parent the next call to
xcb_query_tree_unchecked will fail with a BadWindow error.
Change-Id: Iafe29b223ca65c86ecfd40fe51e67d4bd7abc1ce
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
The declaration of q_SSL_ctrl is ifdefed, so ifdef it's usage too.
Change-Id: I99a53af6f4f24ed991d39ab89f18e03b8f38c617
Reviewed-by: Richard J. Moore <rich@kde.org>
Required to repaint OpenGL content properly.
Task-number: QTBUG-38105
Change-Id: Ie9441d56bd9d1a4eb399210369592f03e19c4929
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When Xlib detects that its underlying XCB connection got into an error
state, it calls its I/O error handler. However, the default
implementation doesn't print the error code from XCB which might be
useful for debugging.
This commit adds an I/O error handler which prints the error code from
XCB with a string describing the error and then calls Xlib's default
error handler.
Change-Id: I7f1fb3f1e8d0fdc3ac9db03ae7d154330c31db0c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Say you have a string with logical contents "abc ABC, " where
lowercase is LTR and uppercase is RTL. In this case, the UBA
will give "abc " LTR direction, and "ABC, " will get RTL.
However, our itemization currently divides "ABC, " into two
script items: "ABC" and ", ". CoreText will return glyphs in
visual order, so for the first we will get "CBA" and for the
second we will get ", ". But as the ", " item has an adapted
directionality of RTL in the context of the full paragraph, it
should actually be " ," visually.
This caused a mismatch which broke the tst_QComplexText test
with HB-NG using CoreText backend. As a temporary fix for this,
we check whether the directionality of the first run in the text
is different from the directionality expected by HB-NG. If this
happens, it means the order of the glyphs produced by CoreText
will be the reverse order of what is expected by HB-NG, and
we therefore need to reverse it.
Task-number: QTBUG-38113
Change-Id: I9f5a041791e4529a14041a362b2d5dd00490a38b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Adding a native widget such as QGLWidget often causes
other widgets to become native, through native ancestor
and sibling propagation.
This includes QFocusFrame, which typically sits on
top of item views. QFocusFrame is mostly transparent
(except for the frame) and also has the WA_TransparentForMouseEvents
flag set. Its window has the corresponding
WindowTransparentForInput flag set.
Cocoa does not know about WindowTransparentForInput.
Forward the drag calls to the correct window.
Task-number: QTBUG-37077
Change-Id: I02201c7027915b1e82d0cd7e9c2e787ca6b2338b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Look for and load "@2x" image versions. Adjust
getPixmap/ImageSize to take the image devicePxielRatio
into account.
Use doc->documentLayout()->paintDevice() to get the
target window devicePixelRatio (like the existing
DPI-based scaling). In practice this pointer may/
will be null, fall back to qApp->devicePixelRatio
as usual.
Task-number: QTBUG-36383
Change-Id: Ib5e113b67242b5a9b3410272f2183a76a60bc773
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
ctrl + K : Cut
ctrl + Y : Paste
ctrl + F : Cursor right
ctrl + B : Cursor left
ctrl + N : Cursor down
ctrl + P : Cursor up
ctrl + V : Cursor next page
ctrl + O : Insert line separator
(ctrl as in the key, not Qt::CTRL)
These are low-priority (0) key sequences. Add them to the
end of each StandardKey range and change the priority
of an existing item to 1 where it makes sense.
Task-number: QTBUG-32837
Change-Id: Id321e6c6ad4277d729b27297a1de66c4628e4201
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Extend the unified title and toolbar gradient to
tabs in document mode that are adjacent unified
tool bars.
Change the updateMacBorderMetrics() function to
register the tab bar geometry and visibility status
with the Cocoa platform plugin. The Cocoa platform
plugin will then merge this area with other registered
areas if possible.
Add QCocoaNativeInterface::testContentBorderPosition().
This function tests whether the given point is within
the unified title and toolbar area.
Use testContentBorderPosition() in QMacStyle to enable
code paths that skips drawing the QToolBar bottom
separator line and paints the active tab background
with transparent pixels to make the background gradient
visible.
Change-Id: I2b70f9bb0c2c59af053a691a7df538f958783dab
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add setContentBorderAreaEnabled() which us used to
enable or disable an area. Used together with
registerContentBorderArea() this allows changing the
border area geometry and enabled status independently.
Add section to the QToolBar show/hide event handler
which calls setContentBorderAreaEnabled().
Make sure QToolBar and QToolBarLayout uses the same
identifier - the QToolBar object pointer.
Rename enableContentBorderArea -> setContentBorderEnabled.
The "ContentBorder" is now the entire unified toolbar
area while "ContentBorderArea"s are the sub-areas
covered by toolbars.
Change-Id: I339f381a50856e048ae40e7ffadd6a8a510c4994
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
instead of assigning plugins to the first module which claims the whole
type, try to assign it to a module which the plugin claims to extend.
as we are getting stricter in that go, somebody needs to claim the
'generic', 'platformthemes', and 'platforminputcontexts' plugin types.
the natural claimant is QtGui. however, as we don't want to auto-link
any of these plugins, make them all claim that they extend a
non-existing module.
QtGui also claims 'iconengines' plugins.
the 'printsupport' plugins are also claimed by the respective module.
Change-Id: I7af7c16089f137b8d4a4ed93d1577bd85815c87b
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
the plugins already declare which modules they belong to.
additionally, we allow plugins to declare which modules they "extend" -
e.g., while the Quick accessibility plugin belongs to Gui's 'accessiblity'
type, it makes no sense to link it unless Quick is actually linked.
finally, it is possible to manually override the plugins which are linked
for a particular type, by setting QTPLUGIN.<type> (to '-' if no plugins
of this type should be linked at all).
Task-number: QTBUG-35195
Change-Id: I8273d167a046eb3f3c1c584dc6e3798212a2fa31
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Despite supporting DH and ECDH key exchange as a client, Qt did not provide
any default parameters which prevented them being used as a server. A
future change should allow the user to control the parameters used, but
these defaults should be okay for most users.
[ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange
cipher suites when acting as an SSL server has been made possible. This
change means the you can now implement servers that offer forward-secrecy
using Qt.
Task-number: QTBUG-20666
Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Nested initialization is broken before SP2, so just disable the whole
feature as tst_qvector crashes(release)/fails(debug)
Done-with: Jedrzej Nowacki
Task-number: QTBUG-38186
Change-Id: I9c5c9e55c75854fc1f05a59fab2ac7dce9b37fbb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Change QToolBarAreaLayout::item() to return a pointer
and check return values in plug().
Task-number: QTBUG-37183
Change-Id: I7029eb9739cbe603460e87d3e5493f116bdb3a89
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
"Shared objects still referenced" dlerror should actually be treated as
"for your information" only, not as an actual error.
Change-Id: Ie02bd1db0dd2dc93bb759f8b6c7e825070e17bb9
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
offsetHi needs to be casted first before shifting.
Change-Id: I29c773dd13d5b16042629604015bbf5645fab861
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Enabled for QToolBar to allow it to overlap OpenGL widgets when
expanding.
Task-number: QTBUG-33082
Change-Id: I76dc8da52bc04eedc6d6779c48753da100ed1c9f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This is not Qt style, not needed, and clutters the code, so remove
QPageSize:: qualifications where they're not needed.
Change-Id: Ia93ac9523ef43a40cf4dab3bcb383a54af666c96
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The created page format must always be released,
even if one of the subsequent PM* functions fails.
Change-Id: If42aaeccd6bdb51ba53444f491ca2878783d0678
Reviewed-by: John Layt <jlayt@kde.org>
Fix reference counting error in QCocoaPrintDevice::
createPageSize(). "key" is accessed with a "Get"
function and should not be released. Switch from
using QCFString to a plain CFStringsRef with manual
ref counting.
Task-number: QTBUG-38023
Change-Id: I04d661bffeb5b3122b0c3c8eaaffdd1af51842fd
Reviewed-by: John Layt <jlayt@kde.org>