equal
deleted
inserted
replaced
231 } |
231 } |
232 |
232 |
233 void HWChatWidget::loadList(QStringList & list, const QString & file) |
233 void HWChatWidget::loadList(QStringList & list, const QString & file) |
234 { |
234 { |
235 list.clear(); |
235 list.clear(); |
236 QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData()); |
236 QFile txt(cfgdir->absolutePath() + "/" + file); |
237 if(!txt.open(QIODevice::ReadOnly)) |
237 if(!txt.open(QIODevice::ReadOnly)) |
238 return; |
238 return; |
239 QTextStream stream(&txt); |
239 QTextStream stream(&txt); |
240 stream.setCodec("UTF-8"); |
240 stream.setCodec("UTF-8"); |
241 |
241 |
251 txt.close(); |
251 txt.close(); |
252 } |
252 } |
253 |
253 |
254 void HWChatWidget::saveList(QStringList & list, const QString & file) |
254 void HWChatWidget::saveList(QStringList & list, const QString & file) |
255 { |
255 { |
256 QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData()); |
256 QFile txt(cfgdir->absolutePath() + "/" + file); |
257 if(!txt.open(QIODevice::WriteOnly | QIODevice::Truncate)) |
257 if(!txt.open(QIODevice::WriteOnly | QIODevice::Truncate)) |
258 return; |
258 return; |
259 QTextStream stream(&txt); |
259 QTextStream stream(&txt); |
260 stream.setCodec("UTF-8"); |
260 stream.setCodec("UTF-8"); |
261 |
261 |