Commit Graph

4921 Commits

Author SHA1 Message Date
Caroline Chao
8bf2c47080 CodeCoverage: Exclude all header files from intrumentation.
Currently only a small fraction of all the headers are included since only
the headers found in the pro file folder are included.

This is confusing and arbitrary. With this change all the headers are now
excluded from the instrumentation.

Change-Id: If4322421f3b3e5fcd45f006421690eaa6bf645e0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 07:52:44 +01:00
Kurt Korbatits
95c5be8bc1 Changed qchar unittest to check return from QFINDTESTDATA
- Changed qchar unittest to check string QFINDTESTDATA
  returns is not empty.

Change-Id: Idb3997aaa5d5220272915c1e2538175205b3d6e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 05:43:39 +01:00
Kurt Korbatits
c5b928207e Fixed qlocale unittest to install subprogram syslocaleapp correctly
- It was trying to install syslocaleapp sub program as TESTDATA
  instead of an application.

Change-Id: I2117d11335bc2fd37a8ccc9a03b0337382f0177f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 05:43:19 +01:00
Kurt Korbatits
41b2992422 Changed qdir unittest remove() to check actual file removed
- Changed remove() test to check the file just removed is gone.

Change-Id: I0b6c176e624134402b5547866064f436ce063f16
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 05:43:17 +01:00
Kurt Korbatits
bc323b6fd3 Changed qlogging unittest to install subprogram
- Added install of app sub program so it works from install directory

Change-Id: Ia83643519752a3cbb59d6da2aed132d683a94bee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 05:43:15 +01:00
Kurt Korbatits
5dd470aca6 Fixed qdir unittest rename() test to skip if run as root
- subtest not valid if run as root so added a check and skip

Change-Id: Iae993e20f272f9303a75062ef00d22b49df5e84a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-01 05:43:12 +01:00
Giuseppe D'Angelo
eafc667136 QRegExp: fix \i \I \c \C \p \P escape sequences
Those escape sequences have a special meaning in the XML Schema 1.1
regular expressions, but not in Perl-compatible ones.

An escape sequence that has no special meaning should match the
escaped character itself; this patch fixes QRegExp's behaviour in
that regard (previously, it added a character class matching
nothing).

Change-Id: I983f923baa7c2ec19938b96353f3a205e6c06d58
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-01 00:09:57 +01:00
Holger Hans Peter Freyther
f885a526ac SHA-2 code does not compile on FreeBSD
The code fails to compile with the below error:
qcryptographichash.cpp:55: error: conflicting declaration 'typedef quint64 uint64_t'
/usr/include/sys/types.h:99: error: 'uint64_t' has a previous declaration as 'typedef __uint64_t uint64_t'

FreeBSDs types.h defines the used defines. Maybe it would be less
ugly to switch the code to quint*, or use a define to do so, or to
have basic os detection for stdint.h, not to include sys/types.h.

Change-Id: Ic62ae4b742c1123b4b7e17158d216374e609f59f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-01 00:09:57 +01:00
Andy Shaw
221fe8776b Add support for XCode 4 into qmake
This adds support for XCode 4 into qmake and also indirectly fixes a
couple of problems that are relevant for XCode 3.2 too

Task-number: QTBUG-17247
Change-Id: I722470ad1854bd740cbbd28ff4956057a0e1906b
Reviewed-by: David Forstenlechner <dforsten@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit b5871311457ca97816c0abbb8b935570bbfb657c)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-01 00:09:57 +01:00
Shane Kearns
46e4a9d523 Windows - fix getsockopt calls for narrower than int options
Windows unhelpfully writes to only one byte of the output buffer
when getsockopt is called for a boolean option. Therefore we have
to zero initialise the int rather than initialising to -1 as was
done before.
This in general only works for little endian architecture, because
the word would look like 0x01000000 on big endian. So I have added
some compile time asserts in the assumption that windows is always
little endian. This is ok for comparisons with 0/false, but not
comparisons with true or nonzero values.
In the case of IPV6_V6ONLY, it is documented as DWORD (unsigned int)
but on some windows versions it is returned as a boolean triggering
the warning. I removed the warning, as the conversion to int works on
both LE and BE since it is only compared with zero.

Task-number: QTBUG-23488
Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-03-01 00:09:57 +01:00
Robin Burchell
b147da00c5 Remove qhash_faster.
It's not faster under _any_ metric than the new algorithm, and it loses a lot of
spread which is a bad thing.

Change-Id: Ic87258f1c887822ffea1cb1517355564fabc3c26
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-29 22:39:00 +01:00
Robin Burchell
1f4804452c Copy Qt 4's QString hash algorithm.
We must do this the same way we do all other hash algorithms for fair
comparison, as otherwise, the call to the PLT unfairly penalises
QHash<QString>'s results, as it's in a different shared object.

