Mark the window as not opaque and give it a transparent
background when layering OpenGL below the window.
Change-Id: I2188842249c592f17619f7a2c3ef1fd30958987e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Cast the NSWindow to a QNSWindow instead. Now there
is no way we can fail to maintain the hash properly.
Change-Id: I5fd03b6fad964a61fadb3460b7063fd43ff25c79
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Clear the QCocoaWindow pointer stored on the QNSWindowHelper
when detaching from the platform window. This makes
sure callbacks from cocoa does not try access deleted
Qt window objects.
Task-number: QTBUG-39141
Change-Id: I4672eae92940dcbd59a2848e56f94b50a828bbf6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
For whatever reason direct2d and the raster engine disagree by one pixel
about the positioning of positively sloping aliased lines. To get the same
output, we shift such lines by one pixel.
Change-Id: I4b20319770c02e3fdd212b3535ccae3c27ca9f2f
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
If you do sock->write(data) followed by sock->close() then the data
written is not transmitted unless you flush when using QSslSocket but
is when using QTcpSocket. This change makes QSslSocket work like
QTcpSocket.
Change-Id: Ia2e1c021dc48ac0d573f78da782ea77641c03bc1
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
beginModalSessionForWindow will center the window and ignore
the set geometry. So to workaround this it checks the new value
against the old one and moves it back if need be.
Change-Id: I38bc74c04138992f2e0570fca666414025aeeba8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
In WindowsVista style and later the sort indicator is placed above the
text as opposed to alongside it. Therefore the extra space given is moved
to the common style allowing styles that have it placed differently to
easily ensure it is not included.
Task-number: QTBUG-19915
Change-Id: Ic21fcc1d95f4c3cc2eb9c465e1c8afb9b805389a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
IANA reserves scope ID of 0x0 to mean "no scope ID", so make sure that
we don't try to set it when reading from the sockaddr_in6 structure.
Change-Id: I71b207e6f8262ab2bf9fde993288a71ba63c7572
Reviewed-by: Richard J. Moore <rich@kde.org>
Don't use only the GL version, as vendors expose many many extensions
on viable hardware.
For instance, I have a NVIDIA G210 which supports up to GL3.3, but
which features immutable storage, immutable multisampled storage,
texture buffers and ranges, stencil texturing, and cubemap arrays.
Change-Id: Ie6023ee854b679737fca982578cb2093e10d083f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The documentation needs to use the defined parameter names for the signals
as this is what QML will make them available as if they are used in a
connection to that signal.
Task-number: QTBUG-35694
Change-Id: I0f56b9e1ace45cfff72c45273dd64766e3c792f2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
On Windows, it is possible to pass native Windows paper source
ids >= DMBIN_USER to QPrinter::setPaperSource() and they are
listed by supportedPaperSources().
Task-number: QTBUG-38897
Task-number: QTBUG-38888
Change-Id: I8f1264e80ce5bdddd3873602200b24eabee00502
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Factor out common code paths from the QPixmap/QImage conversion
code and use the same algorithm for copying the image data with
alpha correction as does qt_pixmapFromWinHBITMAP().
Rename the previous version of qt_imageFromWinHBITMAP() to
qt_imageFromWinIconHBITMAP() since it is used for HICON conversion.
Task-number: QTBUG-39084
Change-Id: Ia4042c33db485c3604461a5eafd6282968b36e3b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
A typical pattern in an application is to listen
for "enter" in a line edit and transfer focus to
the next edit in the focus chain. This would currently
not work on iOS since we would force the keyboard down
after delivering the KeyPress/release events, effectively
overriding any focus handling done by the app.
This patch will hide the keyboard _before_ sending the
events, so that we don't override focus handling done
by the app. By also hiding the keyboard using
QInputMethod, the hiding will also be delayed a bit
(in QIOSInputContext) to catch subsequent hide/show calls.
Change-Id: Ic19511d494a55d1bda963ed9bc7185d63b51bc03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
- rectify confusion and outright disinformation about argument quoting
- say that open() is an alias for start(), not the other way round, as
this is more consistent
- apply some trickery to hide mergeable startDetached() overload
- rename program -> command where it stands for a joined command line,
for consistency
- copy less information to the various overloads
- misc language fixes and reshuffling
Change-Id: I1b9c8dbed003f551ee6855044bbfc0aedddb4757
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The _HAS_EXCEPTIONS=0 define that was introduced in commit
f59083636b leads to lots of C4275
warnings:
non dll-interface class "stdext::exception" used as base for dll-interface class "std::bad_cast"
from the <algorithm> include in qglobal.h.
Newer versions of MSVC do not have this problem.
Task-number: QTBUG-39126
Change-Id: Ieea5adde649fe16e6b41fbbb23fd582b3bb12b89
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
the location of the import paths have changed a long time ago.
also, we can make use of QTREPOS now.
Change-Id: Iee50854b7441968c3c60538e54d9312e53d39cb6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
now that we have QTREPOS, we can use that directly instead of collecting
the QT.<foo>.qml dirs. as a "side effect", this makes qml modules without
a corresponding c++ module available to the scan.
Change-Id: I6f172121588ec01c9fa47a99d9990bf9fcfbc69f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
we need to store commands with system path separators in the .pri files,
as we might clobber windows command arguments if we just converted
separators later on. and we can actually do that, as the path separators
are actually bound to the host system, not the shell.
we also need to shell-quote the commands, as whitespace, and more
commonly windows path separators in an msys shell, would break things.
we delay this to the last moment possible, as it does depend on the
shell.
Change-Id: I1fe6b63aebd5663b72492c32928ec397f86e336f
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Doing makeCurrent() followed by destroying the surface (and no
doneCurrent) results in still having the pointer stored internally
in the QOpenGLContext. If then a function like defaultFramebufferObject()
is called, the pointer is dereferenced.
To fix this, the doneCurrent() has to be called when the surface is destroyed
before the context without doneCurrent(). This is pretty much what the
user would expect anyhow.
Task-number: QTBUG-38994
Change-Id: Ibd4083d9291c7fd39b38ce81a988a8e0c9d55d60
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Instead of loading the default font "Helvetica", which is likely not
part of the package, load the first font found.
Change-Id: I225979986883a26c3fec72858cf32c3d1e45d902
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
It turns out that supporting HighRes painting with Direct2D is quite
simple. Two things are necessary.
First, we set the unit mode to D2D1_UNIT_MODE_PIXELS on all our device
contexts, which tells Direct2D that we specify everything in pixels.
Direct2D will internally do the required conversions.
Second, we scale font sizes according to DPI.
Previously rendering errors resulted when a highres mode was used, this
fixes those errors.
Task-number: QTBUG-39105
Change-Id: Ibb4dbea4746687228249e2c36d48c4bd6c5c7bf9
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Use QTRY_COMPARE instead of hard-coded timeouts, ensure window is
shown.
Change-Id: I4f23144ee14150c4fba9c6fbd8c4ee2da472cc75
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The call to processEvents had the flags separated by a comma instead of
bitwise OR. This worked because processEvents has an optional second
argument that is an int.
Change-Id: I6dc74bc44b1d782aa7206f106c51c16eab5f2a76
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
When these extensions aren't available, use ANGLE's versions of them.
Task-number: QTBUG-31010
Change-Id: I9a85b9f4d2bb60bdb1d79c92edf241b95d0627bf
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
If the prefix isn't "m2" for the 2013 namespace, Visual Studio Update 2
won't open the document in the designer view. Even though there is
nothing technically wrong with the way it's currently done, change it to
"m2" to keep VS happy.
Change-Id: I62721114610de5396eb507828b39db89c1e96b1a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Previously, the backing store and default framebuffer were created with
the logical screen resolution (in device-independent pixels), not the
the physical screen resolution. This lead to blurry text on high-DPI
devices. This change fixes this by creating those at full size, and
setting the device pixel ratio appropriately. Windows are still reported
in device-independent pixels, but text and images are now rendered
sharply for Qt Quick applications.
As QPainter does not support non-integer scaling, the backing store is
still drawn in DIPs and scaled by OpenGL.
Task-number: QTBUG-38464
Change-Id: I7377d4c734126825d670b8ebb65fd0dd1ef705f2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
ANGLE has been creating the framebuffer in logical pixels instead of
physical pixels, which leads to unexpected results and side effects like
smudged anti-aliased text. This fixes the issue by multiplying the DIP
resolution by the scale factor, making the framebuffer match the physical
pixel resolution of the screen.
Change-Id: I3594995ce8e18a31b47e27165f72bc6a391b97b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
- Unsupported code paths for WP8.0 are avoided, and new APIs are used
where appropriate (virtual keyboard)
- DirectWrite fonts are loaded on WP8.1
- Platform dialogs are used on WP8.1
Change-Id: I721006ac943ad4e248f0f1590ce247a03e40fbc0
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Tweak qmake, add mkspecs for emulator and device, adjust the
manifest template for WP8.1, and add missing icons.
Change-Id: I7a6405fa85297ae4cc8522015274e65fb7a315a6
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The function already needs information from the engine for conversion,
moving it into the private class makes it possible to get this info
directly in the method and makes calling the method nicer.
Change-Id: I47fa9a4531d0d0605aa587fba90fbfdf036f0998
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This function was used only in one place and duplicated a lot of logic
with the very similar QVectorPath conversion function. Just use
QVectorPath everywhere instead.
Change-Id: I3a4821f0452634c309ca0730047ea6ef7a7591ca
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Hooking into the caching mechanism gets us a measurable performance boost
for paths that are drawn repeatedly, around 10% on my machine when drawing
aliased arcs.
Change-Id: I32f4ed7daa8a51b5c5a9c6d5414ab5d4ef759f70
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Implementation will be added for Qt 5.4.0 as it cannot be done
sooner.
Change-Id: I4d2626416fae99339988cd994653ce7ec753f081
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSqlResult::bindValue(int index, ...) is increasing the memory usage
when called multiple times for same index
Task-number: QTBUG-33169
Change-Id: I4f26125f6bb994bb430dc054df5761b6ddf03075
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This fixes an issue where, if characters were removed from several
blocks in a single edit, the document layout would end up being
corrupted since the document layout manager wouldn't re-layout the
proper number of text blocks.
Task-number: QTBUG-30051
Change-Id: Idf3a6f567120e6a5dbebf1f65f685d374219328a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
When syncing between QAction and native NSMenuItems, the ampersands
(mnemonics) were removed twice. This lead to double ampersands being
removed instead of replace with single ones.
Task-number: QTBUG-37933
Change-Id: If1d9cd247b467472647b22b38460b44b03f13d82
Reviewed-by: Liang Qi <liang.qi@digia.com>
... because it fails on the new network test server. The Socks5 tests
in QUdpSocket have already been disabled by commit
aa3eaf9d2e .
Task-number: QTBUG-35490
Change-Id: Ib062adb422ff6e5538f14d15a266d79c3bb53956
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
The data given to putenv(3) becomes a part of the environment, as
described in SUSv2, so If the data is unintentionally modified or
deleted the consequence can be fatal.
In previous versions of Android, the putenv(3) implementation made a
copy of the data, so this bug has gone unnoticed.
Task-number: QTBUG-39042
Change-Id: I20559c848fded10eeae54c4700ba0f4669fe49fc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
If the project has a custom Info.plist assigned to
QMAKE_INFO_PLIST, we should leave it as-is without
scanning and replacing contents inside it. Since we
always copy the file to the build folder at qmake
time, any later attempts to modify the source file
will not have any effect.
A better solution is to just reference the custom
plist directly from the Xcode, without modifying it.
This change will also stop unixmake2 from assigning the
default plist to QMAKE_INFO_PLIST, since we need to
know in the xcode generator if the variable was set in
the project or not.
Task-number: QTBUG-38260
Change-Id: I3c488b2960170c544d94f9db89d3ca95ee290bdd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Qt sometimes report that the selection anchor is placed before
the cursor when querying it for current selection. We need to
accomodate for this when reporting current selection back to
iOS, since it expects the range to always be positive.
When pressing backspace, iOS will select the letter that should be
deleted, and then call "deleteBackwards". If holding down backspace
for a while, it will start selecting whole words instead.
Since we reported negative ranges during this process, it caused
artifacts and stray letters to be drawn.
Task-number: QTBUG-39073
Change-Id: Ida9518307adce915adf49160b541a2f88637a0da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Any bootstrapped tool is a development tool, by definition. So the
effects of seeding the hash with a random number can cause the same
source input to produce different binary results, which can throw some
caching tools into disarray (like the Open Build System).
There should be minimal fall out from the reduced protection against
DoS. Since those are only development tools, "specially crafted" input
implies the developer is DoS'ing him/herself.
Note: the change to qhash.cpp applies to moc and rcc, which are always
bootstrapped.
Change-Id: I061ab52036e40627c0703f1bf881455cbf848f43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>