UI: Minor fix.

This commit is contained in:
Nodir Temirkhodjaev 2019-03-17 22:14:04 +05:00
parent 5964641492
commit e4ac53f359
3 changed files with 8 additions and 2 deletions

View File

@ -122,8 +122,8 @@ bool DriverManager::writeData(quint32 code, QByteArray &buf, int size)
void DriverManager::reinstallDriver()
{
QString binPath = FileUtil::appBinLocation();
binPath.replace('/', '\\');
const QString binPath = FileUtil::toNativeSeparators(
FileUtil::appBinLocation());
const QString cmdPath = qEnvironmentVariable("COMSPEC");
const QString scriptPath = binPath + "\\driver\\scripts\\reinstall-lnk.bat";

View File

@ -89,6 +89,11 @@ QString FileUtil::pathSlash(const QString &path)
return path.endsWith(slash) ? path : path + slash;
}
QString FileUtil::toNativeSeparators(const QString &path)
{
return QDir::toNativeSeparators(path);
}
bool FileUtil::makePath(const QString &path)
{
return QDir().mkpath(path);

View File

@ -26,6 +26,7 @@ public:
static QString absolutePath(const QString &path);
static QString pathSlash(const QString &path);
static QString toNativeSeparators(const QString &path);
static bool makePath(const QString &path);
static bool fileExists(const QString &filePath);