Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/clangsupport.cpp
Show All 33 Lines | |||||
34 | 34 | | |||
35 | #include "clanghighlighting.h" | 35 | #include "clanghighlighting.h" | ||
36 | 36 | | |||
37 | #include <interfaces/icore.h> | 37 | #include <interfaces/icore.h> | ||
38 | #include <interfaces/ilanguagecontroller.h> | 38 | #include <interfaces/ilanguagecontroller.h> | ||
39 | #include <interfaces/iplugincontroller.h> | 39 | #include <interfaces/iplugincontroller.h> | ||
40 | #include <interfaces/contextmenuextension.h> | 40 | #include <interfaces/contextmenuextension.h> | ||
41 | #include <interfaces/idocumentcontroller.h> | 41 | #include <interfaces/idocumentcontroller.h> | ||
42 | #include <interfaces/iuicontroller.h> | ||||
42 | #include <language/interfaces/iastcontainer.h> | 43 | #include <language/interfaces/iastcontainer.h> | ||
43 | 44 | | |||
45 | #include "clangdebugwidget.h" | ||||
44 | #include "codegen/clangrefactoring.h" | 46 | #include "codegen/clangrefactoring.h" | ||
45 | #include "codegen/adaptsignatureassistant.h" | 47 | #include "codegen/adaptsignatureassistant.h" | ||
46 | #include "duchain/documentfinderhelpers.h" | 48 | #include "duchain/documentfinderhelpers.h" | ||
47 | #include "duchain/clangindex.h" | 49 | #include "duchain/clangindex.h" | ||
48 | #include "duchain/navigationwidget.h" | 50 | #include "duchain/navigationwidget.h" | ||
49 | #include "duchain/macrodefinition.h" | 51 | #include "duchain/macrodefinition.h" | ||
50 | #include "duchain/clangparsingenvironmentfile.h" | 52 | #include "duchain/clangparsingenvironmentfile.h" | ||
51 | #include "duchain/duchainutils.h" | 53 | #include "duchain/duchainutils.h" | ||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Line(s) | 182 | { | |||
198 | } | 200 | } | ||
199 | 201 | | |||
200 | auto assistantsManager = core()->languageController()->staticAssistantsManager(); | 202 | auto assistantsManager = core()->languageController()->staticAssistantsManager(); | ||
201 | assistantsManager->registerAssistant(StaticAssistant::Ptr(new RenameAssistant(this))); | 203 | assistantsManager->registerAssistant(StaticAssistant::Ptr(new RenameAssistant(this))); | ||
202 | assistantsManager->registerAssistant(StaticAssistant::Ptr(new AdaptSignatureAssistant(this))); | 204 | assistantsManager->registerAssistant(StaticAssistant::Ptr(new AdaptSignatureAssistant(this))); | ||
203 | 205 | | |||
204 | connect(ICore::self()->documentController(), &IDocumentController::documentActivated, | 206 | connect(ICore::self()->documentController(), &IDocumentController::documentActivated, | ||
205 | this, &ClangSupport::documentActivated); | 207 | this, &ClangSupport::documentActivated); | ||
208 | | ||||
209 | | ||||
210 | QAction* action = new QAction(i18n("Open Debug")); | ||||
211 | actionCollection()->setDefaultShortcut(action, Qt::ControlModifier | Qt::MetaModifier | Qt::Key_D); | ||||
212 | actionCollection()->addAction(QStringLiteral("clang_debug"), action); | ||||
213 | | ||||
214 | auto debug = ClangDebugWidget::self(); | ||||
215 | connect(ICore::self(), &ICore::aboutToShutdown, debug, &QObject::deleteLater); | ||||
216 | connect(action, &QAction::triggered, debug, &QWidget::show); | ||||
206 | } | 217 | } | ||
207 | 218 | | |||
208 | ClangSupport::~ClangSupport() | 219 | ClangSupport::~ClangSupport() | ||
209 | { | 220 | { | ||
210 | parseLock()->lockForWrite(); | 221 | parseLock()->lockForWrite(); | ||
211 | // By locking the parse-mutexes, we make sure that parse jobs get a chance to finish in a good state | 222 | // By locking the parse-mutexes, we make sure that parse jobs get a chance to finish in a good state | ||
212 | parseLock()->unlock(); | 223 | parseLock()->unlock(); | ||
213 | 224 | | |||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |