Commit ade67aa0 authored by LNJ's avatar LNJ Committed by Jonah Brüchert

getResourcePath: Only use source path in dbg builds

Before kaidan always search in the source path (also on real installations),
now kaidan only searches in the DEBUG_SOURCE_PATH, if the current build is a
debug build.
parent 1937d256
......@@ -288,8 +288,10 @@ QString Kaidan::getResourcePath(QString name_)
pathList << QCoreApplication::applicationDirPath() + QString("/../share/") + QString(APPLICATION_NAME);
// get the standard app data locations for current platform
pathList << QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
// add build directory
#ifndef NDEBUG
// add source directory (only for debug builds)
pathList << QString(DEBUG_SOURCE_PATH) + QString("/data"); // append debug directory
// search for file in directories
for (int i = 0; i < pathList.size(); i++) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment