Commit Graph

2605 Commits

Author SHA1 Message Date
João Abecasis
5658572a27 Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6
This no longer necessary template specialization went unnoticed inside
the Windows/Symbian #ifdef. It breaks compilation on those platforms,
now that qstringbuilder.h is not included and QConcatenable is unknown
to the compiler.
(cherry picked from commit 9e656ce0f7bda4bca4ae55a7aefe1617bc2805ac)

Change-Id: Ie7145c25bca01b808fa6a3fd99e34baa8375d304
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:48 +02:00
João Abecasis
fd61059d35 Fix QTemporaryFile regressions and new found issues
With this change, the file template is always processed in original
QString format. Trying to generate native paths before adding a missing
placeholder mask could change the meaning of templates, such as "." and
"..", which are now tested to mean "..XXXXXX" and "...XXXXXX",
respectively.

After ensuring the template includes a placeholder mask, the path is
converted to a native *absolute* file path and the mask is sought for
again. On Windows, native paths were already absolute. On Symbian, we'd
need at least a clean path, as "." and ",," are not natively understood.

There is a requirement that the placeholder mask /XXXXXX+/ makes it
through this conversion unaltered, which relaxes prior requirements on
*nix platforms. On Windows and Symbian the conversion is under Qt's
control and not user-configurable.

Reviewed-by: Shane Kearns
(cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6)

Conflicts:

	tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Iac823881c865adf0931dc4f429c6c1ef135eeb56
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:42 +02:00
João Abecasis
c9fde0d590 Use "native paths" on POSIX platforms as well
And don't rely solely on "local8Bit" conversions.

QFile defines an API for overriding how encoding conversions are done
for filenames. In generating unique names, QTemporaryFile ignored that
API and hardcoded the use of local 8-bit, implicitly assuming that that
was appropriate.

With this change, we switch that assumption to one where user supplied
encoding function keeps the byte value of 'X' and '/', also assuming
that encoded 'X' takes up a single-byte (i.e., the byte sequence for
"XXXXXX" remains unchanged).

There was also, and there still is an assumption in name generation that
byte values for ASCII alpha-numeric characters are valid in the "native"
encoding.

In practice this change is compatible with UTF-8, Latin-1 and other
ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is
relevant here.

Reviewed-by: Denis Dzyubenko
(cherry picked from commit 0de701d01cb221464eed773fd3751aff73fe4d60)

Change-Id: I9ee0fe8e3cad48694d5ec9a2bedd5412cfc0d172
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:34 +02:00
João Abecasis
69dd45c2d8 Cleanup #includes
These are already required and included by qfsfileengine_p.h.
(cherry picked from commit a153d50eea2dea0925695a90af2c12f1887a9020)

Change-Id: I9efb635373239f6e6778eb4a3ee85c396cfeeeb5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:26 +02:00
João Abecasis
f4f729cb7b Atomic implementation of create file and obtain handle for Win/Symbian
Besides generating a unique name, createFileFromTemplate now also
acquires a file handle on all platforms. The file engine's native handle
is passed by reference and modified in place.

This fixes a long standing security issue on Windows.

On Windows and Symbian platforms we directly use the "native" file path
when processing the template and generating the unique name. Since the
native encoding is known, conversions at this point are safe.

Errors other than "file exists" are propagated to Q(Temporary)File,
and result in a failure in open(). The changes also unify error handling
and should give consistent behaviour across all platforms.

Worthy of note, there's a change in behaviour on Windows and Symbian:
fileNames returned by QTemporaryFile on Windows and Symbian are always
absolute after open has been called. This has to do with how
QFileSystemEntry::nativeFilePath works on these platforms. (Test was
updated to reflect change in behaviour.)

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit ff9b69838ec146aeb43d4af8a03043f9c5f0454d)

Conflicts:

	tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Ibc9affb321ea4f4b193efc1f7336c9770b43d8df
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:18 +02:00
João Abecasis
a4a09488ee Minimize encoding conversions when generating unique file name
With minor adjustments, createFileFromTemplate is made to work directly
on (UTF-16) QString data, which is already in the native encoding for
Windows and Symbian. This is possible because the function only fills
out the placeholder sub-string, without touching adjacent characters.

This eliminates unnecessary conversions on those platforms.

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit 9a76587363a2f37312326286e08cce502f7fe27e)

Change-Id: I8732b88ece5e2befb2da2e717758954c9aa7e5b0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:09 +02:00
João Abecasis
b3ca1d4a84 Use QStringBuilder when copying template for modification
This avoids modifying the original string in the case where a
placeholder marker is not found. By marking the variable const we
further avoid checks on the reference count and detaches, also allowing
us to safely reuse it later in the function.

