Fixed indents in some files.

This commit is contained in:
23rd 2023-11-30 21:58:32 +03:00 committed by John Preston
parent 3adbfb1fb5
commit 88b20f6700
34 changed files with 50 additions and 48 deletions

View File

@ -537,11 +537,12 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) {
GetLocalTime(&stLocalTime);
wsprintf(szFileName, L"%s%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp",
szPath, szExeName, updaterVersionStr,
stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond,
GetCurrentProcessId(), GetCurrentThreadId());
wsprintf(
szFileName, L"%s%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp",
szPath, szExeName, updaterVersionStr,
stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond,
GetCurrentProcessId(), GetCurrentThreadId());
return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0);
}
@ -562,7 +563,7 @@ void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) {
DWORD len = GetModuleFileName(GetModuleHandle(0), szPath, maxFileLen);
if (!len) return;
WCHAR *pathEnd = szPath + len;
WCHAR *pathEnd = szPath + len;
if (!_wcsicmp(pathEnd - wcslen(_exeName), _exeName)) {
wsprintf(pathEnd - wcslen(_exeName), L"");

View File

@ -211,7 +211,7 @@ void RenameBox(not_null<Ui::GenericBox*> box) {
return Type::Other;
} else if (const auto browser = detectBrowser()) {
return *browser;
} else if (device.contains("iphone")) {
} else if (device.contains("iphone")) {
return Type::iPhone;
} else if (device.contains("ipad")) {
return Type::iPad;
@ -221,9 +221,9 @@ void RenameBox(not_null<Ui::GenericBox*> box) {
return *desktop;
} else if (platform.contains("android") || system.contains("android")) {
return Type::Android;
} else if (platform.contains("ios") || system.contains("ios")) {
} else if (platform.contains("ios") || system.contains("ios")) {
return Type::iPhone;
}
}
return Type::Other;
}

View File

@ -305,7 +305,7 @@ bool SkipTranslate(TextWithEntities textWithEntities) {
const auto skip = Core::App().settings().skipTranslationLanguages();
return result.known() && ranges::contains(skip, result);
#else
return false;
return false;
#endif
}

View File

@ -64,7 +64,7 @@ private:
// In case this is a problem the ~Gif code should be rewritten.
const not_null<PhotoData*> _owner;
mutable std::unique_ptr<Image> _inlineThumbnail;
std::array<PhotoImage, kPhotoSizeCount> _images;
std::array<PhotoImage, kPhotoSizeCount> _images;
QByteArray _videoBytesSmall;
QByteArray _videoBytesLarge;

View File

@ -151,7 +151,7 @@ private:
Fn<void(QByteArray)> _done;
base::flat_set<int> _requestedOffsets;
int64 _full = 0;
int _nextRequestOffset = 0;
int _nextRequestOffset = 0;
bool _finished = false;
bool _failed = false;

View File

@ -396,7 +396,7 @@ dialogsPremiumIcon: ThreeStateIcon {
historySendingIcon: icon {{ "dialogs/dialogs_sending", historySendingOutIconFg, point(5px, 5px) }};
historySendingInvertedIcon: icon {{ "dialogs/dialogs_sending", historySendingInvertedIconFg, point(5px, 5px) }};
historyViewsSendingIcon: icon {{ "dialogs/dialogs_sending", historySendingInIconFg, point(3px, 0px) }};
historyViewsSendingInvertedIcon: icon {{ "dialogs/dialogs_sending", historySendingInvertedIconFg, point(3px, 0px) }};
historyViewsSendingInvertedIcon: icon {{ "dialogs/dialogs_sending", historySendingInvertedIconFg, point(3px, 0px) }};
dialogsUpdateButton: FlatButton {
color: activeButtonFg;

View File

@ -2968,7 +2968,7 @@ RowDescriptor Widget::resolveChatNext(RowDescriptor from) const {
}
RowDescriptor Widget::resolveChatPrevious(RowDescriptor from) const {
return _inner->resolveChatPrevious(from);
return _inner->resolveChatPrevious(from);
}
void Widget::keyPressEvent(QKeyEvent *e) {

View File

@ -1112,7 +1112,7 @@ auto HtmlWriter::Wrap::pushMessage(
if (data.recurringUsed) {
return "You were charged " + amount + " via recurring payment";
}
auto result = "You have successfully transferred "
auto result = "You have successfully transferred "
+ amount
+ " for "
+ wrapReplyToLink("this invoice");

View File

@ -1078,7 +1078,7 @@ Result JsonWriter::writeFrequentContacts(const Data::ContactsList &data) {
{ "id", Data::NumberToString(Data::PeerToBareId(top.peer.id())) },
{ "category", SerializeString(category) },
{ "type", SerializeString(type) },
{ "name", StringAllowNull(top.peer.name()) },
{ "name", StringAllowNull(top.peer.name()) },
{ "rating", Data::NumberToString(top.rating) },
}));
}

View File

@ -1243,7 +1243,7 @@ void InnerWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
showContextInFolder(lnkDocument);
}, &st::menuIconShowInFolder);
}
_menu->addAction(lnkIsVideo ? tr::lng_context_save_video(tr::now) : (lnkIsVoice ? tr::lng_context_save_audio(tr::now) : (lnkIsAudio ? tr::lng_context_save_audio_file(tr::now) : tr::lng_context_save_file(tr::now))), base::fn_delayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [this, lnkDocument] {
_menu->addAction(lnkIsVideo ? tr::lng_context_save_video(tr::now) : (lnkIsVoice ? tr::lng_context_save_audio(tr::now) : (lnkIsAudio ? tr::lng_context_save_audio_file(tr::now) : tr::lng_context_save_file(tr::now))), base::fn_delayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [this, lnkDocument] {
saveDocumentToFile(lnkDocument);
}), &st::menuIconDownload);
if (lnkDocument->hasAttachedStickers()) {

View File

@ -3919,7 +3919,7 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
lt_from,
fromLinkText(), // Link 1.
lt_user,
Ui::Text::Link(user->name(), 2), // Link 2.
Ui::Text::Link(user->name(), 2), // Link 2.
Ui::Text::WithEntities);
}
return result;

