diff options
author | Liang Qi <liang.qi@qt.io> | 2016-04-22 09:31:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-04-25 14:03:45 +0200 |
commit | bb4b86618dc930e0035c5829e336f2606d140ada (patch) | |
tree | 6e36808ca46244373bc70aabbb926cc114538beb /src/android | |
parent | 276adc5a09914fd89d976bb90cc0cd67de9d3d6e (diff) | |
parent | bbd1228b17ee3f3a5483f88b0a581d6a60c41cad (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
config.tests/unix/compile.test
configure
src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
src/corelib/global/qglobal.cpp
src/widgets/kernel/qapplication.cpp
src/widgets/styles/qwindowsvistastyle.cpp
tests/auto/corelib/kernel/qobject/tst_qobject.cpp
Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java | 32 | ||||
-rw-r--r-- | src/android/templates/res/values/libs.xml | 2 |
2 files changed, 5 insertions, 29 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java index 5a57633f63..a3bbff4e1a 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java @@ -1,6 +1,6 @@ /**************************************************************************** ** - ** Copyright (C) 2013 BogDan Vatra <bogdan@kde.org> + ** Copyright (C) 2016 BogDan Vatra <bogdan@kde.org> ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Android port of the Qt Toolkit. @@ -176,30 +176,6 @@ public class QtMessageDialogHelper m_buttonsList.add(new ButtonStruct(this, id, text)); } - private void setTextAppearance(TextView view, String attr, String style) - { - try { - int[] attrs = (int[]) Class.forName("android.R$styleable").getDeclaredField("TextAppearance").get(null); - final TypedArray a = m_theme.obtainStyledAttributes(null, - attrs, - Class.forName("android.R$attr").getDeclaredField(attr).getInt(null), - Class.forName("android.R$style").getDeclaredField(style).getInt(null)); - final int textSize = a.getDimensionPixelSize( - Class.forName("android.R$styleable").getDeclaredField("TextAppearance_textSize").getInt(null), 0); - if (textSize != 0) - view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); - - final int textColor = a.getColor( - Class.forName("android.R$styleable").getDeclaredField("TextAppearance_textColor").getInt(null), 0x3138); - if (textColor != 0x3138) - view.setTextColor(textColor); - - a.recycle(); - } catch (Exception e) { - e.printStackTrace(); - } - } - private Drawable getStyledDrawable(String drawable) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException { int[] attrs = {Class.forName("android.R$attr").getDeclaredField(drawable).getInt(null)}; @@ -256,7 +232,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_text); - setTextAppearance(view, "textAppearanceMedium", "TextAppearance_Medium"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Medium); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); @@ -273,7 +249,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_informativeText); - setTextAppearance(view, "textAppearanceMedium", "TextAppearance_Medium"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Medium); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); @@ -293,7 +269,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_detailedText); - setTextAppearance(view, "textAppearanceSmall", "TextAppearance_Small"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Small); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); diff --git a/src/android/templates/res/values/libs.xml b/src/android/templates/res/values/libs.xml index 4d68673cb0..ee3f5e940e 100644 --- a/src/android/templates/res/values/libs.xml +++ b/src/android/templates/res/values/libs.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='utf-8'?> <resources> <array name="qt_sources"> - <item>https://download.qt-project.org/ministro/android/qt5/qt-5.4</item> + <item>https://download.qt.io/ministro/android/qt5/qt-5.6</item> </array> <!-- The following is handled automatically by the deployment tool. It should |