0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 55097d27e8b746b3d5ff437939caf1fa43c0d62b Mon Sep 17 00:00:00 2001
  2. From: Holger Freyther <zecke@selfish.org>
  3. Date: Wed, 26 Sep 2012 17:22:30 +0200
  4. Subject: [PATCH 01/21] qlibraryinfo: allow to set qt.conf from the outside
  5. using the environment
  6. Allow to set a qt.conf from the outside using the environment. This allows
  7. to inject new prefixes and other paths into qmake. This is needed when using
  8. the same qmake binary to build qt/x11 and qt/embedded
  9. Upstream-Status: Pending
  10. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
  11. ---
  12. src/corelib/global/qlibraryinfo.cpp | 5 +++++
  13. 1 file changed, 5 insertions(+)
  14. diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
  15. index 180dc39..4adad35 100644
  16. --- a/src/corelib/global/qlibraryinfo.cpp
  17. +++ b/src/corelib/global/qlibraryinfo.cpp
  18. @@ -54,6 +54,7 @@
  19. QT_BEGIN_NAMESPACE
  20. extern QString qmake_libraryInfoFile();
  21. QT_END_NAMESPACE
  22. +#include <stdlib.h>
  23. #else
  24. # include "qcoreapplication.h"
  25. #endif
  26. @@ -112,6 +113,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
  27. #ifdef BOOTSTRAPPING
  28. if(!QFile::exists(qtconfig))
  29. qtconfig = qmake_libraryInfoFile();
  30. + if (!QFile::exists(qtconfig)) {
  31. + QByteArray config = getenv("QT_CONF_PATH");
  32. + qtconfig = QFile::decodeName(config);
  33. + }
  34. #else
  35. if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
  36. #ifdef Q_OS_MAC
  37. --
  38. 1.8.0