mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
Qt: optimize log viewer file loading
This commit is contained in:
parent
a9ee9a69a4
commit
8ac9968096
@ -224,9 +224,8 @@ void log_viewer::show_log()
|
||||
m_gui_settings->SetValue(gui::fd_log_viewer, m_path_last);
|
||||
|
||||
QTextStream stream(&file);
|
||||
QString text = stream.readAll();
|
||||
text.replace('\0', '0');
|
||||
set_text_and_keep_position(text);
|
||||
m_full_log = stream.readAll();
|
||||
m_full_log.replace('\0', '0');
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
@ -252,13 +251,9 @@ void log_viewer::filter_log()
|
||||
{
|
||||
if (m_full_log.isEmpty())
|
||||
{
|
||||
m_full_log = m_log_text->toPlainText();
|
||||
|
||||
if (m_full_log.isEmpty())
|
||||
{
|
||||
set_text_and_keep_position(m_full_log);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_log_text->setPlainText(tr("Filtering..."));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user