aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-01 00:39:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-01 00:39:34 +0000
commit11e964feff5789d615087cd5a466525e119e403b (patch)
tree8534e1c2ead7aab70d811818d2895da3e5c22b84
parent15b360e051893eef1b6557792884c5a7191c3d4f (diff)
parent76731b7c37d1c771da08a0185ce828d55f9b649b (diff)
downloadqemu-emu-34-3-release.tar.gz
Merge "Snap for 11518112 from 60cecf38585eb7881fc11d707069e10b4e5a6180 to emu-34-3-release" into emu-34-3-releaseemu-34-3-release
-rw-r--r--android-qemu2-glue/main.cpp6
-rw-r--r--android/android-emu/android/camera/camera-metrics.h5
-rw-r--r--android/android-ui/modules/aemu-ext-pages-grpc/bugreport/src/android/skin/qt/extended-pages/bug-report-page-grpc.cpp10
-rw-r--r--android/android-ui/modules/aemu-ext-pages/bugreport/src/android/skin/qt/extended-pages/bug-report-page.cpp10
-rw-r--r--android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.cpp4
-rw-r--r--android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.h4
-rw-r--r--android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/vhal-table.cpp4
-rw-r--r--android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.cpp14
-rw-r--r--android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.h5
-rw-r--r--android/android-ui/modules/aemu-ext-pages/dpad/src/android/skin/qt/extended-pages/dpad-page.cpp13
-rw-r--r--android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-point.cpp8
-rw-r--r--android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-route.cpp6
-rw-r--r--android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.cpp12
-rw-r--r--android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.h32
-rw-r--r--android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/network-connectivity-manager.cpp6
-rw-r--r--android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.cpp12
-rw-r--r--android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.h11
-rw-r--r--android/android-ui/modules/aemu-ext-pages/snapshot/src/android/skin/qt/extended-pages/snapshot-page.h4
-rw-r--r--android/android-ui/modules/aemu-ext-pages/tv-remote/src/android/skin/qt/extended-pages/tv-remote-page.cpp14
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/VirtualSceneInfoDialog.cpp4
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-overlay.cpp15
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.cpp94
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.h12
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window-grpc.cpp11
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window.cpp11
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.h6
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.mm6
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.cpp9
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.h10
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/native-event-filter-factory.cpp4
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/tool-window.cpp38
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/virtualscene-control-window.cpp18
-rw-r--r--android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/winsys-qt.cpp4
-rw-r--r--android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/angle-input-widget.cpp5
-rw-r--r--android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/size-tweaker.cpp19
-rw-r--r--android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/wavefront-obj-parser.cpp9
-rw-r--r--android/build/cmake/config/emu-qt5-config.cmake541
-rw-r--r--android/build/cmake/prebuilts.cmake7
-rw-r--r--android/build/python/aemu/prebuilts/qt.py23
-rw-r--r--android/emu/files/src/android/qt/qt_setup.cpp7
-rw-r--r--android/emu/metrics/include/android/metrics/UiEventTracker.h5
-rw-r--r--android/emu/protos/emulator_features.proto2
42 files changed, 329 insertions, 711 deletions
diff --git a/android-qemu2-glue/main.cpp b/android-qemu2-glue/main.cpp
index 0e10d5c29c..66ed85e466 100644
--- a/android-qemu2-glue/main.cpp
+++ b/android-qemu2-glue/main.cpp
@@ -3122,7 +3122,11 @@ extern "C" int main(int argc, char** argv) {
dprint("skin_winsys_init and UI starting at uptime %" PRIu64 " ms",
get_uptime_ms());
#endif
- skin_winsys_init_args(argc, argv);
+ // Don't use argc/argv here, as it has been modified prior to this point.
+ // Use args instead, as Qt6's QtWebEngine requires the program name in argv.
+ std::string emu_exe(executable);
+ char* emu_argv = &emu_exe[0];
+ skin_winsys_init_args(1, &emu_argv);
if (!emulator_initUserInterface(opts, &uiEmuAgent)) {
return 1;
}
diff --git a/android/android-emu/android/camera/camera-metrics.h b/android/android-emu/android/camera/camera-metrics.h
index 19e944951b..4227a3f16f 100644
--- a/android/android-emu/android/camera/camera-metrics.h
+++ b/android/android-emu/android/camera/camera-metrics.h
@@ -23,7 +23,10 @@
#ifdef __cplusplus
#include "aemu/base/synchronization/Lock.h"
#include "android/base/system/System.h"
-#include "studio_stats.pb.h"
+#ifndef Q_MOC_RUN
+// Qt 6.5.3 moc complains of a parsing error with this protobuf file. So exclude it from moc runs.
+#include "studio_stats.pb.h" // for EmulatorAutomatio...
+#endif // Q_MOC_RUN
#endif // __cplusplus
#include "android/camera/camera-common.h"
#include "android/utils/compiler.h"
diff --git a/android/android-ui/modules/aemu-ext-pages-grpc/bugreport/src/android/skin/qt/extended-pages/bug-report-page-grpc.cpp b/android/android-ui/modules/aemu-ext-pages-grpc/bugreport/src/android/skin/qt/extended-pages/bug-report-page-grpc.cpp
index c7b4f2e4d2..24d8ff6ed8 100644
--- a/android/android-ui/modules/aemu-ext-pages-grpc/bugreport/src/android/skin/qt/extended-pages/bug-report-page-grpc.cpp
+++ b/android/android-ui/modules/aemu-ext-pages-grpc/bugreport/src/android/skin/qt/extended-pages/bug-report-page-grpc.cpp
@@ -351,13 +351,8 @@ void BugreportPageGrpc::on_bug_saveButton_clicked() {
generateUniqueBugreportName());
enableInput(false);
-#if QT_VERSION >= 0x060000
QFuture<bool> future = QtConcurrent::run(
&BugreportPageGrpc::saveBugReportTo, this, savingPath);
-#else
- QFuture<bool> future = QtConcurrent::run(
- this, &BugreportPageGrpc::saveBugReportTo, savingPath);
-#endif // QT_VERSION
mSavingStates.bugreportSavedSucceed = future.result();
enableInput(true);
if (!mSavingStates.bugreportSavedSucceed) {
@@ -374,13 +369,8 @@ void BugreportPageGrpc::on_bug_sendToGoogle_clicked() {
on_bug_saveButton_clicked();
}
// launch the issue tracker in a separate thread
-#if QT_VERSION >= 0x060000
QFuture<bool> future =
QtConcurrent::run(&BugreportPageGrpc::launchIssueTracker, this);
-#else
- QFuture<bool> future =
- QtConcurrent::run(this, &BugreportPageGrpc::launchIssueTracker);
-#endif // QT_VERSION
bool success = future.result();
if (!success) {
QString errMsg =
diff --git a/android/android-ui/modules/aemu-ext-pages/bugreport/src/android/skin/qt/extended-pages/bug-report-page.cpp b/android/android-ui/modules/aemu-ext-pages/bugreport/src/android/skin/qt/extended-pages/bug-report-page.cpp
index 641788ba87..5ce0fc373b 100644
--- a/android/android-ui/modules/aemu-ext-pages/bugreport/src/android/skin/qt/extended-pages/bug-report-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/bugreport/src/android/skin/qt/extended-pages/bug-report-page.cpp
@@ -276,13 +276,8 @@ void BugreportPage::on_bug_saveButton_clicked() {
generateUniqueBugreportName());
enableInput(false);
-#if QT_VERSION >= 0x060000
QFuture<bool> future = QtConcurrent::run(&BugreportPage::saveBugReportTo,
this, savingPath);
-#else
- QFuture<bool> future = QtConcurrent::run(
- this, &BugreportPage::saveBugReportTo, savingPath);
-#endif // QT_VERSION
mSavingStates.bugreportSavedSucceed = future.result();
enableInput(true);
if (!mSavingStates.bugreportSavedSucceed) {
@@ -299,13 +294,8 @@ void BugreportPage::on_bug_sendToGoogle_clicked() {
on_bug_saveButton_clicked();
}
// launch the issue tracker in a separate thread
-#if QT_VERSION >= 0x060000
QFuture<bool> future =
QtConcurrent::run(&BugreportPage::launchIssueTracker, this);
-#else
- QFuture<bool> future =
- QtConcurrent::run(this, &BugreportPage::launchIssueTracker);
-#endif // QT_VERSION
bool success = future.result();
if (!success) {
QString errMsg =
diff --git a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.cpp b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.cpp
index 670cdf73ff..052cc28cfc 100644
--- a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.cpp
@@ -24,10 +24,6 @@
class QGridLayout;
class QString;
class QWidget;
-#if QT_VERSION >= 0x060000
-#else
-template <class T1, class T2> struct QPair;
-#endif // QT_VERSION
template <typename T> class QSet;
CheckboxDialog::CheckboxDialog(QWidget* parent,
diff --git a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.h b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.h
index afc718062a..35d5eb3692 100644
--- a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.h
+++ b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/checkbox-dialog.h
@@ -24,10 +24,6 @@ class QObject;
class QString;
class QWidget;
-#if QT_VERSION >= 0x060000
-#else
-template <class T1, class T2> struct QPair;
-#endif // QT_VERSION
template <typename T> class QSet;
// This CheckboxDialog is for user input for VHAL property whose type is
diff --git a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/vhal-table.cpp b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/vhal-table.cpp
index 9520ba5f99..c9351f6500 100644
--- a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/vhal-table.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-data-emulation/vhal-table.cpp
@@ -489,11 +489,7 @@ const std::vector<int32_t>* VhalTable::getUserInt32VecValue(
QString tip,
bool* pressedOk) {
QStringList valueStringList = oldValueString.split("; ");
-#if QT_VERSION >= 0x060000
QSet<QString> oldStringSet(valueStringList.constBegin(), valueStringList.constEnd());
-#else
- QSet<QString> oldStringSet = QSet<QString>::fromList(valueStringList);
-#endif
map<int32_t, QString> nameByValue;
for (int i = 0; i < propDesc.lookupTableNames.size(); i++) {
diff --git a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.cpp b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.cpp
index 60cd14a567..d2c9c1115d 100644
--- a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.cpp
@@ -17,10 +17,6 @@
#include <QAbstractButton> // for QAbstractButton
#include <QBitmap> // for QBitmap
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget> // for QDesktopWidget
-#endif
#include <QEvent> // for QEvent
#include <QHash> // for QHash
#include <QIcon> // for QIcon
@@ -237,19 +233,13 @@ void CarRotaryPage::remaskButtons() {
// to be scaled down.
double dpr = 1;
#ifndef Q_OS_MAC
- int screen_num = QApplication::desktop()->screenNumber(this);
- if (screen_num >= 0 &&
- screen_num < QApplication::screens().size()) {
- QScreen* scr = QApplication::screens().at(screen_num);
+ QScreen* scr = this->screen();
+ if (scr) {
dpr = scr->logicalDotsPerInch() / SizeTweaker::BaselineDpi;
}
#endif
-#if QT_VERSION >= 0x060000
button->setMask(QBitmap::fromPixmap(
mask_pixmap.mask().scaled(button->size() * dpr)));
-#else
- button->setMask(mask_pixmap.mask().scaled(button->size() * dpr));
-#endif
button->setStyleSheet("border: none;");
}
}
diff --git a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.h b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.h
index d756f760b6..accee5ae3f 100644
--- a/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.h
+++ b/android/android-ui/modules/aemu-ext-pages/car/src/android/skin/qt/extended-pages/car-rotary-page.h
@@ -14,6 +14,7 @@
#include <qobjectdefs.h> // for Q_OBJECT
#include <QTime> // for QTime
+#include <QElapsedTimer> // for QElapsedTimer
#include <QTimer> // for QTimer
#include <QWidget> // for QWidget
#include <memory> // for unique_ptr
@@ -59,11 +60,7 @@ private:
std::unique_ptr<Ui::CarRotaryPage> mUi;
EmulatorQtWindow* mEmulatorWindow;
android::emulation::AdbInterface* mAdb;
-#if QT_VERSION >= 0x060000
QElapsedTimer mAdbExecuteTime;
-#else
- QTime mAdbExecuteTime;
-#endif // QT_VERSION
QTimer mLongPressTimer;
QTimer mCheckTimer;
QTimer mSupportsActionTimer;
diff --git a/android/android-ui/modules/aemu-ext-pages/dpad/src/android/skin/qt/extended-pages/dpad-page.cpp b/android/android-ui/modules/aemu-ext-pages/dpad/src/android/skin/qt/extended-pages/dpad-page.cpp
index f7327996b4..6d22ae6327 100644
--- a/android/android-ui/modules/aemu-ext-pages/dpad/src/android/skin/qt/extended-pages/dpad-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/dpad/src/android/skin/qt/extended-pages/dpad-page.cpp
@@ -18,10 +18,6 @@
#include <stddef.h> // for NULL
#include <QAbstractButton> // for QAbstractButton
#include <QBitmap> // for QBitmap
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget> // for QDesktopWidget
-#endif // QT_VERSION
#include <QEvent> // for QEvent
#include <QHash> // for QHash
#include <QIcon> // for QIcon
@@ -145,19 +141,14 @@ void DPadPage::remaskButtons() {
// to be scaled down.
double mask_scale = 0.5;
#ifndef Q_OS_MAC
- int screen_num = QApplication::desktop()->screenNumber(this);
- if (screen_num >= 0 && screen_num < QApplication::screens().size()) {
- QScreen *scr = QApplication::screens().at(screen_num);
+ QScreen* scr = this->screen();
+ if (scr) {
double dpr = scr->logicalDotsPerInch() / SizeTweaker::BaselineDpi;
mask_scale *= dpr;
}
#endif
-#if QT_VERSION >= 0x060000
button->setMask(QBitmap::fromPixmap(
mask_pixmap.mask().scaled(mask_pixmap.size() * mask_scale)));
-#else
- button->setMask(mask_pixmap.mask().scaled(mask_pixmap.size() * mask_scale));
-#endif
button->setStyleSheet("border: none;");
}
}
diff --git a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-point.cpp b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-point.cpp
index 53934d10d1..e1337c932d 100644
--- a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-point.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-point.cpp
@@ -35,11 +35,7 @@
#include <QPainter>
#include <QPlainTextEdit>
#include <QSettings>
-#if QT_VERSION >= 0x060000
#include <QtWebEngineCore/QWebEngineScriptCollection>
-#else
-#include <QWebEngineScriptCollection>
-#endif // QT_VERSION
#include <fstream>
#include <string_view>
@@ -85,11 +81,7 @@ bool addJavascriptFromResource(QWebEnginePage* const webEnginePage,
}
QByteArray jscode = jsFile.readAll();
-#if QT_VERSION >= 0x060000
jscode.append(appendString.toUtf8());
-#else
- jscode.append(appendString);
-#endif // QT_VERSION
script.setSourceCode(jscode);
script.setName(scriptName);
script.setWorldId(QWebEngineScript::MainWorld);
diff --git a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-route.cpp b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-route.cpp
index 295aa51b4e..b0008b6b42 100644
--- a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-route.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page-route.cpp
@@ -230,7 +230,9 @@ void LocationPage::on_loc_routeList_itemSelectionChanged() {
mUi->loc_routeList->selectedItems().size() != 1) {
// Either no routes selected, or in deletion mode, either of which
// means the map shouldn't be set to anything.
+#ifdef USE_WEBENGINE
emit mMapBridge->showRouteOnMap("");
+#endif // USE_WEBENGINE
}
if (mUi->loc_routeList->selectedItems().size() == 1) {
// show the location on the map, but do not send it to the device
@@ -246,7 +248,9 @@ void LocationPage::on_loc_routeList_itemSelectionChanged() {
mRouteSender.reset(RouteSenderThread::newInstance(
this,
SLOT(routeSendingFinished(bool))));
+#ifdef USE_WEBENGINE
mRouteSender->sendRouteToMap(&routeElement, mMapBridge.get());
+#endif // USE_WEBENGINE
}
// Disable the edit buttons on the saved points if in deletion mode
@@ -357,7 +361,9 @@ void LocationPage::deleteSelectedRoutes() {
selectedItems[i]);
deleteRoute(routeItem);
}
+#ifdef USE_WEBENGINE
emit mMapBridge->showRouteOnMap("");
+#endif // USE_WEBENGINE
mUi->loc_playRouteButton->setEnabled(false);
}
QApplication::restoreOverrideCursor();
diff --git a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.cpp b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.cpp
index 837d975449..37731c522f 100644
--- a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.cpp
@@ -59,16 +59,12 @@
#include "android/skin/qt/extended-pages/common.h" // for setBu...
#include "android/skin/qt/qt-settings.h" // for PER_A...
#include "android/skin/qt/raised-material-button.h" // for Raise...
-#include "android/skin/qt/websockets/websocketclientwrapper.h" // for WebSo...
#include "aemu/base/logging/LogSeverity.h" // for EMULA...
#include "studio_stats.pb.h" // for Emula...
#ifdef USE_WEBENGINE
-#if QT_VERSION >= 0x060000
+#include "android/skin/qt/websockets/websocketclientwrapper.h" // for WebSo...
#include <QtWebEngineCore/QWebEngineProfile>
-#else
-#include <QWebEngineProfile>
-#endif // QT_VERSION
#endif // USE_WEBENGINE
#include <math.h> // for cos, s
@@ -685,6 +681,7 @@ void LocationPage::locationPlaybackStop() {
}
void LocationPage::locationPlaybackStop_v2() {
+#ifdef USE_WEBENGINE
mTimer.stop();
mNextRoutePointIdx = -1;
playRouteStateChanged(true);
@@ -696,6 +693,7 @@ void LocationPage::locationPlaybackStop_v2() {
}
mNowPlaying = false;
+#endif // USE_WEBENGINE
}
void LocationPage::timeout() {
@@ -795,6 +793,7 @@ void LocationPage::timeout() {
// Advance (up to) one second along the route
void LocationPage::timeout_v2() {
+#ifdef USE_WEBENGINE
double latNow = 0.0;
double lngNow = 0.0;
double altNow = 0.0;
@@ -885,6 +884,7 @@ void LocationPage::timeout_v2() {
mTimer.setInterval(std::min((int)UPDATE_INTERVAL, sleepTime));
}
mTimer.start();
+#endif // USE_WEBENGINE
}
void LocationPage::geoDataThreadStarted() {
@@ -957,7 +957,9 @@ void LocationPage::validateCoordinates() {
// the map UI
void LocationPage::sendMostRecentUiLocation() {
// Update the location marker on the map
+#ifdef USE_WEBENGINE
emit mMapBridge->locationChanged(mLastLat, mLastLng);
+#endif // USE_WEBENGINE
writeDeviceLocationToSettings(mLastLat.toDouble(), mLastLng.toDouble(), 0.0,
0.0, 0.0);
diff --git a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.h b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.h
index b078de5e30..3c16398612 100644
--- a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.h
+++ b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/location-page.h
@@ -12,6 +12,11 @@
#ifdef USE_WEBENGINE
#include "ui_location-page.h"
+#include "android/skin/qt/websockets/websocketclientwrapper.h"
+#include "android/skin/qt/websockets/websockettransport.h"
+#include <QWebChannel>
+#include <QWebEngineView>
+#include <QWebSocketServer>
#else
#include "ui_location-page_noMaps.h"
#endif // USE_WEBENGINE
@@ -23,25 +28,16 @@
#include "android/location/Route.h"
#include "android/metrics/PeriodicReporter.h"
#include "android/skin/qt/common-controls/cc-list-item.h"
-#include "android/skin/qt/websockets/websocketclientwrapper.h"
-#include "android/skin/qt/websockets/websockettransport.h"
#include "network-connectivity-manager.h"
#include "android/metrics/UiEventTracker.h"
#include <QDateTime>
#include <QListWidgetItem>
-#if QT_VERSION >= 0x060000
-#else
-#include <QtNetwork/QNetworkConfigurationManager>
-#endif // QT_VERSION
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QTimer>
#include <QThread>
#include <QVector>
-#include <QWebChannel>
-#include <QWebEngineView>
-#include <QWebSocketServer>
#include <QWidget>
#include <memory>
@@ -333,12 +329,6 @@ private:
void deleteSelectedRoutes();
void scanForRoutes();
- std::unique_ptr<QWebSocketServer> mServer;
- std::unique_ptr<WebSocketClientWrapper> mClientWrapper;
- std::unique_ptr<QWebChannel> mWebChannel;
-
- std::unique_ptr<MapBridge> mMapBridge;
-
uint32_t mSetLocCount = 0;
uint32_t mPlayRouteCount = 0;
@@ -351,6 +341,12 @@ private:
bool mIsGpxKmlPlayback = false;
friend class RouteSenderThread;
#ifdef USE_WEBENGINE
+ std::unique_ptr<QWebSocketServer> mServer;
+ std::unique_ptr<WebSocketClientWrapper> mClientWrapper;
+ std::unique_ptr<QWebChannel> mWebChannel;
+
+ std::unique_ptr<MapBridge> mMapBridge;
+
bool mShouldRefreshPageOnReconnect;
NetworkConnectivityManager* mNetworkConnectivityManager;
#endif // USE_WEBENGINE
@@ -378,14 +374,8 @@ public:
updateTheme();
setTitle(mPointElement.logicalName);
QString subtitle;
-#if QT_VERSION >= 0x060000
subtitle = QString("%1, %2").arg(mPointElement.latitude, 0, 'f', 4)
.arg(mPointElement.longitude, 0, 'f', 4);
-#else
- subtitle.sprintf("%.4f, %.4f",
- mPointElement.latitude,
- mPointElement.longitude);
-#endif
setSubtitle(subtitle);
}
diff --git a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/network-connectivity-manager.cpp b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/network-connectivity-manager.cpp
index eebdf77643..edcd8041b1 100644
--- a/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/network-connectivity-manager.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/location/src/android/skin/qt/extended-pages/network-connectivity-manager.cpp
@@ -12,13 +12,7 @@
#ifdef USE_WEBENGINE
#include "network-connectivity-manager.h"
-#if QT_VERSION >= 0x060000
#include <QtNetwork/QNetworkInformation>
-#else
-#include <QtNetwork/QNetworkConfigurationManager>
-#include <QtNetwork/QNetworkInterface>
-#include <QtNetwork/QNetworkSession>
-#endif // QT_VERSION
#include <QTimer>
namespace {
diff --git a/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.cpp b/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.cpp
index a2c7b02b6b..e45aa7c4bb 100644
--- a/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.cpp
@@ -36,11 +36,7 @@
#include <QMessageBox>
#include <QObject>
#include <QPushButton>
-#if QT_VERSION >= 0x060000
#include <QRegularExpression>
-#else
-#include <QRegExp>
-#endif // QT_VERSION
#include <QSize>
#include <QStackedWidget>
#include <QStandardPaths>
@@ -826,11 +822,7 @@ std::string RecordMacroPage::displayNameMacroBox() {
int selection;
QString newName;
-#if QT_VERSION >= 0x060000
QRegularExpression re(QRegularExpression::anchoredPattern("\\w+"));
-#else
- QRegExp re("\\w+");
-#endif // QT_VERSION
// Check that name is [a-zA-Z0-9_] after trimming.
do {
selection = nameDialog.exec();
@@ -838,11 +830,7 @@ std::string RecordMacroPage::displayNameMacroBox() {
newName.replace("_", " ");
newName = newName.simplified();
newName.replace(" ", "_");
-#if QT_VERSION >= 0x060000
} while (selection == QDialog::Accepted && !re.match(newName).hasMatch());
-#else
- } while (selection == QDialog::Accepted && !re.exactMatch(newName));
-#endif // QT_VERSION
if (selection == QDialog::Rejected) {
return "";
diff --git a/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.h b/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.h
index 41d97151a9..92e3db2bb3 100644
--- a/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.h
+++ b/android/android-ui/modules/aemu-ext-pages/recording/src/android/skin/qt/extended-pages/record-macro-page.h
@@ -15,11 +15,7 @@
#include <stdint.h> // for uint64_t, uint32_t
#include <QItemSelection> // for QItemSelection
#include <QString> // for QString
-#if QT_VERSION >= 0x060000
#include <QElapsedTimer>
-#else
-#include <QTime> // for QTime
-#endif // QT_VERSION
#include <QTimer> // for QTimer
#include <QWidget> // for QWidget
#include <memory> // for unique_ptr
@@ -27,7 +23,10 @@
#include <unordered_map> // for unordered_map
#include <vector> // for vector
+#ifndef Q_MOC_RUN
+// Qt 6.5.3 moc complains of a parsing error with this protobuf file. So exclude it from moc runs.
#include "studio_stats.pb.h" // for EmulatorAutomatio...
+#endif // Q_MOC_RUN
class CCListItem;
class QHideEvent;
@@ -155,11 +154,7 @@ private:
// session ends.
uint64_t mReportWindowStartUs = 0;
uint32_t mReportWindowCount = 0;
-#if QT_VERSION >= 0x060000
QElapsedTimer mElapsedTimeTimer;
-#else
- QTime mElapsedTimeTimer;
-#endif // QT_VERSION
struct AutomationMetrics {
uint64_t totalDurationMs = 0;
diff --git a/android/android-ui/modules/aemu-ext-pages/snapshot/src/android/skin/qt/extended-pages/snapshot-page.h b/android/android-ui/modules/aemu-ext-pages/snapshot/src/android/skin/qt/extended-pages/snapshot-page.h
index 4e0f7f65f6..91a05a490c 100644
--- a/android/android-ui/modules/aemu-ext-pages/snapshot/src/android/skin/qt/extended-pages/snapshot-page.h
+++ b/android/android-ui/modules/aemu-ext-pages/snapshot/src/android/skin/qt/extended-pages/snapshot-page.h
@@ -34,10 +34,6 @@ class QCloseEvent;
class QObject;
class QShowEvent;
class QString;
-#if QT_VERSION >= 0x060000
-#else
-class QStringList;
-#endif // QT_VERSION
class QTreeWidget;
class QWidget;
namespace emulator_snapshot {
diff --git a/android/android-ui/modules/aemu-ext-pages/tv-remote/src/android/skin/qt/extended-pages/tv-remote-page.cpp b/android/android-ui/modules/aemu-ext-pages/tv-remote/src/android/skin/qt/extended-pages/tv-remote-page.cpp
index 6aacc4fbdb..f8f341878b 100644
--- a/android/android-ui/modules/aemu-ext-pages/tv-remote/src/android/skin/qt/extended-pages/tv-remote-page.cpp
+++ b/android/android-ui/modules/aemu-ext-pages/tv-remote/src/android/skin/qt/extended-pages/tv-remote-page.cpp
@@ -19,10 +19,6 @@
#include <stddef.h> // for NULL
#include <QAbstractButton> // for QAbstractButton
#include <QBitmap> // for QBitmap
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget> // for QDesktopWidget
-#endif
#include <QEvent> // for QEvent
#include <QHash> // for QHash
#include <QIcon> // for QIcon
@@ -286,19 +282,13 @@ void TvRemotePage::remaskButtons() {
// to be scaled down.
double dpr = 1.0;
#ifndef Q_OS_MAC
- int screen_num = QApplication::desktop()->screenNumber(this);
- if (screen_num >= 0 &&
- screen_num < QApplication::screens().size()) {
- QScreen* scr = QApplication::screens().at(screen_num);
+ QScreen* scr = this->screen();
+ if (scr) {
dpr = scr->logicalDotsPerInch() / SizeTweaker::BaselineDpi;
}
#endif
-#if QT_VERSION >= 0x060000
button->setMask(QBitmap::fromPixmap(
mask_pixmap.mask().scaled(button->size() * dpr)));
-#else
- button->setMask(mask_pixmap.mask().scaled(button->size() * dpr));
-#endif
button->setStyleSheet("border: none;");
}
}
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/VirtualSceneInfoDialog.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/VirtualSceneInfoDialog.cpp
index 4846352314..da589e8d47 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/VirtualSceneInfoDialog.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/VirtualSceneInfoDialog.cpp
@@ -23,11 +23,7 @@
#include <QLabel> // for QLabel
#include <QPropertyAnimation> // for QPropertyAnimation
#include <QSettings> // for QSettings
-#if QT_VERSION >= 0x060000
#include <QtSvgWidgets/QSvgWidget> // for QSvgWidget
-#else
-#include <QSvgWidget> // for QSvgWidget
-#endif // QT_VERSION
#include <algorithm> // for min
#include "android/cmdline-option.h" // for android_cmdLineOptions
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-overlay.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-overlay.cpp
index 0874476424..9b880b2c27 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-overlay.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-overlay.cpp
@@ -20,11 +20,7 @@
#include "android/skin/qt/tool-window.h"
#include <QApplication>
-#if QT_VERSION >= 0x060000
#include <QWindow>
-#else
-#include <QDesktopWidget>
-#endif // QT_VERSION
// The RGB values for the "resize" rectangle
#define RESIZE_RGB 0x01, 0xBE, 0xA4
@@ -338,23 +334,12 @@ void EmulatorOverlay::showForMultitouch(bool centerTouches,
void EmulatorOverlay::showForResize(int whichCorner) {
QRect screenGeo;
-#if QT_VERSION >= 0x060000
auto newScreen = window()->windowHandle() ? window()->windowHandle()->screen() : nullptr;
if (!newScreen) {
// No active screen!
return;
}
screenGeo = newScreen->geometry();
-#else
- QDesktopWidget* desktop = ((QApplication*)QApplication::instance())->desktop();
- int screenNum = desktop->screenNumber(mContainer); // Screen holding the app
-
- if (screenNum < 0) {
- // No active screen!
- return;
- }
- screenGeo = desktop->screenGeometry(screenNum);
-#endif // QT_VERSION
// Set this widget to the full screen
setGeometry(screenGeo);
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.cpp
index 780624e523..60fe0dca88 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.cpp
@@ -83,12 +83,7 @@
#include <QCheckBox>
#include <QCursor>
#include <Qt>
-#if QT_VERSION >= 0x060000
#include <QInputDevice>
-#else
-#include <QDesktopWidget>
-#include <QTouchDevice>
-#endif // QT_VERSION
#include <QFileDialog>
#include <QIcon>
#include <QLabel>
@@ -266,11 +261,7 @@ void SkinSurfaceBitmap::applyPendingTransformations() {
image = image.mirrored(true, true);
} else {
// a simple transformation is still enough here
-#if QT_VERSION >= 0x060000
QTransform transform;
-#else
- QMatrix transform;
-#endif
transform.rotate(pendingRotation * 90);
image = image.transformed(transform);
}
@@ -1461,24 +1452,12 @@ void EmulatorQtWindow::show() {
QObject::connect(window()->windowHandle(), &QWindow::screenChanged, this,
&EmulatorQtWindow::onScreenChanged);
-#if QT_VERSION >= 0x060000
QObject::connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this,
&EmulatorQtWindow::onScreenConfigChanged);
QObject::connect(qGuiApp, &QGuiApplication::screenAdded, this,
&EmulatorQtWindow::onScreenConfigChanged);
QObject::connect(qGuiApp, &QGuiApplication::screenRemoved, this,
&EmulatorQtWindow::onScreenConfigChanged);
-#else
- // On Mac, the above function won't be triggered when you plug in a new
- // monitor and the OS moves the emulator to the new screen. In such
- // situation, it will trigger screenCountChanged.
- QObject::connect(qApp->desktop(), &QDesktopWidget::screenCountChanged, this,
- &EmulatorQtWindow::onScreenConfigChanged);
- QObject::connect(qApp->desktop(), &QDesktopWidget::primaryScreenChanged,
- this, &EmulatorQtWindow::onScreenConfigChanged);
- QObject::connect(qApp->desktop(), &QDesktopWidget::workAreaResized, this,
- &EmulatorQtWindow::onScreenConfigChanged);
-#endif
}
void EmulatorQtWindow::setOnTop(bool onTop) {
@@ -1562,7 +1541,7 @@ void EmulatorQtWindow::handleTouchPoints(const QTouchEvent& touch,
unsigned char nrOfPoints = 0;
unsigned char lastValidTouchPointIndex = 0;
for (int i = touch.touchPoints().count() - 1; i >= 0; --i) {
- if (touch.touchPoints()[i].state() != Qt::TouchPointStationary) {
+ if (touch.touchPoints()[i].state() != QEventPoint::Stationary) {
lastValidTouchPointIndex = i;
break;
}
@@ -1570,13 +1549,13 @@ void EmulatorQtWindow::handleTouchPoints(const QTouchEvent& touch,
for (auto const& elem : touch.touchPoints()) {
SkinEvent skin_event;
bool eventSet = false;
- if (elem.state() == Qt::TouchPointPressed) {
+ if (elem.state() == QEventPoint::Pressed) {
skin_event = createSkinEvent(kEventTouchBegin);
eventSet = true;
- } else if (elem.state() == Qt::TouchPointMoved) {
+ } else if (elem.state() == QEventPoint::Updated) {
skin_event = createSkinEvent(kEventTouchUpdate);
eventSet = true;
- } else if (elem.state() == Qt::TouchPointReleased) {
+ } else if (elem.state() == QEventPoint::Released) {
skin_event = createSkinEvent(kEventTouchEnd);
eventSet = true;
}
@@ -1619,13 +1598,8 @@ bool EmulatorQtWindow::event(QEvent* ev) {
QTouchEvent* touchEvent = static_cast<QTouchEvent*>(ev);
// b/216383452 Only process multitouch events generated from touch
// screen.
-#if QT_VERSION >= 0x060000
if (touchEvent->device()->type() ==
QInputDevice::DeviceType::TouchScreen) {
-#else
- if (touchEvent->device()->type() ==
- QTouchDevice::QTouchDevice::TouchScreen) {
-#endif
handleTouchPoints(*touchEvent);
return true;
}
@@ -1780,7 +1754,6 @@ void EmulatorQtWindow::slot_getScreenDimensions(QRect* out_rect,
out_rect->setRect(0, 0, 1920, 1080); // Arbitrary default
D("slot_getScreenDimensions: Getting screen geometry");
-#if QT_VERSION >= 0x060000
auto newScreen = window()->windowHandle()
? window()->windowHandle()->screen()
: nullptr;
@@ -1788,11 +1761,6 @@ void EmulatorQtWindow::slot_getScreenDimensions(QRect* out_rect,
D("Can't get screen geometry. Window is off screen.");
}
QRect rect = newScreen->geometry();
-#else
- QRect rect = ((QApplication*)QApplication::instance())
- ->desktop()
- ->screenGeometry();
-#endif
D("slot_getScreenDimensions: Getting screen geometry (done)");
out_rect->setX(rect.x());
out_rect->setY(rect.y());
@@ -1863,7 +1831,6 @@ void EmulatorQtWindow::slot_getFramePos(int* xx,
void EmulatorQtWindow::slot_isWindowFullyVisible(bool* out_value,
QSemaphore* semaphore) {
QSemaphoreReleaser semReleaser(semaphore);
-#if QT_VERSION >= 0x060000
auto newScreen = mContainer.window()->windowHandle()
? mContainer.window()->windowHandle()->screen()
: nullptr;
@@ -1874,38 +1841,15 @@ void EmulatorQtWindow::slot_isWindowFullyVisible(bool* out_value,
QRect screenGeo = newScreen->geometry();
*out_value = screenGeo.contains(mContainer.geometry());
}
-#else
- QDesktopWidget* desktop =
- ((QApplication*)QApplication::instance())->desktop();
- int screenNum =
- desktop->screenNumber(&mContainer); // Screen holding the app
-
- if (screenNum < 0) {
- // Window is not on any screen
- *out_value = false;
- } else {
- QRect screenGeo = desktop->screenGeometry(screenNum);
- *out_value = screenGeo.contains(mContainer.geometry());
- }
-#endif
}
void EmulatorQtWindow::slot_isWindowOffScreen(bool* out_value,
QSemaphore* semaphore) {
QSemaphoreReleaser semReleaser(semaphore);
-#if QT_VERSION >= 0x060000
auto newScreen = mContainer.window()->windowHandle()
? mContainer.window()->windowHandle()->screen()
: nullptr;
*out_value = (newScreen == nullptr);
-#else
- QDesktopWidget* desktop =
- ((QApplication*)QApplication::instance())->desktop();
- int screenNum =
- desktop->screenNumber(&mContainer); // Screen holding the app
-
- *out_value = (screenNum < 0);
-#endif // QT_VERSION
}
void EmulatorQtWindow::pollEvent(SkinEvent* event, bool* hasEvent) {
@@ -2714,7 +2658,6 @@ SkinMouseButtonType EmulatorQtWindow::getSkinMouseButton(
}
}
-#if QT_VERSION >= 0x060000
void EmulatorQtWindow::handleMouseEvent(SkinEventType type,
SkinMouseButtonType button,
const QPointF& posF,
@@ -2722,13 +2665,6 @@ void EmulatorQtWindow::handleMouseEvent(SkinEventType type,
bool skipSync) {
QPoint pos((int)posF.x(), (int)posF.y());
QPoint gPos((int)gPosF.x(), (int)gPosF.y());
-#else
-void EmulatorQtWindow::handleMouseEvent(SkinEventType type,
- SkinMouseButtonType button,
- const QPoint& pos,
- const QPoint& gPos,
- bool skipSync) {
-#endif // QT_VERSION
if (type == kEventMouseButtonDown) {
mToolWindow->reportMouseButtonDown();
}
@@ -2762,13 +2698,8 @@ void EmulatorQtWindow::handlePenEvent(SkinEventType type,
penOrientation(tiltToRotation(event->xTilt(), event->yTilt()));
skin_event.u.pen.button_pressed =
((event->buttons() & Qt::RightButton) == Qt::RightButton);
-#if QT_VERSION >= 0x060000
skin_event.u.pen.rubber_pointer =
(event->pointerType() == QPointingDevice::PointerType::Eraser);
-#else
- skin_event.u.pen.rubber_pointer =
- (event->pointerType() == QTabletEvent::Eraser);
-#endif // QT_VERSION
skin_event.u.pen.x = event->pos().x();
skin_event.u.pen.y = event->pos().y();
skin_event.u.pen.x_global = event->globalPos().x();
@@ -3268,11 +3199,7 @@ struct QuadraticMotion {
class SwipeGesture {
constexpr static int kWheelCount = 20;
-#if QT_VERSION >= 0x060000
typedef QPointF P;
-#else
- typedef QPoint P;
-#endif // QT_VERSION
typedef decltype(P().y()) N;
QuadraticMotion<N> mMotion;
@@ -3355,32 +3282,19 @@ void EmulatorQtWindow::wheelEvent(QWheelEvent* event) {
if (!inputDeviceActive) {
return;
}
-#if QT_VERSION >= 0x060000
// For most mice, 1 wheel click = 15 degrees
handleMouseWheelEvent(event->angleDelta().y() * 120 / 15,
Qt::Orientation::Vertical);
handleMouseWheelEvent(event->angleDelta().x() * 120 / 15,
Qt::Orientation::Horizontal);
-#else
- handleMouseWheelEvent(event->delta(), event->orientation());
-#endif // QT_VERSION
} else if (inputDeviceHasRotary) {
SkinEvent skin_event = createSkinEvent(kEventRotaryInput);
-#if QT_VERSION >= 0x060000
skin_event.u.rotary_input.delta = event->angleDelta().y() / 8;
-#else
- skin_event.u.rotary_input.delta = event->delta() / 8;
-#endif // QT_VERSION
queueSkinEvent(std::move(skin_event));
} else {
-#if QT_VERSION >= 0x060000
// For most mice, 1 wheel click = 15 degrees
const int delta = event->angleDelta().y() * 120 / 15;
const auto pos = event->position();
-#else
- const int delta = event->delta();
- const auto pos = event->pos();
-#endif // QT_VERSION
// Scroll 1/9 of window height per a wheel click.
const int scaledDelta = mBackingSurface->h * delta / 120 / 9;
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.h b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.h
index 1eb5be89de..a4fcbf7bd3 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.h
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-qt-window.h
@@ -70,10 +70,6 @@ class MultiDisplayWidget;
using RunOnUiThreadFunc = std::function<void()>;
Q_DECLARE_METATYPE(QPainter::CompositionMode);
-#if QT_VERSION >= 0x060000
-#else
-Q_DECLARE_METATYPE(RunOnUiThreadFunc);
-#endif
Q_DECLARE_METATYPE(SkinGenericFunction);
Q_DECLARE_METATYPE(SkinRotation);
Q_DECLARE_METATYPE(Ui::OverlayMessageType);
@@ -248,19 +244,11 @@ public:
int w,
int h,
bool ignoreOrientation = false);
-#if QT_VERSION >= 0x060000
void handleMouseEvent(SkinEventType type,
SkinMouseButtonType button,
const QPointF& pos,
const QPointF& gPos,
bool skipSync = false);
-#else
- void handleMouseEvent(SkinEventType type,
- SkinMouseButtonType button,
- const QPoint& pos,
- const QPoint& gPos,
- bool skipSync = false);
-#endif // QT_VERSION
void handlePenEvent(SkinEventType type,
const QTabletEvent* event,
bool skipSync = false);
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window-grpc.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window-grpc.cpp
index 34382e04ed..2c78c22045 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window-grpc.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window-grpc.cpp
@@ -19,10 +19,6 @@
#include <QIcon>
#include <QtCore>
#include <string>
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget>
-#endif // QT_VERSION
#include <QLayoutItem>
#include <QPushButton>
#include <QRect>
@@ -433,14 +429,7 @@ void ExtendedWindowGrpc::show() {
// Verify that the extended pane is fully visible (otherwise it may be
// impossible for the user to move it)
-#if QT_VERSION >= 0x060000
QRect screenGeo = this->screen()->geometry();
-#else
- QDesktopWidget* desktop =
- static_cast<QApplication*>(QApplication::instance())->desktop();
- int screenNum = desktop->screenNumber(this); // Screen holding most of this
- QRect screenGeo = desktop->screenGeometry(screenNum);
-#endif // QT_VERSION
QRect myGeo = geometry();
bool moved = false;
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window.cpp
index d5c57b6d81..d36483d546 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/extended-window.cpp
@@ -19,10 +19,6 @@
#include <QIcon>
#include <QtCore>
#include <string>
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget>
-#endif // QT_VERSION
#include <QLayoutItem>
#include <QPushButton>
#include <QRect>
@@ -464,14 +460,7 @@ void ExtendedWindow::show() {
// Verify that the extended pane is fully visible (otherwise it may be
// impossible for the user to move it)
-#if QT_VERSION >= 0x060000
QRect screenGeo = this->screen()->geometry();
-#else
- QDesktopWidget* desktop =
- static_cast<QApplication*>(QApplication::instance())->desktop();
- int screenNum = desktop->screenNumber(this); // Screen holding most of this
- QRect screenGeo = desktop->screenGeometry(screenNum);
-#endif // QT_VERSION
QRect myGeo = geometry();
bool moved = false;
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.h b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.h
index 4901fd6427..d8c5493035 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.h
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.h
@@ -20,13 +20,7 @@
class NativeEventFilter : public QAbstractNativeEventFilter {
public:
-#if QT_VERSION >= 0x060000
bool nativeEventFilter(const QByteArray& eventType,
void* message,
qintptr*) override;
-#else
- bool nativeEventFilter(const QByteArray& eventType,
- void* message,
- long*) override;
-#endif // QT_VERSION
};
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.mm b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.mm
index 0245b5ff08..accc5ed319 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.mm
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mac-native-event-filter.mm
@@ -23,15 +23,9 @@
#import <AppKit/AppKit.h>
-#if QT_VERSION >= 0x060000
bool NativeEventFilter::nativeEventFilter(const QByteArray& eventType,
void* message,
qintptr*) {
-#else
-bool NativeEventFilter::nativeEventFilter(const QByteArray& eventType,
- void* message,
- long*) {
-#endif // QT_VERSION
if (eventType.compare("mac_generic_NSEvent") == 0) {
NSEvent* event = static_cast<NSEvent*>(message);
if ([event type] == NSKeyDown) {
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.cpp
index f6329287ea..f90d397f86 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.cpp
@@ -13,7 +13,6 @@
#include "android/skin/qt/emulator-qt-window.h"
-#if QT_VERSION >= 0x060000
void MouseEventHandler::handleMouseEvent(SkinEventType type,
SkinMouseButtonType button,
const QPointF& posF,
@@ -22,14 +21,6 @@ void MouseEventHandler::handleMouseEvent(SkinEventType type,
uint32_t displayId) {
QPoint pos((int) posF.x(), (int) posF.y());
QPoint gPos((int) gPosF.x(), (int) gPosF.y());
-#else
-void MouseEventHandler::handleMouseEvent(SkinEventType type,
- SkinMouseButtonType button,
- const QPoint& pos,
- const QPoint& gPos,
- bool skipSync,
- uint32_t displayId) {
-#endif // QT_VERSION
SkinEvent skin_event = createSkinEvent(type);
skin_event.u.mouse.button = button;
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.h b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.h
index cbf2b916b1..ae60e67b9b 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.h
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/mouse-event-handler.h
@@ -21,22 +21,12 @@ public:
MouseEventHandler() :
mPrevMousePosition(0, 0),
mMouseTouchState(TouchState::NOT_TOUCHING) {}
-#if QT_VERSION >= 0x060000
void handleMouseEvent(SkinEventType type,
SkinMouseButtonType button,
const QPointF& pos,
const QPointF& gPos,
bool skipSync,
uint32_t displayId);
-#else
- void handleMouseEvent(SkinEventType type,
- SkinMouseButtonType button,
- const QPoint& pos,
- const QPoint& gPos,
- bool skipSync,
- uint32_t displayId);
-#endif // QT_VERSION
-
SkinEventType translateMouseEventType(SkinEventType type,
Qt::MouseButton button,
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/native-event-filter-factory.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/native-event-filter-factory.cpp
index 64c8d6beab..e47a3dc7d0 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/native-event-filter-factory.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/native-event-filter-factory.cpp
@@ -90,7 +90,7 @@ public:
bool nativeEventFilter(const QByteArray& eventType,
void* message,
- long*) override {
+ qintptr*) override {
if (eventType.compare("xcb_generic_event_t") == 0) {
xcb_generic_event_t* ev =
static_cast<xcb_generic_event_t*>(message);
@@ -134,7 +134,7 @@ class NativeEventFilter : public QAbstractNativeEventFilter {
public:
bool nativeEventFilter(const QByteArray& eventType,
void* message,
- long*) override {
+ qintptr*) override {
if (eventType.compare("windows_generic_MSG") == 0) {
MSG* ev = static_cast<MSG*>(message);
if (ev->message == WM_KEYDOWN || ev->message == WM_SYSKEYDOWN) {
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/tool-window.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/tool-window.cpp
index 0e081321ca..a8d9c3c695 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/tool-window.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/tool-window.cpp
@@ -48,6 +48,7 @@
#include <QVariant>
#include <QVector>
#include <QWidget>
+#include <QWindow>
#include <QtCore>
#include "aemu/base/logging/Log.h"
@@ -93,18 +94,6 @@
#include "studio_stats.pb.h"
#include "ui_tools.h"
-#if QT_VERSION >= 0x060000
-#include <QWindow>
-#else
-#include <QDesktopWidget>
-#endif // QT_VERSION
-
-#if QT_VERSION >= 0x060000
-#else
-template <typename T>
-class QVector;
-#endif // QT_VERSION
-
namespace {
void ChangeIcon(QPushButton* button, const char* icon, const char* tip) {
@@ -1107,13 +1096,8 @@ bool ToolWindow::handleQtKeyEvent(const QKeyEvent& event, QtKeyEventSource sourc
// We don't care about the keypad modifier for anything, and it gets added
// to the arrow keys of OSX by default, so remove it.
-#if QT_VERSION >= 0x060000
QKeySequence event_key_sequence(event.key() |
(event.modifiers() & ~Qt::KeypadModifier));
-#else
- QKeySequence event_key_sequence(event.key() +
- (event.modifiers() & ~Qt::KeypadModifier));
-#endif // QT_VERSION
bool down = event.type() == QEvent::KeyPress;
bool h = mShortcutKeyStore.handle(event_key_sequence,
[this, down](QtUICommand cmd) {
@@ -1666,7 +1650,6 @@ void ToolWindow::paintEvent(QPaintEvent*) {
p.setPen(pen);
double dpr = 1.0;
-#if QT_VERSION >= 0x060000
auto newScreen = window()->windowHandle()
? window()->windowHandle()->screen()
: nullptr;
@@ -1674,19 +1657,6 @@ void ToolWindow::paintEvent(QPaintEvent*) {
newScreen = qGuiApp->primaryScreen();
}
dpr = newScreen->devicePixelRatio();
-#else
- int primary_screen_idx = qApp->desktop()->screenNumber(this);
- if (primary_screen_idx < 0) {
- primary_screen_idx = qApp->desktop()->primaryScreen();
- }
- const auto screens = QApplication::screens();
- if (primary_screen_idx >= 0 && primary_screen_idx < screens.size()) {
- const QScreen* const primary_screen = screens.at(primary_screen_idx);
- if (primary_screen) {
- dpr = primary_screen->devicePixelRatio();
- }
- }
-#endif // QT_VERSION
if (dpr > 1.0) {
// Normally you'd draw the border with a (0, 0, w-1, h-1) rectangle.
@@ -1860,10 +1830,8 @@ void ToolWindow::remaskButtons() {
if (!icon_name.isNull()) {
double dpr = 1.0;
#ifndef Q_OS_MAC
- int screen_num = QApplication::desktop()->screenNumber(this);
- if (screen_num >= 0 &&
- screen_num < QApplication::screens().size()) {
- QScreen* scr = QApplication::screens().at(screen_num);
+ QScreen* scr = this->screen();
+ if (scr) {
dpr = scr->logicalDotsPerInch() / SizeTweaker::BaselineDpi;
}
#endif
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/virtualscene-control-window.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/virtualscene-control-window.cpp
index ad4f48c722..c68f6770c4 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/virtualscene-control-window.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/virtualscene-control-window.cpp
@@ -22,11 +22,7 @@
#include <QColor>
#include <QCoreApplication>
#include <QCursor>
-#if QT_VERSION >= 0x060000
#include <QWindow> // for QWindow
-#else
-#include <QDesktopWidget> // for QDesktopWidget
-#endif // QT_VERSION
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
@@ -427,7 +423,6 @@ void VirtualSceneControlWindow::keyReleaseEvent(QKeyEvent* event) {
void VirtualSceneControlWindow::paintEvent(QPaintEvent*) {
double dpr = 1.0;
-#if QT_VERSION >= 0x060000
auto newScreen = window()->windowHandle()
? window()->windowHandle()->screen()
: nullptr;
@@ -435,19 +430,6 @@ void VirtualSceneControlWindow::paintEvent(QPaintEvent*) {
newScreen = qGuiApp->primaryScreen();
}
dpr = newScreen->devicePixelRatio();
-#else
- int primary_screen_idx = qApp->desktop()->screenNumber(this);
- if (primary_screen_idx < 0) {
- primary_screen_idx = qApp->desktop()->primaryScreen();
- }
- const auto screens = QApplication::screens();
- if (primary_screen_idx >= 0 && primary_screen_idx < screens.size()) {
- const QScreen* const primary_screen = screens.at(primary_screen_idx);
- if (primary_screen) {
- dpr = primary_screen->devicePixelRatio();
- }
- }
-#endif // QT_VERSION
QRect rect(0, 0, width() - 1, height() - 1);
diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/winsys-qt.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/winsys-qt.cpp
index b8cb1c4d0a..a794932411 100644
--- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/winsys-qt.cpp
+++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/winsys-qt.cpp
@@ -780,11 +780,7 @@ extern void skin_winsys_start(bool no_window) {
});
quitMenu->addAction(quitAction);
mainBar->addMenu(quitMenu);
-#if QT_VERSION >= 0x060000
quitMenu->setAsDockMenu();
-#else
- qt_mac_set_dock_menu(quitMenu);
-#endif // QT_VERSION
// Hide icon on macOS dock in embedded emulator mode.
if (getConsoleAgents()
->settings->android_cmdLineOptions()
diff --git a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/angle-input-widget.cpp b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/angle-input-widget.cpp
index 5dbf4553e2..dca4a32bab 100644
--- a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/angle-input-widget.cpp
+++ b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/angle-input-widget.cpp
@@ -17,11 +17,6 @@
#include <qstring.h> // for operator+, QString (ptr only)
#include <qvalidator.h> // for QDoubleValidator::StandardNotation, QValidat...
#include <stdlib.h> // for abs
-#if QT_VERSION >= 0x060000
-#else
-#include <QChar> // for QChar
-#include <QCharRef> // for QCharRef
-#endif
#include <QKeyEvent> // for QKeyEvent
#include <QLocale> // for QLocale
#include <QValidator> // for QValidator
diff --git a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/size-tweaker.cpp b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/size-tweaker.cpp
index 3a70aa6f0c..5412b55380 100644
--- a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/size-tweaker.cpp
+++ b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/size-tweaker.cpp
@@ -6,10 +6,6 @@
#include <QApplication> // for QApplication
#include <QCheckBox> // for QCheckBox
#include <QComboBox> // for QComboBox
-#if QT_VERSION >= 0x060000
-#else
-#include <QDesktopWidget> // for QDesktopWidget
-#endif // QT_VERSION
#include <QEvent> // for QEvent
#include <QRadioButton> // for QRadioButton
#include <QScreen> // for QScreen
@@ -40,19 +36,8 @@ QVector2D SizeTweaker::scaleFactor(QWidget* widget) {
if (!widget) {
return {1, 1};
}
- int screen_number = QApplication::desktop()->screenNumber(widget);
- // sometimes, screen_number may be -1 if widget is not yet visible
- // this fixes tiny toolbar on 4k displays
- if (screen_number < 0)
- screen_number = 0;
-
- // QDesktopWidget::screenNumber returns -1 if the widget is not on a screen.
- // The returned index *may* be out of bounds if the screen change event was
- // triggered as a result of turning off one of the screens.
- if (screen_number < 0 || screen_number >= QApplication::screens().size()) {
- return {1, 1};
- }
- QScreen* screen = QApplication::screens().at(screen_number);
+
+ QScreen* screen = widget->screen();
if (!screen) {
return {1, 1};
}
diff --git a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/wavefront-obj-parser.cpp b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/wavefront-obj-parser.cpp
index 0199d52c6c..135fc7fa7f 100644
--- a/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/wavefront-obj-parser.cpp
+++ b/android/android-ui/modules/aemu-ui-widgets/src/android/skin/qt/wavefront-obj-parser.cpp
@@ -14,11 +14,6 @@
#include <qloggingcategory.h> // for qCWarning
#include <qstring.h> // for QString::SkipEmptyParts
#include <qtextstream.h> // for QTextStream::Ok, QText...
-#if QT_VERSION >= 0x060000
-#else
-#include <QChar> // for QChar
-#include <QCharRef> // for QCharRef
-#endif
#include <QList> // for QList
#include <QString> // for QString
#include <QStringList> // for QStringList
@@ -97,11 +92,7 @@ bool parseWavefrontOBJ(QTextStream& stream,
size_t vp, vt, vn;
for (size_t i = 0; i < 3; i++) {
stream >> v;
-#if QT_VERSION >= 0x060000
QStringList components = v.split('/', Qt::SkipEmptyParts);
-#else
- QStringList components = v.split('/', QString::SkipEmptyParts);
-#endif // QT_VERSION
if (components.size() != 3) {
dwarning("OBJ parser: invalid face specification");
return false;
diff --git a/android/build/cmake/config/emu-qt5-config.cmake b/android/build/cmake/config/emu-qt5-config.cmake
index 2222d55abc..278d363d11 100644
--- a/android/build/cmake/config/emu-qt5-config.cmake
+++ b/android/build/cmake/config/emu-qt5-config.cmake
@@ -9,21 +9,11 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
-# TODO(joshuaduong): Only mac-aarch64 is using Qt6 at the moment. Remove once
-# all platforms use the same version of Qt.
-if(INCLUDE_QT5_CFG_CMAKE)
- return()
-endif()
-
-set(INCLUDE_QT5_CFG_CMAKE 1)
-
-if(DARWIN_AARCH64)
- set(QT_VERSION_MAJOR 6)
- set(QT_VERSION_MINOR 2)
-else()
- set(QT_VERSION_MAJOR 5)
- set(QT_VERSION_MINOR 12)
-endif()
+set(QT_VERSION_MAJOR 6)
+set(QT_VERSION_MINOR 5)
+set(QT_VERSION_PATCH 3)
+set(QT_LIB_VERSION ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})
+set(QT_LIBINFIX "AndroidEmu")
# TODO: Remove this once we have -no-window working with absolutely no Qt
# dependencies
@@ -43,6 +33,13 @@ endif()
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(CMAKE_AUTORCC TRUE)
+if(LINUX)
+ # rcc defaults to using zstd compression, but for an unknown reason, emulator is crashing with
+ # this compression algorithm.
+ message(STATUS "CMAKE_AUTORCC_OPTIONS before = [${CMAKE_AUTORCC_OPTIONS}]")
+ set(CMAKE_AUTORCC_OPTIONS "--compress-algo;zlib")
+ message(STATUS "CMAKE_AUTORCC_OPTIONS after = [${CMAKE_AUTORCC_OPTIONS}]")
+endif()
# # Use the host compatible moc, rcc and uic if(HOST_DARWIN_X86_64 AND
# DARWIN_AARCH64) # We have Qt6 compiler tools specifically for cross-compiling
@@ -69,42 +66,18 @@ function(add_qt_target target)
set(EXE_SUFFIX ".exe")
endif()
- set(QT_EXE_DIR "bin")
-
- if(QT_VERSION_MAJOR EQUAL 6)
-
- # The executable directory has changed from bin --> libexec in darwin
- # aarch64
- if(DARWIN_AARCH64)
- set(QT_EXE_DIR "libexec")
- endif()
-
- if(HOST_DARWIN_X86_64)
- get_filename_component(
- HOST_PREBUILT_ROOT
- "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/qt/${ANDROID_HOST_TAG}/qt6"
- ABSOLUTE)
- else()
- get_filename_component(
- HOST_PREBUILT_ROOT
- "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/qt/${ANDROID_HOST_TAG}"
- ABSOLUTE)
- endif()
+ # The executable directory has changed from bin --> libexec in Qt6. Windows is still bin.
+ if (MSVC)
+ set(QT_EXE_DIR "bin")
else()
- if(HOST_DARWIN_AARCH64 AND DARWIN_X86_64)
- message(STATUS "We will use rosetta to run ${target} in X86 mode.")
- get_filename_component(
- HOST_PREBUILT_ROOT
- "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/qt/darwin-x86_64"
- ABSOLUTE)
- else()
- get_filename_component(
- HOST_PREBUILT_ROOT
- "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/qt/${ANDROID_HOST_TAG}"
- ABSOLUTE)
- endif()
+ set(QT_EXE_DIR "libexec")
endif()
+ get_filename_component(
+ HOST_PREBUILT_ROOT
+ "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/qt/${ANDROID_HOST_TAG}"
+ ABSOLUTE)
+
set(QT_EXECUTABLE ${HOST_PREBUILT_ROOT}/${QT_EXE_DIR}/${target}${EXE_SUFFIX})
if(NOT EXISTS ${QT_EXECUTABLE})
message(
@@ -137,10 +110,10 @@ function(add_qt_shared_lib target link target_deps)
android_license(
TARGET Qt${QT_VERSION_MAJOR}::${target}
LIBNAME "Qt ${target}"
- URL "https://android.googlesource.com/platform/prebuilts/android-emulator-build/archive/+/refs/heads/emu-master-dev/qt-everywhere-src-5.12.1.tar.xz"
+ URL "https://android.googlesource.com/platform/external/qt5/+/refs/heads/upstream-6.5.3"
SPDX "LGPL-3.0-only"
LICENSE
- "https://doc.qt.io/qt-5.12/qt${target}-index.html#licenses-and-attributions"
+ "https://doc.qt.io/qt-6.5/qt${target}-index.html#licenses-and-attributions"
LOCAL "${ANDROID_QEMU2_TOP_DIR}/LICENSES/LICENSE.LGPLv3")
# Update the dependencies
foreach(dep ${target_deps})
@@ -152,97 +125,67 @@ endfunction()
set(QT5_INCLUDE_DIRS
${PREBUILT_ROOT}/include
- ${PREBUILT_ROOT}/include.system
- ${PREBUILT_ROOT}/include.system/QtCore
${PREBUILT_ROOT}/include/QtCore
${PREBUILT_ROOT}/include/QtGui
${PREBUILT_ROOT}/include/QtSvg
- ${PREBUILT_ROOT}/include/QtWidgets
- ${PREBUILT_ROOT}/include/QtWebChannel
- ${PREBUILT_ROOT}/include/QtWebEngineWidgets
- ${PREBUILT_ROOT}/include/QtWebSockets)
+ ${PREBUILT_ROOT}/include/QtWidgets)
+if(QTWEBENGINE)
+ list(
+ APPEND
+ QT5_INCLUDE_DIRS
+ ${PREBUILT_ROOT}/include/QtWebChannel
+ ${PREBUILT_ROOT}/include/QtWebEngineWidgets
+ ${PREBUILT_ROOT}/include/QtWebSockets
+ )
+endif()
set(QT5_INCLUDE_DIR ${QT5_INCLUDE_DIRS})
set(QT5_LINK_PATH "-L${PREBUILT_ROOT}/lib")
set(QT5_DEFINITIONS "-DQT5_STATICLIB")
set(QT5_FOUND TRUE)
if(DARWIN_X86_64 OR DARWIN_AARCH64)
- if(DARWIN_AARCH64 AND QTWEBENGINE)
- set(QT_MAJOR_VERSION 6)
- set(QT_LIB_VERSION 6.2.1)
- else()
- set(QT_MAJOR_VERSION 5)
- set(QT_LIB_VERSION 5.12.1)
- endif()
set(QT5_LIBRARIES -L${PREBUILT_ROOT}/lib ${QT5_LIBRARIES})
set(QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}CoreAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}CoreAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}WidgetsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}WidgetsAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}GuiAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}GuiAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}SvgAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}SvgAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}PrintSupportAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}PrintSupportAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}NetworkAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}NetworkAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}DBusAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}DBusAndroidEmu.${QT_LIB_VERSION}.dylib
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}DBus${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}DBus${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib
)
- if(QT_MAJOR_VERSION EQUAL 5)
- set(QT5_SHARED_DEPENDENCIES
- ${QT5_SHARED_DEPENDENCIES};
- ${PREBUILT_ROOT}/plugins/bearer/libqgenericbearer.dylib>lib64/qt/plugins/bearer/libqgenericbearer.dylib;
- ${PREBUILT_ROOT}/plugins/platforms/libqcocoa.dylib>lib64/qt/plugins/platforms/libqcocoa.dylib;
- ${PREBUILT_ROOT}/plugins/styles/libqmacstyle.dylib>lib64/qt/plugins/styles/libqmacstyle.dylib;
- ${PREBUILT_ROOT}/plugins/iconengines/libqsvgicon.dylib>lib64/qt/plugins/iconengines/libqsvgicon.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqgif.dylib>lib64/qt/plugins/imageformats/libqgif.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqicns.dylib>lib64/qt/plugins/imageformats/libqicns.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqico.dylib>lib64/qt/plugins/imageformats/libqico.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqjpeg.dylib>lib64/qt/plugins/imageformats/libqjpeg.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqmacheif.dylib>lib64/qt/plugins/imageformats/libqmacheif.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqmacjp2.dylib>lib64/qt/plugins/imageformats/libqmacjp2.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqsvg.dylib>lib64/qt/plugins/imageformats/libqsvg.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtga.dylib>lib64/qt/plugins/imageformats/libqtga.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtiff.dylib>lib64/qt/plugins/imageformats/libqtiff.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwbmp.dylib>lib64/qt/plugins/imageformats/libqwbmp.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwebp.dylib>lib64/qt/plugins/imageformats/libqwebp.dylib
- )
- endif()
-
- if(QT_MAJOR_VERSION EQUAL 6)
- set(QT_LIBINFIX "AndroidEmu")
- set(QT5_SHARED_DEPENDENCIES
- ${QT5_SHARED_DEPENDENCIES};
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}SvgWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}SvgWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/plugins/platforms/libqcocoa${QT_LIBINFIX}.dylib>lib64/qt/plugins/platforms/libqcocoa${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/styles/libqmacstyle${QT_LIBINFIX}.dylib>lib64/qt/plugins/styles/libqmacstyle${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.dylib>lib64/qt/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqgif${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqgif${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqicns${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqicns${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqico${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqico${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqjpeg${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqjpeg${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqmacheif${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqmacheif${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqmacjp2${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqmacjp2${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqsvg${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqsvg${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtga${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqtga${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtiff${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqtiff${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwbmp${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqwbmp${QT_LIBINFIX}.dylib;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwebp${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqwebp${QT_LIBINFIX}.dylib
- )
- endif()
+ set(QT5_SHARED_DEPENDENCIES
+ ${QT5_SHARED_DEPENDENCIES};
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/plugins/platforms/libqcocoa${QT_LIBINFIX}.dylib>lib64/qt/plugins/platforms/libqcocoa${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/styles/libqmacstyle${QT_LIBINFIX}.dylib>lib64/qt/plugins/styles/libqmacstyle${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.dylib>lib64/qt/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqgif${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqgif${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqicns${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqicns${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqico${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqico${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqjpeg${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqjpeg${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqmacheif${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqmacheif${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqmacjp2${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqmacjp2${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqsvg${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqsvg${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqtga${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqtga${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqtiff${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqtiff${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqwbmp${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqwbmp${QT_LIBINFIX}.dylib;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqwebp${QT_LIBINFIX}.dylib>lib64/qt/plugins/imageformats/libqwebp${QT_LIBINFIX}.dylib
+ )
- add_qt_shared_lib(Core "-lQt${QT_MAJOR_VERSION}CoreAndroidEmu" "")
- add_qt_shared_lib(Gui "-lQt${QT_MAJOR_VERSION}GuiAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
- add_qt_shared_lib(Widgets "-lQt${QT_MAJOR_VERSION}WidgetsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Gui")
- add_qt_shared_lib(Svg "-lQt${QT_MAJOR_VERSION}SvgAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Widgets")
- if(QT_MAJOR_VERSION EQUAL 6)
- add_qt_shared_lib(SvgWidgets "-lQt${QT_MAJOR_VERSION}SvgWidgetsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Widgets")
- endif()
+ add_qt_shared_lib(Core "-lQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}" "")
+ add_qt_shared_lib(Gui "-lQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(Widgets "-lQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Gui")
+ add_qt_shared_lib(Svg "-lQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Widgets")
+ add_qt_shared_lib(SvgWidgets "-lQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Widgets")
if(QTWEBENGINE)
- add_qt_shared_lib(Network "-lQt${QT_MAJOR_VERSION}NetworkAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
+ add_qt_shared_lib(Network "-lQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
list(
APPEND
@@ -264,55 +207,33 @@ if(DARWIN_X86_64 OR DARWIN_AARCH64)
# BUG: 143948083 WebEngine expects the locales directory to not be under
# translations
${PREBUILT_ROOT}/translations/qtwebengine_locales/*.pak>>lib64/qt/libexec/qtwebengine_locales
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}WebChannelAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}WebChannelAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}WebEngineCoreAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}WebEngineCoreAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}WebEngineWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}WebEngineWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}WebSocketsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}WebSocketsAndroidEmu.${QT_LIB_VERSION}.dylib
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib
)
- if(QT_MAJOR_VERSION EQUAL 5)
- add_qt_shared_lib(Qml "-lQt${QT_MAJOR_VERSION}QmlAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Network")
- add_qt_shared_lib(
- WebChannel "-lQt${QT_MAJOR_VERSION}WebChannelAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Qml")
- add_qt_shared_lib(
- WebSockets "-lQt${QT_MAJOR_VERSION}WebSocketsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Qml")
- add_qt_shared_lib(
- WebEngineWidgets "-lQt${QT_MAJOR_VERSION}WebEngineWidgetsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Qml")
- list(
- APPEND
- QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QmlAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QmlAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QuickAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QuickAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QuickWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QuickWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib;
- )
- elseif(QT_MAJOR_VERSION EQUAL 6)
- list(
- APPEND
- QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QmlAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QmlAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QuickAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QuickAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QuickWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QuickWidgetsAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}PositioningAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}PositioningAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}OpenGLAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}OpenGLAndroidEmu.${QT_LIB_VERSION}.dylib;
- ${PREBUILT_ROOT}/lib/libQt${QT_MAJOR_VERSION}QmlModelsAndroidEmu.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_MAJOR_VERSION}QmlModelsAndroidEmu.${QT_LIB_VERSION}.dylib;
- )
- # Qt6 build does not contain Qml library
- add_qt_shared_lib(
- WebChannel "-lQt${QT_MAJOR_VERSION}WebChannelAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
- add_qt_shared_lib(
- WebSockets "-lQt${QT_MAJOR_VERSION}WebSocketsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
- add_qt_shared_lib(
- WebEngineWidgets "-lQt${QT_MAJOR_VERSION}WebEngineWidgetsAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
- add_qt_shared_lib(
- WebEngineCore "-lQt${QT_MAJOR_VERSION}WebEngineCoreAndroidEmu"
- "Qt${QT_MAJOR_VERSION}::Core")
- endif()
+ list(
+ APPEND
+ QT5_SHARED_DEPENDENCIES
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib>lib64/qt/lib/libQt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.${QT_LIB_VERSION}.dylib;
+ )
+ # Qt6 build does not contain Qml library
+ add_qt_shared_lib(
+ WebChannel "-lQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(
+ WebSockets "-lQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(
+ WebEngineWidgets "-lQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(
+ WebEngineCore "-lQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Core")
endif()
# Note: this will only set the property for install targets, not during build.
@@ -321,10 +242,10 @@ if(DARWIN_X86_64 OR DARWIN_AARCH64)
)
set(QT5_LIBRARIES
${QT5_LIBRARIES}
- -lQt${QT_MAJOR_VERSION}NetworkAndroidEmu
- -lQt${QT_MAJOR_VERSION}WebChannelAndroidEmu
- -lQt${QT_MAJOR_VERSION}WebEngineWidgetsAndroidEmu
- -lQt${QT_MAJOR_VERSION}WebSockets)
+ -lQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}
+ -lQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}
+ -lQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}
+ -lQt${QT_VERSION_MAJOR}WebSockets)
elseif(WINDOWS_MSVC_X86_64)
# On Windows, Qt provides us with a qtmain.lib which helps us write a cross-
# platform main() function (because WinMain() is the entry point to a GUI
@@ -341,57 +262,60 @@ elseif(WINDOWS_MSVC_X86_64)
set(QT5_LINK_PATH "")
# Obtained by running ListDlls.exe from sysinternals tool
set(QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/bin/Qt5SvgAndroidEmu.dll>lib64/qt/lib/Qt5SvgAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5CoreAndroidEmu.dll>lib64/qt/lib/Qt5CoreAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5GuiAndroidEmu.dll>lib64/qt/lib/Qt5GuiAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5WidgetsAndroidEmu.dll>lib64/qt/lib/Qt5WidgetsAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5NetworkAndroidEmu.dll>lib64/qt/lib/Qt5NetworkAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5PrintSupportAndroidEmu.dll>lib64/qt/lib/Qt5PrintSupportAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5QmlAndroidEmu.dll>lib64/qt/lib/Qt5QmlAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5PositioningAndroidEmu.dll>lib64/qt/lib/Qt5PositioningAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5QuickAndroidEmu.dll>lib64/qt/lib/Qt5QuickAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5QuickWidgetsAndroidEmu.dll>lib64/qt/lib/Qt5QuickWidgetsAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5WebChannelAndroidEmu.dll>lib64/qt/lib/Qt5WebChannelAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5WebEngineCoreAndroidEmu.dll>lib64/qt/lib/Qt5WebEngineCoreAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5WebEngineWidgetsAndroidEmu.dll>lib64/qt/lib/Qt5WebEngineWidgetsAndroidEmu.dll;
- ${PREBUILT_ROOT}/bin/Qt5WebSocketsAndroidEmu.dll>lib64/qt/lib/Qt5WebSocketsAndroidEmu.dll;
- ${PREBUILT_ROOT}/plugins/bearer/qgenericbearer.dll>lib64/qt/plugins/bearer/qgenericbearer.dll;
- ${PREBUILT_ROOT}/plugins/platforms/qwindows.dll>lib64/qt/plugins/platforms/qwindows.dll;
- ${PREBUILT_ROOT}/plugins/iconengines/qsvgicon.dll>lib64/qt/plugins/iconengines/qsvgicon.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qgif.dll>lib64/qt/plugins/imageformats/qgif.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qicns.dll>lib64/qt/plugins/imageformats/qicns.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qico.dll>lib64/qt/plugins/imageformats/qico.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qjpeg.dll>lib64/qt/plugins/imageformats/qjpeg.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qsvg.dll>lib64/qt/plugins/imageformats/qsvg.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qtga.dll>lib64/qt/plugins/imageformats/qtga.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qtiff.dll>lib64/qt/plugins/imageformats/qtiff.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qwbmp.dll>lib64/qt/plugins/imageformats/qwbmp.dll;
- ${PREBUILT_ROOT}/plugins/imageformats/qwebp.dll>lib64/qt/plugins/imageformats/qwebp.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}OpenGL${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}OpenGL${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/bin/Qt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.dll>lib64/qt/lib/Qt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/platforms/qwindows${QT_LIBINFIX}.dll>lib64/qt/plugins/platforms/qwindows${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/iconengines/qsvgicon${QT_LIBINFIX}.dll>lib64/qt/plugins/iconengines/qsvgicon${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qgif${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qgif${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qicns${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qicns${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qico${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qico${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qjpeg${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qjpeg${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qsvg${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qsvg${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qtga${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qtga${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qtiff${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qtiff${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qwbmp${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qwbmp${QT_LIBINFIX}.dll;
+ ${PREBUILT_ROOT}/plugins/imageformats/qwebp${QT_LIBINFIX}.dll>lib64/qt/plugins/imageformats/qwebp${QT_LIBINFIX}.dll;
)
- add_qt_shared_lib(Core "${PREBUILT_ROOT}/lib/Qt5CoreAndroidEmu.lib" "")
- add_qt_shared_lib(Gui "${PREBUILT_ROOT}/lib/Qt5GuiAndroidEmu.lib" "Qt5::Core")
- add_qt_shared_lib(Widgets "${PREBUILT_ROOT}/lib/Qt5WidgetsAndroidEmu.lib"
- "Qt5::Gui")
- add_qt_shared_lib(Svg "${PREBUILT_ROOT}/lib/Qt5SvgAndroidEmu.lib"
- "Qt5::Widgets")
-
- add_qt_shared_lib(Network "${PREBUILT_ROOT}/lib/Qt5NetworkAndroidEmu.lib"
- "Qt5::Core")
- add_qt_shared_lib(Qml "${PREBUILT_ROOT}/lib/Qt5QmlAndroidEmu.lib"
- "Qt5::Network")
+ add_qt_shared_lib(Core "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.lib" "")
+ add_qt_shared_lib(Gui "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.lib" "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(Widgets "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Gui")
+ add_qt_shared_lib(Svg "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Widgets")
+ add_qt_shared_lib(SvgWidgets "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Widgets")
+
+ add_qt_shared_lib(Network "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(Qml "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Network")
add_qt_shared_lib(
- WebEngineCore "${PREBUILT_ROOT}/lib/Qt5WebEngineCoreAndroidEmu.lib"
- "Qt5::Network")
+ WebEngineCore "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::Network")
add_qt_shared_lib(
- WebChannel "${PREBUILT_ROOT}/lib/Qt5WebChannelAndroidEmu.lib"
- "Qt5::WebEngineCore;Qt5::Qml")
+ WebChannel "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::WebEngineCore;Qt${QT_VERSION_MAJOR}::Qml")
add_qt_shared_lib(
- WebSockets "${PREBUILT_ROOT}/lib/Qt5WebSocketsAndroidEmu.lib"
- "Qt5::WebEngineCore;Qt5::Qml")
+ WebSockets "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::WebEngineCore;Qt${QT_VERSION_MAJOR}::Qml")
add_qt_shared_lib(
- WebEngineWidgets "${PREBUILT_ROOT}/lib/Qt5WebEngineWidgetsAndroidEmu.lib"
- "Qt5::WebEngineCore;Qt5::Qml")
+ WebEngineWidgets "${PREBUILT_ROOT}/lib/Qt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.lib"
+ "Qt${QT_VERSION_MAJOR}::WebEngineCore;Qt${QT_VERSION_MAJOR}::Qml")
list(
APPEND
@@ -418,55 +342,82 @@ elseif(LINUX)
set(QT5_LIBRARIES -L${PREBUILT_ROOT}/lib ${QT5_LIBRARIES})
# LD_DEBUG=libs ./emulator @P_64 2>&1 | grep qt | grep init
set(QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/lib/libQt5CoreAndroidEmu.so.5>lib64/qt/lib/libQt5CoreAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5GuiAndroidEmu.so.5>lib64/qt/lib/libQt5GuiAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5WidgetsAndroidEmu.so.5>lib64/qt/lib/libQt5WidgetsAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5SvgAndroidEmu.so.5>lib64/qt/lib/libQt5SvgAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5PrintSupportAndroidEmu.so.5>lib64/qt/lib/libQt5PrintSupportAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5DBusAndroidEmu.so.5>lib64/qt/lib/libQt5DBusAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5NetworkAndroidEmu.so.5>lib64/qt/lib/libQt5NetworkAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5XcbQpaAndroidEmu.so.5>lib64/qt/lib/libQt5XcbQpaAndroidEmu.so.5;
- ${PREBUILT_ROOT}/plugins/bearer/libqgenericbearer.so>lib64/qt/plugins/bearer/libqgenericbearer.so;
- ${PREBUILT_ROOT}/plugins/bearer/libqconnmanbearer.so>lib64/qt/plugins/bearer/libqconnmanbearer.so;
- ${PREBUILT_ROOT}/plugins/bearer/libqnmbearer.so>lib64/qt/plugins/bearer/libqnmbearer.so;
- ${PREBUILT_ROOT}/plugins/platforms/libqxcb.so>lib64/qt/plugins/platforms/libqxcb.so;
- ${PREBUILT_ROOT}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so>lib64/qt/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so;
- ${PREBUILT_ROOT}/plugins/iconengines/libqsvgicon.so>lib64/qt/plugins/iconengines/libqsvgicon.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwebp.so>lib64/qt/plugins/imageformats/libqwebp.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqgif.so>lib64/qt/plugins/imageformats/libqgif.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqicns.so>lib64/qt/plugins/imageformats/libqicns.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqico.so>lib64/qt/plugins/imageformats/libqico.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqjpeg.so>lib64/qt/plugins/imageformats/libqjpeg.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqsvg.so>lib64/qt/plugins/imageformats/libqsvg.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtga.so>lib64/qt/plugins/imageformats/libqtga.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqtiff.so>lib64/qt/plugins/imageformats/libqtiff.so;
- ${PREBUILT_ROOT}/plugins/imageformats/libqwbmp.so>lib64/qt/plugins/imageformats/libqwbmp.so
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}DBus${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}DBus${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.so>lib64/qt/plugins/iconengines/libqsvgicon${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqwebp${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqwebp${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqgif${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqgif${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqicns${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqicns${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqico${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqico${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqjpeg${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqjpeg${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqsvg${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqsvg${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqtga${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqtga${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqtiff${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqtiff${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/imageformats/libqwbmp${QT_LIBINFIX}.so>lib64/qt/plugins/imageformats/libqwbmp${QT_LIBINFIX}.so
)
+
+ if(NOT LINUX_AARCH64)
+ list(APPEND QT5_SHARED_DEPENDENCIES
+ ${PREBUILT_ROOT}/plugins/platforms/libqxcb${QT_LIBINFIX}.so>lib64/qt/plugins/platforms/libqxcb${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforms/libqlinuxfb${QT_LIBINFIX}.so>lib64/qt/plugins/platforms/libqlinuxfb${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforms/libqminimal${QT_LIBINFIX}.so>lib64/qt/plugins/platforms/libqminimal${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforms/libqoffscreen${QT_LIBINFIX}.so>lib64/qt/plugins/platforms/libqoffscreen${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforms/libqvnc${QT_LIBINFIX}.so>lib64/qt/plugins/platforms/libqvnc${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin${QT_LIBINFIX}.so>lib64/qt/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/plugins/platforminputcontexts/libibusplatforminputcontextplugin${QT_LIBINFIX}.so>lib64/qt/plugins/platforminputcontexts/libibusplatforminputcontextplugin${QT_LIBINFIX}.so;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}XcbQpa${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}XcbQpa${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libfreetype.so.6>lib64/qt/lib/libfreetype.so.6;
+ ${PREBUILT_ROOT}/lib/libxkbcommon.so.0>lib64/qt/lib/libxkbcommon.so.0;
+ ${PREBUILT_ROOT}/lib/libX11-xcb.so.1>lib64/qt/lib/libX11-xcb.so.1;
+ ${PREBUILT_ROOT}/lib/libXau.so.6>lib64/qt/lib/libXau.so.6;
+ ${PREBUILT_ROOT}/lib/libXdmcp.so.6>lib64/qt/lib/libXdmcp.so.6;
+ ${PREBUILT_ROOT}/lib/libxcb-xkb.so.1>lib64/qt/lib/libxcb-xkb.so.1;
+ ${PREBUILT_ROOT}/lib/libxcb-cursor.so.0>lib64/qt/lib/libxcb-cursor.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-icccm.so.4>lib64/qt/lib/libxcb-icccm.so.4;
+ ${PREBUILT_ROOT}/lib/libxcb-image.so.0>lib64/qt/lib/libxcb-image.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-keysyms.so.1>lib64/qt/lib/libxcb-keysyms.so.1;
+ ${PREBUILT_ROOT}/lib/libxcb-randr.so.0>lib64/qt/lib/libxcb-randr.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-render-util.so.0>lib64/qt/lib/libxcb-render-util.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-render.so.0>lib64/qt/lib/libxcb-render.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-shape.so.0>lib64/qt/lib/libxcb-shape.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-shm.so.0>lib64/qt/lib/libxcb-shm.so.0;
+ ${PREBUILT_ROOT}/lib/libxcb-sync.so.1>lib64/qt/lib/libxcb-sync.so.1;
+ ${PREBUILT_ROOT}/lib/libxcb-util.so.1>lib64/qt/lib/libxcb-util.so.1;
+ ${PREBUILT_ROOT}/lib/libxcb-xfixes.so.0>lib64/qt/lib/libxcb-xfixes.so.0;
+ ${PREBUILT_ROOT}/lib/libxkbcommon-x11.so.0>lib64/qt/lib/libxkbcommon-x11.so.0;
+ ${PREBUILT_ROOT}/lib/libfontconfig.so.1>lib64/qt/lib/libfontconfig.so.1)
+ if(QTWEBENGINE)
+ list(APPEND QT5_SHARED_DEPENDENCIES
+ ${PREBUILT_ROOT}/lib/libpcre2-16.so.0>lib64/qt/lib/libpcre2-16.so.0)
+ endif()
+ endif()
+
set(QT5_SHARED_PROPERTIES
"LINK_FLAGS>=-Wl,-rpath,'$ORIGIN/lib64/qt/lib' -Wl,--disable-new-dtags;LINK_FLAGS>=-Wl,-rpath,'$ORIGIN/lib64/qt/lib/plugins' -Wl,--disable-new-dtags"
)
- set(QT5_LIBRARIES ${QT5_LIBRARIES} -lQt5Network)
+ set(QT5_LIBRARIES ${QT5_LIBRARIES} -lQt${QT_VERSION_MAJOR}Network)
- add_qt_shared_lib(Core "-lQt5CoreAndroidEmu" "")
- add_qt_shared_lib(Gui "-lQt5GuiAndroidEmu" "Qt5::Core")
- add_qt_shared_lib(Widgets "-lQt5WidgetsAndroidEmu" "Qt5::Gui")
- add_qt_shared_lib(Svg "-lQt5SvgAndroidEmu" "Qt5::Widgets")
-
- get_filename_component(
- PREBUILT_WEBENGINE_DEPS_ROOT
- "${ANDROID_QEMU2_TOP_DIR}/../../prebuilts/android-emulator-build/common/qtwebengine-deps/${ANDROID_TARGET_TAG}"
- ABSOLUTE)
+ add_qt_shared_lib(Core "-lQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX}" "")
+ add_qt_shared_lib(Gui "-lQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(Widgets "-lQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Gui")
+ add_qt_shared_lib(Svg "-lQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Widgets")
+ add_qt_shared_lib(SvgWidgets "-lQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Widgets")
if(QTWEBENGINE)
- add_qt_shared_lib(Network "-lQt5NetworkAndroidEmu" "Qt5::Core")
- add_qt_shared_lib(Qml "-lQt5QmlAndroidEmu" "Qt5::Network")
- add_qt_shared_lib(WebChannel "-lQt5WebChannelAndroidEmu" "Qt5::Qml")
- add_qt_shared_lib(WebSockets "-lQt5WebSocketsAndroidEmu" "Qt5::Qml")
- add_qt_shared_lib(WebEngineWidgets "-lQt5WebEngineWidgetsAndroidEmu"
- "Qt5::Qml")
-
- list(APPEND QT5_LIBRARIES ${QT5_LIBRARIES} -lQt5WebChannelAndroidEmu
- -lQt5WebEngineWidgetsAndroidEmu -lQt5WebSocketsAndroidEmu)
+ add_qt_shared_lib(Network "-lQt${QT_VERSION_MAJOR}Network${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Core")
+ add_qt_shared_lib(WebEngineCore "-lQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Network")
+ add_qt_shared_lib(WebChannel "-lQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Network")
+ add_qt_shared_lib(WebSockets "-lQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}" "Qt${QT_VERSION_MAJOR}::Network")
+ add_qt_shared_lib(WebEngineWidgets "-lQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}"
+ "Qt${QT_VERSION_MAJOR}::Network")
+
+ list(APPEND QT5_LIBRARIES ${QT5_LIBRARIES} -lQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}
+ -lQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX} -lQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX})
list(
APPEND
QT5_WEBENGINE_SHARED_DEPENDENCIES
@@ -487,13 +438,16 @@ elseif(LINUX)
# BUG: 143948083 WebEngine expects the locales directory to not be under
# translations
${PREBUILT_ROOT}/translations/qtwebengine_locales/*.pak>>lib64/qt/libexec/qtwebengine_locales
- ${PREBUILT_ROOT}/lib/libQt5QmlAndroidEmu.so.5>lib64/qt/lib/libQt5QmlAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5QuickAndroidEmu.so.5>lib64/qt/lib/libQt5QuickAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5QuickWidgetsAndroidEmu.so.5>lib64/qt/lib/libQt5QuickWidgetsAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5WebChannelAndroidEmu.so.5>lib64/qt/lib/libQt5WebChannelAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5WebEngineCoreAndroidEmu.so.5>lib64/qt/lib/libQt5WebEngineCoreAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5WebEngineWidgetsAndroidEmu.so.5>lib64/qt/lib/libQt5WebEngineWidgetsAndroidEmu.so.5;
- ${PREBUILT_ROOT}/lib/libQt5WebSocketsAndroidEmu.so.5>lib64/qt/lib/libQt5WebSocketsAndroidEmu.so.5
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Positioning${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Qml${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}QmlModels${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}Quick${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}QuickWidgets${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebChannel${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebEngineCore${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebEngineWidgets${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.so.6>lib64/qt/lib/libQt${QT_VERSION_MAJOR}WebSockets${QT_LIBINFIX}.so.6;
+ ${PREBUILT_ROOT}/lib/libjpeg.so.8>lib64/qt/lib/libjpeg.so.8
)
list(
@@ -503,38 +457,10 @@ elseif(LINUX)
)
endif()
- if(LINUX_X86_64)
- list(
- APPEND
- QT5_SHARED_DEPENDENCIES
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon.so.0.0.0>lib64/qt/lib/libxkbcommon.so;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon.so.0.0.0>lib64/qt/lib/libxkbcommon.so.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon.so.0.0.0>lib64/qt/lib/libxkbcommon.so.0.0.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libX11-xcb.so.1.0.0>lib64/qt/lib/libX11-xcb.so.1;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libX11-xcb.so.1.0.0>lib64/qt/lib/libX11-xcb.so.1.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libX11-xcb.so.1.0.0>lib64/qt/lib/libX11-xcb.so.1.0.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxcb-xkb.so.1.0.0>lib64/qt/lib/libxcb-xkb.so.1;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxcb-xkb.so.1.0.0>lib64/qt/lib/libxcb-xkb.so.1.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxcb-xkb.so.1.0.0>lib64/qt/lib/libxcb-xkb.so.1.0.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon-x11.so.0.0.0>lib64/qt/lib/libxkbcommon-x11.so;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon-x11.so.0.0.0>lib64/qt/lib/libxkbcommon-x11.so.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libxkbcommon-x11.so.0.0.0>lib64/qt/lib/libxkbcommon-x11.so.0.0.0;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libsoftokn3.so>lib64/qt/lib/libsoftokn3.so;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libsqlite3.so>lib64/qt/lib/libsqlite3.so;
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libfreetype.so.6>lib64/qt/lib/libfreetype.so.6
- ${PREBUILT_WEBENGINE_DEPS_ROOT}/lib/libfontconfig.so.1.12.0>lib64/qt/lib/libfontconfig.so.1
- )
- endif()
-
- if(LINUX_AARCH64)
- list(APPEND QT5_SHARED_DEPENDENCIES
- ${PREBUILT_ROOT}/lib/libfreetype.so.6>lib64/qt/lib/libfreetype.so.6)
- endif()
-
endif()
-set(QT5_LIBRARIES ${QT5_LIBRARIES} -lQt5WidgetsAndroidEmu -lQt5GuiAndroidEmu
- -lQt5CoreAndroidEmu -lQt5SvgAndroidEmu)
+set(QT5_LIBRARIES ${QT5_LIBRARIES} -lQt${QT_VERSION_MAJOR}Widgets${QT_LIBINFIX} -lQt${QT_VERSION_MAJOR}Gui${QT_LIBINFIX}
+ -lQt${QT_VERSION_MAJOR}Core${QT_LIBINFIX} -lQt${QT_VERSION_MAJOR}Svg${QT_LIBINFIX} -lQt${QT_VERSION_MAJOR}SvgWidgets${QT_LIBINFIX})
set(PACKAGE_EXPORT
QT5_INCLUDE_DIR
@@ -545,6 +471,7 @@ set(PACKAGE_EXPORT
CMAKE_AUTOMOC
CMAKE_AUTOUIC
CMAKE_AUTORCC
+ CMAKE_AUTORCC_OPTIONS
QT_MOC_EXECUTABLE
QT_UIC_EXECUTABLE
QT_RCC_EXECUTABLE
@@ -557,16 +484,16 @@ set(PACKAGE_EXPORT
android_license(
TARGET QT5_SHARED_DEPENDENCIES
- LIBNAME "Qt 5"
- URL "https://android.googlesource.com/platform/prebuilts/android-emulator-build/archive/+/refs/heads/emu-master-dev/qt-everywhere-src-5.12.1.tar.xz"
+ LIBNAME "Qt 6"
+ URL "https://android.googlesource.com/platform/external/qt5/+/refs/heads/upstream-6.5.3"
SPDX "LGPL-3.0-only"
- LICENSE "https://doc.qt.io/qt-5/licensing.html"
+ LICENSE "https://doc.qt.io/qt-6.5/licensing.html"
LOCAL "${ANDROID_QEMU2_TOP_DIR}/LICENSES/LICENSE.LGPLv3")
android_license(
TARGET QT5_WEBENGINE_SHARED_DEPENDENCIES
- LIBNAME "Qt 5"
- URL "https://android.googlesource.com/platform/prebuilts/android-emulator-build/archive/+/refs/heads/emu-master-dev/qt-everywhere-src-5.12.1.tar.xz"
+ LIBNAME "Qt 6"
+ URL "https://android.googlesource.com/platform/external/qt5/+/refs/heads/upstream-6.5.3"
SPDX "LGPL-3.0-only"
- LICENSE "https://doc.qt.io/qt-5/licensing.html"
+ LICENSE "https://doc.qt.io/qt-6.5/licensing.html"
LOCAL "${ANDROID_QEMU2_TOP_DIR}/LICENSES/LICENSE.LGPLv3")
diff --git a/android/build/cmake/prebuilts.cmake b/android/build/cmake/prebuilts.cmake
index 425a6da337..e3c5a633e1 100644
--- a/android/build/cmake/prebuilts.cmake
+++ b/android/build/cmake/prebuilts.cmake
@@ -211,7 +211,12 @@ function(internal_android_install_file_force_exec SRC DST_DIR)
android_log(STATUS
"install(PROGRAMS ${SRC} ${REAL_SRC} DESTINATION ${DST_DIR})")
install(PROGRAMS ${SRC} DESTINATION ${DST_DIR})
- android_strip_prebuilt("${DST_DIR}/${FNAME}")
+ if (LINUX_X86_64 AND FNAME MATCHES "QtWebEngineProcess")
+ # b/327414683: Figure out why llvm-objcopy --strip-unneeded corrupts QtWebEngineProcess
+ android_log(STATUS "Skipping stripping of QtWebEngineProcess")
+ else()
+ android_strip_prebuilt("${DST_DIR}/${FNAME}")
+ endif()
android_install_license(${INSTALL_DEPENDENCIES} "${DST_DIR}/${FNAME}")
# Check if we have a symlink, gradle doesn't support symlinks, so we are
# copying it 2x
diff --git a/android/build/python/aemu/prebuilts/qt.py b/android/build/python/aemu/prebuilts/qt.py
index 6cedfb0989..4b098b520f 100644
--- a/android/build/python/aemu/prebuilts/qt.py
+++ b/android/build/python/aemu/prebuilts/qt.py
@@ -430,7 +430,28 @@ def linux_postInstall(installdir, target, is_webengine):
# We also need additional libraries from the sysroot for linux
sysroot_dir = Path("/lib/x86_64-linux-gnu")
- sysroot_libs = ["libpcre2-16.so.0", "libfreetype.so.6"]
+ sysroot_libs = [
+ "libpcre2-16.so.0",
+ "libfreetype.so.6",
+ "libxkbcommon.so.0",
+ "libXau.so.6",
+ "libXdmcp.so.6",
+ "libX11-xcb.so.1",
+ "libxcb-xkb.so.1",
+ "libxcb-cursor.so.0",
+ "libxcb-icccm.so.4",
+ "libxcb-image.so.0",
+ "libxcb-keysyms.so.1",
+ "libxcb-randr.so.0",
+ "libxcb-render-util.so.0",
+ "libxcb-render.so.0",
+ "libxcb-shape.so.0",
+ "libxcb-shm.so.0",
+ "libxcb-sync.so.1",
+ "libxcb-util.so.1",
+ "libxcb-xfixes.so.0",
+ "libxkbcommon-x11.so.0",
+ "libfontconfig.so.1"]
if target == "linux" and is_webengine:
sysroot_libs += ["libjpeg.so.8"]
for lib in sysroot_libs:
diff --git a/android/emu/files/src/android/qt/qt_setup.cpp b/android/emu/files/src/android/qt/qt_setup.cpp
index a3acce1cc9..46091ddfdd 100644
--- a/android/emu/files/src/android/qt/qt_setup.cpp
+++ b/android/emu/files/src/android/qt/qt_setup.cpp
@@ -64,6 +64,13 @@ auto androidQtSetupEnv(int bitness, const char* emulatorDir) -> bool {
system->envSet("QT_SCALE_FACTOR", "none");
system->envSet("QT_SCREEN_SCALE_FACTORS", "none");
+#if defined(__linux__) || defined(__APPLE__)
+ // We didn't build QtWebEngine with opengl support, so we need to explicitly disable
+ // it in order for it to work.
+ VERBOSE_PRINT(init, "Forcing QtWebEngine to use software rendering");
+ system->envSet("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu");
+#endif // defined(__linux__) || defined(__APPLE__)
+
#ifdef __linux__
// On some linux distributions, the kernel's anonymous namespaces feature is
// turned off, which may cause issues with QtWebEngineProcess in sandbox mode
diff --git a/android/emu/metrics/include/android/metrics/UiEventTracker.h b/android/emu/metrics/include/android/metrics/UiEventTracker.h
index 6e6d3be814..f2abab0134 100644
--- a/android/emu/metrics/include/android/metrics/UiEventTracker.h
+++ b/android/emu/metrics/include/android/metrics/UiEventTracker.h
@@ -19,7 +19,10 @@
#include "aemu/base/Compiler.h" // for DISALLOW_COPY_ASSIGN_...
#include "android/metrics/export.h"
-#include "studio_stats.pb.h" // for EmulatorUiEvent_EmulatorUiEventContext
+#ifndef Q_MOC_RUN
+// Qt 6.5.3 moc complains of a parsing error with this protobuf file. So exclude it from moc runs.
+#include "studio_stats.pb.h" // for EmulatorAutomatio...
+#endif // Q_MOC_RUN
namespace android {
namespace metrics {
diff --git a/android/emu/protos/emulator_features.proto b/android/emu/protos/emulator_features.proto
index 06daef094b..76630b9ac6 100644
--- a/android/emu/protos/emulator_features.proto
+++ b/android/emu/protos/emulator_features.proto
@@ -118,4 +118,6 @@ enum Feature {
HWCMultiConfigs = 65;
SupportPixelFold = 66;
+
+ Vulkan = 67;
}