qt:qtsystems.git
5 years agoport remaining windows backend from qtmobility.
Lorn Potter [Wed, 11 Jul 2012 03:50:34 +0000 (13:50 +1000)]
port remaining windows backend from qtmobility.

Change-Id: Ic4f7b2cc9529f0a4c3e6856617676711aea93fc9
Reviewed-by: Andrew Stanley-Jones <asj@cban.com>
5 years agoTest: Use qInstallMessageHandler
Kai Koehne [Thu, 13 Sep 2012 12:52:45 +0000 (14:52 +0200)]
Test: Use qInstallMessageHandler

qInstallMsgHandler got deprecated in Qt 5.

Change-Id: I4254691b5016b6caf8ec34b65c4acf2ab220e948
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
5 years agoHTML template: Updated copyright notice from Nokia to Digia Plc
Jerome Pasion [Tue, 25 Sep 2012 10:26:58 +0000 (12:26 +0200)]
HTML template: Updated copyright notice from Nokia to Digia Plc

Change-Id: Ie51bfad8ee7cbc90f70aed178e4148a3354a3845
Reviewed-by: Martin Smith <martin.smith@digia.com>
5 years agoChange copyrights from Nokia to Digia
Iikka Eklund [Mon, 24 Sep 2012 06:25:23 +0000 (09:25 +0300)]
Change copyrights from Nokia to Digia

Change copyrights and license headers from Nokia to Digia

Change-Id: I7786bc90235877567a7f61fc5c82af8dc3ad28c8
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
5 years agoDoc: Adding documentation templates from qtbase
Jerome Pasion [Fri, 21 Sep 2012 12:36:31 +0000 (14:36 +0200)]
Doc: Adding documentation templates from qtbase

Change-Id: Ic105393919c8725b79e8377027edacc2d66772cf
Reviewed-by: Martin Smith <martin.smith@digia.com>
5 years agoImports: Add plugins.qmltypes files
Kai Koehne [Tue, 18 Sep 2012 14:33:14 +0000 (16:33 +0200)]
Imports: Add plugins.qmltypes files

The files are used by Qt Creator to get syntax highlighting and code completion.

Change-Id: I6924fb448d94a105f83b25a57bebb7124f7326c3
Reviewed-by: Alex <ablasche@gmail.com>
5 years agocentralize load(qt_build_config)s in .qmake.conf
Oswald Buddenhagen [Mon, 3 Sep 2012 10:13:41 +0000 (12:13 +0200)]
centralize load(qt_build_config)s in .qmake.conf

Change-Id: I8f7389dac06dee984f79deec1b070b1c6d27604d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
5 years agoUpdate the git-archive export options
Thiago Macieira [Wed, 29 Aug 2012 19:40:04 +0000 (21:40 +0200)]
Update the git-archive export options

The .gitattributes and .gitignore files do not need to be present in
packaged sources, as they are for people using the Git repository.
People who download tarballs usually don't reimport into Git -- they
should just download the actual repositories.

Meanwhile, the .tag file is quite useful. Instead of making Git extract
to the useless SHA-1 of the $n string, ask git-archive to store
the SHA-1 of the commit being packaged.

Change-Id: Ic48246508077e6cb789e46cdbbb42605f3ff4dcd
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agomake use of QT_{,FOR_}PRIVATE to specify private Qt dependencies, take 2 v5.0.0-beta1
Oswald Buddenhagen [Thu, 16 Aug 2012 11:07:39 +0000 (13:07 +0200)]
make use of QT_{,FOR_}PRIVATE to specify private Qt dependencies, take 2

Change-Id: I40c2efe22e373dec3c6e1e75bdd35da9be3ff0eb
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
5 years agoRemoved JSONDB backend from SystemInfo.
Xizhi Zhu [Thu, 16 Aug 2012 15:35:27 +0000 (18:35 +0300)]
Removed JSONDB backend from SystemInfo.

Change-Id: I2e8c4312bdcf9eb93e3d4b6607b8c6596b9d8a19
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
5 years agoRemoved mtlib backend from SystemInfo.
Xizhi Zhu [Thu, 16 Aug 2012 15:22:56 +0000 (18:22 +0300)]
Removed mtlib backend from SystemInfo.

Change-Id: I444fb0d255651b1a94f1eb1ff9bf1e61f92344ee
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
5 years agomake the service be found even in debug_and_release_target configs
Oswald Buddenhagen [Fri, 13 Jul 2012 15:45:58 +0000 (17:45 +0200)]
make the service be found even in debug_and_release_target configs

Change-Id: I5f3831a9ee3f71d451db7515c0a8e91a1e7ab386
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agomake use of QT_PRIVATE to specify private Qt dependencies
Oswald Buddenhagen [Wed, 8 Aug 2012 11:52:39 +0000 (13:52 +0200)]
make use of QT_PRIVATE to specify private Qt dependencies

Change-Id: Id3472f8b26c079fafad808abadbb5210415918b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
5 years agofollow rename of qt_module_config.prf to qt_module.prf
Oswald Buddenhagen [Tue, 7 Aug 2012 17:12:28 +0000 (19:12 +0200)]
follow rename of qt_module_config.prf to qt_module.prf

Change-Id: I98dd7cc723a8454724286dcfb4fefe989469034a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
5 years agoSet the Qt API level to compatibility mode in all tests.
Thiago Macieira [Wed, 1 Aug 2012 14:47:33 +0000 (16:47 +0200)]
Set the Qt API level to compatibility mode in all tests.

Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: Id4bceb18209de205a5b4389e061308a21cf10fdf
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoThe qml components are not build if the qtdeclarative module is not present
Corentin Jabot [Sat, 28 Jul 2012 13:04:47 +0000 (15:04 +0200)]
The qml components are not build if the qtdeclarative module is not present

Change-Id: I11726384df6b98303c281c726e545bd0541d3b52
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoDoc: Changed \qmlclass to \qmltype and added \instantiates
Jerome Pasion [Fri, 27 Jul 2012 16:41:03 +0000 (18:41 +0200)]
Doc: Changed \qmlclass to \qmltype and added \instantiates

-\qmlclass is now \qmltype
-\instantiates is for QML types implemented in C++

Change-Id: Ide5853242f8cde0f4f2d9b99a7a43c150161e3d4
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
5 years agoAdd module page. Add getting started info to Overview.
Peter Yard [Fri, 27 Jul 2012 04:14:10 +0000 (14:14 +1000)]
Add module page. Add getting started info to Overview.

Change-Id: I775d08b3231ba99549cc1e50ee7947acd95a8a07
Reviewed-by: Peter Yard <peter.yard@nokia.com>
5 years agoFix a race condition in the unit test.
Lincoln Ramsay [Tue, 17 Jul 2012 05:54:29 +0000 (15:54 +1000)]
Fix a race condition in the unit test.

Writing a property may return before the service has been updated.
Before comparing the objects, we need to flush the data by reading
the property back.

Fixes: QTBUG-26544
Change-Id: Ia671f2841af3d8676c906d69f2408aa683cb79e5
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoAdd the CMake directory created during unit testing to .gitignore.
Stephen Kelly [Mon, 23 Jul 2012 07:52:22 +0000 (09:52 +0200)]
Add the CMake directory created during unit testing to .gitignore.

Change-Id: Ide7f2ee1c3403ed116d5a4ecc81df4807e52bf7a
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
5 years agoTest that the package configs for QtSystems work.
Stephen Kelly [Thu, 19 Jul 2012 12:45:45 +0000 (14:45 +0200)]
Test that the package configs for QtSystems work.

Change-Id: I6b625db7249aeaf9e5c67d67656c0d1972b1d828
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
5 years agouse centralized qml plugin project handling
Oswald Buddenhagen [Mon, 9 Jul 2012 17:11:06 +0000 (19:11 +0200)]
use centralized qml plugin project handling

Change-Id: Icfbc814eea58fd03e07ec6ef03eced164955e072
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
5 years agouse centralized handling of QT_BUILD_PARTS
Oswald Buddenhagen [Tue, 3 Jul 2012 19:42:23 +0000 (21:42 +0200)]
use centralized handling of QT_BUILD_PARTS

Change-Id: I6569d4fa376c96df1ec4b5735b2b77739b017178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
5 years agoFix unit tests, remove race condition
Andrew Stanley-Jones [Tue, 17 Jul 2012 01:38:19 +0000 (11:38 +1000)]
Fix unit tests, remove race condition

Service registration should only be done in 1 place.  For unit tests
this is in the test client.  Services should not register/unregister
since they don't know when the test starts or stops, and can
unregister services in the middle of test runs.  Don't do this.

Also fixes the client to fail more quickly if errors are
detected when creating threads.

Change-Id: I51c351bf2c7c2cc83da604dfde27443840d02fb8
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoOSX 10.6 doesn't define O_CLOEXEC so don't use it
Andrew Stanley-Jones [Wed, 4 Jul 2012 01:19:56 +0000 (11:19 +1000)]
OSX 10.6 doesn't define O_CLOEXEC so don't use it

When using fcntl use FD_CLOEXEC instead since it's supported
on all platforms.

Change-Id: I549d5ed684447a05c1dbabae6c0dc1f6cb1ad381
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoAllow build of submodule docs individually using 'make'.
Peter Yard [Wed, 4 Jul 2012 00:39:11 +0000 (10:39 +1000)]
Allow build of submodule docs individually using 'make'.

