Compare commits

...

5 Commits

13 changed files with 310 additions and 36 deletions

18
.gitmodules vendored
View File

@ -1,18 +1,3 @@
[submodule "third/gpgme"]
path = libs/gpg/gpgme
url = https://github.com/gpg/gpgme
[submodule "third/libassuan"]
path = libs/gpg/libassuan
url = https://github.com/gpg/libassuan
[submodule "third/libgpg-error"]
path = libs/gpg/libgpg-error
url = https://github.com/gpg/libgpg-error
[submodule "third/gnupg"]
path = libs/gpg/gnupg
url = https://github.com/gpg/gnupg
[submodule "libs/utils/quazip"]
path = libs/quazip
url = https://github.com/stachenov/quazip
[submodule "libs/gpg/gpgme"]
path = libs/gpg/gpgme
url = https://github.com/gpg/gpgme
@ -28,3 +13,6 @@
[submodule "libs/quazip"]
path = libs/quazip
url = https://github.com/stachenov/quazip
[submodule "libs/libgit2"]
path = libs/libgit2
url = https://github.com/libgit2/libgit2

View File

@ -17,6 +17,11 @@
"quazip": {
"template": "cmake",
"make_jobs": 4
},
"libgit2": {
"template": "cmake",
"make_jobs": 4,
"build_args": "-DBUILD_SHARED_LIBS=OFF"
}
}
}

1
libs/libgit2 Submodule

@ -0,0 +1 @@
Subproject commit 3828d7afdd08b595584048e8e4dab6ddd4506ed1

View File

@ -10,7 +10,7 @@
"content-hub": "UTPass.contenthub"
}
},
"version": "0.0.1",
"version": "0.0.2-dev",
"maintainer": "Quentin Rouland <quentin@qrouland.com>",
"framework" : "ubuntu-sdk-16.04"
}

View File

@ -1,2 +1,3 @@
add_subdirectory(Git)
add_subdirectory(Pass)
add_subdirectory(Utils)

View File

@ -0,0 +1,39 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(PLUGIN "Git")
set(
SRC
plugin.cpp
git.cpp
)
set(CMAKE_AUTOMOC ON)
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(ARCH_TRIPLET STREQUAL "")
set(ARCH_TRIPLET x86_64-linux-gnu)
endif()
add_library(${PLUGIN} MODULE ${SRC})
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
qt5_use_modules(${PLUGIN} Qml Quick DBus)
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/build/${ARCH_TRIPLET}/libgit2/install/")
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
add_library(libgit2 STATIC IMPORTED)
set_property(TARGET libgit2 PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgit2.a")
target_link_libraries(${PLUGIN} libgit2)
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)

10
plugins/Git/git.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <QDebug>
#include <QUrl>
#include <git2.h>
#include "git.h"
Git::Git() {};

17
plugins/Git/git.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef GIT_H
#define GIT_H
#include <QObject>
#include <QUrl>
class Git : public QObject
{
Q_OBJECT
public:
Git();
~Git() override = default;
};
#endif

10
plugins/Git/plugin.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <QtQml>
#include "plugin.h"
#include "git.h"
void GitPlugin::registerTypes(const char *uri)
{
//@uri Utils
qmlRegisterSingletonType<Git>(uri, 1, 0, "Git", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Git; });
}

16
plugins/Git/plugin.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef GITPLUGIN_H
#define GITPLUGIN_H
#include <QQmlExtensionPlugin>
class GitPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif

2
plugins/Git/qmldir Normal file
View File

@ -0,0 +1,2 @@
module Git
plugin Git

View File

@ -4,7 +4,6 @@
#include <QDir>
#include <QtCore/QStandardPaths>
#include <gpgme.h>
#include <gpgme++/data.h>
#include <gpgme++/global.h>

186
po/fr.po Normal file
View File

@ -0,0 +1,186 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the utpass.qrouland package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-21 14:01+0000\n"
"PO-Revision-Date: 2019-09-22 16:05+0000\n"
"Last-Translator: Anne017 <anneonyme017@openmailbox.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../qml/components/FileDir.qml:71
msgid "Decryption failed !"
msgstr "Le déchiffrement a échoué"
#: ../qml/dialogs/DoubleValidationDialog.qml:28
#: ../qml/dialogs/PassphraseDialog.qml:29
#: ../qml/dialogs/SimpleValidationDialog.qml:19
msgid "Ok"
msgstr "Valider"
#: ../qml/dialogs/DoubleValidationDialog.qml:44
#: ../qml/dialogs/PassphraseDialog.qml:41
#: ../qml/dialogs/SimpleValidationDialog.qml:30
msgid "Cancel"
msgstr "Annuler"
#: ../qml/dialogs/ErrorDialog.qml:12
msgid "Error !"
msgstr "Erreur !"
#: ../qml/dialogs/ErrorDialog.qml:15 ../qml/dialogs/SuccessDialog.qml:15
msgid "OK"
msgstr "Valider"
#: ../qml/dialogs/PassphraseDialog.qml:7
msgid "Authentication required"
msgstr "Authentification nécessaire"
#: ../qml/dialogs/PassphraseDialog.qml:8
msgid "Enter passphrase:"
msgstr "Saisissez votre mot de passe :"
#: ../qml/dialogs/PassphraseDialog.qml:20
msgid "passphrase"
msgstr "Mot de passe"
#: ../qml/dialogs/SuccessDialog.qml:12
msgid "Success !"
msgstr "Réussite !"
#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8
#: UTPass.desktop.in.h:1
msgid "UTPass"
msgstr "Mots de passe"
#: ../qml/pages/headers/MainHeader.qml:23
msgid "Search"
msgstr "Rechercher"
#: ../qml/pages/headers/MainHeader.qml:51 ../qml/pages/settings/Settings.qml:14
msgid "Settings"
msgstr "Paramètres"
#: ../qml/pages/headers/MainHeader.qml:58 ../qml/pages/Info.qml:11
msgid "Info"
msgstr "Informations"
#: ../qml/pages/Info.qml:50
msgid "<b>Version</b>"
msgstr "<b>Version</b>"
#: ../qml/pages/Info.qml:68
msgid "<b>Maintainer</>"
msgstr "<b>Mainteneur</>"
#: ../qml/pages/Info.qml:90
msgid "Suggest improvement(s) or report a bug(s)"
msgstr "Suggérer des améliorations ou signaler des problèmes"
#: ../qml/pages/Info.qml:94
msgid "Access to the source code"
msgstr "Accéder au code source"
#: ../qml/pages/Info.qml:101
msgid "Released under the terms of the GNU GPL v3"
msgstr "Distribuée sous les termes de la LPG GNU v3"
#: ../qml/pages/PasswordList.qml:23
msgid "Back"
msgstr "Retour"
#: ../qml/pages/PasswordList.qml:43
msgid ""
"No password found<br>You can import a password store zip in the settings"
msgstr ""
"Aucun mot de passe trouvé<br>Vous pouvez importer un fichier Zip de mots de passe dans les paramètres"
#: ../qml/pages/settings/ImportKeyFile.qml:17
msgid "GPG Key Import"
msgstr "Importation de clé GPG"
#: ../qml/pages/settings/ImportKeyFile.qml:69
msgid "Key import failed !"
msgstr "L'importation de la clé a échoué ! "
#: ../qml/pages/settings/ImportKeyFile.qml:76
msgid "Key successfully imported !"
msgstr "La clé a été ajoutée avec succès !"
#: ../qml/pages/settings/ImportZip.qml:17
msgid "Zip Password Store Import"
msgstr "Importation d'un fichier Zip de mots de passe"
#: ../qml/pages/settings/ImportZip.qml:72
msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr ""
"L'importation d'un nouveau fichier Zip supprimera<br>les fichiers précédents !<br>Voulez-vous continuer ?"
#: ../qml/pages/settings/ImportZip.qml:82
msgid "Password store import failed !"
msgstr "L'importation d'un fichier de mots de passe a échoué !"
#: ../qml/pages/settings/ImportZip.qml:89
msgid "Password store sucessfully imported !"
msgstr "L'importation d'un fichier de mots de passe a réussi !"
#: ../qml/pages/settings/InfoKeys.qml:16
msgid "Info Keys"
msgstr "Informations sur les clés"
#: ../qml/pages/settings/InfoKeys.qml:44
msgid "Key id : %1"
msgstr "Identifiant de la clé : %1"
#: ../qml/pages/settings/InfoKeys.qml:49
msgid "Delete this key"
msgstr "Supprimer cette clé"
#: ../qml/pages/settings/InfoKeys.qml:68
msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr "Vous êtes sur le point de supprimer<br>%1<br>Voulez-vous continuer ?"
#: ../qml/pages/settings/InfoKeys.qml:71
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr "%1<br>sera définitivement supprimée.<br>Voulez-vous continuer ?"
#: ../qml/pages/settings/InfoKeys.qml:87
msgid "Key removal failed !"
msgstr "La supression de clé a échoué !"
#: ../qml/pages/settings/InfoKeys.qml:94
msgid "Key successfully deleted !"
msgstr "La clé a été supprimée avec succès !"
#: ../qml/pages/settings/Settings.qml:28
msgid "GPG"
msgstr "GPG"
#: ../qml/pages/settings/Settings.qml:32
msgid "Import a GPG key file"
msgstr "Importer un fichier de clés GPG"
#: ../qml/pages/settings/Settings.qml:36
msgid "Show GPG keys"
msgstr "Afficher les clés GPG"
#: ../qml/pages/settings/Settings.qml:43
msgid "Password Store"
msgstr "Fichier de mots de passe"
#: ../qml/pages/settings/Settings.qml:47
msgid "Import a Password Store Zip"
msgstr "Importer un fichier Zip de mots de passe"
#: ../qml/pages/settings/Settings.qml:56
msgid "Warning: importing delete any exiting Password Store"
msgstr "Attention : l'importation supprime les fichiers précédents"