Fix whitespace and indentation errors.

See #6672, thanks Sea-n.
This commit is contained in:
John Preston 2020-01-02 14:25:52 +03:00
parent 74733275d8
commit 4eeac7dc18
25 changed files with 148 additions and 146 deletions

View File

@ -53,10 +53,10 @@ void RemoveQuarantineAttribute(NSString *path) {
}
void RemoveQuarantineFromBundle(NSString *path) {
RemoveQuarantineAttribute(path);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Telegram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
RemoveQuarantineAttribute(path);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Telegram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
}
void delFolder() {

View File

@ -316,12 +316,12 @@ namespace App {
}
QImage readImage(QByteArray data, QByteArray *format, bool opaque, bool *animated) {
QByteArray tmpFormat;
QByteArray tmpFormat;
QImage result;
QBuffer buffer(&data);
if (!format) {
format = &tmpFormat;
}
if (!format) {
format = &tmpFormat;
}
{
QImageReader reader(&buffer, *format);
#ifndef OS_MAC_OLD

View File

@ -268,25 +268,25 @@ LastCrashedWindow::LastCrashedWindow(
}
if (_minidumpFull.isEmpty()) {
QString maxDump, maxDumpFull;
QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified();
QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified();
QFileInfoList list = QDir(dumpspath).entryInfoList();
for (int32 i = 0, l = list.size(); i < l; ++i) {
QString name = list.at(i).fileName();
if (name.endsWith(qstr(".dmp"))) {
QDateTime modified = list.at(i).lastModified();
if (maxDump.isEmpty() || qAbs(workingModified.secsTo(modified)) < qAbs(workingModified.secsTo(maxDumpModified))) {
maxDump = name;
maxDumpModified = modified;
maxDumpFull = list.at(i).absoluteFilePath();
dumpsize = list.at(i).size();
}
}
}
if (!maxDump.isEmpty() && qAbs(workingModified.secsTo(maxDumpModified)) < 10) {
_minidumpName = maxDump;
_minidumpFull = maxDumpFull;
}
}
for (int32 i = 0, l = list.size(); i < l; ++i) {
QString name = list.at(i).fileName();
if (name.endsWith(qstr(".dmp"))) {
QDateTime modified = list.at(i).lastModified();
if (maxDump.isEmpty() || qAbs(workingModified.secsTo(modified)) < qAbs(workingModified.secsTo(maxDumpModified))) {
maxDump = name;
maxDumpModified = modified;
maxDumpFull = list.at(i).absoluteFilePath();
dumpsize = list.at(i).size();
}
}
}
if (!maxDump.isEmpty() && qAbs(workingModified.secsTo(maxDumpModified)) < 10) {
_minidumpName = maxDump;
_minidumpFull = maxDumpFull;
}
}
if (_minidumpName.isEmpty()) { // currently don't accept crash reports without dumps from google libraries
_sendingState = SendingNoReport;
} else {

View File

@ -241,7 +241,7 @@ public:
protected:
void resizeEvent(QResizeEvent *e);
void closeEvent(QCloseEvent *e);
void closeEvent(QCloseEvent *e);
private:
PreLaunchLog _log;

View File

@ -201,13 +201,13 @@ void SignalHandler(int signum) {
if (name) {
dump() << "Caught signal " << signum << " (" << name << ") in thread " << uint64(thread) << "\n";
} else if (signum == -1) {
dump() << "Google Breakpad caught a crash, minidump written in thread " << uint64(thread) << "\n";
if (BreakpadDumpPath) {
dump() << "Minidump: " << BreakpadDumpPath << "\n";
} else if (BreakpadDumpPathW) {
dump() << "Minidump: " << BreakpadDumpPathW << "\n";
}
} else {
dump() << "Google Breakpad caught a crash, minidump written in thread " << uint64(thread) << "\n";
if (BreakpadDumpPath) {
dump() << "Minidump: " << BreakpadDumpPath << "\n";
} else if (BreakpadDumpPathW) {
dump() << "Minidump: " << BreakpadDumpPathW << "\n";
}
} else {
dump() << "Caught signal " << signum << " in thread " << uint64(thread) << "\n";
}
@ -246,18 +246,18 @@ void SignalHandler(int signum) {
#endif
}
void *addresses[132] = { 0 };
void *addresses[132] = { 0 };
size_t size = backtrace(addresses, 128);
/* overwrite sigaction with caller's address */
if (caller) {
for (int i = size; i > 1; --i) {
addresses[i + 3] = addresses[i];
}
addresses[2] = (void*)0x1;
addresses[3] = caller;
addresses[4] = (void*)0x1;
}
if (caller) {
for (int i = size; i > 1; --i) {
addresses[i + 3] = addresses[i];
}
addresses[2] = (void*)0x1;
addresses[3] = caller;
addresses[4] = (void*)0x1;
}
#ifdef Q_OS_MAC
dump() << "\nBase image addresses:\n";
@ -302,14 +302,14 @@ bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context,
CrashLogged = true;
#ifdef Q_OS_WIN
BreakpadDumpPathW = _minidump_id;
BreakpadDumpPathW = _minidump_id;
SignalHandler(-1);
#else // Q_OS_WIN
#ifdef Q_OS_MAC
BreakpadDumpPath = _minidump_id;
BreakpadDumpPath = _minidump_id;
#else // Q_OS_MAC
BreakpadDumpPath = md.path();
BreakpadDumpPath = md.path();
#endif // else for Q_OS_MAC
SignalHandler(-1, 0, 0);
#endif // else for Q_OS_WIN
@ -382,12 +382,13 @@ void StartCatching(not_null<Core::Launcher*> launcher) {
crashpad::CrashpadClient crashpad_client;
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData();
std::string database = QFile::encodeName(dumpspath).constData();
if (crashpad_client.StartHandler(base::FilePath(handler),
base::FilePath(database),
std::string(),
ProcessAnnotations,
std::vector<std::string>(),
false)) {
if (crashpad_client.StartHandler(
base::FilePath(handler),
base::FilePath(database),
std::string(),
ProcessAnnotations,
std::vector<std::string>(),
false)) {
crashpad_client.UseHandler();
}
#endif // else for MAC_USE_BREAKPAD
@ -580,20 +581,20 @@ const dump &operator<<(const dump &stream, const char *str) {
}
const dump &operator<<(const dump &stream, const wchar_t *str) {
if (!ReportFile) return stream;
if (!ReportFile) return stream;
for (int i = 0, l = wcslen(str); i < l; ++i) {
if (
for (int i = 0, l = wcslen(str); i < l; ++i) {
if (
#if !defined(__WCHAR_UNSIGNED__)
str[i] >= 0 &&
str[i] >= 0 &&
#endif
str[i] < 128) {
str[i] < 128) {
SafeWriteChar(char(str[i]));
} else {
} else {
SafeWriteChar('?');
}
}
return stream;
}
}
return stream;
}
const dump &operator<<(const dump &stream, int num) {

View File

@ -65,7 +65,7 @@ private:
const QString &text,
Types types,
const QString &about);
void addChatOption(
void addChatOption(
not_null<Ui::VerticalLayout*> container,
const QString &text,
Types types);

View File

@ -116,7 +116,7 @@ public:
void leaveToChildEvent(QEvent *e, QWidget *child) override;
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dropEvent(QDropEvent *e) override;
void dropEvent(QDropEvent *e) override;
bool isItemCompletelyHidden(HistoryItem *item) const;
void updateTopBarSelection();

View File

@ -96,7 +96,7 @@ int32 documentColorIndex(DocumentData *document, QString &ext) {
? document->mimeString().toLower()
: QString();
if (name.endsWith(qstr(".doc")) ||
name.endsWith(qstr(".docx")) ||
name.endsWith(qstr(".docx")) ||
name.endsWith(qstr(".txt")) ||
name.endsWith(qstr(".psd")) ||
mime.startsWith(qstr("text/"))) {

View File

@ -3492,7 +3492,7 @@ void MainWidget::activate() {
if (!_mainSection) {
if (_hider) {
_dialogs->setInnerFocus();
} else if (App::wnd() && !Ui::isLayerShown()) {
} else if (App::wnd() && !Ui::isLayerShown()) {
if (!cSendPaths().isEmpty()) {
const auto interpret = qstr("interpret://");
const auto path = cSendPaths()[0];

View File

@ -558,7 +558,7 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
}
void MainWindow::updateTrayMenu(bool force) {
if (!trayIconMenu || (Platform::IsWindows() && !force)) return;
if (!trayIconMenu || (Platform::IsWindows() && !force)) return;
auto iconMenu = trayIconMenu;
auto actions = iconMenu->actions();
@ -589,12 +589,12 @@ void MainWindow::updateTrayMenu(bool force) {
notificationAction->setText(notificationActionText);
#ifndef Q_OS_WIN
if (trayIcon && trayIcon->contextMenu() != iconMenu) {
if (trayIcon && trayIcon->contextMenu() != iconMenu) {
trayIcon->setContextMenu(iconMenu);
}
}
#endif // !Q_OS_WIN
psTrayMenuUpdated();
psTrayMenuUpdated();
}
void MainWindow::onShowAddContact() {
@ -694,7 +694,7 @@ void MainWindow::showFromTray(QSystemTrayIcon::ActivationReason reason) {
updateTrayMenu();
updateGlobalMenu();
});
activate();
activate();
Notify::unreadCounterUpdated();
}
}

View File

@ -96,7 +96,7 @@ class RPCDoneHandlerBare : public RPCAbstractDoneHandler { // done(from, end)
using CallbackType = bool (*)(const mtpPrime *, const mtpPrime *);
public:
RPCDoneHandlerBare(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerBare(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return (*_onDone)(from, end);
@ -111,7 +111,7 @@ class RPCDoneHandlerBareReq : public RPCAbstractDoneHandler { // done(from, end,
using CallbackType = bool (*)(const mtpPrime *, const mtpPrime *, mtpRequestId);
public:
RPCDoneHandlerBareReq(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerBareReq(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return (*_onDone)(from, end, requestId);
@ -127,7 +127,7 @@ class RPCDoneHandlerPlain : public RPCAbstractDoneHandler { // done(result)
using CallbackType = TReturn (*)(const TResponse &);
public:
RPCDoneHandlerPlain(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerPlain(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -148,7 +148,7 @@ class RPCDoneHandlerReq : public RPCAbstractDoneHandler { // done(result, req_id
using CallbackType = TReturn (*)(const TResponse &, mtpRequestId);
public:
RPCDoneHandlerReq(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerReq(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -169,7 +169,7 @@ class RPCDoneHandlerNo : public RPCAbstractDoneHandler { // done()
using CallbackType = TReturn (*)();
public:
RPCDoneHandlerNo(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerNo(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
(*_onDone)();
@ -186,7 +186,7 @@ class RPCDoneHandlerNoReq : public RPCAbstractDoneHandler { // done(req_id)
using CallbackType = TReturn (*)(mtpRequestId);
public:
RPCDoneHandlerNoReq(CallbackType onDone) : _onDone(onDone) {
RPCDoneHandlerNoReq(CallbackType onDone) : _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
(*_onDone)(requestId);
@ -346,7 +346,7 @@ class RPCDoneHandlerBareOwned : public RPCOwnedDoneHandler { // done(from, end)
using CallbackType = bool (TReceiver::*)(const mtpPrime *, const mtpPrime *);
public:
RPCDoneHandlerBareOwned(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerBareOwned(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return _owner
@ -364,7 +364,7 @@ class RPCDoneHandlerBareOwnedReq : public RPCOwnedDoneHandler { // done(from, en
using CallbackType = bool (TReceiver::*)(const mtpPrime *, const mtpPrime *, mtpRequestId);
public:
RPCDoneHandlerBareOwnedReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerBareOwnedReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return _owner
@ -382,7 +382,7 @@ class RPCDoneHandlerOwned : public RPCOwnedDoneHandler { // done(result)
using CallbackType = TReturn (TReceiver::*)(const TResponse &);
public:
RPCDoneHandlerOwned(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerOwned(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -405,7 +405,7 @@ class RPCDoneHandlerOwnedReq : public RPCOwnedDoneHandler { // done(result, req_
using CallbackType = TReturn (TReceiver::*)(const TResponse &, mtpRequestId);
public:
RPCDoneHandlerOwnedReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerOwnedReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -428,7 +428,7 @@ class RPCDoneHandlerOwnedNo : public RPCOwnedDoneHandler { // done()
using CallbackType = TReturn (TReceiver::*)();
public:
RPCDoneHandlerOwnedNo(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerOwnedNo(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
if (_owner) (static_cast<TReceiver*>(_owner)->*_onDone)();
@ -445,7 +445,7 @@ class RPCDoneHandlerOwnedNoReq : public RPCOwnedDoneHandler { // done(req_id)
using CallbackType = TReturn (TReceiver::*)(mtpRequestId);
public:
RPCDoneHandlerOwnedNoReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
RPCDoneHandlerOwnedNoReq(TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
if (_owner) (static_cast<TReceiver*>(_owner)->*_onDone)(requestId);
@ -462,7 +462,7 @@ class RPCBindedDoneHandlerBareOwned : public RPCOwnedDoneHandler { // done(b, fr
using CallbackType = bool (TReceiver::*)(T, const mtpPrime *, const mtpPrime *);
public:
RPCBindedDoneHandlerBareOwned(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
RPCBindedDoneHandlerBareOwned(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return _owner
@ -481,7 +481,7 @@ class RPCBindedDoneHandlerBareOwnedReq : public RPCOwnedDoneHandler { // done(b,
using CallbackType = bool (TReceiver::*)(T, const mtpPrime *, const mtpPrime *, mtpRequestId);
public:
RPCBindedDoneHandlerBareOwnedReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
RPCBindedDoneHandlerBareOwnedReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
return _owner
@ -500,7 +500,7 @@ class RPCBindedDoneHandlerOwned : public RPCOwnedDoneHandler { // done(b, result
using CallbackType = TReturn (TReceiver::*)(T, const TResponse &);
public:
RPCBindedDoneHandlerOwned(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone), _b(b) {
RPCBindedDoneHandlerOwned(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone), _b(b) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -524,7 +524,7 @@ class RPCBindedDoneHandlerOwnedReq : public RPCOwnedDoneHandler { // done(b, res
using CallbackType = TReturn (TReceiver::*)(T, const TResponse &, mtpRequestId);
public:
RPCBindedDoneHandlerOwnedReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone), _b(b) {
RPCBindedDoneHandlerOwnedReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _onDone(onDone), _b(b) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
auto response = TResponse();
@ -548,7 +548,7 @@ class RPCBindedDoneHandlerOwnedNo : public RPCOwnedDoneHandler { // done(b)
using CallbackType = TReturn (TReceiver::*)(T);
public:
RPCBindedDoneHandlerOwnedNo(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
RPCBindedDoneHandlerOwnedNo(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
if (_owner) (static_cast<TReceiver*>(_owner)->*_onDone)(_b);
@ -566,7 +566,7 @@ class RPCBindedDoneHandlerOwnedNoReq : public RPCOwnedDoneHandler { // done(b, r
using CallbackType = TReturn (TReceiver::*)(T, mtpRequestId);
public:
RPCBindedDoneHandlerOwnedNoReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
RPCBindedDoneHandlerOwnedNoReq(T b, TReceiver *receiver, CallbackType onDone) : RPCOwnedDoneHandler(receiver), _b(b), _onDone(onDone) {
}
bool operator()(mtpRequestId requestId, const mtpPrime *from, const mtpPrime *end) override {
if (_owner) (static_cast<TReceiver*>(_owner)->*_onDone)(_b, requestId);

View File

@ -17,19 +17,19 @@ namespace Libs {
namespace {
bool loadLibrary(QLibrary &lib, const char *name, int version) {
DEBUG_LOG(("Loading '%1' with version %2...").arg(QLatin1String(name)).arg(version));
lib.setFileNameAndVersion(QLatin1String(name), version);
if (lib.load()) {
DEBUG_LOG(("Loaded '%1' with version %2!").arg(QLatin1String(name)).arg(version));
return true;
}
lib.setFileNameAndVersion(QLatin1String(name), QString());
if (lib.load()) {
DEBUG_LOG(("Loaded '%1' without version!").arg(QLatin1String(name)));
return true;
}
LOG(("Could not load '%1' with version %2 :(").arg(QLatin1String(name)).arg(version));
return false;
DEBUG_LOG(("Loading '%1' with version %2...").arg(QLatin1String(name)).arg(version));
lib.setFileNameAndVersion(QLatin1String(name), version);
if (lib.load()) {
DEBUG_LOG(("Loaded '%1' with version %2!").arg(QLatin1String(name)).arg(version));
return true;
}
lib.setFileNameAndVersion(QLatin1String(name), QString());
if (lib.load()) {
DEBUG_LOG(("Loaded '%1' without version!").arg(QLatin1String(name)));
return true;
}
LOG(("Could not load '%1' with version %2 :(").arg(QLatin1String(name)).arg(version));
return false;
}
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION

View File

@ -258,7 +258,7 @@ inline bool g_type_cit_helper(Object *instance, GType iface_type) {
if (ginstance->g_class && ginstance->g_class->g_type == iface_type) {
return true;
}
return g_type_check_instance_is_a(ginstance, iface_type);
return g_type_check_instance_is_a(ginstance, iface_type);
}
typedef gint (*f_gtk_dialog_run)(GtkDialog *dialog);

View File

@ -188,12 +188,12 @@ static gboolean _trayIconCheck(gpointer/* pIn*/) {
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
quint32 djbStringHash(QString string) {
quint32 hash = 5381;
QByteArray chars = string.toLatin1();
for(int i = 0; i < chars.length(); i++){
hash = (hash << 5) + hash + chars[i];
}
return hash;
quint32 hash = 5381;
QByteArray chars = string.toLatin1();
for(int i = 0; i < chars.length(); i++){
hash = (hash << 5) + hash + chars[i];
}
return hash;
}
} // namespace
@ -556,7 +556,7 @@ void MainWindow::psFirstShow() {
"telegramdesktop.desktop",
"Telegram.desktop"
};
for (auto it = possibleDesktopFiles.begin(); it != possibleDesktopFiles.end(); it++) {
if (!QStandardPaths::locate(QStandardPaths::ApplicationsLocation, *it).isEmpty()) {
_desktopFile = *it;

View File

@ -39,13 +39,13 @@ using Platform::File::internal::EscapeShell;
namespace {
bool RunShellCommand(const QByteArray &command) {
auto result = system(command.constData());
if (result) {
DEBUG_LOG(("App Error: command failed, code: %1, command (in utf8): %2").arg(result).arg(command.constData()));
return false;
}
DEBUG_LOG(("App Info: command succeeded, command (in utf8): %1").arg(command.constData()));
return true;
auto result = system(command.constData());
if (result) {
DEBUG_LOG(("App Error: command failed, code: %1, command (in utf8): %2").arg(result).arg(command.constData()));
return false;
}
DEBUG_LOG(("App Info: command succeeded, command (in utf8): %1").arg(command.constData()));
return true;
}
void FallbackFontConfig() {

View File

@ -32,10 +32,10 @@ inline void IgnoreApplicationActivationRightNow() {
} // namespace Platform
inline QString psServerPrefix() {
return qsl("/tmp/");
return qsl("/tmp/");
}
inline void psCheckLocalSocket(const QString &serverName) {
QFile address(serverName);
QFile address(serverName);
if (address.exists()) {
address.remove();
}

View File

@ -1163,7 +1163,7 @@ void AppendEmojiPacks(std::vector<PickerScrubberItem> &to) {
return item;
} else if (isType(kTypeScrubber)) {
const auto isSticker = ([dictionaryItem[@"cmd"] intValue]
== kCommandScrubberStickers);
== kCommandScrubberStickers);
const auto type = isSticker
? ScrubberItemType::Sticker
: ScrubberItemType::Emoji;

View File

@ -33,13 +33,13 @@ inline void finish() {
inline QString psServerPrefix() {
#ifndef OS_MAC_STORE
return qsl("/tmp/");
return qsl("/tmp/");
#else // OS_MAC_STORE
return objc_documentsPath();
#endif // OS_MAC_STORE
}
inline void psCheckLocalSocket(const QString &serverName) {
QFile address(serverName);
QFile address(serverName);
if (address.exists()) {
address.remove();
}

View File

@ -58,9 +58,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#endif
#ifndef WM_NCPOINTERUPDATE
#define WM_NCPOINTERUPDATE 0x0241
#define WM_NCPOINTERDOWN 0x0242
#define WM_NCPOINTERUP 0x0243
#define WM_NCPOINTERUPDATE 0x0241
#define WM_NCPOINTERDOWN 0x0242
#define WM_NCPOINTERUP 0x0243
#endif
using namespace Microsoft::WRL;
@ -70,22 +70,23 @@ using namespace Windows::Foundation;
using namespace Platform;
namespace {
QStringList _initLogs;
bool themeInited = false;
bool finished = true;
QMargins simpleMargins, margins;
HICON bigIcon = 0, smallIcon = 0, overlayIcon = 0;
QStringList _initLogs;
class _PsInitializer {
public:
_PsInitializer() {
Dlls::start();
}
};
_PsInitializer _psInitializer;
bool themeInited = false;
bool finished = true;
QMargins simpleMargins, margins;
HICON bigIcon = 0, smallIcon = 0, overlayIcon = 0;
class _PsInitializer {
public:
_PsInitializer() {
Dlls::start();
}
};
_PsInitializer _psInitializer;
} // namespace
void psDeleteDir(const QString &dir) {
std::wstring wDir = QDir::toNativeSeparators(dir).toStdWString();
@ -131,11 +132,11 @@ namespace {
}
QStringList psInitLogs() {
return _initLogs;
return _initLogs;
}
void psClearInitLogs() {
_initLogs = QStringList();
_initLogs = QStringList();
}
void psActivateProcess(uint64 pid) {

View File

@ -197,12 +197,12 @@ autoDownloadLimitButton: SettingsButton(settingsButton) {
padding: margins(22px, 10px, 22px, 0px);
}
settingsAudioVolumeSlider: MediaSlider(defaultContinuousSlider) {
seekSize: size(15px, 15px);
seekSize: size(15px, 15px);
}
settingsAudioVolumeSliderPadding: margins(23px, 5px, 20px, 10px);
settingsAudioVolumeLabel: LabelSimple(defaultLabelSimple) {
font: boxTextFont;
textFg: windowBoldFg;
font: boxTextFont;
textFg: windowBoldFg;
}
settingsAudioVolumeLabelPadding: margins(22px, 11px, 22px, 11px);
settingsLevelMeterPadding: margins(23px, 10px, 20px, 10px);

@ -1 +1 @@
Subproject commit ee55a0b69f65622fe25487745e5537ebcffd8372
Subproject commit d14ae77ad5ed27ca6ddbc9579c0c5e0afa18ffca

@ -1 +1 @@
Subproject commit 78690f858fc48b1bc824fd52a7d90a1080b0610e
Subproject commit baae6cdd9ba5216732222e7dec9a76b9ea3a7c83

@ -1 +1 @@
Subproject commit bd850834fc9ba6c62784306b65506ab19d64ab89
Subproject commit 2888aabf28bf9ca89f3d6d67a523bc5f2ce802ce

@ -1 +1 @@
Subproject commit 765e525458843ffb893586441b885ac5ba143e51
Subproject commit d30d361609d4b76d3a55b1329642caee30b82264

2
cmake

@ -1 +1 @@
Subproject commit 449066752048a9b5e64f8b9bbad7af8b0e53e8b2
Subproject commit b087501d66ea13395acd91397b3ab6a3a77c41b8