Commit Graph

9371 Commits

Author SHA1 Message Date
Thiago Macieira
51ee309a79 Mark that GCC 4.8.1 has support for C++11 member reference qualifiers
This also marks it feature-complete for C++11 (at least, language
features). See http://gcc.gnu.org/gcc-4.8/cxx0x_status.html and
http://gcc.gnu.org/projects/cxx0x.html.

Support for the C++11 features in the Standard Library is still
incomplete, but we don't try to detect those features anyway (see
http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011).

Change-Id: I55702ef48f757b536ebbf17e921442ff5bfc29f8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-20 18:36:47 +02:00
Eskil Abrahamsen Blomfeldt
1b289379dc Don't bootstrap QT_EVAL code
For most bootstrapped tools, the QT_EVAL code will not
have any effect, because most of the tools don't instantiate
a QCoreApplication. However, qdoc is bootstrapped for cross
compilation, and will instantiate QCoreApplication which
calls the QT_EVAL code. Since the QT_EVAL code requires QObject,
and QObject requires moc, it does not make sense to compile the
eval code into the bootstrap library. Instead, we simply disable
it to make sure the build succeeds.

Change-Id: I472803572b070df041014d337c23d3f3dc0749e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-20 01:35:33 +02:00
Mark Brand
0631caf555 update bundled sqlite to 3.7.16.2
Change-Id: Iae9b3012e93af3399e482e32e4bc201213567496
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-19 20:10:46 +02:00
Friedemann Kleint
155ff13bb6 Implement QApplication::beep().
Invoke slot "beep" on QPlatformNativeInterface. Implement for
Windows and X11.

Task-number: QTBUG-30416

Change-Id: I2be651165b899e5147818a012001d354827bb090
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-19 20:10:46 +02:00
Friedemann Kleint
da01deb0ac Implement alertion state for windows.
Add QWindow::alert() and QPlatformWindow::setAlertState().
Add logic to clear alertion state when the window becomes
active. The platform plugins then only need to implement a setter
and a cheap getter and need not handle activation.

Prototypically implement X11 and Windows.

Task-number: QTBUG-30416
Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-19 20:10:46 +02:00
Gabriel de Dietrich
926086b9e3 Cocoa: Disable QTBUG-30266 hack in full screen
That would set the full screen window in a weird state, where is was
full screen (but unable to exit that mode) and showing the title bar
at the same time.

Change-Id: I3ac913876f3b326504dd5af18c34181d002509d0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-19 20:10:46 +02:00
Frederik Gladhorn
0d57da067b Let platform plugin decide if accessibility is active
Change-Id: I881a8ff3fedf3db73ee37046a4363c70960a92a6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-19 17:52:45 +02:00
Nico Vertriest
c2059ac80d Doc: added details for QRegisterStaticFunction(plugin)
Added reference to macro Q_IMPORT_PLUGIN()

Task-number: QTBUG-30548

Change-Id: Ibc20ad52cd57d497f5a7fb5c4dd4a4c778e4a660
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-19 17:24:30 +02:00
Jonathan Liu
ca0e350183 QMessageBox/Win: Include detailed text using Ctrl+C to copy
Task-number: QTBUG-21150
Change-Id: I14c214e9f96892f0da4369e7253e363b7313c252
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Richard Moe Gustavsen
526eaeea09 qprocessordetection: add armv7s
Xcode builds projects for armv7s if a compatible device is set as
target device. If trying to include <QtCore/QtCore> into such
projects, the build fails complaining about "the usage of sizeof missing
QMutexData definition in qgenericatomic.h"

The reason is that qprocessdetection.h fails to pick up that we're
building for ARM, and includes qatomic_gcc.h instead of qatomic_armv7.h.
So we need to check for __ARM_ARCH_7S__ as well. In addition,
iPhoneOS6.1.sdk/usr/include/arm/arch.h will define _ARM_ARCH_7 if
any of the more specic ARM defines are defined, so I add this check
as well to more easy support new version of ARM7.

Change-Id: Ic51a4d7ac99f7f6ba1065f870b3ef82d1250b56c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-19 12:03:36 +02:00
Stephen Kelly
a680fe609f Add the GL headers to cmake variables.
If building angle ourselves, that's just the basic Qt include dir,
and if using an external gl, look for it in the places specified
in the mkspec.

As the qopengl.h header includes the gl header, this is a 'public
include dependency' of QtGui, so it is added to the relevant
variable and the INTERFACE_INCLUDE_DIRECTORIES of Qt5::Gui.

Change-Id: I8c2c1782e0a2600032771175444b087da28433fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Richard Moe Gustavsen
5ea3845bd0 iOS: use an explicit pointer to qiosViewController
As it stood, we always relied on the root view controller
being a QIOSViewController if isQtApplication() returned
true. For mixed application, this might not always be true
as native code can choose to replace the root view controller
at times, or even rip it out, and place it as a child of
another (e.g UISplitViewController).
This change will give an extra protection against that.

Change-Id: I0cb85796a8b82f9037c32f9e85e04e1dc7aad8e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-19 12:03:36 +02:00
Tasuku Suzuki
02713994bf Make qtbase compile with QT_NO_DRAGANDDROP
Change-Id: Id1a74c6b22b388d20103b4e73f83c8345ec70ba6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-19 09:57:09 +02:00
Mitch Curtis
f3612f39ff Make password mask characters themeable.
Task-number: QTBUG-29871

Change-Id: I3cf739a321d7917f8f8431992e29bba0871b1934
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-19 09:57:09 +02:00
Topi Reinio
8597458ceb qdoc: Include words from the module name as tags in example manifest
This change adds words from the module name (QHP 'project' name defined
in .qdocconf files) as tags for the module's examples. This makes
searching for examples easier in Qt Creator: For example, typing
'multimedia' will list all examples in Qt Multimedia and Qt Multimedia
Widgets modules.

Other minor changes:
    - Exclude 'qt' as a tag (not needed)
    - Exclude one-character strings as tags

Task-number: QTBUG-28720
Change-Id: I53751b7a87ff39ee7b648f865c9090c52444de76
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-19 09:57:09 +02:00
Richard Moe Gustavsen
e9b2d029f9 iOS: QIOSBackingStore: enable FBO depth and stencil buffer
Unless we enable those buffers for the FBO that backs the
backingstore, setting a clip region on an associated QPainter
will not work.

One apparent bug from this was the menubar. Without this patch
it appeared to never be drawn. The reason was that we ended up
drawing the menubar background over the whole menubar instead
of inside the clip region.

Change-Id: I25660cec6ce9e43fe4cd693127dca6afeb8dcf65
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-19 09:57:09 +02:00
Thiago Macieira
96134c6f58 Make sure to also check for null CFPropertyLists.
In 1b08e0307d, I removed the null check
by accident. It's possible for the Darwin API to return a null
property list.

Task-number: QTBUG-30760
Change-Id: Iaf0125767fe4b47c19810b70483a5219e94e4305
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-19 07:53:21 +02:00
Kai Koehne
e34dccc9e5 Allow using Ctrl+C to copy selected text from DetailedText in QMessageBox
Task-number: QTBUG-21895

Change-Id: Ib28f064295493595263945bc72907bf95d2cb909
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 02:30:52 +02:00
Morten Johan Sørvig
6e73061c58 Actually set devicePixelRatio on copy.
Followup to 7b9d4531 - the second part refactors
to call setDevicePixelRatio but the call itself
was left out.

Change-Id: I3e36452603fe1d7d53fa1a74d87169efea1c2e78
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-19 00:11:37 +02:00
Peter Hartmann
835e720c7e SSL internals: fix memory corruption using QSslConfigurationPrivate
We are passing a QSslConfigurationPrivate that is allocated on the stack
(in QSslSocketBackendPrivate::initSslContext()) to
QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd).
When the SSL context is destroyed, this object is not there any more.
So now we create a deep copy of the configuration like we do in
QSslSocket::sslConfiguration().

Task-number: QTBUG-30648
Change-Id: Iaefaa9c00fd6bfb707eba5ac59e9508bf951f8a5
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-18 22:02:18 +02:00
Friedemann Kleint
b3bed2c8de Fix format for alpha drawing.
Task-number: QTBUG-28531

Change-Id: Ie97953950cad26776724848adc5751c861903cf7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-18 22:02:18 +02:00
Friedemann Kleint
b982679940 Mac: Fix warnings about non-existing native Windows on startup.
Shown for example by Qt Designer.

Change-Id: Ia866a93a781a027aa3703f44314954888d75d436
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-18 22:02:18 +02:00
Sérgio Martins
cbde509965 Fix memory leak.
Change-Id: I7d308a869fdc729bd46ace336b71c7e30556d65d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-18 19:54:16 +02:00
Stephen Kelly
67bd27fee2 List the Qt5::WinMain Release configuration before the Debug one.
Apply the logic from commit d7ae34fdfd
(List the Release library before the Debug library in cmake files.,
2013-02-21) to the Qt5::WinMain library too.

