Commit Graph

16369 Commits

Author SHA1 Message Date
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
Frederik Gladhorn
2c11a492fb Add better version checks for accessibility
We would spam the debug output on devices with api < 16 with some
warnings that the super class a11y delegate could not be found and
others.
Instead check the runtime version before trying to load the JNI code and
only load the delegate if api is new enough.

Change-Id: I52286cb99924b034b9b58c53566f15030939b0c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-05 19:08:08 +01:00
Jan Arne Petersen
54ed14d5c6 Support native event filters for screen events
Change-Id: If0af4544191c513e64f582cece4a453c1ab5c8e7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-11-05 19:08:08 +01:00
Morten Johan Sørvig
fc26b053df Declare Cocoa conversion funcs in objc-mode only.
In practice, there are several ways to forward-declare
objective-c classes. Qt uses "struct objc_object",
other projects may use a plain "class". Mismatched
forward declarations will lead to compile errors,
and this is a form of header pollution.

dd5e40d9 added a workaround where Q_FORWARD_DECLARE_OBJC_CLASS
can be predefined in order to sync up the declarations.

Make forward declaration clashes less likely by
forward-declaring in objc-mode only.

Change-Id: I9f7a399d64dc88bfe05d5385b3d46b5302112aef
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-05 17:37:05 +01:00
Gabriel de Dietrich
2eb1e28a90 Cocoa (OpenGL): If no view is attached, makeCurrent() should return false
Change-Id: Ie2869fae1549c3b0a8ef78702410e6ca0c980737
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-05 17:37:05 +01:00
Gabriel de Dietrich
a199a87ad5 Cocoa: Don't hide views when reparenting
Commit a2bdda8e3b was meant for creation only. We should not
hide views on our own, particularly when Qt had not asked for that.

Task-number: QTBUG-33581
Change-Id: Ib35fc78a27be1498f80aabd385e7a2185475b949
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-05 17:37:05 +01:00
Alex Merry
f2720a806e Improve documentation of QImageIOPlugin
Expanded the documentation to describe what the code in QImageReader and
QImageWriter actually expects from these plugins.

Change-Id: I04bb0cbf56d57a56ed246e723e533d73440a4d3a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-11-05 17:37:05 +01:00
J-P Nurmi
71ce869825 Fix placeholder text in QTextBrowser
Task-number: QTBUG-34051
Change-Id: Ief55cda861ef293a5fdeb2e5fa287b835c729894
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-05 17:37:05 +01:00
Olivier Goffart
94ad841ab5 Test that QMetaObject::invokeMethod is exception safe
Change-Id: Ie4662b7e475dc3d1ce9f36e8219361d9507622b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-11-05 17:37:05 +01:00
Olivier Goffart
73efc9a2cd Test exceptions in signals and slots
Only DirectConnection is tested

Change-Id: I525c6a65428489c34e58d1d9600b4e5ebda733b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-05 17:37:05 +01:00
Mitch Curtis
46a8885ae4 Disallow deep or widely nested entity references.
Nested references with a depth of 2 or greater will fail. References
that partially expand to greater than 1024 characters will also fail.

Change-Id: Id4e49d6f7cf51e3a247efdb4c6c7c9bd9b223f6e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-05 15:55:17 +01:00
Tor Arne Vestbø
55c14e35f1 Resolve Qt module deps before determining if QML import scanner is needed
The qtAddModules functions resolves deps internally, but doesn't affect
the original QT and QT_PRIVATE variables. We need to pick up situations
such as the user adding QT += quick, which implies QT += qml through
the QtQuick module's dependecies.

Change-Id: I14411dbea3e4f7402be404073a3fe8f18dbb165f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-05 15:52:02 +01:00
Maurice Kalinowski
1de459a6dd use apartment threading for CoInitializeEx
otherwise we are risking a lock by freeing resources from other
threads when calling CoUnitialized()

Change-Id: I1fe09d7d3b1674a00b44ababfc90da79580278b3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-05 15:51:09 +01:00
Tor Arne Vestbø
1b58d9acc4 Remove Q_INIT_RESOURCE_EXTERN
It's not providing any convenience over using Q_INIT_RESOURCE, which does
its own extern, were never documented, and was added back in 2010 without
any commit message justifying its existence.

Change-Id: I1ca9a042d3f4fca34007d28b140661c50064f11b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-05 15:41:54 +01:00
Martin Smith
2bb6fbbd0f qdoc: Eliminate qobject_cast() collision
Two template functions for qboject_cast() are defined
in qwidget.h that confuse qdoc because qdoc doesn't
handle template functions correctly. In this case, the
documentation for all qobject_cast() functions appears
in qobject.cpp where it is declared to be related to
QObject. This fix surrounds the template functions in
qwidget.h with #ifndef Q_QDOC ... #endif, since qdoc doesn't
need to see them.

This fix unmasks a linking bug QTBUG-34564, which will
be fixed separately.

Task-number: QTBUG-34505
Change-Id: I97fd32cc563bfa4a232819c097f41be56adf0114
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-05 15:40:14 +01:00
Friedemann Kleint
d1870d9036 Clean up QWindowsSessionManager.
Fix spelling error in method name and inline simple functions.

Change-Id: I7f2a67fb1951b58874b09002ee57e15e75561727
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-11-05 15:40:14 +01:00
Maciej Kujalowicz
450d3efcb1 iOS: Enable threaded OpenGL.
This change activates ThreadedOpenGL and ThreadedPixmaps capabilities
in the iOS integration. QIOSContext is expanded with a support for
a shared context.

Change-Id: I56615c870a24e17850ad2748421c54e015de3ab2
Reviewed-by: Ian Dean <ian@mediator-software.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-05 15:40:14 +01:00
Tor Arne Vestbø
aa6a0cdbf5 Clarify use of Q_INIT_RESOURCE
The Q_INIT_RESOURCE macro is needed if a library itself uses resources, in
which case the Q_INIT_RESOURCE can and should happen in the library (like
we do for eg. widget styles), or if a library exposes resources that are
supposed to be used by the library clients, in which case the macro needs
to be put in the application code.

The distinction between the two, and the fact that resources built as part
of the main executable do not need the explicit initialization, were not
all that clear.

This was evident by the lack of Q_INIT_RESOURCE in our own Qt libraries,
and the various Q_INIT_RESOURCE calls in our examples where they are not
needed.

Change-Id: I40258458e9fdf9ee5502c212971fb3d90b4fc388
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-05 15:40:14 +01:00
Jan Arne Petersen
6802f34bed Process screen events in the main thread
Screen events are still read in the screen event thread but are
processed in the main thread to make it possible to support
QAbstractNativeEventFilter for screen events later.

Implementation is similar to the xcb platform plugin.

Change-Id: I7bade3e13e51c6d70bb608727a93bbd3aabc5d47
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-11-05 11:27:10 +01:00
David Faure
3604280b41 QStandardPaths: Add GenericConfigLocation to the documentation
The actual feature comes from a merge from the stable branch.

Change-Id: Id067fb2b26cb3c6b78c7705b77bd741e3bd8f090
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-05 09:45:27 +01:00
Friedemann Kleint
161e8653c3 Disable clear button in read-only QLineEdit.
Task-number: QTBUG-34315
Change-Id: I6c318879aee907c080e871a541da4ba5eadd71ed
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-05 09:16:47 +01:00
Friedemann Kleint
142c5ef9dd QLineEdit: Fix potential crash when removing the clear button.
Remove it from the side actions list.

Task-number: QTBUG-34315
Change-Id: I70063351193b504f8656e903896d155ac74f73a6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-05 09:16:41 +01:00
Bernd Weimer
e9c51a1fdc BlackBerry: Prevent superfluous removal of socket notifiers
File descriptors have always been removed from bps before adding them,
which lead to an annoying warning.
"QEventDispatcherUNIX::registerSocketNotifier()" needs to be called
after "ioEvents()" to prevent this.

Task-number: QTBUG-34536
Change-Id: If074ff7a6638fe234abc100c81d094e182de7537
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-11-05 09:13:09 +01:00
Stephen Kelly
215e525a5c Make error messages a bit better.
Change-Id: I83b5852abfbb3437c03516bc4b36eff385ddb983
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-05 09:07:53 +01:00
Maurice Kalinowski
2ff0746e97 Refactor plugin loading for WinRT
Specify the root directory to be the package root. Only plugins
inside the root can be opened (actually also only files). Furthermore
current defaults to the package root now, which in most cases is
identical to previous behavior.

