You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2012/04/27 15:47:54 UTC
[2/2] qt commit: initial fixes for cordova-mobile-spec: contact,
camera, acceleration. Note: getImage from Library is not functional as media
not support. FIXME 1,acceleration clear(still watching);
2.modified cordova-mobile-spec outname from name.format
initial fixes for cordova-mobile-spec: contact, camera, acceleration. Note: getImage from Library is not functional as media not support. FIXME 1,acceleration clear(still watching); 2.modified cordova-mobile-spec outname from name.formatted to displayName.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/commit/95bcfc67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/95bcfc67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/95bcfc67
Branch: refs/heads/master
Commit: 95bcfc6798027d6a6918be3d9deb82612acf1ca7
Parents: d4facfb
Author: Longwei Su <ls...@ics.com>
Authored: Mon Apr 23 19:40:06 2012 -0400
Committer: Longwei Su <ls...@ics.com>
Committed: Mon Apr 23 19:40:06 2012 -0400
----------------------------------------------------------------------
src/plugins/contacts.cpp | 2 ++
www/js/compass.js | 4 ++--
www/js/contacts.js | 11 +++++++++--
3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/95bcfc67/src/plugins/contacts.cpp
----------------------------------------------------------------------
diff --git a/src/plugins/contacts.cpp b/src/plugins/contacts.cpp
index 0e78a20..87a3135 100644
--- a/src/plugins/contacts.cpp
+++ b/src/plugins/contacts.cpp
@@ -364,8 +364,10 @@ void Contacts::findContacts(int scId, int ecId, const QStringList &fields, const
callback(scId, "[]");
} else {
QStringList stringifiedContacts;
+ qDebug() << "stringifiedContacts:\n";
foreach (const QContact &contact, contacts) {
stringifiedContacts << jsonedContact(contact, fields);
+ qDebug() << jsonedContact(contact, fields) << "\n";
if (!multiple)
break;
}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/95bcfc67/www/js/compass.js
----------------------------------------------------------------------
diff --git a/www/js/compass.js b/www/js/compass.js
index 4e9db83..eb6e79b 100644
--- a/www/js/compass.js
+++ b/www/js/compass.js
@@ -22,11 +22,11 @@ function Heading() {
Heading.cast = function( p_heading, p_accuracy ) {
var heading = new Heading();
- heading.dir = p_heading;
+ heading.magneticHeading = p_heading;
return heading;
};
-Heading.prototype.dir = null;
+Heading.prototype.magneticHeading = null;
Heading.prototype.accuracy = null;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/95bcfc67/www/js/contacts.js
----------------------------------------------------------------------
diff --git a/www/js/contacts.js b/www/js/contacts.js
index 7f12294..eb78db5 100644
--- a/www/js/contacts.js
+++ b/www/js/contacts.js
@@ -27,13 +27,20 @@ ContactAddress.prototype.country = ""
function ContactField() {
}
+function ContactField(p_type, p_value, p_pref) {
+ this.type = p_type;
+ this.value = p_value;
+ this.pref = p_pref;
+ return this;
+}
+
ContactField.create = function(obj) {
var result = new ContactField()
result.type = obj.type
result.value = obj.value
result.pref = obj.pref
return result
- }
+}
ContactField.prototype.type = ""
ContactField.prototype.value = ""
@@ -149,7 +156,7 @@ Contact.create = function(obj) {
var result = new Contact()
result.id = obj.id
result.displayName = obj.displayName
- result.name = ContactName.create(obj.name)
+ result.name = ContactName.create(obj.name | obj.displayName)
result.nickname = obj.nickname
var subObj
for (subObj in obj.phoneNumbers)