Task-number: QTBUG-29186

Change-Id: Ie465fef1cc0fc842d86c5bc69ab84ec65ec652d9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-18 16:53:46 +02:00
Morten Johan Sørvig
8ddcc18ac1 Remove nativeResourceForWindow warning.
The warning is useful for pointing out the the return
value will be null. However, code that correctly
checks the return value (such as qt_macWindowIsTextured),
still causes the warning to be printed.

Change-Id: I3828992b3d5e7b08451cf0e051b937fa9d9536d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-18 15:33:38 +02:00
Gabriel de Dietrich
b381581579 Mac: Fix various memory leaks
Change-Id: Id554be11ffcf9a506c217b0dc5b96cb37c4dd57c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-18 15:31:29 +02:00
Gabriel de Dietrich
2bd846f8da Cocoa Menu: Remove unnecessary retain, release/retain in the right order
Also, make sure platform menu item is deleted on ActionRemoved event.

Change-Id: Ic07a81cb77833bdffd1464abf1c81ebdee4d16e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-18 15:31:18 +02:00
Andy Shaw
8cbc7ef05c Fix the QTouchEventSequence code snippet so that it compiles
The release() function also requires the QPoint to be set which was
missing from the code snippet.

Change-Id: I4a5cd2bed0915eb1fbaac3a34fb229eac9c284df
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-04-18 09:18:43 +02:00
Andy Shaw
9ec493fa41 Convert the new filename to native separators before checking it
If a native separator was put in the new name when renaming a file name
via the file dialog then it would correctly fail. But if a non-native
one was used on Windows then it would cause the file to be moved
instead if the directory existed.

Change-Id: If01760b8c54a69b600c9a44c7509017be70d33e3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-18 09:18:43 +02:00
Eskil Abrahamsen Blomfeldt
eb95685556 Android: Don't crash when displaying multiple top-levels
While the raster platform plugin supports multiple top
level windows, this is not supported on the GL plugin,
so if you use GL or QtQuick2 in your app and use several
top levels, the app would crash with an error message.

A problem is that the top-level SurfaceView is a special
overlay View and does not support being stacked in a
layout. So instead, we let all windows share the same
GL surface and draw on top of each other. This works
fine for simple use cases.

We implement a new platform capability to make sure no
top level windows (even combobox popups and dialogs)
get non-fullscreen geometries. That has never
worked properly with the eglfs plugin.

Task-number: QTBUG-30473
Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-18 09:18:43 +02:00
Jens Bache-Wiig
1770f25857 Fix GroupBox painting on Windows when not using widgets
This is simply removing some slow and rather ugly hacks that tried
to reconstruct broken data from the windows xp theme. After testing
without these hacks on both XP and Windows 7, I believe we can
conclude that these workarounds are no longer required and even
breaks our look and feel in several places.

Task-number: QTBUG-29888
Change-Id: Ifaffd660e8d9ed6dfd43657745c3fa1606d33a7c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-18 09:18:43 +02:00
Morten Johan Sørvig
e25db96884 QOpenGLPaintDevice: correct painting on retina.
Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio)
return d->devicePixelRatio instead of 1.

Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-18 09:18:43 +02:00
Shawn Rutledge
acfccd0483 Fusion & GTK styles need to check direction from style option not qapp
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.

Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-18 09:18:43 +02:00
Shawn Rutledge
4c7881396e An RTL submenu should be right-aligned
Task-number: QTBUG-30595
Change-Id: Iac54cae70b5a2ac6be5a750279fb390bb158776a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 09:18:43 +02:00
Gunnar Sletta
7c791171a1 Calling wglMakeCurrent on an already current context gives 100% cpu load
The problem occurs at least with nvidia cards when vsync is enabled
in the control panel.

Task-number: QTBUG-29686
Change-Id: I6fd2a3560a5baeeac7c3fe0440db85904c45026d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 07:09:09 +02:00
Friedemann Kleint
333817b9cf Do not send clipboard message to application under debugger.
Fix Qt Creator hang when copying a stack trace from an
application showing a runtime assert.

Change-Id: I874bd48643ebce1a3551644dc850cb7cf5869522
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-17 22:14:19 +02:00
Friedemann Kleint
9a89d614f2 Windows: Fix compile with -directwrite.
Task-number: QTBUG-30643

Change-Id: I3a2a0e767a92bc2ff9d7d241dfad6771034e6ad4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-17 22:14:19 +02:00
Gunnar Sletta
5a05d0716f Emit animation driver signals after we change the state.
Change-Id: I4d5d6efdcb519cd4bb53626ae9412a4f5f130689
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-17 19:22:19 +02:00
Cyril Oblikov
9557cc6536 Correct dir entries caching in QFileDialog
Using QFileSystemWatcher to update cache when directory is changed. It is
needed to correctly filter files created after the dialog opening.

Task-number: QTBUG-30604

Change-Id: I5479f9a54095de59ca2ba36b2bd4906de0907ac8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-17 12:31:42 +02:00
Martin Smith
c77f7229d5 qdoc: Add index of obsolete members to obsolete page
qdoc has been modified to emit a compact list of the
classes that have one or more obsolete members. The
command is:

\generatelist obsoletecppmembers

This generates an index of all such classes,
where each class name is a link to the class's
subpage of obsolete members. A class's subpage
of obsolete members is also accessible from the
class's reference page, but now it is also
accessible from this index.

Also, The command shown has been added to the
page obsoleteclasses.html in the generated
output. This page already contains the index
of obsolete classes.

Currently, no such output is generated for
QML types and QML types with obsolete members.
But qdoc does accept commands for those:

\generatelist obsoleteqmltypes

and

\generatelist obsoleteqmlmembers

...but qdoc doesn't know what to do with
those commands yet.

Task-number: QTBUG-30270
Change-Id: If19a3b977f64c948e4bd6f14a9e0a287419baa8a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-17 12:29:55 +02:00
Jørgen Lind
3ae271523f Move Fusion styles palette into QtGui
So that it can be used as the standard palette for QtGui
applications instead of the absolutely useless black palette.

Change-Id: Ie001439fcd8840a66275009c9f42cbf8bab4864a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-17 07:43:11 +02:00
Sergio Martins
d42e54c862 Fix typo in qWarning()
Change-Id: I17aa0a1985c2da889bc602fd76dc07c890ed6f6b
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-17 02:22:28 +02:00
Gabriel de Dietrich
2dbb73b54b Cocoa: Fix menu popup, again
This time, popUpContextMenu:withEvent:forView: wouldn't respect the
menu's minimum width setting.

Change-Id: I7731851f2cf45d596d45a24dab5abe7b9239f07f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 19:45:11 +02:00
Gabriel de Dietrich
21f6ab2860 Cocoa: Make sure no invisible proxy icon button is created
If the icon is null, don't force creation.

Task-number: QTBUG-30064
Change-Id: If639714f667fedfcc67a3393a7d75111a7dbff3f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 19:45:11 +02:00
Frederik Gladhorn
f5ea183cc6 Prevent recursions when triggering menus in QToolButton
With a global shortcut set it would be possible
to let the button re-open the menu again and again,
each time spinning an event loop.

Task-number: QTBUG-30399
Change-Id: If7eddc115c77fef3df3e751fd72e7414cedaf272
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-16 19:45:11 +02:00
Thiago Macieira
2ddbba9ba9 Make QBuffer unbuffered
Sounds non-sense but it means that QIODevice will not try to copy from
QBuffer's buffer onto its own.

Eventually we should figure out to make QBuffer use the
QIODevice::buffer member that is already there and avoid all of this
mistake. Something for the future.

Change-Id: Ib700c9cadb46cec20a8ea5a69a488ded7104ac76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-04-16 19:45:11 +02:00
Andreas Holzammer
0d1ab4e667 [QNX] Fix build/runtime if QT_NO_OPENGL defined
Change-Id: I38d511ac0a53b65abfe47baaa6333629df5b578d
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-04-16 19:45:11 +02:00
Thiago Macieira
b4ce49287f Make QBuffer::bytesAvailable() work
We don't need to keep an internal QBuffer position, we can just use the
one from QIODevice::pos(). It will keep track of goings ahead and
backwards for us, plus it will make the default bytesAvailable() work
out-of-the-box too.

This error was reported on IRC.

Change-Id: I8559e8ee56edaa01ca8732c1f1012082ebe3a3f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-04-16 19:45:11 +02:00
Bjoern Breitmeyer
fb1649d30b Fixed CE build of sqlite3
The updated sqlite3 lacks a forward declaration of localtime.
Depending on the CE version that forward declaration
was sometimes available.

Change-Id: Iec7de1167702ccec46b62f63b65a4710231c8534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-16 19:45:11 +02:00
Frederik Gladhorn
ae6f9d00a6 Accessibility Mac: Enable ignoring of children
The ignored children do not show up in the
hierarchy, this should improve performance
significantly.

Previously the code would ignore the grouping
property which seems to break QGroupBox.

Change-Id: I4535af9c95bce76ded65f6d40fe07f17f3acffad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 16:50:59 +02:00
Jens Bache-Wiig
6300caf01f QGtkStyle: Remove widget dependency from GroupBox
This patch makes it possible to draw a checkable groupbox without
passing a widget pointer.

Task-number: QTBUG-29867

Change-Id: I9b74bcffa0401c88f9dcbcd9816081b7f03a5173
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-16 15:36:09 +02:00
Konstantin Ritt
201bd2e59a QFontConfigDatabase: Fix performance regression
..introduced by 244cc5da55
Symbol fonts usually don't have code ranges support except Latin.
Don't load FT face for font that doesn't look like a symbol font.

Change-Id: Iec46aa84e27227e0bda5d50f96a2b2f75f58e950
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-16 15:33:16 +02:00
Tor Arne Vestbø
8e127d9df8 Add default value for qHash's 'seed' argument for QOpenGLVersionProfile/Status
Although template<typename T> inline uint qHash(const T &t, uint seed) from
qhash.h is never instantiated because we have the two-argument version of
qHash() for both QOpenGLVersionProfile and QOpenGLVersionStatus, we need
the default argument, as the template in qhash.h uses noexcept, which
is evaluated regardless of instantiation, and uses qHash(t) without a
seed.

This behavior seems to not be the case with Apple clang 4.2, but has
been observed with Apple clang 4.1, Clang 3.2, and GCC 4.8.

Change-Id: If70e93f64eb9675a7c3ef7897ced2c6aebbec2d6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-15 17:45:20 +02:00
Janne Anttila
aa009e3dcc Fix QFSFileEngine::renameOverwrite for Windows Embedded Compact 7.
Windows Embedded Compact 7 does not have MoveFileEx, simulate it with
the available file I/O functions [1]. For more details please check the
comments in source code.

[1] http://msdn.microsoft.com/en-us/library/ee490588.aspx

Change-Id: Ib0fb0ba84e2d070dee2f633af1b81bec132f4c17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
2013-04-15 15:32:40 +02:00
Thiago Macieira
c57dd789fd Mark as unused the private members that aren't and CANNOT be used
Those members were left uninitialised by inline constructors and/or
the destructor of those classes is/was also inline. Those members
cannot be used to store pointers that need managing during the Qt 5.x
lifetime.

They can be used to store simple values, as if they were integers.

Detected by Apple Clang 4.2.

Change-Id: I20e2def7c4006668e2d6a7e332c89e2dc8c2a184
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
aec1bcf6a3 eglfs: Make sure virtual functions are not called from ctor
We want to override some of them in a subclass.

Change-Id: Ic7a22d7bc4589199b3f764157125094a4ff6ec28
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
2b4dff8dc1 Make surface and window accessible to subclasses
We need to access these in the Android plugin.

Change-Id: I8c7f279bbe0b7087260cceb1f965c833c0097984
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
c1ac77b34c Remove code for Android API level < 9
We don't support API levels < 9, so we can simplify this code
a little.

Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 13:20:17 +02:00
Eskil Abrahamsen Blomfeldt
72e9cad560 Remove dead code
Just some code that was commented out and only adds to the
confusion.

Change-Id: Icfdf81de9731eeb2c473a2f6e2723742601a2037
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 13:19:01 +02:00
Morten Johan Sorvig
27d40fce12 Add autorelease pool for cocoa plugin creation.
Prevents mem leaks at startup on 10.6.

Change-Id: I5f8b72c54ab396ee0ec2e47320163a6a342b78f1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 13:17:26 +02:00
Morten Johan Sørvig
6a0bb4206a Add autorelease pools needed by Qt Creator.
With these Qt Creator startup is now warning-free
on 10.6.

Change-Id: Ie29d360611c0e516258920163e4e94d174217299
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 13:17:26 +02:00
Tasuku Suzuki
01f3ef2050 Make qtbase compile with QT_NO_IMAGEFORMATPLUGIN
qfeatures.h re-generated from qfeatures.txt because
QT_NO_IMAGEFORMATPLUGIN was missing

Change-Id: I1c9291529ec07f83f99c9cd08340cbfebda609b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-15 13:17:26 +02:00
Gabriel de Dietrich
61b71b2baf Cocoa: Fix unresponsive main window after running more than one modal session
For some reason, we postpone clearing the stack of modal sessions until we call
processPostedEvents() again. However, it also means that when we clear the second
modal session, that session keeps running although we just closed its window. The
reason why it isn't stopped is because it wasn't the topmost modal session in the
stack.

This patch fixes the issue by stopping a modal session if any session above in the
stack has been stopped. This makes it less problematic if we don't call
processPostedEvents() in between ending modal sessions.

Task-number: QTBUG-30504
Change-Id: I9f898250ae629947d066647f9d5a0b9f75cf0070
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-15 13:17:26 +02:00
Morten Johan Sørvig
88272d6c04 Don't warn on 0x0 sized windows.
I don't think this is an user error. If it is then
the warning should be in a cross-platform code path.

Change-Id: I4c615d9b2372660bb03b17ccb25204b2a8d17b1a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:34:53 +02:00
Gabriel de Dietrich
e5e0ec42bb Cocoa: Fix popup menus on modal windows
Previously, we used -popUpMenuPositioningItem:atLocation:inView: but
this turns out not to work with modal windows. This can actually be
reproduced in Cocoa.

Change-Id: I9b750d1f97637f0cc30329d3da3acf5200f62206
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-15 10:34:06 +02:00
Morten Johan Sørvig
11fdd8edcd Cocoa: Create QCocoaWindow when enabling touch.
The ref-counting and (native) touch enabling is
implemented in QCocoaWindow.

Change-Id: I4f3f5e16db59afec7dd7dd2f8360dd60b90bfe6d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:28:23 +02:00
Morten Johan Sørvig
2da29c9736 Cocoa: Enable touch on 0->1 counter transition.
Change-Id: I9d8fb84851a866c3020cbbca13d5b2dc297cfe65
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:28:14 +02:00
Morten Johan Sørvig
fd038dc53a Make QGLPaintEngine work on retina displays.
QGLWidgetGLPaintDevice::size now returns the size
in device pixels.

This fixes the QPainter "overpainting" and GraphicsView
with a QGLWidget viewport use cases.

Task-number: QTBUG-30217

Change-Id: I01998d39d7b4d755cf8b7b3fab5f75cd0d899ccf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-15 10:28:00 +02:00
Morten Johan Sørvig
cea58f4b77 Add devicePixelRatio metric to QPaintDevice.
Previously QPainter computed the devicePixelRatio
based on the physical and logical dpi, and expected
that the ratio between them would be either 1x or
2x.

This was problematic for paint devices like printers
where the physical dpi can be much higher than the
logical dpi, and also for QScreen where the physical
dpi would have to be defined as a multiple of the
logical dpi.

Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice::
devicePixelRatio() getter and implement it for the
QPaintDevice subclasses. Use it when calculating the
highdpi scale transform in qpainter.cpp and when scaling
the clip rect in qwidget.cpp.

Remove physical dpi scaling for QImage, QPixmap and
QOpenGLPaintDevice, reverting to the old behavior.

Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-15 07:55:52 +02:00
Konstantin Ritt
1f3a67e870 QFontEngine: Fix cache_cost might be not initialized
Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-14 14:28:07 +02:00
Konstantin Ritt
112b31bed6 QWindowsFontEngineDirectWrite: Fix resources leaking
fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus
must be released with IDWriteFontFamily::Release().

Task-number: QTBUG-26861

Change-Id: I314153f97b8b59c9ba728220f93b493b13337039
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-14 14:27:58 +02:00
Jędrzej Nowacki
d121b37a4a Micro-optimization of list string list construction in qmetaobject.
We know the size of constructed list, so it may be worth to reserve
memory space for it.

Change-Id: Idad061bc1dbf5acecaec48d2e00ca3504b9db8b8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-13 17:44:11 +02:00
Konstantin Ritt
d3938c1898 Fix integer overflow for very large fonts
This caused glitches up to unreadable text with i.e.
pixelSize 256 and stretch factor 4x /* ((256*4)<<16)<<6 */.

Change-Id: Ib6a038a043d820a94bd2019c50390a815a2a8277
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-12 20:02:49 +02:00
Konstantin Ritt
4f400eeec1 QFontCache: Make clear() really clear/free cached data it maintains
QFontCache::clear() now frees everything it keeps and resets the cache costs.

