Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2017-05-17 11:55:42 +0300
committerckamm <mail@ckamm.de>2017-05-17 13:26:27 +0300
commitc8d0f788e00bdae125a26d9159ce9efdd6325cd2 (patch)
treead77cb515fe650984e6b76dfffe09838090d77bd /src/gui/main.cpp
parentae263d60bd6d1bc0eb0c3712bab11de120b8cdd3 (diff)
Apply clang-format
Diffstat (limited to 'src/gui/main.cpp')
-rw-r--r--src/gui/main.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index f846f6ae3..8f77b50bc 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -36,11 +36,11 @@ using namespace OCC;
void warnSystray()
{
QMessageBox::critical(0, qApp->translate("main.cpp", "System Tray not available"),
- qApp->translate("main.cpp", "%1 requires on a working system tray. "
- "If you are running XFCE, please follow "
- "<a href=\"http://docs.xfce.org/xfce/xfce4-panel/systray\">these instructions</a>. "
- "Otherwise, please install a system tray application such as 'trayer' and try again.")
- .arg(Theme::instance()->appNameGUI()));
+ qApp->translate("main.cpp", "%1 requires on a working system tray. "
+ "If you are running XFCE, please follow "
+ "<a href=\"http://docs.xfce.org/xfce/xfce4-panel/systray\">these instructions</a>. "
+ "Otherwise, please install a system tray application such as 'trayer' and try again.")
+ .arg(Theme::instance()->appNameGUI()));
}
int main(int argc, char **argv)
@@ -48,14 +48,14 @@ int main(int argc, char **argv)
Q_INIT_RESOURCE(client);
#ifdef Q_OS_WIN
- // If the font size ratio is set on Windows, we need to
- // enable the auto pixelRatio in Qt since we don't
- // want to use sizes relative to the font size everywhere.
- // This is automatic on OS X, but opt-in on Windows and Linux
- // https://doc-snapshots.qt.io/qt5-5.6/highdpi.html#qt-support
- // We do not define it on linux so the behaviour is kept the same
- // as other Qt apps in the desktop environment. (which may or may
- // not set this envoronment variable)
+// If the font size ratio is set on Windows, we need to
+// enable the auto pixelRatio in Qt since we don't
+// want to use sizes relative to the font size everywhere.
+// This is automatic on OS X, but opt-in on Windows and Linux
+// https://doc-snapshots.qt.io/qt5-5.6/highdpi.html#qt-support
+// We do not define it on linux so the behaviour is kept the same
+// as other Qt apps in the desktop environment. (which may or may
+// not set this envoronment variable)
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#else
@@ -81,18 +81,18 @@ int main(int argc, char **argv)
#ifndef Q_OS_WIN
signal(SIGPIPE, SIG_IGN);
#endif
- if( app.giveHelp() ) {
+ if (app.giveHelp()) {
app.showHelp();
return 0;
}
- if( app.versionOnly() ) {
+ if (app.versionOnly()) {
app.showVersion();
return 0;
}
- // check a environment variable for core dumps
+// check a environment variable for core dumps
#ifdef Q_OS_UNIX
- if( !qgetenv("OWNCLOUD_CORE_DUMP").isEmpty() ) {
+ if (!qgetenv("OWNCLOUD_CORE_DUMP").isEmpty()) {
struct rlimit core_limit;
core_limit.rlim_cur = RLIM_INFINITY;
core_limit.rlim_max = RLIM_INFINITY;
@@ -108,12 +108,12 @@ int main(int argc, char **argv)
// needs to terminate here, e.g. because
// the updater is triggered
Updater *updater = Updater::instance();
- if ( updater && updater->handleStartup()) {
+ if (updater && updater->handleStartup()) {
return true;
}
// if the application is already running, notify it.
- if(app.isRunning()) {
+ if (app.isRunning()) {
qCInfo(lcApplication) << "Already running, exiting...";
if (app.isSessionRestored()) {
// This call is mirrored with the one in Application::slotParseMessage
@@ -124,18 +124,18 @@ int main(int argc, char **argv)
QStringList args = app.arguments();
if (args.size() > 1) {
QString msg = args.join(QLatin1String("|"));
- if(!app.sendMessage(QLatin1String("MSG_PARSEOPTIONS:") + msg))
+ if (!app.sendMessage(QLatin1String("MSG_PARSEOPTIONS:") + msg))
return -1;
}
- if(!app.sendMessage(QLatin1String("MSG_SHOWSETTINGS"))) {
+ if (!app.sendMessage(QLatin1String("MSG_SHOWSETTINGS"))) {
return -1;
}
return 0;
}
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
if (qgetenv("QT_QPA_PLATFORMTHEME") != "appmenu-qt5")
- // We can't call isSystemTrayAvailable with appmenu-qt5 begause it hides the systemtray
- // (issue #4693)
+// We can't call isSystemTrayAvailable with appmenu-qt5 begause it hides the systemtray
+// (issue #4693)
#endif
{
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
@@ -153,7 +153,8 @@ int main(int argc, char **argv)
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
Utility::sleep(1);
attempts++;
- if (attempts < 30) continue;
+ if (attempts < 30)
+ continue;
} else {
break;
}
@@ -168,4 +169,3 @@ int main(int argc, char **argv)
return app.exec();
}
-