Commit Graph

11814 Commits

Author SHA1 Message Date
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
Samuel Rødal
c85f6d9f5a Fixed qtbase examples build when configured with -no-opengl
Change-Id: Idafdc3264f760d6400ce04bb9da36289b1f96438
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-20 10:35:23 +01:00
Andy Shaw
e47c2744e6 Clean up the cached cursors inside the destructor of QCocoaCursor
Change-Id: I4e1222832efa29680b4e658a5c9109641599a2b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-20 08:38:39 +01:00
Andy Shaw
79498af6e4 Fix the default handling of cursor shape when there is no standard one
When the cursor specified is a bitmap one we cannot cache it based on
the shape as the pixmap set on the cursor may be different. Therefore
we should always create a new cursor in this instance.

Change-Id: I2c201590ff632490d76c1b423908ae32aa584eb6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-20 08:38:39 +01:00
Friedemann Kleint
dd30f3e65b Fix QDockWidget being unable to dock when initially floating.
When setFloating(true) is called before show, frame strut events
are not enabled for the native window (since there is none yet)
in QDockWidgetPrivate::setWindowState(). In that case, do
it in the show event handling.

Task-number: QTBUG-29012
Change-Id: I93b679f20200c149d608a1bcc65b4936a035c6a0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-20 06:39:03 +01:00
Laszlo Papp
2f5b4d47f6 Document the qintptr for public usage
The QAbstractSocket API has been already using this as a return type. Hence,
this has already been exposed to the public API users, anyhow.

http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html#socketDescriptor

A minor mistake has also been fixed in this commit at the quintptr section.

Change-Id: I8143b3050428548ff6baee2e3a0bce4058ea8701
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 01:30:29 +01:00
Andy Shaw
7203e88084 Don't enable HIDPI when rendering directly to PDF on Mac
When rendering to PDF using the PDF paint engine on Mac it would
consider it to be rendering as HIDPI when ScreenResolution was used.
This would mean nothing was being rendered at all in the PDF as a
result.

Task-number: QTBUG-28709
Change-Id: Ieb97ca9d0b47f6b96debbcf5e05e96c39292e412
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 21:25:16 +01:00
Gunnar Sletta
3f99983e76 Fix focus handling of native child widgets in xcb.
Change-Id: If4d596195624011142bff6853849a23064e478df
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
(cherry picked from commit fc663b5f9a)
2013-02-19 21:21:27 +01:00
Jan Arve Saether
18f9eb797b QStackedLayout: Fix crash when focus widget is destroyed in hide()
We also have to make sure that when moving back to a page
that has a focusWidget(), the focus should go to the focusWidget()

Task-number: QTBUG-18242

Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:07:14 +01:00
Jan Arve Saether
64106705e7 Clean whitespace
Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:06:53 +01:00
Tor Arne Vestbø
eb09f9b82c moc: Error out when detecting unterminated macro usage
Exhausting the symbol list while looking for the
final right parenthesis means it is missing.

Task-number: QTBUG-29308
Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-19 20:51:44 +01:00
Sergio Martins
c02a2f8e76 QNX: Don't crash with 0 by 0 sized windows
In the rare event of an invalid sized window, the application crashes
because libscreen doesn't like creating empty buffers.

Not creating the buffers at all would also be a solution, if we didn't
have QPainter crashes due do null paint devices.

Change-Id: I561d0082576b6226dd52129f9640952ba46273c8
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-19 17:10:27 +01:00
Shawn Rutledge
39b1bd8f45 undef B0 to build on PPC (conflict with definition in termios.h)
This is the same fix that was already done in qprinter.h
/usr/include/bits/termios.h:122:#define B0 0000000  /* hang up */
so the compiler sees B0 as a numeric constant

Task-number: QTBUG-29704
Change-Id: I2df5e1783f3142558cbc1606e0c61fcf636f2de8
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-02-19 17:05:43 +01:00
Jerome Pasion
5d6916b4c1 Doc: Removed reference to deprecated \badcode command.
-QDoc doesn't differentiate between \badcode and \code. They both
look the same in the output.

Change-Id: Ifabd51b7e433a1c30cf30c267d3ce63dded1bd43
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-02-19 11:55:51 +01:00
Morten Johan Sørvig
73d32873cf Cocoa: Add QMdiSubWindow size grip back.
Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 08:53:55 +01:00
Friedemann Kleint
4b42c91821 QColorDialog/QFontDialog: Fix setOption().
Call setOptions() such that the option takes effect.

Task-number: QTBUG-28817

