Commit Graph

11840 Commits

Author SHA1 Message Date
Stephen Kelly
97e755945c Automatically find external dependencies in cmake tests.
Currently the Qt5_MODULE_TEST_DEPENDS variable is maintained individually
in each repo. This patch makes that obsolete.

Change-Id: I1a72bb4da70b9ace6f79296d6a3fb295eaa999ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-25 23:33:16 +01:00
Stephen Kelly
cdca61f09a Extract some cmake related functions for re-use.
These will be used by ctest_testcase.prf.

Change-Id: I8a0e6e1eb110daba41b007c8309f3cb9a2059ecb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-25 23:32:53 +01:00
Friedemann Kleint
8b29c7539d Fix compilation with QT_NO_ACCESSIBILITY.
Task-number: QTBUG-27860

Change-Id: If3b17e7c5dcba69c351025d97c7ab43498c9dcda
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-02-25 21:24:37 +01:00
Friedemann Kleint
17501e09b9 Fix warnings about extra tokens after preprocessor directive.
Change-Id: I7f18ec42f6f6dd697947654384767c2c6b211498
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-02-25 21:24:37 +01:00
Christoph Schleifenbaum
d400666c61 Cocoa: Fix appearance of transient light scroll bars.
On dark background scroll bars will be rendered light. Since
the scroller object is shared across intances, this flag also
has to be reset. Otherwise all scrollbars are drawn light.

Change-Id: I3800cc783d7fd7ebff296d9db7454efb5b33e7a3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-25 21:24:37 +01:00
Morten Johan Sørvig
47e12eafdd Cocoa: Make grabWindow work on retina displays.
Not taking the devicePixelRatio into account causes
us to either grab a quarter of the screen or do a
low-resolution grab.

Change-Id: Ie6b681e3a089f17b63554c8158bb471a14963d7a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-25 21:24:37 +01:00
Sean Harmer
e37d579183 Add device mkspec for i.MX53 devices
This is tested with eglfs plugin on the Yocto Project's Poky
distribution.

Change-Id: I73edd66d6cd62febb2f699ac5b1ca1f1c0dea449
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-25 21:24:37 +01:00
Fabian Bumberger
0c8487156e QNX post an expose event when the window is hidden
When the window is hidden, an expose event has to be be posted. This is e.g. needed by the qquickwindow. A exposeEvent calles the exposureChanged
function of the window manager there.

Change-Id: I9d891e07f81192dcd6674743620319c44da19c48
Reviewed-by: Wolfgang Bremer <wbremer@rim.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-25 18:44:07 +01:00
Fabian Bumberger
faefc09e93 Fix qfile autotest on qnx
This fixes the compilation of the qfile autotest on qnx.

Change-Id: Iab099e8b754a4341152e338ff6e3d22a83c625e3
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-02-25 17:34:40 +01:00
Debao Zhang
6d270051a2 Doc: Add the missing \since 5.0
Change-Id: I79f67e18b64efe7d22ed80adbc6f024ef35b3aac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-25 15:06:10 +01:00
Shawn Rutledge
fa5bd4ed98 Added transient window manual test
Change-Id: I05e657488bb05e1aa6343270946512c8793f1e68
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-25 15:00:24 +01:00
Fabian Bumberger
720a44359d Blackberry adding some compiler optimizations
Change-Id: I78364f7e697b5c54ce49c1ed6c3b8526af1d8c6e
Reviewed-by: Bernd Weimer <bweimer@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-02-25 14:13:53 +01:00
Morten Johan Sørvig
22bda3360e Set correct image format for non-alpha windows.
Use QImage::Format_RGB32.

Change-Id: I4be6b6271034be8dad5cfcb85f89fe33a817b78f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-25 07:43:14 +01:00
Shawn Rutledge
153d613353 Transient QWindows centered; default-constructed geometry
Default-constructed geometry does not mean put the window at 0,0,
and it does not mean center the window on the screen: it means
let the window manager position the window.  If the window is
explicitly positioned at 0,0 though, that is a higher priority
than the transient hint; without this change, the transientFor property
had no effect.  On X11, transient means use center "gravity" to
make the transient window exactly centered.  But the user can still
override the geometry of a transient window, as with any window.
On OSX and Windows, neither transient window functionality nor smart
initial positioning are provided, so a window with no position set
will be centered on the screen, and a transient window will be put
at the center of its transientParent.

Change-Id: I4f5e37480eef5d105e45ffd60362a57f13ec55f5
Task-number: QTBUG-26903
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-24 20:41:05 +01:00
David E. Narváez
d9ff510f02 Rename qAbs Function for timeval
This decouples it from qAbs which is declared as a constexpr under
certain compilation flags and enables for qtbase to be compiled with
GCC 4.8

