The "data" pointer became technically dangling after line 1866 did
copy = data;
as copy was the last reference to the original data. That made the
pointer address available to be reused by the system malloc(), which
sometimes happened, causing the unit test to fail.
Discussed-on: http://lists.qt-project.org/pipermail/development/2014-April/016588.html
Change-Id: Ifa6a27bd53a6e60392b77a6609f2d47148695211
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
After cross-checking with the spec and some embedded devices providing
both 888 and 565 configs, it turns out the behavior and the old legacy
comments are correct. Rephrase and extend the comments a bit to make
it maintainable.
Change-Id: If6043a39ca0129cfd075c997f362891f0c28dc2c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Introduced a new environment variable "QT_LOGGING_TO_CONSOLE".
When set on QNX for instance, log output is directed to the console
instead of slog2. This can be more convenient when working on the
command line. Besides, many declarative auto tests expect that,
as well.
Marked QT_NO_JOURNALD_LOG and QT_ANDROID_PLAIN_LOG as deprecated,
to be replaced with QT_LOGGING_TO_CONSOLE.
Change-Id: I7329fa2d10d31506eff145e956eaaa45d94f8e20
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We can't and don't need to create a swap chain for the desktop widget.
Change-Id: I84cd5c753710af09bab5c7afc27e202e661343db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
Add missing libraries that were otherwise pulled in by opengl.prf.
Task-number: QTBUG-38431
Change-Id: I1705d432088a47b5a202595e818e9efcd5f6a4cf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Earlier, only the back press was checked for acceptance. By also checking
the release event, this makes the backstepping behavior consistent with
Qt for Android, and fixes the expected behavior found in our demo
applications.
Task-number: QTBUG-35951
Change-Id: I9c2f18816b838d57713ba4dd3624e2f3f1ac40ac
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This is required by Windows Store Apps to pass certification.
Task-number: QTBUG-38481
Change-Id: I6dc00431ee5f6c7d4c64111ccc38f46483d3b9a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
All read calls are now pulled from an intermediate buffer which is
populated from the asynchronous callback (this was a TODO previously, and
was breaking downloads of large requests). As a side-benefit, the use of
only async callbacks ensures fewer first-chance exceptions appear in the
debug output.
Task-number: QTBUG-30196
Change-Id: I5653742d8d94934a4b4a4227298865d20518bc4c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Fix an error identified by static analysis from
http://www.viva64.com/en/b/0251/
Change-Id: I3b69f8eb8c9e10772d5ca2afad75582e8a54beb7
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Fix copy-paste error identified by static analysis at
http://www.viva64.com/en/b/0251/
Change-Id: I214d6bf8494a946a6c772b6dca1395e4140a471f
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
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>
"key" is accessed with a "Get" function and should
not be released. Switch from using QCFString to a
CFStringsRef.
Change-Id: Id4eecc642de8698314fc57d44af05c202966b11c
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: John Layt <jlayt@kde.org>
If the user changes the printer name in the Mac print dialog then
update the print device in QPrint to reflect this.
Task-number: QTBUG-37808
Change-Id: I3aaf27e2db7277ab083dc8f8d59f0f80ecd424f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Let textBeforeCursor return the text immediately before the cursor,
and not the text at the beginning of the paragraph, even if that is
also technically before the cursor. (Apparently I do not know the
difference between left and right.)
Change-Id: I6043ebe53838e68880b6407dbb9e5370bc785c1b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
It has been fully obsoleted by 4255ba40ab.
This reverts commit 99eecab83d.
Change-Id: Id7b8d3bba27ff43e38e4fe32a4f2950de9ced493
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
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>
Allows disabling pulseaudio and alsa support at configure time
making builds more deterministic.
Change-Id: I4f1719cf831458b1d5ad3ebc01f6782b897d392c
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Followup to debe31e047 : a popup
window can have focus, but a QQuickWindow needs to know why
it loses focus when a menu is opened, so that for example
copy/cut/paste Actions can apply to the text which did have
focus before the menu opened. The event's focus reason provides
enough information to deal with this situation.
Task-number: QTBUG-36292
Task-number: QTBUG-36332
Change-Id: Ifae999a364a61b125a4764c9db204a167bddf0b7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Revert 3bb9024952. That fix was an attempt
to handle the issue that has been fixed in 5.3 by
9063edef79 and should have been reverted
when the new approach, that restores Qt 4 behavior for widgets, was
introduced.
Task-number: QTBUG-38242
Task-number: QTBUG-36423
Change-Id: I8f8a82da22605fac90543492e9b2cd2b568544e7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QOpenGLContext uses glGetTexLevelParameteriv on desktop OpenGL and so it
got recently added to QOpenGLFunctions as part of the dynamic GL loading
support.
This is unnecessary since such desktop-only code can use the versioned
wrappers (QOpenGLFunction_1_0 for example). In related upcoming changes
in 5.4 the function is removed. This change has to be backported to 5.3
to prevent introducing this public API unnecessarily.
Change-Id: I6fc331091e4e6416e430bf985afcc17a392fc2e3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.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>
There is no guarantee that the handle from std::thread will be valid
when a wait is made. Instead, simply use an elapsed timer and check
if the thread is finished. This prevents an exception from being thrown
when a bad handle is encountered.
Task-number: QTBUG-31397
Change-Id: Ie2a7e6cbfbb27bf1baff779322670d85e92e10dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
If QFont reports a family name that cannot be used to instanciate
a UIFont, we end up trying to insert a nil object to an
NSDictionary. This will raise an exception.
This patch will check that we have a valid UIFont before using it.
Task-number: QTBUG-38018
Change-Id: Id8a2e4afea8c915ff43a7e4680304ba19328f9c2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Qt Quick does not have the widgets workaround of explicitly hiding
the input method on focus out. This fix copies what happens in
the iOS port: Commit the current preedit and reset the IM when we
see that the focus object changes.
Task-number: QTBUG-38047
Change-Id: I30805265286dc650b3734e2a24807cdc8bfbcd16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
As long as QWindowsFontDatabase::fallbacksForFamily() does not take script
parameter into account, we should prefer QFontEngineMultiQPA's loadEngine()
implementation for complex scripts; otherwise we could fall into a situation
where reported fallback fonts doesn't support the requested script at all.
This finishes c3b2425791.
Task-number: QTBUG-37836
Change-Id: I2c43d97f1331ad05116856f9fe77560ed4dd02c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-helps the QDoc parser read C++ API when the macro is excluded.
Task-number: QTBUG-33360
Change-Id: Ic7e86c0d1cec4a1960d20b1c92c4b60396eb3ea6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Users can choose to use different UI languages and regional settings on
their devices. QTranslator::load(const QLocale &) function uses
QLocale::uiLanguages() and not to the locale name, which refers to the
formatting of dates and numbers.
Change-Id: Iec6327dd1e91d913176499b23482d725b9d0a8aa
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The make targets had no dependency to the built binary. Therefore
when building with multiple make processes(-j8) it was not guaranteed
that the binary was available for the objcopy tests.
Change-Id: Ifd04e3f49fdadf030e82e81498668899ad4e7fd3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>