Change-Id: I0fe4e04056396bfb6ba6fee77db017f2997fb1d6
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoFix the cross compilation
Laszlo Papp [Wed, 4 Jul 2012 06:24:06 +0000 (07:24 +0100)]
Fix the cross compilation

Change-Id: I151398d0ca986649119d056404a8c1fc0d3d8add
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoFix select on OSX
Andrew Stanley-Jones [Mon, 2 Jul 2012 06:58:33 +0000 (16:58 +1000)]
Fix select on OSX

OSX does not allow the timeval.tv_usec to be greater than
1 million (1 second), so split the value between the usec
path and the second field.

Change-Id: I926c360aa91e5d5131e6b7099df808f29ac3c56a
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoMake unix backend compile on Mac
Andrew Stanley-Jones [Mon, 2 Jul 2012 03:41:00 +0000 (13:41 +1000)]
Make unix backend compile on Mac

Update the backend include files and avoid using a linux
only pipe2.  Also compile sfwlisten correctly and place
it in the right location.

Change-Id: I083c286a8ed2ca7bdba8f3025c2a66a9e0405a1a
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoThe unit test modifies the PATH.
Lincoln Ramsay [Wed, 27 Jun 2012 05:10:05 +0000 (15:10 +1000)]
The unit test modifies the PATH.

It was already doing this for Mac builds. Do it for all Unix builds now.
This way, we don't need a special code path, enabled for the CI system,
that allows tests to pass there that then fail on regular desktops.

Change-Id: I8b0bc61339a3d615c2703e7692927e03f5457101
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoUpdate the export macros in qtsystems.git
Thiago Macieira [Fri, 22 Jun 2012 09:16:22 +0000 (11:16 +0200)]
Update the export macros in qtsystems.git

Use the new, simpler QT_STATIC macro.

Change-Id: I44381e608d2b65388a6f395d08060b7972821d9d
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoFix build/ add missing includes for QDataStream.
Friedemann Kleint [Thu, 28 Jun 2012 08:25:53 +0000 (10:25 +0200)]
Fix build/ add missing includes for QDataStream.

Apparently caused by
qtbase:b719bd498ee179f92bee174a622c7954ed542fd0.

Change-Id: Icd5fa7829ab76fb3e73ed717d50b7794da2fac6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
5 years agoCompile qnetworkinfo_linux.cpp under C++11 mode
Thiago Macieira [Tue, 26 Jun 2012 14:24:13 +0000 (16:24 +0200)]
Compile qnetworkinfo_linux.cpp under C++11 mode

Our c++11.prf file puts the compiler in standards-compliant mode
(-std=c++0x or -std=c++11), but unfortunately bluetooth.h is not
standards-compliant. It makes use of typeof(), which is a GCC
extension, without the double double-underscore marker (__extension__
and __typeof__).

To support this until upstream fixes their mess, put the compiler in
C++11-plus-extensions mode.

Change-Id: I5e0925ce90fb6564db0ab7b096d1967a1d3e3df4
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoDo not depend on indirect includes: include <QDataStream>
Thiago Macieira [Tue, 26 Jun 2012 14:34:24 +0000 (16:34 +0200)]
Do not depend on indirect includes: include <QDataStream>

QDataStream used to be defined through indirect inclusion (by way of
qpair.h). Instead, include the header directly.

Change-Id: Ia178c13cdaaa9b3cb962b6afff991a3b4433af88
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoqFree is deprecated, use ::free instead.
Thiago Macieira [Tue, 26 Jun 2012 14:33:57 +0000 (16:33 +0200)]
qFree is deprecated, use ::free instead.

Change-Id: Ic434386e528eca99596843e7f41e37cdf9a6a103
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
5 years agoFix a warning.
Lincoln Ramsay [Tue, 26 Jun 2012 04:45:59 +0000 (14:45 +1000)]
Fix a warning.

Change-Id: I9d02220325bcf18a279710d830a468207b2ae551
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agofix a warning and a doc
Lincoln Ramsay [Fri, 22 Jun 2012 04:14:09 +0000 (14:14 +1000)]
fix a warning and a doc

unused variable warning
fix a misspelling in a doc

Change-Id: Ib71fb28f471eae714375b649ab6393ce86d835fe
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoCompile
Lincoln Ramsay [Tue, 26 Jun 2012 04:36:26 +0000 (14:36 +1000)]
Compile

If the Unix IPC backend is used and debug is off, we don't have QtNetwork

Change-Id: Idd5bfe08a98f19a2a39df5ec5893c699f0e803e5
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agobuild system cleanups
Oswald Buddenhagen [Thu, 12 Apr 2012 10:38:09 +0000 (12:38 +0200)]
build system cleanups

- load(qt_module) => load(qt_build_config)
- remove:
  - CONFIG+=module (obsolete)
  - code relating to module version headers (automated now)
  - %mastercontent assignment (automated now)
  - QT_BUILD_*_LIB defines (automated now)
  - pointless QPRO_PWD assignments
  - pointless DEFINES+=QT_MAKEDLL

Change-Id: I062c0bbe4bb69c2952f35b6bd6628770c0bc9446
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoRemove Q_SYSTEMINFO_EXPORT from simulator's datastream operators
Oliver Wolff [Mon, 20 Feb 2012 13:37:41 +0000 (14:37 +0100)]
Remove Q_SYSTEMINFO_EXPORT from simulator's datastream operators

As the Simulator uses the header files directly to obtain the data
structures importing/exporting them causes warnings on Windows.

Change-Id: I501cff8d2c167057081ac0b163142dace078b06f
Reviewed-by: Rainer Keller <rainer.keller@nokia.com>
Reviewed-by: Steffen Hahn <steffen.hahn@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoRemove left over defines and fix the unix backend
Andrew Stanley-Jones [Mon, 25 Jun 2012 06:25:33 +0000 (16:25 +1000)]
Remove left over defines and fix the unix backend

Change-Id: If491cb14a1829baf84769c8425144e7848604c37
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoswitch to new-style configure tests
Oswald Buddenhagen [Thu, 5 Apr 2012 12:48:24 +0000 (14:48 +0200)]
switch to new-style configure tests

Change-Id: Iae80d8e22f4f5347b020c20364bfe110c22bc549
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agouse auto-defined QT_BUILD_*_LIB variables
Oswald Buddenhagen [Thu, 12 Apr 2012 09:22:19 +0000 (11:22 +0200)]
use auto-defined QT_BUILD_*_LIB variables

Change-Id: I6bafddeb11e764d17c5e9d9147c4e60da59c80a7
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoauto-generate module pris
Oswald Buddenhagen [Thu, 12 Apr 2012 09:18:52 +0000 (11:18 +0200)]
auto-generate module pris

Change-Id: Ied629f52b278241e2007491175ba338698bae5bc
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoMake backend selection easy
Andrew Stanley-Jones [Wed, 20 Jun 2012 03:56:49 +0000 (13:56 +1000)]
Make backend selection easy

Allow the backend to be selected on the qmake command line,
which allows for easier testing. Use by specifiying
SFW_BACKEND=unix, localsocket or dbus.

Change-Id: I699737a7d2c97b564ebb5dc6b6d7c87dec8b6eb5
Reviewed-by: Zsolt Simon <zsolt.simon@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoFix compile error with namespace
Andrew Stanley-Jones [Fri, 22 Jun 2012 03:10:39 +0000 (13:10 +1000)]
Fix compile error with namespace

Change-Id: Ic016ae0e65b3cc0150d76ce08f5f350b8cc8c109
Reviewed-by: Alex <alex.blasche@nokia.com>
5 years agoFix compile error in the unix backend
Andrew Stanley-Jones [Wed, 20 Jun 2012 03:59:46 +0000 (13:59 +1000)]
Fix compile error in the unix backend

Change-Id: I458578c85afc01e21a7a3b114c46cea3d0d0bc4f
Reviewed-by: Zsolt Simon <zsolt.simon@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoFix sfwlisten
Andrew Stanley-Jones [Tue, 19 Jun 2012 06:35:29 +0000 (16:35 +1000)]
Fix sfwlisten

If sfwlisten listens on several interfaces it could crash
since the QUdpSocket was delete.

Change-Id: I0a91a98477b70fa01ac2493a5f7ac1915498bc73
Reviewed-by: Zsolt Simon <zsolt.simon@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoFix compiler warning about order of initialization.
Lincoln Ramsay [Wed, 20 Jun 2012 03:38:28 +0000 (13:38 +1000)]
Fix compiler warning about order of initialization.

Also, have the copy constructor avoid double-initialization of members.

Change-Id: If2130c5dc51a0b371822f0c27673467b82be36ab
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoQString(const char*) is deprecated - use QLatin1String()
Lincoln Ramsay [Wed, 20 Jun 2012 03:38:00 +0000 (13:38 +1000)]
QString(const char*) is deprecated - use QLatin1String()

Change-Id: Ic9c49710b546dbec89ba2e4e0eef77ab92030553
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoFix warnings about declared-but-unused symbols.
Lincoln Ramsay [Wed, 20 Jun 2012 03:37:30 +0000 (13:37 +1000)]
Fix warnings about declared-but-unused symbols.

Change-Id: I74f7513b2492308369cc6acbe77d928325f82de8
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoUse the localhost interface
Andrew Stanley-Jones [Tue, 19 Jun 2012 04:10:40 +0000 (14:10 +1000)]
Use the localhost interface

