Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/assistant/renameassistant.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 133 | if (!supportedLanguage()->refactoring()) { | |||
---|---|---|---|---|---|
134 | qCWarning(LANGUAGE) << "Refactoring not supported. Aborting."; | 134 | qCWarning(LANGUAGE) << "Refactoring not supported. Aborting."; | ||
135 | return; | 135 | return; | ||
136 | } | 136 | } | ||
137 | 137 | | |||
138 | if (!doc) | 138 | if (!doc) | ||
139 | return; | 139 | return; | ||
140 | 140 | | |||
141 | //If the inserted text isn't valid for a variable name, consider the editing ended | 141 | //If the inserted text isn't valid for a variable name, consider the editing ended | ||
142 | QRegExp validDeclName("^[0-9a-zA-Z_]*$"); | 142 | QRegExp validDeclName(QStringLiteral("^[0-9a-zA-Z_]*$")); | ||
143 | if (removedText.isEmpty() && !validDeclName.exactMatch(doc->text(invocationRange))) { | 143 | if (removedText.isEmpty() && !validDeclName.exactMatch(doc->text(invocationRange))) { | ||
144 | d->reset(); | 144 | d->reset(); | ||
145 | return; | 145 | return; | ||
146 | } | 146 | } | ||
147 | 147 | | |||
148 | const QUrl url = doc->url(); | 148 | const QUrl url = doc->url(); | ||
149 | const IndexedString indexedUrl(url); | 149 | const IndexedString indexedUrl(url); | ||
150 | DUChainReadLocker lock; | 150 | DUChainReadLocker lock; | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |