Commit Graph

18895 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
3924805d59 Apply upstream patch r1498 to our PCRE copy
It's actually a subset of the patch (tests, docs, other whitespace
fixes were dropped).

Fixes a stack overflow issue on pathological regexps reported upstream:
http://bugs.exim.org/show_bug.cgi?id=1515

Change-Id: Ie36536e820d79ff842d90efa6bec22b701423793
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-10 14:18:28 +02:00
Giuseppe D'Angelo
00ca499787 Apply upstream patch r1495 to our PCRE copy
It's actually a subset of the patch (tests, docs, other whitespace
fixes were dropped).

Fixes a stack overflow issue on pathological regexps reported upstream:
http://bugs.exim.org/show_bug.cgi?id=1503

Change-Id: If080e4c1e7a86c86459bbbc631c8d8bb3cd7b99f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-10 14:18:26 +02:00
Gunnar Sletta
88bd28f91e Initialize member.
Change-Id: I9ed8d5a7aeb40886bafbd9eb2003e88e5d796cc9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-08 13:34:13 +02:00
Thiago Macieira
e8150576cd Document missing QLatin1String methods
Most of them were added before 5.0, but it's ok to just list as 5.0.

Change-Id: I6e83a210a0165659f710d47ed595e9e89d5dbac9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-07 22:39:40 +02:00
Peter Hartmann
9ad5dd0e8f network tests: add manual test for auth / proxy auth
This is helpful to e.g. test an NTLM proxy.
The test server currently does not support NTLM; this test offers a
possibility to specify a proxy server via environment variables.

Change-Id: Iea94656d38424c1d932fc854d13ca15ca47cdd68
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-07 11:54:08 +02:00
Andy Shaw
866c8bc5e3 Uncomment some tests which accidently got commented
With SHA1 47b3ecf3f4 some tests got
commented out by accident. This re-enables those tests.

Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-08-07 10:08:51 +02:00
Gunnar Sletta
50c418b61d Both HiQualAA and normal AA should mean antialiasing in rasterengine.
Change-Id: I1970c96e7681e4059984d837e12f044f138e6d7e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-07 10:08:24 +02:00
Andy Shaw
51ff044934 Check if Start/EndPage returns non-positive value when error checking
StartPage and EndPage are documented to return a non-positive value (0 or
less) when they fail, therefore it is not enough to check if !StartPage.
Checking if is 0 or less is more accurate.

Change-Id: Ia0ff43da4e4309ba0a5983e91a0ad583aad0a955
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-08-07 10:07:41 +02:00
Eskil Abrahamsen Blomfeldt
8306dee38f Windows: Fix stored family name of fallback fonts
When we create fallback fonts, we copy the fontdef of the main font, but
we need to update the family name to match reality, otherwise a QRawFont
created with the font engine will have the wrong family name. This is
already done in the default implementation of loadEngine(), but was missing
from the Windows implementation.

One large consequence of this was that when the distance field renderer
cloned the font engine (to change its size), it would clone it with the
wrong family name. When it later painted its glyph indexes, they would
of course refer to the wrong font (the fallback) so random characters
would appear.

[ChangeLog][Windows] Fixed using QRawFont with fallback fonts, e.g.
in the case of text rendering in Qt Quick.

Task-number: QTBUG-39172
Change-Id: Ic8fcd9dfc20ec7aadf0b47d4a80417f401f355fd
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-06 17:17:09 +02:00
Christian Strømme
1671dacb52 Android: Remove native views when their window is destroyd.
destroySurface() was not removing the native view as they are not
in the m_surfaces map.

Task-number: QTBUG-40159
Change-Id: Ib5457e0bd34141654fa47883f5e125d894b0bd05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-06 17:16:36 +02:00
Christian Strømme
4946ed0496 Android: Fix QAndroidPlatformServices::openUrl().
Return true only if an activity was found for the intent.

Task-number: QTBUG-34716
Change-Id: I764caf1e8afa3b17b2d71f52873c17e5d834a956
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-06 17:16:30 +02:00
Christian Strømme
682976def7 Android: Fix recursion bug in callStaticMethod()
calling callStaticMethod() with template type jlong, jdouble or
jboolean would cause the call to loop indefinitely.

Change-Id: I99caa576e761fdef623ece04e0779e4cf2535592
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-06 17:16:22 +02:00
Shawn Rutledge
2ad9e69a9f GTK file dialog: pre-fill the filename if given to a Save dialog
The docs for gtk_file_chooser_set_filename explain that if a file is
new, we should call gtk_file_chooser_set_current_name instead.
(But in that case it is necessary to set the directory separately.)
Qt doesn't make a distinction between a save dialog for saving a
new file vs. a dialog for re-saving an existing file, so it seems this
is the better way to do it all the time, since a save dialog would
most often be used for saving a new file.

