Merge integration refs/builds/qtci/dev/1616748388
This commit is contained in:
commit
cbb0ef5a86
@ -159,11 +159,15 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
|
||||
public void setPosition(final int x, final int y){
|
||||
initOverlay();
|
||||
|
||||
final int[] location = new int[2];
|
||||
m_layout.getLocationOnScreen(location);
|
||||
final int[] layoutLocation = new int[2];
|
||||
m_layout.getLocationOnScreen(layoutLocation);
|
||||
|
||||
int x2 = x + location[0];
|
||||
int y2 = y + location[1] + m_yShift;
|
||||
// This value is used for handling split screen case
|
||||
final int[] activityLocation = new int[2];
|
||||
m_activity.getWindow().getDecorView().getLocationOnScreen(activityLocation);
|
||||
|
||||
int x2 = x + layoutLocation[0] - activityLocation[0];
|
||||
int y2 = y + layoutLocation[1] + m_yShift - activityLocation[1];
|
||||
|
||||
if (m_id == QtNative.IdCursorHandle) {
|
||||
x2 -= m_popup.getWidth() / 2 ;
|
||||
|
@ -209,6 +209,11 @@ public class QtActivityDelegate
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKeyboardVisible()
|
||||
{
|
||||
return m_keyboardIsVisible;
|
||||
}
|
||||
|
||||
// input method hints - must be kept in sync with QTDIR/src/corelib/global/qnamespace.h
|
||||
private final int ImhHiddenText = 0x1;
|
||||
private final int ImhSensitiveData = 0x2;
|
||||
@ -260,7 +265,7 @@ public class QtActivityDelegate
|
||||
if (m_keyboardIsVisible == visibility)
|
||||
return false;
|
||||
m_keyboardIsVisible = visibility;
|
||||
QtNative.keyboardVisibilityChanged(m_keyboardIsVisible);
|
||||
QtNative.keyboardVisibilityUpdated(m_keyboardIsVisible);
|
||||
|
||||
if (visibility == false)
|
||||
updateFullScreen(); // Hiding the keyboard clears the immersive mode, so we need to set it again.
|
||||
|
@ -99,6 +99,7 @@ public class QtNative
|
||||
public static final String QtTAG = "Qt JAVA"; // string used for Log.x
|
||||
private static ArrayList<Runnable> m_lostActions = new ArrayList<Runnable>(); // a list containing all actions which could not be performed (e.g. the main activity is destroyed, etc.)
|
||||
private static boolean m_started = false;
|
||||
private static boolean m_isKeyboardHiding = false;
|
||||
private static int m_displayMetricsScreenWidthPixels = 0;
|
||||
private static int m_displayMetricsScreenHeightPixels = 0;
|
||||
private static int m_displayMetricsAvailableLeftPixels = 0;
|
||||
@ -930,6 +931,7 @@ public class QtNative
|
||||
|
||||
private static void hideSoftwareKeyboard()
|
||||
{
|
||||
m_isKeyboardHiding = true;
|
||||
runAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -954,13 +956,7 @@ public class QtNative
|
||||
|
||||
public static boolean isSoftwareKeyboardVisible()
|
||||
{
|
||||
Activity activity = QtNative.activity();
|
||||
Rect r = new Rect();
|
||||
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(r);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
final int kbHeight = metrics.heightPixels - r.bottom;
|
||||
return (kbHeight >= KEYBOARD_HEIGHT_THRESHOLD);
|
||||
return m_activityDelegate.isKeyboardVisible() && !m_isKeyboardHiding;
|
||||
}
|
||||
|
||||
private static void notifyAccessibilityLocationChange()
|
||||
@ -1327,6 +1323,12 @@ public class QtNative
|
||||
});
|
||||
}
|
||||
|
||||
public static void keyboardVisibilityUpdated(boolean visibility)
|
||||
{
|
||||
m_isKeyboardHiding = false;
|
||||
keyboardVisibilityChanged(visibility);
|
||||
}
|
||||
|
||||
private static String[] listAssetContent(android.content.res.AssetManager asset, String path) {
|
||||
String [] list;
|
||||
ArrayList<String> res = new ArrayList<String>();
|
||||
|
@ -264,6 +264,8 @@ qt_internal_add_module(Core
|
||||
# special case end
|
||||
)
|
||||
|
||||
qt_update_ignore_pch_source(Core kernel/qmetatype.cpp )
|
||||
|
||||
# special case begin
|
||||
add_dependencies(Core qmodule_pri)
|
||||
add_dependencies(Core ${QT_CMAKE_EXPORT_NAMESPACE}::moc)
|
||||
|
@ -37,7 +37,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#define QT_QMETATYPE_BC_COMPAT 1
|
||||
#include "qmetatype.h"
|
||||
#undef QT_QMETATYPE_BC_COMPAT
|
||||
#include "qmetatype_p.h"
|
||||
#include "qobjectdefs.h"
|
||||
#include "qdatetime.h"
|
||||
@ -489,6 +491,18 @@ bool QMetaType::isRegistered() const
|
||||
Returns id type hold by this QMetatype instance.
|
||||
*/
|
||||
|
||||
// keep in sync with version in header
|
||||
// ### Qt 7::remove BC helper
|
||||
int QMetaType::id() const
|
||||
{
|
||||
if (d_ptr) {
|
||||
if (int id = d_ptr->typeId.loadRelaxed())
|
||||
return id;
|
||||
return idHelper();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
The slowpath of id(). Precondition: d_ptr != nullptr
|
||||
|
@ -444,7 +444,12 @@ public:
|
||||
|
||||
bool isValid() const;
|
||||
bool isRegistered() const;
|
||||
int id() const
|
||||
#if defined(QT_QMETATYPE_BC_COMPAT)
|
||||
int id() const;
|
||||
#else
|
||||
// ### Qt 7: Remove traces of out of line version
|
||||
// unused int parameter is used to avoid ODR violation
|
||||
int id(int = 0) const
|
||||
{
|
||||
if (d_ptr) {
|
||||
if (int id = d_ptr->typeId.loadRelaxed())
|
||||
@ -453,6 +458,7 @@ public:
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
#endif
|
||||
constexpr qsizetype sizeOf() const;
|
||||
constexpr qsizetype alignOf() const;
|
||||
constexpr TypeFlags flags() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user