diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-07-12 18:13:53 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-12 22:45:42 +0000 |
commit | b6ce81ed2ede0f8b661caf0809bfa0f5d5147a71 (patch) | |
tree | 9b22d520dfde2da92b64a9d4c8efc36d5960115c | |
parent | a6429b9ff0995ab9b3052112e11485eb49dac5c0 (diff) |
shiboken6: Remove function verifyDirectoryFor()
The function does not return an error. Since class FileOut
also creates the directory and throws on failure, it is not needed.
Change-Id: I5ad78e9789cb194df262342fb3aed6bd00dfb455
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 0a935931b529ea2aafcb0415c13a4b8cd0ef6487)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/generator/generator.cpp | 11 | ||||
-rw-r--r-- | sources/shiboken6/generator/generator.h | 2 | ||||
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 2 |
3 files changed, 0 insertions, 15 deletions
diff --git a/sources/shiboken6/generator/generator.cpp b/sources/shiboken6/generator/generator.cpp index 58998a380..548906f36 100644 --- a/sources/shiboken6/generator/generator.cpp +++ b/sources/shiboken6/generator/generator.cpp @@ -492,17 +492,6 @@ bool Generator::shouldGenerate(const AbstractMetaClass *metaClass) const return shouldGenerateTypeEntry(metaClass->typeEntry()); } -void verifyDirectoryFor(const QString &file) -{ - QDir dir = QFileInfo(file).absoluteDir(); - if (!dir.exists()) { - if (!dir.mkpath(dir.absolutePath())) { - qCWarning(lcShiboken, "Unable to create directory '%s'", - qPrintable(QDir::toNativeSeparators(dir.absolutePath()))); - } - } -} - const ApiExtractorResult &Generator::api() const { return m_d->api; diff --git a/sources/shiboken6/generator/generator.h b/sources/shiboken6/generator/generator.h index 2930ff5ee..4c675b02f 100644 --- a/sources/shiboken6/generator/generator.h +++ b/sources/shiboken6/generator/generator.h @@ -57,8 +57,6 @@ QT_END_NAMESPACE class PrimitiveTypeEntry; class ContainerTypeEntry; -void verifyDirectoryFor(const QString &file); - QString getClassTargetFullName(const AbstractMetaClass *metaClass, bool includePackageName = true); QString getClassTargetFullName(const AbstractMetaEnum &metaEnum, bool includePackageName = true); QString getClassTargetFullName(const AbstractMetaType &metaType, bool includePackageName = true); diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index dc345d9f0..983e059b5 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -6065,8 +6065,6 @@ bool CppGenerator::finishGeneration() QString moduleFileName(outputDirectory() + QLatin1Char('/') + subDirectoryForPackage(packageName())); moduleFileName += QLatin1Char('/') + moduleName().toLower() + QLatin1String("_module_wrapper.cpp"); - - verifyDirectoryFor(moduleFileName); FileOut file(moduleFileName); TextStream &s = file.stream; |