Commit 08c9b2ac5d83f8064261a3885712f9aa0c4f7317
Exists in
master
Merge branch 'master' of https://github.com/lightbase/cacic-agente
Showing
3 changed files
with
9 additions
and
5 deletions
Show diff stats
install-cacic/install-cacic.pro
install-cacic/installcacic.cpp
| ... | ... | @@ -10,15 +10,18 @@ InstallCacic::InstallCacic(QObject *parent) : |
| 10 | 10 | void InstallCacic::run(QStringList argv, int argc) { |
| 11 | 11 | |
| 12 | 12 | QLogger::QLog_Debug("Install", "Inicio de instalacao"); |
| 13 | + | |
| 14 | + oCacicComm = new CacicComm(); | |
| 15 | + | |
| 13 | 16 | bool ok; |
| 14 | 17 | //valida os parametros repassados |
| 15 | 18 | QMap<QString, QString> param = validaParametros(argv, argc, &ok); |
| 16 | 19 | //se tiver usuario, senha e url |
| 17 | 20 | if (ok){ |
| 18 | - oCacicComm.setUrlGerente(this->argumentos["host"]); | |
| 19 | - oCacicComm.setUsuario(this->argumentos["user"]); | |
| 20 | - oCacicComm.setPassword(this->argumentos["password"]); | |
| 21 | - QJsonObject jsonLogin = oCacicComm.login(&ok); | |
| 21 | + oCacicComm->setUrlGerente(this->argumentos["host"]); | |
| 22 | + oCacicComm->setUsuario(this->argumentos["user"]); | |
| 23 | + oCacicComm->setPassword(this->argumentos["password"]); | |
| 24 | + QJsonObject jsonLogin = oCacicComm->login(&ok); | |
| 22 | 25 | if (ok){ |
| 23 | 26 | //conectado, grava a chave na classe; |
| 24 | 27 | oCacic.setChaveCrypt(jsonLogin["reply"].toObject()["chavecrip"].toString()); | ... | ... |
install-cacic/installcacic.h