mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
solid: remove redundant file existence check in audio interface helper method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7f5c2abfe8
commit
2a13a7aa8c
1 changed files with 8 additions and 14 deletions
|
@ -309,8 +309,6 @@ QString UdevAudioInterfacePrivate::deviceName(char type)
|
|||
QByteArray UdevAudioInterfacePrivate::grepHelper(const QString& path, const QByteArray& grepValue)
|
||||
{
|
||||
QFile file(path);
|
||||
|
||||
if (file.exists()) {
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QByteArray line = file.readLine();
|
||||
while(!line.isNull()) {
|
||||
|
@ -323,9 +321,5 @@ QByteArray UdevAudioInterfacePrivate::grepHelper(const QString& path, const QByt
|
|||
} else {
|
||||
qDebug() << "grepHelper: Cannot open file: " << path;
|
||||
}
|
||||
} else {
|
||||
qDebug() << "grepHelper: File does not exists: " << path;
|
||||
}
|
||||
|
||||
return QByteArray();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue