Commit 0e316414099d36b96f5ea06dbd2c631c6ebdc14d

Authored by Austin Blanton
1 parent 1a79e098

Append system paths to list of paths to check

Showing 1 changed file with 5 additions and 0 deletions
openbr/openbr_plugin.cpp
... ... @@ -899,8 +899,12 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG
899 899 {
900 900 qInstallMessageHandler(messageHandler);
901 901  
  902 + QString sep;
902 903 #ifndef _WIN32
903 904 useGui = useGui && (getenv("DISPLAY") != NULL);
  905 + sep = ":";
  906 +#else
  907 + sep = ";";
904 908 #endif // not _WIN32
905 909  
906 910 // We take in argc as a reference due to:
... ... @@ -944,6 +948,7 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG
944 948 // Search for SDK
945 949 if (sdkPath.isEmpty()) {
946 950 QStringList checkPaths; checkPaths << QDir::currentPath() << QCoreApplication::applicationDirPath();
  951 + checkPaths << QString(getenv("PATH")).split(sep, QString::SkipEmptyParts);
947 952  
948 953 bool foundSDK = false;
949 954 foreach (const QString &path, checkPaths) {
... ...