Commit Graph

15 Commits

Author SHA1 Message Date
Ivan Solovev a326b108de ndefeditor: fix dropdown menu problems
Because of QTBUG-98651 and QTBUG-97482 a QPushButton with a dropdown
menu was not working properly neither on iOS nor on Android.
This patch fixes the issue, but it's not optimal, because it re-creates
the menu every time.
Ideally we should provide QML-based GUI for the example.

Task-number: QTBUG-103949
Change-Id: Icd1e00f27f5c4864a33fa7f1f7755c0e919183cb
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
(cherry picked from commit 5c8bf34dc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2022-06-04 07:05:46 +00:00
Ivan Solovev 8b5139b412 NdefEditor: update UI for better usability on mobile platforms
* Add QScroller to grab touch gesture. This allows to avoid aiming to
  the tiny verticall scroll bar, but use simple swipes instead.
* Handle input method visibility change to ensure that the focused
  widget is visible while the keyboard is displayed.
* Correctly scale the image for the MIME record, so that it does not
  cause the whole layout to shirink beyond the screen margins.
* Update the example docs.

Task-number: QTBUG-94033
Change-Id: I7ce3fe1f6c573a3ad24da16c7a11508342a2de9d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 5b9d9454d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-06-14 09:24:14 +00:00
Ivan Solovev 47d54961c7 QtNFC: remove QNearFieldTarget::ndefMessagesWritten signal
ndefMessagesWritten signal basically duplicates the requestCompleted
signal, but does not provide a request id parameter to track, which
messages were actually written. Given that, the signal is removed. One
should now use requestCompleted and check the request id instead.

[ChangeLog][QtNFC][QNearFieldTarget] Remove ndefMessagesWritten signal.
Use requestCompleted signal instead.

Task-number: QTBUG-93854
Change-Id: Ic7f97eabfa83879b0da0cf34310a2982621cf8de
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-05-27 14:27:35 +02:00
Lars Schmertmann bc1b02ac04 Only scan for NFC tags with the given access method
On iOS it is only possible to search for one type of tags at the time.
See https://developer.apple.com/documentation/corenfc/nfcreadersession

On Android the access mode is controlled by the Intent filter the user
needs to set. So we check the target before targetDetected is emitted.
In the future we will add the readerMode, so we can also avoid the
scanning for wrong tags.
https://developer.android.com/reference/android/nfc/NfcAdapter#enableReaderMode

Task-number: QTBUG-81824
Change-Id: I5aa2580ada619363560cdad354a3a0be4998ea96
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-08-10 08:37:09 +02:00
Lars Schmertmann df19c50f1c Remove QNearFieldManager::TargetAccessMode
Neither Android nor iOS support a feature like this. The
access is granted in general via connecting to the tag.
Other applications will be blocked from accessing the
target until the tag is disconnected.
QNearFieldManager::TargetAccessMode is also very similar to
QNearFieldTarget::AccessMethod.

Task-number: QTBUG-81824
Change-Id: Ie8920ba850330d0238cfc5c19d7502e9abec3f4e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-08-04 13:45:43 +02:00
Oliver Wolff a0ade06800 Replace foreach with for loop and set QT_NO_FOREACH
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>
2018-08-15 07:56:46 +00:00
Andrew O'Doherty beaca75d17 Revamp Qt NFC examples: documentation update
Update the documentation of the ndefeditor example

Task-number: QTBUG-60644
Change-Id: Id74ee10565dd812fcf51db151f641549d3d60682
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-03-06 08:48:38 +00:00
Andrew O'Doherty 1d6687a0c3 Revamp Qt NFC examples: ndefeditor example
Align QtNfc Module examples to QML and c++ coding conventions. This
commit is focused on the ndefeditor example.

Task-number: QTBUG-60644
Change-Id: I6c14e1a7965bb335bfea87ed80c442926b6a36a4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-02-01 11:55:44 +00:00
Kai Koehne b171cddac0 Fix outdated BSD license header
Change-Id: I28f5936913a6127806325df34af4bf71a142e72e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-10-17 11:17:54 +00:00
Jani Heikkinen 7354c6d393 Update copyright headers
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.

Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-16 11:48:42 +00:00
Alex Blasche 633e5de268 Don't leave UI hanging if NdefMessage handling returned invalid request
Invalid request implies that the platform doesn't support writing
of NDEF messages. This case does not trigger an error() signal though.
That's why we have to trigger the error handling code manually.

Change-Id: I0b95fddfe30052f1c7baa566ebc099998854146d
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-13 16:06:13 +01:00
Alex Blasche 10cd7743aa Utilize QStringLiteral where possible
The only exception are generated files and cases where
QLatin1String based overloads are used (e.g. during QString comparisons)

Change-Id: I6f36789fb8acb3b30c1dc1f8a920b118a979d74f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-05-15 10:10:05 +02:00
Alex Blasche ef98583d2a Improve NFC documentation
1.) Extend the NFC overview page
2.) Ensure that snippets are compiled at all times
3.) Mark Qt 5.3 APIs using \since

Task-number: QTBUG-32401
Task-number: QTBUG-34978
Change-Id: I8928be3d7dd2c9de1314eb1ec6ed55c8d4301f4a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-11 15:50:42 +01:00
Alex Blasche 8dad4698d9 Update Copyright headers
- Update Digia's copyright year
- Add copyright to files without it
- Convert old BSD to new LGPL license for auto test code

Change-Id: I47f5c871c436f9c2731b235026434448719cc671
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-25 10:08:54 +02:00
Jerome Pasion d8a179128c Qt Bluetooth: Modularized documentation
-moved documentation to src/bluetooth/doc
-added a qdocconf file for Qt Bluetooth
-fixed relative paths for snippets
-moved examples to examples/bluetooth

Change-Id: Id41bac50dca628400568d191f1c3ccfbaac790a1
Reviewed-by: Alex <ablasche@gmail.com>
2012-09-27 14:43:52 +02:00