Change-Id: Ibef834efc988d3ba49e88ea88ef475b1fd7fd98f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-02-18 21:53:31 +01:00
Sergio Martins
8afd7b4675 QNX: Print the buffer size before crashing, for debug purposes.
Change-Id: I2d423ee3717bb09b7bb2c63f645e5315be1fa611
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-18 19:56:45 +01:00
Oswald Buddenhagen
489d8a0627 add QT_CONFIG's static/shared to CONFIG on startup
... instead of as a fallback in default_post.
it was this way in qt4, and it requires less code to be written in the
end. we are already doing it for debug/release as well.

Change-Id: I6e02849d61d14a18375cf64a5990768931ebac48
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:43 +01:00
Oswald Buddenhagen
2e4ce301f9 take advantage of new safety regarding build config resolution
all tests that happen after default_post loads resolve_config can rely
on debug vs. release, static vs. shared, and staticlib vs. dll being
properly "de-conflicted".

Change-Id: Ie0b4defcd6024bd1c25f53ba7e03621052d96492
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:39 +01:00
Oswald Buddenhagen
9dcbfc1c44 refactor build config resolution
the current approach of having "free-flying" prf files for such a core
issue is rather insane. this was noticed early on, as evidenced by the
forcible loading of debug/release/debug_and_release in default_post.
however, things remained a mess, in particular static vs. shared.

consequently, the commit merges all related feature files. the actual
config resolution is put in a separate feature file, so it can be loaded
by resolve_target if that happens to be loaded early on.

Change-Id: Ie30e7c63cabe9409a3263ca1650e323a870926f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:36 +01:00
Tobias Koenig
18a65b6cdf Blackberry: Specify QMAKE_LFLAGS_RPATHLINK for BB10 platform
The linker from the BBNDK needs -rpath-link to resolve
transitive dependencies, like on Linux.

Change-Id: I85726841ea15070e8661b9bdbffaf950fdd247e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-18 15:44:10 +01:00
Marcel Krems
3c657383c6 Doc: Fixed value descriptions for enum QAbstractSocket::SocketError.
Change-Id: I7ef5ff53ac838a7793852c1eadd9610e630cae43
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-18 14:44:17 +01:00
Andreas Aardal Hanssen
843de37bca Remove QGraphicsProxyWidget crash in QWidget::hasFocus().
A QGraphicsProxyWidget embeds a focusable widget (e.g., QComboBox). When
deleting QGraphicsProxyWidget, the QWidget will be deleted. The QWidget
clears focus, and QWidget::hasFocus() is nice enough to check if its
embedder QGraphicsProxyWidget has focus - because if it does, it wants
to clear focus from that item too. QGraphicsItem's destructor already
calls clearFocus() however, so this call is unnecessary; we can simply
stop clearing the QWidget's focus in its destructor if the widget is
embedded.

QWidget::hasFocus checks QGraphicsItem::hasFocus (on the proxy widget
that is being deleted), which checks its d_ptr, which is gone. It's
generally unfavorable for an object deleting a child to have the child
go back and poke at the parent object, which is in many ways what's
happening here.

Task-number: QTBUG-29684
Change-Id: I1e52bf28f47b2824752de28dff2d0de13733ee48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-18 11:07:23 +01:00
Andreas Aardal Hanssen
615d120e5a Fix crash in somewhat faulty QGraphicsProxyWidget unit test.
The crash is deep inside QGraphicsSceneIndex, which calls boundingRect()
on the item that is being destroyed. The vtable is busted, resulting in
a pure virtual function call. There's a more proper fix for this lying
around somewhere but in this particular case we can get the test to
not crash by guarding based on whether the item has a cursor set. This
also happens to speed up QGraphicsItem destruction a bit so I figured
it's a win-win situation to fix it. This case will still crash if the
item actually had a cursor set but that makes the case even more narrow.

Generally speaking, creating objects partially on the stack and
partially on the heap, mixing parent/child relationships and then
deleting one of the heap objects is quite sketchy and I doubt it happens
much outside of this unit test.

Change-Id: I25393d2cafb1256269ab6681519bd554cc380bfd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-18 11:07:13 +01:00
David E. Narváez
f0221d3594 Fix call to QMetaObject::metaCall from updateProperty
Create an array of arguments in the same way
QMetaObject::write does

Task-number: QTBUG-29082
Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305
Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-16 21:17:31 +01:00
Peter Hartmann
eaa18f3063 SSL docs: Be more explicit about the threats of ignoring SSL errors
... because almost everybody gets it wrong almost every time.

Change-Id: I54938ef094323ba8de02186b585b11b9579f3ca4
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-16 09:28:03 +01:00
Marcel Krems
abb8beb064 Doc: Fixed typo "pragraphs" -> "paragraphs"
Change-Id: I47e88dbedd3afee4bd53550ef1ce643829aecedb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-15 22:46:59 +01:00