Remove toLocal8Bit() conversion of file name as Qt should handle filenames on its own. Helps with filename on Windows, could help with issue #189.
authorunc0rr
Fri, 02 Sep 2011 12:27:15 +0400
changeset 5735 08ac2d557392
parent 5734 d710db47a1ef
child 5736 23202899f564
Remove toLocal8Bit() conversion of file name as Qt should handle filenames on its own. Helps with filename on Windows, could help with issue #189.
QTfrontend/chatwidget.cpp
--- a/QTfrontend/chatwidget.cpp	Fri Sep 02 12:06:24 2011 +0400
+++ b/QTfrontend/chatwidget.cpp	Fri Sep 02 12:27:15 2011 +0400
@@ -233,7 +233,7 @@
 void HWChatWidget::loadList(QStringList & list, const QString & file)
 {
     list.clear();
-    QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
+    QFile txt(cfgdir->absolutePath() + "/" + file);
     if(!txt.open(QIODevice::ReadOnly))
         return;
     QTextStream stream(&txt);
@@ -253,7 +253,7 @@
 
 void HWChatWidget::saveList(QStringList & list, const QString & file)
 {
-    QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
+    QFile txt(cfgdir->absolutePath() + "/" + file);
     if(!txt.open(QIODevice::WriteOnly | QIODevice::Truncate))
         return;
     QTextStream stream(&txt);