This commit is contained in:
Stanislav Ershov 2018-03-17 21:58:26 +03:00 committed by Berkus Decker
parent d646c8bde1
commit dba2989219
192 changed files with 646 additions and 68 deletions

View File

@ -28,6 +28,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "mtproto/sender.h" #include "mtproto/sender.h"
#include "base/flat_map.h" #include "base/flat_map.h"
#include "base/flat_set.h" #include "base/flat_set.h"
#include "structs.h"
#include "facades.h"
class AuthSession; class AuthSession;
@ -43,6 +45,8 @@ inline const MTPVector<MTPChat> *getChatsFromMessagesChats(const MTPmessages_Cha
} // namespace Api } // namespace Api
class History;
class ApiWrap : private MTP::Sender, private base::Subscriber { class ApiWrap : private MTP::Sender, private base::Subscriber {
public: public:
ApiWrap(not_null<AuthSession*> session); ApiWrap(not_null<AuthSession*> session);

View File

@ -20,10 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include <QNetworkAccessManager>
#include "core/basic_types.h" #include "core/basic_types.h"
#include "history/history.h" #include "history/history.h"
#include "history/history_item.h" #include "history/history_item.h"
#include "layout.h" #include "layout.h"
#include "media/media_clip_reader.h"
class Messenger; class Messenger;
class MainWindow; class MainWindow;

View File

@ -20,8 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "stdafx.h"
#include <QApplication> #include <QApplication>
#include <QLocalSocket>
#include <QLocalServer>
class Messenger;
class Application : public QApplication { class Application : public QApplication {
Q_OBJECT Q_OBJECT

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include "base/timer.h" #include "base/timer.h"
#include "structs.h"
namespace Storage { namespace Storage {
class Downloader; class Downloader;
@ -43,6 +44,8 @@ enum class SelectorTab;
} // namespace ChatHelpers } // namespace ChatHelpers
class ApiWrap; class ApiWrap;
class History;
class HistoryItem;
class AuthSessionData final { class AuthSessionData final {
public: public:

View File

@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <iterator>
#include <algorithm>
namespace base { namespace base {
// @todo use ranges-v3 here // @todo use ranges-v3 here

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <cstdlib> #include <cstdlib>
#include <gsl/gsl>
namespace base { namespace base {
namespace assertion { namespace assertion {

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <deque> #include <deque>
#include <algorithm>
#include "base/optional.h" #include "base/optional.h"
namespace base { namespace base {

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <deque> #include <deque>
#include <algorithm>
namespace base { namespace base {

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <utility>
namespace base { namespace base {
namespace functors { namespace functors {

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <QPointer> #include <QPointer>
#include "base/lambda.h"
namespace base { namespace base {

View File

@ -19,6 +19,7 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/observer.h" #include "base/observer.h"
#include "facades.h"
namespace base { namespace base {
namespace internal { namespace internal {

View File

@ -23,7 +23,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include <vector> #include <vector>
#include <deque> #include <deque>
#include <QSharedPointer> #include <QSharedPointer>
#include "base/assertion.h"
#include "base/lambda.h"
#include "base/type_traits.h" #include "base/type_traits.h"
#include "core/utils.h"
namespace base { namespace base {
namespace internal { namespace internal {

View File

@ -24,6 +24,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include <openssl/sha.h> #include <openssl/sha.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include "base/assertion.h"
#include "core/utils.h"
namespace openssl { namespace openssl {
class Context { class Context {

View File

@ -20,7 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QtCore/QMap> #include <QMap>
// ordered set template based on QMap // ordered set template based on QMap
template <typename T> template <typename T>

View File

@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QByteArray>
#include <QLatin1String>
#include "base/assertion.h"
namespace base { namespace base {
namespace parse { namespace parse {

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QRegularExpression>
#include "base/flags.h" #include "base/flags.h"
namespace qthelp { namespace qthelp {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QStringList>
#include "core/utils.h"
#include "base/qthelp_url.h" #include "base/qthelp_url.h"
namespace qthelp { namespace qthelp {
@ -32,7 +34,7 @@ QMap<QString, QString> url_parse_params(const QString &params, UrlParamNameTrans
return name; return name;
}; };
auto paramsList = params.split('&'); auto paramsList = params.split('&');
for_const (auto &param, paramsList) { for_const (auto &param, paramsList) {
// Skip params without a name (starting with '='). // Skip params without a name (starting with '=').
if (auto separatorPosition = param.indexOf('=')) { if (auto separatorPosition = param.indexOf('=')) {

View File

@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include <QUrl>
#include <QMap>
namespace qthelp { namespace qthelp {
inline QString url_encode(const QString &part) { inline QString url_encode(const QString &part) {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QMutexLocker>
#include "base/runtime_composer.h" #include "base/runtime_composer.h"
struct RuntimeComposerMetadatasMap { struct RuntimeComposerMetadatasMap {

View File

@ -19,6 +19,11 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <cstddef>
#include <QAtomicInt>
#include "base/assertion.h"
#include "core/utils.h"
class RuntimeComposer; class RuntimeComposer;
typedef void(*RuntimeComponentConstruct)(void *location, RuntimeComposer *composer); typedef void(*RuntimeComponentConstruct)(void *location, RuntimeComposer *composer);

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/task_queue.h"
#include <algorithm>
#include <thread> #include <thread>
#include <condition_variable> #include <condition_variable>
#include <QMutex>
#include <QWaitCondition>
#include "base/assertion.h"
#include "base/task_queue.h"
#include "facades.h"
namespace base { namespace base {
namespace { namespace {

View File

@ -21,6 +21,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <memory> #include <memory>
#include <deque>
#include <QMutex>
#include "base/lambda.h"
#include "core/utils.h"
namespace base { namespace base {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QTimerEvent>
#include "base/timer.h" #include "base/timer.h"
namespace base { namespace base {

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <type_traits>
namespace base { namespace base {
template <typename T> template <typename T>

View File

@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <memory>
// @todo replace this with std::experimental::observer_ptr // @todo replace this with std::experimental::observer_ptr
#include <utility>
#include <QCoreApplication>
namespace base { namespace base {
@ -131,11 +134,11 @@ weak_unique_ptr<T> make_weak_unique(const std::unique_ptr<T> &value) {
#ifdef QT_VERSION #ifdef QT_VERSION
template <typename Lambda> template <typename Lambda>
inline void InvokeQueued(base::enable_weak_from_this *context, Lambda &&lambda) { inline void InvokeQueued(base::enable_weak_from_this *context, Lambda &&lambda) {
QObject proxy; QObject proxy;
QObject::connect(&proxy, &QObject::destroyed, QCoreApplication::instance(), [guard = base::make_weak_unique(context), lambda = std::forward<Lambda>(lambda)] { QObject::connect(&proxy, &QObject::destroyed, QCoreApplication::instance(), [guard = base::make_weak_unique(context), lambda = std::forward<Lambda>(lambda)] {
if (guard) { if (guard) {
lambda(); lambda();
} }
}, Qt::QueuedConnection); }, Qt::QueuedConnection);
} }
#endif // QT_VERSION #endif // QT_VERSION

View File

@ -23,9 +23,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QByteArray>
#include "minizip/zip.h" #include "minizip/zip.h"
#include "minizip/unzip.h" #include "minizip/unzip.h"
#include "logs.h"
namespace zlib { namespace zlib {
namespace internal { namespace internal {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QDesktopServices>
#include "boxes/about_box.h" #include "boxes/about_box.h"
#include "config.h" #include "config.h"

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <algorithm>
#include "boxes/abstract_box.h" #include "boxes/abstract_box.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"

View File

@ -20,8 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #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/widgets/shadow.h"
#include "ui/twidget.h"
#include "layerwidget.h"
namespace Ui { namespace Ui {
class RoundButton; class RoundButton;

View File

@ -25,7 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "mainwindow.h" #include "mainwindow.h"
#include "ui/widgets/checkbox.h" #include "ui/widgets/checkbox.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "facades.h"
void AutoLockBox::prepare() { void AutoLockBox::prepare() {
setTitle(langFactory(lng_passcode_autolock)); setTitle(langFactory(lng_passcode_autolock));

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/lambda_guard.h"
#include "boxes/change_phone_box.h" #include "boxes/change_phone_box.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "ui/widgets/labels.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 "boxes/confirm_phone_box.h"
#include "ui/toast/toast.h" #include "ui/toast/toast.h"
#include "boxes/confirm_box.h" #include "boxes/confirm_box.h"
#include "facades.h"
namespace { namespace {

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include "boxes/abstract_box.h" #include "boxes/abstract_box.h"
#include "history/history.h"
namespace Ui { namespace Ui {
class Checkbox; class Checkbox;

View File

@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "ui/widgets/buttons.h" #include "ui/widgets/buttons.h"
#include "platform/platform_specific.h" #include "platform/platform_specific.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "facades.h"
DownloadPathBox::DownloadPathBox(QWidget *parent) DownloadPathBox::DownloadPathBox(QWidget *parent)
: _path(Global::DownloadPath()) : _path(Global::DownloadPath())

View File

@ -25,6 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "ui/widgets/shadow.h" #include "ui/widgets/shadow.h"
#include "styles/style_mediaview.h" #include "styles/style_mediaview.h"
#include "ui/widgets/input_fields.h" #include "ui/widgets/input_fields.h"
#include "app.h"
class EditColorBox::Picker : public TWidget { class EditColorBox::Picker : public TWidget {
public: public:

View File

@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "ui/special_buttons.h" #include "ui/special_buttons.h"
#include "boxes/calendar_box.h" #include "boxes/calendar_box.h"
#include "facades.h"
namespace { namespace {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/lambda_guard.h"
#include "boxes/edit_privacy_box.h" #include "boxes/edit_privacy_box.h"
#include "styles/style_boxes.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 "auth_session.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
namespace { namespace {
class PrivacyExceptionsBoxController : public ChatsListBoxController { class PrivacyExceptionsBoxController : public ChatsListBoxController {

View File

@ -19,7 +19,6 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "boxes/language_box.h" #include "boxes/language_box.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "ui/widgets/checkbox.h" #include "ui/widgets/checkbox.h"
#include "ui/widgets/buttons.h" #include "ui/widgets/buttons.h"

View File

@ -26,6 +26,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "auth_session.h" #include "auth_session.h"
#include "facades.h"
LocalStorageBox::LocalStorageBox(QWidget *parent) LocalStorageBox::LocalStorageBox(QWidget *parent)
: _clear(this, lang(lng_local_storage_clear), st::boxLinkButton) { : _clear(this, lang(lng_local_storage_clear), st::boxLinkButton) {

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include "boxes/abstract_box.h" #include "boxes/abstract_box.h"
#include "facades.h"
namespace Ui { namespace Ui {
class LinkButton; class LinkButton;

View File

@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "ui/widgets/buttons.h" #include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h" #include "ui/widgets/input_fields.h"
#include "facades.h"
PasscodeBox::PasscodeBox(QWidget*, bool turningOff) PasscodeBox::PasscodeBox(QWidget*, bool turningOff)
: _turningOff(turningOff) : _turningOff(turningOff)

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/algorithm.h"
#include "boxes/peer_list_box.h" #include "boxes/peer_list_box.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "base/algorithm.h"
#include "boxes/peer_list_controllers.h" #include "boxes/peer_list_controllers.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "styles/style_profile.h" #include "styles/style_profile.h"
#include "boxes/confirm_box.h" #include "boxes/confirm_box.h"

View File

@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "boxes/peer_list_box.h" #include "boxes/peer_list_box.h"
#include "base/flat_set.h" #include "base/flat_set.h"
#include "base/weak_unique_ptr.h" #include "base/weak_unique_ptr.h"
#include "history/history.h"
// Not used for now. // Not used for now.
// //

View File

@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "ui/widgets/buttons.h" #include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h" #include "ui/widgets/input_fields.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "facades.h"
ReportBox::ReportBox(QWidget*, PeerData *peer) : _peer(peer) ReportBox::ReportBox(QWidget*, PeerData *peer) : _peer(peer)
, _reasonGroup(std::make_shared<Ui::RadioenumGroup<Reason>>(Reason::Spam)) , _reasonGroup(std::make_shared<Ui::RadioenumGroup<Reason>>(Reason::Spam))

View File

@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "boxes/abstract_box.h" #include "boxes/abstract_box.h"
#include "storage/localimageloader.h" #include "storage/localimageloader.h"
#include "history/history_media.h"
namespace Ui { namespace Ui {
class Checkbox; class Checkbox;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org 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 "auth_session.h"
#include "mainwidget.h" #include "mainwidget.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"

View File

@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <vector>
#include <core/basic_types.h>
#include "settings.h"
namespace Calls { namespace Calls {
class Call; class Call;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonParseError>
#include "calls/calls_instance.h" #include "calls/calls_instance.h"
#include "mtproto/connection.h" #include "mtproto/connection.h"

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QDesktopWidget>
#include "calls/calls_panel.h" #include "calls/calls_panel.h"
#include "calls/calls_emoji_fingerprint.h" #include "calls/calls_emoji_fingerprint.h"

View File

@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "base/weak_unique_ptr.h" #include "base/weak_unique_ptr.h"
#include "base/timer.h" #include "base/timer.h"
#include "ui/twidget.h"
namespace Ui { namespace Ui {
class IconButton; class IconButton;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QPaintEvent>
#include "chat_helpers/bot_keyboard.h" #include "chat_helpers/bot_keyboard.h"
#include "styles/style_widgets.h" #include "styles/style_widgets.h"
#include "styles/style_history.h" #include "styles/style_history.h"
#include "facades.h"
BotKeyboard::BotKeyboard(QWidget *parent) : TWidget(parent) BotKeyboard::BotKeyboard(QWidget *parent) : TWidget(parent)
, _st(&st::botKbButton) { , _st(&st::botKbButton) {

View File

@ -20,7 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "history/history_item.h"
#include "ui/twidget.h"
#include "ui/widgets/tooltip.h" #include "ui/widgets/tooltip.h"
#include "structs.h"
class HistoryItem;
class BotKeyboard : public TWidget, public Ui::AbstractTooltipShower, public ClickHandlerHost { class BotKeyboard : public TWidget, public Ui::AbstractTooltipShower, public ClickHandlerHost {
Q_OBJECT Q_OBJECT

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QTextBlock>
#include "chat_helpers/emoji_suggestions_widget.h" #include "chat_helpers/emoji_suggestions_widget.h"
#include "chat_helpers/emoji_suggestions_helper.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 "platform/platform_specific.h"
#include "styles/style_chat_helpers.h" #include "styles/style_chat_helpers.h"
#include "ui/widgets/inner_dropdown.h" #include "ui/widgets/inner_dropdown.h"
#include "ui/emoji_config.h"
#include "app.h"
namespace Ui { namespace Ui {
namespace Emoji { namespace Emoji {
@ -121,7 +124,7 @@ std::vector<SuggestionsWidget::Row> SuggestionsWidget::getRowsByQuery() const {
suggestionsEmoji[i] = Find(QStringFromUTF16(suggestions[i].emoji())); suggestionsEmoji[i] = Find(QStringFromUTF16(suggestions[i].emoji()));
} }
auto recents = 0; auto recents = 0;
auto &recent = GetRecent(); auto &recent = GetRecent();
for (auto &item : recent) { for (auto &item : recent) {
auto emoji = item.first->original(); auto emoji = item.first->original();
if (!emoji) emoji = item.first; if (!emoji) emoji = item.first;

View File

@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QTextEdit>
#include "base/observer.h"
#include "ui/twidget.h"
#include "ui/effects/panel_animation.h" #include "ui/effects/panel_animation.h"
namespace Ui { namespace Ui {

View File

@ -20,7 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QTimer>
#include "base/observer.h"
#include "ui/twidget.h" #include "ui/twidget.h"
#include "ui/animation.h"
#include "structs.h"
namespace Ui { namespace Ui {
class ScrollArea; class ScrollArea;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QMimeData>
#include <QString>
#include "chat_helpers/message_field.h" #include "chat_helpers/message_field.h"
#include "history/history_widget.h" #include "history/history_widget.h"

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QWindow>
#include "chat_helpers/tabbed_panel.h" #include "chat_helpers/tabbed_panel.h"
#include "ui/widgets/shadow.h" #include "ui/widgets/shadow.h"

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include "ui/twidget.h" #include "ui/twidget.h"
#include "ui/animation.h"
#include "base/timer.h" #include "base/timer.h"
namespace Window { namespace Window {

View File

@ -20,8 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QtGlobal>
#ifdef Q_OS_WIN
# include <guiddef.h>
#endif
#include "core/version.h" #include "core/version.h"
#include "settings.h" #include "settings.h"
#include "utils.h"
constexpr str_const AppName = "${KEPKA_APPNAME}"; constexpr str_const AppName = "${KEPKA_APPNAME}";
@ -142,6 +147,7 @@ inline bool isServiceUser(quint64 id) {
} }
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <guiddef.h>
inline const GUID &cGUID() { inline const GUID &cGUID() {
#ifndef OS_MAC_STORE #ifndef OS_MAC_STORE
static const GUID gGuid = { 0x87a94ab0, 0xe370, 0x4cde, { 0x98, 0xd3, 0xac, 0xc1, 0x10, 0xc5, 0x96, 0x7d } }; static const GUID gGuid = { 0x87a94ab0, 0xe370, 0x4cde, { 0x98, 0xd3, 0xac, 0xc1, 0x10, 0xc5, 0x96, 0x7d } };

View File

@ -24,15 +24,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <ctime> #include <ctime>
#include <cstdint>
#include <gsl/gsl>
#include <QLatin1String>
#include <QString>
#include "base/build_config.h" #include "base/build_config.h"
#include "base/ordered_set.h"
template <typename Type> template <typename Type>
using not_null = gsl::not_null<Type>; using not_null = gsl::not_null<Type>;
#include "base/ordered_set.h"
#include <cstdint>
#define qsl(s) QStringLiteral(s) #define qsl(s) QStringLiteral(s)
#define qstr(s) QLatin1String(s, static_cast<int>(sizeof(s)-1)) #define qstr(s) QLatin1String(s, static_cast<int>(sizeof(s)-1))

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "ui/text/text_entity.h"
#include "core/click_handler.h" #include "core/click_handler.h"
ClickHandlerHost::~ClickHandlerHost() { ClickHandlerHost::~ClickHandlerHost() {

View File

@ -20,6 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QSharedPointer>
#include "core/utils.h"
#include "base/lambda.h"
class ClickHandler; class ClickHandler;
using ClickHandlerPtr = QSharedPointer<ClickHandler>; using ClickHandlerPtr = QSharedPointer<ClickHandler>;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QDesktopServices>
#include "core/click_handler_types.h" #include "core/click_handler_types.h"
#include "lang/lang_keys.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 "storage/localstorage.h"
#include "ui/widgets/tooltip.h" #include "ui/widgets/tooltip.h"
#include "core/file_utilities.h" #include "core/file_utilities.h"
#include "facades.h"
namespace { namespace {

View File

@ -20,7 +20,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QUrl>
#include <QApplication>
#include <QClipboard>
#include "core/click_handler.h" #include "core/click_handler.h"
#include "structs.h"
class TextClickHandler : public ClickHandler { class TextClickHandler : public ClickHandler {
public: public:

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QDesktopServices>
#include <QStandardPaths>
#include <QFileDialog>
#include "core/file_utilities.h" #include "core/file_utilities.h"
#include "mainwindow.h" #include "mainwindow.h"

View File

@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include <QUrl>
#include <QStringList>
#include <QByteArray>
#include "base/observer.h" #include "base/observer.h"
// legacy // legacy

View File

@ -20,8 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QTimer>
#include <base/lambda.h>
#include "core/basic_types.h" #include "core/basic_types.h"
#include "core/utils.h"
class SingleTimer : public QTimer { // single shot timer with check class SingleTimer : public QTimer { // single shot timer with check
Q_OBJECT Q_OBJECT

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QMutex>
#include <QThread>
#include <QMimeDatabase>
#include "core/utils.h" #include "core/utils.h"
#include <openssl/crypto.h> #include <openssl/crypto.h>

View File

@ -20,8 +20,19 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <set>
#include <QByteArray>
#include <QDateTime>
#include <QReadWriteLock>
#include <QRegularExpression>
#include <QMimeType>
#include <QStringList>
#include <QFileInfo>
#include "base/assertion.h"
#include "core/basic_types.h" #include "core/basic_types.h"
#include "base/flags.h" #include "base/flags.h"
#include "logs.h"
// Define specializations for QByteArray for Qt 5.3.2, because // Define specializations for QByteArray for Qt 5.3.2, because
// QByteArray in Qt 5.3.2 doesn't declare "pointer" subtype. // 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) { 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<int>(str.size()));
} }
inline QByteArray str_const_toByteArray(const str_const &str) { 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<int>(str.size()));
} }
template <typename T> template <typename T>

View File

@ -21,7 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once #pragma once
#include <cstdint> #include <cstdint>
// #include "core/utils.h" #include "utils.h"
#define BETA_VERSION_MACRO (0ULL) #define BETA_VERSION_MACRO (0ULL)

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org 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" #include "data/data_abstract_structure.h"
namespace Data { namespace Data {

View File

@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "structs.h"
#include "history/history.h"
namespace Ui { namespace Ui {
class FlatTextarea; class FlatTextarea;
} // namespace Ui } // namespace Ui

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QMap>
namespace Dialogs { namespace Dialogs {
class Row; class Row;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "history/history.h"
#include "dialogs/dialogs_indexed_list.h" #include "dialogs/dialogs_indexed_list.h"
namespace Dialogs { namespace Dialogs {

View File

@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "structs.h"
#include "dialogs/dialogs_common.h" #include "dialogs/dialogs_common.h"
#include "dialogs/dialogs_list.h" #include "dialogs/dialogs_list.h"

View File

@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "dialogs/dialogs_widget.h" #include "dialogs/dialogs_widget.h"
#include "base/flags.h" #include "base/flags.h"
#include "facades.h"
namespace Dialogs { namespace Dialogs {
class Row; class Row;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "app.h"
#include "dialogs/dialogs_layout.h" #include "dialogs/dialogs_layout.h"
#include "data/data_abstract_structure.h" #include "data/data_abstract_structure.h"
#include "data/data_drafts.h" #include "data/data_drafts.h"
#include "dialogs/dialogs_list.h" #include "dialogs/dialogs_list.h"

View File

@ -20,6 +20,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "ui/twidget.h"
#include "dialogs/dialogs_common.h"
namespace Dialogs { namespace Dialogs {
class Row; class Row;

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "structs.h"
#include "dialogs/dialogs_common.h"
#include "dialogs/dialogs_row.h" #include "dialogs/dialogs_row.h"
class PeerData; class PeerData;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QMimeData>
#include "dialogs/dialogs_widget.h" #include "dialogs/dialogs_widget.h"
#include "dialogs/dialogs_inner_widget.h" #include "dialogs/dialogs_inner_widget.h"
#include "dialogs/dialogs_search_from_controllers.h" #include "dialogs/dialogs_search_from_controllers.h"
#include "styles/style_dialogs.h" #include "styles/style_dialogs.h"

View File

@ -22,6 +22,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "window/section_widget.h" #include "window/section_widget.h"
#include "ui/widgets/scroll_area.h" #include "ui/widgets/scroll_area.h"
#include "structs.h"
#include "dialogs/dialogs_common.h"
class DialogsInner; class DialogsInner;
@ -55,6 +57,8 @@ enum DialogsSearchRequestType {
DialogsSearchMigratedFromOffset, DialogsSearchMigratedFromOffset,
}; };
class History;
class DialogsWidget : public Window::AbstractSectionWidget, public RPCSender { class DialogsWidget : public Window::AbstractSectionWidget, public RPCSender {
Q_OBJECT Q_OBJECT

View File

@ -22,6 +22,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "base/type_traits.h" #include "base/type_traits.h"
#include "base/observer.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 LayerWidget;
class BoxContent; class BoxContent;

View File

@ -20,6 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "ui/animation.h"
#include "structs.h" #include "structs.h"
#include "dialogs/dialogs_common.h" #include "dialogs/dialogs_common.h"
#include "ui/effects/send_action_animations.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/variant.h"
#include "base/flat_set.h" #include "base/flat_set.h"
#include "base/flags.h" #include "base/flags.h"
#include "base/optional.h"
void HistoryInit(); void HistoryInit();

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include "history/history_admin_log_inner.h" #include <QAction>
#include "history/history_admin_log_item.h"
#include "history/history_admin_log_inner.h"
#include "styles/style_history.h" #include "styles/style_history.h"
#include "history/history_media_types.h" #include "history/history_media_types.h"
#include "history/history_message.h" #include "history/history_message.h"

View File

@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QClipboard>
#include <gsl/gsl>
#include "history/history_admin_log_item.h" #include "history/history_admin_log_item.h"
#include "history/history_admin_log_section.h" #include "history/history_admin_log_section.h"
#include "ui/widgets/tooltip.h" #include "ui/widgets/tooltip.h"

View File

@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "base/lambda.h"
#include "core/basic_types.h"
#include "core/utils.h"
#include "history/history_item.h"
class History;
namespace AdminLog { namespace AdminLog {
class HistoryItemOwned; class HistoryItemOwned;

View File

@ -20,7 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QMimeData>
#include "base/lambda.h"
#include "ui/twidget.h" #include "ui/twidget.h"
#include "ui/animation.h"
class DragArea : public TWidget { class DragArea : public TWidget {
Q_OBJECT Q_OBJECT

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QAction>
#include "history/history_inner_widget.h" #include "history/history_inner_widget.h"
#include "styles/style_history.h" #include "styles/style_history.h"
#include "core/file_utilities.h" #include "core/file_utilities.h"
#include "history/history_message.h" #include "history/history_message.h"

View File

@ -20,9 +20,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QClipboard>
#include "ui/widgets/tooltip.h" #include "ui/widgets/tooltip.h"
#include "ui/widgets/scroll_area.h" #include "ui/widgets/scroll_area.h"
#include "window/top_bar_widget.h" #include "window/top_bar_widget.h"
#include "history/history.h"
#include "history/history_item.h"
namespace Window { namespace Window {
class Controller; class Controller;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QApplication>
#include <QClipboard>
#include "history/history_item.h" #include "history/history_item.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "mainwidget.h" #include "mainwidget.h"
#include "history/history_service_layout.h" #include "history/history_service_layout.h"

View File

@ -22,6 +22,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "base/runtime_composer.h" #include "base/runtime_composer.h"
#include "base/flags.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 { namespace Ui {
class RippleAnimation; class RippleAnimation;
@ -32,6 +38,8 @@ struct BotKeyboardButton;
struct RippleAnimation; struct RippleAnimation;
} // namespace style } // namespace style
class HistoryItem;
class HistoryElement { class HistoryElement {
public: public:
HistoryElement() = default; HistoryElement() = default;

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QDesktopServices>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QBuffer>
#include <QImageReader>
#include "history/history_location_manager.h" #include "history/history_location_manager.h"
#include "mainwidget.h" #include "mainwidget.h"

View File

@ -20,6 +20,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include <QApplication>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QClipboard>
#include "scheme.h"
#include "core/click_handler.h"
#include "ui/images.h"
void initLocationManager(); void initLocationManager();
void reinitLocationManager(); void reinitLocationManager();
void deinitLocationManager(); void deinitLocationManager();

View File

@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include "history/history.h"
#include "history/history_item.h"
enum class MediaInBubbleState { enum class MediaInBubbleState {
None, None,
Top, Top,

View File

@ -20,6 +20,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #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(); void HistoryInitMessages();
base::lambda<void(ChannelData*, MsgId)> HistoryDependentItemCallback(const FullMsgId &msgId); base::lambda<void(ChannelData*, MsgId)> HistoryDependentItemCallback(const FullMsgId &msgId);
MTPDmessage::Flags NewMessageFlags(not_null<PeerData*> peer); MTPDmessage::Flags NewMessageFlags(not_null<PeerData*> peer);

View File

@ -20,6 +20,14 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include <QString>
#include <QList>
#include "base/runtime_composer.h"
#include "core/click_handler.h"
#include "core/utils.h"
#include "structs.h"
#include "history/history_item.h"
struct HistoryServiceDependentData { struct HistoryServiceDependentData {
MsgId msgId = 0; MsgId msgId = 0;
HistoryItem *msg = nullptr; HistoryItem *msg = nullptr;

View File

@ -20,6 +20,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "core/basic_types.h"
#include "ui/twidget.h"
#include "ui/text/text.h"
class HistoryService; class HistoryService;
namespace HistoryLayout { namespace HistoryLayout {

View File

@ -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 Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/ */
#include <QWindow>
#include "history/history_widget.h" #include "history/history_widget.h"
#include "styles/style_history.h" #include "styles/style_history.h"
#include "styles/style_dialogs.h" #include "styles/style_dialogs.h"
#include "styles/style_window.h" #include "styles/style_window.h"
@ -56,7 +56,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "mainwidget.h" #include "mainwidget.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "passcodewidget.h" #include "passcodewidget.h"
#include "mainwindow.h"
#include "storage/file_upload.h" #include "storage/file_upload.h"
#include "media/media_audio.h" #include "media/media_audio.h"
#include "media/media_audio_capture.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 "window/window_controller.h"
#include "inline_bots/inline_results_widget.h" #include "inline_bots/inline_results_widget.h"
#include "chat_helpers/emoji_suggestions_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. // Smart pointer for QObject*, has move semantics, destroys object if it doesn't have a parent.
template <typename Object> template <typename Object>
class test_ptr { class test_ptr {
@ -657,7 +657,7 @@ HistoryWidget::HistoryWidget(QWidget *parent, not_null<Window::Controller*> cont
connect(_field, SIGNAL(changed()), this, SLOT(onTextChange())); connect(_field, SIGNAL(changed()), this, SLOT(onTextChange()));
connect(_field, SIGNAL(spacedReturnedPasted()), this, SLOT(onPreviewParse())); connect(_field, SIGNAL(spacedReturnedPasted()), this, SLOT(onPreviewParse()));
connect(_field, SIGNAL(linksChanged()), this, SLOT(onPreviewCheck())); connect(_field, SIGNAL(linksChanged()), this, SLOT(onPreviewCheck()));
connect(App::wnd()->windowHandle(), SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged())); connect(static_cast<const QWindow*>(App::wnd()->windowHandle()), SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged()));
connect(&_scrollTimer, SIGNAL(timeout()), this, SLOT(onScrollTimer())); connect(&_scrollTimer, SIGNAL(timeout()), this, SLOT(onScrollTimer()));
connect(_tabbedSelector, SIGNAL(emojiSelected(EmojiPtr)), _field, SLOT(onEmojiInsert(EmojiPtr))); connect(_tabbedSelector, SIGNAL(emojiSelected(EmojiPtr)), _field, SLOT(onEmojiInsert(EmojiPtr)));
connect(_tabbedSelector, SIGNAL(stickerSelected(DocumentData*)), this, SLOT(onStickerSend(DocumentData*))); connect(_tabbedSelector, SIGNAL(stickerSelected(DocumentData*)), this, SLOT(onStickerSend(DocumentData*)));

View File

@ -28,6 +28,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "core/single_timer.h" #include "core/single_timer.h"
#include "ui/widgets/input_fields.h" #include "ui/widgets/input_fields.h"
#include "base/flags.h" #include "base/flags.h"
#include "history/history_item.h"
namespace InlineBots { namespace InlineBots {
namespace Layout { namespace Layout {
@ -97,6 +98,7 @@ private:
}; };
class MainWidget;
class HistoryHider : public TWidget, private base::Subscriber { class HistoryHider : public TWidget, private base::Subscriber {
Q_OBJECT Q_OBJECT

View File

@ -32,6 +32,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "storage/localstorage.h" #include "storage/localstorage.h"
#include "auth_session.h" #include "auth_session.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "app.h"
namespace InlineBots { namespace InlineBots {
namespace Layout { namespace Layout {

Some files were not shown because too many files have changed in this diff Show More