diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-04 11:29:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-04 14:42:20 +0000 |
commit | 009c7413952c01c7ba4722aa73c968e07dc17e04 (patch) | |
tree | b172946d8d7011c3a95827d6c3f0f27b217e1b12 /sources/shiboken2/generator | |
parent | 7de80955ccb5383d07183c119b834d12cecedd0c (diff) |
shiboken: Allow for include paths with relative directories
Resolve the absolute file paths of the code model items against the
include paths of shiboken to reconstruct the relative paths.
Change-Id: Id0f793315b01c0fc65a4cfb26b3372f9c6688872
Fixes: PYSIDE-975
Reviewed-by: Volker Aßmann <volker.assmann@gmail.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp index 094990b64..1817f6b03 100644 --- a/sources/shiboken2/generator/main.cpp +++ b/sources/shiboken2/generator/main.cpp @@ -373,8 +373,10 @@ static void parseIncludePathOption(const QString &option, HeaderType headerType, const QStringList includePathListList = it.value().split(pathSplitter, QString::SkipEmptyParts); args.erase(it); - for (const QString &s : includePathListList) - extractor.addIncludePath(HeaderPath{QFile::encodeName(s), headerType}); + for (const QString &s : includePathListList) { + auto path = QFile::encodeName(QDir::cleanPath(s)); + extractor.addIncludePath(HeaderPath{path, headerType}); + } } } |