1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 03:07:20 +01:00

* utils.cpp (validateName): fixed #1751 "Dont allow interface names to be blank". The GUI should not allow the name of any

> object to be blank.
This commit is contained in:
Vadim Kurland 2010-09-30 18:47:22 +00:00
parent 5b9f34a274
commit b5c6430a8e
3 changed files with 24 additions and 1 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 3289
#define BUILD_NUM 3290

View File

@ -1,3 +1,9 @@
2010-09-30 Vadim Kurland <vadim@vk.crocodile.org>
* utils.cpp (validateName): fixed #1751 "Don't allow interface
names to be blank". The GUI should not allow the name of any
object to be blank.
2010-09-29 Vadim Kurland <vadim@vk.crocodile.org>
* ProjectPanel.cpp (ProjectPanel::inspect): fixed #1718 "Inspect

View File

@ -225,6 +225,23 @@ bool isTreeReadWrite(QWidget *parent, FWObject *obj)
*/
bool validateName(QWidget *parent, FWObject *obj, const QString &newname)
{
if (newname.isEmpty())
{
// show warning dialog only if app has focus
if (QApplication::focusWidget() != NULL)
{
parent->blockSignals(true);
QMessageBox::warning(
parent, "Firewall Builder",
QObject::tr("Object name should not be blank"),
QObject::tr("&Continue"), NULL, NULL, 0, 2 );
parent->blockSignals(false);
}
return false;
}
FWObject *p = obj->getParent();
for (FWObject::iterator i=p->begin(); i!=p->end(); ++i)
{