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;
|
QList<QPair<QString, QString>> labels;
|
||||||
|
|
||||||
|
if (!file.exists()) {
|
||||||
|
return labels;
|
||||||
|
}
|
||||||
|
|
||||||
file.open(QIODevice::ReadOnly);
|
file.open(QIODevice::ReadOnly);
|
||||||
QDataStream in(&file); // read the data serialized from the file
|
QDataStream in(&file); // read the data serialized from the file
|
||||||
QString version;
|
QString version;
|
||||||
@@ -212,4 +216,4 @@ QString AddressBook::writeableFile() {
|
|||||||
} else {
|
} else {
|
||||||
return dir.filePath(filename);
|
return dir.filePath(filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user