Changeset View
Changeset View
Standalone View
Standalone View
phplanguagesupport.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | |||||
164 | QWidget* LanguageSupport::specialLanguageObjectNavigationWidget(const QUrl& url, const Cursor& position) | 164 | QWidget* LanguageSupport::specialLanguageObjectNavigationWidget(const QUrl& url, const Cursor& position) | ||
165 | { | 165 | { | ||
166 | QPair<QString, Range> word = wordUnderCursor(url, position); | 166 | QPair<QString, Range> word = wordUnderCursor(url, position); | ||
167 | if ( isMagicConstant(word) ) { | 167 | if ( isMagicConstant(word) ) { | ||
168 | DUChainReadLocker lock; | 168 | DUChainReadLocker lock; | ||
169 | if (TopDUContext* top = standardContext(url)) { | 169 | if (TopDUContext* top = standardContext(url)) { | ||
170 | return new NavigationWidget(TopDUContextPointer(top), position, word.first); | 170 | return new NavigationWidget(TopDUContextPointer(top), position, word.first); | ||
171 | } else { | 171 | } else { | ||
172 | return 0; | 172 | return nullptr; | ||
173 | } | 173 | } | ||
174 | } | 174 | } | ||
175 | return ILanguageSupport::specialLanguageObjectNavigationWidget(url, position); | 175 | return ILanguageSupport::specialLanguageObjectNavigationWidget(url, position); | ||
176 | } | 176 | } | ||
177 | 177 | | |||
178 | Range LanguageSupport::specialLanguageObjectRange(const QUrl& url, const Cursor& position) | 178 | Range LanguageSupport::specialLanguageObjectRange(const QUrl& url, const Cursor& position) | ||
179 | { | 179 | { | ||
180 | QPair<QString, Range> word = wordUnderCursor(url, position); | 180 | QPair<QString, Range> word = wordUnderCursor(url, position); | ||
Show All 9 Lines |