mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
Merge pull request #5711 from ZappoMan/fixEntityScriptIncludes
fix a bug in entity script includes and file based includes on windows
This commit is contained in:
commit
0f70797ab4
2 changed files with 7 additions and 6 deletions
|
@ -58,11 +58,13 @@ void BatchLoader::start() {
|
|||
connect(this, &QObject::destroyed, reply, &QObject::deleteLater);
|
||||
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
QString fileName = url.toString();
|
||||
#else
|
||||
QString fileName = url.toLocalFile();
|
||||
#endif
|
||||
|
||||
// sometimes on windows, we see the toLocalFile() return null,
|
||||
// in this case we will attempt to simply use the url as a string
|
||||
if (fileName.isEmpty()) {
|
||||
fileName = url.toString();
|
||||
}
|
||||
|
||||
qCDebug(scriptengine) << "Reading file at " << fileName;
|
||||
|
||||
|
|
|
@ -26,8 +26,7 @@ static int quatMetaTypeId = qRegisterMetaType<glm::quat>();
|
|||
static int xColorMetaTypeId = qRegisterMetaType<xColor>();
|
||||
static int pickRayMetaTypeId = qRegisterMetaType<PickRay>();
|
||||
static int collisionMetaTypeId = qRegisterMetaType<Collision>();
|
||||
|
||||
|
||||
static int qMapURLStringMetaTypeId = qRegisterMetaType<QMap<QUrl,QString>>();
|
||||
|
||||
void registerMetaTypes(QScriptEngine* engine) {
|
||||
qScriptRegisterMetaType(engine, vec4toScriptValue, vec4FromScriptValue);
|
||||
|
|
Loading…
Reference in a new issue