The new approach also fixes an issue where suffix wasn't empty, but the
toLocal8Bit conversion would be. This resulted in a buffer overflow
inside createFileFromTemplate.

Reviewed-by: Shane Kearns
(cherry picked from commit d71d3b1ce31ffc585258330d825ff8ea535254ef)

Change-Id: I6cb3fbc6c653d8a881426fddbc433826365d4816
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:03 +02:00
João Abecasis
6d8963971a Make Symbian follow Windows code in temporary path generation
On the one hand, we stop using OpenC here. On the other, we no longer
use an atomic create and obtain file handle API -- just as we don't on
Windows yet.

This is a stepping stone to removing back and forth conversions of path
names when generating unique names and also towards the use of native
APIs for creating and obtaining a file handle atomically.

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit 63bb67d3107b03f399cddf4c9cca9c7eb347b62d)

Change-Id: I97b3b6179dff053807acc8d4469fdf57f57f68a6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:19:56 +02:00
João Abecasis
56ffec36c6 Encapsulate pointer manipulations to createFileTemplate function
, where we actually control how we use the pointers. Reduce some code
duplication in #ifdefs.
(cherry picked from commit d69788728ccd843e3d4a372680185fdf5e711c86)

Change-Id: I50aafbcac520837f9dc751e85f59a482a2f5225f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:19:44 +02:00
Friedemann Kleint
fc14bd2c92 Widgets: Remove Q_WS_QPA and qpa-sections from .pro files.
Enable compilation without -qpa.

- Remove conditionals from Q_WS_QPA sections.
- Rename precompiled header.
- Remove gui-related Q_OS_SYMBIAN-#ifdef sections.
- Leave other Q_WS code in for reference.

Change-Id: I16326b631fff483aec8edd2f7a2e7a1822eab814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-21 21:29:46 +02:00
Holger Hans Peter Freyther
c7df1af337 [directfb] Implement grab/ungrab of keyboard/pointer
Change-Id: Ie2b99bb659e324c63bfd23e96d6c89c13a8df3b4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
960502d91a [directfb] Remove grabbing of the pointer on input
This should not be done on the input level but we should handle the
requests on the QWindow to grab/ungrab the pointer

Change-Id: Ibc61b300bf8de20f576fb8972fadf18de4a142c1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
c8746d886f [directfb] Implement QPixmap::fromFile using DirectFB routines
The code is based on Qt 4.8 DirectFB support, it was reduced
in size (cosmetic changes, by using the outPtr()) and it has a
bugfix to pass loadAsBitmapOrPixmap that assumes the loadFromFile
routine will add '.png' and other extensions to the file.

Change-Id: I25b11206053c02be5c04730fba5bb42bd07426d1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
b1c803a925 [directfb] Prepare to select the alpha/opaque pixel formats
Right now we assume to use 32bpp but depending on the hardware
this might not be optimal at all. Begin to prepare the code for
not having a 32bpp surfaces.

Change-Id: Iedfa49c568559e074dfaeae2a216c9eb93721d2c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
d43775b93b [directfb] Manage the font database with a QScopedPointer
Attempt to fix a memory leak on exit by deleting the font database.

Change-Id: I07b0865c97bb8ef26950bf231b5239ca01e95c56
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
577d51ee22 [directfb] Remove some duplication in the QDirectFbBlitter c'tor.
Introduce dfb_blitter_capabilities that returns the QBlittable::Capabilities
of the DirectFB blitter.

Change-Id: Ifb803ff4f07376d5333ad2d05ff72d9a63d17fff
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
91e99d1420 directfb: Initialize m_dfb after DirectFBInit has been called
The QDirectFBIntegration is responsibe for deleting the DirectFB
instance but it can only initialize the DirectFB instance after
the DirectFBInit has been called. Change the order. This issue
got introduced by myself in 3faa89f4.

