Add QTermWidget::saveHistory
This enables an application to implement the functionality of easily opening the entire history as a file in your favorite editor.
This commit is contained in:
committed by
Chih-Hsuan Yen
parent
3467ff6482
commit
5637ea1e5e
@@ -751,3 +751,11 @@ int QTermWidget::getMargin() const
|
||||
{
|
||||
return m_impl->m_terminalDisplay->margin();
|
||||
}
|
||||
|
||||
void QTermWidget::saveHistory(QIODevice *device)
|
||||
{
|
||||
QTextStream stream(device);
|
||||
PlainTextDecoder decoder;
|
||||
decoder.begin(&stream);
|
||||
m_impl->m_session->emulation()->writeToStream(&decoder, 0, m_impl->m_session->emulation()->lineCount());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user