profile/ivi/qtbase.git
12 years agoFix autotest tst_qtextbrowser.cpp
Frederik Gladhorn [Mon, 24 Oct 2011 10:03:10 +0000 (12:03 +0200)]
Fix autotest tst_qtextbrowser.cpp

The qrc tests need further investigation.
Bring at least back the basic test.

Change-Id: I302a37b6c989af76db67716ffcf10a0960234156
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
12 years agoQNetworkReply autotest no longer needs private_tests
Shane Kearns [Fri, 21 Oct 2011 17:03:57 +0000 (18:03 +0100)]
QNetworkReply autotest no longer needs private_tests

Due to clearAccessCache being made part of the public API in Qt5,
this autotest can be run on normal Qt builds again

Task-number: QTBUG-17312
Change-Id: I3b70237a28ed141ffb49762cc40c8a528f9be6a8
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoQtGui: Remove Q_WS and qpa.
Friedemann Kleint [Thu, 20 Oct 2011 11:35:27 +0000 (13:35 +0200)]
QtGui: Remove Q_WS and qpa.

Enable compilation without -qpa.
Remove QT_NO_FREETYPE and QT_NO_FONTCONFIG when building.

Change-Id: I0e017cc47ee06b885be65deaeb67a449a119b8be
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQNAM: make systemProxyForQuery respect http_proxy
Arvid Ephraim Picciani [Mon, 24 Oct 2011 14:41:44 +0000 (16:41 +0200)]
QNAM: make systemProxyForQuery respect http_proxy

the generic systemProxyForQuery will use http_proxy from the
environment, if it is set.

Change-Id: Ie685c47eb6df1fdd2ab223defc7172bb25e6fe30
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoFix QtSQL auto test server addresses
Honglei Zhang [Mon, 24 Oct 2011 11:37:33 +0000 (14:37 +0300)]
Fix QtSQL auto test server addresses

Fix QtSQL aoto test server addresses. New servers are located in
Brisbane. Old Oslo test servers shall not be used anymore.

Change-Id: Icd4ae4c0193f71410d572bfa014272e1e77586c0
Reviewed-by: Trust Me
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoall remaining tests: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 04:42:16 +0000 (14:42 +1000)]
all remaining tests: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agowidgets: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 04:24:31 +0000 (14:24 +1000)]
widgets: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I3c1d993d5682db913aadc267d98a638061f393d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agobenchmarks: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:59:25 +0000 (11:59 +1000)]
benchmarks: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I48ab0ee64d8348cada2e6c7b27c67b6bbc36280d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agotest: Leftover for split `qsqlquery' unit and benchmark test
Sergio Ahumada [Mon, 24 Oct 2011 10:48:56 +0000 (12:48 +0200)]
test: Leftover for split `qsqlquery' unit and benchmark test

Add new directory structure to benchmarks.pro file introduced by
3172631f0d40f34249f376f9b94a40919573d0c7 .

Task-number: QTQAINFRA-353
Change-Id: I998530cd00bb1849f7a42816d61195f6a5bb4b92
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSanitize QAccessible includes.
Frederik Gladhorn [Sun, 23 Oct 2011 21:03:29 +0000 (23:03 +0200)]
Sanitize QAccessible includes.

Change-Id: I86f5ae75293e5e4d370363d84402f4e7fad03a9e
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoRemove QSKIPs from qgraphicslinearlayout test
Jason McDonald [Tue, 25 Oct 2011 04:59:27 +0000 (14:59 +1000)]
Remove QSKIPs from qgraphicslinearlayout test

If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove QSKIPs from qgraphicsgridlayout test
Jason McDonald [Tue, 25 Oct 2011 04:48:25 +0000 (14:48 +1000)]
Remove QSKIPs from qgraphicsgridlayout test

If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove qhostinfo autotest on HPUX 11i
Jason McDonald [Mon, 24 Oct 2011 06:26:50 +0000 (16:26 +1000)]
Improve qhostinfo autotest on HPUX 11i

Several test functions use IPv6 reverse lookups, which evidently don't
work on HPUX 11i, but only one of these tests was skipped on that
platform and the others presumably fail.

This commit also removes the commented-out test data and makes it easier
to put some useful test data back. QTBUG-22287 records the fact that no
real IPv6 hostnames are currently used in the reverseLookup test.

