Ignore:
Timestamp:
Jul 19, 2011, 11:32:34 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: Use expandEnvVars() in qlibraryinfo.cpp on all platforms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/global/qlibraryinfo.cpp

    r851 r900  
    6363#endif
    6464
     65
     66
     67
     68
    6569#ifdef QLIBRARYINFO_EPOCROOT
    6670# include "symbian/epocroot_p.h"
    6771#endif
    6872
     73
     74
     75
     76
     77
     78
    6979#ifdef Q_OS_OS2
    70 
    71 #include "qt_os2.h"
    7280
    7381static const char *qt_module_path()
     
    8795}
    8896
     97
     98
    8999// expands environment variables in the form $(ENVVAR)
    90100static QString expandEnvVars(const QString &str)
     
    101111    return ret;
    102112}
    103 
    104 #endif // Q_OS_OS2
    105 
    106 #include "qconfig.cpp"
    107 
    108 QT_BEGIN_NAMESPACE
    109 
    110 extern void qDumpCPUFeatures(); // in qsimd.cpp
    111113
    112114#ifndef QT_NO_SETTINGS
     
    499501            }
    500502            ret = config->value(subKey + key, defaultValue).toString();
    501 #ifdef Q_OS_OS2
    502503            ret = expandEnvVars(ret);
    503 #endif
    504             // expand environment variables in the form $(ENVVAR)
    505             int rep;
    506             QRegExp reg_var(QLatin1String("\\$\\(.*\\)"));
    507             reg_var.setMinimal(true);
    508             while((rep = reg_var.indexIn(ret)) != -1) {
    509                 ret.replace(rep, reg_var.matchedLength(),
    510                             QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,
    511                                 reg_var.matchedLength() - 3).toLatin1().constData()).constData()));
    512             }
    513504
    514505#ifdef QLIBRARYINFO_EPOCROOT
    515506            // $${EPOCROOT} is a special case, resolve it similarly to qmake.
     507
    516508            QRegExp epocrootMatcher(QLatin1String("\\$\\$\\{EPOCROOT\\}"));
    517509            if ((rep = epocrootMatcher.indexIn(ret)) != -1)
Note: See TracChangeset for help on using the changeset viewer.