Change-Id: I23ac2cab5c7c7d70db03f048b6fde151a18f92e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-12 19:50:53 +02:00
Jan Kundrát
cc38a1eee8 Fix C++11 support in clang prior to 3.2
The comments in this file suggested that the bug was only present in clang/3.1.
However, qRegisterMetaType was failing even on clang 3.2
("tags/RELEASE_32/final"). The clang's bugzilla says [1] that the problem was
fixed two days before the release of 3.2, but apparently it didn't make it to
the release branch.

[1] http://llvm.org/bugs/show_bug.cgi?id=13470

Change-Id: I37db8f6f6b22ab939110e79240d92313c1786d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-12 14:09:25 +02:00
John Layt
61d0f728ae QPrinter - Fix doc errors
Fix doc errors.

Task-number: QTBUG-27143
Change-Id: I59376bdb48ce03eb61f38b7dd7eb58f0d517a873
Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
2013-04-12 11:46:01 +02:00
John Layt
839a9c11de QPagedPaintDevice: Fix setPageSize() to set correct metrics
Use the correct metrics for the requested PageSize instead of always
defaulting to A4.

Task-number: QTBUG-30494
Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-12 11:46:01 +02:00
Tobias Hunger
47ce14cf74 s/uint32_t/quint32/
uint32_t is in C++11, which we can not rely on being present. It is also
in C99, but some compilers do not support that in C++ mode.

Change-Id: I29bada724f5646a0a0562b3ab133cb49cf928d6d
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-12 11:46:01 +02:00
Friedemann Kleint
8c81b282f8 Widgets: Propagate 'accepted'-state of touch begin events.
Task-number: QTBUG-29946

Change-Id: Ia9ac54251f52b6ae4b3d667e49b96441def72a57
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-12 09:31:51 +02:00
Friedemann Kleint
f8a047d843 Fix Windows CE compilation.
Breakage introduced by 11e9f1368b .

Simplify #ifdef-blocks.

Task-number: QTBUG-30063
Change-Id: I0710915ff7b0ad5947935904c43ff9b621f638f2
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2013-04-12 09:31:51 +02:00
Janne Anttila
fc21811982 Fix qlocalsocket_tcp.cpp build for Windows Embedded Compact 7.
There is no 'name' variable, but apparently 'd->serverName' is correct
variable here. Some other methods take 'name' as an argument and have
similar code block, so I think this is a copy/paste error introduced
somewhere in the past.

Change-Id: I2e82b42688b9928e0dcc5054df04e87d30a5e38e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-12 09:31:51 +02:00
Konstantin Ritt
b3dae6848d Fix leaking of QFontEngineData
QFontCache now references QFontEngineData-s it maintains,
so that QFont instances not freed prior to calling ~QFontCache()
would destroy QFontEngineData on their own.

Task-number: QTBUG-25434

Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
2013-04-12 04:23:35 +02:00
Gunnar Sletta
289120f8dd Enable qDebug to console when desired on Android.
Change-Id: I91906c5fc2a5b406f416c296c124a01795e69b8a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-12 01:25:37 +02:00
Stephen Kelly
fc06df5c77 Warn if mouse event occurs outside target window in tests.
This class of bug seems to occur in 'flaky' CI tests, so give
more information about what the problem is. Found here:

 https://codereview.qt-project.org/#change,44210

Change-Id: I73908e309bdecf1fd3bc323dd4e8febe47c1239a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-12 01:25:37 +02:00
Stephen Kelly
89e6183a19 Only test cmake module versions if available for test.
The expected versions are only set if the cmake tests are set up by
qmake by running

 qmake && make check

If instead someone uses cmake directly:

 mkdir build && cd build && cmake .. && ctest

the expected versions are not known, and the test fails without
this patch. So, don't test the versions if they are not known.

Change-Id: I2e8a4f651a69a8817c819d881be75ca07bc1bfd4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 22:34:31 +02:00
Thiago Macieira
6a11dd1669 Remove unused private members [tools]
Apple Clang 4.2 caught private members that aren't used in a class
with no friends. Since this code is in a tool, there's no binary
compatibility requirement.

databaseinfo.h:71:13: error: private field 'driver' is not used [-Werror,-Wunused-private-field]
quoter.h:86:10: error: private field 'validRegExp' is not used [-Werror,-Wunused-private-field]
qmlvisitor.h:123:11: error: private field 'tree' is not used [-Werror,-Wunused-private-field]

Change-Id: Iba9995f28ddef983c9ffc1dc551f042539252704
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-11 21:11:33 +02:00
Fabian Bumberger
e9760f1559 Fix the check if mouse events should be synthesized from touch events
In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents
is taken into account when synthesizing mouse from touch events, in
QApplication only the PlatformIntegration syle hint
QPlatformIntegration::SynthesizeMouseFromTouchEvents.

With this patch both attributes are checked. Furthermore the check was
moved out of translateTouchToMouse in QApplication in order not to
influence the result which is returned to the user, when mouse events
are not be synthesized.

Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-11 16:09:19 +02:00
Jonathan Liu
e81446141f ANGLE: Use rtti_off in CONFIG only for release
ANGLE uses dynamic_cast in debug.h for debug builds which require RTTI.

Change-Id: I0e2fea7ed751dc87624d7e76d179023accb9c126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-11 16:09:13 +02:00
Andy Shaw
ac4474900c Call QString::normalized when it is constructed via the native API
When a string comes from the native APIs then it may need to be
normalized.

Task-number: QTBUG-14787
Change-Id: I5164e80efcd1d99a50263c72bcf97d7fb31b38f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-11 10:41:14 +02:00
Jan Arve Saether
3a3e9b74eb Do not show the warning if queryAI() returns an invalid interface.
We should only warn about missing a11y plugins if iface is 0, since
we obviously have the plugin otherwise.

This got triggered by that a visible widget got destructed, which in
turn called hide(), which ultimately ended up calling
QAccessible::updateAccessibility(QAccessible::ObjectHide).
When QAccessibleEvent::accessibleInterface() then called
queryAccessibleInterface(), QAI::isValid() would return false because
the widget was in its destructor.

Change-Id: If655e00e7bb3737a39e24e26dbd1e23edd515bf5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-11 10:09:44 +02:00
Friedemann Kleint
0b12cf613f QVector: Fix signedness warning in assert.
Task-number: QTBUG-30331

Change-Id: I91b346b36162e8146a05babd24afa4bfb7259bec
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-11 10:03:00 +02:00
Stephen Kelly
77db3b8d65 Merge "Merge branch 'release' into stable" into refs/staging/stable 2013-04-11 06:51:52 +02:00
Stephen Kelly
1b32185a7a Make qt5_use_modules find dependents only in the parent directory.
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure this cmake function only searches
for sibling packages as dependencies.

Change-Id: Icab23d333fa6a750ee262b592fae39f0ba334fee
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 00:51:04 +02:00
Stephen Kelly
b8cd54a92f Make the umbrella Qt5 CMake Config file find components only in the parent directory.
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure cmake only searches for sibling
packages as components.

Change-Id: I9e0c13dfcdba28a9fd6892828b0f509dd63e6604
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 00:48:58 +02:00
Konstantin Ritt
c0300eed19 QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 locales
QFontEngine::FaceId::filename is intended to be local8Bit-encoded
but QFreetypeFace::getFace() always treats it like UTF-8-encoded.
Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename
conversions with QFile::(en|de)codeName, where appropriate.

Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-11 00:03:32 +02:00
Konstantin Ritt
9f7bc42b7d Fix QFontconfigDatabase unable to fallback to a localized family
When populating the font database, FcPatternGetString(FC_FAMILY) gets
a localized font family name; but, in fallbacksForFamily, it gets
a non-localized font family name, so it unable to find the proper font to fallback.
Simply register all family name variants as aliases to localized name
and make sure they are checked when getting fallback families.

Task-number: QTBUG-28806
Task-number: QTBUG-30415

Change-Id: I71c03ae9b51a28736c2576f3442f1bbdb3497c09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-11 00:03:22 +02:00
Sergio Ahumada
b4283c0b46 Merge branch 'release' into stable
Conflicts:
	src/widgets/styles/qwindowsvistastyle.cpp

Change-Id: Ifd17532393ebab8ed454c6a79bab622959ceef95
2013-04-10 19:28:12 +02:00
Stephen Kelly
f29b793508 Use CMake facility for verbose makefiles instead of an env var.
It should also have an effect for Visual Studio project files, not
just makefile generators.

Change-Id: I395071f09b29a6e8967a3d44e41d30480ae783f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 17:51:51 +02:00
Jens Bache-Wiig
b5b6d6f5fc Windows: Dont use black as clear color on opengl windows
Perhaps this made sense when all our open gl examples were black,
but with components and I would assume the majority of use cases
we should use the default window background color to fill exposed
window background during a resize.

