Supress address book not existing warnings
This commit is contained in:
@@ -181,6 +181,10 @@ QList<QPair<QString, QString>> AddressBook::readFromStorage() {
|
||||
|
||||
QList<QPair<QString, QString>> labels;
|
||||
|
||||
if (!file.exists()) {
|
||||
return labels;
|
||||
}
|
||||
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QDataStream in(&file); // read the data serialized from the file
|
||||
QString version;
|
||||
@@ -212,4 +216,4 @@ QString AddressBook::writeableFile() {
|
||||
} else {
|
||||
return dir.filePath(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user