summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doc/config/html-offline.qdocconf39
-rw-r--r--src/doc/config/template/images/arrow_bc.pngbin1071 -> 0 bytes
-rw-r--r--src/doc/config/template/images/bgrContent.pngbin149 -> 0 bytes
-rw-r--r--src/doc/config/template/images/blu_dot.pngbin168 -> 0 bytes
-rw-r--r--src/doc/config/template/images/btn_next.pngbin689 -> 0 bytes
-rw-r--r--src/doc/config/template/images/btn_prev.pngbin676 -> 0 bytes
-rw-r--r--src/doc/config/template/images/home.pngbin1076 -> 0 bytes
-rw-r--r--src/doc/config/template/images/ico_note.pngbin649 -> 0 bytes
-rw-r--r--src/doc/config/template/images/ico_note_attention.pngbin529 -> 0 bytes
-rw-r--r--src/doc/config/template/images/ico_out.pngbin362 -> 0 bytes
-rw-r--r--src/doc/config/template/style/offline.css628
-rw-r--r--src/doc/src/b2qt-external-pages.qdoc48
-rw-r--r--src/doc/src/b2qt-post-install-setup.qdocinc4
-rw-r--r--src/doc/src/b2qt.qdoc380
-rw-r--r--src/doc/src/detect-sd-card-device-name.qdocinc2
-rw-r--r--src/doppelganger/main.cpp2
-rw-r--r--src/doppelganger/permissioncontroller.cpp2
-rw-r--r--src/doppelganger/permissioncontroller.h2
-rw-r--r--src/doppelganger/schedulingpolicyservice.cpp2
-rw-r--r--src/doppelganger/schedulingpolicyservice.h2
-rw-r--r--src/imports/nativemedia/SurfaceTexture.cpp2
-rw-r--r--src/imports/nativemedia/SurfaceTexture.h2
-rw-r--r--src/imports/nativemedia/main.cpp2
-rw-r--r--src/imports/nativemedia/omx.cpp2
-rw-r--r--src/imports/nativemedia/omxmodule.cpp2
-rw-r--r--src/imports/nativemedia/omxnode.cpp2
-rw-r--r--src/imports/nativemedia/omxnode.h2
-rw-r--r--src/imports/nativemedia/omxplayer.h2
-rw-r--r--src/imports/nativemedia/test.qml2
-rw-r--r--src/imports/utils/plugin.cpp2
-rw-r--r--src/imports/wifi/pluginmain.cpp30
-rw-r--r--src/imports/wifi/qwifimanager.cpp24
-rw-r--r--src/imports/wifi/qwifimanager.h2
-rw-r--r--src/imports/wifi/qwifinetwork.cpp2
-rw-r--r--src/imports/wifi/qwifinetwork.h2
-rw-r--r--src/imports/wifi/qwifinetworklist.cpp2
-rw-r--r--src/imports/wifi/qwifinetworklist.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidaccelerometer.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidaccelerometer.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidambientlightsensor.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidbasesensor.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidbasesensor.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidgyroscope.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidgyroscope.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidlight.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidlight.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidmagnetometer.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidmagnetometer.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidrotationsensor.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidrotationsensor.h2
-rw-r--r--src/plugins/sensors/eandroid/eandroidsensordevice.cpp2
-rw-r--r--src/plugins/sensors/eandroid/eandroidsensordevice.h2
-rw-r--r--src/qconnectivity/main.cpp75
-rw-r--r--src/qt_hw_init/main.cpp2
-rw-r--r--src/utils/qdroidutils.cpp32
-rw-r--r--src/utils/qdroidutils.h2
-rw-r--r--src/utils/utils.pro2
58 files changed, 538 insertions, 802 deletions
diff --git a/src/doc/config/html-offline.qdocconf b/src/doc/config/html-offline.qdocconf
index cd95334..29a5613 100644
--- a/src/doc/config/html-offline.qdocconf
+++ b/src/doc/config/html-offline.qdocconf
@@ -1,36 +1,7 @@
-HTML.nobreadcrumbs = "true"
-
-HTML.stylesheets = template/style/offline.css
-
-# Copy images used by the template to images folder in output directory
-HTML.extraimages = template/images/bgrContent.png \
- template/images/blu_dot.png \
- template/images/btn_next.png \
- template/images/btn_prev.png \
- template/images/ico_note.png \
- template/images/ico_note_attention.png \
- template/images/ico_out.png \
- template/images/arrow_bc.png \
- template/images/home.png
+# use the global Qt template with modifications to the html footer
+include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
-# Add style-related files into qch package
-qhp.extraFiles += style/offline.css \
- images/bgrContent.png \
- images/blu_dot.png \
- images/btn_next.png \
- images/btn_prev.png \
- images/ico_note.png \
- images/ico_note_attention.png \
- images/ico_out.png \
- images/home.png \
- images/arrow_bc.png
-
-HTML.headerstyles = \
- " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
-
-HTML.endheader = \
- "</head>\n" \
- "<body>\n"
+HTML.nobreadcrumbs = "true"
HTML.footer = \
" <div class=\"ft\">\n" \
@@ -39,7 +10,7 @@ HTML.footer = \
"</div> \n" \
"<div class=\"footer\">\n" \
" <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2014 Digia Plc and/or its\n" \
" subsidiaries.</p>\n" \
" <p>\n" \
" Licensees holding valid Qt Commercial licenses may use this document in\n" \
@@ -50,5 +21,5 @@ HTML.footer = \
" Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
+ " href=\"http://qt.digia.com/Digia-Legal-Notice--Privacy-Policy/\">Privacy Policy</a></p>\n" \
"</div>\n"
diff --git a/src/doc/config/template/images/arrow_bc.png b/src/doc/config/template/images/arrow_bc.png
deleted file mode 100644
index f2a83a5..0000000
--- a/src/doc/config/template/images/arrow_bc.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/bgrContent.png b/src/doc/config/template/images/bgrContent.png
deleted file mode 100644
index 1a81b03..0000000
--- a/src/doc/config/template/images/bgrContent.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/blu_dot.png b/src/doc/config/template/images/blu_dot.png
deleted file mode 100644
index c332148..0000000
--- a/src/doc/config/template/images/blu_dot.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/btn_next.png b/src/doc/config/template/images/btn_next.png
deleted file mode 100644
index f7bc2b7..0000000
--- a/src/doc/config/template/images/btn_next.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/btn_prev.png b/src/doc/config/template/images/btn_prev.png
deleted file mode 100644
index 10a620c..0000000
--- a/src/doc/config/template/images/btn_prev.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/home.png b/src/doc/config/template/images/home.png
deleted file mode 100644
index 8de6d0c..0000000
--- a/src/doc/config/template/images/home.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/ico_note.png b/src/doc/config/template/images/ico_note.png
deleted file mode 100644
index 1379404..0000000
--- a/src/doc/config/template/images/ico_note.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/ico_note_attention.png b/src/doc/config/template/images/ico_note_attention.png
deleted file mode 100644
index b85b696..0000000
--- a/src/doc/config/template/images/ico_note_attention.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/images/ico_out.png b/src/doc/config/template/images/ico_out.png
deleted file mode 100644
index ff6e458..0000000
--- a/src/doc/config/template/images/ico_out.png
+++ /dev/null
Binary files differ
diff --git a/src/doc/config/template/style/offline.css b/src/doc/config/template/style/offline.css
deleted file mode 100644
index 3bab27b..0000000
--- a/src/doc/config/template/style/offline.css
+++ /dev/null
@@ -1,628 +0,0 @@
-body{
-font: normal 400 14px/1.2 Arial;
-margin-top:85px;
-font-family: Arial, Helvetica;
-color:#313131;
-text-align:justify;
-margin-left:5px;
-margin-right:5px;
-}
-
-img{
--moz-box-shadow: 3px 3px 3px #ccc;
--webkit-box-shadow: 3px 3px 3px #ccc;
-box-shadow: 3px 3px 3px #ccc;
-border:#8E8D8D 2px solid;
-margin-left:0px;
-max-width: 800px;
-height: auto
-}
-
-b{
-font-weight:600;
-}
-
-.content{}
-
-.descr{
-margin-top:35px;
-/*max-width: 75%;*/
-margin-left:5px;
-text-align:justify;
-min-height:700px;
-vertical-align:top;
-}
-
-.name{
-max-width: 75%;
-font-weight:100;
-}
-
-tt{
-text-align:left;}
-
-/*
------------
-links
------------
-*/
-
-a:link{
-color: #2C418D;
-text-decoration: none;
-text-align:left;
-}
-
-a:hover{
-color: #869CD1;
-text-decoration:underline;
-text-align:left;
-}
-
-a:visited{
-color: #869CD1;
-text-decoration: none;
-text-align:left;
-}
-
-a:visited:hover{
-text-decoration:underline;
-text-align:left;
-}
-
-a[href*="http://"], a[href*="ftp://"],a[href*="https://"]
-{
-text-decoration: none;
-background-image:url(../images/ico_out.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-text-align:left;
-}
-
-.flags{
-text-decoration:none;
-text-height:24px;
-}
-
-/*
--------------------------------
-NOTE styles
--------------------------------
-*/
-.notetitle, .tiptitle, .fastpathtitle{
-font-weight:bold;
-}
-
-.attentiontitle,.cautiontitle,.dangertitle,.importanttitle,.remembertitle,.restrictiontitle{
-font-weight:bold;
-}
-
-.note,.tip,.fastpath{
-background: #F2F2F2 url(../images/ico_note.png);
-background-repeat: no-repeat;
-background-position: top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-.attention,.caution,.danger,.important,.remember,.restriction{
-background: #F2F2F2 url(../images/ico_note_attention.png);
-background-repeat:no-repeat;
-background-position:top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-/*
--------------------------------
-Top navigation
--------------------------------
-*/
-
-.header{
-
-height:1px;
-padding:0px;
-margin:0px;
-}
-
-.qtref{
-display: block;
-position: relative;
-top: -76px;
-height:15px;
-z-index: 1;
-font-size:11px;
-padding-right:10px;
-float:right;
-}
-
-.naviNextPrevious{
-display: block;
-position: relative;
-text-align: right;
-top: -53px;
-float:right;
-height:20px;
-z-index:1;
-padding-right:10px;
-padding-top:2px;
-vertical-align:top;
-margin:0px;
-}
-
-
-.naviNextPrevious > a.prevPage {
-background-image:url(../images/btn_prev.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-height:20px;
-padding-left:20px;
-}
-
-.naviNextPrevious > a.nextPage {
-background-image:url(../images/btn_next.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-height:20px;
-margin-left:30px;
-}
-
-.breadcrumb{
-display: block;
-position: relative;
-top:-20px;
-/*border-top:2px solid #ffffff;*/
-border-bottom: 1px solid #cecece;
-background-color:#F2F2F2;
-z-index:1;
-height:20px;
-padding:0px;
-margin:0px;
-padding-left:10px;
-padding-top:2px;
-margin-left:-5px;
-margin-right:-5px;
-}
-
-.breadcrumb ul{
- margin:0px;
- padding:0px;
-}
-
-.breadcrumb ul li{
-background-color:#F2F2F2;
-list-style-type:none;
-padding:0;
-margin:0;
-height:20px;
-}
-
-.breadcrumb li{
-float:left;
-}
-
-.breadcrumb .first {
-background:url(../images/home.png);
-background-position:left;
-background-repeat:no-repeat;
-padding-left:20px;
-}
-
-
-.breadcrumb li a{
-color:#2C418D;
-display:block;
-text-decoration:none;
-background:url(../images/arrow_bc.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:25px;
-padding-left:10px;
-}
-
-.breadcrumb li a:hover{
-color:#909090;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-padding-left:10px;
-}
-
-
-/* table of content
-no display
-*/
-
-/*
------------
-headers
------------
-*/
-
-
-@media screen{
-.title{
-color:#313131;
-font-size: 18px;
-font-weight: normal;
-left: 0;
-padding-bottom: 20px;
-padding-left: 10px;
-padding-top: 20px;
-position: absolute;
-right: 0;
-top: 0;
-background-color:#E6E6E6;
-border-bottom: 1px #CCC solid;
-border-top: 2px #CCC solid;
-font-weight:bold;
-margin-left:0px;
-margin-right:0px;
-}
-}
-
-h1 {
-margin: 0;
-}
-
-h2, p.h2 {
-font: 500 16px/1.2 Arial;
-font-weight:100;
-background-color:#F2F3F4;
-padding:4px;
-padding-left: 14px;
-margin-bottom:30px;
-margin-top:30px;
-margin-left: -10px;
-margin-right: -5px;
-border-top:#E0E0DE 1px solid;
-border-bottom: #E0E0DE 1px solid;
-}
-
-h3{
-
-font: 500 14px/1.2 Arial;
-font-weight:100;
-text-decoration:underline;
-margin-bottom:30px;
-margin-top:30px;
-}
-
-h3.fn,span.fn{
-border-width: 1px;
-border-style: solid;
-border-color: #E6E6E6;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-word-spacing: 3px;
-padding: 5px 5px;
-text-decoration:none;
-font-weight:bold;
-max-width:75%;
-font-size:14px;
-margin:0px;
-margin-top:30px;
-
-}
-
-.name{
-color:#1A1A1A;
-}
-.type{
-color:#808080;
-}
-
-
-
-@media print {
-.title {
-color:#0066CB;
-font-family:Arial, Helvetica;
-font-size: 32px;
-font-weight: normal;
-left: 0;
-position: absolute;
-right: 0;
-top: 0;
-}
-}
-
-
-/*
------------------
-table styles
------------------
-*/
-.table img {
-border:none;
-margin-left:0px;
--moz-box-shadow:0px 0px 0px #fff;
--webkit-box-shadow: 0px 0px 0px #fff;
-box-shadow: 0px 0px 0px #fff;
-}
-
-/* table with border alternative colors*/
-
- table,pre{
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
- border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-border: 1px solid #E6E6E6;
-border-collapse: separate;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-}
-
-
-table th{
-text-align:left;
-padding-left:20px;
-}
-
-table td {
-padding: 3px 15px 3px 20px;
-border-bottom:#CCC dotted 1px;
-}
-table p { margin:0px;}
-
-table tr.even {
-background-color: white;
-color: #66666E;
-}
-
-table tr.odd {
-background-color: #F6F6F6;
-color: #66666E;
-}
-
-
-table thead {
-text-align:left;
-padding-left:20px;
-background-color:#e1e0e0;
-border-left:none;
-border-right:none;
-}
-
-table thead th {
-padding-top:5px;
-padding-left:10px;
-padding-bottom:5px;
-border-bottom: 2px solid #D1D1D1;
-padding-right:10px;
-}
-
-
-/* table bodless & white*/
-
-.borderless {
-border-radius: 0px 0px 0px 0px;
-background-color: #fff;
-border: 1px solid #fff;
-}
-
-.borderless tr {
-background-color: #FFF;
-color: #66666E;
-}
-
-.borderless td {
-border:none;
-border-bottom:#fff dotted 1px;
-}
-
-/*
------------
-List
------------
-*/
-
-ul{
-padding-bottom:2px;
-}
-
-li {
-margin-bottom: 10px;
-padding-left: 8px;
-list-style:outside;
-list-style-type:square;
-text-align:left;
-}
-
-
-ol{
-margin:10px;
-padding:0;
-}
-
-ol > li{
-margin-left: 30px;
-padding-left:8px;
-list-style:decimal;
-}
-
-.centerAlign{
-text-align: left;
-}
-
-.cpp{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.footer{
-margin-top: 50px;
-padding-left:5px;
-margin-bottom: 10px;
-font-size:10px;
-border-top: 1px solid #999;
-padding-top:11px;
-}
-
-.footer a[href*="http://"], a[href*="ftp://"],a[href*="https://"]{
-background-size: 13px 11px;
-padding-left: 16px;
-}
-
-.footerNavi{
-width:auto;
-text-align:right;
-margin-top:50px;
-z-index:1;
-}
-
-.memItemLeft{
-padding-right: 3px;
-}
-
-.memItemRight{
-padding: 3px 15px 3px 0;
-}
-
-.qml{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.qmldefault{
-padding-left: 5px;
-float: right;
-color: red;
-}
-
-.qmlreadonly{
-padding-left: 5px;
-float: right;
-color: #254117;
-}
-
-.rightAlign{
-padding: 3px 5px 3px 10px;
-text-align: right;
-}
-
-/*
------------
-Content table
------------
-*/
-
-@media print{
-.toc {
-float: right;
-padding-bottom: 10px;
-padding-top: 50px;
-width: 100%;
-background-image:url(../images/bgrContent.png);
-background-position:top;
-background-repeat:no-repeat;
-}
-}
-
-@media screen{
-.toc{
-clear:both;
-float:right;
-vertical-align:top;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
- background:#FFF url(../images/bgrContent.png);
-background-position:top;
-background-repeat:repeat-x;
-border: 1px solid #E6E6E6;
-padding-left:5px;
-padding-bottom:10px;
-height: auto;
-width: 200px;
-text-align:left;
-z-index:2;
-margin-left:20px;
-margin-right:20px;
-margin-top:0px;
-padding-top:0px;
-}
-}
-
-.toc h3{
-text-decoration:none;
-}
-
-.toc h3{font: 500 14px/1.2 Arial;
-font-weight:100;
-padding:0px;
-margin:0px;
-padding-top:5px;
-padding-left:5px;
-}
-
-
-.toc ul{
-width:160px;
-padding-left:10px;
-padding-right:5px;
-padding-top:10px;
-}
-
-.toc ul li{
-margin-left:20px;
-list-style-image:url(../images/blu_dot.png);
-list-style:outside;
-
-}
-
-
-.toc ul li a:link{
-color: #2C418D;
-text-decoration: none;
-}
-
-.toc ul li a:hover{
-color: #869CD1;
-text-decoration:underline;
-
-}
-
-.toc ul li a:visited{
-color: #869CD1;
-font-weight: bold;
-}
-
-.level1{
-border:none;}
-
-.clearfix{
-clear:both;}
-
diff --git a/src/doc/src/b2qt-external-pages.qdoc b/src/doc/src/b2qt-external-pages.qdoc
new file mode 100644
index 0000000..5196095
--- /dev/null
+++ b/src/doc/src/b2qt-external-pages.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://qt.digia.com/
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://qt.digia.com/
+**
+****************************************************************************/
+
+/*!
+ \externalpage http://qt.digia.com/Product/Qt-for-Embedded-Development/Qt-Enterprise-Embedded/Supported-Modules-and-Known-Issues/
+ \title Known Issues
+*/
+
+/*!
+ \externalpage http://qt.digia.com/Product/Qt-for-Embedded-Development/Qt-Enterprise-Embedded/
+ \title product page
+*/
+
+/*!
+ \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Qt-Quick-Enterprise-Controls/
+ \title Qt Quick Enterprise Controls
+*/
+
+/*!
+ \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Qt-Virtual-Keyboard/
+ \title Qt Virtual Keyboard
+*/
+
+/*!
+ \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Charts/
+ \title Qt Charts
+*/
+
+/*!
+ \externalpage https://www.yoctoproject.org/
+ \title Yocto Project
+*/
diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc
index d5c55cf..7fac266 100644
--- a/src/doc/src/b2qt-post-install-setup.qdocinc
+++ b/src/doc/src/b2qt-post-install-setup.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
@@ -27,7 +27,7 @@
\li Run the following command in a shell:
\code
- echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="udev-acl"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules
+ echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="udev-acl", TAG+="uaccess"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules
\endcode
\li Connect the running device to the development host with a USB
diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc
index e2322de..6f2d44c 100644
--- a/src/doc/src/b2qt.qdoc
+++ b/src/doc/src/b2qt.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
@@ -45,11 +45,13 @@
\list
\li \l{Preparing Nexus 7}{Nexus 7 (2012) (embedded Android)}
\li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android and Linux)}
+ \li \l{Preparing BeagleBone Black}{BeagleBone Black (embedded Android and Linux)}
\li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Linux)}
\li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)}
\endlist
\li \l{Building and Running an Example}
\li \l{Customization}
+ \li \l{ChangeLog}
\li \l{Troubleshooting}
\li \l{License Information}
\endlist
@@ -86,8 +88,8 @@
\e{\b{\B2Q}} is a light-weight, Qt-optimized, full software stack for
embedded systems that is installed into the actual target device. This is
- done by flashing the device’s memory card or device's internal memory
- directly with a pre-built image that comes with the development environment.
+ done by flashing the device's memory card or internal memory directly with a
+ pre-built image that comes with the development environment.
\B2Q supports two different operating systems:
@@ -100,8 +102,8 @@
forefront.
\li \b{\B2QL} where the software stack is using the traditional embedded
- Linux kernel built with the Yocto Poky reference system (Yocto 1.4
- \e Dylan release). The Embedded Linux variant is designed for great
+ Linux kernel built with the Yocto Poky reference system (Yocto 1.5
+ \e Dora release). The Embedded Linux variant is designed for great
customization possibilities. It contains only components required in
the embedded device, resulting in smaller image sizes while keeping
valuable development tools available.
@@ -161,8 +163,7 @@
this section and perform all the described tasks.
In case of problems, see the \l{Troubleshooting} information and the
- \e {Known Issues} on the Qt Enterprise Embedded product page in the Digia customer
- portal.
+ \l {Known Issues} in \SDK \l {product page}.
\target Requirements for Development Host
\section1 Requirements for Development Host
@@ -176,9 +177,15 @@
\section1 1. Installing 32-bit Support Libraries
Some of the build tools in \SDK are 32-bit programs, and on 64-bit
- systems they require support libraries for running 32-bit code. To install
- the required packages
- in Ubuntu, use the following command in a terminal:
+ systems they require support libraries for running 32-bit code. To
+ install the required packages in recent versions of Ubuntu, use
+ the following command in a terminal:
+
+ \code
+ sudo apt-get install g++-multilib zlib1g:i386
+ \endcode
+
+ For older Ubuntu versions such as 12.04, instead do:
\code
sudo apt-get install g++-multilib ia32-libs
@@ -189,10 +196,21 @@
The \B2Q emulator in \SDK relies on VirtualBox virtualization software. You can
download it from \l{https://www.virtualbox.org/wiki/Linux_Downloads} or
- install it from the command line with the following command:
+ install it via distribution tools.
+
+ If you have older Ubuntu versions such as 12.04 you have to install a newer
+ version of VirtualBox than your distribution does provide.
+ You have to add a foreign package source:
\code
- sudo apt-get install virtualbox
+ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
+ echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
+ sudo apt-get update
+ \endcode
+
+ Now install VirtualBox on your computer
+ \code
+ sudo apt-get install virtualbox-4.3
\endcode
To configure VirtualBox:
@@ -277,6 +295,7 @@
\list
\li \l{Nexus 7 (2012) (embedded Android)}
\li \l{Sabre Lite i.MX 6 (embedded Android and Linux)}
+ \li \l{BeagleBone Black (embedded Android and Linux)}
\li \l{BeagleBoard-xM (embedded Linux)}
\li \l{Raspberry Pi Model B (embedded Linux)}
\endlist
@@ -491,7 +510,7 @@
\code
~/$ mkdir bd-android
~/$ cd bd-android
- ~/bd-android$ sudo tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz
+ ~/bd-android$ tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz
\endcode
\li Run device/boundary/mksdcard.sh:
\code
@@ -515,16 +534,16 @@
\li \b{\B2QA}
\code
cd <INSTALL_DIR>
- Boot2Qt-2.x/iMX6-eAndroid/images/deploy.sh /dev/<device_name>
+ ./Boot2Qt-2.x/iMX6-eAndroid/images/deploy.sh /dev/<device_name>
\endcode
\li \b{\B2QL}
\code
cd <INSTALL_DIR>
- Boot2Qt-2.x/iMX6-eLinux/images/deploy.sh /dev/<device_name>
+ sudo ./Boot2Qt-2.x/iMX6-eLinux/images/deploy.sh /dev/<device_name>
\endcode
\endlist
- After the installation is complete, power on the device and check that
+ After the installation is complete, insert the SD card, power on the device and check that
the \B2Q welcome screen and/or demo appear.
\section1 Setting up USB Access
@@ -575,7 +594,7 @@
sudo Boot2Qt-2.x/raspberrypi-eLinux/images/deploy.sh /dev/<device_name>
\endcode
- After the image has been deployed, power on the device and check that
+ After the image has been deployed, insert the SD card, power on the device and check that
the \B2Q welcome screen and/or demo appear.
\section1 Configuring a Device Kit in Qt Creator
@@ -587,6 +606,85 @@
*/
/*!
+ \target BeagleBone Black (embedded Android and Linux)
+ \page qtee-preparing-hardware-beaglebone.html
+ \title Preparing BeagleBone Black
+ \previouspage qtee-installation-guide.html
+
+ Take the following steps to prepare a
+ \l{http://beagleboard.org/products/beaglebone%20black}{BeagleBone Black} for \B2Q.
+
+ \note It is important that you repeat the steps in this section after you
+ update \SDK.
+
+ The images containing the \B2Q stack for BeagleBone Black are included
+ in \SDK, ready to be copied to an SD card.
+
+ \section1 Preparing an SD Card
+
+ For \B2QA, an SD card of at least 2 GB capacity is needed. For \B2QL,
+ a card of at least 512 MB capacity is sufficient.
+
+ \include detect-sd-card-device-name.qdocinc instructions
+
+ \section1 Installing the Android image
+
+ \e{If installing} \B2QL, \e{you can skip this step and proceed to}
+ \l{Installing the Boot to Qt Image}.
+
+ Download the package \e{TI_Android_JB_4.2.2_DevKit_4.1.1_beagleboneblack.tar.gz} from
+ \l{http://downloads.ti.com/sitara_android/esd/TI_Android_DevKit/TI_Android_JB_4_2_2_DevKit_4_1_1/index_FDS.html}
+ {Texas Instruments} (search for \e {BeagleBone Black} in the list of download packages).
+
+ Use the following commands to create an SD card containing the
+ downloaded image:
+
+ \list 1
+ \li Extract the downloaded package:
+ \code
+ ~$ tar zxvf ~/Downloads/TI_Android_JB_4.2.2_DevKit_4.1.1_beagleboneblack.tar.gz
+ \endcode
+ \li Run beagleboneblack/mkmmc-android.sh:
+ \code
+ ~$ cd beagleboneblack
+ ~/beagleboneblack$ sudo ./mkmmc-android.sh /dev/<device_name>
+ \endcode
+ \endlist
+
+ \section1 Installing the \B2Q Image
+
+ Then, upgrade the SD card with \B2Q. Use one of the commands below,
+ depending on whether you are developing for embedded Android or Linux:
+
+ \list
+ \li \b{\B2QA}
+ \code
+ cd <INSTALL_DIR>
+ ./Boot2Qt-2.x/beaglebone-eAndroid/images/deploy.sh /dev/<device_name>
+ \endcode
+ \li \b{\B2QL}
+ \code
+ cd <INSTALL_DIR>
+ sudo ./Boot2Qt-2.x/beaglebone-eLinux/images/deploy.sh /dev/<device_name>
+ \endcode
+ \endlist
+
+ After the installation is complete, insert the SD card, power on the device and check that
+ the \B2Q welcome screen and/or demo appear.
+
+ \section1 Setting up USB Access
+
+ \include b2qt-post-install-setup.qdocinc setting up usb access
+
+ \section1 Configuring a Device Kit in Qt Creator
+
+ \include b2qt-post-install-setup.qdocinc configuring device kit
+
+ You are now ready to start developing for your device. For more information,
+ see \l{Building and Running an Example}.
+*/
+
+/*!
\page qtee-building-and-running.html
\title Building and Running an Example
\previouspage qtee-preparing-hardware.html
@@ -600,7 +698,7 @@
\li Make sure that your device is powered on and connected to the
development host.
\li In Qt Creator, select \b{File > New File or Project} >
- \b Applications > \b{Qt Quick 2 Application } > \b{Choose}.
+ \b Applications > \b{Qt Quick Application} > \b{Choose}.
\li Choose a location for your new project.
\li In the \b{Qt Quick Component Set} dialog, select \b{Qt Quick 2.0}.
\li In the \b{Kit Selection} dialog, select the kits for your
@@ -612,10 +710,23 @@
\li To build and run the project, click \inlineimage qtcreator-run.png
\endlist
+ \section1 Building and Running \B2Q Demos
+
+ You can find the \B2Q demo applications in Qt Creator.
+
+ \list 1
+ \li Go to \b Welcome > \b Examples.
+ \li Select a \e Boot2Qt Qt version from the drop-down list.
+ \li Select a demo you want to build.
+ \li In \b{Projects > Build & Run}, select the correct kit for your
+ connected device or emulator.
+ \li To build and run the project, click \inlineimage qtcreator-run.png
+ \endlist
+
\section1 Setting Up an Already Existing Project for Deployment
- The projects generated by Qt Creator always have the correct settings
- for deployment on the device or emulator. However, existing projects may
+ New Qt Quick application projects generated by Qt Creator always have the correct
+ settings for deployment on the device or emulator. However, other projects may
need some changes.
As a general rule, application binaries and resources (such as QML files and
@@ -642,7 +753,7 @@
\page qtee-customization.html
\title Customization
\previouspage qtee-building-and-running.html
- \nextpage qtee-troubleshooting.html
+ \nextpage qtee-changelog.html
\section1 Environment and Input
@@ -730,13 +841,125 @@
}
}
\endcode
+
+ \section1 Disabling Screen Composer on Embedded Android
+
+ By default, the \B2Q stack uses Android's screen composer, \e
+ Surfaceflinger. It is required for Qt Multimedia functionality,
+ i.e. video playback and camera. If that functionality is not
+ required, Surfaceflinger may be disabled. This can in some
+ situations improve performance.
+
+ \list 1
+ \li Edit \c {/system/bin/appcontroller.conf} to set the value of
+ the environment variable \c QT_QPA_EGLFS_NO_SURFACEFLINGER to \c
+ 1 instead of \c 0.
+ \li Disable the startup of \c surfaceflinger at boot-up. Either
+ change \c /init.rc, or simply rename the \c
+ {/system/bin/surfaceflinger} executable.
+ \endlist
+
+ \section1 Building Your Own Embedded Linux Image
+
+ \B2QL is built using the tools and resources from the \l {Yocto Project},
+ and is based on Yocto's reference distribution (\e Poky). You can
+ use the same tools to build custom \B2Q images, and have control over
+ which packages are included in the build and how the software stack
+ is configured.
+
+ \section2 Requirements
+
+ You should be familiar with the Yocto tools and the concept of
+ \e {recipes}. For more information, see Yocto Project
+ \l{https://www.yoctoproject.org/documentation/current}{documentation}.
+
+ To get started, you need the following:
+
+ \list
+ \li Install the \B2Q \e source packages. You can
+ find these by running the \e MaintenanceTool application
+ located in the \SDK installation directory and selecting
+ \e {Package Manager}. The \e {Yocto meta layer} package
+ contains the additional recipes required to make the image
+ compatible with \B2Q.
+ \li Install the dependencies for the Yocto tools. In Ubuntu,
+ the following packages are required:
+ \code
+ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath libsdl1.2-dev xterm
+ \endcode
+ \endlist
+
+ \section2 Setting Up Yocto Build Environment
+
+ Run the setup script that initializes the Yocto environment:
+
+ \code
+ cd <your/yocto/build/directory>
+ <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-yocto-meta/b2qt-init-build-env .
+ \endcode
+
+ \section2 Building the Image and Toolchain
+
+ After the Yocto environment is set up, you need to configure the
+ build environment for your target device. Using Raspberry Pi as
+ an example:
+
+ \code
+ export TEMPLATECONF=meta-b2qt/conf
+ export MACHINE=raspberrypi
+ source poky/oe-init-build-env build-raspberrypi
+ \endcode
+
+ Yocto recipes for \B2QL have two main targets to build: The target image,
+ and the external toolchain that is used for building the Qt framework and
+ applications.
+
+ \code
+ bitbake b2qt-embedded-image
+ bitbake meta-toolchain-b2qt-embedded-sdk
+ \endcode
+
+ \note The generated target image does not yet include Qt libraries,
+ you need to build Qt and add it into the image yourself.
+
+ \section2 Building Qt and Addons
+
+ \e {Build scripts} source package contains scripts that can be used to
+ build Qt and all additional Qt addons that are part of \B2QL image.
+ To setup build environment for your target hardware, create new build
+ directory and run the initialization script. Using Raspberry Pi as
+ an example:
+
+ \code
+ cd <your/qt/build/directory>
+ <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-common/init_build_env.sh <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi
+ \endcode
+
+ You can use following scripts to build different parts of the \B2Q stack.
+
+ \code
+ <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_qt.sh <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi
+ <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_extras.sh <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi
+ <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_image.sh <INSTALL_DIR>/Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi
+ \endcode
+
+ After \e {embedded-linux/build_image.sh} has finished, you can flash the device with
+ the updated image located in the build folder.
+
+ \section2 Note About Support Services for Yocto Tools
+
+ By default, Digia will only provide customer support for the Yocto
+ recipes on the reference platforms, as delivered with \SDK, and
+ setting up the development environment for them. Receiving support
+ for any other configuration requires a separate service agreement
+ between a customer and Digia.
*/
/*!
\page qtee-supported-platforms.html
\title Supported Platforms
\previouspage qtee-installation-guide.html
- \nextpage qtee-preparing-hardware.html
+ \nextpage qtee-changelog.html
\section1 Supported Target Devices
@@ -756,6 +979,7 @@
\list
\li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7 (2012)}
\li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM}
+ \li \l{http://beagleboard.org/products/beaglebone%20black}{BeagleBone Black}
\li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)}
\li \l{http://www.raspberrypi.org/faqs}{Raspberry Pi Model B}
\endlist
@@ -777,29 +1001,121 @@
\SDK is licensed under the Qt Enterprise commercial license. For more information,
see \l {http://qt.digia.com/licensing}. Evaluation licenses are also available,
- see \l {http://qt.digia.com/Products/Qt-Enterprise-Embedded}.
+ see \l {product page}{\SDK} on qt.digia.com.
\section1 3rd Party Software Licenses
The third-party licenses used in \SDK are listed in the file
\c {<INSTALL_DIR>/Licenses/ThirdPartySoftware_Listing.txt}.
- \section2 Embedded Android Images
+ \section1 Embedded Android Images
The embedded Android platform is built from the \e {Android Open Source Project},
source code available at \l {http://android.googlesource.com/}. The open
source licenses and notices are collected into the file
\c {/etc/NOTICE.html.gz} in the target images.
+
+ \section1 Android GNU C++ Run-time Licensing
+
+ The Android platform does not provide a full implementation of the C++ run-time. Instead,
+ apps that depend on features such as STL, exceptions, or RTTI, must include an additional
+ native run-time library that provides the features they need.
+
+ \B2QA uses the GNU libstdc++ library distributed as part of the \e {Android Open Source Project}.
+ This library is included in the images for \B2QA, and will be loaded by the application
+ on start-up to meet the run-time requirements of Qt.
+
+ The GNU C++ run-time is licensed under the
+ \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_gpl.html}{GNU General Public License version 3} with
+ an exception which grants permission for run-time linking and usage of the library by an application which
+ would otherwise violate the terms of the main license. For more information about this exception, see
+ \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html}{the official license page}.
+*/
+
+/*!
+ \page qtee-changelog.html
+ \title ChangeLog
+ \previouspage qtee-customization.html
+ \nextpage qtee-troubleshooting.html
+
+ \section1 \B2Q 2.0.0
+
+ \list
+ \li Release date: Feb. 25, 2014
+ \endlist
+
+ \section2 Changes
+ \b {New Features}:
+ \list
+ \li \B2Q stack was updated to use Qt 5.2.1 on embedded Android and Linux
+ \li Building your own \B2Q embedded Linux stack was enabled
+ \li Emulator graphics performance and quality was improved (GL-streaming)
+ \li BeagleBone Black was added as a reference device
+ \li \l {Qt Virtual Keyboard} was integrated into \B2Q
+ \li \l {Qt Quick Enterprise Controls} was added to the \B2Q stack
+ \li \l {Qt Charts} was added to the \B2Q stack
+ \li \B2Q source code was made available via online installer
+ \li WiFi networking support/configuration were implemented on embedded Android
+ \li Ethernet connectivity was enabled on embedded Android
+ \endlist
+
+ \b {Improvements}:
+ \list
+ \li Updated GDB for embedded Android toolchain
+ \li Enterprise demos (Charts, Enterprise Controls) were added
+ \li Embedded Linux: Moved to use Yocto 1.5 (Dora)
+ \li Demos available as examples in Qt Creator
+ \li Embedded Android emulator updated to Android 4.2.2
+ \endlist
+
+ \b {Fixed Bugs}:
+ \list
+ \li Embedded Android emulator: Missing Mesa headers
+ \li Embedded Linux emulator: Black screen in camera demo
+ \li Emulator tries to load host plugins
+ \li Sensors not working in emulators
+ \li Empty \c HOME environment variable in processes launched by appcontroller
+ \li Embedded Android emulator: C++ debugging fails
+ \li Qt add-ons not installed to host
+ \endlist
+
+ \b {Fixed Known Issues}:
+ \list
+ \li Qt SQL: QML LocalStorage Fails to Connect to Database on Embedded Android
+ \li Qt XML Patterns: Module not Available on embedded Android
+ \li Qt Multimedia: Audio is Muted on Nexus 7
+ \li Unnecessary Warnings Displayed by the Installer
+ \li Virtual Keyboard: Backspace Removes Two Characters
+ \endlist
+
+ \section1 \B2Q 1.0.1
+
+ \list
+ \li Release date: Dec. 5, 2013
+ \endlist
+
+ \section2 Changes
+ \list
+ \li Emulator: Remote control widget version shown together with emulator version
+ \li Emulator: Mouse events are sent instead of touch events
+ \li Emulator: Raster window support added
+ \li Emulator: emulatorproxyd shows its version on startup
+ \li Emulator: Detect some network problems
+ \li Emulator: Fixed issues related to startup
+ \li Emulator: Updated source code license headers
+ \li Emulator: Show all VirtualBox errors
+ \li Emulator: Video playback support on embedded Linux
+ \endlist
*/
/*!
\page qtee-troubleshooting.html
\title Troubleshooting
- \previouspage qtee-customization.html
+ \previouspage qtee-changelog.html
\nextpage qtee-licenses.html
- \note An updated version of this information may be available in the Digia
- customer portal, in the \e{Known Issues} section on the \SDK product page.
+ \note An updated version of this information may be available in Digia customer portal,
+ see \l {Known Issues} in \SDK \l {product page}.
\section1 General Issues
@@ -865,6 +1181,16 @@
Alternatively, press and hold the power button for 10
seconds. This will force a reboot.
+ \section2 How do I get HDMI output working properly on BeagleBone Black?
+
+ Depending on the HDMI monitor, the cable, and the build variant of
+ the BeagleBone Black device, it may not be able to drive an HDMI display in a
+ stable way; the image may disappear or stutter. These issues are not caused by
+ the \B2Q stack.
+
+ More details and possible solutions can be found
+ \l {http://www.elinux.org/Beagleboard:BeagleBoneBlack_HDMI}{here}.
+
\section2 Trying to build for the emulator target fails with error message \e{make: i686-android-linux-g++: Command not found}
You need to install support libraries in order to run 32-bit programs in a
diff --git a/src/doc/src/detect-sd-card-device-name.qdocinc b/src/doc/src/detect-sd-card-device-name.qdocinc
index 40d7f51..5f9803b 100644
--- a/src/doc/src/detect-sd-card-device-name.qdocinc
+++ b/src/doc/src/detect-sd-card-device-name.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/doppelganger/main.cpp b/src/doppelganger/main.cpp
index 6813b75..e4a06c8 100644
--- a/src/doppelganger/main.cpp
+++ b/src/doppelganger/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/doppelganger/permissioncontroller.cpp b/src/doppelganger/permissioncontroller.cpp
index 15f2313..a759dd7 100644
--- a/src/doppelganger/permissioncontroller.cpp
+++ b/src/doppelganger/permissioncontroller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/doppelganger/permissioncontroller.h b/src/doppelganger/permissioncontroller.h
index 2e95f79..7feb4b6 100644
--- a/src/doppelganger/permissioncontroller.h
+++ b/src/doppelganger/permissioncontroller.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/doppelganger/schedulingpolicyservice.cpp b/src/doppelganger/schedulingpolicyservice.cpp
index 4b80739..a7a3f17 100644
--- a/src/doppelganger/schedulingpolicyservice.cpp
+++ b/src/doppelganger/schedulingpolicyservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/doppelganger/schedulingpolicyservice.h b/src/doppelganger/schedulingpolicyservice.h
index 6ea12d9..ef56dcd 100644
--- a/src/doppelganger/schedulingpolicyservice.h
+++ b/src/doppelganger/schedulingpolicyservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/SurfaceTexture.cpp b/src/imports/nativemedia/SurfaceTexture.cpp
index 0d1cc00..2f4eb57 100644
--- a/src/imports/nativemedia/SurfaceTexture.cpp
+++ b/src/imports/nativemedia/SurfaceTexture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/SurfaceTexture.h b/src/imports/nativemedia/SurfaceTexture.h
index 2df4391..9c72362 100644
--- a/src/imports/nativemedia/SurfaceTexture.h
+++ b/src/imports/nativemedia/SurfaceTexture.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/main.cpp b/src/imports/nativemedia/main.cpp
index a0727cf..f78c12b 100644
--- a/src/imports/nativemedia/main.cpp
+++ b/src/imports/nativemedia/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/omx.cpp b/src/imports/nativemedia/omx.cpp
index 72d6eaa..9c68d57 100644
--- a/src/imports/nativemedia/omx.cpp
+++ b/src/imports/nativemedia/omx.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/omxmodule.cpp b/src/imports/nativemedia/omxmodule.cpp
index 1a5637f..a6e6f4d 100644
--- a/src/imports/nativemedia/omxmodule.cpp
+++ b/src/imports/nativemedia/omxmodule.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/omxnode.cpp b/src/imports/nativemedia/omxnode.cpp
index 60fbb44..b7ad101 100644
--- a/src/imports/nativemedia/omxnode.cpp
+++ b/src/imports/nativemedia/omxnode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/omxnode.h b/src/imports/nativemedia/omxnode.h
index d83b8fc..433f9ec 100644
--- a/src/imports/nativemedia/omxnode.h
+++ b/src/imports/nativemedia/omxnode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/omxplayer.h b/src/imports/nativemedia/omxplayer.h
index 827cb79..9127dfc 100644
--- a/src/imports/nativemedia/omxplayer.h
+++ b/src/imports/nativemedia/omxplayer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/nativemedia/test.qml b/src/imports/nativemedia/test.qml
index 2db3256..ad6a7f2 100644
--- a/src/imports/nativemedia/test.qml
+++ b/src/imports/nativemedia/test.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/utils/plugin.cpp b/src/imports/utils/plugin.cpp
index 6e53aee..5431061 100644
--- a/src/imports/utils/plugin.cpp
+++ b/src/imports/utils/plugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp
index 0eeff78..3c560f9 100644
--- a/src/imports/wifi/pluginmain.cpp
+++ b/src/imports/wifi/pluginmain.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
@@ -18,11 +18,12 @@
****************************************************************************/
#include "qwifimanager.h"
+#include <QtCore/QDir>
+#include <QtCore/QByteArray>
#include <QtQml/QQmlExtensionPlugin>
#include <QtQml/qqml.h>
-#include <QtCore/QDir>
-#include <QtCore/QByteArray>
+#include <hardware_legacy/wifi.h>
class QWifiGlobal : public QObject
{
@@ -34,15 +35,20 @@ public:
Q_INVOKABLE bool wifiSupported() const
{
- char interface[PROPERTY_VALUE_MAX];
- property_get("wifi.interface", interface, NULL);
- // standard linux kernel path
- QByteArray path;
- path.append("/sys/class/net/").append(interface);
- bool interfaceFound = QDir().exists(path.constData());
- if (!interfaceFound)
- qWarning() << "QWifiGlobal: could not find wifi interface in " << path;
- return interfaceFound;
+ bool supported = false;
+ if (wifi_load_driver() == 0 && wifi_start_supplicant(0) == 0) {
+ char interface[PROPERTY_VALUE_MAX];
+ property_get("wifi.interface", interface, NULL);
+ // standard linux kernel path
+ QByteArray path;
+ path.append("/sys/class/net/").append(interface);
+ supported = QDir().exists(path.constData());
+ if (!supported)
+ qWarning() << "QWifiGlobal: could not find wifi interface in " << path;
+ } else {
+ qWarning() << "QWifiGlobal: wifi driver is not available";
+ }
+ return supported;
}
};
diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp
index 9139242..7d6683b 100644
--- a/src/imports/wifi/qwifimanager.cpp
+++ b/src/imports/wifi/qwifimanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
@@ -142,19 +142,19 @@ QWifiManager::QWifiManager()
} else {
qWarning() << "QWifiManager: failed to connect to qconnectivity socket";
}
-
// check if backend has already been initialized
char backend_status[PROPERTY_VALUE_MAX];
- if (property_get(QT_WIFI_BACKEND, backend_status, NULL)
- && strcmp(backend_status, "running") == 0) {
- // let it re-connect, in most cases this will see that everything is working properly
- // and will do nothing. Special case is when process has crashed or was killed by a system
- // signal in previous execution, which results in broken connection to a supplicant,
- // connectToBackend will fix it..
- connectToBackend();
- } else {
- // same here, cleans up the state
- disconnectFromBackend();
+ if (property_get(QT_WIFI_BACKEND, backend_status, NULL)) {
+ if (strcmp(backend_status, "running") == 0) {
+ // let it re-connect, in most cases this will see that everything is working properly
+ // and will do nothing. Special case is when process has crashed or was killed by a system
+ // signal in previous execution, which results in broken connection to a supplicant,
+ // connectToBackend will fix it..
+ connectToBackend();
+ } else if (strcmp(backend_status, "stopped") == 0) {
+ // same here, cleans up the state
+ disconnectFromBackend();
+ }
}
}
diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h
index c9ba2ef..432f411 100644
--- a/src/imports/wifi/qwifimanager.h
+++ b/src/imports/wifi/qwifimanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp
index 5b74301..a159e59 100644
--- a/src/imports/wifi/qwifinetwork.cpp
+++ b/src/imports/wifi/qwifinetwork.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/wifi/qwifinetwork.h b/src/imports/wifi/qwifinetwork.h
index e287d7e..780fc87 100644
--- a/src/imports/wifi/qwifinetwork.h
+++ b/src/imports/wifi/qwifinetwork.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/wifi/qwifinetworklist.cpp b/src/imports/wifi/qwifinetworklist.cpp
index 432a07c..60fdc53 100644
--- a/src/imports/wifi/qwifinetworklist.cpp
+++ b/src/imports/wifi/qwifinetworklist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/imports/wifi/qwifinetworklist.h b/src/imports/wifi/qwifinetworklist.h
index 9c269b3..84e78fc 100644
--- a/src/imports/wifi/qwifinetworklist.h
+++ b/src/imports/wifi/qwifinetworklist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp
index b73b9b6..dea6bbd 100644
--- a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp
+++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.h b/src/plugins/sensors/eandroid/eandroidaccelerometer.h
index 1eaa8f9..fd55a06 100644
--- a/src/plugins/sensors/eandroid/eandroidaccelerometer.h
+++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp
index e1f285f..fc26f93 100644
--- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp
+++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h
index 55aacba..4123363 100644
--- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h
+++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp
index 005759b..7363234 100644
--- a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp
+++ b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.h b/src/plugins/sensors/eandroid/eandroidbasesensor.h
index af3d6ea..40e48a2 100644
--- a/src/plugins/sensors/eandroid/eandroidbasesensor.h
+++ b/src/plugins/sensors/eandroid/eandroidbasesensor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp
index c3b838e..8e303c6 100644
--- a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp
+++ b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.h b/src/plugins/sensors/eandroid/eandroidgyroscope.h
index 5ee53b8..14aa492 100644
--- a/src/plugins/sensors/eandroid/eandroidgyroscope.h
+++ b/src/plugins/sensors/eandroid/eandroidgyroscope.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidlight.cpp b/src/plugins/sensors/eandroid/eandroidlight.cpp
index 3f292e8..99a8663 100644
--- a/src/plugins/sensors/eandroid/eandroidlight.cpp
+++ b/src/plugins/sensors/eandroid/eandroidlight.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidlight.h b/src/plugins/sensors/eandroid/eandroidlight.h
index 7317763..d8d3b8b 100644
--- a/src/plugins/sensors/eandroid/eandroidlight.h
+++ b/src/plugins/sensors/eandroid/eandroidlight.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp
index 6f14e7e..6fd9100 100644
--- a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp
+++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.h b/src/plugins/sensors/eandroid/eandroidmagnetometer.h
index 3cc1715..5feaa13 100644
--- a/src/plugins/sensors/eandroid/eandroidmagnetometer.h
+++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp
index 93d520a..7be52d7 100644
--- a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp
+++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.h b/src/plugins/sensors/eandroid/eandroidrotationsensor.h
index 9499ae2..b94d2e5 100644
--- a/src/plugins/sensors/eandroid/eandroidrotationsensor.h
+++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp
index c8e5912..5570fc6 100644
--- a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp
+++ b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.h b/src/plugins/sensors/eandroid/eandroidsensordevice.h
index fcf022a..ed4fbbb 100644
--- a/src/plugins/sensors/eandroid/eandroidsensordevice.h
+++ b/src/plugins/sensors/eandroid/eandroidsensordevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp
index 4095c45..046375e 100644
--- a/src/qconnectivity/main.cpp
+++ b/src/qconnectivity/main.cpp
@@ -38,7 +38,8 @@ static bool QT_USE_EXPIRED_LEASE = !qgetenv("QT_USE_EXPIRED_LEASE").isEmpty();
// this might indicate a badly configured DHCP server
static int MIN_RENEWAL_TIME_SECS = 300; // 5 min
-#define ETH_INTERFACE "eth0"
+#define ETH_INTERFACE_HW "eth0"
+#define ETH_INTERFACE_EMULATOR "eth1"
// this function is defined in android/system/core/libnetutils/dhcp_utils.c
extern "C" {
@@ -67,6 +68,7 @@ protected:
bool startDhcp(bool renew, const char *interface);
void stopDhcp(const char *interface);
bool ethernetSupported() const;
+ bool isEmulator() const;
protected slots:
void initNetdConnection();
@@ -85,6 +87,8 @@ private:
QLocalServer *m_serverSocket;
bool m_linkUp;
LeaseTimer *m_leaseTimer;
+ bool m_isEmulator;
+ QByteArray m_ethInterface;
};
class LeaseTimer : public QTimer
@@ -115,31 +119,49 @@ private:
};
QConnectivityDaemon::QConnectivityDaemon()
- : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0)
+ : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0), m_isEmulator(isEmulator())
{
qDebug() << "starting QConnectivityDaemon...";
-
+ if (!m_isEmulator) {
+ m_ethInterface = ETH_INTERFACE_HW;
+ m_leaseTimer = new LeaseTimer(this);
+ m_leaseTimer->setSingleShot(true);
+ connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease()));
+
+ int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
+ if (serverFd != -1) {
+ m_serverSocket = new QLocalServer(this);
+ if (m_serverSocket->listen(serverFd))
+ connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection()));
+ else
+ qWarning() << "QConnectivityDaemon: not able to listen on the server socket...";
+ } else {
+ qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket";
+ }
+ } else {
+ m_ethInterface = ETH_INTERFACE_EMULATOR;
+ }
initNetdConnection();
- m_leaseTimer = new LeaseTimer(this);
- m_leaseTimer->setSingleShot(true);
- connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease()));
-
- int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
- if (serverFd != -1) {
- m_serverSocket = new QLocalServer(this);
- if (m_serverSocket->listen(serverFd))
- connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection()));
- else
- qWarning() << "QConnectivityDaemon: not able to listen on the server socket...";
+}
+
+bool QConnectivityDaemon::isEmulator() const
+{
+ bool isEmulator = false;
+ QFile conf("/system/bin/appcontroller.conf");
+ if (conf.open(QIODevice::ReadOnly)) {
+ QByteArray content = conf.readAll();
+ isEmulator = content.contains("platform=emulator");
+ conf.close();
} else {
- qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket";
+ qWarning() << "Failed to read appcontroller.conf";
}
+ return isEmulator;
}
void QConnectivityDaemon::initNetdConnection()
{
- static int attemptCount = 12;
if (ethernetSupported()) {
+ static int attemptCount = 12;
int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
if (netdFd != -1) {
qDebug() << "QConnectivityDaemon: connected to netd socket";
@@ -150,9 +172,8 @@ void QConnectivityDaemon::initNetdConnection()
this, SLOT(handleError(QLocalSocket::LocalSocketError)));
// down-up sequence generates "linkstate" events, which we can use to setup
// our daemon on initial startup or on daemon restarts
- stopDhcp(ETH_INTERFACE);
- sendCommand("0 interface setcfg " ETH_INTERFACE " down");
- sendCommand("0 interface setcfg " ETH_INTERFACE " up");
+ sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" down").constData());
+ sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" up").constData());
} else {
qWarning() << "QConnectivityDaemon: failed to connect to netd socket";
if (--attemptCount != 0)
@@ -198,18 +219,19 @@ void QConnectivityDaemon::handleInterfaceChange(const QList<QByteArray> &message
qWarning() << "QConnectivityDaemon: broken command";
return;
}
- if (message.at(2) == "linkstate" && message.at(3) == ETH_INTERFACE) {
+
+ if (message.at(2) == "linkstate" && message.at(3) == m_ethInterface) {
if (message.at(4) == "up") {
// ethernet cable has been plugged in
if (!m_linkUp) {
m_linkUp = true;
- startDhcp(false, ETH_INTERFACE);
+ startDhcp(false, m_ethInterface);
}
} else {
// .. plugged out
if (m_linkUp) {
m_linkUp = false;
- stopDhcp(ETH_INTERFACE);
+ stopDhcp(m_ethInterface);
}
}
}
@@ -264,7 +286,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
property_set("net.dns2", dns2);
}
- if (lease >= 0) {
+ if (!m_isEmulator && lease >= 0) {
if (lease < MIN_RENEWAL_TIME_SECS) {
qWarning() << "QConnectivityDaemon: DHCP server proposes lease time " << lease
<< "seconds. We will use" << MIN_RENEWAL_TIME_SECS << " seconds instead.";
@@ -297,20 +319,21 @@ void QConnectivityDaemon::stopDhcp(const char *interface)
qDebug() << "QConnectivityDaemon: stopDhcp: " << interface;
ifc_clear_addresses(interface);
dhcp_stop(interface);
- if (m_leaseTimer->isActive())
+ if (!m_isEmulator && m_leaseTimer->isActive())
m_leaseTimer->stop();
}
bool QConnectivityDaemon::ethernetSupported() const
{
// standard linux kernel path
- return QDir().exists("/sys/class/net/" ETH_INTERFACE);
+ return QDir().exists(QString("/sys/class/net/").append(m_ethInterface));
}
void QConnectivityDaemon::handleNetdEvent()
{
QByteArray data = m_netdSocket->readAll();
- if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: netd event: " << data;
+ if (QT_CONNECTIVITY_DEBUG)
+ qDebug() << "QConnectivityDaemon: netd event: " << data;
if (data.endsWith('\0'))
data.chop(1);
diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp
index ba9f49b..554004c 100644
--- a/src/qt_hw_init/main.cpp
+++ b/src/qt_hw_init/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp
index 0952345..7ab2098 100644
--- a/src/utils/qdroidutils.cpp
+++ b/src/utils/qdroidutils.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
@@ -20,16 +20,15 @@
#include <unistd.h>
#include <QDebug>
#include <math.h>
-
-#ifdef Q_OS_ANDROID_NO_SDK
-#include <cutils/android_reboot.h>
-#include <hardware/lights.h>
-#include <media/AudioSystem.h>
-#else
#include <sys/reboot.h>
#include <QNetworkInterface>
#include <QHostInfo>
#include <QFile>
+
+#ifdef Q_OS_ANDROID_NO_SDK
+#include <cutils/properties.h>
+#include <hardware/lights.h>
+#include <media/AudioSystem.h>
#endif
/*!
@@ -40,11 +39,7 @@
void QDroidUtils::rebootSystem()
{
sync();
-#ifdef Q_OS_ANDROID_NO_SDK
- (void)android_reboot(ANDROID_RB_RESTART, 0, 0);
-#else
reboot(RB_AUTOBOOT);
-#endif
qWarning("reboot returned");
}
@@ -56,11 +51,7 @@ void QDroidUtils::rebootSystem()
void QDroidUtils::powerOffSystem()
{
sync();
-#ifdef Q_OS_ANDROID_NO_SDK
- (void)android_reboot(ANDROID_RB_POWEROFF, 0, 0);
-#else
reboot(RB_POWER_OFF);
-#endif
qWarning("powerOff returned");
}
@@ -234,16 +225,12 @@ bool QDroidUtils::setDisplayBrightness(quint8 value)
QString QDroidUtils::getIPAddress()
{
QStringList addresses;
-#ifdef Q_OS_ANDROID_NO_SDK
- qDebug("QDroidUtils::getIPAddress()");
-#else
QNetworkInterface interface = QNetworkInterface::interfaceFromName("eth0");
QList<QNetworkAddressEntry> entries;
entries = interface.addressEntries();
foreach (const QNetworkAddressEntry &entry, entries) {
addresses.append(entry.ip().toString().split('%').first());
}
-#endif
return addresses.join(QStringLiteral(", "));
}
@@ -254,7 +241,10 @@ QString QDroidUtils::getHostname()
{
QString hostname;
#ifdef Q_OS_ANDROID_NO_SDK
- qDebug("QDroidUtils::getHostname()");
+ char prop_value[PROPERTY_VALUE_MAX];
+ int len = property_get("net.hostname", prop_value, 0);
+ if (len)
+ hostname = QString::fromLocal8Bit(prop_value, len);
#else
hostname = QHostInfo::localHostName();
#endif
@@ -267,7 +257,7 @@ QString QDroidUtils::getHostname()
bool QDroidUtils::setHostname(QString hostname)
{
#ifdef Q_OS_ANDROID_NO_SDK
- qDebug("QDroidUtils::setHostname()");
+ property_set("net.hostname", hostname.toLocal8Bit().constData());
#else
QFile file("/etc/hostname");
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h
index 9d833bb..8e70f19 100644
--- a/src/utils/qdroidutils.h
+++ b/src/utils/qdroidutils.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://qt.digia.com/
diff --git a/src/utils/utils.pro b/src/utils/utils.pro
index a15231f..e28b111 100644
--- a/src/utils/utils.pro
+++ b/src/utils/utils.pro
@@ -1,5 +1,5 @@
TARGET = QtDroidUtils
-VERSION = 5
+VERSION = 5.2
CONFIG += dll warn_on
QT = core network