Change-Id: I78e02256ffc8b460ca74ae5241e77dfac4e09ba9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-24 06:26:53 +01:00
Morten Johan Sørvig
cf885ee836 Cocoa: Compile with Qt in a namespace.
Task-number: QTBUG-29710

Change-Id: I28a4c213b78723aa369c7e00167401ec643155e6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-23 13:38:56 +01:00
Morten Johan Sørvig
d9b04f8575 QCococaWindow: Add NSView hosting support.
Add and export QCCoocaView::setContentView(NSView *),
making it possible to host a foreign NSView in a QWindow.

Change QCoocaWindow::m_contentView to be a generic
NSView, instead of a QNSView. Add a separate m_qtView
for code paths that expect a QNSView.

Change-Id: I47935b69705c70ea7efbb03d6d4bf489947c3487
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-23 08:03:03 +01:00
Lorn Potter
d7dfab8cac Ofono also changed the context API. This updates it to work
Change-Id: Ic3a055cb6a56be89b48a9ac77776217f910dee44
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-02-23 02:26:27 +01:00
Fredrik Höglund
4b54c55305 Fix OpenGL context creation in the XCB plugin
Make it possible to create a core context with OpenGL implementations
that don't implement the compatibility profile or the
GL_ARB_compatibility extension.

Qt was effectively clamping the OpenGL version to 3.0 by assuming that
the highest supported backwards compatible version is also the
highest supported core version.

Since there is no way to check if the implementation supports a
context with a given set of attributes without trying to create the
context, we have to try every known OpenGL version until we find one
that's supported.

Note that this commit does not fix similar breakage on other platforms.

Change-Id: I9616762b059db9e6182f853ab7f24ff44dc7d529
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-23 00:29:13 +01:00
Thiago Macieira
1b08e0307d Don't assume that all CFPropertyListRef are CFArrayRefs
We might need more robust code in the future. But at least for this case
it looks like a CFStringRef is also a possibility.

Task-number: QTBUG-29776
Change-Id: Iaf50835122fcbb7e6e9c7fbf65e31e6143b2bc54
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2013-02-23 00:29:13 +01:00
Morten Johan Sørvig
3dc634be36 Cocoa: Add basic support for Qt::SubWindow.
This allows embedding a QWindow in a foreign NSView
hierarchy.

Don't create a NSWindow. Add code paths for handling
the embedded window case. Avoid changing the other
window cases. There is potential for merging some of
these cases but that can be done at a later point in
time.

Change-Id: I54c7b4eb82fad268f90ea6b716fc650ae31bd3af
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-22 21:25:45 +01:00
Martin Smith
bfce04fe5b doc: QML Inheritance is not resolved correctly.
qdoc did not resolve QML Inheritance correctly and the result was that
QML inheritance was not shown correctly in the documentation. Part of
the problem was that information was missing for QML types in the .index
files produced by qdoc. qdoc also did not show inheritance properly
when one of its base types was marked internal. These problems have
now been fixed.

This update also fixes the problem that caused qdoc to slow down to a
snail's pace over time. The group members list for certain group pages
was getting longer and longer, because qdoc added the same member to
the member list an additional time every time qdoc was run in -prepare
mode if you didn't clear the index files first. Now, qdoc only adds a
member to the member list if it isn't already in the member list.

Task-number: QTBUG-29778
Change-Id: Ie4f0458a2ea4ceb1a64cdcd7f60f16b124a20790
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-22 18:34:35 +01:00
Stephen Kelly
298f0b6573 Fix indentation.
Change-Id: I7d5e5549b265507f412c991087ebbec8f6abcc0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 18:34:35 +01:00
Richard Brinkman
ff05c48138 FIX: misleading -(no)make option in configure --help
Clarify in the configure --help documentation that the text between
parentheses in the -make option indicates the default parts, not all
the parts that can be chosen from.

Task-number: QTBUG-28826
Change-Id: Iac9cf294b8054823ecfaf262aeafab7779ce4c8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 16:20:16 +01:00
Richard Brinkman
1aa09f9859 ADD: -confirm-license option in output of configure --help
Task-number: QTBUG-25185

Change-Id: I1578a023a8b4c030aaf4cd191203d5c28b950a0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 16:18:43 +01:00
Stephen Kelly
d7ae34fdfd List the Release library before the Debug library in cmake files.
This way, the Release library is chosen if Qt is configured to
build both debug and release, and if the consumer configuration
is not an exact match for 'Debug'.