Task-number: QTBUG-40573
Change-Id: I285e898fafc54ae39f09d564ca431a279a8f8919
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-08-06 17:10:07 +02:00
Shawn Rutledge
276036179a QFileDialog docs: remove misleading sentence about static functions
Native dialogs are used whenever possible, not just when the dialog is
instantiated via the static function.

Task-number: QTBUG-36657
Change-Id: Ibad67114e67f8e2f9956037f8469542c72bfd8ea
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-06 17:09:50 +02:00
Jerome Pasion
77b40ab79b Doc: Placed Qt OpenGL class convention in code block.
-QDoc tried to autolink where it should not.
-The syntax looks much better in a code block than in a paragraph.

Change-Id: I21d08cbb1537186d09b52898d7b70a5c0794256c
Task-number: QTBUG-35019
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-06 12:55:51 +02:00
Peter Kümmel
4124cd159e Undo: Fix state entry bug for parallel state groups
This commit reverts c4cef6fae9.
The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not
complete and introduces the regression QTBUG-30049.

Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219
Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-06 07:21:18 +02:00
Laszlo Agocs
bde755558c Do not add QOffscreenSurface windows to the global list
QOffscreenSurface has to stay usable even after returning from app.exec().
Hence close()ing the underlying hidden window, that is used on platforms that
do not provide real offscreen surfaces, is wrong.

Normally all QWindows are closed (and thus destroy()'ed) when quitting the application,
meaning the the offscreen surface cannot be made current anymore after returning
from exec(). This is an unnecessary limitation and makes certain cleanup operations
impossible.

Backport of ba79f36cb1 from dev. This is necessary for
the 5.3 series too to avoid issues on exit in QQickWidget apps, on OS X in particular.

Task-number: QTBUG-40505
Task-number: QTBUG-39908
Change-Id: Iea1489378a18f29ff84ba8f13a6dad2d66d2b315
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-05 22:01:51 +02:00
Marc Mutz
54a4488ca5 tst_QHash: check which of several equal keys is inserted
Add a test that checks that QHash keeps the first of the keys
that compare equal. This may or may not be documented, but is
inconsistent with the values in a QHash, where the last element
with equal key is kept.

Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_map).

Do the equivalent checks in tst_QMap, too. There, of course,
instead of equal keys, check equivalent ones.

Change-Id: I2c5f04f8e8a6bbc7dbaadadd878a4c876e4df042
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 18:04:46 +02:00
David Fries
3a347a4e70 OpenGL: destroy QGLContext allocated by QGLContext::fromOpenGLContext
QGLContext already uses ownContext to identify when it "owns" QOpenGLContext
and will delete QOpenGLContext when needed.  In the other way
QGLContext::fromOpenGLContext creates a QGLContext for QOpenGLContext, and is
now using qGLContextDeleteFunction to identify if QOpenGLContext "owns"
QGLContext by QGLContext only passing a delete function when QOpenGLContext
should delete QGLContext, and by QOpenGLContext calling deleteQGLContext() from
destory() to do the destruction avoiding the previous leak and sometimes crash
on exit.

Change-Id: I65e791776e99b456e4d0c70fc5b5cdb33c975893
Task-number: QTBUG-40286
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-05 17:30:03 +02:00
Marc Mutz
e1fed5dc31 tst_QSet: check which of several equal elements is inserted
Add a test that checks that QSet keeps the first of the elements
that have equal value. This is documented, but inconsistent with
values in a QHash, which keeps the last element with equal key.

Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_set).

Change-Id: I4ca1718bb86599b925b3ccd13b0856917cd4ce67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 00:02:26 +02:00
Oswald Buddenhagen
85011b82f0 fix paths in installed qtmain.prl
simply make use of the infrastructure used for "proper" modules.

Task-number: QTBUG-40026
Change-Id: Iffab72f7fb7a128549da2839a7497cff2f48b777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-04 18:35:41 +02:00
Oswald Buddenhagen
ffd44acd0d pass --sysroot to compile tests also on windows
Change-Id: I486059197479842f32c3590d7fd269550d22698e
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-01 14:37:37 +02:00
Oswald Buddenhagen
ae496a0ea6 add /ENTRY:main only for target builds
Change-Id: Ifa1d36607a1884ec989b5b514e7d1b9a2b40ddce
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-01 14:37:24 +02:00
Oswald Buddenhagen
4a55f1510d avoid that CROSS_COMPILE affects host builds
Change-Id: Iee40cfd87d7ec640fb4b3526e58317bdc8a778c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-08-01 14:36:51 +02:00
Oswald Buddenhagen
6c8e59d694 ensure that arch_host.pro is used also on windows
Change-Id: I110ec33a40f37ecdec5ab952ea56a4fc00cd27a8
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-08-01 14:36:43 +02:00
Oswald Buddenhagen
a5cf862f61 Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-07-31 17:29:06 +02:00
Rainer Keller
c0429719c1 Add missing power button keycode to keymap
Change-Id: I03682716aaea8344ebb5b71dcea5fe18babcd610
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-07-31 14:24:01 +02:00
BogDan Vatra
ef5fb6ead5 Android: export ANDROID_SDK_BUILD_TOOLS_REVISION.
It's needed by androiddeployqt tool to run "zipalign" tool
and to set it to gradle properties.

