"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/mainwindow.cpp" between
zuluCrypt-5.7.0.tar.xz and zuluCrypt-5.7.1.tar.xz

About: zuluCrypt is a simple but feature rich solution for hard drives encryption. It can manage PLAIN dm-crypt, LUKS, TrueCrypt and VeraCrypt encrypted volumes.

mainwindow.cpp  (zuluCrypt-5.7.0.tar.xz):mainwindow.cpp  (zuluCrypt-5.7.1.tar.xz)
skipping to change at line 33 skipping to change at line 33
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include "../zuluCrypt-gui/utility.h" #include "../zuluCrypt-gui/utility.h"
#include "../zuluCrypt-cli/pluginManager/libzuluCryptPluginManager.h" #include "../zuluCrypt-cli/pluginManager/libzuluCryptPluginManager.h"
#include "task.hpp" #include "task.hpp"
#include <iostream>
MainWindow::MainWindow( MainWindow::function_t f,QWidget * parent ) : MainWindow::MainWindow( MainWindow::function_t f,QWidget * parent ) :
QWidget( parent ),m_ui( new Ui::MainWindow ),m_handle( nullptr ),m_functi QWidget( parent ),
on( std::move( f ) ) m_ui( new Ui::MainWindow ),
m_printToStdOut( !qgetenv( "zuluCryptPrintToStdOut" ).isEmpty() ),
m_handle( nullptr ),
m_function( std::move( f ) )
{ {
m_ui->setupUi( this ) ; m_ui->setupUi( this ) ;
this->setFixedSize( this->size() ) ; this->setFixedSize( this->size() ) ;
m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ; m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ;
this->setWindowIcon( QIcon( ":/default.png" ) ) ; this->setWindowIcon( QIcon( ":/default.png" ) ) ;
m_ui->pbKeyFile->setIcon( QIcon( ":/file.png" ) ) ; m_ui->pbKeyFile->setIcon( QIcon( ":/file.png" ) ) ;
connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ;
skipping to change at line 152 skipping to change at line 158
if( m_ui->pbCancel->hasFocus() ){ if( m_ui->pbCancel->hasFocus() ){
this->pbCancel() ; this->pbCancel() ;
}else{ }else{
this->pbOpen() ; this->pbOpen() ;
} }
} }
void MainWindow::setToken( char * const * e ) void MainWindow::setToken( char * const * e )
{ {
m_handle = zuluCryptPluginManagerOpenConnection( *( e + 3 ) ) ; if( !m_printToStdOut ){
m_handle = zuluCryptPluginManagerOpenConnection( *( e + 3 ) ) ;
}
} }
void MainWindow::setApplicationName( const QString& appName ) void MainWindow::setApplicationName( const QString& appName )
{ {
m_appName = appName ; m_appName = appName ;
} }
void MainWindow::setkeyLabel( const QString& keyLabel ) void MainWindow::setkeyLabel( const QString& keyLabel )
{ {
m_ui->label_2->setText( keyLabel ) ; m_ui->label_2->setText( keyLabel ) ;
skipping to change at line 258 skipping to change at line 267
return msg.ShowUIOK( tr( "ERROR" ),tr( "Key field is empt y" ) ) ; return msg.ShowUIOK( tr( "ERROR" ),tr( "Key field is empt y" ) ) ;
} }
} }
QString keyFile = m_ui->lineEditKeyFile->text() ; QString keyFile = m_ui->lineEditKeyFile->text() ;
keyFile.replace( "file://","" ) ; keyFile.replace( "file://","" ) ;
if( m_requireKeyFile ){ if( m_requireKeyFile ){
if( m_keyfileAsKey ){ if( !m_keyfileAsKey ){
;
}else{
if( keyFile.isEmpty() ){ if( keyFile.isEmpty() ){
return msg.ShowUIOK( tr( "ERROR" ),tr( "Path to % 1 keyfile is empty" ).arg( m_appName ) ) ; return msg.ShowUIOK( tr( "ERROR" ),tr( "Path to % 1 keyfile is empty" ).arg( m_appName ) ) ;
} }
if( !QFile::exists( keyFile ) ){ if( !QFile::exists( keyFile ) ){
return msg.ShowUIOK( tr( "ERROR" ),tr( "Invalid p ath to %1 keyfile" ).arg( m_appName ) ) ; return msg.ShowUIOK( tr( "ERROR" ),tr( "Invalid p ath to %1 keyfile" ).arg( m_appName ) ) ;
} }
} }
} }
QVector<QString> exe ; QVector<QString> exe ;
skipping to change at line 292 skipping to change at line 300
m_working = true ; m_working = true ;
Task::run( [ &,exe,keyFile,key ](){ Task::run( [ &,exe,keyFile,key ](){
auto s = m_function( exe,keyFile,key ) ; auto s = m_function( exe,keyFile,key ) ;
if( s.isEmpty() ){ if( s.isEmpty() ){
return false ; return false ;
}else{ }else{
if( m_handle ){ if( m_printToStdOut ){
zuluCryptPluginManagerSendKey( m_handle,s.constDa
ta(),size_t( s.size() ) ) ;
std::cout << s.constData() << std::flush ;
return true ; return true ;
}else{ }else{
return false ; if( m_handle ){
zuluCryptPluginManagerSendKey( m_handle,s
.constData(),size_t( s.size() ) ) ;
return true ;
}else{
return false ;
}
} }
} }
} ).then( [ this ]( bool passed ){ } ).then( [ this ]( bool passed ){
if( passed ){ if( passed ){
this->Exit( 0 ) ; this->Exit( 0 ) ;
}else{ }else{
DialogMsg msg( this ) ; DialogMsg msg( this ) ;
 End of changes. 7 change blocks. 
11 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)