2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

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

@@ -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();
}