Commit Graph

21110 Commits

Author SHA1 Message Date
Shawn Rutledge
544f82ea3a sqlite: don't use deprecated QSqlError constructor
so that it can build with configure -no-feature-DEPRECATED

Change-Id: Id2decc05974bad249c79936d99ab63d3cfc375ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-26 08:42:05 +01:00
Shawn Rutledge
7dcbd519c4 don't use QCursor if QT_NO_CURSOR
to support configure -no-feature-CURSOR

Change-Id: I8e7f9a7f80d3d44a1f8e25b909d552351b5f37e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-26 08:41:53 +01:00
Friedemann Kleint
f96cd3187d Improve diaglib.
- Fix prototype for glinfo() for Qt 4
- Add more event types and object type flags to event filter.

Change-Id: Ia4160b40486d054e860a339e7b5c9c28695330ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-11-25 22:39:39 +01:00
Sérgio Martins
6593531a4d Windows: Respect hinting preferences with FreeType engine.
One of the fontEngine()'s methods was missing hinting. This bug only
manifests on Windows because on Linux QFontConfigDataBase already sets
hinting on both code paths.

Task-number: QTBUG-42534
Change-Id: I3a66a9d4aaa5e390fee305a3d5aacfeba38a1fc3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-11-25 22:18:30 +01:00
Shawn Rutledge
23517bfc35 QDistanceField: a zero glyph index means the glyph was not found
In qt_fontHasNarrowOutlines, if we proceed to call alphaMapForGlyph
when the glyph does not exist, there will be a failed assertion.
The docs for FT_Get_Char_Index say that zero means the glyph was
not found.

Change-Id: I371e9a2797a34fa3ebeae44531af51e24dadad79
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-11-25 22:18:23 +01:00
Konstantin Ritt
0e0464c50d [QPainter] Fix QTextItem painting with extended paint engine
Multi QFontEngine should be handled just like all other cases
covered several lines below.

Change-Id: If3dd9a2e38a5f6f61b113576cb188da378fc9efb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-25 22:18:19 +01:00
Konstantin Ritt
02e20f772d [QAndroidPlatformTheme] Get rid of static QFont
QFont is not POD and shouldn't be instantiated statically,
otherwise we could end up with UB during qApp destruction.

Change-Id: I2372c7a643eb3007957ab2b798732c1a18fd0ae5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-25 22:18:15 +01:00
Konstantin Ritt
77f800bad7 Fix potential access to uninitialized member
If GetTextMetrics() failed, there is no guarantee that
TEXTMETRIC is initialized with any safe values.

Change-Id: Idb5e3bc1bc2451368950978365487c908ce529e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-25 22:18:10 +01:00
Konstantin Ritt
1992e206f6 Don't assemble QRawFont from QFont manually
Always prefer QRawFont::fromFont(..)

Change-Id: Ic33f7d3a468f926418b39887f572829af93f8c1d
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-11-25 22:18:06 +01:00
Konstantin Ritt
d911f1dd42 [QStaticText] Fix potential font engine leaking
Never assume the engine is still cached but rather delete it
if we are the last consumer.

Change-Id: I4e3c796d45c53f42722a437482d71e2dae14cad2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-25 22:18:02 +01:00
Thiago Macieira
e8ba85b944 Don't say "Neon... auto" when ARM Neon isn't detected
Just say "no".

Change-Id: I382d612ad0a7f4031b1891e7e4d9158db07badf1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-25 21:20:11 +01:00
Tor Arne Vestbø
918006f590 Add missing host_build CONFIG for qlalr
Change-Id: I6eddd2afd9eb4dac0b28329003dbd3b6d05d3fd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-11-25 20:26:53 +01:00
Tor Arne Vestbø
fe13d53c24 iOS: Clean up QPlatformInputContext subclass header
Implements isValid(), which should be returning true for subclasses,
and re-orders and adds Q_DECL_OVERRIDE where appropriate.

Change-Id: I03519bf674b6f7b7ccc07a7154c9a1fb9a8105f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-11-25 20:26:53 +01:00
Eskil Abrahamsen Blomfeldt
c238d34137 Get rid of some duplicate code in QFontEngineFT
This removes some code duplication in the QFontEngineFT and
it also removes the condition that loadTransformedGlyphSet()
will return 0 if the font is too large to be cached, since
this is handled by setting outline_drawing on the glyph set which
will fall back to painter paths.

Change-Id: I2fe6a963e854cdd7c6015154547dc06325cbe3b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-11-25 08:28:58 +01:00
Marc Mutz
ef96489ede Fix instances of !var & const that should be !(var & const)
GCC recently started warning about these.

