summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [directfb] Implement QPixmap::fromFile using DirectFB routinesHolger Hans Peter Freyther2011-10-212-0/+114
| | | | | | | | | | 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>
* [directfb] Prepare to select the alpha/opaque pixel formatsHolger Hans Peter Freyther2011-10-212-2/+21
| | | | | | | | | 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>
* [directfb] Manage the font database with a QScopedPointerHolger Hans Peter Freyther2011-10-212-2/+2
| | | | | | | 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>
* [directfb] Remove some duplication in the QDirectFbBlitter c'tor.Holger Hans Peter Freyther2011-10-211-8/+11
| | | | | | | | 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>
* directfb: Initialize m_dfb after DirectFBInit has been calledHolger Hans Peter Freyther2011-10-211-2/+4
| | | | | | | | | | 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>
* [directfb] Introduce the QDirectFBPointer from QWS/gfxdriversHolger Hans Peter Freyther2011-10-2114-93/+126
| | | | | | | | | | 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>
* [directfb] Make QDirectFBInput a QThread to allow proper exitsHolger Hans Peter Freyther2011-10-213-29/+18
| | | | | | | | | | | | | | | | 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>
* [directfb] Use QScopedPointer to manage heap allocated objectsHolger Hans Peter Freyther2011-10-217-33/+16
| | | | | | | | | | | 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>
* [directfb] Fix memory leak when passing arguments to directFBHolger Hans Peter Freyther2011-10-211-0/+3
| | | | | | | We need to delete the array but also the elements inside it. Change-Id: Ib61beeca569802638b9ff3b94ede79c0beebb399 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Do not call a pure virtual functionHolger Hans Peter Freyther2011-10-211-2/+0
| | | | | | | | | In 688d9f6ec0a0da5539a3d11fa1dc6e1ae0558cda 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>
* [directfb] Rename class from WindowSurface to BackingStoreHolger Hans Peter Freyther2011-10-215-17/+17
| | | | | | | | 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>
* [blitter] Work on tst_QPixmap::clear()Holger Hans Peter Freyther2011-10-214-16/+45
| | | | | | | | | | | | | | | | | | | 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>
* [blitter] Generate a new serial number when resizing the pixmapHolger Hans Peter Freyther2011-10-211-0/+1
| | | | | | | | 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>
* Testlib: Fixed compilation with MSVC.Friedemann Kleint2011-10-211-0/+9
| | | | | | | MSVC does not like VA_ARGS tricks. Change-Id: I947dcb89e519c18a482a504725213a3f4d9670ff Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix compiler warnings when using QT_DEPRECATEDSergio Ahumada2011-10-211-0/+2
| | | | | Change-Id: If62cff5d1cbd1c8051d709db8747777606797056 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove mtdev dependency from the touchscreen QPA plugin.Laszlo Agocs2011-10-216-142/+145
| | | | | | | | | | 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>
* Use QBasicAtomicInt as a static variableShane Kearns2011-10-211-4/+4
| | | | | | | | | | | | 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>
* Expand QT_TR_NOOP("str") to "str", not ("str").Jan-Arve Saether2011-10-211-4/+4
| | | | | | | | | | | | | | 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>
* Fix some compiler warnings on MacSergio Ahumada2011-10-212-1/+3
| | | | | Change-Id: I52b5c1822f9530f75eeebfcafbade6f89062e369 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make testlib use #include consistently.Jason McDonald2011-10-2122-85/+81
| | | | | Change-Id: I36b5da3f832d2588072405d93143173edc29f4af Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix misleading comment on test execution order.Jason McDonald2011-10-211-1/+1
| | | | | | | | | 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>
* Update QSKIP documentation.Jason McDonald2011-10-211-9/+17
| | | | | | | Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I3d4cf8e11756b92fe9d97f01a02c61cbf2df1556 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-211-19/+19
| | | | | | | | | 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>
* Remove QTest::SkipMode from qtestlib API.Jason McDonald2011-10-213-41/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* FTP - fix interoperability issues with SIZE commandShane Kearns2011-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add the ability to enable various SSL bug workarounds.Richard Moore2011-10-207-9/+102
| | | | | | | | | | | | | 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>
* ret is an "internal" path, no need to re-process itJoão Abecasis2011-10-201-1/+1
| | | | | | | | | 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>
* We prefer capitalized drive letters, make it so soonerJoão Abecasis2011-10-201-2/+3
| | | | | | | | Reviewed-by: Prasanth Ullattil (cherry picked from commit 13899108ed57548d3c4f40e595481f8ee76e4fcf) Change-Id: I70132c19af34715c92718f9b06e4f2dfba28d255 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Avoid spurious detaching in QDir::to/fromNativeSeparatorsJoão Abecasis2011-10-201-10/+28
| | | | | | | | | | | | | | | | 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>
* Revert "Update V8"Kent Hansen2011-10-2020-1504/+2702
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Make foreground and backgroundColor proper functions.Frederik Gladhorn2011-10-204-15/+32
| | | | | Change-Id: I93d4355a6c0b6edb1902df6399df7884b25ea744 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Move the non-atomic and implicit functions from QBasicAtomicXXXThiago Macieira2011-10-202-84/+65
| | | | | | | | | 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>
* Remove unused variable from qdbusintegrator.cpp.Jędrzej Nowacki2011-10-201-2/+0
| | | | | | | The variable was set but unused. Change-Id: Ibce123916f56ec90662f6118a696dfb2f4962169 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use fromLocal8Bit for reversing toLocal8BitJoão Abecasis2011-10-201-1/+1
| | | | | | | | | 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>
* Don't convert template's path separators againJoão Abecasis2011-10-201-1/+1
| | | | | | | (cherry picked from commit 19880c1bdf75455b645fb8d5ee12bcb6e37e5aff) Change-Id: Iec201da5c09d76711d994bc1da6d15a70a66b0c8 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Changed if/if/else/if/eleven chain to switchJoão Abecasis2011-10-201-15/+22
| | | | | | | | | | | 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>
* Modulus of negative dividends is undefined or negativeJoão Abecasis2011-10-201-1/+1
| | | | | | | | | | | | ... 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>
* Mark the most important MSAA functions as "moz: [important]"Jan-Arve Saether2011-10-201-0/+20
| | | | | | | See comment inside commit for explanation. Change-Id: Ifc05d479ac5094f21f8db0390ae21d99eef0dbe1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Move a11y inspector from tools to util.Morten Sorvig2011-10-201-1/+1
| | | | | Change-Id: Ifc032c511aea72a8f7a4ec62d304e89718f712db Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Update keyToValue and keysToValue in QMetaEnumLiang Qi2011-10-192-10/+34
| | | | | | | | | | 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>
* Fixed missing return statement in QPrintSupportKevin Simons2011-10-191-1/+1
| | | | | Change-Id: I8da63b7d4c5a456b0150b14e089d8f5e69c6a70a Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Windows: Fix Geometry, OpenGL formatsFriedemann Kleint2011-10-192-10/+41
| | | | | | | | - 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>
* Update V8Aaron Kennedy2011-10-1920-2702/+1504
| | | | | Change-Id: I7a9da7dbb2116a441788407d60ed10155cded941 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Refactor QAccessibleActionInterface.Frederik Gladhorn2011-10-1917-693/+341
| | | | | | | Some refinements done by Jan-Arve Sæther. Change-Id: I99195b3c7273316cfa9c46e451924bbcfddd11a9 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-191-0/+9
| | | | | | | | | Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300): tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’ to incomplete type ‘QStaticAssertFailure<false>’ Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Metatype: Silence MSVC warnings about unused variables.Friedemann Kleint2011-10-191-6/+6
| | | | | | | Turn around if's. Change-Id: Ica6f7f54098a567816ce3918f6fe5d8d2c072e01 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Widgets: Fix a startup crash in QSplashScreen (Linguist).Friedemann Kleint2011-10-191-2/+3
| | | | | Change-Id: I38f5920fb62277f97e9b3b45651527c2475556ac Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix "may be used uninitialized" compiler warning.Morten Sorvig2011-10-191-1/+1
| | | | | Change-Id: I96e9dbf0f3df527785e03661b9c25bd2d214cd44 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Provide API for "placement new" construction of meta-typesKent Hansen2011-10-194-21/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making it possible to specify the place in memory where a type should be constructed, any meta-type can be allocated on the stack, for example. In the QML/JS QObject binding, this makes it possible to call slots and access properties from JavaScript without having to perform any mallocs (e.g. due to QVariant creation) in the C++ <--> JS value conversion, in the best case. In addition to QMetaType::construct() and QMetaType::destruct(), this change introduces QMetaType::typeSize(), which returns the size of a type in bytes. This can be used to prepare a suitable buffer for constructing a type using construct(). Benchmarks indicate that in-place construction is 2-5x faster than normal construction for core and GUI types on linux-g++. Note that there is already a QMetaType::construct() function in Qt 4, which has been renamed to QMetaType::create() in Qt 5. In order to avoid existing usages of construct() in user code to call the Qt 5 construct() (when they really meant to call create()), the third argument ("copy") of construct() is made mandatory. Hence, calls to QMetaType::construct() written for Qt 4 will cause a compile error when compiled with Qt 5, and the user must adapt his code. Task-number: QTBUG-12574 Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Widgets: Remove Symbian-specific code.Friedemann Kleint2011-10-1989-21772/+2
| | | | | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: Ieee43d6650f5b1968fc7d77e618096701ffef941 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>