Commit Graph

11829 Commits

Author SHA1 Message Date
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
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