forked from qt-creator/qt-creator
Make Qt Creator build with -Werror=date-time
As a part of making the Qt Creator build reproducible, ensure that the build time isn't by default encoded into the binaries. Change-Id: I92bc3c2e832d5397bc1e2599214ef3ba911fed0b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -279,8 +279,8 @@ extern "C" HRESULT CALLBACK pid(CIDebugClient *client, PCSTR args)
|
|||||||
|
|
||||||
int token;
|
int token;
|
||||||
commandTokens<StringList>(args, &token);
|
commandTokens<StringList>(args, &token);
|
||||||
dprintf("Qt Creator CDB extension version 3.3 %d bit built %s.\n",
|
dprintf("Qt Creator CDB extension version 3.3 %d bit.\n",
|
||||||
sizeof(void *) * 8, __DATE__);
|
sizeof(void *) * 8);
|
||||||
if (const ULONG pid = currentProcessId(client))
|
if (const ULONG pid = currentProcessId(client))
|
||||||
ExtensionContext::instance().report('R', token, 0, "pid", "%u", pid);
|
ExtensionContext::instance().report('R', token, 0, "pid", "%u", pid);
|
||||||
else
|
else
|
||||||
@@ -940,7 +940,7 @@ extern "C" HRESULT CALLBACK setparameter(CIDebugClient *, PCSTR args)
|
|||||||
extern "C" HRESULT CALLBACK help(CIDebugClient *, PCSTR)
|
extern "C" HRESULT CALLBACK help(CIDebugClient *, PCSTR)
|
||||||
{
|
{
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
str << "### Qt Creator CDB extension built " << __DATE__ << "\n\n";
|
str << "### Qt Creator CDB extension" << "\n\n";
|
||||||
|
|
||||||
const size_t commandCount = sizeof(commandDescriptions)/sizeof(CommandDescription);
|
const size_t commandCount = sizeof(commandDescriptions)/sizeof(CommandDescription);
|
||||||
std::copy(commandDescriptions, commandDescriptions + commandCount,
|
std::copy(commandDescriptions, commandDescriptions + commandCount,
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ QT += help \
|
|||||||
script \
|
script \
|
||||||
sql
|
sql
|
||||||
|
|
||||||
|
# embedding build time information prevents repeatedly binary exact versions from same source code
|
||||||
|
isEmpty(QTC_SHOW_BUILD_DATE): QTC_SHOW_BUILD_DATE = $$(QTC_SHOW_BUILD_DATE)
|
||||||
|
!isEmpty(QTC_SHOW_BUILD_DATE): DEFINES += QTC_SHOW_BUILD_DATE
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
win32-msvc*:QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
|
win32-msvc*:QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
|
||||||
SOURCES += corejsextensions.cpp \
|
SOURCES += corejsextensions.cpp \
|
||||||
|
|||||||
@@ -63,23 +63,28 @@ VersionDialog::VersionDialog(QWidget *parent)
|
|||||||
//: This gets conditionally inserted as argument %8 into the description string.
|
//: This gets conditionally inserted as argument %8 into the description string.
|
||||||
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(Constants::IDE_REVISION_STR).left(10));
|
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(Constants::IDE_REVISION_STR).left(10));
|
||||||
#endif
|
#endif
|
||||||
|
QString buildDateInfo;
|
||||||
|
#ifdef QTC_SHOW_BUILD_DATE
|
||||||
|
buildDateInfo = tr("Built on %1 %2<br/>").arg(QLatin1String(__DATE__), QLatin1String(__TIME__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const QString description = tr(
|
const QString description = tr(
|
||||||
"<h3>%1</h3>"
|
"<h3>%1</h3>"
|
||||||
"%2<br/>"
|
"%2<br/>"
|
||||||
"<br/>"
|
"<br/>"
|
||||||
"Built on %3 at %4<br />"
|
"%3"
|
||||||
"<br/>"
|
"<br/>"
|
||||||
"%5"
|
"%4"
|
||||||
"<br/>"
|
"<br/>"
|
||||||
"Copyright 2008-%6 %7. All rights reserved.<br/>"
|
"Copyright 2008-%5 %6. All rights reserved.<br/>"
|
||||||
"<br/>"
|
"<br/>"
|
||||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
||||||
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
||||||
"PARTICULAR PURPOSE.<br/>")
|
"PARTICULAR PURPOSE.<br/>")
|
||||||
.arg(ICore::versionString(),
|
.arg(ICore::versionString(),
|
||||||
ICore::buildCompatibilityString(),
|
ICore::buildCompatibilityString(),
|
||||||
QLatin1String(__DATE__), QLatin1String(__TIME__),
|
buildDateInfo,
|
||||||
ideRev,
|
ideRev,
|
||||||
QLatin1String(Constants::IDE_YEAR),
|
QLatin1String(Constants::IDE_YEAR),
|
||||||
QLatin1String(Constants::IDE_AUTHOR));
|
QLatin1String(Constants::IDE_AUTHOR));
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ void CrashHandlerDialog::setApplicationInfo(const QString &signalName)
|
|||||||
revision = QLatin1Char(' ') + tr("from revision %1").arg(QString::fromLatin1(Core::Constants::IDE_REVISION_STR).left(10));
|
revision = QLatin1Char(' ') + tr("from revision %1").arg(QString::fromLatin1(Core::Constants::IDE_REVISION_STR).left(10));
|
||||||
#endif
|
#endif
|
||||||
const QString versionInformation = tr(
|
const QString versionInformation = tr(
|
||||||
"%1 %2%3, built on %4 at %5, based on Qt %6 (%7 bit)\n")
|
"%1 %2%3, based on Qt %4 (%5 bit)\n")
|
||||||
.arg(ideName, QLatin1String(Core::Constants::IDE_VERSION_LONG), revision,
|
.arg(ideName, QLatin1String(Core::Constants::IDE_VERSION_LONG), revision,
|
||||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(QT_VERSION_STR),
|
QLatin1String(QT_VERSION_STR),
|
||||||
QString::number(QSysInfo::WordSize));
|
QString::number(QSysInfo::WordSize));
|
||||||
m_ui->debugInfoEdit->append(versionInformation);
|
m_ui->debugInfoEdit->append(versionInformation);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user