Prevent application to crash with segfault in Qt bearer thread.
Corrected hardly reproduceable bug, when
QNetworkConfigurationManagerPrivate in pollEngines slot dereferenced
null and bad pointers and caused crash
Task-number: QTBUG-44407
Change-Id: I2f0b11b2d10125a21a62588d76ad824f375e4a1d
Reviewed-by: Richard J. Moore <rich@kde.org>
Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
... or compilers complain about the second, unreachable return.
Change-Id: Ic89361859fcf5cf33a57de0c803526702fa831b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
expandedTo() returns the expanded size, so we must assign the
return value (otherwise it's a no op). We were accidentally
discarding it.
Task-number: QTBUG-36010
Change-Id: Ic70c12648382a6b2ef7d70809bf25caa4cbe2f3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Add dynamic GL and remove warning about ANGLE since that
package no longer exists.
Task-number: QTBUG-46103
Change-Id: Icf93d1105434395a3c9ad61bb8c921fcedfc7137
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Currently, the Xcode generator uses "sourceTree = <absolute>" for
all PBXFileReferences. But the paths we use for referencing
libraries are relative. This patch will change this, so that we
always use absolute paths to be consequent.
This will fix a crash in Xcode that happens when opening
projects generated by Qt.
Change-Id: I3a372b93598a777c96ba353205cf19710a5923f5
Task-number: QTBUG-45966
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
ProjectBuilderMakefileGenerator::openOutput should only change back
Option::output_dir when creating a pbx file inside an Xcode project.
Since the pbx file will be placed inside a different directory than
output_dir when creating an Xcode project, MakefileGenerator::openOutput()
will redirect output_dir to be inside the Xcode project as well. Since
we don't want this redirection, we change output_dir back to what it
was once the call returns. But we should only do this when creating
the whole Xcode project, since only then we create a pbx file that
is different from output_dir in the first place.
A bug with this is seen when making qt_makeqmake.mak (which is a
helper makefile inside the Xcode project). That file will only
regenerate the pbx file (and not the whole Xcode project), which
means that we don't enter the fileName.isEmpty() section, which
means that output_dir should stay as it is.
Task-number: QTBUG-45826
Change-Id: I03d5c3dec395ff4768f9272fd1981c6fd35efb1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The NULL check is on the line before, no point of repeating it again.
Change-Id: Id6fa9ffc4dcc00819882f2d3157e9dbdb0e1db78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QCursor::setPos with Cocoa integration is calling CGEventPost. Some time is required
before the cursor position is really set, so we can not immediately call QCOMPARE.
Change-Id: I83a4c13f06ec151a4b9ab18c83de1eb5247ea9cc
Task-number: QTBUG-45553
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
The test is marked as XPASS in CI. This change follow 201bf9e673.
Change-Id: I0938b1417f792aa88fc1b40c08e7cd810e7d22f7
Task-number: QTBUG-22326
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
We should divide the fractional part of the FP1616 value by 0x10000
instead of 0xFFFF, otherwise 1.FFFF will be converted to 2.0.
And right-shifting the integer part by 16 is equal to dividing it
by 0x10000. So just divide the whole FP1616 value by 0x10000.
Change-Id: Ia89a274b81be9cf502e1f311f696a610a7f37d7f
Task-number: QTBUG-45378
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
In commit 36d6eb721e the -fPIE switch was
replaced with -fPIC in an effort to avoid generating copy relocations
which are incompatible with Qt5 when built with -reduce-relocations.
Task-number: QTBUG-45755
Change-Id: I59a55ea15052f498104848c5fd867e563ddc2290
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Saves 8 byte in each case on 64bit systems, no change on 32bit systems.
Change-Id: I2a2e8786fc7914ee9ae369ba05bedfc9e5e0ca5c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Fix Library not loaded/image not found error on application
startup.
With @rpath enabled (commit 6e18f57a) qmake now requires
a correct target.path in order to emit correct -rpath @loader_path
linker directives.
Change-Id: Ia32b038ad2d64819477be5cd9d1ed36768e2251b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
A style name 'Extra Thin' or 'Thin Italic' should be parsed as Thin
font weight.
Change-Id: I8acebed7330c23231b3742d887081d8b3d0aeb19
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The restoredScreenNumber was used before it's existence was checked,
which caused 'division by zero' if the screen has been removed after
storing the screen number.
The check if restoredScreenNumber exists was moved to happen before
restoredScreenNumber is used for the first time.
Change-Id: Iada0e8c5cbb6d8ca88df171dbee045be249f50cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
...to signatures matching the pattern:
T T::<verb in past tense>() const;
Change-Id: I75d724a3eef5cb94559e31d86914c6e0655b7f13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Append a version number to QPlatformInputContextFactoryInterface_iid
as is done for QPlatformIntegrationFactoryInterface. Start with 5.1 since
c91c05b056 changes the API in 5.4.
Use macro in plugins.
Task-number: QTBUG-46009
Change-Id: I1d1a89bde50d263354f33a6917efb1c084211842
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Append a version number to QPlatformPrinterSupportFactoryInterface_iid
as is done for QPlatformIntegrationFactoryInterface. Start with 5.1 since
a6bcdf1516 changes the API in 5.5.
Use macro in plugins.
Task-number: QTBUG-46009
Change-Id: Ib9d2a02d20b9c4c6ad6c1045a907d69d80e3def4
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Increase version 5.2->5.3 in macro
QPlatformIntegrationFactoryInterface_iid and use that in the plugins.
Task-number: QTBUG-46009
Change-Id: I491ab0ac169ede5c103b40e1bcbcbf511922a911
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This makes it easier to change the version numbers by changing
the macros in QtGui.
Task-number: QTBUG-46009
Change-Id: I94c9591ec6f7c9173a698df9e1fe8fd6a904caf4
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Prior to this, moc would not generate the function unless the
gadget class had a property or a non-constructor invokable.
Change-Id: Ic020ea5f8f59702f5e9e194a46e26850e53e5cfe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
An error similar to the one below would be emitted
by the compiler on the moc generated file:
error: assigning to 'QObject *' from incompatible type 'Gadget *'
if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
Change-Id: I75ae7bd6c46d20db2d47a80eaa08aae302d7d6c8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The wiki will be linked to from the Qt Multimedia
index page.
Change-Id: I2b60c203f759494cdf12021659847817007639f1
Task-number: QTBUG-30381
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
A QNSView without a corresponding live QCocoaWindow
object is not in a valid state. Previously we would
call removeFromSuperview for child QWindows to avoid
having Cocoa send messages to the now invalid QNSView.
Do this for QWindows embedded in native Cocoa
hierarchies as well.
Change-Id: I49c6daef8ed061b3f40138fe9b4ce6be190f2fd0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Including /usr/include and lib can cause cryptic failures if there is
already a Qt installed to /usr.
Having standard locations listed should not be necessary at all.
Change-Id: I08a15a064cc1aec126733f7e1962a2fa2ec38fcb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Expand Linux distribution detection to /etc/redhat-release and
/etc/debian_version to follow what /usr/bin/lsb_release script does.
If /usr/bin/lsb_release fails to extract the distribution information
from /etc/lsb-release, it then checks /etc/redhat-release and, as a last
fallback, /etc/debian_version.
Some Red Hat distributions have a /etc/lsb-release file that
does not provide the values we are looking for (DISTRIB_ID,
DISTRIB_RELEASE and DISTRIB_DESCRIPTION).
If both productType or productVersion are empty after reading
/etc/lsb-release, readEtcLsbRelease() will return false, allowing
further parsing of /etc/redhat-release. This scenario mimics what
the /usr/bin/lsb_release script does if /etc/lsb-release does not
contains enough information.
The productType and productVersion returned by QSysInfo after reading
/etc/redhat-release match the distributor id and release information
returned by the /usr/bin/lsb_release script.
For Debian Linux distributions where /etc/os-release, /etc/lsb-release
and /etc/redhat-release are not available nor usable, the
/usr/bin/lsb_release script also checks for the /etc/debian_version
file.
In this case, we also enable parsing of /etc/debian_version to retrieve a
fallback productVersion, the productType being set to Debian.
Change-Id: Ia20d513d78be8a8ee8c0410d0aaa052fde81a41d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This test has been initially blacklisted. However it is racy by design
and cannot be fixed. Removing it.
Change-Id: I6c386a12e54d8a382f17c4fc033428f56eb03f02
Task-number: QTBUG-23837
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Previously, for Qt::WindowModal dialogs we were creating modal sheet with beginSheetModalForWindow:
and later (from exec) calling -runModal, essentially making a window modal dialog into (now) application
modal sheet, which is not right- it's centered relative to desktop and the jump from window modal sheet's
position (centered relative to a window) to application modal was quite visible.
Now, instead of [panel runModal] (== [NSApp runModalForWindow:panel])
we call [NSApp runModalForWindow:theRequiredWindow].
Change-Id: I793dc72c7d1fe96497bb35754f4d0eac9a5e00e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
The default surface format on OS X is changed to RGBA since this
is most performant. You can request a different surface format to
change this. You can not request the default format without alpha
channel, though.
Change-Id: I4f44d0abe01515c98ba699c76a0dd5e37b873766
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Fix doc error. This function is not used in Qt 5
and there is no definition for it.
Change-Id: Id7e4fe1ada54005f65a559ae1ab393d011c37480
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
When passing Qt arguments followed by normal arguments,
a double deletion may occur due to Qt shifting argv.
For example:
argv[] = app -qwindowgeometry +50+50 some_arg <null>
becomes:
argv[] = app some_arg <null> some_arg <null>
Terminate deletion when encountering the null pointer.
Change-Id: I5279955b6bd463f5858d6e5e8e16a1f5d0945652
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Starting with Qt 5.5 qtconnectivity on iOS is supported
Change-Id: I30430ce351b7e2fc8031c5719bed5354ed234cc7
Task-number: QTBUG-45988
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Defaulting to absolute_library_soname on configure -rpath is no longer
necessary as now we support @rpath install name ids on OS X and iOS.
This also sets QMAKE_SONAME_PREFIX to @rpath for Qt modules when built
with rpath configuration.
This makes Qt libraries relocatable on OS X. Qt SDK is not yet
relocatable though, because plugin locations (including cocoa plugin)
are still resolved using absolute path (see QTBUG-14150). Also, there
are several absolute paths hardcoded in qmake mkspecs pri files.
Task-number: QTBUG-31814
Change-Id: I36b9384cd69ac609608acbe2b3d5e0512317e0d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Prior to Qt 5.4.2 (commit 36d6eb721e), we
allowed it, but now we need to enforce that it is not used. Note that
-fPIE does define __PIC__, so we need this to catch the use of -fPIE.
[ChangeLog][Important Behavior Changes] On x86 and x86-64 systems with
ELF binaries (especially Linux), due to a new optimization in GCC 5.x in
combination with a recent version of GNU binutils, compiling Qt
applications with -fPIE is no longer enough. Applications now need to be
compiled with the -fPIC option if Qt's option "reduce relocations" is
active. Note that Clang is known to generate incompatible code even with
-fPIC if the -flto option is active.
Task-number: QTBUG-45755
Change-Id: I66a35ce5f88941f29aa6ffff13dd210e0aa2728f
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Make casts from size_t to int explicit to avoid warnings like
warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
Change-Id: Ib69c25519dadf8732b0c08412cc97887df00a2d4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Swap subexpressions around so the expressions involving w
(the first member in memory order) execute first.
And no, compilers don't do that automatically. Well, GCC 4.9 doesn't.
Change-Id: I918ecc27a9ac9775fa91968c0548d182d7ad28e3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>