mirror of
https://github.com/QRouland/UTPass.git
synced 2025-07-02 10:12:28 +00:00
Setup git libs for Pass plugin
This commit is contained in:
@ -20,7 +20,13 @@ Git::~Git() {
|
||||
git_libgit2_shutdown();
|
||||
}
|
||||
|
||||
bool Git::clone(QString url)
|
||||
{
|
||||
return false;
|
||||
bool Git::clone(QString url, QString path) {
|
||||
git_repository *repo = NULL;
|
||||
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
|
||||
|
||||
int ret = git_clone(&repo, url.toLocal8Bit().data(), path.toLocal8Bit().data(), &opts);
|
||||
if (repo) {
|
||||
git_repository_free(repo);
|
||||
}
|
||||
return ret == 0; // TODO better error handling to return specifics errors for the ui
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
Git(Git const &) = delete;
|
||||
void operator=(Git const &) = delete;
|
||||
|
||||
bool clone(QString url);
|
||||
bool clone(QString url, QString path);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -70,5 +70,5 @@ QString Pass::getPasswordStore()
|
||||
bool Pass::gitClone(QString url)
|
||||
{
|
||||
qInfo() << "Cloning . password_store from " << url;
|
||||
return Git::instance()->clone(url);
|
||||
return Git::instance()->clone(url, m_password_store);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <QEventLoop>
|
||||
#include <QSemaphore>
|
||||
#include <gpgme++/interfaces/passphraseprovider.h>
|
||||
#include "passphraseprovider.h"
|
||||
#include "gpg.h"
|
||||
|
||||
|
||||
|
@ -23,6 +23,10 @@ add_library(${PLUGIN} MODULE ${SRC})
|
||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||
|
||||
add_library(libquazip5 SHARED IMPORTED)
|
||||
set_property(TARGET libquazip5 PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libquazip5.so")
|
||||
|
||||
target_link_libraries(${PLUGIN} libquazip5)
|
||||
|
||||
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||
|
||||
|
Reference in New Issue
Block a user