Skip to content

Commit

Permalink
Update QLibraryInfo::build() to use the arch-detection from QSysInfo
Browse files Browse the repository at this point in the history
Change-Id: Ib6ece8d1a8de28222e719deb4e14c5191b46b19f
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
thiagomacieira authored and The Qt Project committed May 12, 2014
1 parent 82a6d37 commit b323473
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/corelib/global/qlibraryinfo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2014 Intel Corporation
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
Expand Down Expand Up @@ -67,6 +68,7 @@ QString qt_libraryInfoFile()
#endif

#include "qconfig.cpp"
#include "archdetect.cpp"

QT_BEGIN_NAMESPACE

Expand Down Expand Up @@ -280,6 +282,12 @@ QLibraryInfo::buildDate()
#else
# define COMPILER_STRING "<unknown compiler>"
#endif
#ifdef QT_NO_DEBUG
# define DEBUG_STRING " release"
#else
# define DEBUG_STRING " debug"
#endif
#define QT_BUILD_STR "Qt " QT_VERSION_STR " (" __DATE__ "; " ARCH_FULL DEBUG_STRING " build; by " COMPILER_STRING ")"

/*!
Returns a string describing how this version of Qt was built.
Expand All @@ -291,21 +299,7 @@ QLibraryInfo::buildDate()

const char *QLibraryInfo::build() Q_DECL_NOTHROW
{
static const char data[] = "Qt " QT_VERSION_STR " (" __DATE__ ", "
COMPILER_STRING ", "
#if QT_POINTER_SIZE == 4
"32"
#else
"64"
#endif
" bit, "
#ifdef QT_NO_DEBUG
"release"
#else
"debug"
#endif
" build)";
return data;
return QT_BUILD_STR;
}

/*!
Expand Down Expand Up @@ -592,7 +586,7 @@ extern const char qt_core_interpreter[] __attribute__((section(".interp")))
extern "C" void qt_core_boilerplate();
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_VERSION_STR "\n"
printf("This is the QtCore library version " QT_BUILD_STR "\n"
"Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\n"
"Contact: http://www.qt-project.org/legal\n"
"\n"
Expand Down

0 comments on commit b323473

Please sign in to comment.