summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-06-15 00:13:55 +0200
committerAnne Jan Brouwer <brouwer@annejan.com>2015-06-15 00:13:55 +0200
commit34200cc3a9d1abd738b29ade02e8d285b87e334f (patch)
tree85c4e8b3e44bdb1cf57e5b59f898b8ea3982bde7
parente2d5ba5b6f61b5a9e195dcc87b9ebe468f6c1f1c (diff)
parent821b9402a55a73efd253cd48312fb3aaea6386d5 (diff)
Merge pull request #54 from rdoeffinger/gpg4win-release
Some hacks I needed for portable gpg4win release
-rw-r--r--key_management.bat1
-rw-r--r--mainwindow.cpp10
-rw-r--r--password-store/.gpg-id0
-rw-r--r--release-zip.mak4
4 files changed, 12 insertions, 3 deletions
diff --git a/key_management.bat b/key_management.bat
new file mode 100644
index 00000000..1ddb1a6e
--- /dev/null
+++ b/key_management.bat
@@ -0,0 +1 @@
+start gpg4win\gpa.exe
diff --git a/mainwindow.cpp b/mainwindow.cpp
index a2b3e32a..dbe117bf 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -394,13 +394,15 @@ void MainWindow::on_pushButton_clicked()
QString MainWindow::getDir(const QModelIndex &index, bool forPass)
{
+ QString abspath = QDir(passStore).absolutePath() + '/';
if (!index.isValid()) {
- return forPass ? "" : passStore;
+ return forPass ? "" : abspath;
}
QFileInfo info = model.fileInfo(proxyModel.mapToSource(index));
QString filePath = (info.isFile() ? info.absolutePath() : info.absoluteFilePath()) + '/';
if (forPass) {
filePath.replace(QRegExp("^" + passStore), "");
+ filePath.replace(QRegExp("^" + abspath), "");
}
return filePath;
}
@@ -454,6 +456,12 @@ void MainWindow::executePass(QString args, QString input) {
* @param args
*/
void MainWindow::executeWrapper(QString app, QString args, QString input) {
+ // Happens a lot if e.g. git binary is not set.
+ // This will result in bogus "QProcess::FailedToStart" messages,
+ // also hiding legitimate errors from the gpg commands.
+ if (app.isEmpty()) return;
+ // Convert to absolute path, just in case
+ app = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(app);
if (wrapperRunning) {
execQueueItem item;
item.app = app;
diff --git a/password-store/.gpg-id b/password-store/.gpg-id
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/password-store/.gpg-id
diff --git a/release-zip.mak b/release-zip.mak
index eb4be435..e081c370 100644
--- a/release-zip.mak
+++ b/release-zip.mak
@@ -1,8 +1,8 @@
# Note: this assumes Qt with release and debug config was used
-VERSION=v0.1-testing
+VERSION=v1.0
-qtpass-${VERSION}-win.zip: qtpass.exe LICENSE README.md
+qtpass-${VERSION}-gpg4win.zip: qtpass.exe qtpass.ini LICENSE README.md password-store gpg4win key_management.bat
7z a -mx=9 $@ $^
qtpass.exe: release/qtpass.exe