summaryrefslogtreecommitdiffstats
path: root/src/nfc
Commit message (Collapse)AuthorAgeFilesLines
* Address compile error on gcc 4.8Alex Blasche2019-03-193-6/+12
| | | | | | | | | | | | | | | | This partly reverts b3b387698e8f685e8bd4f4843a170da40e17249b. The global static connect was not correct. Furthermore the new global static variable was triggering src/nfc/qnearfieldtarget_emulator_p.h:125:31: warning: 'globalTagActivator' defined but not used [-Wunused-variable] The global static variable is shifted to no longer require exposure inside the header file. Fixes: QTBUG-74538 Change-Id: Ic5e8211d358bae9c2ed0418aec5c4316fb249c98 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* qnearfieldmanager_emulator: Use Q_GLOBAL_STATIC for tag activatorOliver Wolff2018-12-063-12/+6
| | | | | | | | | | | Using a Q_GLOBAL_STATIC here fixes an issue in the auto tests for winrt. If we use a static object that is created before the QCoreapplication has been created, TagActivator's timer will complain, that it was not created inside a QThread. By postponing the creation until first usage we can avoid that problem. Change-Id: I9beca89930bfca2c71e0fce3d9c000dfcb71f431 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Prepare tst_qnearfieldmanager for configurations with builtin_testdataOliver Wolff2018-12-061-0/+4
| | | | | | | | We have to add relevant test data to TESTDATA and use them from the created qrc file. Change-Id: I72ed86e09caf518f3f1b830ab4fec104a81313e6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QQmlNdefRecord: port to QRegularExpressionSamuel Gaist2018-12-031-3/+3
| | | | | | | | | This patch updates the QQmlNdefRecord code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: Ibfbab39ca84f9e89d6f6bd2e15000359a4218234 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Use a macro to resolve QML import versionsTopi Reinio2018-09-282-4/+5
| | | | | | | | | | | | | | QDoc now supports macros for its command parameters, as well as passing parameters to \code and \qml commands. Use these together with the new \QtMinorVersion macro to automate bumping the QML import versions within documentation. Also, update the hard-coded version numbers in snippet files where we cannot use the macro. Task-number: QTBUG-67818 Change-Id: I93d92770314580efa933c5bf85c618ad8331afb5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Remove empty section in Qt NFC example overview pagePaul Wicking2018-09-071-2/+0
| | | | | | | Remove unused section "C++ Tutorial". Change-Id: I55ba7286c00ae4573d97f6244dff1f589634b949 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix QNearFieldManager related override warningsAlex Blasche2018-09-034-27/+28
| | | | | Change-Id: If7adc165e063445ee0c34291a3e3840ddae0f570 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace foreach with for loop and set QT_NO_FOREACHOliver Wolff2018-08-1510-15/+22
| | | | | | | | To avoid unnecessary copies, const is used wherever possible. Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-211-5/+8
|\ | | | | | | Change-Id: I84bb3d8456f1f61b149ab4ff03d2776b165f54e9
| * 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>
* | Introduce reportError to fix "QMetaObject::invokeMethod: No such method"Lars Schmertmann2018-07-176-54/+33
| | | | | | | | | | | | Task-number: QTBUG-67958 Change-Id: Ia5a21cb19f0318844ac436adcc3f0fff9a3185b5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-264-10/+14
|\| | | | | | | Change-Id: I68aa4ba1a2019bb0240f95df6abab7f474677757
| * 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>
* | Use functor-based connections in the nfc implementationLars Schmertmann2018-06-196-37/+37
| | | | | | | | | | Change-Id: I90b6f044a902dabd08f0eccfc55438aab571c331 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use Android broadcast ACTION_ADAPTER_STATE_CHANGEDLars Schmertmann2018-05-304-0/+70
| | | | | | | | | | | | | | | | To avoid polling of the NFC adapter state a signal is added to the QNearFieldManager. Change-Id: If9e1e8025cca2deb1338fa7db255ebe171cab823 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-221-0/+9
|\| | | | | | | Change-Id: Ib6a0651247308b7fed71e5694360c60a48f6c260
| * 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-241-1/+1
|\| | | | | | | Change-Id: I1cb008cda8abe9a4167f3f62f003583141d217c1
| * General QML version bump in docs and qmltypesAlex Blasche2018-04-191-1/+1
| | | | | | | | | | Change-Id: If31e244e44106af1550e572acb9a172497467b20 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Add since command in documentation for new API methodAndrew O'Doherty2018-03-201-0/+2
| | | | | | | | | | | | | | | | | | Specify for which release the isSupported method will be available Task-number: QTBUG-62169 Change-Id: Iee1e63b5727ab6cce87d0fb587a5bb76e6d502f5 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add NFC API method isSupportedAndrew O'Doherty2018-03-159-1/+50
|/ | | | | | | | Add API method isSupported to allow to check if the device supports NFC Task-number: QTBUG-62169 Change-Id: I4ff7f06348ecc902e66ee79bdd8abde672578904 Reviewed-by: Alex Blasche <alexander.blasche@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>