Commit Graph

15861 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
2d1bb6d61d Prevent a crash in QLayout::replaceWidget
Item might be null.

Change-Id: Ia432a35cb1a6bb02ee056ff8ad44a9f35bdbc146
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 14:18:14 +01:00
Gabriel de Dietrich
c934ea341e Cocoa File Dialog: Remove sandbox-ufriendly file system watcher
QFileSystemWatcher causes sandboxing errors since its backend uses
POSIX API in a relatively liberal way.

Also, Cocoa already acts as a file system watcher, and calls
-[QNSOpenSavePanelDelegate panel:shouldShowFilename:] on each
file. From a logical point of view, caching the directory content
can be replaced by testing the current file against the filter
setting. We expect Cocoa to cache results, and by using NSFileManager
things should remain relatively fast.

Task-number: QTBUG-34107
Change-Id: Ia872b9b1244f7b390d173a498011379b9309b3c6
Reviewed-by: Cyril Oblikov <munknex@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-08 11:35:29 +01:00
Friedemann Kleint
7a3c82077f Fix potential BC break in QColorDialog.
Replace newly reimplemented virtuals in
d928dbbc91 .

Task-number: QTBUG-34663
Task-number: QTBUG-14332

Change-Id: Idb2cc2ec237c96f7157470728bb79ff3efc504d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 11:16:51 +01:00
Friedemann Kleint
7a6bb4d9c9 Fix potential BC break in QTabBar.
Move code from mouseDoubleClickEvent() to event().
Introduced by 252bad7c58 .

Task-number: QTBUG-34670
Change-Id: I98ed24f26977220cf03524cfe001524364473982
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 10:44:06 +01:00
Tor Arne Vestbø
ac7823129a iOS: Cancel any active touches when destroying a QIOSWindow
Keeps the internal state of QtGui sane when it comes to which buttons
are active, etc.

Change-Id: Ic63e74d2546469e085ec46b74f4cf159dd409b07
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:21:40 +01:00
Tor Arne Vestbø
59be0509e0 iOS: Detect/handle cancellation of subset of touch points
Change-Id: I0d345d07fe62a8c7844333bf1eed9be6d6fa432f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:21:29 +01:00
Tor Arne Vestbø
24d1f58414 iOS: Rename QIOSWindow's backing view from EAGLView to QUIView
Matches the cocoa QNSView and highlights the relation to UIView.

Change-Id: Idcdb17bff994c1e0aef099400c21915a7041e44c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:20:08 +01:00
Tor Arne Vestbø
a301e868f7 iOS: Rename m_requestedGeometry to m_normalGeometry
Matches the wording using in QWidget.

Change-Id: Ifbb4e5ffa90b47a7c179cf9ec52cb46126d7bccc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:19:57 +01:00
Liang Qi
b2f2636217 Cocoa: fix a crash in QCocoaFileDialogHelper
Current directory can't be nil.

Task-number: QTBUG-34561
Change-Id: I58c84da4928bd9081c916b6e5541bb86cf75ed47
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-11-08 05:29:38 +01:00
Peter Hartmann
8db127b0b5 qfeatures.txt: add section about XML schema
... so the XML schema part can be disabled in the xmlpatterns module,
while still using other functionality (e.g. XPath).

Change-Id: I3599ea8f915d34e0b1ba5d6a30f3f6269a4c992e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-07 20:13:50 +01:00
Shawn Rutledge
8aab8ccc0f Dialogs: provide the StandardButton->ButtonRole mapping in QPA
As the QPlatformMessageDialogHelper will be implemented repeatedly,
it's useful to have this mapping in one place for reuse.  Also, since
we do not guarantee that either accepted() or rejected() will be
emitted for every possible button on a QtQuick MessageDialog, it's
useful for the QtQuick.Dialogs module to have access to this mapping
to interpret individual button presses and emit the role-specific
signals such as yes(), apply(), help(), etc.

Change-Id: I7be753080794adabb784df9b95ac04aa1c29151c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-07 18:40:33 +01:00
Eskil Abrahamsen Blomfeldt
42670c7c45 Android: Allow modules to specify permissions/features
Some modules, such as Qt Multimedia, needs special permissions
to avoid getting exceptions at run-time. We should apply these
by default to the AndroidManifest.xml so that an application
using e.g. the camera will work out of the box.

Task-number: QTBUG-33953
Change-Id: Ibc1f086d249197b63e7ed1075ae7d54bdd1212f2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-11-07 16:37:37 +01:00
BogDan Vatra
b953e2f53f add/remove window only when the window is shown/hidden
Task-number: QTBUG-34469

Change-Id: Id77cf738f96bb94582833f6734a2a491b01e1666
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-07 14:56:32 +01:00
Friedemann Kleint
6ff08b7db3 Windows: Do not set transient parent on popups.
Analoguous to Window creation code.

Task-number: QTBUG-34503

Change-Id: I3cf7d58999bff5b106ca9d2e2c6f550e35f9db9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-07 12:57:58 +01:00
Friedemann Kleint
f48bc3ef40 Add a warning message when a WM_DESTROY not triggered by Qt is received.
Task-number: QTBUG-34503

Change-Id: I7a1e06b34deaf8e595f4986114701480bdcf219c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-07 12:57:58 +01:00
Kai Koehne
79b975756a Revert "Add tracing to logging framework"
The tracing API still misses some real-world exposure. Let's
re-do this in dev to have more time.

This reverts parts of following commits:

466e0dff4b
7a47aebe9e
a652bab6a7
8f0654ceb8
4162522edd
32f27b4367
9ff81bdc1a

Change-Id: If97340c37b8b3363f597683336a8390d5ff386f1
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-11-07 11:29:30 +01:00
Martin Smith
0491a7a298 qdoc: Don't include internal QML types
QML types marked \internal were appearing in the
"All QML Types" list. These links were dead because
the pages for these internal types were not being
created, which was correct. Now these internal QML
types no longer appear in the list.

Task-number: QTBUG-34506
Change-Id: I1d005459e84ed9a2afae94b797b9d39aa3e517f3
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-07 10:00:19 +01:00
Topi Reinio
170da92d02 qdoc: Fix output file name generation for examples
When generating output file names for examples, qdoc prepends
a module-specific prefix. Unless already defined, it defaults
to the project name defined in .qdocconf file. This leads to
wrong prefix being used in some cases - specifically, on pages
in qtdoc module listing examples in other modules.

This change takes the modulename prefix from the node, and
only uses the project name as a fallback.

Task-number: QTBUG-34581
Change-Id: Ia0a940cbc05ed819ff36c328cf9c1e30e2c65b5e
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-07 10:00:19 +01:00
Bernd Weimer
a94f61063a QNX: Fixed "normalPosition" of touch events
Pixel positions have to be set in relation to screen size in pixels,
not the physical size to calculate the normal position in the
range 0..1.

Change-Id: I6880fb64b7c3049d657fd081b564b945399b5865
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-11-07 10:00:19 +01:00
Tor Arne Vestbø
96d74313fe Add missing Q_INIT_RESOURCE
The library needs to do Q_INIT_RESOURCE for all resources it uses
internally, otherwise static linking will fail, and the user has
no idea how to rectify it as the name of the missing resource is
not known. The Q_INIT_RESOURCE needs to happen outside of any
namespace, hence the use of static initResources() functions.

Change-Id: I8f7d36b440b05809d97dd489cf8789f345633cec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-07 10:00:19 +01:00
Paul Olav Tvete
aa9ca5749f Android: allow installing apps to SD card by default
Task-number: QTBUG-34423

Change-Id: I3b2c8a12b113a35f8b8454191d8ba8832d9fd995
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-07 08:31:57 +01:00
Marc Mutz
ecfbb4e441 tst_QFlags: make constExpr() check compile on clang trunk
The problem is the verifyConstExpr<>() line involving the ~ operator.

The result as an integer is a value that can no longer be represented
in an int. This is known at compile time and thus template deduction,
which only has an int to match against, fails.

To fix, use an unsigned int as the first template argument of
verifyConstExpr<>().

Clang's error message for this is really sub-optimal, cf.
   http://llvm.org/bugs/show_bug.cgi?id=17834

Change-Id: I3a77dc54d2bee12b016d75724ac1bd7801f4cf2d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-11-07 03:06:29 +01:00
Marc Mutz
6aff0c4e48 QUrlTwoFlag: add two missing constexpr
The other member functions that can be constexpr already are, only these
were missing.

Change-Id: I717c74b210b45cfb8af9168d61e27e3ff2f6a9c9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-07 03:06:16 +01:00
Marc Mutz
1248b1cbe2 Q(UrlTwo)Flags: avoid undefined behavior
Loading an enum with a value that isn't in the enum is undefined,
according to Clang's usan.

So when doing logical operations on QFlags<E>, don't go through
the QFlags(E) constructor, but via QFlags(QFlag) (=int) instead.

Apply the same change to QUrlTwoFlags.

Change-Id: I5f27e22c4d831482fcbba88b97cb124fb005e3fd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-07 03:06:06 +01:00
Richard Moe Gustavsen
6272a816d1 iOS: set active window upon calls to requestActiveWindow
We did not do this from before. Instead we would activate
the window when it's view became first responder. And this
would happen when the input panel was told to open.
That behavior is a fragile, since other layers higher
up (qml) would not open the input panel unless the window
was active, which also makes sense. A classic chicken and
egg problem.

