aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt18
-rw-r--r--src/pinentry/pinentrydialog.cpp21
2 files changed, 21 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aacb833a..e520a5b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,23 @@
# SPDX-License-Identifier: GPL-3.0-or-later
cmake_minimum_required(VERSION 3.16)
-set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_SOURCE_DIR}/cmake/FlagsOverrides.cmake")
+
+message(STATUS "Current Generator: ${CMAKE_GENERATOR}")
+if(CMAKE_GENERATOR EQUAL "Xcode")
+ SET (CMAKE_C_FLAGS "-Wall -std=c11")
+ SET (CMAKE_C_FLAGS_DEBUG "-g")
+ SET (CMAKE_C_FLAGS_MINSIZERE "-Os -DNDEBUG")
+ SET (CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+
+ SET (CMAKE_CXX_FLAGS "-Wall -std=c++17")
+ SET (CMAKE_CXX_FLAGS_DEBUG "-g")
+ SET (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
+ SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+else()
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_SOURCE_DIR}/cmake/FlagsOverrides.cmake")
+endif()
# define project
project(GpgFrontend
diff --git a/src/pinentry/pinentrydialog.cpp b/src/pinentry/pinentrydialog.cpp
index c823c1f3..0eafeb42 100644
--- a/src/pinentry/pinentrydialog.cpp
+++ b/src/pinentry/pinentrydialog.cpp
@@ -55,34 +55,21 @@
#include "pinlineedit.h"
#include "util.h"
-#ifdef Q_OS_WIN
-#include <windows.h>
-#if QT_VERSION >= 0x050700
-#include <QtPlatformHeaders/QWindowsWindowFunctions>
-#endif
-#endif
-
void raiseWindow(QWidget *w) {
-#ifdef Q_OS_WIN
-#if QT_VERSION >= 0x050700
- QWindowsWindowFunctions::setWindowActivationBehavior(
- QWindowsWindowFunctions::AlwaysActivateWindow);
-#endif
-#endif
w->setWindowState((w->windowState() & ~Qt::WindowMinimized) |
Qt::WindowActive);
w->activateWindow();
w->raise();
}
-QPixmap applicationIconPixmap(const QIcon &overlayIcon) {
+auto applicationIconPixmap(const QIcon &overlayIcon) -> QPixmap {
QPixmap pm = qApp->windowIcon().pixmap(48, 48);
if (!overlayIcon.isNull()) {
QPainter painter(&pm);
- const int emblemSize = 22;
- painter.drawPixmap(pm.width() - emblemSize, 0,
- overlayIcon.pixmap(emblemSize, emblemSize));
+ const int emblem_size = 22;
+ painter.drawPixmap(pm.width() - emblem_size, 0,
+ overlayIcon.pixmap(emblem_size, emblem_size));
}
return pm;