Fix compilation on Android

Commit 81a45e1f13 replaced QSets with
QLists in QTimeZone, but forgot to adapt the Android code.

This commit fixes it.

Change-Id: I8704a39c44a9dc74147a4bb99a6f5d1bea53afa1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This commit is contained in:
Michal Klocek 2015-02-19 15:44:03 +01:00 committed by Alex Blasche
parent b1ccf65102
commit edb2ad9117
2 changed files with 4 additions and 4 deletions

View File

@ -262,9 +262,9 @@ QByteArray QAndroidTimeZonePrivate::systemTimeZoneId() const
return systemTZid;
}
QSet<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
QList<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
{
QSet<QByteArray> availableTimeZoneIdList;
QList<QByteArray> availableTimeZoneIdList;
QJNIObjectPrivate androidAvailableIdList = QJNIObjectPrivate::callStaticObjectMethod("java.util.TimeZone", "getAvailableIDs", "()[Ljava/lang/String;");
QJNIEnvironmentPrivate jniEnv;
@ -277,7 +277,7 @@ QSet<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
for (int i=0; i<androidTZcount; i++ ) {
androidTZobject = jniEnv->GetObjectArrayElement( static_cast<jobjectArray>( androidAvailableIdList.object() ), i );
androidTZ = androidTZobject;
availableTimeZoneIdList.insert( androidTZ.toString().toUtf8() );
availableTimeZoneIdList.append( androidTZ.toString().toUtf8() );
jniEnv->DeleteLocalRef(androidTZobject);
}

View File

@ -470,7 +470,7 @@ public:
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
private:
void init(const QByteArray &zoneId);