Commit Graph

31684 Commits

Author SHA1 Message Date
Sergio Martins
8c1f147eaf dockwidgets: recalculate the press position if the window resizes
A window can resize while dragging, this happens on Windows when dragging
across screens, to a screen with a bigger scale factor. When that occurs
it might lead to the press pos being outside of the window.

Change-Id: Ic61ec7088c8fa81395d43ce665952dbd2eecba39
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-22 23:11:01 +00:00
Pavol Markovic
dd4465f57c Wrap RunLoopModeTracker into Objective-C namespace
RunLoopModeTracker as one of Qt Cocoa classes was not wrapped
in namespace which limited its use in Objective-C single symbol space.

Change-Id: Ida2c62c6f543a3bf5107f28c78d27435bcb3470d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-02-22 20:16:59 +00:00
Ulf Hermann
4e9f7807fb Move qJsonFromRawLibraryMetaData into qfactoryloader_p.h
This is still not a great place for it, but this way we can
Q_REQUIRE_CONFIG(library) in qlibrary_p.h and qfactoryloader_p.h is the
only private header that doesn't require library support in plugin.pri.

Change-Id: Ia6c1ac8799822eca1e0cbeca98d1c1b8de74beae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-22 17:36:32 +00:00
Edward Welbourne
4c367833b4 Fix multicastMembershipHelper to not assume addresses are IPv4
Make it iterate the addresses available looking for an IPv4 address,
when that's what it needs, instead of just assuming the first entry in
the list (when non-empty) is IPv4.

Based on a suggestion by Dmitry Pankratov.

Task-number: QTBUG-27641
Change-Id: I1920f68ade44a996ea5c2ed691a87ff3e686f35a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 16:58:46 +00:00
Marc Mutz
9fbe3a9262 QErrorMessage: replace a QPair with a struct
Instead of the incomprehensible "names" .first and .second, the code
can now use .content and .type.

Change-Id: I7fe320ded33a07fb8ff77ac96c17fc5ee1079da3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-22 16:42:29 +00:00
Marc Mutz
494ee2aa8d QThreadPool: supersede cancel() with tryTake()
The cancel() function added in 5b11e43e for Qt 5.5 suffers from a
number of problems:

First, if runnable->autoDelete() is true, then the function suffers
from the ABA problem (see documentation written for trytake()).

Second, if runnable->autoDelete() is false, due to cancel() throwing
away crucial information instead of returning it, the caller cannot
know whether the runnable was canceled (and thus has to be deleted),
wasn't found or is currently executing (and thus mustn't be deleted),
or has finished executing (and can be used to extract the result).

Deprecate this dangerous API and replace it with the much more useful
Private::stealRunnable(), promoted to public API and renamed to
tryTake() for consistency with the rest of Qt.

Described the various caveats in the function's documentation.

[ChangeLog][QtCore][QThreadPool] The cancel() function suffers from
several subtle issues and has been replaced with a new tryTake()
function.

Change-Id: I93125935614087efa24b3e3969dd6718aeabaa4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-22 16:37:07 +00:00
Ulf Hermann
46730ca610 Make the factoryloader test compile without library support
We define QT_STATICPLUGIN for the plugins in this case, so that they
define the factory functions needed to link them directly into the
test.

Change-Id: I0f2de7bf6bec5a6d53ec9ad92536817c1221b7d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-22 15:53:13 +00:00
Allan Sandfeld Jensen
beaf33983e Fix wrong access to qMemRotateFunctions
Since this table was restructured in 7c401397a4 and changed to
being indexed bitwidth and not format, NEON-enabled builds have
been writing to an undefined place after the table.

Discovered by compiler warnings on CI.

