From f2350d97390e342599927a5930834e4e690e97e8 Mon Sep 17 00:00:00 2001 From: Transporter Date: Sun, 21 Jan 2024 20:25:01 +0100 Subject: [PATCH] Improve seperator function --- src/qtk/qtkiosystem.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qtk/qtkiosystem.cpp b/src/qtk/qtkiosystem.cpp index 342d9f3..2d3bd31 100644 --- a/src/qtk/qtkiosystem.cpp +++ b/src/qtk/qtkiosystem.cpp @@ -7,6 +7,7 @@ ##############################################################################*/ #include "qtkiosystem.h" +#include using namespace Qtk; @@ -19,15 +20,11 @@ bool QtkIOSystem::Exists(const char * pFile) const { } char QtkIOSystem::getOsSeparator() const { -#ifndef _WIN32 - return '/'; -#else - return '\\'; -#endif + return QDir::separator().toLatin1(); } 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"; return nullptr; }