Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mobile/scripts/EnvVariables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ else
export ANDROID_ABI=x86_64
endif
export LIB_EXT := .so

export LDFLAGS := -Wl,-z,max-page-size=16384
export NIMFLAGS := --passL:"$(LDFLAGS)"
export CGO_LDFLAGS := $(LDFLAGS)
endif


Expand Down
4 changes: 3 additions & 1 deletion mobile/scripts/android/clangWrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ fi
TARGET="$CARCH-linux-android${TARGET_SUFFIX}${ANDROID_API}"
EXTRA_ARGS="-fembed-bitcode"

exec "$CLANG" --target="$TARGET" "$EXTRA_ARGS" --sysroot="$SYSROOT" -v "$@"
LINK_PAGE_SIZE_ARGS="-Wl,-z,max-page-size=16384"

exec "$CLANG" --target="$TARGET" "$EXTRA_ARGS" --sysroot="$SYSROOT" "${LINK_PAGE_SIZE_ARGS}" -v "$@"
2 changes: 1 addition & 1 deletion mobile/scripts/buildApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if [[ "${OS}" == "android" ]]; then

# Build with specified gradle targets
# shellcheck disable=SC2086 # intentional word splitting for multiple gradle tasks
./gradlew ${GRADLE_TARGETS} --no-daemon --console=plain
$("$QMAKE_BIN" -query QT_INSTALL_PREFIX)/src/3rdparty/gradle/gradlew ${GRADLE_TARGETS} --no-daemon --console=plain

echo "APK outputs:"
find build/outputs/apk -name '*.apk' 2>/dev/null || echo "No APKs found"
Expand Down
3 changes: 3 additions & 0 deletions mobile/wrapperApp/Status.pro
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ LIB_PREFIX = $$(APP_VARIANT)
android {
message("Configuring for android $${QT_ARCH}, $$(ANDROID_ABI)")

QMAKE_LFLAGS += -Wl,-z,max-page-size=16384
QMAKE_LFLAGS_SHLIB += -Wl,-z,max-page-size=16384

ANDROID_VERSION_NAME = $$VERSION

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/../android/qt$$QT_MAJOR_VERSION
Expand Down
2 changes: 1 addition & 1 deletion ui/StatusQ/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif()
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)

find_package(Qt${QT_VERSION_MAJOR} COMPONENTS
Core Qml Gui Quick QuickControls2 WebChannel Svg REQUIRED)
Core CorePrivate Qml Gui Quick QuickControls2 WebChannel Svg REQUIRED)

# --- QML test hooks flag and TestConfig generation ---
option(STATUSQ_TESTMODE "Enable QML test hooks (TestConfig.testMode)" OFF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import StatusQ.CustomWebView 1.0

import AppLayouts.Browser.stores as BrowserStores

AbstractWebView {
import "../" as Base

Base.AbstractWebView {
id: root

required property BrowserStores.BookmarksStore bookmarksStore
Expand Down
49 changes: 0 additions & 49 deletions ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -390,26 +390,6 @@ Window {
}
}

// Clear additional SafeArea's margins when regular margins are initialized. Doing cleanup
// this way prevents binding loop between margins and additional margins.
Connections {
id: safeMarginsCleanupConnections

enabled: false
target: applicationWindow.contentItem.SafeArea

function onMarginsChanged() {
const safeArea = applicationWindow.contentItem.SafeArea

safeArea.additionalMargins.top = 0
safeArea.additionalMargins.bottom = Qt.binding(() => applicationWindow.additionalBottomMargin)
safeArea.additionalMargins.left = 0
safeArea.additionalMargins.right = 0

safeMarginsCleanupConnections.enabled = false
}
}

Component.onCompleted: {

console.info(">>> %1 %2 started, using Qt version %3, QPA: %4".arg(Application.name).arg(Application.version).arg(SystemUtils.qtRuntimeVersion()).arg(Qt.platform.pluginName))
Expand All @@ -436,27 +416,6 @@ Window {

nativeSafeAreaBottom = MobileUI.safeAreaBottom + MobileUI.navbarHeight

// SafeArea margins works well out of the box when app uses regular qml Window as a top level
// window. When custom window derived from QQuickWindow is used, SafeArea's margins are all 0
// till first screen rotation or virtual keyboard usage (Android 15, 16, not and issue on Android 14).
// This workaround initializes margins by adding addtionalMargins using values read directly from
// via native API. When the margins are initialized, binding is cleared.
const safeArea = applicationWindow.contentItem.SafeArea

if (safeArea.margins.bottom === 0 && MobileUI.safeAreaBottom + MobileUI.navbarHeight > 0)
safeArea.additionalMargins.bottom = Qt.binding(() => MobileUI.safeAreaBottom + MobileUI.navbarHeight + applicationWindow.additionalBottomMargin)

if (safeArea.margins.top === 0 && MobileUI.safeAreaTop > 0)
safeArea.additionalMargins.top = Qt.binding(() => MobileUI.safeAreaTop)

if (safeArea.margins.right === 0 && MobileUI.safeAreaRight > 0)
safeArea.additionalMargins.right = Qt.binding(() => MobileUI.safeAreaRight)

if (safeArea.margins.left === 0 && MobileUI.safeAreaLeft > 0)
safeArea.additionalMargins.left = Qt.binding(() => MobileUI.safeAreaLeft)

safeMarginsCleanupConnections.enabled = true

if (applicationWindow.skipOnboarding) {
moveToAppMain()
}
Expand Down Expand Up @@ -778,12 +737,4 @@ Window {
}
}
}

//Workaround for QTBUG-140897
onKeyboardHeightChanged: {
if (applicationWindow.keyboardHeight > 0) {
SystemUtils.requestAndroidKeyboardShow()
}
}

}
Loading