2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove many includes from stdafx.pch.

This commit is contained in:
John Preston
2019-09-04 10:19:15 +03:00
parent 4929de2bfb
commit 6343221d7b
109 changed files with 447 additions and 87 deletions

View File

@@ -23,6 +23,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "core/application.h"
#include <QtWidgets/QCommonStyle>
#include <QtWidgets/QScrollBar>
#include <QtWidgets/QApplication>
#include <QtGui/QClipboard>
#include <QtGui/QTextBlock>
#include <QtGui/QTextDocumentFragment>
#include <QtCore/QMimeData>
namespace Ui {
namespace {
@@ -1234,7 +1242,7 @@ void FlatInput::keyPressEvent(QKeyEvent *e) {
} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) {
auto selected = selectedText();
if (!selected.isEmpty() && echoMode() == QLineEdit::Normal) {
QApplication::clipboard()->setText(selected, QClipboard::FindBuffer);
QGuiApplication::clipboard()->setText(selected, QClipboard::FindBuffer);
}
#endif // Q_OS_MAC
}
@@ -2696,7 +2704,7 @@ void InputField::keyPressEventInner(QKeyEvent *e) {
const auto start = cursor.selectionStart();
const auto end = cursor.selectionEnd();
if (end > start) {
QApplication::clipboard()->setText(
QGuiApplication::clipboard()->setText(
getTextWithTagsPart(start, end).text,
QClipboard::FindBuffer);
}
@@ -3957,7 +3965,7 @@ void MaskedInputField::keyPressEvent(QKeyEvent *e) {
} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) {
auto selected = selectedText();
if (!selected.isEmpty() && echoMode() == QLineEdit::Normal) {
QApplication::clipboard()->setText(selected, QClipboard::FindBuffer);
QGuiApplication::clipboard()->setText(selected, QClipboard::FindBuffer);
}
#endif // Q_OS_MAC
}

View File

@@ -11,6 +11,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "styles/style_widgets.h"
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QTextEdit>
class UserData;
namespace Ui {

View File

@@ -13,6 +13,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "lang/lang_keys.h"
#include <QtWidgets/QApplication>
#include <QtGui/QClipboard>
#include <QtGui/QDrag>
#include <QtCore/QMimeData>
namespace Ui {
namespace {
@@ -582,7 +587,7 @@ void FlatLabel::showContextMenu(QContextMenuEvent *e, ContextMenuReason reason)
_contextMenu->addAction(
actionText,
[text = link->copyToClipboardText()] {
QApplication::clipboard()->setText(text);
QGuiApplication::clipboard()->setText(text);
});
}
}

View File

@@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_widgets.h"
#include <QtWidgets/QMenu>
namespace Ui {
class ToggleView;

View File

@@ -15,6 +15,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "lang/lang_keys.h"
#include <QtWidgets/QApplication>
#include <QtWidgets/QDesktopWidget>
namespace Ui {
PopupMenu::PopupMenu(QWidget *parent, const style::PopupMenu &st)

View File

@@ -7,6 +7,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "ui/widgets/scroll_area.h"
#include <QtWidgets/QScrollBar>
#include <QtWidgets/QApplication>
#include <QtGui/QGuiApplication>
#include <QtGui/QWindow>
namespace Ui {
// flick scroll taken from http://qt-project.org/doc/qt-4.8/demos-embedded-anomaly-src-flickcharm-cpp.html

View File

@@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "styles/style_widgets.h"
#include <QtWidgets/QScrollArea>
namespace Ui {
enum class TouchScrollState {

View File

@@ -23,6 +23,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_info.h"
#include "styles/style_calls.h"
#include <QtWidgets/QApplication>
#include <QtWidgets/QDesktopWidget>
namespace Ui {
SeparatePanel::SeparatePanel()

View File

@@ -12,6 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/qt_signal_producer.h"
#include "styles/style_widgets.h"
#include <QtCore/QCoreApplication>
#include <QtWidgets/QDesktopWidget>
namespace Ui {
Tooltip *TooltipInstance = nullptr;