Commit Graph

24179 Commits

Author SHA1 Message Date
Konstantin Ritt
12b36aec2b [QZip] Do not depend on platform definitions
Guarantee the values are exactly the same on all platforms
and avoid the macro redefinition(s) on a newer MinGW.

This also fixes a typo in #define S_IFLNK 020000 (<-- must be 0120000).

Change-Id: I4993d2a9bdb4b0871af110b89c137ce0ac0e953a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-06-27 02:29:53 +00:00
Laszlo Agocs
a8a8cdd24b Add support for driver_description and os.release in GPU blacklists
os.version is the kernel version which is just not very useful or easy to
use for us. Instead, introduce a string that allows easy differentiation
between Windows 7 and 8.

From the adapter identifier the driver description is often helpful too,
especially in virtual machines.

These allow writing rules like:

{ "description": "Use WARP in some Win 8 and 8.1 VMs",
  "os": { "type": "win", "release": [ "8", "8.1" ] },
  "driver_description": "VMware SVGA 3D",
  "features": [ "disable_desktopgl", "disable_d3d9", "disable_d3d11" ]
}

Change-Id: I196f6b44d7bb9e42ef47f61f4c28d8aa79afb7c4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-26 15:27:31 +00:00
Nico Vertriest
e1b7c55a43 Doc: rearrange tables with overflow
Task-number: QTBUG-46475
Change-Id: Id599b2eb0dee0c003475c094ad61700150e37e65
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-06-26 11:26:24 +00:00
Tor Arne Vestbø
dc6191ccb4 Treat color (ARGB) glyphs, e.g. Emoji, as having unreliable glyph outlines
This is used by the scene graph to automatically switch over from distance
field text to native text rendering for the given glyph node, which allows
mixing regular text with Emoji in e.g. a Text item without having to set
renderType to Text.NativeRendering.

Change-Id: I5d96d1dab329a975e3442284bf4c5a82174177c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-06-26 10:56:42 +00:00
Tor Arne Vestbø
2d1189d9f2 lance: Ensure that OpenGL FBO is cleared before being used as surface
Merely filling with Qt::transparent is not enough, as the default blend
mode of QPainter is QPainter::CompositionMode_SourceOver, where the alpha
of the source is used to blend the pixel on top of the destination. The
destination in the case of an FBO may contain garbage, and we end up with
the same garbage as the alpha is 0.

This was evident when running the ellipses and porter_duff/porter_duff2
tests on OS X. These tests can now be un-blacklisted.

Change-Id: I315fa764fa29fb3a06e38945a738a6feadf4502d
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-06-26 10:55:40 +00:00
Mike Krus
5757b8c516 Return format as specified in original QWindow
Overload QPlatformWindow::format() to return the desired format
defined in the QWindow. This is required for windows that define
specific surface formats (such as those used in Qt3d which require
a depth buffer).

This is similar to what is done in the OS X Cocoa QPA plugin.

Change-Id: I7661a2a9c4e13603d03d3a5be10d000f73c712e6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-06-26 06:54:49 +00:00
Thiago Macieira
3de7a966f1 Fix warning with MSVC 2013
warning C4100: 'name' : unreferenced formal parameter

This is despite the new Q_ASSERT "using" its expression even in release
mode.

Change-Id: Ieebfc4ab72a6493eaa68ffff13ead0574dd78627
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-06-26 06:49:38 +00:00
Friedemann Kleint
e2d3436e4d Windows / Wifi plugin: Refactor code resolving symbols from wlanapi.dll.
Instantiate QLibrary once and use member functions instead of using
the static functions which instantiate QLibrary in each call.
Strip suffix from file name.

Task-number: QTBUG-46710
Change-Id: Ia6ec5542e1104ea9024961dda202e6f22bcf5b69
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-26 06:49:29 +00:00
Friedemann Kleint
97207e2c7f Prospective fix to stabilize tst_QAbstractItemView::task200665_itemEntered().
The test tried to position the mouse cursor over item #0 . This
sometimes results in the cursor being outside the window when
the window manager adds the window decoration on X11.
Move the cursor to the center of the window instead.

Add cleanup slot checking top level leaks, remove empty
functions.

Change-Id: I908240e1cc3fdbe370b43eae0015272ca342a312
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-26 06:48:32 +00:00
Thiago Macieira
fae33bfbe3 Update the changelog with the LTS discussion results
And include one more ChangeLog entry that was committed to 5.5.0

Change-Id: I255870833a024a36adf6ffff13eb0808447c50f8
2015-06-25 15:58:28 -07:00
Konstantin Ritt
9901bfe914 Simplify permission flag handling a bit
Change-Id: I753f7a398c39e7300821658f27e4813c591eebc3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-25 16:53:57 +00:00
Tor Arne Vestbø
a79dd87f3f Add lancelot test for Emoji text rendering / color glyphs
Change-Id: Id69c28ec49be660e40beaf37bad9ac0d4ce0662d
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-06-25 16:53:50 +00:00
Oswald Buddenhagen
f2b7a523da (mostly) build system changelog for 5.5.0
Change-Id: Ib68a73574a2c6c13e90484ad5a86398e1cea24cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-06-25 06:54:47 +00:00
Olivier Goffart
021ffbfc6f Changelog: Document the SIC related to indirect includes
Because of 90e7cc172a

Change-Id: I3e9339d6e07d6564e38f3f25df28644437ed5955
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-25 06:54:40 +00:00
Daiwei Li
db377a4202 QSortFilterProxyModel: Keep invalid index updated on source model sort
If we have a filter applied that removes all entries, the source
model is sorted, and then we remove the filter, QSortFilterProxyModel
never emits rowsInserted. This is because it doesn't have the correct
source mapping and doesn't update when the filter is removed.

Change-Id: I447b2d150e509b128d27f4dabc4e081ca4ef037f
Task-number: QTBUG-46282
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-25 00:46:48 +00:00
Konstantin Ritt
7082c20e4a [QFontMetrics] Mark obsolete charWidth() method for deletion in 6.0
It was obsoleted for quite a while already and we forgot to get rid
of it the last time.

Change-Id: Ib15e71829e80648aa667a6b0af31698460b99cc1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-25 00:17:17 +00:00
Christian Kandeler
ec8c1dcf14 Make QDir::relativeFilePath() return "." for a path to itself.
The rationale being that the empty string is not a valid path component.

[ChangeLog][QtCore][QDir] QDir::relativeFilePath() now returns "."
instead of an empty string if the given path is the same as the
directory.

Change-Id: Ibcf31904b2ae5edf5639d4c2e5ba234365d347fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-24 15:43:58 +00:00
Gabriel de Dietrich
0e41a58fb8 QPageSetupDialog: Add missing Q_DECL_OVERRIDE
Also removed unnecessary virtual specifiers.

Change-Id: Id3e0fcf6916d4ccde351e5456e4f92f3cbedc3f6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-24 15:24:14 +00:00
Gabriel de Dietrich
02ea023521 Add missing Q_DECL_OVERRIDE in Cocoa specific header files
Change-Id: I91831390e9e0d97ab28f0e34ca0573fb2c84e954
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-24 15:24:10 +00:00
Marc Mutz
862b1b3ceb Micro-optimize QKeySequence datastream operator (I)
Instead of creating a QList with the keys with one of two statically
known sizes, stream the contents itself. Apart from QDataStream,
this no longer allocates any memory.

Change-Id: I5ed814b186dcaf8cc7dedcc520928aefab01f009
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-24 13:27:53 +00:00
Marc Mutz
3290330d44 QStateMachine: remove unused qHash(QPointer<T>)
Change-Id: Idae3621d1a3cb961e2d46fd58208829651382c11
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:24:40 +00:00
Marc Mutz
5fb8839023 QMdiArea: don't hold QPointers in QList
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: I3cdd4914658b6fe025ad379007502b4223e126cd
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:23:39 +00:00
Marc Mutz
419533eba4 QPicture: don't hold images in QList
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.

Change-Id: I153995d691692f7317cab31b95a00d679f31c0af
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-24 13:23:13 +00:00
Marc Mutz
d0b659f183 QPicture: don't hold pixmaps in QList
QPixmap 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: I82bb9a88e7030e566f39421cd78babcf01bce285
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:22:36 +00:00
Marc Mutz
1f46321717 QZip*: mark various types movable and primitive
... even if they are not (currently) held in Qt containers
(though FileInfo is).

Change-Id: Id14d4af89fed8bcefdbb9b28d11c1c43fccf7190
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:22:09 +00:00
Marc Mutz
eb47c18081 QtGui: don't hold QPainterPath in QList
QPainterPath isn't marked movable , 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: Id4dae8037401c52fd57a2274e45399a9b70beb69
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:21:40 +00:00
Marc Mutz
aa79adef6f QAbstractTransition: don't hold QPointers in QList
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: I52e83a26eda06fb9826e9c4773a7a0b84b0f59c7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:15:05 +00:00
Marc Mutz
931f9c23ee QMacStyle: replace a QSet<QPointer> with QVector<QPointer>
Holding a mutable item in a QSet violates QSet invariants, namely that in
bucket N, all items have hash % size == N. If a value gets reset to
nullptr by external means, that invariant no longer holds. The code works
by pure luck.

Replace the set with a vector, which doesn't care whether elements change
under the hood, and will also outperform the typical QSet use due to
better locality of reference.

Change-Id: Ied7940e82525fd0da9f74dfb0bc36a320b45d172
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-24 13:14:35 +00:00
Marc Mutz
5b6fd71d3a tst_qzip: remove unused init()/cleanup() functions
Change-Id: I3502e8e20a4496051554dc6fb92ea9bd347cc0f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-24 12:57:20 +00:00
Kai Koehne
235292710b Doc: Improve code snippet in QTranslator overview
Use translator::load(QLocale(), ...) which loads the a translation mapping
the users preferred languages, instead of just hardcoding one. This is
arguably the more common (and interesting) case.

Also, QPushButton::tr() does place the string in the "QPushButton"
namespace, which is just wrong (TM).

Change-Id: Id22851556b3f876da3b756b452811e07fc7b173e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-24 10:48:23 +00:00
Kai Koehne
fa09699918 QLocale: Fix example return value for uiLanguages()
The documentation (correctly) states that the first item in the list
is the most preferred one. Anyhow, then it doesn't make much sense to
list "en_US" after "en".

Change-Id: Ib88e5c97d4329b444d1cb49eeb49eaed2ddedad3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-24 10:48:17 +00:00
Tim Blechmann
32ce3b0eaf cocoa: QNSView - guard implementation against deleted window
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>
2015-06-24 07:25:28 +00:00
Sérgio Martins
fece7cdb5d widgets: Use QList::reserve(), reduces reallocations.
Change-Id: I49cc03f365c77f142f62c8e77505ec09723a44d9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-23 15:35:59 +00:00
Sérgio Martins
a4d3af9614 dbus: Use QList::reserve(), reduces reallocations.
Change-Id: I5d60220c4d3014067a45a3d3553f0523c9fc7c74
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-23 12:46:36 +00:00
Thiago Macieira
f64736188f Don't document the IsGadget flag
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>
2015-06-23 10:37:07 +00:00
Alex Trotsenko
19e63a207f Replace QVERIFY with QCOMPARE in QRingBuffer autotest
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>
2015-06-23 05:59:13 +00:00
Andy Shaw
bac1116d49 Only require polling when running on Windows XP
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>
2015-06-23 05:56:36 +00:00
Oliver Wolff
756d451a15 winrt: don't return invalidated timers in QEventDispatcherWinRT::registeredTimers
Change-Id: I0dbad7a78080cd8c18893fea8294cf540a5e9e5e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-06-23 05:47:17 +00:00
Oliver Wolff
bf24838c33 Use qthread_win.cpp for WinRT as well
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>
2015-06-23 05:47:14 +00:00
Laszlo Agocs
4c99d785bc Revert "Handle context loss in window surface creation too"
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>
2015-06-23 04:08:47 +00:00
Laszlo Agocs
d40647922b Revert "windows: Disable D3D9/11 with ANGLE in VMs"
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>
2015-06-23 04:08:41 +00:00
Thiago Macieira
4ce05c6084 Disable C++11 thread_local with ICC on OS X
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>
2015-06-22 22:52:40 +00:00
Thiago Macieira
741a7aef58 QtTest: Increase the size of the alternate stack
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>
2015-06-22 22:22:51 +00:00
Marc Mutz
9e139ce099 QTextureGlyphCache: add some qMove()
Change-Id: I1965f4de0f1bf9efdb15d07142f882897e163cc5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-22 22:20:47 +00:00
Laszlo Agocs
706af26acc Do not claim TextureRGFormats on Mesa with GLES
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>
2015-06-22 21:15:37 +00:00
Laszlo Agocs
8aaf8d33e1 Disable surfaceless QOffscreenSurface with Mesa
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>
2015-06-22 21:15:31 +00:00
Thiago Macieira
4dc597d96c Force Visual C++ math.h to define the M_ constants
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>
2015-06-22 15:13:13 +00:00
Friedemann Kleint
993889401b Revert "Windows: Use DND effect chosen in DragEnter/Move for Drop."
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>
2015-06-22 14:32:44 +00:00
Ulf Hermann
68e31e4ab9 Replace #ifdefs with qmake feature checks.
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>
2015-06-22 14:21:25 +00:00
Ulf Hermann
b93d1f6b1f Don't try to resolve symbols for xcb if QT_NO_LIBRARY is set
Change-Id: I4bd5d8534abd9a585a4a641d01931de687eeae77
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-06-22 14:21:11 +00:00