From c108b319543a3a90d25970077d03903040176c5f Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 31 Jul 2023 01:52:26 +0200 Subject: [PATCH] Qt: fix data type of find_dialog text edits --- rpcs3/rpcs3qt/find_dialog.cpp | 2 +- rpcs3/rpcs3qt/find_dialog.h | 6 +++--- rpcs3/rpcs3qt/log_frame.cpp | 2 +- rpcs3/rpcs3qt/log_viewer.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rpcs3/rpcs3qt/find_dialog.cpp b/rpcs3/rpcs3qt/find_dialog.cpp index 69b7a2f1f4..9c5e805050 100644 --- a/rpcs3/rpcs3qt/find_dialog.cpp +++ b/rpcs3/rpcs3qt/find_dialog.cpp @@ -2,7 +2,7 @@ #include -find_dialog::find_dialog(QTextEdit* edit, QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f), m_text_edit(edit) +find_dialog::find_dialog(QPlainTextEdit* edit, QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f), m_text_edit(edit) { setWindowTitle(tr("Find string")); diff --git a/rpcs3/rpcs3qt/find_dialog.h b/rpcs3/rpcs3qt/find_dialog.h index d99363b654..27baf03c75 100644 --- a/rpcs3/rpcs3qt/find_dialog.h +++ b/rpcs3/rpcs3qt/find_dialog.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include @@ -11,14 +11,14 @@ class find_dialog : public QDialog Q_OBJECT public: - find_dialog(QTextEdit* edit, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + find_dialog(QPlainTextEdit* edit, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); private: int m_count_lines = 0; int m_count_total = 0; QLabel* m_label_count_lines; QLabel* m_label_count_total; - QTextEdit* m_text_edit; + QPlainTextEdit* m_text_edit; QLineEdit* m_find_bar; QPushButton* m_find_first; QPushButton* m_find_last; diff --git a/rpcs3/rpcs3qt/log_frame.cpp b/rpcs3/rpcs3qt/log_frame.cpp index d32de0f26c..663878efed 100644 --- a/rpcs3/rpcs3qt/log_frame.cpp +++ b/rpcs3/rpcs3qt/log_frame.cpp @@ -897,7 +897,7 @@ bool log_frame::eventFilter(QObject* object, QEvent* event) if (m_find_dialog && m_find_dialog->isVisible()) m_find_dialog->close(); - m_find_dialog.reset(new find_dialog(static_cast(object), this)); + m_find_dialog.reset(new find_dialog(static_cast(object), this)); } } diff --git a/rpcs3/rpcs3qt/log_viewer.cpp b/rpcs3/rpcs3qt/log_viewer.cpp index dea9da3533..47c78e40b2 100644 --- a/rpcs3/rpcs3qt/log_viewer.cpp +++ b/rpcs3/rpcs3qt/log_viewer.cpp @@ -455,7 +455,7 @@ bool log_viewer::eventFilter(QObject* object, QEvent* event) if (m_find_dialog && m_find_dialog->isVisible()) m_find_dialog->close(); - m_find_dialog.reset(new find_dialog(static_cast(object), this)); + m_find_dialog.reset(new find_dialog(static_cast(object), this)); } }