Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Make sure that the sysFlag watcher can properly read the flag content…
Browse files Browse the repository at this point in the history
…s as text.
  • Loading branch information
Ken Moore committed Mar 26, 2014
1 parent 64e9ae2 commit e93d2a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src-qt4/libpcbsd/utils/pcbsd-sysFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ QString SystemFlagWatcher::quickRead(QString filepath){
QFile file(filepath);
if( !file.open(QIODevice::ReadOnly | QIODevice::Text) ){ return ""; }
QStringList ret;
while( !file.atEnd() ){
ret << QString( file.readLine() );
QTextStream in(&file);
while( !in.atEnd() ){
ret << QString( in.readLine() );
}
file.close();
return ret.join("\n");
}
1 change: 1 addition & 0 deletions src-qt4/libpcbsd/utils/pcbsd-sysFlags.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QFile>
#include <QDir>
#include <QTimer>
#include <QTextStream>

#include <unistd.h>

Expand Down

0 comments on commit e93d2a0

Please sign in to comment.