Change-Id: Iff1ed1b725492bcc28ca4cb5f8e2dc106887c0b4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agogui: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:38:02 +0000 (11:38 +1000)]
gui: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I97046aa51f1b3fc100e2eb2fa115f1bf8ae6437d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agocorelib: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:26:19 +0000 (11:26 +1000)]
corelib: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoDon't build app bundles for qmltestcase applications on Mac OS X
Charles Yin [Mon, 24 Oct 2011 23:50:40 +0000 (09:50 +1000)]
Don't build app bundles for qmltestcase applications on Mac OS X

Change-Id: Ia61f12313908f42f7ff7a43be5443e779300e436
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoDon't call QSKIP/QVERIFY outside of test functions.
Jason McDonald [Mon, 24 Oct 2011 05:55:41 +0000 (15:55 +1000)]
Don't call QSKIP/QVERIFY outside of test functions.

These macros should only be called inside a test function, otherwise
they cannot abort the test function correctly.  Solve this by making the
helper function return a boolean result (and output a warning on
failure to help with debugging) and verify the return value in each test
function that calls the helper.

Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUpdate bug number in autotests.
Jason McDonald [Mon, 24 Oct 2011 05:47:17 +0000 (15:47 +1000)]
Update bug number in autotests.

Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd CONFIG flag to use the compiler to generate makefile dependencies
Tor Arne Vestbø [Mon, 24 Oct 2011 11:37:30 +0000 (13:37 +0200)]
Add CONFIG flag to use the compiler to generate makefile dependencies

Using CONFIG+=GNUmake will enable dependency tracking using included
dependency files, but will use an implicit makefile rule to generate
each .d file.

We now support an additional CONFIG option, gcc_MD_depends, that
instead passes the -MD flag to a GCC (compatible) compiler. This
will generate a .d file as a side-effect of the normal compile
step.

Change-Id: Ib6ce1d93e7f07e316a345bf12aa6f2b4e9a6415d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCompile with clang
Bradley T. Hughes [Thu, 20 Oct 2011 09:18:48 +0000 (11:18 +0200)]
Compile with clang

Clang does not accept this syntax, see
http://llvm.org/bugs/show_bug.cgi?id=8875

The work around is to not use the typedef name. NS() around the
template parameters is necessary to match the real types (and
not the QMetaType::Type enumerators), otherwise we get the following:

kernel/qmetatype.cpp:1647:72: error: template argument for template type
      parameter must be a type
  ...NS(QVariantMap)* >(where)->NS(QVariantMap)::~QMap<QString, ...
                                                       ^~~~~~~

Change-Id: I3afa0cbbe4ef7ad899cfa9eafb3bcc10bedc20b3
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoImprove drawing scaled image with raster using SSE2
Olivier Goffart [Mon, 24 Oct 2011 06:02:10 +0000 (08:02 +0200)]
Improve drawing scaled image with raster using SSE2

That codepath is taken in qml when an Image specify with and hight and
is not smooth, and the image contains alpha contents

The changes in qdrawingprimitive_sse2_p.h just put some code from the
BLEND_SOURCE_OVER_ARGB32_SSE2 macro into a sub macro to allow its reuse

The code that is not SSE2 in qt_scale_image_argb32_on_argb32_sse2 comes
from the qt_scale_image_argb32_on_argb32 in qblendfunctions.cpp

Change-Id: I071a040af4514fb21777dead9f7c5baf16071d59
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoNetwork - Use isLoopback API in place of existing localhost checks
Shane Kearns [Mon, 24 Oct 2011 10:07:02 +0000 (11:07 +0100)]
Network - Use isLoopback API in place of existing localhost checks

Various places in QtNetwork checked for Localhost or LocalHostIPv6,
i.e. 127.0.0.1 or ::1. By using the isLoopback API, other loopback
addresses are treated the same way (e.g. 127.0.0.2 and ::ffff:127.0.0.1)

Task-number: QTBUG-22246
Change-Id: I46f55630d8646fd68034a509969a0b7cb72ca77c
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoNetwork - Add QHostAddress::isLoopback API.
Shane Kearns [Mon, 24 Oct 2011 10:01:09 +0000 (11:01 +0100)]
Network - Add QHostAddress::isLoopback API.

