blob: 7142449caa500405d046257f5ae132d0c2a2e47c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
The function get_QTDIR reads the environment variable 'QTDIR'. Which is not set
most of the time. So define a sensible fallback value, and return that one in
this case.
This should help the program find the assistant binary, without going over
qtchooser (and requiring to set QT_SELECT).
--- src/lprofqt/config.cpp.orig 2017-02-04 19:46:56 UTC
+++ src/lprofqt/config.cpp
@@ -72,7 +72,9 @@ QString get_QTDIR()
{
// qDebug(QString::fromLocal8Bit("get_home_dir"));
const char* qtdir= "QTDIR";
- return QString::fromLocal8Bit(getenv(qtdir));
+ const QString fallback = "%%QT_ARCHDIR%%";
+ QString env_qtdir = QString::fromLocal8Bit(getenv(qtdir));
+ return (env_qtdir.isEmpty() ? fallback : env_qtdir);
}
void init_env()
|