Fix to Password stuff

This commit is contained in:
Mark Watkins 2011-10-01 22:59:05 +10:00
parent b147d33beb
commit 265fda727b
5 changed files with 15 additions and 2 deletions

View File

@ -435,3 +435,8 @@ void MainWindow::on_actionPrint_Report_triggered()
QMessageBox::information(this,"Not supported Yet","Sorry, printing from this page is not supported yet",QMessageBox::Ok);
}
}
void MainWindow::on_action_Edit_Profile_triggered()
{
}

View File

@ -88,6 +88,8 @@ private slots:
void updatestatusBarMessage (const QString & text);
void on_actionPrint_Report_triggered();
void on_action_Edit_Profile_triggered();
private:
Ui::MainWindow *ui;
Daily * daily;

View File

@ -581,6 +581,7 @@
</property>
<addaction name="action_Import_Data"/>
<addaction name="action_Preferences"/>
<addaction name="action_Edit_Profile"/>
<addaction name="separator"/>
<addaction name="actionPrint_Report"/>
<addaction name="separator"/>
@ -773,6 +774,11 @@
<string>Print &amp;Report</string>
</property>
</action>
<action name="action_Edit_Profile">
<property name="text">
<string>&amp;Edit Profile</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -87,7 +87,7 @@ void NewProfile::on_nextButton_clicked()
QByteArray ba=ui->passwordEdit1->text().toUtf8();
prof["Password"]=QString(QCryptographicHash::hash(ba,QCryptographicHash::Sha1).toHex());
}
prof["Password"]="";
//prof["Password"]="";
if (ui->genderCombo->currentIndex()==1) {
prof["Gender"]="Male";
} else if (ui->genderCombo->currentIndex()==2) {

View File

@ -66,7 +66,7 @@ void ProfileSelect::on_listView_activated(const QModelIndex &index)
QString name=index.data().toString();
Profile *profile=Profiles::profiles[name];
if (!profile) return;
if ((*profile)["Password"].toString().isEmpty()) {
if (!profile->Exists("Password")) {
m_selectedProfile=name;
pref["Profile"]=name;
} else {