mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix -Wunused-variable warnings with gcc
This commit is contained in:
parent
3d1a049405
commit
ba9b72e038
31 changed files with 46 additions and 150 deletions
|
@ -115,12 +115,12 @@ private:
|
|||
const Rows::Row &rowBySelection(Selection selected) const;
|
||||
std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
Selection selected);
|
||||
const std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
[[maybe_unused]] const std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
Selection selected) const;
|
||||
std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
not_null<Row*> row,
|
||||
Selection selected);
|
||||
const std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
[[maybe_unused]] const std::unique_ptr<Ui::RippleAnimation> &rippleBySelection(
|
||||
not_null<const Row*> row,
|
||||
Selection selected) const;
|
||||
void addRipple(Selection selected, QPoint position);
|
||||
|
|
|
@ -129,9 +129,6 @@ private:
|
|||
const QString &text,
|
||||
rpl::producer<QString> about);
|
||||
|
||||
bool inviteLinkShown();
|
||||
QString inviteLinkText();
|
||||
|
||||
not_null<PeerData*> _peer;
|
||||
bool _linkOnly = false;
|
||||
|
||||
|
@ -308,15 +305,6 @@ QString Controller::getUsernameInput() {
|
|||
return _controls.usernameInput->getLastText().trimmed();
|
||||
}
|
||||
|
||||
QString Controller::inviteLinkText() {
|
||||
if (const auto channel = _peer->asChannel()) {
|
||||
return channel->inviteLink();
|
||||
} else if (const auto chat = _peer->asChat()) {
|
||||
return chat->inviteLink();
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
object_ptr<Ui::RpWidget> Controller::createUsernameEdit() {
|
||||
Expects(_wrap != nullptr);
|
||||
|
||||
|
@ -583,11 +571,6 @@ object_ptr<Ui::RpWidget> Controller::createInviteLinkBlock() {
|
|||
return result;
|
||||
}
|
||||
|
||||
bool Controller::inviteLinkShown() {
|
||||
return !_controls.privacy
|
||||
|| (_controls.privacy->value() == Privacy::NoUsername);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
EditPeerTypeBox::EditPeerTypeBox(
|
||||
|
|
|
@ -761,7 +761,6 @@ void StickerSetBox::Inner::visibleTopBottomUpdated(
|
|||
|
||||
void StickerSetBox::Inner::setupLottie(int index) {
|
||||
auto &element = _elements[index];
|
||||
const auto document = element.document;
|
||||
|
||||
element.animated = ChatHelpers::LottieAnimationFromDocument(
|
||||
getLottiePlayer(),
|
||||
|
|
|
@ -335,7 +335,6 @@ void ChooseJoinAsProcess::start(
|
|||
}, _request->lifetime);
|
||||
|
||||
const auto finish = [=](JoinInfo info) {
|
||||
const auto peer = _request->peer;
|
||||
const auto done = std::move(_request->done);
|
||||
const auto box = _request->box;
|
||||
_request = nullptr;
|
||||
|
|
|
@ -1171,21 +1171,6 @@ int Members::Controller::rowPaintStatusIcon(
|
|||
: state.raisedHand
|
||||
? st::groupCallMemberInactiveStatus->c
|
||||
: iconColor;
|
||||
const auto color = (state.speaking == 1. && !state.mutedByMe)
|
||||
? st::groupCallMemberActiveStatus->c
|
||||
: (state.speaking == 0.
|
||||
? (state.active == 1.
|
||||
? st::groupCallMemberNotJoinedStatus->c
|
||||
: (state.active == 0.
|
||||
? (state.muted == 1.
|
||||
? (state.raisedHand
|
||||
? st::groupCallMemberInactiveStatus->c
|
||||
: st::groupCallMemberNotJoinedStatus->c)
|
||||
: (state.muted == 0.
|
||||
? st::groupCallMemberNotJoinedStatus->c
|
||||
: other))
|
||||
: other))
|
||||
: other);
|
||||
if (camera) {
|
||||
st::groupCallNarrowCameraIcon.paint(p, x, y, outerWidth, other);
|
||||
x += st::groupCallNarrowCameraIcon.width();
|
||||
|
|
|
@ -1033,7 +1033,6 @@ void GifsListWidget::updateSelected() {
|
|||
int row = -1, col = -1, sel = -1;
|
||||
ClickHandlerPtr lnk;
|
||||
ClickHandlerHost *lnkhost = nullptr;
|
||||
HistoryView::CursorState cursor = HistoryView::CursorState::None;
|
||||
if (sy >= 0) {
|
||||
row = 0;
|
||||
for (int rows = _rows.size(); row < rows; ++row) {
|
||||
|
@ -1062,7 +1061,6 @@ void GifsListWidget::updateSelected() {
|
|||
QPoint(sx, sy),
|
||||
HistoryView::StateRequest());
|
||||
lnk = result.link;
|
||||
cursor = result.cursor;
|
||||
lnkhost = inlineItems[col];
|
||||
} else {
|
||||
row = col = -1;
|
||||
|
|
|
@ -1880,7 +1880,6 @@ void StickersListWidget::ensureLottiePlayer(Set &set) {
|
|||
|
||||
void StickersListWidget::setupLottie(Set &set, int section, int index) {
|
||||
auto &sticker = set.stickers[index];
|
||||
const auto document = sticker.document;
|
||||
ensureLottiePlayer(set);
|
||||
|
||||
// Document should be loaded already for the animation to be set up.
|
||||
|
|
|
@ -63,7 +63,7 @@ enum class Command {
|
|||
SupportHistoryForward,
|
||||
};
|
||||
|
||||
constexpr auto kShowFolder = {
|
||||
[[maybe_unused]] constexpr auto kShowFolder = {
|
||||
Command::ShowAllChats,
|
||||
Command::ShowFolder1,
|
||||
Command::ShowFolder2,
|
||||
|
|
|
@ -98,25 +98,27 @@ QString FileExtension(const QString &filepath) {
|
|||
return QString(last.base(), last - reversed.begin());
|
||||
}
|
||||
|
||||
// bool IsValidMediaFile(const QString &filepath) {
|
||||
// static const auto kExtensions = [] {
|
||||
// const auto list = qsl("\
|
||||
// 16svx 2sf 3g2 3gp 8svx aac aaf aif aifc aiff amr amv ape asf ast au aup \
|
||||
// avchd avi brstm bwf cam cdda cust dat divx drc dsh dsf dts dtshd dtsma \
|
||||
// dvr-ms dwd evo f4a f4b f4p f4v fla flac flr flv gif gifv gsf gsm gym iff \
|
||||
// ifo it jam la ly m1v m2p m2ts m2v m4a m4p m4v mcf mid mk3d mka mks mkv mng \
|
||||
// mov mp1 mp2 mp3 mp4 minipsf mod mpc mpe mpeg mpg mpv mscz mt2 mus mxf mxl \
|
||||
// niff nsf nsv off ofr ofs ogg ogv opus ots pac ps psf psf2 psflib ptb qsf \
|
||||
// qt ra raw rka rm rmj rmvb roq s3m shn sib sid smi smp sol spc spx ssf svi \
|
||||
// swa swf tak ts tta txm usf vgm vob voc vox vqf wav webm wma wmv wrap wtv \
|
||||
// wv xm xml ym yuv").split(' ');
|
||||
// return base::flat_set<QString>(list.begin(), list.end());
|
||||
// }();
|
||||
#if 0
|
||||
bool IsValidMediaFile(const QString &filepath) {
|
||||
static const auto kExtensions = [] {
|
||||
const auto list = qsl("\
|
||||
16svx 2sf 3g2 3gp 8svx aac aaf aif aifc aiff amr amv ape asf ast au aup \
|
||||
avchd avi brstm bwf cam cdda cust dat divx drc dsh dsf dts dtshd dtsma \
|
||||
dvr-ms dwd evo f4a f4b f4p f4v fla flac flr flv gif gifv gsf gsm gym iff \
|
||||
ifo it jam la ly m1v m2p m2ts m2v m4a m4p m4v mcf mid mk3d mka mks mkv mng \
|
||||
mov mp1 mp2 mp3 mp4 minipsf mod mpc mpe mpeg mpg mpv mscz mt2 mus mxf mxl \
|
||||
niff nsf nsv off ofr ofs ogg ogv opus ots pac ps psf psf2 psflib ptb qsf \
|
||||
qt ra raw rka rm rmj rmvb roq s3m shn sib sid smi smp sol spc spx ssf svi \
|
||||
swa swf tak ts tta txm usf vgm vob voc vox vqf wav webm wma wmv wrap wtv \
|
||||
wv xm xml ym yuv").split(' ');
|
||||
return base::flat_set<QString>(list.begin(), list.end());
|
||||
}();
|
||||
|
||||
// return ranges::binary_search(
|
||||
// kExtensions,
|
||||
// FileExtension(filepath).toLower());
|
||||
// }
|
||||
return ranges::binary_search(
|
||||
kExtensions,
|
||||
FileExtension(filepath).toLower());
|
||||
}
|
||||
#endif
|
||||
|
||||
bool IsExecutableName(const QString &filepath) {
|
||||
static const auto kExtensions = [] {
|
||||
|
|
|
@ -1248,14 +1248,12 @@ bool InnerWidget::pinnedShiftAnimationCallback(crl::time now) {
|
|||
now += st::stickersRowDuration;
|
||||
}
|
||||
|
||||
auto wasAnimating = false;
|
||||
auto animating = false;
|
||||
auto updateMin = -1;
|
||||
auto updateMax = 0;
|
||||
for (auto i = 0, l = static_cast<int>(_pinnedRows.size()); i != l; ++i) {
|
||||
auto start = _pinnedRows[i].animStartTime;
|
||||
if (start) {
|
||||
wasAnimating = true;
|
||||
if (updateMin < 0) updateMin = i;
|
||||
updateMax = i;
|
||||
if (start + st::stickersRowDuration > now && now >= start) {
|
||||
|
|
|
@ -32,7 +32,6 @@ public:
|
|||
return _check->checked();
|
||||
}
|
||||
rpl::producer<bool> checkedChanges() const;
|
||||
rpl::producer<bool> checkedValue() const;
|
||||
|
||||
enum class NotifyAboutChange {
|
||||
Notify,
|
||||
|
@ -42,8 +41,6 @@ public:
|
|||
bool checked,
|
||||
NotifyAboutChange notify = NotifyAboutChange::Notify);
|
||||
|
||||
void finishAnimating();
|
||||
|
||||
QMargins getMargins() const override {
|
||||
return _st.margin;
|
||||
}
|
||||
|
@ -90,10 +87,6 @@ rpl::producer<bool> UserCheckbox::checkedChanges() const {
|
|||
return _checkedChanges.events();
|
||||
}
|
||||
|
||||
rpl::producer<bool> UserCheckbox::checkedValue() const {
|
||||
return _checkedChanges.events_starting_with(checked());
|
||||
}
|
||||
|
||||
void UserCheckbox::setChecked(bool checked, NotifyAboutChange notify) {
|
||||
if (_check->checked() != checked) {
|
||||
_check->setChecked(checked, anim::type::normal);
|
||||
|
@ -133,10 +126,6 @@ void UserCheckbox::paintEvent(QPaintEvent *e) {
|
|||
p.drawTextLeft(statusLeft, statusTop, width(), _statusText);
|
||||
}
|
||||
|
||||
void UserCheckbox::finishAnimating() {
|
||||
_check->finishAnimating();
|
||||
}
|
||||
|
||||
int UserCheckbox::resizeGetHeight(int newWidth) {
|
||||
return st::contactsPhotoSize;
|
||||
}
|
||||
|
|
|
@ -1637,7 +1637,7 @@ void InnerWidget::updateSelected() {
|
|||
dragState = view->textState(itemPoint, request);
|
||||
lnkhost = view;
|
||||
if (!dragState.link && itemPoint.x() >= st::historyPhotoLeft && itemPoint.x() < st::historyPhotoLeft + st::msgPhotoSize) {
|
||||
if (auto message = item->toHistoryMessage()) {
|
||||
if (item->toHistoryMessage()) {
|
||||
if (view->hasFromPhoto()) {
|
||||
enumerateUserpics([&](not_null<Element*> view, int userpicTop) {
|
||||
// stop enumeration if the userpic is below our point
|
||||
|
|
|
@ -2823,7 +2823,7 @@ void HistoryInner::mouseActionUpdate() {
|
|||
_dragStateItem = session().data().message(dragState.itemId);
|
||||
lnkhost = view;
|
||||
if (!dragState.link && m.x() >= st::historyPhotoLeft && m.x() < st::historyPhotoLeft + st::msgPhotoSize) {
|
||||
if (auto msg = item->toHistoryMessage()) {
|
||||
if (item->toHistoryMessage()) {
|
||||
if (view->hasFromPhoto()) {
|
||||
enumerateUserpics([&](not_null<Element*> view, int userpicTop) -> bool {
|
||||
// stop enumeration if the userpic is below our point
|
||||
|
|
|
@ -81,12 +81,11 @@ void Call::draw(Painter &p, const QRect &r, TextSelection selection, crl::time m
|
|||
|
||||
accumulate_min(paintw, maxWidth());
|
||||
|
||||
auto nameleft = 0, nametop = 0, nameright = 0, statustop = 0;
|
||||
auto nameleft = 0, nametop = 0, statustop = 0;
|
||||
auto topMinus = isBubbleTop() ? 0 : st::msgFileTopMinus;
|
||||
|
||||
nameleft = st::historyCallLeft;
|
||||
nametop = st::historyCallTop - topMinus;
|
||||
nameright = st::msgFileLayout.padding.left();
|
||||
statustop = st::historyCallStatusTop - topMinus;
|
||||
|
||||
p.setFont(st::semiboldFont);
|
||||
|
|
|
@ -125,9 +125,9 @@ void InnerWidget::createTypeButtons() {
|
|||
addMediaButton(Type::MusicFile, st::infoIconMediaAudio);
|
||||
addMediaButton(Type::Link, st::infoIconMediaLink);
|
||||
addMediaButton(Type::RoundVoiceFile, st::infoIconMediaVoice);
|
||||
if (auto user = _controller->key().peer()->asUser()) {
|
||||
// if (auto user = _controller->key().peer()->asUser()) {
|
||||
// addCommonGroupsButton(user, st::infoIconMediaGroup);
|
||||
}
|
||||
// }
|
||||
|
||||
content->add(object_ptr<Ui::FixedHeightWidget>(
|
||||
content,
|
||||
|
|
|
@ -458,7 +458,6 @@ ActionsFiller::ActionsFiller(
|
|||
|
||||
void ActionsFiller::addInviteToGroupAction(
|
||||
not_null<UserData*> user) {
|
||||
const auto controller = _controller;
|
||||
AddActionButton(
|
||||
_wrap,
|
||||
tr::lng_profile_invite_to_group(),
|
||||
|
|
|
@ -198,7 +198,7 @@ ClickHandlerPtr ItemBase::getResultPreviewHandler() const {
|
|||
_result->_content_url,
|
||||
false);
|
||||
} else if (const auto document = _result->_document
|
||||
&& _result->_document->createMediaView()->canBePlayed()) {
|
||||
; document->createMediaView()->canBePlayed()) {
|
||||
return std::make_shared<OpenFileClickHandler>();
|
||||
} else if (_result->_photo) {
|
||||
return std::make_shared<OpenFileClickHandler>();
|
||||
|
|
|
@ -677,7 +677,6 @@ void Inner::updateSelected() {
|
|||
int row = -1, col = -1, sel = -1;
|
||||
ClickHandlerPtr lnk;
|
||||
ClickHandlerHost *lnkhost = nullptr;
|
||||
HistoryView::CursorState cursor = HistoryView::CursorState::None;
|
||||
if (sy >= 0) {
|
||||
row = 0;
|
||||
for (int rows = _rows.size(); row < rows; ++row) {
|
||||
|
@ -706,7 +705,6 @@ void Inner::updateSelected() {
|
|||
QPoint(sx, sy),
|
||||
HistoryView::StateRequest());
|
||||
lnk = result.link;
|
||||
cursor = result.cursor;
|
||||
lnkhost = inlineItems[col];
|
||||
} else {
|
||||
row = col = -1;
|
||||
|
|
|
@ -478,12 +478,11 @@ void Widget::handleSongUpdate(const TrackState &state) {
|
|||
}
|
||||
|
||||
void Widget::updateTimeText(const TrackState &state) {
|
||||
qint64 position = 0, length = 0, display = 0;
|
||||
qint64 display = 0;
|
||||
const auto frequency = state.frequency;
|
||||
const auto document = state.id.audio();
|
||||
if (!IsStoppedOrStopping(state.state)) {
|
||||
display = position = state.position;
|
||||
length = state.length;
|
||||
display = state.position;
|
||||
} else if (state.length) {
|
||||
display = state.length;
|
||||
} else if (const auto song = document->song()) {
|
||||
|
|
|
@ -2439,7 +2439,7 @@ void OverlayWidget::displayDocument(
|
|||
_docIconRect = QRect((width() - st::mediaviewFileIconSize) / 2, (height() - st::mediaviewFileIconSize) / 2, st::mediaviewFileIconSize, st::mediaviewFileIconSize);
|
||||
int32 colorIndex = documentColorIndex(_document, _docExt);
|
||||
_docIconColor = documentColor(colorIndex);
|
||||
const style::icon *(thumbs[]) = { &st::mediaviewFileBlue, &st::mediaviewFileGreen, &st::mediaviewFileRed, &st::mediaviewFileYellow };
|
||||
const style::icon *thumbs[] = { &st::mediaviewFileBlue, &st::mediaviewFileGreen, &st::mediaviewFileRed, &st::mediaviewFileYellow };
|
||||
_docIcon = thumbs[colorIndex];
|
||||
|
||||
int32 extmaxw = (st::mediaviewFileIconSize - st::mediaviewFileExtPadding * 2);
|
||||
|
@ -3429,7 +3429,7 @@ void OverlayWidget::paintThemePreviewContent(
|
|||
width(),
|
||||
st::themePreviewMargin.top());
|
||||
}
|
||||
if (const auto fillTitleRect = (titleRect.y() < 0)) {
|
||||
if (titleRect.y() < 0) {
|
||||
titleRect.moveTop(0);
|
||||
fillOverlay(titleRect);
|
||||
}
|
||||
|
@ -3457,8 +3457,7 @@ void OverlayWidget::paintThemePreviewContent(
|
|||
outer.y() + outer.height() - st::themePreviewMargin.bottom(),
|
||||
outer.width(),
|
||||
st::themePreviewMargin.bottom());
|
||||
if (const auto fillButtonsRect
|
||||
= (buttonsRect.y() + buttonsRect.height() > height())) {
|
||||
if (buttonsRect.y() + buttonsRect.height() > height()) {
|
||||
buttonsRect.moveTop(height() - buttonsRect.height());
|
||||
fillOverlay(buttonsRect);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ DcKeyBindState DcKeyBinder::handleResponse(const mtpBuffer &response) {
|
|||
auto from = response.begin();
|
||||
const auto end = from + response.size();
|
||||
auto error = MTPRpcError();
|
||||
auto result = MTPBool();
|
||||
if (response[0] == mtpc_boolTrue) {
|
||||
return DcKeyBindState::Success;
|
||||
} else if (response[0] == mtpc_rpc_error && error.read(from, end)) {
|
||||
|
|
|
@ -314,10 +314,10 @@ auto ConcurrentSender::SpecificRequestBuilder<Request>::done(
|
|||
Handler,
|
||||
mtpRequestId,
|
||||
Result>;
|
||||
constexpr auto takesResponse = rpl::details::is_callable_plain_v<
|
||||
[[maybe_unused]] constexpr auto takesResponse = rpl::details::is_callable_plain_v<
|
||||
Handler,
|
||||
Result>;
|
||||
constexpr auto takesNone = rpl::details::is_callable_plain_v<Handler>;
|
||||
[[maybe_unused]] constexpr auto takesNone = rpl::details::is_callable_plain_v<Handler>;
|
||||
|
||||
if constexpr (takesFull) {
|
||||
setDoneHandler<Result>(std::forward<Handler>(handler));
|
||||
|
@ -348,10 +348,10 @@ auto ConcurrentSender::SpecificRequestBuilder<Request>::fail(
|
|||
Handler,
|
||||
mtpRequestId,
|
||||
Error>;
|
||||
constexpr auto takesError = rpl::details::is_callable_plain_v<
|
||||
[[maybe_unused]] constexpr auto takesError = rpl::details::is_callable_plain_v<
|
||||
Handler,
|
||||
Error>;
|
||||
constexpr auto takesNone = rpl::details::is_callable_plain_v<Handler>;
|
||||
[[maybe_unused]] constexpr auto takesNone = rpl::details::is_callable_plain_v<Handler>;
|
||||
|
||||
if constexpr (takesFull) {
|
||||
setFailHandler(std::forward<Handler>(handler));
|
||||
|
|
|
@ -58,7 +58,7 @@ const BuiltInDc kBuiltInDcsIPv6Test[] = {
|
|||
{ 3, "2001:0b28:f23d:f003:0000:0000:0000:000e", 443 }
|
||||
};
|
||||
|
||||
const char *(kTestPublicRSAKeys[]) = { "\
|
||||
const char *kTestPublicRSAKeys[] = { "\
|
||||
-----BEGIN RSA PUBLIC KEY-----\n\
|
||||
MIIBCgKCAQEAyMEdY1aR+sCR3ZSJrtztKTKqigvO/vBfqACJLZtS7QMgCGXJ6XIR\n\
|
||||
yy7mx66W0/sOFa7/1mAZtEoIokDP3ShoqF4fVNb6XeqgQfaUHd8wJpDWHcR2OFwv\n\
|
||||
|
@ -68,7 +68,7 @@ aHWfYmlEGepfaYR8Q0YqvvhYtMte3ITnuSJs171+GDqpdKcSwHnd6FudwGO4pcCO\n\
|
|||
j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB\n\
|
||||
-----END RSA PUBLIC KEY-----" };
|
||||
|
||||
const char *(kPublicRSAKeys[]) = { "\
|
||||
const char *kPublicRSAKeys[] = { "\
|
||||
-----BEGIN RSA PUBLIC KEY-----\n\
|
||||
MIIBCgKCAQEA6LszBcC1LGzyr992NzE0ieY+BSaOW622Aa9Bd4ZHLl+TuFQ4lo4g\n\
|
||||
5nKaMBwK/BIb9xUfg0Q29/2mgIR6Zr9krM7HjuIcCzFvDtr+L0GQjae9H0pRB2OO\n\
|
||||
|
|
|
@ -176,20 +176,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool defaultNameFilterDisables() const;
|
||||
QUrl directory() const;
|
||||
void setDirectory(const QUrl &directory);
|
||||
void selectFile(const QUrl &filename);
|
||||
QList<QUrl> selectedFiles() const;
|
||||
void setFilter();
|
||||
void selectNameFilter(const QString &filter);
|
||||
QString selectedNameFilter() const;
|
||||
void selectMimeTypeFilter(const QString &filter);
|
||||
QString selectedMimeTypeFilter() const;
|
||||
|
||||
int exec() override;
|
||||
|
||||
bool failedToOpen() {
|
||||
bool failedToOpen() const {
|
||||
return _failedToOpen;
|
||||
}
|
||||
|
||||
|
@ -517,10 +511,6 @@ void XDPFileDialog::openPortal() {
|
|||
}
|
||||
}
|
||||
|
||||
bool XDPFileDialog::defaultNameFilterDisables() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void XDPFileDialog::setDirectory(const QUrl &directory) {
|
||||
_directory = directory.path().toStdString();
|
||||
}
|
||||
|
@ -544,23 +534,6 @@ QList<QUrl> XDPFileDialog::selectedFiles() const {
|
|||
return files;
|
||||
}
|
||||
|
||||
void XDPFileDialog::setFilter() {
|
||||
}
|
||||
|
||||
void XDPFileDialog::selectMimeTypeFilter(const QString &filter) {
|
||||
}
|
||||
|
||||
QString XDPFileDialog::selectedMimeTypeFilter() const {
|
||||
return QString::fromStdString(_selectedMimeTypeFilter);
|
||||
}
|
||||
|
||||
void XDPFileDialog::selectNameFilter(const QString &filter) {
|
||||
}
|
||||
|
||||
QString XDPFileDialog::selectedNameFilter() const {
|
||||
return QString::fromStdString(_selectedNameFilter);
|
||||
}
|
||||
|
||||
int XDPFileDialog::exec() {
|
||||
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ protected:
|
|||
private:
|
||||
void updateControlsGeometry(int newWidth);
|
||||
Ui::RpWidget *pushButton(base::unique_qptr<Ui::RpWidget> button);
|
||||
void removeButton(not_null<Ui::RpWidget*> button);
|
||||
|
||||
const style::InfoTopBar &_st;
|
||||
std::vector<base::unique_qptr<Ui::RpWidget>> _buttons;
|
||||
|
@ -136,12 +135,6 @@ Ui::RpWidget *TopBar::pushButton(base::unique_qptr<Ui::RpWidget> button) {
|
|||
return weak;
|
||||
}
|
||||
|
||||
void TopBar::removeButton(not_null<Ui::RpWidget*> button) {
|
||||
_buttons.erase(
|
||||
std::remove(_buttons.begin(), _buttons.end(), button),
|
||||
_buttons.end());
|
||||
}
|
||||
|
||||
int TopBar::resizeGetHeight(int newWidth) {
|
||||
updateControlsGeometry(newWidth);
|
||||
return _st.height;
|
||||
|
|
|
@ -126,7 +126,6 @@ private:
|
|||
void setInnerFocus();
|
||||
void putNext(const object_ptr<TimePart> &field, QChar ch);
|
||||
void erasePrevious(const object_ptr<TimePart> &field);
|
||||
void finishInnerAnimating();
|
||||
void setErrorShown(bool error);
|
||||
void setFocused(bool focused);
|
||||
void startBorderAnimation();
|
||||
|
@ -538,14 +537,6 @@ void TimeInput::setFocused(bool focused) {
|
|||
}
|
||||
}
|
||||
|
||||
void TimeInput::finishInnerAnimating() {
|
||||
_hour->finishAnimating();
|
||||
_minute->finishAnimating();
|
||||
_a_borderOpacity.stop();
|
||||
_a_borderShown.stop();
|
||||
_a_error.stop();
|
||||
}
|
||||
|
||||
void TimeInput::startBorderAnimation() {
|
||||
auto borderVisible = (_error || _focused);
|
||||
if (_borderVisible != borderVisible) {
|
||||
|
|
|
@ -412,7 +412,7 @@ void EmptyUserpic::fillString(const QString &name) {
|
|||
auto ch = name.constData(), end = ch + name.size();
|
||||
while (ch != end) {
|
||||
auto emojiLength = 0;
|
||||
if (auto emoji = Ui::Emoji::Find(ch, end, &emojiLength)) {
|
||||
if (Ui::Emoji::Find(ch, end, &emojiLength)) {
|
||||
ch += emojiLength;
|
||||
} else if (ch->isHighSurrogate()) {
|
||||
++ch;
|
||||
|
|
|
@ -491,11 +491,9 @@ void MainWindow::initSize() {
|
|||
}
|
||||
|
||||
const auto primaryScreen = QGuiApplication::primaryScreen();
|
||||
auto geometryScreen = primaryScreen;
|
||||
const auto available = primaryScreen
|
||||
? primaryScreen->availableGeometry()
|
||||
: QRect(0, 0, st::windowDefaultWidth, st::windowDefaultHeight);
|
||||
bool maximized = false;
|
||||
const auto initialWidth = Core::Settings::ThirdColumnByDefault()
|
||||
? st::windowBigDefaultWidth
|
||||
: st::windowDefaultWidth;
|
||||
|
@ -561,13 +559,11 @@ void MainWindow::initSize() {
|
|||
position.y + st::windowMinHeight <= screenGeometry.y() + screenGeometry.height()) {
|
||||
DEBUG_LOG(("Window Pos: Resulting geometry is %1, %2, %3, %4").arg(position.x).arg(position.y).arg(position.w).arg(position.h));
|
||||
geometry = QRect(position.x, position.y, position.w, position.h);
|
||||
geometryScreen = screen;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
maximized = position.maximized;
|
||||
}
|
||||
geometry += _padding;
|
||||
DEBUG_LOG(("Window Pos: Setting first %1, %2, %3, %4").arg(geometry.x()).arg(geometry.y()).arg(geometry.width()).arg(geometry.height()));
|
||||
|
|
|
@ -320,7 +320,7 @@ bool EditorBlock::selectSkip(int direction) {
|
|||
if (newSelected < -1 || newSelected > maxSelected) {
|
||||
newSelected = maxSelected;
|
||||
}
|
||||
if (auto changed = (newSelected != _selected)) {
|
||||
if (newSelected != _selected) {
|
||||
setSelected(newSelected);
|
||||
scrollToSelected();
|
||||
return (newSelected >= 0);
|
||||
|
|
|
@ -31,7 +31,7 @@ QString fillLetters(const QString &name) {
|
|||
auto ch = name.constData(), end = ch + name.size();
|
||||
while (ch != end) {
|
||||
auto emojiLength = 0;
|
||||
if (auto emoji = Ui::Emoji::Find(ch, end, &emojiLength)) {
|
||||
if (Ui::Emoji::Find(ch, end, &emojiLength)) {
|
||||
ch += emojiLength;
|
||||
} else if (ch->isHighSurrogate()) {
|
||||
++ch;
|
||||
|
@ -243,10 +243,8 @@ void Generator::addAudioBubble(QVector<int> waveform, int waveactive, QString wa
|
|||
auto skipBlock = computeSkipBlock(status, date);
|
||||
|
||||
auto width = st::msgFileMinWidth;
|
||||
auto tleft = 0, tright = 0;
|
||||
const auto &st = st::msgFileLayout;
|
||||
tleft = st.padding.left() + st.thumbSize + st.padding.right();
|
||||
tright = st.padding.left();
|
||||
auto tleft = st.padding.left() + st.thumbSize + st.padding.right();
|
||||
accumulate_max(width, tleft + st::normalFont->width(wavestatus) + skipBlock.width() + st::msgPadding.right());
|
||||
accumulate_min(width, st::msgMaxWidth);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ constexpr auto kMinimalSkip = 7;
|
|||
constexpr auto kSoonSkip = 30;
|
||||
constexpr auto kNowSkip = 90;
|
||||
|
||||
#ifdef DESKTOP_APP_SPECIAL_TARGET
|
||||
class Bar : public Ui::RpWidget {
|
||||
public:
|
||||
Bar(not_null<QWidget*> parent, QDate date);
|
||||
|
@ -96,7 +97,6 @@ void Bar::paintEvent(QPaintEvent *e) {
|
|||
_soon ? st::outdateSoonBg : st::outdatedBg);
|
||||
}
|
||||
|
||||
#ifdef DESKTOP_APP_SPECIAL_TARGET
|
||||
QString LastHiddenPath() {
|
||||
return cWorkingDir() + qsl("tdata/outdated_hidden");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue