Commit Graph

15305 Commits

Author SHA1 Message Date
John Layt
475cbed244 QDateTime - Fix round-trip of second occurrence times
At the Daylight Tme to Standard Time transition, the local time repeats
itself, i.e. 2am occurs twice. Qt's behavior when setting this using
the local time is ambiguous, as it depends on the system implementation
of mktime, which behaves differently on different platforms.  Currently
this behavior remains undefined.  When setting using an msecs or time_t
value however we can determine the correct instance to use and cache it
to ensure that any conversion back from local time to msecs is performed
consistantly on all platforms.

Note that caching this value will result in any calculations being wrong
should the system time zone change, or its rules change.  This will be
fixed in Qt 5.3 when the system time zone change signal is implemented
and QDateTime switches to using QTimeZone instead of mktime to provide
consistnt behavior across platforms.

The QTimeZone spec does not require this fix as it already caches the
correct offset in setMSecsFromEpoch().

Change-Id: I799588db474e744a6d81e80f6a0442920569ebd3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-27 21:47:55 +02:00
Geir Vattekar
3705c1263d Doc: Add docs for rvalue references and move constructors
These members were introduced in 4.8, but left undocumented. Because we
consider undocumented API to be internal, the members are \since 5.2.

Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-27 21:47:55 +02:00
Tor Arne Vestbø
a0792f0e51 iOS: Add explicit dependency on the Foundation framework for QtCore
First of all it needed on both OSX and iOS, and secondly it's required
for our Qt APIs, now that we provide conversion functions to Foundation
types such as NSURL and NSString, so it should be part of LIBS, not
LIBS_PRIVATE.

Change-Id: Ida4977d6aa0e76b3d1b8b565672c00a8526e3381
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-27 20:10:56 +02:00
Jędrzej Nowacki
bb26e087bd Reduce QtNetwork lib size by 16111 bytes.
Warning message was repeated multiple times inside the library.

Change-Id: Idcd417dda22de189893db597acfc36c2aa99d078
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-09-27 18:31:23 +02:00
Jędrzej Nowacki
4aca7847be Fix open ssl forwarding macros.
This patch fixes them in many ways:
- use Q_UNLIKELY to mark an error case
- reduce QtNetwork library size by 40315 bytes
- fix DEFINEFUNC9 which had wrong logic, happily it was not used
anywhere

Change-Id: Ic46a569f85aa22a00ecd88158e60c52f4665ec4c
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-09-27 18:31:23 +02:00
Paul Olav Tvete
ec716cc5bf Android: Handle new QtTraceMsg in message handler
Change-Id: I3eb6fa42044ff4bdd0219925abf9d18cad60de7c
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-27 18:31:23 +02:00
Thorbjørn Martsum
a94e932945 QVarLengthArray - doc fix.
QVarLengthArray actually does support iterators.
It was added in Qt 4.8.

Change-Id: I9f714a09eab1d2e5dc023bd701ab7c743b078ec0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-27 16:40:14 +02:00
hjk
9ff81bdc1a Use a pimpl in QLoggingCategory
With the usual pros/cons. Cleans up the publicly visible
interface and gives some headroom for further extensions.

Change-Id: I7237b1fd2a22c66574d1b7e532d99137bb56ce1d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-09-27 16:18:29 +02:00
Morten Johan Sørvig
29585ec3d3 Fix regression in trackpad scroll event handling.
bab29dd76 changed scroll event handling to update
the keyboard modifier state during scroll event streams
and brought back the bug where Qt Creator would suddenly
change the font size if you pressed the command key
while scrolling.

Use momemtumPhase to detect scroll event streams.
momemtumPahse will be NSEventPhaseNone as long as there
are fingers on the trackpad. After liftoff it will
have a different value, and at this point we freeze
the keyboard modifier state until the scroll event
stream has ended.

This approach does not interfere with normal mouse
scroll wheels since momentumPhase is PahseNone for all
such scroll events.

Change-Id: I668ade8e794a97491487c9465366a316a7d6a9c8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-27 16:08:31 +02:00
Morten Johan Sørvig
6afb057962 Clear m_activePopupWindow on popup close.
QCocoaWindow keeps track of popup windows in order
to close them when appropriate, for example on mouse
clicks outside the popup. In this case the mouse click
will be used to close the popup, and will not be
send to the QCocoaWindow.

Clear m_activePopupWindow when the popup is closed
to fix a bug where the first mouse click after
closing a popup would have no effect.

Change-Id: I7a3e850e4fbf4686540d5d89dac6d7b613ed10a4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-27 16:03:36 +02:00
Friedemann Kleint
4b755ffa6d QWindowsWindow: Output warnings with classname/objectname.
Change-Id: I55a165669dbcadf2bd06b2315b1db43b092a1758
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-27 12:44:18 +02:00
Tor Arne Vestbø
d5c729604a iOS: Always use application bundle when building Qt applications
Change-Id: I8fd0f7b43bdcbff0bff2de890fe421eb51233192
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-27 12:43:17 +02:00
Michael Krasnyk
bdfbc9e493 qdbusxml2cpp: Fix annotation value in an introspection string generator
Unescaped annotation value causes for harmless values in an XML file, for instance,
'value=\"QList&lt;uint&gt;\"' a DBus exception, like
dbus.exceptions.IntrospectionParserException: Error parsing introspect data

Task-number: QTBUG-26668

Change-Id: Ie1eb519aec5228da0591d62c3aa5b6dec5790eb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-27 10:29:18 +02:00
Oliver Wolff
f911e87345 Win: Fixed namespaced build with QT_NO_FILESYSTEMWATCHER
Change-Id: I70049b90d2071c7a23a8a2804842d70d0f583f19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-27 10:15:35 +02:00
Topi Reinio
cf5470e170 qdoc: Correct location info for typedefs with associated enums
For typedef nodes that have an associated enumeration, qdoc
generates incorrect location info (written to index files)
by simply appending '-typedef' to the node name.  The correct
location to link to is the associated enumeration, if one
exists.

Task-number: QTBUG-33684
Change-Id: I749171ccae9ccc10f084a40fda14e72d5f4d44cf
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-09-27 09:43:30 +02:00
Friedemann Kleint
61c49611fc Windows: Use PostMessage for clipboard notifications for debugged apps.
Task-number: QTBUG-33492

Change-Id: I68af5f8ad767c55c95f758259cbb5d8a8080e70e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-27 09:32:28 +02:00
hjk
00da2e615e rcc: Remove compile dependency on private headers.
Not needed anymore now that it's using the new commandline parser.

Change-Id: I1a44c8658d128e4fbb9a6fc5000025f55e5293c2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
06e7d61b68 Cocoa: Allow widgets to receive events event when no app is running
This is necessary for QMacNativeWidget, where there exists a QApplication, but
is never executed. This directly translates in calls to the event dispatcher's
processEvents() function, whose calls we keep track. If no calls have been made,
we always allow timer and posted events to be processed.

Change-Id: Ia0062ee8c59a2572082f520a2eb85ed44a9856a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
db9abc72ef QMacNativeWidget: Have example use a delegate
This would be the case in most if not all the real life use cases.

Change-Id: Ib7ebc6dbe471ce50f4bd1df9becba8e9806008e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
79561dd899 QMacNativeWidget: Background should be transparent
Cocoa will draw it for us.

Change-Id: I73c124749658ae76c97afe95b81b78c7ff15c378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
79fc0ff67a QCocoaBackingStore: Initialize non-opaque images with transparent color
In particular, this is needed when a QWidget has WA_TranslucentBackground set
and nobody is painting anything behind it (except maybe some native view).

Change-Id: Ib1f0714f85fa7eeced527617ecd09bb2ed6ddfc9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Topi Reinio
c533e80e31 Doc: remove duplicate \externalpage definitions
Delete all duplicate \externalpage definitions from
corelib, printsupport and testlib sources.

Change-Id: I7dc5358861f4dad3e8ce080619b61ca3da64ec85
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-26 22:25:10 +02:00
Shawn Rutledge
f37990712b [QNSView viewWillMoveToWindow:] remove observer from previous window
Even if there is not a new window, the notifications from the old one
are not needed.

Change-Id: I9c1858d25e49379ca4737e23beec06623e91b69c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-26 22:25:10 +02:00
Liang Qi
5b70efb125 Mac: QWizard default background pixmap works again
Task-number: QTBUG-26722
Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
2013-09-26 20:42:33 +02:00
Vitalii Shastun
5889b239b1 Fix QT_NO_PRINTER build on Mac
On Mac the QT_NO_PRINTER build was not implemented.

Task-number: QTBUG-33565
Change-Id: I118472f9400aa0a0d0e192ae39a11ea38a66f340
Reviewed-by: John Layt <jlayt@kde.org>
2013-09-26 20:42:33 +02:00
John Layt
77dc33dcdb QLocale - Fix Mac date format code translation
Mac uses the CLDR format codes which need to be translated into their
Qt equivalent.  The existing code mistranslates the year code, is
outdated for a number of new codes introduced in recent versions of
CLDR, and by default accepted any codes it didn't recognize.

This change updates support to the latest version of CLDR, fixes the
treatment of years, and defaults to ignoring any new format codes
added in the future.

Note that this change cannot have auto tests written as the system
locale formats change between versions of OSX.  Testing must be
done manually by changing system locale and formats.

Task-number: QTBUG-25057

Change-Id: I69dda25b4a0b38d3971995644546306876922d57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 20:42:33 +02:00
Laszlo Agocs
279db88c39 Correct the detection of Windows-generated mouse events
Check only bit 8 to decide if the mouse event is generated from
a touch or pen event.

Task-number: QTBUG-33460

Change-Id: I83b23267b5de6df5e0e6b7113ecf377dd7e86c84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
9bf820ce47 Fix device-specific eglfs hooks to provide createNativeWindow correctly
Change-Id: I21aa17de7a79278d41b30a7590603c3382607673
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
091ca0ede2 evdevtouch: Fix ABS limit queries
Add the missing parentheses around the conditional
expression. EVIOCGABS and similar macros do not have guarding
parentheses in older kernel headers.

Change-Id: I5f464351e9407d90643d4e73d4afdbb2ad88b02b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
4ec31ce56a evdevtouch: Avoid duplicating points in released state
Points in released state should only be removed from m_contacts after
the disappeared-since-last-sync is done. Otherwise the same point can
appear twice (both times in released state) in the same event.

Change-Id: Ia751054c3fe893006a090bdce96a64738d8388ac
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Marko Pellikka
e120ad442d QString::reserve fix to avoid truncation
In case of implicit memory sharing, QString::reserve caused data
truncation if given size was smaller than size of data.

Task-number: QTBUG-29664
Change-Id: If2da5ad051385635ebb829c18b5ebaa349f08e8a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-09-26 18:45:16 +02:00
Gunnar Sletta
2864ba28e1 Remove code that doesn't do anything.
Change-Id: Id2528167f21e1ab81b998ceb808a9fc4a24b239a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-26 18:45:16 +02:00
Tor Arne Vestbø
a3530859e9 Expose QTest::currentAppName() and remove hard-coded argv[0] in tests
Except where we're actually testing QCoreApplication::applicationName()
and friends.

Change-Id: I25514884c11f43a4f82b1f818f822dc3d79f69a3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-09-26 18:45:16 +02:00
Tor Arne Vestbø
0bf30a7cab iOS: Propagate xcodebuild exit-code from makefile wrapper
Without bash's pipefail option we would end up with the exit code of
grep. Since we don't know which shell the user is running, we have
to explicitly call bash.

Change-Id: Ic3f6db0af9bb90a58001ccfbf9d6d21b6c9c9634
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-26 18:45:16 +02:00
Tor Arne Vestbø
696060134d Make QCoreApplicationPrivate::appName() thread-safe
Change-Id: Iea0d208e3e4721fff8a6667e0df1203a887c29d3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 17:02:25 +02:00
Jerome Pasion
9bd350d03d Doc: Adding "qtdoc" to the depends qdocconf variable.
-needed to link to Qt 5.2 docs (as seen on the navigation bar)

Change-Id: Icc0bdb95231dbccd0393d4f401daafd8bcb30472
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-09-26 17:00:26 +02:00
Tor Arne Vestbø
d4ec6331bb tst_QNetworkReply: Don't remove file if never created
If we end up QSKIP'ing the test 'wronlyFileName' is never created.

Change-Id: I2ccbfdb630b58d7904e73b476a65a82a45ab90d7
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-09-26 08:40:38 +02:00
Eskil Abrahamsen Blomfeldt
39e04b0222 Remove logic which changes install rules inside Qt dir
A common problem is that examples and other apps are unusable on
Android when they are inside the Qt directory. There doesn't
really seem to be any good reason for having a special case in
place, since this will only affect applications which are not built
with the host toolchain, and we aren't building any command line
apps for the target devices. So the only thing this will affect are
the examples and we want those to be installed into the correct
path.

Change-Id: Ibae365e06eb77944f11e596c16c3c5baf798848c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-26 08:40:38 +02:00
Eskil Abrahamsen Blomfeldt
0a3a05f418 Fix setting android minimum/target version
We need to output integers here, since these are interpreted
as integers when reading the json.

Change-Id: I4206b3ac347b61a357bd2658f146979e06690141
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-09-26 08:40:38 +02:00
Marc Mutz
935e52108d QtConcurrent::IterateKernel: fix a race on a cache variable
getticks() can be called concurrently, so accessing a non-atomic static long,
even when the assignment will produce the same value in evey case, constitutes
a data race.

Fixed by making 'useThreadCpuTime' atomic.

Since atomic long's might not be supported on all platforms, use an
atomic int instead. To avoid a narrowing conversion, and since we're
not interested in the return value of sysconf(), only whether it
succeeded, convert any non-error return value to 0 prior to storing
in the atomic.

Change-Id: Ic285f7801327b30ddcd9c24bf1ccee3112a447b1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 06:31:32 +02:00
J-P Nurmi
c66d42f972 QKeySequenceEdit: cleanup unused member variable
Change-Id: Ib1197aee7589be0afd0c639b362bf1c3fceffeb4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-26 06:31:11 +02:00
Tor Arne Vestbø
f04b46f34e Don't assume QCoreApplication::applicationName() will never change
Tests will typically create multiple QCoreApplications, some of them
with different argv[0] than others, so we can't use a static variable
to keep the cached application name.

Change-Id: Icd97527730558944473a71373326b4a82f1b7cf7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-25 21:21:24 +02:00
Matt Hoosier
1749bab565 Allow QDir::mkpath() to work on QNX QNet paths
Due to a quirk in the way that QNX's mkdir() implementation reports
return values when the requested pathname is the mountpoint of a
QNet filesystem, the usual recursive directory creation algorithm
used by QDir fails if the destination directory happens to exist
inside QNet.

This is an artificial failure; the desired directory can still
be created with the normal mkdir() algorithm. There just needs to
error handling in place to allow the recursive creation of parents
to recognize this situation.

Change-Id: I350fd9cb39858570032f9146c1154a9287701569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-25 21:07:51 +02:00
Christian Strømme
1db9075482 Android: Use the application's class loader when loading Java classes.
Previously the system class loader was used, which meant only system
Java classes where available. With this change it's no longer necessary
to add a JNI_OnLoad() to get a handle to application specific classes.

Change-Id: Ic8fe35b4e525bfeb1d317d5ba6b496e39bf9bb30
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-25 20:32:31 +02:00
Gabriel de Dietrich
9a683bfb84 QCocoaApplicationDelegate: Play nice with the user's application delegate
We tended to ignore the original application delegate a bit too often.

Change-Id: I0844c8658d128e4fbb9a6fc5000025f55e5293c2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-25 18:23:01 +02:00
hjk
466e0dff4b Add tracing to logging framework
Change-Id: I4d5b9a24a214785019ff1238c1790ead79205b15
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-09-25 18:21:45 +02:00
Sérgio Martins
774d74df91 Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.
See QTBUG-33473 for more information about this compiler bug.

Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-25 17:22:52 +02:00
Topi Reinio
25f7cddcab Doc: Fix module names of multimedia examples in manifest-meta
These examples are not in Qt Multimedia, but in
Qt Multimedia Widgets module.

Change-Id: I44fe0f10aa3229068646ff226551398a0cb3e27e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-25 14:18:48 +02:00
Mitch Curtis
d730e07d01 Fix truncation and conversion warnings on MSVC2010.
Change-Id: I44845e13b97753333a7c80a80ead0b352b8906b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-25 13:40:29 +02:00
Mitch Curtis
a1a00fc862 Fix configure warnings on Windows 7 with MSVC2010.
Change-Id: I5c4e27d6437cdf7b0dfd17df812d4506d1be4fb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-25 13:39:14 +02:00