Change-Id: I109cd19a8dd703bdafdf13afd3f96ebeaa0e6de5
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-02-22 14:36:56 +00:00
Marc Mutz
7c647edae9 QTypeInfo: don't treat enums and (extended) integral types as complex
We fully specialize QTypeInfo for most C++ built-in types,
but enums and extended integral types (like GCC's int128_t)
were not covered.

Now that we depend on <type_traits>, we can stop pessimizing
enums and extended integral types in QVector and QVLA by
defaulting QTypeInfo::isComplex to true for such types.

Fix a test that checked that enums were complex types. This should
have been a XFAIL test. Enums are not complex types.

Change-Id: Ibb0fb38cc83e980a428b5573d1db5666593418ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-22 09:21:57 +00:00
Marc Mutz
19085350fb Do not use QTypeInfo::isStatic anymore
... except in QList.

When dafa3618 introduced isRelocatable and QTypeInfoQuery, the
intention was to decouple the memory layout of QList from the
reallocation optimizations in QVector. This never happened, as
QVector (and QVarLengthArray) continue to use isStatic to this
day.

Fix by porting both QVector and QVLA to QTypeInfoQuery and
isRelocatable.

Change-Id: I6951f2cf21f0cbb24e2dbd38f80f1bd82007d394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 08:04:12 +00:00
Marc Mutz
4df229ce50 QArrayDataOps: don't use value-initialization
... but default-initialization instead.

This bug may have rendered the diverse Qt::Uninitialized ctors
we have in Qt containers ineffective.

Change-Id: I5a369fa8527f19b6f8cc1a9f36512f6a0058839a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 08:03:46 +00:00
Tor Arne Vestbø
53c0568924 macOS: Make sure NSResizableWindowMask is set when toggling fullscreen
Instead of setting the mask in toggleFullScreen(), which is only hit
when going to fullscreen via our own API, we do it in the window
notification callbacks, which also includes going to full screen via
the native macOS title bar buttons. This allows making customized
windows without Qt::WindowMaximizeButtonHint full screen with the
full geometry of the screen.

Change-Id: I63c3e4582ea7c4fe8c0008265793c5f656b830b2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-22 07:58:20 +00:00
Marc Mutz
adca47cbc1 QTzTimeZonePrivate: introduce PosixZone class
... as a replacement for QPair<QString, int>, and move some
repsonsibilities into it.

This avoids the repeated use of the magic number INT_MIN to indicate
absence of an offset and does away with the confusing .first and
.second, replacing them instead with proper names, .name and .offset.

Change-Id: I0f6906467b8efa16bed2bf5677f2bbbd534da1ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 07:58:19 +00:00
Tor Arne Vestbø
c585802e94 QWindow: Remove "_q_foreignWinId" dynamic property
The platform plugins reading this out of the QWindow was a layering
violation, and propagates the notion that a window can shape shift
into representing a new native handle, while none of the platform
plugins support this.

A foreign QWindow is created via the factory function fromWinId(),
at which point we can pass the WId all the way to the platform
plugin as function arguments, where the platform will create a
corresponding platform-window.

The platform window can then answer the question of whether or
not it's representing a foreign window, which determines a few
behavioral changes here and there, as well as supplying the
native window handle back for QWindow::winId();

[ChangeLog][QtGui][QWindow] The "_q_foreignWinId" dynamic property
is no longer set nor read.

[ChangeLog][QtGui][QPA] The function createForeignWindow() has been
added to QPlatormIntegration and is now responsible for creating
foreign windows. The function isForeignWindow() in QPlatformWindow
has been added, and platforms should implement this to return true
for windows created by createForeignWindow().

Task-number: QTBUG-58383
Change-Id: If84142f95172f62b9377eb5d2a4d792cad36010b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-02-22 07:58:07 +00:00
Stephan Reiter
1d44b6bedb QProcess::startDetached(): Support privilege elevation for non-.exe files
Pass classname 'exefile' to ShellExecuteEx() for UAC prompt.
This allows running executable files that do not have a .exe extension.

Task-number: QTBUG-59008
Change-Id: I88d669481e893db50edccd7b30259e5366477556
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-22 07:47:18 +00:00
Oswald Buddenhagen
dab0138043 make more use of 'use' in library detection
now that it works nicely, make use of it for the zlib deps, which are
not transitive when the detected library is built statically.

Change-Id: Iaed87a37b36f714f0b919244cd84809650102ba9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:47:13 +00:00
Oswald Buddenhagen
421bbefb9d configure: fix 'use' for detecting static libraries
these statements are assumed to provide dependencies for the currently
detected library. this implies that their resolved content must be
passed to the linker after the to be detected static library.

Change-Id: Ifaaee2ac71bf176e8a0033765fb979fe119deaba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:47:02 +00:00
Oswald Buddenhagen
fcf0aee044 configure: make it possible to make 'use' conditional
Change-Id: I8390634c5b23bf34692b4f532ab00a7aba690037
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:59 +00:00
Oswald Buddenhagen
52b260fb0f configure: support using libraries by their exported name
Change-Id: Ibe43c587e83e679baa5f0fc91f452ee06c1e293f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:55 +00:00
Oswald Buddenhagen
8ccb46d80e configure: fix cross-module library uses
this went unnoticed, because the only cross-module 'use' so far is that
of egl, for which the code path provided for modular builds happens to
(mostly) work due to the specs already providing the library definition.

amends cc842ca4.

Change-Id: I58c638d896eabd26f27d5cd90e3a7f8eeece9bc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:50 +00:00
Oswald Buddenhagen
2408166f5a clash-check configure sub-config names
we derive the keys from the last fragment of the parent directory, which
is potentially not globally unique.

Change-Id: I57cf13394984e6e3d902c0f1bb495bd3920bfc75
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:45 +00:00
Oswald Buddenhagen
0f16ac3d64 configure: propagate errors from libraries' transitive dependencies
if a library uses another library which happens to be absent, then the
former must also fail.

amends cc842ca4.

Change-Id: I91f157a6d1ed40b66e196340a282ebe493fcf40e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:39 +00:00
Oswald Buddenhagen
632b1c1345 configure: error out on activating conflicting libraries
Change-Id: I5d7dbeb3b3a653f7151279c7eba9387c107f9c42
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:35 +00:00
Oswald Buddenhagen
59a3abd1f1 configure: generalize command line overrides of library parameters
the outdated ones remain for backwards compatibility; some remain
unchanged.

Task-number: QTBUG-30083
Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:25 +00:00
Oswald Buddenhagen
aa88fe8417 don't make false promises about configure FOO=bar assignments
they don't actually override values from pkg-config.

Change-Id: I00bc7f4bcbfb4e036cb1ac9fa842d68523f54605
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:16 +00:00
Oswald Buddenhagen
5f20954291 add configure -list-libraries
currently mostly for debugging purposes (especially with -verbose).

Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:11 +00:00
Oswald Buddenhagen
7509ccc0f7 add configure -list-features
also actually deletes qfeatures.txt, which was already claimed by
a668c6a6, but not actually done.

Task-number: QTBUG-58411
Change-Id: I686760632fee7c10b01bd2e83f2481b01bc2b774
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:05 +00:00
Oswald Buddenhagen
5e2367aaa5 use regular configure mechanism for openssl library references
don't attempt to hand-craft a library export any more. instead, use the
configure system's built-in mechanism, and refer to it via QMAKE_USE.
this also allows us to rely on transitive dependencies in the autotest.

as a side effect, this makes the openssl-linked feature imply the
openssl one.

Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:59 +00:00
Oswald Buddenhagen
4f2a571f09 fix usage of "empty" libraries
a header-only library in a default location would produce no variables
at all, making it appear undefined. fix this by forcing the writeout of
the QMAKE_LIBS_* variable, and use its definedness (rather than
non-emptiness) as a signifier.

this works for both QMAKE_USE and configure tests'/libraries' 'use'
entries.

Change-Id: Id7a1e23725caba1a91ea4db448b4aeb7fe632393
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:52 +00:00
Oswald Buddenhagen
980daa49b2 prefer library's export name when looking up input variables
if multiple library entries provide the same export (as openssl is going
to), it makes sense to make them recognize the same input variables, as
it would be rather counterproductive to require different configure
arguments for each.

Change-Id: Ia32842e95294296d50220297f85689bc92de2d05
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:46 +00:00
Oswald Buddenhagen
4a93adba60 configure: refactor qtConfExportLibrary()'s interface
pass the library name instead of a library source object.
improves overall legibility at a marginal runtime cost.

Change-Id: I248ee9622af2b2c37daa2dbc0cc0bca5701d7925
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:42 +00:00
Olivier Goffart
5426e689f9 Fix a race condition between QObject::connect and qRegisterMetaType
QObject::connect will extract the QArgumentType for first the signal,
then the slot. The QArgumentType with a string constructor will query
the metatype system to get the meta type id. But it might happen that
between the extraction of the signal's argument and the slot's argument,
qRegisterMetaType was called in another thread. For this reason, it's
possible that one QArgumentType has a type id while the other does not.
For this reason, we should fall back to compare the string if any of
the argument's type is 0.

Task-number: QTBUG-50901
Change-Id: I260ca662ff00a773ae519f78bb633e05fde0ea81
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 07:37:51 +00:00
Marc Mutz
7de8745eaa QSizePolicy: add C++14-style constexpr where possible
This is straight-forward, since, unlike with transposed(), we can
assume that every compiler that supports C++14 constexpr also supports
C++11 uniform initialization. For Clang and GCC, this is clear. For
MSVC, we might need to reconsider this, as, according to
qcompilerdetection.h, 2015 still does not support uniform
initialization (but not C++14 constexpr, either), and we don't know
what 2017 will support.

Change-Id: Idac7aa929d275645478a926896dca0dff166e114
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 07:12:25 +00:00
Marc Mutz
e0a9a0e217 QArrayDataOps: do not use QTypeInfo::isStatic anymore
These days, QTypeInfoQuery and isRelocatable should be used.

Change-Id: Ieac2d7fcef6b1d5466b14bbd1066901d6e751a55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 07:12:13 +00:00
Marc Mutz
809cef1732 QTimeZone: do not access static functions through this->
The this pointer cannot be null, so we can't do d->staticFunction while
d is a null pointer. This was caught by Clang 3.8's ubsan.

Change-Id: I3c0d39b88cca83d827a69ed1544a4412b18ac907
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 07:00:43 +00:00
Thiago Macieira
370bfc0b0d Disable optimizations for macx-icc debug
icc defaults to -O2, so this was causing debug code to be built like
that, making debugging very hard. This change also hardcodes -O2 for
release builds, just in case.

Change-Id: Ibc5c715fda334a75bd2efffd14a478ce539a3a3f
Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-21 23:42:05 +00:00
Thiago Macieira
53139a8c0a Remove alias options from linux-icc/qmake.conf
They are the default with icc.

Change-Id: Ibc5c715fda334a75bd2efffd14a478c20b527d7c
Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-21 23:41:39 +00:00
Tor Arne Vestbø
3b38392844 testlib: Add qWaitFor to wait for predicate
Reduces duplication of logic and allows other primitives to be
built on top.

Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-21 14:32:28 +00:00
Olivier Goffart
d57bb19902 Fix crash while dropping a tabbed group into a single floating QDockWidget
The problem was caused by commit 0feeb6f6d2
which fixed QTBUG-58036. It reparented widget that used to be skiped.
In particular, floating widgets are skiped. But seting the parent of a
floating widget docks it. And so as a result it would not be skiped anymore.
This has two side effect: This breaks the animation (as the widget is
docked too early; and cause crash when QDockWidgetGroupWindow get
reparented as this breaks invariant that these are always floating.

So restore the skip from before commit 0feeb6f6d2,
and explicitly set the parent in all cases when the animation finishes.

Change-Id: I0e3e29ad22d6ffe4d62242d48a18dadb916fc14f
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-02-21 11:12:14 +00:00
Marc Mutz
22a88dce03 QErrorMessage: handle all message types
The perils of adding a default: case to a switch over an enum type:
the compiler no longer warns when the enum is extended.

Provide strings for QtCriticalMsg and QtInfoMsg, too.

[ChangeLog][QtWidgets][QErrorMessage] No longer displays critical
(QtCriticalMsg) and informational (QtInfoMsg) messages as if they were
debug (QtDebugMsg) ones.

Change-Id: Id6776081be736ad92423ec016988dcd92a963cc7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-21 09:49:05 +00:00
Tor Arne Vestbø
2fbe54472e macOS: Retain foreign windows
Regression after 89842b97d7, where the retain was part of setView.

We release m_view in the destructor, regardless of how the view was
acquired, and the non-foreign window retains by being the one creating
the view.

Task-number: QTBUG-59001
Change-Id: I6d9621a63ea6ec2cee008986b0ab72ff61110ad7
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-20 13:56:12 +00:00
Tor Arne Vestbø
3e5d5852dd windowflags: Update preview info when window state changes
Change-Id: I072939cdff0bd58779d9c163cb23e8176f3bc84a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-20 14:19:47 +00:00
Marc Mutz
8d1fc3ca4d QtGui: port the last remaining Q_FOREACH loops and add QT_NO_FOREACH
Port the last two remaining Q_FOREACH users in QtGui
to C++11 range-for and mark the library as Q_FOREACH
-free, using QT_NO_FOREACH.

Change-Id: Ie6c5eea0af4227af6ef3dc0b4da2cf62e09d8b52
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-20 13:51:40 +00:00
Olivier Goffart
f3a4b4258f QWidget: update the font when the screen is changed
The screen may change the dpi so the font dpi is also changed.
We must tell QWidget that the font has changed by sending the
FontChanged event to all sub widgets so they can update their
geometry.

Task-number: QTBUG-48242
Change-Id: Ibcdcc0c96429b8cd16311928298294f47a23e816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-20 12:48:34 +00:00
Edward Welbourne
3cdf8debd1 Make sure to use C locale during time tests that assume it
Some format and parse tests for time and date-time depended on locale
but had test data for the C locale (so fail if the test-environment
has, e.g., LANG=de_DE@utf8).  So impose the C locale (until Qt 6).

The date-time test did *some* attempts at fixing for locale, but
failed to handle am/pm; and we do have "### Qt 6" comments in
Q(Date|Time)+::fromString indicating that we intend to switch these
methods to use the C locale by default (which shall fix this once and
for all).  So rip out the incomplete localization now and test we work
properly at least when the locale used *is* C.  Add a comment to the
matching QDate test to rip out its (presently adequate) matching code
once we do get to Qt 6 and make fromString() use the C locale.

QDateTimeParser uses systemLocale(), which is initialized the first
time it gets accessed; so we need to frob the locale *early*; doing so
in the test-class constructor is about as early as we conveniently
can; and seems to work (while doing it in individual tests does not).
(There is no point rolling back at the end; the QSystemLocale global
has been set up by then, so the roll-back would merely leave the
global out of sync with setlocale() and the environment.)

Task-number: QTBUG-58728
Change-Id: Ifa6778a80276050a099387a6dab15a1096be7561
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-20 08:48:46 +00:00
Paul Olav Tvete
7057b19b89 Only define "accessibility" feature once
The "accessibility" feature was defined globally for qtbase, but also
in src/gui. The definitions could end up with different values.

Change-Id: I1a932c3c04a5fc26b9f67eb4f5ff02e524f380e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-20 08:30:07 +00:00
Marc Mutz
567abeaa04 QLoggingRegistry: fix potential data race
The 'rules' vector is made up of all the individual {env,config,...}Rules
vectors under mutex protection whenever init() is called (only from the
QCoreApplication ctor) or, at any time, by a call to QLoggingCategory::
setFilterRules().

Yet, the writes to the individual *Rules vectors were never protected by
registryMutex, racing against the reads of the same vectors in the
updateRules() function.

Fix by protecting all access of all member variables with registryMutex.
Add some strategic comments to make analysis easier for the next guy.

Change-Id: If68d15a553ec7038693574a34f10a39f4cd480e8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-20 07:23:59 +00:00
Tor Arne Vestbø
5f80a7956e windowflags: Improve compound states handling
Change-Id: Iab5df40b69cf9c0e11f0e495a6b27af9c05fbd94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-19 23:36:29 +00:00
Marc Mutz
9965e92e4f Make better use of new QStringList::join(QLatin1String) overload
It was added in Qt 5.8.

Change-Id: I7194fbfaef9219110604f3b03a893a658c996c06
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-19 08:46:00 +00:00
David Faure
cfe1a295fc qeglfskmsegldevicescreen.cpp: add errno.h include
Compilation failed with clang 3.9.1:
qeglfskmsegldevicescreen.cpp:104:27: error: use of undeclared identifier 'errno'
            qErrnoWarning(errno, "drmModeSetCrtc failed");

Change-Id: I7cf08494359092b9cdac10bb013ac56c3ddf5597
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-02-18 10:53:18 +00:00