2017-07-14 Fred Gleason <fredg@paravelsystems.com>

* Added a 'SYSTEM.SHOW_USER_LIST' field to the database.
	* Incremented the database version to 265.
	* Added 'RDSystem::showUserList()' and 'RDSystem::setShowUserList()'
	methods in 'lib/rdsystem.cpp' and 'lib/rdsystem.h'.
	* Added a 'Show User List in RDLogin' control to the 'Edit System'
	dialog in 'rdadmin/edit_settings.cpp' and 'rdadmin/edit_settings.h'.
	* Altered RDLogin to display a text  input field for the user name
	when 'Show User List in RDLogin' is unchecked.
This commit is contained in:
Fred Gleason
2017-07-14 12:25:21 -04:00
parent 4d6187bb61
commit b2c6f3b9ac
26 changed files with 194 additions and 14 deletions

View File

@@ -146,6 +146,34 @@ void RDSystem::setTempCartGroup(const QString &str) const
}
bool RDSystem::showUserList() const
{
bool ret=false;
QString sql;
RDSqlQuery *q;
sql="select SHOW_USER_LIST from SYSTEM";
q=new RDSqlQuery(sql);
if(q->first()) {
ret=RDBool(q->value(0).toString());
}
delete q;
return ret;
}
void RDSystem::setShowUserList(bool state) const
{
QString sql;
RDSqlQuery *q;
sql=QString().sprintf("update SYSTEM set SHOW_USER_LIST=\"%s\"",
(const char *)RDYesNo(state));
q=new RDSqlQuery(sql);
delete q;
}
QString RDSystem::xml() const
{
QString xml="<systemSettings>\n";