Commit Graph

15528 Commits

Author SHA1 Message Date
Marc Mutz
ae4c7be67d QCommandLineOption: declare as shared
QCommandLineOptions are held in a QList in QCommandLineParser,
so they better be declared movable, which is one of the things
Q_DECLARE_SHARED enables.

Change-Id: I75c8185534b4e9c1ea4417a9507095c8a6512aab
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-07 01:08:09 +02:00
Ivan Romanov
6bbaeefb90 Fix typos of QWheelEvent example
Just fixed typos with event and numPixels.

Change-Id: I8191d7e812ae9d3975a142d198d709d4f9f85b7f
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-07 01:08:09 +02:00
Stephen Kelly
d5e62f8169 Output the CMAKE_CXX_LIBRARY_ARCHITECTURE when reporting missing dependencies.
Change-Id: I5d2d53b9899636dee9f30ab179727de82b78afd5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-10-06 23:13:55 +02:00
hjk
32f27b4367 Replace QLoggingCategory::isEnabled by non-template functions
This yields the same results as previously and is more in line
with existing interfaces.

Change-Id: I0bf0372bf18f3bfde579385cddbe594bf71e3c52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 19:47:31 +02:00
Sebastian Schuberth
09a11069e7 Improve the QWinSettingsPrivate constructor's performance
This is mainly achieved by modifying the program flow to require
fewer string comparisons and conversions.

Change-Id: I9887623b9c05fe76460fc725d6534d16bd9f9e59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-06 13:50:19 +02:00
Sze Howe Koh
dc6852ca63 Doc: Expand on thread synchronization details
- Introduce the concept of "mutual exclusion"
- Rewrite/add explanations on how synchronization happens and how to
  use these tools
- Remove similar content from the "Thread Basics" page
- Fix links to examples

Change-Id: Id008a8fc3f68bf242cae1704c5c8318149d908b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:08:58 +02:00
Sze Howe Koh
370b642092 Doc: Generalize problems and solutions of mutex use
These apply to other locks too, not just mutexes.

Move from "Thread Basics" to "Synchronizing Threads"

Change-Id: I6d7051cb225a8c836fb591a28b65d3de8fab4083
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:08:36 +02:00
Sze Howe Koh
2524cafc8e Doc: Remove convoluted details of uncommon QMutex use case
Change-Id: If80068f44fef7ab0692b9dad99aa7e1a30cb72a6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:08:27 +02:00
Sze Howe Koh
a15bc0e714 Doc: Show both low- and high-level thread syncing on the same page
Move text from "Thread Basics" to "Synchronizing Threads" for a more
complete overview.

Change-Id: Ib87259ed551fa77278b57c5922df7f4b774a829a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:08:11 +02:00
Sze Howe Koh
525712b75e Doc: Rewrite section on threaded event loops
- Focus on signals instead of events; programs rarely need to call
  QCoreApplication::postEvent() manually
- Mention QMetaMethod::invokeMethod()
- Reduce verbosity

Change-Id: I170b96bd0134c0bc102ef1a344d4f0b88e504f86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:08:01 +02:00
Sze Howe Koh
3b45dfe6e6 Doc: Discuss the concept of thread affinity in more detail
- Create a section dedicated to this concept, which is fundamental to
  signal/event handling
- Move relevant content from the very broad "Thread Basics" page to the
  QObject class ref
- Flesh out existing content, including distinguishing signals from
  events
- Address the common misconception that "member" = "child"; this has
  been encountered several times in the Qt Project forums

Change-Id: I5e7e6c848596e72c0bb623f8442c8389b81ad9ef
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-06 01:07:52 +02:00
Frederik Gladhorn
4e337ee703 Add Q_DECL_OVERRIDE to accessibility classes
This actually shows two completely unused functions in QAccessibleTabBar
(fixed in follow up patch).

Change-Id: If6f464c022617b2ee1db654936e3ff9931103eb6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-10-05 12:19:02 +02:00
Marc Mutz
0206c1e4e7 QtConcurrent: remove a using declaration in a header file
See Sutter/Alexandrescu, Item 59, for rationale.

Change-Id: Ie689e2a00f9ed0fce1ccfdb77c943dd1b1beb4dc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-05 00:25:26 +02:00
Marc Mutz
c012ee2940 QObject: use per-thread storage for qFlagLocation()
qFlagLocation() uses a global char* array to transport source location
information from the connect() side to the metaobject side. The size
of the array is 2 (two), which just about suffices for a single connect()
statement.

Obviously, if more than one thread makes a (_any_) connection at the same
time, the data is useless and, worse, there's a data race.

The non-reentrancy of qFlagLocations() cannot and need not be fixed,
but use a per-thread flagged_locations array in QThreadData so threads
don't disturb each other.

Task-number: QTBUG-3680

Change-Id: If1797c60751f551694def69afee6fbe295bbe2d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-05 00:25:13 +02:00
Christian Strømme
d519b085d1 Android: Add private ctors in QJNIObjectPrivate that takes va_list.
NewObjectV() was failing because QJNIObject was calling the variadic
constructors with a va_list, which in turn created a new va_list.

Change-Id: I1cf4c8133f237596964177271a20ca651174e695
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-10-04 21:02:37 +02:00
Gabriel de Dietrich
5bc02ad665 Cocoa: Properly unhide views after they're moved to their own window
Task-number: QTBUG-32221
Change-Id: I12a475c7a5abdc5ba4d7359d694dd62ea97e67c4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-10-04 19:16:32 +02:00
Eskil Abrahamsen Blomfeldt
4bcef03a8d Android: Build against new build tools revisions
Whenever the SDK updates the build tools it's put inside a new
subdirectory with the version number, so with every new version
we would have to update the java.prf feature. Instead, we iterate
over the available revisions and pick the lexicographically highest
one (which is sufficient as long as the major version is
double digits.)

Change-Id: I2392ef6261ef36ed741c80fa6f981486e7844e0a
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-10-04 14:46:16 +02:00
Eskil Abrahamsen Blomfeldt
ab90eefcc0 Disable JavaScriptCore JIT for Android when building on Windows
On Linux, we will do a configure test to determine whether JIT should
be turned off when compiling JavaScriptCore in the QtScript module,
but this test is never run on Windows. The result was that JIT was
disabled on Linux and enabled on Windows, and compilation broke on
Windows.

Task-number: QTBUG-33780
Change-Id: I37991c6da98b35330c07c54f2a0b143d20780c91
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-10-04 14:37:22 +02:00
Samuel Gaist
72d60ea08c Refactor OS X bundle detection for QFileInfo
CFBundleGetPackageInfoInDirectory originally used tests for the presence
of information that are not mandatory in a bundle. The new implementation
uses known bundle extensions as well as Launch Services
to try to find if the bundle is known to the system. Last thing it
checks whether the package bit is set.

Task-number: QTBUG-31884
Change-Id: Ib58996c6ac65194c21238f5f86f78d797e310608
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-10-04 14:37:22 +02:00
Sze Howe Koh
dd864724b0 Doc: Remove unused variable in QThread snippet
Task-number: QTBUG-33120

Change-Id: Icfc896f0b3cd78ba681e587d78c9e46f8ca89694
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-04 09:58:21 +02:00
Martin Smith
db7501b051 qdoc: Remove algorithm to find common prefix
HtmlGenerator::generateCompactList() no longer uses an algorithm to
find out a common prefix for classes/qml types when generating the
alphabetical lists. The common prefix argument is no longer optional.
To indicate there is no common prefix, pass an empty string as the
common prefix argument.

Task-number: QTBUG-33750
Change-Id: I4b44bbcff909fcea5c7bfd58c6796e303086bc68
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-04 09:40:55 +02:00
Martin Smith
c025d49119 qdoc: Eliminate uses of qmlModuleIdentifier()
The QML module identifier is no longer useful.
The function to generate it is retained for now.

Task-number: QTBUG-32173
Change-Id: Ic811ed432f2059c0370e9e0d86b2e334b5c82a3c
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-10-04 09:40:43 +02:00
Mark Brand
c97e369e70 fix off-by-one error in NTLM proxy authentication
Change-Id: Icee3fc939d81c726f8e4ed484a0c8685cf1f271c
Task-number: QTBUG-27555
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-04 01:19:38 +02:00
Frederik Gladhorn
f191fe7cab Fix potential crash: adding int to string
qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
        f.write(QByteArray("i am " + i));
                           ~~~~~~~~^~~
qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: note: use array indexing to silence this warning
        f.write(QByteArray("i am " + i));
                                   ^
                           &       [  ]

Change-Id: Icc966559be3c2cde3416193b8a1ddab7e0323ade
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-04 01:19:38 +02:00
sfabry
1c1771effc Fix ssh root certificates path for Blackberry playbook OS.
This was removed by commit 4c8d8a72ec
But without it Playbook OS 2.1.0.1753 could not access ssh properly.

Change-Id: I18e136eaede2a5dffeb10b5fe31023b9aef709cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-10-03 23:32:16 +02:00
Friedemann Kleint
cdf0c5905b Fix temporary file leak in tst_qfiledialog2.
Change-Id: I5a1e601e3aa6e84300efa09bfbd9232fecab903e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2013-10-03 21:43:56 +02:00
Friedemann Kleint
7d4236d281 QTemporaryDir: Output warnings on removal failure.
Change-Id: I38d0a07c355f73899cc5f6eac60bd8cbedc73cb2
Reviewed-by: David Faure <david.faure@kdab.com>
2013-10-03 21:43:49 +02:00
Tor Arne Vestbø
f6dc131628 iOS: Implement QPlatformServices to handle opening URLs
Change-Id: Ie644df16b919d6def1435dc5f3665ba3f62fb055
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-10-03 18:17:53 +02:00
Tor Arne Vestbø
2844be2434 iOS: Delete members in platform integration
Change-Id: Ibb1bf2bf4a1ced897172facbc9027402adfe6f08
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-10-03 18:17:53 +02:00
Oswald Buddenhagen
f331f0ee28 move android-specific feature files to android/
Change-Id: I1f2b345b1dfad544d53dbf7e17b12c75a2cc7668
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-03 18:17:53 +02:00
Paul Olav Tvete
b3535f3926 Android: Don't throw away slow-moving mouse/touch events
When doing slow, precise movements, some devices will report
differences of less than 1 pixel. This would mark the points
as stationary, meaning that Qt would discard them without reporting.

On the three devices I have tested, stationary points are reported with
a 0.0 difference. If any devices are reporting noisy values, it is
still safer to test for equality, since it is much better to report
too many move events than to not report any.

Task-number: QTBUG-33729
Change-Id: If20f2758f5a5ec0917184345b558f55a3d383807
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-03 16:20:54 +02:00
J-P Nurmi
5f4c75a50e qdoc: ignore Q_WINEXTRAS_EXPORT
This is required for functions in the QtWin namespace.

Change-Id: I6c38c8ef262377050a75861435da381863340f33
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-03 16:12:57 +02:00
Tor Arne Vestbø
d2649c50e0 testlib: Don't link to IOKit on iOS, it's not part of the SDK
IOKit used to be part of the 5.x and 6.x iOS SDKs, but not officially,
so when Apple in the iOS 7 SDK removed IOKit headers and the library
symlink, our builds started failing.

Change-Id: I631cab7c106559968c06977fa25157a57402594c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-10-03 15:43:40 +02:00
Thiago Macieira
08f685e865 Add two enums that weren't handled in the ibase SQL driver
qsql_ibase.cpp:1155:23: error: enumeration value ‘LowPrecisionDouble’ not handled in switch [-Werror=switch]
qsql_ibase.cpp:1419:12: error: enumeration value ‘CancelQuery’ not handled in switch [-Werror=switch]

Change-Id: I3c6102051cde80c81948f5a64f9addcf7a371136
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-10-03 15:43:02 +02:00
Tor Arne Vestbø
2b01ffe552 iOS: Use PROT_READ, not PROT_NONE, for custom stack memory guard
This allows V4 and other garbage collectors to pass through our
custom stack during the mark-phase without triggering access
violations.

Change-Id: Icafcf4df3537c628c641fe694bb9fe2016519a83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-10-03 15:35:43 +02:00
Topi Reinio
d920af378c qdoc: Use empty common prefix for alphabetical QML type lists
This change allows an empty string to be used as a common prefix
for class/type compact lists, and uses it for QML types as they
do not have a common prefix like public C++ Qt classes do.

This fixes the issue with sorting order for QML type lists.

Task-number: QTBUG-33715
Change-Id: I28ab689d28017ae28eccbf590d1dbbe107665e33
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-10-03 15:34:47 +02:00
Joerg Bornemann
b2e365bc5c QProcess: remove now superfluous calls to setEnabled(false)
This amends 48061944ef.

Change-Id: Ie5b56c1499a10594b4a4b3c02d5704226ef971ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-02 11:45:15 +02:00
Samuel Gaist
4106d0c2d7 Add to 5.2 changelog QPlatformSessionManager related entry
This patch adds a brief description of the return of session management
because the changelog entries weres missing in the commit messages
related to the various parts of the related works

Change-Id: I20e6a20a63f1a38c6b1a7c9f147737688cd7ddf4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-10-02 11:45:04 +02:00
Samuel Gaist
56cd9cc2b0 Update QSessionManager and related classes documentation
Update the Qt 4 documentation of QSessionManager to reflect the changes
in Qt 5

Task-number: QTBUG-33528

Change-Id: I74286134155efc2781f9f6fc505fb6cf736d814e
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-10-02 11:44:52 +02:00
Sebastian Schuberth
bc962256b4 Remove a duplicate conversion to QLatin1String
Change-Id: I9641090406be2d4bad2b703594e404b4934cbc0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-02 11:43:33 +02:00
Frederik Gladhorn
04acfea2d2 Fix QStandardPath test on some linuxes
On one suse box I have both /usr/bin/sh and /bin/sh which means that the
test should prefer the one first in the path instead of random order.

Change-Id: Ie94bf8404479fa42a36a8ee45e09986114693871
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-02 11:11:23 +02:00
Topi Reinio
35f8bcd438 qdoc: Remove debug code
Remove a piece a debug code from qmlvisitor.cpp

Change-Id: I3a1a72d11597c36d277310c92bf9590633844d03
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-10-02 10:56:03 +02:00
Joerg Bornemann
8dc8fe53f9 QProcess/Win: fix crash in drainOutputPipes
stdoutReader->waitForReadyRead() can synchronously trigger the
deletion of stdoutreader (via signal readyRead(),
_q_canReadStandardOutput(), destroyChannel()).
Analoguous for stderrReader.

Task-number: QTBUG-33730

Change-Id: I8badac53e92a979c437838b2959b4c0445c8de81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-02 10:45:27 +02:00
Friedemann Kleint
5ad1e2578b Windows/Linux: Cache cursors by mask/pixmap keys and shape.
Task-number: QTBUG-33383

Change-Id: I65a5a0870f50f42c26a4d297331224b3597a36e0
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-10-02 10:43:55 +02:00
Joerg Bornemann
8388b40108 QProcess: remove now superfluous calls to setEnabled(false)
This amends 48061944ef.

Change-Id: Ie5b56c1499a10594b4a4b3c02d5704226ef971ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-02 10:43:48 +02:00
Topi Reinio
803253ba73 qdoc: Use empty common prefix for alphabetical QML type lists
This change allows an empty string to be used as a common prefix
for class/type compact lists, and uses it for QML types as they
do not have a common prefix like public C++ Qt classes do.

This fixes the issue with sorting order for QML type lists.

Task-number: QTBUG-33715
Change-Id: I28ab689d28017ae28eccbf590d1dbbe107665e33
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-10-02 10:07:19 +02:00
Martin Smith
09824fd334 qdoc: No longer includes QML version number in fullname
qdoc was including the QML module major version number in the fullname
attribute in index files. This change fixes qdoc so that it no longer
includes the version mumber in the fullname attribute.

Task-number: QTBUG-336456
Change-Id: If22bd15dc59eda1c8bc7fbbdf818e417b6b1d6e6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-02 10:01:47 +02:00
Paul Olav Tvete
17f16c80e5 Android: update copied enum values in Java code
The InputMethodHint enum values were changed between Qt 4.8 and 5.1, and
the hardcoded copies were not updated. Thanks to Lasconic for finding
the solution to this problem.

Task-number: QTBUG-32072
Task-number: QTBUG-32710
Change-Id: I3eb1192911a9c48d7720e85b91bee1af693a669d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-02 07:40:41 +02:00
Frederik Gladhorn
d14abab0d3 Fix race condition in ~QFileInfoGatherer
tst_qfilesystemmodel was hanging regularly. In
QFileInfoGatherer::~QFileInfoGatherer() it would be stuck on wait() and
in QFileInfoGatherer::run() it would be at condition.wait(&mutex);

It looks like while abort was set to true, the while in run() had just
entered so that it would wait for condition indefinitely.

Task-number: QTBUG-29403

Change-Id: If6cebbc98ec7f54fbdf347804780bbfc5e177b3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-02 03:15:09 +02:00
Thiago Macieira
c74f60b09d Doc: correct QTimer accuracy information - it depends on the timer type
This doc was probably older than the feature of timer types.

Task-number: QTBUG-33760
Change-Id: Iff4c9f9bb7287498f1ee80578b500bbde777bc78
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-02 03:15:09 +02:00