Fixed a bug where the last address label wouldn't be removed
This commit is contained in:
parent
db978a1548
commit
e93cf27adb
|
@ -254,9 +254,6 @@ void AddressBook::readFromStorage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBook::writeToStorage() {
|
void AddressBook::writeToStorage() {
|
||||||
if (allLabels.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QFile file(AddressBook::writeableFile());
|
QFile file(AddressBook::writeableFile());
|
||||||
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
||||||
QDataStream out(&file); // we will serialize the data into the file
|
QDataStream out(&file); // we will serialize the data into the file
|
||||||
|
|
Loading…
Reference in New Issue