summaryrefslogtreecommitdiff
path: root/noncore/apps/zsafe/zsafe.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/zsafe/zsafe.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/zsafe/zsafe.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index ee1da77..bdd2aed 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -766,32 +766,26 @@ void ZSafe::editPwd()
dialog->Field6Label->setText(getFieldLabel (selectedItem,"6", tr("Field 5")));
// set the fields
dialog->NameField->setText(selectedItem->text (0));
dialog->UsernameField->setText(selectedItem->text (1));
dialog->PasswordField->setText(selectedItem->text (2));
QString comment = selectedItem->text (3);
comment.replace (QRegExp("<br>"), "\n");
dialog->Field5->setText(selectedItem->text (4));
dialog->Field6->setText(selectedItem->text (5));
dialog->CommentField->insertLine(comment);
dialog->CommentField->setCursorPosition(0,0);
-#ifdef DESKTOP
-#ifndef WIN32
- dialog->show();
-#endif
-#else
- dialog->showMaximized();
-#endif
- DialogCode result = (DialogCode) dialog->exec();
+
+ DialogCode result = (DialogCode) QPEApplication::execDialog( dialog );
#ifdef DESKTOP
result = Accepted;
#endif
if (result == Accepted)
{
modified = true;
// edit the selected item
QString name = dialog->NameField->text();
selectedItem->setText (0, tr (name));
QString user = dialog->UsernameField->text();
selectedItem->setText (1, tr (user));
@@ -831,32 +825,26 @@ void ZSafe::newPwd()
#ifdef WIN32
dialog->setCaption ("Qt " + tr("New Entry"));
dialog->setGeometry(200, 250, 220, 310 );
#endif
// set the labels
dialog->Name->setText(getFieldLabel (selectedItem, "1", tr("Name")));
dialog->Username->setText(getFieldLabel (selectedItem, "2", tr("Username")));
dialog->Password->setText(getFieldLabel (selectedItem, "3", tr("Password")));
dialog->Comment->setText(getFieldLabel (selectedItem, "4", tr("Comment")));
dialog->Field5Label->setText(getFieldLabel (selectedItem,"5", tr("Field 4")));
dialog->Field6Label->setText(getFieldLabel (selectedItem,"6", tr("Field 5")));
retype:
-#ifdef DESKTOP
-#ifndef WIN32
- dialog->show();
-#endif
-#else
- dialog->showMaximized();
-#endif
- DialogCode result = (DialogCode) dialog->exec();
+
+ DialogCode result = (DialogCode) QPEApplication::execDialog( dialog );
#ifdef DESKTOP
result = Accepted;
#endif
if (result == Accepted)
{
QString name = dialog->NameField->text();
if (cat == name)
{
QMessageBox::critical( 0, tr("ZSafe"),
tr("Entry name must be different\nfrom the category name.") );
@@ -1179,30 +1167,25 @@ void ZSafe::showInfo( QListViewItem *_item)
text += getFieldLabel (selectedItem, "4", tr("Comment"));
text += ":<br> </b></u>";
QString comment = selectedItem->text(3);
comment.replace (QRegExp("\n"), "<br>");
text += comment;
// text += "<br>";
}
text += "</body></html>";
infoForm->InfoText->setText(text);
infoForm->hide();
-#ifdef DESKTOP
- infoForm->show();
-#else
- infoForm->showMaximized();
-#endif
-
+ QPEApplication::showDialog( infoForm );
}
}
void ZSafe::listViewSelected( QListViewItem *_item)
{
if (!_item)
return;
if (selectedItem != NULL)
selectedItem->setSelected(FALSE);
selectedItem = _item;