froyg / thittam

1 stars 4 forks source link

Resource/ResourceGroup name should be unique #47

Closed joesteeve closed 5 years ago

joesteeve commented 5 years ago

Currently there is no check on the 'name' provided by the user. It should be unique.

EvenCode commented 5 years ago

resource-group.cxx and resource-manager.cxx takes care of "resource name" to be unique.

bool ResourceManager::is_unique_group_name (const std::string & group_name)

bool ResourceGroup::is_unique_resource_name (const std::string & resource_name)

joesteeve commented 5 years ago

These should be used by the controller to check before adding. If the name is not unique, a message should be shown and the 'add-form' should be shown again.

EvenCode commented 5 years ago

@Compro-Prasad

Compro-Prasad commented 5 years ago

I think, "text changed" signal in the dialog box can be regularly passed to the model for checking if the name is unique. Will look through the code to get back with a proper solution.