Change-Id: Ia439a7c3919243efa6026e2e07bee62c25557df0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-10 17:51:36 +02:00
Rafael Roquetto
f0425e115e QNX: Adjust rotation according to initial orientation
Task-number: QTBUG-29201

Change-Id: I37e82904e0f3d8b372b31ee7d1379e61c788c622
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2013-04-10 17:51:36 +02:00
Peter Hartmann
f273d6fbc0 QNetworkConfigurationManager: check whether app is shutting down
... before trying to update the configurations. Before, we would check
whether the pointer to the QNetworkConfigurationManagerPrivate instance
was 0 and in that case construct it. This would mean that this code path
was taken "at app shutdown", i.e. when the qAddPostRoutine had already
been called but the other statics were still accessed.

Note: This is not thread safe, but neither is the rest of the code;
making it thread-safe would require additional changes.

Task-number: QTBUG-30585
Change-Id: I8f6cf616e3f3ba1e84b8246589fb7210d2dae57a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 13:27:01 +02:00
Kai Koehne
0eefbf8376 Fix access to invalid memory
QString::toLatin1() creates a temporary QByteArray.

Task-number: QTBUG-30578
Change-Id: I17c60bbade1486399f745c7e9878c6467971e6cc
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-10 13:23:13 +02:00
Sze Howe Koh
6617b6765a Doc: Fix minor typo
Change-Id: Id99a1ea0be841cf7cfaf3c671d36dbddc290fcad
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-10 13:21:09 +02:00
Sergio Ahumada
31907c16f8 Remove QT_{BEGIN,END}_HEADERS macros
These macros are useless from Qt 5.1 on.

Change-Id: I4574e87ef36e7bc67d2f1caa38c685a837708764
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-10 12:53:05 +02:00
Liang Qi
1d6325e4f1 Mac: Ensure the native filedialog sets file name when saving
The name field string was not set in native dialog when one was present.

The previous fix is not correct. In the doc of setNameFieldStringValue,
it said "The value must not be nil".

Task-number: QTBUG-28342
Change-Id: I847fb7472b8fecc0303433d8bf72b6a5bd7da72b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-09 20:10:59 +02:00
Shawn Rutledge
4bcec703c4 OSX window: set QWindow geometry after native window is created
Initial window position is at 0,0 by default, then it's corrected
in createNSWindow (by calling initialGeometry).  After window
creation, QNSWindowDelegate will receive the windowDidMove
notification and call QCocoaWindow::windowDidMove() which then
calls QNSView::updateGeometry().  It will not call
QWindowSystemInterface::handleGeometryChange() because the window
is still being constructed.  So we can fix this by directly
setting QWindow::geometry in the QCocoaWindow constructor.

Task-number: QTBUG-30382
Change-Id: I3db7a6e83693e5787ae82dcab1767de938d2e5d1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-09 20:10:59 +02:00
hjk
34fadcfeb1 Mac: Return Qt::Key_F9 for F9, not Qt::Key_F8
Task-number: QTBUG-30520
Change-Id: I7006e43ea638796045925e753a2ef8f9d0a066e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-09 20:10:59 +02:00
Sergio Ahumada
1abeb85464 doc: Minor changes to qtgui.qdocconf
Changing "C++ API" -> "C++ Classes" to match all the other modules.

Change-Id: I434cd9c32b1db18395242e73564fe309c8ebb99e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-09 10:36:28 +02:00
Andy Shaw
97c6fd22d2 Use Q_DECLARE_PRIVATE for Oracle and DB2 plugins
This completes the change started with
0bdc86d9ef by providing the implementation
for the Oracle and DB2 sqldrivers

Change-Id: Ia14415c6d7dea51f1369a81236f79aff892b3af7
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-09 10:21:26 +02:00
Sze Howe Koh
ab7eacd8a5 Doc: Fix minor typo
QDoc needs correct capitalization to create a link to the class ref

Change-Id: If95ab1245fcad6c0f624b88eb4522ba78be7d6a6
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-09 09:31:32 +02:00
Thiago Macieira
55c225428f Doc: fix compilability of the example
QDBusConnection::registerObject takes an object.

Task-number: QTBUG-30483
Change-Id: Ibebec48e8c9d3df0d3fa1177c3887ea5c75e8623
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-09 07:13:58 +02:00
Thiago Macieira
f104991180 Doc: add row for Qt 5.0 datastream version
We seem to have two tables. That's a bad idea, but they are there.

I won't add Qt 5.1 until we're certain that the datastream isn't
changing. It's preferable to lack information than to show the wrong
value.

Change-Id: Ibc7eb95bbbf3b35388f910154372fdd896735430
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-09 07:13:55 +02:00
Martin Smith
7a66f6b60e qdoc: Removed dead code from qdoc
The documentation used to have "Main Classes" list for C++ classes,
and qdoc kept track which classes were supposed to be listed as "main"
classes. This is no longer used, so this change removes the code that
marked a C++ class as a main class and tested whether a class was a
main class. This dead code was seen while preparing the way for
changing qdoc to output a documentation page for obsolete C++ classes
and functions and obsolete QML types and functions.

Task-number: QTBUG-30511
Change-Id: Iccc31b46b7c3c144038372cad4771d974f207937
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-08 17:23:15 +02:00
Gabriel de Dietrich
6db10834b0 Cocoa: Properly clean window mask data
Also, get rid of qt_mac_toCGImage and QPainter warnings.

Change-Id: I9e2a0e93d74c318d99651de9222994615e082ac9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-08 17:23:15 +02:00
Volker Krause
e6bade8f87 mkspecs are installed to QT_HOST_DATA instead of QT_INSTALL_ARCHDATA.
These are the same for normal builds, but differ when cross-compiling Qt.

Change-Id: I75eccc6f4b67b440a08c4aba41aabb7df686c9f9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-08 17:23:15 +02:00
Friedemann Kleint
faa390dc4f Fix compilation with QT_NO_ACCESSIBILITY.
Task-number: QTBUG-27860

Change-Id: I561b0b0b1a098556f9de909241b448307a271985
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
(cherry picked from commit 8b29c7539d)
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 15:30:58 +02:00
Mark Brand
f6011ec528 QSQLITE2Driver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATE
Follow-up to 0bdc86d9ef

Change-Id: I0a480b5780eb22b1c22e8a47b3a13ab1cd97b934
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-08 14:31:41 +02:00
Volker Krause
96e3c2bcbf Don't bypass overwritten [set]data() methods in the proxy.
By calling itemData() of the source model directly, the result cannot
contain data provided by the proxy model itself. The base class
implementation however will call data() on the proxy instead.

Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-08 14:17:27 +02:00
Michael Brüning
9bf93f3e73 Clear the WA_QuitOnClose flag from EvalMessageBox.
The evaluation message box caused  the QtWebProcess
to quit due to the fact that the process has no other
windows and EvalMessageBox was both set to be closed
on quit and ended up being the last window in the process.

Change-Id: Iad6461d014258fdc5fade7dafe48da33903377bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
2013-04-08 14:09:02 +02:00
Andrew Knight
dce86de8e7 ANGLE: Avoid memory copies on buffers when data is null
With data=0, ANGLE can crash when setting the buffer data. As this
should be a legal operation, don't perform a memcpy when data is null.

Change-Id: I3fa1260482549b1da50d7a68001a65decb98f258
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Andrew Knight
fab430a412 ANGLE DX11: Prevent assert when view is minimized or size goes to 0x0
This allows the Direct3D 11 version of ANGLE to gracefully allow
surfaces with dimensions of 0. This is important because Qt may resize
the surface to 0x0 because of window minimization or other user
action (window resize). As EGL specifies that empty (0x0) surfaces are
valid, this makes sure an assert doesn't occur in the case that a valid
surface is resized to an empty one.

Change-Id: Ia60c4c694090d03c1da7f43c56e90b925c8eab6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Andrew Knight
710ad8ce1b Upgrade ANGLE to DX11 Proto
Upgrades ANGLE to dx11proto (dx11-MRT-support tag), which splits out support
for DirectX9 & DirectX11. The DX9 codepath is used by default;
CONFIG+=angle_d3d11 must be passed to the ANGLE project to build for DX11.
Existing patches to ANGLE have been updated (or removed if no longer
needed), and a patch has been added to make DX9/DX11 codepaths mutually
exclusive.

Change-Id: Ibe13befadb94f04883eca449d0ee1f0da955ff92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Axel Waggershauser <awagger@gmail.com>
2013-04-08 11:35:44 +02:00
Frederik Gladhorn
8307ab784e Make QTextCursor accessibility boundary finder available
This allows re-using the function in QtQuick.
In addition TextBoundaryType is moved to QAccessible
and QAccessible2 as namespace ceases to exist.

Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-08 11:35:44 +02:00
Ahmed Saidi
6f0dc9f4c7 QWizard/Win: Support RTL layout in Aero style
Task-number: QTBUG-30462
Change-Id: Ie6b3ba4975542a9d92611eb9a8547215e41d3c2c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Shawn Rutledge
53cee4a37a Mac: a dialog should have a titlebar by default
Change 595deca5 for QTBUG-22316 resulted in having titlebars only on
modal dialogs.

