This commit removes the legacy ptrsize check, which was deficient
because it did not work for multiarch systems (when we supported fat
OS X binaries) and did not work for bootstrap builds because the size
might be different when cross-compiling.
Instead, let's rely on the predefined preprocessor macros to detect
correctly. As a nice side-effect, this fixes 64-bit Android builds
cross-compiled from Windows.
Task-number: QTBUG-48932
Change-Id: I1d0f78915b5942aab07cffff140f9a52b9342f23
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
qgltf is a tool provided by the Qt3D module that enables 3D assets to
be defined in qmake project files, and have them converted to an
efficient binary format at build time. The qmake feature will convert
all 3D assets specified by the QT3D_MODELS variable to the qgltf
format and add the new model asset to the project as a Qt resource
file.
Change-Id: If7250d6f23a06254b1ed0e408057723763aad8c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Windows 10 uses one enum for all target platforms. Use
ApiInformationStatics to identify whether enum values are accessible at
runtime.
Change-Id: Ib77c9d2a2b5cf1655fbe7d937d0c83cc4cdd9ee9
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Handle various cases where we have null QScreen or QPlatformScreen
pointers. With this change, I can run Qt Creator for several days.
Before, it would crash multiple times per day with a two-monitor
setup.
Change-Id: I0923d886ae2a4199ac37edd711ddd4f6f99df93d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Opt-in by setting android.app.auto_screen_scale_factor
to true in AndroidManifest.xml. This will enable
devicePixelRatio scaling in QtGui using a scale
factor provided by Android DisplayMetrics.
Note that the Android style is not currently supported:
it already accounts for different display densities
which results in incorrect visual sizes when enabling
devicePixelRatio scaling.
Implementation: Bring DisplayMetrics::density through
to setDisplayMetrics in androidjnimain.cpp, similar
to what is done for "scaledDensity". Override
QPlatformScreen::pixelDensity(), which forwards the
scale factor to QtGui.
[The difference between "density" and "scaledDensity"
is that the former is a physical display density factor
which corresponds closely to devicePixelRatio in Qt,
while the latter also includes the Android global font
scale factor.]
Scale the global font pixel size in qandroidplatformtheme.cpp
to keep the visual font size constant.
Based on an initial patch from Daiwei Li <daiweili@suitabletech.com>
Task-number: QTBUG-46615
Change-Id: Ia51f99bf6dda485a57413949246c7b32cb47e8dd
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Call QHighDpiScaling::updateHighDpiScaling() in init_plaform(),
after the platform integration has been created and most platforms
have populated the screen list. Keep the existing udpate call for
the platforms that don't, but guard against calling it twice.
Task-number: QTBUG-47947
Change-Id: Ib73bea7c4ab42e7acf6532f3a3100e1fc29acc2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
The latter is much faster as it doesn't have to deal with
time zones.
This change is safe, because the timestamp member is only
ever handled inside, and the calculation of the time difference
does not depend on any particular time zone.
Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.
Change-Id: I6c9190a4253ce5972871ab1f12870f8ae9891966
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Truetype fonts should be rasterized with a winding fill
as documented in e.g. Microsoft's specs.
Failing to do this caused a bug when doing native
rendering in Qt Quick for fonts that were large enough
that the fallback path was taken when drawing the glyphs
into the cache. If the glyph had overlapping contours,
they would be subtracted from the shape.
[ChangeLog][Text] Fixed an uncommon rendering error with
fonts containing overlapping contours.
Task-number: QTBUG-41197
Change-Id: I0e4a4432ba3f902bc3ea59d8f4dbd12a295630b2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Partially revert c7abf81786. Instead of using the ES3 entry point,
use ES2 for framebuffer blitting. This means that a small change is
required to ANGLE for the blit behave the same as ES3 (applied only for
Windows Store apps).
Task-Id: QTBUG-48266
Change-Id: Idc51f00a659c91f740876be071eb71bff69e0e38
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
_mm_load_si128 requires 16 byte alignment. This crashes on 32 bit Windows
builds.
Change-Id: Ib6c30eba726747bbab56467eada820521981a80c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It should be possible to use these constants simultaneously and to
handle them separately from each other.
Change-Id: I0c48a3c25456b487c9d6139b05105ada20f34be6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is true for ILP32 on x86-64, IA-64 and AArch64.
Change-Id: I1d0f78915b5942aab07cffff140f9d4c277bb5d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This test hasn't been run for years, so clean up. And besides, it's
extremely fragile and would depend on how IBM packages their OpenGL
libraries.
Change-Id: I1d0f78915b5942aab07cffff140f9db5a09ee7e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The latter is much faster as it doesn't have to deal with
time zones.
This change handles the trivial ones: Either the call to
currentDateTime() is immediately followed by a call to toUTC()
or toTime_t(). The latter is much faster on UTC QDateTimes, too.
Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.
Change-Id: I872f5bbb26cbecedc1e5c0dbee4d5ac2c6eb67ee
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This means we now use DirectShow as default multimedia backend
on Windows.
Task-number: QTBUG-45597
Change-Id: If95bbb8e7b33d73d80f7ba42de63ac54539e15b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We check the name of the window class the widget's QNSView
changes window and set a flag when the that window is a native
Cocoa menu window. Later, only those views not inside a native
menu can become first responder, ensuring Qt won't deactivate
the main window.
We're allowed to reject becoming the first responder mainly
because Cocoa itself doesn't support sending key event to menu
views and, therefore, it doesn't change what's already possible.
This patch also sets the widget action visible, which needs to
be done right after reparenting it to the container widget.
Besides that, it also contains a few small code cleaning changes
related to Cocoa's support of QWidgetAction.
Change-Id: Ia2170bdc5e1f40bfa2f1091c05e9e99397c47187
Task-number: QTBUG-44015
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
dragImage:at:offset:event:pasteboard:source:slideBack: on NSView is
deprecated since 10.7. Use the one on NSWindow instead.
Change-Id: Ia1c2ea367ae2ca5194b52ea57ab261461bf8b529
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Instead of converting the QLatin1String to a QString at the first
opportunity, keep it around until it is appended to one of the
internal QStrings in write().
Avoids a memory allocation per QLatin1String / const char* streamed.
Change-Id: Id973a9b743e5a6696defbc4ef4ed2db1ef54e9cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In case the static destructor has already been run, make sure we don't
crash. This shouldn't happen, but could happen if the QApplication
destructor is run in a weird order (after the static destructors have
begun running).
That's not usually a case we'd fix (unsupported), but since this change
improves the code and also avoids creating the pixmap cache if it hadn't
been used up until this point, the change is a net benefit.
Task-number: QTBUG-48709
Change-Id: Ia505aece07bf4e13a1faffff140f3e119cfc773e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
On 32 bit platforms the pointers may end up being 4 byte aligned.
Happens with MSVC on 32 bit Windows. _mm_store_si128 is documented to
require 16 byte alignment.
Change-Id: I80737fedf9e7f436a51a83924117cc0bc63017cc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This is in preparation of adding a putString(QLatin1String) overload.
To keep the change simple, I kept the construction of the padChar
chain per putString() call. It probably makes sense to have a
QString::resize(int, QChar) to perform the padding operation in-place.
Let's leave that for another changeset.
Change-Id: I9ef66b8df38117e1669fd2bece6ee180a2ce3369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This was never a documented feature, but happended to work before Qt 5.5.
It broke because the peoperty access went into the static function and are
now prefixed with '_t->'
So restore the behavior as it was by not including the parentheses in the
member name.
Task-number: QTBUG-47695
Change-Id: Ic3509ddea7ac9abc871e71f5bfbe81d04d08e9bc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Windows Runtime side callback is run from XAML thread and receiver
is at UI thread thus sendEvent asserts. Use synchronous system
interface key event handler to deliver the event.
Task-Id: QTBUG-48105
Change-Id: I91a8ef6fd29c277edfb699b688b9e7895dadda8f
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
It was possible for Windows Runtime callback to run while integration
class was constructed. That caused an assert when handling
application state change. Fix this by connecting callbacks after
integration class fully constructed.
Change-Id: I029c2e1f932e8edc3665443cc17dbf11eaae1bf6
Task-Id: QTBUG-48109
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Initialize locale from current keyboard value and listen
to WM_INPUTLANGCHANGE.
Task-number: QTBUG-48772
Change-Id: I53b6ef4e2cf538bb81b41ea497ed0cb66991b104
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
As a corner case on BSD systems, we use IP_RECVIF control message to
retrieve an interface index of the received datagram. Take care about
sockaddr_dl structure, while calculating a size of the ancillary
data buffer.
Change-Id: I1c113d390a4929489c4c5858847b6262f1baa204
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Avoid duplication of slashes and use static variable for the
const part in settingsPath().
- Do not run expensive cleanup twice in init()/cleanup() as was
before by moving the code into a separate cleanupTestData()
function called from cleanup() and initTestCase().
- Use QDir::removeRecursively() (which should be able to deal
with readonly files, etc after 26bcc0565f )
instead of system calls or the special removePath() function for
CE/RT.
- Switch QStandardPaths into test mode.
Change-Id: Idcde2d17020eae1ea43e448266e3940c06f174ef
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Assuming that the target is always GL_TEXTURE_2D is not going to be sufficient
when working with EGLStreams for example where GL_TEXTURE_EXTERNAL_OES is a
must. The blitter is now changed to support multiple programs so other targets
can easily be added as well in the future, if necessary.
Change-Id: I247d30600222fb5af6305ed5d9740baa5e43e83e
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
The relevant easing curves all start out fast and end stationery; so
it's at the *end* that they attain zero "velocity", so they're
decelerating *to* zero, not from it.
Change-Id: I69874c46c8d42f185ff815295c4470a195cc43ae
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Check for MSVC2015 to enable usage of IInputPane(2). Move object
construction to the XAML Thread, otherwise instantiation will fail when
running on desktop.
Task-number: QTBUG-44494
Change-Id: I816230cc5b0def796e86e6c6bb05a552a4e59d1b
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Remove unnecessary type casts in qdocindexfiles.cpp, and reduce the
amount of duplicate string literals used for generating QML
documentation.
Change-Id: Ia6d68a44fad14bd7414c0106e8752999830c93e8
Reviewed-by: Martin Smith <martin.smith@digia.com>
The examplesinstallpath variable in .qdocconf files defines the path
under QT_INSTALL_EXAMPLES where examples are found.
To match the way examples are packaged in Qt 5.6, prefix each
install path with the repository name.
Task-number: QTBUG-48736
Change-Id: I6a35c94fdacaad21cd044411aba02027b9019300
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Qt 5.6 now includes a version of the offline documentation template
with simplified CSS suited for rendering HTML with a QTextBrowser
backend.
Select the template in qt-html-templates-offline.qdocconf, instead
of the higher-level qt-module-defaults-offline.qdocconf. This is
better because many projects external to qt5 (including Qt Creator)
do not use qt-module-* includes. This way, we can control the
template selection for all projects from a config file.
Change-Id: I766af422d829f3c9519c5a45093473175363d600
Reviewed-by: Martin Smith <martin.smith@digia.com>
This way, it's possible to tell which applications and libraries depend
on the Qt private API and of which Qt library. Linux distributions can
use this information to decide which applications need to be recompiled
every time Qt itself is rebuilt.
This is done by scanning all class and struct definitions in the private
headers (we've already got the list from syncqt). I opted to add a new
script instead of modifying syncqt because then this can run in parallel
with the rest of the compilation, as opposed to during qmake
time. Another advantage is that it catches modifications to the headers
in between qmake executions.
Since this is already Unix specific, it should be no problem to use Perl.
This solution is limited to use of non-inline symbols of classes
declared in private headers. It will not catch free variables (such as
qsimd_p.h's qt_cpu_features), use of inlined functions or just plain use
of a class/struct for accessing its data members. However, this is
already better than nothing and should help Linux distributions quite a
lot. And there's no way to catch the latter issue anyway.
Change-Id: I049a653beeb5454c9539ffff13e3fff36400ebbd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... and make use of it in qt.prf.
[ChangeLog][qmake][Unix] Added support for relative paths in
QMAKE_RPATHDIR.
Note that this technically breaks backwards compatibility, as relative
paths were previously silently resolved against $$_PRO_FILE_PWD_. This
was not documented and seems rather useless, so i'm not worried.
Change-Id: I855042a8962ab34ad4617899a5b9825af0087f8a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
See the comment in the header for an explanation of what it does.
This trick is enabled for every single .o that is compiled, unless
QT_NO_VERSION_TAGGING is defined. The assembly expands to a COMDAT
section, which is mergeable by the linker, so only one copy of the
output is present in the ELF module.
This is enabled only for Linux and x86 / x86-64 / x32 due to the
requirement of writing assembly and relocations, so it needs to be
tested on each platform, which I have not done. It might work on
Solaris/x86, but again it requires testing. Support for other
architectures requires different assembly output and relocations and can
be added as needed, but they are not as important since this trick is
has most value on desktop systems.
Change-Id: I049a653beeb5454c9539ffff13e3ff5782a8cb86
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rex Dieter <rdieter@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The only reason I had used them in the first place was because C
preprocessor macros cannot call themselves recursively. But the magic
was too magic and caused issues with some builds, so let's choose the
safer option.
Anyway, this solution now works for all ELF architectures, independent
of the processor, whereas previously it was restricted to x86 and Linux/
FreeBSD. However, this does not apply to the assembly in
qversiontagging.h.
Change-Id: I42e7ef1a481840699a8dffff1404f032fc5cacb8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>