修改了设备类返回名字的方法,返回时加上了能否充值的信息。修改对应的调用代码。
This commit is contained in:
@@ -43,7 +43,10 @@ public:
|
||||
|
||||
QString getName()
|
||||
{
|
||||
if (connected) return name;
|
||||
if (connected) {
|
||||
if (depositAllowed) return name + QString("(可充值)");
|
||||
else return name + QString("(仅可消费)");
|
||||
}
|
||||
else return QString("未指定设备名");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user