View File

@ -216,7 +216,7 @@ void HistoryMessageForwarded::create(const HistoryMessageVia *via) const {
lt_channel,
Ui::Text::Link(phrase.text, 1), // Link 1.
lt_inline_bot,
Ui::Text::Link('@' + via->bot->username(), 2), // Link 2.
Ui::Text::Link('@' + via->bot->username(), 2), // Link 2.
Ui::Text::WithEntities);
} else {
phrase = tr::lng_forwarded_via(
@ -224,7 +224,7 @@ void HistoryMessageForwarded::create(const HistoryMessageVia *via) const {
lt_user,
Ui::Text::Link(phrase.text, 1), // Link 1.
lt_inline_bot,
Ui::Text::Link('@' + via->bot->username(), 2), // Link 2.
Ui::Text::Link('@' + via->bot->username(), 2), // Link 2.
Ui::Text::WithEntities);
}
} else {

View File

@ -806,7 +806,7 @@ auto Element::contextDependentServiceText() -> TextWithLinks {
return {};
}
const auto from = item->from();
const auto topicUrl = u"internal:url:https://t.me/c/%1/%2"_q
const auto topicUrl = u"internal:url:https://t.me/c/%1/%2"_q
.arg(peerToChannel(peerId).bare)
.arg(topicRootId.bare);
const auto fromLink = [&](int index) {

View File

@ -182,7 +182,7 @@ void KeyboardStyle::paintButtonBg(
const auto &small = sti->msgServiceBgCornersSmall;
const auto &large = sti->msgServiceBgCornersLarge;
auto corners = Ui::CornersPixmaps();
int radiuses[4];
int radiuses[4];
for (auto i = 0; i != 4; ++i) {
const auto isLarge = (rounding[i] == Corner::Large);
corners.p[i] = (isLarge ? large : small).p[i];

View File

@ -942,13 +942,13 @@ void Gif::drawCornerStatus(
const auto statusX = position.x() + st::msgDateImgDelta + padding.x();
const auto statusY = position.y() + st::msgDateImgDelta + padding.y();
const auto around = style::rtlrect(statusX - padding.x(), statusY - padding.y(), statusW, statusH, width());
const auto statusTextTop = statusY + (cornerDownload ? (((statusH - 2 * st::normalFont->height) / 3) - padding.y()) : 0);
const auto statusTextTop = statusY + (cornerDownload ? (((statusH - 2 * st::normalFont->height) / 3) - padding.y()) : 0);
Ui::FillRoundRect(p, around, sti->msgDateImgBg, sti->msgDateImgBgCorners);
p.setFont(st::normalFont);
p.setPen(st->msgDateImgFg());
p.drawTextLeft(statusX + addLeft, statusTextTop, width(), text, statusW - 2 * padding.x());
if (cornerDownload) {
const auto downloadTextTop = statusY + st::normalFont->height + (2 * (statusH - 2 * st::normalFont->height) / 3) - padding.y();
const auto downloadTextTop = statusY + st::normalFont->height + (2 * (statusH - 2 * st::normalFont->height) / 3) - padding.y();
p.drawTextLeft(statusX + addLeft, downloadTextTop, width(), _downloadSize, statusW - 2 * padding.x());
const auto inner = QRect(statusX + padding.y() - padding.x(), statusY, st::historyVideoDownloadSize, st::historyVideoDownloadSize);
const auto &icon = _data->loading()

View File

@ -459,7 +459,7 @@ PointState GroupedMedia::pointState(QPoint point) const {
return PointState::Outside;
}
const auto groupPadding = groupedPadding();
point -= QPoint(0, groupPadding.top());
point -= QPoint(0, groupPadding.top());
for (const auto &part : _parts) {
if (part.geometry.contains(point)) {
return PointState::GroupPart;

View File

@ -662,10 +662,10 @@ QRect Photo::enlargeRect() const {
const auto enlargeInner = st::historyPageEnlargeSize;
const auto enlargeOuter = 2 * skip + enlargeInner;
return {
width() - enlargeOuter + skip,
skip,
enlargeInner,
enlargeInner,
width() - enlargeOuter + skip,
skip,
enlargeInner,
enlargeInner,
};
}

View File

@ -60,7 +60,7 @@ Provider::Provider(not_null<AbstractController*> controller)
_peer->session().changes().storyUpdates(
Data::StoryUpdate::Flag::Destroyed
) | rpl::filter([=](const Data::StoryUpdate &update) {
return update.story->peer() == _peer;
return update.story->peer() == _peer;
}) | rpl::start_with_next([=](const Data::StoryUpdate &update) {
storyRemoved(update.story);
}, _lifetime);

View File

@ -182,7 +182,7 @@ void ClosePlaybackDevice(not_null<Instance*> instance) {
} // namespace
// Thread: Main.
// Thread: Main.
void Start(not_null<Instance*> instance) {
Assert(AudioDevice == nullptr);

View File

@ -180,7 +180,7 @@ struct Worker {
Manager manager;
};
std::vector<std::unique_ptr<Worker>> Workers;
std::vector<std::unique_ptr<Worker>> Workers;
} // namespace

View File

@ -422,7 +422,7 @@ void RecentViews::showMenu() {
const auto added = std::min(int(views.list.size()), kAddPerPage);
const auto add = std::min(views.total, kAddPerPage);
const auto now = QDateTime::currentDateTime();
for (const auto &entry : views.list) {
for (const auto &entry : views.list) {
addMenuRow(entry, now);
if (++count >= add) {
break;

View File

@ -143,7 +143,7 @@ Sibling::LoaderVideo::LoaderVideo(
Fn<void()> update)
: _video(video)
, _origin(origin)
, _update(std::move( update))
, _update(std::move(update))
, _media(_video->createMediaView()) {
_media->goodThumbnailWanted();
}

View File

@ -303,4 +303,4 @@ SystemMediaControlsManager::SystemMediaControlsManager()
SystemMediaControlsManager::~SystemMediaControlsManager() = default;
} // namespace Media
} // namespace Media

View File

@ -48,4 +48,4 @@ private:
rpl::lifetime _lifetime;
};
} // namespace Media
} // namespace Media

View File

@ -317,7 +317,7 @@ void OverlayWidget::RendererGL::paintBackground() {
_contentBuffer->bind();
if (const auto notch = _owner->topNotchSkip()) {
const auto top = transformRect(QRect(0, 0, _owner->width(), notch));
const GLfloat coords[] = {
const GLfloat coords[] = {
top.left(), top.top(),
top.right(), top.top(),
top.right(), top.bottom(),

View File

@ -1509,7 +1509,7 @@ void OverlayWidget::fillContextMenuActions(const MenuCallback &addAction) {
if ((!story || story->canDownloadChecked())
&& _document
&& !_document->filepath(true).isEmpty()) {
const auto text = Platform::IsMac()
const auto text = Platform::IsMac()
? tr::lng_context_show_in_finder(tr::now)
: tr::lng_context_show_in_folder(tr::now);
addAction(

View File

@ -306,9 +306,10 @@ void objc_start() {
_sharedDelegate = [[ApplicationDelegate alloc] init];
[[NSApplication sharedApplication] setDelegate:_sharedDelegate];
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: _sharedDelegate
selector: @selector(receiveWakeNote:)
name: NSWorkspaceDidWakeNotification object: NULL];
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserver: _sharedDelegate
selector: @selector(receiveWakeNote:)
name: NSWorkspaceDidWakeNotification object: NULL];
}
void objc_ignoreApplicationActivationRightNow() {

View File

@ -177,7 +177,7 @@ public:
void updateGeometry(QRect newGeometry, int additionalScroll);
int scrollTillBottom(int forHeight) const;
rpl::producer<int> scrollTillBottomChanges() const;
rpl::producer<int> scrollTillBottomChanges() const;
void setInnerFocus();

View File

@ -172,7 +172,7 @@ EditFlagsDescriptor<PowerSaving::Flags> PowerSavingLabels() {
{ tr::lng_settings_power_emoji(), std::move(emoji) },
{ tr::lng_settings_power_chat(), std::move(chat) },
{ std::nullopt, std::move(calls) },
{ std::nullopt, std::move(animations), },
{ std::nullopt, std::move(animations) },
}, .st = &st::powerSavingButton };
}

View File

@ -36,7 +36,7 @@ enum class SendMediaType {
Secure,
};
using UploadFileParts = QMap<int, QByteArray>;
using UploadFileParts = QMap<int, QByteArray>;
struct SendMediaReady {
SendMediaReady() = default; // temp
SendMediaReady(

View File

@ -2502,7 +2502,7 @@ void Account::writeRecentHashtagsAndBots() {
writeMapQueued();
}
quint32 size = sizeof(quint32) * 3, writeCnt = 0, searchCnt = 0, botsCnt = cRecentInlineBots().size();
for (auto i = write.cbegin(), e = write.cend(); i != e; ++i) {
for (auto i = write.cbegin(), e = write.cend(); i != e; ++i) {
if (!i->first.isEmpty()) {
size += Serialize::stringSize(i->first) + sizeof(quint16);
++writeCnt;

View File

@ -287,7 +287,7 @@ void DownloadBar::paint(Painter &p, QRect clip) {
}
float64 DownloadBar::computeProgress() const {
const auto now = _progress.current();
const auto now = _progress.current();
return now.total ? (now.ready / float64(now.total)) : 0.;
}

View File

@ -381,7 +381,7 @@ void Item::prepareCache() {
paintOnce(
p,
_width * (kWideScale - 1) / 2,
_st.height * (kWideScale - 1) / 2,
_st.height * (kWideScale - 1) / 2,
cacheWidth);
}
_cache = Ui::PixmapFromImage(std::move(data));

View File

@ -109,7 +109,7 @@ public:
}
bool tooltipWindowActive() const override {
return Ui::AppInFocus() && Ui::InFocusChain(window());
return Ui::AppInFocus() && Ui::InFocusChain(window());
}
};