So to play more along with how Qt is expected to work, we
change behavior to instead activate the window directly
when requested to do so (which also includes when the user
touches the window directly). This will also work better
for "keyboard" events like Key_VolumeUp, once implemented.

The down side is that Qt will give focus to widgets/items
(and as such, open the keyboard) whenever you touch the
window. But that is easier to fix, and will be dealt with
in later patches.

Change-Id: I9bbeb0205e7ea3c5079100c07e40ddb1c60b476b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-06 20:50:09 +01:00
Sze Howe Koh
1d54a502dd Doc: Fix cross-module links
- Remove Active Qt -- it's not really plugin-related
- Add QDoc dependencies
- NOTE: Can't add Qt QML because QDoc would get confused between the
  C++ and QML "Qt" namespaces.

Change-Id: I15a76dbd5235f13598a3802a815f7f49b80eac8a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-06 17:47:25 +01:00
Paul Olav Tvete
d8f7a2ddf4 EglFS: make sure resize events are delivered
Make sure that resize events are delivered when the platform
plugin overrides the geometry set in setGeometry().

This fixes a race condition where a widget was resized to its
sizeHint() while the window was maximized, and the content was
shown scaled on the screen.

The problem is that the widget gets the wrong size from
QWidget::setWindowState() (which calls adjustSize() in order to support
normalGeometry). This size is used to resize the backingStore. When the
QWindow is resized, it calls QEglFSWindow::setGeometry() which corrects the
size to screen()->availableGeometry(), and triggers a GeometryChangeEvent
since the size was corrected.

This ends up in QGuiApplicationPrivate::processGeometryChangeEvent() which
will not send a resize event, since the size has not changed (it is always
availableGeometry()). Therefore the widget is never resized, and the
backingStore remains the wrong size.

Task-number: QTBUG-34421
Change-Id: Iee49c53cc529de36010db2695d838d8c2284edd4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-06 17:47:25 +01:00
BogDan Vatra
bc302359ca Android: Fix registerClipboardManager semaphore initialization
Task-number: QTBUG-34582

Change-Id: Idc6c821f768f90adf13af2070affe2ccf89a1450
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-06 17:47:25 +01:00
BogDan Vatra
2dd6c23395 Android: Catch any startActivity exceptions
Task-number: QTBUG-34600

Change-Id: I7147f0e6b7788df9e706e70758300d4d786032fc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-06 17:47:25 +01:00
Stephen Kelly
8ef5e700b8 QMetaType: Fix conversion between module types.
Change-Id: I7215b4599c3f0459139b32b6571f0a9e60182ee9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-11-06 16:15:15 +01:00
BogDan Vatra
417cf3fc53 Android: Fix menu on API-11+
On API-11+ if there is no hardware menu button show the action bar.
Fix menu when using the opengl android plugin.

Task-number: QTBUG-32002

Change-Id: I45bd49107621e4cab85eb6411897229e20bb8281
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-06 16:09:30 +01:00
Tor Arne Vestbø
04ad4d7de5 iOS: Remove unused QIOSWindow methods for getting effective width/height
Change-Id: Ifdfd5881822bf56f2c8ab0742a0e257e2bd61533
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-06 14:21:56 +01:00
Tor Arne Vestbø
8f77f9536f Clarify Q_INIT_RESOURCE in relation to namespaces
The constructor functions generated by rcc are put in the global namespace.
As there is no way to forward-declare a function in the global namespace
from within another namespace, Q_INIT_RESOURCE must always be called from
the global namespace.

Change-Id: I8b8b9451271cf2f9147164696a6df7615678ab03
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-06 14:21:56 +01:00
Morten Johan Sørvig
762c3d87de Don't hardcode devicePixelRatio to 1.
This code path can and will be hit during app startup,
and can result in low-resolution images being used
on high-dpi systems.

Use qApp->devicePixelRatio() instead, which is more
likely to be correct.

Change-Id: Ic881cfedd8e962037d2d4af4a1242f590d56c194
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-11-06 14:21:56 +01:00
Leena Miettinen
542e266f88 Doc: update Qt Creator external pages
Removed links to obsolete pages (some pages were combined and
some were removed), added links to new pages, and changed a title.

Change-Id: Iaf0e3adf2edaf048a8bb7e26b3cfd45c4680de2d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-06 14:21:56 +01:00
Gunnar Sletta
a805aa384d Revert "Use Qt's own glyph cache with the freetype engine."
This reverts commit 8c58640fdf.

The intent was to reduce the maintenance of parallel code paths,
but this had a negative impact on performance so we need to
enable it again.