Change-Id: I7b30c79f7f2b66b99e54354224700d54ace6ebec
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-11-25 07:28:10 +01:00
Kai Koehne
155306ffee ANGLE: Fix releasing textures after we kill D3D11
Cherry-pick upstream commit cc4cd2925b9a4f1142a86df131345a861c9d7cd9
to fix crashes on exit.

Task-number: QTBUG-42772
Change-Id: Ib74be17f2b5fdd58f9e0568e1da74ba19e943019
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-24 13:04:38 +01:00
Alejandro Exojo
f88ab80c8a Use camel case in PKCS#12 function
This makes it follow the coding style, which says to camel case acronyms too,
and makes it consistent with the rest of the class.

Change-Id: I4a1b21de1815530e476fc5aa8a0d41c724fc8021
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-24 08:50:05 +01:00
Laszlo Agocs
78c43ce8ea Update 5.4.0 changes with missing entries
Change-Id: I2bd0fb79817ac391a2a7c6b9d12ccef5c19ebd88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-24 08:49:56 +01:00
Paul Olav Tvete
0fc5788291 Fix for HTC Pinyin input method
HTC does not do beginBatchEdit/endBatchEdit when committing text.
We implement the commit in two steps: first set the text, then move
the cursor. To avoid sending an updateSelection for the intermediate state,
we need to block updates when we set the text in the editor.

Task-number: QTBUG-42300
Change-Id: Icd18700ecf1fba5acb9f8a78762555c1309b221b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-24 08:49:48 +01:00
David Faure
b1cf07f495 QAbstractItemView: rename private canDecode to canDrop.
Change-Id: I9b1b3ead0bea35a75e20c5c18e288251de7ad7fe
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2014-11-24 08:05:58 +01:00
David Faure
b13aa15e10 QAbstractItemView: call canDropMimeData, as one would expect.
The virtual method was added for 5.0 but never called.

The old code (only checking mimetypes) is now the default implementation
for canDropMimeData. Model subclasses can now refine this by having
index-specific logic instead, or in order to inspect the dropped data
(e.g. to accept files and refuse directories, which are all text/uri-list).

[ChangeLog][QtWidgets][QAbstractItemView] now calls canDropMimeData in
order to decide whether or not to accept the drop.

Task-number: QTBUG-30534
Change-Id: Ied3aa964b4025bae6a1a26df89a681bfe61c3faa
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2014-11-24 08:05:51 +01:00
David Faure
736ac19156 QAbstractProxyModel: fix canDropMimeData/dropMimeData implementations
The code in 4696e9dbaa was incorrect. It is perfectly valid to call
these methods with row=-1 column=1 parent=some_index, this is exactly
what happens in QListView and QTableView. Child row/column is only for
trees.

Move the coordinate mapping from QSortFilterProxyModel into a new
mapDropCoordinatesToSource internal method, used by QAbstractProxyModel.

Task-number: QTBUG-39549
Change-Id: I3312210473d84b639cbe4c01f70ea36437db3e91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2014-11-24 08:05:43 +01:00
David Faure
dcbf704bc0 tst_qtableview: fix virtual-override clang warning
Change-Id: I40391890c988ce15d8fa65898976bf0fdc446992
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-24 08:05:34 +01:00
David Faure
edd436a268 OSX: implement QFontMetrics::maxWidth().
CoreText doesn't seem to provide us with a "maximum advance" value,
but 0 is really wrong, it leads to QLineEdit::minimumSizeHint() being
0 since it's based on maxWidth(). It even led to a negative min width
with setTextMargins(-1, 0, -1, 0).

Change-Id: I4faf8ecfb6d91e9dff66ec63651d003014503cb4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-11-24 08:05:10 +01:00
Samuel Gaist
5f6284a98b Implement Download folder path retrieval on OS X
The current implementation returns the DocumentLocation folder.
Since now only cocoa is supported, we can use NSFileManager to get the
correct path.

[ChangeLog][QtCore][OS X] Now QStandardPaths returns the correct path
for the DownloadLocation.

Change-Id: Ic0ea3ebf8585a1e34a7b43c734df78fd3949d4d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-24 00:33:20 +01:00
Thiago Macieira
13b939c7f4 Fix warning about QDeviceDiscovery violating ODR rule
When compiling with GCC 4.9's LTO, the compiler realizes that the class
looks different in two different compilation units and prints a warning.
Adding the necessary #define will make sure that the warning isn't
printed.

It's possible the warning indicates a real problem, if the class
actually got used in those two plugins. I wouldn't know.

QtPlatformSupport/private/.../qdevicediscovery_p.h:66:7: warning: type ‘struct QDeviceDiscovery’ violates one definition rule
.moc/.../qdevicediscovery_p.h:66:7: note: a type with the same name but different layout is defined in another translation unit

