Commit Graph

9472 Commits

Author SHA1 Message Date
Sergio Ahumada
89b12da2ef qmake: Include own header first
cpp files should include their own headers first (but below config.h)

Change-Id: I10ef37854843ae6438d68f96ce5ee83eede33db5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-17 22:14:18 +02:00
John Layt
54b899f448 SIC: QtPrintSupport - Remove QAbstractPageSetupDialog
QAbstractPageSetupDialog is a completely unnecessary base class that
is not really abstract and is used nowhere else.  This changes merges
its methods into the QPageSetupDialog main class.

While technically SIC no-one else uses this so no apps should be
affected.

Change-Id: I59b1739f1c453c34c25d1664d5d042e7918db316
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-17 22:08:16 +02:00
Mark Brand
01864d4854 use qmake to get PKG_CONFIG in configure script
The value of PKG_CONFIG might depend on device options.
For example, "-device-option PKG_CONFIG" might be used with configure
or a mkspec might prefix PKG_CONFIG with CROSS_COMPILE which is
specified as a device option.

The shell functions of configure for parsing mkspecs do not take
device options into account, but qmake is pretty good at it now.

Change-Id: I1c9558e550c48e8441ebdac34b82066473c2ce3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-17 21:47:51 +02:00
Sergio Ahumada
f0b922a3af test: Mark tst_QTabBar::sizeHints() failure as XFAIL
The test has one stable failure on Mac OS X, so mark this
with QEXPECT_FAIL and remove the QSKIP

Task-number: QTBUG-22320
Task-number: QTBUG-27230
Change-Id: I7660df5770c39788792068a5b68e8236551288c4
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-09-17 09:14:05 +02:00
J-P Nurmi
9495309622 Exclude QIcuCodec when QT_NO_TEXTCODEC is defined
Change-Id: Iec0178c427abcc1c79e4fe6ef449d399ac8ca363
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-16 11:02:43 +02:00
Sergio Ahumada
1e3269c086 network: Fix missing or improper include guard in headers
Use an include guard in headers to ensure the header is not included
more than once. Make the header guard match its file name.

Also, cpp files should include their own headers first (but below config.h)

Change-Id: Iecf5da23c0f8e6d457f67657b88ef7557bde9669
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-15 23:54:45 +02:00
Sergio Ahumada
4eab96732e concurrent: Fix missing or improper include guard in headers
Use an include guard in headers to ensure the header is not included
more than once. Make the header guard match its file name.

Also, cpp files should include their own headers first (but below config.h)

Change-Id: I902c8936382f5c1a8e0de7dbf49e5423f9b72bbe
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-15 23:54:29 +02:00
Sergio Ahumada
9bedada232 gui/opengl: Fix missing or improper include guard in headers
Use an include guard in headers to ensure the header is not included
more than once. Make the header guard match its file name.

Change-Id: I29b41e9d33e4ea17165f44c49de0a963574dd809
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-09-15 23:54:23 +02:00
J-P Nurmi
7329ad3ee5 Attempt to stabilize QMenu auto tests
Change-Id: I7d8260570a280182990d78e07d696aa4b46e1747
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-09-15 19:35:25 +02:00
Laszlo Papp
83b1ed1ea8 Make maemo scope syntax in project files more generic
It is necessary to use the n9 device file for now in scratchbox or/and on the
community open build service because the maemo platform mkspecs file assumes
that a cross-toolchain is used all the time. If no platform file is used, then
for instance certain plugins may not be built in general. There is currently an
ongoing issue with the meego plugin for context management in the Harmattan
components project. That is currently not built due to this issue, so no
orientation works in those applications.

The nice solution would be to make the maemo platform file work with cross and
native toolchains as well, but that requires a decent amount of investigation
and work. Thereby, the scope is extended this way for now.

Change-Id: I172c7d152bdbb2db279526d9fd1ca5648d0cd0a9
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-09-14 19:07:15 +02:00
Rafael Roquetto
31f94e0285 Blackberry: fix tst_QFileInfo::fileTimes()
The Blackberry OS uses a filesystem with the noatime option,
which returns a "wrong" access time.

Change-Id: I04cdb899699e819a36e0917e30d750067b33388d
Reviewed-by: Tobias Koenig
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-09-14 19:07:15 +02:00
Kai Koehne
823e119fa8 QErrorMessage: Use qInstallMessageHandler instead of qInstallMsgHandler
qInstallMsgHandler got deprecated in Qt 5. Use qInstallMessageHandler instead.

Change-Id: Ie1156ca11eb6be555c681007ddc230978211d029
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-09-14 15:23:15 +02:00
Kai Koehne
1dd4790aee Autotests: Use qInstallMessageHandler
qInstallMsgHandler got deprecated in Qt 5.

Change-Id: Ib36983e66b3a8090b99f14e3fd4e210602a3f018
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 15:23:15 +02:00
Martin Smith
14f7eb86ca qdoc: Refactoring of qdoc data structures
This commit is the beginning of a significant
overhaul of qdoc. A new class, QDocDatabase, is
added, which will eventually encapsulate all the
data structures used by qdoc. In this commit, the
Tree class is made private and only accessible
from QDocDatabase. Several maps structures are
also moved into QDocDatabase from other classes.

Much dead code and unused parameters were removed.
Further simplification will follow.

Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-09-14 15:23:15 +02:00
Laszlo Papp
817a447467 Fix the comment for the maemo mkspecs since it does not work for fremantle
See the bug QTBUG-18361 for details.

Change-Id: Idbe2043c07cca795e8e2fca8204993dfb0a11988
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 15:23:15 +02:00
Laszlo Papp
940a4d0318 Rename the N9 device mkspecs folder to match the *-maemo* regex
Change-Id: I0c7b74d67f44d776a74671d38bbc0f2424974c2c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-09-14 15:23:15 +02:00
Sergio Ahumada
0a37bcf245 Mark (non-public API's) ctor's as explicit
Make C++ class constructors that can be used with only one
required argument 'explicit' to minimize wrong use of the class.

Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 15:23:15 +02:00
Joerg Bornemann
26b6cce44b remove usage of QT_MAKEDLL in favor of the new QT_STATIC macro
Change-Id: I411cab0d92a8cad6b4f3676afe5cee050c4b789b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 15:23:15 +02:00
Thiago Macieira
d4170585f0 Remove support for Intel C++ 7.1 and 8.0
Those compilers are old and untested. Qt is only tested with ICC 12.1
and 13.0.

Change-Id: I3a5fa9452de27a61ee087700cc054a76fe4160ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 15:23:15 +02:00
Miikka Heikkinen
1438ad5d30 Fix repaint issue when resizing a window in Windows
QWindowsWindow::handleWmPaint() cached the device context it got from
BeginPaint call and used that for the window when the backing store
blitted itself to the window. The problem with this device context is
that the clipping region is set to only encompass the newly exposed
areas, which means any changes caused by the resize on the previously
exposed area were not repainted.

Fixed by removing the DC caching. The benefit was minimal anyway.

Change-Id: I8bd3c4031432ce6b52434c80bfe65d35d9feae49
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-09-14 12:39:30 +02:00
Jerome Pasion
77cd2f6797 QDoc manual: ordered command list
Some commands were not listed in alphabetical order.

Change-Id: I299abe145ca0f9d63c9ceefb801f5c53548e7938
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-14 11:51:23 +02:00
Samuel Rødal
d086c2abaf Documented QtOpenGL classes that have better replacements as obsolete.
These have new replacements in QtGui since Qt 5.0.

Change-Id: I20e8fdd4e9c14d8c626eda3072217af1858bf492
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-14 11:46:39 +02:00
Julien Brianceau
6a15a784f4 qpa: avoid useless resize in DirectFB platform
Check current size before resizing QDirectFbBackingStore through
its resize() method to avoid useless deallocation/reallocation.

Change-Id: Idc32eb20d3d3cac988fa9dd2feb80910303f5763
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-09-14 11:40:59 +02:00
Pekka Vuorela
5f974a4faf Avoid deprecated QTest method in unit test
Change-Id: I1d6fc84962ba29a8963f99b87cccb4af465a2935
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-09-14 11:18:17 +02:00
Pekka Vuorela
9a8881fd59 Remove deprecated QInputMethod::visible()
Replaced with isVisible()

Change-Id: Id47683954e89c53e73fc5171977609de7f1b4245
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-14 11:18:07 +02:00
Simon Hausmann
d580eb2390 Fix compilation on Harmattan
The GLES2 libraries on Harmattan do not provide a typedef for GLChar.  Work
around it here by adding it. The Kkronos headers specify GLChar as a typedef to
char, so if an implementation already provides it, then this doesn't do any
harm.

Change-Id: I0848b72b81fcc602dc8d9eecefdacb5436163040
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-14 11:15:01 +02:00
Sergio Ahumada
34cd8fd566 tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running
empty/inapplicable test functions.

Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-09-14 06:24:38 +02:00
Thiago Macieira
6fd1895b91 Move QRecursiveMutexPrivate to qmutex.cpp and mark inline
Disassembly of the optimised code shows that the compiler was already
inlining the bodies of one or both functions (since they're in the same
.cpp, it's allowed to do that).

However, since there was no "inline" marker, the compiler was also
emitting an out-of-line copy, which wasn't used by anyone, as the class
is not exported.

So add the marker. To make sure that they don't get used by accident
elsewhere, the class is moved to the .cpp file too.

Change-Id: Iead578ec9c7d8dd6b4e6bb582ce5b829cdec5992
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
bd5b4de839 Remove QBasicAtomic::tryLock with a timer
The non-futex implementation does not support timed locks in
QBasicMutex. That is only supported in QMutex (due to the
destructor).

Change-Id: I46d33a66a36e05c8a4344823537178e80a6ddd76
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
0cc97411d5 #include the qmutex_xxx.cpp at the end of qmutex.cpp
This produces slightly better inlining results.

Change-Id: Ie86471577f888cb2d9c9989306ec69ce0a296108
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
70ff7d097b Use storeRelease to unlock a mutex instead of fetchAndStoreRelease
We're not checking the result anyway, so use a simpler operation.

Change-Id: I8c2db35be86660b29d81dd97ce3e269de55a37df
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
f587e8f4fd Avoid calling QElapsedTimer::nsecsElapsed before the first futex sleep
The first time we're going to sleep, the timeout should be exactly the
value that was passed by the user. We don't need to calculate the time
elapsed between start() and a few lines below.

Change-Id: I99c363b6f0ecfd07ad787b79b75e61771733c2b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
d8eb52fc45 Split the timed mutex lock from the non-timed lock functions
Non-timed mutex locks are by far more common, so let's try not to
penalise the locking of those with code that won't get used that
often.

Change-Id: I37f56d6429836467fdec2e588c0fb22d914b5d75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
fc174a3728 Simplify the futex lock loop: no need for nested while
Once we enter the inner loop, we never exit it except to return from
the lockInternal() function, so the rest is never executed again.

As a consequence of this, we won't try to fastTryLock() twice per
mutex. Therefore, for a non-recursive mutex, if lockInternal() is
entered, we'll definitely need to use futexes.

Change-Id: Ice617ed27449c1fbdc112a159a86cd0660125e13
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
30bea611df Make QBasicMutex be exclusively non-recursive
Dispatch to the recursive mutex functions from QMutex::lock, tryLock
and unlock.

This has the benefit that those using QBasicMutex will not go through
the testing for recursive mutexes. It simplifies a little the code for
those users.

For the users of QMutex, the code required to perform a lock does not
appear to change.

Change-Id: I0ca9965e012b283c30f1fab8e9f6d9b3288c2247
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
870bd84a4e Don't recheck about timeout == 0 during mutex locking
If the timeout wasn't zero, it can only become zero if we return from
futex() with a non-timeout reason but subsequently expires while we're
recalculating something.

A side effect is that we try-lock a non-recursive mutex exactly
once. Before this change, we'd fastTryLock() twice even with
timeout == 0.

Change-Id: I0af09fc2a84669a683a843fcf1513203b075dfb7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-14 03:45:50 +02:00
Thiago Macieira
3acaa648f0 Hoist the recursive mutex check out of the inner loop
A non-recursive mutex doesn't suddenly become recursive, so we don't
need to check it multiple times.

Change-Id: Id040254b6142d320a7bd3111491082ad09968404
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-14 03:45:50 +02:00
J-P Nurmi
c40af42658 QtDBus: added missing QT_NO_DBUS guards
Change-Id: If3bbba7765a4949e5a7aefca063dc56c21c06687
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 01:02:17 +02:00
Jan Arne Petersen
a386194f99 Fix QDBusServer with more than one connection
Create a new QDBusConnectionPrivate for every new connection in
qDBusNewConnection instead of creating a single QDBusConnectionPrivate
in the QDBusServer constructor which gets assigned the latest connected
DBusConnection in qDBusNewConnection (and loses track on all previous
DBusConnections).

Also extend tst_QDBusConnection::registerObjectPeer() test with multiple
connections to the server.

Task-Number: 24921
Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 01:02:06 +02:00
Thiago Macieira
019bb22ff1 Add qdbusconnectionmanager_p.h to the HEADER list.
Change-Id: Iacba510beb0ee72182931e97044eaa5b46df30af
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2012-09-14 01:01:52 +02:00
Thiago Macieira
f0fb53dec3 throw() is C++, so don't use it in C mode
Q_DECL_NOTHROW is used by qVersion(), which can be extern "C".

Change-Id: If71f3bc3a0df3e8321237e5ac9f3bea82380c1e4
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 01:01:08 +02:00
Mark Brand
af7a0ee55f config.tests/arch: make distclean on the test, not qt
Additionally, qmake no longer needs -o since we are in the project
directory.

Change-Id: I89dbe829c064663b653e8f747f0849d63ceb367e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 00:06:41 +02:00
Thiago Macieira
81b00670f2 Use QElapsedTimer instead of QTime to measure elapsed time
QElaspedTimer is a lot more efficient.

Change-Id: I66d9514108f800a45181d8960b01a5e7d3fa9e80
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-13 22:40:34 +02:00
Thiago Macieira
53a7778b90 Increase the fuzziness of the QSemaphore test to 50 ms
The test tries to acquire a semaphore that isn't ready, so it will
timeout. The test is working properly.

The only problem is that 10 ms is too strict. For a wide variety of
reasons, especially since the Qt CI system runs multiple tests in
parallel, the program may not run again in that 10 ms window.

Change-Id: Ic0f684895f73646db5f1cc783fe9ef75fb1ab02b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-13 22:40:27 +02:00
Markku Heikkila
d1d4647b74 Fixed: QFileInfo::lastModified() returning wrong value.
Fixed so that empty QDateTime is returned for non existing file.
Fixed also created() and lastRead() to return empty QDateTime for
non existing file.

QFileSystemEngine::fillMetaData() returned true for non existing
files. This was also corrected.

Task-number: QTBUG-25811

Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
2012-09-13 19:33:08 +02:00
Venugopal Shivashankar
a42f1f9a50 Doc: Marked the QUrlInfo class documentation as \internal
Change-Id: Ib84c9ffc181edf17850d5334c95c035428d31b6c
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-13 19:33:08 +02:00
Caroline Chao
cecc2c6851 Test: Redo remove QSKIP from printsupport tests
Redoing 5704cbc462

This can't work, because the define comes from qconfig.h, not qmake.

Skipping initTestCase and cleanupTestCase when QT_NO_PRINTER is
defined.

Change-Id: I2527c018294b7518a4692f2c93da933848640b5d
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-09-13 19:33:08 +02:00
Mitch Curtis
906f62c545 Fix QAbstractItemModel documentation errors.
Added a dependency on the qtwidgets module to qtcore.qdocconf so that
it has access to widgets examples. Also added examples/widgets to
exampledirs.

Change-Id: I7a69f51d51b65bd534950f0df5b348d6ef61a5d9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-09-13 19:33:08 +02:00
Geir Vattekar
7ec469e900 Doc: Fix snippet bug in Getting Started Qt
Change-Id: I9c8caabee4c6f6131a69851586ef992138beb211
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-09-13 19:33:08 +02:00
Mitch Curtis
a3729b82c8 Fix QPrinter documentation errors.
Removed documentation for non-existent functions and added
external-resources.qdoc.

Change-Id: I5159540d8304dd6e2e452be11404d40fc599a2a7
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-09-13 19:33:08 +02:00