-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74792c2
commit 3843e83
Showing
63 changed files
with
469 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2018 KeePassXC Team <[email protected]> | ||
# Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
# Copyright (C) 2010 Felix Geyer <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
|
@@ -205,6 +205,9 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0") | |
check_pie_supported() | ||
endif() | ||
|
||
# Find Qt5 compatibility library | ||
find_package(Qt6 REQUIRED COMPONENTS Core5Compat) | ||
|
||
# Find Botan early since the version affects subsequent compiler options | ||
find_package(Botan REQUIRED) | ||
if(BOTAN_VERSION VERSION_GREATER_EQUAL "3.0.0") | ||
|
@@ -496,37 +499,22 @@ if(UNIX AND NOT APPLE) | |
if(WITH_XC_X11) | ||
list(APPEND QT_COMPONENTS X11Extras) | ||
endif() | ||
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} DBus REQUIRED) | ||
find_package(Qt6 COMPONENTS ${QT_COMPONENTS} DBus REQUIRED) | ||
elseif(APPLE) | ||
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED HINTS | ||
/usr/local/opt/qt@5/lib/cmake | ||
/usr/local/Cellar/qt@5/*/lib/cmake | ||
/opt/homebrew/opt/qt@5/lib/cmake | ||
ENV PATH) | ||
find_package(Qt5 COMPONENTS MacExtras HINTS | ||
/usr/local/opt/qt@5/lib/cmake | ||
/usr/local/Cellar/qt@5/*/lib/cmake | ||
/opt/homebrew/opt/qt@5/lib/cmake | ||
find_package(Qt6 COMPONENTS ${QT_COMPONENTS} REQUIRED HINTS | ||
/usr/local/opt/qt/lib/cmake | ||
/usr/local/Cellar/qt/*/lib/cmake | ||
/opt/homebrew/opt/qt/lib/cmake | ||
ENV PATH) | ||
else() | ||
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED) | ||
endif() | ||
|
||
if(Qt5Core_VERSION VERSION_LESS "5.9.5") | ||
message(FATAL_ERROR "Qt version 5.9.5 or higher is required") | ||
find_package(Qt6 COMPONENTS ${QT_COMPONENTS} REQUIRED) | ||
endif() | ||
|
||
# CBOR for Passkeys requires Qt 5.12 | ||
if(Qt5Core_VERSION VERSION_LESS "5.12.0") | ||
message(STATUS "Qt version 5.12.0 or higher is required for Passkeys support") | ||
set(WITH_XC_BROWSER_PASSKEYS OFF) | ||
if(Qt6Core_VERSION VERSION_LESS "6.6.0") | ||
message(FATAL_ERROR "Qt version 6.6.0 or higher is required") | ||
endif() | ||
|
||
get_filename_component(Qt5_PREFIX ${Qt5_DIR}/../../.. REALPATH) | ||
if(APPLE) | ||
# Add includes under Qt5 Prefix in case Qt6 is also installed | ||
include_directories(SYSTEM ${Qt5_PREFIX}/include) | ||
endif() | ||
get_filename_component(Qt6_PREFIX ${Qt6_DIR}/../../.. REALPATH) | ||
|
||
# Process moc automatically | ||
set(CMAKE_AUTOMOC ON) | ||
|
@@ -537,18 +525,18 @@ set(CMAKE_AUTORCC ON) | |
|
||
if(APPLE) | ||
set(CMAKE_MACOSX_RPATH TRUE) | ||
find_program(MACDEPLOYQT_EXE macdeployqt HINTS ${Qt5_PREFIX}/bin ${Qt5_PREFIX}/tools/qt5/bin ENV PATH) | ||
find_program(MACDEPLOYQT_EXE macdeployqt6 HINTS ${Qt6_PREFIX}/bin ${Qt6_PREFIX}/tools/qt/bin ENV PATH) | ||
if(NOT MACDEPLOYQT_EXE) | ||
message(FATAL_ERROR "macdeployqt is required to build on macOS") | ||
message(FATAL_ERROR "macdeployqt6 is required to build on macOS") | ||
endif() | ||
message(STATUS "Using macdeployqt: ${MACDEPLOYQT_EXE}") | ||
message(STATUS "Using macdeployqt6: ${MACDEPLOYQT_EXE}") | ||
set(MACDEPLOYQT_EXTRA_BINARIES "") | ||
elseif(WIN32) | ||
find_program(WINDEPLOYQT_EXE windeployqt HINTS ${Qt5_PREFIX}/bin ${Qt5_PREFIX}/tools/qt5/bin ENV PATH) | ||
find_program(WINDEPLOYQT_EXE windeployqt6 HINTS ${Qt6_PREFIX}/bin ${Qt6_PREFIX}/tools/qt/bin ENV PATH) | ||
if(NOT WINDEPLOYQT_EXE) | ||
message(FATAL_ERROR "windeployqt is required to build on Windows") | ||
message(FATAL_ERROR "windeployqt6 is required to build on Windows") | ||
endif() | ||
message(STATUS "Using windeployqt: ${WINDEPLOYQT_EXE}") | ||
message(STATUS "Using windeployq6t: ${WINDEPLOYQT_EXE}") | ||
endif() | ||
|
||
# Debian sets the build type to None for package builds. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2017 KeePassXC Team <[email protected]> | ||
# Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
# Copyright (C) 2014 Felix Geyer <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
|
@@ -20,15 +20,15 @@ list(REMOVE_ITEM TRANSLATION_FILES keepassxc_en.ts) | |
list(REMOVE_ITEM TRANSLATION_FILES ${TRANSLATION_EN_ABS}) | ||
message(STATUS "Including translations...\n") | ||
|
||
qt5_add_translation(QM_FILES ${TRANSLATION_FILES}) | ||
qt6_add_translation(QM_FILES ${TRANSLATION_FILES}) | ||
|
||
if(WIN32) | ||
file(GLOB QTBASE_TRANSLATIONS ${Qt5_PREFIX}/share/qt5/translations/qtbase_*.qm) | ||
file(GLOB QTBASE_TRANSLATIONS ${Qt6_PREFIX}/share/qt/translations/qtbase_*.qm) | ||
elseif(APPLE OR KEEPASSXC_DIST_APPIMAGE) | ||
file(GLOB QTBASE_TRANSLATIONS | ||
/usr/share/qt/translations/qtbase_*.qm | ||
/usr/share/qt5/translations/qtbase_*.qm | ||
${Qt5_PREFIX}/translations/qtbase_*.qm) | ||
${Qt6_PREFIX}/translations/qtbase_*.qm) | ||
endif() | ||
set(QM_FILES ${QM_FILES} ${QTBASE_TRANSLATIONS}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2021 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -18,10 +18,10 @@ | |
#ifndef KPXC_AUTOTYPEMATCH_H | ||
#define KPXC_AUTOTYPEMATCH_H | ||
|
||
#include "core/Entry.h" | ||
#include <QPair> | ||
#include <QPointer> | ||
|
||
class Entry; | ||
typedef QPair<QPointer<Entry>, QString> AutoTypeMatch; | ||
|
||
#endif // KPXC_AUTOTYPEMATCH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2015 David Wu <[email protected]> | ||
* Copyright (C) 2017 KeePassXC Team <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -38,9 +38,9 @@ class CustomSortFilterProxyModel : public QSortFilterProxyModel | |
auto index1 = sourceModel()->index(sourceRow, 1, sourceParent); | ||
auto index2 = sourceModel()->index(sourceRow, 2, sourceParent); | ||
|
||
return sourceModel()->data(index0).toString().contains(filterRegExp()) | ||
|| sourceModel()->data(index1).toString().contains(filterRegExp()) | ||
|| sourceModel()->data(index2).toString().contains(filterRegExp()); | ||
return sourceModel()->data(index0).toString().contains(filterRegularExpression()) | ||
|| sourceModel()->data(index1).toString().contains(filterRegularExpression()) | ||
|| sourceModel()->data(index2).toString().contains(filterRegularExpression()); | ||
} | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2016 Lennart Glauer <[email protected]> | ||
* Copyright (C) 2017 KeePassXC Team <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -23,8 +23,8 @@ | |
#include <QtPlugin> | ||
#include <memory> | ||
|
||
#include "autotype/AutoTypePlatformPlugin.h" | ||
#include "autotype/AutoTypeAction.h" | ||
#include "autotype/AutoTypePlatformPlugin.h" | ||
|
||
class AutoTypePlatformMac : public QObject, public AutoTypePlatformInterface | ||
{ | ||
|
@@ -45,7 +45,7 @@ class AutoTypePlatformMac : public QObject, public AutoTypePlatformInterface | |
bool raiseOwnWindow() override; | ||
|
||
void sendChar(const QChar& ch, bool isKeyDown); | ||
void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers = 0); | ||
void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers = Qt::NoModifier); | ||
|
||
private: | ||
static int windowLayer(CFDictionaryRef window); | ||
|
@@ -65,4 +65,4 @@ class AutoTypeExecutorMac : public AutoTypeExecutor | |
AutoTypePlatformMac* const m_platform; | ||
}; | ||
|
||
#endif // KEEPASSX_AUTOTYPEMAC_H | ||
#endif // KEEPASSX_AUTOTYPEMAC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
set(autotype_test_SOURCES AutoTypeTest.cpp) | ||
|
||
add_library(keepassxc-autotype-test MODULE ${autotype_test_SOURCES}) | ||
target_link_libraries(keepassxc-autotype-test keepassx_core ${autotype_LIB} Qt5::Core Qt5::Widgets) | ||
target_link_libraries(keepassxc-autotype-test keepassx_core ${autotype_LIB} Qt6::Core Qt6::Widgets) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.