Пример #1
0
void ConsoleLineBuffer::writeLineToLogFile(ConsoleLine& line)
{
    if (logFile_)
    {
        QString lineStr = line.timestamp().toString("[yyyy-MM-dd HH:mm:ss.zzz] ") + line.text() + "\r\n";
        logFile_->write(lineStr.toUtf8());
        logFile_->flush();
    }
}
Пример #2
0
void ConsoleLineBuffer::refreshSingleHighlighting(ConsoleLine& line)
{
    QColor color = highlightingsModel_->lineColor(line.text());

    if (color != line.color())
    {
        line.setColor(color);
        emit dataChanged(QAbstractListModel::index(list_.count()), QAbstractListModel::index(list_.count()));
    }
}