Normalized handling of leading/trailing whitespace in sample app (refs #22)

This commit is contained in:
Mathew Sutcliffe
2013-08-04 17:49:46 +01:00
parent d1e35c0b27
commit 56e05b55a9
2 changed files with 3 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ void LineReader::run()
file.open(stdin, QIODevice::ReadOnly | QIODevice::Text);
forever
{
QString line = file.readLine();
QString line = file.readLine().trimmed();
if (! line.isEmpty())
{
emit command(line);