Change-Id: Ia67d439152d895e2e0a47f35eed57348c629f79f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
500dc2a6f8 [directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers
Introduce QDirectFBPointer and use it throughout the code to
fix various resource leaks in the DirectFB backend. Fix the surface
ownership of the IDirectFBSurface in the Blittable/BackingStore
code.

Change-Id: I0d4572eaab80b3558e644f26d76222461bf37bbb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
405894fc39 [directfb] Make QDirectFBInput a QThread to allow proper exits
Without this patch the application will get stuck waiting for the
IDFBEventBuffer to report an event. We will use the
IDFBEventBuffer::WakeUp function to interrupt the waiting but this
produces the below error on exit:
QEventLoop: Cannot be used without QApplication
QThread: Destroyed while thread is still running

This is solved by making the QDirectFBInput a QThread, reimplement
the run() method to handle the events. It should work as this is
only posting events to the QApplication event loop.

Change-Id: I24adf2b080f96c72ede6a5499f484ac33fdd44fc
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
acd09c21f7 [directfb] Use QScopedPointer to manage heap allocated objects
Use QScopedPointer to avoid trying to manually delete objects. For
some of the cases the leak would only be viewable when things are
getting shut down. Leave in some more warnings for cleaning it up,
e.g. the m_eventBuffer of the Input is leaked and the input task will
only stop after another key event.

Change-Id: Ic54568343605b4ab7094a7dece40e22250184a37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
9e54d1deab [directfb] Fix memory leak when passing arguments to directFB
We need to delete the array but also the elements inside it.

Change-Id: Ib61beeca569802638b9ff3b94ede79c0beebb399
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
421abf8d59 [directfb] Do not call a pure virtual function
In 688d9f6ec0 the base class
was changed from QWindowSurface to QPlatformBackingStore but
QPlatformBackingStore::resize is pure virtual now.

Change-Id: Ib36f177d80e9458e7e8e34f587e4554c0462e35c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
d8fc8aa585 [directfb] Rename class from WindowSurface to BackingStore
Catch up with the naming by renaming the file from windowsurface
to backingstore, update the class names and include files.

Change-Id: I1b16826b60c19490946a77f61518e18f8099adce
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
ab50b60f5c [blitter] Work on tst_QPixmap::clear()
By default QPixmap may not hasAlphaChannel(), only if setMask()
or fill() with a transparent color is called a QPixmap will
hasAlphaChannel().

Make the QBlittablePlatformPixmap remember if there is an alpha
channel, pass this as parameter in createBlittable to make it
clear that this is required and not optional.

Update the DirectFB plugin to handle this parameter to create a
RGB32 or ARGB Surface depending on the alpha value, also only use
PreMultiplied alpha when using ARGB. Separate the two constructors
for the QDirectFbBlitter to either adopt a DirectFB Surface or to
create one.

Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Simon Hausmann
6a7da1fb58 Fix compilation on Harmattan
Commit 87274e272d removed the maemo "specific"
bearer monitory example .ui file, but the .pro file wasn't updated.

Change-Id: I9daa000fe3e4b69789519f53541c106d01748ffd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-21 16:54:45 +02:00
Holger Hans Peter Freyther
6e13586d8b [blitter] Generate a new serial number when resizing the pixmap
The raster pixmap is generating a new serial number when the pixmap
is resized, do the same for the blitter code.

Change-Id: I05c74df7ea0f3a99ec9c24dacb41562da21c2d6d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-10-21 16:54:45 +02:00
Friedemann Kleint
b256d7b3bb Testlib: Fixed compilation with MSVC.
MSVC does not like VA_ARGS tricks.

Change-Id: I947dcb89e519c18a482a504725213a3f4d9670ff
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-10-21 16:54:45 +02:00
Sergio Ahumada
e375637fe5 Fix compiler warnings when using QT_DEPRECATED
Change-Id: If62cff5d1cbd1c8051d709db8747777606797056
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-21 15:32:14 +02:00
Laszlo Agocs
d40f4105cd Remove mtdev dependency from the touchscreen QPA plugin.
There is no reason to enforce the usage of the mtdev library. As long
as ABS_MT_TRACKING_ID is provided protocol type A is perfectly enough.

This makes the plugin more suitable for embedded systems.

Change-Id: I73ce4a1056a6dc27daacb69dc4761bca393a7e43
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-10-21 12:34:50 +02:00
Friedemann Kleint
c245a70986 qmake: Replace Q_WS_WIN by Q_OS_WIN
Change-Id: I6c63cda81a15759294321696feffa1150bd2a315
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-21 12:34:50 +02:00
Shane Kearns
25c03a888f Use QBasicAtomicInt as a static variable
QAtomicInt has a constructor, so QBasicAtomicInt needs to be used
instead to allow compile time initialisation.

Task-Number: QTBUG-20343
Reviewed-By: Olivier Goffart
(cherry picked from commit 29495592d27505feff024d574e1333809794c304)

Change-Id: Ia531c74f47daa86ba24a1b01bee36ddb1101af11
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-21 11:05:12 +02:00
Jan-Arve Saether
60b86257b8 Expand QT_TR_NOOP("str") to "str", not ("str").
This enables us to write code like :
    QStringLiteral(QT_TR_NOOP("Press"))
or just:
    QT_UNICODE_LITERAL(QT_TR_NOOP("Press"))

It also makes it consistent with the QT_TRANSLATE_NOOP3,
QT_TRANSLATE_NOOP3_UTF8 and QT_TRID_NOOP macros, as they don't surround
the string literals with parenthesis.

Change-Id: I67c30bcd88609f897bd22afb44266affa4dcfc8f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-21 10:56:24 +02:00
Sergio Ahumada
b7950b027f Fix some compiler warnings on Mac
Change-Id: I52b5c1822f9530f75eeebfcafbade6f89062e369
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 09:14:24 +02:00
Jason McDonald
dd31340245 Make testlib use #include consistently.
Change-Id: I36b5da3f832d2588072405d93143173edc29f4af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 02:52:01 +02:00
Charles Yin
ed374ed3ee Fix shadow build error for qmltest
Both $$OUT_PWD and $$PWD can't be used here, the real .pro directory
should be $$_PRO_FILE_PWD_

Task-number:QTBUG-22169
Change-Id: I0aebfe7503703fe2b264c7c47b828a8fc4ffac47
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jason McDonald
98bd270fb7 Fix misleading comment on test execution order.
When executing a data-driven test, testlib executes the _data function
once, then repeatedly executes init(), then the test function, then
cleanup() for each row of test data.

Change-Id: Icfa1dd19a52fb1debbc92b7cbe13d85bfb0418c7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jason McDonald
d766ae0457 Update QSKIP documentation.
Task-number: QTBUG-21851, QTBUG-21652

Change-Id: I3d4cf8e11756b92fe9d97f01a02c61cbf2df1556
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jason McDonald
27f9f136f7 Remove SkipMode parameter from QSKIP calls.
The previous commit removed SkipMode from the testlib APi.  This commit
removes the parameter from all calls to QSKIP.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jason McDonald
016cd01846 Remove QTest::SkipMode from qtestlib API.
When the SkipAll mode is used, tests only report a SKIP for the first
line of test data and subsequent lines are not reported at all.  This
behaviour makes it impossible for anything post-processing test results
to accurately report test pass- and run- rates because they cannot see
how many lines of test data were skipped.

This commit removes SkipMode.  QSKIPs in regular test functions and data
functions are treated the same as SkipSingle, so that every skipped line
of local or global test data is reported in the test log.  QSKIPs
elsewhere are treated the same as SkipAll -- skipping in init() causes
the next test function to be skipped entirely, and skipping in
initTestCase() or initTestCase_data() causes all test functions to be
skipped.

This commit only changes qtestlib and the selftests. A further commit
will change the autotests to remove the SkipMode parameter from QSKIP
calls.

Note that the change in expected output for the globaldata selftest is
deliberate, as the QSKIP in the skipLocal test function has effectively
changed from SkipAll to SkipSingle.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I7b1c53fe7ca9dde032810b789d967e2a402bbe5d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
2011-10-21 01:20:29 +02:00
Shane Kearns
296bc32841 Fix FTP example to handle failure to open network session
The example code only dealt with successful opening of the session.
If the session open failed, the application is stuck because the
connect button is disabled.
Moved the session open to be part of connection.
Handled session open failure by puttin the UI back in the default
state where connection button is enabled.

Task-Number: QTBUG-9909
Reviewed-By: Miikka Heikkinen
(cherry picked from commit 104c22a68c422152ff3cf03eb3615e7826fefbd0)

Change-Id: Ifa40fcd8b83c43cda364b3ec5e58f80b539aa244
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 23:56:52 +02:00
Shane Kearns
4aa4198240 FTP - fix interoperability issues with SIZE command
Certain FTP servers refuse the SIZE command in ASCII mode (proftpd)
or refuse the SIZE command in ASCII mode for large files.
This is a security feature, as the SIZE command requires reading
the whole file and counting line ends which can cause denial of
services. In binary mode, the file size on disc is reported, which
is a relatively quick operation.

Qt had two problems here:
1. when size command fails, the total size was reported as -1,
   whereas the documentation of QFtp::dataTransferProgress states
   it should be reported as 0 (so that QProgressDialog can display
   a wait note rather than progress bar)
2. SIZE command was sent before setting the type of the transfer
   to ASCII / Binary. This is a problem as the size reported by
   the server is incorrect. Also it usually means sending ASCII
   SIZE for Binary transfers, which results in the 550 error on
   FTP servers with DOS protection.

Task-Number: QTTH-1428
Reviewed-By: Peter Hartmann
(cherry picked from commit 72bf6105214bfc26cff33632f7f4bdeed9cdf362)

Change-Id: Ie1f356c34d6a04362eaca64befb00788f85c0ccb
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 23:56:40 +02:00
Tor Arne Vestbø
17eef6a4c4 Teach syncqt to handle multiple %moduleheaders directories
Each directory is separated by a ';'. The syntax was chosen over the
regular perl [] syntax as ';' was used already in other places.

Change-Id: I7a07a1facb7c08d7a9de6ec45ad57f6057cb0150
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-10-20 21:56:15 +02:00
Jo Asplin
9f1aa866bd Moved tests into integrationtests/ and widgets/
Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-10-20 19:45:41 +02:00
Richard Moore
78d02e93ac Add the ability to enable various SSL bug workarounds.
There are lots of buggy SSL servers around and to connect to them you
need to disable various features. This commit adds the ability to
disable the SSL ticket extension, the ability to disable the insertion
of empty fragments, and the ability to disable compression.

Task-number: QTBUG-21906

Change-Id: I3e1d0347a46e9030b889bbf15b2aad19b8513b73
Merge-request: 68
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 18:20:12 +02:00
João Abecasis
5b6894de87 ret is an "internal" path, no need to re-process it
Where "internal" means that it uses Qt's separator '/', regardless of
the native one.
(cherry picked from commit d4aa1777389f41da60a862a8c371d13839938d43)

Change-Id: Ic23ba0b360020b2e910b1256b38522db5c57f49b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 16:53:03 +02:00
João Abecasis
68a9e55f5a We prefer capitalized drive letters, make it so sooner
Reviewed-by: Prasanth Ullattil
(cherry picked from commit 13899108ed57548d3c4f40e595481f8ee76e4fcf)

Change-Id: I70132c19af34715c92718f9b06e4f2dfba28d255
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 16:52:53 +02:00
João Abecasis
b0a6caf84b Avoid spurious detaching in QDir::to/fromNativeSeparators
The new code avoids non-const detaching operations until needed and uses
a pointer into the "raw" QChar data from then on, thus skipping unneeded
checks on the reference count for further detaching.

These functions are used all the time by the file system classes so this
small optimization won't hurt. In particular, it will help users who
already use '/' when passing paths into Qt.

Reviewed-by: Peter Hartmann
(cherry picked from commit 773a6df46243831dee7559f90e33d7eff3c5c71e)

Change-Id: I27787e787b544a63c9ea1e4138bd548500104dff
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 16:52:38 +02:00
Shane Kearns
0e7cecb861 Fix tst_qsocketnotifier
Removed the bogusFds test, as it is only run on symbian in 4.8
Forward ported the posixSockets fix from 4.8

Task-number: QTBUG-20892
Change-Id: I8a8c67e12eae402724bbb07fe37e7ea1770aaeee
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 16:49:24 +02:00
Tor Arne Vestbø
d74bb06079 Generate dependencies for moc_ style includes when using CONFIG+=GNUmake
Sometimes you will include "moc_foo.cpp" from a a cpp file, not to tell
qmake to run moc on it (that's handled by having foo.h in HEADERS), but
so that the moc'ed sources are compiled as part of foo.cpp instead of a
separate compilation unit, or if the moc'ed sources need defintions from
the cpp file.

The dependency logic for CONFIG+=GNUmake failed to take this case into
account, resulting in failures to find files when generating dependency
information for those files.

Change-Id: Iac00424e2d196b518b1ef576d7567335b8ff24f0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-10-20 16:49:24 +02:00
Kent Hansen
ce5adc7684 Revert "Update V8"
This reverts commit 1c4a5fcab76d1b769a4c0369d40dd0dd7c0e7495

Several of the qtdeclarative tests and examples are dying randomly with messages like this:
> 
> #
> # Fatal error in ../3rdparty/v8/src/objects-inl.h, line 2169
> # CHECK(object->IsJSFunction()) failed
> #
> 
> 
> ==== Stack trace ============================================
> 
> 
> ==== Details ================================================
> 
> ==== Key         ============================================
> 
> =====================
> 
> Aborted (core dumped)

Change-Id: Iebaa2497a6f6ef616ef4c3576c217d2a8a2c1ea5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-10-20 13:30:26 +02:00