summaryrefslogtreecommitdiffstats
path: root/src/nfc
Commit message (Collapse)AuthorAgeFilesLines
* Fix "QMetaObject::invokeMethod: No such method" for ndefMessageReadLars Schmertmann2018-07-171-5/+8
| | | | | | Task-number: QTBUG-67958 Change-Id: I26118eeee95bebd6f28364b0eea69e8ed2e6b6b2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix "QMetaObject::invokeMethod: No such method"Lars Schmertmann2018-06-192-8/+12
| | | | | | | Task-number: QTBUG-67958 Change-Id: I03dbf411d6a1b2a710d13c1eb5f1f75d594d2a9a Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com>
* Doc: Add missing dots (qtconnectivity)Paul Wicking2018-06-192-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: I51d80cbc5ab1b3c8938e5004e399a9df4e7af5e0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Add license details to index page of Qt NFCKai Koehne2018-05-151-0/+9
| | | | | Change-Id: Iae1cde9f313d6d97858e2bf9de974b0e09bad1b4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* General QML version bump in docs and qmltypesAlex Blasche2018-04-191-1/+1
| | | | | Change-Id: If31e244e44106af1550e572acb9a172497467b20 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Android Qt NFC manager may not startAndrew O'Doherty2018-03-061-4/+4
| | | | | | | | | | | | | | | | qmetaobject.cpp:1483 (static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)): QMetaObject::invokeMethod: No such method NearFieldTarget::ndefMessageRead(QNdefMessage&) Remove the reference symbols since Q_ARG data parameter is already treated as a Reference. Task-number: QTBUG-64415 Change-Id: I4eb83c34cfbc06ac85e5579c690c9562fbc82841 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-217-19/+78
|\ | | | | | | | | | | | | Conflicts: src/bluetooth/bluetooth.pro Change-Id: Ibccccc974b545696ae053f1fbffcc973d8be43cc
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-307-19/+78
| |\ | | | | | | | | | Change-Id: Iaa053dcb125490ee1e83d7e27cb75d4171297b9f
| | * Fix writing of NdefMessages on androidDaniel Engelke2017-10-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For writing messages another QAndroidJniObject was created, which however wasn't connected or validated in any way, so calling methods failed obviously. I removed said object and made use of the implemented class member m_tagTech, that is being validated and connected beforehand. Task-number: QTBUG-62858 Change-Id: I97c28f15cdaf5c0aa36423e7aba35408b49bde4e Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
| | * Fix outdated BSD license headerKai Koehne2017-10-176-17/+77
| | | | | | | | | | | | | | | Change-Id: I28f5936913a6127806325df34af4bf71a142e72e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Do not return from void functions/expressionsAlex Blasche2017-11-062-2/+2
| | | | | | | | | | | | | | | | | | | | | This was pointed out by clazy. Change-Id: I6f888e2cd667c05d0f9747fd0b2ef2bcbfe95a28 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | | Normalize Q_ARG arguments (const modifier removed)Alex Blasche2017-11-032-18/+18
| | | | | | | | | | | | | | | Change-Id: Ia65a879221d565af9b89083c6145c097472567a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Convert Q_ARG params to normalized formAlex Blasche2017-10-202-4/+4
| | | | | | | | | | | | | | | | | | | | | This was identified by clazy. Change-Id: If45c1c1898ee2dc4dd6274aa441b1c980a00686f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'gerrit/5.10' into devAlex Blasche2017-10-177-30/+28
|\| | | | | | | | | | | Change-Id: I3bf7130a204aebd6a52dfe68bfea57767ba1b70e
| * | Merge remote-tracking branch 'gerrit/5.9' into 5.10v5.10.0-beta3Alex Blasche2017-10-177-30/+28
| |\| | | | | | | | | | Change-Id: I84bfe86751c27eabb4e75912ae3c0b4d3781faf1
| | * Fix outdated FDL license headerKai Koehne2017-10-166-26/+26
| | | | | | | | | | | | | | | Change-Id: Ia26b0bf499f8a0b6040e82bc1d460bee688bfbf6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * Replace mixing of const_iterator by for-eachAndré Klitzing2017-10-091-4/+2
| | | | | | | | | | | | | | | Change-Id: If828dce2dcd71f36c51216c2db4437683bc2a358 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-295-7/+7
| | | | | | | | | | | | | | | Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Android: remove support for local/debug deploymentJake Petroules2017-09-061-2/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: Ifc13542ff71844da7e80cefe9ff51e3d7cdfc830 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Add missing qtnfcglobal_p.hOliver Wolff2017-08-302-0/+60
| | | | | | | | | | | | Change-Id: I749412d99ade54d3866ed988cf39d2b74b9489e6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Rename qnfcglobal.h to qtnfcglobal.hOliver Wolff2017-08-3021-21/+21
|/ | | | | | | | | | | | | ... and deprecate the former. By doing so we get the header file in line with other modules - see qtnetworkglobal.h for example. The include is not used in the examples so it is removed there. Change-Id: If6d30e7a821b60f12768a963990937c46f21f4c7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix QNdefNfcActRecord::action for platforms with unsigned charSami Nurmenniemi2017-06-271-1/+1
| | | | | | | | | | | | | QByteArray operator [] has return type of char whose signedness is dependendent on platform and compiler. Casting char to an enum with negative value does not work on configurations with unsigned char type. Fixed by explicitly casting action to signed char before converting it to enum. Task-number: QTBUG-60268 Change-Id: I733520a70c321c3b8dac9c67cfb096ac97a64b94 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix GCC 7 warnings about implicit fallthroughsThiago Macieira2017-05-191-2/+2
| | | | | | | Make them explicit. Change-Id: I9bf1e35bffb044dcbf62fffd14bfe71bc374febf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix build for -no-feature-textcodecStephan Binner2017-04-251-0/+10
| | | | | Change-Id: I5d5834733e53ac59f8e889481e04fa7acd184628 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded buildsOtto Ryynänen2017-04-241-1/+1
| | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. Those flags are set in mkspecs when building for embedded Android. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I2ded43d7ed46a99ba70301f07a791ed4a148c6c0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix undocumented parameter warning from qdocAlex Blasche2017-04-061-3/+4
| | | | | | | Undocumented parameter 'isPersistent' in QNearFieldTarget::setKeepConnection() Change-Id: I8959af52d1f966c2951c17528776ef2c8183fc07 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* NFC on Android: Fix crash on restart of an app in debug buildv5.9.0-beta1Lars Schmertmann2017-03-162-1/+4
| | | | | | Task-number: QTBUG-59343 Change-Id: Ib474db8e9a8d38b3d5668499f838cb8d38e10625 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix unused parameter warningAlex Blasche2017-03-131-0/+1
| | | | | | | | qnearfieldtarget_neard_p.cpp:52:54: warning: unused parameter `isPersistent` [-Wunused-parameter] bool QNearFieldTargetPrivate::setKeepConnection(bool isPersistent) Change-Id: Ib16e986f88452bb043afb973113747f56379ffaf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* NFC on Android: Fix crash on restart of an appLars Schmertmann2017-03-081-0/+4
| | | | | | Task-number: QTBUG-59343 Change-Id: Id40844b428eb7ef781f8abc4dc3ce0c7469d178a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QNearfieldTarget: Introduce (set)keepConnection() and disconnect()Lars Schmertmann2017-01-188-101/+265
| | | | | | | | | | | | | | | | | | | For the communication with a German ID card its required to execute several commands in a row, whereby a state is generated. Every command works on the state created by the command before. Depending on the Android version the state gets lost when the connection is closed. With this change it is possible to keep the connection as long as needed and close it manually. Because of backward compatibility the connection is created and closed automatically by default. With the use of setKeepConnection(true) the communication with the target is also a lot of faster. [ChangeLog][QNearfieldTarget] Introduce (set)keepConnection() and disconnect() to keep the state of a target and speed up communication. Change-Id: I5778c9bdaf04cfeae78b3222bef4475f4cd7c436 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Avoid code duplication by using checksum calculation from qtbaseLars Schmertmann2017-01-144-35/+20
| | | | | | | | Since qtbase supports checksum calculation defined in ITU-V.41 an own implementation is not longer needed. Change-Id: I0f62c872b4fb517493ba43a9bb7a6d35481fa40d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: QNearfieldTarget: Introduce maxCommandLength()Lars Schmertmann2017-01-039-6/+214
| | | | | | | | | | | | For the communication with a German ID card its required to execute commands with a length up to 500 byte. With this change it is possible to check if the required length is supported. [ChangeLog][QNearfieldTarget] Introduce maxCommandLength() to make it possible to check the maximum supported length for commands. Change-Id: I7e655f419765d8ad728f6d6005a85a01d5aa03e9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: Add support for sendCommand to QNearFieldTargetLars Schmertmann2016-12-163-31/+56
| | | | | | | | | For the communication with a German ID card its required to execute commands. This change enables support for sendCommand. Change-Id: I95773c047953b244cd5c3e22bfc7abf7f7eb656e Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-242-0/+3
|\ | | | | | | Change-Id: Iab12802d94e2ced8b358cbeb3e70ce37d0eeec2b
| * Fix ODR violation in QLlcpServer on AndroidAlex Blasche2016-11-082-0/+3
| | | | | | | | | | | | | | | | This caused a compile time error when using clang. Task-number: QTBUG-55297 Change-Id: Ic899a225852e05b4302812f007ff08964b03e90d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Prepare QtNfc for Android Service supportAlex Blasche2016-08-311-0/+3
| | | | | | | | | | | | | | | | | | It cannot really be fixed sind Android's NFC API requires Activity objects. We merely ensure that the service case is discovered early, reported accordingly and documented properly. Change-Id: If75856eea3da5c6283a3cb988daffd7a36cc02a7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-013-0/+10
|\| | | | | | | Change-Id: I64352b6cc066255972874e2f9c28abff35f0d613
| * Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I2894dd24afa9c51582f20ab44d83e9ce86751716 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Android: Workaround clang default destructor export bugBogDan Vatra2016-07-192-0/+5
| | | | | | | | | | | | | | | | | | Somehow clang fails to properly export the default destructor. Should be revered when https://github.com/android-ndk/ndk/issues/143 is fixed. Change-Id: I842f4141f249181ec871634b947e1c08470ddb83 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-06-091-1/+8
|\| | | | | | | Change-Id: Id8dffff9bb75db396aabf6da2a3acb78505a6476
| * QNearFieldTagType1Private: take more care over m_tlv{Writ,Read}er.Edward Welbourne2016-05-311-1/+8
| | | | | | | | | | | | | | | | | | | | | | The writer wasn't initialized; Coverity grumbled (CID 22323). Various stanzas take for granted that one or other is set; assert there. Various stanzas created each afresh, without considering they might be leaking a prior one; delete first (could probably have asserted == 0 instead). Change-Id: I4c792fbbd611e06c28235ceafee40cc18268c60d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia9bc69bf68eb40ceb9bd5bd63d96ab4dece43c00
| * Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-121-1/+1
| | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: I8fc41af85033c88d6a3129efdb616dac6d99866d Task-number: QTBUG-52953 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-064-5/+15
|\| | | | | | | | | | | | | Conflicts: examples/nfc/corkboard/corkboard.pro Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
| * Android: Suppress failed connect/close attempts due to targetLost detectionAlex Blasche2016-04-132-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android does not provide an API to detect when an NFC tag is removed from the vincinity. To detect such a case the Android implementation uses active polling. During each polling cycle the implementation connects and disconnects from the tag. If it failed, the tag is assumed to have been removed from the vincinity. Such failed attempts cause an IOException which are printed to stderr. This is confusing as the developer might mistake them for some other serious problem. This change suppresses all related warnings. Change-Id: I95cf57076139e7d0a5ad31d4cc770a81ced12242 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Peter Rustler <peter.rustler@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Fix Annotated URL Example on AndroidAlex Blasche2016-04-132-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNearFieldManager::registerNdefMessageHandler() is supposed to register the current app as platform handler for certain tag types. The example is written around this concept and doesn't start the target detection when such a registration succeeded. Unfortunately the Android implementation does something completely different. Therefore the startTargetDetection() and connect() calls after the current return is necessary to make the example useful. For now we simply ignore the feature and always start target detection. Since neither NEARD/Linux nor Android (the only two supported platforms) have an implementation for the feature the modified example works as expected. Considering the current state it should be considered to remove this NDEF message registration feature in Qt 6 altogether. The only platform which ever supported the feature was BB10 and its implementation was removed a long time ago. Task-number: QTBUG-52154 Change-Id: Ibef9e77ac33b9629b6d81aa70eaa01ab1702cfcb Reviewed-by: Peter Rustler <peter.rustler@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Remove the traces of the discontinued android-no-sdk platformEirik Aavitsland2016-04-291-1/+1
| | | | | | | | | | Change-Id: I0358b76dd2b9fb2a6224c4b9b2082a748b2d5d7a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Remove simulator support for NFCRainer Keller2016-04-057-776/+0
| | | | | | | | | | | | | | Support was dropped from the Emulator in 2012. Change-Id: I8cf75c368f1197a49bdc242c13408d0a2e6eda3d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-216-10/+13
|\| | | | | | | | | | | | | Conflicts: src/bluetooth/qlowenergycontroller.h Change-Id: I15571e47fbf06545d46d1b9a9b2b47bf815ae293
| * Nfc - guarantee statics initialization orderTimur Pocheptsov2016-03-181-3/+6
| | | | | | | | | | | | | | | | | | Use Q_GLOBAL_STATIC instead of simple static QMap object to avoid problems with undefined initialization order for 'statics' from different translation units. Task-number: QTBUG-51860 Change-Id: I6ce48f3c0770dc0ff125b443816f6b3b23ae809e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>