Change-Id: Ic23c957e0e95cf567d90831e105cc402465df982
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-08 09:30:19 +02:00
Friedemann Kleint
00202e15fd Fix MSVC warning about truncation from 64bit to 32bit int.
Change-Id: Id3e2f148aa430045d32d61b61eabc3f7197cbbf0
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-06 08:58:13 +02:00
Dmitry Shachnev
d7e28c1a8d QGtkStyle: Try to get the theme name from GtkSettings
Note that GtkSettings is already used for retrieving the icon
theme name.

Change-Id: I935d903c703f7d832b0350d3cfd3a638f22d1391
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-05 20:04:51 +02:00
hjk
06d4c0b2e8 Android: Implement debugging without relying on shell run-as
This uses explicit handshakes between the application and the
gdbserver start and the host side by using the gdbserver socket
and two files ("ping" file in the application dir, "pong" file
in /data/local/tmp/qt)

The sequence is as follows:

 host: adb forward debugsocket :5039

 host: adb shell rm pong file
 host: adb shell am start
 host: loop until ping file appears

     app start up: launch gdbserver --multi +debug-socket
     app start up: loop until debug socket appear

         gdbserver: normal start up including opening debug-socket,
                    not yet attached to any process

     app start up: touch ping file
     app start up: loop until pong file appears

 host: start gdb
 host: gdb: set up binary, breakpoints, path etc
 host: gdb: target extended-remote :5039

         gdbserver: accepts connection from gdb

 host: gdb: attach <application-pid>

         gdbserver: attaches to the application
                    and stops it

     app start up: stopped now (it is still waiting for
                   the pong anyway)

 host: gdb: continue

         gdbserver: resumes application

     app start up: resumed (still waiting for the pong)

 host: write pong file

     app start up: java code continues now, the process
                   is already fully under control
                   of gdbserver. Breakpoints are set etc,
                   we are before main.
     app start up: native code launches

Change-Id: Iaa28b8664dbebc39022d1be7ff5533c52ce39715
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:26:31 +02:00
BogDan Vatra
f5ba2b8a91 Update java part for Ministro 9.x
Add default source and repository.

Change-Id: Idfa7936e8a2879fad9944702c2aa5c6d4638185a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:26:21 +02:00
Paul Olav Tvete
12f7596cf6 Android: use Fusion style by default
The Android style is not fully implemented yet, so prefer the
Fusion style by default.

Task-number: QTBUG-29565

Change-Id: Ida413e6b34a41b618b8e2206688922195ffcc519
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:26:13 +02:00
Paul Olav Tvete
439a6fec84 Android: set logicalDpi based on DisplayMetrics.scaledDensity
The mathematically correct way would be to set logicalDPi to
160*scaledDensity, but then a 12 pt font would be gigantic. On
iOS, we use a factor of 72 to be compatible with the native APIs,
but that means that a 12 pt font is very small.

A factor of 100 means that desktop apps look reasonable by default.

Task-number: QTBUG-29674

Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:26:07 +02:00
Stephen Kelly
722798a359 Don't call virtual methods after the source model is destroyed.
Calling clear_mapping causes the persistent indexes to be queried, and
mapped using map_to_source, so that they can be restored later. That
is not the appropriate response to the source model being deleted
because there won't be anything to restore.

Simply clear the stored mapping information instead so that the source model
actually exists when mapToSource is called by the framework.

Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-05 16:26:06 +02:00
Paul Olav Tvete
a658d26d84 EglFS: allow the hook to override logicalDpi()
Task-number: QTBUG-29674

Change-Id: Id88a8735ceb7f5bcb63344b3b0653486a6caa70d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:25:59 +02:00
Friedemann Kleint
9b7c66ac7f Windows: Ignore mouse events generated by Windows.
Task-number: QTBUG-29946

Change-Id: Idef0e7cc8bc407377e60e4a9d67c3ba78b347b76
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-05 15:05:24 +02:00
Friedemann Kleint
3331501022 Mark widget framestrut as dirty when window flags change.
When undocking a dock using the undock button on a main window
with native children, the dock widget goes to 0,0 (content
position) causing the window frame to be off-screen since
the frame is still 0,0. This change causes the frame to be
recalculated such that the frame position is 0,0.

Task-number: QTBUG-28872
Change-Id: I32896107cd7b982811f45de43dbad82e7407ea7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-04-05 14:50:21 +02:00
Stephen Kelly
30d01db3a5 Test that the CMake files create appropriate version variables.
Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-05 14:20:39 +02:00
Dmitry Shachnev
6c879b9b7c QGtkStyle: remove obsolete themeName != "Qt" checks
Change-Id: Ibb6d952f6abc398ac5deb94d3bdfd8560777aa44
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-05 11:32:00 +02:00
Friedemann Kleint
653e690923 Windows: Do not use native dialogs for non-modal dialogs.
Windows file dialogs are always modal (inheriting IModalWindow).
As the QtQuick dialog plugin has a widget-based fallback now,
there is no need to use native dialogs for the non-modal case.

Task-number: QTBUG-30513

Change-Id: I8b62af86fde34e8c0cf5e917d2e62260e16c82fb
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-05 11:20:01 +02:00
Gunnar Sletta
fdf10003b6 The default behavior should be double buffered, not singlebuffered
Without this, it is not possible to do vsync drawing on NVidia
GeForce 210 on Windows 7.

Change-Id: I6064826eaa55266344393f50cdf5d17113350255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-05 11:05:25 +02:00
David Faure
b3a505dc92 QSaveFile: allow saving to a writable file in a non-writable directory
The only way to make this possible is to disable the
atomic-rename-from-temp-file behavior. This is not done by default,
but only if the application allows this to happen.
https://bugs.kde.org/show_bug.cgi?id=312415

Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-05 11:04:35 +02:00
Sean Harmer
ef061b76b1 Fix incorrect classification of glTexImage3D.
See https://www.khronos.org/bugzilla/show_bug.cgi?id=449 for upstream
bug in gl.spec which incorrectly marks glTexImage3D as deprecated.

Change-Id: Ib307a5315dd37b8b18389df54b1c93e6a43c61dd
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-05 00:14:53 +02:00
Tor Arne Vestbø
8d92244d80 iOS: Fix build on case sensitive file systems
Change-Id: I920e7320e429006aef9433db3e942dc257dc72eb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-04 23:50:12 +02:00
Mark Brand
c8c8093561 QTDSDriver: fix index out of range
Follow-up to 5544208e2.

Change-Id: Iba3ff291622533e8050ddc0494e4488233727ebe
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-04 13:13:43 +02:00
Mark Brand
0bdc86d9ef QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATE
406c8ef6e6 introduced deriving the private SQL driver classes from
QSqlDriverPrivate. However, the drivers continued to keep their own
pointer to the private class, even though QObject provides the same
pointer. Worse yet, the private class is allocated too late and not
even passed to QSqlDriver. The result is that QSqlDriver allocates
a separate instance of QSqlDriverPrivate. This is likely to cause
all kinds of chaos.

The private class needs to be allocated in time pass it to QSqlDriver
which passes it on to QObject.

This commit covers the the base class and drivers:
    ibase
    mysql
    odbc
    psql
    sqlite
    tds

Fixes for the remaining drivers will follow.

Change-Id: Id8e7ec4205b0ca6cd00bd022c9cd24f137089245
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-04 13:13:37 +02:00
Mark Brand
708d39fa31 QSqlDriverPrivate clean-up
Change-Id: Ia6cbb37330bc0beed7498e43cd18bb2a1afb8e3d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-04 13:13:30 +02:00
Tor Arne Vestbø
127f19c7e3 iOS: Handle UIDeviceOrientation vs UIInterfaceOrientation
The former represents the physical device orientation, the latter the
UI orientation. We need to explicitly cast between them, as they are
different enums, but with compatible values for the subset we use.

Change-Id: I2926068802f35680cb6de5ced6dcf286014fdb2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-04 13:12:32 +02:00
Frederik Gladhorn
132348a864 Fix warning: qt_setDockMenu not found
qcocoanativeinterface.mm:196:5: warning:
 instance method '-qt_setDockMenu:' not found
 (return type defaults to 'id') [-Wobjc-method-access]
    [NSApp QT_MANGLE_NAMESPACE(qt_setDockMenu): menu];

Change-Id: I80838d0098e7f172d9b8124f04e91dba64764318
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-04 12:49:09 +02:00
Paul Olav Tvete
d9170e650c Android: Don't show '&' character in menus
Strip out shortcut indicator before showing the text.

