forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/14.0'
Conflicts: src/plugins/android/androidmanager.cpp src/plugins/android/androidrunner.cpp src/plugins/android/androidrunner.h src/plugins/qmldesigner/components/texteditor/texteditorview.cpp src/plugins/qmldesigner/components/texteditor/texteditorview.h src/plugins/qmldesigner/designmodecontext.cpp src/plugins/qmldesigner/designmodecontext.h src/plugins/qmljseditor/qmljseditingsettingspage.cpp Change-Id: Idada49bb7441e8c5b748bd75b2e6bb2351bd323e
This commit is contained in:
@@ -63,7 +63,8 @@ const char CUSTOM_COMMAND[] = "QmlJSEditor.useCustomFormatCommand";
|
||||
const char CUSTOM_ANALYZER[] = "QmlJSEditor.useCustomAnalyzer";
|
||||
const char DISABLED_MESSAGES[] = "QmlJSEditor.disabledMessages";
|
||||
const char DISABLED_MESSAGES_NONQUICKUI[] = "QmlJSEditor.disabledMessagesNonQuickUI";
|
||||
const char DEFAULT_CUSTOM_FORMAT_COMMAND[] = "%{CurrentDocument:Project:QT_HOST_BINS}/qmlformat";
|
||||
const char DEFAULT_CUSTOM_FORMAT_COMMAND[]
|
||||
= "%{CurrentDocument:Project:QT_HOST_BINS}/qmlformat%{HostOs:ExecutableSuffix}";
|
||||
|
||||
QmlJsEditingSettings &settings()
|
||||
{
|
||||
|
||||
@@ -127,12 +127,15 @@ static inline QString getModuleName(const ScopeChain &scopeChain, const Document
|
||||
bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::Ptr &qmlDocument,
|
||||
const ObjectValue *value, const QStringList &qName)
|
||||
{
|
||||
QString moduleName = getModuleName(scopeChain, qmlDocument, value);
|
||||
const QString moduleName = getModuleName(scopeChain, qmlDocument, value);
|
||||
static const QRegularExpression anyVersion("((-1|\\d+)\\.-1)|(\\d+\\.\\d+)$");
|
||||
|
||||
QStringList helpIdCandidates;
|
||||
|
||||
QStringList helpIdPieces(qName);
|
||||
helpIdPieces.prepend(moduleName);
|
||||
QString strippedModuleName = moduleName;
|
||||
strippedModuleName.remove(anyVersion);
|
||||
helpIdPieces.prepend(strippedModuleName);
|
||||
helpIdPieces.prepend("QML");
|
||||
helpIdCandidates += helpIdPieces.join('.');
|
||||
|
||||
@@ -155,8 +158,8 @@ bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Docum
|
||||
const HelpItem::Links links = helpItem.links();
|
||||
|
||||
// Check if the module name contains a major version.
|
||||
QRegularExpression version("^([^\\d]*)(\\d+)\\.*\\d*$");
|
||||
QRegularExpressionMatch m = version.match(moduleName);
|
||||
static QRegularExpression version("^([^\\d]*)(\\d+)\\.*\\d*$");
|
||||
const QRegularExpressionMatch m = version.match(moduleName);
|
||||
if (m.hasMatch()) {
|
||||
QMap<QString, QUrl> filteredUrlMap;
|
||||
const QString maj = m.captured(2);
|
||||
|
||||
Reference in New Issue
Block a user