2014-05-30 12:53:19 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2014-12-01 13:47:38 +03:00
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
2014-05-30 12:53:19 +04:00
|
|
|
|
|
|
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
2015-10-03 16:16:42 +03:00
|
|
|
In addition, as a special exception, the copyright holders give permission
|
|
|
|
to link the code of portions of this program with the OpenSSL library.
|
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2017-01-11 22:31:31 +04:00
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
2014-05-30 12:53:19 +04:00
|
|
|
*/
|
2016-03-24 11:57:11 +03:00
|
|
|
|
|
|
|
#define NOMINMAX // no min() and max() macro declarations
|
2014-05-30 12:53:19 +04:00
|
|
|
#define __HUGE
|
2016-04-14 16:03:03 +03:00
|
|
|
|
|
|
|
// Fix Google Breakpad build for Mac App Store version
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
#define __STDC_FORMAT_MACROS
|
|
|
|
#endif // Q_OS_MAC
|
2016-02-01 13:12:37 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2016-01-21 14:58:58 +08:00
|
|
|
|
2016-04-01 12:50:02 +04:00
|
|
|
#include <cmath>
|
|
|
|
|
2016-04-14 16:03:03 +03:00
|
|
|
// False positive warning in clang for QMap member function value:
|
|
|
|
// const T QMap<Key, T>::value(const Key &akey, const T &adefaultValue)
|
|
|
|
// fires with "Returning address of local temporary object" which is not true.
|
|
|
|
#ifdef __clang__
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
#pragma clang diagnostic ignored "-Wreturn-stack-address"
|
|
|
|
#endif // __clang__
|
|
|
|
|
2016-02-27 22:39:51 +03:00
|
|
|
#include <QtCore/QtCore>
|
2016-04-14 16:03:03 +03:00
|
|
|
|
|
|
|
#ifdef __clang__
|
|
|
|
#pragma clang diagnostic pop
|
|
|
|
#endif // __clang__
|
|
|
|
|
2016-08-29 23:24:16 -06:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
|
|
#define OS_MAC_OLD
|
2017-11-19 20:31:58 +04:00
|
|
|
#define RANGES_CXX_THREAD_LOCAL 0
|
2016-08-29 23:24:16 -06:00
|
|
|
#endif // QT_VERSION < 5.5.0
|
2016-04-21 20:57:29 +03:00
|
|
|
|
2016-08-31 11:58:46 -06:00
|
|
|
#ifdef OS_MAC_STORE
|
|
|
|
#define MAC_USE_BREAKPAD
|
|
|
|
#endif // OS_MAC_STORE
|
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
#include <QtWidgets/QtWidgets>
|
2016-02-27 22:39:51 +03:00
|
|
|
#include <QtNetwork/QtNetwork>
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2017-08-13 19:17:16 +03:00
|
|
|
#include <array>
|
|
|
|
#include <vector>
|
|
|
|
#include <set>
|
|
|
|
#include <map>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <memory>
|
2017-11-25 01:05:14 +04:00
|
|
|
|
2017-11-19 18:37:07 +04:00
|
|
|
#include <range/v3/all.hpp>
|
2017-11-25 01:05:14 +04:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
#include "platform/win/windows_range_v3_helpers.h"
|
|
|
|
#endif // Q_OS_WIN
|
2017-08-17 12:06:26 +03:00
|
|
|
|
|
|
|
// Ensures/Expects.
|
|
|
|
#include <gsl/gsl_assert>
|
|
|
|
|
|
|
|
// Redefine Ensures/Expects by our own assertions.
|
|
|
|
#include "base/assertion.h"
|
|
|
|
|
2017-08-13 19:17:16 +03:00
|
|
|
#include <gsl/gsl>
|
2017-09-20 21:40:23 +03:00
|
|
|
#include <rpl/rpl.h>
|
|
|
|
|
2017-08-14 15:47:46 +03:00
|
|
|
#include "base/variant.h"
|
2017-08-14 13:38:23 +03:00
|
|
|
#include "base/optional.h"
|
2017-08-14 15:47:46 +03:00
|
|
|
#include "base/algorithm.h"
|
2017-08-27 14:59:08 +03:00
|
|
|
#include "base/functors.h"
|
|
|
|
|
|
|
|
namespace func = base::functors;
|
2017-08-14 15:47:46 +03:00
|
|
|
|
2017-09-04 14:40:02 +03:00
|
|
|
#include "base/flat_set.h"
|
|
|
|
#include "base/flat_map.h"
|
|
|
|
|
2016-04-13 00:31:28 +03:00
|
|
|
#include "core/basic_types.h"
|
2016-09-29 14:37:16 +03:00
|
|
|
#include "logs.h"
|
|
|
|
#include "core/utils.h"
|
2017-04-06 17:38:10 +03:00
|
|
|
#include "base/lambda.h"
|
2017-09-03 15:43:58 +03:00
|
|
|
#include "base/lambda_guard.h"
|
2014-05-30 12:53:19 +04:00
|
|
|
#include "config.h"
|
|
|
|
|
2016-03-23 21:43:12 +03:00
|
|
|
#include "mtproto/facade.h"
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2016-04-21 20:57:29 +03:00
|
|
|
#include "ui/style/style_core.h"
|
2016-10-28 15:44:28 +03:00
|
|
|
#include "styles/palette.h"
|
2016-04-21 20:57:29 +03:00
|
|
|
#include "styles/style_basic.h"
|
|
|
|
|
2016-04-07 22:05:28 +04:00
|
|
|
#include "ui/animation.h"
|
2016-11-07 14:24:19 +03:00
|
|
|
#include "ui/twidget.h"
|
2016-04-07 22:05:28 +04:00
|
|
|
#include "ui/images.h"
|
2016-04-14 14:00:23 +03:00
|
|
|
#include "ui/text/text.h"
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2017-09-26 14:49:16 +03:00
|
|
|
#include "data/data_types.h"
|
2014-05-30 12:53:19 +04:00
|
|
|
#include "app.h"
|
2016-05-31 12:46:31 +03:00
|
|
|
#include "facades.h"
|
2016-02-01 13:12:37 +03:00
|
|
|
|
2016-03-24 15:57:10 +03:00
|
|
|
#endif // __cplusplus
|