Task-number: QTBUG-30507

Change-Id: I8fa2ef8a2052f4c43d14b3babfd5aca0a08e29d5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-04 12:49:09 +02:00
Konstantin Ritt
680d8aa6c5 QPA/Mac: Fix resources leaking
Having static QFont instance leads to a resources leaking, since QFontCache
is unable to clean-up font engines when the application exits.

Relates to QTBUG-25434

Change-Id: I71d91094de27c07ab2434c415e4c28b6acab3646
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-03 18:03:26 +02:00
Frederik Gladhorn
8b99445755 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-04-03 17:42:03 +02:00
Frederik Gladhorn
a4121a21c0 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
2013-04-03 15:43:39 +02:00
Venu
7a988e4c0d Doc: Replaced canConvert() with canConvert(Int)
This change amends my earlier change to make
the function reference relevant to the example
being discussed.

Task-number: QTBUG-28204
Change-Id: I841a561ba117f83a96b8b4a3661cea2a7a3e47da
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-03 13:16:39 +02:00
Andy Shaw
555a5ca61b If the menu item is merged then we should not release it
When a menu item is merged then we do not want to release it as it will
cause a problem with the Application menu. Therefore we just hide it
instead.

Change-Id: Ia9f7acfe063001111769841c9a360cac369f7ed7
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-03 13:14:52 +02:00
BogDan Vatra
b02b6172a2 Also version.xml needs to be installed
This file is used by QtCreator to decide if the java files
need to be updated.

Change-Id: Ib4875c32a071dd768f89950582c81ccdd420feca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-03 10:15:40 +02:00
Richard Moe Gustavsen
85ea2c0299 ApplicationState: Add new event class: ApplicationStateChangeEvent
This patch will follow up on e27ca37 (add more state to
QT::ApplicationState), and add a new event class
QApplicationStateChangeEvent with type Qt::ApplicationStateChange.

Change-Id: Idee724f181f1fbb2321ddad7e0df00c88b3488b1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-03 10:15:40 +02:00
Martin Smith
15fca980e9 qdoc: Use Q_QDOC in quuid.h to help qdoc
Some new ctor initializers were added that use
curly braces. qdoc's dumb C++ parser can't handle
curly braces in the ctor area; it thinks they are
the body of the function. In this update, the
Q_QDOC macro is used to isolate these problems
so qdoc doesn't have to deal with them.

Task-number: QTBUG-30254
Change-Id: Ie318e4ac58861f4ebd8a7b9f004d2677f850436e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-03 10:15:40 +02:00
jian liang
7dc622290b Make sure QThreadData and QAdoptedThread object is destroyed at app exit
Task-number: QTBUG-30134

Restore the lines in qcoreapplication.cpp removed by commit
950b35cf97 to ensure QThreadData and
QAdoptedThread object of main thread is destroyed at application exit.
We don't set QCoreApplicationPriavte::theMainThread to 0 as before since
it will be set to zero in QThreadData::~QThreadData()

Change-Id: I8ee56aff5a933ce1d812b07fb00a29ed0839ab6e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-03 10:15:40 +02:00
Topi Reinio
0c7e6ac083 Doc: Fix the documentation for QWindow::focusObjectChanged()
Fix the documented function signature to match the declared one.

Task-number: QTBUG-30398
Change-Id: I0d4894e2597f70e29a3edd4ceda91a4dddb9941e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-03 07:27:00 +02:00
Robin Burchell
6060716066 Correct location of mtdev define.
evdevtouch moved to platform support, so the location in the plugin is now wrong
(as was the file name)

Change-Id: I976f5d7ee68f5da5ed1f61773b3d5da683e12c6f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-03 00:37:48 +02:00
Oswald Buddenhagen
26825e2141 make bootstrapping of qdoc optional
the weird QLibraryInfo dependency is gone.

Change-Id: Iebaa5af6bc529999a2415b2ce3d2a5dca362dd5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-03 00:37:48 +02:00
Oswald Buddenhagen
a84af7425c add qcryptographichash to bootstrap lib
needed to make qdoc bootstrapping optional

Change-Id: Ie630d129ed038fd90078197588a6df723eddf553
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-03 00:37:48 +02:00
Konstantin Ritt
731f2a179b QTextCharFormat::setFont(): Preserve the font hinting preference
Task-number: QTBUG-22653

Change-Id: I9153486ff7793ba4427b64459896ab1328d51548
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-02 22:29:10 +02:00
Konstantin Ritt
ef05a7d64f Apply Qt-specific changes to the bundled FreeType
Change-Id: Ia2e737b513f542c702f24986ec9fcb24b5631e36
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-02 22:28:58 +02:00
Kai Koehne
be90d26fc6 Fix gcc OOM error when compiling in release mode
O3 leads to gcc bailing out with OOM on e.g. MinGW with gcc
4.7.3 onwards.

Task-number: QTBUG-29099
Change-Id: I3ce49794fa4857e756d2994454d4144cfb44ce58
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-02 21:20:07 +02:00
Andy Shaw
406c8ef6e6 Move the dbmstype to QSqlDriverPrivate so it can be used for all drivers
By moving it to QSqlDriverPrivate we make it easier to check what
database is actually connected which is particularly useful for the
autotests.

Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-02 19:02:26 +02:00
Thiago Macieira
dcf9c403ba Use Bionic's __pthread_cond_timedwait_relative
The Linux futex interface uses relative timeouts anyway, so this avoids
a double round-trip through clock_gettime: once in Qt code to calculate
absolute from relative and once in libc for reversing.

Glibc does not offer such a function because its pthread_cond objects
use a kernel interface that works on absolute times.

Change-Id: I8fbcd3f73d4364a16716b0eea17e8f5f9ab5cd05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-02 19:01:32 +02:00
Thiago Macieira
2fbe972a65 Add a function to do the relative waits, simplifying the code a little
More to come.

Change-Id: I108f23e94c322ad4e1466ff69100ad6af91d95e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-02 19:01:27 +02:00
Thiago Macieira
786c790176 Fix build on Android: libpthread is deficient and lacks functions
Even if the monotonic clock is available, Android's Bionic lacks the
pthread_condattr_setclock function, so we can't tell it to use the
monotonic clock.

Task-number: QTBUG-30450
Change-Id: I4f53708b1e834ff5d9462b3bf778b96c22662a04
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-02 19:01:23 +02:00
Oswald Buddenhagen
4e3b1ee6a6 fix non-bootstrapped build
Change-Id: Ic615dc3bee423e2bb05798ce861ca809ac89a23c
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-02 19:00:31 +02:00
Oswald Buddenhagen
779516957a move the setup of QT_INSTALL_DOCS from qdoc to qt_docs.prf
this is a qt specific option and really should not be hard-coded.

also, the implementation used undocumented api that is internal to the
bootstrapped process, which made it impossible to de-bootstrap it.

Change-Id: If706960671744e64a9a7c366437977a800a6058e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-02 19:00:27 +02:00
Frederik Gladhorn
b2ec0da956 Cache QAccessibleInterfaces.
Since there already is a one-to-one relationship
between QObject and QAccessibleInterface it makes
little sense to create and destroy the interfaces
on each call to queryAccessibleInterface.

Add a cache and keep created interfaces around for
the lifetime of the corresponding QObject.

This changes the memory management rules: accessible
interfaces must no longer be deleted. If you get an
QAccessibleIntrface pointer that pointer will stay
valid as long as the corresponding QObject is not
deleted.

This also re-enables accessibility for Mac.

We limit the range of the IDs so that they are
useable for Windows directly.
That means we can get rid of the event cache there.

This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee

Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-02 14:32:25 +02:00
Mark Brand
8dfe1385b5 QSqlTableModel: expose methods for getting primary values
These methods are very useful in subclasses.

Change-Id: Ifdfee9d90cbdad97f349e46b587582f1d9e7cd7a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-02 14:31:59 +02:00
Mark Brand
4131bfb2c2 make QSqlResultPrivate::fieldSerial() virtual
The Qt psql driver has its own implementation of fieldSerial() it uses
when it invokes positionalToNamedBinding() to generate a query using
its native naming style. Now that QPSQLResultPrivate is derived from
QSqlResultPrivate this can be implemented more conventionally using
a virtual function instead of pointers to static functions.

Note that this change preserves the current behavior of
executedQuery() which will continue to return the query with
positional syntax that is presented to virtual prepare() by
QSqlResult::savePrepare(). Since the driver does not have the
NamedPlaceholders feature, QSqlResult::savePrepare() will not use
positionaltoNamedBinding() to set executedQuery. Although
QPSQLResult::prepare() calls positionaltoNamedBinding(),
it does not put the result into executedQuery.