Allow local debug

Change-Id: I50b4b967cc63e07bacc3b6632e9ea96d071c269e
Reviewed-by: Zsolt Simon <zsolt.simon@nokia.com>
5 years agoAdds new asynchronous friendly types.
Alan Alpert [Thu, 26 Apr 2012 09:32:48 +0000 (19:32 +1000)]
Adds new asynchronous friendly types.

The old types will probably be deprecated at some point, but they're
still provided so that users have time to switch.

Change-Id: I0f3068e77d4252e777a2771950fc665f0d509bb7
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoMake certain that qServiceDebugLog can't block; clean up a little
Alex Wilson [Thu, 14 Jun 2012 04:06:05 +0000 (14:06 +1000)]
Make certain that qServiceDebugLog can't block; clean up a little

It's possible the OS could be keeping buffers on the UDP sockets for
some reason and these will fill up, resulting in the debug logger
blocking. This patch detects this case by using the UDP socket in
O_NONBLOCK mode, and handles it by queuing up unsent messages for
later.

Also some cleanups that reduce the amount of code left behind by
qServiceDebug calls when CONFIG+=sfwdebug is _not_ set.

Change-Id: Iab50c013d59652a8a54bce2a2aba86789c398ec0
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoFix compile error for expression in template-argument list.
Toby Tomkins [Fri, 8 Jun 2012 03:42:24 +0000 (13:42 +1000)]
Fix compile error for expression in template-argument list.

Qt is using C++11 for some compiler/platform combinations. As such
QStringLiteral does not work in some contexts. Error follows,
./qjsondbwrapper_p.h:113: error: statement-expressions are not
allowed outside functions nor in template-argument lists.

Change-Id: I3e1c4339aaf5acc513e0c1484903e9e1022749a5
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoMake sure to create jsondbwatcher on the main thread
Alex Wilson [Wed, 6 Jun 2012 03:22:21 +0000 (13:22 +1000)]
Make sure to create jsondbwatcher on the main thread

Change-Id: I83ffaf03b37e6ca7a02d917c3612df39474f3b89
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoPut watcher on the right partiton, fix debug
Andrew Stanley-Jones [Thu, 31 May 2012 09:05:38 +0000 (19:05 +1000)]
Put watcher on the right partiton, fix debug

Make sure the watcher is using the right partition,
and the debug message must not print out the
entire contents of the cache, just the removed
service.

Change-Id: Icdfb53f678fb17dc06aa000b3d107f588c296574
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoSend device's timestamp with sfw debug messages
Alex Wilson [Wed, 6 Jun 2012 03:21:11 +0000 (13:21 +1000)]
Send device's timestamp with sfw debug messages

This makes it match up with timestamps in any other system logs,
for easier cross-referencing.

Change-Id: I88ce923ecdd6dc9bf7e24a4505fbce0a8f8fcd8f
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoCompile with gcc 4.4
Lars Knoll [Mon, 11 Jun 2012 13:57:19 +0000 (15:57 +0200)]
Compile with gcc 4.4

If you want an empty string as default argument, use QString()
and not QStringLiteral("").

Change-Id: Id815d955c155d8ae1618b587b40d913b16c81d39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
5 years agoFix compilation of examples when Qt is configured with -no-widgets
Kent Hansen [Wed, 6 Jun 2012 20:54:24 +0000 (22:54 +0200)]
Fix compilation of examples when Qt is configured with -no-widgets

Change-Id: I047cab85368cc7159fb3c52d6615b83dc4ba6cd7
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoUse partitions in QJsonDbWrapper
Steffen Hahn [Tue, 5 Jun 2012 10:14:35 +0000 (12:14 +0200)]
Use partitions in QJsonDbWrapper

- fix proper usage of partitions in QJsonDbWrapper
- fix wrong connection in Linux' private QDeviceProfile

Change-Id: I59c4030bcd02e6eddb723efd97c0e0fd2c0b9519
Reviewed-by: Yang Li <yang.12.li@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoContinue support of monitorAllLogicalDrives property
Steffen Hahn [Tue, 5 Jun 2012 14:50:37 +0000 (16:50 +0200)]
Continue support of monitorAllLogicalDrives property

This patch is to revert changes from https://codereview.qt-project.org/#change,18819.
There are use cases where developers wants to listen to onLogicalDrivesChanged signal
without reading the allLogicalDrives list at all. The idea was to enable monitoring
by default when reading allLogicalDrives property. To close this gap the monitor
property should be kept so that onLogicalDrivesChanged signal can be conveniently
enabled for all use-cases.

