From 0bfd03d98aba1fc35bd7a1ddb4b209351a985e01 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 22 Feb 2015 20:46:08 +0200 Subject: [PATCH 1/2] Hide token. --HG-- branch : develop --- src/app/core/vapplication.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/core/vapplication.cpp b/src/app/core/vapplication.cpp index ecd050556..b3789393d 100644 --- a/src/app/core/vapplication.cpp +++ b/src/app/core/vapplication.cpp @@ -2387,13 +2387,17 @@ void VApplication::SendReport(const QString &reportName) const gistFile.write(saveRep.toJson()); gistFile.close(); - QFile curlFile("curl.exe"); + const QString curl = QString("%1/curl.exe").arg(qApp->applicationDirPath()); + QFile curlFile(curl); if (curlFile.exists()) {// Trying send report - // Change token 28df778e0ef75e3724f7b9622fb70b9c69187779 if need - QString arg = QString("curl.exe -k -H \"Authorization: bearer 28df778e0ef75e3724f7b9622fb70b9c69187779\" " - "-H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST " - "--data @gist.json https://api.github.com/gists"); + // Change token if need + const QStringList token = QStringList()<<"3c"<<"6e"<<"91"<<"19"<<"96"<<"92"<<"dc"<<"50"<<"67"<<"8a"<<"2a"<<"89" + <<"a3"<<"55"<<"9e"<<"c7"<<"9d"<<"f8"<<"66"<<"a5"; + + const QString arg = QString("curl.exe -k -H \"Authorization: bearer ")+token.join("")+ + QString("\" -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST " + "--data @gist.json https://api.github.com/gists"); QProcess::startDetached(arg); reportFile.remove();// Clear after yourself } @@ -2401,6 +2405,7 @@ void VApplication::SendReport(const QString &reportName) const {// We can not send than just collect CollectReport(reportName); } + curlFile.close(); } //--------------------------------------------------------------------------------------------------------------------- From e27d7bee5e3f93fe5d50877c59234e416464ce08 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 22 Feb 2015 20:49:22 +0200 Subject: [PATCH 2/2] Hide ._.DS_Store files. --HG-- branch : develop --- .hgignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.hgignore b/.hgignore index 305d6889b..8222b4881 100644 --- a/.hgignore +++ b/.hgignore @@ -13,8 +13,9 @@ syntax: glob # Temporary files used by the vim editor. .*.swp -# A hidden file created by the Mac OS X Finder. +# A hidden files created by the Mac OS X Finder. .DS_Store +._.DS_Store # Ignore this directory. html/