Skip to content
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/GeneralWidget and GraphicsWidget: Remove unused member variable #11798

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
Expand Up @@ -26,13 +26,10 @@
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Settings.h"

#include "UICommon/VideoUtils.h"

#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"

GeneralWidget::GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent)
: m_xrr_config(xrr_config)
GeneralWidget::GeneralWidget(GraphicsWindow* parent)
{
CreateWidgets();
LoadSettings();
Expand Down
9 changes: 1 addition & 8 deletions Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h
Expand Up @@ -16,16 +16,11 @@ class QRadioButton;
class QGridLayout;
class ToolTipComboBox;

namespace X11Utils
{
class XRRConfiguration;
}

class GeneralWidget final : public GraphicsWidget
{
Q_OBJECT
public:
explicit GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent);
explicit GeneralWidget(GraphicsWindow* parent);
signals:
void BackendChanged(const QString& backend);

Expand Down Expand Up @@ -55,6 +50,4 @@ class GeneralWidget final : public GraphicsWidget
ConfigBool* m_render_main_window;
std::array<GraphicsRadioInt*, 4> m_shader_compilation_mode{};
ConfigBool* m_wait_for_shaders;

X11Utils::XRRConfiguration* m_xrr_config;
};
5 changes: 2 additions & 3 deletions Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp
Expand Up @@ -24,8 +24,7 @@
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"

GraphicsWindow::GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent)
: QDialog(parent), m_xrr_config(xrr_config)
GraphicsWindow::GraphicsWindow(MainWindow* parent) : QDialog(parent)
{
CreateMainLayout();

Expand All @@ -46,7 +45,7 @@ void GraphicsWindow::CreateMainLayout()
main_layout->addWidget(tab_widget);
main_layout->addWidget(button_box);

auto* const general_widget = new GeneralWidget(m_xrr_config, this);
auto* const general_widget = new GeneralWidget(this);
auto* const enhancements_widget = new EnhancementsWidget(this);
auto* const hacks_widget = new HacksWidget(this);
auto* const advanced_widget = new AdvancedWidget(this);
Expand Down
9 changes: 1 addition & 8 deletions Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h
Expand Up @@ -16,23 +16,16 @@ class QTabWidget;
class QDialogButtonBox;
class SoftwareRendererWidget;

namespace X11Utils
{
class XRRConfiguration;
}

class GraphicsWindow final : public QDialog
{
Q_OBJECT
public:
explicit GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent);
explicit GraphicsWindow(MainWindow* parent);

signals:
void BackendChanged(const QString& backend);

private:
void CreateMainLayout();
void OnBackendChanged(const QString& backend);

X11Utils::XRRConfiguration* m_xrr_config;
};
4 changes: 1 addition & 3 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -1282,10 +1282,8 @@ void MainWindow::ShowGraphicsWindow()
"display", windowHandle())),
winId());
}
m_graphics_window = new GraphicsWindow(m_xrr_config.get(), this);
#else
m_graphics_window = new GraphicsWindow(nullptr, this);
#endif
m_graphics_window = new GraphicsWindow(this);
InstallHotkeyFilter(m_graphics_window);
}

Expand Down