Commit Graph

22041 Commits

Author SHA1 Message Date
David Faure
70ed7c727a tst_qitemdelegate: remove more duplication.
Makes it easier to add new tests.

Change-Id: I5c2bca60e125259eac83a03860e60ca85b51db24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-17 10:25:31 +01:00
Marc Mutz
2173491f06 tst_QSizePolicy::getSetCheck: separate data generation from test
This is in preparation of adding more tests.

It makes the test run longer, because of the additional book-keeping,
but if something goes wrong, it can pinpoint the circumstances better.

Change-Id: I4be68fcfbffe48e8609b722ea551b1f7c36790a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-17 10:21:06 +01:00
Boris Dušek
8a1e6f48f5 Fix qaccessibilitymac test (title vs. description)
We tested button's AXDescription, which is however used only for
non-textual buttons (e.g. buttons with an icon and without a visible
text). On the other hand, button's visible text (which is our case) is
exposed in AXTitle (and not in AXDescription).

Change-Id: Ie89c758cf94b72ade3a440561c5f3df61a4c4612
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-01-17 09:58:14 +01:00
Jørgen Lind
37956e6605 Introducing QPlatformGraphicsBuffer
Change-Id: Idcf8f75bd151a877c7097b79df998c1ffd56871c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-17 08:03:34 +01:00
James Turner
517fb90268 Fix bugs generating PDF on Cocoa
Provide real implementations of:
	properties(), faceId() and getUnscaledGlyph

Task-number: QTBUG-10094
Change-Id: I5899f247742406de53c68c5cd04fee6fb9b6b7d2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-01-17 06:32:40 +01:00
Giuseppe D'Angelo
e9ad46ed41 QSortFilterProxyModel: fix a regression
bec1854cc0 introduced a regression:
when sorting a tree model, children items would not follow the sorted
parents any more (they wouldn't be remapped correctly), resulting
in crashes.

So, the fix needs more reasoning; let's revert the fix,
but leave  the original test around for any subsequent attempt, and
introduce a new test which looks for the right behavior when
sorting trees.

This commit partially reverts bec1854cc0.

Task-number: QTBUG-43827
Change-Id: Ic83ac53aef639f870f6c36a8b4b2992f5b485b13
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2015-01-17 06:32:37 +01:00
Allan Sandfeld Jensen
fb22d54aa1 Improve performance of path clipping in rasterizer
This patch short cuts a common loop in the gray rasterizer where it
would iterate over cells it considers invalid.

This greatly speeds up clipping paths on large paint devices, but
probably has little benefit for the FreeType origin of our rasterizer.

Task-number: QTBUG-40559
Change-Id: I30845de0b82e53b619853c6c91903793b4267615
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-17 06:32:29 +01:00
Giuseppe D'Angelo
0d65bf4f9f QOpenGLTexture: better document the depth/stencil features
For some reason these docs were missing, add them.

Change-Id: If17cf429925ee849a0817e0294a7db7f6dace79b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-17 06:32:27 +01:00
Sérgio Martins
e884ecf6d1 QColorDialog: Fix build with QT_SMALL_COLORDIALOG
nonTouchUI wasn't defined anywhere, this Q_WS_S60 codepath was partially
removed during the Qt4->Qt5 port, but some cruft remained.

It's not worth saving, because:

- QML is now the way to go for touch UI code
- It's ugly, didn't build, won't be missed

and more importantly:

The current layouting code is already very difficult to read, since we have
"normal" mode, QT_SMALL_COLORDIALOG normal and QT_SMALL_COLORDIALOG touch.
(and WINCE ifdefs in the mix)

This will make the ifdef hell a bit better.

Change-Id: I6daa07cbc8da94ccfe1d0c8d3e870c0678c541fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-17 06:32:22 +01:00
David Faure
3c6f333634 QProgressDialog: don't require setValue(0) to be called.
1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp
forgot too, which led to a valgrind warning, the elapsed timer was never started)

2) setValue(0) makes no sense if the progress dialog goes from 50 to 60,
or any other non-zero minimum value.

Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case), and by also starting
the timer when calling setValue(minimum()) for well-behaved dialogs.
setValue(0) special case kept for compatibility.

Task-number: QTBUG-17427
Task-number: QTBUG-25316

[ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating
the duration of the progress dialog is now started in the constructor and in
setValue(minimum()), as well as when calling setValue(0), as previously documented.

Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-17 06:32:21 +01:00
Marc Mutz
3d8a10b960 QHash: only fetch qt_qhash_seed when detaching from a null QHash
The old code fetched QHashData::seed from qt_qhash_seed on every detach.

That is both unnecessary and wrong.

It is uneccessary, because if the detached-from QHashData isn't shared_null,
the seed has already been populated from qt_qhash_seed. It thus suffices to
fetch the seed from qt_qhash_seed only when we detach from shared_null.

It is wrong, because if qt_qhash_seed was changed between the detach from
shared_null and a following detach, d->seed is now different from this->seed,
but detach_helper simply clones the buckets 1:1 from this to d, leaving d
in a corrupt state.

By doing this change, we make QHash robust against on-the-fly changes
to qt_qhash_seed (e.g. for testing, or added security). It also opens up the
option to have API for changing the seed of a given QHash instance after it
has been created (detach, set new seed, rehash).

Change-Id: Ib251fc9a6204b42036e97a2fc66f644b379ab841
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-17 06:31:54 +01:00
Thiago Macieira
9d46189a64 Remove Q_C_CALLBACKS
This is useless. The C++ language does require callbacks passed to C
functions to also be extern "C". That's what this macro was doing.

But #ifdef'ing for the macro only made the code uglier. Just let the
extern "C" be there for all compilers.

PS: C++ classes can't be extern "C"...

Change-Id: Ic5d393bfd36e48a193fcffff13b9c9b3923443dd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-17 06:31:20 +01:00
Thiago Macieira
ec9bc843d8 Fix compilation with Apple Clang 425
This version was based on Clang mainline between releases 3.1 and 3.2,
which means it has part of 3.2 features but not all. One of the missing
features is __builtin_bswap16.

Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-17 05:03:33 +01:00
Thiago Macieira
be5b04fd37 Move enabling of C++11 Unicode Strings with ICC from 12.1 to 14.0
The support in 12.1 and 13.x appears to be incomplete. Move it to the
official supported version

https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler

Note: this commit will cause a conflict in 5.5 against
99357e32a0

Task-number: QTBUG-43864
Change-Id: Ic5d393bfd36e48a193fcffff13b9a07106e96795
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-17 05:03:29 +01:00
Friedemann Kleint
9d1bcd727a Diaglib/Event filter: Output application state on focus events.
Output the current active/modal/popup windows when receiving
FocusAboutToChange or FocusIn events.

Task-number: QTBUG-42731
Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-16 17:25:20 +01:00
Morten Johan Sørvig
b2cff0b4bf Fix stylesheet crash.
Style sheets that refer to the progress bar (like
"QProgressDialog[maximum='0']{}") may dereference a
null-pointer during the styleHint() call in QProgressDialogPrivate::init()
since the progress bar has not been created yet.

Move the creation of the progress bar closer to the
top of init(), before the styleHint() call.

Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90
Task-number: QTBUG-43830
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
2015-01-16 14:27:26 +01:00
Morten Johan Sørvig
5239ba95e8 Add missing AppDataLocation case
This amends commit f3bc9f5c.

Change-Id: I69b1a5080e7ac92b8a39746d814da77b17c271c2
Task-number: QTBUG-43868
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-16 13:50:28 +01:00
Marcel Krems
593e3f2fbb Update printer metrics after resolution change.
[ChangeLog][QtPrintSupport] Fixed QPrinter::{width,height} return values
when the resolution is changed in the print dialog.

Task-number: QTBUG-43124
Change-Id: Ib805907affed4b1ffb48e6b1ff89f7a79ab3e329
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-01-16 13:34:37 +01:00
Eric Lemanissier
c28718b88b Correction on bound values in case of repeated QSqlQuery::execBatch
Until now, QSqlQuery::execBatch did not call resetBindCount, which lead
the next call to QSqlQuery::addBindValue to start at non zero index.
This is problematic in case of a prepared query which is called several
times.

Task-number: QTBUG-43874
Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-16 13:14:26 +01:00
Mark Brand
2f010390ad update bundled sqlite to 3.8.7.4
The "Fixed CE build of sqlite3" patch is preserved in this change.

Change-Id: I5461571e5e0b60678727c96a9faee93f9624588c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-16 12:14:15 +01:00
Laszlo Agocs
19b8edebf5 Make transparency test actually test transparency
The OpenGL windows should have some more obvious
transparent areas in them.

Change-Id: I7d000cd367208f99a79b11c341bf94062613f357
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-16 12:12:37 +01:00
Giuseppe D'Angelo
8cbf402123 QComboBox: simplify code
Remove an useless check and hoist a costly call out of a loop.

Change-Id: Ibd1750026af44462a4f0223a9b2f422ebcc7c0e3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-16 12:08:58 +01:00
Pasi Petäjäjärvi
3c6a960b5b Rename QML debug macro to Qt naming style
With change macro is in line with QT_NO_<feature> style of naming
macros. This way it will also be automatically added to file
mkspecs/qmodule.pri in QT_NO_DEFINES value.

Change-Id: I111d07fd015994290c54e00e8aac2d6dbdb7de9e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-01-16 12:08:37 +01:00
Joerg Bornemann
e01c8103e1 fix MSVC target architecture detection for amd64_x86
When using the cross-compiler toolchain for 32 bit on a 64 bit machine,
qmake generated a 64 bit VS project.
This was because qmake didn't know about the amd64_x86 cross-compiler,
and qmake did not use the first MSVC bin directory it found in PATH.

Task-number: QTBUG-43457
Change-Id: I50c6f7bb9afe44a58321c670d680dbcc7cd07223
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-16 12:07:03 +01:00
Richard Moe Gustavsen
5884160db6 iOS: add AppIcon asset name to Xcode project
The current work-flow for adding app icons to an
iOS app during deployment is not good. You basically
need to specify that you want to use asset catalogs
from within Xcode and add your icons there. The
problem is that qmake will regenerate the Xcode project
the next time it runs, and your changes will then be lost.

This patch will check if the project has a valid asset
catalog assigned to QMAKE_BUNDLE_DATA, and configure
the Xcode project to use it for app icons.

Change-Id: I06621ca46aad91de96cb23ba8ca3b1a3f1226670
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-16 11:24:09 +01:00
Nico Vertriest
576cf413bb Doc: verb "to layout" changed to "to lay out"
Task-number: QTBUG-43657
Change-Id: I574186253ee423cc380ec3c6f274f1caa2a6aa2a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:46 +01:00
Nico Vertriest
ddbac7de8d Doc: added entry for link to main page Qt Creator
Task-number: QTBUG-43115
Change-Id: I10413536b981bf248950522dfe07b96394db9c29
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-01-16 10:29:35 +01:00
Nico Vertriest
871560d45c Doc: define target voor function qsnprintf()
Task-number: QTBUG-43537
Change-Id: I76c511891a1a07eca77da399d23097e76047f824
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:22 +01:00
Nico Vertriest
24238e6a31 Doc: link issues in corelib
Task-number: QTBUG-43115
Change-Id: Ia80802e698f16730698e9a90102f549fb35f9305
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:12 +01:00
Paul Olav Tvete
a8a00f646b Turn off font hinting when we do high DPI scaling
Font hinting depends on the specific pixel size, and ends up very
wrong when the painter is scaled.

Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455
Task-number: QTBUG-43809
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-16 09:52:44 +01:00
Paul Olav Tvete
c1d08afd31 Fix constantly growing window bug with devicePixelRatio
Rectangles need to be mapped differently depending on what they are
used for. Expose events need to cover the entire geometry, so they must
be rounded up, potentially increasing the size. If we use the same
conversion for window geometries, it is possible to end up with a
feedback loop if the window reacts to the new size.

Task-number: QTBUG-43743
Change-Id: I7881cc77bf2148fed2ae743c4226617a61197434
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-16 09:52:38 +01:00
Eskil Abrahamsen Blomfeldt
4448576ae0 Android: Fix QLayout tests
This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().

Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:57 +01:00
Eskil Abrahamsen Blomfeldt
7a760f5ed9 Android: Fix QDirModel tests
This test needs to have a test environment available on the regular
file system, so we create this when initializing the test. In
addition we QEXPECT_FAIL one of the tests which seems to expose
a legitimate bug. A bug report has been created for this.

Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:52 +01:00
Eskil Abrahamsen Blomfeldt
a0c21829ea Android: Fix QSideBar test
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.

Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:45 +01:00
Eskil Abrahamsen Blomfeldt
9a34b69b7d Android: Skip QProcess_and_GuiEventLoop test
This requires building a command line tool and running it using
QProcess, which is not a supported deployment option on Android.

Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-01-16 09:27:37 +01:00
Eskil Abrahamsen Blomfeldt
1ee6fdc72c Fix QRawFont test when used with bundled FreeType
The auto-hinter in the FreeType version bundled in Qt gives
slightly different advances on some glyphs. As noted in
the removed code, this was already observed on Windows and QNX,
and recently also on Android.

I'm sure it could also happen on platforms using the system library
if the system library was the same version as the one bundled in Qt.
Instead of expect-failing the test, we simply accept both the
observed results as valid.

Note that we need to accept 9 as a result for the default hinting
preference on all platforms, not just Windows, since the default
hinting preference in FreeType can be a system setting.

Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-16 09:27:29 +01:00
Eskil Abrahamsen Blomfeldt
b4031387f9 Android: Fix QImageReader test
The files for the test have to be included in a qrc to be available on
Android.

Most of the image files are already in a qrc, but a couple were missing.
We add this in a separate qrc to avoid interfering with the tests on
other platforms.

Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:15 +01:00
Friedemann Kleint
988f1b2e57 Windows: Use DND effect chosen in DragEnter/Move for Drop.
The value of pdwEffect passed to IOleDropTarget::Drop() is always
the one with which the drag was initiated.

Task-number: QTBUG-43466
Change-Id: I045fef634b55d4f113b393aa0ad4aa15d37db372
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-16 08:16:36 +01:00
Rainer Keller
997b040310 Autotest: Find all autotests due to changed naming conventions
The algorithm searches for all executables in search path starting with
"tst_". Tests are not named like the folder they are contained in
anymore.

Change-Id: I360f293e43e30292fe0ae6230fd3ec7abf3d632d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-16 08:14:55 +01:00
Rainer Keller
f6a59f8def Benchmarks: Build gui benchmarks only when gui module available
Change-Id: I57fc2f09a4e31e379c256dfe3f5d7546cdcf2b4b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-01-16 08:14:49 +01:00
Frederik Gladhorn
ccb5978c6d Fix namespacing of QNSViewMouseMoveHelper
Task-number: QTBUG-43061
Change-Id: Ied8cdf49c34ef155b0f0bbc7e547b7c01bcd1d11
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-16 06:47:26 +01:00
Friedemann Kleint
241d32bfe3 Fix inlining order of functions in qpathclipper_p.h.
When compiling tst_qpathclipper with MinGW:

In file included from QtGui/private/qpathclipper_p.h:1:0,
                 from tst_qpathclipper.cpp:33:
src/gui/painting/qpathclipper_p.h:469:29: warning: 'static QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
                             ^
qpathclipper_p.h:474:29: warning: 'static QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction direction)

Change-Id: I38feb07d693768285c1d405b3fc92a58c3309547
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-16 06:31:46 +01:00
Marc Mutz
ba7653fb74 qtest_widgets.h: add support for pretty-printing QSizePolicy
... in QCOMPAREs.

The implementation is hidden in a nested Internal namespace that retrieves
the strings without strdup()ing. That makes it easier to compose these
functions as there is no need to delete character arrays when using them.

The public interface (which qstrdup()s) is implemented on top of these.

[ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.

Change-Id: Ib03d969847e5a12474c71a7921366b400025f680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:12:59 +01:00
Marc Mutz
49057a1eab QVariant: attempt to work around an ICE on linux-arm-gnueabi-g++ (Ubuntu 11.10) with constexpr QSizePolicy
This is the error:

  src/corelib/kernel/qvariant_p.h: In constructor ‘QVariantPrivateSharedEx<T>::QVariantPrivateSharedEx() [with T = QSizePolicy]’:
  src/corelib/kernel/qvariant_p.h:107:61: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560

There are two things fishy in this file:

1. Use of the unnamed namespace in a file that gets included
   in different libraries. While not technically undefined
   behavior, it may become so when used in the implementation,
   which it is.
2. Missing explicit initialization of a member of
   QVariantPrivateSharedEx. This is just a wild guess, because
   the ICE happens in that line. That class itself is quite
   smelly, because the address of an object is taken before
   the lifetime of the object begins. A fix would be to store
   the object in a wrapper class from which QVPSEx inherits
   _first_, but then a cast from QVPSEx to QVariant::PrivateShared
   would require pointer adjustments, and I didn't look through
   all the code to determine whether that would be an issue.
   Having been bitten by this sometime ago:
    https://marcmutz.wordpress.com/private-practice/private-practice-taming-templates/#edit-20111128
   I opted to do these easy changes first to see whether they
   already fix the ICE.

Change-Id: Ic15fd928b3dff2318c425c915b2dab5e54254d71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:12:54 +01:00
Thiago Macieira
47f99cacc4 Don't call static members with object
This makes it clear that we're not modifying d.

Change-Id: Ic5d393bfd36e48a193fcffff13b968c6d08e69f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-16 03:12:28 +01:00
Thiago Macieira
514af281e3 Add QTimeZone::{systemTimeZone,utc}
[ChangeLog][QtCore][QTimeZone] Added methods systemTimeZone() and utc()
that return QTimeZone objects for the system time zone and for UTC,
respectively.

Change-Id: Ic5d393bfd36e48a193fcffff13b96821bb8514b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-16 03:12:13 +01:00
Thiago Macieira
3d051d41a3 Fix forkfd build when O_CLOEXEC isn't defined.
O_CLOEXEC was introduced with the 2008 revision of POSIX.1 and it's the
only way of doing child processes safely with fork(2) in multithreaded
applications.

But we need to support pre-2008 systems, so we can't use that constant.
So let's just choose two arbitrary values for both of our constants --
we need to change both because we need to be sure that FFD_CLOEXEC won't
be the same as FFD_NONBLOCK.

Linux will probably implement them to the O_ constants, like epoll,
signalfd and inotify have done.

Change-Id: I20a5aa6e6264e7a219e19759eeb8747e01df05ff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-01-16 03:12:09 +01:00
Holger Hans Peter Freyther
98008efcf8 Fix assignment within a Q_ASSERT
This was introduced in 3b844c16e0
and doesn't seem to be right.

Change-Id: I1c6a9445996650566d44f223651dd0c855619a88
Fixes: Coverity CID 21589
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:11:52 +01:00
Thiago Macieira
bbded12df3 Update QFileSelector to use QSysInfo better
This reduces a bit of string duplication by relying on the constants
defined in qglobal.cpp and detection via uname(2), in addition to adding
the Linux distribution name as a selector.

Change-Id: I64a46a0fc552c399db787125b1b32aae5c50056f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2015-01-16 03:11:51 +01:00
Friedemann Kleint
23f663cad6 Fix compilation of manual Open GL tests with Dynamic GL.
Change-Id: Iffd57f26dfc9d6a00cab855270207fc4da7eb1ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-15 15:35:11 +01:00