This means that RelWithDebInfo and MinSizeRel, which are 'standard'
configurations in CMake with mulit-configuration generators, will use
the Release version of Qt. All other configurations will also use the
Release version, unless MAP_IMPORTED_CONFIG_<CONFIG> is used as
described in:

 http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html

and in the cmake documentation:

 http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG

Task-number: QTBUG-29186
Change-Id: Ifc11a9e19fcb304297c204e34a3b25c510329767
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-22 08:27:01 +01:00
Stephen Kelly
7661e39c02 Create module-specific internal cmake macros
This ensures that invoking the macro from a different module (operating
on a different target) is not possible.

Change-Id: Idbcd41d03172a8f1dcea26954464ab981fce8879
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:14 +01:00
Stephen Kelly
7477d50fce Populate the cmake variables only one time.
Since we're only including the Extras file one time, invoking set() for
the include dirs again will overwrite the addition of include dirs in
the extras file.

We only need to populate these variables if not set anyway, so do that.

Change-Id: I04dad0674778e79c8c12c18231b8ce6c92edf881
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:05 +01:00
Cyril Oblikov
057fabab7c Hiding scrollbar on MacOSX 10.7 if policy is set to ScrollBarAlwaysOff
On Mac OS X 10.7 (if System Preferences -> General -> Show scroll bar is
"When scrolling") scroll bar was shown even if policy was set to
ScrollBarAlwaysOff.

This is a regression from 5.0.0.

Change-Id: I161b350874c085a1397df7b398af8f3fb0fbeacf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-21 17:44:27 +01:00
Olivier Goffart
b05f19f232 moc: Fix infinite recursion in macro substitution
When performing macro argument substitution, one should keep the set of
macro to exclude, else we can enter an infinite recursion.

Testcase:
 #define M1(A) A
 #define M2 M1(M2)

Task-number: QTBUG-29759
Change-Id: I564bbfed65e1c8599592eaf12c6d67285d2fd9ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-02-21 16:55:41 +01:00
Thiago Macieira
ec166aaa70 Add qcore_mac_p.h to the list of headers.
Change-Id: I3a8db99166a34c15c19b142a05bf81ababb2eeb8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-21 08:18:47 +01:00
Albert Astals Cid
70f6652ebd Forward the 3rd parameter of dataChanged
Change-Id: I94f893bf65cd150c3cb1099c91cb13882bcca79a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 00:58:32 +01:00
Albert Astals Cid
20dbad1bbf Emit which role actually changed
Change-Id: I596a81628e5553779986a94769e114d89a44b264
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 00:58:25 +01:00
Topi Reinio
c816a338f7 Doc: Update image in QPainter class reference docs
The code snippet demonstrating the use of drawText() was already
updated to use the text 'Qt Project' - update the image accordingly.

Task-number: QTBUG-29784
Change-Id: Iea5e729bd26df2d8ab6a02bb7ea804494e554a28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-20 21:14:24 +01:00
Martin Smith
2cb22c6cc0 qdoc: QML Inheritance is not resolved correctly.
This change adds some QML property, signal, and method
data to the .index file. It also provides more robust
resolving of QML inheritance for qml types.

Task-number: QTBUG-29778
Change-Id: Iaefd64227913a19f427b21e904ca5e32c82d7b29
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-20 17:22:26 +01:00
Jędrzej Nowacki
dacc222d5a Fix QVector detaching in one thread while another destroys it.
The patch adds handling for a case when a QVector is shared between two
threads. In such scenario detaching in one thread could collide with
destruction in the other one, causing a memory leak or assert in debug
mode.

Task-number: QTBUG-29134
Change-Id: Idbff250d9cfc6cf83174954ea91dbf41f8ea4aa4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 15:22:55 +01:00
Jędrzej Nowacki
d3a4230757 Make QVector instances counter thread safe
Change-Id: I7c7aa1eb0f8e91c43023882a3734e908be4ba4fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
3fdfde294f add -skip option to the configures
this makes it possible to exclude modules from the build without moving
their sources out of the way. substitutes the much-requested -no-webkit.

not adding a symmetrical option, as it is relatively pointless:
to build only specific "leaf" modules, you only need to run
"make module-qt<module> ..." once you configured. and removing
particular "intermediate" modules is achieved with this very option.

Task-number: QTBUG-26697
Change-Id: I25cebdbd029885a2c653c4cde696f9bb78691768
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
23762682c1 simplify qtAddModule() by using $$qtPlatformTargetSuffix()
Change-Id: I02b6c1eb2db0c8a36c50b1ec3c79dea215fba03a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
67f20d66e4 remove pointless conditionals and expansions from qtLibraryTarget()
this function is called only from library TEMPLATEs, and always with
exactly one word as the only argument.

