Commit Graph

15305 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
0ec406695e Remove qSort usage from QSettings
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I5aabfd2dd4fa48a4d94407ca444591e9df7b981d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 16:21:10 +02:00
Giuseppe D'Angelo
f30f58edc3 Remove qSort usages from QStringList
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I38d220142d4f5e580503cc10f804e0d16f418cc1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 16:21:10 +02:00
Konstantin Ritt
daf0997844 Fix build on MinGW
Issue introduced in 87ff0af425 .

Change-Id: Ifa9a7bd5af63b1462b4c2cf5e0715962bbcd74b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-09 16:21:10 +02:00
Allan Sandfeld Jensen
2ad331465c QRawFont::fromFont does not get antialias setting from fontconfig
When creating a fontengine in QFontconfigDatabase::fontEngine we
solely base the antialias setting on the QFont StyleStrategy and forget
to ask fontconfig it has an overriding definition for this font match.

This patch will now let fontconfig decide the antialias setting unless the
NoAntialias stylestrategy has been set.

Change-Id: I67981582a37cfd3c59aa1db929095585af554088
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2013-09-09 15:30:08 +02:00
Yoann Lopes
295977e77f Removed unused distance field functions.
They are not needed anymore since 5971e091 and 184e27c0 have been
integrated.

Change-Id: Id611f1432a010f3c2af86951e1c79cb8fc73f9e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-09 15:27:25 +02:00
Friedemann Kleint
560de9725d Windows: Add command line parameter enabling OS-synthesized mouse events from touch.
Applications launched with -platform windows:mousefromtouch will
receive OS-synthesized mouse events.

Task-number: QTBUG-31386
Change-Id: I1c49486589c4a7fa4fb5525f7a5adca09b1cfb89
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 14:49:33 +02:00
Friedemann Kleint
c03d0a9846 Windows: Use QSharedPointer for the dialog helpers.
The dialog thread can outlive the platform dialog helper if
the helper is destroyed. In that case, IFileDialog::Show()
returns since the parent window is destroyed and then tried
to emit signals on the destroyed helper class instance.
Pass a shared pointer to the native dialog instead of a pointer
to the helper class to the dialog.

Task-number: QTBUG-32494
Task-number: QTBUG-30513

Change-Id: I7c2e769460270a26d886fdefee93ea59c2a17196
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 14:49:27 +02:00
Giuseppe D'Angelo
42223a777e Constify QDirSortItemComparator::operator() (used for sorting)
Change-Id: I7149ec2fdabdfcfa7d6f28b1105da154a333096f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-09 14:48:28 +02:00
Andrew Knight
ddbcf78308 Move winId!=0 assertion from QWindow to QWidget
In "very basic platform plugins", the platform window ID can be null,
which conflicts with QWidget's special treatment of 0 as a parented widget.
Such is the case with EGLFS, which can return a null native window handle
for winId on some EGL implementations.

Move the assertion winId!=0 into the widget framework, as this assert is
not relevant for non-widget applications. A large proportion of basic
platform plugin users will see relief from this unnecessary assertion.

Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-09-09 12:48:25 +02:00
Konstantin Ritt
641538b301 QFontEngineFT: Drop modularization leftovers
FontConfig is not used in GUI these days.

Change-Id: I0bf89de912f2df9f6397b5452b642df19829af7f
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2013-09-09 12:21:47 +02:00
Oswald Buddenhagen
6a41fa832e fix finding qmake.exe when called on the command line as ... qmake.exe
Task-number: QTBUG-33333
Change-Id: I026659fc779d1cf2fde46b5bcb4990b151b8c51e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 11:16:33 +02:00
Eskil Abrahamsen Blomfeldt
052d2cd6aa Fix cross-compiling V4 for Android on Windows
The QT_POINTER_SIZE is not detected on Windows. We can safely set
this to 32 bit for Android since we only support 32 bit builds
on Windows.

Task-number: QTBUG-33397
Change-Id: I891cf01444d1ba9216ed2c3ba33ef40c61d50dd9
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-09 10:40:37 +02:00
Konstantin Ritt
65343d4c97 Fix QPainter usage in non-GUI thread warning appearing in debug
The third parameter is `extraCondition`, which is false by default,
and it is used in condition
`if (!extraCondition && QThread::currentThread() != qApp->thread()) {`.
Passing extraCondition=true makes this condition always evaluate to false
and thus hides a respective warning at all.

