From bb99b77b25d9f4f55cc0eb1050188478213c58e5 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 13 Nov 2014 19:28:44 -0700 Subject: Add Haiku support diff --git a/CMakeLists.txt b/CMakeLists.txt index 35642eb..73763a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,7 @@ if(WITH_TESTS) endif(WITH_TESTS) set(QT_REQUIRED_MODULES QtCore QtGui QtTest) -if(UNIX AND NOT APPLE) +if(UNIX AND NOT APPLE AND NOT HAIKU) set(QT_REQUIRED_MODULES ${QT_REQUIRED_MODULES} QtDBus) endif() diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 7069c6c..cef431e 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -17,7 +17,7 @@ file(GLOB DATABASE_ICONS icons/database/*.png) install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database) -if(UNIX AND NOT APPLE) +if(UNIX AND NOT APPLE AND NOT HAIKU) install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor FILES_MATCHING PATTERN "keepassx.png" PATTERN "keepassx.svgz") install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor diff --git a/src/config-keepassx.h.cmake b/src/config-keepassx.h.cmake index 9a3f495..e4efe17 100644 --- a/src/config-keepassx.h.cmake +++ b/src/config-keepassx.h.cmake @@ -9,6 +9,8 @@ #define KEEPASSX_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}" +#define KEEPASSX_DATA_DIR "${DATA_INSTALL_DIR}" + #cmakedefine HAVE_PR_SET_DUMPABLE 1 #cmakedefine HAVE_RLIMIT_CORE 1 #cmakedefine HAVE_PT_DENY_ATTACH 1 diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp index 52db1ed..8688ea9 100644 --- a/src/core/FilePath.cpp +++ b/src/core/FilePath.cpp @@ -182,6 +182,10 @@ FilePath::FilePath() else if (testSetDir(QCoreApplication::applicationDirPath() + "/share")) { } #endif +#ifdef KEEPASSX_DATA_DIR + else if (testSetDir(QString(KEEPASSX_DATA_DIR))) { + } +#endif if (m_dataPath.isEmpty()) { qWarning("FilePath::DataPath: can't find data dir"); diff --git a/src/gui/Clipboard.cpp b/src/gui/Clipboard.cpp index eb77d2b..958eacb 100644 --- a/src/gui/Clipboard.cpp +++ b/src/gui/Clipboard.cpp @@ -21,7 +21,7 @@ #include #include -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU) #include #include #endif @@ -70,7 +70,7 @@ void Clipboard::clearClipboard() clipboard->clear(QClipboard::Selection); } -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU) QDBusMessage message = QDBusMessage::createMethodCall("org.kde.klipper", "/klipper", "", "clearClipboardHistory"); QDBusConnection::sessionBus().send(message); #endif -- 2.13.1 From c893391972f22f6440f95b465c9b38a91b96d92e Mon Sep 17 00:00:00 2001 From: Chris Moore Date: Wed, 2 Aug 2017 15:25:01 +0100 Subject: Remove stack protector flag diff --git a/CMakeLists.txt b/CMakeLists.txt index 73763a0..da86a83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ endmacro(add_gcc_compiler_flags) add_definitions(-DQT_NO_KEYWORDS -DQT_NO_EXCEPTIONS -DQT_NO_STL -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII) -add_gcc_compiler_flags("-fno-common -fstack-protector --param=ssp-buffer-size=4") +add_gcc_compiler_flags("-fno-common --param=ssp-buffer-size=4") add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long") add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute") add_gcc_compiler_flags("-fvisibility=hidden") -- 2.13.1