summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/networkmanager
Commit message (Collapse)AuthorAgeFilesLines
* qtbearer networkmanager: fix whitespaceRolf Eike Beer2019-01-221-1/+1
| | | | | Change-Id: I7802e33e21fa882468b4c8e68677d4881b95d15c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* bearer plugins: eradicate Java-style iterators and Q_FOREACHMarc Mutz2016-09-021-44/+30
| | | | | | | | | | | | | | | | | | | This is the simple part of the job, removing Q_FOREACH loops which are obviously safe to be replaced by C++11 range-for. In QNetworkManagerEngine::sessionStateForId(), instead of iterating over QHash::keys(), iterate over the QHash directly (using C++11 range-for, as we're only using the values, not the keys). In QNetworkManagerEngine::connectToId(), simplify the loop body by merging three identical if blocks into one. Saves ~1.7KiB accumulated over the three Linux bearer plugins: connman, generic, nm (optimized GCC 6.1 Linux AMD64 build). Change-Id: Ic66139c25f7e2173f5a919927e269b873334d2c8 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-294-295/+65
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-254-295/+65
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/mimetypes/qmimeprovider.cpp src/corelib/mimetypes/qmimetype.cpp Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
| | * Fix UI freeze when using network-manager bearer pluginLorn Potter2016-08-244-294/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the amount of dbus signals generated when many wifi AP's are around Task-number: QTBUG-54814 Change-Id: I4bdd5f0bfe173d6db63f3d975a98583c6c0fc5db Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Make sure connection is not null before using itAlbert Astals Cid2016-08-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | connectionFromId can return null if the id isn't found. This causes crashes like http://paste.ubuntu.com/23061009/ Change-Id: Ib72412f61dc7661455394679b3e90662de505920 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | | Merge dev into 5.8Oswald Buddenhagen2016-08-223-66/+38
|\ \ \ | | | | | | | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * | | Remove last uses of Java-style (non-mutable) iterators from QtBaseMarc Mutz2016-08-131-23/+7
| | | | | | | | | | | | | | | | | | | | Change-Id: I7531ffd4f2d5b2193bb6231c743ff0a074618b99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | QNetworkManagerEngine: port away from Java-style iteratorsMarc Mutz2016-08-091-24/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are slower, more annoying, and not safer than their STL counterparts. Port to C++11 range-for, or to "auto it, end" for loops in cases where the key was also accessed. Change-Id: Ib27608ddbe9c0775092a1c6495731ad324727d3e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | QNetworkManagerEngine: add override keywordsMarc Mutz2016-08-091-11/+11
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie926119ee58d330e415634f93eb334c6befeede1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | QNetworkManagerEngine: fix const-correctnessMarc Mutz2016-08-092-8/+8
| |/ / | | | | | | | | | | | | Change-Id: I058617315e7cf2c6fa49f1ed0d16cb5e2a78dd72 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* / / Standardize some "We mean it" commentsFriedemann Kleint2016-08-171-3/+3
|/ / | | | | | | | | | | | | Fix the occurrences where the wrong classes are mentioned. Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-131-4/+4
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-121-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-022-15/+13
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Don't use QStringLiteral in comparisonsAnton Kudryavtsev2016-01-282-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-155-70/+100
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-3/+3
| | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-2/+2
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Replace #ifdefs with qmake feature checks.Ulf Hermann2015-06-223-6/+0
| | | | | | | | This prevents the building of dysfunctional plugins that don't define a loader function, or won't compile at all. Change-Id: Ib62edb8db4a8917effa05292cb702bb4022f552c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix crash when qt compiled with dbus support and no dbus interface.Michal Klocek2015-04-161-2/+6
| | | | | | | Add check if interface exists before calling it. Change-Id: I86762fd9b82131d12aac0281c86eca549752fdbd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+0
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Remove C++11 usage from NetworkManager bearer pluginAlex Blasche2015-03-051-1/+0
| | | | | | | | | | Change-Id: Icac28ac11222a62636fdbe2cbdf289b7e24f9f20 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Call [ofono|nm]Registered delayed in constructor otherwise signals will be lostAlbert Astals Cid2015-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | If we call them just in the constructor all the signals they sent out can't be connected and will be lost, particularly this means the QNetworkConfigurationManager doesn't see my ethernet connection and thus thinks i'm not online Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-115-35/+35
|/ | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Refactor networkmanager QtBearer backend to use QDBusAbstractInterface.Lorn Potter2015-01-083-510/+186
| | | | | | | | Using QDBusInterface causes introspection, which may not be permitted by some platforms. Change-Id: I953d27b9c0fc7c21d52fefeb8c7760a7235aed9d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Qt should not print warning unless we have an API miss-usage caseAlex Blasche2014-12-181-4/+4
| | | | | | | This warning is always printed. Change-Id: I524011f251f7f7e0d76eb94b16e1511e72f26422 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QtBearer networkmanager make sure to set flag ActiveLorn Potter2014-11-205-103/+249
| | | | | | | | | | | Also, no need to create objects to get properties, when the properties can be had for free. Make plugin more robust to network-manager or ofono crashes Change-Id: Ibadb46bd51aa27f130f8d245e8c50aa7bff5f9c8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
* make qtbearer networkmanager defaultConfiguration more reliableLorn Potter2014-11-073-0/+17
| | | | | | | | The defaultConfiguration could switch and be either active connection, so we determine the default should be what has the default route. Change-Id: I194f27b60e7a3598eca2ff09c2225ba1a46564d9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Make QtBearer networkmanager backend respond to wired cabling changesLorn Potter2014-11-074-42/+124
| | | | | | | | Cabling changes can be detected right away, so we should act on that and change the configuration state. Change-Id: Ifa9709077215567001e11ab655208a2c1b090073 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Support dual sim in QtBearer's networkmanager backendLorn Potter2014-11-062-45/+51
| | | | | | Task-number: QTBUG-42368 Change-Id: I306733b5de7871fdeaa0accb512a3610753c84a5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Use a property cache to cut down on blocking callsLorn Potter2014-11-067-653/+750
| | | | | | | | | Refactor old code Stop memory leaks Properly support mobile data (ofono) Change-Id: I7f23882ee0ee345a049a4a93ddd452b6d2e53710 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Make networkmanager bearer backend work betterLorn Potter2014-10-276-221/+346
| | | | | | | | | | This fixes QNetworkConfigurations when user: - configures new AP - deletes connection configuration - switches wifi AP Change-Id: I38c543c6de7b61f49d7ac96fa05f7a6fc4fba70f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add better mobile connections to QtBearer NetworkManager backend.Lorn Potter2014-10-213-9/+142
| | | | | | | Task-number: QTBUG-41807 Change-Id: Ifb5904d4887111416b4bb1a32d6d056029186f5c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* update QtBearer NetworkManager backend APILorn Potter2014-10-214-84/+79
| | | | | | | Task-number: QTBUG-41747 Change-Id: Idb4afea0215b94957a11895c7db97a72ae680804 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-247-133/+77
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* plugin/bearer remove static QDBusConnection::systemBus() initializationDyami Caliri2014-05-261-16/+19
| | | | | | | | | | | | | | The static initialization of QDBusConnection::systemBus() can occur before the creation of QCoreApplication. This causes a warning from QDBusConnection and may cause the application to crash on exit. Since QDBusConnection::systemBus() is just an accessor, there is no real advantage to storing a static reference to it. Task-number: QTBUG-39248 Change-Id: I4401810c7c2ffd21a30f9ffd41b3a46e7e09214c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove unneeded ;Albert Astals Cid2014-04-241-2/+2
| | | | | | | Warnings returned by pedantic Change-Id: I501621df6e9f39b18576625b321714a862dc971a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-12/+12
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-187-7/+7
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add PLUGIN_CLASS_NAME to qtbase pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Icd993c0fc8335f29aeec30e853a408d888069399 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* beef up qt_plugin.prfOswald Buddenhagen2012-11-011-4/+2
| | | | | | | it now defines the DESTDIR and creates an INSTALLS rule. Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-227-168/+168
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* plugins/bearer: normalize signals/slotsMarc Mutz2012-07-132-30/+30
| | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I7c9539056a4434ed10a0255152eac1781f7833be Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove QFactoryInterface from bearer pluginsLars Knoll2012-06-081-6/+0
| | | | | Change-Id: I8d6736e56f34f49041fff409d040634475eb0bf5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: make some constructors explicitMarc Mutz2012-03-121-1/+1
| | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>