This continues 68762151db
When doing format conversion, the optimized inplace codepath did not
check if the image data was external, i.e. if the QImage had been
created by the constructor taking an existing external buffer.
The previous commit fixed the readonly case. But in the case of the
QImage constructor taking non-const uchar*, data will be read-write,
but still external. This would of course crash if the converter tries
to realloc it.
Task-number: QTBUG-44610
Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Since the new filename might not yet exist and DeleteFile() will fail if the
new file does not exist then MoveFile() should still be called.
Change-Id: Id4576ade079ad8593f824b7100bb0d94aec1fa0a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
If the coordinates were too close (at the limit of the number
accuracy), the splitting algorithm in QBezier::shifted() would never
finish. Ref. testcase in bugreport.
Task-number: QTBUG-44674
Change-Id: I2a575cdc6284504ef5e3eb2b749857576fe433c3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
www.example.com is a reserved domain (RFC 6761), but IANA is running a
web server there. As for www.foo.com, that also exists, is a real
website and is often content-filtered in corporations (it triggers a
firewall warning for me -- "You attempted to visit a site that is in
violation of Intel acceptable use guidelines").
So use a localhost instead, since we don't actually need to connect to
the servers to do the work. And since we don't need to connect, I chose
port 4 as it's extremely unlikely someone is running an HTTP server
there (/etc/services lists it as unassigned).
Change-Id: Ia0aac2f09e9245339951ffff13c82439c6d5f945
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This reverts commit 24c52bd44b and makes
the Qt unit tests requiring DNS zones to use the temporary test zone in
macieira.org (Thiago's domain).
Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Register font's english name as alias in the callback of
EnumFontFamiliesEx() at the time
QWindowsFontDatabase::populateFontDatabase() is being called. This will
help us to resolve english font family name to its corresponding localized
alias once windows font database has been populated. It will also fix an
assertion in Chinese Windows.
Task-number: QTBUG-44647
Change-Id: I265d93c16a1677a7f31ff56d60c24f6e90666419
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
In the case of Windows Embedded Compact we need to delete the destination
file before doing the move if DeleteAndRenameFile has failed since
MoveFile will fail if the destination file exists.
Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
- Online CSS tweaks: Max-width, font-sizes,
font-weights to improve readability, other
minor fixes
- Remove duplicate include statement and unnecessary
definitions for online template
Change-Id: I713bddd0e175235668c4d9790d0df58b4131d19f
Reviewed-by: Martin Smith <martin.smith@digia.com>
This change updates the copyright information as it appears
in the footer for both offline and online documentation
templates.
- Update copyright year to 2015
- Update copyright holder to The Qt Company Ltd
Change-Id: I82fef6067dee42ec9db561aef9c3c506beafb3c6
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
When doing format conversion, the optimized inplace codepath did not
check if the image data was readonly, i.e. if the QImage had been
created by the constructor taking an existing external buffer.
Task-number: QTBUG-44610
Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
it's documented to fall back to Prefix if qt.conf is present but
Settings is not specified.
Task-number: QTBUG-44644
Change-Id: I8ef6659cbdad51b2fb3c1075ea6f0af4997117ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Allow setting of pg_config path for cross compilation where pg_config is
not in the command search path (do the same as for mysql_config).
This is e.g. used for buildroot (see [1] for details).
[1] http://lists.busybox.net/pipermail/buildroot/2015-February/119714.html
Change-Id: I11d084496ffbb6f8bc350dbcf2971a5be8e3b346
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
While the -fuse-ld=gold flag is related to linking, it is an argument to the
compiler driver to tell it what linker to execute, NOT an option to tell the
linker to behave differently.
So it shouldn't get prefixed with -Wl when passed though the compiler driver.
Change-Id: I2b50cb6d2bd8911aa9b305cd8e755d4dfe923041
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The files were moved to a qrc resource, so the string is never empty,
we need to use QFile::exists to make sure they exist.
And the error message was wrong, pointing to current dir.
Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
If one asks for the global OpenGL context via the right attribute,
and then creates a QGLContext sharing with that context, Qt will
create anoter, dummy QGLContext owned by the global context.
At application shutdown, and specifically after ~QObject of QGuiApplication
has run, the QObjectPrivate dpointer gets destroyed. That destroys the
owning global QOpenGLContext, and therefore that dummy QGLContext as well.
However, QGLContext dtor triggers a code path that accesses qApp as
if it were still alive. That's not the case any more -- it has already
been destroyed. So, introduce a check and avoid dereferencing NULL.
Task-number: QTBUG-44621
Change-Id: Ic160ac99e9269db999e76229b1c7f8c53bd2be61
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This test accidentally causes the screen reader (in newer Gnome
environments) to be launched. This messes up the CI machines enough that
nothing works afterwards. Disable the whole test until I write the
proper fix. We don't lose anything because it was marked as
insignificant anyway.
Task-number: QTBUG-44434
Change-Id: I410e80580977178ea99a370c6c0909d1fb49a71c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.
Task-number: QTBUG-44547
Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
before marking the backingstore as dirty. The QWidgetBackingstore has an
assert that the region or the rect passed in is not empty, hence its
programming error not to check before calling this function.
Task-number: QTBUG-43489
Change-Id: Ic67fb6ca7959466e1758ce91827cd4b8acdf73fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Those QTimeZones failed to convert to other timezones because the data()
virtual function was never overridden and reimplemented. That meant all
QUtcTimeZonePrivate objects were *really* UTC, with no offset.
Task-number: QTBUG-44600
Change-Id: Ia0aac2f09e9245339951ffff13c5294bb783c674
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The c2m() function which converts a const_iterator into an iterator
is a broken concept for an implicitly shared container such as
QVector, because the act of calling begin() as the starting
point already detaches and invalidates the c2m argument.
This could be fixed in c2m, but the bug wasn't even in c2m,
but in removeAll(), which called end() before c2m, so the c2m
argument was already invalidated when entering c2m.
The solution is to store the positions as indices instead of
iterators before calling the first detaching function.
Task-number: QTBUG-44592
Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The property INTERFACE_LINK_LIBRARIES has a single value
and is configuration independent.
Change-Id: I9130b1d0444563335825e3806f693a39f65ca67d
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Move the optimized dash drawing into stroke() in order to apply the
optimization to polygons in addition to lines.
In the case of polygons/polylines, a vertex patch is redrawn using the
original dash brush in order to respect the joinStyle of the line.
As the line correction code flows through both the optimized dashed path
and the standard geometry code path, line adjustment is now also performed
for normal geometry.
Task-number: QTBUG-40604
Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Done-with: Andrew Knight <andrew.knight@theqtcompany.com>
Change-Id: I668369b4aadb6a1bbbd4d621cb8ce1e3b19fbbc9
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Byte is definitely wrong. GL_OES_depth_texture states that short or int
are the only options, GL_UNSIGNED_BYTE is thus rejected.
Let's ask for the highest (32 bits). There's no guarantee that the implementation
honors this, but at least we tried.
Change-Id: I14dd9d4ab56b0b69cdab341f95f47499786d174e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
We where allowing conversion from jobject to QJNIObject without taking
ownership of the jobject. Since we are managing the JNI environment we
should not allow conversions without having the option of taking
ownership of the local ref. This is now done by making the conversions
explicit, i.e., local refs are converted through
QJNIObjectPrivate::fromLocalRef() and global refs through the
QJNIObjectPrivate's jobject constructor.
This change breaks SC, but the API is private and no usage have been
found outside QtBase.
Change-Id: I3175f171699ec3f8e65144aaebc6246bc6e5bb4d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
wait() was always returning immediately, regardless of the timeout
value, due to a timespec comparison from different clock types.
On Android 5.0, qt_gettime() uses the monotonic clock but the wait
condition was using the real time clock.
__pthread_cond_timedwait_relative() is not exported anymore in
Android 5.0, we therefore fall back to pthread_cond_timedwait().
Since the monotonic clock is now available, qt_gettime returns
a time based on it. The wait condition consequently needs
to use the monotonic clock.
Change-Id: Ie7cf909b81107edd7207c3c039b3ec1f5422303f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Most of the time the widget passed in to finish() will not yet have a
window handle so it would just call close() straight away. This
way it ensures has a window handle.
Task-number: QTBUG-35757
Change-Id: I2e212a2ea496cc4e4bba57a8c2d0d127afc43e48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
If we call them just in the constructor all the signals they sent
out can't be connected and will be lost, particularly this means
the QNetworkConfigurationManager doesn't see my ethernet connection
and thus thinks i'm not online
Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
the qt headers live in the source dir in this configuration.
instead of hard-coding the path in the project file, use the correct
module variable. this requires harfbuzz-ng to be built after corelib.
Change-Id: If1b64b59a0939d3b5190331fcf70da566d4eeedd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Whenever the selection changes it will call panelSelectionDidChange
even if the panel is not visible which causes it to overwrite our
chosen initial file with "untitled". Therefore we only set the name
when the panel is actually visible.
Change-Id: I09f7ebabce5c2139a7f74b953391d39dfad65db2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
We don't receive ButtonRelease event after closing a popup
by clicking outside of the client area. Thus the internal
state of mouse buttons in the xcb plugin becomes outdated
until we receive ButtonRelease event.
This commit updates the internal state of mouse buttons
from MotionNotify events. So when a user will move a mouse
on the client area, the xcb plugin will send a mouse event
with updated buttons to Qt Gui and QGuiApplication will
detect the following mouse events correctly.
Task-number: QTBUG-32609
Task-number: QTBUG-35065
Task-number: QTBUG-43776
Task-number: QTBUG-44166
Task-number: QTBUG-44231
Change-Id: Ica334dfbf04f7ef81db86b25262328fe5da11808
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
The current SQL plugins path are still Qt 4 style. This patch adds
qtbase to ensure users will be directed to the right place.
Change-Id: I11bf933864f0a8955079bf7175eb1e33bb5bc07f
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
replace qt-project.org/doc with doc.qt.io
also rename macosx-building.html -> osx-building.html
Change-Id: I5b4aaa187562b653407f1f99947df748c3240554
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Change-Id: I503e4e4c50a147cc1d81019228593f502132f28a
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
In some documents, "{QObject}s" was used which didn't show up as link. This is
fixed by using "\l{QObject}s" instead.
Change-Id: I90dbd543790842b242a11f3f94a32d4273ebb38d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Task-number: QTBUG-44390
Change-Id: I1a800c709d3543699131ffff13c19789a12dac0b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The current attempt to fix the problem described in b8d0fac5a9
has shown to have unforeseen issues. The assert in the
patch has been triggered in user code (see bug report), which, when
looking more closely, shows that the assert cannot be guaranteed
for all cases. E.g if user code (or Qt drag'n'drop code) starts a new
event loop upon receiving the move event, this can deliver new mouse
events before the move returns, which will trigger the assert.
So it seems like the most correct solution is to *post* the second button
event after all (directly trailing the move event), to at least make sure
mouse events are being delivered in the correct order. The crash that caused
the original change will need to be fixed by other means.
Task-number: QTBUG-38597
Change-Id: I47633d1ea310b7c16e937ef0404d9954281452c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>