diff --git a/QtAndroidTools/QAndroidGoogleAccount.h b/QtAndroidTools/QAndroidGoogleAccount.h index e4cd0ae..d4a03d0 100644 --- a/QtAndroidTools/QAndroidGoogleAccount.h +++ b/QtAndroidTools/QAndroidGoogleAccount.h @@ -50,7 +50,7 @@ Q_DECLARE_METATYPE(QAndroidGoogleAccountInfo) class QAndroidGoogleAccount : public QObject, public QAndroidActivityResultReceiver { - Q_PROPERTY(QAndroidGoogleAccountInfo signedInAccount READ getSignedInAccountInfo NOTIFY signedInAccountInfoChanged) + Q_PROPERTY(QAndroidGoogleAccountInfo signedInAccountInfo READ getSignedInAccountInfo NOTIFY signedInAccountInfoChanged) Q_DISABLE_COPY(QAndroidGoogleAccount) Q_OBJECT diff --git a/QtAndroidToolsDemo/tools/AndroidApkExpansionFiles.qml b/QtAndroidToolsDemo/tools/AndroidApkExpansionFiles.qml index 3800d69..c4e4b10 100644 --- a/QtAndroidToolsDemo/tools/AndroidApkExpansionFiles.qml +++ b/QtAndroidToolsDemo/tools/AndroidApkExpansionFiles.qml @@ -57,7 +57,8 @@ Page { Connections { target: QtAndroidApkExpansionFiles - onDownloadStateChanged: { + function onDownloadStateChanged(newState) + { switch(newState) { case QtAndroidApkExpansionFiles.STATE_COMPLETED: @@ -76,7 +77,8 @@ Page { } downloadStateLabel.text = QtAndroidApkExpansionFiles.getString(newState-1); } - onDownloadProgress: { + function onDownloadProgress(overallTotal, overallProgress, timeRemaining, currentSpeed) + { var time = new Date(timeRemaining); downloadProgressBar.to = overallTotal; downloadProgressBar.value = overallProgress; diff --git a/QtAndroidToolsDemo/tools/AndroidAppPermissions.qml b/QtAndroidToolsDemo/tools/AndroidAppPermissions.qml index c2c2008..b0fcbf7 100644 --- a/QtAndroidToolsDemo/tools/AndroidAppPermissions.qml +++ b/QtAndroidToolsDemo/tools/AndroidAppPermissions.qml @@ -24,7 +24,8 @@ Page { Connections { target: QtAndroidAppPermissions - onRequestPermissionsResults: { + function onRequestPermissionsResults(results) + { for(var i = 0; i < results.length; i++) { if(results[i].granted === true) diff --git a/QtAndroidToolsDemo/tools/AndroidGoogleAccount.qml b/QtAndroidToolsDemo/tools/AndroidGoogleAccount.qml index ce009ce..ea6b382 100644 --- a/QtAndroidToolsDemo/tools/AndroidGoogleAccount.qml +++ b/QtAndroidToolsDemo/tools/AndroidGoogleAccount.qml @@ -10,16 +10,19 @@ Page { Connections { target: QtAndroidGoogleAccount - onSignedInAccountChanged: { - QtAndroidTools.insertImage("AccountPhoto", QtAndroidGoogleAccount.signedInAccount.photo); + function onSignedInAccountInfoChanged() + { + QtAndroidTools.insertImage("AccountPhoto", QtAndroidGoogleAccount.signedInAccountInfo.photo); accountPhoto.source = "image://QtAndroidTools/AccountPhoto"; } - onSignedIn: { + function onSignedIn(signInSuccessfully) + { if(signInSuccessfully === true) { } } - onSignedOut: { + function onSignedOut() + { QtAndroidTools.removeImage("AccountPhoto"); accountPhoto.source = ""; } @@ -33,27 +36,27 @@ Page { Label { font.pixelSize: 15 - text: "Id: " + QtAndroidGoogleAccount.signedInAccount.id + text: "Id: " + QtAndroidGoogleAccount.signedInAccountInfo.id } Label { font.pixelSize: 15 - text: "DisplayName: " + QtAndroidGoogleAccount.signedInAccount.displayName + text: "DisplayName: " + QtAndroidGoogleAccount.signedInAccountInfo.displayName } Label { font.pixelSize: 15 - text: "Email: " + QtAndroidGoogleAccount.signedInAccount.email + text: "Email: " + QtAndroidGoogleAccount.signedInAccountInfo.email } Label { font.pixelSize: 15 - text: "FamilyName: " + QtAndroidGoogleAccount.signedInAccount.familyName + text: "FamilyName: " + QtAndroidGoogleAccount.signedInAccountInfo.familyName } Label { font.pixelSize: 15 - text: "GivenName: " + QtAndroidGoogleAccount.signedInAccount.givenName + text: "GivenName: " + QtAndroidGoogleAccount.signedInAccountInfo.givenName } Label { diff --git a/QtAndroidToolsDemo/tools/AndroidGoogleDrive.qml b/QtAndroidToolsDemo/tools/AndroidGoogleDrive.qml index 2b0d96c..f97bc24 100644 --- a/QtAndroidToolsDemo/tools/AndroidGoogleDrive.qml +++ b/QtAndroidToolsDemo/tools/AndroidGoogleDrive.qml @@ -10,7 +10,8 @@ Page { Connections { target: QtAndroidGoogleDrive - onDownloadProgressChanged: { + function onDownloadProgressChanged(state, progress) + { switch(state) { case QtAndroidGoogleDrive.STATE_MEDIA_IN_PROGRESS: @@ -20,7 +21,8 @@ Page { break; } } - onUploadProgressChanged: { + function onUploadProgressChanged(state, progress) + { switch(state) { case QtAndroidGoogleDrive.STATE_INITIATION_STARTED: diff --git a/QtAndroidToolsDemo/tools/AndroidSharing.qml b/QtAndroidToolsDemo/tools/AndroidSharing.qml index 470e3c4..7b46acb 100644 --- a/QtAndroidToolsDemo/tools/AndroidSharing.qml +++ b/QtAndroidToolsDemo/tools/AndroidSharing.qml @@ -30,12 +30,14 @@ Page { Connections { target: QtAndroidSharing - onRequestedSharedFileReadyToSave: { + function onRequestedSharedFileReadyToSave(mimeType, name, size) + { requestedSharedFile.text = "Name: " + name + "\nSize: " + size + "\nMimeType: " + mimeType; requestedSharedFile.fileName = name; requestedSharedFile.open(); } - onRequestedSharedFileNotAvailable: { + function onRequestedSharedFileNotAvailable() + { } } diff --git a/QtAndroidToolsDemo/tools/AndroidSignalStrength.qml b/QtAndroidToolsDemo/tools/AndroidSignalStrength.qml index 673f8e5..1974b47 100644 --- a/QtAndroidToolsDemo/tools/AndroidSignalStrength.qml +++ b/QtAndroidToolsDemo/tools/AndroidSignalStrength.qml @@ -33,7 +33,10 @@ Page { Connections { target: QtAndroidSignalStrength - onSignalLevelChanged: updateSignalLevel() + function onSignalLevelChanged() + { + updateSignalLevel(); + } } Column {