From 55f787b89898d28bd6245ec6768247659dd85b88 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 30 Mar 2020 19:17:02 +0200 Subject: [PATCH] Remove unused function Host_UpdateProgressDialog --- Source/Android/jni/MainAndroid.cpp | 4 ---- Source/Core/Core/Host.h | 1 - Source/Core/DolphinNoGUI/MainNoGUI.cpp | 4 ---- Source/Core/DolphinQt/Host.cpp | 5 ----- Source/Core/DolphinQt/Host.h | 1 - Source/Core/DolphinQt/MainWindow.cpp | 25 ------------------------- Source/Core/DolphinQt/MainWindow.h | 4 ---- Source/DSPTool/StubHost.cpp | 3 --- Source/UnitTests/StubHost.cpp | 3 --- 9 files changed, 50 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 9b081b9ad1..1ef2a77431 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -140,10 +140,6 @@ void Host_YieldToUI() { } -void Host_UpdateProgressDialog(const char* caption, int position, int total) -{ -} - void Host_TitleChanged() { } diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index d3f5ee4b61..cf65c22eb0 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -43,5 +43,4 @@ void Host_UpdateDisasmDialog(); void Host_UpdateMainFrame(); void Host_UpdateTitle(const std::string& title); void Host_YieldToUI(); -void Host_UpdateProgressDialog(const char* caption, int position, int total); void Host_TitleChanged(); diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index 14fac966c9..1278d46c40 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -99,10 +99,6 @@ void Host_YieldToUI() { } -void Host_UpdateProgressDialog(const char* caption, int position, int total) -{ -} - void Host_TitleChanged() { #ifdef USE_DISCORD_PRESENCE diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index c2037b1640..cb910854d1 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -125,11 +125,6 @@ void Host_UpdateDisasmDialog() QueueOnObject(QApplication::instance(), [] { emit Host::GetInstance()->UpdateDisasmDialog(); }); } -void Host_UpdateProgressDialog(const char* caption, int position, int total) -{ - emit Host::GetInstance()->UpdateProgressDialog(QString::fromUtf8(caption), position, total); -} - void Host::RequestNotifyMapLoaded() { QueueOnObject(QApplication::instance(), [this] { emit NotifyMapLoaded(); }); diff --git a/Source/Core/DolphinQt/Host.h b/Source/Core/DolphinQt/Host.h index 9a25d217a9..e1c44b91a2 100644 --- a/Source/Core/DolphinQt/Host.h +++ b/Source/Core/DolphinQt/Host.h @@ -33,7 +33,6 @@ signals: void RequestTitle(const QString& title); void RequestStop(); void RequestRenderSize(int w, int h); - void UpdateProgressDialog(QString label, int position, int maximum); void UpdateDisasmDialog(); void NotifyMapLoaded(); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 1cd6eb4c6f..89a19b42ba 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -616,8 +615,6 @@ void MainWindow::ConnectRenderWidget() void MainWindow::ConnectHost() { - connect(Host::GetInstance(), &Host::UpdateProgressDialog, this, - &MainWindow::OnUpdateProgressDialog); connect(Host::GetInstance(), &Host::RequestStop, this, &MainWindow::RequestStop); } @@ -1702,28 +1699,6 @@ void MainWindow::ShowCheatsManager() m_cheats_manager->show(); } -void MainWindow::OnUpdateProgressDialog(QString title, int progress, int total) -{ - if (!m_progress_dialog) - { - m_progress_dialog = new QProgressDialog(m_render_widget, Qt::WindowTitleHint); - m_progress_dialog->show(); - m_progress_dialog->setCancelButton(nullptr); - m_progress_dialog->setWindowTitle(tr("Dolphin")); - } - - m_progress_dialog->setValue(progress); - m_progress_dialog->setLabelText(title); - m_progress_dialog->setMaximum(total); - - if (total < 0 || progress >= total) - { - m_progress_dialog->hide(); - m_progress_dialog->deleteLater(); - m_progress_dialog = nullptr; - } -} - void MainWindow::Show() { if (!Settings::Instance().IsBatchModeEnabled()) diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index acc93df540..50fea52a24 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -11,7 +11,6 @@ #include #include -class QProgressDialog; class QStackedWidget; class QString; @@ -167,8 +166,6 @@ private: void OnSignal(); #endif - void OnUpdateProgressDialog(QString label, int progress, int total); - void OnPlayRecording(); void OnStartRecording(); void OnStopRecording(); @@ -193,7 +190,6 @@ private: std::unique_ptr m_xrr_config; #endif - QProgressDialog* m_progress_dialog = nullptr; QStackedWidget* m_stack; ToolBar* m_tool_bar; MenuBar* m_menu_bar; diff --git a/Source/DSPTool/StubHost.cpp b/Source/DSPTool/StubHost.cpp index 75dd66296d..488a49d2cd 100644 --- a/Source/DSPTool/StubHost.cpp +++ b/Source/DSPTool/StubHost.cpp @@ -45,9 +45,6 @@ bool Host_RendererIsFullscreen() void Host_YieldToUI() { } -void Host_UpdateProgressDialog(const char* caption, int position, int total) -{ -} void Host_TitleChanged() { } diff --git a/Source/UnitTests/StubHost.cpp b/Source/UnitTests/StubHost.cpp index 4fa45ef1c2..211ee8bfba 100644 --- a/Source/UnitTests/StubHost.cpp +++ b/Source/UnitTests/StubHost.cpp @@ -46,9 +46,6 @@ bool Host_RendererIsFullscreen() void Host_YieldToUI() { } -void Host_UpdateProgressDialog(const char* caption, int position, int total) -{ -} void Host_TitleChanged() { }