Build with QT_NO_KEYWORDS

This commit is contained in:
Ilya Fedin 2021-03-03 22:22:42 +04:00 committed by John Preston
parent a29ff093f6
commit 23272430b4
37 changed files with 133 additions and 133 deletions

View file

@ -668,7 +668,7 @@ void EditColorBox::Field::changeValue(int delta) {
setText(QString::number(newValue)); setText(QString::number(newValue));
setFocus(); setFocus();
selectAll(); selectAll();
emit changed(); changed();
} }
} }

View file

@ -672,14 +672,14 @@ void EmojiListWidget::showPicker() {
if (rtl()) coef = 1. - coef; if (rtl()) coef = 1. - coef;
_picker->move(qRound(xmax * coef), y); _picker->move(qRound(xmax * coef), y);
emit disableScroll(true); disableScroll(true);
} }
} }
void EmojiListWidget::pickerHidden() { void EmojiListWidget::pickerHidden() {
_pickerSel = -1; _pickerSel = -1;
update(); update();
emit disableScroll(false); disableScroll(false);
_lastMousePos = QCursor::pos(); _lastMousePos = QCursor::pos();
updateSelected(); updateSelected();

View file

@ -112,7 +112,7 @@ public:
rpl::producer<BotCommandChosen> botCommandChosen() const; rpl::producer<BotCommandChosen> botCommandChosen() const;
rpl::producer<StickerChosen> stickerChosen() const; rpl::producer<StickerChosen> stickerChosen() const;
public slots: public Q_SLOTS:
void showAnimated(); void showAnimated();
void hideAnimated(); void hideAnimated();

View file

@ -1126,7 +1126,7 @@ void NetworkSettingsWindow::onSave() {
_portInput.setFocus(); _portInput.setFocus();
return; return;
} }
emit saved(host, port.toUInt(), username, password); saved(host, port.toUInt(), username, password);
close(); close();
} }

View file

@ -106,7 +106,7 @@ public:
return _lifetime; return _lifetime;
} }
public slots: public Q_SLOTS:
void onViewReport(); void onViewReport();
void onSaveReport(); void onSaveReport();
void onSendReport(); void onSendReport();
@ -214,10 +214,10 @@ class NetworkSettingsWindow : public PreLaunchWindow {
public: public:
NetworkSettingsWindow(QWidget *parent, QString host, quint32 port, QString username, QString password); NetworkSettingsWindow(QWidget *parent, QString host, quint32 port, QString username, QString password);
signals: Q_SIGNALS:
void saved(QString host, quint32 port, QString username, QString password); void saved(QString host, quint32 port, QString username, QString password);
public slots: public Q_SLOTS:
void onSave(); void onSave();
protected: protected:

View file

@ -1163,7 +1163,7 @@ void InnerWidget::finishReorderPinned() {
_aboveIndex = -1; _aboveIndex = -1;
} }
if (wasDragging) { if (wasDragging) {
emit draggingScrollDelta(0); draggingScrollDelta(0);
} }
} }
@ -1253,7 +1253,7 @@ bool InnerWidget::updateReorderPinned(QPoint localPosition) {
return 0; return 0;
}(); }();
emit draggingScrollDelta(delta); draggingScrollDelta(delta);
return true; return true;
} }
@ -1466,7 +1466,7 @@ void InnerWidget::handleChatListEntryRefreshes() {
&& (from != to) && (from != to)
&& (entry->folder() == _openedFolder) && (entry->folder() == _openedFolder)
&& (_state == WidgetState::Default)) { && (_state == WidgetState::Default)) {
emit dialogMoved(from, to); dialogMoved(from, to);
} }
if (event.existenceChanged) { if (event.existenceChanged) {
@ -1878,7 +1878,7 @@ void InnerWidget::applyFilterUpdate(QString newFilter, bool force) {
clearMouseSelection(true); clearMouseSelection(true);
} }
if (_state != WidgetState::Default) { if (_state != WidgetState::Default) {
emit searchMessages(); searchMessages();
} }
} }
@ -2214,7 +2214,7 @@ void InnerWidget::refresh(bool toTop) {
resize(width(), h); resize(width(), h);
if (toTop) { if (toTop) {
stopReorderPinned(); stopReorderPinned();
emit mustScrollTo(0, 0); mustScrollTo(0, 0);
loadPeerPhotos(); loadPeerPhotos();
} }
_controller->dialogsListDisplayForced().set( _controller->dialogsListDisplayForced().set(
@ -2438,7 +2438,7 @@ void InnerWidget::selectSkip(int32 direction) {
const auto fromY = (_collapsedSelected >= 0) const auto fromY = (_collapsedSelected >= 0)
? (_collapsedSelected * st::dialogsImportantBarHeight) ? (_collapsedSelected * st::dialogsImportantBarHeight)
: (dialogsOffset() + _selected->pos() * st::dialogsRowHeight); : (dialogsOffset() + _selected->pos() * st::dialogsRowHeight);
emit mustScrollTo(fromY, fromY + st::dialogsRowHeight); mustScrollTo(fromY, fromY + st::dialogsRowHeight);
} }
} else if (_state == WidgetState::Filtered) { } else if (_state == WidgetState::Filtered) {
if (_hashtagResults.empty() && _filterResults.empty() && _peerSearchResults.empty() && _searchResults.empty()) { if (_hashtagResults.empty() && _filterResults.empty() && _peerSearchResults.empty() && _searchResults.empty()) {
@ -2487,13 +2487,13 @@ void InnerWidget::selectSkip(int32 direction) {
} }
} }
if (base::in_range(_hashtagSelected, 0, _hashtagResults.size())) { if (base::in_range(_hashtagSelected, 0, _hashtagResults.size())) {
emit mustScrollTo(_hashtagSelected * st::mentionHeight, (_hashtagSelected + 1) * st::mentionHeight); mustScrollTo(_hashtagSelected * st::mentionHeight, (_hashtagSelected + 1) * st::mentionHeight);
} else if (base::in_range(_filteredSelected, 0, _filterResults.size())) { } else if (base::in_range(_filteredSelected, 0, _filterResults.size())) {
emit mustScrollTo(filteredOffset() + _filteredSelected * st::dialogsRowHeight, filteredOffset() + (_filteredSelected + 1) * st::dialogsRowHeight); mustScrollTo(filteredOffset() + _filteredSelected * st::dialogsRowHeight, filteredOffset() + (_filteredSelected + 1) * st::dialogsRowHeight);
} else if (base::in_range(_peerSearchSelected, 0, _peerSearchResults.size())) { } else if (base::in_range(_peerSearchSelected, 0, _peerSearchResults.size())) {
emit mustScrollTo(peerSearchOffset() + _peerSearchSelected * st::dialogsRowHeight + (_peerSearchSelected ? 0 : -st::searchedBarHeight), peerSearchOffset() + (_peerSearchSelected + 1) * st::dialogsRowHeight); mustScrollTo(peerSearchOffset() + _peerSearchSelected * st::dialogsRowHeight + (_peerSearchSelected ? 0 : -st::searchedBarHeight), peerSearchOffset() + (_peerSearchSelected + 1) * st::dialogsRowHeight);
} else { } else {
emit mustScrollTo(searchedOffset() + _searchedSelected * st::dialogsRowHeight + (_searchedSelected ? 0 : -st::searchedBarHeight), searchedOffset() + (_searchedSelected + 1) * st::dialogsRowHeight); mustScrollTo(searchedOffset() + _searchedSelected * st::dialogsRowHeight + (_searchedSelected ? 0 : -st::searchedBarHeight), searchedOffset() + (_searchedSelected + 1) * st::dialogsRowHeight);
} }
} }
update(); update();
@ -2522,7 +2522,7 @@ void InnerWidget::scrollToEntry(const RowDescriptor &entry) {
} }
} }
if (fromY >= 0) { if (fromY >= 0) {
emit mustScrollTo(fromY, fromY + st::dialogsRowHeight); mustScrollTo(fromY, fromY + st::dialogsRowHeight);
} }
} }
@ -2556,7 +2556,7 @@ void InnerWidget::selectSkipPage(int32 pixels, int32 direction) {
const auto fromY = (_collapsedSelected >= 0) const auto fromY = (_collapsedSelected >= 0)
? (_collapsedSelected * st::dialogsImportantBarHeight) ? (_collapsedSelected * st::dialogsImportantBarHeight)
: (dialogsOffset() + _selected->pos() * st::dialogsRowHeight); : (dialogsOffset() + _selected->pos() * st::dialogsRowHeight);
emit mustScrollTo(fromY, fromY + st::dialogsRowHeight); mustScrollTo(fromY, fromY + st::dialogsRowHeight);
} }
} else { } else {
return selectSkip(direction * toSkip); return selectSkip(direction * toSkip);
@ -2641,7 +2641,7 @@ void InnerWidget::switchToFilter(FilterId filterId) {
filterId = 0; filterId = 0;
} }
if (_filterId == filterId) { if (_filterId == filterId) {
emit mustScrollTo(0, 0); mustScrollTo(0, 0);
return; return;
} }
if (_openedFolder) { if (_openedFolder) {
@ -2674,11 +2674,11 @@ bool InnerWidget::chooseHashtag() {
} }
cSetRecentSearchHashtags(recent); cSetRecentSearchHashtags(recent);
session().local().writeRecentHashtagsAndBots(); session().local().writeRecentHashtagsAndBots();
emit refreshHashtags(); refreshHashtags();
selectByMouse(QCursor::pos()); selectByMouse(QCursor::pos());
} else { } else {
session().local().saveRecentSearchHashtags('#' + hashtag->tag); session().local().saveRecentSearchHashtags('#' + hashtag->tag);
emit completeHashtag(hashtag->tag); completeHashtag(hashtag->tag);
} }
return true; return true;
} }

View file

@ -126,10 +126,10 @@ public:
~InnerWidget(); ~InnerWidget();
public slots: public Q_SLOTS:
void onParentGeometryChanged(); void onParentGeometryChanged();
signals: Q_SIGNALS:
void draggingScrollDelta(int delta); void draggingScrollDelta(int delta);
void mustScrollTo(int scrollToTop, int scrollToBottom); void mustScrollTo(int scrollToTop, int scrollToBottom);
void dialogMoved(int movedFrom, int movedTo); void dialogMoved(int movedFrom, int movedTo);

View file

@ -720,13 +720,13 @@ void Widget::escape() {
controller()->closeFolder(); controller()->closeFolder();
} else if (!onCancelSearch()) { } else if (!onCancelSearch()) {
if (controller()->activeChatEntryCurrent().key) { if (controller()->activeChatEntryCurrent().key) {
emit cancelled(); cancelled();
} else if (controller()->activeChatsFilterCurrent()) { } else if (controller()->activeChatsFilterCurrent()) {
controller()->setActiveChatsFilter(FilterId(0)); controller()->setActiveChatsFilter(FilterId(0));
} }
} else if (!_searchInChat && !controller()->selectingPeer()) { } else if (!_searchInChat && !controller()->selectingPeer()) {
if (controller()->activeChatEntryCurrent().key) { if (controller()->activeChatEntryCurrent().key) {
emit cancelled(); cancelled();
} }
} }
} }
@ -1770,7 +1770,7 @@ void Widget::onCancelSearchInChat() {
} }
applyFilterUpdate(true); applyFilterUpdate(true);
if (!Adaptive::OneColumn() && !controller()->selectingPeer()) { if (!Adaptive::OneColumn() && !controller()->selectingPeer()) {
emit cancelled(); cancelled();
} }
} }

View file

@ -89,10 +89,10 @@ public:
~Widget(); ~Widget();
signals: Q_SIGNALS:
void cancelled(); void cancelled();
public slots: public Q_SLOTS:
void onDraggingScrollDelta(int delta); void onDraggingScrollDelta(int delta);
void onListScroll(); void onListScroll();
@ -108,7 +108,7 @@ public slots:
void onChooseByDrag(); void onChooseByDrag();
private slots: private Q_SLOTS:
void onDraggingScrollTimer(); void onDraggingScrollTimer();
protected: protected:

View file

@ -152,7 +152,7 @@ protected:
void keyPressEvent(QKeyEvent *e) override; void keyPressEvent(QKeyEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override; void contextMenuEvent(QContextMenuEvent *e) override;
public slots: public Q_SLOTS:
void onParentGeometryChanged(); void onParentGeometryChanged();
void onTouchSelect(); void onTouchSelect();

View file

@ -235,7 +235,7 @@ public:
Fn<void()> callback, Fn<void()> callback,
const SectionShow &params) const; const SectionShow &params) const;
public slots: public Q_SLOTS:
void inlineResultLoadProgress(FileLoader *loader); void inlineResultLoadProgress(FileLoader *loader);
void inlineResultLoadFailed(FileLoader *loader, bool started); void inlineResultLoadFailed(FileLoader *loader, bool started);

View file

@ -240,7 +240,7 @@ bool AttachToDevice() {
if (auto m = Player::mixer()) { if (auto m = Player::mixer()) {
m->reattachTracks(); m->reattachTracks();
emit m->faderOnTimer(); m->faderOnTimer();
} }
crl::on_main([] { crl::on_main([] {
@ -693,28 +693,28 @@ void Mixer::destroyEffectsOnClose() {
} }
void Mixer::onError(const AudioMsgId &audio) { void Mixer::onError(const AudioMsgId &audio) {
emit stoppedOnError(audio); stoppedOnError(audio);
QMutexLocker lock(&AudioMutex); QMutexLocker lock(&AudioMutex);
auto type = audio.type(); auto type = audio.type();
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
if (auto current = trackForType(type)) { if (auto current = trackForType(type)) {
if (current->state.id == audio) { if (current->state.id == audio) {
emit unsuppressSong(); unsuppressSong();
} }
} }
} }
} }
void Mixer::onStopped(const AudioMsgId &audio) { void Mixer::onStopped(const AudioMsgId &audio) {
emit updated(audio); updated(audio);
QMutexLocker lock(&AudioMutex); QMutexLocker lock(&AudioMutex);
auto type = audio.type(); auto type = audio.type();
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
if (auto current = trackForType(type)) { if (auto current = trackForType(type)) {
if (current->state.id == audio) { if (current->state.id == audio) {
emit unsuppressSong(); unsuppressSong();
} }
} }
} }
@ -843,8 +843,8 @@ void Mixer::play(
stopped = current->state.id; stopped = current->state.id;
} }
if (current->state.id) { if (current->state.id) {
emit loaderOnCancel(current->state.id); loaderOnCancel(current->state.id);
emit faderOnTimer(); faderOnTimer();
} }
if (type != AudioMsgId::Type::Video) { if (type != AudioMsgId::Type::Video) {
auto foundCurrent = currentIndex(type); auto foundCurrent = currentIndex(type);
@ -875,13 +875,13 @@ void Mixer::play(
? State::Starting ? State::Starting
: State::Playing; : State::Playing;
current->loading = true; current->loading = true;
emit loaderOnStart(current->state.id, positionMs); loaderOnStart(current->state.id, positionMs);
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
emit suppressSong(); suppressSong();
} }
} }
if (stopped) { if (stopped) {
emit updated(stopped); updated(stopped);
} }
} }
@ -975,7 +975,7 @@ void Mixer::pause(const AudioMsgId &audio, bool fast) {
track->state.state = fast ? State::Paused : State::Pausing; track->state.state = fast ? State::Paused : State::Pausing;
resetFadeStartPosition(type); resetFadeStartPosition(type);
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
emit unsuppressSong(); unsuppressSong();
} }
} break; } break;
@ -996,12 +996,12 @@ void Mixer::pause(const AudioMsgId &audio, bool fast) {
} }
} }
emit faderOnTimer(); faderOnTimer();
track->lastUpdateWhen = 0; track->lastUpdateWhen = 0;
track->lastUpdatePosition = 0; track->lastUpdatePosition = 0;
} }
if (current) emit updated(current); if (current) updated(current);
} }
void Mixer::resume(const AudioMsgId &audio, bool fast) { void Mixer::resume(const AudioMsgId &audio, bool fast) {
@ -1050,14 +1050,14 @@ void Mixer::resume(const AudioMsgId &audio, bool fast) {
if (!checkCurrentALError(type)) return; if (!checkCurrentALError(type)) return;
} }
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
emit suppressSong(); suppressSong();
} }
} }
} break; } break;
} }
emit faderOnTimer(); faderOnTimer();
} }
if (current) emit updated(current); if (current) updated(current);
} }
// //
// Right now all the music is played in the streaming player. // Right now all the music is played in the streaming player.
@ -1141,13 +1141,13 @@ void Mixer::stop(const AudioMsgId &audio) {
current = audio; current = audio;
fadedStop(type); fadedStop(type);
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
emit unsuppressSong(); unsuppressSong();
} else if (type == AudioMsgId::Type::Video) { } else if (type == AudioMsgId::Type::Video) {
track->clear(); track->clear();
emit loaderOnCancel(audio); loaderOnCancel(audio);
} }
} }
if (current) emit updated(current); if (current) updated(current);
} }
void Mixer::stop(const AudioMsgId &audio, State state) { void Mixer::stop(const AudioMsgId &audio, State state) {
@ -1167,12 +1167,12 @@ void Mixer::stop(const AudioMsgId &audio, State state) {
current = audio; current = audio;
setStoppedState(track, state); setStoppedState(track, state);
if (type == AudioMsgId::Type::Voice) { if (type == AudioMsgId::Type::Voice) {
emit unsuppressSong(); unsuppressSong();
} else if (type == AudioMsgId::Type::Video) { } else if (type == AudioMsgId::Type::Video) {
track->clear(); track->clear();
} }
} }
if (current) emit updated(current); if (current) updated(current);
} }
void Mixer::stopAndClear() { void Mixer::stopAndClear() {
@ -1187,17 +1187,17 @@ void Mixer::stopAndClear() {
} }
} }
if (current_song) { if (current_song) {
emit updated(current_song->state.id); updated(current_song->state.id);
} }
if (current_audio) { if (current_audio) {
emit updated(current_audio->state.id); updated(current_audio->state.id);
} }
{ {
QMutexLocker lock(&AudioMutex); QMutexLocker lock(&AudioMutex);
auto clearAndCancel = [this](AudioMsgId::Type type, int index) { auto clearAndCancel = [this](AudioMsgId::Type type, int index) {
auto track = trackForType(type, index); auto track = trackForType(type, index);
if (track->state.id) { if (track->state.id) {
emit loaderOnCancel(track->state.id); loaderOnCancel(track->state.id);
} }
track->clear(); track->clear();
}; };
@ -1226,7 +1226,7 @@ void Mixer::setStoppedState(Track *current, State state) {
alSourcef(current->stream.source, AL_GAIN, 1); alSourcef(current->stream.source, AL_GAIN, 1);
} }
if (current->state.id) { if (current->state.id) {
emit loaderOnCancel(current->state.id); loaderOnCancel(current->state.id);
} }
} }
@ -1353,10 +1353,10 @@ void Fader::onTimer() {
if (IsStopped(track->state.state) || track->state.state == State::Paused || !track->isStreamCreated()) return; if (IsStopped(track->state.state) || track->state.state == State::Paused || !track->isStreamCreated()) return;
auto emitSignals = updateOnePlayback(track, hasPlaying, hasFading, volumeMultiplier, suppressGainChanged); auto emitSignals = updateOnePlayback(track, hasPlaying, hasFading, volumeMultiplier, suppressGainChanged);
if (emitSignals & EmitError) emit error(track->state.id); if (emitSignals & EmitError) error(track->state.id);
if (emitSignals & EmitStopped) emit audioStopped(track->state.id); if (emitSignals & EmitStopped) audioStopped(track->state.id);
if (emitSignals & EmitPositionUpdated) emit playPositionUpdated(track->state.id); if (emitSignals & EmitPositionUpdated) playPositionUpdated(track->state.id);
if (emitSignals & EmitNeedToPreload) emit needToPreload(track->state.id); if (emitSignals & EmitNeedToPreload) needToPreload(track->state.id);
}; };
auto suppressGainForMusic = ComputeVolume(AudioMsgId::Type::Song); auto suppressGainForMusic = ComputeVolume(AudioMsgId::Type::Song);
auto suppressGainForMusicChanged = volumeChangedSong || _volumeChangedSong; auto suppressGainForMusicChanged = volumeChangedSong || _volumeChangedSong;

View file

@ -178,13 +178,13 @@ public:
~Mixer(); ~Mixer();
private slots: private Q_SLOTS:
void onError(const AudioMsgId &audio); void onError(const AudioMsgId &audio);
void onStopped(const AudioMsgId &audio); void onStopped(const AudioMsgId &audio);
void onUpdated(const AudioMsgId &audio); void onUpdated(const AudioMsgId &audio);
signals: Q_SIGNALS:
void updated(const AudioMsgId &audio); void updated(const AudioMsgId &audio);
void stoppedOnError(const AudioMsgId &audio); void stoppedOnError(const AudioMsgId &audio);
void loaderOnStart(const AudioMsgId &audio, qint64 positionMs); void loaderOnStart(const AudioMsgId &audio, qint64 positionMs);
@ -325,13 +325,13 @@ class Fader : public QObject {
public: public:
Fader(QThread *thread); Fader(QThread *thread);
signals: Q_SIGNALS:
void error(const AudioMsgId &audio); void error(const AudioMsgId &audio);
void playPositionUpdated(const AudioMsgId &audio); void playPositionUpdated(const AudioMsgId &audio);
void audioStopped(const AudioMsgId &audio); void audioStopped(const AudioMsgId &audio);
void needToPreload(const AudioMsgId &audio); void needToPreload(const AudioMsgId &audio);
public slots: public Q_SLOTS:
void onInit(); void onInit();
void onTimer(); void onTimer();

View file

@ -143,7 +143,7 @@ void Loaders::setStoppedState(Mixer::Track *track, State state) {
} }
void Loaders::emitError(AudioMsgId::Type type) { void Loaders::emitError(AudioMsgId::Type type) {
emit error(clear(type)); error(clear(type));
} }
void Loaders::onLoad(const AudioMsgId &audio) { void Loaders::onLoad(const AudioMsgId &audio) {
@ -319,7 +319,7 @@ void Loaders::loadData(AudioMsgId audio, crl::time positionMs) {
return; return;
} }
emit needToCheck(); needToCheck();
} }
AudioPlayerLoader *Loaders::setupLoader( AudioPlayerLoader *Loaders::setupLoader(
@ -332,7 +332,7 @@ AudioPlayerLoader *Loaders::setupLoader(
auto track = mixer()->trackForType(audio.type()); auto track = mixer()->trackForType(audio.type());
if (!track || track->state.id != audio || !track->loading) { if (!track || track->state.id != audio || !track->loading) {
emit error(audio); error(audio);
LOG(("Audio Error: trying to load part of audio, that is not current at the moment")); LOG(("Audio Error: trying to load part of audio, that is not current at the moment"));
err = SetupErrorNotPlaying; err = SetupErrorNotPlaying;
return nullptr; return nullptr;
@ -363,7 +363,7 @@ AudioPlayerLoader *Loaders::setupLoader(
if (!track->externalData) { if (!track->externalData) {
clear(audio.type()); clear(audio.type());
track->state.state = State::StoppedAtError; track->state.state = State::StoppedAtError;
emit error(audio); error(audio);
LOG(("Audio Error: video sound data not ready")); LOG(("Audio Error: video sound data not ready"));
return nullptr; return nullptr;
} }

View file

@ -25,11 +25,11 @@ public:
void forceToBufferExternal(const AudioMsgId &audioId); void forceToBufferExternal(const AudioMsgId &audioId);
~Loaders(); ~Loaders();
signals: Q_SIGNALS:
void error(const AudioMsgId &audio); void error(const AudioMsgId &audio);
void needToCheck(); void needToCheck();
public slots: public Q_SLOTS:
void onInit(); void onInit();
void onStart(const AudioMsgId &audio, qint64 positionMs); void onStart(const AudioMsgId &audio, qint64 positionMs);

View file

@ -64,7 +64,7 @@ protected:
bool eventFilter(QObject *obj, QEvent *e) override; bool eventFilter(QObject *obj, QEvent *e) override;
private slots: private Q_SLOTS:
void onShowStart(); void onShowStart();
void onHideStart(); void onHideStart();

View file

@ -114,7 +114,7 @@ public:
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override; void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
void clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) override; void clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) override;
private slots: private Q_SLOTS:
void onHideControls(bool force = false); void onHideControls(bool force = false);
void onScreenResized(int screen); void onScreenResized(int screen);

View file

@ -127,7 +127,7 @@ public:
// Used to emit error(...) with no real code from the server. // Used to emit error(...) with no real code from the server.
static constexpr auto kErrorCodeOther = -499; static constexpr auto kErrorCodeOther = -499;
signals: Q_SIGNALS:
void receivedData(); void receivedData();
void receivedSome(); // to stop restart timer void receivedSome(); // to stop restart timer

View file

@ -163,11 +163,11 @@ void HttpConnection::requestFinished(QNetworkReply *reply) {
mtpBuffer data = handleResponse(reply); mtpBuffer data = handleResponse(reply);
if (data.size() == 1) { if (data.size() == 1) {
emit error(data[0]); error(data[0]);
} else if (!data.isEmpty()) { } else if (!data.isEmpty()) {
if (_status == Status::Ready) { if (_status == Status::Ready) {
_receivedQueue.push_back(data); _receivedQueue.push_back(data);
emit receivedData(); receivedData();
} else if (const auto res_pq = readPQFakeReply(data)) { } else if (const auto res_pq = readPQFakeReply(data)) {
const auto &data = res_pq->c_resPQ(); const auto &data = res_pq->c_resPQ();
if (data.vnonce() == _checkNonce) { if (data.vnonce() == _checkNonce) {
@ -176,16 +176,16 @@ void HttpConnection::requestFinished(QNetworkReply *reply) {
).arg(_address)); ).arg(_address));
_status = Status::Ready; _status = Status::Ready;
_pingTime = crl::now() - _pingTime; _pingTime = crl::now() - _pingTime;
emit connected(); connected();
} else { } else {
DEBUG_LOG(("Connection Error: " DEBUG_LOG(("Connection Error: "
"Wrong nonce received in HTTP fake pq-responce")); "Wrong nonce received in HTTP fake pq-responce"));
emit error(kErrorCodeOther); error(kErrorCodeOther);
} }
} else { } else {
DEBUG_LOG(("Connection Error: " DEBUG_LOG(("Connection Error: "
"Could not parse HTTP fake pq-responce")); "Could not parse HTTP fake pq-responce"));
emit error(kErrorCodeOther); error(kErrorCodeOther);
} }
} }
} else { } else {
@ -193,7 +193,7 @@ void HttpConnection::requestFinished(QNetworkReply *reply) {
return; return;
} }
emit error(handleError(reply)); error(handleError(reply));
} }
} }

View file

@ -134,7 +134,7 @@ bool ResolvingConnection::refreshChild() {
void ResolvingConnection::emitError(int errorCode) { void ResolvingConnection::emitError(int errorCode) {
_ipIndex = -1; _ipIndex = -1;
_child = nullptr; _child = nullptr;
emit error(errorCode); error(errorCode);
} }
void ResolvingConnection::handleError(int errorCode) { void ResolvingConnection::handleError(int errorCode) {
@ -151,7 +151,7 @@ void ResolvingConnection::handleError(int errorCode) {
void ResolvingConnection::handleDisconnected() { void ResolvingConnection::handleDisconnected() {
if (_connected) { if (_connected) {
emit disconnected(); disconnected();
} else { } else {
handleError(kErrorCodeOther); handleError(kErrorCodeOther);
} }
@ -164,7 +164,7 @@ void ResolvingConnection::handleReceivedData() {
my.push_back(std::move(item)); my.push_back(std::move(item));
} }
his.clear(); his.clear();
emit receivedData(); receivedData();
} }
void ResolvingConnection::handleConnected() { void ResolvingConnection::handleConnected() {
@ -178,7 +178,7 @@ void ResolvingConnection::handleConnected() {
instance->setGoodProxyDomain(host, good); instance->setGoodProxyDomain(host, good);
}); });
} }
emit connected(); connected();
} }
crl::time ResolvingConnection::pingTime() const { crl::time ResolvingConnection::pingTime() const {

View file

@ -284,7 +284,7 @@ void TcpConnection::socketRead() {
if (!_socket || !_socket->isConnected()) { if (!_socket || !_socket->isConnected()) {
LOG(("MTP Error: Socket not connected in socketRead()")); LOG(("MTP Error: Socket not connected in socketRead()"));
emit error(kErrorCodeOther); error(kErrorCodeOther);
return; return;
} }
@ -323,7 +323,7 @@ void TcpConnection::socketRead() {
TCP_LOG(("TCP Info: not enough %1 for packet! read %2" TCP_LOG(("TCP Info: not enough %1 for packet! read %2"
).arg(_leftBytes ).arg(_leftBytes
).arg(_readBytes)); ).arg(_readBytes));
emit receivedSome(); receivedSome();
} }
} else { } else {
auto available = full.subspan(0, _readBytes); auto available = full.subspan(0, _readBytes);
@ -336,7 +336,7 @@ void TcpConnection::socketRead() {
} else if (packetSize <= 0) { } else if (packetSize <= 0) {
LOG(("TCP Error: bad packet size in 4 bytes: %1" LOG(("TCP Error: bad packet size in 4 bytes: %1"
).arg(packetSize)); ).arg(packetSize));
emit error(kErrorCodeOther); error(kErrorCodeOther);
return; return;
} else if (available.size() >= packetSize) { } else if (available.size() >= packetSize) {
socketPacket(available.subspan(0, packetSize)); socketPacket(available.subspan(0, packetSize));
@ -361,14 +361,14 @@ void TcpConnection::socketRead() {
).arg(_leftBytes ).arg(_leftBytes
).arg(packetSize ).arg(packetSize
).arg(available.size())); ).arg(available.size()));
emit receivedSome(); receivedSome();
break; break;
} }
} }
} }
} else if (readCount < 0) { } else if (readCount < 0) {
LOG(("TCP Error: socket read return %1").arg(readCount)); LOG(("TCP Error: socket read return %1").arg(readCount));
emit error(kErrorCodeOther); error(kErrorCodeOther);
return; return;
} else { } else {
TCP_LOG(("TCP Info: no bytes read, but bytes available was true...")); TCP_LOG(("TCP Info: no bytes read, but bytes available was true..."));
@ -421,7 +421,7 @@ void TcpConnection::socketConnected() {
void TcpConnection::socketDisconnected() { void TcpConnection::socketDisconnected() {
if (_status == Status::Waiting || _status == Status::Ready) { if (_status == Status::Waiting || _status == Status::Ready) {
emit disconnected(); disconnected();
} }
} }
@ -568,7 +568,7 @@ void TcpConnection::connectToServer(
_socket->syncTimeRequests( _socket->syncTimeRequests(
) | rpl::start_with_next([=] { ) | rpl::start_with_next([=] {
emit syncTimeRequest(); syncTimeRequest();
}, _lifetime); }, _lifetime);
_socket->connectToHost(_address, _port); _socket->connectToHost(_address, _port);
@ -589,7 +589,7 @@ void TcpConnection::socketPacket(bytes::const_span bytes) {
const auto data = parsePacket(bytes); const auto data = parsePacket(bytes);
if (data.size() == 1) { if (data.size() == 1) {
if (data[0] != 0) { if (data[0] != 0) {
emit error(data[0]); error(data[0]);
} else { } else {
// nop // nop
} }
@ -597,7 +597,7 @@ void TcpConnection::socketPacket(bytes::const_span bytes) {
// new quickack?.. // new quickack?..
} else if (_status == Status::Ready) { } else if (_status == Status::Ready) {
_receivedQueue.push_back(data); _receivedQueue.push_back(data);
emit receivedData(); receivedData();
} else if (_status == Status::Waiting) { } else if (_status == Status::Waiting) {
if (const auto res_pq = readPQFakeReply(data)) { if (const auto res_pq = readPQFakeReply(data)) {
const auto &data = res_pq->c_resPQ(); const auto &data = res_pq->c_resPQ();
@ -606,16 +606,16 @@ void TcpConnection::socketPacket(bytes::const_span bytes) {
_status = Status::Ready; _status = Status::Ready;
_connectedLifetime.destroy(); _connectedLifetime.destroy();
_pingTime = (crl::now() - _pingTime); _pingTime = (crl::now() - _pingTime);
emit connected(); connected();
} else { } else {
DEBUG_LOG(("Connection Error: " DEBUG_LOG(("Connection Error: "
"Wrong nonce received in TCP fake pq-responce")); "Wrong nonce received in TCP fake pq-responce"));
emit error(kErrorCodeOther); error(kErrorCodeOther);
} }
} else { } else {
DEBUG_LOG(("Connection Error: " DEBUG_LOG(("Connection Error: "
"Could not parse TCP fake pq-responce")); "Could not parse TCP fake pq-responce"));
emit error(kErrorCodeOther); error(kErrorCodeOther);
} }
} }
} }
@ -660,7 +660,7 @@ void TcpConnection::socketError() {
return; return;
} }
emit error(kErrorCodeOther); error(kErrorCodeOther);
} }
TcpConnection::~TcpConnection() = default; TcpConnection::~TcpConnection() = default;

View file

@ -386,7 +386,7 @@ void Instance::Private::applyDomainIps(
session->refreshOptions(); session->refreshOptions();
} }
} }
emit _instance->proxyDomainResolved(host, ips, expireAt); _instance->proxyDomainResolved(host, ips, expireAt);
} }
void Instance::Private::setGoodProxyDomain( void Instance::Private::setGoodProxyDomain(

View file

@ -208,7 +208,7 @@ public:
[[nodiscard]] rpl::lifetime &lifetime(); [[nodiscard]] rpl::lifetime &lifetime();
signals: Q_SIGNALS:
void proxyDomainResolved( void proxyDomainResolved(
QString host, QString host,
QStringList ips, QStringList ips,

View file

@ -456,7 +456,7 @@ QString GtkFileDialog::selectedNameFilter() const {
} }
void GtkFileDialog::onAccepted() { void GtkFileDialog::onAccepted() {
emit accept(); accept();
// QString filter = selectedNameFilter(); // QString filter = selectedNameFilter();
// if (filter.isEmpty()) // if (filter.isEmpty())
@ -469,7 +469,7 @@ void GtkFileDialog::onAccepted() {
} }
void GtkFileDialog::onRejected() { void GtkFileDialog::onRejected() {
emit reject(); reject();
// //
} }
@ -566,7 +566,7 @@ void GtkFileDialog::applyOptions() {
void GtkFileDialog::setNameFilters(const QStringList &filters) { void GtkFileDialog::setNameFilters(const QStringList &filters) {
GtkDialog *gtkDialog = d->gtkDialog(); GtkDialog *gtkDialog = d->gtkDialog();
foreach (GtkFileFilter *filter, _filters) Q_FOREACH (GtkFileFilter *filter, _filters)
gtk_file_chooser_remove_filter(gtk_file_chooser_cast(gtkDialog), filter); gtk_file_chooser_remove_filter(gtk_file_chooser_cast(gtkDialog), filter);
_filters.clear(); _filters.clear();

View file

@ -39,7 +39,7 @@ public:
class Private; class Private;
public slots: public Q_SLOTS:
void psMacUndo(); void psMacUndo();
void psMacRedo(); void psMacRedo();
void psMacCut(); void psMacCut();

View file

@ -287,7 +287,7 @@ bool EventFilter::mainWindowEvent(
} else if (wParam == SIZE_MINIMIZED) { } else if (wParam == SIZE_MINIMIZED) {
state = Qt::WindowMinimized; state = Qt::WindowMinimized;
} }
emit _window->windowHandle()->windowStateChanged(state); _window->windowHandle()->windowStateChanged(state);
} else { } else {
_window->positionUpdated(); _window->positionUpdated();
} }

View file

@ -256,7 +256,7 @@ void GroupMembersWidget::updateOnlineCount() {
} }
if (_onlineCount != newOnlineCount) { if (_onlineCount != newOnlineCount) {
_onlineCount = newOnlineCount; _onlineCount = newOnlineCount;
emit onlineCountUpdated(_onlineCount); onlineCountUpdated(_onlineCount);
} }
} }

View file

@ -36,10 +36,10 @@ public:
~GroupMembersWidget(); ~GroupMembersWidget();
signals: Q_SIGNALS:
void onlineCountUpdated(int onlineCount); void onlineCountUpdated(int onlineCount);
private slots: private Q_SLOTS:
void onUpdateOnlineDisplay(); void onUpdateOnlineDisplay();
private: private:

View file

@ -114,7 +114,7 @@ public:
return _secureFailed.events(); return _secureFailed.events();
} }
public slots: public Q_SLOTS:
void unpause(); void unpause();
void sendNext(); void sendNext();
void stopSessions(); void stopSessions();

