Commit Graph

13121 Commits

Author SHA1 Message Date
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
Bjoern Breitmeyer
59f1152ec7 added QMAKE_EXTENSION_STATICLIB to wince mkspec
Qmake requires the information which extension is
used for static libs on a platform. As the ci for
windows ce is pretty new, this was not noticed before.

Change-Id: I45b0c9c59980cd352371c00aa59502e5a394e337
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-15 15:32:40 +02:00
Thiago Macieira
0e9b0fc1d4 Move the reporting of xkbcommon's warning closer to the bottom
The warning is more likely to be seen if it's closer to the end of the
output.

Also report whether we found xkbcommon in the main output. Note that
xkbcommon is used by Wayland too, so it's not dependent on QPA or on
the XCB backend.

Change-Id: I143327eea4e17fa06bc7c24c677ae0bd00e65711
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-15 15:32:40 +02:00
Thiago Macieira
7a536e1b7b Re-shuffle the configure output
Keep options sorted and use indentation to group together related
options (QPA backends, image formats and SQL drivers).

Change-Id: I97d330a13a4daa4567ff741dc26e11f458ae7f53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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
Ray Donnelly
6e0f55495d Android: Implement a hack for qmake /dev/null usage on Windows.
Neither /dev/null nor NUL work with Qt on Windows. For now, use
an empty file for the cases where qmake is used with /dev/null.

I filed a bug for this:
https://bugreports.qt-project.org/browse/QTBUG-30562

Change-Id: If5351214ae5a0ebe50ae46b155c327ca0dc59f98
Reviewed-by: Alvaro Burnett <alvaroburnett@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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
Andrew Knight
c4611dc168 Fix incorrect compiler-from-mkspec selection in configure
Semantic error in selection for MSVC 2010.

Change-Id: I9ad97784cdb1a060df41bd1bb4e6c9f43adb387c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-15 13:17:26 +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
Ivan Romanov
f1e74c0741 fix padding periods in configure help text
A gap after option name is needed to select it with double-click.
Also I added padding periods for -testcocoon because it has no them before.

Task-number: QTBUG-30589
Change-Id: Ib5b970f9b17cad43609fbc53dd05a995aaf29b45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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
Samuel Rødal
b64c9a89da Added qtwaylandscanner rules to wayland-scanner.prf
In preparation of change in qtwayland.

Change-Id: I337ea9f48bf692f31e406c47d9256ee0263d33f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@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
Ray Donnelly
7628e6ed1a Android: Handle '<DRIVELETTER>:' in makeabs for Windows usage.
Change-Id: I70de8fe9976a214d143b6174a5d7aebf8e79169b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-12 22:43:19 +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
Tor Arne Vestbø
be08ef6131 iOS: Automatically disable rpath since it's not supported
Change-Id: If4f707f5d32a1a38b9ca11d4f1703e1f20bb3c20
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-12 14:16:42 +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
Tor Arne Vestbø
4731ced45b iOS: Automatically disable pkgconfig, and don't build examples and tests
So that the user doesn't have to pass -no-pkg-config and -nomake, when
we already know that those flags are needed and that the build will break
without them.

Change-Id: Ic07e02bc1800f177cf09f704104c1a76bfc50aa2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-12 13:57:25 +02:00
unknown
7d56edebc9 QDateTime - Fix auto tests on Windows before 1980
Auto tests using CET expect there to be no Daylight Time before 1980,
but Windows does apply Daylight Time.  Fix expected test results to
match.

Task-number: QTBUG-30420

Change-Id: I7080598fa0a20c1cd5680782606ab983e714e546
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-12 11:46:01 +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
Debao Zhang
6a50270013 tst_qtranslator: Remove QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Iefd8ce56b7102b5a6a656df7dbea2cd344bb9b5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-12 07:20:05 +02:00
Debao Zhang
5c2a8899e1 tst_qcoreapplication: Remove QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I6d5098ff57293171b5ddd3a58c53718cbbc8e4bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-12 07:19:53 +02:00
Debao Zhang
4bb76df7f7 tst_qdataurl: Remove QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I6f2e45bbc6d31cac4d9b8c735650f7985865109c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-12 07:19:45 +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