mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Trying to get rid of unused variables...
This commit is contained in:
parent
12e306dd7b
commit
ae0b9141dd
16 changed files with 8 additions and 19 deletions
|
@ -464,7 +464,6 @@ void Rows::showMenu(int index) {
|
||||||
Fn<void()> callback) {
|
Fn<void()> callback) {
|
||||||
return _menu->addAction(text, std::move(callback));
|
return _menu->addAction(text, std::move(callback));
|
||||||
};
|
};
|
||||||
const auto id = row->data.id;
|
|
||||||
if (canShare(row)) {
|
if (canShare(row)) {
|
||||||
addAction(tr::lng_proxy_edit_share(tr::now), [=] { share(row); });
|
addAction(tr::lng_proxy_edit_share(tr::now), [=] { share(row); });
|
||||||
}
|
}
|
||||||
|
|
|
@ -695,8 +695,6 @@ bool PasscodeBox::handleCustomCheckError(const MTP::Error &error) {
|
||||||
|
|
||||||
void PasscodeBox::sendClearCloudPassword(
|
void PasscodeBox::sendClearCloudPassword(
|
||||||
const Core::CloudPasswordResult &check) {
|
const Core::CloudPasswordResult &check) {
|
||||||
const auto newPasswordData = QByteArray();
|
|
||||||
const auto newPasswordHash = QByteArray();
|
|
||||||
const auto hint = QString();
|
const auto hint = QString();
|
||||||
const auto email = QString();
|
const auto email = QString();
|
||||||
const auto flags = MTPDaccount_passwordInputSettings::Flag::f_new_algo
|
const auto flags = MTPDaccount_passwordInputSettings::Flag::f_new_algo
|
||||||
|
|
|
@ -566,7 +566,6 @@ int32 StickerSetBox::Inner::stickerFromGlobalPos(const QPoint &p) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void StickerSetBox::Inner::paintEvent(QPaintEvent *e) {
|
void StickerSetBox::Inner::paintEvent(QPaintEvent *e) {
|
||||||
QRect r(e->rect());
|
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
if (_elements.empty()) {
|
if (_elements.empty()) {
|
||||||
|
|
|
@ -406,7 +406,6 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
|
||||||
mrows.push_back({ i->second });
|
mrows.push_back({ i->second });
|
||||||
}
|
}
|
||||||
} else if (_channel && _channel->isMegagroup()) {
|
} else if (_channel && _channel->isMegagroup()) {
|
||||||
QMultiMap<int32, UserData*> ordered;
|
|
||||||
if (_channel->lastParticipantsRequestNeeded()) {
|
if (_channel->lastParticipantsRequestNeeded()) {
|
||||||
_channel->session().api().requestLastParticipants(_channel);
|
_channel->session().api().requestLastParticipants(_channel);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -348,7 +348,7 @@ QImage TabbedPanel::grabForAnimation() {
|
||||||
_a_show = base::take(showAnimation);
|
_a_show = base::take(showAnimation);
|
||||||
_showAnimation = base::take(showAnimationData);
|
_showAnimation = base::take(showAnimationData);
|
||||||
_a_opacity = base::take(opacityAnimation);
|
_a_opacity = base::take(opacityAnimation);
|
||||||
_cache = base::take(_cache);
|
_cache = base::take(cache);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -786,7 +786,6 @@ void LastCrashedWindow::updateControls() {
|
||||||
h += _networkSettings.height() + padding;
|
h += _networkSettings.height() + padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect scr(QApplication::primaryScreen()->availableGeometry());
|
|
||||||
QSize s(2 * padding + QFontMetrics(_label.font()).horizontalAdvance(qsl("Last time Telegram Desktop was not closed properly.")) + padding + _networkSettings.width(), h);
|
QSize s(2 * padding + QFontMetrics(_label.font()).horizontalAdvance(qsl("Last time Telegram Desktop was not closed properly.")) + padding + _networkSettings.width(), h);
|
||||||
if (s == size()) {
|
if (s == size()) {
|
||||||
resizeEvent(0);
|
resizeEvent(0);
|
||||||
|
|
|
@ -250,7 +250,6 @@ QString ExtractFilename(const QString &url) {
|
||||||
|
|
||||||
bool UnpackUpdate(const QString &filepath) {
|
bool UnpackUpdate(const QString &filepath) {
|
||||||
QFile input(filepath);
|
QFile input(filepath);
|
||||||
QByteArray packed;
|
|
||||||
if (!input.open(QIODevice::ReadOnly)) {
|
if (!input.open(QIODevice::ReadOnly)) {
|
||||||
LOG(("Update Error: cant read updates file!"));
|
LOG(("Update Error: cant read updates file!"));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1183,8 +1183,6 @@ void ComposeControls::initAutocomplete() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const auto insertMention = [=](not_null<UserData*> user) {
|
const auto insertMention = [=](not_null<UserData*> user) {
|
||||||
auto replacement = QString();
|
|
||||||
auto entityTag = QString();
|
|
||||||
if (user->username.isEmpty()) {
|
if (user->username.isEmpty()) {
|
||||||
_field->insertTag(
|
_field->insertTag(
|
||||||
user->firstName.isEmpty() ? user->name : user->firstName,
|
user->firstName.isEmpty() ? user->name : user->firstName,
|
||||||
|
|
|
@ -2004,7 +2004,7 @@ void ListWidget::performDrag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextWithEntities sel;
|
TextWithEntities sel;
|
||||||
QList<QUrl> urls;
|
//QList<QUrl> urls;
|
||||||
if (uponSelected) {
|
if (uponSelected) {
|
||||||
// sel = getSelectedText();
|
// sel = getSelectedText();
|
||||||
} else if (pressedHandler) {
|
} else if (pressedHandler) {
|
||||||
|
|
|
@ -213,7 +213,7 @@ void Widget::startShowAnimation() {
|
||||||
showChildren();
|
showChildren();
|
||||||
auto image = grabForPanelAnimation();
|
auto image = grabForPanelAnimation();
|
||||||
_a_opacity = base::take(opacityAnimation);
|
_a_opacity = base::take(opacityAnimation);
|
||||||
_cache = base::take(_cache);
|
_cache = base::take(cache);
|
||||||
|
|
||||||
_showAnimation = std::make_unique<Ui::PanelAnimation>(st::emojiPanAnimation, Ui::PanelAnimation::Origin::BottomLeft);
|
_showAnimation = std::make_unique<Ui::PanelAnimation>(st::emojiPanAnimation, Ui::PanelAnimation::Origin::BottomLeft);
|
||||||
auto inner = rect().marginsRemoved(st::emojiPanMargins);
|
auto inner = rect().marginsRemoved(st::emojiPanMargins);
|
||||||
|
|
|
@ -194,7 +194,7 @@ void Float::paintEvent(QPaintEvent *e) {
|
||||||
const auto progress = playback ? playback->value() : 1.;
|
const auto progress = playback ? playback->value() : 1.;
|
||||||
if (progress > 0.) {
|
if (progress > 0.) {
|
||||||
auto pen = st::historyVideoMessageProgressFg->p;
|
auto pen = st::historyVideoMessageProgressFg->p;
|
||||||
auto was = p.pen();
|
//auto was = p.pen();
|
||||||
pen.setWidth(st::radialLine);
|
pen.setWidth(st::radialLine);
|
||||||
pen.setCapStyle(Qt::RoundCap);
|
pen.setCapStyle(Qt::RoundCap);
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
|
|
|
@ -476,7 +476,6 @@ void Widget::handleSongUpdate(const TrackState &state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::updateTimeText(const TrackState &state) {
|
void Widget::updateTimeText(const TrackState &state) {
|
||||||
QString time;
|
|
||||||
qint64 position = 0, length = 0, display = 0;
|
qint64 position = 0, length = 0, display = 0;
|
||||||
const auto frequency = state.frequency;
|
const auto frequency = state.frequency;
|
||||||
const auto document = state.id.audio();
|
const auto document = state.id.audio();
|
||||||
|
|
|
@ -1669,7 +1669,6 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived(
|
||||||
|
|
||||||
auto rFrom = originalRequest->constData() + 8;
|
auto rFrom = originalRequest->constData() + 8;
|
||||||
const auto rEnd = originalRequest->constData() + originalRequest->size();
|
const auto rEnd = originalRequest->constData() + originalRequest->size();
|
||||||
auto toAck = QVector<MTPlong>();
|
|
||||||
if (mtpTypeId(*rFrom) == mtpc_msgs_state_req) {
|
if (mtpTypeId(*rFrom) == mtpc_msgs_state_req) {
|
||||||
MTPMsgsStateReq request;
|
MTPMsgsStateReq request;
|
||||||
if (!request.read(rFrom, rEnd)) {
|
if (!request.read(rFrom, rEnd)) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ CountryInput::CountryInput(QWidget *parent, const style::InputField &st) : TWidg
|
||||||
auto availableWidth = width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1;
|
auto availableWidth = width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1;
|
||||||
auto placeholderFont = _st.placeholderFont->f;
|
auto placeholderFont = _st.placeholderFont->f;
|
||||||
placeholderFont.setStyleStrategy(QFont::PreferMatch);
|
placeholderFont.setStyleStrategy(QFont::PreferMatch);
|
||||||
auto metrics = QFontMetrics(placeholderFont);
|
//auto metrics = QFontMetrics(placeholderFont);
|
||||||
auto placeholder = QString();// metrics.elidedText(tr::lng_country_fake_ph(tr::now), Qt::ElideRight, availableWidth);
|
auto placeholder = QString();// metrics.elidedText(tr::lng_country_fake_ph(tr::now), Qt::ElideRight, availableWidth);
|
||||||
if (!placeholder.isNull()) {
|
if (!placeholder.isNull()) {
|
||||||
_placeholderPath.addText(0, QFontMetrics(placeholderFont).ascent(), placeholderFont, placeholder);
|
_placeholderPath.addText(0, QFontMetrics(placeholderFont).ascent(), placeholderFont, placeholder);
|
||||||
|
|
|
@ -389,7 +389,7 @@ QImage FilterIconPanel::grabForAnimation() {
|
||||||
_a_show = base::take(showAnimation);
|
_a_show = base::take(showAnimation);
|
||||||
_showAnimation = base::take(showAnimationData);
|
_showAnimation = base::take(showAnimationData);
|
||||||
_a_opacity = base::take(opacityAnimation);
|
_a_opacity = base::take(opacityAnimation);
|
||||||
_cache = base::take(_cache);
|
_cache = base::take(cache);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -658,8 +658,8 @@ void MainWindow::savePosition(Qt::WindowState state) {
|
||||||
auto centerY = realPosition.y + realPosition.h / 2;
|
auto centerY = realPosition.y + realPosition.h / 2;
|
||||||
int minDelta = 0;
|
int minDelta = 0;
|
||||||
QScreen *chosen = nullptr;
|
QScreen *chosen = nullptr;
|
||||||
auto screens = QGuiApplication::screens();
|
const auto screens = QGuiApplication::screens();
|
||||||
for (auto screen : QGuiApplication::screens()) {
|
for (auto screen : screens) {
|
||||||
auto delta = (screen->geometry().center() - QPoint(centerX, centerY)).manhattanLength();
|
auto delta = (screen->geometry().center() - QPoint(centerX, centerY)).manhattanLength();
|
||||||
if (!chosen || delta < minDelta) {
|
if (!chosen || delta < minDelta) {
|
||||||
minDelta = delta;
|
minDelta = delta;
|
||||||
|
|
Loading…
Add table
Reference in a new issue