View file

@ -299,7 +299,7 @@ void TaskQueue::wakeThread() {
_thread->start(); _thread->start();
} }
if (_stopTimer) _stopTimer->stop(); if (_stopTimer) _stopTimer->stop();
emit taskAdded(); taskAdded();
} }
void TaskQueue::cancelTask(TaskId id) { void TaskQueue::cancelTask(TaskId id) {
@ -393,7 +393,7 @@ void TaskQueueWorker::onTaskAdded() {
} }
} }
if (emitTaskProcessed) { if (emitTaskProcessed) {
emit taskProcessed(); taskProcessed();
} }
} }
QCoreApplication::processEvents(); QCoreApplication::processEvents();

View file

@ -144,10 +144,10 @@ public:
~TaskQueue(); ~TaskQueue();
signals: Q_SIGNALS:
void taskAdded(); void taskAdded();
public slots: public Q_SLOTS:
void onTaskProcessed(); void onTaskProcessed();
void stop(); void stop();
@ -173,10 +173,10 @@ public:
TaskQueueWorker(TaskQueue *queue) : _queue(queue) { TaskQueueWorker(TaskQueue *queue) : _queue(queue) {
} }
signals: Q_SIGNALS:
void taskProcessed(); void taskProcessed();
public slots: public Q_SLOTS:
void onTaskAdded(); void onTaskAdded();
private: private:

View file

