os x setup done, fixing localtime on each os x wakeup or application active status change

This commit is contained in:
John Preston 2014-11-12 23:30:26 +03:00
parent e0ef1d434d
commit 379c5f75e7
33 changed files with 236 additions and 86 deletions

View File

@ -1,5 +1,9 @@
AppVersionStr=0.6.7
AppVersion=6007
AppVersionStr=0.6.8
AppVersion=6008
echo ""
echo "Preparing version $AppVersionStr.."
echo ""
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
@ -36,18 +40,20 @@ if [ ! -f "./../Mac/Release/Telegram.app/Contents/Frameworks/Updater" ]; then
exit 1
fi
if [ ! -f "./../Mac/Release/Telegram.app.dmg" ]; then
echo "Telegram.app.dmg not found!"
exit 1
fi
echo "Preparing version $AppVersionStr, executing Packer.."
cd ./../Mac/Release && codesign --force --deep --sign "Developer ID Application: John Preston" Telegram.app && cd ./../../Telegram
cd ./../Mac/Release
temppath=`hdiutil attach -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'`
cp -R ./Telegram.app "$temppath/"
bless --folder "$temppath/" --openfolder "$temppath/"
hdiutil detach "$temppath"
hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o tsetup.$AppVersionStr.dmg
cd ./../../Telegram
cd ./../Mac/Release && ./Packer.app/Contents/MacOS/Packer -path Telegram.app -version $AppVersion && cd ./../../Telegram
echo "Packer done!"
if [ ! -d "./../Mac/Release/deploy/" ]; then
mkdir "./../Mac/Release/deploy"
fi
echo "Copying Telegram.app and tmacupd$AppVersion to deploy/$AppVersionStr..";
mkdir "./../Mac/Release/deploy/$AppVersionStr"
mkdir "./../Mac/Release/deploy/$AppVersionStr/Telegram"
@ -55,6 +61,6 @@ cp -r ./../Mac/Release/Telegram.app ./../Mac/Release/deploy/$AppVersionStr/Teleg
rm ./../Mac/Release/Telegram.app/Contents/MacOS/Telegram
rm ./../Mac/Release/Telegram.app/Contents/Frameworks/Updater
mv ./../Mac/Release/tmacupd$AppVersion ./../Mac/Release/deploy/$AppVersionStr/
mv ./../Mac/Release/Telegram.app.dmg ./../Mac/Release/deploy/$AppVersionStr/tsetup.$AppVersionStr.dmg
mv ./../Mac/Release/tsetup.$AppVersionStr.dmg ./../Mac/Release/deploy/$AppVersionStr/tsetup.$AppVersionStr.dmg
echo "Version $AppVersionStr prepared!";

View File

@ -1 +0,0 @@
codesign --force --deep --sign "Developer ID Application: John Preston" ./../Mac/Release/Telegram.app

View File

@ -139,8 +139,6 @@ Application::Application(int &argc, char **argv) : PsApplication(argc, argv),
psInstallEventFilter();
updateCheckTimer.setSingleShot(true);
connect(&socket, SIGNAL(connected()), this, SLOT(socketConnected()));
connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
connect(&socket, SIGNAL(error(QLocalSocket::LocalSocketError)), this, SLOT(socketError(QLocalSocket::LocalSocketError)));
@ -151,10 +149,10 @@ Application::Application(int &argc, char **argv) : PsApplication(argc, argv),
connect(&updateCheckTimer, SIGNAL(timeout()), this, SLOT(startUpdateCheck()));
connect(this, SIGNAL(updateFailed()), this, SLOT(onUpdateFailed()));
connect(this, SIGNAL(updateReady()), this, SLOT(onUpdateReady()));
connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState)));
connect(&writeUserConfigTimer, SIGNAL(timeout()), this, SLOT(onWriteUserConfig()));
writeUserConfigTimer.setSingleShot(true);
killDownloadSessionsTimer.setSingleShot(true);
connect(&killDownloadSessionsTimer, SIGNAL(timeout()), this, SLOT(killDownloadSessions()));
if (cManyInstance()) {
@ -345,10 +343,18 @@ void Application::killDownloadSessionsStop(int32 dc) {
}
}
void Application::checkLocalTime() {
if (App::main()) App::main()->checkLastUpdate(checkms());
}
void Application::onWriteUserConfig() {
App::writeUserConfig();
}
void Application::onAppStateChanged(Qt::ApplicationState state) {
checkLocalTime();
}
void Application::killDownloadSessions() {
uint64 ms = getms(), left = MTPAckSendWaiting + MTPKillFileSessionTimeout;
for (QMap<int32, uint64>::iterator i = killDownloadSessionTimes.begin(); i != killDownloadSessionTimes.end(); ) {

View File

@ -73,6 +73,8 @@ public:
void killDownloadSessionsStart(int32 dc);
void killDownloadSessionsStop(int32 dc);
void checkLocalTime();
signals:
void peerPhotoDone(PeerId peer);
@ -104,13 +106,14 @@ public slots:
void onWriteUserConfig();
void killDownloadSessions();
void onAppStateChanged(Qt::ApplicationState state);
private:
QMap<MsgId, PeerId> photoUpdates;
QMap<int32, uint64> killDownloadSessionTimes;
QTimer killDownloadSessionsTimer;
SingleTimer killDownloadSessionsTimer;
void startApp();
@ -131,7 +134,7 @@ private:
mtpRequestId updateRequestId;
QNetworkAccessManager updateManager;
QNetworkReply *updateReply;
QTimer updateCheckTimer;
SingleTimer updateCheckTimer;
QThread *updateThread;
PsUpdateDownloader *updateDownloader;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -348,7 +348,6 @@ void VoiceMessagesFader::onTimer() {
VoiceMessages *voice = audioVoice();
if (!voice) return;
uint64 ms = getms();
for (int32 i = 0; i < AudioVoiceMsgSimultaneously; ++i) {
VoiceMessages::Msg &m(voice->_data[i]);
if (m.state == VoiceMessageStopped || m.state == VoiceMessagePaused || !m.source) continue;

View File

@ -234,7 +234,8 @@ enum {
UploadRequestInterval = 500, // one part each half second, if not uploaded faster
MaxPhotosInMemory = 50, // try to clear some memory after 50 photos are created
NoUpdatesTimeout = 180 * 1000, // if nothing is received in 3 min we reconnect
NoUpdatesTimeout = 180 * 1000, // if nothing is received in 3 min we getDifference
NoUpdatesAfterSleepTimeout = 60 * 1000, // if nothing is received in 1 min when was a sleepmode we getDifference
WaitForSeqTimeout = 1000, // 1s wait for skipped seq in updates
MemoryForImageCache = 64 * 1024 * 1024, // after 64mb of unpacked images we try to clear some memory

View File

@ -1212,7 +1212,7 @@ void DialogsWidget::setInnerFocus() {
}
void DialogsWidget::regTyping(History *history, UserData *user) {
uint64 ms = getms();
uint64 ms = getms(true);
history->typing[user] = ms + 6000;
Histories::TypingHistories::const_iterator i = App::histories().typing.find(history);
@ -1226,7 +1226,7 @@ void DialogsWidget::regTyping(History *history, UserData *user) {
}
bool DialogsWidget::animStep(float64) {
uint64 ms = getms();
uint64 ms = getms(true);
Histories::TypingHistories &typing(App::histories().typing);
for (Histories::TypingHistories::iterator i = typing.begin(), e = typing.end(); i != e;) {
uint32 typingFrame = (ms - i.value()) / 150;

View File

@ -891,7 +891,7 @@ void History::updateNameText() {
}
bool History::updateTyping(uint64 ms, uint32 dots, bool force) {
if (!ms) ms = getms();
if (!ms) ms = getms(true);
bool changed = force;
for (TypingUsers::iterator i = typing.begin(), e = typing.end(); i != e;) {
if (ms >= i.value()) {
@ -1325,7 +1325,7 @@ HistoryItem *History::doAddToBack(HistoryBlock *to, bool newBlock, HistoryItem *
void History::unregTyping(UserData *from) {
TypingUsers::iterator i = typing.find(from);
if (i != typing.end()) {
uint64 ms = getms();
uint64 ms = getms(true);
i.value() = ms;
updateTyping(ms, 0, true);
App::main()->topBar()->update();

View File

@ -1607,7 +1607,7 @@ void HistoryWidget::cancelTyping() {
}
void HistoryWidget::updateTyping(bool typing) {
uint64 ms = getms() + 10000;
uint64 ms = getms(true) + 10000;
if (noTypingUpdate || !hist || (typing && (hist->myTyping + 5000 > ms)) || (!typing && (hist->myTyping + 5000 <= ms))) return;
hist->myTyping = typing ? ms : 0;

View File

@ -275,7 +275,7 @@ MainWidget *TopBarWidget::main() {
MainWidget::MainWidget(Window *window) : QWidget(window), failedObjId(0), _dialogsWidth(st::dlgMinWidth),
dialogs(this), history(this), profile(0), overview(0), _topBar(this), hider(0), _mediaType(this), _mediaTypeMask(0),
updPts(0), updDate(0), updQts(-1), updSeq(0), updInited(false), onlineRequest(0), _failDifferenceTimeout(1) {
updPts(0), updDate(0), updQts(-1), updSeq(0), updInited(false), onlineRequest(0), _failDifferenceTimeout(1), _lastUpdateTime(0) {
setGeometry(QRect(0, st::titleHeight, App::wnd()->width(), App::wnd()->height() - st::titleHeight));
connect(window, SIGNAL(resized(const QSize &)), this, SLOT(onParentResize(const QSize &)));
@ -296,13 +296,6 @@ updPts(0), updDate(0), updQts(-1), updSeq(0), updInited(false), onlineRequest(0)
connect(audioVoice(), SIGNAL(stopped(AudioData*)), this, SLOT(audioPlayProgress(AudioData*)));
}
noUpdatesTimer.setSingleShot(true);
onlineTimer.setSingleShot(true);
onlineUpdater.setSingleShot(true);
updateNotifySettingTimer.setSingleShot(true);
_bySeqTimer.setSingleShot(true);
_failDifferenceTimer.setSingleShot(true);
dialogs.show();
history.show();
_topBar.hide();
@ -771,6 +764,14 @@ void MainWidget::peerUsernameChanged(PeerData *peer) {
}
}
void MainWidget::checkLastUpdate(bool afterSleep) {
uint64 n = getms(true);
LOG(("Checking last update!.. last update %1, now %2, noUpdatesTimer %3, remains %4").arg(_lastUpdateTime).arg(n).arg(noUpdatesTimer.isActive() ? 1 : 0).arg(noUpdatesTimer.remainingTime()));
if (_lastUpdateTime && n > _lastUpdateTime + (afterSleep ? NoUpdatesAfterSleepTimeout : NoUpdatesTimeout)) {
getDifference();
}
}
void MainWidget::photosLoaded(History *h, const MTPmessages_Messages &msgs, mtpRequestId req) {
OverviewsPreload::iterator it;
MediaOverviewType type = OverviewCount;
@ -1728,7 +1729,9 @@ void MainWidget::gotState(const MTPupdates_State &state) {
updSetState(d.vpts.v, d.vdate.v, d.vqts.v, d.vseq.v);
MTP::setGlobalDoneHandler(rpcDone(&MainWidget::updateReceived));
_lastUpdateTime = getms(true);
noUpdatesTimer.start(NoUpdatesTimeout);
LOG(("Started no updates timeout, %1").arg(_lastUpdateTime));
updInited = true;
dialogs.loadDialogs();
@ -1744,7 +1747,9 @@ void MainWidget::gotDifference(const MTPupdates_Difference &diff) {
updSetState(updPts, d.vdate.v, updQts, d.vseq.v);
MTP::setGlobalDoneHandler(rpcDone(&MainWidget::updateReceived));
_lastUpdateTime = getms(true);
noUpdatesTimer.start(NoUpdatesTimeout);
LOG(("Started no updates timeout, %1").arg(_lastUpdateTime));
updInited = true;
} break;
case mtpc_updates_differenceSlice: {
@ -1771,7 +1776,7 @@ void MainWidget::updUpdated(int32 pts, int32 seq) {
if (!updInited) return;
if (seq && (seq < updSeq || seq > updSeq + 1)) {
_bySeqPart.insert(seq, pts);
return _bySeqTimer.start();
return _bySeqTimer.start(WaitForSeqTimeout);
}
updSetState(pts, 0, 0, seq);
}
@ -1800,6 +1805,7 @@ void MainWidget::getDifferenceForce() {
}
void MainWidget::getDifference() {
LOG(("Getting difference! no updates timer: %1, remains: %2").arg(noUpdatesTimer.isActive() ? 1 : 0).arg(noUpdatesTimer.remainingTime()));
if (!updInited) return;
_bySeqUpdates.clear();
@ -1812,6 +1818,7 @@ void MainWidget::getDifference() {
noUpdatesTimer.stop();
_failDifferenceTimer.stop();
LOG(("Getting difference for %1, %2").arg(updPts).arg(updDate));
updInited = false;
MTP::setGlobalDoneHandler(RPCDoneHandlerPtr(0));
MTP::send(MTPupdates_GetDifference(MTP_int(updPts), MTP_int(updDate), MTP_int(updQts)), rpcDone(&MainWidget::gotDifference), rpcFail(&MainWidget::failDifference));
@ -2031,7 +2038,9 @@ void MainWidget::updateReceived(const mtpPrime *from, const mtpPrime *end) {
try {
MTPUpdates updates(from, end);
_lastUpdateTime = getms(true);
noUpdatesTimer.start(NoUpdatesTimeout);
LOG(("Started no updates timeout, %1").arg(_lastUpdateTime));
handleUpdates(updates);
} catch(mtpErrorUnexpected &e) { // just some other type

View File

@ -284,6 +284,8 @@ public:
void loadMediaBack(PeerData *peer, MediaOverviewType type, bool many = false);
void peerUsernameChanged(PeerData *peer);
void checkLastUpdate(bool afterSleep);
~MainWidget();
signals:
@ -380,14 +382,14 @@ private:
int updPts, updDate, updQts, updSeq;
bool updInited;
QTimer noUpdatesTimer;
SingleTimer noUpdatesTimer;
mtpRequestId onlineRequest;
QTimer onlineTimer;
QTimer onlineUpdater;
SingleTimer onlineTimer;
SingleTimer onlineUpdater;
QSet<PeerData*> updateNotifySettingPeers;
QTimer updateNotifySettingTimer;
SingleTimer updateNotifySettingTimer;
typedef QMap<PeerData*, mtpRequestId> ReadRequests;
ReadRequests _readRequests;
@ -400,8 +402,10 @@ private:
QMap<int32, MTPmessages_StatedMessage> _bySeqStatedMessage;
QMap<int32, MTPmessages_StatedMessages> _bySeqStatedMessages;
QMap<int32, int32> _bySeqPart;
QTimer _bySeqTimer;
SingleTimer _bySeqTimer;
int32 _failDifferenceTimeout; // growing timeout for getDifference calls, if it fails
QTimer _failDifferenceTimer;
SingleTimer _failDifferenceTimer;
uint64 _lastUpdateTime;
};

View File

@ -187,7 +187,7 @@ namespace {
if (!requestId) return false;
int32 secs = m.captured(1).toInt();
uint64 sendAt = getms() + secs * 1000 + 10;
uint64 sendAt = getms(true) + secs * 1000 + 10;
DelayedRequestsList::iterator i = delayedRequests.begin(), e = delayedRequests.end();
for (; i != e; ++i) {
if (i->first == requestId) return true;
@ -521,8 +521,12 @@ namespace _mtp_internal {
return true;
}
RequestResender::RequestResender() {
connect(&_timer, SIGNAL(timeout()), this, SLOT(checkDelayed()));
}
void RequestResender::checkDelayed() {
uint64 now = getms();
uint64 now = getms(true);
while (!delayedRequests.isEmpty() && now >= delayedRequests.front().second) {
mtpRequestId requestId = delayedRequests.front().first;
delayedRequests.pop_front();
@ -553,7 +557,7 @@ namespace _mtp_internal {
}
if (!delayedRequests.isEmpty()) {
QTimer::singleShot(delayedRequests.front().second - now, this, SLOT(checkDelayed()));
_timer.start(delayedRequests.front().second - now);
}
}
};

View File

@ -49,9 +49,17 @@ namespace _mtp_internal {
class RequestResender : public QObject {
Q_OBJECT
public:
RequestResender();
public slots:
void checkDelayed();
private:
SingleTimer _timer;
};
};

View File

@ -1094,10 +1094,6 @@ MTProtoConnectionPrivate::MTProtoConnectionPrivate(QThread *thread, MTProtoConne
connect(this, SIGNAL(stateChanged(qint32)), sessionData->owner(), SLOT(onConnectionStateChange(qint32)));
connect(sessionData->owner(), SIGNAL(needToSend()), this, SLOT(tryToSend()));
connect(this, SIGNAL(sessionResetDone()), sessionData->owner(), SLOT(onResetDone()));
oldConnectionTimer.setSingleShot(true);
connCheckTimer.setSingleShot(true);
retryTimer.setSingleShot(true);
}
void MTProtoConnectionPrivate::onConfigLoaded() {
@ -1113,7 +1109,7 @@ int32 MTProtoConnectionPrivate::getState() const {
int32 result = _state;
if (_state < 0) {
if (retryTimer.isActive()) {
result = int32(getms() - retryWillFinish);
result = int32(getms(true) - retryWillFinish);
if (result >= 0) {
result = -1;
}
@ -1140,7 +1136,7 @@ bool MTProtoConnectionPrivate::setState(int32 state, int32 ifState) {
if (state < 0) {
retryTimeout = -state;
retryTimer.start(retryTimeout);
retryWillFinish = getms() + retryTimeout;
retryWillFinish = getms(true) + retryTimeout;
}
emit stateChanged(state);
return true;
@ -1374,7 +1370,7 @@ void MTProtoConnectionPrivate::tryToSend() {
pingRequest = mtpRequestData::prepare(pingSize);
ping.write(*pingRequest);
pingRequest->msDate = getms(); // > 0 - can send without container
pingRequest->msDate = getms(true); // > 0 - can send without container
pingRequest->requestId = 0; // dont add to haveSent / wereAcked maps
pingId = toSendPingId;
@ -1394,7 +1390,7 @@ void MTProtoConnectionPrivate::tryToSend() {
ackRequest = mtpRequestData::prepare(ack.size() >> 2);
ack.write(*ackRequest);
ackRequest->msDate = getms(); // > 0 - can send without container
ackRequest->msDate = getms(true); // > 0 - can send without container
ackRequest->requestId = 0; // dont add to haveSent / wereAcked maps
ackRequestData.clear();
@ -1405,7 +1401,7 @@ void MTProtoConnectionPrivate::tryToSend() {
resendRequest = mtpRequestData::prepare(resend.size() >> 2);
resend.write(*resendRequest);
resendRequest->msDate = getms(); // > 0 - can send without container
resendRequest->msDate = getms(true); // > 0 - can send without container
resendRequest->requestId = 0; // dont add to haveSent / wereAcked maps
resendRequestData.clear();
@ -1429,7 +1425,7 @@ void MTProtoConnectionPrivate::tryToSend() {
stateRequest = mtpRequestData::prepare(req.size() >> 2);
req.write(*stateRequest);
stateRequest->msDate = getms(); // > 0 - can send without container
stateRequest->msDate = getms(true); // > 0 - can send without container
stateRequest->requestId = reqid();// add to haveSent / wereAcked maps, but don't add to requestMap
}
}
@ -1468,7 +1464,7 @@ void MTProtoConnectionPrivate::tryToSend() {
if (toSendRequest->requestId) {
if (mtpRequestData::needAck(toSendRequest)) {
toSendRequest->msDate = mtpRequestData::isStateRequest(toSendRequest) ? 0 : getms();
toSendRequest->msDate = mtpRequestData::isStateRequest(toSendRequest) ? 0 : getms(true);
QWriteLocker locker2(sessionData->haveSentMutex());
mtpRequestMap &haveSent(sessionData->haveSentMap());
@ -1529,7 +1525,7 @@ void MTProtoConnectionPrivate::tryToSend() {
bool added = false;
if (req->requestId) {
if (mtpRequestData::needAck(req)) {
req->msDate = mtpRequestData::isStateRequest(req) ? 0 : getms();
req->msDate = mtpRequestData::isStateRequest(req) ? 0 : getms(true);
if (req->after) {
_mtp_internal::wrapInvokeAfter(toSendRequest, req, haveSent);
added = true;
@ -1675,7 +1671,7 @@ void MTProtoConnectionPrivate::onSentSome(uint64 size) {
}
connCheckTimer.start(remain);
}
if (!firstSentAt) firstSentAt = getms();
if (!firstSentAt) firstSentAt = getms(true);
}
void MTProtoConnectionPrivate::onReceivedSome() {
@ -1686,7 +1682,7 @@ void MTProtoConnectionPrivate::onReceivedSome() {
oldConnectionTimer.start(MTPConnectionOldTimeout);
connCheckTimer.stop();
if (firstSentAt > 0) {
int32 ms = getms() - firstSentAt;
int32 ms = getms(true) - firstSentAt;
DEBUG_LOG(("MTP Info: response in %1ms, receiveDelay: %2ms").arg(ms).arg(receiveDelay));
if (ms > 0 && ms * 2 < int32(receiveDelay)) receiveDelay = qMax(ms * 2, int32(MinReceiveDelay));

View File

@ -357,14 +357,14 @@ private:
MTProtoConnection *_owner;
MTPabstractConnection *conn;
QTimer retryTimer; // exp retry timer
SingleTimer retryTimer; // exp retry timer
uint32 retryTimeout;
quint64 retryWillFinish;
QTimer oldConnectionTimer;
SingleTimer oldConnectionTimer;
bool oldConnection;
QTimer connCheckTimer;
SingleTimer connCheckTimer;
uint32 receiveDelay;
int64 firstSentAt;

View File

@ -443,7 +443,6 @@ void mtpUpdateDcOptions(const QVector<MTPDcOption> &options) {
MTProtoConfigLoader::MTProtoConfigLoader() : _enumCurrent(0), _enumRequest(0) {
connect(&_enumDCTimer, SIGNAL(timeout()), this, SLOT(enumDC()));
_enumDCTimer.setSingleShot(true);
}
void MTProtoConfigLoader::load() {

View File

@ -97,7 +97,7 @@ signals:
private:
QTimer _enumDCTimer;
SingleTimer _enumDCTimer;
int32 _enumCurrent;
mtpRequestId _enumRequest;

View File

@ -86,7 +86,6 @@ void MTProtoSession::start(int32 dcenter, uint32 connects) {
connect(this, SIGNAL(startSendTimer(int)), &sender, SLOT(start(int)));
connect(this, SIGNAL(stopSendTimer()), &sender, SLOT(stop()));
connect(this, SIGNAL(needToSendAsync()), this, SIGNAL(needToSend()));
sender.setSingleShot(true);
MTProtoDCMap &dcs(mtpDCMap());
@ -134,7 +133,7 @@ void MTProtoSession::stop() {
}
void MTProtoSession::sendAnything(uint64 msCanWait) {
uint64 ms = getms();
uint64 ms = getms(true);
if (msSendCall) {
if (ms > msSendCall + msWait) {
msWait = 0;
@ -167,7 +166,7 @@ void MTProtoSession::checkRequestsByTimer() {
QReadLocker locker(data.haveSentMutex());
mtpRequestMap &haveSent(data.haveSentMap());
uint32 haveSentCount(haveSent.size());
uint64 ms = getms();
uint64 ms = getms(true);
for (mtpRequestMap::iterator i = haveSent.begin(), e = haveSent.end(); i != e; ++i) {
mtpRequest &req(i.value());
if (req->msDate > 0) {
@ -334,7 +333,7 @@ mtpRequestId MTProtoSession::resend(mtpMsgId msgId, uint64 msCanWait, bool force
}
return 0xFFFFFFFF;
} else if (!mtpRequestData::isStateRequest(request)) {
request->msDate = forceContainer ? 0 : getms();
request->msDate = forceContainer ? 0 : getms(true);
sendPrepared(request, msCanWait, false);
{
QWriteLocker locker(data.toResendMutex());
@ -390,7 +389,7 @@ void MTProtoSession::sendPreparedWithInit(const mtpRequest &request, uint64 msCa
request->resize(reqSerialized->size());
memcpy(request->data(), reqSerialized->constData(), reqSerialized->size());
}
request->msDate = getms(); // > 0 - can send without container
request->msDate = getms(true); // > 0 - can send without container
sendPrepared(request, msCanWait);
}

View File

@ -269,7 +269,7 @@ private:
uint64 msSendCall, msWait;
QTimer timeouter;
QTimer sender;
SingleTimer sender;
};

View File

@ -33,7 +33,7 @@ mtpRequestId MTProtoSession::send(const TRequest &request, RPCResponseHandler ca
DEBUG_LOG(("MTP Info: adding request to toSendMap, msCanWait %1").arg(msCanWait));
reqSerialized->msDate = getms(); // > 0 - can send without container
reqSerialized->msDate = getms(true); // > 0 - can send without container
if (after) reqSerialized->after = _mtp_internal::getRequest(after);
requestId = _mtp_internal::storeRequest(reqSerialized, callbacks);
@ -72,7 +72,7 @@ mtpRequestId MTProtoSession::sendFirst(const MTPInitConnection<TRequest> &reques
DEBUG_LOG(("MTP Info: adding wrapped to init connection request to toSendMap, msCanWait %1").arg(msCanWait));
callbacks.onDone = RPCDoneHandlerPtr(new RPCWrappedDcDoneHandler(dc, callbacks.onDone));
reqSerialized->msDate = getms(); // > 0 - can send without container
reqSerialized->msDate = getms(true); // > 0 - can send without container
if (after) reqSerialized->after = _mtp_internal::getRequest(after);
requestId = _mtp_internal::storeRequest(reqSerialized, callbacks);

View File

@ -372,7 +372,7 @@ namespace {
}
QRect psDesktopRect() {
uint64 tnow = getms();
uint64 tnow = getms(true);
if (tnow > _monitorLastGot + 1000 || tnow < _monitorLastGot) {
_monitorLastGot = tnow;
_monitorRect = QApplication::desktop()->availableGeometry(App::wnd());

View File

@ -19,6 +19,7 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
#include "pspecific_mac_p.h"
#include "window.h"
#include "application.h"
#include "lang.h"
@ -30,6 +31,8 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
- (void)applicationDidBecomeActive:(NSNotification *)aNotification;
- (void)receiveWakeNote:(NSNotification*)note;
@end
@ -41,6 +44,14 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
return YES;
}
- (void)applicationDidBecomeActive:(NSNotification *)aNotification {
if (App::app()) App::app()->checkLocalTime();
}
- (void)receiveWakeNote:(NSNotification*)aNotification {
if (App::app()) App::app()->checkLocalTime();
}
@end
ApplicationDelegate *_sharedDelegate = nil;
@ -601,6 +612,9 @@ void objc_openFile(const QString &f, bool openwith) {
void objc_start() {
_sharedDelegate = [[ApplicationDelegate alloc] init];
[[NSApplication sharedApplication] setDelegate:_sharedDelegate];
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: _sharedDelegate
selector: @selector(receiveWakeNote:)
name: NSWorkspaceDidWakeNotification object: NULL];
}
void objc_finish() {

View File

@ -150,7 +150,8 @@ MTPint toServerTime(const int32 &clientTime) {
namespace {
float64 _msFreq;
float64 _msgIdCoef;
int64 _msStart = 0;
int64 _msStart = 0, _msAddToMsStart = 0, _msAddToUnixtime = 0;
int32 _timeStart = 0;
class _MsInitializer {
public:
@ -180,7 +181,7 @@ namespace {
_msgIdCoef = float64(0xFFFF0000L) / 1000000000.;
_msStart = 1000 * uint64(ts.tv_sec) + (uint64(ts.tv_nsec) / 1000000);
#endif
_timeStart = myunixtime();
srand((uint32)(_msStart & 0xFFFFFFFFL));
if (!RAND_status()) { // should be always inited in all modern OS
char buf[16];
@ -208,15 +209,28 @@ namespace {
_MsStarter _msStarter;
}
uint64 getms() {
bool checkms() {
int64 unixms = (myunixtime() - _timeStart) * 1000LL + _msAddToUnixtime;
int64 ms = int64(getms(true));
if (ms > unixms + 1000LL) {
_msAddToUnixtime = ((ms - unixms) / 1000LL) * 1000LL;
} else if (unixms > ms + 1000LL) {
_msAddToMsStart += ((unixms - ms) / 1000LL) * 1000LL;
adjustSingleTimers();
return true;
}
return false;
}
uint64 getms(bool checked) {
_msInitialize();
#ifdef Q_OS_WIN
LARGE_INTEGER li;
QueryPerformanceCounter(&li);
return (uint64)((li.QuadPart - _msStart) * _msFreq);
return (uint64)((li.QuadPart - _msStart) * _msFreq) + (checked ? _msAddToMsStart : 0);
#elif defined Q_OS_MAC
uint64 msCount = mach_absolute_time();
return (uint64)((msCount - _msStart) * _msFreq);
return (uint64)((msCount - _msStart) * _msFreq) + (checked ? _msAddToMsStart : 0);
#else
timespec ts;
int res = clock_gettime(CLOCK_MONOTONIC, &ts);
@ -225,10 +239,28 @@ uint64 getms() {
return 0;
}
uint64 msCount = 1000 * uint64(ts.tv_sec) + (uint64(ts.tv_nsec) / 1000000);
return (uint64)(msCount - _msStart);
return (uint64)(msCount - _msStart) + (checked ? _msAddToMsStart : 0);
#endif
}
namespace {
QSet<SingleTimer*> _activeSingleTimers;
}
void regSingleTimer(SingleTimer *timer) {
_activeSingleTimers.insert(timer);
}
void unregSingleTimer(SingleTimer *timer) {
_activeSingleTimers.remove(timer);
}
void adjustSingleTimers() {
for (QSet<SingleTimer*>::const_iterator i = _activeSingleTimers.cbegin(), e = _activeSingleTimers.cend(); i != e; ++i) {
emit (*i)->callAdjust();
}
}
uint64 msgid() {
#ifdef Q_OS_WIN
LARGE_INTEGER li;

View File

@ -98,7 +98,66 @@ inline void mylocaltime(struct tm * _Tm, const time_t * _Time) {
#endif
}
uint64 getms();
bool checkms(); // returns true if time has changed
uint64 getms(bool checked = false);
class SingleTimer;
void regSingleTimer(SingleTimer *timer);
void unregSingleTimer(SingleTimer *timer);
void adjustSingleTimers();
class SingleTimer : public QTimer { // single shot timer with check
Q_OBJECT
public:
SingleTimer() : _finishing(0) {
QTimer::setSingleShot(true);
connect(this, SIGNAL(callAdjust()), this, SLOT(adjust()));
connect(this, SIGNAL(timeout()), this, SLOT(unreg()));
}
void start(int msec) {
_finishing = getms(true) + (msec < 0 ? 0 : uint64(msec));
QTimer::start(msec);
regSingleTimer(this);
}
void stop() {
QTimer::stop();
unreg();
}
void setSingleShot(bool); // is not available
void start(); // is not available
~SingleTimer() {
unreg();
}
signals:
void callAdjust();
public slots:
void adjust() {
uint64 n = getms(true);
if (isActive()) {
if (n >= _finishing) {
start(0);
} else {
start(_finishing - n);
}
}
}
void unreg() {
unregSingleTimer(this);
}
private:
uint64 _finishing;
};
const static uint32 _md5_block_size = 64;
class HashMd5 {
@ -227,6 +286,8 @@ enum DataBlockId {
dbiEncryptedWithSalt = 333,
dbiEncrypted = 444,
// 500-600 reserved
dbiVersion = 666,
};

View File

@ -359,7 +359,6 @@ _connecting(0), _tempDeleter(0), _tempDeleterThread(0), myIcon(QPixmap::fromImag
connect(&_inactiveTimer, SIGNAL(timeout()), this, SLOT(onInactiveTimer()));
connect(&notifyWaitTimer, SIGNAL(timeout()), this, SLOT(notifyFire()));
notifyWaitTimer.setSingleShot(true);
}
void Window::inactivePress(bool inactive) {
@ -967,7 +966,7 @@ void Window::notifySchedule(History *history, MsgId msgId) {
App::wnd()->getNotifySetting(MTP_inputNotifyPeer(history->peer->input));
}
uint64 ms = getms() + NotifyWaitTimeout;
uint64 ms = getms(true) + NotifyWaitTimeout;
notifyWhenAlerts[history].insert(ms, NullType());
if (cDesktopNotify()) {
NotifyWhenMaps::iterator i = notifyWhenMaps.find(history);
@ -1059,7 +1058,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
}
}
uint64 ms = getms(), nextAlert = 0;
uint64 ms = getms(true), nextAlert = 0;
bool alert = false;
for (NotifyWhenAlerts::iterator i = notifyWhenAlerts.begin(); i != notifyWhenAlerts.end();) {
while (!i.value().isEmpty() && i.value().begin().key() <= ms) {
@ -1153,7 +1152,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
}
uint64 ms = getms();
uint64 ms = getms(true);
History *history = notifyItem->history();
history->skipNotification();
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);

View File

@ -301,7 +301,7 @@ private:
typedef QMap<History*, NotifyWaiter> NotifyWaiters;
NotifyWaiters notifyWaiters;
NotifyWaiters notifySettingWaiters;
QTimer notifyWaitTimer;
SingleTimer notifyWaitTimer;
typedef QMap<uint64, NullType> NotifyWhenAlert;
typedef QMap<History*, NotifyWhenAlert> NotifyWhenAlerts;

View File

@ -38,9 +38,9 @@
02F93BF511880983D3C57B84 /* dialogswidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = E466873F01ABA1E55E914489 /* dialogswidget.cpp */; settings = {ATTRIBUTES = (); }; };
03270F718426CFE84729079E /* flattextarea.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 5C7FD422BBEDA858D7237AE9 /* flattextarea.cpp */; settings = {ATTRIBUTES = (); }; };
06EABCC49D2EEE4076322BE7 /* moc_mtp.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 924D4939FD169BB4B8AEB1C9 /* moc_mtp.cpp */; settings = {ATTRIBUTES = (); }; };
07055CC4194EE85B0008DEF6 /* libcrypto.a in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 07055CC3194EE85B0008DEF6 /* libcrypto.a */; };
0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; };
0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */; };
074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074756181A1372C600CA07F7 /* moc_types.cpp */; };
0749CE69194D723400345D61 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 07C3AF24194335ED0016CFF1 /* Images.xcassets */; };
074FCB8E19D36851004C6EB2 /* contextmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB8C19D36851004C6EB2 /* contextmenu.cpp */; };
074FCB9119D36E60004C6EB2 /* moc_contextmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */; };
@ -249,6 +249,7 @@
0732E4A7199E262300D50FE7 /* overviewwidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = overviewwidget.cpp; path = SourceFiles/overviewwidget.cpp; sourceTree = SOURCE_ROOT; };
0732E4A8199E262300D50FE7 /* overviewwidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = overviewwidget.h; path = SourceFiles/overviewwidget.h; sourceTree = SOURCE_ROOT; };
0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_overviewwidget.cpp; path = GeneratedFiles/Debug/moc_overviewwidget.cpp; sourceTree = SOURCE_ROOT; };
074756181A1372C600CA07F7 /* moc_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_types.cpp; path = GeneratedFiles/Debug/moc_types.cpp; sourceTree = SOURCE_ROOT; };
074FCB8C19D36851004C6EB2 /* contextmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = contextmenu.cpp; path = SourceFiles/gui/contextmenu.cpp; sourceTree = SOURCE_ROOT; };
074FCB8D19D36851004C6EB2 /* contextmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = contextmenu.h; path = SourceFiles/gui/contextmenu.h; sourceTree = SOURCE_ROOT; };
074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_contextmenu.cpp; path = GeneratedFiles/Debug/moc_contextmenu.cpp; sourceTree = SOURCE_ROOT; };
@ -634,7 +635,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
07055CC4194EE85B0008DEF6 /* libcrypto.a in Link Binary With Libraries */,
1BB705CDB741E2B7450201A5 /* Cocoa.framework in Link Binary With Libraries */,
328FD74542F6E2C873EE4D4B /* ApplicationServices.framework in Link Binary With Libraries */,
668DDDA0C55405E7FCFD6CA5 /* CoreServices.framework in Link Binary With Libraries */,
@ -1034,6 +1034,7 @@
801973D3334D0FCA849CF485 /* Debug */ = {
isa = PBXGroup;
children = (
074756181A1372C600CA07F7 /* moc_types.cpp */,
07D8510719F8340A00623D75 /* moc_usernamebox.cpp */,
074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */,
07D703BA19B88FB900C4EED2 /* moc_audio.cpp */,
@ -1444,6 +1445,7 @@
352349751855EF76DECA4D60 /* moc_historywidget.cpp in Compile Sources */,
4B0036C794BEA27AF9419768 /* moc_layerwidget.cpp in Compile Sources */,
C14E6C902F6435B3149ECD64 /* moc_profilewidget.cpp in Compile Sources */,
074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */,
98E4F55DB5D8E64AB9F08C83 /* moc_localimageloader.cpp in Compile Sources */,
A24E4B5B683764E07683ECEC /* moc_mainwidget.cpp in Compile Sources */,
07D8509919F8320900623D75 /* usernamebox.cpp in Compile Sources */,
@ -1680,6 +1682,7 @@
/usr/local/lib/libogg.a,
/usr/local/lib/liblzma.a,
/usr/local/lib/libexif.a,
"../../Libraries/openssl-xcode/libcrypto.a",
);
PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = "";
@ -1821,6 +1824,7 @@
/usr/local/lib/libogg.a,
/usr/local/lib/liblzma.a,
/usr/local/lib/libexif.a,
"../../Libraries/openssl-xcode/libcrypto.a",
);
PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = _debug;

View File

@ -36,7 +36,7 @@ compilers: GeneratedFiles/qrc_telegram.cpp GeneratedFiles/Debug/moc_application.
GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp\
GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_mainwidget.cpp\
GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp\
GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp\
GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp\
GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp\
GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp\
GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp\
@ -91,9 +91,9 @@ GeneratedFiles/qrc_telegram.cpp: SourceFiles/telegram.qrc \
SourceFiles/art/chatcolor2.png
/usr/local/Qt-5.3.1/bin/rcc -name telegram SourceFiles/telegram.qrc -o GeneratedFiles/qrc_telegram.cpp
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_addparticipantbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_newgroupbox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_addparticipantbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_newgroupbox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
compiler_moc_header_clean:
-$(DEL_FILE) GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_addparticipantbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_newgroupbox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
-$(DEL_FILE) GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_addparticipantbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_newgroupbox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
GeneratedFiles/Debug/moc_application.cpp: ../../Libraries/QtStatic/qtbase/include/QtNetwork/QLocalSocket \
../../Libraries/QtStatic/qtbase/include/QtNetwork/QLocalServer \
../../Libraries/QtStatic/qtbase/include/QtNetwork/QNetworkReply \
@ -226,6 +226,13 @@ GeneratedFiles/Debug/moc_title.cpp: ../../Libraries/QtStatic/qtbase/include/QtWi
SourceFiles/title.h
/usr/local/Qt-5.3.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.3.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.3.1/include/QtGui/5.3.1/QtGui -I/usr/local/Qt-5.3.1/include/QtCore/5.3.1/QtCore -I/usr/local/Qt-5.3.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.3.1/include -I/usr/local/Qt-5.3.1/include/QtMultimedia -I/usr/local/Qt-5.3.1/include/QtWidgets -I/usr/local/Qt-5.3.1/include/QtNetwork -I/usr/local/Qt-5.3.1/include/QtGui -I/usr/local/Qt-5.3.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/title.h -o GeneratedFiles/Debug/moc_title.cpp
GeneratedFiles/Debug/moc_types.cpp: SourceFiles/types.h \
../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
../../Libraries/QtStatic/qtbase/include/QtCore/QReadWriteLock \
SourceFiles/logs.h \
../../Libraries/QtStatic/qtbase/include/QtCore/QTimer
/usr/local/Qt-5.3.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.3.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.3.1/include/QtGui/5.3.1/QtGui -I/usr/local/Qt-5.3.1/include/QtCore/5.3.1/QtCore -I/usr/local/Qt-5.3.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.3.1/include -I/usr/local/Qt-5.3.1/include/QtMultimedia -I/usr/local/Qt-5.3.1/include/QtWidgets -I/usr/local/Qt-5.3.1/include/QtNetwork -I/usr/local/Qt-5.3.1/include/QtGui -I/usr/local/Qt-5.3.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/types.h -o GeneratedFiles/Debug/moc_types.cpp
GeneratedFiles/Debug/moc_window.cpp: SourceFiles/title.h \
../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
SourceFiles/sysbuttons.h \