Commit Graph

15961 Commits

Author SHA1 Message Date
Oswald Buddenhagen
6a1e534627 fix overquoting in some mkdir calls
Change-Id: I2ed418064d43ab8cdab87af48e03d983c023ccf5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
02556c0dc5 clean up mess surrounding PLATFORM_MAC
introduce XPLATFORM_MAC which is properly initialized from the spec
instead of from the host.

use that and BUILD_ON_MAC where appropriate.

minor bug: during command line arg validation we use BUILD_ON_MAC even
when XPLATFORM_MAC would be in order, because the latter is not
available at that point yet. the solution would be delaying the
validation, but that doesn't seem worth the effort now.

Task-number: QTBUG-33896
Change-Id: I63f361212961bfdd82efde2ca71a1f48904a85fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
f0524cedda consolidate all license checking in the earliest place possible
... which is right after performing the platform detection, as proper
license checking needs to know the target platform.

we can do that now, as we moved all more expensive or side effect laden
processing to a later point.

as a side effect, we also get rid of the weird early cmdline parsing.

Change-Id: I0fda0a15a1ea2082603f7097e89aa422853f30fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
a6b9729d1c don't initialize build dir earlier than necessary
this way, platform detection (and later license checking) become
(mostly) read-only operations.

Change-Id: I4c5ffcf80feadfeee2c6e927cf0285f46fa6ea43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
078ad536c8 print help right after parsing command line
is the only sane thing, and now that there are no dependencies on
anything else any more (in particular anything slow or side effect
laden), we can actually do it.

this removes some nasty OPT_HELP checks spread throughout the code, thus
further reducing data dependencies.

Change-Id: Ib0a00e1514e2aa25ec3b527ba9f5719e3214640b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-20 12:40:06 +01:00
Friedemann Kleint
829b1d13b2 Ensure Qt::WA_Mapped is set in case of obscured native windows.
Task-number: QTBUG-33520
Change-Id: I51f9b4634be29fd32f4ad9cc8b5d3e10b19ea2f5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-20 09:39:56 +01:00
Oswald Buddenhagen
558b0a24d6 make help independent from options and environment
the help would echo the defaults adjusted by command line overrides and
environment variables for some options. this was entirely pointless.
it also printed the result of the os detection, which was mostly
useless.

but the primary reason for doing this is reducing data dependencies,
so the code can be moved up.

not touching the windows configure, as it's a lot harder and currently
that behavior isn't in the way of what i need to do.

Change-Id: Ide62119091c8494fb3bea2b607f140268f057919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:12 +01:00
Oswald Buddenhagen
925899dcd6 do CONFIG+=silent after configure tests
it's counterproductive to do it earlier: it's passed down to configure
tests, which then log less info than they could.

but primarily, this serves the purpose of minimizing the amount of code
executed before platform detection.

Change-Id: Iff19b8555de19d048ea6d9341af965871b314c54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:07 +01:00
Oswald Buddenhagen
862fbd98cd move some option validations to more relevant places
minimizing the amount of code executed before platform detection.

Change-Id: Ib2c0d97ce5040ced8c4c41d74f428fe7d0f75664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:04 +01:00
Oswald Buddenhagen
d1990a7132 don't automatically display help on error
it's entirely pointless to flood the user with information and force him
to scroll back when he most likely just made a typo.

apart from that, this reduces the data dependencies, thus easing further
refactoring.

Change-Id: I7b24274d453de54a4f02481a66d77e27d4ab0657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:59 +01:00
Oswald Buddenhagen
c9692fbd6e remove hacks to support solaris 2.[56] and aix < 5
moving dead code out of the way of further refactoring.

Change-Id: If558406cdf13d61478634dd7eff644dc67b0e53d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:51 +01:00
Oswald Buddenhagen
7faf1a73ef initialize WHICH, AWK, PERL and MAKE a bit earlier
have this option independent code out of the way before starting option
processing.

Change-Id: I5a08caeb25689b155c256ef82505c000112f5039
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:45 +01:00
Friedemann Kleint
dcd71a0897 Android: Remove usage of QObject::tr()
Change-Id: I948d9fc36aa52d2d247a84b5d9b2cf949b93387d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-19 10:39:20 +01:00
Tor Arne Vestbø
eccd365ac5 iOS: Don't enable kEAGLDrawablePropertyRetainedBacking
We report our swap-behavior as QSurfaceFormat::DoubleBuffer, which means
there's no point in using retained backing. This was a left-over from
when we reported single-buffered swaps, which didn't work to well as
clients would wrongly assume swap was not needed at all.

Change-Id: Id26df2f8b282892c720d48cfe85eb9e010f1500d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 19:26:56 +01:00
Tor Arne Vestbø
69a8c59b3f tst_QWindow: Set explicit window position to please qWaitForWindowActive
qWaitForWindowActive waits until the timeout for the window to receive
a non-0x0 position, even when it's active, just in case the WM sets
the position as a response to focus-in.

Change-Id: I748cce2747f406a8cdff556465175f02675fcd13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 19:26:47 +01:00
BogDan Vatra
98f0b46689 Android: Use native platform menus.
This is an Android only patch, a proper implementation
will be pushed soon to stable branch.


Task-number: QTBUG-29462
Task-number: QTBUG-33588

Change-Id: I3447c523b4533a768d7f95e4ae60541b09a7944f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-18 19:26:21 +01:00
Marc Mutz
eb122a6fe4 tst_QAlgorithms: fix compilation with C++11 enabled
GCC refuses to use a merely static const uint array in a constexpr function.

Fix by making the array constexpr if supported by the compiler.

Change-Id: Idd59d3f74f8f4e98aad82bc892f4a6469932df9f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-17 09:48:17 +01:00
Marc Mutz
e721cf1508 QCollatorSortKey: inline operator<
This code was duplicated in every qcollator_platform.cpp and identical everywhere,
except in _icu, which uses a QByteArray m_key and the implementation used
QByteArray::operator<, which is semantically and probably code-wise identical to
what the other implementations did (after inlining).

Inlining this function removes a potential maintenance problem and increases
speed without violating encapsulation.

Change-Id: If3e9d38a7d4326b49f0611a9f4187c53960e8a03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-17 09:47:34 +01:00
Marc Mutz
70bc2e882f QCollator(SortKey): declare as shared
This enables specialisations of (std and q) swap using member-swap
and declares the types movable for efficient use in Qt containers,
and QList in particular.

This is a binary-incompatible change, so cannot wait for 5.2.1.

Change-Id: I7e90b6397ac4d00d0a7a5c42bae166c1b43e1994
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-17 09:47:21 +01:00
Marc Mutz
3e803b5180 QCollator: enable move semantics
This necessitates adding d==0 checks in QCollator. By documenting that
moved-from instances can only be assigned to or destroyed, we can
limit the functions in which to check for d==0 to the assignment
operator and the destructor.

Doing otherwise would destroy all advantages of move semantics by
introducing a heap allocation to re-populate other.d.

Add a test for this (QCollator didn't have any before).

Change-Id: Ic6ff202072822bebfd5e48259c3d0fa345a63118
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-17 09:47:07 +01:00
Martin Pley
6c04c21c10 Crash fix in QTreeView::sizeHintForColumn().
Vertical scrollbar may get out of sync. When this happens, the calculation of
firstVisibleItem will retrun "-1". This must be handled in ::sizeHintForColumn().
Added an auto-test for the crashes.

Task-number: QTBUG-34717

Change-Id: I867fd144ef3ce45e382337c5eafe345f573cd944
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-11-16 16:40:46 +01:00
Marc Mutz
8cbea7a886 QFileSelector: mark ctor explicit
This is standard for (QObject*) ctors.

Change-Id: I4756ba50b1f3148d72e95e581d52a37ebd47a7ae
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-11-16 16:39:38 +01:00
Andy Shaw
be405c86f8 Fix the window flags for Cocoa windows
This ensures that the possible window flag combinations are respected
where possible in Cocoa.

Task-number: QTBUG-34645
Task-number: QTBUG-31616
Change-Id: I6be8ca666b7cbc397575e97cd95ea298f52a7113
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-11-16 16:39:23 +01:00
Stephen Kelly
e9af987f28 Try to find GL headers in Mac SDKs.
Task-number: QTBUG-32308

Change-Id: Ibbab3852e5cc289faa63d0a66a3816ab8062ccb9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Brad King <brad.king@kitware.com>
2013-11-15 20:24:59 +01:00
Allan Sandfeld Jensen
345525db99 Missing entry in QImage inplace_converter_map
The inplace_converter_map never had an entry for ARGB4444_Premultiplied
this leads to the possibility of accessing outside of the array, and
means the RGBA8888 formats are misplaced.

Change-Id: Ida0d94912b53a7730b8fb5f6ccc31e7879ea3d27
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-15 16:45:08 +01:00
Erik Verbruggen
81f2d6eaac Fix compiler warning for cast from int to id.
qcocoaapplication.mm:118:61: warning: cast to 'id' from smaller integer type 'int' [-Wint-to-pointer-cast]
    id a1 = ([args->arg1 isKindOfClass:[NSNumber class]]) ? (id)[args->arg1 intValue] : args->arg1;
                                                            ^
qcocoaapplication.mm:119:61: warning: cast to 'id' from smaller integer type 'int' [-Wint-to-pointer-cast]
    id a2 = ([args->arg2 isKindOfClass:[NSNumber class]]) ? (id)[args->arg2 intValue] : args->arg2;

Change-Id: Ibcf3d5d5698ff863f3c9bd65e0388ccca147f419
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-15 16:44:28 +01:00
Marc Mutz
2c450d90b6 QCollator(SortKey): add member-swap
This is required for a Qt value type these days.

Change-Id: Ibd4e1581a4f4791a410caa10fede92c26b35dd9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 16:44:03 +01:00
Marc Mutz
4225e71038 QCollator: mark ctor explicit
QCollator and QLocale are not equivalent types, so there should
be no implicit conversion between them.

Change-Id: I395f8dc3c35b4202c9276c3eea0686176f8e07cc
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 16:44:03 +01:00
Shawn Rutledge
e3383ab646 GTK theme should not claim to provide a native MessageDialog yet
It was providing all possible types, but now MessageDialog is a new
native dialog type, and only on Android at the moment.

Task-number: QTBUG-34784
Change-Id: I2fb288c8d5e176ca4dafbbc310de2f29bbcfc000
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-15 16:44:03 +01:00
Lars Knoll
3e88ebc43d Remove stray debug output
This was actually causing test failures in qtdeclarative
and blocking the CI there.

Change-Id: I4538342f16b6468ad60b283c19948863b20ad5d4
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-15 13:02:40 +01:00
Mitch Curtis
a106be6f46 Fix QCoreApplication documentation.
Task-number: QTBUG-33360

Change-Id: Ifdc0bcc580d0a2dacc6a0bdce10aa278e0bdfe9c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-15 11:02:36 +01:00
BogDan Vatra
50a64e7626 Don't maximize dialogs.
Task-number: QTBUG-34765

Change-Id: Ia249e93dbbea11f3c03881c5fb88396bfad0e8fa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-15 06:38:34 +01:00
Bernd Weimer
00b13e6388 QNX: Fixed touch event positions
Touch positions reported by libscreen have to be adjusted relative to
the window position to be properly interpreted by Qt.

Task-number: QTBUG-34812
Change-Id: I68744dc9da95fb1d0d1704d12154fb24c148fe03
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-15 06:37:29 +01:00
Alan Alpert
7d72516b52 Change platform selectors to match qmake selectors
Previously matched Qt.platform.os, however that can only provide one
string. Multiple selectors can be present at once, so we can provide
both unix and linux instead of having to pick the most specialized one.

Task-number: QTBUG-34796
Change-Id: I219517d740fa7385e923a9e09cb7e241378fbaee
Reviewed-by: David Faure <david.faure@kdab.com>
2013-11-15 06:36:44 +01:00
Eskil Abrahamsen Blomfeldt
63824d2e00 Android: Support popup menus
This is used by QML comboboxes, menu buttons, etc.

Task-number: QTBUG-31420
Change-Id: I6d3f32fd80ce91c4be34eae636d1b95a4e251a49
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-15 06:36:00 +01:00
Oswald Buddenhagen
770a0c91f3 fix header bundling in some framework builds
!build_all is a sufficient condition for bundling headers in both debug
and release configurations, as it means that we will likely make only
one of the builds, and that needs to be self-contained.

Task-number: QTBUG-34575
Change-Id: I1a19e4b619eeff207cfbfd50d3b761053aeaa667
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 06:32:12 +01:00
Marc Mutz
38e90ad2b3 qcompilerdetection.h: add Q_COMPILER_UNIFORM_INIT
Up to now, the feature classe Uniform Initialization was subsumed by the
Q_COMPILER_INITIALIZER_LISTS flag together with support for
std::initializer_list.

This caused at least two problems:
1. On QNX, the standard libray does not ship <initializer_list>, even
   though the compiler (a GCC 4.6, IIRC) supports it. But since there
   was only one Q_COMPILER flag for both, support for the compiler-only
   part of the feature had to be disabled, too.
2. MSVC 2013 supports initializer lists, but has a bug that renders full
   uniform initialization support, as required for QUuid, useless.

By splitting the feature into two, we can separate them better, and do
so in QUuid, which is the only class that currently takes advantage of
uniform initialization (to provide constexpr constructors).

Since Q_COMPILER_INITIALIZER_LISTS worked as a flag for uniform
initialization so far, with the two known exceptions above,
UNIFORM_INIT is defined whenever INITIALIZER_LIST is, except that
I don't revert UNIFORM_INIT on QNX as I do for INITIALIZER_LISTS
and that I expect the MSVC 2013 features to set INITIALIZER_LIST,
but not UNIFORM_INIT.

Task-number: QTBUG-34705

Change-Id: I81916e950a0f3aab3de7977e0326d2de3d31b14c
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 06:30:53 +01:00
Marc Mutz
6b8c5ba678 QKeySequenceEdit: remove RESET function from keySequence Q_PROPERTY
A RESET function is only needed if the default value of the property
cannot be set with the normal setter. This is not the case here, as
clear() is the same as setKeySequence(QKeySequence()).

Change-Id: Ib751677436ebdcec0a7951dceae1e0f0323500ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-14 21:15:35 +01:00
Andy Shaw
3396ba5612 Match up the specified paper size to an existing one if possible
When EnumForms was used then the dmPaperSize was not always correct for
the custom paper sizes available on some printers. By using
DeviceCapabilities we can be sure that the information is correct in this
respect.

This also fixes respecting of the custom paper size if one is given and
there is no corresponding existing paper size for it.

Task-number: QTBUG-34276

Change-Id: I9924d5be8527027fc434261e37f6c7aae66210c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-14 21:15:35 +01:00
Marcel Krems
127c18ff11 Doc: Add missing \since 5.2 to QMap::first/last{,Key}
Change-Id: I04b356bfdd2298dccb174ac7cc83d54a3fbcdc02
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-11-14 21:15:35 +01:00
Venu
f5ef78cec2 Doc: Updated the \l links in the manual
- Replaced all \l instances that were using
the html file name qualifier to link to a \target.
- Updated the linking instructions to not mention
the html file name way to link.

Task-number: QTBUG-32173
Change-Id: Ic3e266e58de7566d533bbc7fbec7ff5c3ec8f231
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-11-14 21:15:35 +01:00
David Faure
900c550f01 Doc: document QCoreApplication::arguments() behavior fix in Windows
Task-number: QTBUG-34744
Change-Id: I97699710a5a8af34808bab9037ccea065f07b7d5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-14 21:15:35 +01:00
Jorgen Lind
d7d7786026 Enable QOpenGLTexture for OpenGL ES 2
Change-Id: I3ec2b7af303070c92e86c0f5ca729eb1a1731682
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-14 21:15:35 +01:00
Laszlo Agocs
f3f25b1469 Avoid using GLX pbuffers on fglrx
Task-number: QTBUG-34427
Change-Id: Ief4fe2fe2ab099d4ec61b6bfb2272724dfb2a800
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-14 21:15:35 +01:00
Sean Harmer
9f75292a60 Remove side effects of QGLXContext::queryDummyContext()
Task-number: QTBUG-34782

Change-Id: I411c89238b3002a118b1750af0157ccff5c78712
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-14 21:15:35 +01:00
Sean Harmer
038b0dae83 Update QSurfaceFormat when creating a GL context in the cocoa qpa
Task-number: QTBUG-34471
Change-Id: I99f643280b8a4aaa8d63329232c0c3f4b2faed4b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-14 21:15:35 +01:00
Eskil Abrahamsen Blomfeldt
20981e2953 REG: Fix changing input method parameters on Android
After b7440536c7, we no longer
restart the input method when the keyboard is shown, even if
the parameters for the input method has changed. The effect
was that if you had opened a keyboard with, say, digits only, then
all keyboards would be digits only forever, regardless of the
settings on text input.

This patch tries to be conservative, so it only adds back the
restartInput() logic when any of parameters have actually
been changed. Tested the code the original patch was made to
fix and it still works as before.

Task-number: QTBUG-34827
Change-Id: Icaee6026d5c3e95b605bb76485acf4fd651f81bd
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-14 21:15:35 +01:00
Marc Mutz
6128f4efb4 QTimeZone: mark ctors as explicit
An int is not a proper representation for a QTimeZone, so don't provide
an implicit conversion from it. OTOH, {QByteArray, int, QString, QString}
_does_ nicely represent a QTimeZone, so explicitly state the implicitness
of that constructor so {}-init continues to work in C++11.

Change-Id: I865a6b38b8ab3c577625b7b08efbfc98914abfbe
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-14 21:15:35 +01:00
Marc Mutz
9e78ab4587 Doc: remove superfluous \since 5.2
The whole QTimeZone class is \since 5.2.

Change-Id: I681b924b534f2f75315b2eaf506aaa7d9590efa1
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-14 21:15:35 +01:00
Marc Mutz
81ef7f6857 QTimeZone: declare as shared
This enables specialisations of (std and q) swap using member-swap
and declares the types movable for efficient use in Qt containers,
and QList in particular.

This is a binary-incompatible change, so cannot wait for 5.2.1.

Change-Id: I431315e148b95f82dc3d4471c57ef729539dca9f
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-14 21:15:35 +01:00