Merge dev into 5.5
Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
This commit is contained in:
commit
d34353a065
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
## Copyright (C) 2015 The Qt Company Ltd.
|
||||
## Contact: http://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the porting tools of the Qt Toolkit.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
## Copyright (C) 2015 The Qt Company Ltd.
|
||||
## Contact: http://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the build configuration tools of the Qt Toolkit.
|
||||
@ -379,6 +379,7 @@ sub fixPaths {
|
||||
|
||||
my $out = File::Spec->abs2rel(cleanupPath($file), cleanupPath($dir));
|
||||
$out =~ s,\\,/,g;
|
||||
$out = "\"$out\"" if ($out =~ / /);
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
|
@ -23,14 +23,14 @@ while [ "$#" -gt 0 ]; do
|
||||
PARAM=$1
|
||||
case $PARAM in
|
||||
-L*|-l*)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
LFLAGS="$LFLAGS \"$PARAM\""
|
||||
;;
|
||||
-I*)
|
||||
INC=`echo $PARAM | sed -e 's/^-I//'`
|
||||
INCLUDEPATH="$INCLUDEPATH $INC"
|
||||
INCLUDEPATH="$INCLUDEPATH \"$INC\""
|
||||
;;
|
||||
-D*)
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
CXXFLAGS="$CXXFLAGS \"$PARAM\""
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
@ -33,18 +33,18 @@ while [ "$#" -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
-F*|-m*|-x*)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
LFLAGS="$LFLAGS \"$PARAM\""
|
||||
CXXFLAGS="$CXXFLAGS \"$PARAM\""
|
||||
;;
|
||||
-L*|-l*|-pthread)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
LFLAGS="$LFLAGS \"$PARAM\""
|
||||
;;
|
||||
-I*)
|
||||
INC=`echo $PARAM | sed -e 's/^-I//'`
|
||||
INCLUDEPATH="$INCLUDEPATH $INC"
|
||||
INCLUDEPATH="$INCLUDEPATH \"$INC\""
|
||||
;;
|
||||
-f*|-D*)
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
CXXFLAGS="$CXXFLAGS \"$PARAM\""
|
||||
;;
|
||||
-Qoption)
|
||||
# Two-argument form for the Sun Compiler
|
||||
|
@ -1,3 +1,3 @@
|
||||
SOURCES = iconv.cpp
|
||||
CONFIG -= qt dylib
|
||||
mac|mingw|qnx:LIBS += -liconv
|
||||
mac|mingw|qnx|haiku:LIBS += -liconv
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
|
4
configure
vendored
4
configure
vendored
@ -3964,7 +3964,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
||||
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
||||
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
|
||||
|
||||
echo "BUILD_PATH = $adjoutpath" >> "$mkfile"
|
||||
echo "BUILD_PATH = .." >> "$mkfile"
|
||||
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
|
||||
if [ -e "$relpath/.git" ]; then
|
||||
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
|
||||
@ -4047,7 +4047,7 @@ fi
|
||||
#-------------------------------------------------------------------------------
|
||||
# Verify makespec
|
||||
#-------------------------------------------------------------------------------
|
||||
QMAKE_OUTPUT=`$outpath/bin/qmake -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
|
||||
QMAKE_OUTPUT=`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
|
||||
if [ $? != "0" ]; then
|
||||
echo "Failed to process makespec for platform '$XPLATFORM'"
|
||||
if [ "$OPT_VERBOSE" = "yes" ]; then
|
||||
|
@ -47,7 +47,7 @@ if not exist mkspecs (
|
||||
md mkspecs
|
||||
if errorlevel 1 goto exit
|
||||
)
|
||||
perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir %QTDIR% %QTSRC%
|
||||
perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir "%QTDIR%" %QTSRC%
|
||||
if errorlevel 1 goto exit
|
||||
|
||||
if not exist tools\configure (
|
||||
|
@ -140,7 +140,9 @@ Cpp.ignoredirectives += \
|
||||
QT_DEPRECATED_X \
|
||||
Q_DISABLE_COPY \
|
||||
Q_DUMMY_COMPARISON_OPERATOR \
|
||||
Q_ENUM \
|
||||
Q_ENUMS \
|
||||
Q_FLAG \
|
||||
Q_FLAGS \
|
||||
Q_INTERFACES \
|
||||
Q_PRIVATE_PROPERTY \
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the demonstration applications of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtMacExtras module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the test suite of the Qt Toolkit.
|
||||
|
@ -1,8 +0,0 @@
|
||||
#
|
||||
# qmake configuration for the Blackberry Playbook armle-v7
|
||||
#
|
||||
|
||||
include(../../blackberry-armle-v7-qcc/qmake.conf)
|
||||
|
||||
DEFINES += Q_OS_BLACKBERRY_TABLET
|
||||
CONFIG += blackberry-playbook
|
@ -1,8 +0,0 @@
|
||||
#
|
||||
# qmake configuration for the Blackberry Playbook x86
|
||||
#
|
||||
|
||||
include(../../blackberry-x86-qcc/qmake.conf)
|
||||
|
||||
DEFINES += Q_OS_BLACKBERRY_TABLET
|
||||
CONFIG += blackberry-playbook
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the test suite of the Qt Toolkit.
|
||||
|
@ -5,16 +5,21 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
|
||||
debug(1, "Cannot load qconfig.pri!")
|
||||
} else {
|
||||
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
|
||||
QMAKE_MODULE_PATH = $$split($$list($$(QMAKEMODULES)), $$DIRLIST_SEPARATOR)
|
||||
dirs = $$(QMAKEMODULES)
|
||||
QMAKE_MODULE_PATH = $$split(dirs, $$DIRLIST_SEPARATOR)
|
||||
QMAKE_MODULE_PATH += $$QMAKEMODULES
|
||||
QMAKE_MODULE_PATH += $$split($$list($$[QMAKEMODULES]), $$DIRLIST_SEPARATOR)
|
||||
QMAKE_MODULE_PATH += $$replace($$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR)), \
|
||||
\$, /modules)
|
||||
dirs = $$[QMAKEMODULES]
|
||||
QMAKE_MODULE_PATH += $$split(dirs, $$DIRLIST_SEPARATOR)
|
||||
dirs = $$[QMAKE_MKSPECS]
|
||||
dirs = $$split(dirs, $$DIRLIST_SEPARATOR)
|
||||
QMAKE_MODULE_PATH += $$replace(dirs, \$, /modules)
|
||||
unset(dirs)
|
||||
QMAKE_MODULE_PATH = $$unique(QMAKE_MODULE_PATH)
|
||||
QMAKE_MODULE_PATH = $$reverse(QMAKE_MODULE_PATH)
|
||||
for(dir, QMAKE_MODULE_PATH) {
|
||||
debug(1, "Loading modules from $${dir}")
|
||||
for(mod, $$list($$files($$dir/qt_*.pri))) {
|
||||
mods = $$files($$dir/qt_*.pri)
|
||||
for (mod, mods) {
|
||||
# For installed Qt these paths will be common for all modules.
|
||||
# For uninstalled prefix builds these will vary per module, via the
|
||||
# forwarding module pri files. Keep qt_module_pris.prf in sync with this!
|
||||
@ -28,6 +33,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
|
||||
QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
|
||||
include($$mod)
|
||||
}
|
||||
unset(mods)
|
||||
}
|
||||
QT_MODULES = $$unique(QT_MODULES) # In case modules appear in multiple places
|
||||
unset(QT_MODULE_INCLUDE_BASE)
|
||||
|
@ -21,7 +21,7 @@ load(qt_build_paths)
|
||||
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
|
||||
}
|
||||
QMAKE_SYNCQT += \
|
||||
-outdir $$MODULE_BASE_OUTDIR $$MODULE_SYNCQT_DIR
|
||||
-outdir $$system_quote($$MODULE_BASE_OUTDIR) $$MODULE_SYNCQT_DIR
|
||||
!silent: message($$QMAKE_SYNCQT)
|
||||
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
||||
}
|
||||
|
@ -48,9 +48,10 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
module_libs = "\$\$QT_MODULE_LIB_BASE"
|
||||
unix:!static {
|
||||
host_build: \
|
||||
module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_HOST_LIBS]"
|
||||
module_rpath = $$[QT_HOST_LIBS]
|
||||
else: \
|
||||
module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_INSTALL_LIBS/dev]"
|
||||
module_rpath = $$[QT_INSTALL_LIBS/dev]
|
||||
module_rpath = "QT.$${MODULE_ID}.rpath = $$val_escape(module_rpath)"
|
||||
} else {
|
||||
module_rpath =
|
||||
}
|
||||
@ -93,7 +94,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
internal_module: \
|
||||
MODULE_INCLUDES += $$MODULE_PRIVATE_INCLUDES
|
||||
split_incpath: \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$MODULE_SHADOW_INCLUDES"
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$val_escape(MODULE_SHADOW_INCLUDES)"
|
||||
MODULE_PRI_CONT = \
|
||||
"QT.$${MODULE_ID}.VERSION = $${VERSION}" \
|
||||
"QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
||||
@ -117,7 +118,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
$$module_rundep \
|
||||
"QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
|
||||
$$module_config \
|
||||
"QT.$${MODULE_ID}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
||||
"QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \
|
||||
"" \
|
||||
"QT_MODULES += $$MODULE"
|
||||
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
|
||||
@ -147,18 +148,18 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
|
||||
# Create a forwarding module .pri file
|
||||
MODULE_FWD_PRI_CONT = \
|
||||
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
|
||||
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_INCDIR/include" \
|
||||
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
|
||||
"QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
|
||||
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
||||
"QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
||||
"QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
|
||||
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
|
||||
"include($$MODULE_PRI)" \
|
||||
"QT_MODULE_BIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/bin" \
|
||||
"QT_MODULE_INCLUDE_BASE = $$val_escape(MODULE_BASE_INCDIR)/include" \
|
||||
"QT_MODULE_IMPORT_BASE = $$val_escape(MODULE_BASE_OUTDIR)/imports" \
|
||||
"QT_MODULE_QML_BASE = $$val_escape(MODULE_BASE_OUTDIR)/qml" \
|
||||
"QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
|
||||
"QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
|
||||
"QT_MODULE_LIBEXEC_BASE = $$val_escape(MODULE_BASE_OUTDIR)/libexec" \
|
||||
"QT_MODULE_PLUGIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/plugins" \
|
||||
"include($$val_escape(MODULE_PRI))" \
|
||||
"QT.$${MODULE_ID}.priority = 1"
|
||||
!internal_module: MODULE_FWD_PRI_CONT += \
|
||||
"include($$MODULE_PRIVATE_PRI)" \
|
||||
"include($$val_escape(MODULE_PRIVATE_PRI))" \
|
||||
"QT.$${MODULE}_private.priority = 1"
|
||||
MODULE_FWD_PRI_CONT += $$MODULE_FWD_PRI_CONT_SUFFIX
|
||||
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
||||
|
@ -1 +1 @@
|
||||
DEFINES += QT_TESTCASE_BUILDDIR=\\\"$$OUT_PWD\\\"
|
||||
DEFINES += QT_TESTCASE_BUILDDIR=$$shell_quote(\"$$OUT_PWD\")
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
## Copyright (C) 2015 The Qt Company Ltd.
|
||||
## Contact: http://www.qt.io/licensing/
|
||||
##
|
||||
## This file is the build configuration utility of the Qt Toolkit.
|
||||
|
@ -151,7 +151,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
subdir += Option::dir_sep;
|
||||
tmp = subdir + tmp;
|
||||
}
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(tmp)));
|
||||
if(fi.exists()) {
|
||||
if(fi.isDir()) {
|
||||
QString profile = tmp;
|
||||
@ -215,7 +215,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
t << "\t\t" << project_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.pb-project") << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(tmp_proj.first("TARGET") + projectSuffix())) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", tmp_proj.first("TARGET") + projectSuffix()) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", pbxproj) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
@ -283,7 +283,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
t << "\t\t" << keyFor(grp_it.key()) << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", grp_it.key().section(Option::dir_sep, -1)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
@ -626,8 +626,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
const QStringList &files = fileFixify(sources.at(source).files(project));
|
||||
for(int f = 0; f < files.count(); ++f) {
|
||||
QString file = files[f];
|
||||
if(file.length() >= 2 && (file[0] == '"' || file[0] == '\'') && file[(int) file.length()-1] == file[0])
|
||||
file = file.mid(1, file.length()-2);
|
||||
if(!sources.at(source).compilerName().isNull() &&
|
||||
!verifyExtraCompiler(sources.at(source).compilerName(), file))
|
||||
continue;
|
||||
@ -678,9 +676,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
//source reference
|
||||
t << "\t\t" << src_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", escapeFilePath(file)) << ";\n";
|
||||
<< "\t\t\t" << writeSettings("path", file) << ";\n";
|
||||
if (name != file)
|
||||
t << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("name", name) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";\n";
|
||||
QString filetype = xcodeFiletypeForFilename(file);
|
||||
if (!filetype.isNull())
|
||||
@ -715,7 +713,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t" << keyFor(grp_it.key()) << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", grp_it.key().section(Option::dir_sep, -1)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
@ -773,7 +771,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
mkt << "\\\n\t";
|
||||
++added;
|
||||
const QString file_name = fileFixify(fn, Option::output_dir, Option::output_dir);
|
||||
mkt << " " << replaceExtraCompilerVariables(Option::fixPathToTargetOS(tmp_out.first().toQString(), false), file_name, QString());
|
||||
mkt << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out.first().toQString(), file_name, QString(), NoShell)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -822,8 +821,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
bool remove = false;
|
||||
QString library, name;
|
||||
ProString opt = tmp[x].trimmed();
|
||||
if (opt.length() >= 2 && (opt.at(0) == '"' || opt.at(0) == '\'') && opt.endsWith(opt.at(0)))
|
||||
opt = opt.mid(1, opt.length()-2);
|
||||
if(opt.startsWith("-L")) {
|
||||
QString r = opt.mid(2).toQString();
|
||||
fixForOutput(r);
|
||||
@ -934,8 +931,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
bool is_frmwrk = (library.endsWith(".framework"));
|
||||
t << "\t\t" << key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", name) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", library) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(library)), SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";\n";
|
||||
if (is_frmwrk)
|
||||
@ -970,14 +967,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QTextStream mkt(&mkf);
|
||||
writeHeader(mkt);
|
||||
mkt << "SUBLIBS= ";
|
||||
// ### This is missing the parametrization found in unixmake2.cpp
|
||||
tmp = project->values("SUBLIBS");
|
||||
for(int i = 0; i < tmp.count(); i++)
|
||||
t << "tmp/lib" << tmp[i] << ".a ";
|
||||
t << escapeFilePath("tmp/lib" + tmp[i] + ".a") << ' ';
|
||||
t << endl << endl;
|
||||
mkt << "sublibs: $(SUBLIBS)\n\n";
|
||||
tmp = project->values("SUBLIBS");
|
||||
for(int i = 0; i < tmp.count(); i++)
|
||||
t << "tmp/lib" << tmp[i] << ".a:\n\t"
|
||||
t << escapeFilePath("tmp/lib" + tmp[i] + ".a") + ":\n\t"
|
||||
<< var(ProKey("MAKELIB" + tmp[i])) << endl << endl;
|
||||
mkt.flush();
|
||||
mkf.close();
|
||||
@ -1041,7 +1039,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t" << key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", grp) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
@ -1054,7 +1052,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "\t\t\t" << writeSettings("files", project->values("QMAKE_PBX_BUILD_LIBRARIES"), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXFrameworksBuildPhase", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", grp) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
|
||||
@ -1078,7 +1076,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (!project->isEmpty("DESTDIR")) {
|
||||
QString phase_key = keyFor("QMAKE_PBX_TARGET_COPY_PHASE");
|
||||
QString destDir = project->first("DESTDIR").toQString();
|
||||
destDir = fileInfo(Option::fixPathToLocalOS(destDir)).absoluteFilePath();
|
||||
destDir = fileInfo(Option::normalizePath(destDir)).absoluteFilePath();
|
||||
project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
|
||||
t << "\t\t" << phase_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
|
||||
@ -1089,7 +1087,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "\t\t\t" << writeSettings("outputPaths", ProStringList(), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n"
|
||||
<< "\t\t\t" << writeSettings("shellScript", fixForOutput("cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME " + escapeFilePath(destDir))) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("shellScript", fixForOutput("cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME " + IoUtils::shellQuoteUnix(destDir))) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
bool copyBundleResources = project->isActiveConfig("app_bundle") && project->first("TEMPLATE") == "app";
|
||||
@ -1107,13 +1105,13 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
//all files
|
||||
const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files"));
|
||||
for(int file = 0; file < files.count(); file++) {
|
||||
QString fn = fileFixify(files[file].toQString(), Option::output_dir, input_dir, FileFixifyAbsolute);
|
||||
QString fn = fileFixify(files[file].toQString(), Option::output_dir, input_dir, FileFixifyRelative);
|
||||
QString name = fn.split(Option::dir_sep).back();
|
||||
QString file_ref_key = keyFor("QMAKE_PBX_BUNDLE_DATA_FILE_REF." + bundle_data[i] + "-" + fn);
|
||||
bundle_file_refs += file_ref_key;
|
||||
t << "\t\t" << file_ref_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", escapeFilePath(fn)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("path", fn) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", name) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
@ -1139,7 +1137,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t" << phase_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("name", "Copy '" + bundle_data[i] + "' Files to Bundle") << ";\n"
|
||||
<< "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("dstPath", escapeFilePath(path)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("dstPath", path) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("dstSubfolderSpec", "1", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXCopyFilesBuildPhase", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("files", bundle_files, SettingsAsList, 4) << ";\n"
|
||||
@ -1163,8 +1161,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (copyBundleResources) {
|
||||
if (!project->isEmpty("ICON")) {
|
||||
ProString icon = project->first("ICON");
|
||||
if (icon.length() >= 2 && (icon.at(0) == '"' || icon.at(0) == '\'') && icon.endsWith(icon.at(0)))
|
||||
icon = icon.mid(1, icon.length() - 2);
|
||||
bundle_resources_files += keyFor(icon + ".BUILDABLE");
|
||||
}
|
||||
|
||||
@ -1177,7 +1173,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", grp) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
|
||||
@ -1202,7 +1198,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
} else {
|
||||
t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.executable") << ";\n";
|
||||
}
|
||||
t << "\t\t\t" << writeSettings("path", escapeFilePath(targ)) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("path", targ) << ";\n";
|
||||
} else {
|
||||
ProString lib = project->first("QMAKE_ORIG_TARGET");
|
||||
if(project->isActiveConfig("staticlib")) {
|
||||
@ -1230,7 +1226,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
} else {
|
||||
t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.dylib") << ";\n";
|
||||
}
|
||||
t << "\t\t\t" << writeSettings("path", escapeFilePath(lib)) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("path", lib) << ";\n";
|
||||
}
|
||||
t << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
@ -1250,7 +1246,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", project->first("QMAKE_ORIG_TARGET")) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
|
||||
@ -1296,14 +1292,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
else
|
||||
t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.tool") << ";\n";
|
||||
}
|
||||
t << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productName", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("name", project->first("QMAKE_ORIG_TARGET")) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productName", project->first("QMAKE_ORIG_TARGET")) << ";\n";
|
||||
} else {
|
||||
ProString lib = project->first("QMAKE_ORIG_TARGET");
|
||||
if(!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib"))
|
||||
lib.prepend("lib");
|
||||
t << "\t\t\t" << writeSettings("name", escapeFilePath(lib)) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productName", escapeFilePath(lib)) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("name", lib) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productName", lib) << ";\n";
|
||||
if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE"))
|
||||
t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";\n";
|
||||
else if (project->isActiveConfig("staticlib"))
|
||||
@ -1314,7 +1310,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.dynamic") << ";\n";
|
||||
}
|
||||
if(!project->isEmpty("DESTDIR"))
|
||||
t << "\t\t\t" << writeSettings("productInstallPath", escapeFilePath(project->first("DESTDIR"))) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("productInstallPath", project->first("DESTDIR")) << ";\n";
|
||||
t << "\t\t};\n";
|
||||
//DEBUG/RELEASE
|
||||
QString defaultConfig;
|
||||
@ -1352,7 +1348,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
ProString lib = project->first("QMAKE_ORIG_TARGET");
|
||||
if (!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib"))
|
||||
lib.prepend("lib");
|
||||
settings.insert("PRODUCT_NAME", escapeFilePath(lib.toQString()));
|
||||
settings.insert("PRODUCT_NAME", lib.toQString());
|
||||
}
|
||||
|
||||
if (project->isActiveConfig("debug") != (bool)as_release)
|
||||
@ -1422,7 +1418,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
}
|
||||
|
||||
t << "\t\t\t\t" << writeSettings("SYMROOT", escapeFilePath(qmake_getpwd())) << ";\n";
|
||||
t << "\t\t\t\t" << writeSettings("SYMROOT", qmake_getpwd()) << ";\n";
|
||||
|
||||
if (!project->isEmpty("DESTDIR")) {
|
||||
ProString dir = project->first("DESTDIR");
|
||||
@ -1458,11 +1454,11 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString var = tmp[i].toQString(), val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData()));
|
||||
if (val.isEmpty() && var == "TB")
|
||||
val = "/usr/bin/";
|
||||
t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";\n";
|
||||
t << "\t\t\t\t" << writeSettings(var, val) << ";\n";
|
||||
}
|
||||
if (!project->isEmpty("PRECOMPILED_HEADER")) {
|
||||
t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";\n"
|
||||
<< "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";\n";
|
||||
<< "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", project->first("PRECOMPILED_HEADER")) << ";\n";
|
||||
}
|
||||
t << "\t\t\t\t" << writeSettings("HEADER_SEARCH_PATHS", fixListForOutput("INCLUDEPATH"), SettingsAsList, 5) << ";\n"
|
||||
<< "\t\t\t\t" << writeSettings("LIBRARY_SEARCH_PATHS", fixListForOutput("QMAKE_PBX_LIBPATHS"), SettingsAsList, 5) << ";\n"
|
||||
@ -1493,8 +1489,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t\t\t" << writeSettings("OTHER_LDFLAGS",
|
||||
fixListForOutput("SUBLIBS")
|
||||
+ fixListForOutput("QMAKE_LFLAGS")
|
||||
+ fixListForOutput("QMAKE_LIBS")
|
||||
+ fixListForOutput("QMAKE_LIBS_PRIVATE"),
|
||||
+ fixListForOutput(fixLibFlags("QMAKE_LIBS"))
|
||||
+ fixListForOutput(fixLibFlags("QMAKE_LIBS_PRIVATE")),
|
||||
SettingsAsList, 6) << ";\n";
|
||||
}
|
||||
const ProStringList &archs = !project->values("QMAKE_XCODE_ARCHS").isEmpty() ?
|
||||
@ -1502,7 +1498,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (!archs.isEmpty())
|
||||
t << "\t\t\t\t" << writeSettings("ARCHS", archs) << ";\n";
|
||||
if (!project->isEmpty("OBJECTS_DIR"))
|
||||
t << "\t\t\t\t" << writeSettings("OBJROOT", escapeFilePath(project->first("OBJECTS_DIR").toQString())) << ";\n";
|
||||
t << "\t\t\t\t" << writeSettings("OBJROOT", project->first("OBJECTS_DIR")) << ";\n";
|
||||
} else {
|
||||
if (project->first("TEMPLATE") == "app") {
|
||||
t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";\n";
|
||||
@ -1514,7 +1510,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
ProString lib = project->first("QMAKE_ORIG_TARGET");
|
||||
if (!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib"))
|
||||
lib.prepend("lib");
|
||||
t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", escapeFilePath(lib)) << ";\n";
|
||||
t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", lib) << ";\n";
|
||||
}
|
||||
}
|
||||
t << "\t\t\t};\n"
|
||||
@ -1560,13 +1556,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QTextStream mkwrapt(&mkwrapf);
|
||||
writeHeader(mkwrapt);
|
||||
const char cleans[] = "preprocess_clean ";
|
||||
const QString cmd = escapeFilePath(project->first("QMAKE_ORIG_TARGET") + projectSuffix() + "/") + " && " + pbxbuild();
|
||||
mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n"
|
||||
<< "all:\n\t"
|
||||
<< "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << "\n"
|
||||
<< "cd " << cmd << "\n"
|
||||
<< "install: all\n\t"
|
||||
<< "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " install\n"
|
||||
<< "cd " << cmd << " install\n"
|
||||
<< "distclean clean: preprocess_clean\n\t"
|
||||
<< "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " clean\n"
|
||||
<< "cd " << cmd << " clean\n"
|
||||
<< (!did_preprocess ? cleans : "") << ":\n";
|
||||
if(did_preprocess)
|
||||
mkwrapt << cleans << ":\n\t"
|
||||
@ -1666,7 +1663,6 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
|
||||
output += QDir::separator();
|
||||
}
|
||||
output += QString("project.pbxproj");
|
||||
output = unescapeFilePath(output);
|
||||
file.setFileName(output);
|
||||
}
|
||||
bool ret = UnixMakefileGenerator::openOutput(file, build);
|
||||
@ -1723,8 +1719,6 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const
|
||||
else
|
||||
version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist";
|
||||
#endif
|
||||
} else {
|
||||
version_plist.replace(QRegExp("\""), "");
|
||||
}
|
||||
if (ret.isEmpty()) {
|
||||
QFile version_file(version_plist);
|
||||
@ -1785,7 +1779,7 @@ int
|
||||
ProjectBuilderMakefileGenerator::reftypeForFile(const QString &where)
|
||||
{
|
||||
int ret = 0; //absolute is the default..
|
||||
if(QDir::isRelativePath(unescapeFilePath(where)))
|
||||
if (QDir::isRelativePath(where))
|
||||
ret = 4; //relative
|
||||
return ret;
|
||||
}
|
||||
@ -1811,26 +1805,6 @@ ProjectBuilderMakefileGenerator::pbxbuild()
|
||||
return (pbuilderVersion() >= 38 ? "xcodebuild" : "pbxbuild");
|
||||
}
|
||||
|
||||
QString
|
||||
ProjectBuilderMakefileGenerator::escapeFilePath(const QString &path) const
|
||||
{
|
||||
#if 1
|
||||
//in the middle of generating a Makefile!
|
||||
if(writingUnixMakefileGenerator)
|
||||
return UnixMakefileGenerator::escapeFilePath(path);
|
||||
|
||||
//generating stuff for the xml file!
|
||||
QString ret = path;
|
||||
if(!ret.isEmpty()) {
|
||||
ret = unescapeFilePath(ret);
|
||||
debug_msg(2, "EscapeFilePath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
return UnixMakefileGenerator::escapeFilePath(path);
|
||||
#endif
|
||||
}
|
||||
|
||||
static QString quotedStringLiteral(const QString &value)
|
||||
{
|
||||
QString result;
|
||||
|
@ -72,8 +72,6 @@ public:
|
||||
virtual bool supportsMetaBuild() { return false; }
|
||||
virtual bool openOutput(QFile &, const QString &) const;
|
||||
protected:
|
||||
virtual QString escapeFilePath(const QString &path) const;
|
||||
ProString escapeFilePath(const ProString &path) const { return MakefileGenerator::escapeFilePath(path); }
|
||||
bool doPrecompiledHeaders() const { return false; }
|
||||
virtual bool doDepends() const { return writingUnixMakefileGenerator && UnixMakefileGenerator::doDepends(); }
|
||||
};
|
||||
|
@ -61,6 +61,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace QMakeInternal;
|
||||
|
||||
bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const
|
||||
{
|
||||
int argv0 = -1;
|
||||
@ -73,7 +75,7 @@ bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const
|
||||
if(a)
|
||||
*a = argv0;
|
||||
if(argv0 != -1) {
|
||||
const QString c = Option::fixPathToLocalOS(cmdline.at(argv0), true);
|
||||
const QString c = Option::normalizePath(cmdline.at(argv0));
|
||||
if(exists(c))
|
||||
return true;
|
||||
}
|
||||
@ -88,7 +90,7 @@ QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) con
|
||||
|
||||
bool MakefileGenerator::mkdir(const QString &in_path) const
|
||||
{
|
||||
QString path = Option::fixPathToLocalOS(in_path);
|
||||
QString path = Option::normalizePath(in_path);
|
||||
if(QFile::exists(path))
|
||||
return true;
|
||||
|
||||
@ -210,9 +212,9 @@ MakefileGenerator::initOutPaths()
|
||||
for (ProStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
QString finp = fileFixify((*input).toQString(), Option::output_dir, Option::output_dir);
|
||||
*input = ProString(finp);
|
||||
QString path = unescapeFilePath(replaceExtraCompilerVariables(tmp_out, finp, QString()));
|
||||
path = Option::fixPathToTargetOS(path);
|
||||
int slash = path.lastIndexOf(Option::dir_sep);
|
||||
QString path = replaceExtraCompilerVariables(tmp_out, finp, QString(), NoShell);
|
||||
path = Option::normalizePath(path);
|
||||
int slash = path.lastIndexOf('/');
|
||||
if(slash != -1) {
|
||||
path = path.left(slash);
|
||||
// Make out path only if it does not contain makefile variables
|
||||
@ -228,7 +230,7 @@ MakefileGenerator::initOutPaths()
|
||||
|
||||
if(!v["DESTDIR"].isEmpty()) {
|
||||
QDir d(v["DESTDIR"].first().toQString());
|
||||
if(Option::fixPathToLocalOS(d.absolutePath()) == Option::fixPathToLocalOS(Option::output_dir))
|
||||
if (Option::normalizePath(d.absolutePath()) == Option::normalizePath(Option::output_dir))
|
||||
v.remove("DESTDIR");
|
||||
}
|
||||
}
|
||||
@ -275,8 +277,6 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString
|
||||
}
|
||||
if(!(flags & VPATH_NoFixify))
|
||||
file = fileFixify(file, qmake_getpwd(), Option::output_dir);
|
||||
if (file.at(0) == '\"' && file.at(file.length() - 1) == '\"')
|
||||
file = file.mid(1, file.length() - 2);
|
||||
|
||||
if(exists(file)) {
|
||||
++val_it;
|
||||
@ -293,8 +293,8 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString
|
||||
}
|
||||
for (ProStringList::Iterator vpath_it = vpath.begin();
|
||||
vpath_it != vpath.end(); ++vpath_it) {
|
||||
QString real_dir = Option::fixPathToLocalOS((*vpath_it).toQString());
|
||||
if(exists(real_dir + QDir::separator() + val)) {
|
||||
QString real_dir = Option::normalizePath((*vpath_it).toQString());
|
||||
if (exists(real_dir + '/' + val)) {
|
||||
ProString dir = (*vpath_it);
|
||||
if(!dir.endsWith(Option::dir_sep))
|
||||
dir += Option::dir_sep;
|
||||
@ -725,10 +725,9 @@ MakefileGenerator::init()
|
||||
if((*input).isEmpty())
|
||||
continue;
|
||||
QString inpf = (*input).toQString();
|
||||
QString in = Option::fixPathToTargetOS(inpf, false);
|
||||
if (!verifyExtraCompiler((*it).toQString(), in)) //verify
|
||||
if (!verifyExtraCompiler((*it).toQString(), inpf)) //verify
|
||||
continue;
|
||||
QString out = replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString());
|
||||
QString out = replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString(), NoShell);
|
||||
out = fileFixify(out, Option::output_dir, Option::output_dir);
|
||||
bool pre_dep = (config.indexOf("target_predeps") != -1);
|
||||
if (v.contains(vokey)) {
|
||||
@ -772,7 +771,7 @@ MakefileGenerator::init()
|
||||
incDirs += v["INCLUDEPATH"];
|
||||
QList<QMakeLocalFileName> deplist;
|
||||
for (ProStringList::Iterator it = incDirs.begin(); it != incDirs.end(); ++it)
|
||||
deplist.append(QMakeLocalFileName(unescapeFilePath((*it).toQString())));
|
||||
deplist.append(QMakeLocalFileName((*it).toQString()));
|
||||
QMakeSourceFileInfo::setDependencyPaths(deplist);
|
||||
debug_msg(1, "Dependency Directories: %s", incDirs.join(" :: ").toLatin1().constData());
|
||||
//cache info
|
||||
@ -818,7 +817,7 @@ MakefileGenerator::init()
|
||||
if(!project->isEmpty("TRANSLATIONS")) {
|
||||
ProStringList &trf = project->values("TRANSLATIONS");
|
||||
for (ProStringList::Iterator it = trf.begin(); it != trf.end(); ++it)
|
||||
(*it) = Option::fixPathToLocalOS((*it).toQString());
|
||||
(*it) = Option::fixPathToTargetOS((*it).toQString());
|
||||
}
|
||||
|
||||
//fix up the target deps
|
||||
@ -827,7 +826,7 @@ MakefileGenerator::init()
|
||||
ProStringList &l = v[fixpaths[path]];
|
||||
for (ProStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
|
||||
if(!(*val_it).isEmpty())
|
||||
(*val_it) = escapeDependencyPath(Option::fixPathToTargetOS((*val_it).toQString(), false, false));
|
||||
(*val_it) = Option::fixPathToTargetOS((*val_it).toQString(), false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -844,9 +843,9 @@ MakefileGenerator::init()
|
||||
if (exists(dep)) {
|
||||
out_deps.append(dep);
|
||||
} else {
|
||||
QString dir, regex = Option::fixPathToLocalOS(dep);
|
||||
if(regex.lastIndexOf(Option::dir_sep) != -1) {
|
||||
dir = regex.left(regex.lastIndexOf(Option::dir_sep) + 1);
|
||||
QString dir, regex = Option::normalizePath(dep);
|
||||
if (regex.lastIndexOf('/') != -1) {
|
||||
dir = regex.left(regex.lastIndexOf('/') + 1);
|
||||
regex.remove(0, dir.length());
|
||||
}
|
||||
QStringList files = QDir(dir).entryList(QStringList(regex));
|
||||
@ -885,7 +884,7 @@ MakefileGenerator::processPrlFile(QString &file)
|
||||
meta_file = tmp;
|
||||
}
|
||||
// meta_file = fileFixify(meta_file);
|
||||
QString real_meta_file = Option::fixPathToLocalOS(meta_file);
|
||||
QString real_meta_file = Option::normalizePath(meta_file);
|
||||
if(!meta_file.isEmpty()) {
|
||||
QString f = fileFixify(real_meta_file, qmake_getpwd(), Option::output_dir);
|
||||
if(QMakeMetaInfo::libExists(f)) {
|
||||
@ -905,7 +904,7 @@ MakefileGenerator::processPrlFile(QString &file)
|
||||
defs.append(def);
|
||||
if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
|
||||
QString dir;
|
||||
int slsh = real_meta_file.lastIndexOf(Option::dir_sep);
|
||||
int slsh = real_meta_file.lastIndexOf('/');
|
||||
if(slsh != -1)
|
||||
dir = real_meta_file.left(slsh+1);
|
||||
file = libinfo.first("QMAKE_PRL_TARGET").toQString();
|
||||
@ -1052,9 +1051,9 @@ MakefileGenerator::writeProjectMakefile()
|
||||
|
||||
writeSubTargets(t, targets, SubTargetsNoFlags);
|
||||
if(!project->isActiveConfig("no_autoqmake")) {
|
||||
QString mkf = escapeDependencyPath(fileFixify(Option::output.fileName()));
|
||||
for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it)
|
||||
t << (*it)->makefile << ": " <<
|
||||
Option::fixPathToTargetOS(fileFixify(Option::output.fileName())) << endl;
|
||||
t << escapeDependencyPath((*it)->makefile) << ": " << mkf << endl;
|
||||
}
|
||||
qDeleteAll(targets);
|
||||
return true;
|
||||
@ -1102,7 +1101,7 @@ MakefileGenerator::prlFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(!project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -1206,7 +1205,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
QString dst;
|
||||
if (installConfigValues.indexOf("no_path") == -1 &&
|
||||
installConfigValues.indexOf("dummy_install") == -1) {
|
||||
dst = fileFixify(unescapeFilePath(project->first(pvar).toQString()), FileFixifyAbsolute, false);
|
||||
dst = fileFixify(project->first(pvar).toQString(), FileFixifyAbsolute, false);
|
||||
if(!dst.endsWith(Option::dir_sep))
|
||||
dst += Option::dir_sep;
|
||||
}
|
||||
@ -1294,7 +1293,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false))));
|
||||
continue;
|
||||
}
|
||||
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
|
||||
QString local_dirstr = Option::normalizePath(dirstr);
|
||||
QStringList files = QDir(local_dirstr).entryList(QStringList(filestr),
|
||||
QDir::NoDotAndDotDot | QDir::AllEntries);
|
||||
if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
|
||||
@ -1373,7 +1372,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
t << "uninstall_" << (*it) << ": FORCE";
|
||||
for (int i = uninst.size(); --i >= 0; )
|
||||
t << "\n\t" << uninst.at(i);
|
||||
t << "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " \n\n";
|
||||
t << "\n\t-$(DEL_DIR) " << escapeFilePath(filePrefixRoot(root, dst)) << " \n\n";
|
||||
}
|
||||
t << endl;
|
||||
|
||||
@ -1386,8 +1385,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
debug_msg(1, "no definition for install %s: install target not created",(*it).toLatin1().constData());
|
||||
}
|
||||
}
|
||||
t << "install: " << var("INSTALLDEPS") << " " << all_installs
|
||||
<< " FORCE\n\nuninstall: " << all_uninstalls << " " << var("UNINSTALLDEPS")
|
||||
t << "install:" << depVar("INSTALLDEPS") << ' ' << all_installs
|
||||
<< " FORCE\n\nuninstall: " << all_uninstalls << depVar("UNINSTALLDEPS")
|
||||
<< " FORCE\n\n";
|
||||
}
|
||||
|
||||
@ -1397,6 +1396,24 @@ MakefileGenerator::var(const ProKey &var) const
|
||||
return val(project->values(var));
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::fileVar(const ProKey &var) const
|
||||
{
|
||||
return val(escapeFilePaths(project->values(var)));
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::fileVarList(const ProKey &var) const
|
||||
{
|
||||
return valList(escapeFilePaths(project->values(var)));
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::depVar(const ProKey &var) const
|
||||
{
|
||||
return val(escapeDependencyPaths(project->values(var)));
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::val(const ProStringList &varList) const
|
||||
{
|
||||
@ -1415,6 +1432,12 @@ MakefileGenerator::varGlue(const ProKey &var, const QString &before, const QStri
|
||||
return valGlue(project->values(var), before, glue, after);
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
|
||||
{
|
||||
return valGlue(escapeFilePaths(project->values(var)), before, glue, after);
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::fixFileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
|
||||
{
|
||||
@ -1480,12 +1503,11 @@ MakefileGenerator::createObjectList(const ProStringList &sources)
|
||||
objdir = project->first("OBJECTS_DIR").toQString();
|
||||
for (ProStringList::ConstIterator it = sources.begin(); it != sources.end(); ++it) {
|
||||
QString sfn = (*it).toQString();
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(sfn)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(sfn)));
|
||||
QString dir;
|
||||
if (project->isActiveConfig("object_parallel_to_source")) {
|
||||
// The source paths are relative to the output dir, but we need source-relative paths
|
||||
QString sourceRelativePath = fileFixify(sfn, qmake_getpwd(), Option::output_dir);
|
||||
sourceRelativePath = Option::fixPathToTargetOS(sourceRelativePath, false);
|
||||
|
||||
if (sourceRelativePath.startsWith(".." + Option::dir_sep))
|
||||
sourceRelativePath = fileFixify(sourceRelativePath, FileFixifyAbsolute);
|
||||
@ -1513,7 +1535,8 @@ MakefileGenerator::createObjectList(const ProStringList &sources)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ReplaceExtraCompilerCacheKey::ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o)
|
||||
ReplaceExtraCompilerCacheKey::ReplaceExtraCompilerCacheKey(
|
||||
const QString &v, const QStringList &i, const QStringList &o, MakefileGenerator::ReplaceFor s)
|
||||
{
|
||||
static QString doubleColon = QLatin1String("::");
|
||||
|
||||
@ -1530,11 +1553,13 @@ ReplaceExtraCompilerCacheKey::ReplaceExtraCompilerCacheKey(const QString &v, con
|
||||
ol.sort();
|
||||
out = ol.join(doubleColon);
|
||||
}
|
||||
forShell = s;
|
||||
}
|
||||
|
||||
bool ReplaceExtraCompilerCacheKey::operator==(const ReplaceExtraCompilerCacheKey &f) const
|
||||
{
|
||||
return (hashCode() == f.hashCode() &&
|
||||
f.forShell == forShell &&
|
||||
f.in == in &&
|
||||
f.out == out &&
|
||||
f.var == var &&
|
||||
@ -1543,10 +1568,11 @@ bool ReplaceExtraCompilerCacheKey::operator==(const ReplaceExtraCompilerCacheKey
|
||||
|
||||
|
||||
QString
|
||||
MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const QStringList &in, const QStringList &out)
|
||||
MakefileGenerator::replaceExtraCompilerVariables(
|
||||
const QString &orig_var, const QStringList &in, const QStringList &out, ReplaceFor forShell)
|
||||
{
|
||||
//lazy cache
|
||||
ReplaceExtraCompilerCacheKey cacheKey(orig_var, in, out);
|
||||
ReplaceExtraCompilerCacheKey cacheKey(orig_var, in, out, forShell);
|
||||
QString cacheVal = extraCompilerVariablesCache.value(cacheKey);
|
||||
if(!cacheVal.isNull())
|
||||
return cacheVal;
|
||||
@ -1576,7 +1602,7 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
|
||||
} else if(var == QLatin1String("QMAKE_FILE_BASE") || var == QLatin1String("QMAKE_FILE_IN_BASE")) {
|
||||
//filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(in.at(i))));
|
||||
QString base = fi.completeBaseName();
|
||||
if(base.isNull())
|
||||
base = fi.fileName();
|
||||
@ -1585,7 +1611,7 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
|
||||
} else if(var == QLatin1String("QMAKE_FILE_EXT")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(in.at(i))));
|
||||
QString ext;
|
||||
// Ensure complementarity with QMAKE_FILE_BASE
|
||||
int baseLen = fi.completeBaseName().length();
|
||||
@ -1598,11 +1624,11 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
|
||||
} else if(var == QLatin1String("QMAKE_FILE_PATH") || var == QLatin1String("QMAKE_FILE_IN_PATH")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(in.at(i))).path();
|
||||
val += fileInfo(Option::normalizePath(in.at(i))).path();
|
||||
} else if(var == QLatin1String("QMAKE_FILE_NAME") || var == QLatin1String("QMAKE_FILE_IN")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(in.at(i))).filePath();
|
||||
val += fileInfo(Option::normalizePath(in.at(i))).filePath();
|
||||
|
||||
}
|
||||
}
|
||||
@ -1614,11 +1640,11 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
|
||||
} else if(var == QLatin1String("QMAKE_FILE_OUT")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < out.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(out.at(i))).filePath();
|
||||
val += fileInfo(Option::normalizePath(out.at(i))).filePath();
|
||||
} else if(var == QLatin1String("QMAKE_FILE_OUT_BASE")) {
|
||||
//filePath = true;
|
||||
for(int i = 0; i < out.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(out.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(out.at(i))));
|
||||
QString base = fi.completeBaseName();
|
||||
if(base.isNull())
|
||||
base = fi.fileName();
|
||||
@ -1633,12 +1659,14 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
|
||||
|
||||
if(!val.isEmpty()) {
|
||||
QString fullVal;
|
||||
if(filePath) {
|
||||
if (filePath && forShell != NoShell) {
|
||||
for(int i = 0; i < val.size(); ++i) {
|
||||
const QString file = Option::fixPathToTargetOS(unescapeFilePath(val.at(i)), false);
|
||||
if(!fullVal.isEmpty())
|
||||
fullVal += " ";
|
||||
fullVal += escapeFilePath(file);
|
||||
if (forShell == LocalShell)
|
||||
fullVal += IoUtils::shellQuote(Option::fixPathToLocalOS(val.at(i), false));
|
||||
else
|
||||
fullVal += escapeFilePath(Option::fixPathToTargetOS(val.at(i), false));
|
||||
}
|
||||
} else {
|
||||
fullVal = val.join(' ');
|
||||
@ -1660,7 +1688,7 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil
|
||||
{
|
||||
if(noIO())
|
||||
return false;
|
||||
const QString file = Option::fixPathToLocalOS(file_unfixed);
|
||||
const QString file = Option::normalizePath(file_unfixed);
|
||||
|
||||
const ProStringList &config = project->values(ProKey(comp + ".CONFIG"));
|
||||
if (config.indexOf("moc_verify") != -1) {
|
||||
@ -1702,10 +1730,10 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil
|
||||
if((*input).isEmpty())
|
||||
continue;
|
||||
QString inpf = (*input).toQString();
|
||||
QString in = fileFixify(Option::fixPathToTargetOS(inpf, false));
|
||||
QString in = fileFixify(inpf);
|
||||
if(in == file) {
|
||||
bool pass = project->test(verify.toKey(),
|
||||
QList<ProStringList>() << ProStringList(replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString())) <<
|
||||
QList<ProStringList>() << ProStringList(replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString(), NoShell)) <<
|
||||
ProStringList(file));
|
||||
if(invert)
|
||||
pass = !pass;
|
||||
@ -1723,7 +1751,7 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil
|
||||
return false;
|
||||
const QString tmp_cmd = project->values(ProKey(comp + ".commands")).join(' ');
|
||||
if (config.indexOf("combine") != -1) {
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, QString(), tmp_out);
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, QString(), tmp_out, LocalShell);
|
||||
if(system(cmd.toLatin1().constData()))
|
||||
return false;
|
||||
} else {
|
||||
@ -1734,10 +1762,10 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil
|
||||
if((*input).isEmpty())
|
||||
continue;
|
||||
QString inpf = (*input).toQString();
|
||||
QString in = fileFixify(Option::fixPathToTargetOS(inpf, false));
|
||||
QString in = fileFixify(inpf);
|
||||
if(in == file) {
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, inpf, QString());
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, in, out);
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, inpf, QString(), NoShell);
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, in, out, LocalShell);
|
||||
if(system(cmd.toLatin1().constData()))
|
||||
return false;
|
||||
break;
|
||||
@ -1802,8 +1830,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
for (ProStringList::ConstIterator it2 = comp_inputs.begin(); it2 != comp_inputs.end(); ++it2) {
|
||||
const ProStringList &tmp = project->values((*it2).toKey());
|
||||
for (ProStringList::ConstIterator input = tmp.begin(); input != tmp.end(); ++input) {
|
||||
QString in = Option::fixPathToTargetOS((*input).toQString(), false);
|
||||
if(verifyExtraCompiler((*it), in))
|
||||
if (verifyExtraCompiler((*it), (*input).toQString()))
|
||||
tmp_inputs.append((*input));
|
||||
}
|
||||
}
|
||||
@ -1814,16 +1841,19 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
if (config.indexOf("combine") != -1) {
|
||||
// compilers with a combined input only have one output
|
||||
QString input = project->first(ProKey(*it + ".output")).toQString();
|
||||
t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, input, QString())));
|
||||
t << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out, input, QString(), NoShell)));
|
||||
} else {
|
||||
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
|
||||
t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString())));
|
||||
t << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString(), NoShell)));
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
|
||||
if (config.indexOf("no_clean") == -1) {
|
||||
QString tmp_clean = project->values(ProKey(*it + ".clean")).join(' ');
|
||||
const ProStringList &raw_clean = project->values(ProKey(*it + ".clean"));
|
||||
QString tmp_clean = escapeFilePaths(raw_clean).join(' ');
|
||||
QString tmp_clean_cmds = project->values(ProKey(*it + ".clean_commands")).join(' ');
|
||||
if(!tmp_inputs.isEmpty())
|
||||
clean_targets += QString("compiler_" + (*it) + "_clean ");
|
||||
@ -1836,34 +1866,37 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
wrote_clean_cmds = true;
|
||||
}
|
||||
if(tmp_clean.isEmpty())
|
||||
tmp_clean = tmp_out;
|
||||
tmp_clean = escapeFilePath(tmp_out);
|
||||
if(tmp_clean.indexOf("${QMAKE_") == -1) {
|
||||
t << "\n\t-$(DEL_FILE) " << tmp_clean;
|
||||
wrote_clean = true;
|
||||
}
|
||||
if(!wrote_clean_cmds || !wrote_clean) {
|
||||
ProStringList cleans;
|
||||
QStringList q_raw_clean = raw_clean.toQStringList();
|
||||
QStringList cleans;
|
||||
const QString del_statement("-$(DEL_FILE)");
|
||||
if(!wrote_clean) {
|
||||
if(project->isActiveConfig("no_delete_multiple_files")) {
|
||||
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
|
||||
QString tinp = (*input).toQString();
|
||||
cleans.append(" " + Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_clean, tinp,
|
||||
replaceExtraCompilerVariables(tmp_out, tinp, QString()))));
|
||||
QStringList dels;
|
||||
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
|
||||
QString tinp = (*input).toQString();
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell);
|
||||
foreach (const QString &rc, q_raw_clean) {
|
||||
dels << ' ' + escapeFilePath(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(rc, tinp, out, NoShell), false));
|
||||
}
|
||||
}
|
||||
if(project->isActiveConfig("no_delete_multiple_files")) {
|
||||
cleans = dels;
|
||||
} else {
|
||||
QString files, file;
|
||||
QString files;
|
||||
const int commandlineLimit = 2047; // NT limit, expanded
|
||||
for(int input = 0; input < tmp_inputs.size(); ++input) {
|
||||
QString tinp = tmp_inputs.at(input).toQString();
|
||||
file = " " + replaceExtraCompilerVariables(tmp_clean, tinp,
|
||||
replaceExtraCompilerVariables(tmp_out, tinp, QString()));
|
||||
foreach (const QString &file, dels) {
|
||||
if(del_statement.length() + files.length() +
|
||||
qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit) {
|
||||
cleans.append(files);
|
||||
files.clear();
|
||||
}
|
||||
files += Option::fixPathToTargetOS(file);
|
||||
files += file;
|
||||
}
|
||||
if(!files.isEmpty())
|
||||
cleans.append(files);
|
||||
@ -1875,7 +1908,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
|
||||
QString tinp = (*input).toQString();
|
||||
t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, tinp,
|
||||
replaceExtraCompilerVariables(tmp_out, tinp, QString()));
|
||||
replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell), TargetShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1897,7 +1930,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
inputs += Option::fixPathToTargetOS(inpf, false);
|
||||
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
||||
char buff[256];
|
||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out);
|
||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell);
|
||||
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
|
||||
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
|
||||
QString indeps;
|
||||
@ -1909,6 +1942,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
}
|
||||
QT_PCLOSE(proc);
|
||||
if(!indeps.isEmpty()) {
|
||||
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
||||
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
||||
QString &file = dep_cmd_deps[i];
|
||||
@ -1920,8 +1954,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||
dit != depdirs.end(); ++dit) {
|
||||
if (exists((*dit).real() + Option::dir_sep + file)) {
|
||||
localFile = (*dit).local() + Option::dir_sep + file;
|
||||
if (exists((*dit).local() + '/' + file)) {
|
||||
localFile = (*dit).local() + '/' + file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1959,8 +1993,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
if (inputs.isEmpty())
|
||||
continue;
|
||||
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, QString(), QString());
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList() << out);
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell);
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, inputs, QStringList() << out, TargetShell);
|
||||
t << escapeDependencyPath(Option::fixPathToTargetOS(out)) << ":";
|
||||
// compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies
|
||||
if (config.indexOf("explicit_dependencies") != -1) {
|
||||
@ -1975,20 +2009,20 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
QString inpf = (*input).toQString();
|
||||
QString in = Option::fixPathToTargetOS(inpf, false);
|
||||
QStringList deps = findDependencies(inpf);
|
||||
deps += escapeDependencyPath(in);
|
||||
QString out = unescapeFilePath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, inpf, QString())));
|
||||
deps << in;
|
||||
QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, inpf, QString(), NoShell));
|
||||
if(!tmp_dep.isEmpty()) {
|
||||
QStringList pre_deps = fileFixify(tmp_dep, Option::output_dir, Option::output_dir);
|
||||
for(int i = 0; i < pre_deps.size(); ++i)
|
||||
deps += replaceExtraCompilerVariables(pre_deps.at(i), inpf, out);
|
||||
deps << replaceExtraCompilerVariables(pre_deps.at(i), inpf, out, NoShell);
|
||||
}
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, inpf, out);
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, inpf, out, LocalShell);
|
||||
// NOTE: The var -> QMAKE_COMP_var replace feature is unsupported, do not use!
|
||||
for (ProStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3)
|
||||
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
|
||||
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
||||
char buff[256];
|
||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, out);
|
||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, out, LocalShell);
|
||||
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
|
||||
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
|
||||
QString indeps;
|
||||
@ -2000,6 +2034,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
}
|
||||
QT_PCLOSE(proc);
|
||||
if(!indeps.isEmpty()) {
|
||||
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
||||
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
||||
QString &file = dep_cmd_deps[i];
|
||||
@ -2011,8 +2046,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||
dit != depdirs.end(); ++dit) {
|
||||
if (exists((*dit).real() + Option::dir_sep + file)) {
|
||||
localFile = (*dit).local() + Option::dir_sep + file;
|
||||
if (exists((*dit).local() + '/' + file)) {
|
||||
localFile = (*dit).local() + '/' + file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2077,7 +2112,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
}
|
||||
for(int i = 0; i < deps.size(); ) {
|
||||
QString &dep = deps[i];
|
||||
dep = Option::fixPathToTargetOS(unescapeFilePath(dep), false);
|
||||
dep = Option::fixPathToTargetOS(dep, false);
|
||||
if(out == dep)
|
||||
deps.removeAt(i);
|
||||
else
|
||||
@ -2216,7 +2251,7 @@ QString MakefileGenerator::build_args(const QString &outdir)
|
||||
ret += buildArgs();
|
||||
|
||||
//output
|
||||
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty() && ofile != project->first("QMAKE_MAKEFILE"))
|
||||
ret += " -o " + escapeFilePath(ofile);
|
||||
|
||||
@ -2241,7 +2276,7 @@ MakefileGenerator::writeHeader(QTextStream &t)
|
||||
QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
|
||||
if (ofile.lastIndexOf(Option::dir_sep) != -1)
|
||||
ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1);
|
||||
t << "MAKEFILE = " << ofile << endl << endl;
|
||||
t << "MAKEFILE = " << escapeFilePath(ofile) << endl << endl;
|
||||
}
|
||||
|
||||
QList<MakefileGenerator::SubTarget*>
|
||||
@ -2324,7 +2359,7 @@ MakefileGenerator::findSubDirsSubTargets() const
|
||||
if (!project->isEmpty(dtkey)) {
|
||||
st->depends += project->first(dtkey);
|
||||
} else {
|
||||
QString d = Option::fixPathToLocalOS(subName);
|
||||
QString d = Option::fixPathToTargetOS(subName);
|
||||
const ProKey dfkey(fixedSubDep + ".file");
|
||||
if (!project->isEmpty(dfkey)) {
|
||||
d = project->first(dfkey).toQString();
|
||||
@ -2431,8 +2466,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
out_directory = Option::output_dir + out_directory.mid(abs_source_path.length());
|
||||
|
||||
QString out_directory_cdin = out_directory.isEmpty() ? "\n\t"
|
||||
: "\n\tcd " + out_directory + " && ";
|
||||
QString makefilein = " -f " + subtarget->makefile;
|
||||
: "\n\tcd " + escapeFilePath(out_directory) + " && ";
|
||||
QString makefilein = " -f " + escapeFilePath(subtarget->makefile);
|
||||
|
||||
//qmake it
|
||||
QString out;
|
||||
@ -2442,6 +2477,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
in = escapeFilePath(fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute));
|
||||
if(out.startsWith(in_directory))
|
||||
out = out.mid(in_directory.length());
|
||||
out = escapeFilePath(out);
|
||||
t << subtarget->target << "-qmake_all: ";
|
||||
if (flags & SubTargetOrdered) {
|
||||
if (target)
|
||||
@ -2535,18 +2571,18 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
t << " " << targetRule;
|
||||
}
|
||||
if(suffix == "all" || suffix == "make_first")
|
||||
t << varGlue("ALL_DEPS"," "," ","");
|
||||
t << depVar("ALL_DEPS");
|
||||
if(suffix == "clean")
|
||||
t << varGlue("CLEAN_DEPS"," "," ","");
|
||||
t << depVar("CLEAN_DEPS");
|
||||
else if (suffix == "distclean")
|
||||
t << varGlue("DISTCLEAN_DEPS"," "," ","");
|
||||
t << depVar("DISTCLEAN_DEPS");
|
||||
t << " FORCE\n";
|
||||
if(suffix == "clean") {
|
||||
t << fixFileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n");
|
||||
} else if(suffix == "distclean") {
|
||||
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << ofile << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
t << fixFileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n");
|
||||
}
|
||||
}
|
||||
@ -2566,7 +2602,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
QString dep = var(ProKey(*dep_it + ".target"));
|
||||
if(dep.isEmpty())
|
||||
dep = Option::fixPathToTargetOS((*dep_it).toQString(), false);
|
||||
deps += " " + dep;
|
||||
deps += ' ' + escapeDependencyPath(dep);
|
||||
}
|
||||
if (config.indexOf("recursive") != -1) {
|
||||
QSet<QString> recurse;
|
||||
@ -2592,8 +2628,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
continue;
|
||||
|
||||
QString out_directory_cdin = out_directory.isEmpty() ? "\n\t"
|
||||
: "\n\tcd " + out_directory + " && ";
|
||||
QString makefilein = " -f " + subtarget->makefile;
|
||||
: "\n\tcd " + escapeFilePath(out_directory) + " && ";
|
||||
QString makefilein = " -f " + escapeFilePath(subtarget->makefile);
|
||||
|
||||
QString out;
|
||||
QString in;
|
||||
@ -2602,6 +2638,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
in = escapeFilePath(fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute));
|
||||
if (out.startsWith(in_directory))
|
||||
out = out.mid(in_directory.length());
|
||||
out = escapeFilePath(out);
|
||||
}
|
||||
|
||||
//write the rule/depends
|
||||
@ -2647,16 +2684,16 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
void
|
||||
MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
{
|
||||
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) {
|
||||
QStringList files = fileFixify(Option::mkfile::project_files);
|
||||
QStringList files = escapeFilePaths(fileFixify(Option::mkfile::project_files));
|
||||
t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t"
|
||||
<< "@$(QMAKE) -prl " << buildArgs() << " " << files.join(' ') << endl;
|
||||
}
|
||||
|
||||
QString qmake = build_args();
|
||||
if(!ofile.isEmpty() && !project->isActiveConfig("no_autoqmake")) {
|
||||
t << escapeFilePath(ofile) << ": "
|
||||
t << escapeDependencyPath(ofile) << ": "
|
||||
<< escapeDependencyPath(fileFixify(project->projectFile())) << " ";
|
||||
if (Option::globals->do_cache) {
|
||||
if (!project->confFile().isEmpty())
|
||||
@ -2665,11 +2702,11 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
t << escapeDependencyPath(fileFixify(project->cacheFile())) << " ";
|
||||
}
|
||||
if(!specdir().isEmpty()) {
|
||||
if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"qmake.conf")))
|
||||
if (exists(Option::normalizePath(specdir() + "/qmake.conf")))
|
||||
t << escapeDependencyPath(specdir() + Option::dir_sep + "qmake.conf") << " ";
|
||||
}
|
||||
const ProStringList &included = project->values("QMAKE_INTERNAL_INCLUDED_FILES");
|
||||
t << escapeDependencyPaths(included).join(" \\\n\t\t") << "\n\t"
|
||||
const ProStringList &included = escapeDependencyPaths(project->values("QMAKE_INTERNAL_INCLUDED_FILES"));
|
||||
t << included.join(" \\\n\t\t") << "\n\t"
|
||||
<< qmake << endl;
|
||||
for(int include = 0; include < included.size(); ++include) {
|
||||
const ProString &i = included.at(include);
|
||||
@ -2704,19 +2741,22 @@ MakefileGenerator::fileInfo(QString file) const
|
||||
return fi;
|
||||
}
|
||||
|
||||
QString
|
||||
MakefileGenerator::unescapeFilePath(const QString &path) const
|
||||
ProStringList
|
||||
MakefileGenerator::fixLibFlags(const ProKey &var)
|
||||
{
|
||||
QString ret = path;
|
||||
ret.replace(QLatin1String("\\ "), QLatin1String(" "));
|
||||
ret.remove(QLatin1Char('\"'));
|
||||
ProStringList in = project->values(var);
|
||||
ProStringList ret;
|
||||
|
||||
ret.reserve(in.length());
|
||||
foreach (const ProString &v, in)
|
||||
ret << fixLibFlag(v);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProString
|
||||
MakefileGenerator::unescapeFilePath(const ProString &path) const
|
||||
ProString MakefileGenerator::fixLibFlag(const ProString &)
|
||||
{
|
||||
return ProString(unescapeFilePath(path.toQString()));
|
||||
qFatal("MakefileGenerator::fixLibFlag() called");
|
||||
return ProString();
|
||||
}
|
||||
|
||||
ProString
|
||||
@ -2743,6 +2783,12 @@ MakefileGenerator::escapeFilePaths(const ProStringList &paths) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProString
|
||||
MakefileGenerator::escapeDependencyPath(const ProString &path) const
|
||||
{
|
||||
return ProString(escapeDependencyPath(path.toQString()));
|
||||
}
|
||||
|
||||
QStringList
|
||||
MakefileGenerator::escapeDependencyPaths(const QStringList &paths) const
|
||||
{
|
||||
@ -2761,24 +2807,6 @@ MakefileGenerator::escapeDependencyPaths(const ProStringList &paths) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
QStringList
|
||||
MakefileGenerator::unescapeFilePaths(const QStringList &paths) const
|
||||
{
|
||||
QStringList ret;
|
||||
for(int i = 0; i < paths.size(); ++i)
|
||||
ret.append(unescapeFilePath(paths.at(i)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProStringList
|
||||
MakefileGenerator::unescapeFilePaths(const ProStringList &paths) const
|
||||
{
|
||||
ProStringList ret;
|
||||
for (int i = 0; i < paths.size(); ++i)
|
||||
ret.append(unescapeFilePath(paths.at(i)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
QStringList
|
||||
MakefileGenerator::fileFixify(const QStringList& files, const QString &out_dir, const QString &in_dir,
|
||||
FileFixifyType fix, bool canon) const
|
||||
@ -2799,7 +2827,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
|
||||
{
|
||||
if(file.isEmpty())
|
||||
return file;
|
||||
QString ret = unescapeFilePath(file);
|
||||
QString ret = file;
|
||||
|
||||
//do the fixin'
|
||||
QString orig_file = ret;
|
||||
@ -2829,7 +2857,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
|
||||
out_dir = out_fi.canonicalFilePath();
|
||||
}
|
||||
|
||||
QString qfile(Option::fixPathToLocalOS(ret, true, canon));
|
||||
QString qfile(Option::normalizePath(ret));
|
||||
QFileInfo qfileinfo(fileInfo(qfile));
|
||||
if(out_dir != in_dir || !qfileinfo.isRelative()) {
|
||||
if(qfileinfo.isRelative()) {
|
||||
@ -2958,7 +2986,7 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
}
|
||||
}
|
||||
{ //is it from an EXTRA_TARGET
|
||||
const QString dep_basename = dep.local().section(Option::dir_sep, -1);
|
||||
const QString dep_basename = dep.local().section('/', -1);
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
QString targ = var(ProKey(*it + ".target"));
|
||||
@ -2972,7 +3000,7 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
}
|
||||
}
|
||||
{ //is it from an EXTRA_COMPILER
|
||||
const QString dep_basename = dep.local().section(Option::dir_sep, -1);
|
||||
const QString dep_basename = dep.local().section('/', -1);
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
|
||||
const ProString &tmp_out = project->first(ProKey(*it + ".output"));
|
||||
@ -2982,8 +3010,8 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
for (ProStringList::ConstIterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
const ProStringList &inputs = project->values((*it2).toKey());
|
||||
for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
QString out = Option::fixPathToTargetOS(unescapeFilePath(
|
||||
replaceExtraCompilerVariables(tmp_out.toQString(), (*input).toQString(), QString())));
|
||||
QString out = Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out.toQString(), (*input).toQString(), QString(), NoShell));
|
||||
if (out == dep.real() || out.section(Option::dir_sep, -1) == dep_basename) {
|
||||
ret = QMakeLocalFileName(fileFixify(out, qmake_getpwd(), Option::output_dir));
|
||||
goto found_dep_from_heuristic;
|
||||
@ -3102,7 +3130,7 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -3213,9 +3241,9 @@ MakefileGenerator::writePkgConfigFile()
|
||||
}
|
||||
ProString bundle;
|
||||
if (!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_FRAMEWORK_BUNDLE_NAME"));
|
||||
bundle = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME");
|
||||
else
|
||||
bundle = unescapeFilePath(project->first("TARGET"));
|
||||
bundle = project->first("TARGET");
|
||||
int suffix = bundle.lastIndexOf(".framework");
|
||||
if (suffix != -1)
|
||||
bundle = bundle.left(suffix);
|
||||
@ -3223,11 +3251,11 @@ MakefileGenerator::writePkgConfigFile()
|
||||
} else {
|
||||
if (!project->values("QMAKE_DEFAULT_LIBDIRS").contains(libDir))
|
||||
t << "-L${libdir} ";
|
||||
pkgConfiglibName = "-l" + unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
|
||||
pkgConfiglibName = "-l" + project->first("QMAKE_ORIG_TARGET");
|
||||
if (project->isActiveConfig("shared"))
|
||||
pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString();
|
||||
}
|
||||
t << pkgConfiglibName << " \n";
|
||||
t << shellQuote(pkgConfiglibName) << " \n";
|
||||
|
||||
ProStringList libs;
|
||||
if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) {
|
||||
@ -3239,7 +3267,7 @@ MakefileGenerator::writePkgConfigFile()
|
||||
libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
|
||||
t << "Libs.private: ";
|
||||
for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) {
|
||||
t << project->values((*it).toKey()).join(' ') << " ";
|
||||
t << fixLibFlags((*it).toKey()).join(' ') << ' ';
|
||||
}
|
||||
t << endl;
|
||||
|
||||
@ -3277,7 +3305,7 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
QString ret;
|
||||
if (project->isEmpty(replace_rule)
|
||||
|| project->isActiveConfig("no_sed_meta_install")) {
|
||||
ret += "-$(INSTALL_FILE) \"" + src + "\" \"" + dst + "\"";
|
||||
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
} else {
|
||||
ret += "-$(SED)";
|
||||
const ProStringList &replace_rules = project->values(replace_rule);
|
||||
@ -3291,7 +3319,7 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
+ "," + windowsifyPath(replace.toQString()) + ",gi");
|
||||
}
|
||||
}
|
||||
ret += " \"" + src + "\" >\"" + dst + "\"";
|
||||
ret += ' ' + escapeFilePath(src) + " > " + escapeFilePath(dst);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -52,20 +52,6 @@ QT_BEGIN_NAMESPACE
|
||||
#define QT_PCLOSE pclose
|
||||
#endif
|
||||
|
||||
struct ReplaceExtraCompilerCacheKey
|
||||
{
|
||||
mutable uint hash;
|
||||
QString var, in, out, pwd;
|
||||
ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o);
|
||||
bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
|
||||
inline uint hashCode() const {
|
||||
if(!hash)
|
||||
hash = qHash(var) ^ qHash(in) ^ qHash(out) /*^ qHash(pwd)*/;
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
|
||||
|
||||
struct ReplaceExtraCompilerCacheKey;
|
||||
|
||||
class MakefileGenerator : protected QMakeSourceFileInfo
|
||||
@ -81,6 +67,10 @@ class MakefileGenerator : protected QMakeSourceFileInfo
|
||||
mutable QHash<QString, QStringList> dependsCache;
|
||||
mutable QHash<ReplaceExtraCompilerCacheKey, QString> extraCompilerVariablesCache;
|
||||
|
||||
public:
|
||||
// We can't make it visible to VCFilter in VS2008 except by making it public or directly friending it.
|
||||
enum ReplaceFor { NoShell, LocalShell, TargetShell };
|
||||
|
||||
protected:
|
||||
enum TARG_MODE { TARG_UNIX_MODE, TARG_MAC_MODE, TARG_WIN_MODE } target_mode;
|
||||
|
||||
@ -132,9 +122,9 @@ protected:
|
||||
|
||||
//extra compiler interface
|
||||
bool verifyExtraCompiler(const ProString &c, const QString &f);
|
||||
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
|
||||
inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
|
||||
{ return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out)); }
|
||||
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor forShell);
|
||||
inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out, ReplaceFor forShell)
|
||||
{ return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out), forShell); }
|
||||
|
||||
//interface to the source file info
|
||||
QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool);
|
||||
@ -143,15 +133,12 @@ protected:
|
||||
QMakeProject *project;
|
||||
|
||||
//escape
|
||||
virtual QString unescapeFilePath(const QString &path) const;
|
||||
ProString unescapeFilePath(const ProString &path) const;
|
||||
virtual QStringList unescapeFilePaths(const QStringList &path) const;
|
||||
ProStringList unescapeFilePaths(const ProStringList &path) const;
|
||||
virtual QString escapeFilePath(const QString &path) const { return path; }
|
||||
ProString escapeFilePath(const ProString &path) const;
|
||||
QStringList escapeFilePaths(const QStringList &paths) const;
|
||||
ProStringList escapeFilePaths(const ProStringList &paths) const;
|
||||
virtual QString escapeDependencyPath(const QString &path) const { return escapeFilePath(path); }
|
||||
ProString escapeDependencyPath(const ProString &path) const;
|
||||
QStringList escapeDependencyPaths(const QStringList &paths) const;
|
||||
ProStringList escapeDependencyPaths(const ProStringList &paths) const;
|
||||
|
||||
@ -221,6 +208,10 @@ protected:
|
||||
QString varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
|
||||
QString varList(const ProKey &var) const;
|
||||
QString fixFileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
|
||||
QString fileVarList(const ProKey &var) const;
|
||||
QString fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
|
||||
QString fileVar(const ProKey &var) const;
|
||||
QString depVar(const ProKey &var) const;
|
||||
QString val(const ProStringList &varList) const;
|
||||
QString val(const QStringList &varList) const;
|
||||
QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after) const;
|
||||
@ -230,6 +221,9 @@ protected:
|
||||
|
||||
QString filePrefixRoot(const QString &, const QString &);
|
||||
|
||||
ProStringList fixLibFlags(const ProKey &var);
|
||||
virtual ProString fixLibFlag(const ProString &lib);
|
||||
|
||||
//file fixification to unify all file names into a single pattern
|
||||
enum FileFixifyType { FileFixifyAbsolute, FileFixifyRelative, FileFixifyDefault };
|
||||
QString fileFixify(const QString& file, const QString &out_dir=QString(),
|
||||
@ -281,6 +275,21 @@ inline bool MakefileGenerator::findLibraries()
|
||||
inline MakefileGenerator::~MakefileGenerator()
|
||||
{ }
|
||||
|
||||
struct ReplaceExtraCompilerCacheKey
|
||||
{
|
||||
mutable uint hash;
|
||||
QString var, in, out, pwd;
|
||||
MakefileGenerator::ReplaceFor forShell;
|
||||
ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o, MakefileGenerator::ReplaceFor s);
|
||||
bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
|
||||
inline uint hashCode() const {
|
||||
if (!hash)
|
||||
hash = (uint)forShell ^ qHash(var) ^ qHash(in) ^ qHash(out) /*^ qHash(pwd)*/;
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // MAKEFILE_H
|
||||
|
@ -77,7 +77,7 @@ const QString
|
||||
&QMakeLocalFileName::local() const
|
||||
{
|
||||
if(!is_null && local_name.isNull())
|
||||
local_name = Option::fixPathToLocalOS(real_name, true);
|
||||
local_name = Option::normalizePath(real_name);
|
||||
return local_name;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ ProjectGenerator::init()
|
||||
for (ProStringList::ConstIterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
ProStringList &inputs = project->values((*it2).toKey());
|
||||
for (ProStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
QString path = replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString());
|
||||
QString path = replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString(), NoShell);
|
||||
path = fixPathToQmake(path).section('/', -1);
|
||||
for(int i = 0; i < var_out.size(); ++i) {
|
||||
ProString v = var_out.at(i);
|
||||
|
@ -75,8 +75,6 @@ UnixMakefileGenerator::init()
|
||||
if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
|
||||
project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s");
|
||||
|
||||
if (!project->isEmpty("TARGET"))
|
||||
project->values("TARGET") = escapeFilePaths(project->values("TARGET"));
|
||||
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
|
||||
|
||||
//version handling
|
||||
@ -111,8 +109,8 @@ UnixMakefileGenerator::init()
|
||||
}
|
||||
|
||||
project->values("QMAKE_ORIG_DESTDIR") = project->values("DESTDIR");
|
||||
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
|
||||
project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
|
||||
project->values("QMAKE_LIBS") += project->values("LIBS");
|
||||
project->values("QMAKE_LIBS_PRIVATE") += project->values("LIBS_PRIVATE");
|
||||
if((!project->isEmpty("QMAKE_LIB_FLAG") && !project->isActiveConfig("staticlib")) ||
|
||||
(project->isActiveConfig("qt") && project->isActiveConfig("plugin"))) {
|
||||
if(configs.indexOf("dll") == -1) configs.append("dll");
|
||||
@ -194,11 +192,13 @@ UnixMakefileGenerator::init()
|
||||
pchBaseName += project->first("QMAKE_ORIG_TARGET").toQString();
|
||||
|
||||
// replace place holders
|
||||
pchFlags.replace("${QMAKE_PCH_INPUT}", project->first("PRECOMPILED_HEADER").toQString());
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT_BASE}", pchBaseName);
|
||||
pchFlags.replace("${QMAKE_PCH_INPUT}",
|
||||
escapeFilePath(project->first("PRECOMPILED_HEADER").toQString()));
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName));
|
||||
if (project->isActiveConfig("icc_pch_style")) {
|
||||
// icc style
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT}", pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT"));
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT}",
|
||||
escapeFilePath(pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT")));
|
||||
} else {
|
||||
// gcc style (including clang_pch_style)
|
||||
QString headerSuffix;
|
||||
@ -222,7 +222,8 @@ UnixMakefileGenerator::init()
|
||||
}
|
||||
|
||||
if(!pchOutputFile.isEmpty()) {
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT}", pchBaseName + pchOutputFile + headerSuffix);
|
||||
pchFlags.replace("${QMAKE_PCH_OUTPUT}",
|
||||
escapeFilePath(pchBaseName + pchOutputFile + headerSuffix));
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,15 +254,15 @@ UnixMakefileGenerator::init()
|
||||
((project->isActiveConfig("build_pass") || project->isEmpty("BUILDS")))) {
|
||||
ProString bundle;
|
||||
if(project->isActiveConfig("bundle") && !project->isEmpty("QMAKE_BUNDLE_EXTENSION")) {
|
||||
bundle = unescapeFilePath(project->first("TARGET"));
|
||||
bundle = project->first("TARGET");
|
||||
if(!project->isEmpty("QMAKE_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_BUNDLE_NAME"));
|
||||
bundle = project->first("QMAKE_BUNDLE_NAME");
|
||||
if(!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
bundle += project->first("QMAKE_BUNDLE_EXTENSION");
|
||||
} else if(project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) {
|
||||
bundle = unescapeFilePath(project->first("TARGET"));
|
||||
bundle = project->first("TARGET");
|
||||
if(!project->isEmpty("QMAKE_APPLICATION_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_APPLICATION_BUNDLE_NAME"));
|
||||
bundle = project->first("QMAKE_APPLICATION_BUNDLE_NAME");
|
||||
if(!bundle.endsWith(".app"))
|
||||
bundle += ".app";
|
||||
if(project->isEmpty("QMAKE_BUNDLE_LOCATION"))
|
||||
@ -271,10 +272,10 @@ UnixMakefileGenerator::init()
|
||||
} else if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") &&
|
||||
((!project->isActiveConfig("plugin") && project->isActiveConfig("lib_bundle")) ||
|
||||
(project->isActiveConfig("plugin") && project->isActiveConfig("plugin_bundle")))) {
|
||||
bundle = unescapeFilePath(project->first("TARGET"));
|
||||
bundle = project->first("TARGET");
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
if(!project->isEmpty("QMAKE_PLUGIN_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_PLUGIN_BUNDLE_NAME"));
|
||||
bundle = project->first("QMAKE_PLUGIN_BUNDLE_NAME");
|
||||
if (project->isEmpty("QMAKE_BUNDLE_EXTENSION"))
|
||||
project->values("QMAKE_BUNDLE_EXTENSION").append(".plugin");
|
||||
if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
@ -283,7 +284,7 @@ UnixMakefileGenerator::init()
|
||||
project->values("QMAKE_BUNDLE_LOCATION").append("Contents/MacOS");
|
||||
} else {
|
||||
if(!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_FRAMEWORK_BUNDLE_NAME"));
|
||||
bundle = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME");
|
||||
if (project->isEmpty("QMAKE_BUNDLE_EXTENSION"))
|
||||
project->values("QMAKE_BUNDLE_EXTENSION").append(".framework");
|
||||
if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
@ -354,7 +355,7 @@ UnixMakefileGenerator::init()
|
||||
if(QDir::isRelativePath(rpath))
|
||||
rpath.prepend(Option::output_dir + Option::dir_sep);
|
||||
}
|
||||
comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, false);
|
||||
comp_flags += " -rpath " + escapeFilePath(Option::fixPathToTargetOS(rpath, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -439,6 +440,12 @@ QStringList
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProString
|
||||
UnixMakefileGenerator::fixLibFlag(const ProString &lib)
|
||||
{
|
||||
return escapeFilePath(lib);
|
||||
}
|
||||
|
||||
bool
|
||||
UnixMakefileGenerator::findLibraries()
|
||||
{
|
||||
@ -465,7 +472,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
}
|
||||
libdirs.insert(libidx++, f);
|
||||
if (!libArg.isEmpty())
|
||||
*it = libArg + lib;
|
||||
*it = libArg + f.real();
|
||||
} else if(opt.startsWith("-l")) {
|
||||
if (project->isActiveConfig("rvct_linker") || project->isActiveConfig("armcc_linker")) {
|
||||
(*it) = "lib" + opt.mid(2) + ".so";
|
||||
@ -504,7 +511,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
|
||||
if(dir.isNull()) {
|
||||
for(QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); dep_it != libdirs.end(); ++dep_it) {
|
||||
QString pathToLib = ((*dep_it).local() + Option::dir_sep
|
||||
QString pathToLib = ((*dep_it).local() + '/'
|
||||
+ project->first("QMAKE_PREFIX_SHLIB")
|
||||
+ stub + "." + (*extit));
|
||||
if(exists(pathToLib)) {
|
||||
@ -524,7 +531,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
}
|
||||
if(!found && project->isActiveConfig("compile_libtool")) {
|
||||
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
||||
if (exists(libdirs[dep_i].local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) {
|
||||
if (exists(libdirs[dep_i].local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) {
|
||||
(*it) = libdirs[dep_i].real() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext;
|
||||
found = true;
|
||||
break;
|
||||
@ -572,15 +579,15 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
||||
const QMakeLocalFileName &lfn = libdirs[dep_i];
|
||||
if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
|
||||
QString la = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
|
||||
if(exists(la) && QFile::exists(lfn.local() + Option::dir_sep + ".libs")) {
|
||||
QString la = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
|
||||
if (exists(la) && QFile::exists(lfn.local() + "/.libs")) {
|
||||
QString dot_libs = lfn.real() + Option::dir_sep + ".libs";
|
||||
l.append("-L" + dot_libs);
|
||||
libdirs.insert(libidx++, QMakeLocalFileName(dot_libs));
|
||||
}
|
||||
}
|
||||
|
||||
QString prl = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext;
|
||||
QString prl = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext;
|
||||
if(processPrlFile(prl)) {
|
||||
if(prl.startsWith(lfn.local()))
|
||||
prl.replace(0, lfn.local().length(), lfn.real());
|
||||
@ -619,7 +626,7 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
|
||||
if(!prl_libs.isEmpty()) {
|
||||
for(int prl = 0; prl < prl_libs.size(); ++prl)
|
||||
l.insert(lit+prl+1, escapeFilePath(prl_libs.at(prl).toQString()));
|
||||
l.insert(lit+prl+1, prl_libs.at(prl).toQString());
|
||||
prl_libs.clear();
|
||||
}
|
||||
}
|
||||
@ -709,10 +716,9 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
const QString root = "$(INSTALL_ROOT)";
|
||||
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));
|
||||
QString ret, destdir = project->first("DESTDIR").toQString();
|
||||
QString targetdir = Option::fixPathToTargetOS(project->first("target.path").toQString(), false);
|
||||
if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
|
||||
destdir += Option::dir_sep;
|
||||
targetdir = fileFixify(targetdir, FileFixifyAbsolute);
|
||||
QString targetdir = fileFixify(project->first("target.path").toQString(), FileFixifyAbsolute);
|
||||
if(targetdir.right(1) != Option::dir_sep)
|
||||
targetdir += Option::dir_sep;
|
||||
|
||||
@ -739,30 +745,31 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
}
|
||||
for(int i = 0; i < targets.size(); ++i) {
|
||||
QString src = targets.at(i).toQString(),
|
||||
dst = filePrefixRoot(root, targetdir + src.section('/', -1));
|
||||
dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1)));
|
||||
if(!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += "-$(INSTALL_FILE) \"" + src + "\" \"" + dst + "\"";
|
||||
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + dst;
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst);
|
||||
}
|
||||
|
||||
if (bundle == NoBundle && project->isActiveConfig("compile_libtool")) {
|
||||
QString src_targ = target;
|
||||
QString src_targ = escapeFilePath(target);
|
||||
if(src_targ == "$(TARGET)")
|
||||
src_targ = "$(TARGETL)";
|
||||
QString dst_dir = fileFixify(targetdir, FileFixifyAbsolute);
|
||||
if(QDir::isRelativePath(dst_dir))
|
||||
dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
|
||||
ret = "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + filePrefixRoot(root, dst_dir) + "\"";
|
||||
uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\"");
|
||||
ret = "-$(LIBTOOL) --mode=install cp " + src_targ + ' ' + escapeFilePath(filePrefixRoot(root, dst_dir));
|
||||
uninst.append("-$(LIBTOOL) --mode=uninstall " + src_targ);
|
||||
} else {
|
||||
QString src_targ = target;
|
||||
if(!destdir.isEmpty())
|
||||
src_targ = Option::fixPathToTargetOS(destdir + target, false);
|
||||
QString plain_targ = filePrefixRoot(root, fileFixify(targetdir + target, FileFixifyAbsolute));
|
||||
QString dst_targ = plain_targ;
|
||||
plain_targ = escapeFilePath(plain_targ);
|
||||
if (bundle != NoBundle) {
|
||||
QString suffix;
|
||||
if (project->first("TEMPLATE") == "lib")
|
||||
@ -773,33 +780,34 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
if (bundle == SolidBundle) {
|
||||
if (!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += "$(DEL_FILE) -r \"" + plain_targ + "\"\n\t";
|
||||
ret += "$(DEL_FILE) -r " + plain_targ + "\n\t";
|
||||
} else {
|
||||
src_targ += suffix;
|
||||
}
|
||||
}
|
||||
src_targ = escapeFilePath(src_targ);
|
||||
dst_targ = escapeFilePath(dst_targ);
|
||||
if(!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
|
||||
QString copy_cmd("-");
|
||||
if (bundle == SolidBundle) {
|
||||
copy_cmd += "$(INSTALL_DIR) \"" + src_targ + "\" \"" + plain_targ + "\"";
|
||||
copy_cmd += "$(INSTALL_DIR) " + src_targ + ' ' + plain_targ;
|
||||
} else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
|
||||
copy_cmd += "$(INSTALL_FILE) \"" + src_targ + "\" \"" + dst_targ + "\"";
|
||||
copy_cmd += "$(INSTALL_FILE) " + src_targ + ' ' + dst_targ;
|
||||
} else {
|
||||
if (bundle == SlicedBundle)
|
||||
ret += mkdir_p_asstring("\"`dirname \"" + dst_targ + "\"`\"", false) + "\n\t";
|
||||
copy_cmd += "$(INSTALL_PROGRAM) \"" + src_targ + "\" \"" + dst_targ + "\"";
|
||||
ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false) + "\n\t";
|
||||
copy_cmd += "$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ;
|
||||
}
|
||||
if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib")
|
||||
&& project->values(ProKey(t + ".CONFIG")).indexOf("fix_rpath") != -1) {
|
||||
if(!project->isEmpty("QMAKE_FIX_RPATH")) {
|
||||
ret += copy_cmd;
|
||||
ret += "\n\t-" + var("QMAKE_FIX_RPATH") + " \"" +
|
||||
dst_targ + "\" \"" + dst_targ + "\"";
|
||||
ret += "\n\t-" + var("QMAKE_FIX_RPATH") + ' ' + dst_targ + ' ' + dst_targ;
|
||||
} else if(!project->isEmpty("QMAKE_LFLAGS_RPATH")) {
|
||||
ret += "-$(LINK) $(LFLAGS) " + var("QMAKE_LFLAGS_RPATH") + targetdir + " -o \"" +
|
||||
dst_targ + "\" $(OBJECTS) $(LIBS) $(OBJCOMP)";
|
||||
ret += "-$(LINK) $(LFLAGS) " + var("QMAKE_LFLAGS_RPATH") + targetdir + " -o " +
|
||||
dst_targ + " $(OBJECTS) $(LIBS) $(OBJCOMP)";
|
||||
} else {
|
||||
ret += copy_cmd;
|
||||
}
|
||||
@ -809,7 +817,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
|
||||
if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
|
||||
if(!project->isEmpty("QMAKE_RANLIB"))
|
||||
ret += QString("\n\t$(RANLIB) \"") + dst_targ + "\"";
|
||||
ret += QString("\n\t$(RANLIB) ") + dst_targ;
|
||||
} else if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip")
|
||||
&& !project->isEmpty("QMAKE_STRIP")) {
|
||||
ret += "\n\t-$(STRIP)";
|
||||
@ -820,27 +828,28 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
if (!project->isEmpty("QMAKE_STRIPFLAGS_APP"))
|
||||
ret += " " + var("QMAKE_STRIPFLAGS_APP");
|
||||
}
|
||||
ret += " \"" + dst_targ + "\"";
|
||||
ret += ' ' + dst_targ;
|
||||
}
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
if (bundle == SolidBundle)
|
||||
uninst.append("-$(DEL_FILE) -r \"" + plain_targ + "\"");
|
||||
uninst.append("-$(DEL_FILE) -r " + plain_targ);
|
||||
else
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst_targ);
|
||||
if (bundle == SlicedBundle) {
|
||||
int dstlen = project->first("DESTDIR").length();
|
||||
foreach (const ProString &src, project->values("QMAKE_BUNDLED_FILES")) {
|
||||
QString file = unescapeFilePath(src.toQString()).mid(dstlen);
|
||||
QString dst = filePrefixRoot(root, fileFixify(targetdir + file, FileFixifyAbsolute));
|
||||
ProString file = src.mid(dstlen);
|
||||
QString dst = escapeFilePath(
|
||||
filePrefixRoot(root, fileFixify(targetdir + file, FileFixifyAbsolute)));
|
||||
if (!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += mkdir_p_asstring("\"`dirname \"" + dst + "\"`\"", false) + "\n\t";
|
||||
ret += "-$(DEL_FILE) \"" + dst + "\"\n\t"; // Can't overwrite symlinks to directories
|
||||
ret += "-$(INSTALL_DIR) " + src + " \"" + dst + "\""; // Use cp -R to copy symlinks
|
||||
ret += mkdir_p_asstring("\"`dirname " + dst + "`\"", false) + "\n\t";
|
||||
ret += "-$(DEL_FILE) " + dst + "\n\t"; // Can't overwrite symlinks to directories
|
||||
ret += "-$(INSTALL_DIR) " + escapeFilePath(src) + " " + dst; // Use cp -R to copy symlinks
|
||||
if (!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst);
|
||||
}
|
||||
}
|
||||
if(!links.isEmpty()) {
|
||||
@ -850,11 +859,12 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
int lslash = link.lastIndexOf(Option::dir_sep);
|
||||
if(lslash != -1)
|
||||
link = link.right(link.length() - (lslash + 1));
|
||||
QString dst_link = filePrefixRoot(root, fileFixify(targetdir + link, FileFixifyAbsolute));
|
||||
ret += "\n\t-$(SYMLINK) \"$(TARGET)\" \"" + dst_link + "\"";
|
||||
QString dst_link = escapeFilePath(
|
||||
filePrefixRoot(root, fileFixify(targetdir + link, FileFixifyAbsolute)));
|
||||
ret += "\n\t-$(SYMLINK) $(TARGET) " + dst_link;
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_link + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst_link);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -879,7 +889,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
QString dst_meta = filePrefixRoot(root, fileFixify(targetdir + meta, FileFixifyAbsolute));
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_meta + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_meta));
|
||||
const QString dst_meta_dir = fileInfo(dst_meta).path();
|
||||
if(!dst_meta_dir.isEmpty()) {
|
||||
if(!ret.isEmpty())
|
||||
@ -900,8 +910,8 @@ UnixMakefileGenerator::escapeFilePath(const QString &path) const
|
||||
{
|
||||
QString ret = path;
|
||||
if(!ret.isEmpty()) {
|
||||
ret = unescapeFilePath(ret).replace(QLatin1Char(' '), QLatin1String("\\ "))
|
||||
.replace(QLatin1Char('\t'), QLatin1String("\\\t"));
|
||||
ret.replace(QLatin1Char(' '), QLatin1String("\\ "))
|
||||
.replace(QLatin1Char('\t'), QLatin1String("\\\t"));
|
||||
debug_msg(2, "EscapeFilePath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
|
||||
}
|
||||
return ret;
|
||||
|
@ -53,6 +53,7 @@ protected:
|
||||
virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); }
|
||||
virtual bool doDepends() const { return !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); }
|
||||
virtual QString defaultInstall(const QString &);
|
||||
virtual ProString fixLibFlag(const ProString &lib);
|
||||
virtual void processPrlFiles();
|
||||
|
||||
virtual bool findLibraries();
|
||||
|
@ -101,7 +101,7 @@ UnixMakefileGenerator::writeDefaultVariables(QTextStream &t)
|
||||
distname += project->first("VERSION");
|
||||
project->values("QMAKE_DISTNAME") = distname;
|
||||
}
|
||||
t << "DISTNAME = " << var("QMAKE_DISTNAME") << endl;
|
||||
t << "DISTNAME = " << fileVar("QMAKE_DISTNAME") << endl;
|
||||
|
||||
if (project->isEmpty("QMAKE_DISTDIR"))
|
||||
project->values("QMAKE_DISTDIR") = project->first("QMAKE_DISTNAME");
|
||||
@ -127,7 +127,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
}
|
||||
t << " FORCE\n\t"
|
||||
<< mkdir_p_asstring("$(DISTDIR)", false) << "\n\t"
|
||||
<< "$(COPY_FILE) --parents " << var("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << endl << endl;
|
||||
<< "$(COPY_FILE) --parents " << fileVar("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << endl << endl;
|
||||
|
||||
const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH").toQString();
|
||||
for (int target = 0; target < targets.size(); ++target) {
|
||||
@ -148,8 +148,9 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
dist_directory.prepend(Option::dir_sep);
|
||||
|
||||
QString out_directory_cdin = out_directory.isEmpty() ? "\n\t"
|
||||
: "\n\tcd " + out_directory + " && ";
|
||||
QString makefilein = " -e -f " + subtarget->makefile + " distdir DISTDIR=$(DISTDIR)" + dist_directory;
|
||||
: "\n\tcd " + escapeFilePath(out_directory) + " && ";
|
||||
QString makefilein = " -e -f " + escapeFilePath(subtarget->makefile)
|
||||
+ " distdir DISTDIR=$(DISTDIR)" + escapeFilePath(dist_directory);
|
||||
|
||||
QString out = subtarget->makefile;
|
||||
QString in = escapeFilePath(fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute));
|
||||
@ -157,7 +158,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
out.remove(0, in_directory.length());
|
||||
|
||||
t << subtarget->target << "-distdir: FORCE";
|
||||
writeSubTargetCall(t, in_directory, in, out_directory, out,
|
||||
writeSubTargetCall(t, in_directory, in, out_directory, escapeFilePath(out),
|
||||
out_directory_cdin, makefilein);
|
||||
t << endl;
|
||||
}
|
||||
@ -166,7 +167,6 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
void
|
||||
UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
{
|
||||
QString deps = fileFixify(Option::output.fileName()), target_deps;
|
||||
bool do_incremental = (project->isActiveConfig("incremental") &&
|
||||
!project->values("QMAKE_INCREMENTAL").isEmpty() &&
|
||||
(!project->values("QMAKE_APP_FLAG").isEmpty() ||
|
||||
@ -188,14 +188,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
|
||||
const ProStringList &incs = project->values("INCLUDEPATH");
|
||||
for(int i = 0; i < incs.size(); ++i) {
|
||||
ProString inc = escapeFilePath(incs.at(i));
|
||||
const ProString &inc = incs.at(i);
|
||||
if (inc.isEmpty())
|
||||
continue;
|
||||
|
||||
if (!isystem.isEmpty() && isSystemInclude(inc.toQString()))
|
||||
t << ' ' << isystem << ' ' << inc;
|
||||
t << ' ' << isystem << ' ';
|
||||
else
|
||||
t << " -I" << inc;
|
||||
t << " -I";
|
||||
t << escapeFilePath(inc);
|
||||
}
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS"))
|
||||
@ -207,7 +208,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(!project->isActiveConfig("staticlib")) {
|
||||
t << "LINK = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LIBS = $(SUBLIBS) " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl;
|
||||
t << "LIBS = $(SUBLIBS) " << fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
}
|
||||
|
||||
t << "AR = " << var("QMAKE_AR") << endl;
|
||||
@ -220,16 +222,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << endl;
|
||||
|
||||
t << "####### Output directory\n\n";
|
||||
// This is used in commands by some .prf files.
|
||||
if (! project->values("OBJECTS_DIR").isEmpty())
|
||||
t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl;
|
||||
t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << endl;
|
||||
else
|
||||
t << "OBJECTS_DIR = ./\n";
|
||||
t << endl;
|
||||
|
||||
/* files */
|
||||
t << "####### Files\n\n";
|
||||
t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES"))) << " "
|
||||
<< valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl;
|
||||
// This is used by the dist target.
|
||||
t << "SOURCES = " << fileVarList("SOURCES") << ' ' << fileVarList("GENERATED_SOURCES") << endl;
|
||||
if(do_incremental) {
|
||||
const ProStringList &objs = project->values("OBJECTS");
|
||||
const ProStringList &incrs = project->values("QMAKE_INCREMENTAL");
|
||||
@ -258,37 +261,37 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "INCREMENTAL_OBJECTS = " << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl;
|
||||
}
|
||||
} else {
|
||||
t << "OBJECTS = " << valList(escapeFilePaths(project->values("OBJECTS"))) << endl;
|
||||
// Used all over the place in both deps and commands.
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl;
|
||||
}
|
||||
if(do_incremental && !src_incremental)
|
||||
do_incremental = false;
|
||||
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " "
|
||||
<< valList(escapeFilePaths(project->values("HEADERS"))) << " "
|
||||
<< valList(escapeFilePaths(project->values("SOURCES"))) << endl;
|
||||
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl;
|
||||
// The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes
|
||||
// would be interpreted as line continuation. The lack of spacing between the value and the
|
||||
// comment is also important as otherwise quoted use of "$(DESTDIR)" would include this
|
||||
// spacing.
|
||||
t << "DESTDIR = " << var("DESTDIR") << "#avoid trailing-slash linebreak\n";
|
||||
t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n";
|
||||
if(project->isActiveConfig("compile_libtool"))
|
||||
t << "TARGETL = " << var("TARGET_la") << endl;
|
||||
t << "TARGET = " << escapeFilePath(var("TARGET")) << endl;
|
||||
t << "TARGETL = " << fileVar("TARGET_la") << endl;
|
||||
t << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use!
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
t << "TARGETD = " << escapeFilePath(var("TARGET")) << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET") << endl;
|
||||
} else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||
t << "TARGETA = " << escapeFilePath(var("TARGETA")) << endl;
|
||||
t << "TARGETA = " << fileVar("TARGETA") << endl; // ### mixed use!
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
t << "TARGETD = " << escapeFilePath(var("TARGET_x.y")) << endl;
|
||||
t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y") << endl;
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << endl;
|
||||
} else if (!project->isActiveConfig("unversioned_libname")) {
|
||||
t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl;
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << endl;
|
||||
if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
|
||||
t << "TARGETD = " << escapeFilePath(var("TARGET_x.y.z")) << endl;
|
||||
t << "TARGET1 = " << escapeFilePath(var("TARGET_x")) << endl;
|
||||
t << "TARGET2 = " << escapeFilePath(var("TARGET_x.y")) << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y.z") << endl;
|
||||
t << "TARGET1 = " << fileVar("TARGET_x") << endl;
|
||||
t << "TARGET2 = " << fileVar("TARGET_x.y") << endl;
|
||||
} else {
|
||||
t << "TARGETD = " << escapeFilePath(var("TARGET_x")) << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x") << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -300,7 +303,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
const ProStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
ProStringList::ConstIterator it;
|
||||
for(it = qeui.begin(); it != qeui.end(); ++it)
|
||||
t << "include " << (*it) << endl;
|
||||
t << "include " << escapeDependencyPath(*it) << endl;
|
||||
|
||||
/* rules */
|
||||
t << "first: all\n";
|
||||
@ -321,29 +324,30 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
ProStringList objects = project->values("OBJECTS");
|
||||
for (ProStringList::Iterator it = objects.begin(); it != objects.end(); ++it) {
|
||||
QString d_file = (*it).toQString().replace(QRegExp(Option::obj_ext + "$"), ".d");
|
||||
t << "-include " << d_file << endl;
|
||||
t << "-include " << escapeDependencyPath(d_file) << endl;
|
||||
project->values("QMAKE_DISTCLEAN") << d_file;
|
||||
}
|
||||
} else {
|
||||
QString cmd=var("QMAKE_CFLAGS_DEPS") + " ";
|
||||
cmd += varGlue("DEFINES","-D"," -D","") + varGlue("PRL_EXPORT_DEFINES"," -D"," -D","");
|
||||
if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
|
||||
cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " ";
|
||||
cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", "");
|
||||
cmd += " -I" + fileVar("QMAKE_ABSOLUTE_SOURCE_PATH") + ' ';
|
||||
cmd += " $(INCPATH) " + fileVarGlue("DEPENDPATH", "-I", " -I", "");
|
||||
ProString odir;
|
||||
if(!project->values("OBJECTS_DIR").isEmpty())
|
||||
odir = project->first("OBJECTS_DIR");
|
||||
QString odird = escapeDependencyPath(odir.toQString());
|
||||
|
||||
QString pwd = escapeFilePath(fileFixify(qmake_getpwd()));
|
||||
|
||||
t << "###### Dependencies\n\n";
|
||||
t << odir << ".deps/%.d: " << pwd << "/%.cpp\n\t";
|
||||
t << odird << ".deps/%.d: " << pwd << "/%.cpp\n\t";
|
||||
if(project->isActiveConfig("echo_depend_creation"))
|
||||
t << "@echo Creating depend for $<\n\t";
|
||||
t << mkdir_p_asstring("$(@D)", false) << "\n\t"
|
||||
<< "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@\n\n";
|
||||
|
||||
t << odir << ".deps/%.d: " << pwd << "/%.c\n\t";
|
||||
t << odird << ".deps/%.d: " << pwd << "/%.c\n\t";
|
||||
if(project->isActiveConfig("echo_depend_creation"))
|
||||
t << "@echo Creating depend for $<\n\t";
|
||||
t << mkdir_p_asstring("$(@D)", false) << "\n\t"
|
||||
@ -374,11 +378,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
if(!d_file.isEmpty()) {
|
||||
d_file = odir + ".deps/" + fileFixify(d_file, pwd, Option::output_dir) + ".d";
|
||||
QString d_file_d = escapeDependencyPath(d_file);
|
||||
QStringList deps = findDependencies((*it).toQString()).filter(QRegExp(
|
||||
"((^|/)" + Option::h_moc_mod + "|" + Option::cpp_moc_ext + "$)"));
|
||||
if(!deps.isEmpty())
|
||||
t << d_file << ": " << deps.join(' ') << endl;
|
||||
t << "-include " << d_file << endl;
|
||||
t << d_file_d << ": " << escapeDependencyPaths(deps).join(' ') << endl;
|
||||
t << "-include " << d_file_d << endl;
|
||||
project->values("QMAKE_DISTCLEAN") += d_file;
|
||||
}
|
||||
}
|
||||
@ -395,10 +400,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "SUBLIBS = ";
|
||||
const ProStringList &l = project->values("SUBLIBS");
|
||||
for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
|
||||
t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
|
||||
<< project->first("QMAKE_EXTENSION_STATICLIB") << " ";
|
||||
t << escapeFilePath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.'
|
||||
+ project->first("QMAKE_EXTENSION_STATICLIB")) << ' ';
|
||||
t << endl << endl;
|
||||
}
|
||||
QString target_deps;
|
||||
if ((project->isActiveConfig("depend_prl") || project->isActiveConfig("fast_depend_prl"))
|
||||
&& !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
|
||||
const ProStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
|
||||
@ -411,18 +417,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(slsh != -1)
|
||||
dir = (*it).left(slsh + 1);
|
||||
QString targ = dir + libinfo.first("QMAKE_PRL_TARGET");
|
||||
target_deps += " " + targ;
|
||||
t << targ;
|
||||
QString targ_d = escapeDependencyPath(targ);
|
||||
target_deps += ' ' + targ_d;
|
||||
t << targ_d;
|
||||
if (project->isActiveConfig("fast_depend_prl"))
|
||||
t << ":\n\t@echo \"Creating '";
|
||||
else
|
||||
t << ": FORCE\n\t@echo \"Creating/updating '";
|
||||
t << targ << "'\"\n\t"
|
||||
<< "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";"
|
||||
<< "(cd " << escapeFilePath(libinfo.first("QMAKE_PRL_BUILD_DIR")) << ';'
|
||||
<< "$(MAKE))\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
QString deps = escapeDependencyPath(fileFixify(Option::output.fileName()));
|
||||
QString allDeps;
|
||||
if (!project->values("QMAKE_APP_FLAG").isEmpty() || project->first("TEMPLATE") == "aux") {
|
||||
QString destdir = project->first("DESTDIR").toQString();
|
||||
@ -443,19 +451,23 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString incr_deps, incr_objs;
|
||||
if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
|
||||
QString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext;
|
||||
QString incr_target_dir_d = escapeDependencyPath(incr_target_dir);
|
||||
QString incr_target_dir_f = escapeFilePath(incr_target_dir);
|
||||
//actual target
|
||||
t << incr_target_dir << ": $(OBJECTS)\n\t"
|
||||
<< "ld -r -o "<< incr_target_dir << " $(OBJECTS)\n";
|
||||
t << incr_target_dir_d << ": $(OBJECTS)\n\t"
|
||||
<< "ld -r -o " << incr_target_dir_f << " $(OBJECTS)\n";
|
||||
//communicated below
|
||||
deps.prepend(incr_target_dir + " ");
|
||||
deps.prepend(incr_target_dir_d + ' ');
|
||||
incr_deps = "$(INCREMENTAL_OBJECTS)";
|
||||
if(!incr_objs.isEmpty())
|
||||
incr_objs += " ";
|
||||
incr_objs += incr_target_dir;
|
||||
incr_objs += incr_target_dir_f;
|
||||
} else {
|
||||
//actual target
|
||||
QString incr_target_dir = var("DESTDIR") + "lib" + incr_target + "." +
|
||||
project->first("QMAKE_EXTENSION_SHLIB");
|
||||
QString incr_target_dir_d = escapeDependencyPath(incr_target_dir);
|
||||
QString incr_target_dir_f = escapeFilePath(incr_target_dir);
|
||||
QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
|
||||
if(project->isActiveConfig("debug"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_DEBUG");
|
||||
@ -463,31 +475,31 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO");
|
||||
else
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE");
|
||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
t << incr_target_dir_d << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
|
||||
t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir_f <<
|
||||
" $(INCREMENTAL_OBJECTS)\n";
|
||||
//communicated below
|
||||
if(!destdir.isEmpty()) {
|
||||
if(!incr_objs.isEmpty())
|
||||
incr_objs += " ";
|
||||
incr_objs += "-L" + destdir;
|
||||
incr_objs += "-L" + escapeFilePath(destdir);
|
||||
} else {
|
||||
if(!incr_objs.isEmpty())
|
||||
incr_objs += " ";
|
||||
incr_objs += "-L" + qmake_getpwd();
|
||||
incr_objs += "-L" + escapeFilePath(qmake_getpwd());
|
||||
}
|
||||
if(!incr_objs.isEmpty())
|
||||
incr_objs += " ";
|
||||
incr_objs += " -l" + incr_target;
|
||||
deps.prepend(incr_target_dir + " ");
|
||||
incr_objs += " -l" + escapeFilePath(incr_target);
|
||||
deps.prepend(incr_target_dir_d + ' ');
|
||||
incr_deps = "$(OBJECTS)";
|
||||
}
|
||||
|
||||
//real target
|
||||
t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
|
||||
<< " " << var("POST_TARGETDEPS") << "\n\t";
|
||||
t << var("TARGET") << ": " << depVar("PRE_TARGETDEPS") << ' ' << incr_deps << ' ' << target_deps
|
||||
<< ' ' << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
@ -497,8 +509,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
} else {
|
||||
t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) "
|
||||
<< target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
|
||||
t << "$(TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) "
|
||||
<< target_deps << ' ' << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
if (project->first("TEMPLATE") != "aux") {
|
||||
if (!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
@ -512,16 +524,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
allDeps = " $(TARGET)";
|
||||
} else if(!project->isActiveConfig("staticlib")) {
|
||||
QString destdir = unescapeFilePath(project->first("DESTDIR").toQString()), incr_deps;
|
||||
QString destdir_r = project->first("DESTDIR").toQString(), incr_deps;
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION").toQString();
|
||||
if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
|
||||
bundle_loc.prepend("/");
|
||||
if(!bundle_loc.endsWith("/"))
|
||||
bundle_loc += "/";
|
||||
destdir += project->first("QMAKE_BUNDLE") + bundle_loc;
|
||||
destdir_r += project->first("QMAKE_BUNDLE") + bundle_loc;
|
||||
}
|
||||
destdir = escapeFilePath(destdir);
|
||||
QString destdir_d = escapeDependencyPath(destdir_r);
|
||||
QString destdir = escapeFilePath(destdir_r);
|
||||
|
||||
if(do_incremental) {
|
||||
ProString s_ext = project->first("QMAKE_EXTENSION_SHLIB");
|
||||
@ -530,23 +543,26 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(incr_target.indexOf(Option::dir_sep) != -1)
|
||||
incr_target = incr_target.right(incr_target.length() -
|
||||
(incr_target.lastIndexOf(Option::dir_sep) + 1));
|
||||
incr_target = escapeFilePath(incr_target);
|
||||
|
||||
if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
|
||||
QString incr_target_dir = escapeFilePath(var("OBJECTS_DIR") + incr_target + Option::obj_ext);
|
||||
QString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext;
|
||||
QString incr_target_dir_d = escapeDependencyPath(incr_target_dir);
|
||||
QString incr_target_dir_f = escapeFilePath(incr_target_dir);
|
||||
//actual target
|
||||
const QString link_deps = "$(OBJECTS) ";
|
||||
t << incr_target_dir << ": " << link_deps << "\n\t"
|
||||
<< "ld -r -o " << incr_target_dir << " " << link_deps << endl;
|
||||
t << incr_target_dir_d << ": " << link_deps << "\n\t"
|
||||
<< "ld -r -o " << incr_target_dir_f << ' ' << link_deps << endl;
|
||||
//communicated below
|
||||
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
|
||||
cmd[0] = cmd.at(0).toQString().replace("$(OBJECTS) ", "$(INCREMENTAL_OBJECTS)"); //ick
|
||||
cmd.append(incr_target_dir);
|
||||
deps.prepend(incr_target_dir + " ");
|
||||
cmd.append(incr_target_dir_f);
|
||||
deps.prepend(incr_target_dir_d + ' ');
|
||||
incr_deps = "$(INCREMENTAL_OBJECTS)";
|
||||
} else {
|
||||
//actual target
|
||||
QString incr_target_dir = escapeFilePath(destdir + "lib" + incr_target + "." + s_ext);
|
||||
QString incr_target_dir = destdir_r + "lib" + incr_target + '.' + s_ext;
|
||||
QString incr_target_dir_d = escapeDependencyPath(incr_target_dir);
|
||||
QString incr_target_dir_f = escapeFilePath(incr_target_dir);
|
||||
QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
|
||||
if(!project->isEmpty("QMAKE_LFLAGS_INCREMENTAL"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_INCREMENTAL") + " ";
|
||||
@ -556,29 +572,29 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO");
|
||||
else
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE");
|
||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
t << incr_target_dir_d << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
t << "$(LINK) " << incr_lflags << " " << var("QMAKE_LINK_O_FLAG") << incr_target_dir <<
|
||||
t << "$(LINK) " << incr_lflags << ' ' << var("QMAKE_LINK_O_FLAG") << incr_target_dir_f <<
|
||||
" $(INCREMENTAL_OBJECTS)\n";
|
||||
//communicated below
|
||||
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
|
||||
if(!destdir.isEmpty())
|
||||
cmd.append(" -L" + destdir);
|
||||
cmd.append(" -l" + incr_target);
|
||||
deps.prepend(incr_target_dir + " ");
|
||||
cmd.append(" -l" + escapeFilePath(incr_target));
|
||||
deps.prepend(incr_target_dir_d + ' ');
|
||||
incr_deps = "$(OBJECTS)";
|
||||
}
|
||||
|
||||
//real target
|
||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " "
|
||||
<< incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
|
||||
t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS") << ' '
|
||||
<< incr_deps << " $(SUBLIBS) " << target_deps << ' ' << depVar("POST_TARGETDEPS");
|
||||
} else {
|
||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
||||
t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS")
|
||||
<< " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps
|
||||
<< " " << var("POST_TARGETDEPS");
|
||||
<< ' ' << depVar("POST_TARGETDEPS");
|
||||
}
|
||||
allDeps = ' ' + destdir + "$(TARGET)";
|
||||
allDeps = ' ' + destdir_d + "$(TARGET)";
|
||||
if(!destdir.isEmpty())
|
||||
t << "\n\t" << mkdir_p_asstring(destdir, false);
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
@ -598,8 +614,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
} else if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
QString currentLink = destdir + "Versions/Current";
|
||||
bundledFiles << currentLink << destdir + "$(TARGET)";
|
||||
QString currentLink = destdir_r + "Versions/Current";
|
||||
QString currentLink_f = escapeDependencyPath(currentLink);
|
||||
bundledFiles << currentLink << destdir_r + "$(TARGET)";
|
||||
t << "\n\t"
|
||||
<< "-$(DEL_FILE) $(TARGET) $(TARGET0) $(DESTDIR)$(TARGET0)\n\t"
|
||||
<< var("QMAKE_LINK_SHLIB_CMD") << "\n\t"
|
||||
@ -608,9 +625,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t"
|
||||
<< varGlue("QMAKE_LN_SHLIB", "-", " ",
|
||||
" Versions/Current/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t"
|
||||
<< "-$(DEL_FILE) " << currentLink << "\n\t"
|
||||
<< "-$(DEL_FILE) " << currentLink_f << "\n\t"
|
||||
<< varGlue("QMAKE_LN_SHLIB","-"," ", " " + project->first("QMAKE_FRAMEWORK_VERSION") +
|
||||
" " + currentLink) << "\n\t";
|
||||
' ' + currentLink_f) << "\n\t";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
@ -667,10 +684,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
if (! project->isActiveConfig("plugin")) {
|
||||
t << "staticlib: $(TARGETA)\n\n";
|
||||
t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)";
|
||||
t << "$(TARGETA): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)";
|
||||
if(do_incremental)
|
||||
t << " $(INCREMENTAL_OBJECTS)";
|
||||
t << " " << var("POST_TARGETDEPS") << "\n\t"
|
||||
t << ' ' << depVar("POST_TARGETDEPS") << "\n\t"
|
||||
<< "-$(DEL_FILE) $(TARGETA) \n\t"
|
||||
<< var("QMAKE_AR_CMD");
|
||||
if(do_incremental)
|
||||
@ -680,15 +697,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << endl << endl;
|
||||
}
|
||||
} else {
|
||||
QString destdir = project->first("DESTDIR").toQString();
|
||||
allDeps = ' ' + destdir + "$(TARGET)"
|
||||
+ varGlue("QMAKE_AR_SUBLIBS", ' ' + destdir, ' ' + destdir, "");
|
||||
t << "staticlib: " << destdir << "$(TARGET)\n\n";
|
||||
QString destdir_r = project->first("DESTDIR").toQString();
|
||||
QString destdir_d = escapeDependencyPath(destdir_r);
|
||||
QString destdir = escapeFilePath(destdir_r);
|
||||
allDeps = ' ' + destdir_d + "$(TARGET)"
|
||||
+ varGlue("QMAKE_AR_SUBLIBS", ' ' + destdir_d, ' ' + destdir_d, "");
|
||||
t << "staticlib: " << destdir_d << "$(TARGET)\n\n";
|
||||
if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
|
||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
||||
<< " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
|
||||
t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS")
|
||||
<< " $(OBJECTS) $(OBJCOMP) " << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
t << "-$(DEL_FILE) $(TARGET)\n\t"
|
||||
<< var("QMAKE_AR_CMD") << "\n";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
@ -709,26 +728,27 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
for(int cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++)
|
||||
build << (*objit);
|
||||
QString ar;
|
||||
ProString lib = escapeFilePath(*libit);
|
||||
if((*libit) == "$(TARGET)") {
|
||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
||||
<< " " << var("POST_TARGETDEPS") << valList(build) << "\n\t";
|
||||
t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS")
|
||||
<< ' ' << depVar("POST_TARGETDEPS") << valList(escapeDependencyPaths(build)) << "\n\t";
|
||||
ar = project->first("QMAKE_AR_CMD").toQString();
|
||||
ar.replace("$(OBJECTS)", build.join(' '));
|
||||
ar.replace("$(OBJECTS)", escapeFilePaths(build).join(' '));
|
||||
} else {
|
||||
t << (*libit) << ": " << valList(build) << "\n\t";
|
||||
ar = "$(AR) " + (*libit) + " " + build.join(' ');
|
||||
t << escapeDependencyPath(*libit) << ": " << valList(escapeDependencyPaths(build)) << "\n\t";
|
||||
ar = "$(AR) " + lib + ' ' + escapeFilePaths(build).join(' ');
|
||||
}
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << "-$(DEL_FILE) " << (*libit) << "\n\t"
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
t << "-$(DEL_FILE) " << lib << "\n\t"
|
||||
<< ar << "\n";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\t" << var("QMAKE_POST_LINK") << "\n";
|
||||
if(!project->isEmpty("QMAKE_RANLIB"))
|
||||
t << "\t$(RANLIB) " << (*libit) << "\n";
|
||||
t << "\t$(RANLIB) " << lib << "\n";
|
||||
if(!destdir.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << destdir << (*libit) << "\n"
|
||||
<< "\t-$(MOVE) " << (*libit) << " " << destdir << " \n";
|
||||
t << "\t-$(DEL_FILE) " << destdir << lib << "\n"
|
||||
<< "\t-$(MOVE) " << lib << ' ' << destdir << " \n";
|
||||
}
|
||||
}
|
||||
t << endl << endl;
|
||||
@ -746,7 +766,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!meta_files.isEmpty())
|
||||
t << escapeDependencyPaths(meta_files).join(" ") << ": \n\t"
|
||||
<< "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl;
|
||||
<< "@$(QMAKE) -prl " << buildArgs() << ' ' << escapeFilePath(project->projectFile()) << endl;
|
||||
}
|
||||
|
||||
if (!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
@ -754,47 +774,53 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
ProStringList &alldeps = project->values("ALL_DEPS");
|
||||
QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
|
||||
if (!project->first("QMAKE_PKGINFO").isEmpty()) {
|
||||
ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
|
||||
ProString pkginfo = project->first("QMAKE_PKGINFO");
|
||||
ProString pkginfo_f = escapeFilePath(pkginfo);
|
||||
ProString pkginfo_d = escapeDependencyPath(pkginfo);
|
||||
bundledFiles << pkginfo;
|
||||
alldeps << pkginfo;
|
||||
QString destdir = bundle_dir + "Contents";
|
||||
t << pkginfo << ": \n\t";
|
||||
t << pkginfo_d << ": \n\t";
|
||||
if (!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << "@$(DEL_FILE) " << pkginfo << "\n\t"
|
||||
t << "@$(DEL_FILE) " << pkginfo_f << "\n\t"
|
||||
<< "@echo \"APPL"
|
||||
<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
|
||||
? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
|
||||
<< "\" >" << pkginfo << endl;
|
||||
<< "\" > " << pkginfo_f << endl;
|
||||
}
|
||||
if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) {
|
||||
ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE"));
|
||||
ProString resources = project->first("QMAKE_BUNDLE_RESOURCE_FILE");
|
||||
ProString resources_f = escapeFilePath(resources);
|
||||
ProString resources_d = escapeDependencyPath(resources);
|
||||
bundledFiles << resources;
|
||||
alldeps << resources;
|
||||
QString destdir = bundle_dir + "Contents/Resources";
|
||||
t << resources << ": \n\t";
|
||||
t << resources_d << ": \n\t";
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << "@touch " << resources << "\n\t\n";
|
||||
t << "@touch " << resources_f << "\n\t\n";
|
||||
}
|
||||
//copy the plist
|
||||
while (!project->isActiveConfig("no_plist")) { // 'while' just to be able to 'break'
|
||||
QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString()));
|
||||
QString info_plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString());
|
||||
if (info_plist.isEmpty())
|
||||
info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
|
||||
if (!exists(Option::fixPathToLocalOS(info_plist))) {
|
||||
if (!exists(Option::normalizePath(info_plist))) {
|
||||
warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.",
|
||||
info_plist.toLatin1().constData());
|
||||
break;
|
||||
}
|
||||
info_plist = escapeFilePath(info_plist);
|
||||
bool isApp = (project->first("TEMPLATE") == "app");
|
||||
QString info_plist_out = escapeFilePath(
|
||||
QString info_plist_out =
|
||||
bundle_dir + (isApp ? "Contents/Info.plist"
|
||||
: "Versions/" + project->first("QMAKE_FRAMEWORK_VERSION")
|
||||
+ "/Resources/Info.plist"));
|
||||
+ "/Resources/Info.plist");
|
||||
bundledFiles << info_plist_out;
|
||||
alldeps << info_plist_out;
|
||||
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
|
||||
t << info_plist_out << ": \n\t";
|
||||
t << escapeDependencyPath(info_plist_out) << ": \n\t";
|
||||
info_plist_out = escapeFilePath(info_plist_out);
|
||||
if (!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
ProStringList commonSedArgs;
|
||||
@ -834,13 +860,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
//copy the icon
|
||||
if (!project->isEmpty("ICON")) {
|
||||
QString dir = bundle_dir + "Contents/Resources/";
|
||||
const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1));
|
||||
const QString icon_path = dir + icon.section(Option::dir_sep, -1);
|
||||
QString icon_path_f = escapeFilePath(icon_path);
|
||||
bundledFiles << icon_path;
|
||||
alldeps << icon_path;
|
||||
t << icon_path << ": " << icon << "\n\t"
|
||||
t << escapeDependencyPath(icon_path) << ": " << escapeDependencyPath(icon) << "\n\t"
|
||||
<< mkdir_p_asstring(dir) << "\n\t"
|
||||
<< "@$(DEL_FILE) " << icon_path << "\n\t"
|
||||
<< "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
|
||||
<< "@$(DEL_FILE) " << icon_path_f << "\n\t"
|
||||
<< "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << endl;
|
||||
}
|
||||
} else {
|
||||
symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources";
|
||||
@ -871,23 +898,24 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
int pos = name.indexOf('/');
|
||||
if (pos > 0)
|
||||
name = name.mid(0, pos);
|
||||
symlinks[Option::fixPathToLocalOS(path + name)] =
|
||||
symlinks[Option::fixPathToTargetOS(path + name)] =
|
||||
project->first(vkey) + "/Current/" + name;
|
||||
path += version;
|
||||
}
|
||||
path += project->first(pkey).toQString();
|
||||
path = Option::fixPathToLocalOS(path);
|
||||
path = Option::fixPathToTargetOS(path);
|
||||
for(int file = 0; file < files.count(); file++) {
|
||||
QString fn = files.at(file).toQString();
|
||||
QString src = fileFixify(fn, FileFixifyAbsolute);
|
||||
if (!QFile::exists(src))
|
||||
src = fn;
|
||||
src = escapeFilePath(src);
|
||||
const QString dst = escapeFilePath(path + Option::dir_sep + fileInfo(fn).fileName());
|
||||
QString dst = path + Option::dir_sep + fileInfo(fn).fileName();
|
||||
bundledFiles << dst;
|
||||
alldeps << dst;
|
||||
t << dst << ": " << src << "\n\t"
|
||||
t << escapeDependencyPath(dst) << ": " << escapeDependencyPath(src) << "\n\t"
|
||||
<< mkdir_p_asstring(path) << "\n\t";
|
||||
src = escapeFilePath(src);
|
||||
dst = escapeFilePath(dst);
|
||||
QFileInfo fi(fileInfo(fn));
|
||||
if(fi.isDir())
|
||||
t << "@$(DEL_FILE) -r " << dst << "\n\t"
|
||||
@ -898,18 +926,19 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
QString bundle_dir_f = escapeFilePath(bundle_dir);
|
||||
QHash<QString, QString>::ConstIterator symIt = symlinks.constBegin(),
|
||||
symEnd = symlinks.constEnd();
|
||||
for (; symIt != symEnd; ++symIt) {
|
||||
bundledFiles << symIt.key();
|
||||
alldeps << symIt.key();
|
||||
t << symIt.key() << ":\n\t"
|
||||
t << escapeDependencyPath(symIt.key()) << ":\n\t"
|
||||
<< mkdir_p_asstring(bundle_dir) << "\n\t"
|
||||
<< "@$(SYMLINK) " << symIt.value() << " " << bundle_dir << endl;
|
||||
<< "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl;
|
||||
}
|
||||
}
|
||||
|
||||
t << endl << "all: " << escapeDependencyPath(deps)
|
||||
t << endl << "all: " << deps
|
||||
<< valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " \\\n\t\t", " \\\n\t\t", "")
|
||||
<< allDeps << endl << endl;
|
||||
|
||||
@ -930,15 +959,16 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
const ProStringList &val = project->values((*var_it).toKey());
|
||||
if(val.isEmpty())
|
||||
continue;
|
||||
t << "\t$(COPY_FILE) --parents " << val.join(' ') << " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
t << "\t$(COPY_FILE) --parents " << escapeFilePaths(val).join(' ')
|
||||
<< " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!project->isEmpty("TRANSLATIONS"))
|
||||
t << "\t$(COPY_FILE) --parents " << var("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
t << "\t$(COPY_FILE) --parents " << fileVar("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
t << endl << endl;
|
||||
|
||||
QString clean_targets = "compiler_clean " + var("CLEAN_DEPS");
|
||||
QString clean_targets = " compiler_clean " + depVar("CLEAN_DEPS");
|
||||
if(do_incremental) {
|
||||
t << "incrclean:\n";
|
||||
if(src_incremental)
|
||||
@ -993,26 +1023,27 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
precomp_files += precomph_out_dir + header_prefix + "objective-c++" + header_suffix;
|
||||
}
|
||||
}
|
||||
t << "-$(DEL_FILE) " << precomp_files.join(' ') << "\n\t";
|
||||
t << "-$(DEL_FILE) " << escapeFilePaths(precomp_files).join(' ') << "\n\t";
|
||||
}
|
||||
if(src_incremental)
|
||||
t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n\t";
|
||||
t << varGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
|
||||
t << fileVarGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
|
||||
<< "-$(DEL_FILE) *~ core *.core\n"
|
||||
<< varGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
|
||||
<< fileVarGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
|
||||
|
||||
ProString destdir = project->first("DESTDIR");
|
||||
if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep))
|
||||
destdir += Option::dir_sep;
|
||||
t << "distclean: clean " << var("DISTCLEAN_DEPS") << '\n';
|
||||
t << "distclean: clean " << depVar("DISTCLEAN_DEPS") << '\n';
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE"));
|
||||
t << "\t-$(DEL_FILE) -r " << bundlePath << endl;
|
||||
} else if(project->isActiveConfig("compile_libtool")) {
|
||||
t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) $(TARGET)\n";
|
||||
} else if (project->isActiveConfig("staticlib")) {
|
||||
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n";
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(destdir) << "$(TARGET) \n";
|
||||
} else if (project->values("QMAKE_APP_FLAG").isEmpty() && !project->isActiveConfig("plugin")) {
|
||||
destdir = escapeFilePath(destdir);
|
||||
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n";
|
||||
if (!project->isActiveConfig("unversioned_libname")) {
|
||||
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
|
||||
@ -1023,11 +1054,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
} else {
|
||||
t << "\t-$(DEL_FILE) $(TARGET) \n";
|
||||
}
|
||||
t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
|
||||
t << fileVarGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
|
||||
{
|
||||
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << ofile << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
}
|
||||
t << endl << endl;
|
||||
|
||||
@ -1038,8 +1069,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
libdir = project->first("SUBLIBS_DIR");
|
||||
const ProStringList &l = project->values("SUBLIBS");
|
||||
for (it = l.begin(); it != l.end(); ++it)
|
||||
t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
|
||||
<< project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
|
||||
t << escapeDependencyPath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.'
|
||||
+ project->first("QMAKE_EXTENSION_STATICLIB")) << ":\n\t"
|
||||
<< var(ProKey("MAKELIB" + *it)) << endl << endl;
|
||||
}
|
||||
|
||||
@ -1069,13 +1100,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (project->isActiveConfig("icc_pch_style")) {
|
||||
// icc style
|
||||
QString sourceFile = pchOutput + Option::cpp_ext.first();
|
||||
QString sourceFile_f = escapeFilePath(sourceFile);
|
||||
QString objectFile = createObjectList(ProStringList(sourceFile)).first().toQString();
|
||||
t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
|
||||
<< "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile
|
||||
<< "\n\trm -f " << pchOutput;
|
||||
t << escapeDependencyPath(pchOutput) << ": " << escapeDependencyPath(pchInput) << ' '
|
||||
<< escapeDependencyPaths(findDependencies(pchInput)).join(" \\\n\t\t")
|
||||
<< "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile_f
|
||||
<< "\n\trm -f " << escapeFilePath(pchOutput);
|
||||
|
||||
pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile)
|
||||
.replace("${QMAKE_PCH_TEMP_OBJECT}", objectFile);
|
||||
pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile_f)
|
||||
.replace("${QMAKE_PCH_TEMP_OBJECT}", escapeFilePath(objectFile));
|
||||
} else {
|
||||
// gcc style (including clang_pch_style)
|
||||
ProString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
|
||||
@ -1098,12 +1131,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
continue;
|
||||
pchOutput += header_prefix + pchOutputFile + header_suffix;
|
||||
|
||||
t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
|
||||
t << escapeDependencyPath(pchOutput) << ": " << escapeDependencyPath(pchInput) << ' '
|
||||
<< escapeDependencyPaths(findDependencies(pchInput)).join(" \\\n\t\t")
|
||||
<< "\n\t" << mkdir_p_asstring(pchOutputDir);
|
||||
}
|
||||
pchFlags.replace("${QMAKE_PCH_INPUT}", pchInput)
|
||||
.replace("${QMAKE_PCH_OUTPUT_BASE}", pchBaseName.toQString())
|
||||
.replace("${QMAKE_PCH_OUTPUT}", pchOutput.toQString());
|
||||
pchFlags.replace("${QMAKE_PCH_INPUT}", escapeFilePath(pchInput))
|
||||
.replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName.toQString()))
|
||||
.replace("${QMAKE_PCH_OUTPUT}", escapeFilePath(pchOutput.toQString()));
|
||||
|
||||
QString compiler;
|
||||
if(comps[i] == "C" || comps[i] == "OBJC" || comps[i] == "OBJCXX")
|
||||
@ -1166,11 +1200,11 @@ void UnixMakefileGenerator::init2()
|
||||
if(!bundle_loc.endsWith("/"))
|
||||
bundle_loc += "/";
|
||||
project->values("TARGET_").append(project->first("QMAKE_BUNDLE") +
|
||||
bundle_loc + unescapeFilePath(project->first("TARGET")));
|
||||
bundle_loc + project->first("TARGET"));
|
||||
project->values("TARGET_x.y").append(project->first("QMAKE_BUNDLE") +
|
||||
"/Versions/" +
|
||||
project->first("QMAKE_FRAMEWORK_VERSION") +
|
||||
bundle_loc + unescapeFilePath(project->first("TARGET")));
|
||||
bundle_loc + project->first("TARGET"));
|
||||
} else if(project->isActiveConfig("plugin")) {
|
||||
QString prefix;
|
||||
if(!project->isActiveConfig("no_plugin_name_prefix"))
|
||||
@ -1363,7 +1397,7 @@ UnixMakefileGenerator::libtoolFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -1388,22 +1422,23 @@ UnixMakefileGenerator::writeLibtoolFile()
|
||||
t << "\n";
|
||||
|
||||
t << "# The name that we can dlopen(3).\n"
|
||||
<< "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
|
||||
<< "dlname='" << fileVar(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
|
||||
<< "'\n\n";
|
||||
|
||||
t << "# Names of this library.\n";
|
||||
t << "library_names='";
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
t << var("TARGET");
|
||||
t << fileVar("TARGET");
|
||||
} else {
|
||||
if (project->isEmpty("QMAKE_HPUX_SHLIB"))
|
||||
t << var("TARGET_x.y.z") << " ";
|
||||
t << var("TARGET_x") << " " << var("TARGET_");
|
||||
t << fileVar("TARGET_x.y.z") << ' ';
|
||||
t << fileVar("TARGET_x") << ' ' << fileVar("TARGET_");
|
||||
}
|
||||
t << "'\n\n";
|
||||
|
||||
t << "# The name of the static archive.\n"
|
||||
<< "old_library='" << lname.left(lname.length()-Option::libtool_ext.length()) << ".a'\n\n";
|
||||
<< "old_library='" << escapeFilePath(lname.left(lname.length()-Option::libtool_ext.length()))
|
||||
<< ".a'\n\n";
|
||||
|
||||
t << "# Libraries that this one depends upon.\n";
|
||||
ProStringList libs;
|
||||
@ -1413,7 +1448,7 @@ UnixMakefileGenerator::writeLibtoolFile()
|
||||
libs << "QMAKE_LIBS"; //obvious one
|
||||
t << "dependency_libs='";
|
||||
for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
|
||||
t << project->values((*it).toKey()).join(' ') << " ";
|
||||
t << fixLibFlags((*it).toKey()).join(' ') << ' ';
|
||||
t << "'\n\n";
|
||||
|
||||
t << "# Version information for " << lname << "\n";
|
||||
|
@ -46,17 +46,12 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator()
|
||||
{
|
||||
if (isWindowsShell())
|
||||
quote = "\"";
|
||||
else
|
||||
quote = "'";
|
||||
}
|
||||
|
||||
QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const
|
||||
{
|
||||
QString ret = path;
|
||||
ret.remove('\"');
|
||||
ret.replace('\\', "/");
|
||||
ret.replace('\\', "/"); // ### this shouldn't be here
|
||||
ret.replace(' ', "\\ ");
|
||||
return ret;
|
||||
}
|
||||
@ -71,6 +66,13 @@ QString MingwMakefileGenerator::getManifestFileForRcFile() const
|
||||
return project->first("QMAKE_MANIFEST").toQString();
|
||||
}
|
||||
|
||||
ProString MingwMakefileGenerator::fixLibFlag(const ProString &lib)
|
||||
{
|
||||
if (lib.startsWith("lib"))
|
||||
return QStringLiteral("-l") + escapeFilePath(lib.mid(3));
|
||||
return escapeFilePath(lib);
|
||||
}
|
||||
|
||||
bool MingwMakefileGenerator::findLibraries()
|
||||
{
|
||||
QList<QMakeLocalFileName> dirs;
|
||||
@ -89,9 +91,9 @@ bool MingwMakefileGenerator::findLibraries()
|
||||
if (ver > 0)
|
||||
extension += QString::number(ver);
|
||||
extension += suffix;
|
||||
if(QMakeMetaInfo::libExists((*dir_it).local() + Option::dir_sep + steam) ||
|
||||
exists((*dir_it).local() + Option::dir_sep + steam + extension + ".a") ||
|
||||
exists((*dir_it).local() + Option::dir_sep + steam + extension + ".dll.a")) {
|
||||
if (QMakeMetaInfo::libExists((*dir_it).local() + '/' + steam)
|
||||
|| exists((*dir_it).local() + '/' + steam + extension + ".a")
|
||||
|| exists((*dir_it).local() + '/' + steam + extension + ".dll.a")) {
|
||||
out = *it + extension;
|
||||
break;
|
||||
}
|
||||
@ -99,7 +101,9 @@ bool MingwMakefileGenerator::findLibraries()
|
||||
if (!out.isEmpty()) // We assume if it never finds it that its correct
|
||||
(*it) = out;
|
||||
} else if ((*it).startsWith("-L")) {
|
||||
dirs.append(QMakeLocalFileName((*it).mid(2).toQString()));
|
||||
QMakeLocalFileName f((*it).mid(2).toQString());
|
||||
dirs.append(f);
|
||||
*it = "-L" + f.real();
|
||||
}
|
||||
|
||||
++it;
|
||||
@ -124,7 +128,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
t << escapeDependencyPath(*it) << ' ';
|
||||
t << "first all clean install distclean uninstall: qmake\n"
|
||||
<< "qmake_all:\n";
|
||||
writeMakeQmake(t);
|
||||
@ -150,6 +154,7 @@ void createLdObjectScriptFile(const QString &fileName, const ProStringList &objL
|
||||
t << "INPUT(\n";
|
||||
for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
|
||||
QString path = (*it).toQString();
|
||||
// ### quoting?
|
||||
if (QDir::isRelativePath(path))
|
||||
t << "./" << path << endl;
|
||||
else
|
||||
@ -167,6 +172,7 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
|
||||
QFile file(filePath);
|
||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
QTextStream t(&file);
|
||||
// ### quoting?
|
||||
t << "CREATE " << target << endl;
|
||||
for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
|
||||
t << "ADDMOD " << *it << endl;
|
||||
@ -185,6 +191,7 @@ void createRvctObjectScriptFile(const QString &fileName, const ProStringList &ob
|
||||
QTextStream t(&file);
|
||||
for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
|
||||
QString path = (*it).toQString();
|
||||
// ### quoting?
|
||||
if (QDir::isRelativePath(path))
|
||||
t << "./" << path << endl;
|
||||
else
|
||||
@ -205,14 +212,14 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
|
||||
t << escapeDependencyPath(cHeader) << ": " << escapeDependencyPath(header) << " "
|
||||
<< escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
|
||||
<< "\n\t" << mkdir_p_asstring(preCompHeaderOut)
|
||||
<< "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << cHeader << " " << header
|
||||
<< endl << endl;
|
||||
<< "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << escapeFilePath(cHeader)
|
||||
<< ' ' << escapeFilePath(header) << endl << endl;
|
||||
QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++";
|
||||
t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " "
|
||||
<< escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
|
||||
<< "\n\t" << mkdir_p_asstring(preCompHeaderOut)
|
||||
<< "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << cppHeader << " " << header
|
||||
<< endl << endl;
|
||||
<< "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << escapeFilePath(cppHeader)
|
||||
<< ' ' << escapeFilePath(header) << endl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,9 +253,7 @@ void MingwMakefileGenerator::init()
|
||||
|
||||
processVars();
|
||||
|
||||
if (!project->values("RES_FILE").isEmpty()) {
|
||||
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE"));
|
||||
}
|
||||
project->values("QMAKE_LIBS") += project->values("RES_FILE");
|
||||
|
||||
if (project->isActiveConfig("dll")) {
|
||||
QString destDir = "";
|
||||
@ -256,7 +261,7 @@ void MingwMakefileGenerator::init()
|
||||
destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false);
|
||||
project->values("MINGW_IMPORT_LIB").prepend(destDir + "lib" + project->first("TARGET")
|
||||
+ project->first("TARGET_VERSION_EXT") + ".a");
|
||||
project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
|
||||
project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + fileVar("MINGW_IMPORT_LIB"));
|
||||
}
|
||||
|
||||
if (!project->values("DEF_FILE").isEmpty()) {
|
||||
@ -278,6 +283,7 @@ void MingwMakefileGenerator::init()
|
||||
project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c");
|
||||
project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c++");
|
||||
|
||||
preCompHeader = escapeFilePath(preCompHeader);
|
||||
project->values("QMAKE_RUN_CC").clear();
|
||||
project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader +
|
||||
" $(CFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$obj $src");
|
||||
@ -306,13 +312,12 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
|
||||
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
QString inc = (*incit).toQString();
|
||||
inc.replace(QRegExp("\\\\$"), "");
|
||||
inc.replace(QRegExp("\""), "");
|
||||
|
||||
if (!isystem.isEmpty() && isSystemInclude(inc))
|
||||
t << isystem << ' ';
|
||||
else
|
||||
t << "-I";
|
||||
t << quote << inc << quote << " ";
|
||||
t << escapeFilePath(inc) << ' ';
|
||||
}
|
||||
t << endl;
|
||||
}
|
||||
@ -325,8 +330,8 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
|
||||
t << "LINKER = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LIBS = "
|
||||
<< var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
|
||||
<< var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
|
||||
<< fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,7 +350,7 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
|
||||
QString ar_cmd = project->values("QMAKE_LIB").join(' ');
|
||||
if (ar_cmd.isEmpty())
|
||||
ar_cmd = "armar --create";
|
||||
objectsLinkLine = ar_cmd + " " + var("DEST_TARGET") + " --via " + escapeFilePath(ar_script_file);
|
||||
objectsLinkLine = ar_cmd + ' ' + fileVar("DEST_TARGET") + " --via " + escapeFilePath(ar_script_file);
|
||||
} else {
|
||||
// Strip off any options since the ar commands will be read from file.
|
||||
QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
|
||||
@ -373,8 +378,9 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
|
||||
void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
{
|
||||
t << "first: all\n";
|
||||
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << " $(DESTDIR_TARGET)\n\n";
|
||||
t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");
|
||||
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName()))
|
||||
<< ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n";
|
||||
t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
||||
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
|
||||
@ -409,8 +415,8 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
|
||||
}
|
||||
|
||||
if (!rc_file.isEmpty()) {
|
||||
t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t"
|
||||
<< var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE")
|
||||
t << escapeDependencyPath(var("RES_FILE")) << ": " << escapeDependencyPath(rc_file) << "\n\t"
|
||||
<< var("QMAKE_RC") << " -i " << escapeFilePath(rc_file) << " -o " << fileVar("RES_FILE")
|
||||
<< incPathStr << " $(DEFINES)\n\n";
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ public:
|
||||
~MingwMakefileGenerator();
|
||||
protected:
|
||||
QString escapeDependencyPath(const QString &path) const;
|
||||
ProString escapeDependencyPath(const ProString &path) const { return MakefileGenerator::escapeDependencyPath(path); }
|
||||
virtual ProString fixLibFlag(const ProString &lib);
|
||||
QString getLibTarget();
|
||||
virtual QString getManifestFileForRcFile() const;
|
||||
bool writeMakefile(QTextStream &);
|
||||
@ -64,7 +66,6 @@ private:
|
||||
virtual bool findLibraries();
|
||||
|
||||
QString objectsLinkLine;
|
||||
QString quote;
|
||||
};
|
||||
|
||||
inline MingwMakefileGenerator::~MingwMakefileGenerator()
|
||||
|
@ -1900,11 +1900,11 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
|
||||
fileAdded = true;
|
||||
|
||||
xmlFilter << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename))
|
||||
<< attrTag("Include", Option::fixPathToTargetOS(filename))
|
||||
<< attrTagS("Filter", filter.Name);
|
||||
|
||||
xml << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename));
|
||||
<< attrTag("Include", Option::fixPathToTargetOS(filename));
|
||||
|
||||
if (filter.Name.startsWith("Form Files")
|
||||
|| filter.Name.startsWith("Generated Files")
|
||||
@ -1963,7 +1963,7 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
|
||||
void VCXProjectWriter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter,
|
||||
const QString &filePath, const QString &filterName)
|
||||
{
|
||||
const QString nativeFilePath = Option::fixPathToLocalOS(filePath);
|
||||
const QString nativeFilePath = Option::fixPathToTargetOS(filePath);
|
||||
if (filterName.startsWith("Source Files")) {
|
||||
xmlFilter << tag("ClCompile")
|
||||
<< attrTag("Include", nativeFilePath)
|
||||
|
@ -252,23 +252,21 @@ QString NmakeMakefileGenerator::defaultInstall(const QString &t)
|
||||
|
||||
const QString root = "$(INSTALL_ROOT)";
|
||||
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));
|
||||
QString targetdir = Option::fixPathToTargetOS(project->first(ProKey(t + ".path")).toQString(), false);
|
||||
targetdir = fileFixify(targetdir, FileFixifyAbsolute);
|
||||
QString targetdir = fileFixify(project->first(ProKey(t + ".path")).toQString(), FileFixifyAbsolute);
|
||||
if(targetdir.right(1) != Option::dir_sep)
|
||||
targetdir += Option::dir_sep;
|
||||
|
||||
if (project->isActiveConfig("debug_info")) {
|
||||
if (t == "dlltarget" || project->values(ProKey(t + ".CONFIG")).indexOf("no_dll") == -1) {
|
||||
QString pdb_target = getPdbTarget();
|
||||
pdb_target.remove('"');
|
||||
QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target;
|
||||
QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute));
|
||||
if(!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\"";
|
||||
ret += QString("-$(INSTALL_FILE) ") + escapeFilePath(src_targ) + ' ' + escapeFilePath(dst_targ);
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_targ));
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,9 +292,12 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
|
||||
|
||||
// precompiled header
|
||||
if(usePCH) {
|
||||
QString precompRule = QString("-c -Yc -Fp%1 -Fo%2").arg(precompPch).arg(precompObj);
|
||||
t << precompObj << ": " << precompH << " " << escapeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
|
||||
<< "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " << precompH << endl << endl;
|
||||
QString precompRule = QString("-c -Yc -Fp%1 -Fo%2")
|
||||
.arg(escapeFilePath(precompPch), escapeFilePath(precompObj));
|
||||
t << escapeDependencyPath(precompObj) << ": " << escapeDependencyPath(precompH) << ' '
|
||||
<< escapeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
|
||||
<< "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP "
|
||||
<< escapeFilePath(precompH) << endl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,10 +308,9 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
|
||||
|| value == "QMAKE_RUN_CXX_IMP"
|
||||
|| value == "QMAKE_RUN_CXX")) {
|
||||
QFileInfo precompHInfo(fileInfo(precompH));
|
||||
QString precompH_f = escapeFilePath(precompHInfo.fileName());
|
||||
QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3")
|
||||
.arg(precompHInfo.fileName())
|
||||
.arg(precompHInfo.fileName())
|
||||
.arg(precompPch);
|
||||
.arg(precompH_f, precompH_f, escapeFilePath(precompPch));
|
||||
QString p = MakefileGenerator::var(value);
|
||||
p.replace("-c", precompRule);
|
||||
// Cannot use -Gm with -FI & -Yu, as this gives an
|
||||
@ -357,9 +357,7 @@ void NmakeMakefileGenerator::init()
|
||||
|
||||
processVars();
|
||||
|
||||
if (!project->values("RES_FILE").isEmpty()) {
|
||||
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE"));
|
||||
}
|
||||
project->values("QMAKE_LIBS") += project->values("RES_FILE");
|
||||
|
||||
if (!project->values("DEF_FILE").isEmpty()) {
|
||||
QString defFileName = fileFixify(project->first("DEF_FILE").toQString());
|
||||
@ -502,11 +500,15 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
if (objDir == ".\\")
|
||||
objDir = "";
|
||||
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
|
||||
t << "{" << sourceDir << "}" << (*cppit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
|
||||
<< var("QMAKE_RUN_CXX_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n";
|
||||
t << '{' << escapeDependencyPath(sourceDir) << '}' << (*cppit)
|
||||
<< '{' << escapeDependencyPath(objDir) << '}' << Option::obj_ext << "::\n\t"
|
||||
<< var("QMAKE_RUN_CXX_IMP_BATCH").replace(QRegExp("\\$@"), fileVar("OBJECTS_DIR"))
|
||||
<< "\n\t$<\n<<\n\n";
|
||||
for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
|
||||
t << "{" << sourceDir << "}" << (*cit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
|
||||
<< var("QMAKE_RUN_CC_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n";
|
||||
t << '{' << escapeDependencyPath(sourceDir) << '}' << (*cit)
|
||||
<< '{' << escapeDependencyPath(objDir) << '}' << Option::obj_ext << "::\n\t"
|
||||
<< var("QMAKE_RUN_CC_IMP_BATCH").replace(QRegExp("\\$@"), fileVar("OBJECTS_DIR"))
|
||||
<< "\n\t$<\n<<\n\n";
|
||||
}
|
||||
} else {
|
||||
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
|
||||
@ -522,8 +524,9 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
const ProString templateName = project->first("TEMPLATE");
|
||||
|
||||
t << "first: all\n";
|
||||
t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(DESTDIR_TARGET)\n\n";
|
||||
t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");
|
||||
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName()))
|
||||
<< ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n";
|
||||
t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
|
||||
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
||||
@ -547,12 +550,12 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
if (linkerSupportsEmbedding) {
|
||||
extraLFlags = "/MANIFEST:embed";
|
||||
} else {
|
||||
manifest = escapeFilePath(target + ".embed.manifest");
|
||||
extraLFlags += "/MANIFEST /MANIFESTFILE:" + manifest;
|
||||
manifest = target + ".embed.manifest";
|
||||
extraLFlags += "/MANIFEST /MANIFESTFILE:" + escapeFilePath(manifest);
|
||||
project->values("QMAKE_CLEAN") << manifest;
|
||||
}
|
||||
} else {
|
||||
manifest = escapeFilePath(fileFixify(manifest));
|
||||
manifest = fileFixify(manifest);
|
||||
}
|
||||
|
||||
const QString resourceId = (templateName == "app") ? "1" : "2";
|
||||
@ -560,16 +563,19 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
if (incrementalLinking && !linkerSupportsEmbedding) {
|
||||
// Link a resource that contains the manifest without modifying the exe/dll after linking.
|
||||
|
||||
QString manifest_rc = escapeFilePath(target + "_manifest.rc");
|
||||
QString manifest_res = escapeFilePath(target + "_manifest.res");
|
||||
QString manifest_bak = escapeFilePath(target + "_manifest.bak");
|
||||
QString manifest_rc = target + "_manifest.rc";
|
||||
QString manifest_res = target + "_manifest.res";
|
||||
project->values("QMAKE_CLEAN") << manifest_rc << manifest_res;
|
||||
manifest_rc = escapeFilePath(manifest_rc);
|
||||
manifest_res = escapeFilePath(manifest_res);
|
||||
|
||||
t << "\n\techo " << resourceId
|
||||
<< " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "
|
||||
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
|
||||
<< cQuoted(manifest) << '>' << manifest_rc;
|
||||
|
||||
if (generateManifest) {
|
||||
manifest = escapeFilePath(manifest);
|
||||
QString manifest_bak = escapeFilePath(target + "_manifest.bak");
|
||||
t << "\n\tif not exist $(DESTDIR_TARGET) if exist " << manifest
|
||||
<< " del " << manifest;
|
||||
t << "\n\tif exist " << manifest << " copy /Y " << manifest << ' ' << manifest_bak;
|
||||
@ -591,7 +597,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
t << "\n\t";
|
||||
writeLinkCommand(t, extraLFlags);
|
||||
if (!linkerSupportsEmbedding) {
|
||||
t << "\n\tmt.exe /nologo /manifest " << manifest
|
||||
t << "\n\tmt.exe /nologo /manifest " << escapeFilePath(manifest)
|
||||
<< " /outputresource:$(DESTDIR_TARGET);" << resourceId;
|
||||
}
|
||||
}
|
||||
@ -604,7 +610,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") &&
|
||||
!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH");
|
||||
if(useSignature) {
|
||||
t << "\n\tsigntool sign /F " << signature << " $(DESTDIR_TARGET)";
|
||||
t << "\n\tsigntool sign /F " << escapeFilePath(signature) << " $(DESTDIR_TARGET)";
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_POST_LINK")) {
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
|
@ -2295,9 +2295,8 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||
QString cmd, cmd_name, out;
|
||||
QStringList deps, inputs;
|
||||
// Variabel replacement of output name
|
||||
out = Option::fixPathToTargetOS(
|
||||
Project->replaceExtraCompilerVariables(tmp_out, inFile, QString()),
|
||||
false);
|
||||
out = Option::fixPathToTargetOS(Project->replaceExtraCompilerVariables(
|
||||
tmp_out, inFile, QString(), MakefileGenerator::NoShell), false);
|
||||
|
||||
// If file has built-in compiler, we've swapped the input and output of
|
||||
// the command, as we in Visual Studio cannot have a Custom Buildstep on
|
||||
@ -2318,9 +2317,8 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||
if (!tmp_dep_cmd.isEmpty()) {
|
||||
// Execute dependency command, and add every line as a dep
|
||||
char buff[256];
|
||||
QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd,
|
||||
Option::fixPathToLocalOS(inFile, true, false),
|
||||
out);
|
||||
QString dep_cmd = Project->replaceExtraCompilerVariables(
|
||||
tmp_dep_cmd, inFile, out, MakefileGenerator::LocalShell);
|
||||
if(Project->canExecute(dep_cmd)) {
|
||||
dep_cmd.prepend(QLatin1String("cd ")
|
||||
+ Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||
@ -2347,8 +2345,9 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||
}
|
||||
for (int i = 0; i < deps.count(); ++i)
|
||||
deps[i] = Option::fixPathToTargetOS(
|
||||
Project->replaceExtraCompilerVariables(deps.at(i), inFile, out),
|
||||
false).trimmed();
|
||||
Project->replaceExtraCompilerVariables(
|
||||
deps.at(i), inFile, out, MakefileGenerator::NoShell),
|
||||
false);
|
||||
// Command for file
|
||||
if (combined) {
|
||||
// Add dependencies for each file
|
||||
@ -2364,28 +2363,27 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||
deps = inputs + deps; // input files themselves too..
|
||||
|
||||
// Replace variables for command w/all input files
|
||||
// ### join gives path issues with directories containing spaces!
|
||||
cmd = Project->replaceExtraCompilerVariables(tmp_cmd,
|
||||
inputs.join(' '),
|
||||
out);
|
||||
inputs,
|
||||
QStringList(out),
|
||||
MakefileGenerator::TargetShell);
|
||||
} else {
|
||||
deps.prepend(inFile); // input file itself too..
|
||||
cmd = Project->replaceExtraCompilerVariables(tmp_cmd,
|
||||
inFile,
|
||||
out);
|
||||
out,
|
||||
MakefileGenerator::TargetShell);
|
||||
}
|
||||
// Name for command
|
||||
if (!tmp_cmd_name.isEmpty()) {
|
||||
cmd_name = Project->replaceExtraCompilerVariables(tmp_cmd_name, inFile, out);
|
||||
cmd_name = Project->replaceExtraCompilerVariables(
|
||||
tmp_cmd_name, inFile, out, MakefileGenerator::NoShell);
|
||||
} else {
|
||||
int space = cmd.indexOf(' ');
|
||||
if (space != -1)
|
||||
cmd_name = cmd.left(space);
|
||||
else
|
||||
cmd_name = cmd;
|
||||
if ((cmd_name[0] == '\'' || cmd_name[0] == '"') &&
|
||||
cmd_name[0] == cmd_name[cmd_name.length()-1])
|
||||
cmd_name = cmd_name.mid(1,cmd_name.length()-2);
|
||||
}
|
||||
|
||||
// Fixify paths
|
||||
@ -2903,7 +2901,7 @@ void VCProjectWriter::write(XmlOutput &xml, VCFilter &tool)
|
||||
for (int i = 0; i < tool.Files.count(); ++i) {
|
||||
const VCFilterFile &info = tool.Files.at(i);
|
||||
xml << tag(q_File)
|
||||
<< attrS(_RelativePath, Option::fixPathToLocalOS(info.file))
|
||||
<< attrS(_RelativePath, Option::fixPathToTargetOS(info.file))
|
||||
<< data(); // In case no custom builds, to avoid "/>" endings
|
||||
outputFileConfig(tool, xml, tool.Files.at(i).file);
|
||||
xml << closetag(q_File);
|
||||
@ -2962,7 +2960,7 @@ void VCProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, const QSt
|
||||
void VCProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, const VCFilterFile &info, const QString &filtername)
|
||||
{
|
||||
xml << tag(q_File)
|
||||
<< attrS(_RelativePath, Option::fixPathToLocalOS(info.file));
|
||||
<< attrS(_RelativePath, Option::fixPathToTargetOS(info.file));
|
||||
for (int i = 0; i < project.SingleProjects.count(); ++i) {
|
||||
VCFilter filter = project.SingleProjects.at(i).filterByName(filtername);
|
||||
if (filter.Config) // only if the filter is not empty
|
||||
|
@ -324,7 +324,8 @@ QUuid VcprojGenerator::getProjectUUID(const QString &filename)
|
||||
|
||||
// If none, create one based on the MD5 of absolute project path
|
||||
if(uuid.isNull() || !filename.isEmpty()) {
|
||||
QString abspath = Option::fixPathToLocalOS(filename.isEmpty()?project->first("QMAKE_MAKEFILE").toQString():filename);
|
||||
QString abspath = Option::fixPathToTargetOS(
|
||||
filename.isEmpty() ? project->first("QMAKE_MAKEFILE").toQString() : filename);
|
||||
QByteArray digest = QCryptographicHash::hash(abspath.toUtf8(), QCryptographicHash::Sha1);
|
||||
memcpy((unsigned char*)(&uuid), digest.constData(), sizeof(QUuid));
|
||||
validUUID = !uuid.isNull();
|
||||
@ -457,14 +458,14 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
while (collectedIt.hasNext()) {
|
||||
QPair<QString, ProStringList> subdir = collectedIt.next();
|
||||
QString profile = subdir.first;
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(profile, true)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(profile)));
|
||||
if (fi.exists()) {
|
||||
if (fi.isDir()) {
|
||||
if (!profile.endsWith(Option::dir_sep))
|
||||
profile += Option::dir_sep;
|
||||
profile += fi.baseName() + Option::pro_ext;
|
||||
QString profileKey = fi.absoluteFilePath();
|
||||
fi = QFileInfo(fileInfo(Option::fixPathToLocalOS(profile, true)));
|
||||
fi = QFileInfo(fileInfo(Option::normalizePath(profile)));
|
||||
if (!fi.exists())
|
||||
continue;
|
||||
projLookup.insert(profileKey, fi.absoluteFilePath());
|
||||
@ -505,7 +506,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
Option::qmake_mode = old_mode;
|
||||
|
||||
// We assume project filename is [QMAKE_PROJECT_NAME].vcproj
|
||||
QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION"));
|
||||
QString vcproj = tmp_vcproj.project->first("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION");
|
||||
QString vcprojDir = qmake_getpwd();
|
||||
|
||||
// If file doesn't exsist, then maybe the users configuration
|
||||
@ -535,7 +536,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
|
||||
VcsolutionDepend *newDep = new VcsolutionDepend;
|
||||
newDep->vcprojFile = vcprojDir + Option::dir_sep + vcproj;
|
||||
newDep->orig_target = unescapeFilePath(tmp_proj.first("QMAKE_ORIG_TARGET")).toQString();
|
||||
newDep->orig_target = tmp_proj.first("QMAKE_ORIG_TARGET").toQString();
|
||||
newDep->target = tmp_proj.first("MSVCPROJ_TARGET").toQString().section(Option::dir_sep, -1);
|
||||
newDep->targetType = tmp_vcproj.projectTarget;
|
||||
newDep->uuid = tmp_proj.isEmpty("QMAKE_UUID") ? getProjectUUID(Option::fixPathToLocalOS(vcprojDir + QDir::separator() + vcproj)).toString().toUpper(): tmp_proj.first("QMAKE_UUID").toQString();
|
||||
@ -671,6 +672,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
||||
|
||||
// write out projects
|
||||
for (QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) {
|
||||
// ### quoting rules?
|
||||
t << _slnProjectBeg << _slnMSVCvcprojGUID << _slnProjectMid
|
||||
<< "\"" << (*it)->orig_target << "\", \"" << (*it)->vcprojFile
|
||||
<< "\", \"" << (*it)->uuid << "\"";
|
||||
@ -799,9 +801,7 @@ void VcprojGenerator::init()
|
||||
const ProStringList &incs = project->values("INCLUDEPATH");
|
||||
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
QString inc = (*incit).toQString();
|
||||
if (!inc.startsWith('"') && !inc.endsWith('"'))
|
||||
inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already
|
||||
project->values("MSVCPROJ_INCPATH").append("-I" + inc);
|
||||
project->values("MSVCPROJ_INCPATH").append("-I" + escapeFilePath(inc));
|
||||
}
|
||||
|
||||
QString dest = Option::fixPathToTargetOS(project->first("TARGET").toQString()) + project->first("TARGET_EXT");
|
||||
@ -815,7 +815,7 @@ void VcprojGenerator::init()
|
||||
for (dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
|
||||
if (!copydll.isEmpty())
|
||||
copydll += " && ";
|
||||
copydll += "copy \"$(TargetPath)\" \"" + *dlldir + "\"";
|
||||
copydll += "copy \"$(TargetPath)\" " + escapeFilePath(*dlldir);
|
||||
}
|
||||
|
||||
QString deststr("Copy " + dest + " to ");
|
||||
@ -842,8 +842,7 @@ void VcprojGenerator::init()
|
||||
projectTarget = Application;
|
||||
} else if(project->first("TEMPLATE") == "vclib") {
|
||||
if(project->isActiveConfig("staticlib")) {
|
||||
if (!project->values("RES_FILE").isEmpty())
|
||||
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE"));
|
||||
project->values("QMAKE_LIBS") += project->values("RES_FILE");
|
||||
projectTarget = StaticLib;
|
||||
} else
|
||||
projectTarget = SharedLib;
|
||||
@ -856,7 +855,7 @@ void VcprojGenerator::init()
|
||||
if (usePCH) {
|
||||
precompHFilename = fileInfo(precompH).fileName();
|
||||
// Created files
|
||||
QString origTarget = unescapeFilePath(project->first("QMAKE_ORIG_TARGET").toQString());
|
||||
QString origTarget = project->first("QMAKE_ORIG_TARGET").toQString();
|
||||
precompObj = origTarget + Option::obj_ext;
|
||||
precompPch = origTarget + ".pch";
|
||||
// Add PRECOMPILED_HEADER to HEADERS
|
||||
@ -893,7 +892,7 @@ void VcprojGenerator::init()
|
||||
extraCompilerSources[file] += quc.toQString();
|
||||
} else {
|
||||
QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables(
|
||||
compiler_out, file, QString()), false);
|
||||
compiler_out, file, QString(), NoShell), false);
|
||||
extraCompilerSources[out] += quc.toQString();
|
||||
extraCompilerOutputs[out] = QStringList(file); // Can only have one
|
||||
}
|
||||
@ -947,7 +946,7 @@ void VcprojGenerator::initProject()
|
||||
initExtraCompilerOutputs();
|
||||
|
||||
// Own elements -----------------------------
|
||||
vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET").toQString());
|
||||
vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString();
|
||||
switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
|
||||
case NET2013:
|
||||
vcProject.Version = "12.00";
|
||||
@ -1179,7 +1178,7 @@ void VcprojGenerator::initLinkerTool()
|
||||
ProStringList l = ProStringList(libs);
|
||||
conf.linker.parseOptions(l);
|
||||
} else {
|
||||
conf.linker.AdditionalDependencies += libs.toQString();
|
||||
conf.linker.AdditionalDependencies << escapeFilePath(libs.toQString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1239,7 +1238,7 @@ void VcprojGenerator::initPostBuildEventTools()
|
||||
!project->isHostBuild() && !project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH");
|
||||
if (useSignature) {
|
||||
conf.postBuild.CommandLine.prepend(
|
||||
QLatin1String("signtool sign /F ") + signature + QLatin1String(" \"$(TargetPath)\""));
|
||||
QLatin1String("signtool sign /F ") + escapeFilePath(signature) + QLatin1String(" \"$(TargetPath)\""));
|
||||
conf.postBuild.ExcludedFromBuild = _False;
|
||||
}
|
||||
|
||||
@ -1346,13 +1345,13 @@ void VcprojGenerator::initDeploymentTool()
|
||||
|| devicePath.at(0) == QLatin1Char('\\')
|
||||
|| devicePath.at(0) == QLatin1Char('%'))) {
|
||||
// create output path
|
||||
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
|
||||
devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
|
||||
}
|
||||
}
|
||||
// foreach d in item.files
|
||||
foreach (const ProString &src, project->values(ProKey(item + ".files"))) {
|
||||
QString itemDevicePath = devicePath;
|
||||
QString source = Option::fixPathToLocalOS(src.toQString());
|
||||
QString source = Option::normalizePath(src.toQString());
|
||||
QString nameFilter;
|
||||
QFileInfo info(source);
|
||||
QString searchPath;
|
||||
@ -1361,7 +1360,7 @@ void VcprojGenerator::initDeploymentTool()
|
||||
itemDevicePath += "\\" + info.fileName();
|
||||
searchPath = info.absoluteFilePath();
|
||||
} else {
|
||||
nameFilter = source.split('\\').last();
|
||||
nameFilter = info.fileName();
|
||||
searchPath = info.absolutePath();
|
||||
}
|
||||
|
||||
@ -1373,10 +1372,10 @@ void VcprojGenerator::initDeploymentTool()
|
||||
while(iterator.hasNext()) {
|
||||
iterator.next();
|
||||
if (conf.WinRT) {
|
||||
QString absoluteItemFilePath = Option::fixPathToLocalOS(QFileInfo(iterator.filePath()).absoluteFilePath());
|
||||
QString absoluteItemFilePath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absoluteFilePath());
|
||||
vcProject.DeploymentFiles.addFile(absoluteItemFilePath);
|
||||
} else {
|
||||
QString absoluteItemPath = Option::fixPathToLocalOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
// Identify if it is just another subdir
|
||||
int diffSize = absoluteItemPath.size() - pathSize;
|
||||
// write out rules
|
||||
@ -1532,7 +1531,8 @@ void VcprojGenerator::initResourceFiles()
|
||||
if(!qrc_files.isEmpty()) {
|
||||
for (int i = 0; i < qrc_files.count(); ++i) {
|
||||
char buff[256];
|
||||
QString dep_cmd = replaceExtraCompilerVariables(rcc_dep_cmd, qrc_files.at(i).toQString(), "");
|
||||
QString dep_cmd = replaceExtraCompilerVariables(
|
||||
rcc_dep_cmd, qrc_files.at(i).toQString(), QString(), LocalShell);
|
||||
|
||||
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
|
||||
if(canExecute(dep_cmd)) {
|
||||
@ -1605,16 +1605,16 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
||||
QString tmp_out = project->first(ProKey(*it + ".output")).toQString();
|
||||
if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) {
|
||||
// Combined output, only one file result
|
||||
extraCompile.addFile(
|
||||
Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, QString(), QString()), false));
|
||||
extraCompile.addFile(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell), false));
|
||||
} else {
|
||||
// One output file per input
|
||||
const ProStringList &tmp_in = project->values(project->first(ProKey(*it + ".input")).toKey());
|
||||
for (int i = 0; i < tmp_in.count(); ++i) {
|
||||
const QString &filename = tmp_in.at(i).toQString();
|
||||
if (extraCompilerSources.contains(filename))
|
||||
extraCompile.addFile(
|
||||
Option::fixPathToTargetOS(replaceExtraCompilerVariables(filename, tmp_out, QString()), false));
|
||||
extraCompile.addFile(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(filename, tmp_out, QString(), NoShell), false));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -1629,8 +1629,8 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
||||
for (int i = 0; i < tmp_in.count(); ++i) {
|
||||
const QString &filename = tmp_in.at(i).toQString();
|
||||
if (extraCompilerSources.contains(filename))
|
||||
extraCompile.addFile(
|
||||
Option::fixPathToTargetOS(replaceExtraCompilerVariables(filename, QString(), QString()), false));
|
||||
extraCompile.addFile(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(filename, QString(), QString(), NoShell), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1650,9 +1650,10 @@ VCProjectWriter *VcprojGenerator::createProjectWriter()
|
||||
return new VCProjectWriter;
|
||||
}
|
||||
|
||||
QString VcprojGenerator::replaceExtraCompilerVariables(const QString &var, const QStringList &in, const QStringList &out)
|
||||
QString VcprojGenerator::replaceExtraCompilerVariables(
|
||||
const QString &var, const QStringList &in, const QStringList &out, ReplaceFor forShell)
|
||||
{
|
||||
QString ret = MakefileGenerator::replaceExtraCompilerVariables(var, in, out);
|
||||
QString ret = MakefileGenerator::replaceExtraCompilerVariables(var, in, out, forShell);
|
||||
|
||||
ProStringList &defines = project->values("VCPROJ_MAKEFILE_DEFINES");
|
||||
if(defines.isEmpty())
|
||||
@ -1680,7 +1681,7 @@ bool VcprojGenerator::openOutput(QFile &file, const QString &/*build*/) const
|
||||
ProString ext = project->first("VCPROJ_EXTENSION");
|
||||
if(project->first("TEMPLATE") == "vcsubdirs")
|
||||
ext = project->first("VCSOLUTION_EXTENSION");
|
||||
ProString outputName = unescapeFilePath(project->first("TARGET"));
|
||||
ProString outputName = project->first("TARGET");
|
||||
if (!project->first("MAKEFILE").isEmpty())
|
||||
outputName = project->first("MAKEFILE");
|
||||
file.setFileName(outdir + outputName + ext);
|
||||
|
@ -76,9 +76,10 @@ protected:
|
||||
virtual VCProjectWriter *createProjectWriter();
|
||||
virtual bool doDepends() const { return false; } //never necesary
|
||||
virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
|
||||
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
|
||||
inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
|
||||
{ return MakefileGenerator::replaceExtraCompilerVariables(val, in, out); }
|
||||
using MakefileGenerator::ReplaceFor;
|
||||
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor);
|
||||
inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out, ReplaceFor forShell)
|
||||
{ return MakefileGenerator::replaceExtraCompilerVariables(val, in, out, forShell); }
|
||||
virtual bool supportsMetaBuild() { return true; }
|
||||
virtual bool supportsMergedBuilds() { return true; }
|
||||
virtual bool mergeBuildProject(MakefileGenerator *other);
|
||||
|
@ -52,12 +52,12 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
|
||||
int
|
||||
Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext)
|
||||
{
|
||||
QString bd = Option::fixPathToLocalOS(d, true);
|
||||
QString bd = Option::normalizePath(d);
|
||||
if(!exists(bd))
|
||||
return -1;
|
||||
|
||||
QMakeMetaInfo libinfo(project);
|
||||
bool libInfoRead = libinfo.readLib(bd + Option::dir_sep + stem);
|
||||
bool libInfoRead = libinfo.readLib(bd + '/' + stem);
|
||||
|
||||
// If the library, for which we're trying to find the highest version
|
||||
// number, is a static library
|
||||
@ -96,6 +96,16 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem
|
||||
return biggest;
|
||||
}
|
||||
|
||||
ProString Win32MakefileGenerator::fixLibFlag(const ProString &lib)
|
||||
{
|
||||
if (lib.startsWith('/')) {
|
||||
if (lib.startsWith("/LIBPATH:"))
|
||||
return QStringLiteral("/LIBPATH:") + escapeFilePath(lib.mid(9));
|
||||
return lib;
|
||||
}
|
||||
return escapeFilePath(lib);
|
||||
}
|
||||
|
||||
bool
|
||||
Win32MakefileGenerator::findLibraries()
|
||||
{
|
||||
@ -104,26 +114,23 @@ Win32MakefileGenerator::findLibraries()
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for (ProStringList::Iterator it = l.begin(); it != l.end();) {
|
||||
QChar quote;
|
||||
bool modified_opt = false, remove = false;
|
||||
bool remove = false;
|
||||
QString opt = (*it).trimmed().toQString();
|
||||
if((opt[0] == '\'' || opt[0] == '"') && opt[(int)opt.length()-1] == opt[0]) {
|
||||
quote = opt[0];
|
||||
opt = opt.mid(1, opt.length()-2);
|
||||
}
|
||||
if(opt.startsWith("/LIBPATH:")) {
|
||||
dirs.append(QMakeLocalFileName(opt.mid(9)));
|
||||
QString libpath = opt.mid(9);
|
||||
QMakeLocalFileName l(libpath);
|
||||
if (!dirs.contains(l)) {
|
||||
dirs.append(l);
|
||||
(*it) = "/LIBPATH:" + l.real();
|
||||
} else {
|
||||
remove = true;
|
||||
}
|
||||
} else if(opt.startsWith("-L") || opt.startsWith("/L")) {
|
||||
QString libpath = Option::fixPathToTargetOS(opt.mid(2), false, false);
|
||||
QMakeLocalFileName l(libpath);
|
||||
if(!dirs.contains(l)) {
|
||||
dirs.append(l);
|
||||
modified_opt = true;
|
||||
if (!quote.isNull()) {
|
||||
libpath = quote + libpath + quote;
|
||||
quote = QChar();
|
||||
}
|
||||
(*it) = "/LIBPATH:" + libpath;
|
||||
(*it) = "/LIBPATH:" + l.real();
|
||||
} else {
|
||||
remove = true;
|
||||
}
|
||||
@ -139,22 +146,17 @@ Win32MakefileGenerator::findLibraries()
|
||||
extension += QString::number(ver);
|
||||
extension += suffix;
|
||||
extension += ".lib";
|
||||
if(QMakeMetaInfo::libExists((*it).local() + Option::dir_sep + lib) ||
|
||||
exists((*it).local() + Option::dir_sep + lib + extension)) {
|
||||
if (QMakeMetaInfo::libExists((*it).local() + '/' + lib)
|
||||
|| exists((*it).local() + '/' + lib + extension)) {
|
||||
out = (*it).real() + Option::dir_sep + lib + extension;
|
||||
if (out.contains(QLatin1Char(' '))) {
|
||||
out.prepend(QLatin1Char('\"'));
|
||||
out.append(QLatin1Char('\"'));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(out.isEmpty())
|
||||
out = lib + ".lib";
|
||||
modified_opt = true;
|
||||
(*it) = out;
|
||||
} else if(!exists(Option::fixPathToLocalOS(opt))) {
|
||||
} else if (!exists(Option::normalizePath(opt))) {
|
||||
QList<QMakeLocalFileName> lib_dirs;
|
||||
QString file = Option::fixPathToTargetOS(opt);
|
||||
int slsh = file.lastIndexOf(Option::dir_sep);
|
||||
@ -167,7 +169,7 @@ Win32MakefileGenerator::findLibraries()
|
||||
if(file.endsWith(".lib")) {
|
||||
file = file.left(file.length() - 4);
|
||||
if(!file.at(file.length()-1).isNumber()) {
|
||||
ProString suffix = project->first(ProKey("QMAKE_" + file.section(Option::dir_sep, -1).toUpper() + "_SUFFIX"));
|
||||
ProString suffix = project->first(ProKey("QMAKE_" + file.toUpper() + "_SUFFIX"));
|
||||
for(QList<QMakeLocalFileName>::Iterator dep_it = lib_dirs.begin(); dep_it != lib_dirs.end(); ++dep_it) {
|
||||
QString lib_tmpl(file + "%1" + suffix + ".lib");
|
||||
int ver = findHighestVersion((*dep_it).local(), file);
|
||||
@ -182,7 +184,6 @@ Win32MakefileGenerator::findLibraries()
|
||||
dir += Option::dir_sep;
|
||||
lib_tmpl.prepend(dir);
|
||||
}
|
||||
modified_opt = true;
|
||||
(*it) = lib_tmpl;
|
||||
break;
|
||||
}
|
||||
@ -193,8 +194,6 @@ Win32MakefileGenerator::findLibraries()
|
||||
if(remove) {
|
||||
it = l.erase(it);
|
||||
} else {
|
||||
if(!quote.isNull() && modified_opt)
|
||||
(*it) = quote + (*it) + quote;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@ -212,8 +211,6 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for (int lit = 0; lit < l.size(); ++lit) {
|
||||
QString opt = l.at(lit).trimmed().toQString();
|
||||
if((opt[0] == '\'' || opt[0] == '"') && opt[(int)opt.length()-1] == opt[0])
|
||||
opt = opt.mid(1, opt.length()-2);
|
||||
if (opt.startsWith(libArg)) {
|
||||
QMakeLocalFileName l(opt.mid(libArg.length()));
|
||||
if (!libdirs.contains(l))
|
||||
@ -226,21 +223,15 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
else
|
||||
tmp = opt;
|
||||
for(QList<QMakeLocalFileName>::Iterator it = libdirs.begin(); it != libdirs.end(); ++it) {
|
||||
QString prl = (*it).local() + Option::dir_sep + tmp;
|
||||
QString prl = (*it).local() + '/' + tmp;
|
||||
if (processPrlFile(prl))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
|
||||
for (int prl = 0; prl < prl_libs.size(); ++prl) {
|
||||
ProString arg = prl_libs.at(prl);
|
||||
if (arg.startsWith(libArg))
|
||||
arg = arg.left(libArg.length()) + escapeFilePath(arg.mid(libArg.length()).toQString());
|
||||
else if (!arg.startsWith('/'))
|
||||
arg = escapeFilePath(arg.toQString());
|
||||
l.insert(lit + prl + 1, arg);
|
||||
}
|
||||
for (int prl = 0; prl < prl_libs.size(); ++prl)
|
||||
l.insert(lit + prl + 1, prl_libs.at(prl));
|
||||
prl_libs.clear();
|
||||
}
|
||||
|
||||
@ -311,14 +302,13 @@ void Win32MakefileGenerator::processVars()
|
||||
for (ProStringList::Iterator libDir_it = libDir.begin(); libDir_it != libDir.end(); ++libDir_it) {
|
||||
QString lib = (*libDir_it).toQString();
|
||||
if (!lib.isEmpty()) {
|
||||
lib.remove('"');
|
||||
if (lib.endsWith('\\'))
|
||||
lib.chop(1);
|
||||
libs << libArg + escapeFilePath(Option::fixPathToTargetOS(lib, false, false));
|
||||
libs << libArg + Option::fixPathToTargetOS(lib, false, false);
|
||||
}
|
||||
}
|
||||
project->values("QMAKE_LIBS") += libs + escapeFilePaths(project->values("LIBS"));
|
||||
project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
|
||||
project->values("QMAKE_LIBS") += libs + project->values("LIBS");
|
||||
project->values("QMAKE_LIBS_PRIVATE") += project->values("LIBS_PRIVATE");
|
||||
|
||||
if (project->values("TEMPLATE").contains("app")) {
|
||||
project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
|
||||
@ -533,7 +523,7 @@ void Win32MakefileGenerator::processRcFileVar()
|
||||
|
||||
void Win32MakefileGenerator::writeCleanParts(QTextStream &t)
|
||||
{
|
||||
t << "clean: compiler_clean " << var("CLEAN_DEPS");
|
||||
t << "clean: compiler_clean " << depVar("CLEAN_DEPS");
|
||||
{
|
||||
const char *clean_targets[] = { "OBJECTS", "QMAKE_CLEAN", "CLEAN_FILES", 0 };
|
||||
for(int i = 0; clean_targets[i]; ++i) {
|
||||
@ -562,7 +552,7 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t)
|
||||
}
|
||||
t << endl << endl;
|
||||
|
||||
t << "distclean: clean " << var("DISTCLEAN_DEPS");
|
||||
t << "distclean: clean " << depVar("DISTCLEAN_DEPS");
|
||||
{
|
||||
const char *clean_targets[] = { "QMAKE_DISTCLEAN", 0 };
|
||||
for(int i = 0; clean_targets[i]; ++i) {
|
||||
@ -591,9 +581,9 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t)
|
||||
}
|
||||
t << "\n\t-$(DEL_FILE) $(DESTDIR_TARGET)\n";
|
||||
{
|
||||
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << ofile << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
}
|
||||
t << endl;
|
||||
}
|
||||
@ -606,9 +596,8 @@ void Win32MakefileGenerator::writeIncPart(QTextStream &t)
|
||||
for(int i = 0; i < incs.size(); ++i) {
|
||||
QString inc = incs.at(i).toQString();
|
||||
inc.replace(QRegExp("\\\\$"), "");
|
||||
inc.replace(QRegExp("\""), "");
|
||||
if(!inc.isEmpty())
|
||||
t << "-I\"" << inc << "\" ";
|
||||
t << "-I" << escapeFilePath(inc) << ' ';
|
||||
}
|
||||
t << endl;
|
||||
}
|
||||
@ -633,8 +622,8 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") : var("QMAKE_IDL"))
|
||||
<< endl;
|
||||
t << "ZIP = " << var("QMAKE_ZIP") << endl;
|
||||
t << "DEF_FILE = " << varList("DEF_FILE") << endl;
|
||||
t << "RES_FILE = " << varList("RES_FILE") << endl; // Not on mingw, can't see why not though...
|
||||
t << "DEF_FILE = " << fileVar("DEF_FILE") << endl;
|
||||
t << "RES_FILE = " << fileVar("RES_FILE") << endl; // Not on mingw, can't see why not though...
|
||||
t << "COPY = " << var("QMAKE_COPY") << endl;
|
||||
t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl;
|
||||
t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl;
|
||||
@ -651,7 +640,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
|
||||
t << "####### Output directory\n\n";
|
||||
if(!project->values("OBJECTS_DIR").isEmpty())
|
||||
t << "OBJECTS_DIR = " << var("OBJECTS_DIR").replace(QRegExp("\\\\$"),"") << endl;
|
||||
t << "OBJECTS_DIR = " << escapeFilePath(var("OBJECTS_DIR").remove(QRegExp("\\\\$"))) << endl;
|
||||
else
|
||||
t << "OBJECTS_DIR = . \n";
|
||||
t << endl;
|
||||
@ -666,7 +655,6 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
if (!destDir.isEmpty() && (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep)))
|
||||
destDir += Option::dir_sep;
|
||||
QString target = QString(project->first("TARGET")+project->first("TARGET_EXT"));
|
||||
target.remove("\"");
|
||||
project->values("DEST_TARGET").prepend(destDir + target);
|
||||
|
||||
writeObjectsPart(t);
|
||||
@ -674,15 +662,14 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
writeExtraCompilerVariables(t);
|
||||
writeExtraVariables(t);
|
||||
|
||||
t << "DIST = " << varList("DISTFILES") << " "
|
||||
<< varList("HEADERS") << " "
|
||||
<< varList("SOURCES") << endl;
|
||||
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
|
||||
t << "DIST = " << fileVarList("DISTFILES") << ' '
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl;
|
||||
// The comment is important to maintain variable compatibility with Unix
|
||||
// Makefiles, while not interpreting a trailing-slash as a linebreak
|
||||
t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak\n";
|
||||
t << "TARGET = " << escapeFilePath(target) << endl;
|
||||
t << "DESTDIR_TARGET = " << escapeFilePath(var("DEST_TARGET")) << endl;
|
||||
t << "DESTDIR_TARGET = " << fileVar("DEST_TARGET") << endl;
|
||||
t << endl;
|
||||
|
||||
t << "####### Implicit rules\n\n";
|
||||
@ -694,8 +681,8 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
if(project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) {
|
||||
const ProStringList &dlldirs = project->values("DLLDESTDIR");
|
||||
for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
|
||||
t << "\t-$(COPY_FILE) \"$(DESTDIR_TARGET)\" "
|
||||
<< Option::fixPathToTargetOS((*dlldir).toQString(), false) << endl;
|
||||
t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) "
|
||||
<< escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl;
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
@ -719,13 +706,13 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
}
|
||||
t << "dist:\n\t"
|
||||
<< "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip $(SOURCES) $(DIST) "
|
||||
<< dist_files.join(' ') << " " << var("TRANSLATIONS") << " ";
|
||||
<< escapeFilePaths(dist_files).join(' ') << ' ' << fileVar("TRANSLATIONS") << ' ';
|
||||
if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
|
||||
const ProStringList &inputs = project->values(ProKey(*it + ".input"));
|
||||
for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input)
|
||||
t << (*input) << " ";
|
||||
t << escapeFilePath(*input) << ' ';
|
||||
}
|
||||
}
|
||||
t << endl << endl;
|
||||
@ -744,12 +731,14 @@ void Win32MakefileGenerator::writeLibsPart(QTextStream &t)
|
||||
} else {
|
||||
t << "LINKER = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LIBS = " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl;
|
||||
t << "LIBS = " << fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeObjectsPart(QTextStream &t)
|
||||
{
|
||||
// Used in both deps and commands.
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl;
|
||||
}
|
||||
|
||||
@ -791,9 +780,10 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t)
|
||||
incPathStr += escapeFilePath(path);
|
||||
}
|
||||
|
||||
t << res_file << ": " << rc_file << "\n\t"
|
||||
t << escapeDependencyPath(res_file) << ": " << escapeDependencyPath(rc_file) << "\n\t"
|
||||
<< var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "")
|
||||
<< " $(DEFINES)" << incPathStr << " -fo " << res_file << " " << rc_file;
|
||||
<< " $(DEFINES)" << incPathStr << " -fo " << escapeFilePath(res_file)
|
||||
<< ' ' << escapeFilePath(rc_file);
|
||||
t << endl << endl;
|
||||
}
|
||||
}
|
||||
@ -813,8 +803,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
|
||||
const QString root = "$(INSTALL_ROOT)";
|
||||
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));
|
||||
QString ret;
|
||||
QString targetdir = Option::fixPathToTargetOS(project->first(ProKey(t + ".path")).toQString(), false);
|
||||
targetdir = fileFixify(targetdir, FileFixifyAbsolute);
|
||||
QString targetdir = fileFixify(project->first(ProKey(t + ".path")).toQString(), FileFixifyAbsolute);
|
||||
if(targetdir.right(1) != Option::dir_sep)
|
||||
targetdir += Option::dir_sep;
|
||||
|
||||
@ -829,7 +818,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
|
||||
ret += installMetaFile(ProKey("QMAKE_PRL_INSTALL_REPLACE"), project->first("QMAKE_INTERNAL_PRL_FILE").toQString(), dst_prl);
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_prl));
|
||||
}
|
||||
if(project->isActiveConfig("create_pc")) {
|
||||
QString dst_pc = pkgConfigFileName(false);
|
||||
@ -846,32 +835,35 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
|
||||
ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true), dst_pc);
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_pc + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
|
||||
}
|
||||
}
|
||||
if(project->isActiveConfig("shared") && !project->isActiveConfig("plugin")) {
|
||||
QString lib_target = getLibTarget();
|
||||
lib_target.remove('"');
|
||||
QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + lib_target;
|
||||
QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + lib_target, FileFixifyAbsolute));
|
||||
QString src_targ = escapeFilePath(
|
||||
(project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR"))
|
||||
+ lib_target);
|
||||
QString dst_targ = escapeFilePath(
|
||||
filePrefixRoot(root, fileFixify(targetdir + lib_target, FileFixifyAbsolute)));
|
||||
if(!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\"";
|
||||
ret += QString("-$(INSTALL_FILE) ") + src_targ + ' ' + dst_targ;
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst_targ);
|
||||
}
|
||||
}
|
||||
|
||||
if (t == "dlltarget" || project->values(ProKey(t + ".CONFIG")).indexOf("no_dll") == -1) {
|
||||
QString src_targ = "$(DESTDIR_TARGET)";
|
||||
QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + "$(TARGET)", FileFixifyAbsolute));
|
||||
QString dst_targ = escapeFilePath(
|
||||
filePrefixRoot(root, fileFixify(targetdir + "$(TARGET)", FileFixifyAbsolute)));
|
||||
if(!ret.isEmpty())
|
||||
ret += "\n\t";
|
||||
ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\"";
|
||||
ret += QString("-$(INSTALL_FILE) ") + src_targ + ' ' + dst_targ;
|
||||
if(!uninst.isEmpty())
|
||||
uninst.append("\n\t");
|
||||
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
|
||||
uninst.append("-$(DEL_FILE) " + dst_targ);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -880,7 +872,6 @@ QString Win32MakefileGenerator::escapeFilePath(const QString &path) const
|
||||
{
|
||||
QString ret = path;
|
||||
if(!ret.isEmpty()) {
|
||||
ret = unescapeFilePath(ret);
|
||||
if (ret.contains(' ') || ret.contains('\t'))
|
||||
ret = "\"" + ret + "\"";
|
||||
debug_msg(2, "EscapeFilePath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
|
||||
|
@ -60,6 +60,8 @@ protected:
|
||||
int findHighestVersion(const QString &dir, const QString &stem, const QString &ext = QLatin1String("lib"));
|
||||
virtual bool findLibraries();
|
||||
|
||||
virtual ProString fixLibFlag(const ProString &lib);
|
||||
|
||||
virtual void processPrlFiles();
|
||||
void processVars();
|
||||
void fixTargetExt();
|
||||
|
@ -94,9 +94,6 @@ QMakeMetaInfo::clear()
|
||||
QString
|
||||
QMakeMetaInfo::findLib(QString lib)
|
||||
{
|
||||
if((lib[0] == '\'' || lib[0] == '"') &&
|
||||
lib[lib.length()-1] == lib[0])
|
||||
lib = lib.mid(1, lib.length()-2);
|
||||
lib = Option::normalizePath(lib);
|
||||
|
||||
QString ret;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Android port of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Android port of the Qt Toolkit.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Android port of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Android port of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Android port of the Qt Toolkit.
|
||||
|
@ -51,9 +51,9 @@ if (data.open(QFile::WriteOnly | QFile::Truncate)) {
|
||||
//! [1]
|
||||
QTextStream stream(stdin);
|
||||
QString line;
|
||||
do {
|
||||
line = stream.readLine();
|
||||
} while (!line.isNull());
|
||||
while (stream.readLine(&line)) {
|
||||
...
|
||||
}
|
||||
//! [1]
|
||||
|
||||
|
||||
|
@ -907,6 +907,11 @@
|
||||
# undef Q_COMPILER_UNICODE_STRINGS
|
||||
# undef Q_COMPILER_NOEXCEPT
|
||||
# endif
|
||||
# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CONSTEXPR)
|
||||
// The libcpp is missing constexpr keywords on important functions like std::numeric_limits<>::min()
|
||||
// Disable constexpr support on QNX even if the compiler supports it
|
||||
# undef Q_COMPILER_CONSTEXPR
|
||||
# endif
|
||||
# endif // Q_OS_QNX
|
||||
# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
|
||||
&& ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
|
||||
|
@ -2529,9 +2529,6 @@ QString QSysInfo::productType()
|
||||
#elif defined(Q_OS_DARWIN)
|
||||
return QStringLiteral("darwin");
|
||||
|
||||
#elif defined(Q_OS_HAIKU)
|
||||
return QStringLiteral("haiku");
|
||||
|
||||
#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
|
||||
QUnixOSVersion unixOsVersion;
|
||||
readEtcOsRelease(unixOsVersion);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -59,6 +59,7 @@
|
||||
# include <Path.h>
|
||||
# include <Volume.h>
|
||||
# include <VolumeRoster.h>
|
||||
# include <fs_info.h>
|
||||
# include <sys/statvfs.h>
|
||||
#else
|
||||
# include <sys/statvfs.h>
|
||||
@ -341,9 +342,18 @@ inline bool QStorageIterator::next()
|
||||
return false;
|
||||
|
||||
const BPath path(&directory);
|
||||
|
||||
fs_info fsInfo;
|
||||
memset(&fsInfo, 0, sizeof(fsInfo));
|
||||
|
||||
if (fs_stat_dev(volume.Device(), &fsInfo) != 0)
|
||||
return false;
|
||||
|
||||
m_rootPath = path.Path();
|
||||
m_fileSystemType = QByteArray(); // no public API to access it
|
||||
m_device = QByteArray::number(static_cast<qint32>(volume.Device()));
|
||||
m_fileSystemType = QByteArray(fsInfo.fsh_name);
|
||||
|
||||
const QByteArray deviceName(fsInfo.device_name);
|
||||
m_device = (deviceName.isEmpty() ? QByteArray::number(qint32(volume.Device())) : deviceName);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -444,6 +454,19 @@ static inline QString retrieveLabel(const QByteArray &device)
|
||||
if (fileInfo.isSymLink() && fileInfo.symLinkTarget().toLocal8Bit() == device)
|
||||
return fileInfo.fileName();
|
||||
}
|
||||
#elif defined Q_OS_HAIKU
|
||||
fs_info fsInfo;
|
||||
memset(&fsInfo, 0, sizeof(fsInfo));
|
||||
|
||||
int32 pos = 0;
|
||||
dev_t dev;
|
||||
while ((dev = next_dev(&pos)) >= 0) {
|
||||
if (fs_stat_dev(dev, &fsInfo) != 0)
|
||||
continue;
|
||||
|
||||
if (qstrcmp(fsInfo.device_name, device.constData()) == 0)
|
||||
return QString::fromLocal8Bit(fsInfo.volume_name);
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(device);
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -175,7 +175,7 @@ blackberry {
|
||||
kernel/qeventdispatcher_blackberry_p.h
|
||||
}
|
||||
|
||||
qqnx_pps:!blackberry-playbook {
|
||||
qqnx_pps {
|
||||
LIBS_PRIVATE += -lpps
|
||||
SOURCES += \
|
||||
kernel/qppsattribute.cpp \
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 Petroules Corporation.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -94,7 +94,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
|
||||
// endian
|
||||
if (data[5] == 0) {
|
||||
if (lib)
|
||||
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library).arg(QLatin1String("odd endianess"));
|
||||
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library).arg(QLatin1String("odd endianness"));
|
||||
return Corrupt;
|
||||
}
|
||||
m_endian = (data[5] == 1 ? ElfLittleEndian : ElfBigEndian);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Samuel Gaist <samuel.gaist@edeltech.ch>
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 by Southwest Research Institute (R)
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 by Southwest Research Institute (R)
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -117,7 +117,12 @@ static inline qint64 julianDayFromDate(int year, int month, int day)
|
||||
return day + floordiv(153 * m + 2, 5) + 365 * y + floordiv(y, 4) - floordiv(y, 100) + floordiv(y, 400) - 32045;
|
||||
}
|
||||
|
||||
static void getDateFromJulianDay(qint64 julianDay, int *yearp, int *monthp, int *dayp)
|
||||
struct ParsedDate
|
||||
{
|
||||
int year, month, day;
|
||||
};
|
||||
|
||||
static ParsedDate getDateFromJulianDay(qint64 julianDay)
|
||||
{
|
||||
/*
|
||||
* Math from The Calendar FAQ at http://www.tondering.dk/claus/cal/julperiod.php
|
||||
@ -140,12 +145,8 @@ static void getDateFromJulianDay(qint64 julianDay, int *yearp, int *monthp, int
|
||||
if (year <= 0)
|
||||
--year ;
|
||||
|
||||
if (yearp)
|
||||
*yearp = year;
|
||||
if (monthp)
|
||||
*monthp = month;
|
||||
if (dayp)
|
||||
*dayp = day;
|
||||
const ParsedDate result = { year, month, day };
|
||||
return result;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@ -186,82 +187,55 @@ static int fromShortMonthName(const QStringRef &monthName)
|
||||
#endif // QT_NO_TEXTDATE
|
||||
|
||||
#ifndef QT_NO_DATESTRING
|
||||
static void rfcDateImpl(const QString &s, QDate *dd = 0, QTime *dt = 0, int *utcOffset = 0)
|
||||
struct ParsedRfcDateTime {
|
||||
QDate date;
|
||||
QTime time;
|
||||
int utcOffset;
|
||||
};
|
||||
|
||||
static ParsedRfcDateTime rfcDateImpl(const QString &s)
|
||||
{
|
||||
int day = -1;
|
||||
int month = -1;
|
||||
int year = -1;
|
||||
int hour = -1;
|
||||
int min = -1;
|
||||
int sec = -1;
|
||||
int hourOffset = 0;
|
||||
int minOffset = 0;
|
||||
bool positiveOffset = false;
|
||||
ParsedRfcDateTime result;
|
||||
|
||||
// Matches "Wdy, DD Mon YYYY HH:mm:ss ±hhmm" (Wdy, being optional)
|
||||
QRegExp rex(QStringLiteral("^(?:[A-Z][a-z]+,)?[ \\t]*(\\d{1,2})[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d)(?::(\\d\\d))?)?[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?"));
|
||||
if (s.indexOf(rex) == 0) {
|
||||
if (dd) {
|
||||
day = rex.cap(1).toInt();
|
||||
month = qt_monthNumberFromShortName(rex.cap(2));
|
||||
year = rex.cap(3).toInt();
|
||||
}
|
||||
if (dt) {
|
||||
if (!rex.cap(4).isEmpty()) {
|
||||
hour = rex.cap(4).toInt();
|
||||
min = rex.cap(5).toInt();
|
||||
sec = rex.cap(6).toInt();
|
||||
}
|
||||
positiveOffset = (rex.cap(7) == QLatin1String("+"));
|
||||
hourOffset = rex.cap(8).toInt();
|
||||
minOffset = rex.cap(9).toInt();
|
||||
}
|
||||
if (utcOffset)
|
||||
*utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));
|
||||
const QStringList cap = rex.capturedTexts();
|
||||
result.date = QDate(cap[3].toInt(), qt_monthNumberFromShortName(cap[2]), cap[1].toInt());
|
||||
if (!cap[4].isEmpty())
|
||||
result.time = QTime(cap[4].toInt(), cap[5].toInt(), cap[6].toInt());
|
||||
const bool positiveOffset = (cap[7] == QLatin1String("+"));
|
||||
const int hourOffset = cap[8].toInt();
|
||||
const int minOffset = cap[9].toInt();
|
||||
result.utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));
|
||||
} else {
|
||||
// Matches "Wdy Mon DD HH:mm:ss YYYY"
|
||||
QRegExp rex(QStringLiteral("^[A-Z][a-z]+[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d):(\\d\\d))?[ \\t]+(\\d\\d\\d\\d)[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?"));
|
||||
if (s.indexOf(rex) == 0) {
|
||||
if (dd) {
|
||||
month = qt_monthNumberFromShortName(rex.cap(1));
|
||||
day = rex.cap(2).toInt();
|
||||
year = rex.cap(6).toInt();
|
||||
}
|
||||
if (dt) {
|
||||
if (!rex.cap(3).isEmpty()) {
|
||||
hour = rex.cap(3).toInt();
|
||||
min = rex.cap(4).toInt();
|
||||
sec = rex.cap(5).toInt();
|
||||
}
|
||||
positiveOffset = (rex.cap(7) == QLatin1String("+"));
|
||||
hourOffset = rex.cap(8).toInt();
|
||||
minOffset = rex.cap(9).toInt();
|
||||
}
|
||||
if (utcOffset)
|
||||
*utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));
|
||||
const QStringList cap = rex.capturedTexts();
|
||||
result.date = QDate(cap[6].toInt(), qt_monthNumberFromShortName(cap[1]), cap[2].toInt());
|
||||
if (!cap[3].isEmpty())
|
||||
result.time = QTime(cap[3].toInt(), cap[4].toInt(), cap[5].toInt());
|
||||
const bool positiveOffset = (cap[7] == QLatin1String("+"));
|
||||
const int hourOffset = cap[8].toInt();
|
||||
const int minOffset = cap[9].toInt();
|
||||
result.utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));
|
||||
}
|
||||
}
|
||||
|
||||
if (dd)
|
||||
*dd = QDate(year, month, day);
|
||||
if (dt)
|
||||
*dt = QTime(hour, min, sec);
|
||||
return result;
|
||||
}
|
||||
#endif // QT_NO_DATESTRING
|
||||
|
||||
// Return offset in [+-]HH:mm format
|
||||
// Qt::ISODate puts : between the hours and minutes, but Qt:TextDate does not
|
||||
static QString toOffsetString(Qt::DateFormat format, int offset)
|
||||
{
|
||||
QString result;
|
||||
if (format == Qt::TextDate)
|
||||
result = QStringLiteral("%1%2%3");
|
||||
else // Qt::ISODate
|
||||
result = QStringLiteral("%1%2:%3");
|
||||
|
||||
return result.arg(offset >= 0 ? QLatin1Char('+') : QLatin1Char('-'))
|
||||
.arg(qAbs(offset) / SECS_PER_HOUR, 2, 10, QLatin1Char('0'))
|
||||
.arg((qAbs(offset) / 60) % 60, 2, 10, QLatin1Char('0'));
|
||||
return QString::asprintf("%c%02d%s%02d",
|
||||
offset >= 0 ? '+' : '-',
|
||||
qAbs(offset) / SECS_PER_HOUR,
|
||||
// Qt::ISODate puts : between the hours and minutes, but Qt:TextDate does not:
|
||||
format == Qt::TextDate ? "" : ":",
|
||||
(qAbs(offset) / 60) % 60);
|
||||
}
|
||||
|
||||
// Parse offset in [+-]HH[[:]mm] format
|
||||
@ -449,9 +423,7 @@ int QDate::year() const
|
||||
if (isNull())
|
||||
return 0;
|
||||
|
||||
int y;
|
||||
getDateFromJulianDay(jd, &y, 0, 0);
|
||||
return y;
|
||||
return getDateFromJulianDay(jd).year;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -483,9 +455,7 @@ int QDate::month() const
|
||||
if (isNull())
|
||||
return 0;
|
||||
|
||||
int m;
|
||||
getDateFromJulianDay(jd, 0, &m, 0);
|
||||
return m;
|
||||
return getDateFromJulianDay(jd).month;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -501,9 +471,7 @@ int QDate::day() const
|
||||
if (isNull())
|
||||
return 0;
|
||||
|
||||
int d;
|
||||
getDateFromJulianDay(jd, 0, 0, &d);
|
||||
return d;
|
||||
return getDateFromJulianDay(jd).day;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -555,12 +523,11 @@ int QDate::daysInMonth() const
|
||||
if (isNull())
|
||||
return 0;
|
||||
|
||||
int y, m;
|
||||
getDateFromJulianDay(jd, &y, &m, 0);
|
||||
if (m == 2 && isLeapYear(y))
|
||||
const ParsedDate pd = getDateFromJulianDay(jd);
|
||||
if (pd.month == 2 && isLeapYear(pd.year))
|
||||
return 29;
|
||||
else
|
||||
return monthDays[m];
|
||||
return monthDays[pd.month];
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -576,9 +543,7 @@ int QDate::daysInYear() const
|
||||
if (isNull())
|
||||
return 0;
|
||||
|
||||
int y;
|
||||
getDateFromJulianDay(jd, &y, 0, 0);
|
||||
return isLeapYear(y) ? 366 : 365;
|
||||
return isLeapYear(getDateFromJulianDay(jd).year) ? 366 : 365;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -895,7 +860,7 @@ QString QDate::toString(Qt::DateFormat format) const
|
||||
if (!isValid())
|
||||
return QString();
|
||||
|
||||
int y, m, d;
|
||||
ParsedDate pd;
|
||||
|
||||
switch (format) {
|
||||
case Qt::SystemLocaleDate:
|
||||
@ -913,19 +878,17 @@ QString QDate::toString(Qt::DateFormat format) const
|
||||
default:
|
||||
#ifndef QT_NO_TEXTDATE
|
||||
case Qt::TextDate:
|
||||
getDateFromJulianDay(jd, &y, &m, &d);
|
||||
pd = getDateFromJulianDay(jd);
|
||||
return QString::fromLatin1("%1 %2 %3 %4").arg(shortDayName(dayOfWeek()))
|
||||
.arg(shortMonthName(m))
|
||||
.arg(d)
|
||||
.arg(y);
|
||||
.arg(shortMonthName(pd.month))
|
||||
.arg(pd.day)
|
||||
.arg(pd.year);
|
||||
#endif
|
||||
case Qt::ISODate:
|
||||
getDateFromJulianDay(jd, &y, &m, &d);
|
||||
if (y < 0 || y > 9999)
|
||||
pd = getDateFromJulianDay(jd);
|
||||
if (pd.year < 0 || pd.year > 9999)
|
||||
return QString();
|
||||
return QString::fromLatin1("%1-%2-%3").arg(y, 4, 10, QLatin1Char('0'))
|
||||
.arg(m, 2, 10, QLatin1Char('0'))
|
||||
.arg(d, 2, 10, QLatin1Char('0'));
|
||||
return QString::asprintf("%04d-%02d-%02d", pd.year, pd.month, pd.day);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1031,16 +994,16 @@ bool QDate::setDate(int year, int month, int day)
|
||||
*/
|
||||
void QDate::getDate(int *year, int *month, int *day)
|
||||
{
|
||||
if (isValid()) {
|
||||
getDateFromJulianDay(jd, year, month, day);
|
||||
} else {
|
||||
if (year)
|
||||
*year = 0;
|
||||
if (month)
|
||||
*month = 0;
|
||||
if (day)
|
||||
*day = 0;
|
||||
}
|
||||
ParsedDate pd = { 0, 0, 0 };
|
||||
if (isValid())
|
||||
pd = getDateFromJulianDay(jd);
|
||||
|
||||
if (year)
|
||||
*year = pd.year;
|
||||
if (month)
|
||||
*month = pd.month;
|
||||
if (day)
|
||||
*day = pd.day;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -1082,7 +1045,12 @@ QDate QDate::addMonths(int nmonths) const
|
||||
return *this;
|
||||
|
||||
int old_y, y, m, d;
|
||||
getDateFromJulianDay(jd, &y, &m, &d);
|
||||
{
|
||||
const ParsedDate pd = getDateFromJulianDay(jd);
|
||||
y = pd.year;
|
||||
m = pd.month;
|
||||
d = pd.day;
|
||||
}
|
||||
old_y = y;
|
||||
|
||||
bool increasing = nmonths > 0;
|
||||
@ -1140,19 +1108,18 @@ QDate QDate::addYears(int nyears) const
|
||||
if (!isValid())
|
||||
return QDate();
|
||||
|
||||
int y, m, d;
|
||||
getDateFromJulianDay(jd, &y, &m, &d);
|
||||
ParsedDate pd = getDateFromJulianDay(jd);
|
||||
|
||||
int old_y = y;
|
||||
y += nyears;
|
||||
int old_y = pd.year;
|
||||
pd.year += nyears;
|
||||
|
||||
// was there a sign change?
|
||||
if ((old_y > 0 && y <= 0) ||
|
||||
(old_y < 0 && y >= 0))
|
||||
if ((old_y > 0 && pd.year <= 0) ||
|
||||
(old_y < 0 && pd.year >= 0))
|
||||
// yes, adjust the date by +1 or -1 years
|
||||
y += nyears > 0 ? +1 : -1;
|
||||
pd.year += nyears > 0 ? +1 : -1;
|
||||
|
||||
return fixedDate(y, m, d);
|
||||
return fixedDate(pd.year, pd.month, pd.day);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -1255,11 +1222,8 @@ QDate QDate::fromString(const QString& string, Qt::DateFormat format)
|
||||
return QLocale().toDate(string, QLocale::ShortFormat);
|
||||
case Qt::DefaultLocaleLongDate:
|
||||
return QLocale().toDate(string, QLocale::LongFormat);
|
||||
case Qt::RFC2822Date: {
|
||||
QDate date;
|
||||
rfcDateImpl(string, &date);
|
||||
return date;
|
||||
}
|
||||
case Qt::RFC2822Date:
|
||||
return rfcDateImpl(string).date;
|
||||
default:
|
||||
#ifndef QT_NO_TEXTDATE
|
||||
case Qt::TextDate: {
|
||||
@ -2003,11 +1967,8 @@ QTime QTime::fromString(const QString& string, Qt::DateFormat format)
|
||||
return QLocale().toTime(string, QLocale::ShortFormat);
|
||||
case Qt::DefaultLocaleLongDate:
|
||||
return QLocale().toTime(string, QLocale::LongFormat);
|
||||
case Qt::RFC2822Date: {
|
||||
QTime time;
|
||||
rfcDateImpl(string, 0, &time);
|
||||
return time;
|
||||
}
|
||||
case Qt::RFC2822Date:
|
||||
return rfcDateImpl(string).time;
|
||||
case Qt::ISODate:
|
||||
case Qt::TextDate:
|
||||
default:
|
||||
@ -4417,16 +4378,13 @@ QDateTime QDateTime::fromString(const QString& string, Qt::DateFormat format)
|
||||
case Qt::DefaultLocaleLongDate:
|
||||
return QLocale().toDateTime(string, QLocale::LongFormat);
|
||||
case Qt::RFC2822Date: {
|
||||
QDate date;
|
||||
QTime time;
|
||||
int utcOffset = 0;
|
||||
rfcDateImpl(string, &date, &time, &utcOffset);
|
||||
const ParsedRfcDateTime rfc = rfcDateImpl(string);
|
||||
|
||||
if (!date.isValid() || !time.isValid())
|
||||
if (!rfc.date.isValid() || !rfc.time.isValid())
|
||||
return QDateTime();
|
||||
|
||||
QDateTime dateTime(date, time, Qt::UTC);
|
||||
dateTime.setOffsetFromUtc(utcOffset);
|
||||
QDateTime dateTime(rfc.date, rfc.time, Qt::UTC);
|
||||
dateTime.setOffsetFromUtc(rfc.utcOffset);
|
||||
return dateTime;
|
||||
}
|
||||
case Qt::ISODate: {
|
||||
@ -5007,9 +4965,11 @@ QDebug operator<<(QDebug dbg, const QTime &time)
|
||||
QDebug operator<<(QDebug dbg, const QDateTime &date)
|
||||
{
|
||||
QDebugStateSaver saver(dbg);
|
||||
dbg.nospace() << "QDateTime(" << date.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"))
|
||||
<< ' ' << date.timeSpec();
|
||||
switch (date.d->m_spec) {
|
||||
const Qt::TimeSpec ts = date.timeSpec();
|
||||
dbg.nospace() << "QDateTime(";
|
||||
dbg.noquote() << date.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"))
|
||||
<< ' ' << ts;
|
||||
switch (ts) {
|
||||
case Qt::UTC:
|
||||
break;
|
||||
case Qt::OffsetFromUTC:
|
||||
|
@ -59,13 +59,13 @@ public:
|
||||
StandaloneFormat
|
||||
};
|
||||
private:
|
||||
QDate(qint64 julianDay) : jd(julianDay) {}
|
||||
Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
|
||||
public:
|
||||
QDate() { jd = nullJd(); }
|
||||
Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {}
|
||||
QDate(int y, int m, int d);
|
||||
|
||||
bool isNull() const { return !isValid(); }
|
||||
bool isValid() const { return jd >= minJd() && jd <= maxJd(); }
|
||||
Q_DECL_CONSTEXPR bool isNull() const { return !isValid(); }
|
||||
Q_DECL_CONSTEXPR bool isValid() const { return jd >= minJd() && jd <= maxJd(); }
|
||||
|
||||
int year() const;
|
||||
int month() const;
|
||||
@ -100,12 +100,12 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d)
|
||||
QDate addYears(int years) const Q_REQUIRED_RESULT;
|
||||
qint64 daysTo(const QDate &) const;
|
||||
|
||||
bool operator==(const QDate &other) const { return jd == other.jd; }
|
||||
bool operator!=(const QDate &other) const { return jd != other.jd; }
|
||||
bool operator<(const QDate &other) const { return jd < other.jd; }
|
||||
bool operator<=(const QDate &other) const { return jd <= other.jd; }
|
||||
bool operator>(const QDate &other) const { return jd > other.jd; }
|
||||
bool operator>=(const QDate &other) const { return jd >= other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator==(const QDate &other) const { return jd == other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator!=(const QDate &other) const { return jd != other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator< (const QDate &other) const { return jd < other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator<=(const QDate &other) const { return jd <= other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator> (const QDate &other) const { return jd > other.jd; }
|
||||
Q_DECL_CONSTEXPR bool operator>=(const QDate &other) const { return jd >= other.jd; }
|
||||
|
||||
static QDate currentDate();
|
||||
#ifndef QT_NO_DATESTRING
|
||||
@ -115,15 +115,15 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d)
|
||||
static bool isValid(int y, int m, int d);
|
||||
static bool isLeapYear(int year);
|
||||
|
||||
static inline QDate fromJulianDay(qint64 jd)
|
||||
static Q_DECL_CONSTEXPR inline QDate fromJulianDay(qint64 jd)
|
||||
{ return jd >= minJd() && jd <= maxJd() ? QDate(jd) : QDate() ; }
|
||||
inline qint64 toJulianDay() const { return jd; }
|
||||
Q_DECL_CONSTEXPR inline qint64 toJulianDay() const { return jd; }
|
||||
|
||||
private:
|
||||
// using extra parentheses around min to avoid expanding it if it is a macro
|
||||
static inline qint64 nullJd() { return (std::numeric_limits<qint64>::min)(); }
|
||||
static inline qint64 minJd() { return Q_INT64_C(-784350574879); }
|
||||
static inline qint64 maxJd() { return Q_INT64_C( 784354017364); }
|
||||
static Q_DECL_CONSTEXPR inline qint64 nullJd() { return (std::numeric_limits<qint64>::min)(); }
|
||||
static Q_DECL_CONSTEXPR inline qint64 minJd() { return Q_INT64_C(-784350574879); }
|
||||
static Q_DECL_CONSTEXPR inline qint64 maxJd() { return Q_INT64_C( 784354017364); }
|
||||
|
||||
qint64 jd;
|
||||
|
||||
@ -138,20 +138,20 @@ Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE);
|
||||
|
||||
class Q_CORE_EXPORT QTime
|
||||
{
|
||||
QTime(int ms) : mds(ms)
|
||||
Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
|
||||
#if defined(Q_OS_WINCE)
|
||||
, startTick(NullTime)
|
||||
#endif
|
||||
{}
|
||||
public:
|
||||
QTime(): mds(NullTime)
|
||||
Q_DECL_CONSTEXPR QTime(): mds(NullTime)
|
||||
#if defined(Q_OS_WINCE)
|
||||
, startTick(NullTime)
|
||||
#endif
|
||||
{}
|
||||
QTime(int h, int m, int s = 0, int ms = 0);
|
||||
|
||||
bool isNull() const { return mds == NullTime; }
|
||||
Q_DECL_CONSTEXPR bool isNull() const { return mds == NullTime; }
|
||||
bool isValid() const;
|
||||
|
||||
int hour() const;
|
||||
@ -169,15 +169,15 @@ public:
|
||||
QTime addMSecs(int ms) const Q_REQUIRED_RESULT;
|
||||
int msecsTo(const QTime &) const;
|
||||
|
||||
bool operator==(const QTime &other) const { return mds == other.mds; }
|
||||
bool operator!=(const QTime &other) const { return mds != other.mds; }
|
||||
bool operator<(const QTime &other) const { return mds < other.mds; }
|
||||
bool operator<=(const QTime &other) const { return mds <= other.mds; }
|
||||
bool operator>(const QTime &other) const { return mds > other.mds; }
|
||||
bool operator>=(const QTime &other) const { return mds >= other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator==(const QTime &other) const { return mds == other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator!=(const QTime &other) const { return mds != other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator< (const QTime &other) const { return mds < other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator<=(const QTime &other) const { return mds <= other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator> (const QTime &other) const { return mds > other.mds; }
|
||||
Q_DECL_CONSTEXPR bool operator>=(const QTime &other) const { return mds >= other.mds; }
|
||||
|
||||
static inline QTime fromMSecsSinceStartOfDay(int msecs) { return QTime(msecs); }
|
||||
inline int msecsSinceStartOfDay() const { return mds == NullTime ? 0 : mds; }
|
||||
static Q_DECL_CONSTEXPR inline QTime fromMSecsSinceStartOfDay(int msecs) { return QTime(msecs); }
|
||||
Q_DECL_CONSTEXPR inline int msecsSinceStartOfDay() const { return mds == NullTime ? 0 : mds; }
|
||||
|
||||
static QTime currentTime();
|
||||
#ifndef QT_NO_DATESTRING
|
||||
@ -191,7 +191,7 @@ public:
|
||||
int elapsed() const;
|
||||
private:
|
||||
enum TimeFlag { NullTime = -1 };
|
||||
inline int ds() const { return mds == -1 ? 0 : mds; }
|
||||
Q_DECL_CONSTEXPR inline int ds() const { return mds == -1 ? 0 : mds; }
|
||||
int mds;
|
||||
#if defined(Q_OS_WINCE)
|
||||
int startTick;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 Petroules Corporation.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -101,16 +101,6 @@ public:
|
||||
QDateTimePrivate(const QDate &toDate, const QTime &toTime, const QTimeZone & timeZone);
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
|
||||
QDateTimePrivate(const QDateTimePrivate &other) : QSharedData(other),
|
||||
m_msecs(other.m_msecs),
|
||||
m_spec(other.m_spec),
|
||||
m_offsetFromUtc(other.m_offsetFromUtc),
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
m_timeZone(other.m_timeZone),
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
m_status(other.m_status)
|
||||
{}
|
||||
|
||||
// ### XXX: when the tooling situation improves, look at fixing the padding.
|
||||
// 4 bytes padding
|
||||
|
||||
@ -136,17 +126,17 @@ public:
|
||||
void refreshDateTime();
|
||||
|
||||
// Get/set date and time status
|
||||
inline bool isNullDate() const { return (m_status & NullDate) == NullDate; }
|
||||
inline bool isNullTime() const { return (m_status & NullTime) == NullTime; }
|
||||
inline bool isValidDate() const { return (m_status & ValidDate) == ValidDate; }
|
||||
inline bool isValidTime() const { return (m_status & ValidTime) == ValidTime; }
|
||||
inline bool isValidDateTime() const { return (m_status & ValidDateTime) == ValidDateTime; }
|
||||
inline void setValidDateTime() { m_status = m_status | ValidDateTime; }
|
||||
inline void clearValidDateTime() { m_status = m_status & ~ValidDateTime; }
|
||||
inline bool isTimeZoneCached() const { return (m_status & TimeZoneCached) == TimeZoneCached; }
|
||||
inline void setTimeZoneCached() { m_status = m_status | TimeZoneCached; }
|
||||
inline void clearTimeZoneCached() { m_status = m_status & ~TimeZoneCached; }
|
||||
inline void clearSetToDaylightStatus() { m_status = m_status & ~SetToStandardTime & ~SetToDaylightTime; }
|
||||
inline bool isNullDate() const { return m_status & NullDate; }
|
||||
inline bool isNullTime() const { return m_status & NullTime; }
|
||||
inline bool isValidDate() const { return m_status & ValidDate; }
|
||||
inline bool isValidTime() const { return m_status & ValidTime; }
|
||||
inline bool isValidDateTime() const { return m_status & ValidDateTime; }
|
||||
inline void setValidDateTime() { m_status |= ValidDateTime; }
|
||||
inline void clearValidDateTime() { m_status &= ~ValidDateTime; }
|
||||
inline bool isTimeZoneCached() const { return m_status & TimeZoneCached; }
|
||||
inline void setTimeZoneCached() { m_status |= TimeZoneCached; }
|
||||
inline void clearTimeZoneCached() { m_status &= ~TimeZoneCached; }
|
||||
inline void clearSetToDaylightStatus() { m_status &= ~(SetToStandardTime | SetToDaylightTime); }
|
||||
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone,
|
||||
|
@ -66,6 +66,14 @@ template <typename T> struct QListSpecialMethods { };
|
||||
template <> struct QListSpecialMethods<QByteArray>;
|
||||
|
||||
struct Q_CORE_EXPORT QListData {
|
||||
// tags for tag-dispatching of QList implementations,
|
||||
// based on QList's three different memory layouts:
|
||||
struct NotArrayCompatibleLayout {};
|
||||
struct NotIndirectLayout {};
|
||||
struct ArrayCompatibleLayout : NotIndirectLayout {}; // data laid out like a C array
|
||||
struct InlineWithPaddingLayout : NotArrayCompatibleLayout, NotIndirectLayout {}; // data laid out like a C array with padding
|
||||
struct IndirectLayout : NotArrayCompatibleLayout {}; // data allocated on the heap
|
||||
|
||||
struct Data {
|
||||
QtPrivate::RefCount ref;
|
||||
int alloc, begin, end;
|
||||
@ -99,6 +107,17 @@ struct Q_CORE_EXPORT QListData {
|
||||
template <typename T>
|
||||
class QList : public QListSpecialMethods<T>
|
||||
{
|
||||
public:
|
||||
struct MemoryLayout
|
||||
: QtPrivate::if_<
|
||||
QTypeInfo<T>::isStatic || QTypeInfo<T>::isLarge,
|
||||
QListData::IndirectLayout,
|
||||
typename QtPrivate::if_<
|
||||
sizeof(T) == sizeof(void*),
|
||||
QListData::ArrayCompatibleLayout,
|
||||
QListData::InlineWithPaddingLayout
|
||||
>::type>::type {};
|
||||
private:
|
||||
struct Node { void *v;
|
||||
#if defined(Q_CC_BOR)
|
||||
Q_INLINE_TEMPLATE T &t();
|
||||
@ -358,6 +377,14 @@ private:
|
||||
{
|
||||
return (constBegin().i <= i.i) && (i.i <= constEnd().i);
|
||||
}
|
||||
|
||||
private:
|
||||
inline bool op_eq_impl(const QList &other, QListData::NotArrayCompatibleLayout) const;
|
||||
inline bool op_eq_impl(const QList &other, QListData::ArrayCompatibleLayout) const;
|
||||
inline bool contains_impl(const T &, QListData::NotArrayCompatibleLayout) const;
|
||||
inline bool contains_impl(const T &, QListData::ArrayCompatibleLayout) const;
|
||||
inline int count_impl(const T &, QListData::NotArrayCompatibleLayout) const;
|
||||
inline int count_impl(const T &, QListData::ArrayCompatibleLayout) const;
|
||||
};
|
||||
|
||||
#if defined(Q_CC_BOR)
|
||||
@ -771,6 +798,12 @@ Q_OUTOFLINE_TEMPLATE bool QList<T>::operator==(const QList<T> &l) const
|
||||
return true;
|
||||
if (p.size() != l.p.size())
|
||||
return false;
|
||||
return this->op_eq_impl(l, MemoryLayout());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool QList<T>::op_eq_impl(const QList &l, QListData::NotArrayCompatibleLayout) const
|
||||
{
|
||||
Node *i = reinterpret_cast<Node *>(p.begin());
|
||||
Node *e = reinterpret_cast<Node *>(p.end());
|
||||
Node *li = reinterpret_cast<Node *>(l.p.begin());
|
||||
@ -781,6 +814,15 @@ Q_OUTOFLINE_TEMPLATE bool QList<T>::operator==(const QList<T> &l) const
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool QList<T>::op_eq_impl(const QList &l, QListData::ArrayCompatibleLayout) const
|
||||
{
|
||||
const T *lb = reinterpret_cast<const T*>(l.p.begin());
|
||||
const T *b = reinterpret_cast<const T*>(p.begin());
|
||||
const T *e = reinterpret_cast<const T*>(p.end());
|
||||
return std::equal(b, e, lb);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_OUTOFLINE_TEMPLATE void QList<T>::dealloc(QListData::Data *data)
|
||||
{
|
||||
@ -921,6 +963,12 @@ Q_OUTOFLINE_TEMPLATE int QList<T>::lastIndexOf(const T &t, int from) const
|
||||
|
||||
template <typename T>
|
||||
Q_OUTOFLINE_TEMPLATE bool QList<T>::contains(const T &t) const
|
||||
{
|
||||
return contains_impl(t, MemoryLayout());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool QList<T>::contains_impl(const T &t, QListData::NotArrayCompatibleLayout) const
|
||||
{
|
||||
Node *e = reinterpret_cast<Node *>(p.end());
|
||||
Node *i = reinterpret_cast<Node *>(p.begin());
|
||||
@ -930,8 +978,22 @@ Q_OUTOFLINE_TEMPLATE bool QList<T>::contains(const T &t) const
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool QList<T>::contains_impl(const T &t, QListData::ArrayCompatibleLayout) const
|
||||
{
|
||||
const T *b = reinterpret_cast<const T*>(p.begin());
|
||||
const T *e = reinterpret_cast<const T*>(p.end());
|
||||
return std::find(b, e, t) != e;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_OUTOFLINE_TEMPLATE int QList<T>::count(const T &t) const
|
||||
{
|
||||
return this->count_impl(t, MemoryLayout());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline int QList<T>::count_impl(const T &t, QListData::NotArrayCompatibleLayout) const
|
||||
{
|
||||
int c = 0;
|
||||
Node *e = reinterpret_cast<Node *>(p.end());
|
||||
@ -942,6 +1004,14 @@ Q_OUTOFLINE_TEMPLATE int QList<T>::count(const T &t) const
|
||||
return c;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline int QList<T>::count_impl(const T &t, QListData::ArrayCompatibleLayout) const
|
||||
{
|
||||
return int(std::count(reinterpret_cast<const T*>(p.begin()),
|
||||
reinterpret_cast<const T*>(p.end()),
|
||||
t));
|
||||
}
|
||||
|
||||
Q_DECLARE_SEQUENTIAL_ITERATOR(List)
|
||||
Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(List)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -45,22 +45,31 @@ struct QPair
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
|
||||
Q_DECL_CONSTEXPR QPair() : first(), second() {}
|
||||
Q_DECL_CONSTEXPR QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {}
|
||||
Q_DECL_CONSTEXPR QPair()
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(T1()) && noexcept(T2()))
|
||||
: first(), second() {}
|
||||
Q_DECL_CONSTEXPR QPair(const T1 &t1, const T2 &t2)
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(T1(t1)) && noexcept(T2(t2)))
|
||||
: first(t1), second(t2) {}
|
||||
// compiler-generated copy/move ctor/assignment operators are fine!
|
||||
|
||||
template <typename TT1, typename TT2>
|
||||
Q_DECL_CONSTEXPR QPair(const QPair<TT1, TT2> &p) : first(p.first), second(p.second) {}
|
||||
Q_DECL_CONSTEXPR QPair(const QPair<TT1, TT2> &p)
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(T1(p.first)) && noexcept(T2(p.second)))
|
||||
: first(p.first), second(p.second) {}
|
||||
template <typename TT1, typename TT2>
|
||||
Q_DECL_RELAXED_CONSTEXPR QPair &operator=(const QPair<TT1, TT2> &p)
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<T1&>() = p.first) && noexcept(std::declval<T2&>() = p.second))
|
||||
{ first = p.first; second = p.second; return *this; }
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
template <typename TT1, typename TT2>
|
||||
Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p)
|
||||
// can't use std::move here as it's not constexpr in C++11:
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(T1(static_cast<TT1 &&>(p.first))) && noexcept(T2(static_cast<TT2 &&>(p.second))))
|
||||
: first(static_cast<TT1 &&>(p.first)), second(static_cast<TT2 &&>(p.second)) {}
|
||||
template <typename TT1, typename TT2>
|
||||
Q_DECL_RELAXED_CONSTEXPR QPair &operator=(QPair<TT1, TT2> &&p)
|
||||
Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<T1&>() = std::move(p.first)) && noexcept(std::declval<T2&>() = std::move(p.second)))
|
||||
{ first = std::move(p.first); second = std::move(p.second); return *this; }
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -378,12 +378,10 @@ QTimeZone::QTimeZone(int offsetSeconds)
|
||||
|
||||
QTimeZone::QTimeZone(const QByteArray &ianaId, int offsetSeconds, const QString &name,
|
||||
const QString &abbreviation, QLocale::Country country, const QString &comment)
|
||||
: d()
|
||||
{
|
||||
// ianaId must be a valid ID and must not clash with the standard system names
|
||||
if (QTimeZonePrivate::isValidId(ianaId) && !availableTimeZoneIds().contains(ianaId))
|
||||
if (!isTimeZoneIdAvailable(ianaId))
|
||||
d = new QUtcTimeZonePrivate(ianaId, offsetSeconds, name, abbreviation, country, comment);
|
||||
else
|
||||
d = 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -821,7 +819,20 @@ bool QTimeZone::isTimeZoneIdAvailable(const QByteArray &ianaId)
|
||||
{
|
||||
// isValidId is not strictly required, but faster to weed out invalid
|
||||
// IDs as availableTimeZoneIds() may be slow
|
||||
return (QTimeZonePrivate::isValidId(ianaId) && (availableTimeZoneIds().contains(ianaId)));
|
||||
if (!QTimeZonePrivate::isValidId(ianaId))
|
||||
return false;
|
||||
const QList<QByteArray> tzIds = availableTimeZoneIds();
|
||||
return std::binary_search(tzIds.begin(), tzIds.end(), ianaId);
|
||||
}
|
||||
|
||||
static QList<QByteArray> set_union(const QList<QByteArray> &l1, const QList<QByteArray> &l2)
|
||||
{
|
||||
QList<QByteArray> result;
|
||||
result.reserve(l1.size() + l2.size());
|
||||
std::set_union(l1.begin(), l1.end(),
|
||||
l2.begin(), l2.end(),
|
||||
std::back_inserter(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -832,11 +843,8 @@ bool QTimeZone::isTimeZoneIdAvailable(const QByteArray &ianaId)
|
||||
|
||||
QList<QByteArray> QTimeZone::availableTimeZoneIds()
|
||||
{
|
||||
QSet<QByteArray> set = QUtcTimeZonePrivate().availableTimeZoneIds()
|
||||
+ global_tz->backend->availableTimeZoneIds();
|
||||
QList<QByteArray> list = set.toList();
|
||||
std::sort(list.begin(), list.end());
|
||||
return list;
|
||||
return set_union(QUtcTimeZonePrivate().availableTimeZoneIds(),
|
||||
global_tz->backend->availableTimeZoneIds());
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -852,11 +860,8 @@ QList<QByteArray> QTimeZone::availableTimeZoneIds()
|
||||
|
||||
QList<QByteArray> QTimeZone::availableTimeZoneIds(QLocale::Country country)
|
||||
{
|
||||
QSet<QByteArray> set = QUtcTimeZonePrivate().availableTimeZoneIds(country)
|
||||
+ global_tz->backend->availableTimeZoneIds(country);
|
||||
QList<QByteArray> list = set.toList();
|
||||
std::sort(list.begin(), list.end());
|
||||
return list;
|
||||
return set_union(QUtcTimeZonePrivate().availableTimeZoneIds(country),
|
||||
global_tz->backend->availableTimeZoneIds(country));
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -868,11 +873,8 @@ QList<QByteArray> QTimeZone::availableTimeZoneIds(QLocale::Country country)
|
||||
|
||||
QList<QByteArray> QTimeZone::availableTimeZoneIds(int offsetSeconds)
|
||||
{
|
||||
QSet<QByteArray> set = QUtcTimeZonePrivate().availableTimeZoneIds(offsetSeconds)
|
||||
+ global_tz->backend->availableTimeZoneIds(offsetSeconds);
|
||||
QList<QByteArray> list = set.toList();
|
||||
std::sort(list.begin(), list.end());
|
||||
return list;
|
||||
return set_union(QUtcTimeZonePrivate().availableTimeZoneIds(offsetSeconds),
|
||||
global_tz->backend->availableTimeZoneIds(offsetSeconds));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -39,6 +39,8 @@
|
||||
#include <qdatastream.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum {
|
||||
@ -341,36 +343,38 @@ QByteArray QTimeZonePrivate::systemTimeZoneId() const
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
return QSet<QByteArray>();
|
||||
return QList<QByteArray>();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
QList<QByteArray> QTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
{
|
||||
// Default fall-back mode, use the zoneTable to find Region of know Zones
|
||||
QSet<QByteArray> regionSet;
|
||||
QList<QByteArray> regions;
|
||||
|
||||
// First get all Zones in the Zones table belonging to the Region
|
||||
for (int i = 0; i < zoneDataTableSize; ++i) {
|
||||
if (zoneData(i)->country == country)
|
||||
regionSet += ianaId(zoneData(i)).split(' ').toSet();
|
||||
regions += ianaId(zoneData(i)).split(' ');
|
||||
}
|
||||
|
||||
std::sort(regions.begin(), regions.end());
|
||||
regions.erase(std::unique(regions.begin(), regions.end()), regions.end());
|
||||
|
||||
// Then select just those that are available
|
||||
QSet<QByteArray> set;
|
||||
foreach (const QByteArray &ianaId, availableTimeZoneIds()) {
|
||||
if (regionSet.contains(ianaId))
|
||||
set << ianaId;
|
||||
}
|
||||
|
||||
return set;
|
||||
const QList<QByteArray> all = availableTimeZoneIds();
|
||||
QList<QByteArray> result;
|
||||
result.reserve(qMin(all.size(), regions.size()));
|
||||
std::set_intersection(all.begin(), all.end(), regions.cbegin(), regions.cend(),
|
||||
std::back_inserter(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) const
|
||||
QList<QByteArray> QTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) const
|
||||
{
|
||||
// Default fall-back mode, use the zoneTable to find Offset of know Zones
|
||||
QSet<QByteArray> offsetSet;
|
||||
QList<QByteArray> offsets;
|
||||
// First get all Zones in the table using the Offset
|
||||
for (int i = 0; i < windowsDataTableSize; ++i) {
|
||||
const QWindowsData *winData = windowsData(i);
|
||||
@ -378,19 +382,21 @@ QSet<QByteArray> QTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) const
|
||||
for (int j = 0; j < zoneDataTableSize; ++j) {
|
||||
const QZoneData *data = zoneData(j);
|
||||
if (data->windowsIdKey == winData->windowsIdKey)
|
||||
offsetSet += ianaId(data).split(' ').toSet();
|
||||
offsets += ianaId(data).split(' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Then select just those that are available
|
||||
QSet<QByteArray> set;
|
||||
foreach (const QByteArray &ianaId, availableTimeZoneIds()) {
|
||||
if (offsetSet.contains(ianaId))
|
||||
set << ianaId;
|
||||
}
|
||||
std::sort(offsets.begin(), offsets.end());
|
||||
offsets.erase(std::unique(offsets.begin(), offsets.end()), offsets.end());
|
||||
|
||||
return set;
|
||||
// Then select just those that are available
|
||||
const QList<QByteArray> all = availableTimeZoneIds();
|
||||
QList<QByteArray> result;
|
||||
result.reserve(qMin(all.size(), offsets.size()));
|
||||
std::set_intersection(all.begin(), all.end(), offsets.cbegin(), offsets.cend(),
|
||||
std::back_inserter(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
@ -682,31 +688,35 @@ QByteArray QUtcTimeZonePrivate::systemTimeZoneId() const
|
||||
return utcQByteArray();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
for (int i = 0; i < utcDataTableSize; ++i)
|
||||
set << utcId(utcData(i));
|
||||
return set;
|
||||
result << utcId(utcData(i));
|
||||
std::sort(result.begin(), result.end()); // ### or already sorted??
|
||||
// ### assuming no duplicates
|
||||
return result;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
{
|
||||
// If AnyCountry then is request for all non-region offset codes
|
||||
if (country == QLocale::AnyCountry)
|
||||
return availableTimeZoneIds();
|
||||
return QSet<QByteArray>();
|
||||
return QList<QByteArray>();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(qint32 offsetSeconds) const
|
||||
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(qint32 offsetSeconds) const
|
||||
{
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
for (int i = 0; i < utcDataTableSize; ++i) {
|
||||
const QUtcData *data = utcData(i);
|
||||
if (data->offsetFromUtc == offsetSeconds)
|
||||
set << utcId(data);
|
||||
result << utcId(data);
|
||||
}
|
||||
return set;
|
||||
std::sort(result.begin(), result.end()); // ### or already sorted??
|
||||
// ### assuming no duplicates
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
|
@ -262,9 +262,9 @@ QByteArray QAndroidTimeZonePrivate::systemTimeZoneId() const
|
||||
return systemTZid;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
QSet<QByteArray> availableTimeZoneIdList;
|
||||
QList<QByteArray> availableTimeZoneIdList;
|
||||
QJNIObjectPrivate androidAvailableIdList = QJNIObjectPrivate::callStaticObjectMethod("java.util.TimeZone", "getAvailableIDs", "()[Ljava/lang/String;");
|
||||
|
||||
QJNIEnvironmentPrivate jniEnv;
|
||||
@ -277,7 +277,7 @@ QSet<QByteArray> QAndroidTimeZonePrivate::availableTimeZoneIds() const
|
||||
for (int i=0; i<androidTZcount; i++ ) {
|
||||
androidTZobject = jniEnv->GetObjectArrayElement( static_cast<jobjectArray>( androidAvailableIdList.object() ), i );
|
||||
androidTZ = androidTZobject;
|
||||
availableTimeZoneIdList.insert( androidTZ.toString().toUtf8() );
|
||||
availableTimeZoneIdList.append( androidTZ.toString().toUtf8() );
|
||||
jniEnv->DeleteLocalRef(androidTZobject);
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@
|
||||
#include <unicode/ucal.h>
|
||||
|
||||
#include <qdebug.h>
|
||||
#include <qlist.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -234,19 +237,21 @@ static QTimeZonePrivate::Data ucalTimeZoneTransition(UCalendar *m_ucal,
|
||||
#endif // U_ICU_VERSION_SHORT
|
||||
|
||||
// Convert a uenum to a QList<QByteArray>
|
||||
static QSet<QByteArray> uenumToIdSet(UEnumeration *uenum)
|
||||
static QList<QByteArray> uenumToIdList(UEnumeration *uenum)
|
||||
{
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> list;
|
||||
int32_t size = 0;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
// TODO Perhaps use uenum_unext instead?
|
||||
QByteArray result = uenum_next(uenum, &size, &status);
|
||||
while (U_SUCCESS(status) && !result.isEmpty()) {
|
||||
set << result;
|
||||
list << result;
|
||||
status = U_ZERO_ERROR;
|
||||
result = uenum_next(uenum, &size, &status);
|
||||
}
|
||||
return set;
|
||||
std::sort(list.begin(), list.end());
|
||||
list.erase(std::unique(list.begin(), list.end()), list.end());
|
||||
return list;
|
||||
}
|
||||
|
||||
// Qt wrapper around ucal_getDSTSavings()
|
||||
@ -453,41 +458,41 @@ QByteArray QIcuTimeZonePrivate::systemTimeZoneId() const
|
||||
return ucalDefaultTimeZoneId();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UEnumeration *uenum = ucal_openTimeZones(&status);
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
if (U_SUCCESS(status))
|
||||
set = uenumToIdSet(uenum);
|
||||
result = uenumToIdList(uenum);
|
||||
uenum_close(uenum);
|
||||
return set;
|
||||
return result;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
QList<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
{
|
||||
QByteArray regionCode = QLocalePrivate::countryToCode(country).toUtf8();
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UEnumeration *uenum = ucal_openCountryTimeZones(regionCode, &status);
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
if (U_SUCCESS(status))
|
||||
set = uenumToIdSet(uenum);
|
||||
result = uenumToIdList(uenum);
|
||||
uenum_close(uenum);
|
||||
return set;
|
||||
return result;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) const
|
||||
QList<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) const
|
||||
{
|
||||
// TODO Available directly in C++ api but not C api, from 4.8 onwards new filter method works
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 49 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM == 8)
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UEnumeration *uenum = ucal_openTimeZoneIDEnumeration(UCAL_ZONE_TYPE_ANY, 0,
|
||||
&offsetFromUtc, &status);
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
if (U_SUCCESS(status))
|
||||
set = uenumToIdSet(uenum);
|
||||
result = uenumToIdList(uenum);
|
||||
uenum_close(uenum);
|
||||
return set;
|
||||
return result;
|
||||
#else
|
||||
return QTimeZonePrivate::availableTimeZoneIds(offsetFromUtc);
|
||||
#endif
|
||||
|
@ -41,6 +41,8 @@
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*
|
||||
@ -247,18 +249,21 @@ QByteArray QMacTimeZonePrivate::systemTimeZoneId() const
|
||||
return QCFString::toQString([[NSTimeZone systemTimeZone] name]).toUtf8();
|
||||
}
|
||||
|
||||
QSet<QByteArray> QMacTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QMacTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
NSEnumerator *enumerator = [[NSTimeZone knownTimeZoneNames] objectEnumerator];
|
||||
QByteArray tzid = QCFString::toQString([enumerator nextObject]).toUtf8();
|
||||
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> list;
|
||||
while (!tzid.isEmpty()) {
|
||||
set << tzid;
|
||||
list << tzid;
|
||||
tzid = QCFString::toQString([enumerator nextObject]).toUtf8();
|
||||
}
|
||||
|
||||
return set;
|
||||
std::sort(list.begin(), list.end());
|
||||
list.erase(std::unique(list.begin(), list.end()), list.end());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -126,9 +126,9 @@ public:
|
||||
|
||||
virtual QByteArray systemTimeZoneId() const;
|
||||
|
||||
virtual QSet<QByteArray> availableTimeZoneIds() const;
|
||||
virtual QSet<QByteArray> availableTimeZoneIds(QLocale::Country country) const;
|
||||
virtual QSet<QByteArray> availableTimeZoneIds(int utcOffset) const;
|
||||
virtual QList<QByteArray> availableTimeZoneIds() const;
|
||||
virtual QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const;
|
||||
virtual QList<QByteArray> availableTimeZoneIds(int utcOffset) const;
|
||||
|
||||
virtual void serialize(QDataStream &ds) const;
|
||||
|
||||
@ -199,9 +199,9 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QSet<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
QSet<QByteArray> availableTimeZoneIds(int utcOffset) const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds(int utcOffset) const Q_DECL_OVERRIDE;
|
||||
|
||||
void serialize(QDataStream &ds) const Q_DECL_OVERRIDE;
|
||||
|
||||
@ -250,9 +250,9 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QSet<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
QSet<QByteArray> availableTimeZoneIds(int offsetFromUtc) const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds(int offsetFromUtc) const Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void init(const QByteArray &ianaId);
|
||||
@ -318,8 +318,8 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QSet<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void init(const QByteArray &ianaId);
|
||||
@ -369,7 +369,7 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void init(const QByteArray &zoneId);
|
||||
@ -420,7 +420,7 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void init(const QByteArray &ianaId);
|
||||
@ -470,7 +470,7 @@ public:
|
||||
|
||||
QByteArray systemTimeZoneId() const Q_DECL_OVERRIDE;
|
||||
|
||||
QSet<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
QList<QByteArray> availableTimeZoneIds() const Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void init(const QByteArray &zoneId);
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -956,20 +957,23 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
|
||||
return ianaId;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
return tzZones->keys().toSet();
|
||||
QList<QByteArray> result = tzZones->keys();
|
||||
std::sort(result.begin(), result.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
|
||||
{
|
||||
// TODO AnyCountry
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
foreach (const QByteArray &key, tzZones->keys()) {
|
||||
if (tzZones->value(key).country == country)
|
||||
set << key;
|
||||
result << key;
|
||||
}
|
||||
return set;
|
||||
std::sort(result.begin(), result.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -38,6 +38,8 @@
|
||||
|
||||
#include "qdebug.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*
|
||||
@ -632,14 +634,16 @@ QByteArray QWinTimeZonePrivate::systemTimeZoneId() const
|
||||
return ianaId;
|
||||
}
|
||||
|
||||
QSet<QByteArray> QWinTimeZonePrivate::availableTimeZoneIds() const
|
||||
QList<QByteArray> QWinTimeZonePrivate::availableTimeZoneIds() const
|
||||
{
|
||||
QSet<QByteArray> set;
|
||||
QList<QByteArray> result;
|
||||
foreach (const QByteArray &winId, availableWindowsIds()) {
|
||||
foreach (const QByteArray &ianaId, windowsIdToIanaIds(winId))
|
||||
set << ianaId;
|
||||
result << ianaId;
|
||||
}
|
||||
return set;
|
||||
std::sort(result.begin(), result.end());
|
||||
result.erase(std::unique(result.begin(), result.end()), result.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
QWinTimeZonePrivate::QWinTransitionRule QWinTimeZonePrivate::ruleForYear(int year) const
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 Keith Gardner <kreios4004@gmail.com>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2014 Keith Gardner <kreios4004@gmail.com>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
## Copyright (C) 2015 The Qt Company Ltd.
|
||||
## Contact: http://www.qt.io/licensing/
|
||||
##
|
||||
## This file is the build configuration utility of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtPlatformSupport module of the Qt Toolkit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtPlatformSupport module of the Qt Toolkit.
|
||||
|
@ -338,6 +338,8 @@ QOpenGLFunctions_1_1_CoreBackend::QOpenGLFunctions_1_1_CoreBackend(QOpenGLContex
|
||||
HMODULE handle = static_cast<HMODULE>(QOpenGLContext::openGLModuleHandle());
|
||||
if (!handle)
|
||||
handle = GetModuleHandleA("opengl32.dll");
|
||||
Indexubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const GLubyte *)>(GetProcAddress(handle, "glIndexubv"));
|
||||
Indexub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLubyte )>(GetProcAddress(handle, "glIndexub"));
|
||||
IsTexture = reinterpret_cast<GLboolean (QOPENGLF_APIENTRYP)(GLuint )>(GetProcAddress(handle, "glIsTexture"));
|
||||
GenTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(GetProcAddress(handle, "glGenTextures"));
|
||||
DeleteTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *)>(GetProcAddress(handle, "glDeleteTextures"));
|
||||
@ -349,9 +351,12 @@ QOpenGLFunctions_1_1_CoreBackend::QOpenGLFunctions_1_1_CoreBackend(QOpenGLContex
|
||||
CopyTexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint )>(GetProcAddress(handle, "glCopyTexImage2D"));
|
||||
CopyTexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint )>(GetProcAddress(handle, "glCopyTexImage1D"));
|
||||
PolygonOffset = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(GetProcAddress(handle, "glPolygonOffset"));
|
||||
GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(GetProcAddress(handle, "glGetPointerv"));
|
||||
DrawElements = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , const GLvoid *)>(GetProcAddress(handle, "glDrawElements"));
|
||||
DrawArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLsizei )>(GetProcAddress(handle, "glDrawArrays"));
|
||||
#else
|
||||
Indexubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const GLubyte *)>(context->getProcAddress("glIndexubv"));
|
||||
Indexub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLubyte )>(context->getProcAddress("glIndexub"));
|
||||
IsTexture = reinterpret_cast<GLboolean (QOPENGLF_APIENTRYP)(GLuint )>(context->getProcAddress("glIsTexture"));
|
||||
GenTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glGenTextures"));
|
||||
DeleteTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *)>(context->getProcAddress("glDeleteTextures"));
|
||||
@ -363,6 +368,7 @@ QOpenGLFunctions_1_1_CoreBackend::QOpenGLFunctions_1_1_CoreBackend(QOpenGLContex
|
||||
CopyTexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint )>(context->getProcAddress("glCopyTexImage2D"));
|
||||
CopyTexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint )>(context->getProcAddress("glCopyTexImage1D"));
|
||||
PolygonOffset = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(context->getProcAddress("glPolygonOffset"));
|
||||
GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(context->getProcAddress("glGetPointerv"));
|
||||
DrawElements = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , const GLvoid *)>(context->getProcAddress("glDrawElements"));
|
||||
DrawArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLsizei )>(context->getProcAddress("glDrawArrays"));
|
||||
#endif
|
||||
@ -749,6 +755,36 @@ QOpenGLFunctions_3_3_CoreBackend::QOpenGLFunctions_3_3_CoreBackend(QOpenGLContex
|
||||
VertexAttribP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLboolean , GLuint )>(context->getProcAddress("glVertexAttribP2ui"));
|
||||
VertexAttribP1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLboolean , const GLuint *)>(context->getProcAddress("glVertexAttribP1uiv"));
|
||||
VertexAttribP1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLboolean , GLuint )>(context->getProcAddress("glVertexAttribP1ui"));
|
||||
SecondaryColorP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glSecondaryColorP3uiv"));
|
||||
SecondaryColorP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glSecondaryColorP3ui"));
|
||||
ColorP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glColorP4uiv"));
|
||||
ColorP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glColorP4ui"));
|
||||
ColorP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glColorP3uiv"));
|
||||
ColorP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glColorP3ui"));
|
||||
NormalP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glNormalP3uiv"));
|
||||
NormalP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glNormalP3ui"));
|
||||
MultiTexCoordP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP4uiv"));
|
||||
MultiTexCoordP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP4ui"));
|
||||
MultiTexCoordP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP3uiv"));
|
||||
MultiTexCoordP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP3ui"));
|
||||
MultiTexCoordP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP2uiv"));
|
||||
MultiTexCoordP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP2ui"));
|
||||
MultiTexCoordP1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP1uiv"));
|
||||
MultiTexCoordP1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP1ui"));
|
||||
TexCoordP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP4uiv"));
|
||||
TexCoordP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP4ui"));
|
||||
TexCoordP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP3uiv"));
|
||||
TexCoordP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP3ui"));
|
||||
TexCoordP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP2uiv"));
|
||||
TexCoordP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP2ui"));
|
||||
TexCoordP1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP1uiv"));
|
||||
TexCoordP1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP1ui"));
|
||||
VertexP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP4uiv"));
|
||||
VertexP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP4ui"));
|
||||
VertexP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP3uiv"));
|
||||
VertexP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP3ui"));
|
||||
VertexP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP2uiv"));
|
||||
VertexP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP2ui"));
|
||||
GetQueryObjectui64v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint64 *)>(context->getProcAddress("glGetQueryObjectui64v"));
|
||||
GetQueryObjecti64v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint64 *)>(context->getProcAddress("glGetQueryObjecti64v"));
|
||||
QueryCounter = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress("glQueryCounter"));
|
||||
@ -1882,6 +1918,86 @@ QOpenGLVersionStatus QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()
|
||||
return QOpenGLVersionStatus(1, 4, QOpenGLVersionStatus::DeprecatedStatus);
|
||||
}
|
||||
|
||||
QOpenGLFunctions_2_0_DeprecatedBackend::QOpenGLFunctions_2_0_DeprecatedBackend(QOpenGLContext *context)
|
||||
: QOpenGLVersionFunctionsBackend(context)
|
||||
{
|
||||
// OpenGL 2.0 deprecated functions
|
||||
VertexAttrib4usv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttrib4usv"));
|
||||
VertexAttrib4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttrib4uiv"));
|
||||
VertexAttrib4ubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttrib4ubv"));
|
||||
VertexAttrib4sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib4sv"));
|
||||
VertexAttrib4s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib4s"));
|
||||
VertexAttrib4iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttrib4iv"));
|
||||
VertexAttrib4fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib4fv"));
|
||||
VertexAttrib4f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib4f"));
|
||||
VertexAttrib4dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib4dv"));
|
||||
VertexAttrib4d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib4d"));
|
||||
VertexAttrib4bv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttrib4bv"));
|
||||
VertexAttrib4Nusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttrib4Nusv"));
|
||||
VertexAttrib4Nuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttrib4Nuiv"));
|
||||
VertexAttrib4Nubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttrib4Nubv"));
|
||||
VertexAttrib4Nub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLubyte , GLubyte , GLubyte , GLubyte )>(context->getProcAddress("glVertexAttrib4Nub"));
|
||||
VertexAttrib4Nsv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib4Nsv"));
|
||||
VertexAttrib4Niv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttrib4Niv"));
|
||||
VertexAttrib4Nbv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttrib4Nbv"));
|
||||
VertexAttrib3sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib3sv"));
|
||||
VertexAttrib3s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib3s"));
|
||||
VertexAttrib3fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib3fv"));
|
||||
VertexAttrib3f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib3f"));
|
||||
VertexAttrib3dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib3dv"));
|
||||
VertexAttrib3d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib3d"));
|
||||
VertexAttrib2sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib2sv"));
|
||||
VertexAttrib2s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib2s"));
|
||||
VertexAttrib2fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib2fv"));
|
||||
VertexAttrib2f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib2f"));
|
||||
VertexAttrib2dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib2dv"));
|
||||
VertexAttrib2d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib2d"));
|
||||
VertexAttrib1sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib1sv"));
|
||||
VertexAttrib1s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort )>(context->getProcAddress("glVertexAttrib1s"));
|
||||
VertexAttrib1fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib1fv"));
|
||||
VertexAttrib1f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat )>(context->getProcAddress("glVertexAttrib1f"));
|
||||
VertexAttrib1dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib1dv"));
|
||||
VertexAttrib1d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble )>(context->getProcAddress("glVertexAttrib1d"));
|
||||
|
||||
}
|
||||
|
||||
QOpenGLVersionStatus QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus()
|
||||
{
|
||||
return QOpenGLVersionStatus(2, 0, QOpenGLVersionStatus::DeprecatedStatus);
|
||||
}
|
||||
|
||||
QOpenGLFunctions_3_0_DeprecatedBackend::QOpenGLFunctions_3_0_DeprecatedBackend(QOpenGLContext *context)
|
||||
: QOpenGLVersionFunctionsBackend(context)
|
||||
{
|
||||
// OpenGL 3.0 deprecated functions
|
||||
VertexAttribI4usv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttribI4usv"));
|
||||
VertexAttribI4ubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttribI4ubv"));
|
||||
VertexAttribI4sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttribI4sv"));
|
||||
VertexAttribI4bv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttribI4bv"));
|
||||
VertexAttribI4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI4uiv"));
|
||||
VertexAttribI3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI3uiv"));
|
||||
VertexAttribI2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI2uiv"));
|
||||
VertexAttribI1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI1uiv"));
|
||||
VertexAttribI4iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI4iv"));
|
||||
VertexAttribI3iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI3iv"));
|
||||
VertexAttribI2iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI2iv"));
|
||||
VertexAttribI1iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI1iv"));
|
||||
VertexAttribI4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI4ui"));
|
||||
VertexAttribI3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI3ui"));
|
||||
VertexAttribI2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI2ui"));
|
||||
VertexAttribI1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glVertexAttribI1ui"));
|
||||
VertexAttribI4i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint )>(context->getProcAddress("glVertexAttribI4i"));
|
||||
VertexAttribI3i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint )>(context->getProcAddress("glVertexAttribI3i"));
|
||||
VertexAttribI2i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint )>(context->getProcAddress("glVertexAttribI2i"));
|
||||
VertexAttribI1i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint )>(context->getProcAddress("glVertexAttribI1i"));
|
||||
|
||||
}
|
||||
|
||||
QOpenGLVersionStatus QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus()
|
||||
{
|
||||
return QOpenGLVersionStatus(3, 0, QOpenGLVersionStatus::DeprecatedStatus);
|
||||
}
|
||||
|
||||
QOpenGLFunctions_3_3_DeprecatedBackend::QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext *context)
|
||||
: QOpenGLVersionFunctionsBackend(context)
|
||||
{
|
||||
|
@ -223,6 +223,8 @@ public:
|
||||
static QOpenGLVersionStatus versionStatus();
|
||||
|
||||
// OpenGL 1.1 core functions
|
||||
void (QOPENGLF_APIENTRYP Indexubv)(const GLubyte *c);
|
||||
void (QOPENGLF_APIENTRYP Indexub)(GLubyte c);
|
||||
GLboolean (QOPENGLF_APIENTRYP IsTexture)(GLuint texture);
|
||||
void (QOPENGLF_APIENTRYP GenTextures)(GLsizei n, GLuint *textures);
|
||||
void (QOPENGLF_APIENTRYP DeleteTextures)(GLsizei n, const GLuint *textures);
|
||||
@ -234,6 +236,7 @@ public:
|
||||
void (QOPENGLF_APIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
void (QOPENGLF_APIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
|
||||
void (QOPENGLF_APIENTRYP PolygonOffset)(GLfloat factor, GLfloat units);
|
||||
void (QOPENGLF_APIENTRYP GetPointerv)(GLenum pname, GLvoid* *params);
|
||||
void (QOPENGLF_APIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
void (QOPENGLF_APIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count);
|
||||
|
||||
@ -333,42 +336,6 @@ public:
|
||||
|
||||
// OpenGL 2.0 core functions
|
||||
void (QOPENGLF_APIENTRYP VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4usv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4ubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4bv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nusv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nuiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nsv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Niv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nbv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1s)(GLuint index, GLshort x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1f)(GLuint index, GLfloat x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1d)(GLuint index, GLdouble x);
|
||||
void (QOPENGLF_APIENTRYP ValidateProgram)(GLuint program);
|
||||
void (QOPENGLF_APIENTRYP UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
void (QOPENGLF_APIENTRYP UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
@ -425,7 +392,42 @@ public:
|
||||
void (QOPENGLF_APIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
void (QOPENGLF_APIENTRYP DrawBuffers)(GLsizei n, const GLenum *bufs);
|
||||
void (QOPENGLF_APIENTRYP BlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
|
||||
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4usv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4ubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4bv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nusv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nuiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nsv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Niv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nbv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1s)(GLuint index, GLshort x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1f)(GLuint index, GLfloat x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1d)(GLuint index, GLdouble x);
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_2_1_CoreBackend : public QOpenGLVersionFunctionsBackend
|
||||
@ -499,6 +501,24 @@ public:
|
||||
GLint (QOPENGLF_APIENTRYP GetFragDataLocation)(GLuint program, const GLchar *name);
|
||||
void (QOPENGLF_APIENTRYP BindFragDataLocation)(GLuint program, GLuint color, const GLchar *name);
|
||||
void (QOPENGLF_APIENTRYP GetUniformuiv)(GLuint program, GLint location, GLuint *params);
|
||||
void (QOPENGLF_APIENTRYP GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params);
|
||||
void (QOPENGLF_APIENTRYP GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP EndConditionalRender)();
|
||||
void (QOPENGLF_APIENTRYP BeginConditionalRender)(GLuint id, GLenum mode);
|
||||
void (QOPENGLF_APIENTRYP ClampColor)(GLenum target, GLenum clamp);
|
||||
void (QOPENGLF_APIENTRYP GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
void (QOPENGLF_APIENTRYP TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
|
||||
void (QOPENGLF_APIENTRYP BindBufferBase)(GLenum target, GLuint index, GLuint buffer);
|
||||
void (QOPENGLF_APIENTRYP BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
void (QOPENGLF_APIENTRYP EndTransformFeedback)();
|
||||
void (QOPENGLF_APIENTRYP BeginTransformFeedback)(GLenum primitiveMode);
|
||||
GLboolean (QOPENGLF_APIENTRYP IsEnabledi)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP Disablei)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP Enablei)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP GetIntegeri_v)(GLenum target, GLuint index, GLint *data);
|
||||
void (QOPENGLF_APIENTRYP GetBooleani_v)(GLenum target, GLuint index, GLboolean *data);
|
||||
void (QOPENGLF_APIENTRYP ColorMaski)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4usv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4ubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4sv)(GLuint index, const GLshort *v);
|
||||
@ -519,25 +539,6 @@ public:
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI2i)(GLuint index, GLint x, GLint y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI1i)(GLuint index, GLint x);
|
||||
void (QOPENGLF_APIENTRYP GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params);
|
||||
void (QOPENGLF_APIENTRYP GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP EndConditionalRender)();
|
||||
void (QOPENGLF_APIENTRYP BeginConditionalRender)(GLuint id, GLenum mode);
|
||||
void (QOPENGLF_APIENTRYP ClampColor)(GLenum target, GLenum clamp);
|
||||
void (QOPENGLF_APIENTRYP GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
void (QOPENGLF_APIENTRYP TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
|
||||
void (QOPENGLF_APIENTRYP BindBufferBase)(GLenum target, GLuint index, GLuint buffer);
|
||||
void (QOPENGLF_APIENTRYP BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
void (QOPENGLF_APIENTRYP EndTransformFeedback)();
|
||||
void (QOPENGLF_APIENTRYP BeginTransformFeedback)(GLenum primitiveMode);
|
||||
GLboolean (QOPENGLF_APIENTRYP IsEnabledi)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP Disablei)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP Enablei)(GLenum target, GLuint index);
|
||||
void (QOPENGLF_APIENTRYP GetIntegeri_v)(GLenum target, GLuint index, GLint *data);
|
||||
void (QOPENGLF_APIENTRYP GetBooleani_v)(GLenum target, GLuint index, GLboolean *data);
|
||||
void (QOPENGLF_APIENTRYP ColorMaski)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_3_1_CoreBackend : public QOpenGLVersionFunctionsBackend
|
||||
@ -609,6 +610,36 @@ public:
|
||||
void (QOPENGLF_APIENTRYP VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
|
||||
void (QOPENGLF_APIENTRYP SecondaryColorP3uiv)(GLenum type, const GLuint *color);
|
||||
void (QOPENGLF_APIENTRYP SecondaryColorP3ui)(GLenum type, GLuint color);
|
||||
void (QOPENGLF_APIENTRYP ColorP4uiv)(GLenum type, const GLuint *color);
|
||||
void (QOPENGLF_APIENTRYP ColorP4ui)(GLenum type, GLuint color);
|
||||
void (QOPENGLF_APIENTRYP ColorP3uiv)(GLenum type, const GLuint *color);
|
||||
void (QOPENGLF_APIENTRYP ColorP3ui)(GLenum type, GLuint color);
|
||||
void (QOPENGLF_APIENTRYP NormalP3uiv)(GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP NormalP3ui)(GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP4uiv)(GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP4ui)(GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP3uiv)(GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP3ui)(GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP2uiv)(GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP2ui)(GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP1uiv)(GLenum type, const GLuint *coords);
|
||||
void (QOPENGLF_APIENTRYP TexCoordP1ui)(GLenum type, GLuint coords);
|
||||
void (QOPENGLF_APIENTRYP VertexP4uiv)(GLenum type, const GLuint *value);
|
||||
void (QOPENGLF_APIENTRYP VertexP4ui)(GLenum type, GLuint value);
|
||||
void (QOPENGLF_APIENTRYP VertexP3uiv)(GLenum type, const GLuint *value);
|
||||
void (QOPENGLF_APIENTRYP VertexP3ui)(GLenum type, GLuint value);
|
||||
void (QOPENGLF_APIENTRYP VertexP2uiv)(GLenum type, const GLuint *value);
|
||||
void (QOPENGLF_APIENTRYP VertexP2ui)(GLenum type, GLuint value);
|
||||
void (QOPENGLF_APIENTRYP GetQueryObjectui64v)(GLuint id, GLenum pname, GLuint64 *params);
|
||||
void (QOPENGLF_APIENTRYP GetQueryObjecti64v)(GLuint id, GLenum pname, GLint64 *params);
|
||||
void (QOPENGLF_APIENTRYP QueryCounter)(GLuint id, GLenum target);
|
||||
@ -819,16 +850,6 @@ public:
|
||||
static QOpenGLVersionStatus versionStatus();
|
||||
|
||||
// OpenGL 4.3 core functions
|
||||
void (QOPENGLF_APIENTRYP GetObjectPtrLabel)(const GLvoid *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP ObjectPtrLabel)(const GLvoid *ptr, GLsizei length, const GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP GetObjectLabel)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP ObjectLabel)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP PopDebugGroup)();
|
||||
void (QOPENGLF_APIENTRYP PushDebugGroup)(GLenum source, GLuint id, GLsizei length, const GLchar *message);
|
||||
GLuint (QOPENGLF_APIENTRYP GetDebugMessageLog)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageCallback)(GLDEBUGPROC callback, const GLvoid *userParam);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageInsert)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageControl)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
void (QOPENGLF_APIENTRYP TexStorage3DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
void (QOPENGLF_APIENTRYP TexStorage2DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
void (QOPENGLF_APIENTRYP TexBufferRange)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
@ -862,6 +883,16 @@ public:
|
||||
void (QOPENGLF_APIENTRYP DispatchCompute)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
|
||||
void (QOPENGLF_APIENTRYP ClearBufferSubData)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
void (QOPENGLF_APIENTRYP ClearBufferData)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
void (QOPENGLF_APIENTRYP GetObjectPtrLabel)(const GLvoid *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP ObjectPtrLabel)(const GLvoid *ptr, GLsizei length, const GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP GetObjectLabel)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP ObjectLabel)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
|
||||
void (QOPENGLF_APIENTRYP PopDebugGroup)();
|
||||
void (QOPENGLF_APIENTRYP PushDebugGroup)(GLenum source, GLuint id, GLsizei length, const GLchar *message);
|
||||
GLuint (QOPENGLF_APIENTRYP GetDebugMessageLog)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageCallback)(GLDEBUGPROC callback, const GLvoid *userParam);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageInsert)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
void (QOPENGLF_APIENTRYP DebugMessageControl)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
|
||||
};
|
||||
|
||||
@ -1281,22 +1312,21 @@ public:
|
||||
// OpenGL 1.1 deprecated functions
|
||||
void (QOPENGLF_APIENTRYP PushClientAttrib)(GLbitfield mask);
|
||||
void (QOPENGLF_APIENTRYP PopClientAttrib)();
|
||||
void (QOPENGLF_APIENTRYP Indexubv)(const GLubyte *c);
|
||||
void (QOPENGLF_APIENTRYP Indexub)(GLubyte c);
|
||||
void (QOPENGLF_APIENTRYP PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLfloat *priorities);
|
||||
GLboolean (QOPENGLF_APIENTRYP AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
|
||||
void (QOPENGLF_APIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP GetPointerv)(GLenum pname, GLvoid* *params);
|
||||
void (QOPENGLF_APIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP EnableClientState)(GLenum array);
|
||||
void (QOPENGLF_APIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP DisableClientState)(GLenum array);
|
||||
void (QOPENGLF_APIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void (QOPENGLF_APIENTRYP ArrayElement)(GLint i);
|
||||
|
||||
void (QOPENGLF_APIENTRYP Indexubv)(const GLubyte *c);
|
||||
void (QOPENGLF_APIENTRYP Indexub)(GLubyte c);
|
||||
void (QOPENGLF_APIENTRYP GetPointerv)(GLenum pname, GLvoid* *params);
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_1_2_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
|
||||
@ -1307,7 +1337,6 @@ public:
|
||||
static QOpenGLVersionStatus versionStatus();
|
||||
|
||||
// OpenGL 1.2 deprecated functions
|
||||
void (QOPENGLF_APIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
void (QOPENGLF_APIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
|
||||
void (QOPENGLF_APIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params);
|
||||
void (QOPENGLF_APIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
|
||||
@ -1339,6 +1368,7 @@ public:
|
||||
void (QOPENGLF_APIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink);
|
||||
void (QOPENGLF_APIENTRYP ResetHistogram)(GLenum target);
|
||||
void (QOPENGLF_APIENTRYP ResetMinmax)(GLenum target);
|
||||
void (QOPENGLF_APIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
|
||||
};
|
||||
|
||||
@ -1439,6 +1469,84 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_2_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_2_0_DeprecatedBackend(QOpenGLContext *context);
|
||||
|
||||
static QOpenGLVersionStatus versionStatus();
|
||||
|
||||
// OpenGL 2.0 deprecated functions
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4usv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4ubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4bv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nusv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nuiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nsv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Niv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib4Nbv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1s)(GLuint index, GLshort x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1fv)(GLuint index, const GLfloat *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1f)(GLuint index, GLfloat x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1dv)(GLuint index, const GLdouble *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttrib1d)(GLuint index, GLdouble x);
|
||||
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_3_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_0_DeprecatedBackend(QOpenGLContext *context);
|
||||
|
||||
static QOpenGLVersionStatus versionStatus();
|
||||
|
||||
// OpenGL 3.0 deprecated functions
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4usv)(GLuint index, const GLushort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4ubv)(GLuint index, const GLubyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4sv)(GLuint index, const GLshort *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4bv)(GLuint index, const GLbyte *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI3uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI2uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI1uiv)(GLuint index, const GLuint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI3iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI2iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI1iv)(GLuint index, const GLint *v);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI2ui)(GLuint index, GLuint x, GLuint y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI1ui)(GLuint index, GLuint x);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI2i)(GLuint index, GLint x, GLint y);
|
||||
void (QOPENGLF_APIENTRYP VertexAttribI1i)(GLuint index, GLint x);
|
||||
|
||||
};
|
||||
|
||||
class QOpenGLFunctions_3_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
|
||||
{
|
||||
public:
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user