Change-Id: I67e2048de5bec25305e38172518e9a9de3873018
Reviewed-by: Yang Li <yang.12.li@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoCorrect wrong type in QNetworkServiceWrapper
Steffen Hahn [Tue, 5 Jun 2012 16:13:14 +0000 (18:13 +0200)]
Correct wrong type in QNetworkServiceWrapper

- correct wrong type in signalStrength method
- calculate signalStrength correctly

Change-Id: I9e2b09a1c8b83706beff01dfff8705ae43d267f9
Reviewed-by: Yang Li <yang.12.li@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoreplacing signals/slots keyword by the equivalent Q_SIGNALS/Q_SLOTS
Corentin Jabot [Mon, 4 Jun 2012 21:07:02 +0000 (23:07 +0200)]
replacing signals/slots keyword by the equivalent Q_SIGNALS/Q_SLOTS

Change-Id: I9ad42ab2f40992c68e9d3bf26fd09dfc46527ba5
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoFix the unix backend
Andrew Stanley-Jones [Fri, 1 Jun 2012 11:23:08 +0000 (21:23 +1000)]
Fix the unix backend

Two bugs caused unit tests to fail.  Also shorten the tests,
on some systems sending 5000 messages takes a long time
It's probably a bit overkill anyways.

Change-Id: Iaf2b4008d48294a2bea9cee15d5344851ed96681
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoReconnect if the interface goes away
Andrew Stanley-Jones [Thu, 31 May 2012 03:50:07 +0000 (13:50 +1000)]
Reconnect if the interface goes away

Multicast sockets don't tell us if the interface
comes and goes.  Poll and try to reconnect if
we notice the interface is missing.

Change-Id: I5c8542ec1d92b1fd59afd1069b7093d70cd80625
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoUsing QStringLiteral instead of QLatin1Literal
Debao Zhang [Tue, 24 Apr 2012 04:56:43 +0000 (21:56 -0700)]
Using QStringLiteral instead of QLatin1Literal

The existence of QLatin1Literal is for Qt 4.x compatibility only, which
is a typedef of QLatin1String now.

Change-Id: I1be1c353689571f685cc35d1ffaa3984dac35370
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
5 years agoRemove the last traces of the old plugin system
Lars Knoll [Sun, 27 May 2012 14:36:19 +0000 (16:36 +0200)]
Remove the last traces of the old plugin system

Change-Id: I60811f350a88fb8389742caf8c3c7c95f786bc8e
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoSet SFW default partion
Andrew Stanley-Jones [Mon, 28 May 2012 05:12:44 +0000 (15:12 +1000)]
Set SFW default partion

When using the jsondb backend default to a useful partition.

Change-Id: I21632f00c5e3d1427ac39510c031de0613ea8b64
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoAlways write via the pending buffer, instead of taking a shortcut
Alex Wilson [Wed, 30 May 2012 08:05:18 +0000 (18:05 +1000)]
Always write via the pending buffer, instead of taking a shortcut

This solves some issues with pending writes building up in particular
racey situations.

Change-Id: I1f0517737da8cddcbfbe4225db3dbf432038adee
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoAdd extra debugging messages
Alex Wilson [Wed, 30 May 2012 08:05:48 +0000 (18:05 +1000)]
Add extra debugging messages

"identify" message showing the PEERCREDs of the socket
adding fds to some read/write messages

Change-Id: Ia3a2cfcc450ae70e283654823609afeb4c16f857
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoDisable and re-enable read notifier in readIncoming
Alex Wilson [Wed, 30 May 2012 08:04:25 +0000 (18:04 +1000)]
Disable and re-enable read notifier in readIncoming

Probably won't make much difference to most platforms, but it's
recommended in the QSocketNotifier documentation, so we should
do it.

Change-Id: If9fff5278c74876aeef677f486ad5f9099758aa9
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoUDP multicast logging for serviceframework
Alex Wilson [Tue, 29 May 2012 06:33:14 +0000 (16:33 +1000)]
UDP multicast logging for serviceframework

Slightly more organised way to receive debug messages. Also includes
a really basic (somewhat hacky) client app to receive the messages.

Change-Id: Ic578ddf7cc2fec9b97c5ac4f015a832137174625
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoFix a socket leak
Yang Li [Tue, 29 May 2012 12:54:24 +0000 (14:54 +0200)]
Fix a socket leak

Connect to signal errorUnrecoverableIPCFault
Remove the interfaces from loadedNetworkManagerInterfaces list in destructor

Change-Id: Iac266f15667c61bb521120f2122219750a2883ea
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoWakeup the write notifier when buffering data
Andrew Stanley-Jones [Wed, 30 May 2012 01:56:40 +0000 (11:56 +1000)]
Wakeup the write notifier when buffering data

When data is added to the write buffer you must wakeup the
write notifier to send the data in the future when the
socket becomes available for writing.