When attempting to load a plugin the path can either be specified in
host format "C:/..." or as plugin absolute "/platforms/...". Check for
both, with preference of latter case, like when qt.conf is used with
/ being used as plugin path.

Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-11-05 08:17:35 +01:00
Thiago Macieira
82fe2c6c1b Add qcollator_p.h to the list of headers.
Change-Id: I91963843e10fe0c33e5f13c06562dc5f9fdc2b6d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-11-05 06:16:08 +01:00
Sze Howe Koh
16198d963d Doc: Fix broken links
Task-number: QTBUG-33360

Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-11-05 00:29:01 +01:00
Sze Howe Koh
6b8e866391 Doc: Clean up threading examples
- Example 3 (Clock) is a collection of anti-patterns.
    - It implements a slot in a QThread subclass and then forces the new
      thread to use Qt::DirectConnection to invoke the slot in the
      "wrong" thread.
    - It talks about getting away with non-thread-safe usage
    - It uses a thread as a timer and then admits that it's an over-
      complicated approach.
- Example 4 (Permanent Thread) is over-complicated yet incomplete. A
  better one exists in the QThread class ref.
- Example 1 (Thread Pool) is covered by the QThreadPool class ref.
- Example 2 (QtConcurrent::run()) is covered in the "Threading and
  Concurrent Programming Examples" page and the "QtConcurrentRun" page.
- The undocumented "Hello Thread" example is covered in the QThread
  class ref.
- These examples cannot be accessed from Qt Creator's Examples tool.
- These examples are neither widget-related nor tutorials, contrary to
  their source paths.

Task-number: QTBUG-33360
Change-Id: Ic79cb764ee925ddbcbeafee8e1d01db7fe0f6cfe
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-05 00:29:01 +01:00
Allan Sandfeld Jensen
a8351096db Fix ARGB image glyphs on Open GL ES2 or big endian
Change Ie891665ad66e31692b69db02d34be8d303a7d631 accidentially removed
the condition that would ensure ARGB glyphs would get swizzled on OpenGL
ES2.

This patch readds a condition to check that, and also fixes the same on
big endian hosts by reusing the OpenGL ES2 code path.

Change-Id: I55615c498261a43c50e5a6902a7e2e24cddc4f4b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-04 22:46:13 +01:00
Allan Sandfeld Jensen
03aea653e2 Remove now redundant argb to rgba function
Change-Id: I293d71e12398aef91995b68a9ea22cac984917b0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-04 22:46:13 +01:00
Marc Mutz
770ab026a8 Revert "QTest: use nth_element to calculate the median"
This reverts commit 48586b2bac.

This causes problems in QtCreator without anyone being able to say why.

Task-number: QTBUG-34397
Change-Id: I9ea5457724d5af8d87e0bc40e6615748daf9c04c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-04 22:46:13 +01:00
Marc Mutz
0884802bb5 Revert "QtConcurrent::Median: add some qMove()"
This reverts commit 12bd604f24.

This causes problems in QtCreator without anyone being able to say why.

Task-number: QTBUG-34397
Change-Id: I7733c3db7d35bba2734e128476aabcb0152a91e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-04 22:46:13 +01:00
Allan Sandfeld Jensen
1d07c72431 Fix major performance regression in QGLWidget on texture bind
Since Qt 5.1 we have not recognized the GL_EXT_bgra extension on desktop
OpenGL, or the GL_EXT_texture_format_BGRA8888 extension on OpenGL ES.

This patch matches the GL_EXT_bgra extension on both OpenGL and OpenGL ES
and adds discovery of GL_EXT_texture_format_BGRA8888 under OpenGL ES.

The old name for GL_EXT_texture_format_BGRA8888, GL_IMG_texture_format_BGRA8888
is also recognized.

Change-Id: I2035bfe045aee14e86a1f407f5b8556454f8bb90
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-04 20:29:07 +01:00
Marcel Krems
c87b27f308 Silence compiler warning
warning: logical not is only applied to the left hand side of this
 comparison [-Wlogical-not-parentheses]

Change-Id: I15e283023918cd4ebc27e91812eadf95ba156d71
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2013-11-04 19:53:08 +01:00