Task-number:QTBUG-40481
Change-Id: I3dd665a7461a4e981867cdad75a50940e46a5ae6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-31 14:16:51 +02:00
Sérgio Martins
291c6615a3 cocoa: Fix compiler warnings about unused functions.
Change-Id: Id85c86dd2f2468b3ac17751aefdebe0e8666a0c0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-07-31 13:40:34 +02:00
Laszlo Agocs
07e1f524f3 Propagate swapInterval to QGLFormat
Task-number: QTBUG-39370
Change-Id: Ib3a46a0ae24e5f6d690625b1d91be9e599bbc927
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-31 12:51:49 +02:00
Laszlo Agocs
429beecb19 Fix double clicks in eglfs
The window can be null in the qpa event. This is indicated by the nullWindow
field to be able to differentiate between a dead window and a genuinely
null input.

[ChangeLog] Double click events are now sent correctly on eglfs.

Task-number: QTBUG-40146
Change-Id: I63c8d08e0dec217b929161d2e827e0c273b4dd3e
Reviewed-by: Will Wagner <willw@carallon.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-31 12:32:51 +02:00
Oswald Buddenhagen
87d15f2c1b Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
2014-07-30 15:53:07 +02:00
Thiago Macieira
3866c89dee Work around ICC bug in local static symbols for Q_GLOBAL_STATIC
When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC
emits global symbols for the internal "holder" local static variable and
its guard. If there are two global statics of the same name in two
different .cpp files, the linker will incorrectly merge the two "holder"
variables.

This was noted between the "customTypes" global statics of qmetatype.cpp
and qdbusmetatype.cpp in a static build.

The C++ standard requires that local static variables declared in inline
functions must be the same, regardless of whether the body of the
function got inlined or not. The IA-64 C++ ABI does that by requiring
local static symbols for inline functions to be global and mergeable
("link once"). However, two functions in anonymous namespaces in
different files are not considered to be the same function, so their
local statics should not be merged. This is where ICC failed: the local
statics are global and mergeable, even though the function is in an
anonymous namespace. ICC correctly emits the function itself as a local
symbol.

Alternative solutions were:
  1) add "static", but you can't use a static symbol in a template
     parameter in C++98 mode
  2) remove the "inline" keyword, but then GCC 4.8 will not inline

Intel issue ID: 6000058488
Task-number: QTBUG-40053
Change-Id: I307622222499682dde711b2771c8cf7557400799
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-30 10:24:29 +02:00
Gabriel de Dietrich
e7839d9717 QCoreTextFontDatabase: Fix font weight value when populating a family
kCTFontWeightTrait returns a normalized value between -1.0 (lightest)
and 1.0 (heaviest), 0.0 being the regular font weight. The threshold
values used in this change have been estimated from the weight values
of fonts from the Helvetica Neue and Myriad Pro font families.

Change-Id: I49de8e8bd5894107de4842aeda7ace2e83f95be3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-07-29 17:33:19 +02:00
Allan Sandfeld Jensen
0afc80c922 Don't convert signed to unsigned when we need all 32bit
The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit
were incorrectly assigning an unsigned value to a signed variable, which
broke their support of images with dimensions from 32384 to 65535.
Images with dimensions higher than that are already using another code-
path.

Task-number: QTBUG-40297
Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-29 15:16:50 +02:00
Joni Poikelin
7e74f8f398 Fix compilation if EC is disabled in OpenSSL
Some Linux distributions disable EC by default which causes compile
errors on those platforms.

Task-number: QTBUG-40394
Change-Id: If5816d473bd1d64b1d4977860db662704a83310f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-07-29 06:33:08 +02:00
Joni Poikelin
3fed060b94 Fix warning message when re-setting text on tooltip
Fix warning message that gets printed when changing tooltip message
without rect and widget parameters for already shown tooltip widget.

