summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.cpp
authordrw <drw>2002-11-30 22:51:39 (UTC)
committer drw <drw>2002-11-30 22:51:39 (UTC)
commit666313593479c03cdc88bd8fde926af181cb8423 (patch) (unidiff)
tree79f5334d7ec7918146469d567466607ebaea28a8 /noncore/apps/checkbook/mainwindow.cpp
parent2e2bbf823ba532f349ad9ca3dd84cf7f758f36b0 (diff)
downloadopie-666313593479c03cdc88bd8fde926af181cb8423.zip
opie-666313593479c03cdc88bd8fde926af181cb8423.tar.gz
opie-666313593479c03cdc88bd8fde926af181cb8423.tar.bz2
Checkbook password protection
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index 567b8ad..2c0abf1 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -29,4 +29,6 @@
29#include "mainwindow.h" 29#include "mainwindow.h"
30#include "password.h"
30#include "checkbook.h" 31#include "checkbook.h"
31 32
33#include <qpe/config.h>
32#include <qpe/global.h> 34#include <qpe/global.h>
@@ -107,3 +109,3 @@ MainWindow::MainWindow()
107 109
108 currencySymbol = '$'; 110 currencySymbol = "$";
109} 111}
@@ -129,2 +131,21 @@ void MainWindow::slotEdit()
129 QString currname = cbList->currentText(); 131 QString currname = cbList->currentText();
132
133 QString tempstr = cbDir;
134 tempstr.append( currname );
135 tempstr.append( ".qcb" );
136
137 Config config( tempstr, Config::File );
138 config.setGroup( "Account" );
139 QString password = config.readEntryCrypt( "Password", "" );
140 if ( password != "" )
141 {
142 Password *pw = new Password( this, tr( "Enter password" ), tr( "Please enter your password:" ) );
143 if ( pw->exec() != QDialog::Accepted || pw->password != password )
144 {
145 delete pw;
146 return;
147 }
148 delete pw;
149 }
150
130 Checkbook *currcb = new Checkbook( this, currname, cbDir, currencySymbol ); 151 Checkbook *currcb = new Checkbook( this, currname, cbDir, currencySymbol );
@@ -139,5 +160,2 @@ void MainWindow::slotEdit()
139 160
140 QString tempstr = cbDir;
141 tempstr.append( currname );
142 tempstr.append( ".qcb" );
143 QFile f( tempstr ); 161 QFile f( tempstr );