mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Fix console behaviour on Windows
This commit is contained in:
parent
00face16a3
commit
fda3b6b11e
@ -416,7 +416,7 @@ void Console::setDisplayMode(const DisplayMode mode)
|
|||||||
* is set to @c true, an timestamp is added for each line.
|
* is set to @c true, an timestamp is added for each line.
|
||||||
*/
|
*/
|
||||||
void Console::append(const QString &string, const bool addTimestamp)
|
void Console::append(const QString &string, const bool addTimestamp)
|
||||||
{
|
{
|
||||||
// Get current date
|
// Get current date
|
||||||
QString timestamp;
|
QString timestamp;
|
||||||
if (addTimestamp)
|
if (addTimestamp)
|
||||||
@ -445,7 +445,7 @@ void Console::append(const QString &string, const bool addTimestamp)
|
|||||||
m_timestampAdded = true;
|
m_timestampAdded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.at(i) == "\n" || string.at(i) == "\r")
|
if (data.at(i) == "\n" || data.at(i) == "\r")
|
||||||
{
|
{
|
||||||
m_data.append("");
|
m_data.append("");
|
||||||
m_timestampAdded = false;
|
m_timestampAdded = false;
|
||||||
@ -458,7 +458,7 @@ void Console::append(const QString &string, const bool addTimestamp)
|
|||||||
m_data.replace(lineCount() - 1, str);
|
m_data.replace(lineCount() - 1, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove extra lines
|
// Remove extra lines
|
||||||
while (lineCount() > SCROLLBACK)
|
while (lineCount() > SCROLLBACK)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user