2
0
forked from Ivasoft/DSView

add support for path with chinese characters

This commit is contained in:
DreamSourceLab
2015-06-24 22:07:09 +08:00
parent 4348c2a895
commit 8ffa3c9119
29 changed files with 280 additions and 139 deletions

View File

@@ -106,8 +106,9 @@ std::list<boost::shared_ptr<device::DevInst> > DeviceManager::driver_scan(
QDir dir(QCoreApplication::applicationDirPath());
if (!dir.cd("res"))
return driver_devices;
std::string str = dir.absolutePath().toStdString() + "/";
strcpy(config_path, str.c_str());
QString str = dir.absolutePath() + "/";
QString str_utf8 = QString::fromLocal8Bit(str.toLocal8Bit());
strcpy(config_path, str_utf8.toUtf8().data());
}
// Do the scan