Improve seperator function
This commit is contained in:
parent
ad59d9149e
commit
f2350d9739
|
@ -7,6 +7,7 @@
|
||||||
##############################################################################*/
|
##############################################################################*/
|
||||||
|
|
||||||
#include "qtkiosystem.h"
|
#include "qtkiosystem.h"
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
using namespace Qtk;
|
using namespace Qtk;
|
||||||
|
|
||||||
|
@ -19,15 +20,11 @@ bool QtkIOSystem::Exists(const char * pFile) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
char QtkIOSystem::getOsSeparator() const {
|
char QtkIOSystem::getOsSeparator() const {
|
||||||
#ifndef _WIN32
|
return QDir::separator().toLatin1();
|
||||||
return '/';
|
|
||||||
#else
|
|
||||||
return '\\';
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Assimp::IOStream * QtkIOSystem::Open(const char * pFile, const char * pMode) {
|
Assimp::IOStream * QtkIOSystem::Open(const char * pFile, const char * pMode) {
|
||||||
if(!QFileInfo::exists(pFile)) {
|
if(!Exists(pFile)) {
|
||||||
qDebug() << "[Qtk::QtkIOSystem] failed to open file: " << pFile << "\n";
|
qDebug() << "[Qtk::QtkIOSystem] failed to open file: " << pFile << "\n";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue