Commit Graph

2642 Commits

Author SHA1 Message Date
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
Frederik Gladhorn
3885a45e48 Make foreground and backgroundColor proper functions.
Change-Id: I93d4355a6c0b6edb1902df6399df7884b25ea744
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-20 11:40:29 +02:00
Thiago Macieira
c7f8213bc5 Move the non-atomic and implicit functions from QBasicAtomicXXX
Now, users of QBasicAtomicInt and QBasicAtomicPointer must be sure to
use .load() and .store() to access the values.

Change-Id: I6b48ed175618baf387dd38d821bd50e6e93c082e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-20 10:05:49 +02:00
Jędrzej Nowacki
e4b145d11c Remove unused variable from qdbusintegrator.cpp.
The variable was set but unused.

Change-Id: Ibce123916f56ec90662f6118a696dfb2f4962169
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-20 10:05:01 +02:00
João Abecasis
1ef167f050 Use fromLocal8Bit for reversing toLocal8Bit
path is converted to 8-bit encoding using toLocal8Bit in
QTemporaryFileEngine::open. The reverse operation should be used here.
(cherry picked from commit 023976f9dd48a3deb947905d32d5fc0692da7318)

Change-Id: Idb4c1ca3415300367c46a09d68df640e17b7bfdc
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 07:22:57 +02:00
João Abecasis
d2b16043ef Don't convert template's path separators again
(cherry picked from commit 19880c1bdf75455b645fb8d5ee12bcb6e37e5aff)

Change-Id: Iec201da5c09d76711d994bc1da6d15a70a66b0c8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 07:22:44 +02:00
João Abecasis
88316bf283 Changed if/if/else/if/eleven chain to switch
Inlined isdigit in switch statement. Removed unused #includes.
Documented unreachable segment with code (Q_ASSERT).

Reviewed-by: Denis Dzyubenko
(cherry picked from commit 3596db6c9bb8db42476d0c7b52fa2043dc67135b)

Change-Id: I98c33801fd8794e95ba8fc0b5c4efe9b1910682b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 05:49:33 +02:00
João Abecasis
74276637d9 Modulus of negative dividends is undefined or negative
... depending on who you ask. Since it is possible for applicationPid to
return negative values this means we would introduce garbage ['()*+,-./]
in the generated filenames.

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

Change-Id: Ie4f74b961397f97508ea67a0c835e45773d1cc0e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-20 04:23:33 +02:00
Jan-Arve Saether
df1c1d28de Mark the most important MSAA functions as "moz: [important]"
See comment inside commit for explanation.

Change-Id: Ifc05d479ac5094f21f8db0390ae21d99eef0dbe1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-20 02:32:41 +02:00
Casper van Donderen
ff7f67af1d Add files from qtdoc for documentation modularization.
Change-Id: I6ea5c139e632460c516116a302f27f5c902f5561
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2011-10-20 02:32:29 +02:00
Morten Sorvig
cff475f339 Move a11y inspector from tools to util.
Change-Id: Ifc032c511aea72a8f7a4ec62d304e89718f712db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-20 02:31:45 +02:00
Liang Qi
b1b843dcf5 Update keyToValue and keysToValue in QMetaEnum
Add a ok return value for whether found or not.

Task-number: QTBUG-21672
Reviewed-by: Olivier Goffart
Change-Id: Ic0ea7455dccf1ac91705bcc1479444eb4091ded3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-10-19 22:27:09 +02:00
Kevin Simons
15fee6e744 Fixed missing return statement in QPrintSupport
Change-Id: I8da63b7d4c5a456b0150b14e089d8f5e69c6a70a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-19 22:27:09 +02:00
Friedemann Kleint
40738b185d Windows: Fix Geometry, OpenGL formats
- Do not use size returned by GetWindowRect for child windows
- Turn Open GL samples off if number is 1.

Change-Id: I2f44606d965fe691548094771deda7bca51ef9a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-19 22:27:09 +02:00