diff --git a/Telegram/SourceFiles/apiwrap.h b/Telegram/SourceFiles/apiwrap.h index 855c2bd68..f0d23a5ee 100644 --- a/Telegram/SourceFiles/apiwrap.h +++ b/Telegram/SourceFiles/apiwrap.h @@ -28,6 +28,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "mtproto/sender.h" #include "base/flat_map.h" #include "base/flat_set.h" +#include "structs.h" +#include "facades.h" class AuthSession; @@ -43,6 +45,8 @@ inline const MTPVector *getChatsFromMessagesChats(const MTPmessages_Cha } // namespace Api +class History; + class ApiWrap : private MTP::Sender, private base::Subscriber { public: ApiWrap(not_null session); diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index bd7b35f89..43cd87348 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -20,10 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include + #include "core/basic_types.h" #include "history/history.h" #include "history/history_item.h" #include "layout.h" +#include "media/media_clip_reader.h" class Messenger; class MainWindow; diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index f4e45024e..0fd477a60 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -20,8 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include "stdafx.h" #include +#include +#include + +class Messenger; class Application : public QApplication { Q_OBJECT diff --git a/Telegram/SourceFiles/auth_session.h b/Telegram/SourceFiles/auth_session.h index 3124a26b3..412de760a 100644 --- a/Telegram/SourceFiles/auth_session.h +++ b/Telegram/SourceFiles/auth_session.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "base/timer.h" +#include "structs.h" namespace Storage { class Downloader; @@ -43,6 +44,8 @@ enum class SelectorTab; } // namespace ChatHelpers class ApiWrap; +class History; +class HistoryItem; class AuthSessionData final { public: diff --git a/Telegram/SourceFiles/base/algorithm.h b/Telegram/SourceFiles/base/algorithm.h index e3aafda87..0b03ec674 100644 --- a/Telegram/SourceFiles/base/algorithm.h +++ b/Telegram/SourceFiles/base/algorithm.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include + namespace base { // @todo use ranges-v3 here diff --git a/Telegram/SourceFiles/base/assertion.h b/Telegram/SourceFiles/base/assertion.h index cd638d563..2d0ea39a5 100644 --- a/Telegram/SourceFiles/base/assertion.h +++ b/Telegram/SourceFiles/base/assertion.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include namespace base { namespace assertion { diff --git a/Telegram/SourceFiles/base/flat_map.h b/Telegram/SourceFiles/base/flat_map.h index d1dc28fd3..4f90b5e63 100644 --- a/Telegram/SourceFiles/base/flat_map.h +++ b/Telegram/SourceFiles/base/flat_map.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include #include "base/optional.h" namespace base { diff --git a/Telegram/SourceFiles/base/flat_set.h b/Telegram/SourceFiles/base/flat_set.h index 7e578d334..449b680fe 100644 --- a/Telegram/SourceFiles/base/flat_set.h +++ b/Telegram/SourceFiles/base/flat_set.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include namespace base { diff --git a/Telegram/SourceFiles/base/functors.h b/Telegram/SourceFiles/base/functors.h index bdf905e1e..72f161b7c 100644 --- a/Telegram/SourceFiles/base/functors.h +++ b/Telegram/SourceFiles/base/functors.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + namespace base { namespace functors { diff --git a/Telegram/SourceFiles/base/lambda_guard.h b/Telegram/SourceFiles/base/lambda_guard.h index c68825d3c..c28a5ed40 100644 --- a/Telegram/SourceFiles/base/lambda_guard.h +++ b/Telegram/SourceFiles/base/lambda_guard.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include "base/lambda.h" namespace base { diff --git a/Telegram/SourceFiles/base/observer.cpp b/Telegram/SourceFiles/base/observer.cpp index 071470da6..377ef0101 100644 --- a/Telegram/SourceFiles/base/observer.cpp +++ b/Telegram/SourceFiles/base/observer.cpp @@ -19,6 +19,7 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "base/observer.h" +#include "facades.h" namespace base { namespace internal { diff --git a/Telegram/SourceFiles/base/observer.h b/Telegram/SourceFiles/base/observer.h index 2ddd09d9c..c0d6cf0cb 100644 --- a/Telegram/SourceFiles/base/observer.h +++ b/Telegram/SourceFiles/base/observer.h @@ -23,7 +23,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include #include +#include "base/assertion.h" +#include "base/lambda.h" #include "base/type_traits.h" +#include "core/utils.h" namespace base { namespace internal { diff --git a/Telegram/SourceFiles/base/openssl_help.h b/Telegram/SourceFiles/base/openssl_help.h index c17b60c69..d00af74ea 100644 --- a/Telegram/SourceFiles/base/openssl_help.h +++ b/Telegram/SourceFiles/base/openssl_help.h @@ -24,6 +24,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include +#include "base/assertion.h" +#include "core/utils.h" namespace openssl { class Context { diff --git a/Telegram/SourceFiles/base/ordered_set.h b/Telegram/SourceFiles/base/ordered_set.h index 9305be4b9..51c02c8ff 100644 --- a/Telegram/SourceFiles/base/ordered_set.h +++ b/Telegram/SourceFiles/base/ordered_set.h @@ -20,7 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include +#include // ordered set template based on QMap template diff --git a/Telegram/SourceFiles/base/parse_helper.h b/Telegram/SourceFiles/base/parse_helper.h index 064736b89..7b1b553a9 100644 --- a/Telegram/SourceFiles/base/parse_helper.h +++ b/Telegram/SourceFiles/base/parse_helper.h @@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "base/assertion.h" + + namespace base { namespace parse { diff --git a/Telegram/SourceFiles/base/qthelp_regex.h b/Telegram/SourceFiles/base/qthelp_regex.h index 39c7739d0..398503483 100644 --- a/Telegram/SourceFiles/base/qthelp_regex.h +++ b/Telegram/SourceFiles/base/qthelp_regex.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + #include "base/flags.h" namespace qthelp { diff --git a/Telegram/SourceFiles/base/qthelp_url.cpp b/Telegram/SourceFiles/base/qthelp_url.cpp index d3c4d9b1c..4f04c013a 100644 --- a/Telegram/SourceFiles/base/qthelp_url.cpp +++ b/Telegram/SourceFiles/base/qthelp_url.cpp @@ -18,6 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "core/utils.h" #include "base/qthelp_url.h" namespace qthelp { @@ -32,7 +34,7 @@ QMap url_parse_params(const QString ¶ms, UrlParamNameTrans return name; }; - auto paramsList = params.split('&'); + auto paramsList = params.split('&'); for_const (auto ¶m, paramsList) { // Skip params without a name (starting with '='). if (auto separatorPosition = param.indexOf('=')) { diff --git a/Telegram/SourceFiles/base/qthelp_url.h b/Telegram/SourceFiles/base/qthelp_url.h index 5b4204597..de86b77f3 100644 --- a/Telegram/SourceFiles/base/qthelp_url.h +++ b/Telegram/SourceFiles/base/qthelp_url.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include + namespace qthelp { inline QString url_encode(const QString &part) { diff --git a/Telegram/SourceFiles/base/runtime_composer.cpp b/Telegram/SourceFiles/base/runtime_composer.cpp index 3c9148e54..2abbe86d6 100644 --- a/Telegram/SourceFiles/base/runtime_composer.cpp +++ b/Telegram/SourceFiles/base/runtime_composer.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "base/runtime_composer.h" struct RuntimeComposerMetadatasMap { diff --git a/Telegram/SourceFiles/base/runtime_composer.h b/Telegram/SourceFiles/base/runtime_composer.h index 4afd18608..4af9ba0cd 100644 --- a/Telegram/SourceFiles/base/runtime_composer.h +++ b/Telegram/SourceFiles/base/runtime_composer.h @@ -19,6 +19,11 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include + +#include "base/assertion.h" +#include "core/utils.h" class RuntimeComposer; typedef void(*RuntimeComponentConstruct)(void *location, RuntimeComposer *composer); diff --git a/Telegram/SourceFiles/base/task_queue.cpp b/Telegram/SourceFiles/base/task_queue.cpp index b31d07a5d..c54ae16db 100644 --- a/Telegram/SourceFiles/base/task_queue.cpp +++ b/Telegram/SourceFiles/base/task_queue.cpp @@ -18,10 +18,15 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "base/task_queue.h" +#include #include #include +#include +#include +#include "base/assertion.h" +#include "base/task_queue.h" +#include "facades.h" namespace base { namespace { diff --git a/Telegram/SourceFiles/base/task_queue.h b/Telegram/SourceFiles/base/task_queue.h index f444e8d0a..aae696cb0 100644 --- a/Telegram/SourceFiles/base/task_queue.h +++ b/Telegram/SourceFiles/base/task_queue.h @@ -21,6 +21,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include +#include +#include "base/lambda.h" +#include "core/utils.h" namespace base { diff --git a/Telegram/SourceFiles/base/timer.cpp b/Telegram/SourceFiles/base/timer.cpp index d7438179e..c590c5c78 100644 --- a/Telegram/SourceFiles/base/timer.cpp +++ b/Telegram/SourceFiles/base/timer.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "base/timer.h" namespace base { diff --git a/Telegram/SourceFiles/base/type_traits.h b/Telegram/SourceFiles/base/type_traits.h index 4979ce656..b2c779686 100644 --- a/Telegram/SourceFiles/base/type_traits.h +++ b/Telegram/SourceFiles/base/type_traits.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + namespace base { template diff --git a/Telegram/SourceFiles/base/weak_unique_ptr.h b/Telegram/SourceFiles/base/weak_unique_ptr.h index 7ae74f12f..0bdf7f69d 100644 --- a/Telegram/SourceFiles/base/weak_unique_ptr.h +++ b/Telegram/SourceFiles/base/weak_unique_ptr.h @@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include // @todo replace this with std::experimental::observer_ptr +#include +#include namespace base { @@ -131,11 +134,11 @@ weak_unique_ptr make_weak_unique(const std::unique_ptr &value) { #ifdef QT_VERSION template inline void InvokeQueued(base::enable_weak_from_this *context, Lambda &&lambda) { - QObject proxy; - QObject::connect(&proxy, &QObject::destroyed, QCoreApplication::instance(), [guard = base::make_weak_unique(context), lambda = std::forward(lambda)] { - if (guard) { - lambda(); - } - }, Qt::QueuedConnection); + QObject proxy; + QObject::connect(&proxy, &QObject::destroyed, QCoreApplication::instance(), [guard = base::make_weak_unique(context), lambda = std::forward(lambda)] { + if (guard) { + lambda(); + } + }, Qt::QueuedConnection); } #endif // QT_VERSION diff --git a/Telegram/SourceFiles/base/zlib_help.h b/Telegram/SourceFiles/base/zlib_help.h index e9b380c47..6873142b1 100644 --- a/Telegram/SourceFiles/base/zlib_help.h +++ b/Telegram/SourceFiles/base/zlib_help.h @@ -23,9 +23,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + #include "minizip/zip.h" #include "minizip/unzip.h" +#include "logs.h" + namespace zlib { namespace internal { diff --git a/Telegram/SourceFiles/boxes/about_box.cpp b/Telegram/SourceFiles/boxes/about_box.cpp index 649d321ec..5b395bd5b 100644 --- a/Telegram/SourceFiles/boxes/about_box.cpp +++ b/Telegram/SourceFiles/boxes/about_box.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "boxes/about_box.h" #include "config.h" diff --git a/Telegram/SourceFiles/boxes/abstract_box.cpp b/Telegram/SourceFiles/boxes/abstract_box.cpp index f0662a0a4..6a69446a6 100644 --- a/Telegram/SourceFiles/boxes/abstract_box.cpp +++ b/Telegram/SourceFiles/boxes/abstract_box.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "boxes/abstract_box.h" #include "styles/style_boxes.h" diff --git a/Telegram/SourceFiles/boxes/abstract_box.h b/Telegram/SourceFiles/boxes/abstract_box.h index 90a3b2775..4bc14265d 100644 --- a/Telegram/SourceFiles/boxes/abstract_box.h +++ b/Telegram/SourceFiles/boxes/abstract_box.h @@ -20,8 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include "layerwidget.h" +#include "base/lambda.h" +#include "base/observer.h" +#include "ui/text/text_entity.h" #include "ui/widgets/shadow.h" +#include "ui/twidget.h" +#include "layerwidget.h" namespace Ui { class RoundButton; diff --git a/Telegram/SourceFiles/boxes/autolock_box.cpp b/Telegram/SourceFiles/boxes/autolock_box.cpp index c0a1d1af5..9c9f9b91a 100644 --- a/Telegram/SourceFiles/boxes/autolock_box.cpp +++ b/Telegram/SourceFiles/boxes/autolock_box.cpp @@ -25,7 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "mainwindow.h" #include "ui/widgets/checkbox.h" #include "styles/style_boxes.h" - +#include "facades.h" void AutoLockBox::prepare() { setTitle(langFactory(lng_passcode_autolock)); diff --git a/Telegram/SourceFiles/boxes/change_phone_box.cpp b/Telegram/SourceFiles/boxes/change_phone_box.cpp index 8a2659f7c..a02171f8a 100644 --- a/Telegram/SourceFiles/boxes/change_phone_box.cpp +++ b/Telegram/SourceFiles/boxes/change_phone_box.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "base/lambda_guard.h" #include "boxes/change_phone_box.h" - #include "lang/lang_keys.h" #include "styles/style_boxes.h" #include "ui/widgets/labels.h" @@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "boxes/confirm_phone_box.h" #include "ui/toast/toast.h" #include "boxes/confirm_box.h" +#include "facades.h" namespace { diff --git a/Telegram/SourceFiles/boxes/confirm_box.h b/Telegram/SourceFiles/boxes/confirm_box.h index fae83c0a3..09814fe7c 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.h +++ b/Telegram/SourceFiles/boxes/confirm_box.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "boxes/abstract_box.h" +#include "history/history.h" namespace Ui { class Checkbox; diff --git a/Telegram/SourceFiles/boxes/download_path_box.cpp b/Telegram/SourceFiles/boxes/download_path_box.cpp index b2dfa61a4..ade2c5bd7 100644 --- a/Telegram/SourceFiles/boxes/download_path_box.cpp +++ b/Telegram/SourceFiles/boxes/download_path_box.cpp @@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "ui/widgets/buttons.h" #include "platform/platform_specific.h" #include "styles/style_boxes.h" +#include "facades.h" DownloadPathBox::DownloadPathBox(QWidget *parent) : _path(Global::DownloadPath()) diff --git a/Telegram/SourceFiles/boxes/edit_color_box.cpp b/Telegram/SourceFiles/boxes/edit_color_box.cpp index 741515072..35c4eb857 100644 --- a/Telegram/SourceFiles/boxes/edit_color_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_color_box.cpp @@ -25,6 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "ui/widgets/shadow.h" #include "styles/style_mediaview.h" #include "ui/widgets/input_fields.h" +#include "app.h" class EditColorBox::Picker : public TWidget { public: diff --git a/Telegram/SourceFiles/boxes/edit_participant_box.cpp b/Telegram/SourceFiles/boxes/edit_participant_box.cpp index 078ba142d..e3ba35d60 100644 --- a/Telegram/SourceFiles/boxes/edit_participant_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_participant_box.cpp @@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "styles/style_boxes.h" #include "ui/special_buttons.h" #include "boxes/calendar_box.h" +#include "facades.h" namespace { diff --git a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp index 16f40322b..66018fed2 100644 --- a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "base/lambda_guard.h" #include "boxes/edit_privacy_box.h" #include "styles/style_boxes.h" @@ -30,6 +31,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "auth_session.h" #include "lang/lang_keys.h" + namespace { class PrivacyExceptionsBoxController : public ChatsListBoxController { diff --git a/Telegram/SourceFiles/boxes/language_box.cpp b/Telegram/SourceFiles/boxes/language_box.cpp index 10225dd56..0ce1be712 100644 --- a/Telegram/SourceFiles/boxes/language_box.cpp +++ b/Telegram/SourceFiles/boxes/language_box.cpp @@ -19,7 +19,6 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "boxes/language_box.h" - #include "lang/lang_keys.h" #include "ui/widgets/checkbox.h" #include "ui/widgets/buttons.h" diff --git a/Telegram/SourceFiles/boxes/local_storage_box.cpp b/Telegram/SourceFiles/boxes/local_storage_box.cpp index c6462715b..ec5778c4a 100644 --- a/Telegram/SourceFiles/boxes/local_storage_box.cpp +++ b/Telegram/SourceFiles/boxes/local_storage_box.cpp @@ -26,6 +26,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "lang/lang_keys.h" #include "mainwindow.h" #include "auth_session.h" +#include "facades.h" LocalStorageBox::LocalStorageBox(QWidget *parent) : _clear(this, lang(lng_local_storage_clear), st::boxLinkButton) { diff --git a/Telegram/SourceFiles/boxes/notifications_box.h b/Telegram/SourceFiles/boxes/notifications_box.h index faadc2eca..1149ce481 100644 --- a/Telegram/SourceFiles/boxes/notifications_box.h +++ b/Telegram/SourceFiles/boxes/notifications_box.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "boxes/abstract_box.h" +#include "facades.h" namespace Ui { class LinkButton; diff --git a/Telegram/SourceFiles/boxes/passcode_box.cpp b/Telegram/SourceFiles/boxes/passcode_box.cpp index 7b1dcb9b7..91494147e 100644 --- a/Telegram/SourceFiles/boxes/passcode_box.cpp +++ b/Telegram/SourceFiles/boxes/passcode_box.cpp @@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "styles/style_boxes.h" #include "ui/widgets/buttons.h" #include "ui/widgets/input_fields.h" +#include "facades.h" PasscodeBox::PasscodeBox(QWidget*, bool turningOff) : _turningOff(turningOff) diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index 9357c3ff4..60dbd798d 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "base/algorithm.h" #include "boxes/peer_list_box.h" #include "styles/style_boxes.h" diff --git a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp index 23a7e2a55..2e30ff4d8 100644 --- a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "base/algorithm.h" #include "boxes/peer_list_controllers.h" - #include "styles/style_boxes.h" #include "styles/style_profile.h" #include "boxes/confirm_box.h" diff --git a/Telegram/SourceFiles/boxes/peer_list_controllers.h b/Telegram/SourceFiles/boxes/peer_list_controllers.h index de0952580..14d2fbcd3 100644 --- a/Telegram/SourceFiles/boxes/peer_list_controllers.h +++ b/Telegram/SourceFiles/boxes/peer_list_controllers.h @@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "boxes/peer_list_box.h" #include "base/flat_set.h" #include "base/weak_unique_ptr.h" +#include "history/history.h" // Not used for now. // diff --git a/Telegram/SourceFiles/boxes/report_box.cpp b/Telegram/SourceFiles/boxes/report_box.cpp index 81b0a2cb8..7f599ceef 100644 --- a/Telegram/SourceFiles/boxes/report_box.cpp +++ b/Telegram/SourceFiles/boxes/report_box.cpp @@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "ui/widgets/buttons.h" #include "ui/widgets/input_fields.h" #include "mainwindow.h" +#include "facades.h" ReportBox::ReportBox(QWidget*, PeerData *peer) : _peer(peer) , _reasonGroup(std::make_shared>(Reason::Spam)) diff --git a/Telegram/SourceFiles/boxes/send_files_box.h b/Telegram/SourceFiles/boxes/send_files_box.h index 724b0689b..172d858a5 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.h +++ b/Telegram/SourceFiles/boxes/send_files_box.h @@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "boxes/abstract_box.h" #include "storage/localimageloader.h" +#include "history/history_media.h" namespace Ui { class Checkbox; diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index b9da6b0da..4738c3f3e 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -18,8 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "calls/calls_call.h" +#include "core/utils.h" +#include "calls/calls_call.h" #include "auth_session.h" #include "mainwidget.h" #include "lang/lang_keys.h" diff --git a/Telegram/SourceFiles/calls/calls_emoji_fingerprint.h b/Telegram/SourceFiles/calls/calls_emoji_fingerprint.h index 9fe4c7279..4596ed109 100644 --- a/Telegram/SourceFiles/calls/calls_emoji_fingerprint.h +++ b/Telegram/SourceFiles/calls/calls_emoji_fingerprint.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "settings.h" + namespace Calls { class Call; diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp index 9bb9447f8..8f620fe6b 100644 --- a/Telegram/SourceFiles/calls/calls_instance.cpp +++ b/Telegram/SourceFiles/calls/calls_instance.cpp @@ -18,6 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ + +#include +#include +#include +#include #include "calls/calls_instance.h" #include "mtproto/connection.h" diff --git a/Telegram/SourceFiles/calls/calls_panel.cpp b/Telegram/SourceFiles/calls/calls_panel.cpp index 69c8e3b83..16863c585 100644 --- a/Telegram/SourceFiles/calls/calls_panel.cpp +++ b/Telegram/SourceFiles/calls/calls_panel.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "calls/calls_panel.h" #include "calls/calls_emoji_fingerprint.h" diff --git a/Telegram/SourceFiles/calls/calls_top_bar.h b/Telegram/SourceFiles/calls/calls_top_bar.h index 67d3e395b..bcc930304 100644 --- a/Telegram/SourceFiles/calls/calls_top_bar.h +++ b/Telegram/SourceFiles/calls/calls_top_bar.h @@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/weak_unique_ptr.h" #include "base/timer.h" +#include "ui/twidget.h" namespace Ui { class IconButton; diff --git a/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp b/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp index a1603aa1a..70fa2e97c 100644 --- a/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp +++ b/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp @@ -18,10 +18,12 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "chat_helpers/bot_keyboard.h" #include "styles/style_widgets.h" #include "styles/style_history.h" +#include "facades.h" BotKeyboard::BotKeyboard(QWidget *parent) : TWidget(parent) , _st(&st::botKbButton) { diff --git a/Telegram/SourceFiles/chat_helpers/bot_keyboard.h b/Telegram/SourceFiles/chat_helpers/bot_keyboard.h index 4ef072dd7..450779cff 100644 --- a/Telegram/SourceFiles/chat_helpers/bot_keyboard.h +++ b/Telegram/SourceFiles/chat_helpers/bot_keyboard.h @@ -20,7 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "history/history_item.h" +#include "ui/twidget.h" #include "ui/widgets/tooltip.h" +#include "structs.h" + +class HistoryItem; class BotKeyboard : public TWidget, public Ui::AbstractTooltipShower, public ClickHandlerHost { Q_OBJECT diff --git a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp index e2914d7b0..e2bfb3cad 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "chat_helpers/emoji_suggestions_widget.h" #include "chat_helpers/emoji_suggestions_helper.h" @@ -26,6 +27,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "platform/platform_specific.h" #include "styles/style_chat_helpers.h" #include "ui/widgets/inner_dropdown.h" +#include "ui/emoji_config.h" +#include "app.h" namespace Ui { namespace Emoji { @@ -121,7 +124,7 @@ std::vector SuggestionsWidget::getRowsByQuery() const { suggestionsEmoji[i] = Find(QStringFromUTF16(suggestions[i].emoji())); } auto recents = 0; - auto &recent = GetRecent(); + auto &recent = GetRecent(); for (auto &item : recent) { auto emoji = item.first->original(); if (!emoji) emoji = item.first; diff --git a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.h b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.h index 5fce90a30..3ba07972a 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.h +++ b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/observer.h" +#include "ui/twidget.h" #include "ui/effects/panel_animation.h" namespace Ui { diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h index 4712d4d8a..65bb88d90 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h @@ -20,7 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/observer.h" #include "ui/twidget.h" +#include "ui/animation.h" +#include "structs.h" namespace Ui { class ScrollArea; diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index f41ddbb6f..d5ae0eb7f 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -18,6 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include + #include "chat_helpers/message_field.h" #include "history/history_widget.h" diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp index b3703991a..53e41cd45 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "chat_helpers/tabbed_panel.h" #include "ui/widgets/shadow.h" diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.h b/Telegram/SourceFiles/chat_helpers/tabbed_panel.h index a7175b5c2..3347ea040 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.h +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "ui/twidget.h" +#include "ui/animation.h" #include "base/timer.h" namespace Window { diff --git a/Telegram/SourceFiles/config.h.in b/Telegram/SourceFiles/config.h.in index 783ed1516..ee6dbc8a5 100644 --- a/Telegram/SourceFiles/config.h.in +++ b/Telegram/SourceFiles/config.h.in @@ -20,8 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#ifdef Q_OS_WIN +# include +#endif #include "core/version.h" #include "settings.h" +#include "utils.h" constexpr str_const AppName = "${KEPKA_APPNAME}"; @@ -142,6 +147,7 @@ inline bool isServiceUser(quint64 id) { } #ifdef Q_OS_WIN +#include inline const GUID &cGUID() { #ifndef OS_MAC_STORE static const GUID gGuid = { 0x87a94ab0, 0xe370, 0x4cde, { 0x98, 0xd3, 0xac, 0xc1, 0x10, 0xc5, 0x96, 0x7d } }; diff --git a/Telegram/SourceFiles/core/basic_types.h b/Telegram/SourceFiles/core/basic_types.h index 86cc0364f..461b68a63 100644 --- a/Telegram/SourceFiles/core/basic_types.h +++ b/Telegram/SourceFiles/core/basic_types.h @@ -24,15 +24,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include #include - +#include +#include +#include +#include #include "base/build_config.h" +#include "base/ordered_set.h" template using not_null = gsl::not_null; -#include "base/ordered_set.h" - -#include - #define qsl(s) QStringLiteral(s) #define qstr(s) QLatin1String(s, static_cast(sizeof(s)-1)) diff --git a/Telegram/SourceFiles/core/click_handler.cpp b/Telegram/SourceFiles/core/click_handler.cpp index 46e74f3c2..cba214d55 100644 --- a/Telegram/SourceFiles/core/click_handler.cpp +++ b/Telegram/SourceFiles/core/click_handler.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "ui/text/text_entity.h" #include "core/click_handler.h" ClickHandlerHost::~ClickHandlerHost() { diff --git a/Telegram/SourceFiles/core/click_handler.h b/Telegram/SourceFiles/core/click_handler.h index 734c98c79..564a50b51 100644 --- a/Telegram/SourceFiles/core/click_handler.h +++ b/Telegram/SourceFiles/core/click_handler.h @@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + +#include "core/utils.h" +#include "base/lambda.h" + class ClickHandler; using ClickHandlerPtr = QSharedPointer; diff --git a/Telegram/SourceFiles/core/click_handler_types.cpp b/Telegram/SourceFiles/core/click_handler_types.cpp index 0c47420ee..538764c51 100644 --- a/Telegram/SourceFiles/core/click_handler_types.cpp +++ b/Telegram/SourceFiles/core/click_handler_types.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "core/click_handler_types.h" #include "lang/lang_keys.h" @@ -29,6 +30,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "storage/localstorage.h" #include "ui/widgets/tooltip.h" #include "core/file_utilities.h" +#include "facades.h" namespace { diff --git a/Telegram/SourceFiles/core/click_handler_types.h b/Telegram/SourceFiles/core/click_handler_types.h index fe8b82068..274abde78 100644 --- a/Telegram/SourceFiles/core/click_handler_types.h +++ b/Telegram/SourceFiles/core/click_handler_types.h @@ -20,7 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include #include "core/click_handler.h" +#include "structs.h" class TextClickHandler : public ClickHandler { public: diff --git a/Telegram/SourceFiles/core/file_utilities.cpp b/Telegram/SourceFiles/core/file_utilities.cpp index e96946bd8..4bfa85f3b 100644 --- a/Telegram/SourceFiles/core/file_utilities.cpp +++ b/Telegram/SourceFiles/core/file_utilities.cpp @@ -18,6 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include #include "core/file_utilities.h" #include "mainwindow.h" diff --git a/Telegram/SourceFiles/core/file_utilities.h b/Telegram/SourceFiles/core/file_utilities.h index 922021f3d..39f034be6 100644 --- a/Telegram/SourceFiles/core/file_utilities.h +++ b/Telegram/SourceFiles/core/file_utilities.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include #include "base/observer.h" // legacy diff --git a/Telegram/SourceFiles/core/single_timer.h b/Telegram/SourceFiles/core/single_timer.h index 678c21b33..a25b4a9d9 100644 --- a/Telegram/SourceFiles/core/single_timer.h +++ b/Telegram/SourceFiles/core/single_timer.h @@ -20,8 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include #include "core/basic_types.h" - +#include "core/utils.h" class SingleTimer : public QTimer { // single shot timer with check Q_OBJECT diff --git a/Telegram/SourceFiles/core/utils.cpp b/Telegram/SourceFiles/core/utils.cpp index 8a789e0b4..6386da5c9 100644 --- a/Telegram/SourceFiles/core/utils.cpp +++ b/Telegram/SourceFiles/core/utils.cpp @@ -18,6 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include #include "core/utils.h" #include diff --git a/Telegram/SourceFiles/core/utils.h b/Telegram/SourceFiles/core/utils.h index bebadbb32..6c8005e84 100644 --- a/Telegram/SourceFiles/core/utils.h +++ b/Telegram/SourceFiles/core/utils.h @@ -20,8 +20,19 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include +#include +#include +#include + +#include "base/assertion.h" #include "core/basic_types.h" #include "base/flags.h" +#include "logs.h" // Define specializations for QByteArray for Qt 5.3.2, because // QByteArray in Qt 5.3.2 doesn't declare "pointer" subtype. @@ -218,11 +229,11 @@ private: }; inline QString str_const_toString(const str_const &str) { - return QString::fromUtf8(str.c_str(), str.size()); + return QString::fromUtf8(str.c_str(), static_cast(str.size())); } inline QByteArray str_const_toByteArray(const str_const &str) { - return QByteArray::fromRawData(str.c_str(), str.size()); + return QByteArray::fromRawData(str.c_str(), static_cast(str.size())); } template diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 752d58f8c..662a9a9df 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -21,7 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include -// #include "core/utils.h" +#include "utils.h" #define BETA_VERSION_MACRO (0ULL) diff --git a/Telegram/SourceFiles/data/data_abstract_structure.cpp b/Telegram/SourceFiles/data/data_abstract_structure.cpp index d2278e185..a90dceff5 100644 --- a/Telegram/SourceFiles/data/data_abstract_structure.cpp +++ b/Telegram/SourceFiles/data/data_abstract_structure.cpp @@ -18,6 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "base/ordered_set.h" +#include "core/utils.h" #include "data/data_abstract_structure.h" namespace Data { diff --git a/Telegram/SourceFiles/data/data_drafts.h b/Telegram/SourceFiles/data/data_drafts.h index 336663f27..f49d4a5f5 100644 --- a/Telegram/SourceFiles/data/data_drafts.h +++ b/Telegram/SourceFiles/data/data_drafts.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "structs.h" +#include "history/history.h" + namespace Ui { class FlatTextarea; } // namespace Ui diff --git a/Telegram/SourceFiles/dialogs/dialogs_common.h b/Telegram/SourceFiles/dialogs/dialogs_common.h index f0f5b336d..6f6a3f974 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_common.h +++ b/Telegram/SourceFiles/dialogs/dialogs_common.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + namespace Dialogs { class Row; diff --git a/Telegram/SourceFiles/dialogs/dialogs_indexed_list.cpp b/Telegram/SourceFiles/dialogs/dialogs_indexed_list.cpp index 1c84fe4a9..c8f79afa7 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_indexed_list.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_indexed_list.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "history/history.h" #include "dialogs/dialogs_indexed_list.h" namespace Dialogs { diff --git a/Telegram/SourceFiles/dialogs/dialogs_indexed_list.h b/Telegram/SourceFiles/dialogs/dialogs_indexed_list.h index d550c5859..7c50f6c8c 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_indexed_list.h +++ b/Telegram/SourceFiles/dialogs/dialogs_indexed_list.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "structs.h" #include "dialogs/dialogs_common.h" #include "dialogs/dialogs_list.h" diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h index 0ce5443d5..c736f62b7 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h @@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "dialogs/dialogs_widget.h" #include "base/flags.h" +#include "facades.h" namespace Dialogs { class Row; diff --git a/Telegram/SourceFiles/dialogs/dialogs_layout.cpp b/Telegram/SourceFiles/dialogs/dialogs_layout.cpp index aaf9cc423..04590e3e1 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_layout.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_layout.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "app.h" #include "dialogs/dialogs_layout.h" - #include "data/data_abstract_structure.h" #include "data/data_drafts.h" #include "dialogs/dialogs_list.h" diff --git a/Telegram/SourceFiles/dialogs/dialogs_layout.h b/Telegram/SourceFiles/dialogs/dialogs_layout.h index 5770029a7..4db0bd8d0 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_layout.h +++ b/Telegram/SourceFiles/dialogs/dialogs_layout.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "ui/twidget.h" +#include "dialogs/dialogs_common.h" + namespace Dialogs { class Row; diff --git a/Telegram/SourceFiles/dialogs/dialogs_list.h b/Telegram/SourceFiles/dialogs/dialogs_list.h index b97a04c2f..577ad737c 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_list.h +++ b/Telegram/SourceFiles/dialogs/dialogs_list.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "structs.h" +#include "dialogs/dialogs_common.h" #include "dialogs/dialogs_row.h" class PeerData; diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index 92823d213..a052212bd 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "dialogs/dialogs_widget.h" - #include "dialogs/dialogs_inner_widget.h" #include "dialogs/dialogs_search_from_controllers.h" #include "styles/style_dialogs.h" diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.h b/Telegram/SourceFiles/dialogs/dialogs_widget.h index f7984ec36..fd2bc52b1 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.h +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.h @@ -22,6 +22,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "window/section_widget.h" #include "ui/widgets/scroll_area.h" +#include "structs.h" +#include "dialogs/dialogs_common.h" class DialogsInner; @@ -55,6 +57,8 @@ enum DialogsSearchRequestType { DialogsSearchMigratedFromOffset, }; +class History; + class DialogsWidget : public Window::AbstractSectionWidget, public RPCSender { Q_OBJECT diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index dc27836cc..a9af1d734 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -22,6 +22,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/type_traits.h" #include "base/observer.h" +#include "base/lambda_guard.h" +#include "core/click_handler.h" +#include "scheme.h" +#include "app.h" +#include "ui/twidget.h" +#include "history/history_item.h" class LayerWidget; class BoxContent; diff --git a/Telegram/SourceFiles/history/history.h b/Telegram/SourceFiles/history/history.h index 4b76c9d87..c28f5349c 100644 --- a/Telegram/SourceFiles/history/history.h +++ b/Telegram/SourceFiles/history/history.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "ui/animation.h" #include "structs.h" #include "dialogs/dialogs_common.h" #include "ui/effects/send_action_animations.h" @@ -28,6 +29,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/variant.h" #include "base/flat_set.h" #include "base/flags.h" +#include "base/optional.h" void HistoryInit(); diff --git a/Telegram/SourceFiles/history/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/history_admin_log_inner.cpp index 7cbc132f1..36fbafb84 100644 --- a/Telegram/SourceFiles/history/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/history_admin_log_inner.cpp @@ -18,8 +18,10 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "history/history_admin_log_inner.h" +#include +#include "history/history_admin_log_item.h" +#include "history/history_admin_log_inner.h" #include "styles/style_history.h" #include "history/history_media_types.h" #include "history/history_message.h" diff --git a/Telegram/SourceFiles/history/history_admin_log_inner.h b/Telegram/SourceFiles/history/history_admin_log_inner.h index 3b2cf3ba3..b4bfc29ea 100644 --- a/Telegram/SourceFiles/history/history_admin_log_inner.h +++ b/Telegram/SourceFiles/history/history_admin_log_inner.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include #include "history/history_admin_log_item.h" #include "history/history_admin_log_section.h" #include "ui/widgets/tooltip.h" diff --git a/Telegram/SourceFiles/history/history_admin_log_item.h b/Telegram/SourceFiles/history/history_admin_log_item.h index d239d0cfd..ef7c71da9 100644 --- a/Telegram/SourceFiles/history/history_admin_log_item.h +++ b/Telegram/SourceFiles/history/history_admin_log_item.h @@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/lambda.h" +#include "core/basic_types.h" +#include "core/utils.h" +#include "history/history_item.h" + +class History; + namespace AdminLog { class HistoryItemOwned; diff --git a/Telegram/SourceFiles/history/history_drag_area.h b/Telegram/SourceFiles/history/history_drag_area.h index 875b41512..1637a2297 100644 --- a/Telegram/SourceFiles/history/history_drag_area.h +++ b/Telegram/SourceFiles/history/history_drag_area.h @@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/lambda.h" #include "ui/twidget.h" +#include "ui/animation.h" class DragArea : public TWidget { Q_OBJECT diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 404137e5e..14515cced 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "history/history_inner_widget.h" - #include "styles/style_history.h" #include "core/file_utilities.h" #include "history/history_message.h" diff --git a/Telegram/SourceFiles/history/history_inner_widget.h b/Telegram/SourceFiles/history/history_inner_widget.h index 2e8139586..52dab754d 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.h +++ b/Telegram/SourceFiles/history/history_inner_widget.h @@ -20,9 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "ui/widgets/tooltip.h" #include "ui/widgets/scroll_area.h" #include "window/top_bar_widget.h" +#include "history/history.h" +#include "history/history_item.h" namespace Window { class Controller; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 884e62116..007f33a43 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -18,8 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include #include "history/history_item.h" - #include "lang/lang_keys.h" #include "mainwidget.h" #include "history/history_service_layout.h" diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h index 43567fce6..3fdd197b9 100644 --- a/Telegram/SourceFiles/history/history_item.h +++ b/Telegram/SourceFiles/history/history_item.h @@ -22,6 +22,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/runtime_composer.h" #include "base/flags.h" +#include "core/click_handler.h" +#include "ui/animation.h" +#include "ui/text/text.h" +#include "structs.h" +#include "history/history.h" +#include "ui/animation.h" namespace Ui { class RippleAnimation; @@ -32,6 +38,8 @@ struct BotKeyboardButton; struct RippleAnimation; } // namespace style +class HistoryItem; + class HistoryElement { public: HistoryElement() = default; diff --git a/Telegram/SourceFiles/history/history_location_manager.cpp b/Telegram/SourceFiles/history/history_location_manager.cpp index 09f86942e..2e3bf2b52 100644 --- a/Telegram/SourceFiles/history/history_location_manager.cpp +++ b/Telegram/SourceFiles/history/history_location_manager.cpp @@ -18,6 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include +#include +#include #include "history/history_location_manager.h" #include "mainwidget.h" diff --git a/Telegram/SourceFiles/history/history_location_manager.h b/Telegram/SourceFiles/history/history_location_manager.h index b3098d7c3..6e630188f 100644 --- a/Telegram/SourceFiles/history/history_location_manager.h +++ b/Telegram/SourceFiles/history/history_location_manager.h @@ -20,6 +20,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include +#include "scheme.h" +#include "core/click_handler.h" +#include "ui/images.h" + void initLocationManager(); void reinitLocationManager(); void deinitLocationManager(); diff --git a/Telegram/SourceFiles/history/history_media.h b/Telegram/SourceFiles/history/history_media.h index ed5d7e348..684f19d5b 100644 --- a/Telegram/SourceFiles/history/history_media.h +++ b/Telegram/SourceFiles/history/history_media.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "history/history.h" +#include "history/history_item.h" + enum class MediaInBubbleState { None, Top, diff --git a/Telegram/SourceFiles/history/history_message.h b/Telegram/SourceFiles/history/history_message.h index b31c1feb2..902eec786 100644 --- a/Telegram/SourceFiles/history/history_message.h +++ b/Telegram/SourceFiles/history/history_message.h @@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/lambda.h" +#include "core/basic_types.h" +#include "scheme.h" +#include "structs.h" +#include "history/history.h" +#include "history/history_item.h" + void HistoryInitMessages(); base::lambda HistoryDependentItemCallback(const FullMsgId &msgId); MTPDmessage::Flags NewMessageFlags(not_null peer); diff --git a/Telegram/SourceFiles/history/history_service.h b/Telegram/SourceFiles/history/history_service.h index 2435e77c8..a4b053b65 100644 --- a/Telegram/SourceFiles/history/history_service.h +++ b/Telegram/SourceFiles/history/history_service.h @@ -20,6 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "base/runtime_composer.h" +#include "core/click_handler.h" +#include "core/utils.h" +#include "structs.h" +#include "history/history_item.h" + struct HistoryServiceDependentData { MsgId msgId = 0; HistoryItem *msg = nullptr; diff --git a/Telegram/SourceFiles/history/history_service_layout.h b/Telegram/SourceFiles/history/history_service_layout.h index 67f3ff74f..7c32b418b 100644 --- a/Telegram/SourceFiles/history/history_service_layout.h +++ b/Telegram/SourceFiles/history/history_service_layout.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "core/basic_types.h" +#include "ui/twidget.h" +#include "ui/text/text.h" + class HistoryService; namespace HistoryLayout { diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index e3f127f78..7c77af655 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "history/history_widget.h" - #include "styles/style_history.h" #include "styles/style_dialogs.h" #include "styles/style_window.h" @@ -56,7 +56,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "mainwidget.h" #include "mainwindow.h" #include "passcodewidget.h" -#include "mainwindow.h" #include "storage/file_upload.h" #include "media/media_audio.h" #include "media/media_audio_capture.h" @@ -74,7 +73,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "window/window_controller.h" #include "inline_bots/inline_results_widget.h" #include "chat_helpers/emoji_suggestions_widget.h" - +#include "facades.h" +#include "mainwindow.h" // Smart pointer for QObject*, has move semantics, destroys object if it doesn't have a parent. template class test_ptr { @@ -657,7 +657,7 @@ HistoryWidget::HistoryWidget(QWidget *parent, not_null cont connect(_field, SIGNAL(changed()), this, SLOT(onTextChange())); connect(_field, SIGNAL(spacedReturnedPasted()), this, SLOT(onPreviewParse())); connect(_field, SIGNAL(linksChanged()), this, SLOT(onPreviewCheck())); - connect(App::wnd()->windowHandle(), SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged())); + connect(static_cast(App::wnd()->windowHandle()), SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged())); connect(&_scrollTimer, SIGNAL(timeout()), this, SLOT(onScrollTimer())); connect(_tabbedSelector, SIGNAL(emojiSelected(EmojiPtr)), _field, SLOT(onEmojiInsert(EmojiPtr))); connect(_tabbedSelector, SIGNAL(stickerSelected(DocumentData*)), this, SLOT(onStickerSend(DocumentData*))); diff --git a/Telegram/SourceFiles/history/history_widget.h b/Telegram/SourceFiles/history/history_widget.h index 27876285d..31a73d6ce 100644 --- a/Telegram/SourceFiles/history/history_widget.h +++ b/Telegram/SourceFiles/history/history_widget.h @@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "core/single_timer.h" #include "ui/widgets/input_fields.h" #include "base/flags.h" +#include "history/history_item.h" namespace InlineBots { namespace Layout { @@ -97,6 +98,7 @@ private: }; +class MainWidget; class HistoryHider : public TWidget, private base::Subscriber { Q_OBJECT diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp index 93bdeeebf..5537ba202 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp @@ -32,6 +32,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "storage/localstorage.h" #include "auth_session.h" #include "lang/lang_keys.h" +#include "app.h" namespace InlineBots { namespace Layout { diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h index c3468c27f..69702781d 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h @@ -47,6 +47,8 @@ public: } }; +class ItemBase; + class Context { public: virtual void inlineItemLayoutChanged(const ItemBase *layout) = 0; diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_result.h b/Telegram/SourceFiles/inline_bots/inline_bot_result.h index 3838d8270..f3cf5cc9d 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_result.h +++ b/Telegram/SourceFiles/inline_bots/inline_bot_result.h @@ -24,6 +24,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "structs.h" class FileLoader; +class History; +class LocationCoords; namespace InlineBots { diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp index 0db4ddda5..a72d33479 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "app.h" #include "inline_bots/inline_bot_send_data.h" - #include "inline_bots/inline_bot_result.h" #include "storage/localstorage.h" #include "lang/lang_keys.h" diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.h b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.h index 4f9b4d493..beac1bc6c 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.h +++ b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.h @@ -23,7 +23,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "core/basic_types.h" #include "structs.h" #include "history/history_location_manager.h" +#include "mtproto/type_utils.h" +class History; namespace InlineBots { class Result; diff --git a/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp b/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp index b36640565..b1c6880e2 100644 --- a/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "inline_bots/inline_results_widget.h" - #include "styles/style_chat_helpers.h" #include "ui/widgets/buttons.h" #include "ui/widgets/shadow.h" diff --git a/Telegram/SourceFiles/lang/lang_cloud_manager.h b/Telegram/SourceFiles/lang/lang_cloud_manager.h index d272502e7..709272641 100644 --- a/Telegram/SourceFiles/lang/lang_cloud_manager.h +++ b/Telegram/SourceFiles/lang/lang_cloud_manager.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" #include "mtproto/sender.h" #include "base/weak_unique_ptr.h" diff --git a/Telegram/SourceFiles/lang/lang_file_parser.cpp b/Telegram/SourceFiles/lang/lang_file_parser.cpp index ed62ebdae..9950a2fb7 100644 --- a/Telegram/SourceFiles/lang/lang_file_parser.cpp +++ b/Telegram/SourceFiles/lang/lang_file_parser.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "lang/lang_file_parser.h" - #include "base/parse_helper.h" namespace Lang { diff --git a/Telegram/SourceFiles/lang/lang_instance.h b/Telegram/SourceFiles/lang/lang_instance.h index 2bd5a001f..6202b818f 100644 --- a/Telegram/SourceFiles/lang/lang_instance.h +++ b/Telegram/SourceFiles/lang/lang_instance.h @@ -22,6 +22,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "lang_auto.h" #include "base/weak_unique_ptr.h" +#include "base/observer.h" +#include "core/basic_types.h" +#include "core/utils.h" +#include "scheme.h" namespace Lang { diff --git a/Telegram/SourceFiles/lang/lang_keys.cpp b/Telegram/SourceFiles/lang/lang_keys.cpp index 56c888af2..551cc72fc 100644 --- a/Telegram/SourceFiles/lang/lang_keys.cpp +++ b/Telegram/SourceFiles/lang/lang_keys.cpp @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "lang/lang_keys.h" #include "lang/lang_file_parser.h" +#include "ui/text/text.h" bool langFirstNameGoesSecond() { auto fullname = lang(lng_full_name__tagged); diff --git a/Telegram/SourceFiles/lang/lang_keys.h b/Telegram/SourceFiles/lang/lang_keys.h index 550224ecf..cbc130ba7 100644 --- a/Telegram/SourceFiles/lang/lang_keys.h +++ b/Telegram/SourceFiles/lang/lang_keys.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/lambda.h" #include "lang/lang_instance.h" inline QString lang(LangKey key) { diff --git a/Telegram/SourceFiles/lang/lang_tag.cpp b/Telegram/SourceFiles/lang/lang_tag.cpp index 4aaea1ca7..0d99f9680 100644 --- a/Telegram/SourceFiles/lang/lang_tag.cpp +++ b/Telegram/SourceFiles/lang/lang_tag.cpp @@ -19,8 +19,8 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "lang/lang_tag.h" - #include "lang/lang_keys.h" +#include "ui/text/text.h" namespace Lang { namespace { diff --git a/Telegram/SourceFiles/lang/lang_tag.h b/Telegram/SourceFiles/lang/lang_tag.h index 2d1da2290..6aced425f 100644 --- a/Telegram/SourceFiles/lang/lang_tag.h +++ b/Telegram/SourceFiles/lang/lang_tag.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + namespace Lang { constexpr auto kTagReplacementSize = 4; diff --git a/Telegram/SourceFiles/lang/lang_translator.h b/Telegram/SourceFiles/lang/lang_translator.h index b5938aec6..165e02ae2 100644 --- a/Telegram/SourceFiles/lang/lang_translator.h +++ b/Telegram/SourceFiles/lang/lang_translator.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include namespace Lang { class Translator : public QTranslator { diff --git a/Telegram/SourceFiles/layerwidget.h b/Telegram/SourceFiles/layerwidget.h index a516bdc4d..55cd4239f 100644 --- a/Telegram/SourceFiles/layerwidget.h +++ b/Telegram/SourceFiles/layerwidget.h @@ -20,6 +20,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + +#include "base/lambda.h" +#include "ui/twidget.h" +#include "ui/animation.h" +#include "structs.h" + +class BoxContent; + namespace Window { class MainMenu; class Controller; diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index 69b364ab9..75653ffa0 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -21,6 +21,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "base/runtime_composer.h" +#include "ui/text/text.h" +#include "history/history.h" +#include "history/history_item.h" +#include "ui/style/style_core_types.h" constexpr auto FullSelection = TextSelection { 0xFFFF, 0xFFFF }; diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 053cf5f77..cdb759a30 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include + class MTPlong; namespace Logs { diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 3471ab607..51105b200 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -24,6 +24,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "history/history_common.h" #include "core/single_timer.h" #include "base/weak_unique_ptr.h" +#include "history/history.h" +#include "app.h" +#include "facades.h" namespace Notify { struct PeerUpdate; diff --git a/Telegram/SourceFiles/mainwindow.h b/Telegram/SourceFiles/mainwindow.h index 3c790c69f..b88ae8951 100644 --- a/Telegram/SourceFiles/mainwindow.h +++ b/Telegram/SourceFiles/mainwindow.h @@ -20,10 +20,19 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include +#include #include "platform/platform_specific.h" #include "platform/platform_main_window.h" #include "core/single_timer.h" +#include "ui/twidget.h" +#include "layerwidget.h" + class PasscodeWidget; class MainWidget; class LayerStackWidget; diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp index 59797df7a..5e87d3f87 100644 --- a/Telegram/SourceFiles/media/media_audio.cpp +++ b/Telegram/SourceFiles/media/media_audio.cpp @@ -18,8 +18,12 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "media/media_audio.h" +#include +#include "app.h" +#include "facades.h" + +#include "media/media_audio.h" #include "media/media_audio_ffmpeg_loader.h" #include "media/media_child_ffmpeg_loader.h" #include "media/media_audio_loaders.h" diff --git a/Telegram/SourceFiles/media/media_audio.h b/Telegram/SourceFiles/media/media_audio.h index 0a8883e35..0dd68e6d7 100644 --- a/Telegram/SourceFiles/media/media_audio.h +++ b/Telegram/SourceFiles/media/media_audio.h @@ -20,7 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "base/observer.h" #include "storage/localimageloader.h" +#include "ui/animation.h" struct VideoSoundData; struct VideoSoundPart; diff --git a/Telegram/SourceFiles/media/media_audio_capture.h b/Telegram/SourceFiles/media/media_audio_capture.h index ddd811f5e..febc86e1f 100644 --- a/Telegram/SourceFiles/media/media_audio_capture.h +++ b/Telegram/SourceFiles/media/media_audio_capture.h @@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include "structs.h" + struct AVFrame; namespace Media { diff --git a/Telegram/SourceFiles/media/media_audio_loader.h b/Telegram/SourceFiles/media/media_audio_loader.h index 3ec3f4009..ea0fa128d 100644 --- a/Telegram/SourceFiles/media/media_audio_loader.h +++ b/Telegram/SourceFiles/media/media_audio_loader.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "core/utils.h" +#include "ui/images.h" + namespace FFMpeg { struct AVPacketDataWrap; } // namespace FFMpeg diff --git a/Telegram/SourceFiles/media/media_audio_track.h b/Telegram/SourceFiles/media/media_audio_track.h index b60b3ed2c..4e412a053 100644 --- a/Telegram/SourceFiles/media/media_audio_track.h +++ b/Telegram/SourceFiles/media/media_audio_track.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "base/timer.h" +#include "ui/images.h" namespace Media { namespace Audio { diff --git a/Telegram/SourceFiles/media/media_child_ffmpeg_loader.h b/Telegram/SourceFiles/media/media_child_ffmpeg_loader.h index 51b9a7c66..81f7a54aa 100644 --- a/Telegram/SourceFiles/media/media_child_ffmpeg_loader.h +++ b/Telegram/SourceFiles/media/media_child_ffmpeg_loader.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "media/media_audio_loader.h" #include "media/media_audio.h" diff --git a/Telegram/SourceFiles/media/media_clip_implementation.cpp b/Telegram/SourceFiles/media/media_clip_implementation.cpp index 517530986..2d63c443c 100644 --- a/Telegram/SourceFiles/media/media_clip_implementation.cpp +++ b/Telegram/SourceFiles/media/media_clip_implementation.cpp @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "ui/images.h" #include "media/media_clip_implementation.h" namespace Media { diff --git a/Telegram/SourceFiles/media/media_clip_implementation.h b/Telegram/SourceFiles/media/media_clip_implementation.h index aee1f7878..f460d8424 100644 --- a/Telegram/SourceFiles/media/media_clip_implementation.h +++ b/Telegram/SourceFiles/media/media_clip_implementation.h @@ -20,6 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include + class FileLocation; namespace Media { diff --git a/Telegram/SourceFiles/media/media_clip_qtgif.h b/Telegram/SourceFiles/media/media_clip_qtgif.h index 35a8ef6da..9cccdf2ea 100644 --- a/Telegram/SourceFiles/media/media_clip_qtgif.h +++ b/Telegram/SourceFiles/media/media_clip_qtgif.h @@ -19,6 +19,7 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "media/media_clip_implementation.h" diff --git a/Telegram/SourceFiles/media/media_clip_reader.cpp b/Telegram/SourceFiles/media/media_clip_reader.cpp index 410fa80e8..a2c112389 100644 --- a/Telegram/SourceFiles/media/media_clip_reader.cpp +++ b/Telegram/SourceFiles/media/media_clip_reader.cpp @@ -18,8 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include #include "media/media_clip_reader.h" - #include "storage/file_download.h" extern "C" { diff --git a/Telegram/SourceFiles/media/media_clip_reader.h b/Telegram/SourceFiles/media/media_clip_reader.h index a0ed941e8..a1ddca537 100644 --- a/Telegram/SourceFiles/media/media_clip_reader.h +++ b/Telegram/SourceFiles/media/media_clip_reader.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "storage/localimageloader.h" +#include "window/notifications_manager_default.h" class FileLocation; diff --git a/Telegram/SourceFiles/media/player/media_player_button.h b/Telegram/SourceFiles/media/player/media_player_button.h index 9670b9a01..cfbd65fce 100644 --- a/Telegram/SourceFiles/media/player/media_player_button.h +++ b/Telegram/SourceFiles/media/player/media_player_button.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "ui/abstract_button.h" +#include "ui/animation.h" #include "styles/style_media_player.h" namespace Media { diff --git a/Telegram/SourceFiles/media/player/media_player_cover.cpp b/Telegram/SourceFiles/media/player/media_player_cover.cpp index f2b53ca58..a5ad93fd3 100644 --- a/Telegram/SourceFiles/media/player/media_player_cover.cpp +++ b/Telegram/SourceFiles/media/player/media_player_cover.cpp @@ -18,8 +18,9 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "media/player/media_player_cover.h" +#include "facades.h" +#include "media/player/media_player_cover.h" #include "ui/widgets/labels.h" #include "ui/widgets/continuous_sliders.h" #include "ui/widgets/buttons.h" diff --git a/Telegram/SourceFiles/media/player/media_player_cover.h b/Telegram/SourceFiles/media/player/media_player_cover.h index 0b949076d..6d3b26284 100644 --- a/Telegram/SourceFiles/media/player/media_player_cover.h +++ b/Telegram/SourceFiles/media/player/media_player_cover.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" +#include "ui/twidget.h" + class AudioMsgId; namespace Ui { diff --git a/Telegram/SourceFiles/media/player/media_player_float.cpp b/Telegram/SourceFiles/media/player/media_player_float.cpp index 29e07e283..0efc05638 100644 --- a/Telegram/SourceFiles/media/player/media_player_float.cpp +++ b/Telegram/SourceFiles/media/player/media_player_float.cpp @@ -18,8 +18,10 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include "facades.h" #include "media/player/media_player_float.h" - #include "styles/style_media_player.h" #include "history/history_media.h" #include "media/media_clip_reader.h" diff --git a/Telegram/SourceFiles/media/player/media_player_float.h b/Telegram/SourceFiles/media/player/media_player_float.h index 1cb9a89c9..af9ac5d84 100644 --- a/Telegram/SourceFiles/media/player/media_player_float.h +++ b/Telegram/SourceFiles/media/player/media_player_float.h @@ -20,6 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" +#include "ui/twidget.h" +#include "media/media_clip_reader.h" + +class HistoryItem; + namespace Media { namespace Clip { class Playback; diff --git a/Telegram/SourceFiles/media/player/media_player_instance.h b/Telegram/SourceFiles/media/player/media_player_instance.h index 27936ac85..bce3511a7 100644 --- a/Telegram/SourceFiles/media/player/media_player_instance.h +++ b/Telegram/SourceFiles/media/player/media_player_instance.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" +#include "structs.h" +#include "history/history.h" + namespace Notify { struct PeerUpdate; } // namespace Notify diff --git a/Telegram/SourceFiles/media/player/media_player_list.cpp b/Telegram/SourceFiles/media/player/media_player_list.cpp index fcc9e6155..b5c085bd7 100644 --- a/Telegram/SourceFiles/media/player/media_player_list.cpp +++ b/Telegram/SourceFiles/media/player/media_player_list.cpp @@ -18,8 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include "app.h" +#include "facades.h" #include "media/player/media_player_list.h" - #include "media/player/media_player_instance.h" #include "overview/overview_layout.h" #include "styles/style_media_player.h" diff --git a/Telegram/SourceFiles/media/player/media_player_list.h b/Telegram/SourceFiles/media/player/media_player_list.h index b2a6973c5..68fc3f1e9 100644 --- a/Telegram/SourceFiles/media/player/media_player_list.h +++ b/Telegram/SourceFiles/media/player/media_player_list.h @@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" +#include "core/basic_types.h" +#include "ui/twidget.h" +#include "structs.h" + +class HistoryItem; + namespace Overview { namespace Layout { class Document; diff --git a/Telegram/SourceFiles/media/player/media_player_panel.cpp b/Telegram/SourceFiles/media/player/media_player_panel.cpp index e1ae56037..6c8557cbe 100644 --- a/Telegram/SourceFiles/media/player/media_player_panel.cpp +++ b/Telegram/SourceFiles/media/player/media_player_panel.cpp @@ -18,8 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "app.h" +#include "facades.h" +#include "ui/twidget.h" #include "media/player/media_player_panel.h" - #include "media/player/media_player_cover.h" #include "media/player/media_player_list.h" #include "media/player/media_player_instance.h" diff --git a/Telegram/SourceFiles/media/player/media_player_volume_controller.cpp b/Telegram/SourceFiles/media/player/media_player_volume_controller.cpp index 8218e8e0e..017e682c2 100644 --- a/Telegram/SourceFiles/media/player/media_player_volume_controller.cpp +++ b/Telegram/SourceFiles/media/player/media_player_volume_controller.cpp @@ -18,8 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "ui/twidget.h" +#include "app.h" +#include "facades.h" #include "media/player/media_player_volume_controller.h" - #include "media/media_audio.h" #include "ui/widgets/buttons.h" #include "ui/widgets/shadow.h" diff --git a/Telegram/SourceFiles/media/player/media_player_widget.cpp b/Telegram/SourceFiles/media/player/media_player_widget.cpp index f5472dc8f..6df105a6a 100644 --- a/Telegram/SourceFiles/media/player/media_player_widget.cpp +++ b/Telegram/SourceFiles/media/player/media_player_widget.cpp @@ -18,8 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "ui/twidget.h" +#include "app.h" +#include "facades.h" #include "media/player/media_player_widget.h" - #include "ui/widgets/labels.h" #include "ui/widgets/continuous_sliders.h" #include "ui/widgets/shadow.h" diff --git a/Telegram/SourceFiles/media/view/media_clip_controller.cpp b/Telegram/SourceFiles/media/view/media_clip_controller.cpp index b286e71f7..bcb31ea75 100644 --- a/Telegram/SourceFiles/media/view/media_clip_controller.cpp +++ b/Telegram/SourceFiles/media/view/media_clip_controller.cpp @@ -18,8 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "ui/twidget.h" +#include "app.h" +#include "facades.h" #include "media/view/media_clip_controller.h" - #include "media/view/media_clip_playback.h" #include "media/view/media_clip_volume_controller.h" #include "styles/style_mediaview.h" diff --git a/Telegram/SourceFiles/media/view/media_clip_playback.cpp b/Telegram/SourceFiles/media/view/media_clip_playback.cpp index 286c896dd..0936b9b02 100644 --- a/Telegram/SourceFiles/media/view/media_clip_playback.cpp +++ b/Telegram/SourceFiles/media/view/media_clip_playback.cpp @@ -19,7 +19,6 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "media/view/media_clip_playback.h" - #include "styles/style_mediaview.h" #include "media/media_audio.h" diff --git a/Telegram/SourceFiles/media/view/media_clip_playback.h b/Telegram/SourceFiles/media/view/media_clip_playback.h index b2ea741b7..4fee7c332 100644 --- a/Telegram/SourceFiles/media/view/media_clip_playback.h +++ b/Telegram/SourceFiles/media/view/media_clip_playback.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/lambda.h" +#include "ui/animation.h" #include "ui/widgets/continuous_sliders.h" namespace Media { diff --git a/Telegram/SourceFiles/media/view/media_clip_volume_controller.cpp b/Telegram/SourceFiles/media/view/media_clip_volume_controller.cpp index 97ed57223..25b7ef0ff 100644 --- a/Telegram/SourceFiles/media/view/media_clip_volume_controller.cpp +++ b/Telegram/SourceFiles/media/view/media_clip_volume_controller.cpp @@ -18,8 +18,12 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include +#include "ui/twidget.h" +#include "app.h" +#include "facades.h" #include "media/view/media_clip_volume_controller.h" - #include "styles/style_mediaview.h" namespace Media { diff --git a/Telegram/SourceFiles/messenger.h b/Telegram/SourceFiles/messenger.h index b0af99ae1..d0928838a 100644 --- a/Telegram/SourceFiles/messenger.h +++ b/Telegram/SourceFiles/messenger.h @@ -20,9 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "base/observer.h" #include "mtproto/auth_key.h" #include "base/timer.h" +#include "mtproto/rpc_sender.h" +#include "structs.h" +#include "single_timer.h" namespace App { void quit(); @@ -59,6 +63,14 @@ class Translator; class CloudManager; } // namespace Lang + +class PhotoData; +class MainWindow; +class PhotoOpenClickHandler; +class HistoryItem; +class DocumentData; +class PeerData; + class Messenger final : public QObject, public RPCSender, private base::Subscriber { Q_OBJECT diff --git a/Telegram/SourceFiles/mtproto/auth_key.h b/Telegram/SourceFiles/mtproto/auth_key.h index 11e68c1ad..f7d5b72c0 100644 --- a/Telegram/SourceFiles/mtproto/auth_key.h +++ b/Telegram/SourceFiles/mtproto/auth_key.h @@ -23,6 +23,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include +#include +#include +#include "mtproto/core_types.h" +#include + namespace MTP { class AuthKey { diff --git a/Telegram/SourceFiles/mtproto/connection.cpp b/Telegram/SourceFiles/mtproto/connection.cpp index 93ecadab7..f494524f9 100644 --- a/Telegram/SourceFiles/mtproto/connection.cpp +++ b/Telegram/SourceFiles/mtproto/connection.cpp @@ -19,7 +19,6 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "mtproto/connection.h" - #include "mtproto/rsa_public_key.h" #include "mtproto/rpc_sender.h" #include "mtproto/dc_options.h" diff --git a/Telegram/SourceFiles/mtproto/connection.h b/Telegram/SourceFiles/mtproto/connection.h index 40878829c..ceed1d180 100644 --- a/Telegram/SourceFiles/mtproto/connection.h +++ b/Telegram/SourceFiles/mtproto/connection.h @@ -20,9 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "facades.h" +#include "mtproto/core_types.h" #include "mtproto/auth_key.h" #include "mtproto/dc_options.h" #include "core/single_timer.h" +#include "scheme.h" namespace MTP { @@ -199,7 +203,7 @@ private: DcType _dcType = DcType::Regular; mutable QReadWriteLock stateConnMutex; - qint32 _state = DisconnectedState; + qint32 _state = 0; bool _needSessionReset = false; void resetSession(); diff --git a/Telegram/SourceFiles/mtproto/core_types.h b/Telegram/SourceFiles/mtproto/core_types.h index 80314d5f5..a728641c4 100644 --- a/Telegram/SourceFiles/mtproto/core_types.h +++ b/Telegram/SourceFiles/mtproto/core_types.h @@ -20,9 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include #include "core/basic_types.h" #include "base/flags.h" -#include +#include "config.h" namespace MTP { diff --git a/Telegram/SourceFiles/mtproto/mtp_instance.h b/Telegram/SourceFiles/mtproto/mtp_instance.h index 14725561d..c5c74b992 100644 --- a/Telegram/SourceFiles/mtproto/mtp_instance.h +++ b/Telegram/SourceFiles/mtproto/mtp_instance.h @@ -22,6 +22,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include +#include +#include +#include +#include +#include "core/basic_types.h" +#include "mtproto/core_types.h" +#include "mtproto/rpc_sender.h" +#include "mtproto/connection.h" namespace MTP { namespace internal { diff --git a/Telegram/SourceFiles/mtproto/rpc_sender.h b/Telegram/SourceFiles/mtproto/rpc_sender.h index 62e2a3549..c43fe16e3 100644 --- a/Telegram/SourceFiles/mtproto/rpc_sender.h +++ b/Telegram/SourceFiles/mtproto/rpc_sender.h @@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "base/lambda_guard.h" +#include "core/basic_types.h" +#include "core/utils.h" +#include "scheme.h" + class RPCError { public: RPCError(const MTPrpcError &error) : _code(error.c_rpc_error().verror_code.v) { diff --git a/Telegram/SourceFiles/mtproto/rsa_public_key.h b/Telegram/SourceFiles/mtproto/rsa_public_key.h index b96861c16..70e838607 100644 --- a/Telegram/SourceFiles/mtproto/rsa_public_key.h +++ b/Telegram/SourceFiles/mtproto/rsa_public_key.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + namespace MTP { namespace internal { diff --git a/Telegram/SourceFiles/mtproto/sender.h b/Telegram/SourceFiles/mtproto/sender.h index 11db35d9e..cf853cba8 100644 --- a/Telegram/SourceFiles/mtproto/sender.h +++ b/Telegram/SourceFiles/mtproto/sender.h @@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/lambda.h" #include "base/variant.h" +#include "mtproto/rpc_sender.h" +#include "facades.h" namespace MTP { diff --git a/Telegram/SourceFiles/observer_peer.h b/Telegram/SourceFiles/observer_peer.h index 08233cf41..3c47ad04b 100644 --- a/Telegram/SourceFiles/observer_peer.h +++ b/Telegram/SourceFiles/observer_peer.h @@ -23,6 +23,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/observer.h" #include "base/flags.h" +#include "structs.h" +#include "history/history.h" + namespace Notify { // Generic notifications about updates of some PeerData. diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h index 359b0476a..e735afed7 100644 --- a/Telegram/SourceFiles/platform/platform_specific.h +++ b/Telegram/SourceFiles/platform/platform_specific.h @@ -20,6 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include + +class QPaintEvent; + namespace Platform { void start(); diff --git a/Telegram/SourceFiles/platform/win/main_window_win.h b/Telegram/SourceFiles/platform/win/main_window_win.h index 28cfcef37..bb27cafe2 100644 --- a/Telegram/SourceFiles/platform/win/main_window_win.h +++ b/Telegram/SourceFiles/platform/win/main_window_win.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include #include "platform/platform_main_window.h" #include "base/flags.h" #include diff --git a/Telegram/SourceFiles/platform/win/specific_win.h b/Telegram/SourceFiles/platform/win/specific_win.h index fadb0b1ad..8f401b0cd 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.h +++ b/Telegram/SourceFiles/platform/win/specific_win.h @@ -20,8 +20,16 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include #include +#include "core/basic_types.h" +#include "core/utils.h" + +#include "history/history_location_manager.h" + namespace Platform { inline void SetWatchingMediaKeys(bool watching) { @@ -96,6 +104,7 @@ QAbstractNativeEventFilter *psNativeEventFilter(); void psNewVersion(); +class TWidget; void psUpdateOverlayed(TWidget *widget); inline QByteArray psDownloadPathBookmark(const QString &path) { return QByteArray(); diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 056ec1d70..2258d17e5 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -23,6 +23,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include +#include +#include "core/utils.h" void InitFromCommandLine(int argc, char *argv[]); extern bool gDebug; diff --git a/Telegram/SourceFiles/storage/file_download.h b/Telegram/SourceFiles/storage/file_download.h index 115f6bf47..e00f1da5a 100644 --- a/Telegram/SourceFiles/storage/file_download.h +++ b/Telegram/SourceFiles/storage/file_download.h @@ -20,8 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include + #include "base/observer.h" #include "storage/localimageloader.h" // for TaskId +#include "mtproto/facade.h" namespace Storage { diff --git a/Telegram/SourceFiles/storage/localimageloader.h b/Telegram/SourceFiles/storage/localimageloader.h index 7d868a2fa..625681908 100644 --- a/Telegram/SourceFiles/storage/localimageloader.h +++ b/Telegram/SourceFiles/storage/localimageloader.h @@ -20,7 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include +#include #include "base/variant.h" +#include "structs.h" enum class CompressConfirm { Auto, diff --git a/Telegram/SourceFiles/storage/localstorage.h b/Telegram/SourceFiles/storage/localstorage.h index 225a940d3..16df21893 100644 --- a/Telegram/SourceFiles/storage/localstorage.h +++ b/Telegram/SourceFiles/storage/localstorage.h @@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "core/basic_types.h" #include "storage/file_download.h" #include "auth_session.h" +#include "history/history.h" namespace Window { namespace Theme { diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 9d2386f7b..e54e0d3e9 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -20,6 +20,16 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include + +#include "scheme.h" +#include "ui/images.h" +#include "ui/twidget.h" +#include "ui/text/text.h" + using MediaKey = QPair; inline quint64 mediaMix32To64(qint32 a, qint32 b) { diff --git a/Telegram/SourceFiles/ui/animation.h b/Telegram/SourceFiles/ui/animation.h index b0beec638..5eda4ac86 100644 --- a/Telegram/SourceFiles/ui/animation.h +++ b/Telegram/SourceFiles/ui/animation.h @@ -20,11 +20,20 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include "core/basic_types.h" -#include -#include +#include +#include +#include +#include +#include +#include #include +#include "core/basic_types.h" +#include "core/utils.h" +#include "base/lambda.h" +#include "style/style_core_types.h" +#include "mtproto/facade.h" + namespace Media { namespace Clip { diff --git a/Telegram/SourceFiles/ui/countryinput.cpp b/Telegram/SourceFiles/ui/countryinput.cpp index 81ff94358..a63e55302 100644 --- a/Telegram/SourceFiles/ui/countryinput.cpp +++ b/Telegram/SourceFiles/ui/countryinput.cpp @@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "countries.h" #include "styles/style_boxes.h" #include "styles/style_intro.h" +#include "facades.h" namespace { diff --git a/Telegram/SourceFiles/ui/countryinput.h b/Telegram/SourceFiles/ui/countryinput.h index bef805bd7..87e2097ba 100644 --- a/Telegram/SourceFiles/ui/countryinput.h +++ b/Telegram/SourceFiles/ui/countryinput.h @@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "boxes/abstract_box.h" #include "styles/style_widgets.h" +#include "ui/effects/ripple_animation.h" QString findValidCode(QString fullCode); diff --git a/Telegram/SourceFiles/ui/emoji_config.h b/Telegram/SourceFiles/ui/emoji_config.h index 8bfca91ac..609c5d87f 100644 --- a/Telegram/SourceFiles/ui/emoji_config.h +++ b/Telegram/SourceFiles/ui/emoji_config.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "settings.h" #include "ui/text/text.h" #include "emoji.h" diff --git a/Telegram/SourceFiles/ui/images.h b/Telegram/SourceFiles/ui/images.h index 969267981..e24be91cb 100644 --- a/Telegram/SourceFiles/ui/images.h +++ b/Telegram/SourceFiles/ui/images.h @@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "base/flags.h" +#include "style/style_core_types.h" +#include "scheme.h" class FileLoader; class mtpFileLoader; diff --git a/Telegram/SourceFiles/ui/style/style_core.h b/Telegram/SourceFiles/ui/style/style_core.h index f2520347e..b690d8540 100644 --- a/Telegram/SourceFiles/ui/style/style_core.h +++ b/Telegram/SourceFiles/ui/style/style_core.h @@ -20,7 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include + #include "ui/style/style_core_types.h" +#include "settings.h" inline QPoint rtlpoint(int x, int y, int outerw) { return QPoint(rtl() ? (outerw - x) : x, y); diff --git a/Telegram/SourceFiles/ui/style/style_core_color.h b/Telegram/SourceFiles/ui/style/style_core_color.h index 7ddbd4e67..24a302233 100644 --- a/Telegram/SourceFiles/ui/style/style_core_color.h +++ b/Telegram/SourceFiles/ui/style/style_core_color.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include + namespace style { class palette; diff --git a/Telegram/SourceFiles/ui/style/style_core_font.h b/Telegram/SourceFiles/ui/style/style_core_font.h index d28841b12..179a250a6 100644 --- a/Telegram/SourceFiles/ui/style/style_core_font.h +++ b/Telegram/SourceFiles/ui/style/style_core_font.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include + namespace style { namespace internal { diff --git a/Telegram/SourceFiles/ui/style/style_core_icon.h b/Telegram/SourceFiles/ui/style/style_core_icon.h index edfe52c11..2e1c3d1fe 100644 --- a/Telegram/SourceFiles/ui/style/style_core_icon.h +++ b/Telegram/SourceFiles/ui/style/style_core_icon.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/assertion.h" +#include "core/utils.h" #include "ui/style/style_core_color.h" #include diff --git a/Telegram/SourceFiles/ui/style/style_core_types.h b/Telegram/SourceFiles/ui/style/style_core_types.h index 65843faf3..8e1b91896 100644 --- a/Telegram/SourceFiles/ui/style/style_core_types.h +++ b/Telegram/SourceFiles/ui/style/style_core_types.h @@ -20,12 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "ui/style/style_core_font.h" #include "ui/style/style_core_color.h" diff --git a/Telegram/SourceFiles/ui/text/text.h b/Telegram/SourceFiles/ui/text/text.h index e82bda720..53d963799 100644 --- a/Telegram/SourceFiles/ui/text/text.h +++ b/Telegram/SourceFiles/ui/text/text.h @@ -20,8 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include "private/qfixed_p.h" +#include +#include +#include +#include "private/qfixed_p.h" +#include "styles/style_basic.h" +#include "ui/twidget.h" #include "core/click_handler.h" #include "ui/text/text_entity.h" #include "ui/emoji_config.h" diff --git a/Telegram/SourceFiles/ui/text/text_entity.h b/Telegram/SourceFiles/ui/text/text_entity.h index 02cd92006..dad20d6a4 100644 --- a/Telegram/SourceFiles/ui/text/text_entity.h +++ b/Telegram/SourceFiles/ui/text/text_entity.h @@ -20,6 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include + +#include "scheme.h" + enum EntityInTextType { EntityInTextInvalid = 0, diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp index dcee47ee8..e97598070 100644 --- a/Telegram/SourceFiles/ui/twidget.cpp +++ b/Telegram/SourceFiles/ui/twidget.cpp @@ -18,9 +18,8 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ -#include "twidget.h" - #include "application.h" +#include "twidget.h" #include "mainwindow.h" namespace Fonts { diff --git a/Telegram/SourceFiles/ui/twidget.h b/Telegram/SourceFiles/ui/twidget.h index ddbed035c..13791bced 100644 --- a/Telegram/SourceFiles/ui/twidget.h +++ b/Telegram/SourceFiles/ui/twidget.h @@ -20,7 +20,18 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include +#include +#include +#include "base/lambda.h" #include "base/flags.h" +#include "ui/style/style_core.h" +#include "styles/palette.h" +#include "styles/style_basic.h" + namespace Fonts { diff --git a/Telegram/SourceFiles/ui/widgets/buttons.h b/Telegram/SourceFiles/ui/widgets/buttons.h index 46cf36ed8..4667105c2 100644 --- a/Telegram/SourceFiles/ui/widgets/buttons.h +++ b/Telegram/SourceFiles/ui/widgets/buttons.h @@ -22,7 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "ui/abstract_button.h" #include "styles/style_widgets.h" - +#include "ui/animation.h" #include namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/continuous_sliders.cpp b/Telegram/SourceFiles/ui/widgets/continuous_sliders.cpp index ae0c2090e..3a4e453b4 100644 --- a/Telegram/SourceFiles/ui/widgets/continuous_sliders.cpp +++ b/Telegram/SourceFiles/ui/widgets/continuous_sliders.cpp @@ -18,6 +18,11 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include +#include "single_timer.h" +#include "ui/twidget.h" +#include "app.h" +#include "facades.h" #include "ui/widgets/continuous_sliders.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/continuous_sliders.h b/Telegram/SourceFiles/ui/widgets/continuous_sliders.h index 6575825f6..fa7b4e38e 100644 --- a/Telegram/SourceFiles/ui/widgets/continuous_sliders.h +++ b/Telegram/SourceFiles/ui/widgets/continuous_sliders.h @@ -20,8 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/lambda.h" +#include "single_timer.h" #include "styles/style_widgets.h" - +#include "ui/twidget.h" +#include "ui/animation.h" namespace Ui { class ContinuousSlider : public TWidget { diff --git a/Telegram/SourceFiles/ui/widgets/inner_dropdown.h b/Telegram/SourceFiles/ui/widgets/inner_dropdown.h index 17d9ae8e8..9d9727bb4 100644 --- a/Telegram/SourceFiles/ui/widgets/inner_dropdown.h +++ b/Telegram/SourceFiles/ui/widgets/inner_dropdown.h @@ -20,8 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "ui/twidget.h" #include "styles/style_widgets.h" #include "ui/effects/panel_animation.h" +#include "ui/animation.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/input_fields.h b/Telegram/SourceFiles/ui/widgets/input_fields.h index 17d2816a6..2e893fc09 100644 --- a/Telegram/SourceFiles/ui/widgets/input_fields.h +++ b/Telegram/SourceFiles/ui/widgets/input_fields.h @@ -20,8 +20,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include "styles/style_widgets.h" +#include +#include +#include +#include +#include "base/lambda.h" +#include "styles/style_widgets.h" +#include "history/history.h" +#include "ui/twidget.h" class UserData; namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/labels.h b/Telegram/SourceFiles/ui/widgets/labels.h index 494e32b20..2e25486cd 100644 --- a/Telegram/SourceFiles/ui/widgets/labels.h +++ b/Telegram/SourceFiles/ui/widgets/labels.h @@ -20,7 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "styles/style_widgets.h" +#include "ui/twidget.h" +#include "ui/animation.h" +#include "ui/text/text.h" +#include "ui/text/text_entity.h" +#include "core/click_handler.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/scroll_area.h b/Telegram/SourceFiles/ui/widgets/scroll_area.h index 401d09afd..8f0753424 100644 --- a/Telegram/SourceFiles/ui/widgets/scroll_area.h +++ b/Telegram/SourceFiles/ui/widgets/scroll_area.h @@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include +#include + +#include "ui/animation.h" +#include "ui/twidget.h" #include "styles/style_widgets.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/shadow.h b/Telegram/SourceFiles/ui/widgets/shadow.h index fcce8cc1d..4d1499437 100644 --- a/Telegram/SourceFiles/ui/widgets/shadow.h +++ b/Telegram/SourceFiles/ui/widgets/shadow.h @@ -17,7 +17,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include #include "styles/style_widgets.h" +#include "ui/twidget.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/tooltip.h b/Telegram/SourceFiles/ui/widgets/tooltip.h index 2db827fe7..49d570405 100644 --- a/Telegram/SourceFiles/ui/widgets/tooltip.h +++ b/Telegram/SourceFiles/ui/widgets/tooltip.h @@ -18,6 +18,9 @@ #pragma once #include "base/timer.h" +#include "ui/twidget.h" +#include "ui/text/text.h" +#include "ui/animation.h" namespace style { struct Tooltip; diff --git a/Telegram/SourceFiles/window/main_window.h b/Telegram/SourceFiles/window/main_window.h index 28561cc7b..924a82abe 100644 --- a/Telegram/SourceFiles/window/main_window.h +++ b/Telegram/SourceFiles/window/main_window.h @@ -20,10 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include #include "window/window_title.h" #include "base/timer.h" class MediaView; +class TWidget; namespace Window { diff --git a/Telegram/SourceFiles/window/notifications_manager.h b/Telegram/SourceFiles/window/notifications_manager.h index d10c2fb0b..1aded043e 100644 --- a/Telegram/SourceFiles/window/notifications_manager.h +++ b/Telegram/SourceFiles/window/notifications_manager.h @@ -20,7 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/observer.h" +#include "structs.h" +#include "single_timer.h" + class AuthSession; +class History; +class HistoryItem; namespace Platform { namespace Notifications { diff --git a/Telegram/SourceFiles/window/notifications_manager_default.h b/Telegram/SourceFiles/window/notifications_manager_default.h index 98db63a8f..6606d9011 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.h +++ b/Telegram/SourceFiles/window/notifications_manager_default.h @@ -20,8 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" #include "window/notifications_manager.h" #include "core/single_timer.h" +#include "history/history_item.h" +#include "structs.h" +#include "ui/animation.h" + +class History; namespace Ui { class IconButton; diff --git a/Telegram/SourceFiles/window/section_widget.h b/Telegram/SourceFiles/window/section_widget.h index 480ec69b3..1c70aea69 100644 --- a/Telegram/SourceFiles/window/section_widget.h +++ b/Telegram/SourceFiles/window/section_widget.h @@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/observer.h" #include "ui/twidget.h" #include "window/window_slide_animation.h" diff --git a/Telegram/SourceFiles/window/window_controller.h b/Telegram/SourceFiles/window/window_controller.h index 34b842190..5d5703989 100644 --- a/Telegram/SourceFiles/window/window_controller.h +++ b/Telegram/SourceFiles/window/window_controller.h @@ -21,6 +21,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include "base/flags.h" +#include "base/observer.h" +#include "core/basic_types.h" + +#include "facades.h" namespace Window { diff --git a/Telegram/SourceFiles/window/window_slide_animation.h b/Telegram/SourceFiles/window/window_slide_animation.h index ebbc77b7d..89b549c76 100644 --- a/Telegram/SourceFiles/window/window_slide_animation.h +++ b/Telegram/SourceFiles/window/window_slide_animation.h @@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include "base/lambda.h" +#include "ui/animation.h" +#include "ui/twidget.h" + namespace Window { enum class SlideDirection { diff --git a/Telegram/SourceFiles/window/window_title.h b/Telegram/SourceFiles/window/window_title.h index e2b3e3041..0469c520c 100644 --- a/Telegram/SourceFiles/window/window_title.h +++ b/Telegram/SourceFiles/window/window_title.h @@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include +#include +#include "ui/twidget.h" + namespace Window { enum class HitTestResult {