Change-Id: Ia8ef48f341bd22f58375034d1992da716f78121d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-09 10:40:37 +02:00
Topi Reinio
e5ee6c0094 Doc: Link to external docs in QOpenGLFunctions_* classes
These are wrapper classes that do not document their functions.
This change adds links to docs on opengl.org / khronos.org where
suitable, and changes the \brief commands to mention the correct
OpenGL version/profile.

Change-Id: I48154d5bce26f6753ca4400962939847c78a527d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-09-09 10:40:37 +02:00
Topi Reinio
656fb30720 qdoc: Ignore QT_MUTEX_LOCK_NOEXCEPT macros
QT_MUTEX_LOCK_NOEXCEPT is defined as Q_DECL_NOTHROW
on Linux, the latter being already ignored by qdoc.
This change ignores also the former, clearing
related documentation warnings.

Change-Id: Iaeee7a851b4b6d3c2e3308c1b376406c11271807
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-09 10:40:37 +02:00
Giuseppe D'Angelo
7c270390c4 Remove qCopy from the Windows platform plugin
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I949da7a111d9206b6a0be8114b2c4803c06728b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-09 10:40:37 +02:00
Eskil Abrahamsen Blomfeldt
3f07d12ae2 Android: Fix unused variable/argument warnings
There were a bunch of these in Android specific code.

Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-09 09:02:58 +02:00
Eskil Abrahamsen Blomfeldt
417269a69b Fix unsigned/signed comparison warning in qnativesocketengine_unix
This triggered when building on Android. Make sure we cast the
sizeof() to the same type as the variable we compare to.

Change-Id: I65d4fe7edc2a39f1a4b68e78f4c19bff6e4aa0f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-09 07:27:15 +02:00
Eskil Abrahamsen Blomfeldt
c5dd2fb2c4 Fix unused static function randTLS() warning
Match the preprocessor conditions for using the randTLS() function
in the place where it's defined, otherwise we will get a warning
for this.

Change-Id: I0fa20f2671da618e31f30a4536f55bc680131e4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-09 07:27:06 +02:00
Eskil Abrahamsen Blomfeldt
1a4594c396 Android: Fix QString(char*) warnings in qlogging.cpp
Both context.file and context.function are already char*, so
using qPrintable() here would first convert them to QString()
with the scary constructor and then back again.

Change-Id: I822655c37fb8b9baaddc8f95d7c1842519859a0e
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-09-09 07:26:48 +02:00
Konstantin Ritt
e15fbd5e8c Fix QtOpenGL module build with -Werror
Build failed with error
"array subscript is above array bounds [-Werror=array-bounds]"
because GCC optimizes three inline calls and sees A[4][4] != A[16].
According to Thiago this may lead to an undefined behavior after all.

Change-Id: I31ec01377d856890f6072369b3acd1f37e4118ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-09 04:03:57 +02:00
Friedemann Kleint
115da758b9 Replace XCB native interface resource map by a lookup function.
Remove global variable and duplicated lookup in the old code
(map.contains() followed by map.value()).

Change-Id: Id68c34bf38c6706db69dcb8422c3b1ea718aa064
Y# issue or contains a behavior change that is relevant to others,
Reviewed-by: David Faure <david.faure@kdab.com>
2013-09-08 21:16:03 +02:00
Mathias Hasselmann
50e2db6a75 Add first/last accessors to QMap
QMap explicitly sorts its entries by key value. For an ordered container
it's (often?) useful to access the first or last entry, for instance to
quickly compute the next key of the mapping. The first entry is easily
accessible by the STL begin() method, but for accessing the last entry
pretty ugly iterator arithmetics must be applied: *(end() - 1). With
their first() and last() accessors the container classes QList and
QVector provide a much nicer method of accessing extrema, so for
consistency this syntactical sugar also should be applied to QMap.

Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-09-08 16:13:16 +02:00
Sze Howe Koh
77056f91cd Doc: Fix copy+paste errors for QAbstractItemModel
Change-Id: Ia462544cc86870d9870ae1be3b4f9135c9efe45c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-08 15:29:15 +02:00
Konstantin Ritt
69e21f1a86 Add FreeType2 "no/qt/system" configure option with description
Change-Id: I9510a492efadc0262e689de8fb2ac1750bf253ff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 10:29:08 +02:00
Konstantin Ritt
1ae448acbd Rename CFG_LIBFREETYPE to CFG_FREETYPE for consistency
Change-Id: Id1c240a849792e6196162662429a72ce2e293ba3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 10:29:04 +02:00
Konstantin Ritt
3493b8058a Add FontConfig "yes/no" configure option descriptions
Change-Id: I30514905d2c5bb3ca4ab176d02f3094badedd0a3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 10:29:00 +02:00
Konstantin Ritt
c72eb0372b Add HarfBuzz-NG support
Some features are of limited usefulness for now (same as with HB-old):
* mixed scripts cases aren't handled correctly due to an outdated
  script and bidi itemization implementation;
