mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
Qt: show some more info about the current log viewer state
This commit is contained in:
parent
46a50265a3
commit
a9ee9a69a4
@ -226,7 +226,7 @@ void log_viewer::show_log()
|
||||
QTextStream stream(&file);
|
||||
QString text = stream.readAll();
|
||||
text.replace('\0', '0');
|
||||
m_log_text->setPlainText(text);
|
||||
set_text_and_keep_position(text);
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
@ -240,6 +240,9 @@ void log_viewer::show_log()
|
||||
|
||||
void log_viewer::set_text_and_keep_position(const QString& text)
|
||||
{
|
||||
m_log_text->setPlainText(tr("Pasting..."));
|
||||
QApplication::processEvents();
|
||||
|
||||
const int pos = m_log_text->verticalScrollBar()->value();
|
||||
m_log_text->setPlainText(text);
|
||||
m_log_text->verticalScrollBar()->setValue(pos);
|
||||
@ -257,6 +260,8 @@ void log_viewer::filter_log()
|
||||
}
|
||||
}
|
||||
|
||||
m_log_text->setPlainText(tr("Filtering..."));
|
||||
|
||||
std::vector<QString> excluded_log_levels;
|
||||
if (!m_log_levels.test(static_cast<u32>(logs::level::fatal))) excluded_log_levels.push_back("·F ");
|
||||
if (!m_log_levels.test(static_cast<u32>(logs::level::error))) excluded_log_levels.push_back("·E ");
|
||||
|
Loading…
x
Reference in New Issue
Block a user