Change-Id: I7740f386cbfec9eadd9e4d6a7df3e590294655a5
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-02 14:31:47 +02:00
Mark Brand
db6190d6fe QPSQLResultPrivate inherit QSqlResultPrivate
Follow the usual pattern that a subclass's private class inherits
its base classes's private class. This will allow the private class
to use virtual functions.

Change-Id: Iafdf1cb5db672d973ad1f60bdd7e37b9072fbb1b
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-02 14:31:44 +02:00
Mark Brand
7565f6fe0a QPSQLResultPrivate: do not duplicate reference to private driver
The "private driver" is already known, so don't keep an extra reference
to it.

Change-Id: I34ec4108694bfbc3da3107f79598ae50a699911c
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-02 14:31:40 +02:00
hjk
6361227846 Reduce the likelihood of underflows in qFuzzyCompare
As indicated in the discussion of the bug report, this
does not address the real problem but only reduces the
frequency it occurs.

Task-number: QTBUG-26453
Change-Id: I20ac3f41f52effb674bee6924ccdfd2f641576ef
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-02 14:10:54 +02:00
Gunnar Sletta
35a51de5b4 Let EglFS pick up a platform input context if installed
Change-Id: Ia3765997682f8f90c7f7da712527beea365e01ed
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-02 08:29:43 +02:00
Thiago Macieira
620f911fd8 Update the QMetaMethod::tag() documentation due to moc expanding macros
Since 34a3b63dc7 (Qt 5.0), moc expands
macros to their defined values. This broke the example of tagging a
method: in Qt 4, it never expanded anything, so the tag was always
visible and extracted. Now it's necessary to avoid defining it to empty
when moc is run.

Change-Id: I89967f7f993cf8e14119b086f4dd5573b348646d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 21:33:29 +02:00
Giuseppe D'Angelo
11ad8c8bd9 Upgrade the PCRE import script to 8.32
Notably, SPARC JIT was added. Also, sort the entries alphabetically...

Change-Id: I78ab4ea2f30a31592d870ce07d35e318135a14bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 21:33:29 +02:00
Giuseppe D'Angelo
bb5552a229 Upgrade the bundled PCRE to 8.32
Changelog: http://pcre.org/changelog.txt

Amongst other things, the Unicode tables were upgraded to 6.2.0
and case folding support was added, which also fixes a QString
autotest (marked as XFAIL).

Qt still requires 8.30, not 8.32.

Change-Id: I4056c1dc1d949d33443bb8ca280de4c8c363ac74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 21:33:29 +02:00
Mark Brand
3499940289 update bundled sqlite to 3.7.16.1
Change-Id: Ia7d73d44c1e7707e81c022268b3a6df6d85703a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 21:33:29 +02:00
Konstantin Ritt
03875c0ba5 Fix reporting writing systems for non-TrueType fonts
According to EnumFontFamExProc docs:
> The ENUMLOGFONTEX structure includes the localized name
> of the script (character set).

lfCharSet ENUMLOGFONT's member must be used instead of comparing
these names to non-localized ones.

Also, when the font supports more than a single charset,
EnumFontFamExProc callback is called for it once per charset; thus,
we shouldn't "unsupport" writing systems in a subsequent call.

Task-number: QTBUG-30448

Change-Id: I58fcf32958490cf5a3e873db8335e71a39a9c518
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 21:33:29 +02:00
Alan Alpert
22cd698e39 Document Q_REVISION macro better
Previously it was only mentioned in properties.qdoc

Task-number: QTBUG-18802
Change-Id: Iab23128c1567974154cdcce7412b2e1468bb846a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-01 19:30:28 +02:00
Konstantin Ritt
6845a4fb01 Update bundled FreeType sources to 2.3.12
Most important changes:
* SFNT cmap 13 table format support;
* fixed glitches when rasterizing stretched TTF (xsize!=ysize);
* various fixes in Type1, CFF, and PCF drivers

Change-Id: Ib9e2210ffbd0daa2fdbf518ea87f4be502de6b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 12:03:55 +02:00
Konstantin Ritt
0fcadcca3d QFontConfigDatabase: fix fallbacksForFamily() for CJK languages
For Han Unicode script, the language couldn't be determined algorithmically,
the only way is guessing based on the user's locale.

The is a regression introduced in 9b0fab6b62

Change-Id: I84645885a825fdfb6c268edaf10185bf5e447eb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 12:03:55 +02:00
Konstantin Ritt
f0af3ed4e5 Update QLocale data to CLDRv23
Say hello to Interlingua and Mongolian once again.

Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 12:03:55 +02:00
Jens Bache-Wiig
59b2a85654 Fix tickmark painting on Fusion style
The problem seems to be that Fusion assumed that tickmarckoffset was
a fixed size, which probably changed when we moved the inheritance
from Windows to CommonStyle. I also had to modify the paint order

Task-number: QTBUG-30294
Change-Id: Ie7320c39fd572d39b641b6bd5a9db05f494f6b74
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-01 10:00:58 +02:00
Marc Mutz
5fcb438e7b Publish qEnvironmentVariableIs{Set,Empty}()
Change-Id: I81b960495c206024b4124cebf88b48b0c0d73619
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-30 13:41:59 +01:00
El Mehdi Fekari
2523f20c61 Fix typos in QBBSystemLocaleData
Change-Id: Ic893cdf4a274af660fae7f39011851318f0d244b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-30 10:50:40 +01:00
Gatis Paeglis
21c23ca539 Remove unused header file.
As Thomas Senyk found out, the compose input context
plugin had a redundant include for the X11 keysym header file.

Change-Id: Iad603b545803867d02d915acffe27991bb0b7ee4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-30 08:49:36 +01:00
Konstantin Ritt
bc4dcb6994 QLocale: Report textDirection() by looking to the locale script
Change-Id: Ic562b0301271ba414d5d3ff75a308d84bd288f56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-30 08:23:04 +01:00
Gabriel de Dietrich
6c10f5203b Mac style: Fix disabled menu item palette entry
Also, removed an "magic color" form the style implementation.

Change-Id: Iefd3ddc0d9d651d2b87f20eb1f9990a214b651df
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-29 13:06:40 +01:00
Morten Johan Sørvig
fc8759064c Make qt_setDockMenu work and call it.
The application delegate code from Qt 4 implements
a non-working qt_setDockMenu. Correct the signature
of the applicationDockMenu method.

Change-Id: I6f531a78f91e0550b0e66cc4f2fa072006a030f4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-29 13:06:40 +01:00
Morten Johan Sørvig
c0065187d7 Remove QMacQuartzPaintDevice.
Not used in Qt 5.

Change-Id: Ia0e14414afa524c5cc04151d20c168d93d8dcadb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-29 13:06:40 +01:00
Morten Johan Sørvig
7b9d45311c Fix missing devicePixelRatio propagation on copy.
Change-Id: I0cb541fe8a92b7a7c159e0a6e5036baf43185a93
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-29 09:47:32 +01:00
Topi Reinio
0d98a67424 Doc: Document Q_OS_WIN* macros
Fix the documentation for Q_OS_WIN32 and document Q_OS_WIN64 and
Q_OS_WIN.

Task-number: QTBUG-23120
Change-Id: Ie040c8deb6aeba326b6fafab302fadf4d93fa49f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2013-03-29 09:47:32 +01:00
Venu
edcfbebe98 Doc: Replaced canConvert() with canConvert(int)
This change makes the function reference more
relevant to the example being discussed.

Task-number: QTBUG-28204

Change-Id: I50bea45f1e11d7e1eef4bc6726ebb329151fbc3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-29 07:36:48 +01:00
David Faure
5a5a09289f QEventLoop: fix race on 'exit' and 'returnCode' private members
Change-Id: I380046f386448783e3e4e93bde8cbe15b9b0279e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-29 04:04:40 +01:00
Marc Mutz
2f531d8db3 QWidget: micro-optimisation
Compare string size before content.

Change-Id: I00f9c6c6cf31148af4807455fa6f6b9254dda9d7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-29 04:04:40 +01:00
Marc Mutz
c400e16a58 QMetaTypeId: use QByteArray, not QVarLengthArray, to construct type names
So far, type-name strings for class template instantiations were constructed
in QMetaTypeId::qt_metatype_id() by concatenating various bits and pieces
into a QVarLengthArray<char>, presumably to avoid the dynamic memory
allocation for small strings.

Yet, when passing the result to qRegisterNormalisedMetaType, which takes
a QByteArray, the QVarLengthArray was copied from, not by
QByteArray::fromRawData(), but by QByteArray(const char*,int), which
unconditionally results in a dynamic memory allocation after all.

What's worse: the characters are copied twice: First into the QVarLengthArray,
and then into the QByteArray.

Remove the first of these copies by using QByteArray+reserve() to copy
directly into the final QByteArray.

Change-Id: Id915798a318fe97279a7cc0aca176544f99c7e86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-29 04:04:40 +01:00