diff -r 56cd8111b7f7 -r 41300fa6a67c src/corelib/global/qlibraryinfo.cpp --- a/src/corelib/global/qlibraryinfo.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/src/corelib/global/qlibraryinfo.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -46,7 +46,11 @@ #include "qlibraryinfo.h" #include "qscopedpointer.h" -#ifdef QT_BUILD_QMAKE +#if defined(QT_BUILD_QMAKE) || defined(QT_BOOTSTRAPPED) +# define BOOTSTRAPPING +#endif + +#ifdef BOOTSTRAPPING QT_BEGIN_NAMESPACE extern QString qmake_libraryInfoFile(); QT_END_NAMESPACE @@ -91,7 +95,7 @@ QLibrarySettings::QLibrarySettings() : settings(QLibraryInfoPrivate::findConfiguration()) { -#ifndef QT_BUILD_QMAKE +#ifndef BOOTSTRAPPING qAddPostRoutine(QLibraryInfoPrivate::cleanup); #endif } @@ -99,7 +103,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration() { QString qtconfig = QLatin1String(":/qt/etc/qt.conf"); -#ifdef QT_BUILD_QMAKE +#ifdef BOOTSTRAPPING if(!QFile::exists(qtconfig)) qtconfig = qmake_libraryInfoFile(); #else @@ -208,6 +212,19 @@ } /*! + \since 4.6 + Returns the installation date for this build of Qt. The install date will + usually be the last time that Qt sources were configured. +*/ +#ifndef QT_NO_DATESTRING +QDate +QLibraryInfo::buildDate() +{ + return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate); +} +#endif //QT_NO_DATESTRING + +/*! Returns the location specified by \a loc. */ @@ -412,7 +429,7 @@ if (QDir::isRelativePath(ret)) { if (loc == PrefixPath) { // we make the prefix path absolute to the executable's directory -#ifdef QT_BUILD_QMAKE +#ifdef BOOTSTRAPPING return QFileInfo(qmake_libraryInfoFile()).absolutePath(); #else if (QCoreApplication::instance()) { @@ -481,12 +498,20 @@ "Contact: Nokia Corporation (qt-info@nokia.com)\n" "\n" "Build key: " QT_BUILD_KEY "\n" + "Build date: %s\n" "Installation prefix: %s\n" "Library path: %s\n" "Include path: %s\n", + qt_configure_installation + 12, qt_configure_prefix_path_str + 12, qt_configure_libraries_path_str + 12, qt_configure_headers_path_str + 12); + +#ifdef QT_EVAL + extern void qt_core_eval_init(uint); + qt_core_eval_init(1); +#endif + exit(0); }