when embedding a QWindow into a native cocoa gui there are cases that the
QWindow is destroyed while the QNSView is still available. this patch
makes sure that the m_window pointer is cleared when the QWindow is
destroyed and adds checks to the implementation to avoid that m_window
is called when it has already been destroyed.
Change-Id: I7e0614969dedb87b54df74d542a8c1fb15d8acf0
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
There's still some discussion as to whether it's safe to use. Until
we're completely sure, don't let users use it. We can always bring it
back later.
Change-Id: I049a653beeb5454c9539ffff13e5e3e343da0e7d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Gives more information to user in case of failure. Also, fix the
order of parameters for some QCOMPARE's.
Change-Id: I3ea91f9602d4d32ac79027b6093caea749633c01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since the restriction for what gets notified for Wireless network
configurations is only on Windows XP then we only want to do polling on
Windows XP. This gives a performance boost as it does not query every 10
seconds for no reason.
Task-number: QTBUG-40332
Change-Id: I73e3903834abe9ffc5adc678de20f7428a578d89
Reviewed-by: Richard J. Moore <rich@kde.org>
Since of Windows (Phone) 8.1 most of the desktop's thread functionality
is also available, so we might be able to share the code and get rid of
the extra implementation for WinRT.
Task-number: QTBUG-43837
Change-Id: I0ce907cd94899834527f88c70e1e395bafdb14b3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This reverts commit e4f5278a4f.
Revert this for now until we figure out what exactly is needed for the
Windows 7 CI virtual machines.
Change-Id: Ibd5578eac1d172785fac5e94c4c5c7508f8ddb79
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This reverts commit a6000e2b66.
Temporarily remove this to unblock the qtdeclarative dev CI.
While Windows 8 VMs are fixed by this patch, Windows 7 has different
problems.
Change-Id: I45ef064ed953cc4b7bbf19657300d4fc43d82452
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
It appears the ABI is lacking support for this at this point in time,
even though __thread works. ICC 15 works, probably by making it an alias
to __thread, but neither ICC 16 beta nor Clang work with thread_local.
Intel-bug: DPD200371699
Intel-ID: 6000107242
Change-Id: I049a653beeb5454c9539ffff13e639bdb83b8843
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The default (8kB) isn't enough for modern Linux on x86-64. I can't
exactly account for it, as the size of the xsave area is 0x340 bytes,
plus the regular area it's still less than ~1.5 kB. But empirically we
can see that 8kB causes a SIGSEGV when a signal is delivered, while 16
kB works.
Since we're increasing the size, let's make sure it ends up in a
separate page from the rest of the .bss data.
Change-Id: I5d1e6f7607404caa96e4ffff13e84c87c33723c7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Mesa provides GL ES 3.0 so using GL_RED in place of GL_ALPHA should work.
This is apparently not the case.
Task-number: QTBUG-46605
Change-Id: I4f661487b47e9cc11f5de110196ec37150c99c7f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
With Intel at least Mesa is unable to handle surfaceless contexts in
glReadPixels(). This cripples QOpenGLFramebufferObject::toImage() and
potentially others too.
Task-number: QTBUG-46605
Change-Id: I07c1015eca67b8add14496ec0df0e0c17ac3d896
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
That header defines those constants outside of the math.h include guard,
so if someone #define'd _USE_MATH_DEFINES and #include'd math.h later,
they would get VC++ warnings about constants like M_PI being redefined
with different values (ours have parentheses, VS2010's math.h don't).
Instead, let's define _USE_MATH_DEFINES ourselves so we get the M_*
macros from math.h. That way, we won't redefine them outselves.
Task-number: QTBUG-45935
Change-Id: Idf715b895bac4d56b4afffff13db2c98ba8345c2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The change causes items in QListWidget and QTreeWidget to disappear during
InternalMove since the widgets modify the actions of the event
to remember an internal state.
This reverts commit 988f1b2e57.
Task-number: QTBUG-46642
Task-number: QTBUG-43466
Change-Id: I27d888d7a1fdfcf8eaf8806ccd4ca33b292b9d8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This prevents the building of dysfunctional plugins that don't define
a loader function, or won't compile at all.
Change-Id: Ib62edb8db4a8917effa05292cb702bb4022f552c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Without library support we don't try to load any symbols and the
function is unused. This results in a compiler warning.
Change-Id: I82ad46a478debe48cf9a8311f5e5ec299baa1af8
Reviewed-by: Richard J. Moore <rich@kde.org>
This prevents qdoc from getting lost and reporting
extraneous errors.
Change-Id: I8edf11dec67c39d7aa314fe6748acf6df4e646c8
Task-number: QTBUG-46794
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
The PNG image plugin has the capability of applying gamma correction
to read PNGs, but doesn't do so by default, and we export no way of
accessing this through the qimagereader API.
This patch adds the ability to read the PNG file gamma, and overriding
decoded gamma to get gamma correction.
Change-Id: Iaf9eaac0827516db6bc02247c58026270cd1f610
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It will definitely not be called for events outside the main thread, but
we haven't decided for the main thread, in Qt 6.
[ChangeLog][Future direction notices] In Qt 6,
QCoreApplication::notify() will not be called for events being delivered
to objects outside the main thread. The reason for that is that the main
application object may begin destruction while those threads are still
delivering events, which is undefined behavior. Applications that
currently override notify() and use that function outside the main
thread are advised to find other solutions in the mean time.
Change-Id: I27eaacb532114dd188c4ffff13d5a5c8df3bc85b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
[NSDate date] returns an id, so one needs to send a message instead of
accessing a property.
Backport commit 92b3397a from the 5.5 branch.
Change-Id: Id70915e1ac23994a081765e0a527802fef61b573
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
While this is not what the EGL spec says, we can get EGL_CONTEXT_LOST in
eglCreateWindowSurface too with ANGLE. Handle it the same way like we do
for eglMakeCurrent and eglSwapBuffers (no warning, just return the error
code silently since we may recover from this).
Change-Id: I6b6c57ffd4fca23e1a14a90ef7b18b33f4c96fd2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient.
Use QVector instead.
Change-Id: Ifcc9eca18a87e29327586506e3a3bb7874c8b3a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QPointer is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: I104d11cc530c9c1579e82bf4e28e3353c00b34b4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Location is self-referential, so explicitly mark it as Q_COMPLEX_TYPE.
Location::StackEntry is held in QVector, by way of QStack.
Change-Id: I4d9001b55b86f0387ae41b93da17d06fb2857ee4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Also added a reserve() call.
Change-Id: I36388f2efbc6ca025f123c30bc7f1dd312bf4ab2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Location is a self-referential type that is very expensive to copy.
So don't.
Instead, just remember the iterator, and use value()->location()
(which returns a reference, so doesn't copy).
Change-Id: I9a2b72b05b8051e793cf67179a0195f2f3551a10
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient.
In this case, the maximum size of the container is a small compile-time
constant, so the best container to hold those QImages is a C array, even
though it will default-construct all 12 QImages before even starting the
loop, since the QImage constructor does not allocate memory.
Change-Id: I83ca65aa1ca51c400ca696202d24cfaeab505a5b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
By setting QT_XCB_GL_INTEGRATION to the special value "none", no plugins
will be considered for loading. This matches what eglfs does with
QT_QPA_EGLFS_INTEGRATION.
This allows widget or raster-QWindow-only apps to start up faster by not
spending time on plugin loading and potential initialization steps there.
Task-number: QTBUG-46765
Change-Id: Ifeec3548a9b58f619a18e0be75fe4a9f489677a9
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
ad9698713f reduced the curvethreshold
for wide lines, to fix QTBUG-46151. But as a side effect, the
threshold was increased for lines of widths >=0 and <4. This commit
fixes that, and also adds a lance test for the issue in QTBUG-46151.
Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Visual Studio 2015 integrates the Windows Runtime development
tools, including the msvc2013 compilers.
This patch fixes the error that mspdb120.dll is missing.
It is typically included through PATH variable of the shell,
which points to the "wrong" location in this case.
Change-Id: I46289721912d6b517c6083612582f67536d28b11
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Commit 3ce99adf replaced DEPLOYMENT with INSTALLS and introduced
the "install target not created" warning when running qmake on
WinRt projects.
The code path in qt.prf that was responsible for filling the
DEPLOYMENT variable was never functional in Qt5. We're turning
the code path off until this is properly fixed.
Change-Id: If836ef648f9fb601b7597d39e3d00665d4cf01b0
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This becomes necessary to avoid compilation errors with
Xcode 7 and clang 7.0.0. (Note that its version information
doesn't state which LLVM version it's based on, though we
suspect it could be 3.7.0svn.)
Change-Id: I2bfc7f2b73ca7a61798b123cc2715037028f0e5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove highlighting for a number of older and less relevant examples.
Add examples from new modules, and examples that have been visually
polished.
Task-number: QTBUG-37203
Change-Id: I4e9be9a54f1ecea3bb407c049c1d44a7c00333a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
When PRECOMPILED_HEADER is set to foo/bar/stable.h and
PRECOMPILED_SOURCE is empty, then a C++ file foo/bar/stable.cpp
is generated that contains the include "stable.h".
We must pass the exact string "stable.h" to the /Yc compile
switch instead of "foo/bar/stable.h".
Commit dc612acdc6 introduced this
regression to allow to have PRECOMPILED_SOURCE in a different
directory than PRECOMPILED_HEADER.
Change-Id: I1a7e096c0455b946a5660d23c70c72abd4c7ac1b
Task-number: QTBUG-46679
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QQmlJS::AST::SourceLocation wasn't marked as movable, and it is larger
than void*, so QList<SourceLocation> is horribly inefficient.
Fix by marking as movable primitive and holding in QVector instead.
The same fix probably is required in QtDeclarative, too.
Change-Id: I4e0d2cd32b7e03205d59cbc9900287f77045154a
Reviewed-by: Martin Smith <martin.smith@digia.com>
... with iteration over the hash itself.
gesturesByType is a local variable, so there's no way
functions called in the loop can modify it.
This dividing operation would greatly benefit from
a splice operation in QHash...
Change-Id: Ifd241d2da9c6998c2ad0b08294fca84d5b188d0f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QBenchmarkResult is larger than a void*, so holding them in a QList is
needlessly inefficient. Worse, the code could come to depend on the
fragile property of (inefficient) QLists that references to elements
therein never are invalidated.
Also saves ~1.2KiB of text size on GCC 4.9 optimized C++11 AMD64
Linux builds.
Change-Id: I0c99e591bb9b4405aa1bb78ec095dcaf9277993f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... with iteration over the hash itself.
gesturesByType is a local variable, so there's no way
functions called in the loop can modify it.
Change-Id: I5971c404f4ae8473d4926b68eb7a9c60801f208d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QQmlJS::Engine::comments() returns a QList<QQmlJ::AST::SourceLocation> by value.
The QList is horribly inefficient, but that will be topic of a separate patch.
The loop in QmlMarkupVisitor did not store the result of comments() in a local
variable, it called engine->comments() whenever it referenced it, which was
_three_ times per loop iteration. Two of those references applied op[] to
the rvalue engine->comments(), which, being mutable, detaches. _Twice_ per
loop, with a QList that heap-allocates its elements!.
And that was followed by a similar loop.
Fix by using a local const copy of the list to iterate over.
The loop termination condition also looks fishy (j is used to index into
the comments, but is not checked against comments.size()), but apparently
qdoc works fine with it so far, so don't try to fix.
The copy of QQmlJS in QtDeclarative is not affected by this (qdoc-specific
code).
Change-Id: I133c35dc9293609dfb8ad633e2d82399223b508b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>