Tidy-up after recent change: combine declaration with initializer
Change-Id: I94420a3dfa30e4a2a4d8786621bea1dd9309bed8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4ab33394b2
commit
85913b4afc
@ -85,10 +85,9 @@ void QAndroidTimeZonePrivate::init(const QByteArray &ianaId)
|
|||||||
// Painfully, JNI gives us back a default zone object if it doesn't
|
// Painfully, JNI gives us back a default zone object if it doesn't
|
||||||
// recognize the name; so check for whether ianaId is a recognized name of
|
// recognize the name; so check for whether ianaId is a recognized name of
|
||||||
// the zone object we got and ignore the zone if not.
|
// the zone object we got and ignore the zone if not.
|
||||||
bool found = false;
|
|
||||||
// Try checking ianaId against getID(), getDisplayName():
|
// Try checking ianaId against getID(), getDisplayName():
|
||||||
QJNIObjectPrivate jname = androidTimeZone.callObjectMethod("getID", "()Ljava/lang/String;");
|
QJNIObjectPrivate jname = androidTimeZone.callObjectMethod("getID", "()Ljava/lang/String;");
|
||||||
found = (jname.toString().toUtf8() == ianaId);
|
bool found = (jname.toString().toUtf8() == ianaId);
|
||||||
for (int style = 1; !found && style-- > 0;) {
|
for (int style = 1; !found && style-- > 0;) {
|
||||||
for (int dst = 1; !found && dst-- > 0;) {
|
for (int dst = 1; !found && dst-- > 0;) {
|
||||||
jname = androidTimeZone.callObjectMethod("getDisplayName", "(ZI;)Ljava/lang/String;",
|
jname = androidTimeZone.callObjectMethod("getDisplayName", "(ZI;)Ljava/lang/String;",
|
||||||
|
Loading…
Reference in New Issue
Block a user