From 1e6c361dab2c58f9e6727562bf1ccce890ae6e99 Mon Sep 17 00:00:00 2001 From: "T. van der Zwan" Date: Thu, 22 Aug 2013 19:32:40 +0000 Subject: [PATCH] Fixed schema from resource in static lib --- libsrc/hyperion/Hyperion.cpp | 5 ++++- libsrc/hyperion/resource.qrc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index d40746cb..8a21af4f 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -82,8 +82,11 @@ LedString Hyperion::createLedString(const Json::Value& ledsConfig) Json::Value Hyperion::loadConfig(const std::string& configFile) { + // make sure the resources are loaded (they may be left out after static linking) + Q_INIT_RESOURCE(resource); + // read the json schema from the resource - QResource schemaData(":/hyperion.schema.json"); + QResource schemaData(":/hyperion-schema"); assert(schemaData.isValid()); Json::Reader jsonReader; diff --git a/libsrc/hyperion/resource.qrc b/libsrc/hyperion/resource.qrc index f11664c4..4181fbe8 100644 --- a/libsrc/hyperion/resource.qrc +++ b/libsrc/hyperion/resource.qrc @@ -1,5 +1,5 @@ - hyperion.schema.json + hyperion.schema.json