Build with QT_NO_KEYWORDS
This commit is contained in:
parent
794ea13f7e
commit
af41bff7e4
12 changed files with 54 additions and 48 deletions
|
|
@ -197,7 +197,7 @@ public:
|
|||
|
||||
void scrollByDraggingDelta(int delta);
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void onScrollToY(int top, int bottom = -1);
|
||||
|
||||
protected:
|
||||
|
|
@ -260,7 +260,7 @@ protected:
|
|||
void paintEvent(QPaintEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onScroll();
|
||||
void onInnerResize();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include <QtGui/QWindow>
|
||||
|
||||
// private headers are using keywords :(
|
||||
#ifdef QT_NO_KEYWORDS
|
||||
#define signals Q_SIGNALS
|
||||
#define slots Q_SLOTS
|
||||
#endif // QT_NO_KEYWORDS
|
||||
|
||||
#include <private/qwaylanddisplay_p.h>
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include <private/qwaylandshellsurface_p.h>
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ bool WindowHelper::handleNativeEvent(
|
|||
} else if (wParam == SIZE_MINIMIZED) {
|
||||
state = Qt::WindowMinimized;
|
||||
}
|
||||
emit window()->windowHandle()->windowStateChanged(state);
|
||||
window()->windowHandle()->windowStateChanged(state);
|
||||
}
|
||||
updateMargins();
|
||||
const auto changes = (wParam == SIZE_MINIMIZED
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void DropdownMenu::handleTriggered(const Menu::CallbackData &data) {
|
|||
if (!popupSubmenuFromAction(data)) {
|
||||
hideMenu();
|
||||
_triggering = true;
|
||||
emit data.action->trigger();
|
||||
data.action->trigger();
|
||||
_triggering = false;
|
||||
if (_deleteLater) {
|
||||
_deleteLater = false;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ protected:
|
|||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onHidden() {
|
||||
hideFinish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ protected:
|
|||
|
||||
int resizeGetHeight(int newWidth) override;
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onHideAnimated() {
|
||||
hideAnimated();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ void FlatInput::focusInEvent(QFocusEvent *e) {
|
|||
update();
|
||||
}
|
||||
QLineEdit::focusInEvent(e);
|
||||
emit focused();
|
||||
focused();
|
||||
}
|
||||
|
||||
void FlatInput::focusOutEvent(QFocusEvent *e) {
|
||||
|
|
@ -1095,7 +1095,7 @@ void FlatInput::focusOutEvent(QFocusEvent *e) {
|
|||
update();
|
||||
}
|
||||
QLineEdit::focusOutEvent(e);
|
||||
emit blurred();
|
||||
blurred();
|
||||
}
|
||||
|
||||
void FlatInput::resizeEvent(QResizeEvent *e) {
|
||||
|
|
@ -1183,13 +1183,13 @@ void FlatInput::keyPressEvent(QKeyEvent *e) {
|
|||
if (wasText == newText) { // call correct manually
|
||||
correctValue(wasText, newText);
|
||||
_oldtext = newText;
|
||||
if (wasText != _oldtext) emit changed();
|
||||
if (wasText != _oldtext) changed();
|
||||
updatePlaceholder();
|
||||
}
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
emit cancelled();
|
||||
cancelled();
|
||||
} else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
||||
emit submitted(e->modifiers());
|
||||
submitted(e->modifiers());
|
||||
#ifdef Q_OS_MAC
|
||||
} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) {
|
||||
auto selected = selectedText();
|
||||
|
|
@ -1205,7 +1205,7 @@ void FlatInput::onTextEdited() {
|
|||
|
||||
correctValue(wasText, newText);
|
||||
_oldtext = newText;
|
||||
if (wasText != _oldtext) emit changed();
|
||||
if (wasText != _oldtext) changed();
|
||||
updatePlaceholder();
|
||||
|
||||
Integration::Instance().textActionsUpdated();
|
||||
|
|
@ -1585,7 +1585,7 @@ bool InputField::heightAutoupdated() {
|
|||
|
||||
void InputField::checkContentHeight() {
|
||||
if (heightAutoupdated()) {
|
||||
emit resized();
|
||||
resized();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1771,13 +1771,13 @@ void InputField::focusInEventInner(QFocusEvent *e) {
|
|||
: (width() / 2);
|
||||
setFocused(true);
|
||||
_inner->QTextEdit::focusInEvent(e);
|
||||
emit focused();
|
||||
focused();
|
||||
}
|
||||
|
||||
void InputField::focusOutEventInner(QFocusEvent *e) {
|
||||
setFocused(false);
|
||||
_inner->QTextEdit::focusOutEvent(e);
|
||||
emit blurred();
|
||||
blurred();
|
||||
}
|
||||
|
||||
void InputField::setFocused(bool focused) {
|
||||
|
|
@ -2306,7 +2306,7 @@ void InputField::handleContentsChanged() {
|
|||
if (tagsChanged || (_lastTextWithTags.text != currentText)) {
|
||||
_lastTextWithTags.text = currentText;
|
||||
const auto weak = MakeWeak(this);
|
||||
emit changed();
|
||||
changed();
|
||||
if (!weak) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2661,15 +2661,15 @@ void InputField::keyPressEventInner(QKeyEvent *e) {
|
|||
&& revertFormatReplace()) {
|
||||
e->accept();
|
||||
} else if (enter && enterSubmit) {
|
||||
emit submitted(e->modifiers());
|
||||
submitted(e->modifiers());
|
||||
} else if (e->key() == Qt::Key_Escape) {
|
||||
e->ignore();
|
||||
emit cancelled();
|
||||
cancelled();
|
||||
} else if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Backtab) {
|
||||
if (alt || ctrl) {
|
||||
e->ignore();
|
||||
} else if (_customTab) {
|
||||
emit tabbed();
|
||||
tabbed();
|
||||
} else if (!focusNextPrevChild(e->key() == Qt::Key_Tab && !shift)) {
|
||||
e->ignore();
|
||||
}
|
||||
|
|
@ -3828,13 +3828,13 @@ void MaskedInputField::focusInEvent(QFocusEvent *e) {
|
|||
_borderAnimationStart = (e->reason() == Qt::MouseFocusReason) ? mapFromGlobal(QCursor::pos()).x() : (width() / 2);
|
||||
setFocused(true);
|
||||
QLineEdit::focusInEvent(e);
|
||||
emit focused();
|
||||
focused();
|
||||
}
|
||||
|
||||
void MaskedInputField::focusOutEvent(QFocusEvent *e) {
|
||||
setFocused(false);
|
||||
QLineEdit::focusOutEvent(e);
|
||||
emit blurred();
|
||||
blurred();
|
||||
}
|
||||
|
||||
void MaskedInputField::setFocused(bool focused) {
|
||||
|
|
@ -3960,14 +3960,14 @@ void MaskedInputField::keyPressEvent(QKeyEvent *e) {
|
|||
correctValue(wasText, wasCursor, newText, newCursor);
|
||||
_oldtext = newText;
|
||||
_oldcursor = newCursor;
|
||||
if (wasText != _oldtext) emit changed();
|
||||
if (wasText != _oldtext) changed();
|
||||
startPlaceholderAnimation();
|
||||
}
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
e->ignore();
|
||||
emit cancelled();
|
||||
cancelled();
|
||||
} else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
||||
emit submitted(e->modifiers());
|
||||
submitted(e->modifiers());
|
||||
#ifdef Q_OS_MAC
|
||||
} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) {
|
||||
auto selected = selectedText();
|
||||
|
|
@ -3985,7 +3985,7 @@ void MaskedInputField::onTextEdited() {
|
|||
correctValue(wasText, wasCursor, newText, newCursor);
|
||||
_oldtext = newText;
|
||||
_oldcursor = newCursor;
|
||||
if (wasText != _oldtext) emit changed();
|
||||
if (wasText != _oldtext) changed();
|
||||
startPlaceholderAnimation();
|
||||
|
||||
Integration::Instance().textActionsUpdated();
|
||||
|
|
|
|||
|
|
@ -83,13 +83,13 @@ public:
|
|||
return _oldtext;
|
||||
}
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void onTextChange(const QString &text);
|
||||
void onTextEdited();
|
||||
|
||||
void onTouchTimer();
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void changed();
|
||||
void cancelled();
|
||||
void submitted(Qt::KeyboardModifiers);
|
||||
|
|
@ -336,7 +336,7 @@ public:
|
|||
|
||||
~InputField();
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onTouchTimer();
|
||||
|
||||
void onDocumentContentsChange(int position, int charsRemoved, int charsAdded);
|
||||
|
|
@ -347,7 +347,7 @@ private slots:
|
|||
|
||||
void onFocusInner();
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void changed();
|
||||
void submitted(Qt::KeyboardModifiers);
|
||||
void cancelled();
|
||||
|
|
@ -587,7 +587,7 @@ public:
|
|||
startPlaceholderAnimation();
|
||||
}
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void onTextChange(const QString &text);
|
||||
void onCursorPositionChanged(int oldPosition, int position);
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ public slots:
|
|||
|
||||
void onTouchTimer();
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void changed();
|
||||
void cancelled();
|
||||
void submitted(Qt::KeyboardModifiers);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ protected:
|
|||
|
||||
int resizeGetHeight(int newWidth) override;
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onCopySelectedText();
|
||||
void onCopyContextText();
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ void PopupMenu::handleTriggered(const Menu::CallbackData &data) {
|
|||
if (!popupSubmenuFromAction(data)) {
|
||||
_triggering = true;
|
||||
hideMenu();
|
||||
emit data.action->trigger();
|
||||
data.action->trigger();
|
||||
_triggering = false;
|
||||
if (_deleteLater) {
|
||||
_deleteLater = false;
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ void ScrollBar::updateBar(bool force) {
|
|||
if (h >= rh || !area()->scrollTopMax() || rh < _st->minHeight) {
|
||||
if (!isHidden()) hide();
|
||||
bool newTopSh = (_st->topsh < 0), newBottomSh = (_st->bottomsh < 0);
|
||||
if (newTopSh != _topSh || force) emit topShadowVisibility(_topSh = newTopSh);
|
||||
if (newBottomSh != _bottomSh || force) emit bottomShadowVisibility(_bottomSh = newBottomSh);
|
||||
if (newTopSh != _topSh || force) topShadowVisibility(_topSh = newTopSh);
|
||||
if (newBottomSh != _bottomSh || force) bottomShadowVisibility(_bottomSh = newBottomSh);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -105,8 +105,8 @@ void ScrollBar::updateBar(bool force) {
|
|||
}
|
||||
if (_vertical) {
|
||||
bool newTopSh = (_st->topsh < 0) || (area()->scrollTop() > _st->topsh), newBottomSh = (_st->bottomsh < 0) || (area()->scrollTop() < area()->scrollTopMax() - _st->bottomsh);
|
||||
if (newTopSh != _topSh || force) emit topShadowVisibility(_topSh = newTopSh);
|
||||
if (newBottomSh != _bottomSh || force) emit bottomShadowVisibility(_bottomSh = newBottomSh);
|
||||
if (newTopSh != _topSh || force) topShadowVisibility(_topSh = newTopSh);
|
||||
if (newBottomSh != _bottomSh || force) bottomShadowVisibility(_bottomSh = newBottomSh);
|
||||
}
|
||||
if (isHidden()) show();
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ void ScrollBar::mousePressEvent(QMouseEvent *e) {
|
|||
}
|
||||
|
||||
area()->setMovingByScrollBar(true);
|
||||
emit area()->scrollStarted();
|
||||
area()->scrollStarted();
|
||||
}
|
||||
|
||||
void ScrollBar::mouseReleaseEvent(QMouseEvent *e) {
|
||||
|
|
@ -260,7 +260,7 @@ void ScrollBar::mouseReleaseEvent(QMouseEvent *e) {
|
|||
setMoving(false);
|
||||
|
||||
area()->setMovingByScrollBar(false);
|
||||
emit area()->scrollFinished();
|
||||
area()->scrollFinished();
|
||||
}
|
||||
if (!_over) {
|
||||
setMouseTracking(false);
|
||||
|
|
@ -342,7 +342,7 @@ void ScrollArea::onScrolled() {
|
|||
}
|
||||
}
|
||||
if (em) {
|
||||
emit scrolled();
|
||||
scrolled();
|
||||
if (!_movingByScrollBar) {
|
||||
SendSynteticMouseEvent(this, QEvent::MouseMove, Qt::NoButton);
|
||||
}
|
||||
|
|
@ -350,7 +350,7 @@ void ScrollArea::onScrolled() {
|
|||
}
|
||||
|
||||
void ScrollArea::onInnerResized() {
|
||||
emit innerResized();
|
||||
innerResized();
|
||||
}
|
||||
|
||||
int ScrollArea::scrollWidth() const {
|
||||
|
|
@ -601,12 +601,12 @@ void ScrollArea::resizeEvent(QResizeEvent *e) {
|
|||
_verticalBar->recountSize();
|
||||
_topShadow->setGeometry(QRect(0, 0, width(), qAbs(_st.topsh)));
|
||||
_bottomShadow->setGeometry(QRect(0, height() - qAbs(_st.bottomsh), width(), qAbs(_st.bottomsh)));
|
||||
emit geometryChanged();
|
||||
geometryChanged();
|
||||
}
|
||||
|
||||
void ScrollArea::moveEvent(QMoveEvent *e) {
|
||||
QScrollArea::moveEvent(e);
|
||||
emit geometryChanged();
|
||||
geometryChanged();
|
||||
}
|
||||
|
||||
void ScrollArea::keyPressEvent(QKeyEvent *e) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
void paintEvent(QPaintEvent *e);
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void changeVisibility(bool shown);
|
||||
|
||||
private:
|
||||
|
|
@ -75,12 +75,12 @@ public:
|
|||
|
||||
void hideTimeout(crl::time dt);
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void onValueChanged();
|
||||
void onRangeChanged();
|
||||
void onHideTimer();
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void topShadowVisibility(bool);
|
||||
void bottomShadowVisibility(bool);
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ protected:
|
|||
void enterEventHook(QEvent *e) override;
|
||||
void leaveEventHook(QEvent *e) override;
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void scrollToY(int toTop, int toBottom = -1);
|
||||
void disableScroll(bool dis);
|
||||
void onScrolled();
|
||||
|
|
@ -189,7 +189,7 @@ public slots:
|
|||
void onTouchTimer();
|
||||
void onTouchScrollTimer();
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void scrolled();
|
||||
void innerResized();
|
||||
void scrollStarted();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue