summaryrefslogtreecommitdiffstats
path: root/examples/nfc
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-01 11:42:07 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-01 11:43:08 +0200
commit4ef99e568b6ecccf9cd867d649504c79f70e02fc (patch)
treefbb8558236ed01a2d6892c51cd570ce32899d055 /examples/nfc
parentd5410c86949c4eee7a270faa62032d068eb62481 (diff)
parent4ed0678f93d7fc6a9d0d43dfdfe6608e827eb176 (diff)
Merge remote-tracking branch 'gerrit/5.5' into dev
Diffstat (limited to 'examples/nfc')
-rw-r--r--examples/nfc/corkboard/corkboards.qml2
-rw-r--r--examples/nfc/ndefeditor/mimeimagerecordeditor.cpp1
-rw-r--r--examples/nfc/poster/poster.qml22
3 files changed, 13 insertions, 12 deletions
diff --git a/examples/nfc/corkboard/corkboards.qml b/examples/nfc/corkboard/corkboards.qml
index fc2377bc..2f00bb5a 100644
--- a/examples/nfc/corkboard/corkboards.qml
+++ b/examples/nfc/corkboard/corkboards.qml
@@ -40,7 +40,7 @@
****************************************************************************/
import QtQuick 2.3
-import QtNfc 5.2
+import QtNfc 5.5
Rectangle {
width: 800; height: 480
diff --git a/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp b/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp
index 134d674c..5ed733a4 100644
--- a/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp
+++ b/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp
@@ -134,6 +134,7 @@ void MimeImageRecordEditor::on_mimeImageOpen_clicked()
ui->mimeImageFile->setText(mimeDataFile);
ui->mimeImageImage->setPixmap(QPixmap::fromImage(image));
+ m_record.setTypeNameFormat(QNdefRecord::Mime);
m_record.setType(mimeType.toLatin1());
m_record.setPayload(imageData);
}
diff --git a/examples/nfc/poster/poster.qml b/examples/nfc/poster/poster.qml
index 499839e7..89e6af19 100644
--- a/examples/nfc/poster/poster.qml
+++ b/examples/nfc/poster/poster.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.3
-import QtNfc 5.2
+import QtNfc 5.5
Rectangle {
id: root
@@ -91,7 +91,7 @@ Rectangle {
}
break;
case NdefRecord.Mime:
- if (messageRecords[i].type.startsWith("image/")) {
+ if (messageRecords[i].type.indexOf("image/") === 0 ) {
posterImage.source = messageRecords[i].uri;
found = true;
}
@@ -115,15 +115,6 @@ Rectangle {
font.pointSize: 18
}
- Text {
- id: posterText
- anchors.horizontalCenter: parent.right
- anchors.horizontalCenterOffset: - parent.width / 4
- y: -height
- font.bold: true
- font.pointSize: 18
- }
-
Image {
id: posterImage
scale: Image.PreserveAspectFit
@@ -135,6 +126,15 @@ Rectangle {
}
Text {
+ id: posterText
+ anchors.horizontalCenter: parent.right
+ anchors.horizontalCenterOffset: - parent.width / 4
+ y: -height
+ font.bold: true
+ font.pointSize: 18
+ }
+
+ Text {
id: posterUrl
anchors.horizontalCenter: parent.right
anchors.horizontalCenterOffset: - parent.width / 4