File indexing completed on 2024-05-05 16:46:16
0001 /* 0002 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "qmakeincludefile.h" 0008 #include "qmakemkspecs.h" 0009 #include <QString> 0010 0011 QMakeIncludeFile::QMakeIncludeFile(const QString& incfile, QMakeFile* parent, const VariableMap& variables) 0012 : QMakeProjectFile(incfile) 0013 , m_parent(parent) 0014 { 0015 m_variableValues = variables; 0016 0017 setProject(parent->project()); 0018 0019 auto* pro = dynamic_cast<QMakeProjectFile*>(parent); 0020 if (pro) { 0021 setMkSpecs(pro->mkSpecs()); 0022 setQMakeCache(pro->qmakeCache()); 0023 } else { 0024 auto* specs = dynamic_cast<QMakeMkSpecs*>(parent); 0025 setMkSpecs(specs); 0026 } 0027 } 0028 0029 QString QMakeIncludeFile::pwd() const 0030 { 0031 return absoluteDir(); 0032 } 0033 0034 QString QMakeIncludeFile::outPwd() const 0035 { 0036 auto* pro = dynamic_cast<QMakeProjectFile*>(m_parent); 0037 if (pro) { 0038 return pro->outPwd(); 0039 } else { 0040 return absoluteDir(); 0041 } 0042 } 0043 0044 QString QMakeIncludeFile::proFile() const 0045 { 0046 return m_parent->absoluteFile(); 0047 } 0048 0049 QString QMakeIncludeFile::proFilePwd() const 0050 { 0051 return m_parent->absoluteDir(); 0052 }