2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Seek done in video player in MediaView. Some memory leaks fixed.

Using pixmapFromImageInPlace() instead of QPixmap::fromImage().
This commit is contained in:
John Preston
2016-07-13 20:34:57 +03:00
parent fc716af002
commit cb0c99acc8
53 changed files with 419 additions and 274 deletions

View File

@@ -220,7 +220,7 @@ void UserData::setPhoto(const MTPUserProfilePhoto &p) { // see Local::readPeer a
newPhotoId = 0;
if (id == ServiceUserId) {
if (_userpic.v() == userDefPhoto(colorIndex).v()) {
newPhoto = ImagePtr(QPixmap::fromImage(App::wnd()->iconLarge().scaledToWidth(160, Qt::SmoothTransformation), Qt::ColorOnly), "PNG");
newPhoto = ImagePtr(App::pixmapFromImageInPlace(App::wnd()->iconLarge().scaledToWidth(160, Qt::SmoothTransformation)), "PNG");
}
} else {
newPhoto = userDefPhoto(colorIndex);
@@ -299,12 +299,11 @@ void UserData::setBotInfoVersion(int version) {
botInfo->commands.clear();
Notify::botCommandsChanged(this);
}
delete botInfo;
botInfo = 0;
botInfo = nullptr;
Notify::userIsBotChanged(this);
}
} else if (!botInfo) {
botInfo = new BotInfo();
botInfo = std_::make_unique<BotInfo>();
botInfo->version = version;
Notify::userIsBotChanged(this);
} else if (botInfo->version < version) {