qmake: Use qVersion for version reporting instead of QT_VERSION_STR
Apart from being consistent with qtpaths (which uses qVersion()), this also ensures that Qt Creator loads correct debug helpers for types like QString when debugging qmake. As a drive by, remove all QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH defines which are not used anywhere. Change-Id: Ibc8f2a6af833e1ec6e6cd6e1937ac3c1ab328555 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
9b92c5314e
commit
a783c3d574
@ -34,10 +34,6 @@ target_compile_definitions(QtLibraryInfo PUBLIC
|
||||
QT_BUILD_QMAKE
|
||||
QT_USE_QSTRINGBUILDER
|
||||
QT_NO_FOREACH
|
||||
QT_VERSION_STR="${PROJECT_VERSION}" # special case
|
||||
QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
|
||||
QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
|
||||
QT_VERSION_PATCH=${PROJECT_VERSION_PATCH} # special case
|
||||
QT_HOST_MKSPEC="${QT_QMAKE_HOST_MKSPEC}"
|
||||
QT_TARGET_MKSPEC="${QT_QMAKE_TARGET_MKSPEC}"
|
||||
QT_HOST_DATADIR="${hostdatadir}"
|
||||
|
@ -2322,7 +2322,7 @@ MakefileGenerator::writeHeader(QTextStream &t)
|
||||
{
|
||||
t << "#############################################################################\n";
|
||||
t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << Qt::endl;
|
||||
t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")\n";
|
||||
t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " << qVersion() << ")\n";
|
||||
t << "# Project: " << fileFixify(project->projectFile()) << Qt::endl;
|
||||
t << "# Template: " << var("TEMPLATE") << Qt::endl;
|
||||
if(!project->isActiveConfig("build_pass"))
|
||||
|
@ -1500,7 +1500,7 @@ UnixMakefileGenerator::writeLibtoolFile()
|
||||
QTextStream t(&ft);
|
||||
t << "# " << lname << " - a libtool library file\n";
|
||||
t << "# Generated by qmake/libtool (" QMAKE_VERSION_STR ") (Qt "
|
||||
<< QT_VERSION_STR << ")";
|
||||
<< qVersion() << ")";
|
||||
t << "\n";
|
||||
|
||||
t << "# The name that we can dlopen(3).\n"
|
||||
|
@ -224,7 +224,7 @@ Option::parseCommandLine(QStringList &args, QMakeCmdLineParserState &state)
|
||||
fprintf(stdout,
|
||||
"QMake version %s\n"
|
||||
"Using Qt version %s in %s\n",
|
||||
QMAKE_VERSION_STR, QT_VERSION_STR,
|
||||
QMAKE_VERSION_STR, qVersion(),
|
||||
QMakeLibraryInfo::path(QLibraryInfo::LibrariesPath)
|
||||
.toLatin1()
|
||||
.constData());
|
||||
|
@ -100,9 +100,7 @@ void QMakeProperty::reload()
|
||||
#ifdef QMAKE_VERSION_STR
|
||||
m_values["QMAKE_VERSION"] = ProString(QMAKE_VERSION_STR);
|
||||
#endif
|
||||
#ifdef QT_VERSION_STR
|
||||
m_values["QT_VERSION"] = ProString(QT_VERSION_STR);
|
||||
#endif
|
||||
m_values["QT_VERSION"] = ProString(qVersion());
|
||||
}
|
||||
|
||||
QMakeProperty::~QMakeProperty()
|
||||
@ -168,9 +166,7 @@ int QMakeProperty::queryProperty(const QStringList &optionProperties,
|
||||
#ifdef QMAKE_VERSION_STR
|
||||
specialProps.append("QMAKE_VERSION");
|
||||
#endif
|
||||
#ifdef QT_VERSION_STR
|
||||
specialProps.append("QT_VERSION");
|
||||
#endif
|
||||
for (const QString &prop : qAsConst(specialProps)) {
|
||||
ProString val = value(ProKey(prop));
|
||||
ProString pval = value(ProKey(prop + "/raw"));
|
||||
|
Loading…
Reference in New Issue
Block a user