Task-number: QTBUG-39550
Change-Id: I69ed8747e5e77ca618525d74479c72e02b7ab897
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-29 06:32:58 +02:00
Bernd Weimer
ec703836b3 Improve dbus cross compilation
Building QtDBus on Linux host for QNX target had two issues:
* Configure check failed, because dbus-1 library was not linked in,
  if target platform doesn't support pkg-config.
* Host tools were not built, because pkg-config was not used to locate
  dbus headers on the host.

Task-number: QTBUG-37324
Change-Id: I71d8309599fd40ef2dd8c9e3b44b93a7482019f1
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-28 14:08:22 +02:00
Artem Shevchenko
553325abfd Fix buffer overrun error with some proxy servers
In some cases, depending on the proxy server response, the current
implementation of QHttpSocketEngine may write to memory beyond the
allocated buffer size. That will trigger undefined behavior on UNIX
systems and a buffer overrun exception if compiled with visual studio.

Change-Id: I5769d10c56b6a7483d6d94672aa4321287b82651
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-28 13:30:28 +02:00
Marc Mutz
aaaba5da24 tst_QSet: verify that {}-style initialization drops duplicates
No actual reason for this test, except my curiority. Then again, it's
good to have this check, too.

Change-Id: I815fce7e4dbe76e21cac29beb1dbfc1083191d24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 14:53:25 +02:00
Marc Mutz
67a316be7c tst_QMap: replace QVERIFY(x == y) with QCOMPARE(x,y)
QCOMPARE produces more useful output on failure.

Change-Id: Idaa9bf61a22a43b0feb084a71985a69c8787d633
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 14:53:05 +02:00
Marc Mutz
34237d62f6 tst_QMap: verify that {}-style initialization drops duplicates
No actual reason for this test, except my curiority. Then again, it's
good to have this check, too.

Also checks that the last entry in the init_list "wins", which is
not how std:: containers work.

Change-Id: I4f7d1228f2b90a904b6c3f99e54afcd9970b723e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 14:52:58 +02:00
Marc Mutz
443bc6ab18 tst_QHash: replace QVERIFY(x == y) with QCOMPARE(x,y)
QCOMPARE produces more useful output on failure.

Change-Id: I584a5d33026ac2587758d72524f735937029e111
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 14:52:40 +02:00
Marc Mutz
8b0cc9db9b tst_QHash: verify that {}-style initialization drops duplicates
No actual reason for this test, except my curiority. Then again, it's
good to have this check, too.

Also checks that the last entry in the init_list "wins", which is
not how std:: containers work.

Change-Id: Ia284d093cd0029432372630e81657fb687b9516f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 14:52:33 +02:00
Markus Goetz
b99fa32d70 QNAM: Fix CPU load for limited upload QIODevice
This fixes high CPU load for upload devices that don't generate
a constant stream of data. Their readData() function was called all the
time without returning actual data.

This was noticed when implementing an upload device that emits data in
a limited way for bandwidth limiting.

[ChangeLog][QtNetwork][QNetworkAccessManager] Fixed high CPU load when handling
POST/upload QIODevice that generates data on readyRead().

Change-Id: Iefbcb1a21d8aedef1eb11761232dd16a049018dc
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-07-25 12:56:14 +02:00
Christian Kandeler
3a9763d349 qmake: Document the "aux" template type.
Better late than never.

Change-Id: If3bbeb4dfe3a8d49ceb02d9c2d0f2eff71595105
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-25 09:24:39 +02:00
Thiago Macieira
c94bf2cfba Use the stateless UTF-8 encoder in QStringRef::toUtf8
QString::toUtf8 already does it. I guess I forgot to update this part in
d51130cc3a.

Change-Id: I83feafcb0383758f7e64d5142f57a7ae6a2ff351
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-25 01:50:55 +02:00
Nico Vertriest
66dbee1278 Doc: corrected autolink errors in qnamespace.qdoc
Task-number: QTBUG-40362
Change-Id: Ic2a0740a12c98a60cb1d178c4d42c4ae1c39869c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-23 13:24:03 +02:00
Friedemann Kleint
fac1d4d17e Windows: Fix assignment of margins in QPageSetupDialog.
Task-number: QTBUG-40061
Change-Id: Id5c952a7d6280f2ab7180bff01911d6cffe57034
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-22 15:32:34 +02:00
Allan Sandfeld Jensen
b0d0a2680a QPixmap::fromImage() should detach when changing QImage format
When QPixmap::fromImage() detects an ARGB32 image with only opaque
pixels it will do a conversion where it only changes the advertised
format of the image. This conversion was lacking a check to see if it
the QImage was shared before doing so, which this patch adds.

Task-number: QTBUG-40282
Change-Id: I3acf221b76735637cef04c2104a33f87e5f09d54
Reviewed-by: Andreas Löw <andreas@code-and-web.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-22 14:54:16 +02:00