Change-Id: I69c891f5a97dcccdfcfbdbf32796f86242a42963
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-29 22:39:00 +01:00
Robin Burchell
57004b7fda Move data generation to initTestCase() method and store the results.
Per the comments on Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e, having Q_ASSERT
was not a good idea, and data functions can't really handle
QVERIFY/QCOMPARE/etc, so do this in initTestCase instead.

Change-Id: I19e61dec7fe415bb1fa0f53a2920d99b8c7c8ea7
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-29 22:39:00 +01:00
Robin Burchell
0f3d9b1d84 Add test data for string forms of numbers.
Similar to the UUID benchmark, but won't have any non-numerical characters.

Change-Id: I7487c97cab96fd53c180fe12061e7be3ca96e883
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-29 22:39:00 +01:00
Robin Burchell
693a286600 Add a test using lots of similar strings.
This attempts to emulate a dictionary usecase of sorts, done in code to avoid
bloating the git repository by adding an actual word list.

Change-Id: I878bc4af8877ba780ee699932f240c0d9c8ff12c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-29 22:39:00 +01:00
Morten Johan Sorvig
8034bc9e83 Don't use deprecated QWheelEvent::delta()
Replace with pixelDelta() and angleDelta().

Change-Id: Ie4b8b6fd39a5f8a28433554000940faef2f2542c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 21:05:01 +01:00
Morten Johan Sorvig
0d68a5aabf Remove Mac qDebug ifdefs.
Make qDebug work again with the new logging framework.

Change-Id: Ib88a83182429636b274d6284933d5ea00db7279c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-29 21:04:46 +01:00
Friedemann Kleint
3a72a1c7ed Refactor the QPA dnd interface.
- Give QPlatformDrag a synchronous drag() function returning
  the Qt::DropAction
- Move the base functionality for asynchronous event handling
  to the platformsupport library as QBasicDrag (extendable base class
  handling drag icon and providing new virtuals)  and QSimpleDrag
  (sample implementation for drag within the Qt application).
- Change the Windows implementation accordingly.
- Change XCB to be based on QBasicDrag.
- Clean up QDragManager.

Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-29 20:10:30 +01:00
Miikka Heikkinen
70784b9069 QFileSystemModel autotest fixes
For some reason, hiding files via executing "attrib +h filename"
process didn't work realiably, so changed the file hiding to be done
via Windows native API.

Also changed the test to use QTemporaryDir to simplify temporary
directory handling a bit.

Task-number: QTBUG-24291
Change-Id: I4f02b16e2f9105bcf5e6c5bf136f55434a26e2f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-29 20:10:21 +01:00
Shane Kearns
7d5b0e2b04 network cookies: check "example.com" != "example.com."
Only test code change, we already have the correct behaviour

Task-number: QTBUG-20001
Change-Id: I2296f405f47f9c8d15796e69f9d1854063e38d6a
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-29 17:46:06 +01:00
Stephen Kelly
56612a555d Fix the include dir used by the CMake config files.
I missed this one in 018e78575c

Change-Id: I194b96d2b1a64025ddb17fe2ed81566838555e13
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 17:43:00 +01:00
Laszlo Agocs
d87edf4e3e Remove internal class QVolatileImage.
This made sense only for Symbian where there was a special
CFbsBitmap-based backend present and it was used from the
Symbian-specific VG and GL pixmap implementations.

The generic version is merely a useless wrapper over QImage and is not
in use anywhere in the codebase.

Change-Id: I1dabe22dfb8cbbc35dce8e22703a3aff810fb5f9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-29 17:39:01 +01:00
Jamie Kirkpatrick
3b80f1c4d5 Fix a double-release when loading NIB files
Change-Id: I0c2c2a932b433a84e136da8e262739951a1d8c6e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-29 17:20:06 +01:00
Jason Barron
76afa1556c Make QJsonPrivate::String compile on big endian platforms.
Was missing a variable declaration and an explicit cast.

Change-Id: I4f0fb9c3d9b8472adf0d91036442adc1fe255c7e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-29 17:09:00 +01:00
Friedemann Kleint
bcb0f28a4d Fix tests of QMimeDatabase.
- Use temporary directories to avoid instabilities
  due to remains of previous failed tests and locked
  directories.
- Replace SRCDIR by QFINDTESTDATA(), reference only
  the freedesktop.org.xml contained in the Qt source
  tree by $$QT.corelib.sources.
- Improve some error messages, test suite instructions
  for Windows.

