summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-12 19:27:09 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-13 03:42:47 +0200
commit1d999dadebf3d030984d6f583e6d1fba89b1cab8 (patch)
tree59290116acb4e3a989399106b1510eae97c8dc9f /qmake
parent8400896cfe3fbef7666329a2920bd0dbdd5890af (diff)
replace qmake_version() with a simple string literal
Change-Id: I12e715aab23e01267e8a1434a3a965276c1a6182 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/projectgenerator.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
-rw-r--r--qmake/option.cpp17
-rw-r--r--qmake/option.h5
-rw-r--r--qmake/property.cpp2
6 files changed, 6 insertions, 24 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 5bd96a1466..0764661ceb 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2241,7 +2241,7 @@ MakefileGenerator::writeHeader(QTextStream &t)
{
t << "#############################################################################" << endl;
t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl;
- t << "# Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString() << endl;
t << "# Project: " << fileFixify(project->projectFile()) << endl;
t << "# Template: " << var("TEMPLATE") << endl;
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 0d3f6a019f..84b3875f2c 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -345,7 +345,7 @@ bool
ProjectGenerator::writeMakefile(QTextStream &t)
{
t << "######################################################################" << endl;
- t << "# Automatically generated by qmake (" << qmake_version() << ") " << QDateTime::currentDateTime().toString() << endl;
+ t << "# Automatically generated by qmake (" QMAKE_VERSION_STR ") " << QDateTime::currentDateTime().toString() << endl;
t << "######################################################################" << endl << endl;
if (!Option::globals->precmds.isEmpty())
t << Option::globals->precmds << endl;
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index abb013fe8e..f8b482714d 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1296,7 +1296,7 @@ UnixMakefileGenerator::writeLibtoolFile()
QTextStream t(&ft);
t << "# " << lname << " - a libtool library file\n";
- t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt "
+ t << "# Generated by qmake/libtool (" QMAKE_VERSION_STR ") (Qt "
<< QT_VERSION_STR << ") on: " << QDateTime::currentDateTime().toString();
t << "\n";
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 7bb37946c6..3c96ddd6e9 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -222,7 +222,7 @@ Option::parseCommandLine(QStringList &args)
fprintf(stdout,
"QMake version %s\n"
"Using Qt version %s in %s\n",
- qmake_version(), QT_VERSION_STR,
+ QMAKE_VERSION_STR, QT_VERSION_STR,
QLibraryInfo::location(QLibraryInfo::LibrariesPath).toLatin1().constData());
#ifdef QMAKE_OPENSOURCE_VERSION
fprintf(stdout, "QMake is Open Source software from Nokia Corporation and/or its subsidiary(-ies).\n");
@@ -560,21 +560,6 @@ Option::fixString(QString string, uchar flags)
return string;
}
-const char *qmake_version()
-{
- static char *ret = NULL;
- if(ret)
- return ret;
- ret = (char *)malloc(15);
- qmakeAddCacheClear(qmakeFreeCacheClear, (void**)&ret);
-#if defined(_MSC_VER) && _MSC_VER >= 1400
- sprintf_s(ret, 15, "%d.%02d%c", QMAKE_VERSION_MAJOR, QMAKE_VERSION_MINOR, 'a' + QMAKE_VERSION_PATCH);
-#else
- sprintf(ret, "%d.%02d%c", QMAKE_VERSION_MAJOR, QMAKE_VERSION_MINOR, 'a' + QMAKE_VERSION_PATCH);
-#endif
- return ret;
-}
-
void debug_msg_internal(int level, const char *fmt, ...)
{
if(Option::debug_level < level)
diff --git a/qmake/option.h b/qmake/option.h
index 28ac860f88..aac2cebd25 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -53,10 +53,7 @@
QT_BEGIN_NAMESPACE
-#define QMAKE_VERSION_MAJOR 2
-#define QMAKE_VERSION_MINOR 1
-#define QMAKE_VERSION_PATCH 0
-const char *qmake_version();
+#define QMAKE_VERSION_STR "2.01a"
QString qmake_getpwd();
bool qmake_setpwd(const QString &p);
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 5b34d2d3e6..c396385a39 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -85,7 +85,7 @@ QMakeProperty::QMakeProperty() : settings(0)
}
m_values[ProKey(name)] = val;
}
- m_values["QMAKE_VERSION"] = ProString(qmake_version());
+ m_values["QMAKE_VERSION"] = ProString(QMAKE_VERSION_STR);
#ifdef QT_VERSION_STR
m_values["QT_VERSION"] = ProString(QT_VERSION_STR);
#endif