8 #include <QCoreApplication> 18 static void QStartup() {
23 QCoreApplication *core = QCoreApplication::instance();
25 std::cout <<
"**** Qt Plugin Path is not set because no instance of QCoreApplication ****\n";
32 Q_COREAPP_STARTUP_FUNCTION(QStartup);
39 Environment::Environment() {
46 std::cout <<
"ISISROOT=" << root <<
"\n";
50 QCoreApplication *core = QCoreApplication::instance();
52 std::cout <<
"QCoreApplication doesn't exist yet!\n";
54 IString thirdPartyPluginPath = root +
"/3rdParty/plugins";
55 pluginPaths << thirdPartyPluginPath.ToQt();
56 std::cout <<
"PluginPaths=" << pluginPaths.join(
";") <<
"\n";
57 QCoreApplication::setLibraryPaths(pluginPaths);
87 QString defaultValue) {
89 QString value = defaultValue;
91 char *envValue = getenv(variable.toLatin1().data());
103 TextFile versionFile(
"$ISISROOT/version");
104 QString line1, line2, line3, line4;
110 QRegExp validPartOfLine(
"[^ #]*");
111 if (validPartOfLine.indexIn(line1) != -1) {
112 line1 = validPartOfLine.cap();
115 IString msg =
"$ISISROOT/version line 1, no valid text found";
119 if (validPartOfLine.indexIn(line2) != -1) {
120 line2 = validPartOfLine.cap();
123 IString msg =
"$ISISROOT/version line 2, no valid text found";
127 if (validPartOfLine.indexIn(line4) != -1) {
128 line4 = validPartOfLine.cap();
131 IString msg =
"$ISISROOT/version line 4, no valid text found";
135 return line1 +
" " + line4 +
" | " + line2;
static QString getEnvironmentValue(QString, QString)
static Environment automaticEnvironmentSetup
Construct an environment in static space to initialize some global Isis 3 environment options...
static QString userName()
the user name.
This error is for when a programmer made an API call that was illegal.
static QString hostName()
#define _FILEINFO_
Macro for the filename and line number.
bool GetLine(QString &line, const bool skipComments=true)
Gets next line from file.
static QString isisVersion()
Provides access to sequential ASCII stream I/O.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.