Change-Id: Idee8e3767ef0a8299df3bdaaac20334164878db0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-02-29 16:52:19 +01:00
Morten Johan Sorvig
39e616c159 QPlatformTheme: Add virtual destructor.
Change-Id: I78aab57cc16ef4542bfb88c81dd6a9d8b4c4d853
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-29 16:52:13 +01:00
Friedemann Kleint
9b5cdccc02 Skip test tst_QTextScriptEngine::thaiWithZWJ on Windows.
Change-Id: I9286ae8b1200b2d6638d1257a872450a9886fce0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-02-29 16:52:02 +01:00
Stephen Kelly
98ecbf1f50 Fix build of QImageReader tests with QT_USE_QSTRINGBUILDER.
Change-Id: I789d99d0741bc178d2d7fd82558edc684eb6daf8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 16:51:17 +01:00
Stephen Kelly
e28be90dea Fix build of QWizard tests with QT_USE_QSTRINGBUILDER
Change-Id: Id276cdb9b84c61bf75a5bde149142f39f52f563e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 16:51:07 +01:00
Donald Carr
8dfc86e0d6 Remove Mac/QPA collision breaking library linkage
Prior to this change, explicitly passing -qpa to configure breaks compilation on Mac. This is due to a false dichotomy between MAC/QPA

Change-Id: I52cacf96ae8d8d203787f9bbade417f2c55ab3f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-29 12:24:36 +01:00
Samuel Rødal
636e5c5d64 Added helpful notice in configure about how to enable the xcb plugin.
This should make it less confusing for people building Qt 5 on Linux.

Change-Id: I3aa7151f790587d5944c837d701b1b1b580b4bc3
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-29 09:04:37 +01:00
Rohan McGovern
99b997c4d5 Cleaned up examples/opengl/cube/cube.pro, removed message()
It's arbitrary and confusing to put a message(OpenGL support is enabled)
in this one OpenGL example and no others, especially since the message
is output during configure.

Change-Id: I7b55868d10c288f3459a7fda594fea1e6f45bf9a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-02-29 03:09:38 +01:00
Jason McDonald
b804b81288 Remove unused selftest data file.
The private git history shows that the test program associated with this
data file was missing from the original commit and was never
subsequently added.

Change-Id: I3401724ac04168158a48eb06436db83d3557711f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-29 01:38:31 +01:00
Thorbjørn Lund Martsum
e500946de9 QHeaderView - remove sectionCount variable
A previous patch ensures that we have exactly one section in a Span.
( see SHA : b800d8b94a )

Therefore we no longer need the sectionCount variable. We have
assess to it through the sectionSpan.count.  To keep this patch
quite simple the variable sectionCount has been changed to a
function returning the count value.

Change-Id: Ibc419eafa38ab64b08f93074cb6ae4b8518995f6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-29 00:05:38 +01:00
Stephen Kelly
6363672163 Add support for QT_NO_SIGNALS_SLOTS_KEYWORDS
QT_NO_KEYWORDS can be used for example to ensure that foreach can
not be used, but Q_FOREACH must be, that slots must not be used but
Q_SLOTS must be, etc.

Typically they are used to avoid symbol conflict with other
libraries that may use the same keywords (I think boost uses
signals).

For 3rd party libraries, it makes sense to use Q_SLOTS and Q_SIGNALS
instead of slots and signals, so that downstreams can still choose
to use QT_NO_KEYWORDS in their code.

The most convenient way to enforce that currently is to define
QT_NO_KEYWORDS when building the 3rd party library. However, that
has the inconvenient side effect of making foreach, forever and emit
not usable within the library implementation.

This patch makes it possible for the 3rd party library to use
QT_NO_SIGNALS_SLOTS_KEYWORDS to exclude signals and slots without
affecting whether the other keywords can be used in the library
implementation.

Change-Id: If1e16a4fa384bd3a2ddd737143499f8b587bc4f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-29 00:05:38 +01:00
Marc Mutz
aac821c220 QRingBuffer: make constructor explicit
This is a private class, but it's so close to
the classical Stack(int) example for explicit
that I just have to make this ctor explicit,
too:

   QRingBuffer rb = 0; // oops: meant '*rb'

now no longer compiles.

Change-Id: I7d58c1f08c1b14d14930426159c5c8db71b4cf4d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 00:05:38 +01:00
Hib Eris
1e3015d8f4 Activate replacements when installing .pc files for win32
Change-Id: Iaacbe8528bdbe1c1fca60ae8c94625e951f14554
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 00:05:38 +01:00
Marc Mutz
b72bcea864 QPair: don't copy-initialise 'first'/'second' in the default ctor
Why would we want copy-initialisation if we can
have the default constructor?

Change-Id: Id2de36d42ef9f63793ff4e3ec36202d3f2bf5f30
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 00:05:38 +01:00
Hib Eris
525d98725b De-duplicate platform-dependent paths
Change-Id: Ifee9f05fc8d924877f24edfddb0dc5e324a29080
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 00:05:38 +01:00
Marc Mutz
4a82f78dea QPair: remove user-defined copy assignment operator
The compiler-generated copy assignment operator is fine,
and the user-defined one prevents the compiler from
synthesising a move assignment operator.

Change-Id: I044104a2fd4d7522a910d5c2a68d11dabeca99c4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-29 00:05:38 +01:00
Hib Eris
78faefdbb1 Implement missing replacements when installing .pc files for win32
This implements replacements for win32 makefile generators similar
to the replacement functionality in unix makefile generators.

To enable Makefile code generation for replacements in win32 makefile
generators, you must set QMAKE_STREAM_EDITOR to e.g. sed.

When building for win32, sed is normally only available in the
mingw/msys build environment and when cross compiling on unix.
In these cases QMAKE_STREAM_EDITOR is set to sed in qmake.conf.

For other win32 build environments QMAKE_STREAM_EDITOR is not set
in qmake.conf and the replacements Makefile code is not generated.

Change-Id: Ie5de5d517eafaeaa2544f1e972aec3fe11d0a6f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
672e5a4e88 don't abuse $$fromfile() for inspecting entire projects
a project can rightfully expect a sane environment. $$fromfile() does
not necessarily provide that. so instead use include() with a target
namespace.

Change-Id: I8d6d30ab1b760d4930c9b4453bc92f8f8ad0b0ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
65b42dd4c8 look for mkspecs in the project root, not next to every project
qmake would look for mkspecs/ in the directory containing the current
project file. this makes completely no sense with recursive projects:
a) nobody would make per-project specs and b) specs meant to be global
would not be found.

consequently, we look for a project root when starting qmake and use
only that directory.
if .qmake.cache is found/set, we assume that to be the project root.
otherwise, we search for mkspecs/ the same way we search for the cache -
just to up until we find one or hit the root. if we are shadow-building,
search the build dir as well.

Change-Id: Ie66b189a40c21203d956e681cbef44a89f98cd17
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
e05d5c36be factor out code to install default mkspec
Change-Id: I15f371df7bc24cd85c1c0924d1929da4dc3db16d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-29 00:05:38 +01:00
Jason Barron
fa1b9070af Add a new qmake feature to support OpenGL ES 1 apps
This is a convenience to make it easy for applications to simply add:
    CONFIG += opengles1
To their .pro file to link against OpenGL ES 1.1 instead of OpenGL ES V2

Change-Id: I48605f5f69f83d99cfb2ad6dbb4b318d41e00128
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-28 22:35:24 +01:00
Stephen Kelly
018e78575c Make the CMake files work with directory overrides.
This allows us to create correct CMake config files when Qt is
configured with directories outside of the prefix (which Qt allows),
and also allows us to use correct values when a 'longer' relative
lib directory is used such as lib/x86_64-linux-gnu.

Change-Id: I6f88255a23752dc5b84cb20ce13fdeeee9d5ad51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-28 21:07:16 +01:00
Bradley T. Hughes
c7a059e376 Compile SHA-2 code on systems without stdint.h
stdint.h is a C99-ism, which isn't available everywhere. The sha.h
header tells us we need 4 typedefs. Add these to qcryptographichash.cpp
before including sha.h and comment out the stdint.h include in sha.h.

Change-Id: I1ede9569fa7eaa84de3befeb3c58cc6a05aa522c
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-28 18:53:32 +01:00
Friedemann Kleint
f3b68e352e Skip QLocale test on Windows, improve process handling.
- Skip the failing windowsDefaultLocale() test.
- Improve the handling of the subprocess, locate
  the binary in initTestCase instead of repeatedly searching it.
- Make all applications console/non-app bundles.

Task-number: QTBUG-24543

Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-28 16:52:02 +01:00
Pekka Vuorela
44174332c9 Rename remaining references to QInputPanel
Change-Id: I747d37d10c78af6ad00322d5bd8d29c6b343828c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-28 14:38:36 +01:00
Miikka Heikkinen
b491d02eb3 Fix QLibrary autotest for Windows
The libraries were built into wrong directory in Windows. Fixed it so
that the libraries are built into debug and release directories like
the test executable.

Also fixed QMAKE_CLEAN statement, which was using incorrect separator.

Task-number: QTBUG-24151
Change-Id: Iade656af5f83ef2b79c2b9c4177df4a16b2f6821
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-28 12:45:28 +01:00