Change-Id: Ic58f7781ff076055e7c48f20fc0e7a8a2c9e51a4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-06 11:31:44 +01:00
BogDan Vatra
efb04c8d7d Android: prevent main activity to be recreated.
Add more config changes needed for API 13+
API 13+ is mandatory to build any Qt for Android application.

Change-Id: I595f7174dd2fc8a0865772f9780ce606e1f1fcf1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-06 11:31:39 +01:00
Jerome Pasion
5c389cecd0 Doc: Updated url variable in qdocconf files.
In 5.2, the HTML output is in a flatter structure and when they are
hosted in qt-project.org/doc, the documentation will be found at
http://qt-project.org/doc/qt-$QT_VER

The url variable is used by projects outside of Qt 5 which need
to link to Qt 5 documentation, such as Qt Creator.

Task-number: QTBUG-34584
Change-Id: Ifa55fcd9e402b0e184a41e316340e46aeb7101de
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-11-06 11:31:39 +01:00
Eskil Abrahamsen Blomfeldt
f0841085e7 Add note about fullscreen on Android to changes-5.2.0
Task-number: QTBUG-33135
Change-Id: I49c74fee0da738768a20735c4aac904f40322298
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-11-06 11:31:39 +01:00
Gunnar Sletta
f78661b03c Make OpenGL texture glyph cache use the right freetype glyphs
The freetype font engine would fall back to rasterizing glyphs
via QPainterPath in QFontEngine::alphaMapForGlyph() which has
a rather unfortunate implementation.

Change-Id: Ic0b4095b6f17ab33f0602139f0a8fb441dfba0ee
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-06 11:31:39 +01:00
Marc Mutz
6d45bf683e QGlobal: static_assert that sizeof(int) == 4 and UCHAR_MAX == 255
According to Thiago, Qt assumes this in a lot of places,
so make it explicit.

Change-Id: I3f4a55699379fd9fe4d792061c80b3b589c10c53
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-06 09:35:01 +01:00
Kai Koehne
6381c807e5 Force length fo licensee literals to be computed at runtime
Prevent compilers from computing strlen() at compile time by
passing a volatile pointer.

Task-number: QTBUG-34261
Change-Id: I5e5e80181024d57496907918d2a43d7c83841082
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-06 08:55:45 +01:00
Thiago Macieira
6adfca1acb Doc: Add a little more information about current dirs
Task-number: QTBUG-34300
Change-Id: Ib71d6ace77b525942ca40645299cdfd87b753d70
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-06 08:35:29 +01:00
Frederik Gladhorn
49a3c87175 Remove two unused functions from QAccessibleTabBar
Change-Id: Ib3296a11b1bb9656f2b0c14106ea09f529311ccf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-06 08:34:34 +01:00
Marc Mutz
569dec8e78 QIntegerForSize: add test
Make sure that the size of QIntegerForSize<N>::{Signed,Unsigned} is
actually N.

Change-Id: I221304f7c420e80758ef7b115bafb7cf1f8c8829
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-06 00:35:43 +01:00
Gunnar Sletta
e7fd798af0 Disable threaded rendering for Intel HD 3000 cards.
Task-number: QTBUG-34492
Change-Id: I1848cde3fb9517679fd54a7170ed5bee40880edc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-06 00:35:43 +01:00
Andy Shaw
0cdf2a8023 Revert "Ensure CSS rules are inherited from the parent tags"
Since the original change caused a problem with the CSS
rules being always inherited where in some cases this should
not be happening.

This reverts commit 6f65466137.

Change-Id: I6e9cf163d752b1869b5e967a7ab59963d655ba87
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-05 23:04:16 +01:00
Pekka Vuorela
0c9a5698a1 Add missing \since 5.1 for QVector::takeFirst() and ::takeLast()
Change-Id: Ic2d7e82187a17e21c2ed0e81318294730c3a0930
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-11-05 22:24:05 +01:00
David Faure
44d48862c0 QStandardPaths: add GenericConfigLocation
This is what ConfigLocation was meant to be. A directory shared by all
applications. Unfortunately when I wrote the fallback on Windows,
I picked DataLocation (which is app-specific) instead of
GenericDataLocation (which is shared between apps). This makes it
impossible to have config files shared between apps, e.g. for libraries.
It also makes ConfigLocation quite inconsistent (on Windows one cannot
use it to load another app's config file, while it works everywhere else).

All this is fixed by GenericConfigLocation, which is shared between apps.

Change-Id: I23a755131061d4fea01e13dd1038fbd8ef333a5d
Reviewed-by: Alex Richardson <arichardson.kde@googlemail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-05 19:08:08 +01:00
David Faure
ec12d641fa tst_qurl: add test for matches() with empty vs null case
Change-Id: I0f31eed9af0a7f1aed9ce5118b49ddbbff4f5f39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-05 19:08:08 +01:00