Skip to content

Update to the latest changes#1

Open
CMGeorge wants to merge 182 commits intoCMGeorge:masterfrom
frankosterfeld:main
Open

Update to the latest changes#1
CMGeorge wants to merge 182 commits intoCMGeorge:masterfrom
frankosterfeld:main

Conversation

@CMGeorge
Copy link
Owner

No description provided.

mmuman and others added 30 commits November 20, 2018 23:00
Generate Qt 5.12.1+ compatible qt_Qt5Keychain.pri
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
Add French translation (untested)
…n1String

Convert QStringLiteral to QLatin1String to keep compatibility with Qt4
- by David Geiger <david.david@mageialinux-online.org>
Update and complete French translation
We had to work around QCoreApplication not creating a BApplication:
When not used in a GUI application, we must create a BApplication object
ourselves as it's required for the API we use.
At least until QCoreApplication is fixed to create one maybe.
The generated cmake config files where not portable.

Before:
set_target_properties(qt5keychain PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreFoundation.framework;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework"
  IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libqt5keychain.0.10.90.dylib"
  IMPORTED_SONAME_RELWITHDEBINFO "/Users/hannah/ownstuff/drone-scripts/macos-64-clang/lib/libqt5keychain.1.dylib"
  )

After:
set_target_properties(qt5keychain PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core;-framework Foundation;-framework Security"
  IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libqt5keychain.0.10.90.dylib"
  IMPORTED_SONAME_RELWITHDEBINFO "/Users/hannah/CraftRoot/lib/libqt5keychain.1.dylib"
  )
We are adding all dependencies to the PUBLIC part of target_link_libraries invocation,
which forces all dependent packages to link against it too through IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE in
$prefix/lib/cmake/Qt5Keychain/Qt5KeychainLibraryDepends-release.cmake.

Since it is implementation detail and not a part of the interface, we need to move it to the PRIVATE section instead:

https://cmake.org/cmake/help/v3.16/command/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents
Not required in other platforms
This change fixes cross building from Linux to Windows when using the
mingw tool chain. Using capital library names breaks the build on Linux
(whereas for Windows it should not matter, as file names are case
insensitive there).
Use files from tag v5.74.0-rc1 of upstream repo.
As I say in #42 (comment) , the result of `qmake -query QT_INSTALL_TRANSLATIONS` is the place where **Qt** stores its translations, not the target directory to install other translations. This commit introduces `QTKEYCHAIN_TRANSLATIONS_DIR` as a CMake cache variable defaulting to a reasonable location inside `${CMAKE_INSTALL_DATADIR}`. `QT_TRANSLATIONS_DIR` is still checked, in case some packager already relies on it. Closes #42. Closes #54.
Nerixyz and others added 30 commits November 16, 2024 23:42
There seems to be a breaking change in how QString::fromUtf8 works in Qt6, and this affects QtKeychain handling on Haiku. If we use QByteArray with an explicit size, it messes with the null termination handling and the application is given a QString with a null terminator, which fails.

But this actually isn't needed at all, letting QByteArray figure out where the password data ends is good enough and lets Qt6 applications work again on Haiku.
Reuse Qt's clang-format rules and apply them to the codebase.
CMake Error at 3rdparty/qtkeychain/autotest/CMakeLists.txt:3 (find_package):
  By not providing "FindQt.cmake" in CMAKE_MODULE_PATH this project has asked [...]

Two problems there:
- QT_MAJOR_VERSION isn't set, so don't rely on it, use BUILD_WITH_QT6
  like the parent CMakeLists.txt
- There's no FindQt, FindQt5 or FindQt6, so add CONFIG so that cmake
  only warns about Qt5Config.cmake/Qt6Config.cmake not found
This fixes the following compiler error with mingw g++
keychain_win.cpp:190:36: error: 'ceil' is not a member of 'std'
Check the environment variable QTKEYCHAIN_BACKEND for a manually
specified backend before trying to automatically guess which backend to
use.
…acOS

Reproduction method: Enter the password when reading or writing
the keychain for the first time. If the input is slow and causes
the read or write timeout, the application will crash.
When just starting up, on a slow system, 500ms may be too little time for KWallet to respond

When this happens we fall back to libsecret, which can result in the right secrets not being available

Instead use the default Qt DBus timeout (25s)

If KWallet is not available the call will fail fast

Fixes #242
display user@domain if a non empty user is given.
This makes it easier to find an entry in e.g. seahorse as the display
name is the one that is listed first.
To improve test coverage write multiple keys for a service key.
This way it can be tested if multiple keys are actually working without
overwriting each other.
From the job description both, service name and key can be empty
strings. Since in that case there is no way to identify more than one
entry assume this is invalid and return an error
Add tests that utilize an empty service key as is allowed by the API
description
…ly (#289)

* Refactor keychainclass.h to use dynamic job creation

Commented out persistent member variables for credential jobs.

* Refactor KeyChainClass to use local credential jobs

Refactor KeyChainClass to use local job instances for reading, writing, and deleting keys. Removed unused member jobs and added auto-delete functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.