Closed beta 10019001: Build fixed for Xcode.

This commit is contained in:
John Preston 2016-11-03 13:58:10 +03:00
parent 2a3fd0066d
commit 1466338e7e
8 changed files with 25 additions and 27 deletions

View file

@ -36,12 +36,12 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "styles/style_dialogs.h"
AddContactBox::AddContactBox(QString fname, QString lname, QString phone) : AbstractBox(st::boxWidth)
, _save(this, lang(lng_add_contact), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _retry(this, lang(lng_try_other_contact), st::defaultBoxButton)
, _first(this, st::defaultInputField, lang(lng_signup_firstname), fname)
, _last(this, st::defaultInputField, lang(lng_signup_lastname), lname)
, _phone(this, st::defaultInputField, lang(lng_contact_phone), phone)
, _save(this, lang(lng_add_contact), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _retry(this, lang(lng_try_other_contact), st::defaultBoxButton)
, _invertOrder(langFirstNameGoesSecond()) {
if (!phone.isEmpty()) {
_phone->setDisabled(true);
@ -52,12 +52,12 @@ AddContactBox::AddContactBox(QString fname, QString lname, QString phone) : Abst
AddContactBox::AddContactBox(UserData *user) : AbstractBox(st::boxWidth)
, _user(user)
, _save(this, lang(lng_settings_save), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _retry(this, lang(lng_try_other_contact), st::defaultBoxButton)
, _first(this, st::defaultInputField, lang(lng_signup_firstname), user->firstName)
, _last(this, st::defaultInputField, lang(lng_signup_lastname), user->lastName)
, _phone(this, st::defaultInputField, lang(lng_contact_phone), user->phone())
, _save(this, lang(lng_settings_save), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _retry(this, lang(lng_try_other_contact), st::defaultBoxButton)
, _invertOrder(langFirstNameGoesSecond()) {
_phone->setDisabled(true);
initBox();
@ -966,12 +966,11 @@ bool SetupChannelBox::onFirstCheckFail(const RPCError &error) {
EditNameTitleBox::EditNameTitleBox(PeerData *peer) :
_peer(peer),
_save(this, lang(lng_settings_save), st::defaultBoxButton),
_cancel(this, lang(lng_cancel), st::cancelBoxButton),
_first(this, st::defaultInputField, lang(peer->isUser() ? lng_signup_firstname : lng_dlg_new_group_name), peer->isUser() ? peer->asUser()->firstName : peer->name),
_last(this, st::defaultInputField, lang(lng_signup_lastname), peer->isUser() ? peer->asUser()->lastName : QString()),
_invertOrder(!peer->isChat() && langFirstNameGoesSecond()),
_requestId(0) {
_save(this, lang(lng_settings_save), st::defaultBoxButton),
_cancel(this, lang(lng_cancel), st::cancelBoxButton),
_invertOrder(!peer->isChat() && langFirstNameGoesSecond()) {
if (_invertOrder) {
setTabOrder(_last, _first);
}
@ -1141,15 +1140,12 @@ void EditNameTitleBox::onSaveChatDone(const MTPUpdates &updates) {
EditChannelBox::EditChannelBox(ChannelData *channel) : AbstractBox()
, _channel(channel)
, _save(this, lang(lng_settings_save), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _title(this, st::defaultInputField, lang(lng_dlg_new_channel_name), _channel->name)
, _description(this, st::newGroupDescription, lang(lng_create_group_description), _channel->about())
, _sign(this, lang(lng_edit_sign_messages), channel->addsSignature(), st::defaultBoxCheckbox)
, _publicLink(this, lang(channel->isPublic() ? lng_profile_edit_public_link : lng_profile_create_public_link), st::defaultBoxLinkButton)
, _saveTitleRequestId(0)
, _saveDescriptionRequestId(0)
, _saveSignRequestId(0) {
, _save(this, lang(lng_settings_save), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton) {
connect(App::main(), SIGNAL(peerNameChanged(PeerData*,const PeerData::Names&,const PeerData::NameFirstChars&)), this, SLOT(peerUpdated(PeerData*)));
setMouseTracking(true);

View file

@ -268,9 +268,9 @@ private:
ChildWidget<BoxButton> _save;
ChildWidget<BoxButton> _cancel;
bool _invertOrder;
bool _invertOrder = false;
mtpRequestId _requestId;
mtpRequestId _requestId = 0;
QString _sentName;
};
@ -318,9 +318,9 @@ private:
ChildWidget<BoxButton> _save;
ChildWidget<BoxButton> _cancel;
mtpRequestId _saveTitleRequestId;
mtpRequestId _saveDescriptionRequestId;
mtpRequestId _saveSignRequestId;
mtpRequestId _saveTitleRequestId = 0;
mtpRequestId _saveDescriptionRequestId = 0;
mtpRequestId _saveSignRequestId = 0;
QString _sentTitle, _sentDescription;

View file

@ -243,7 +243,7 @@ public:
}
auto size = fileInfo.uncompressed_size;
if (size > fileSizeLimit) {
if (size > static_cast<uint32>(fileSizeLimit)) {
if (_error == UNZ_OK) _error = -1;
LOG(("Error: current file is too large (should be less than %1, got %2) in a zip file.").arg(fileSizeLimit).arg(size));
return QByteArray();
@ -257,7 +257,7 @@ public:
result.resize(size);
auto couldRead = readCurrentFile(result.data(), size);
if (couldRead != size) {
if (couldRead != static_cast<int>(size)) {
LOG(("Error: could not read current file in a zip file, got %1.").arg(couldRead));
return QByteArray();
}
@ -273,7 +273,7 @@ public:
QByteArray readFileContent(const char *szFileName, int iCaseSensitivity, int fileSizeLimit) {
if (locateFile(szFileName, iCaseSensitivity) != UNZ_OK) {
LOG(("Error: could not locate '%1' in a zip file.").arg(szFileName));
return false;
return QByteArray();
}
return readCurrentFileContent(fileSizeLimit);
}

View file

@ -41,7 +41,7 @@ public:
}
// Updates the area that is visible inside the scroll container.
void setVisibleTopBottom(int visibleTop, int visibleBottom);
void setVisibleTopBottom(int visibleTop, int visibleBottom) override;
// Profile fixed top bar should use this flag to decide
// if it shows "Share contact" button or not.

View file

@ -38,7 +38,7 @@ public:
}
// Updates the area that is visible inside the scroll container.
void setVisibleTopBottom(int visibleTop, int visibleBottom);
void setVisibleTopBottom(int visibleTop, int visibleBottom) override;
void showFinished();

View file

@ -101,7 +101,7 @@ void colorizeImage(const QImage &src, QColor c, QImage *outResult, QRect srcRect
auto resultIntsAdded = resultIntsPerLine - width * resultIntsPerPixel;
auto resultInts = reinterpret_cast<uint32*>(outResult->bits()) + dstPoint.y() * resultIntsPerLine + dstPoint.x() * resultIntsPerPixel;
t_assert(resultIntsAdded >= 0);
t_assert(outResult->depth() == ((resultIntsPerPixel * sizeof(uint32)) << 3));
t_assert(outResult->depth() == static_cast<int>((resultIntsPerPixel * sizeof(uint32)) << 3));
t_assert(outResult->bytesPerLine() == (resultIntsPerLine << 2));
auto maskBytesPerPixel = (src.depth() >> 3);

View file

@ -619,6 +619,8 @@
'<(minizip_loc)/ioapi.h',
'<(minizip_loc)/zip.c',
'<(minizip_loc)/zip.h',
'<(minizip_loc)/unzip.c',
'<(minizip_loc)/unzip.h',
],
'sources!': [
'<(src_loc)/pspecific_win.cpp',

View file

@ -20,7 +20,7 @@ else
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode-ninja
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode
# use patched gyp with Xcode project generator
../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp -Gxcode_upgrade_check_project_version=800 --format=xcode
../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp -Gxcode_upgrade_check_project_version=810 --format=xcode
fi
cd ../..