Use qt.conf to override plugin path on Mac OS

Summary:
QCoreApplication::addLibraryPath is called before QCoreApplication
was constructed and this caused the returned string to be different
depending from which working directory it was called and not always
the intended binary path.
Using qt.conf has a fixed prefix relative to the binary path
inside the application bundle and therefore is easier to be used
with a relative path.

Reviewers: kbasan, msutcliffe

Reviewed By: msutcliffe

Differential Revision: https://dev.swift-project.org/D18
This commit is contained in:
Roland Winklmeier
2017-05-05 22:37:28 +01:00
committed by Mathew Sutcliffe
parent f952775665
commit cf2c0d0f35
21 changed files with 45 additions and 33 deletions

View File

@@ -38,9 +38,6 @@ int main(int argc, char *argv[])
// is just for testing, I did not split it up
BlackMisc::registerMetadata();
#ifdef Q_OS_MAC
QCoreApplication::addLibraryPath(CDirectoryUtils::applicationDirectoryPath());
#endif
QCoreApplication a(argc, argv);
QTextStream out(stdout, QIODevice::WriteOnly);
QTextStream qtin(stdin);