The standard IPv4 loopback address is 127.0.0.1, however anything in
the 127.0.0.0/8 range is also a loopback address.

isLoopback returns true for any address that is in the IPv4 loopback
address range, or is the single IPv6 loopback address ::1

Task-number: QTBUG-22246
Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoQIODevice - disallow setTextMode when not open
Shane Kearns [Thu, 20 Oct 2011 15:55:02 +0000 (16:55 +0100)]
QIODevice - disallow setTextMode when not open

Calling setTextMode() before open() would make the device appear to be
already open and cause later errors.
Added a qWarning and documentation update to prevent this API misuse

Task-number: QTBUG-20905
Change-Id: I2e06cd8e79f4afcf27417ac0eae6ebef980a17aa
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoExtend QVariant benchmarks
Jędrzej Nowacki [Wed, 12 Oct 2011 13:05:44 +0000 (15:05 +0200)]
Extend QVariant benchmarks

Add new cases for custom types and QStringList.

Change-Id: I79f8d415be43774e6b2488e8a6a8028bf4a5fd45
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agocorelib: Remove Q_WS-macros.
Friedemann Kleint [Fri, 21 Oct 2011 07:55:40 +0000 (09:55 +0200)]
corelib: Remove Q_WS-macros.

Q_WS_QPA is the only active code path after merging
refactor, other Q_WS-macros are no longer used.

Enable compilation without -qpa.

- Remove Q_OS_MSDOS, Q_OS_OS2
- Remove Q_WS_QWS
- Remove/replace definitions/conditionals of Q_WS_XX
- Remove qpa branches from profiles
- Replace Q_WS_MAC by  Q_OS_MAC
- Replace Q_WS_MAC && !Q_WS_QPA by
  Q_OS_MAC && !QT_NO_CORESERVICES
- Similarly in profiles: mac:contains(QT_CONFIG, coreservices)
- Replace Q_FS_FAT by Q_OS_WIN

Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agotest: Split `qcontiguouscache' unit and benchmark tests
Sergio Ahumada [Sun, 23 Oct 2011 11:15:25 +0000 (13:15 +0200)]
test: Split `qcontiguouscache' unit and benchmark tests

Moving three benchmark tests from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void asScrollingList();
- void cacheBenchmark();
- void contiguousCacheBenchmark();

were moved to 'tests/benchmarks/corelib/tools/qcontiguouscache'

Task-number: QTQAINFRA-353
Change-Id: Icbdd852f9c14c3df042d2e19abd42af6c645a3cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoKeep Multi font engine in QFontCache
Jiang Jiang [Tue, 18 Oct 2011 13:11:07 +0000 (15:11 +0200)]
Keep Multi font engine in QFontCache

If we only keep single QFontEngineFT in QFontCache, then when we
are looking for the MultiQPA next time with the same QFontDef,
the FT engine will be returned and we get no font fallback support.
That's why we need to keep the Multi engines in QFontCache as well
and distinguish them from the single item. Since QPA doesn't use
'screen' field of QFontCache::Key structure, we use it here to
indicate that we are caching a multi font engine.

Change-Id: Id899d5c5ba52f4bccf134bcd6b1c6386ba22063c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agotests: do not run benchmarks by default in 'make check'
Sergio Ahumada [Sun, 23 Oct 2011 08:28:53 +0000 (10:28 +0200)]
tests: do not run benchmarks by default in 'make check'

`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.

Change-Id: I33b2cf1e833fc6b1d0b3525018945148ba2d3492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAllow commiting and then reusing a QTouchEventSequence for testing.
Michael Brasser [Mon, 24 Oct 2011 03:13:53 +0000 (13:13 +1000)]
Allow commiting and then reusing a QTouchEventSequence for testing.

This method allows calls to stationary() to automatically remember
the previous position for a given touch point id. Example usage:

QTouchEventSequence sequence = QTest::touchEvent(&window);
sequence.press(0, QPoint(10,10)).commit();
sequence.stationary(0).press(1, QPoint(40,10)).commit();

Task-number: QTBUG-22057
Change-Id: I489ab3d61f4637d2ed97d09ed0854afa814407a1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRemove legacy Symbian code from qtestlib.
Jason McDonald [Fri, 21 Oct 2011 06:48:12 +0000 (16:48 +1000)]
Remove legacy Symbian code from qtestlib.

Change-Id: Ia4ac52ce0b5f5a4ba1fcd6594daf424fd7208777
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix qcolumnview test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:48:07 +0000 (15:48 +1000)]
Fix qcolumnview test for shadow builds.

Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix qsidebar test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:43:39 +0000 (15:43 +1000)]
Fix qsidebar test for shadow builds.

Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix qfilesystemmodel test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:41:32 +0000 (15:41 +1000)]
Fix qfilesystemmodel test for shadow builds.

Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix QFileDialog test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:35:25 +0000 (15:35 +1000)]
Fix QFileDialog test for shadow builds.

Using relative paths in #include is best avoided.

Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMultiline editors not to limit anchor position inputMethodQuery
Pekka Vuorela [Thu, 20 Oct 2011 12:49:26 +0000 (15:49 +0300)]
Multiline editors not to limit anchor position inputMethodQuery

The queries were limited to current block, because that is the
available surrounding text. Input method side, however, cannot then
distinguish between anchor being really at start or end of the
surrounding text, or beyond it. Without the limitation there at least
is a way to know anchor is at unknown territory.

Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agotest: Split `qsqlquery' unit and benchmark test
Sergio Ahumada [Sun, 23 Oct 2011 12:41:31 +0000 (14:41 +0200)]
test: Split `qsqlquery' unit and benchmark test

Moving benchmark test from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void benchmark();

was moved to 'tests/benchmarks/sql/kernel/qsqlquery'

Task-number: QTQAINFRA-353
Change-Id: I241bb1a2fba1c1b5524c21e5941a6c5daf5a4a89
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoRemove QAccessibleWidgetPrivate inheritance of QAccessible
Frederik Gladhorn [Sat, 22 Oct 2011 20:17:32 +0000 (22:17 +0200)]
Remove QAccessibleWidgetPrivate inheritance of QAccessible

Change-Id: Iaa7455adc5845e6daceb7eaf9384cd5560fb2cd6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFix compilation with -fno-exceptions
David Faure [Sun, 23 Oct 2011 12:25:28 +0000 (14:25 +0200)]
Fix compilation with -fno-exceptions

Change-Id: I3dbe8be62d2fe94ed6f97fb565a9e417544c58f9
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoDeprecate QDesktopServices::storageLocation/displayName
David Faure [Sat, 22 Oct 2011 09:33:06 +0000 (11:33 +0200)]
Deprecate QDesktopServices::storageLocation/displayName

Which required porting the related unittests to qstandardpaths

Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoMake some qtestlib headers private.
Jason McDonald [Fri, 21 Oct 2011 01:00:14 +0000 (11:00 +1000)]
Make some qtestlib headers private.

These headers should have been private from Day One.  Make them private
now so that nobody will be tempted to use them outside testlib in the
future.

Change-Id: I5361777ade124d8187176f9af3cc79cd1a8ecb4f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove "duplicate objective-c class" warning.
Morten Sorvig [Wed, 19 Oct 2011 11:34:11 +0000 (13:34 +0200)]
Remove "duplicate objective-c class" warning.

Qt would dlopen both libqcocoa.dylib and
libqcocoa_debug.dylib, causing duplicate implementations
if the classes in the cocoa plugin (QNSView etc)

Fix this by building the release version only.

Change-Id: I1244a83c49999ce28edd97400e792fa2a0665fec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: clean up compiler warnings.
Morten Sorvig [Wed, 19 Oct 2011 12:23:45 +0000 (14:23 +0200)]
Cocoa: clean up compiler warnings.

Change-Id: I2cb65bb455b79b218a317b21e5a3b0d9792e0e22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd the missing unittest
David Faure [Sat, 22 Oct 2011 09:35:37 +0000 (11:35 +0200)]
Add the missing unittest

Change-Id: I2384d9de7b9ef409db521087670070bd5afc85ff
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoRename storageLocation() to writableLocation().
David Faure [Fri, 21 Oct 2011 19:10:28 +0000 (21:10 +0200)]
Rename storageLocation() to writableLocation().

Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoAdd QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)
David Faure [Fri, 21 Oct 2011 18:57:54 +0000 (20:57 +0200)]
Add QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)

Change-Id: I19c36a04a9deae49ffc20fdec6a2a7eb05155cb4
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoAdd QStandardPaths::findExecutable.
David Faure [Fri, 21 Oct 2011 18:57:31 +0000 (20:57 +0200)]
Add QStandardPaths::findExecutable.

Change-Id: If30a83622e2ac5af48e47a38b8f70fce73044d74
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoCheck QFileInfo::isExecutable for symlinks, works as intended.
David Faure [Fri, 21 Oct 2011 18:55:34 +0000 (20:55 +0200)]
Check QFileInfo::isExecutable for symlinks, works as intended.

Change-Id: I35acce7ba0e111f651864b9d16abf1bac1923f22
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoQStandardPaths: add Config and GenericData, add methods
David Faure [Fri, 21 Oct 2011 18:54:35 +0000 (20:54 +0200)]
QStandardPaths: add Config and GenericData, add methods

New methods: standardLocations, locate, locateAll.

Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoMove path information from QDesktopServices (gui) to QStandardPaths (core)
David Faure [Fri, 21 Oct 2011 18:12:01 +0000 (20:12 +0200)]
Move path information from QDesktopServices (gui) to QStandardPaths (core)

Change-Id: Ic596c21894d83b4dab0c3f5b1aed916ddd590f2f
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
12 years agoQWindow: Re-create platform window only if screen actually changes.
Friedemann Kleint [Fri, 21 Oct 2011 13:45:25 +0000 (15:45 +0200)]
QWindow: Re-create platform window only if screen actually changes.

Change-Id: I3b7dd8b1307aa3cc9357dca861ea407644c5a2e9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd virtual QWindow::focusObject() method
Lars Knoll [Fri, 21 Oct 2011 08:59:27 +0000 (10:59 +0200)]
Add virtual QWindow::focusObject() method

The method allows to retrieve the object that currently
has the input focus inside the Window. This is e.g.
required to correctly determine the context for keyboard
shortcuts.

Change-Id: I9e05ef62717973bac275ce34cc70fb86aa2d1e5b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...
David Faure [Sat, 22 Oct 2011 11:00:14 +0000 (13:00 +0200)]
Fix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...

Shows that there should be an automated build with
QT_DISABLE_DEPRECATED_BEFORE set to 0, too...

Change-Id: If154786ea26bcbfab41efcd7001c222cc258a8af
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
12 years agoCompile with clang
Bradley T. Hughes [Fri, 21 Oct 2011 11:59:45 +0000 (13:59 +0200)]
Compile with clang

When using methods from a template base class, the lookup needs to be
qualified. See http://clang.llvm.org/compatibility.html#dep_lookup_bases

Change-Id: I5b7cd71e0d45414ac0eff97fe9ba5d3ccd5bd9e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
12 years agoAdd Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructors
Thiago Macieira [Thu, 7 Jul 2011 16:48:47 +0000 (18:48 +0200)]
Add Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructors

These types now technically are trivially-constructible and
standard-layout in C++0x.

Change-Id: I455bd905fd6e237a1dff517b86dcbe59d571266f
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
12 years agoMake the default install path point to /usr/local/Qt-$VERSION
Lars Knoll [Thu, 15 Sep 2011 12:41:25 +0000 (14:41 +0200)]
Make the default install path point to /usr/local/Qt-$VERSION

Remove Trolltech from the default install path.

Since QPA is the default now, so we don't need to treat it
specially from regular Qt versions. It is the regular
Qt version.

Change-Id: I0bde75c90d2d5944be192e1249bc1a9371c70fcb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoOff-by-one error in assert condition...
João Abecasis [Mon, 22 Aug 2011 09:30:26 +0000 (11:30 +0200)]
Off-by-one error in assert condition...

While this was safe, it was also over-zealous, disallowing the path from
ending with the placeholder... Incidentally, the default.

Laughed-at-by: w00t_
(cherry picked from commit 7b693627ee2a17718cb6d8bee5e3deb5a97b307f)

Change-Id: I61a1511bca5cafe2edde20ef38c23154200dfcab
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoLeftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6
João Abecasis [Thu, 18 Aug 2011 09:08:26 +0000 (11:08 +0200)]
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>
12 years agoFix QTemporaryFile regressions and new found issues
João Abecasis [Tue, 16 Aug 2011 15:53:41 +0000 (17:53 +0200)]
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>
12 years agoUse "native paths" on POSIX platforms as well
João Abecasis [Fri, 5 Aug 2011 08:49:44 +0000 (10:49 +0200)]
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>
12 years agoCleanup #includes
João Abecasis [Fri, 5 Aug 2011 08:47:01 +0000 (10:47 +0200)]
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>
12 years agoAtomic implementation of create file and obtain handle for Win/Symbian
João Abecasis [Fri, 5 Aug 2011 08:45:08 +0000 (10:45 +0200)]
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>
12 years agoMinimize encoding conversions when generating unique file name
João Abecasis [Fri, 5 Aug 2011 08:58:08 +0000 (10:58 +0200)]
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>
12 years agoUse QStringBuilder when copying template for modification
João Abecasis [Fri, 5 Aug 2011 08:57:19 +0000 (10:57 +0200)]
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>
12 years agoMake Symbian follow Windows code in temporary path generation
João Abecasis [Fri, 5 Aug 2011 08:39:53 +0000 (10:39 +0200)]
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>
12 years agoEncapsulate pointer manipulations to createFileTemplate function
João Abecasis [Fri, 5 Aug 2011 08:35:55 +0000 (10:35 +0200)]
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>
12 years agoWidgets: Remove Q_WS_QPA and qpa-sections from .pro files.
Friedemann Kleint [Thu, 20 Oct 2011 14:36:05 +0000 (16:36 +0200)]
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>
12 years ago[directfb] Implement grab/ungrab of keyboard/pointer
Holger Hans Peter Freyther [Tue, 18 Oct 2011 13:10:23 +0000 (15:10 +0200)]
[directfb] Implement grab/ungrab of keyboard/pointer

Change-Id: Ie2b99bb659e324c63bfd23e96d6c89c13a8df3b4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years ago[directfb] Remove grabbing of the pointer on input
Holger Hans Peter Freyther [Tue, 18 Oct 2011 12:32:29 +0000 (14:32 +0200)]
[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>
12 years ago[directfb] Implement QPixmap::fromFile using DirectFB routines
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:14:15 +0000 (18:14 +0200)]
[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>
12 years ago[directfb] Prepare to select the alpha/opaque pixel formats
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:10:15 +0000 (18:10 +0200)]
[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>
12 years ago[directfb] Manage the font database with a QScopedPointer
Holger Hans Peter Freyther [Thu, 29 Sep 2011 15:54:28 +0000 (17:54 +0200)]
[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>
12 years ago[directfb] Remove some duplication in the QDirectFbBlitter c'tor.
Holger Hans Peter Freyther [Mon, 26 Sep 2011 17:30:37 +0000 (19:30 +0200)]
[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>
12 years agodirectfb: Initialize m_dfb after DirectFBInit has been called
Holger Hans Peter Freyther [Sun, 25 Sep 2011 17:31:02 +0000 (19:31 +0200)]
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>
12 years ago[directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers
Holger Hans Peter Freyther [Sun, 18 Sep 2011 22:57:45 +0000 (00:57 +0200)]
[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>
12 years ago[directfb] Make QDirectFBInput a QThread to allow proper exits
Holger Hans Peter Freyther [Sun, 18 Sep 2011 22:11:24 +0000 (00:11 +0200)]
[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>
12 years ago[directfb] Use QScopedPointer to manage heap allocated objects
Holger Hans Peter Freyther [Sun, 18 Sep 2011 20:04:09 +0000 (22:04 +0200)]
[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>
12 years ago[directfb] Fix memory leak when passing arguments to directFB
Holger Hans Peter Freyther [Sun, 18 Sep 2011 23:04:59 +0000 (01:04 +0200)]
[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>
12 years ago[directfb] Do not call a pure virtual function
Holger Hans Peter Freyther [Sun, 11 Sep 2011 17:05:15 +0000 (19:05 +0200)]
[directfb] Do not call a pure virtual function

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>
12 years ago[directfb] Rename class from WindowSurface to BackingStore
Holger Hans Peter Freyther [Sun, 11 Sep 2011 12:54:20 +0000 (14:54 +0200)]
[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>
12 years ago[blitter] Work on tst_QPixmap::clear()
Holger Hans Peter Freyther [Mon, 26 Sep 2011 17:02:57 +0000 (19:02 +0200)]
[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>
12 years agoFix compilation on Harmattan
Simon Hausmann [Fri, 21 Oct 2011 10:38:00 +0000 (12:38 +0200)]
Fix compilation on Harmattan

Commit 87274e272d2a854563066489e20d019b4e6320de 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>
12 years ago[blitter] Generate a new serial number when resizing the pixmap
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:02:47 +0000 (18:02 +0200)]
[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>
12 years agoTestlib: Fixed compilation with MSVC.
Friedemann Kleint [Fri, 21 Oct 2011 09:11:28 +0000 (11:11 +0200)]
Testlib: Fixed compilation with MSVC.

MSVC does not like VA_ARGS tricks.

Change-Id: I947dcb89e519c18a482a504725213a3f4d9670ff
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix compiler warnings when using QT_DEPRECATED
Sergio Ahumada [Fri, 21 Oct 2011 08:12:26 +0000 (10:12 +0200)]
Fix compiler warnings when using QT_DEPRECATED

Change-Id: If62cff5d1cbd1c8051d709db8747777606797056
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove mtdev dependency from the touchscreen QPA plugin.
Laszlo Agocs [Fri, 21 Oct 2011 07:36:56 +0000 (10:36 +0300)]
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>
12 years agoqmake: Replace Q_WS_WIN by Q_OS_WIN
Friedemann Kleint [Fri, 21 Oct 2011 07:35:57 +0000 (09:35 +0200)]
qmake: Replace Q_WS_WIN by Q_OS_WIN

Change-Id: I6c63cda81a15759294321696feffa1150bd2a315
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse QBasicAtomicInt as a static variable
Shane Kearns [Wed, 19 Oct 2011 10:07:40 +0000 (11:07 +0100)]
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>
12 years agoExpand QT_TR_NOOP("str") to "str", not ("str").
Jan-Arve Saether [Fri, 21 Oct 2011 07:10:43 +0000 (09:10 +0200)]
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>
12 years agoFix some compiler warnings on Mac
Sergio Ahumada [Thu, 20 Oct 2011 17:39:36 +0000 (19:39 +0200)]
Fix some compiler warnings on Mac

Change-Id: I52b5c1822f9530f75eeebfcafbade6f89062e369
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake testlib use #include consistently.
Jason McDonald [Fri, 21 Oct 2011 00:07:51 +0000 (10:07 +1000)]
Make testlib use #include consistently.

Change-Id: I36b5da3f832d2588072405d93143173edc29f4af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix shadow build error for qmltest
Charles Yin [Thu, 20 Oct 2011 01:42:37 +0000 (11:42 +1000)]
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>
12 years agoFix misleading comment on test execution order.
Jason McDonald [Thu, 20 Oct 2011 02:16:49 +0000 (12:16 +1000)]
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>
12 years agoUpdate QSKIP documentation.
Jason McDonald [Thu, 20 Oct 2011 02:12:43 +0000 (12:12 +1000)]
Update QSKIP documentation.

Task-number: QTBUG-21851, QTBUG-21652

Change-Id: I3d4cf8e11756b92fe9d97f01a02c61cbf2df1556
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove SkipMode parameter from QSKIP calls.
Jason McDonald [Wed, 19 Oct 2011 02:53:13 +0000 (12:53 +1000)]
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>
12 years agoRemove QTest::SkipMode from qtestlib API.
Jason McDonald [Tue, 18 Oct 2011 04:53:23 +0000 (14:53 +1000)]
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>
12 years agoFix FTP example to handle failure to open network session
Shane Kearns [Wed, 19 Oct 2011 13:00:28 +0000 (14:00 +0100)]
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>
12 years agoFTP - fix interoperability issues with SIZE command
Shane Kearns [Tue, 18 Oct 2011 15:18:06 +0000 (16:18 +0100)]
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>
12 years agoTeach syncqt to handle multiple %moduleheaders directories
Tor Arne Vestbø [Thu, 20 Oct 2011 13:45:20 +0000 (15:45 +0200)]
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>
12 years agoMoved tests into integrationtests/ and widgets/
Jo Asplin [Thu, 20 Oct 2011 11:17:26 +0000 (13:17 +0200)]
Moved tests into integrationtests/ and widgets/

Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>