Change-Id: I63cdd4ab88c4a372c74c58d857d0e0b457f0ea60
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoSet close on exec
Andrew Stanley-Jones [Wed, 30 May 2012 01:45:01 +0000 (11:45 +1000)]
Set close on exec

Without this flah set if a process exec() SFW sockets will
be leaked to the new process.

Change-Id: I9210da324982a5bd139ed1ea32ec394f4425067e
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoSet explicit testcase.timeout for slow test
Rohan McGovern [Tue, 29 May 2012 06:06:03 +0000 (16:06 +1000)]
Set explicit testcase.timeout for slow test

We'd like to decrease the default timeout for tests in the Qt Project CI
so that we waste less time waiting for hanging tests.

Tests which genuinely take a long time to run, such as this one, should
have their timeout explicitly set in their .pro file.

Change-Id: I64a37c0a16a5418962f8675f38a1a1af2fe5a006
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoStop waiting for dead clients
Alex Wilson [Tue, 29 May 2012 01:18:02 +0000 (11:18 +1000)]
Stop waiting for dead clients

Fail fast if we know the client is already dead and we've been
asked to wait for a response.

Change-Id: I490b97e972dd428114f77c422ee12ad08c2ed940
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoMaking service sockets non-blocking
Andrew Stanley-Jones [Fri, 25 May 2012 10:02:29 +0000 (20:02 +1000)]
Making service sockets non-blocking

All sockets are meant to be non-blocking, and this
was missed on the service sockets.  This could
cause applications to lock up.

Change-Id: Idccf878926a6a7bdef843aa1ea012697429c3fe8
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoEnsure jsondb worker runs the main thread
Andrew Stanley-Jones [Fri, 25 May 2012 08:27:24 +0000 (18:27 +1000)]
Ensure jsondb worker runs the main thread

Since the service is started on demand we can get started
on any thread.  Move to the main thread just in case
the thread we're started on never gets an event loop.

Change-Id: Ib82f521ea296ec97a70bd8785bbf62c99da051ef
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoCheck thread-local storage for zero before dereferencing
Alex Wilson [Fri, 25 May 2012 07:02:11 +0000 (17:02 +1000)]
Check thread-local storage for zero before dereferencing

Change-Id: Iea3014c31d33305d9fc848e39d420149c6095fc5
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoRemove some more Q_GLOBAL_STATICS
Alex Wilson [Fri, 25 May 2012 06:30:34 +0000 (16:30 +1000)]
Remove some more Q_GLOBAL_STATICS

Avoid a race condition on application
exit that causes it to segafult due to
objects being destructed that are still in use.

Change-Id: I2bdc25c5be3c3377e7362c7971ba39fddb3a7f01
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoImprove debug. Add the ability to turn it on/off.
Andrew Stanley-Jones [Tue, 22 May 2012 00:40:13 +0000 (10:40 +1000)]
Improve debug.  Add the ability to turn it on/off.

Change-Id: I7bf66f7f1b0f4d2fb17b9c5fec6e70e85e5dfa5e
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoAdd Unix backend write caching
Andrew Stanley-Jones [Tue, 22 May 2012 00:39:14 +0000 (10:39 +1000)]
Add Unix backend write caching

Writing of packets is not required to happen instantly, and can
happen over time.  This changes the backend from blocking waiting
for write to use a write buffer closer to the localsocket
back end.

Change-Id: Ic3201b0da0b5a57166de58de1c8e3df43336ece0
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoAvoid reace condition on global static destruction
Andrew Stanley-Jones [Wed, 23 May 2012 05:06:14 +0000 (15:06 +1000)]
Avoid reace condition on global static destruction

Check for null incase the global static has
been destroyed first.

Change-Id: I4175fca1b0e3b756f1d4e1b6005dd7b02eb196ae
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoCoverity fixes
Alex Wilson [Fri, 25 May 2012 02:05:07 +0000 (12:05 +1000)]
Coverity fixes

Change-Id: I3df445efc3e1d869525ab63075f4c1227224a553
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoreturn an empty QString if cell id in NetworkInfo equals to 0
Yang Li [Tue, 22 May 2012 08:42:55 +0000 (10:42 +0200)]
return an empty QString if cell id in NetworkInfo equals to 0

Change-Id: I1d1e61067c52b19f669512285491a681e380dc04
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agomodel value in DeviceInfo does not need to contain the manufacturer value
Yang Li [Tue, 22 May 2012 13:45:08 +0000 (15:45 +0200)]
model value in DeviceInfo does not need to contain the manufacturer value

Change-Id: I5f63d8237a45adb4fc225cea207b2cd150cdf6a8
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoAdded support for JSON DB partitions to P&S
Johann Specht [Tue, 22 May 2012 05:42:33 +0000 (07:42 +0200)]
Added support for JSON DB partitions to P&S