Change-Id: I73ca8e553e392b8d368f0deaa318d3e6635d73e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-23 22:14:40 +01:00
Thiago Macieira
4fec31dcc0 Fix failure to build QtQuick with LTO
The presence of the inline QTestFontEngine's constructor causes a linker
failure because QFontEngineBox isn't exported. I'd say this is a
compiler bug (GCC 4.9), but it's an easy workaround and a difficult
testcase.

typeinfo for QTestFontEngine: error: undefined reference to 'typeinfo for QFontEngineBox'
vtable for QTestFontEngine: error: undefined reference to 'QFontEngineBox::glyphIndex(unsigned int) const'

Change-Id: I84829d111616977d6f3fcbbb48509d1c7d4f5fa6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-11-23 22:14:08 +01:00
André Klitzing
c6e21eb673 SSL: Fix sslConfiguration in encrypted slot
If "encrypted" signal is fired the configuration of ssl is not updated.
If someone wants to perform additional checks on the certificate chain
it is now possible to use peerCertificate and peerCertificateChain.

Change-Id: Id5136a8c52727562c36028eaef721cc9ad86619d
Task-number: QTBUG-40401
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-11-23 00:47:24 +01:00
Thiago Macieira
32b7eb8e98 Work around ICC compatibility problem with Apple headers
Apple uses __OSX_AVAILABLE_STARTING in enum values too, which ICC
doesn't like. We need to force at least OS X 10.9 so we don't run into
build errors.

FSEvents.h(279): error: expected a "}"
    kFSEventStreamCreateFlagMarkSelf __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) = 0x00000020
                                     ^

Intel issue ID: 6000071924
Change-Id: Iae1abb8e8e92f228571c5064d96e9d33d3e35173
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-22 20:02:49 +01:00
Thiago Macieira
749f4f0e55 Disable the tests that verify that the available space shrunk
Somehow, it doesn't shrink with btrfs, even if you write 1 MB of non-
null data. This does not seem to be a bug in QStorageInfo. strace
confirms that there is a second statvfs call happening.

Change-Id: I9ed99d27d25e191916278e6b8faeae132469fc63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-22 20:02:45 +01:00
Matt Fischer
cd2ac1e2e5 Don't send reply messages for non-method calls in QDBusMessage
QDBusMessage is intended to avoid sending reply messages unless
the message is a method call without the NO_REPLY_EXPECTED flag set.
However, since messages which are not method calls will never have
this flag set, the code will currently cause all non-method call
messages to expect a reply.  This patch changes the code to examine
the message type, and to only check for the flag in cases where the
message is a method call.

Change-Id: Ic5bb00df69d3cfb38f60bf6bfd8463fb28cf2c99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-22 00:29:16 +01:00
Thiago Macieira
49052ba8a8 QtTest: fix pretty-printing of QStrings containing "
It needs to be escaped with a backslash.

Change-Id: Idf62914fca08eb6be8a039c2af72bac42c0d594a
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-11-21 20:37:42 +01:00
Thiago Macieira
def272750c Put parentheses around "min" to prevent expansion as macro
If you write xxxx::min(), min() might be expanded as a macro on silly
environments that follow that poor practice (read: inclusion of
<windows.h> without NOMINMAX). However, if you write (min)() or
(xxx::min)(), it means the same but prevents the expansion as macro.

Task-number: QTBUG-42767
Task-number: QTBUG-31469
Change-Id: If3c93aafd4d0bf63ca15f3d01c2297d58d00f6bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-21 20:37:39 +01:00
Thiago Macieira
9bb64bff61 Fix coding style in QtCore
Never start a line with a comma.

Change-Id: Idce1766f2661aa97fd163c02436ef315999985ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-21 20:37:38 +01:00
Jan-Marek Glogowski
a2f78ea0a1 Fix tst_QEventLoop::processEventsExcludeSocket test
The testcase always returns the expected result, independently of the
QEventLoop::ExcludeSocketNotifiers flag to processEvents.

In Qt4 the same test uses an intermediate QEventLoop and already runs
it before the QEventLoop::ExcludeSocketNotifiers:

  QEventLoop loop;
  // allow the TCP/IP stack time to loopback the data,
  //  so our socket is ready to read
  QTimer::singleShot(200, &loop, SLOT(quit()));
  loop.exec(QEventLoop::ExcludeSocketNotifiers);

This fixes and improves the test by connecting, processing and
checking the bytesWritten signal for the pending connection socket.

Change-Id: I1b1d2b7b83910c87ba3fe48e29ac9fd585ac62ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-21 18:51:17 +01:00
Tony Sarajärvi
d958a16bc1 Blacklist one test function in tst_QNetworkReply
This patch is cherry-picked from
c38f1f19b8 and
d29d727d72

