Commit Graph

15027 Commits

Author SHA1 Message Date
Laszlo Agocs
cdc26c9316 Fix malformed assignment in QKmsScreen
Change-Id: Ic78160d27b2c768054feefe6ec3fd4aaf8280c83
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-09-10 16:11:15 +02:00
Jan Arve Saether
09da1f7d1f Add missing interpolator for unsigned int.
Note that there are also some missing interpolators for char, short,
long long etc, but those are most likely less common than unsigned int.

Task-number: QTBUG-33268

Change-Id: I469cc4f38eaa48171307b737b15efea2cd98fe5e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-10 16:11:15 +02:00
darius
f079e9e77f Windows CE : Fix incorrect text rendering on wince with freetype engine
On wince with freetype engine can't render text for non-latin text.
because wince doesn't have truetype font FONTSIGNATURE api. so match
function in qwindowsfontdatabase_ft.cpp was always failed and render
incorrect text.
this patch has 3 changes.
1. extract font unicode signature using GetFontData function
2. append font fallback data from registry
   (see. http://msdn.microsoft.com/en-us/library/ms901076.aspx)
3. wince's default font path is windows. correct fontdir

Task-number: QTBUG-31974
Change-Id: If969df353492141669eeab33119f3506602871b3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-10 14:38:18 +02:00
Stephen Kelly
955052c0d9 Teach CMake about Qt 5 plugins.
Change-Id: Idd3225759f9f5ec620f79e29035eb176f965bef7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-10 14:38:18 +02:00
Nico Vertriest
c9c435179e Doc: split up Qdoc-manual
qdoc-manual.qdoc is now an overview document
Each section is a separate qdoc file
Title modification in minimal qdocconf qdoc file

Task-number: QTBUG-31801

Change-Id: I9e50eb8c4f1f501e9c0bc768372d4393b73053ed
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-10 13:26:59 +02:00
Jędrzej Nowacki
6d1f8575a3 Fix a typo in documentation
Task-number: QTBUG-33408
Change-Id: I84729139ff40ac62b29031eb161761a8205259cc
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-10 13:26:59 +02:00
Konstantin Ritt
9d3866ed32 [1/2] Optimize text drawing for QStyleOptionViewItem in QCommonStyle
Optimize isViewItemCached() a bit by reordering conditions so that
conditions that going to change more often in a common case evaluated first.

Change-Id: Ibb406f964345e8f2bff7b433bf33e09a99dcbdc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-09-10 12:29:23 +02:00
BogDan Vatra
c49c96fbb1 Reinitialize system palette when setting a new style.
Task-number: QTBUG-29565

Change-Id: I5ac95d52c453aec9e2160a135dc1afdd9583eed3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-10 11:52:40 +02:00
BogDan Vatra
d6d119ac6e Fix Android Style plugin.
Task-number: QTBUG-29565

Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-10 11:52:16 +02:00
Mitch Curtis
82e94c7890 Correct type mismatches sentence in signals and slots documentation.
Task-number: QTBUG-15994

Change-Id: I19581ae33313de44bcb6e5eb2c06fc9e507ad101
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-10 11:18:22 +02:00
Topi Reinio
dc64fef6e4 Doc: Reintroduce \beginqdoc and \endqdoc macros
These macros were previously defined for QDoc manual.
This change adds them to global macros.qdocconf so
they can be used everywhere.

Change-Id: I4fdf5a103ecfb356719951a7d0c6fbd35c887744
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-10 11:14:28 +02:00
Konstantin Ritt
b0b786a2f0 Deprecate QFontDatabase::supportsThreadedFontRendering()
As of 5.0, this always return true.

Change-Id: If225c7219e283da97e870f0d66a87b21c3cacfc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-10 09:44:04 +02:00
Gunnar Sletta
8c58640fdf Use Qt's own glyph cache with the freetype engine.
This fixes rendering in the OpenGL paint engine,
simplifies our internal code paths and also produces
nicer text for non-90 rotated glyphs

Change-Id: Ib206065cd486ac29067f9ebf4a0d74189a673f1e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-09-10 08:13:07 +02:00
Konstantin Ritt
106843ad1a Make QFontEngine not derive from QObject
Whilst having the objectName set for each engine is
somewhat handy when debugging, deriving from QObject just for that
is a wasting of memory in all other cases.
This also broke the font engine abstraction by allowing qobject_cast()
to access some private data; the only sane way to distinguish
engines is querying their Type value.

Change-Id: Ib1d195692859eb39089f6d8d9016cb8f9dcc0400
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-10 01:56:20 +02:00
Marcel Krems
8b124a7dde Add detection for C++11 explicit conversion operators.
Change-Id: Ib33049b538f072079c0f840bc10adf0899217199
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-09 23:04:48 +02:00
Martin Klapetek
9deacd7f20 Normalise and deduplicate paths for XDG_DATA_DIRS
This removes the trailing slashes from the path and then removes dirs
set twice in XDG_DATA_DIRS (always removes those from the right side).

There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is
being looked up is not found in the duplicated dir the first time, it
won't be there the second time.

Currently it causes troubles for example in mime types, where it returns
duplicated mime types as the same dir is searched multiple times.

For obtaining the original value of XDG_DATA_DIRS, one can use
qgetenv("XDG_DATA_DIRS").

Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289
Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
2013-09-09 23:04:48 +02:00
Thiago Macieira
ff6754fb8c Allow Clang to compile without libc++
Clang is perfectly able to deal with the libstdc++ headers. The
problem on Mac is that those headers are mightily old (from GCC 4.2),
so they are insufficient for C++11 support.

So make a more accurate test. This allows Clang to enable C++11 in the
presence of newer libstdc++ header (e.g., Clang on Linux or Clang on
FreeBSD).

Change-Id: I4f457ca82bf13feca0af78c9363cb6365bb3f68e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 23:04:48 +02:00
Giuseppe D'Angelo
a23f5697a1 Remove qCopy usages from QList
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ib667321884b2f06de6f440f2b8e329361f926ce1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 23:04:48 +02:00
Stephen Kelly
a1898f4466 Metatype: Remove the need for runtime-registration of 3rd party containers.
Replace that need with a macro so that registration of the
container helper conversions is done at the time of registration
of the container (usually when it is put into a QVariant).

Change-Id: I823fb3fdbce306ebc9f146675ac43724cec678d5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 21:28:41 +02:00
Friedemann Kleint
7fb3906d4e Windows logging: Fix check for console applications.
The old code used to check for usingWinMain, which is not set when
Qt is used within a DLL. Try to check for presence of stderr
by checking for a console window or a redirected stderr-handle.

Task-number: QTBUG-32044
Change-Id: I87893c3438f5e92d73488e9c25b95cbfeaacc1f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 17:51:11 +02:00
John Layt
e5734c2f08 QDateTime - Split QDateTimeParser into a separate file
Not strictly needed yet, but helps to reduce the size of QDateTime and
make it easier to read a major re-write.  Imposes separation of parser
which will be needed if we make QLocale always use the system backends,
after which only QDateTimeEdit widget will need the parser and it can
be moved there.

Change-Id: I6a5e9a3edf6fe8ff2340af6afecd8ba4bfde9dd4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-09 16:21:10 +02:00
Caroline Chao
56bbf3c2d5 QMetaMethod and QDBusMetaObject: Give public access to signal methods
To be consistent with signals which are public since Qt5.

Change-Id: I633077e37d0851b118c22da0681e8b8b1892ddbb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-09 16:21:10 +02:00
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