summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/cachekeys.h4
-rw-r--r--qmake/generators/integrity/gbuild.cpp4
-rw-r--r--qmake/generators/integrity/gbuild.h4
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp4
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h4
-rw-r--r--qmake/generators/makefile.cpp6
-rw-r--r--qmake/generators/makefile.h4
-rw-r--r--qmake/generators/makefiledeps.cpp4
-rw-r--r--qmake/generators/makefiledeps.h4
-rw-r--r--qmake/generators/metamakefile.cpp4
-rw-r--r--qmake/generators/metamakefile.h4
-rw-r--r--qmake/generators/projectgenerator.cpp4
-rw-r--r--qmake/generators/projectgenerator.h4
-rw-r--r--qmake/generators/unix/unixmake.cpp4
-rw-r--r--qmake/generators/unix/unixmake.h4
-rw-r--r--qmake/generators/unix/unixmake2.cpp4
-rw-r--r--qmake/generators/win32/borland_bmake.cpp4
-rw-r--r--qmake/generators/win32/borland_bmake.h4
-rw-r--r--qmake/generators/win32/mingw_make.cpp4
-rw-r--r--qmake/generators/win32/mingw_make.h4
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp4
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.h4
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp4
-rw-r--r--qmake/generators/win32/msvc_nmake.h4
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp4
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h4
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp18
-rw-r--r--qmake/generators/win32/msvc_vcproj.h4
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp4
-rw-r--r--qmake/generators/win32/msvc_vcxproj.h4
-rw-r--r--qmake/generators/win32/winmakefile.cpp4
-rw-r--r--qmake/generators/win32/winmakefile.h4
-rw-r--r--qmake/generators/xmloutput.cpp4
-rw-r--r--qmake/generators/xmloutput.h4
-rw-r--r--qmake/main.cpp30
-rw-r--r--qmake/meta.cpp30
-rw-r--r--qmake/meta.h4
-rw-r--r--qmake/option.cpp15
-rw-r--r--qmake/option.h16
-rw-r--r--qmake/project.cpp87
-rw-r--r--qmake/project.h6
-rw-r--r--qmake/property.cpp4
-rw-r--r--qmake/property.h4
-rw-r--r--qmake/qmake_pch.h4
44 files changed, 194 insertions, 158 deletions
diff --git a/qmake/cachekeys.h b/qmake/cachekeys.h
index 64d068a6e6..c164304f31 100644
--- a/qmake/cachekeys.h
+++ b/qmake/cachekeys.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp
index e3d1d69598..c72c120f39 100644
--- a/qmake/generators/integrity/gbuild.cpp
+++ b/qmake/generators/integrity/gbuild.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/integrity/gbuild.h b/qmake/generators/integrity/gbuild.h
index 67646186e7..8c09fb3e7f 100644
--- a/qmake/generators/integrity/gbuild.h
+++ b/qmake/generators/integrity/gbuild.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index d6b2235e31..b78ebd136d 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h
index f4568be0f7..cfda5aa9ff 100644
--- a/qmake/generators/mac/pbuilder_pbx.h
+++ b/qmake/generators/mac/pbuilder_pbx.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 564d44d98f..59e17b0bea 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -2489,7 +2489,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
//qmake it
if(!subtarget->profile.isEmpty()) {
QString out = subtarget->makefile;
- QString in = fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute);
+ QString in = escapeFilePath(fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute));
if(out.startsWith(in_directory))
out = out.mid(in_directory.length());
t << mkfile << ": " << "\n\t";
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 4324a9455a..68d247a8f3 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index 85fbe1e393..d28d48b4d0 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h
index 963ade85e9..55a776c84f 100644
--- a/qmake/generators/makefiledeps.h
+++ b/qmake/generators/makefiledeps.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index e60d1c44ec..b9fec023ab 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h
index babf2f0ec6..4e2e7c502e 100644
--- a/qmake/generators/metamakefile.h
+++ b/qmake/generators/metamakefile.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index ddbee4b39a..4d1a310daf 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h
index 562b108dc9..2edac95852 100644
--- a/qmake/generators/projectgenerator.h
+++ b/qmake/generators/projectgenerator.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index c5e43b0552..856bf371a7 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index 12b42f7bf2..24e8c45264 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 173be72919..490b76e494 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp
index 086636f219..bf1041f9f5 100644
--- a/qmake/generators/win32/borland_bmake.cpp
+++ b/qmake/generators/win32/borland_bmake.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/borland_bmake.h b/qmake/generators/win32/borland_bmake.h
index 603c413244..469acaad31 100644
--- a/qmake/generators/win32/borland_bmake.h
+++ b/qmake/generators/win32/borland_bmake.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index c82259e5ae..03460551a9 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index fda1ca4187..08d87cb916 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index de95ad10be..3410c296ce 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h
index 5e9d06dd9f..72a405f0ab 100644
--- a/qmake/generators/win32/msbuild_objectmodel.h
+++ b/qmake/generators/win32/msbuild_objectmodel.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index f75ea05567..4d52c4be2e 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h
index c758d5eb81..d0e6ec7aaf 100644
--- a/qmake/generators/win32/msvc_nmake.h
+++ b/qmake/generators/win32/msvc_nmake.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 96c230e98c..81f541f94e 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 7a530c8e5a..8b1cf519ff 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 55d3fa8455..109b50fd94 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -305,6 +305,16 @@ struct VcsolutionDepend {
QStringList dependencies;
};
+/* Disable optimization in getProjectUUID() due to a compiler
+ * bug in MSVC 2010 that causes ASSERT: "&other != this" in the QString
+ * copy constructor for non-empty file names at:
+ * filename.isEmpty()?project->first("QMAKE_MAKEFILE"):filename */
+
+#ifdef Q_CC_MSVC
+# pragma optimize( "g", off )
+# pragma warning ( disable : 4748 )
+#endif
+
QUuid VcprojGenerator::getProjectUUID(const QString &filename)
{
bool validUUID = true;
@@ -335,6 +345,10 @@ QUuid VcprojGenerator::getProjectUUID(const QString &filename)
return uuid;
}
+#ifdef Q_CC_MSVC
+# pragma optimize( "g", on )
+#endif
+
QUuid VcprojGenerator::increaseUUID(const QUuid &id)
{
QUuid result(id);
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 35ac670c62..30b149f8f5 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 5d2047fd2f..bcaea867d4 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/msvc_vcxproj.h b/qmake/generators/win32/msvc_vcxproj.h
index 0c43a0a8d8..70e8c75ed6 100644
--- a/qmake/generators/win32/msvc_vcxproj.h
+++ b/qmake/generators/win32/msvc_vcxproj.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 11927dbd94..5f0828383f 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index 1e8b706088..9fd4f903da 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp
index 1b39f38203..f7fa547a75 100644
--- a/qmake/generators/xmloutput.cpp
+++ b/qmake/generators/xmloutput.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/generators/xmloutput.h b/qmake/generators/xmloutput.h
index 6560ebc7b6..fc62d58a40 100644
--- a/qmake/generators/xmloutput.h
+++ b/qmake/generators/xmloutput.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 99015177b2..38e09f60fd 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -103,8 +103,8 @@ int runQMake(int argc, char **argv)
if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/")))
#endif
{
- if(oldpwd.right(1) != QString(QChar(QDir::separator())))
- oldpwd += QDir::separator();
+ if(!oldpwd.endsWith(QLatin1Char('/')))
+ oldpwd += QLatin1Char('/');
}
Option::output_dir = oldpwd; //for now this is the output dir
@@ -141,28 +141,33 @@ int runQMake(int argc, char **argv)
for(QStringList::Iterator pfile = files.begin(); pfile != files.end(); pfile++) {
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
- QString fn = Option::fixPathToLocalOS((*pfile));
+ QString fn = Option::normalizePath(*pfile);
if(!QFile::exists(fn)) {
- fprintf(stderr, "Cannot find file: %s.\n", fn.toLatin1().constData());
+ fprintf(stderr, "Cannot find file: %s.\n",
+ QDir::toNativeSeparators(fn).toLatin1().constData());
exit_val = 2;
continue;
}
//setup pwd properly
- debug_msg(1, "Resetting dir to: %s", oldpwd.toLatin1().constData());
+ debug_msg(1, "Resetting dir to: %s",
+ QDir::toNativeSeparators(oldpwd).toLatin1().constData());
qmake_setpwd(oldpwd); //reset the old pwd
- int di = fn.lastIndexOf(QDir::separator());
+ int di = fn.lastIndexOf(QLatin1Char('/'));
if(di != -1) {
- debug_msg(1, "Changing dir to: %s", fn.left(di).toLatin1().constData());
+ debug_msg(1, "Changing dir to: %s",
+ QDir::toNativeSeparators(fn.left(di)).toLatin1().constData());
if(!qmake_setpwd(fn.left(di)))
- fprintf(stderr, "Cannot find directory: %s\n", fn.left(di).toLatin1().constData());
+ fprintf(stderr, "Cannot find directory: %s\n",
+ QDir::toNativeSeparators(fn.left(di)).toLatin1().constData());
fn = fn.right(fn.length() - di - 1);
}
// read project..
if(!project.read(fn)) {
fprintf(stderr, "Error processing project file: %s\n",
- fn == "-" ? "(stdin)" : (*pfile).toLatin1().constData());
+ fn == QLatin1String("-") ?
+ "(stdin)" : QDir::toNativeSeparators(*pfile).toLatin1().constData());
exit_val = 3;
continue;
}
@@ -179,7 +184,8 @@ int runQMake(int argc, char **argv)
if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
fprintf(stderr, "Unable to generate project file.\n");
else
- fprintf(stderr, "Unable to generate makefile for: %s\n", (*pfile).toLatin1().constData());
+ fprintf(stderr, "Unable to generate makefile for: %s\n",
+ QDir::toNativeSeparators(*pfile).toLatin1().constData());
exit_val = 5;
}
delete mkfile;
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
index f5edff3ceb..ecd78e3455 100644
--- a/qmake/meta.cpp
+++ b/qmake/meta.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -75,13 +75,14 @@ QMakeMetaInfo::readLib(QString lib)
meta_type = "libtool";
} else if(meta_file.endsWith(Option::prl_ext)) {
QMakeProject proj;
- if(!proj.read(Option::fixPathToLocalOS(meta_file), QMakeProject::ReadProFile))
+ if(!proj.read(Option::normalizePath(meta_file), QMakeProject::ReadProFile))
return false;
meta_type = "qmake";
vars = proj.variables();
ret = true;
} else {
- warn_msg(WarnLogic, "QMakeMetaInfo: unknown file format for %s", meta_file.toLatin1().constData());
+ warn_msg(WarnLogic, "QMakeMetaInfo: unknown file format for %s",
+ QDir::toNativeSeparators(meta_file).toLatin1().constData());
}
}
if(ret)
@@ -102,8 +103,8 @@ QMakeMetaInfo::findLib(QString lib)
{
if((lib[0] == '\'' || lib[0] == '"') &&
lib[lib.length()-1] == lib[0])
- lib = lib.mid(1, lib.length()-2);
- lib = Option::fixPathToLocalOS(lib);
+ lib = lib.mid(1, lib.length()-2);
+ lib = Option::normalizePath(lib);
QString ret;
QString extns[] = { Option::prl_ext, /*Option::pkgcfg_ext, Option::libtool_ext,*/ QString() };
@@ -133,13 +134,14 @@ QMakeMetaInfo::readLibtoolFile(const QString &f)
{
/* I can just run the .la through the .pro parser since they are compatible.. */
QMakeProject proj;
- if(!proj.read(Option::fixPathToLocalOS(f), QMakeProject::ReadProFile))
+ QString nf = Option::normalizePath(f);
+ if(!proj.read(nf, QMakeProject::ReadProFile))
return false;
- QString dirf = Option::fixPathToTargetOS(f).section(Option::dir_sep, 0, -2);
- if(dirf == f)
+ QString dirf = nf.section(QLatin1Char('/'), 0, -2);
+ if(dirf == nf)
dirf = "";
else if(!dirf.isEmpty() && !dirf.endsWith(Option::output_dir))
- dirf += Option::dir_sep;
+ dirf += QLatin1Char('/');
QHash<QString, QStringList> &v = proj.variables();
for(QHash<QString, QStringList>::Iterator it = v.begin(); it != v.end(); ++it) {
QStringList lst = it.value();
@@ -152,18 +154,18 @@ QMakeMetaInfo::readLibtoolFile(const QString &f)
if((dir.startsWith("'") || dir.startsWith("\"")) && dir.endsWith(QString(dir[0])))
dir = dir.mid(1, dir.length() - 2);
dir = dir.trimmed();
- if(!dir.isEmpty() && !dir.endsWith(Option::dir_sep))
- dir += Option::dir_sep;
+ if(!dir.isEmpty() && !dir.endsWith(QLatin1Char('/')))
+ dir += QLatin1Char('/');
if(lst.count() == 1)
lst = lst.first().split(" ");
for(QStringList::Iterator lst_it = lst.begin(); lst_it != lst.end(); ++lst_it) {
bool found = false;
- QString dirs[] = { "", dir, dirf, dirf + ".libs" + QDir::separator(), "(term)" };
+ QString dirs[] = { "", dir, dirf, dirf + ".libs/", "(term)" };
for(int i = 0; !found && dirs[i] != "(term)"; i++) {
if(QFile::exists(dirs[i] + (*lst_it))) {
QString targ = dirs[i] + (*lst_it);
if(QDir::isRelativePath(targ))
- targ.prepend(qmake_getpwd() + QDir::separator());
+ targ.prepend(qmake_getpwd() + QLatin1Char('/'));
vars["QMAKE_PRL_TARGET"] << targ;
found = true;
}
diff --git a/qmake/meta.h b/qmake/meta.h
index d20fc97924..71d7f5f2de 100644
--- a/qmake/meta.h
+++ b/qmake/meta.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 8ad8a22f79..431299b46b 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -659,9 +659,16 @@ Option::fixString(QString string, uchar flags)
if(string.length() > 2 && string[0].isLetter() && string[1] == QLatin1Char(':'))
string[0] = string[0].toLower();
+ bool localSep = (flags & Option::FixPathToLocalSeparators) != 0;
+ bool targetSep = (flags & Option::FixPathToTargetSeparators) != 0;
+ bool normalSep = (flags & Option::FixPathToNormalSeparators) != 0;
+
+ // either none or only one active flag
+ Q_ASSERT(localSep + targetSep + normalSep <= 1);
//fix separators
- Q_ASSERT(!((flags & Option::FixPathToLocalSeparators) && (flags & Option::FixPathToTargetSeparators)));
- if(flags & Option::FixPathToLocalSeparators) {
+ if (flags & Option::FixPathToNormalSeparators) {
+ string = string.replace('\\', '/');
+ } else if (flags & Option::FixPathToLocalSeparators) {
#if defined(Q_OS_WIN32)
string = string.replace('/', '\\');
#else
diff --git a/qmake/option.h b/qmake/option.h
index ffccb8efc5..ee8a1c2403 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -115,7 +115,8 @@ struct Option
FixEnvVars = 0x01,
FixPathCanonicalize = 0x02,
FixPathToLocalSeparators = 0x04,
- FixPathToTargetSeparators = 0x08
+ FixPathToTargetSeparators = 0x08,
+ FixPathToNormalSeparators = 0x10
};
static QString fixString(QString string, uchar flags);
@@ -138,6 +139,15 @@ struct Option
flags |= FixPathCanonicalize;
return fixString(in, flags);
}
+ inline static QString normalizePath(const QString &in, bool fix_env=true, bool canonical=true)
+ {
+ uchar flags = FixPathToNormalSeparators;
+ if (fix_env)
+ flags |= FixEnvVars;
+ if (canonical)
+ flags |= FixPathCanonicalize;
+ return fixString(in, flags);
+ }
inline static bool hasFileExtension(const QString &str, const QStringList &extensions)
{
diff --git a/qmake/project.cpp b/qmake/project.cpp
index eb2b10b92f..d898483a47 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -532,24 +532,24 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
{
QStringList concat;
{
- const QString base_concat = QDir::separator() + QString("features");
+ const QString base_concat = QLatin1String("/features");
switch(Option::target_mode) {
case Option::TARG_MACX_MODE: //also a unix
- concat << base_concat + QDir::separator() + "mac";
- concat << base_concat + QDir::separator() + "macx";
- concat << base_concat + QDir::separator() + "unix";
+ concat << base_concat + QLatin1String("/mac");
+ concat << base_concat + QLatin1String("/macx");
+ concat << base_concat + QLatin1String("/unix");
break;
default: // Can't happen, just make the compiler shut up
case Option::TARG_UNIX_MODE:
- concat << base_concat + QDir::separator() + "unix";
+ concat << base_concat + QLatin1String("/unix");
break;
case Option::TARG_WIN_MODE:
- concat << base_concat + QDir::separator() + "win32";
+ concat << base_concat + QLatin1String("/win32");
break;
}
concat << base_concat;
}
- const QString mkspecs_concat = QDir::separator() + QString("mkspecs");
+ const QString mkspecs_concat = QLatin1String("/mkspecs");
QStringList feature_roots;
QByteArray mkspec_path = qgetenv("QMAKEFEATURES");
if(!mkspec_path.isNull())
@@ -558,9 +558,9 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
feature_roots += splitPathList(prop->value("QMAKEFEATURES"));
if(!Option::mkfile::cachefile.isEmpty()) {
QString path;
- int last_slash = Option::mkfile::cachefile.lastIndexOf(QDir::separator());
+ int last_slash = Option::mkfile::cachefile.lastIndexOf(QLatin1Char('/'));
if(last_slash != -1)
- path = Option::fixPathToLocalOS(Option::mkfile::cachefile.left(last_slash), false);
+ path = Option::normalizePath(Option::mkfile::cachefile.left(last_slash), false);
for(QStringList::Iterator concat_it = concat.begin();
concat_it != concat.end(); ++concat_it)
feature_roots << (path + (*concat_it));
@@ -575,14 +575,14 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
}
}
if(!Option::mkfile::qmakespec.isEmpty())
- feature_roots << Option::mkfile::qmakespec + QDir::separator() + "features";
+ feature_roots << Option::mkfile::qmakespec + QLatin1String("/features");
if(!Option::mkfile::qmakespec.isEmpty()) {
QFileInfo specfi(Option::mkfile::qmakespec);
QDir specdir(specfi.absoluteFilePath());
while(!specdir.isRoot()) {
if(!specdir.cdUp() || specdir.isRoot())
break;
- if(QFile::exists(specdir.path() + QDir::separator() + "features")) {
+ if(QFile::exists(specdir.path() + QLatin1String("/features"))) {
for(QStringList::Iterator concat_it = concat.begin();
concat_it != concat.end(); ++concat_it)
feature_roots << (specdir.path() + (*concat_it));
@@ -604,7 +604,7 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
QStringList qmake_mkspec_paths()
{
QStringList ret;
- const QString concat = QDir::separator() + QString("mkspecs");
+ const QString concat = QLatin1String("/mkspecs");
QByteArray qmakepath = qgetenv("QMAKEPATH");
if (!qmakepath.isEmpty()) {
const QStringList lst = splitPathList(QString::fromLocal8Bit(qmakepath));
@@ -1232,10 +1232,10 @@ QMakeProject::read(const QString &file, QHash<QString, QStringList> &place)
reset();
const QString oldpwd = qmake_getpwd();
- QString filename = Option::fixPathToLocalOS(file, false);
+ QString filename = Option::normalizePath(file, false);
bool ret = false, using_stdin = false;
QFile qfile;
- if(!strcmp(filename.toLatin1(), "-")) {
+ if(filename == QLatin1String("-")) {
qfile.setFileName("");
ret = qfile.open(stdin, QIODevice::ReadOnly);
using_stdin = true;
@@ -1288,10 +1288,10 @@ QMakeProject::read(uchar cmd)
int cache_depth = -1;
QString qmake_cache = Option::mkfile::cachefile;
if(qmake_cache.isEmpty()) { //find it as it has not been specified
- QString dir = QDir::toNativeSeparators(Option::output_dir);
- while(!QFile::exists((qmake_cache = dir + QDir::separator() + ".qmake.cache"))) {
- dir = dir.left(dir.lastIndexOf(QDir::separator()));
- if(dir.isEmpty() || dir.indexOf(QDir::separator()) == -1) {
+ QString dir = Option::output_dir;
+ while(!QFile::exists((qmake_cache = dir + QLatin1String("/.qmake.cache")))) {
+ dir = dir.left(dir.lastIndexOf(QLatin1Char('/')));
+ if(dir.isEmpty() || dir.indexOf(QLatin1Char('/')) == -1) {
qmake_cache = "";
break;
}
@@ -1306,6 +1306,7 @@ QMakeProject::read(uchar cmd)
cache_depth = Option::output_dir.mid(abs_cache.length()).count('/');
}
if(!qmake_cache.isEmpty()) {
+ QHash<QString, QStringList> cache;
if(read(qmake_cache, cache)) {
Option::mkfile::cachefile_depth = cache_depth;
Option::mkfile::cachefile = qmake_cache;
@@ -1321,7 +1322,7 @@ QMakeProject::read(uchar cmd)
mkspec_roots.join("::").toLatin1().constData());
if(qmakespec.isEmpty()) {
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
- QString mkspec = (*it) + QDir::separator() + "default";
+ QString mkspec = (*it) + QLatin1String("/default");
QFileInfo default_info(mkspec);
if(default_info.exists() && default_info.isDir()) {
qmakespec = mkspec;
@@ -1343,7 +1344,7 @@ QMakeProject::read(uchar cmd)
} else {
bool found_mkspec = false;
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
- QString mkspec = (*it) + QDir::separator() + qmakespec;
+ QString mkspec = (*it) + QLatin1Char('/') + qmakespec;
if(QFile::exists(mkspec)) {
found_mkspec = true;
Option::mkfile::qmakespec = qmakespec = mkspec;
@@ -1359,9 +1360,9 @@ QMakeProject::read(uchar cmd)
}
// parse qmake configuration
- while(qmakespec.endsWith(QString(QChar(QDir::separator()))))
+ while(qmakespec.endsWith(QLatin1Char('/')))
qmakespec.truncate(qmakespec.length()-1);
- QString spec = qmakespec + QDir::separator() + "qmake.conf";
+ QString spec = qmakespec + QLatin1String("/qmake.conf");
debug_msg(1, "QMAKESPEC conf: reading %s", spec.toLatin1().constData());
if(!read(spec, base_vars)) {
fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.toLatin1().constData());
@@ -1635,7 +1636,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
if(!file.endsWith(Option::prf_ext))
file += Option::prf_ext;
validateModes(); // init dir_sep
- if(file.indexOf(Option::dir_sep) == -1 || !QFile::exists(file)) {
+ if(file.indexOf(QLatin1Char('/')) == -1 || !QFile::exists(file)) {
static QStringList *feature_roots = 0;
if(!feature_roots) {
feature_roots = new QStringList(qmake_feature_paths(prop));
@@ -1650,7 +1651,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
currFile = QFileInfo(currFile.canonicalFilePath());
for(int root = 0; root < feature_roots->size(); ++root) {
prfFile = QFileInfo(feature_roots->at(root) +
- QDir::separator() + file).canonicalFilePath();
+ QLatin1Char('/') + file).canonicalFilePath();
if(prfFile == currFile) {
start_root = root+1;
break;
@@ -1659,7 +1660,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
}
}
for(int root = start_root; root < feature_roots->size(); ++root) {
- QString prf(feature_roots->at(root) + QDir::separator() + file);
+ QString prf(feature_roots->at(root) + QLatin1Char('/') + file);
if(QFile::exists(prf + Option::js_ext)) {
format = JSFormat;
file = prf + Option::js_ext;
@@ -1683,9 +1684,9 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
include_roots << qmake_getpwd();
include_roots << Option::output_dir;
for(int root = 0; root < include_roots.size(); ++root) {
- QString testName = QDir::toNativeSeparators(include_roots[root]);
- if (!testName.endsWith(QString(QDir::separator())))
- testName += QDir::separator();
+ QString testName = QDir::fromNativeSeparators(include_roots[root]);
+ if (!testName.endsWith(QLatin1Char('/')))
+ testName += QLatin1Char('/');
testName += file;
if(QFile::exists(testName)) {
file = testName;
@@ -1711,10 +1712,10 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
file.toLatin1().constData());
QString orig_file = file;
- int di = file.lastIndexOf(QDir::separator());
+ int di = file.lastIndexOf(QLatin1Char('/'));
QString oldpwd = qmake_getpwd();
if(di != -1) {
- if(!qmake_setpwd(file.left(file.lastIndexOf(QDir::separator())))) {
+ if(!qmake_setpwd(file.left(file.lastIndexOf(QLatin1Char('/'))))) {
fprintf(stderr, "Cannot find directory: %s\n", file.left(di).toLatin1().constData());
return IncludeFailure;
}
@@ -1903,8 +1904,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
fprintf(stderr, "%s:%d: cat(file) requires one argument.\n",
parser.file.toLatin1().constData(), parser.line_no);
} else {
- QString file = args[0];
- file = Option::fixPathToLocalOS(file);
+ QString file = Option::normalizePath(args[0]);
bool singleLine = true;
if(args.count() > 1)
@@ -1927,8 +1927,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
fprintf(stderr, "%s:%d: fromfile(file, variable) requires two arguments.\n",
parser.file.toLatin1().constData(), parser.line_no);
} else {
- QString file = args[0], seek_var = args[1];
- file = Option::fixPathToLocalOS(file);
+ QString seek_var = args[1], file = Option::normalizePath(args[0]);
QHash<QString, QStringList> tmp;
if(doProjectInclude(file, IncludeFlagNewParser, tmp) == IncludeSuccess) {
@@ -2171,8 +2170,8 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
if(args.count() == 2)
recursive = (args[1].toLower() == "true" || args[1].toInt());
QStringList dirs;
- QString r = Option::fixPathToLocalOS(args[0]);
- int slash = r.lastIndexOf(QDir::separator());
+ QString r = Option::normalizePath(args[0]);
+ int slash = r.lastIndexOf(QLatin1Char('/'));
if(slash != -1) {
dirs.append(r.left(slash));
r = r.mid(slash+1);
@@ -2183,7 +2182,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
const QRegExp regex(r, Qt::CaseSensitive, QRegExp::Wildcard);
for(int d = 0; d < dirs.count(); d++) {
QString dir = dirs[d];
- if(!dir.isEmpty() && !dir.endsWith(QDir::separator()))
+ if (!dir.isEmpty() && !dir.endsWith(QLatin1Char('/')))
dir += "/";
QDir qdir(dir);
@@ -2411,14 +2410,13 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QS
parser.line_no);
return false;
}
- QString file = args.first();
- file = Option::fixPathToLocalOS(file);
+ QString file = Option::normalizePath(args.first());
if(QFile::exists(file))
return true;
//regular expression I guess
QString dirstr = qmake_getpwd();
- int slsh = file.lastIndexOf(QDir::separator());
+ int slsh = file.lastIndexOf(QLatin1Char('/'));
if(slsh != -1) {
dirstr = file.left(slsh+1);
file = file.right(file.length() - slsh - 1);
@@ -2580,7 +2578,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QS
bool ret = false;
QHash<QString, QStringList> tmp;
- if(doProjectInclude(Option::fixPathToLocalOS(args[0]), IncludeFlagNewParser, tmp) == IncludeSuccess) {
+ if(doProjectInclude(Option::normalizePath(args[0]), IncludeFlagNewParser, tmp) == IncludeSuccess) {
if(tmp.contains("QMAKE_INTERNAL_INCLUDED_FILES")) {
QStringList &out = place["QMAKE_INTERNAL_INCLUDED_FILES"];
const QStringList &in = tmp["QMAKE_INTERNAL_INCLUDED_FILES"];
@@ -2658,8 +2656,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QS
parser.line_no, func_desc.toLatin1().constData());
return false;
}
- QString file = args.first();
- file = Option::fixPathToLocalOS(file);
+ QString file = Option::normalizePath(args.first());
uchar flags = IncludeFlagNone;
if(!include_statement)
flags |= IncludeFlagFeature;
diff --git a/qmake/project.h b/qmake/project.h
index 8a49eb584d..83174455d1 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -84,7 +84,7 @@ class QMakeProject
QString pfile, cfile;
QMakeProperty *prop;
void reset();
- QHash<QString, QStringList> vars, base_vars, cache;
+ QHash<QString, QStringList> vars, base_vars;
bool parse(const QString &text, QHash<QString, QStringList> &place, int line_count=1);
enum IncludeStatus {
diff --git a/qmake/property.cpp b/qmake/property.cpp
index c1efef0d2b..4221605545 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/property.h b/qmake/property.h
index 22a8957e53..d67d0ad09d 100644
--- a/qmake/property.h
+++ b/qmake/property.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/qmake/qmake_pch.h b/qmake/qmake_pch.h
index a24c2f7c92..129d8937cb 100644
--- a/qmake/qmake_pch.h
+++ b/qmake/qmake_pch.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/