* language-by-script detection: the only fallback to locale's LANG is used

Some features are missing entirely (in compare to HB-old):
* justification points support: not implemented in HarfBuzz-NG

Task-number: QTBUG-18980
Task-number: QTBUG-14590
Task-number: QTBUG-16128

Change-Id: Ic98a10054be5fac55224ef31c7261168c0bf8739
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 07:48:40 +02:00
Konstantin Ritt
19b7afca52 Add HarfBuzz-to-Qt bridging code
Change-Id: I2f61566fe69d18b80d5831238beb27b34b7be1c8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 04:21:56 +02:00
Konstantin Ritt
9ff76c27b9 QTextEngine::shapeText(): Better error handling for corner cases
Use Q_UNREACHABLE() instead of silly return to catch shaping errors,
which are fatal ones in fact, since the application would assert/crash
some later due to a hard dependency on the shaping result.

Change-Id: Ie58a2f2686a795f6178a588de6f2a2e37e1ed13c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 04:21:51 +02:00
Konstantin Ritt
7b8f33fb78 QTextEngine::shapeTextWithHarfbuzz() code simplification
Move (sub-)item boundaries calculation (aka fallback font items)
outside to be shared with HarfBuzz-NG based shaping a bit later.

This implementation might silently break words or even graphemes
so it needs to be reworked anyways; keeping it in a single place
would make futher work some cheaper.

Change-Id: Id9ca82b40e90b07ca29363fd43247c5fa9897eff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-08 04:21:47 +02:00
Sérgio Martins
149f3efc39 Be pedantic with Window's icon indexes.
Documentation for SHFILEINFO says iIcon is an index, so lets
initialize defaultFolderIIcon with -1 so it doesn't clash
with some icon that might exist at index 0.

Change-Id: Ic16538ee62e5433f3cdcceee19eb5d8d18d55c1e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-08 00:16:13 +02:00
Olivier Goffart
4e6b696c08 Change template parameter name of qt_check_for_QOBJECT_macro
'T' is a fairly common name for template parameter. So if we use it in
Q_OBJECT, it means you cannot use it as a template parameter name of the
object itself (otherwise it does not compile as it shadow a template
parameter)

Use a more explicit name instead

Change-Id: Id317c5b11d87f370eed6d1dc0b0142c9eb4994db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-07 16:28:44 +02:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Thiago Macieira
5dd2713c8b Fix constant false comparison of out-of-range enums
QGraphicsItem::GraphicsItemFlag is unsigned, so a comparison to -1
is always false.

qgraphicsitem.cpp:847:39: error: comparison of constant -1 with expression of type 'QGraphicsItem::GraphicsItemFlag' is always false [-Werror,-Wtautological-constant-out-of-range-compare]

Change-Id: I3fc59b777d09060dd34e81f51ed8bdf41354a0f1
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-07 08:27:50 +02:00
Giuseppe D'Angelo
23d7f6ee5d Reimplement qBinaryFind in terms of std::lower_bound
qBinaryFind is not going to be deprecated now. This commits prepares
the deprecation of the qLowerBound function.

Change-Id: I6131582c981c151d632ad44305fe602c76735e14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-07 00:31:20 +02:00
Marcel Krems
730bc064a0 Forward QGraphicsView::mouseDoubleClickEvent
Do the same as in mousePressEvent.
Otherwise it is not possible to handle the event
in one of the graphics views parents.

Task-number: QTBUG-8061
Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-06 23:21:18 +02:00
Thiago Macieira
ba43b70132 Compile in strict-iterator mode under MSVC
MSVC doesn't like operator->() returning a pointer to
non-aggregate. So we must make sure that the expanded code does not
try to call it by doing:
  abegin->~T();

