warnings fixed, 0.8.25.dev code for os x and linux

This commit is contained in:
John Preston 2015-06-15 20:36:16 +03:00
parent 9fee0ace4c
commit ec1d547f27
5 changed files with 12 additions and 7 deletions

View File

@ -381,7 +381,11 @@ namespace App {
bool showPhone = !isServiceUser(data->id) && !(flags & (MTPDuser_flag_self | MTPDuser_flag_contact | MTPDuser_flag_mutual_contact));
QString pname = (showPhone && !data->phone.isEmpty()) ? formatPhone(data->phone) : QString();
data->setName(fname, lname, QString(), uname);
data->setPhoto(d.has_photo() ? d.vphoto : MTP_userProfilePhotoEmpty());
if (d.has_photo()) {
data->setPhoto(d.vphoto);
} else {
data->setPhoto(MTP_userProfilePhotoEmpty());
}
if (d.has_access_hash()) data->access = d.vaccess_hash.v;
status = d.has_status() ? &d.vstatus : &emptyStatus;
}

View File

@ -307,11 +307,11 @@ History::History(const PeerId &peerId) : width(0), height(0)
, lastMsg(0)
, activeMsgId(0)
, draftToId(0)
, lastKeyboardId(0)
, lastKeyboardFrom(0)
, lastWidth(0)
, lastScrollTop(History::ScrollMax)
, mute(isNotifyMuted(peer->notify))
, lastKeyboardId(0)
, lastKeyboardFrom(0)
, sendRequestId(0)
, textCachedFor(0)
, lastItemTextCache(st::dlgRichMinWidth)

View File

@ -1446,7 +1446,8 @@ void MessageField::focusInEvent(QFocusEvent *e) {
emit focused();
}
BotKeyboard::BotKeyboard() : _wasForMsgId(0), _hoverAnim(animFunc(this, &BotKeyboard::hoverStep)), _st(&st::botKbButton), _sel(-1), _down(-1) {
BotKeyboard::BotKeyboard() : _wasForMsgId(0),
_sel(-1), _down(-1), _hoverAnim(animFunc(this, &BotKeyboard::hoverStep)), _st(&st::botKbButton) {
setGeometry(0, 0, _st->margin, _st->margin);
setMouseTracking(true);
@ -4343,7 +4344,7 @@ void HistoryWidget::addMessagesToBack(const QVector<MTPMessage> &messages) {
void HistoryWidget::updateBotKeyboard() {
bool changed = false;
bool wasVisible = _kbShown;
if (_replyToId && !_replyTo || !hist) {
if ((_replyToId && !_replyTo) || !hist) {
changed = _keyboard.updateMarkup(0);
} else if (_replyTo) {
changed = _keyboard.updateMarkup(_replyTo);

View File

@ -224,7 +224,7 @@ void UserData::setBotInfo(const MTPBotInfo &info) {
break;
case mtpc_botInfo: {
const MTPDbotInfo &d(info.c_botInfo());
if (d.vuser_id.v != id) return;
if (App::peerFromUser(d.vuser_id.v) != id) return;
if (botInfo) {
botInfo->version = d.vversion.v;

View File

@ -136,7 +136,7 @@ struct BotInfo {
struct PhotoData;
struct UserData : public PeerData {
UserData(const PeerId &id) : PeerData(id), lnk(new PeerLink(this)), photoId(0), onlineTill(0), contact(-1), photosCount(-1), botInfo(0) {
UserData(const PeerId &id) : PeerData(id), photoId(0), lnk(new PeerLink(this)), onlineTill(0), contact(-1), photosCount(-1), botInfo(0) {
}
void setPhoto(const MTPUserProfilePhoto &photo);
void setName(const QString &first, const QString &last, const QString &phoneName, const QString &username);