Mercurial > hg > syntilista
diff src/editperson.cpp @ 271:df3f902588af
Add parent window argument to slErrorMsg() and use it.
Also use main window as parent for other static/modal dialogs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 17 Mar 2023 13:09:43 +0200 |
parents | 55581d90c55d |
children | 6f5d2028b882 |
line wrap: on
line diff
--- a/src/editperson.cpp Sun Feb 12 15:20:11 2023 +0200 +++ b/src/editperson.cpp Fri Mar 17 13:09:43 2023 +0200 @@ -87,7 +87,7 @@ // if (!validateForm()) { - slErrorMsg( + slErrorMsg(this, tr("Virhe!"), tr("Vaaditut kentät (etunimi, sukunimi) eivät ole täytetty tai lisätietojen pituus on liian suuri.")); @@ -113,7 +113,7 @@ if (person.next()) { // There exists another person with that name - slErrorMsg( + slErrorMsg(this, tr("Virhe!"), tr("Ei pysty! Samalla nimellä '%1 %2' on olemassa jo henkilö!"). arg(selPerson.firstName).arg(selPerson.lastName)); @@ -144,7 +144,7 @@ if (person.next()) { // There exists a record with same name - slErrorMsg( + slErrorMsg(this, tr("Virhe!"), tr("Ei pysty! Samalla nimellä '%1 %2' on olemassa jo henkilö!"). arg(selPerson.firstName).arg(selPerson.lastName)); @@ -156,7 +156,7 @@ qint64 nid = dynamic_cast<SyntilistaMainWindow *>(parent())->model_People->addPerson(selPerson); if (nid < 0) { - slErrorMsg( + slErrorMsg(this, tr("Virhe!"), tr("Tietokannan käsittelyssä tapahtui virhe (#%1)."). arg(nid));