Instead, we make an implicit call to operator T*() with that
static_cast<T* >. If abegin is a non-strict iterator, it's already
a T*, so the static_cast is a no-op.

qvector.h(645) : error C2839: invalid return type 'int *' for overloaded 'operator ->'

Change-Id: I06f983bab7677cb60ef3913cdce349e26896bfb6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 19:58:51 +02:00
Stephen Kelly
018c4850c9 Fix usr-move workaround in the presence of multi-arch.
The cmake directory may not be $PREFIX/lib/cmake, but
instead $PREFIX/lib/<arch>/cmake. Getting the PATH of such a
directory will not lead us to $PREFIX/, but to $PREFIX/lib.

Use a relative calculation instead.

Task-number: QTBUG-33223

Change-Id: Ice4e0f859ab1df238bad4eb942f073e84dd86cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-06 19:47:22 +02:00
John Layt
94a7576658 QDateTime - Change debug output to ISO Format
Change the debug format from Qt::TextDate to a more detailed ISO style
format including better time spec output.

[ChangeLog][QtCore][QDateTime] The debug datastream is now an ISO-like
format instead of Qt::TextDate

Change-Id: Iddbb8199c3bfbf7bca845482617e7a85da43259d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 18:08:56 +02:00
Stephen Kelly
0771075f66 Move the preprocessor iterator for Qt smart pointers with the others.
Use it to forward declare the types.

Change-Id: I48d9e32dcf02471d197a82502d96d60807d11d57
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 16:18:41 +02:00
Stephen Kelly
15a17323ed Make the automatic 1arg and 2arg metatype macros work with namespaced Qt.
Change-Id: I64aa3cacd0cf57235ad43f089716765b384ef412
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 16:18:37 +02:00
Stephen Kelly
2ff15ff065 Fix the automatic declaration of smart pointer types.
Before this patch,

 qRegisterMetaType<QSharedPointer<double> >("QSharedPointer<double>")

without a metatype declaration fails to compile, whereas it works
with Qt 5.1 (ie, before commit e9a69c3ba9)

Change-Id: I9408f711c9df810ff29b879b7696dab81c1160f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-06 16:18:32 +02:00
Friedemann Kleint
87ff0af425 Windows: Added support for large icons to QFileIconProvider.
Added code using image lists to windows theme.

Initial-patch-by: Max Desyatov <max.desyatov@gmail.com>

Task-number: QTBUG-4970
Change-Id: I6e82f4edec60e456d0b1759bb1771955edb94491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-06 12:50:57 +02:00
Giuseppe D'Angelo
6c88be2af2 Remove qFind usages from the XCB plugin
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ieccef12c617276d0526ce2876fd76e37b4240a43
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 09:12:36 +02:00
Giuseppe D'Angelo
fdbabc4f03 Remove qSort usages from the Cocoa helpers
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I482ce9320c07458a9f76df5823f17d53beec00d8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 09:12:33 +02:00
Thiago Macieira
2dfbf1bf03 Remove unused check_gradient function
Found by ICC 14. I wonder how the other compilers didn't detect it.

qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced

Change-Id: Ie94c04f1734e6d7bab6b540d763bb6e7c16e4cb9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 01:53:51 +02:00
Thiago Macieira
bb419ad87c Fix new change-of-sign warning detected by ICC 14.
qpainter.cpp(1656): error #68: integer conversion resulted in a change of sign
          tmp->changeFlags &= ~(QPaintEngine::DirtyClipPath | QPaintEngine::DirtyClipRegion);

tmp->changeFlags is uint, but QPaintEngine::DirtyFlag is backed by
int. That means the bitwise NOT sets the sign bit, which makes it
negative.

Change-Id: Id8dfc2c7012b519cc5f5799d223cb95a79ccd401
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 01:53:47 +02:00
Thiago Macieira
676ce97c8c Add C++11 features supported by the Intel Compiler 14.0
Change-Id: Ib9789223d487c29c5ce0830afa1f74b66ea6adfe
Reviewed-by: Guillermo A. Amaral <gamaral@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 01:53:42 +02:00
Giuseppe D'Angelo
57b88247b6 Remove qSort usages from QtDBus
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ibd471d5dd7cda878d0fb71202468a7ccfa5d5046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 01:53:31 +02:00