diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-11-04 14:41:36 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-11-04 14:41:36 +0100 |
commit | 04f0123c43ab602880da3fd41c9f650882ac39b6 (patch) | |
tree | 3c9d289b3d10285dc9e164cdf6a8232f656d7036 | |
parent | 03a52b9c8725992408f0087294ab1bc5be9159e6 (diff) | |
parent | 5ece12d4ea9291f1063b9c7ec71fb9764537cfdb (diff) | |
download | qt-creator-04f0123c43ab602880da3fd41c9f650882ac39b6.tar.gz |
Merge remote-tracking branch 'origin/4.11'
Change-Id: Ie951c531a5b2efd8e6b972c4d04b7f1c681c8ef9
42 files changed, 199 insertions, 144 deletions
diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 172f2e6dcf..bdf9594e14 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,9 +1,9 @@ #BINARY_ARTIFACTS_BRANCH = master #PROJECT_USER_FILE_EXTENSION = .user -set(IDE_VERSION "4.10.83") # The IDE version. -set(IDE_VERSION_COMPAT "4.10.83") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.11.0-beta2") # The IDE display version. +set(IDE_VERSION "4.10.84") # The IDE version. +set(IDE_VERSION_COMPAT "4.10.84") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "4.11.0-rc1") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2019") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/doc/images/qtcreator-add-resource-wizard.png b/doc/images/qtcreator-add-resource-wizard.png Binary files differindex 921ef724bb..7f35d735c1 100644 --- a/doc/images/qtcreator-add-resource-wizard.png +++ b/doc/images/qtcreator-add-resource-wizard.png diff --git a/doc/images/qtcreator-add-resource-wizard2.png b/doc/images/qtcreator-add-resource-wizard2.png Binary files differindex 4bf2d9e54f..8efcf7c4a7 100644 --- a/doc/images/qtcreator-add-resource-wizard2.png +++ b/doc/images/qtcreator-add-resource-wizard2.png diff --git a/doc/images/qtcreator-add-resource-wizard3.png b/doc/images/qtcreator-add-resource-wizard3.png Binary files differindex 6aa138d996..9b4188e718 100644 --- a/doc/images/qtcreator-add-resource-wizard3.png +++ b/doc/images/qtcreator-add-resource-wizard3.png diff --git a/doc/images/qtcreator-add-resource.png b/doc/images/qtcreator-add-resource.png Binary files differindex fc5b3ce841..42da7b0173 100644 --- a/doc/images/qtcreator-add-resource.png +++ b/doc/images/qtcreator-add-resource.png diff --git a/doc/images/qtcreator-new-opengl-file.png b/doc/images/qtcreator-new-opengl-file.png Binary files differindex 0e35bf7e14..529474b1e0 100644 --- a/doc/images/qtcreator-new-opengl-file.png +++ b/doc/images/qtcreator-new-opengl-file.png diff --git a/doc/images/qtcreator-new-qt-quick-project-wizard.png b/doc/images/qtcreator-new-qt-quick-project-wizard.png Binary files differindex 0d8290bbdf..f7aade01e5 100644 --- a/doc/images/qtcreator-new-qt-quick-project-wizard.png +++ b/doc/images/qtcreator-new-qt-quick-project-wizard.png diff --git a/doc/src/projects/creator-only/creator-projects-creating.qdoc b/doc/src/projects/creator-only/creator-projects-creating.qdoc index 1bca73e551..456376f5ec 100644 --- a/doc/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/src/projects/creator-only/creator-projects-creating.qdoc @@ -395,14 +395,14 @@ \image qtcreator-add-resource.png "Editing resource files" - Select \uicontrol Add > \uicontrol {Add Files} to locate and add individual + Select \uicontrol {Add Files} to locate and add individual files. By default, resources are accessible in the application under the same file name as they have in the source tree, with a \c{:/} prefix, or by a URL with a \c qrc scheme. To specify a path prefix for all files in the \c .qrc file, - select \uicontrol Add > \uicontrol {Add Prefix} or enter the prefix in the - \uicontrol Prefix field. + select \uicontrol {Add Prefix} and enter the prefix in the \uicontrol Prefix + field. Some resources need to change based on the user's locale, such as translation files or icons. You can specify a locale in the diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 696ccf90c1..d41a98f562 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,16 +4,16 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.11.0-beta2' + property string qtcreator_display_version: '4.11.0-rc1' property string ide_version_major: '4' property string ide_version_minor: '10' - property string ide_version_release: '83' + property string ide_version_release: '84' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '4' property string ide_compat_version_minor: '10' - property string ide_compat_version_release: '83' + property string ide_compat_version_release: '84' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index ddd9fd42c7..8a9090c90b 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.10.83 -QTCREATOR_COMPAT_VERSION = 4.10.83 -QTCREATOR_DISPLAY_VERSION = 4.11.0-beta2 +QTCREATOR_VERSION = 4.10.84 +QTCREATOR_COMPAT_VERSION = 4.10.84 +QTCREATOR_DISPLAY_VERSION = 4.11.0-rc1 QTCREATOR_COPYRIGHT_YEAR = 2019 BINARY_ARTIFACTS_BRANCH = 4.11 diff --git a/src/app/app.pro b/src/app/app.pro index 8621a63f02..e76ba26b71 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -12,7 +12,9 @@ win32: VERSION= HEADERS += ../tools/qtcreatorcrashhandler/crashhandlersetup.h SOURCES += main.cpp ../tools/qtcreatorcrashhandler/crashhandlersetup.cpp +RPATH_BASE = $$IDE_BIN_PATH include(../rpath.pri) + include(../libs/qt-breakpad/qtbreakpad.pri) LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation) -l$$qtLibraryName(Utils) diff --git a/src/plugins/autotest/boost/boostcodeparser.cpp b/src/plugins/autotest/boost/boostcodeparser.cpp index c626285c22..d345242da3 100644 --- a/src/plugins/autotest/boost/boostcodeparser.cpp +++ b/src/plugins/autotest/boost/boostcodeparser.cpp @@ -98,31 +98,43 @@ void BoostCodeParser::handleIdentifier() if (identifier == "BOOST_AUTO_TEST_SUITE") { handleSuiteBegin(false); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_FIXTURE_TEST_SUITE") { handleSuiteBegin(true); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_AUTO_TEST_SUITE_END") { handleSuiteEnd(); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_TEST_CASE") { handleTestCase(TestCaseType::Functions); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_PARAM_TEST_CASE") { m_currentState.setFlag(BoostTestTreeItem::Parameterized); handleTestCase(TestCaseType::Parameter); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_AUTO_TEST_CASE") { handleTestCase(TestCaseType::Auto); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_FIXTURE_TEST_CASE") { + m_currentState.setFlag(BoostTestTreeItem::Fixture); handleTestCase(TestCaseType::Fixture); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_DATA_TEST_CASE") { handleTestCase(TestCaseType::Data); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_DATA_TEST_CASE_F") { m_currentState.setFlag(BoostTestTreeItem::Fixture); handleTestCase(TestCaseType::Data); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_AUTO_TEST_CASE_TEMPLATE") { m_currentState.setFlag(BoostTestTreeItem::Templated); handleTestCase(TestCaseType::Auto); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_FIXTURE_TEST_CASE_TEMPLATE") { m_currentState.setFlag(BoostTestTreeItem::Fixture); m_currentState.setFlag(BoostTestTreeItem::Templated); handleTestCase(TestCaseType::Auto); + m_currentState = BoostTestTreeItem::Enabled; } else if (identifier == "BOOST_TEST_DECORATOR") { handleDecorator(); } @@ -155,12 +167,10 @@ void BoostCodeParser::handleSuiteBegin(bool isFixture) if (skipCommentsUntil(T_RPAREN)) { // we have no decorators (or we have them before this macro) m_suites << BoostTestInfo{m_currentSuite, m_currentState, m_lineNo}; - m_currentState = BoostTestTreeItem::Enabled; } } else { handleDecorators(); m_suites << BoostTestInfo{m_currentSuite, m_currentState, m_lineNo}; - m_currentState = BoostTestTreeItem::Enabled; } } @@ -193,6 +203,7 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType) const QList<QByteArray> parts = content.split(','); if (parts.size() == 0) return; + token = m_tokens.at(m_currentIndex); locationAndType = locationAndTypeFromToken(token, m_source, m_currentState, m_suites); const QByteArray functionName = parts.first(); @@ -201,7 +212,6 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType) else locationAndType.m_name = QString::fromUtf8(functionName); m_testCases.append(locationAndType); - m_currentState = BoostTestTreeItem::Enabled; return; } } else if (m_currentState.testFlag(BoostTestTreeItem::Fixture)) { @@ -216,7 +226,6 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType) token = m_tokens.at(m_currentIndex); locationAndType = locationAndTypeFromToken(token, m_source, m_currentState, m_suites); m_testCases.append(locationAndType); - m_currentState = BoostTestTreeItem::Enabled; return; case TestCaseType::Auto: @@ -226,7 +235,6 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType) token = m_tokens.at(m_currentIndex); if (testCaseType == TestCaseType::Fixture) { // skip fixture class parameter - m_currentState |= BoostTestTreeItem::Fixture; if (!skipCommentsUntil(T_COMMA)) return; if (!skipCommentsUntil(T_IDENTIFIER)) @@ -240,14 +248,12 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType) if (skipCommentsUntil(T_RPAREN)) { locationAndType = locationAndTypeFromToken(token, m_source, m_currentState, m_suites); m_testCases.append(locationAndType); - m_currentState = BoostTestTreeItem::Enabled; } } else { if (!m_currentState.testFlag(BoostTestTreeItem::Templated)) handleDecorators(); locationAndType = locationAndTypeFromToken(token, m_source, m_currentState, m_suites); m_testCases.append(locationAndType); - m_currentState = BoostTestTreeItem::Enabled; } } diff --git a/src/plugins/compilationdatabaseprojectmanager/CMakeLists.txt b/src/plugins/compilationdatabaseprojectmanager/CMakeLists.txt index 163342854f..bf44d04616 100644 --- a/src/plugins/compilationdatabaseprojectmanager/CMakeLists.txt +++ b/src/plugins/compilationdatabaseprojectmanager/CMakeLists.txt @@ -5,12 +5,12 @@ add_qtc_plugin(CompilationDatabaseProjectManager compilationdatabaseconstants.h compilationdatabaseproject.cpp compilationdatabaseproject.h compilationdatabaseprojectmanagerplugin.cpp compilationdatabaseprojectmanagerplugin.h - compilationdatabasetests.qrc compilationdatabaseutils.cpp compilationdatabaseutils.h compilationdbparser.cpp compilationdbparser.h ) extend_qtc_plugin(CompilationDatabaseProjectManager CONDITION WITH_TESTS - SOURCES compilationdatabasetests.cpp compilationdatabasetests.h + SOURCES + compilationdatabasetests.cpp compilationdatabasetests.h compilationdatabasetests.qrc ) diff --git a/src/plugins/help/qlitehtml/litehtml b/src/plugins/help/qlitehtml/litehtml -Subproject 2979ffbf45a22e39d16f0ef125532509824b135 +Subproject 816730ff1f94201dc7ea8189c81ab9f404abc94 diff --git a/src/plugins/help/qlitehtml/qlitehtml.pri b/src/plugins/help/qlitehtml/qlitehtml.pri index 4cb780ff39..30da525b2c 100644 --- a/src/plugins/help/qlitehtml/qlitehtml.pri +++ b/src/plugins/help/qlitehtml/qlitehtml.pri @@ -1,6 +1,8 @@ exists($$PWD/litehtml/CMakeLists.txt) { LH_SRC = $$PWD/litehtml + LH_HDR = $$LH_SRC/include/litehtml GB_SRC = $$PWD/litehtml/src/gumbo + GB_HDR = $$GB_SRC/include/gumbo # gumbo SOURCES += \ @@ -17,24 +19,26 @@ exists($$PWD/litehtml/CMakeLists.txt) { $$GB_SRC/vector.c HEADERS += \ - $$GB_SRC/attribute.h \ - $$GB_SRC/char_ref.h \ - $$GB_SRC/error.h \ - $$GB_SRC/gumbo.h \ - $$GB_SRC/insertion_mode.h \ - $$GB_SRC/parser.h \ - $$GB_SRC/string_buffer.h \ - $$GB_SRC/string_piece.h \ - $$GB_SRC/tag_enum.h \ - $$GB_SRC/tag_gperf.h \ - $$GB_SRC/tag_sizes.h \ - $$GB_SRC/tag_strings.h \ - $$GB_SRC/token_type.h \ - $$GB_SRC/tokenizer.h \ - $$GB_SRC/tokenizer_states.h \ - $$GB_SRC/utf8.h \ - $$GB_SRC/util.h \ - $$GB_SRC/vector.h + $$GB_SRC/include//gumbo.h \ + $$GB_HDR/attribute.h \ + $$GB_HDR/char_ref.h \ + $$GB_HDR/error.h \ + $$GB_HDR/insertion_mode.h \ + $$GB_HDR/parser.h \ + $$GB_HDR/string_buffer.h \ + $$GB_HDR/string_piece.h \ + $$GB_HDR/tag_enum.h \ + $$GB_HDR/tag_gperf.h \ + $$GB_HDR/tag_sizes.h \ + $$GB_HDR/tag_strings.h \ + $$GB_HDR/token_type.h \ + $$GB_HDR/tokenizer.h \ + $$GB_HDR/tokenizer_states.h \ + $$GB_HDR/utf8.h \ + $$GB_HDR/util.h \ + $$GB_HDR/vector.h + + INCLUDEPATH *= $$GB_SRC/include $$GB_HDR win32 { HEADERS += \ @@ -83,51 +87,51 @@ exists($$PWD/litehtml/CMakeLists.txt) { HEADERS += \ $$LH_SRC/include/litehtml.h \ - $$LH_SRC/src/attributes.h \ - $$LH_SRC/src/background.h \ - $$LH_SRC/src/borders.h \ - $$LH_SRC/src/box.h \ - $$LH_SRC/src/context.h \ - $$LH_SRC/src/css_length.h \ - $$LH_SRC/src/css_margins.h \ - $$LH_SRC/src/css_offsets.h \ - $$LH_SRC/src/css_position.h \ - $$LH_SRC/src/css_selector.h \ - $$LH_SRC/src/document.h \ - $$LH_SRC/src/el_anchor.h \ - $$LH_SRC/src/el_base.h \ - $$LH_SRC/src/el_before_after.h \ - $$LH_SRC/src/el_body.h \ - $$LH_SRC/src/el_break.h \ - $$LH_SRC/src/el_cdata.h \ - $$LH_SRC/src/el_comment.h \ - $$LH_SRC/src/el_div.h \ - $$LH_SRC/src/el_font.h \ - $$LH_SRC/src/el_image.h \ - $$LH_SRC/src/el_link.h \ - $$LH_SRC/src/el_para.h \ - $$LH_SRC/src/el_script.h \ - $$LH_SRC/src/el_space.h \ - $$LH_SRC/src/el_style.h \ - $$LH_SRC/src/el_table.h \ - $$LH_SRC/src/el_td.h \ - $$LH_SRC/src/el_text.h \ - $$LH_SRC/src/el_title.h \ - $$LH_SRC/src/el_tr.h \ - $$LH_SRC/src/element.h \ - $$LH_SRC/src/html.h \ - $$LH_SRC/src/html_tag.h \ - $$LH_SRC/src/iterators.h \ - $$LH_SRC/src/media_query.h \ - $$LH_SRC/src/os_types.h \ - $$LH_SRC/src/style.h \ - $$LH_SRC/src/stylesheet.h \ - $$LH_SRC/src/table.h \ - $$LH_SRC/src/types.h \ - $$LH_SRC/src/utf8_strings.h \ - $$LH_SRC/src/web_color.h + $$LH_HDR/attributes.h \ + $$LH_HDR/background.h \ + $$LH_HDR/borders.h \ + $$LH_HDR/box.h \ + $$LH_HDR/context.h \ + $$LH_HDR/css_length.h \ + $$LH_HDR/css_margins.h \ + $$LH_HDR/css_offsets.h \ + $$LH_HDR/css_position.h \ + $$LH_HDR/css_selector.h \ + $$LH_HDR/document.h \ + $$LH_HDR/el_anchor.h \ + $$LH_HDR/el_base.h \ + $$LH_HDR/el_before_after.h \ + $$LH_HDR/el_body.h \ + $$LH_HDR/el_break.h \ + $$LH_HDR/el_cdata.h \ + $$LH_HDR/el_comment.h \ + $$LH_HDR/el_div.h \ + $$LH_HDR/el_font.h \ + $$LH_HDR/el_image.h \ + $$LH_HDR/el_link.h \ + $$LH_HDR/el_para.h \ + $$LH_HDR/el_script.h \ + $$LH_HDR/el_space.h \ + $$LH_HDR/el_style.h \ + $$LH_HDR/el_table.h \ + $$LH_HDR/el_td.h \ + $$LH_HDR/el_text.h \ + $$LH_HDR/el_title.h \ + $$LH_HDR/el_tr.h \ + $$LH_HDR/element.h \ + $$LH_HDR/html.h \ + $$LH_HDR/html_tag.h \ + $$LH_HDR/iterators.h \ + $$LH_HDR/media_query.h \ + $$LH_HDR/os_types.h \ + $$LH_HDR/style.h \ + $$LH_HDR/stylesheet.h \ + $$LH_HDR/table.h \ + $$LH_HDR/types.h \ + $$LH_HDR/utf8_strings.h \ + $$LH_HDR/web_color.h - INCLUDEPATH *= $$LH_SRC/include $$LH_SRC/src $$GB_SRC + INCLUDEPATH *= $$LH_SRC/include $$LH_HDR # litehtml without optimization is not fun QMAKE_CFLAGS_DEBUG += -O2 diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp index 91a77d6b7b..a88af2666a 100644 --- a/src/plugins/languageclient/languageclientcompletionassist.cpp +++ b/src/plugins/languageclient/languageclientcompletionassist.cpp @@ -143,7 +143,7 @@ QIcon LanguageClientCompletionItem::icon() const case CompletionItemKind::Method: case CompletionItemKind::Function: case CompletionItemKind::Constructor: icon = iconForType(FuncPublic); break; - case CompletionItemKind::Field: icon = iconForType(VarPublic); break; + case CompletionItemKind::Field: case CompletionItemKind::Variable: icon = iconForType(VarPublic); break; case CompletionItemKind::Class: icon = iconForType(Class); break; case CompletionItemKind::Module: icon = iconForType(Namespace); break; diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp index 22c43650ee..eeb64b406e 100644 --- a/src/plugins/languageclient/languageclientutils.cpp +++ b/src/plugins/languageclient/languageclientutils.cpp @@ -258,8 +258,8 @@ const QIcon symbolIcon(int type) if (!icons.contains(kind)) { switch (kind) { case SymbolKind::File: icons[kind] = Utils::Icons::NEWFILE.icon(); break; - case SymbolKind::Module: icons[kind] = iconForType(Namespace); break; - case SymbolKind::Namespace: icons[kind] = iconForType(Namespace); break; + case SymbolKind::Module: + case SymbolKind::Namespace: case SymbolKind::Package: icons[kind] = iconForType(Namespace); break; case SymbolKind::Class: icons[kind] = iconForType(Class); break; case SymbolKind::Method: icons[kind] = iconForType(FuncPublic); break; @@ -269,18 +269,18 @@ const QIcon symbolIcon(int type) case SymbolKind::Enum: icons[kind] = iconForType(Enum); break; case SymbolKind::Interface: icons[kind] = iconForType(Class); break; case SymbolKind::Function: icons[kind] = iconForType(FuncPublic); break; - case SymbolKind::Variable: icons[kind] = iconForType(VarPublic); break; - case SymbolKind::Constant: icons[kind] = iconForType(VarPublic); break; - case SymbolKind::String: icons[kind] = iconForType(VarPublic); break; - case SymbolKind::Number: icons[kind] = iconForType(VarPublic); break; - case SymbolKind::Boolean: icons[kind] = iconForType(VarPublic); break; + case SymbolKind::Variable: + case SymbolKind::Constant: + case SymbolKind::String: + case SymbolKind::Number: + case SymbolKind::Boolean: case SymbolKind::Array: icons[kind] = iconForType(VarPublic); break; case SymbolKind::Object: icons[kind] = iconForType(Class); break; - case SymbolKind::Key: icons[kind] = iconForType(Keyword); break; + case SymbolKind::Key: case SymbolKind::Null: icons[kind] = iconForType(Keyword); break; case SymbolKind::EnumMember: icons[kind] = iconForType(Enumerator); break; case SymbolKind::Struct: icons[kind] = iconForType(Struct); break; - case SymbolKind::Event: icons[kind] = iconForType(FuncPublic); break; + case SymbolKind::Event: case SymbolKind::Operator: icons[kind] = iconForType(FuncPublic); break; case SymbolKind::TypeParameter: icons[kind] = iconForType(VarPublic); break; } diff --git a/src/plugins/perfprofiler/perfprofilerplugin.cpp b/src/plugins/perfprofiler/perfprofilerplugin.cpp index e9440e6141..03d1de8eaf 100644 --- a/src/plugins/perfprofiler/perfprofilerplugin.cpp +++ b/src/plugins/perfprofiler/perfprofilerplugin.cpp @@ -32,7 +32,7 @@ #include "perftimelinemodelmanager.h" #if WITH_TESTS -# include "tests/perfprofilertracefile_test.h" +//# include "tests/perfprofilertracefile_test.h" // FIXME has to be rewritten # include "tests/perfresourcecounter_test.h" #endif // WITH_TESTS @@ -104,7 +104,7 @@ QVector<QObject *> PerfProfilerPlugin::createTestObjects() const { QVector<QObject *> tests; #if WITH_TESTS - tests << new PerfProfilerTraceFileTest; +// tests << new PerfProfilerTraceFileTest; // FIXME these tests have to get rewritten tests << new PerfResourceCounterTest; #endif // WITH_TESTS return tests; diff --git a/src/plugins/projectexplorer/fileinsessionfinder.cpp b/src/plugins/projectexplorer/fileinsessionfinder.cpp index 8d42c409ad..204fa0f9af 100644 --- a/src/plugins/projectexplorer/fileinsessionfinder.cpp +++ b/src/plugins/projectexplorer/fileinsessionfinder.cpp @@ -79,11 +79,12 @@ FilePathList FileInSessionFinder::doFindFile(const FilePath &filePath) return m_finder.findFile(QUrl::fromLocalFile(filePath.toString())); } +} // namespace Internal + FilePathList findFileInSession(const FilePath &filePath) { - static FileInSessionFinder finder; + static Internal::FileInSessionFinder finder; return finder.doFindFile(filePath); } -} // namespace Internal } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/fileinsessionfinder.h b/src/plugins/projectexplorer/fileinsessionfinder.h index f14b3708f3..307018a2fc 100644 --- a/src/plugins/projectexplorer/fileinsessionfinder.h +++ b/src/plugins/projectexplorer/fileinsessionfinder.h @@ -25,12 +25,13 @@ #pragma once +#include "projectexplorer_export.h" + #include <utils/fileutils.h> namespace ProjectExplorer { -namespace Internal { -Utils::FilePathList findFileInSession(const Utils::FilePath &filePath); +// Possibly used by "QtCreatorTerminalPlugin" +PROJECTEXPLORER_EXPORT Utils::FilePathList findFileInSession(const Utils::FilePath &filePath); -} // namespace Internal } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp index 2a323f0041..8b0b67a1eb 100644 --- a/src/plugins/projectexplorer/task.cpp +++ b/src/plugins/projectexplorer/task.cpp @@ -124,7 +124,7 @@ void Task::setFile(const Utils::FilePath &file_) { file = file_; if (!file.isEmpty() && !file.toFileInfo().isAbsolute()) { - Utils::FilePathList possiblePaths = Internal::findFileInSession(file); + Utils::FilePathList possiblePaths = findFileInSession(file); if (possiblePaths.length() == 1) file = possiblePaths.first(); else diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index acb7a50ddd..ab5f024765 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -530,7 +530,7 @@ QList<Interpreter> PythonSettings::detectPythonVenvs(const FilePath &path) void PythonSettings::saveSettings() { const QList<Interpreter> &interpreters = interpreterOptionsPage().interpreters(); - const QString &defaultId = interpreterOptionsPage().defaultInterpreter().id; + const QString defaultId = interpreterOptionsPage().defaultInterpreter().id; toSettings(Core::ICore::settings(), {interpreters, defaultId}); if (QTC_GUARD(settingsInstance)) emit settingsInstance->interpretersChanged(interpreters, defaultId); diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index aa7051b396..dced51518b 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -94,6 +94,11 @@ static QString pythonName(const FilePath &pythonPath) FilePath getPylsModulePath(CommandLine pylsCommand) { + static QMap<FilePath, FilePath> cache; + const FilePath &modulePath = cache.value(pylsCommand.executable()); + if (!modulePath.isEmpty()) + return modulePath; + pylsCommand.addArg("-h"); SynchronousProcess pythonProcess; pythonProcess.setEnvironment(pythonProcess.environment() + QStringList("PYTHONVERBOSE=x")); @@ -111,8 +116,11 @@ FilePath getPylsModulePath(CommandLine pylsCommand) const QString &output = response.allOutput(); for (auto regex : {regexCached, regexNotCached}) { QRegularExpressionMatch result = regex.match(output); - if (result.hasMatch()) - return FilePath::fromUserInput(result.captured(1)); + if (result.hasMatch()) { + const FilePath &modulePath = FilePath::fromUserInput(result.captured(1)); + cache[pylsCommand.executable()] = modulePath; + return modulePath; + } } return {}; } @@ -146,7 +154,7 @@ static PythonLanguageServerState checkPythonLanguageServer(const FilePath &pytho } } - return {PythonLanguageServerState::AlreadyInstalled, getPylsModulePath(pythonLShelpCommand)}; + return {PythonLanguageServerState::AlreadyInstalled, modulePath}; } const CommandLine pythonPipVersionCommand(python, {"-m", "pip", "-V"}); diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index a577abc3a2..3a2bc14207 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -457,8 +457,8 @@ QProcessEnvironment PuppetCreator::processEnvironment() const environment.set("QMLDESIGNER_RC_PATHS", m_qrcMapping); } - AbstractView *view = nullptr; #ifndef QMLDESIGNER_TEST + AbstractView *view = nullptr; view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView(); view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)}); diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 8300b28b27..a0270945ab 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1277,17 +1277,17 @@ void BaseQtVersionPrivate::updateVersionInfo() } } const QString qtInstallDocs = q->docsPath().toString(); - if (!qtInstallDocs.isNull()) { + if (!qtInstallDocs.isEmpty()) { if (QFileInfo::exists(qtInstallDocs)) m_data.hasDocumentation = true; } const QString qtInstallExamples = q->examplesPath().toString(); - if (!qtInstallExamples.isNull()) { + if (!qtInstallExamples.isEmpty()) { if (QFileInfo::exists(qtInstallExamples)) m_data.hasExamples = true; } const QString qtInstallDemos = q->demosPath().toString(); - if (!qtInstallDemos.isNull()) { + if (!qtInstallDemos.isEmpty()) { if (QFileInfo::exists(qtInstallDemos)) m_data.hasDemos = true; } diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 1a12d96882..09f9b88ff9 100644 --- a/src/plugins/texteditor/highlighter.cpp +++ b/src/plugins/texteditor/highlighter.cpp @@ -29,7 +29,9 @@ #include "textdocumentlayout.h" #include "tabsettings.h" #include "texteditorsettings.h" +#include "texteditor.h" +#include <coreplugin/editormanager/documentmodel.h> #include <coreplugin/icore.h> #include <coreplugin/messagemanager.h> #include <utils/mimetypes/mimedatabase.h> @@ -250,7 +252,7 @@ void Highlighter::addCustomHighlighterPath(const Utils::FilePath &path) highlightRepository()->addCustomSearchPath(path.toString()); } -void Highlighter::updateDefinitions(std::function<void()> callback) { +void Highlighter::downloadDefinitions(std::function<void()> callback) { auto downloader = new KSyntaxHighlighting::DefinitionDownloader(highlightRepository()); connect(downloader, &KSyntaxHighlighting::DefinitionDownloader::done, @@ -271,6 +273,17 @@ void Highlighter::updateDefinitions(std::function<void()> callback) { downloader->start(); } +void Highlighter::reload() +{ + highlightRepository()->reload(); + for (auto editor : Core::DocumentModel::editorsForOpenedDocuments()) { + if (auto textEditor = qobject_cast<BaseTextEditor *>(editor)) { + if (qobject_cast<Highlighter *>(textEditor->textDocument()->syntaxHighlighter())) + textEditor->editorWidget()->configureGenericHighlighter(); + } + } +} + void Highlighter::handleShutdown() { delete highlightRepository(); diff --git a/src/plugins/texteditor/highlighter.h b/src/plugins/texteditor/highlighter.h index e0ddc8132d..0a23009c23 100644 --- a/src/plugins/texteditor/highlighter.h +++ b/src/plugins/texteditor/highlighter.h @@ -58,7 +58,8 @@ public: static void clearDefintionForDocumentCache(); static void addCustomHighlighterPath(const Utils::FilePath &path); - static void updateDefinitions(std::function<void()> callback = nullptr); + static void downloadDefinitions(std::function<void()> callback = nullptr); + static void reload(); static void handleShutdown(); diff --git a/src/plugins/texteditor/highlightersettingspage.cpp b/src/plugins/texteditor/highlightersettingspage.cpp index 86a1a7fdbf..20cfa591ea 100644 --- a/src/plugins/texteditor/highlightersettingspage.cpp +++ b/src/plugins/texteditor/highlightersettingspage.cpp @@ -104,14 +104,17 @@ QWidget *HighlighterSettingsPage::widget() m_d->m_page->setupUi(m_d->m_widget); m_d->m_page->definitionFilesPath->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_d->m_page->definitionFilesPath->setHistoryCompleter(QLatin1String("TextEditor.Highlighter.History")); - connect(m_d->m_page->updateDefinitions, + connect(m_d->m_page->downloadDefinitions, &QPushButton::pressed, [label = QPointer<QLabel>(m_d->m_page->updateStatus)]() { - Highlighter::updateDefinitions([label](){ + Highlighter::downloadDefinitions([label](){ if (label) - label->setText(tr("Update finished")); + label->setText(tr("Download finished")); }); }); + connect(m_d->m_page->reloadDefinitions, &QPushButton::pressed, []() { + Highlighter::reload(); + }); connect(m_d->m_page->resetCache, &QPushButton::clicked, []() { Highlighter::clearDefintionForDocumentCache(); }); diff --git a/src/plugins/texteditor/highlightersettingspage.ui b/src/plugins/texteditor/highlightersettingspage.ui index 7b1e6c9e0d..5bd32a8a87 100644 --- a/src/plugins/texteditor/highlightersettingspage.ui +++ b/src/plugins/texteditor/highlightersettingspage.ui @@ -64,9 +64,12 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> - <widget class="QPushButton" name="updateDefinitions"> + <widget class="QPushButton" name="downloadDefinitions"> + <property name="toolTip"> + <string>Download missing and update existing syntax definition files.</string> + </property> <property name="text"> - <string>Update Definitions</string> + <string>Download Definitions</string> </property> </widget> </item> @@ -108,6 +111,16 @@ </item> </layout> </item> + <item> + <widget class="QPushButton" name="reloadDefinitions"> + <property name="toolTip"> + <string>Reload externally modified definition files.</string> + </property> + <property name="text"> + <string>Reload Definitions</string> + </property> + </widget> + </item> </layout> </item> <item> diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 1419b045c2..b03cef1de3 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -3100,11 +3100,11 @@ void TextEditorWidgetPrivate::updateSyntaxInfoBar(const Highlighter::Definitions && !TextEditorSettings::highlighterSettings().isIgnoredFilePattern(fileName)) { InfoBarEntry info(missing, BaseTextEditor::tr("A highlight definition was not found for this file. " - "Would you like to update highlight definition files?"), + "Would you like to download additional highlight definition files?"), InfoBarEntry::GlobalSuppression::Enabled); - info.setCustomButtonInfo(BaseTextEditor::tr("Update Definitions"), [missing, this]() { + info.setCustomButtonInfo(BaseTextEditor::tr("Download Definitions"), [missing, this]() { m_document->infoBar()->removeInfo(missing); - Highlighter::updateDefinitions([widget = QPointer<TextEditorWidget>(q)]() { + Highlighter::downloadDefinitions([widget = QPointer<TextEditorWidget>(q)]() { if (widget) widget->configureGenericHighlighter(); }); diff --git a/src/qtcreatorlibrary.pri b/src/qtcreatorlibrary.pri index a4165a794f..003b2b0a69 100644 --- a/src/qtcreatorlibrary.pri +++ b/src/qtcreatorlibrary.pri @@ -13,9 +13,11 @@ win32 { DESTDIR = $$IDE_LIBRARY_PATH osx { - QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/Frameworks/ + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ QMAKE_LFLAGS += -compatibility_version $$QTCREATOR_COMPAT_VERSION } + +RPATH_BASE = $$IDE_LIBRARY_PATH include(rpath.pri) TARGET = $$qtLibraryTargetName($$TARGET) diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri index a409ec19a5..806ed6f865 100644 --- a/src/qtcreatorplugin.pri +++ b/src/qtcreatorplugin.pri @@ -85,9 +85,11 @@ exists($$PLUGINJSON_IN) { } osx { - QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/ + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ QMAKE_LFLAGS += -compatibility_version $$QTCREATOR_COMPAT_VERSION } + +RPATH_BASE = $$IDE_PLUGIN_PATH include(rpath.pri) contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols diff --git a/src/qtcreatortool.pri b/src/qtcreatortool.pri index ac00786bbe..900f728b9d 100644 --- a/src/qtcreatortool.pri +++ b/src/qtcreatortool.pri @@ -6,14 +6,8 @@ CONFIG += console CONFIG -= app_bundle DESTDIR = $$IDE_LIBEXEC_PATH -REL_PATH_TO_LIBS = $$relative_path($$IDE_LIBRARY_PATH, $$IDE_LIBEXEC_PATH) -REL_PATH_TO_PLUGINS = $$relative_path($$IDE_PLUGIN_PATH, $$IDE_LIBEXEC_PATH) -osx { - QMAKE_LFLAGS += -Wl,-rpath,@executable_path/$$REL_PATH_TO_LIBS,-rpath,@executable_path/$$REL_PATH_TO_PLUGINS -} else { - QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_LIBS - QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_PLUGINS -} + +RPATH_BASE = $$IDE_LIBEXEC_PATH include(rpath.pri) target.path = $$INSTALL_LIBEXEC_PATH diff --git a/src/rpath.pri b/src/rpath.pri index 0d8911a4d9..ef0a6b773b 100644 --- a/src/rpath.pri +++ b/src/rpath.pri @@ -1,13 +1,19 @@ -macx { - QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../,-rpath,@executable_path/../ +# set RPATH_BASE to the IDE_..._PATH of the target + +isEmpty(RPATH_BASE): \ + error("You must set RPATH_BASE before including rpath.pri") + +REL_PATH_TO_LIBS = $$relative_path($$IDE_LIBRARY_PATH, $$RPATH_BASE) +REL_PATH_TO_PLUGINS = $$relative_path($$IDE_PLUGIN_PATH, $$RPATH_BASE) + +macos { + QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$$REL_PATH_TO_LIBS,-rpath,@loader_path/$$REL_PATH_TO_PLUGINS } else:linux-* { - #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR - # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var QMAKE_RPATHDIR += \$\$ORIGIN - QMAKE_RPATHDIR += \$\$ORIGIN/.. - QMAKE_RPATHDIR += \$\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator - IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") + QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_LIBS + QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_PLUGINS + IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\' QMAKE_RPATHDIR = } diff --git a/src/tools/cplusplus-shared/tool.pri b/src/tools/cplusplus-shared/tool.pri index 569d099e2f..dbd31739a3 100644 --- a/src/tools/cplusplus-shared/tool.pri +++ b/src/tools/cplusplus-shared/tool.pri @@ -1,6 +1,8 @@ QTC_LIB_DEPENDS += cplusplus include(../../../qtcreator.pri) + +RPATH_BASE = $$IDE_BIN_PATH include(../../rpath.pri) DESTDIR = $$IDE_BIN_PATH diff --git a/src/tools/iostool/iostool.pro b/src/tools/iostool/iostool.pro index 8ea9a78d6b..4ecd607ac2 100644 --- a/src/tools/iostool/iostool.pro +++ b/src/tools/iostool/iostool.pro @@ -19,6 +19,8 @@ include(../../../qtcreator.pri) # put into a subdir, so we can deploy a separate qt.conf for it DESTDIR = $$IDE_LIBEXEC_PATH/ios + +RPATH_BASE = $$DESTDIR include(../../rpath.pri) SOURCES += main.cpp \ diff --git a/src/tools/qml2puppet/qml2puppet/qml2puppet.pro b/src/tools/qml2puppet/qml2puppet/qml2puppet.pro index 9644cf4bca..403f8e24fb 100644 --- a/src/tools/qml2puppet/qml2puppet/qml2puppet.pro +++ b/src/tools/qml2puppet/qml2puppet/qml2puppet.pro @@ -7,6 +7,7 @@ include(../../../../qtcreator.pri) osx: DESTDIR = $$IDE_LIBEXEC_PATH/qmldesigner else: DESTDIR = $$IDE_LIBEXEC_PATH +RPATH_BASE = $$DESTDIR include(../../../rpath.pri) include(../../../../share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri) diff --git a/tests/auto/cplusplus/shared/shared.pri b/tests/auto/cplusplus/shared/shared.pri index 579608c266..c6f06df44f 100644 --- a/tests/auto/cplusplus/shared/shared.pri +++ b/tests/auto/cplusplus/shared/shared.pri @@ -1,5 +1,4 @@ QTC_PLUGIN_DEPENDS += cpptools include(../../qttest.pri) -include($$IDE_SOURCE_TREE/src/rpath.pri) DEFINES += Q_PLUGIN_PATH=\"\\\"$$IDE_PLUGIN_PATH\\\"\" diff --git a/tests/auto/debugger/dumpers.pro b/tests/auto/debugger/dumpers.pro index 0eec400a89..f0e4420d6a 100644 --- a/tests/auto/debugger/dumpers.pro +++ b/tests/auto/debugger/dumpers.pro @@ -30,9 +30,6 @@ msvc { DEBUGGERDIR = $$IDE_SOURCE_TREE/src/plugins/debugger DUMPERDIR = $$IDE_SOURCE_TREE/share/qtcreator/debugger -include($$IDE_SOURCE_TREE/src/rpath.pri) - - SOURCES += \ $$DEBUGGERDIR/debuggerprotocol.cpp \ $$DEBUGGERDIR/simplifytype.cpp \ diff --git a/tests/auto/qml/codemodel/importscheck/importscheck.pro b/tests/auto/qml/codemodel/importscheck/importscheck.pro index d5e9ba7781..03501d4ed9 100644 --- a/tests/auto/qml/codemodel/importscheck/importscheck.pro +++ b/tests/auto/qml/codemodel/importscheck/importscheck.pro @@ -1,6 +1,5 @@ QTC_LIB_DEPENDS += cplusplus utils extensionsystem include(../../../qttest.pri) -include($$IDE_SOURCE_TREE/src/rpath.pri) DEFINES += QMLJS_LIBRARY QT += qml xml diff --git a/tests/auto/qml/qrcparser/qrcparser.pro b/tests/auto/qml/qrcparser/qrcparser.pro index cb991a4e8f..d043d709f0 100644 --- a/tests/auto/qml/qrcparser/qrcparser.pro +++ b/tests/auto/qml/qrcparser/qrcparser.pro @@ -2,7 +2,6 @@ QTC_LIB_DEPENDS += utils include(../../qttest.pri) #DEFINES+=CPLUSPLUS_BUILD_STATIC_LIB -include($$IDE_SOURCE_TREE/src/rpath.pri) #DEFINES += Q_PLUGIN_PATH=\"\\\"$$IDE_PLUGIN_PATH\\\"\" diff --git a/tests/auto/qttestrpath.pri b/tests/auto/qttestrpath.pri index bd65a2f3ef..d69f084db0 100644 --- a/tests/auto/qttestrpath.pri +++ b/tests/auto/qttestrpath.pri @@ -1,11 +1,11 @@ linux-* { - QMAKE_RPATHDIR += $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator + QMAKE_RPATHDIR += $$IDE_LIBRARY_PATH QMAKE_RPATHDIR += $$IDE_PLUGIN_PATH IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\' } else:macx { - QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_BIN_PATH/../\" + QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_LIBRARY_PATH\",-rpath,\"$$IDE_PLUGIN_PATH\" } |