Change-Id: I6282e3826791f89e6cf89dde625c8166e4e56028
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
218179ce2f don't suppress building examples in non-prefix builds
these have no (useful) install target, so it makes no sense to reduce
the "build" to installing sources. suppressing the actual build can be
achieved with -nomake examples instead.
conversely, as the build dir is the install dir, people actually need to
be able to (selectively) build examples in there.

Task-number: QTBUG-29756
Change-Id: I98f34235442b552e51c0d5f5cec96a3eab4f1e7f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
0444115211 fix libexec configure.exe status line
Change-Id: I22b4c07a3d39ab2f3288d0872a0ccaff45b0c153
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Topi Reinio
a595ac15cd Doc: Document example manifest files in QDoc manual
Adds documentation for example manifest files and the related qdoc
configuration command \manifestmeta into QDoc manual.

Change-Id: I6a627698ab14f57c9a117b6d4b794f352959f5ac
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-20 15:22:55 +01:00
J-P Nurmi
c90626f189 QMacStyle::drawControl(CE_ProgressBar): add missing null pointer check
Do not spin off progress bar animations if QStyleOption::styleObject is not set.

Task-number: QTBUG-29748
Change-Id: I4e17a4892e82cae48250afa7a270b15ca5730f46
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-20 13:00:22 +01:00
Matt Fischer
fcef9b4252 Fix generated pkg-config files when cross-compiling
The Libs: line of the pkg-config files is constructed
by taking the name of the .pc file itself, and stripping
off the path and extension.  However, the code which does
this does not handle path separators correctly when the
target OS and local OS are different.  To get around this,
the custom string manipulation was replaced with a call
to QFileInfo::completeBaseName(), which can handle the
different path separators correctly.

Task-number: QTBUG-29700
Change-Id: Ia817b415d303b249f56fcc3d1f073cae99c43046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 12:59:55 +01:00
Jan Arve Saether
7508719830 Avoid potential crash when changing styles with stylesheet
This is not always reproducible, but it probably crashed because
QStyleSheetStyle::polish() can do some nasty things such as creating
and deleting objects, which can leave the list with dangling QObject
pointers.

However, it should not delete QWidgets, so we make sure we only have
a list of QWidgets before we perform the polish iteration.

Change-Id: I84c1ca6a7316e72348248ff056b65dcbae3d20a3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-20 12:59:55 +01:00
Friedemann Kleint
b6ccdfa482 Fix multiselection by CTRL-click in QFileDialog/KDE.
Task-number: QTBUG-29257

Change-Id: Idfac80e855455a4537dd38a23136762cd9398e15
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-20 12:59:55 +01:00
aavit
e28c03cb82 Fix reentrancy problem in image reading
There were race conditions when accessing the plugin factory and
the image reader plugins from different threads; ref QTBUG-29281.
Added a mutex lock to avoid.

Change-Id: Ic1a3b6cbaf5603f1bcf7025b58247a9a3f6d08a9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-20 12:59:55 +01:00
Indrajit Tapadar
f6c5452d97 Fix for url encoding in QDesktopServices::openUrl().
URLs containing spaces (encoded) couldnt be opened using QDesktopServices::openUrl() -method.
This is a regression as it works for 4.8,

Using url.toEncoded() instead of url.toString() which removed percent encoding.

The NSUrl uses RFC 2396 for parsing, and according to the documentation,
of 2.4. Escape Sequences - Data must be escaped if it does not have a
representation using an unreserved character;
And as a space does not have a representation using unreserved character it needs to be
escaped.

Example: Using this url, http://www.google.com/search?q=testme%20withspace
url.toString() returns  "http://www.google.com/search?q=testme withspace"
and url.toEncoded() returns, http://www.google.com/search?q=testme%20withspace" which is
also the expected result.

Task-number: QTBUG-29124
Change-Id: Ieed3d4cfb689b9311f6cf21e5098a1e70256ab03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 10:35:23 +01:00
J-P Nurmi
3bee02c1ca Revert "QGtkStyle: GTK3 compatible combo boxes"
This reverts commit 15fc255c7c.

The change was not compatible with the oxygen-gtk theme engine.
Furthermore, GTK3 compatibility in QGtkStyle is not important,
since it won't be feasible to support both GTK2 and GTK3 in
the same style implementation.

Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	src/widgets/styles/qgtkstyle_p.h

Task-number: QTCREATORBUG-8524
Change-Id: I8ea6dcfd1f432d51b306a5d9f6c4106137979c5a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-20 10:35:23 +01:00