From b7347b14ba53a3d847ec783855a2c46101fafac3 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 11 Feb 2014 13:48:34 +0100 Subject: Update copyright year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic818e79d7bfca04bd8a8d8aa12b3ff70ea26a7a3 Reviewed-by: Topi Reiniƶ --- src/imports/nativemedia/SurfaceTexture.cpp | 2 +- src/imports/nativemedia/SurfaceTexture.h | 2 +- src/imports/nativemedia/main.cpp | 2 +- src/imports/nativemedia/omx.cpp | 2 +- src/imports/nativemedia/omxmodule.cpp | 2 +- src/imports/nativemedia/omxnode.cpp | 2 +- src/imports/nativemedia/omxnode.h | 2 +- src/imports/nativemedia/omxplayer.h | 2 +- src/imports/nativemedia/test.qml | 2 +- src/imports/utils/plugin.cpp | 2 +- src/imports/wifi/pluginmain.cpp | 2 +- src/imports/wifi/qwifimanager.cpp | 2 +- src/imports/wifi/qwifimanager.h | 2 +- src/imports/wifi/qwifinetwork.cpp | 2 +- src/imports/wifi/qwifinetwork.h | 2 +- src/imports/wifi/qwifinetworklist.cpp | 2 +- src/imports/wifi/qwifinetworklist.h | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/imports') 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..b1f1bed 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/ diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 9139242..8fb8b66 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/ 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/ -- cgit v1.2.3 From 7ed76b3cf9388b71876cdcddb64f93ef226254e1 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 12 Feb 2014 16:00:54 +0100 Subject: Don't use wifi on Emulator Change-Id: I9ae1b5b68f3e3ec2c513ec5a6811ea5396425766 Reviewed-by: Eirik Aavitsland --- src/imports/wifi/pluginmain.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'src/imports') diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index b1f1bed..3c560f9 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -18,11 +18,12 @@ ****************************************************************************/ #include "qwifimanager.h" +#include +#include #include #include -#include -#include +#include 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; } }; -- cgit v1.2.3 From facedd95835540ab5040361bd7100d1908e2ec98 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 18 Feb 2014 16:23:19 +0100 Subject: [Wifi] Fix initialization code Bug was that on freshly deployed Boot2Qt image (Nexus) the current code caused a device to restart when trying to launch "launcher settings". Change-Id: I3cc55488a1993c2c74567fccf39edd189b356bac Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/imports') diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 8fb8b66..7d6683b 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -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(); + } } } -- cgit v1.2.3