Task-number: QTBUG-32435
Change-Id: I6dbbb668b96737a5791bc688949a00bc09f1357f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-21 16:48:44 +01:00
Giuseppe D'Angelo
800f832201 Apply r1513 to our PCRE bundled copy
Fixes CVE-2014-8964.

Upstream diff: http://www.exim.org/viewvc/pcre?view=revision&revision=1513

Change-Id: I59dc1f4c290e29ab5f22ed68eaeba702f4232e0e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-11-21 16:48:32 +01:00
Tony Sarajärvi
c9c40af130 Mark QSocks5SocketEngine tests blacklisted
This patch is cherry-picked from
63ae74f365 and
07f234d2a8

Task-number: QTBUG-42528
Change-Id: I5f86679e62a4be48ce25afa5a4987a2b6678a357
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-21 16:48:20 +01:00
Christian Strømme
f9408cc81c Android: protect global jni cache.
This fixes a issue that has been neglected for a while, namely, that
the access to the global jni caches where not sufficiently protected
for concurrent usage. This change also fixes an issue with the
thread-name storage.

Task-number: QTBUG-42755
Change-Id: I22f95ae7f44d1f6a13e289e52b050d98ccb9fb28
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-11-21 16:48:02 +01:00
Eskil Abrahamsen Blomfeldt
d0ef89caab Android: Make old manifests work on Android 5
On newer Androids, exceptions have started happening when using old
manifests that refer to splash.xml because the layout is missing
some required attributes. We add these to avoid crashing with these
apps.

Change-Id: Iefd4718e811df844e53890ee5bc772871d0a9803
Task-number: QTBUG-42807
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2014-11-21 16:47:45 +01:00
Thiago Macieira
bb07737614 Fix the %{time} printing to *not* default to the process's time
The default should be the actual time of day. Showing the process's time
is the optional case. In the future, we'll provide a way to showing the
monotonic reference time ("boot") and we should improve the detection of
actual application runtime.

Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-11-21 16:47:35 +01:00
Thiago Macieira
0792943d59 Update the ChangeLog for 5.4.0 for the rest of qtbase
Change-Id: I255892a9c84a8d873195f9440f9c1808cbe2b5a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-21 16:47:25 +01:00
Maurice Kalinowski
cd75ca0dbd WinRT: Ignore winrtrunner specific arguments
qdevel is an option used from winrtrunner to indicate a specific
environment to the app. QTestLib needs to ignore that parameter similar
to the Visual Studio generated arguments.

Change-Id: I00a3abe19f1e5b4159e65d26050f04e28f40316f
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
2014-11-21 16:44:36 +01:00
Frederik Gladhorn
245acbf6e8 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
2014-11-21 13:44:26 +01:00
David Faure
eb466b636b Fix QAction::setFont crash on OSX, when font is unknown.
customMenuFont was null, so objects was an empty array, and
NSDictionary throws an exception when being called with arrays
of different sizes.

Task-number: QTBUG-42728
Change-Id: I8cdab449fd8c1d12b65c46dd5617a7f5e3e96c6e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2014-11-21 00:42:55 +01:00
Friedemann Kleint
6c5d1dbd75 Fix widget leak in tst_qmainwindow.
Task-number: QTBUG-38152
Change-Id: I4cf94a4a8977019dcfc099966643b5b036cc1021
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-11-20 22:30:28 +01:00
Lorn Potter
f217a8096b QtBearer networkmanager make sure to set flag Active
Also, no need to create objects to get properties, when the properties
can be had for free.

Make plugin more robust to network-manager or ofono crashes

Change-Id: Ibadb46bd51aa27f130f8d245e8c50aa7bff5f9c8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
2014-11-20 20:45:13 +01:00
Jan Arve Sæther
f20af07e82 Ignore nodes with no text name, value and description.
This is in order to skip certain nodes that usually only carry
structural information (such as ListItem nodes). However, because of the
flattening, this structural information is never used on iOS, so we can
just skip the accessible node completely.

Change-Id: I17018c6565f8b39831f2d2944422c6670a438ab9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-20 17:21:08 +01:00
Jan Arve Sæther
72278b7181 Do not skip the parent node when flattening the hierarchy.
The weather app had a search field with a clear button as a child.
Because of this bug it didn't report the content of the text edit (but
only the clear button)

Change-Id: I174c6e150e1991fa9aa2a911048590030b5ccc40
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-20 17:20:50 +01:00
Friedemann Kleint
94e40c7c78 Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.
Pass it as additional boolean parameter to QLocaleData::validateChars().

Task-number: QTBUG-42522
Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-11-20 16:38:23 +01:00