diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 0fd477a60..268d55562 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + #include #include #include diff --git a/Telegram/SourceFiles/base/lambda.h b/Telegram/SourceFiles/base/lambda.h index 48742ce75..115aea9c0 100644 --- a/Telegram/SourceFiles/base/lambda.h +++ b/Telegram/SourceFiles/base/lambda.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include // std::max_align_t #ifndef Assert #define LambdaAssertDefined diff --git a/Telegram/SourceFiles/base/task_queue.h b/Telegram/SourceFiles/base/task_queue.h index aae696cb0..00425b9ad 100644 --- a/Telegram/SourceFiles/base/task_queue.h +++ b/Telegram/SourceFiles/base/task_queue.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include #include "base/lambda.h" -#include "core/utils.h" +#include "base/timer.h" namespace base { diff --git a/Telegram/SourceFiles/base/timer.h b/Telegram/SourceFiles/base/timer.h index 7835b7faa..c4882cd38 100644 --- a/Telegram/SourceFiles/base/timer.h +++ b/Telegram/SourceFiles/base/timer.h @@ -23,6 +23,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "base/lambda.h" #include "base/observer.h" +using TimeMs = qint64; + namespace base { class Timer final : private QObject { diff --git a/Telegram/SourceFiles/core/file_utilities.h b/Telegram/SourceFiles/core/file_utilities.h index 39f034be6..dc7fa92ca 100644 --- a/Telegram/SourceFiles/core/file_utilities.h +++ b/Telegram/SourceFiles/core/file_utilities.h @@ -20,10 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include #include -#include +#include +#include #include +#include #include "base/observer.h" // legacy diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index cdb759a30..ca1ae6da6 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -20,8 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once -#include -#include +#include +#include + +extern inline bool cDebug(); class MTPlong; namespace Logs { diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index b5622aded..ac5c81458 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -20,12 +20,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "platform/linux/file_utilities_linux.h" -#include +// #include #include "platform/linux/linux_libs.h" #include "platform/linux/linux_gdk_helper.h" #include "messenger.h" #include "mainwindow.h" #include "storage/localstorage.h" +#include "facades.h" + +#include QStringList qt_make_filter_list(const QString &filter); diff --git a/Telegram/SourceFiles/platform/linux/linux_desktop_environment.cpp b/Telegram/SourceFiles/platform/linux/linux_desktop_environment.cpp index 16879097c..1b9d1f973 100644 --- a/Telegram/SourceFiles/platform/linux/linux_desktop_environment.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_desktop_environment.cpp @@ -19,9 +19,12 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "platform/linux/linux_desktop_environment.h" +#include "logs.h" #include +#define qstr QString // to avoid #include bloat utils.h + namespace Platform { namespace DesktopEnvironment { namespace { @@ -42,7 +45,7 @@ Type Compute() { if (list.contains("unity")) { // gnome-fallback sessions set XDG_CURRENT_DESKTOP to Unity // DESKTOP_SESSION can be gnome-fallback or gnome-fallback-compiz - if (desktopSession.indexOf(qstr("gnome-fallback")) >= 0) { + if (desktopSession.indexOf(QString("gnome-fallback")) >= 0) { return Type::Gnome; } return Type::Unity; @@ -53,7 +56,7 @@ Type Compute() { } else if (list.contains("gnome")) { return Type::Gnome; } else if (list.contains("kde")) { - if (kdeSession == qstr("5")) { + if (kdeSession == QString("5")) { return Type::KDE5; } return Type::KDE4; diff --git a/Telegram/SourceFiles/platform/linux/linux_libnotify.cpp b/Telegram/SourceFiles/platform/linux/linux_libnotify.cpp index 9e69a1224..422cc85c3 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libnotify.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_libnotify.cpp @@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "platform/linux/linux_libnotify.h" +#include "logs.h" + #include "platform/linux/linux_libs.h" namespace Platform { diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.h b/Telegram/SourceFiles/platform/linux/linux_libs.h index 28f5ffd6c..f4ea4148e 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libs.h +++ b/Telegram/SourceFiles/platform/linux/linux_libs.h @@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include + +#include "logs.h" namespace Platform { namespace Libs { diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 00f1258c8..1ace31ec6 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -29,6 +29,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "application.h" #include "lang/lang_keys.h" #include "storage/localstorage.h" +#include "app.h" +#include "facades.h" namespace Platform { namespace { diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h index 56cc4977e..45fe7adce 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.h +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h @@ -22,6 +22,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "platform/platform_main_window.h" +#include + +class QSystemTrayIcon; +class QMenu; + namespace Platform { class MainWindow : public Window::MainWindow { diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 4fd01bb6d..ab950157e 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -35,6 +35,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include +#include +#include +#include + #include using namespace Platform; diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.h b/Telegram/SourceFiles/platform/linux/specific_linux.h index 42647cef6..fa8561958 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.h +++ b/Telegram/SourceFiles/platform/linux/specific_linux.h @@ -17,9 +17,20 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once +#include "base/timer.h" // TimeMs + #include #include +#include +#include + +class QWidget; +class QPainter; +class QPaintEvent; +class QAbstractNativeEventFilter; +class LocationCoords; + namespace Platform { inline void SetWatchingMediaKeys(bool watching) { @@ -42,7 +53,7 @@ QString CurrentExecutablePath(int argc, char *argv[]); } // namespace Platform inline QString psServerPrefix() { - return qsl("/tmp/"); + return QStringLiteral("/tmp/"); } inline void psCheckLocalSocket(const QString &serverName) { QFile address(serverName); diff --git a/Telegram/SourceFiles/profile/profile_cover_drop_area.cpp b/Telegram/SourceFiles/profile/profile_cover_drop_area.cpp index 26ed58836..a61ef024a 100644 --- a/Telegram/SourceFiles/profile/profile_cover_drop_area.cpp +++ b/Telegram/SourceFiles/profile/profile_cover_drop_area.cpp @@ -22,7 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "styles/style_profile.h" #include -#include +#include namespace Profile { diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index 9b164d680..5cd664331 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -43,7 +43,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include #include -#include +#include namespace Local { namespace { diff --git a/Telegram/SourceFiles/ui/effects/cross_animation.cpp b/Telegram/SourceFiles/ui/effects/cross_animation.cpp index e22142074..2949cc357 100644 --- a/Telegram/SourceFiles/ui/effects/cross_animation.cpp +++ b/Telegram/SourceFiles/ui/effects/cross_animation.cpp @@ -21,7 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "ui/effects/cross_animation.h" #include "ui/twidget.h" -#include +#include namespace Ui { namespace { diff --git a/Telegram/SourceFiles/ui/special_buttons.cpp b/Telegram/SourceFiles/ui/special_buttons.cpp index ee99b0dd8..a487979e9 100644 --- a/Telegram/SourceFiles/ui/special_buttons.cpp +++ b/Telegram/SourceFiles/ui/special_buttons.cpp @@ -28,7 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "structs.h" #include "app.h" -#include +#include namespace Ui { namespace { diff --git a/Telegram/SourceFiles/ui/widgets/discrete_sliders.cpp b/Telegram/SourceFiles/ui/widgets/discrete_sliders.cpp index 0914c0e38..4d0ecd83b 100644 --- a/Telegram/SourceFiles/ui/widgets/discrete_sliders.cpp +++ b/Telegram/SourceFiles/ui/widgets/discrete_sliders.cpp @@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "styles/style_widgets.h" #include -#include +#include namespace Ui { diff --git a/Telegram/SourceFiles/ui/widgets/input_fields.cpp b/Telegram/SourceFiles/ui/widgets/input_fields.cpp index 375f37bbf..02777fa0c 100644 --- a/Telegram/SourceFiles/ui/widgets/input_fields.cpp +++ b/Telegram/SourceFiles/ui/widgets/input_fields.cpp @@ -29,7 +29,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "messenger.h" #include "app.h" -#include #include #include #include diff --git a/Telegram/SourceFiles/window/main_window.h b/Telegram/SourceFiles/window/main_window.h index 924a82abe..3c6c3785b 100644 --- a/Telegram/SourceFiles/window/main_window.h +++ b/Telegram/SourceFiles/window/main_window.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include #include #include "window/window_title.h" #include "base/timer.h" diff --git a/Telegram/SourceFiles/window/section_widget.cpp b/Telegram/SourceFiles/window/section_widget.cpp index 2fef9d8a9..d7b229679 100644 --- a/Telegram/SourceFiles/window/section_widget.cpp +++ b/Telegram/SourceFiles/window/section_widget.cpp @@ -25,7 +25,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "window_slide_animation.h" #include "facades.h" -#include +#include +#include namespace Window { diff --git a/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.cpp b/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.cpp index 6b3cd91f1..1a4aa261a 100644 --- a/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.cpp +++ b/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.cpp @@ -23,6 +23,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include #include "emoji_suggestions_data.h" +#include + #ifndef Expects #include #define Expects(condition) assert(condition) diff --git a/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.h b/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.h index b13f0608e..20ebaa488 100644 --- a/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.h +++ b/Telegram/ThirdParty/emoji_suggestions/emoji_suggestions.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once #include +#include namespace Ui { namespace Emoji {