aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cpptoolsjsextension.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-02-07 16:58:37 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-02-27 13:28:23 +0000
commitbcc2b5e08d44f3b8a601a48f5c6d7e8a9f5e6c79 (patch)
tree5a2f61c49b9f6fd4669af451c29816a3377dd601 /src/plugins/cpptools/cpptoolsjsextension.h
parent0585ad0f64e26700f3436802c19ff3c0f663396e (diff)
"New Class" wizard: Try to find a base class header
If the project has a header file whose name suggests that it might declare the base class, then add an include statement for it. While we cannot guarantee that the include statement is resolvable as- is, it's at least a basis for the user to adapt accordingly, while without any include statement the class will definitely not compile. Fixes: QTCREATORBUG-3855 Change-Id: I55ec43d58a9a13b9b59a5bbe6415a457b974b654 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsjsextension.h')
-rw-r--r--src/plugins/cpptools/cpptoolsjsextension.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolsjsextension.h b/src/plugins/cpptools/cpptoolsjsextension.h
index b5281910337..065e0ca8d5e 100644
--- a/src/plugins/cpptools/cpptoolsjsextension.h
+++ b/src/plugins/cpptools/cpptoolsjsextension.h
@@ -55,6 +55,14 @@ public:
Q_INVOKABLE QString classToHeaderGuard(const QString &klass, const QString &extension) const;
Q_INVOKABLE QString openNamespaces(const QString &klass) const;
Q_INVOKABLE QString closeNamespaces(const QString &klass) const;
+
+ // Find header file for class.
+ Q_INVOKABLE QString includeStatement(
+ const QString &fullyQualifiedClassName,
+ const QString &suffix,
+ const QString &specialClasses,
+ const QString &pathOfIncludingFile
+ );
};
} // namespace Internal