New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt: Post Game-Installation Assistant #14864
Conversation
rpcs3/rpcs3qt/main_window.cpp
Outdated
vlayout->addWidget(btn_box); | ||
dlg->setLayout(vlayout); | ||
|
||
connect(btn_box, &QDialogButtonBox::accepted, this, [this, dlg, desk_check, quick_check, precompile_check, bootable_paths = std::move(bootable_paths)]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dialog should be its own class that connects to this main window function instead of adding more and more and more nested dialog code to big classes like this.
edbd142
to
cf62505
Compare
rpcs3/rpcs3qt/main_window.cpp
Outdated
{ | ||
if (bootable_paths_installed.empty()) | ||
m_game_list_frame->AddRefreshedSlot([paths = std::move(bootable_paths_installed)]() mutable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_game_list_frame->AddRefreshedSlot([paths = std::move(bootable_paths_installed)]() mutable | |
connect(m_game_list_frame, &game_list_frame::Refreshed, this, func, Qt::SingleShotConnection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cool!
rpcs3/rpcs3qt/main_window.cpp
Outdated
|
||
for (const QString& path : paths) | ||
{ | ||
AddGamesFromDir(path); | ||
} | ||
|
||
m_game_list_frame->AddRefreshedSlot([paths = std::move(paths), existing = std::move(existing)]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_game_list_frame->AddRefreshedSlot([paths = std::move(paths), existing = std::move(existing)]() | |
connect(m_game_list_frame, &game_list_frame::Refreshed, this, func, Qt::SingleShotConnection); |
rpcs3/rpcs3qt/main_window.cpp
Outdated
|
||
for (const game_info& game : m_game_list_frame->GetGameInfo()) | ||
{ | ||
if (game) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (game) | |
if (!game) continue; |
rpcs3/rpcs3qt/main_window.cpp
Outdated
|
||
for (const game_info& game : m_game_list_frame->GetGameInfo()) | ||
{ | ||
if (game && !existing.contains(game->info.path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (game && !existing.contains(game->info.path)) | |
if (!game || existing.contains(game->info.path)) continue; |
rpcs3/rpcs3qt/game_list_frame.h
Outdated
@@ -8,6 +8,7 @@ | |||
#include "Utilities/mutex.h" | |||
#include "Emu/config_mode.h" | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line
{ | ||
locations.insert(gui::utils::shortcut_location::applications); | ||
} | ||
std::this_thread::sleep_for(std::chrono::microseconds(100'000 - std::min<usz>(100'000, get_system_time() - start_time))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for again?
Please add a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's so you had the 100% state seen for a little while, but this was in addition to the full refresh afterwards so it wasn't very efficient
|
||
if (!cancelled) | ||
{ | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is placebo. we already return true in this scope no matter what
@@ -1095,80 +1095,30 @@ bool main_window::HandlePackageInstallation(QStringList file_paths, bool from_bo | |||
bootable_paths_installed[bootable_paths[index]] = packages[index].title_id; | |||
} | |||
|
|||
pdlg.hide(); | |||
const bool installed_a_whole_package_without_new_software = bootable_paths_installed.empty() && !cancelled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a comment which explains the early check (due to move)
ecb2301
to
0678ff6
Compare
0678ff6
to
cfe03e0
Compare
vlayout->addWidget(btn_box); | ||
dlg->setLayout(vlayout); | ||
|
||
connect(btn_box, &QDialogButtonBox::accepted, this, [=, paths = std::move(bootable_paths)]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this warning from Clang.
[550/577] Building CXX object rpcs3/rpcs3qt/CMakeFiles/rpcs3_ui.dir/main_window.cpp.obj
C:/src/rpcs3/rpcs3/rpcs3qt/main_window.cpp:2318:37: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
2318 | for (const game_info& gameinfo : m_game_list_frame->GetGameInfo())
| ^
C:/src/rpcs3/rpcs3/rpcs3qt/main_window.cpp:2290:55: note: add an explicit capture of 'this' to capture '*this' by reference
2290 | connect(btn_box, &QDialogButtonBox::accepted, this, [=, paths = std::move(bootable_paths)]()
| ^
| , this
1 warning generated.
THANKS VERY MUCH !!!!! |
New Features