Change-Id: I9ce0bb8222b6e61d6a74f31f2708b83564f7a940
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoRemoved CONFIG+=parallel_test from suspected parallel-unsafe test
Rohan McGovern [Wed, 23 May 2012 00:21:24 +0000 (10:21 +1000)]
Removed CONFIG+=parallel_test from suspected parallel-unsafe test

This test has failed a parallel stress test and may contribute to
instability in test runs.

Additionally, the parallel_test in qservicemanager.pro had no effect.

Change-Id: Id000ebd434eac9ee31a2f47acbb3d1cd23c95512
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoadd define to avoid using sigwinch when debug enabled
Andrew Stanley-Jones [Sun, 13 May 2012 23:50:56 +0000 (09:50 +1000)]
add define to avoid using sigwinch when debug enabled

This code is meant for debug only

Change-Id: I731addec6c39c97d790f0c590ec757965f9aa034
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoFix deadlock in jsondb caching, add internal debug
Andrew Stanley-Jones [Wed, 16 May 2012 07:24:29 +0000 (17:24 +1000)]
Fix deadlock in jsondb caching, add internal debug

Don't emit signals while the mutex is locked.  Someone
may call back into the database backend for updates.

Change-Id: I33a37f9a24c1589cbc1514ca0140f4f3955792c5
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agosync.profile: remove dependency on qtscript.
Toby Tomkins [Tue, 15 May 2012 02:01:55 +0000 (12:01 +1000)]
sync.profile: remove dependency on qtscript.

sync.profile should not reference modules as dependencies unless they
are actually required; update sync.profile and pro file accordingly.

Change-Id: I01e07bd7f7a5bf34b09e6021b964b09c34929d76
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
5 years agorelease udev_device resource after processing udev messages
Yang Li [Wed, 9 May 2012 16:22:08 +0000 (18:22 +0200)]
release udev_device resource after processing udev messages

Change-Id: I843043bc93a6ee6ed415fa7bd63ea4df92b78630
Reviewed-by: Steffen Hahn <steffen.hahn@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoContinue support for monitorCurrentNetworkMode
Steffen Hahn [Wed, 9 May 2012 09:22:28 +0000 (11:22 +0200)]
Continue support for monitorCurrentNetworkMode

Most of the NetworkInfo monitor properties were set to obsoleted in
https://codereview.qt-project.org/#change,19125 . It is important
for UI applications to have possiblity to control monitoring of
currentNetworkMode since its updates are polled.
This way polling can be completely disable for power saving or
performance reasons.

Change-Id: I02e102e135050f4b1a23b6e03fd500eb0d822978
Reviewed-by: Yang Li <yang.12.li@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoPlace non-changeable properties in front of changeable properties when setting simula...
Yang Li [Wed, 9 May 2012 09:02:14 +0000 (11:02 +0200)]
Place non-changeable properties in front of changeable properties when setting simulated battery info data

Change-Id: I3dbdd2eca5c55234ed662273fcbb9bce3954d835
Reviewed-by: Steffen Hahn <steffen.hahn@nokia.com>
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
5 years agoNew sfw api to add async service loading
Sarah Smith [Thu, 19 Apr 2012 08:06:31 +0000 (18:06 +1000)]
New sfw api to add async service loading

This add a new API to QServiceManager
that adds async loading.  This is done in a QNAM
style with a QServiceReply that then
emit a signal when complete.

This is a work in progress and updated
for comments and feedback.

Task-number: QTBUG-25402

Change-Id: I626a95cab177587621b1ea8f64c023735db6479a
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
5 years agoFix error on read, close socket on EOF
Andrew Stanley-Jones [Fri, 11 May 2012 06:41:18 +0000 (16:41 +1000)]
Fix error on read, close socket on EOF

Read returns 0 for end of file, and the socket should be closed,
but this does not set errno and it should not be checked.  If
it returns -1, then check for EAGAIN and don't close the socket.

Change-Id: I2686aa473f88540eb7336318cfcc974833cb0f9b
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
5 years agoFix crash in creating new objects
Andrew Stanley-Jones [Fri, 11 May 2012 02:17:33 +0000 (12:17 +1000)]
Fix crash in creating new objects

A null can be returned if the connection to the service
fails after we've connected, but before the object
is created.  Don't use a null object, and return
the failure properly.

Change-Id: I3a83e4b169a75c8b29377adeb659c74a448531d3
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
5 years agoIgnore SIGPIPE
Andrew Stanley-Jones [Thu, 10 May 2012 07:11:42 +0000 (17:11 +1000)]
Ignore SIGPIPE

This is how QAbstractSocket native unix backend deals with
sigpipe.  This is the only portable way.

Change-Id: I8d6d27a5b5cc93a7226fd508a3fee8656df511b2
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>