@ -136,7 +136,7 @@ bool CountryInput::onChooseCountry(const QString &iso) {
if (info) { if (info) {
_chosenIso = LastValidISO = info->iso2; _chosenIso = LastValidISO = info->iso2;
setText(QString::fromUtf8(info->name)); setText(QString::fromUtf8(info->name));
emit codeChanged(info->code); codeChanged(info->code);
update(); update();
return true; return true;
} }
@ -432,7 +432,7 @@ void CountrySelectBox::Inner::selectSkip(int32 dir) {
_selected = cur; _selected = cur;
} }
if (_selected >= 0) { if (_selected >= 0) {
emit mustScrollTo(st::countriesSkip + _selected * _rowHeight, st::countriesSkip + (_selected + 1) * _rowHeight); mustScrollTo(st::countriesSkip + _selected * _rowHeight, st::countriesSkip + (_selected + 1) * _rowHeight);
} }
update(); update();
} }
@ -445,7 +445,7 @@ void CountrySelectBox::Inner::selectSkipPage(int32 h, int32 dir) {
void CountrySelectBox::Inner::chooseCountry() { void CountrySelectBox::Inner::chooseCountry() {
const auto &list = current(); const auto &list = current();
emit countryChosen((_selected >= 0 && _selected < list.size()) countryChosen((_selected >= 0 && _selected < list.size())
? QString(list[_selected]->iso2) ? QString(list[_selected]->iso2)
: QString()); : QString());
} }

View file

@ -29,11 +29,11 @@ public:
return _chosenIso; return _chosenIso;
} }
public slots: public Q_SLOTS:
void onChooseCode(const QString &code); void onChooseCode(const QString &code);
bool onChooseCountry(const QString &country); bool onChooseCountry(const QString &country);
signals: Q_SIGNALS:
void codeChanged(const QString &code); void codeChanged(const QString &code);
protected: protected:
@ -66,7 +66,7 @@ public:
CountrySelectBox(QWidget*); CountrySelectBox(QWidget*);
CountrySelectBox(QWidget*, const QString &iso, Type type); CountrySelectBox(QWidget*, const QString &iso, Type type);
signals: Q_SIGNALS:
void countryChosen(const QString &iso); void countryChosen(const QString &iso);
protected: protected:
@ -106,7 +106,7 @@ public:
~Inner(); ~Inner();
signals: Q_SIGNALS:
void countryChosen(const QString &iso); void countryChosen(const QString &iso);
void mustScrollTo(int ymin, int ymax); void mustScrollTo(int ymin, int ymax);

View file

@ -40,7 +40,7 @@ void CountryCodeInput::codeSelected(const QString &code) {
_nosignal = true; _nosignal = true;
correctValue(wasText, wasCursor, newText, newCursor); correctValue(wasText, wasCursor, newText, newCursor);
_nosignal = false; _nosignal = false;
emit changed(); changed();
} }
void CountryCodeInput::correctValue( void CountryCodeInput::correctValue(
@ -83,10 +83,10 @@ void CountryCodeInput::correctValue(
setCorrectedText(now, nowCursor, newText, newPos); setCorrectedText(now, nowCursor, newText, newPos);
if (!_nosignal && was != newText) { if (!_nosignal && was != newText) {
emit codeChanged(newText.mid(1)); codeChanged(newText.mid(1));
} }
if (!addToNumber.isEmpty()) { if (!addToNumber.isEmpty()) {
emit addedToNumber(addToNumber); addedToNumber(addToNumber);
} }
} }
@ -112,7 +112,7 @@ void PhonePartInput::paintAdditionalPlaceholder(Painter &p) {
void PhonePartInput::keyPressEvent(QKeyEvent *e) { void PhonePartInput::keyPressEvent(QKeyEvent *e) {
if (e->key() == Qt::Key_Backspace && getLastText().isEmpty()) { if (e->key() == Qt::Key_Backspace && getLastText().isEmpty()) {
emit voidBackspace(e); voidBackspace(e);
} else { } else {
MaskedInputField::keyPressEvent(e); MaskedInputField::keyPressEvent(e);
} }

View file

@ -17,11 +17,11 @@ class CountryCodeInput : public MaskedInputField {
public: public:
CountryCodeInput(QWidget *parent, const style::InputField &st); CountryCodeInput(QWidget *parent, const style::InputField &st);
public slots: public Q_SLOTS:
void startErasing(QKeyEvent *e); void startErasing(QKeyEvent *e);
void codeSelected(const QString &code); void codeSelected(const QString &code);
signals: Q_SIGNALS:
void codeChanged(const QString &code); void codeChanged(const QString &code);
void addedToNumber(const QString &added); void addedToNumber(const QString &added);
@ -43,11 +43,11 @@ class PhonePartInput : public MaskedInputField {
public: public:
PhonePartInput(QWidget *parent, const style::InputField &st); PhonePartInput(QWidget *parent, const style::InputField &st);
public slots: public Q_SLOTS:
void addedToNumber(const QString &added); void addedToNumber(const QString &added);
void onChooseCode(const QString &code); void onChooseCode(const QString &code);
signals: Q_SIGNALS:
void voidBackspace(QKeyEvent *e); void voidBackspace(QKeyEvent *e);
protected: protected:

View file

@ -402,8 +402,8 @@ void System::showNext() {
if (settings.soundNotify() && !Platform::Notifications::SkipAudio()) { if (settings.soundNotify() && !Platform::Notifications::SkipAudio()) {
ensureSoundCreated(); ensureSoundCreated();
_soundTrack->playOnce(); _soundTrack->playOnce();
emit Media::Player::mixer()->suppressAll(_soundTrack->getLengthMs()); Media::Player::mixer()->suppressAll(_soundTrack->getLengthMs());
emit Media::Player::mixer()->faderOnTimer(); Media::Player::mixer()->faderOnTimer();
} }
} }

View file

@ -606,7 +606,7 @@ MainMenu::MainMenu(
parentResized(); parentResized();
_menu->setTriggeredCallback([](const Ui::Menu::CallbackData &data) { _menu->setTriggeredCallback([](const Ui::Menu::CallbackData &data) {
emit data.action->triggered(); data.action->triggered();
}); });
refreshMenu(); refreshMenu();
refreshBackground(); refreshBackground();