Commit 761aebed authored by Andreas Traczyk's avatar Andreas Traczyk

profile: never save a '?' as default avatar

Change-Id: I27a64040f049d921acf667b895d58a2e25e9fe52
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent 87ae2bf1
......@@ -196,7 +196,7 @@ namespace Interfaces {
const bool ret = image.loadFromData(QByteArray::fromBase64(data),type.toLatin1());
if (!ret) {
qDebug() << "vCard image loading failed";
return drawDefaultUserPixmap(decorationSize, '?', '?');
return QVariant();
}
return QPixmap::fromImage(image);
......@@ -299,7 +299,7 @@ namespace Interfaces {
}
}
} catch (const std::out_of_range& e) {
return drawDefaultUserPixmap(size, '?', '?');
return QVariant();
}
}
......@@ -481,7 +481,7 @@ namespace Interfaces {
Q_UNUSED(acc)
if (auto pro = ProfileModel::instance().selectedProfile())
return contactPhoto(pro->person(), decorationSize);
return drawDefaultUserPixmap(decorationSize, '?', '?');
return QVariant();
}
} // namespace Interfaces
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment