summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-01-15 16:55:26 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2021-01-25 08:58:24 +0000
commite735e95f06c2cd0b4b22fdd1da9d72a42252e754 (patch)
tree91eb406144d6fdbd56a955eb45f2c269024ed2cb /src/plugins/cpptools/cpptoolsplugin.cpp
parentaae3bf4ef787fc13113bb91c8361d002f5579a58 (diff)
downloadqt-creator-e735e95f06c2cd0b4b22fdd1da9d72a42252e754.tar.gz
"New Class" wizard: Check custom base class for QObject parent
That is, if the user specifies a custom base class, we check whether its constructor takes a "QObject *parent" parameter, and if it does, we give the derived class one as well. This is technically a heuristic, but the pattern is pretty stable in the Qt world. Fixes: QTCREATORBUG-25156 Change-Id: Ie64440929df61cca7258d6d692c5de62970f9a65 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 47a604ae0c..fa13b359a3 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -33,7 +33,6 @@
#include "cpptoolsbridge.h"
#include "cpptoolsbridgeqtcreatorimplementation.h"
#include "cpptoolsconstants.h"
-#include "cpptoolsjsextension.h"
#include "cpptoolsreuse.h"
#include "cpptoolssettings.h"
#include "projectinfo.h"
@@ -46,7 +45,6 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
-#include <coreplugin/jsexpander.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <extensionsystem/pluginmanager.h>
@@ -167,7 +165,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
d = new CppToolsPluginPrivate;
d->initialize();
- JsExpander::registerGlobalObject<CppToolsJsExtension>("Cpp");
+ CppModelManager::instance()->registerJsExtension();
ExtensionSystem::PluginManager::addObject(&d->m_cppProjectUpdaterFactory);
// Menus