summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2023-01-31 13:00:12 +0100
committerAnne Jan Brouwer <brouwer@annejan.com>2023-01-31 13:00:12 +0100
commit32182959224abd80541f238df2e27119a52810ce (patch)
tree37d4f1ffb1450bb30ed34622d282e3293546832d /main
parent9ce95b92cdc59f3a3703593dd49ae6b603653c25 (diff)
Some automatic fixes
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp
index e31c8a00..ad80a24a 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -41,7 +41,8 @@
* @return
*/
int main(int argc, char *argv[]) {
-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) && \
+ QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
@@ -84,7 +85,8 @@ int main(int argc, char *argv[]) {
// locale = "nl_NL";
// locale = "he_IL";
// locale = "ar_MA";
- if (translator.load(QString(":localization/localization_%1.qm").arg(locale))) {
+ if (translator.load(
+ QString(":localization/localization_%1.qm").arg(locale))) {
SingleApplication::installTranslator(&translator);
SingleApplication::setLayoutDirection(
QObject::tr("LTR") == "RTL" ? Qt::RightToLeft : Qt::LeftToRight);
@@ -104,10 +106,12 @@ int main(int argc, char *argv[]) {
QGuiApplication::setDesktopFileName("qtpass.desktop");
#endif
- //Center the MainWindow on the screen the mouse pointer is currently on
+ // Center the MainWindow on the screen the mouse pointer is currently on
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- static int cursorScreen = app.desktop()->screenNumber(app.desktop()->cursor().pos());
- QPoint cursorScreenCenter = app.desktop()->screenGeometry(cursorScreen).center();
+ static int cursorScreen =
+ app.desktop()->screenNumber(app.desktop()->cursor().pos());
+ QPoint cursorScreenCenter =
+ app.desktop()->screenGeometry(cursorScreen).center();
#else
QScreen *screen = QGuiApplication::screenAt(QCursor::pos());
QPoint cursorScreenCenter = screen->geometry().center();