From 9c766f0a5c9afadc609537107d331df4c0f05876 Mon Sep 17 00:00:00 2001
From: "Jason E. Hale" <jhale@FreeBSD.org>
Date: Sat, 26 Apr 2025 22:59:24 -0400
Subject: [PATCH] emulators/rpcs3: Fix build with Qt 6.9

With hat:	kde@
PR:		286051
---
 .../patch-rpcs3_rpcs3qt_game__list__frame.cpp | 24 +++++++++++++++++++
 ...pcs3_rpcs3qt_ps__move__tracker__dialog.cpp | 24 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 emulators/rpcs3/files/patch-rpcs3_rpcs3qt_game__list__frame.cpp
 create mode 100644 emulators/rpcs3/files/patch-rpcs3_rpcs3qt_ps__move__tracker__dialog.cpp

diff --git a/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_game__list__frame.cpp b/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_game__list__frame.cpp
new file mode 100644
index 000000000000..af2bc4ddbf9c
--- /dev/null
+++ b/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_game__list__frame.cpp
@@ -0,0 +1,24 @@
+Fix build with Qt >= 6.9.0
+
+Backported from: https://github.com/RPCS3/rpcs3/commit/600e4604169464c64cbf548e7629e483ad2aad1e
+
+--- rpcs3/rpcs3qt/game_list_frame.cpp.orig	2025-03-30 19:45:32 UTC
++++ rpcs3/rpcs3qt/game_list_frame.cpp
+@@ -2363,7 +2363,7 @@ void game_list_frame::BatchActionBySerials(progress_di
+ 
+ 		connect(future_watcher, &QFutureWatcher<void>::finished, this, [=, this]()
+ 		{
+-			pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size));
++			pdlg->setLabelText(progressLabel.arg(index->load()).arg(serials_size));
+ 			pdlg->setCancelButtonText(tr("OK"));
+ 			QApplication::beep();
+ 
+@@ -2396,7 +2396,7 @@ void game_list_frame::BatchActionBySerials(progress_di
+ 			return;
+ 		}
+ 
+-		pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size));
++		pdlg->setLabelText(progressLabel.arg(index->load()).arg(serials_size));
+ 		pdlg->setCancelButtonText(tr("OK"));
+ 		connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); });
+ 		QApplication::beep();
diff --git a/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_ps__move__tracker__dialog.cpp b/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_ps__move__tracker__dialog.cpp
new file mode 100644
index 000000000000..ce6da7983d15
--- /dev/null
+++ b/emulators/rpcs3/files/patch-rpcs3_rpcs3qt_ps__move__tracker__dialog.cpp
@@ -0,0 +1,24 @@
+Fix build with Qt >= 6.9.0
+
+Backported from: https://github.com/RPCS3/rpcs3/commit/600e4604169464c64cbf548e7629e483ad2aad1e
+
+--- rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp.orig	2025-03-30 19:45:32 UTC
++++ rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp
+@@ -362,7 +362,7 @@ void ps_move_tracker_dialog::update_min_radius(bool up
+ }
+ void ps_move_tracker_dialog::update_min_radius(bool update_slider)
+ {
+-	ui->minRadiusGb->setTitle(tr("Min Radius: %0 %").arg(g_cfg_move.min_radius));
++	ui->minRadiusGb->setTitle(tr("Min Radius: %0 %").arg(g_cfg_move.min_radius.get()));
+ 
+ 	if (update_slider)
+ 	{
+@@ -372,7 +372,7 @@ void ps_move_tracker_dialog::update_max_radius(bool up
+ 
+ void ps_move_tracker_dialog::update_max_radius(bool update_slider)
+ {
+-	ui->maxRadiusGb->setTitle(tr("Max Radius: %0 %").arg(g_cfg_move.max_radius));
++	ui->maxRadiusGb->setTitle(tr("Max Radius: %0 %").arg(g_cfg_move.max_radius.get()));
+ 
+ 	if (update_slider)
+ 	{