summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-02-27 09:41:05 +0100
committerEike Ziller <eike.ziller@qt.io>2020-02-27 09:41:05 +0100
commit0585ad0f64e26700f3436802c19ff3c0f663396e (patch)
tree0559ce940a0dacb874e5a46f6dcbbf9885c52f08
parent4672013595da7f534f7bd1e49817a48771917751 (diff)
parent56d2dab5feb4062c71fd4480f90bed0cae43bafb (diff)
downloadqt-creator-0585ad0f64e26700f3436802c19ff3c0f663396e.tar.gz
Merge remote-tracking branch 'origin/4.12'
Change-Id: I4523ea36332772a310fd462df55683c93c61bb18
-rw-r--r--cmake/CMakeLists.txt12
-rw-r--r--cmake/Findyaml-cpp.cmake5
-rw-r--r--cmake/QtCreatorAPI.cmake13
-rw-r--r--dist/changes-4.12.0.md16
-rw-r--r--doc/qtcreator/src/analyze/creator-cppcheck.qdoc4
-rw-r--r--doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc4
-rw-r--r--doc/qtcreator/src/editors/creator-clangformat.qdocinc6
-rw-r--r--doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc4
-rw-r--r--doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc6
-rw-r--r--doc/qtcreator/src/editors/creator-only/creator-compilation-database.qdocinc4
-rw-r--r--doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc7
-rw-r--r--doc/qtcreator/src/editors/creator-search.qdoc6
-rw-r--r--doc/qtcreator/src/howto/creator-help.qdoc8
-rw-r--r--doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc10
-rw-r--r--doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc6
-rw-r--r--doc/qtcreator/src/howto/creator-ui.qdoc7
-rw-r--r--doc/qtcreator/src/mcu/creator-mcu-dev.qdoc2
-rw-r--r--doc/qtcreator/src/projects/creator-only/creator-projects-autotools.qdoc5
-rw-r--r--doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc10
-rw-r--r--doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc6
-rw-r--r--doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc3
-rw-r--r--doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc4
-rw-r--r--doc/qtcreator/src/qtquick/creator-only/qtquick-app-development.qdoc4
-rw-r--r--doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc4
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-buttons.qdoc12
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-components.qdoc16
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-designer.qdoc10
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc6
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-navigator.qdoc6
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-pathview-editor.qdoc4
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-properties.qdoc16
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-states.qdoc24
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-timeline.qdoc5
-rw-r--r--doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc5
-rw-r--r--doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc10
-rw-r--r--doc/qtcreator/src/vcs/creator-vcs-git.qdoc4
-rw-r--r--doc/qtcreator/src/webassembly/creator-webassembly.qdoc4
-rw-r--r--doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc8
-rw-r--r--doc/qtdesignstudio/examples/doc/loginui1.qdoc4
-rw-r--r--doc/qtdesignstudio/examples/doc/loginui3.qdoc6
-rw-r--r--doc/qtdesignstudio/examples/doc/loginui4.qdoc8
-rw-r--r--doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc4
-rw-r--r--doc/qtdesignstudio/src/qtdesignstudio-prototyping.qdoc4
-rw-r--r--doc/src/projects/creator-only/creator-projects-nimble.qdoc83
-rwxr-xr-xscripts/build.py4
-rw-r--r--share/qtcreator/debugger/cdbbridge.py2
-rw-r--r--share/qtcreator/debugger/dumper.py15
-rw-r--r--share/qtcreator/debugger/gdbbridge.py2
-rw-r--r--share/qtcreator/debugger/lldbbridge.py20
-rw-r--r--share/qtcreator/debugger/misctypes.py12
-rw-r--r--share/qtcreator/debugger/qttypes.py12
-rw-r--r--share/qtcreator/debugger/stdtypes.py2
-rw-r--r--src/libs/advanceddockingsystem/dockoverlay.h14
-rw-r--r--src/libs/advanceddockingsystem/dockwidget.cpp110
-rw-r--r--src/libs/advanceddockingsystem/floatingdockcontainer.cpp6
-rw-r--r--src/libs/advanceddockingsystem/floatingdragpreview.cpp37
-rw-r--r--src/libs/utils/CMakeLists.txt13
-rw-r--r--src/plugins/android/androidtoolchain.cpp15
-rw-r--r--src/plugins/autotest/autotestplugin.cpp2
-rw-r--r--src/plugins/autotest/testrunconfiguration.h2
-rw-r--r--src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp5
-rw-r--r--src/plugins/clangtools/clangtool.cpp2
-rw-r--r--src/plugins/cppcheck/cppcheckplugin.cpp2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp2
-rw-r--r--src/plugins/git/branchview.cpp30
-rw-r--r--src/plugins/git/changeselectiondialog.cpp7
-rw-r--r--src/plugins/git/gerrit/branchcombobox.cpp5
-rw-r--r--src/plugins/git/gerrit/gerritmodel.cpp3
-rw-r--r--src/plugins/git/gerrit/gerritplugin.cpp20
-rw-r--r--src/plugins/git/gerrit/gerritpushdialog.cpp19
-rw-r--r--src/plugins/git/gerrit/gerritremotechooser.cpp3
-rw-r--r--src/plugins/git/gerrit/gerritserver.cpp4
-rw-r--r--src/plugins/git/gitclient.cpp88
-rw-r--r--src/plugins/git/gitclient.h4
-rw-r--r--src/plugins/git/giteditor.cpp67
-rw-r--r--src/plugins/git/giteditor.h2
-rw-r--r--src/plugins/git/gitgrep.cpp5
-rw-r--r--src/plugins/git/gitplugin.cpp4
-rw-r--r--src/plugins/git/gitsubmiteditor.cpp12
-rw-r--r--src/plugins/git/logchangedialog.cpp15
-rw-r--r--src/plugins/git/mergetool.cpp4
-rw-r--r--src/plugins/git/remotedialog.cpp4
-rw-r--r--src/plugins/git/remotemodel.cpp11
-rw-r--r--src/plugins/git/stashdialog.cpp21
-rw-r--r--src/plugins/languageclient/CMakeLists.txt2
-rw-r--r--src/plugins/languageclient/languageclientcompletionassist.cpp7
-rw-r--r--src/plugins/nim/project/nimrunconfiguration.cpp4
-rw-r--r--src/plugins/perfprofiler/perfprofilertool.cpp2
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp4
-rw-r--r--src/plugins/projectexplorer/buildmanager.h3
-rw-r--r--src/plugins/projectexplorer/buildsystem.cpp2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp1
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp26
-rw-r--r--src/plugins/projectexplorer/projectexplorer.h4
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp16
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h5
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp1
-rw-r--r--src/plugins/projectexplorer/taskwindow.h1
-rw-r--r--src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp2
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/gradientpresetdefaultlistmodel.cpp2
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h8
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.cpp23
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp2
-rw-r--r--src/plugins/valgrind/memchecktool.cpp2
-rw-r--r--src/plugins/vcsbase/vcscommand.cpp1
-rw-r--r--tests/system/objects.map1
-rw-r--r--tests/system/suite_CSUP/tst_CSUP06/test.py4
110 files changed, 542 insertions, 589 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 47c8c696f0..a005ce71e8 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -41,6 +41,18 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
${exclusion_mask}
)
+ # QtCreator's "System Information..." needs qtdiag
+ set(qtdiag_destination ${IDE_BIN_PATH})
+ if (NOT APPLE AND NOT WIN32)
+ set(qtdiag_destination ${IDE_LIBRARY_BASE_PATH}/Qt/bin)
+ endif()
+ install(PROGRAMS
+ "${QT_BASE_DIR}/bin/qtdiag${CMAKE_EXECUTABLE_SUFFIX}"
+ DESTINATION ${qtdiag_destination}
+ COMPONENT Dependencies
+ EXCLUDE_FROM_ALL
+ )
+
# Analyze the binaries and install missing dependencies if they are
# found the CMAKE_PREFIX_PATH e.g. Qt, Clang
configure_file(InstallDependentSharedObjects.cmake.in InstallDependentSharedObjects.cmake @ONLY)
diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake
index bcdcfd104b..3d5828ebd8 100644
--- a/cmake/Findyaml-cpp.cmake
+++ b/cmake/Findyaml-cpp.cmake
@@ -10,6 +10,11 @@ find_package(yaml-cpp 0.5 QUIET NO_MODULE)
if (yaml-cpp_FOUND)
# target doesn't set include directory for some reason
get_filename_component(yaml_cpp_include_dir ${YAML_CPP_INCLUDE_DIR} ABSOLUTE)
+ if (NOT EXISTS yaml_cpp_include_dir)
+ unset(yaml_cpp_include_dir)
+ unset(yaml_cpp_include_dir CACHE)
+ find_path(yaml_cpp_include_dir yaml-cpp/yaml.h)
+ endif()
target_include_directories(yaml-cpp INTERFACE ${yaml_cpp_include_dir})
else()
set(yaml-cpp_FOUND 1)
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index bbfb0a214b..751f2d4f6f 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -1044,7 +1044,18 @@ function(add_qtc_executable name)
\"Prefix=\${qt_conf_binaries}\n\"
)
endif()
-
+ if (WIN32 OR APPLE)
+ file(RELATIVE_PATH qt_binaries
+ \"\${install_prefix}/\${base_dir}\"
+ \"\${install_prefix}/${IDE_BIN_PATH}\"
+ )
+ if (NOT qt_binaries)
+ set(qt_binaries .)
+ endif()
+ file(APPEND \"\${CMAKE_INSTALL_PREFIX}/\${location}/qt.conf\"
+ \"# Needed by QtCreator for qtdiag\n\"
+ \"Binaries=\${qt_binaries}\n\")
+ endif()
endfunction()
if(APPLE)
create_qt_conf(\"${_EXECUTABLE_PATH}\" \"${IDE_DATA_PATH}/..\")
diff --git a/dist/changes-4.12.0.md b/dist/changes-4.12.0.md
index 3ff61f1289..ccdca28185 100644
--- a/dist/changes-4.12.0.md
+++ b/dist/changes-4.12.0.md
@@ -35,15 +35,16 @@ Editing
* Added `Go to Last Edit`
* Added option for default line terminator style (QTCREATORBUG-3590)
-* Improved performance of syntax highlighting (QTCREATORBUG-23281)
* Fixed that wizards ignored default file encoding
* Fixed that only restricted number of sizes were allowed for font size (QTCREATORBUG-22536)
+* Fixed completion after undo (QTCREATORBUG-15038)
### Language Client
* Added support for Markdown in tooltips
* Added support for auto-formatting
* Added outline dropdown (QTCREATORBUG-21916)
+* Improved protocol error reporting
* Fixed `Ctrl-click` for `Follow Symbol Under Cursor` (QTCREATORBUG-21848)
### QML
@@ -93,6 +94,7 @@ Projects
* Added automatic registration of CMake documentation, if available (QTCREATORBUG-21338)
* Fixed issues with `snap` on Ubuntu Linux (QTCREATORBUG-23376)
* Fixed handling of `Enable QML` in debugger settings (QTCREATORBUG-23541)
+* Fixed unneeded reparsing of files
### Qbs
@@ -122,6 +124,8 @@ Debugging
---------
* Added option to hide columns from views (QTCREATORBUG-23342)
+* Added option for `init` and `reset` GDB commands when attaching to remote server
+* Fixed pretty printer for `std::optional` (QTCREATORBUG-22436)
Analyzer
--------
@@ -149,6 +153,7 @@ Qt Quick Designer
-----------------
* Added locking and pinning of animation curves (QDS-550, QDS-551)
+* Added support for annotations (QDS-39)
* Fixed dragging of keyframes in curve editor (QDS-1405)
Version Control Systems
@@ -159,6 +164,8 @@ Version Control Systems
* Added option to create branch when trying to push to a non-existing branch (QTCREATORBUG-21154)
* Added option to start interactive rebase from log view (QTCREATORBUG-11200)
* Added information about upstream status to `Git Branches` view
+* Added option to `grep` and `pickaxe` git log (QTCREATORBUG-22512)
+* Made references in VCS output view clickable (QTCREATORBUG-16477)
Test Integration
----------------
@@ -184,8 +191,15 @@ Platforms
* Added auto-detection of Java JDK (QTCREATORBUG-23407)
* Added option to automatically download and install required Android tools (QTCREATORBUG-23285)
+* Added automatic selection of correct NDK for Qt version (QTCREATORBUG-23583)
+* Added support for Android 11 with API level 30
+* Improved examples browser to only show items tagged with `android` (QTBUG-80716)
* Fixed several issues with AVD manager (QTCREATORBUG-23284, QTCREATORBUG-23448)
+### iOS
+
+* Improved examples browser to only show items tagged with `ios`
+
### Remote Linux
* Added option to use custom command for install step (QTCREATORBUG-23320)
diff --git a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc
index f973252c9a..b19ce71802 100644
--- a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc
+++ b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -44,7 +44,7 @@
\li Select \uicontrol Help > \uicontrol {About Plugins} >
\uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
plugin.
- \li Restart \QC to load the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
> \uicontrol Cppcheck to specify settings for running Cppcheck.
\image qtcreator-cppcheck-options.png "Cppcheck options"
diff --git a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc
index 594ad80ae5..3982a01204 100644
--- a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc
+++ b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -49,7 +49,7 @@
\uicontrol {Device Support} > \uicontrol {Bare Metal} to enable the
Bare Metal Device plugin.
- \li Restart \QC to be able to use the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices >
\uicontrol {Bare Metal} > \uicontrol Add > \uicontrol Default,
diff --git a/doc/qtcreator/src/editors/creator-clangformat.qdocinc b/doc/qtcreator/src/editors/creator-clangformat.qdocinc
index 705f4067bb..9b7ef41d0a 100644
--- a/doc/qtcreator/src/editors/creator-clangformat.qdocinc
+++ b/doc/qtcreator/src/editors/creator-clangformat.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -33,8 +33,8 @@
library for automatic formatting and indentation.
To enable the plugin, select \uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {C++} > \uicontrol {ClangFormat}. Then restart \QC to load the
- plugin.
+ \uicontrol {C++} > \uicontrol {ClangFormat}. Then select
+ \uicontrol {Restart Now} to restart \QC and load the plugin.
\note If you enable the plugin, do not use the \l{Beautifying Source Code}
{Beautifier}, because combining the two can provide unexpected results.
diff --git a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc
index 7c2c87879d..e945cea424 100644
--- a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc
+++ b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -74,7 +74,7 @@
\li Select \uicontrol Help > \uicontrol {About Plugins} > \uicontrol {C++} >
\uicontrol Beautifier to enable the plugin.
- \li Restart \QC to be able to use the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol Tools > \uicontrol Options >
\uicontrol Beautifier to specify settings for beautifying files.
diff --git a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc
index fe582d342d..1b7b36baf8 100644
--- a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc
+++ b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -105,8 +105,8 @@
To use the built-in code model instead, select \uicontrol Help >
\uicontrol {About Plugins} > \uicontrol C++, and deselect the
- \uicontrol ClangCodeModel check box. The changes take effect after
- you restart \QC.
+ \uicontrol ClangCodeModel check box. Select \uicontrol {Restart Now}
+ to restart \QC and have the changes take effect.
You can configure Clang diagnostics either globally or separately for:
diff --git a/doc/qtcreator/src/editors/creator-only/creator-compilation-database.qdocinc b/doc/qtcreator/src/editors/creator-only/creator-compilation-database.qdocinc
index b12b59dd70..2034951d43 100644
--- a/doc/qtcreator/src/editors/creator-only/creator-compilation-database.qdocinc
+++ b/doc/qtcreator/src/editors/creator-only/creator-compilation-database.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -56,7 +56,7 @@
To enable the plugin, select \uicontrol Help > \uicontrol {About Plugins} >
\uicontrol {Build Systems} > \uicontrol {Compilation Database Project Manager}.
- Then restart \QC to load the plugin.
+ Then select \uicontrol {Restart Now} to restart \QC and load the plugin.
//! [using compilation databases]
*/
diff --git a/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc b/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc
index 8cc6534829..403eeb5278 100644
--- a/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc
+++ b/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -107,8 +107,9 @@
\list 1
\li Select \uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol Modeling > \uicontrol ScxmlEditor and restart \QC to
- enable the plugin.
+ \uicontrol Modeling > \uicontrol ScxmlEditor.
+
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Files and Classes} > \uicontrol Modeling >
diff --git a/doc/qtcreator/src/editors/creator-search.qdoc b/doc/qtcreator/src/editors/creator-search.qdoc
index 877d3b7492..a480b79c95 100644
--- a/doc/qtcreator/src/editors/creator-search.qdoc
+++ b/doc/qtcreator/src/editors/creator-search.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -245,7 +245,7 @@
\uicontrol {Utilities} > \uicontrol {SilverSearcher} to enable the
plugin.
- \li Restart \QC to be able to use the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li When searching, select \uicontrol {Silver Searcher} in the
\uicontrol {Search engine} field.
@@ -267,7 +267,7 @@
\li Select \uicontrol Help > \uicontrol {About Plugins} > \uicontrol C++
> \uicontrol {ClangRefactoring} to enable the plugin.
- \li Restart \QC to be able to use the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li When searching, select \uicontrol {Clang Query Project} in the
\uicontrol {Scope} field.
diff --git a/doc/qtcreator/src/howto/creator-help.qdoc b/doc/qtcreator/src/howto/creator-help.qdoc
index 7d8e7908bc..bdfca10777 100644
--- a/doc/qtcreator/src/howto/creator-help.qdoc
+++ b/doc/qtcreator/src/howto/creator-help.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -51,7 +51,7 @@
\li To display the full help on a Qt class or function, press \key F1 or
select \uicontrol {Context Help} in the context menu.
The documentation is displayed in a
- pane next to the code editor, or, if there is not enough vertical
+ view next to the code editor, or, if there is not enough vertical
space, in the fullscreen \uicontrol Help mode.
\li To select and configure how the documentation is displayed in the
@@ -215,7 +215,7 @@
You can select the page to display when you open the \uicontrol Help mode in the
\uicontrol Tools > \uicontrol Options > \uicontrol Help > \uicontrol General
> \uicontrol {On help start} field.
- To display the page and help panes that were open when you exited the mode,
+ To display the page and help views that were open when you exited the mode,
select the \uicontrol {Show My Tabs from Last Session} option. However, Web pages
are not opened, because loading them would slow down opening the \uicontrol Help
mode.
@@ -232,7 +232,7 @@
You can filter the documents displayed in the \uicontrol Help mode to find
relevant information faster. Select a filter from a list of filters (1). The
contents of the \uicontrol Index and \uicontrol Contents
- pane in the sidebar change accordingly.
+ view in the sidebar change accordingly.
\image qtcreator-help-filters.png "Help filters"
diff --git a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc
index 6fc434fdd7..59048bf5ee 100644
--- a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc
+++ b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -239,14 +239,14 @@
Where the number is the number of the output pane.
\if defined(qtcreator)
\row
- \li Activate \uicontrol Bookmarks pane
+ \li Activate \uicontrol Bookmarks view
\li Alt+M
\endif
\row
- \li Activate \uicontrol{File System} pane
+ \li Activate \uicontrol{File System} view
\li Alt+Y
\row
- \li Activate \uicontrol{Open Documents} pane
+ \li Activate \uicontrol{Open Documents} view
\li Alt+O
\row
\li Maximize output panes
@@ -258,7 +258,7 @@
\li Move to previous item in output panes
\li Shift+F6
\row
- \li Activate \uicontrol Projects pane
+ \li Activate \uicontrol Projects view
\li Alt+X
\row
\li Full screen
diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
index 87bd22d00d..5690fe6201 100644
--- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
+++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -67,8 +67,8 @@
\QC has been localized into several languages. If the system
language is one of the supported languages, it is automatically selected.
To change the language, select \uicontrol {Tools > Options > Environment} and
- select a language in the \uicontrol Language field. The change takes effect after
- you restart \QC.
+ select a language in the \uicontrol Language field. Select
+ \uicontrol {Restart Now} to restart \QC and have the change take effect.
\b {Has a reported issue been addressed?}
diff --git a/doc/qtcreator/src/howto/creator-ui.qdoc b/doc/qtcreator/src/howto/creator-ui.qdoc
index 787633e5ec..d6e814a07d 100644
--- a/doc/qtcreator/src/howto/creator-ui.qdoc
+++ b/doc/qtcreator/src/howto/creator-ui.qdoc
@@ -118,7 +118,8 @@
is one of the supported languages, it is automatically selected. To
change the language, select \uicontrol Tools > \uicontrol Options >
\uicontrol Environment and select a language in the \uicontrol Language
- field. The change takes effect after you restart \QC.
+ field. Select \uicontrol {Restart Now} to restart \QC and have the change
+ take effect.
\section1 Viewing Images
@@ -612,8 +613,8 @@
The Todo plugin is disabled by default. To enable the plugin, select
\uicontrol Help > \uicontrol {About Plugins} > \uicontrol Utilities >
- \uicontrol Todo and restart
- \QC.
+ \uicontrol Todo. Then select \uicontrol {Restart Now} to restart \QC
+ and load the plugin.
In addition, you can open task list files generated by code scanning and
analysis tools in the \uicontrol Issues pane. For more information, see
diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc
index 33aea4fc41..3290df28ef 100644
--- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc
+++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc
@@ -103,7 +103,7 @@
\uicontrol {Device Support} > \uicontrol {Bare Metal} and
\uicontrol {MCU Support} to enable the Bare Metal and MCU
plugins.
- \li Restart \QC to be able to use the plugins.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugins.
\li Create connections for debugging on the MCU board, as described in
\l{Connecting Bare Metal Devices}.
\endlist
diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-autotools.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-autotools.qdoc
index 4594179afc..9dc854433b 100644
--- a/doc/qtcreator/src/projects/creator-only/creator-projects-autotools.qdoc
+++ b/doc/qtcreator/src/projects/creator-only/creator-projects-autotools.qdoc
@@ -36,9 +36,8 @@
The AutotoolsProjectManager is a plugin for autotools support. It is
disabled by default. To enable the plugin, select \uicontrol Help >
\uicontrol {About Plugins} > \uicontrol {Build Systems} >
- \uicontrol AutotoolsProjectManager.
-
- To use the plugin, restart \QC.
+ \uicontrol AutotoolsProjectManager.Then select \uicontrol {Restart Now}
+ to restart \QC and load the plugin.
To work with your Autotools project in \QC:
diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc
index d84cfd537f..2b24929370 100644
--- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc
+++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc
@@ -434,16 +434,16 @@
\image qtcreator-new-opengl-file.png "New OpenGL file wizard"
- \section2 Displaying Additional File Types in Projects Pane
+ \section2 Displaying Additional File Types in Projects View
\QC determines whether to display files from the project folder
- in the \uicontrol Projects pane depending on the file type (.pro, .pri, .cpp,
+ in the \uicontrol Projects view depending on the file type (.pro, .pri, .cpp,
.h, .qrc, and so on). To display other types of files, edit the
project file. Add filenames as values of the \c {DISTFILES} variable.
You can also use wildcards.
For example, the following code specifies that text files are displayed
- in the \uicontrol Projects pane:
+ in the \uicontrol Projects view:
\code
@@ -478,7 +478,7 @@
{SUBDIRS variable}. It also adds all the necessary files for the subproject.
To create more subprojects, right-click the project name in the
- \uicontrol Projects pane to open the context menu, and select
+ \uicontrol Projects view to open the context menu, and select
\uicontrol {New Subproject}. Follow the steps in the
\uicontrol {New Subproject} wizard to create a subproject.
@@ -489,7 +489,7 @@
In the file browser dialog, locate your subproject.
To remove subprojects, right-click the project name in the \uicontrol Projects
- pane, and select \uicontrol {Remove Subproject} in the context menu.
+ view, and select \uicontrol {Remove Subproject} in the context menu.
To specify dependencies, use the \uicontrol{Add Library} wizard. For more
information, see \l{Adding Libraries to Projects}.
diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc
index a29ea16293..ff99faefaa 100644
--- a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc
+++ b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -88,7 +88,7 @@
\list 1
- \li In the \uicontrol Projects pane, right-click the project name to open the
+ \li In the \uicontrol Projects view, right-click the project name to open the
context menu and select
\uicontrol {Add Library}.
@@ -122,7 +122,7 @@
\uicontrol {Project Management} dialog. In the \uicontrol {Add to project}
list, select a project. For example, \b myapp.
- \li In the \uicontrol Projects pane, right-click the project name to open the
+ \li In the \uicontrol Projects view, right-click the project name to open the
context menu and select
\uicontrol {Add Library > Internal Library > Next}.
diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc
index a517d63383..100edd0937 100644
--- a/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc
+++ b/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc
@@ -38,7 +38,8 @@
To use \QC for Nim development, you need to enable the experimental
Nim plugin. Select \uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {Other Languages} > \uicontrol Nim, and then restart \QC.
+ \uicontrol {Other Languages} > \uicontrol Nim. Then select
+ \uicontrol {Restart Now} to restart \QC and load the plugin.
In addition, you have to download and install Nim and set up a Nim kit
in \QC.
diff --git a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc
index 7165df0c4c..7769b7501c 100644
--- a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc
+++ b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -109,7 +109,7 @@
\li In \uicontrol Library > \uicontrol Assets, select Bluebubble.svg
and drag and drop it to \e mainWindow in the navigator.
- \li In the \uicontrol Properties pane, \uicontrol Id field, enter
+ \li In the \uicontrol Properties view, \uicontrol Id field, enter
\e bubble to be able to reference the image from other places.
\li Select the \inlineimage export_unchecked.png
diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-development.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-development.qdoc
index 2fa9e55fb7..a7938078ab 100644
--- a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-development.qdoc
+++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-development.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -98,7 +98,7 @@
properties. Some properties, such as position, size, and visibility,
are common to all QML types, whereas others are specific to the QML
type. You can specify properties for your components in the
- \uicontrol Properties pane.
+ \uicontrol Properties view.
\li \l {Creating Animations}
diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc b/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc
index 6614ade1f3..ccbc236229 100644
--- a/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc
+++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -32,7 +32,7 @@
the state machine in the \uicontrol Backends tab in the Design mode, as
described in \l {Managing C++ Backend Objects}.
- In the \uicontrol States pane, you can edit the \c when condition of states
+ In the \uicontrol States view, you can edit the \c when condition of states
to map QML states to the states of the SCXML state machine. For an example,
see \l {Qt SCXML Traffic Light QML Example (Dynamic)}.
diff --git a/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc b/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc
index 104605a7b8..68e2aaadb8 100644
--- a/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -58,14 +58,14 @@
\li In the \uicontrol Navigator, select \uicontrol Item and set the
width (\uicontrol W) and height (\uicontrol H) of the button in the
- \uicontrol Properties pane.
+ \uicontrol Properties view.
\li Drag and drop a \uicontrol Rectangle from the \uicontrol Library to
the item in the navigator. This creates a nested item where the
item is the parent of the rectangle. Items are positioned relative
to their parents.
- \li In the \uicontrol Properties pane, modify the appearance of the
+ \li In the \uicontrol Properties view, modify the appearance of the
rectangle:
\list a
@@ -85,7 +85,7 @@
\li Drag and drop a \uicontrol {Text} type to the item in the navigator.
- \li In the \uicontrol Properties pane, edit the properties of the \uicontrol Text
+ \li In the \uicontrol Properties view, edit the properties of the \uicontrol Text
type.
\list a
@@ -167,7 +167,7 @@
\li In the \uicontrol Navigator, select \uicontrol Item and set the
width (\uicontrol W) and height (\uicontrol H) of the button in the
- \uicontrol Properties pane.
+ \uicontrol Properties view.
\li Select \uicontrol Connections > \uicontrol {Properties} >
\uicontrol Add to add properties for the item:
@@ -193,7 +193,7 @@
navigator.
\li In the navigator, select a border image to specify settings for it
- in the \uicontrol Properties pane:
+ in the \uicontrol Properties view:
\list a
diff --git a/doc/qtcreator/src/qtquick/qtquick-components.qdoc b/doc/qtcreator/src/qtquick/qtquick-components.qdoc
index fac448c820..f2e3f922a1 100644
--- a/doc/qtcreator/src/qtquick/qtquick-components.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-components.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -47,7 +47,7 @@
is generally defined in its own QML file. You can import components to
applications.
- The \uicontrol {Library} pane lists the available QML types, UI
+ The \uicontrol {Library} view lists the available QML types, UI
components, assets, and QML imports.
\image qmldesigner-qml-components.png "QML Components"
@@ -77,13 +77,13 @@
\li Drag and drop components from the \uicontrol Library (2) to the
\uicontrol Navigator (3) or \uicontrol {Form Editor} (1).
\li Select components in the \uicontrol Navigator to edit their
- properties in the \uicontrol Properties pane (4). For more
+ properties in the \uicontrol Properties view (4). For more
information, see \l {Specifying Item Properties}.
\li Connect components to signals or create bindings between components
- in the \uicontrol Connections pane (5). For more information, see
+ in the \uicontrol Connections view (5). For more information, see
\l{Adding Connections}.
\li Add states to apply sets of changes to the properties of one or
- several components in the \uicontrol States pane (6). For more
+ several components in the \uicontrol States view (6). For more
information, see \l{Adding States}.
\endlist
@@ -135,7 +135,7 @@
When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or
\l{PathView}{Path View}, the ListModel and the delegate component that
creates an instance for each item in the model are added automatically.
- You can edit item properties in the \uicontrol Properties pane or
+ You can edit item properties in the \uicontrol Properties view or
in the \uicontrol {Text Editor}. You can also replace the default model and
delegate with other, more complex models and delegates in the
\uicontrol {Text Editor}. \l{ItemDelegate}{Item Delegate} and
@@ -212,7 +212,7 @@
invisible \e anchor lines: top, bottom, left, right, fill, horizontal
center, vertical center, and baseline.
- In the \uicontrol Layout pane you can set anchors and margins for items. To
+ In the \uicontrol Layout tab you can set anchors and margins for items. To
set the anchors of an item, click the anchor buttons. You can combine the
top/bottom, left/right, and horizontal/vertical anchors to anchor items in
the corners of the parent item or center them horizontally or vertically
@@ -558,7 +558,7 @@
\li Drag and drop a QML type from the \uicontrol Library to the
\uicontrol Navigator or \uicontrol {Form Editor}.
- \li Edit its properties in the \uicontrol Properties pane.
+ \li Edit its properties in the \uicontrol Properties view.
The available properties depend on the QML type.
diff --git a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc
index c1d2cb3fa1..6666f421dd 100644
--- a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -102,13 +102,13 @@
\endlist
- \li \uicontrol {States} pane (6) displays the different states of the item.
+ \li \uicontrol {States} view (6) displays the different states of the item.
QML states typically describe user interface configurations, such as
the UI controls, their properties and behavior and the available
actions. For more information, see \l{Adding States}.
\if defined(qtdesignstudio)
- \li \uicontrol Timeline pane (7) provides a timeline and keyframe based
+ \li \uicontrol Timeline view (7) provides a timeline and keyframe based
editor that enables you to animate the properties of UI components.
\endif
@@ -165,9 +165,9 @@
To experiment with different component sizes, enter values in the
\uicontrol {Override Width} and \uicontrol {Override Height} fields (1) on
the canvas toolbar. The changes are displayed on the canvas (2)
- and in the \uicontrol States pane (3), but the property
+ and in the \uicontrol States view (3), but the property
values are not changed permanently in the QML file. You can permanently
- change the property values in the \uicontrol Properties pane (4).
+ change the property values in the \uicontrol Properties view (4).
\image qmldesigner-preview-size.png "Canvas width and height"
diff --git a/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc b/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc
index 73df38d295..b02dc93b18 100644
--- a/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc
@@ -114,6 +114,12 @@
\quotefile progressbar/main.cpp
+ \section1 Adding Custom Fonts
+
+ To \l{Using Custom Fonts}{use custom fonts} from the Qt Quick UI project,
+ call the QFontDatabase::addApplicationFont() function from the \e {main.cpp}
+ file.
+
\section1 Adding Qt Quick Timeline Module to Qt Installations
\note You only need to do this if your Qt version is older than 5.14.
diff --git a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc
index db8921630c..5ae3344d4f 100644
--- a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -38,7 +38,7 @@
\image qmldesigner-navigator.png "Navigator"
You can select items in the \uicontrol Navigator to edit their properties
- in the \uicontrol Properties pane. Items can access the properties of their
+ in the \uicontrol Properties view. Items can access the properties of their
parent item. To select items on the canvas, right-click an item, and select
another type in the context menu.
@@ -55,7 +55,7 @@
To show and hide items on the canvas when focusing on specific parts of the
application, click \inlineimage eye_open.png
. To change the visibility of an item in the application code, select the
- \uicontrol Visibility check box in the \uicontrol Properties pane or select
+ \uicontrol Visibility check box in the \uicontrol Properties view or select
\uicontrol Edit > \uicontrol Visibility in the context menu.
You can also set the \uicontrol Opacity field to 0 to hide items that you
diff --git a/doc/qtcreator/src/qtquick/qtquick-pathview-editor.qdoc b/doc/qtcreator/src/qtquick/qtquick-pathview-editor.qdoc
index 41b5bb02e9..489a84da25 100644
--- a/doc/qtcreator/src/qtquick/qtquick-pathview-editor.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-pathview-editor.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -59,7 +59,7 @@
To add intermediary points to a curve segment, select \uicontrol {Split Segment}
in the context menu.
- In the \uicontrol Properties pane, you can specify other properties for
+ In the \uicontrol Properties view, you can specify other properties for
the path view. For example, what is the maximum distance from the path that
initiates mouse dragging and what is the rate at which a flick will
decelerate.
diff --git a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc
index e0995815f1..3f6ef08d6a 100644
--- a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -35,19 +35,19 @@
\title Specifying Item Properties
- The \uicontrol Properties pane displays all the properties of the selected
- item. The properties are grouped by type. The top part of the pane displays
+ The \uicontrol Properties view displays all the properties of the selected
+ item. The properties are grouped by type. The top part of the view displays
properties that are common to all QML types, such as position, size, and
visibility.
- The bottom part of the pane displays properties that are specific to each
+ The bottom part of the view displays properties that are specific to each
QML type. For example, the following image displays the properties you can
set for \uicontrol Rectangle (1) and \uicontrol Text (2) items.
\image qmldesigner-element-properties.png
To change the item type, double-click the \uicontrol Type field in the
- \uicontrol Properties pane, and enter the name of another QML type in the
+ \uicontrol Properties view, and enter the name of another QML type in the
field. If you have specified properties for the item that are not supported
for the new type, the type cannot be changed and an error message is
displayed. Select the \inlineimage icons/action-icon.png
@@ -130,7 +130,7 @@
\section1 Picking Colors
To specify the color of the selected item in the color picker view (1),
- select the color picker icon (2) in the \uicontrol Properties pane.
+ select the color picker icon (2) in the \uicontrol Properties view.
\image qtquick-designer-color-picker.png "Color Picker view"
@@ -163,7 +163,7 @@
\section1 Marking Text Items for Translation
To support translators, mark each text item that should be translated.
- In the \uicontrol Properties pane, \uicontrol Text field, select \uicontrol tr (1).
+ In the \uicontrol Properties view, \uicontrol Text field, select \uicontrol tr (1).
\image qmldesigner-text-property-tr.png "Text properties"
@@ -281,7 +281,7 @@
\section1 Building Transformations on Items
- The \uicontrol Advanced pane allows you to configure advanced
+ The \uicontrol Advanced tab allows you to configure advanced
transformations, such as rotation, scale, and translation. You
can assign any number of transformations to an item. Each
transformation is applied in order, one at a time.
diff --git a/doc/qtcreator/src/qtquick/qtquick-states.qdoc b/doc/qtcreator/src/qtquick/qtquick-states.qdoc
index 5a40828f76..d836643191 100644
--- a/doc/qtcreator/src/qtquick/qtquick-states.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-states.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -62,12 +62,12 @@
\li Show a different view.
\endlist
- The \uicontrol States pane displays the different \l{State}{states}
- of the component in the Design mode. The \uicontrol States pane is
+ The \uicontrol States view displays the different \l{State}{states}
+ of the component in the Design mode. The \uicontrol States view is
collapsed by default to save space. Select \uicontrol Expand in
- the context menu to view the whole pane.
+ the context menu to view the whole view.
- \image qmldesigner-transitions.png "States pane"
+ \image qmldesigner-transitions.png "States view"
To add states, click the \inlineimage plus.png
button. Then modify the new state in the editor. For example, to change the
@@ -86,9 +86,9 @@
a button is pressed, you could select a button component and
its pressed property.
- \image qtquick-states-binding-editor.png "Binding editor in States pane"
+ \image qtquick-states-binding-editor.png "Binding editor in States view"
- You can preview the states in the \uicontrol States pane and click them to
+ You can preview the states in the \uicontrol States view and click them to
switch between states on the canvas.
\section1 Using States
@@ -97,11 +97,11 @@
controls, their properties and behavior and the available actions. For
example, you can use states to create two views.
- To add states, click the empty slot in the \uicontrol States pane.
+ To add states, click the empty slot in the \uicontrol States view.
Then modify the new state in the \uicontrol {Form Editor} or the
- \uicontrol Properties pane.
+ \uicontrol Properties view.
- \image qmldesigner-states.png "States pane"
+ \image qmldesigner-states.png "States view"
The properties that you change in a state are highlighted with blue color.
In the \uicontrol {Text Editor}, you can see the changes recorded as changes
@@ -130,9 +130,9 @@
(1). While you work on one view, you can click the
\inlineimage eye_open.png
icon to hide items on the canvas that are not part of a view.
- \li In the \uicontrol States pane, click the empty slot to create a
+ \li In the \uicontrol States view, click the empty slot to create a
new state and give it a name. For example, \c Normal.
- \li In the \uicontrol Properties pane (2), deselect the
+ \li In the \uicontrol Properties view (2), deselect the
\uicontrol Visibility check box or set \uicontrol Opacity to 0
for each item that is not needed in this view. If you specify
the setting for the parent item, all child items inherit it and
diff --git a/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc b/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc
index 96c5e7c540..a613dc0f3a 100644
--- a/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc
@@ -60,8 +60,9 @@
The \uicontrol Timeline view is not visible in \QC by default. To enable
it, select \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} >
- \uicontrol {Qt Quick Designer} > \uicontrol {Enable Timeline editor}. You
- need to restart \QC for the \uicontrol Timeline view to appear.
+ \uicontrol {Qt Quick Designer} > \uicontrol {Enable Timeline editor}.
+ Select \uicontrol {Restart Now} to restart \QC with the \uicontrol Timeline
+ view visible.
To be able to create timelines, you also need the \l {Qt Quick Timeline}
module, which is delivered with Qt 5.14, and later. For more
diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc
index ea87f8686b..f84aef760d 100644
--- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc
+++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -42,7 +42,8 @@
Since \QC 4.9, the Perforce plugin is disabled by default. To enable
it, select \uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {Version Control} > \uicontrol Perforce, and then restart \QC.
+ \uicontrol {Version Control} > \uicontrol Perforce. Then select
+ \uicontrol {Restart Now} to restart \QC and load the plugin.
\section1 Configuring Perforce
diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc
index 4a148e97c0..852eebdbf5 100644
--- a/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc
+++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc
@@ -52,8 +52,9 @@
\li \l{http://www-01.ibm.com/software/awdtools/clearcase/}
\li Disabled by default. To enable the plugin, select
\uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {Version Control} > \uicontrol ClearCase, and then
- restart \QC.
+ \uicontrol {Version Control} > \uicontrol ClearCase.
+ Then select \uicontrol {Restart Now} to restart \QC
+ and load the plugin.
\row
\li \l{Using CVS}{CVS}
\li \l{http://www.nongnu.org/cvs/}
@@ -75,8 +76,9 @@
Disabled by default. To enable the plugin, select
\uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {Version Control} > \uicontrol Perforce,
- and then restart \QC.
+ \uicontrol {Version Control} > \uicontrol Perforce.
+ Then select \uicontrol {Restart Now} to restart \QC
+ and load the plugin.
\row
\li \l{Using Subversion}{Subversion}
\li \l{http://subversion.apache.org/}
diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc
index ec6b1a2ebe..ca1512bb9e 100644
--- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc
+++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -189,7 +189,7 @@
The \uicontrol {Diff Selected Files} button brings up a diff view of the
files selected in the file list. Since the commit page is just another
editor, you can go back to it by closing the diff view. You can also switch
- to an open diff view by selecting it in the \uicontrol {Open Documents} pane
+ to an open diff view by selecting it in the \uicontrol {Open Documents} view
in the sidebar.
\section2 Amending Commits
diff --git a/doc/qtcreator/src/webassembly/creator-webassembly.qdoc b/doc/qtcreator/src/webassembly/creator-webassembly.qdoc
index 37ca68ed5e..083f8b7d40 100644
--- a/doc/qtcreator/src/webassembly/creator-webassembly.qdoc
+++ b/doc/qtcreator/src/webassembly/creator-webassembly.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -80,7 +80,7 @@
\li In \QC, select \uicontrol Help > \uicontrol {About Plugins} >
\uicontrol {Device Support} > \uicontrol {WebAssembly} to enable
the plugin.
- \li Restart \QC to be able to use the plugin.
+ \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
\uicontrol {Qt Versions} > \uicontrol Add to add Qt for WebAssembly
(wasm_32).
diff --git a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc
index cef1c5a1ba..cca4674da3 100644
--- a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc
+++ b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -157,7 +157,7 @@
\li Double-click the \uicontrol{Push Button} widget and enter the text
\b{Find}.
- \li In the \uicontrol Properties pane, change the \uicontrol objectName to
+ \li In the \uicontrol Properties view, change the \uicontrol objectName to
\b findButton.
\image qtcreator-textfinder-objectname.png "Changing object names"
@@ -216,7 +216,7 @@
\list 1
- \li In the \uicontrol{Projects} pane in the \uicontrol {Edit view}, double-click the
+ \li In the \uicontrol{Projects} view in the \uicontrol {Edit view}, double-click the
\c{textfinder.h} file to open it for editing.
\li Add a private function to the \c{private} section, after the
@@ -234,7 +234,7 @@
\list 1
- \li In the \uicontrol{Projects} pane in the \uicontrol Edit view, double-click the
+ \li In the \uicontrol{Projects} view in the \uicontrol Edit view, double-click the
textfinder.cpp file to open it for editing.
\li Add code to load a text file using QFile, read it with QTextStream,
diff --git a/doc/qtdesignstudio/examples/doc/loginui1.qdoc b/doc/qtdesignstudio/examples/doc/loginui1.qdoc
index 18a7d8d499..3be68658aa 100644
--- a/doc/qtdesignstudio/examples/doc/loginui1.qdoc
+++ b/doc/qtdesignstudio/examples/doc/loginui1.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -79,7 +79,7 @@
\QDS creates a set of boilerplate files and folders that you need to create
a UI using Qt Quick and QML. The files are listed in the \uicontrol Project
- tab in the \uicontrol Navigator and in the \uicontrol Projects pane. For
+ tab in the \uicontrol Navigator and in the \uicontrol Projects view. For
more information, see \l {Viewing Project Files}.
\image loginui1-project-files.png
diff --git a/doc/qtdesignstudio/examples/doc/loginui3.qdoc b/doc/qtdesignstudio/examples/doc/loginui3.qdoc
index 1bfa856b3e..e4b143a7a6 100644
--- a/doc/qtdesignstudio/examples/doc/loginui3.qdoc
+++ b/doc/qtdesignstudio/examples/doc/loginui3.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -117,9 +117,9 @@
components on the canvas:
\list 1
- \li In the \uicontrol States pane, select the \inlineimage plus.png
+ \li In the \uicontrol States view, select the \inlineimage plus.png
button.
- \image loginui3-login-state.png "States pane"
+ \image loginui3-login-state.png "States view"
\li Enter \e loginState as the state name.
\li Select \e verifyPasswordField in the \uicontrol Navigator,
and deselect the \uicontrol Visibility check box in
diff --git a/doc/qtdesignstudio/examples/doc/loginui4.qdoc b/doc/qtdesignstudio/examples/doc/loginui4.qdoc
index 66fd5886c5..93204d05f3 100644
--- a/doc/qtdesignstudio/examples/doc/loginui4.qdoc
+++ b/doc/qtdesignstudio/examples/doc/loginui4.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -85,7 +85,7 @@
\list 1
\li Open \e {Screen01.ui.qml} in the Design mode for editing.
- \li In the \uicontrol States pane, select the \inlineimage close.png
+ \li In the \uicontrol States view, select the \inlineimage close.png
(\uicontrol Close) button in \e loginState and \e registerState
to remove the states.
\li In the \uicontrol {Text Editor}, remove the following line:
@@ -259,11 +259,11 @@
\section1 Binding Animation to States
You will now bring back the \l{Adding States}{states} in the
- \uicontrol States pane and bind them to the animation settings
+ \uicontrol States view and bind them to the animation settings
in the \uicontrol Timeline view:
\list 1
- \li In the \uicontrol States pane, select the \inlineimage plus.png
+ \li In the \uicontrol States view, select the \inlineimage plus.png
button twice to add two states called \e loginState and
\e registerState. You don't need to make any property changes this
time, because you'll bind the states to property animations.
diff --git a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc
index 71857f95a7..808872eef0 100644
--- a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc
+++ b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Design Studio documentation.
@@ -70,7 +70,7 @@
\note Components are listed in the \uicontrol {QML Components}
section of the \uicontrol Library only if the filename begins
with a capital letter.
- \li Edit component properties in the \uicontrol Properties pane.
+ \li Edit component properties in the \uicontrol Properties view.
The available properties depend on the QML type.
\endlist
diff --git a/doc/qtdesignstudio/src/qtdesignstudio-prototyping.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-prototyping.qdoc
index df42f2fca0..d511c23359 100644
--- a/doc/qtdesignstudio/src/qtdesignstudio-prototyping.qdoc
+++ b/doc/qtdesignstudio/src/qtdesignstudio-prototyping.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -72,7 +72,7 @@
properties. Some properties, such as position, size, and visibility,
are common to all QML types, whereas others are specific to the QML
type. You can specify properties for your components in the
- \uicontrol Properties pane.
+ \uicontrol Properties view.
\li \l {Using Custom Fonts}
diff --git a/doc/src/projects/creator-only/creator-projects-nimble.qdoc b/doc/src/projects/creator-only/creator-projects-nimble.qdoc
deleted file mode 100644
index a517d63383..0000000000
--- a/doc/src/projects/creator-only/creator-projects-nimble.qdoc
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Creator documentation.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-**
-****************************************************************************/
-
-/*!
- \contentspage index.html
- \previouspage creator-project-generic.html
- \page creator-project-nimble.html
- \nextpage creator-cli.html
-
- \title Setting Up Nimble
-
- \l {https://github.com/nim-lang/nimble#readme}{Nimble} is a package
- manager for the Nim programming language. It is delivered with
- \l{https://nim-lang.org/}{Nim} and uses the Nim compiler to generate
- executables that are supported on Windows, Linux, and \macos.
-
- To use \QC for Nim development, you need to enable the experimental
- Nim plugin. Select \uicontrol Help > \uicontrol {About Plugins} >
- \uicontrol {Other Languages} > \uicontrol Nim, and then restart \QC.
-
- In addition, you have to download and install Nim and set up a Nim kit
- in \QC.
-
- You can use wizards to create Nim and Nimble projects.
-
- \section1 Setting Up the Development Environment
-
- To configure \QC to build Nim executables:
-
- \list 1
- \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits
- \uicontrol Compilers > \uicontrol Add > \uicontrol Nim to specify
- the path to the the Nim compiler.
- \li Select \uicontrol Apply to add the compiler.
- \li Select \uicontrol Kits > \uicontrol Add to add a kit for building
- applications with Nimble:
- \image qtcreator-kit-nimble.png "Nimble kit"
- \list 1
- \li In the \uicontrol Name field, specify a name for the kit.
- \li In the \uicontrol Compiler group, \uicontrol Nim field,
- select the Nim compiler you added above.
- \li Select \uicontrol Apply to add the kit.
- \endlist
- \endlist
-
- \section1 Creating Nimble Applications
-
- To use a wizard to create boilerplate files for a Nim package that is
- managed with Nimble:
-
- \list 1
- \li Select \uicontrol File > \uicontrol {New File or Project} >
- \uicontrol Projects > \uicontrol {Non-Qt Project} >
- \uicontrol {Nimble Application}.
- \li Specify the name and location of the application.
- \li Select \uicontrol Next.
- \li Specify information about your application package.
- \image qtcreator-project-nimble.png
- \li Select \uicontrol Next to create the project.
- \endlist
-*/
diff --git a/scripts/build.py b/scripts/build.py
index 4724ece02a..ec50a21b8e 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -44,7 +44,9 @@ def default_python3():
path_system = os.path.join('/usr', 'bin') if not common.is_windows_platform() else None
path = os.environ.get('PYTHON3_PATH') or path_system
postfix = '.exe' if common.is_windows_platform() else ''
- return existing_path(os.path.join(path, 'python3' + postfix)) or existing_path(os.path.join(path, 'python' + postfix))
+ return (path if not path
+ else (existing_path(os.path.join(path, 'python3' + postfix)) or
+ existing_path(os.path.join(path, 'python' + postfix))))
def get_arguments():
parser = argparse.ArgumentParser(description='Build Qt Creator for packaging')
diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py
index ad63a19b38..ec55b18312 100644
--- a/share/qtcreator/debugger/cdbbridge.py
+++ b/share/qtcreator/debugger/cdbbridge.py
@@ -353,7 +353,7 @@ class Dumper(DumperBase):
def putVTableChildren(self, item, itemCount):
p = item.address()
- for i in xrange(itemCount):
+ for i in range(itemCount):
deref = self.extractPointer(p)
if deref == 0:
n = i
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 6b0416c563..b292b145df 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -48,7 +48,6 @@ except ModuleNotFoundError:
if sys.version_info[0] >= 3:
- xrange = range
toInteger = int
else:
toInteger = long
@@ -306,8 +305,8 @@ class DumperBase:
def childRange(self):
if self.currentMaxNumChild is None:
- return xrange(0, self.currentNumChild)
- return xrange(min(self.currentMaxNumChild, self.currentNumChild))
+ return range(0, self.currentNumChild)
+ return range(min(self.currentMaxNumChild, self.currentNumChild))
def enterSubItem(self, item):
if self.useTimeStamps:
@@ -820,7 +819,7 @@ class DumperBase:
def putVTableChildren(self, item, itemCount):
p = item.pointer()
- for i in xrange(itemCount):
+ for i in range(itemCount):
deref = self.extractPointer(p)
if deref == 0:
itemCount = i
@@ -901,7 +900,7 @@ class DumperBase:
self.warn('REDUCING READING MAXIMUM TO %s' % maximum)
#DumperBase.warn('BASE: 0x%x TSIZE: %s MAX: %s' % (base, tsize, maximum))
- for i in xrange(0, maximum, tsize):
+ for i in range(0, maximum, tsize):
t = struct.unpack_from(code, blob, i)[0]
if t == 0:
return 0, i, self.hexencode(blob[:i])
@@ -2090,7 +2089,7 @@ class DumperBase:
base = self.extractPointer(connections)
data, size, alloc = self.vectorDataHelper(base)
connectionType = self.createType('@QObjectPrivate::Connection')
- for i in xrange(size):
+ for i in range(size):
first = self.extractPointer(data + i * 2 * ptrSize)
while first:
self.putSubItem('%s' % pp,
@@ -2193,7 +2192,7 @@ class DumperBase:
if self.currentIName in self.expandedINames:
p = value
with Children(self, n):
- for i in xrange(n):
+ for i in range(n):
self.putSubItem(i, p.dereference())
p += 1
@@ -2340,7 +2339,7 @@ class DumperBase:
self.putField('exp', exp)
self.putItemCount(n)
self.putNoType()
- for i in xrange(n):
+ for i in range(n):
self.handleWatch(exps[i], exps[i], '%s.%d' % (iname, i))
return
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index c50ba14281..55ad02afcd 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -101,7 +101,7 @@ PPPCommand()
def scanStack(p, n):
p = int(p)
r = []
- for i in xrange(n):
+ for i in range(n):
f = gdb.parse_and_eval('{void*}%s' % p)
m = gdb.execute('info symbol %s' % f, to_string=True)
if not m.startswith('No symbol matches'):
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 3617d398a6..5e049aeb24 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -810,7 +810,7 @@ class Dumper(DumperBase):
needle = self.canonicalTypeName(name)
#DumperBase.warn('NEEDLE: %s ' % needle)
self.warn('Searching for type %s across all target modules, this could be very slow' % name)
- for i in xrange(self.target.GetNumModules()):
+ for i in range(self.target.GetNumModules()):
module = self.target.GetModuleAtIndex(i)
# SBModule.GetType is new somewhere after early 300.x
# So this may fail.
@@ -1000,7 +1000,7 @@ class Dumper(DumperBase):
return None if thread is None else thread.GetSelectedFrame()
def firstStoppedThread(self):
- for i in xrange(0, self.process.GetNumThreads()):
+ for i in range(0, self.process.GetNumThreads()):
thread = self.process.GetThreadAtIndex(i)
reason = thread.GetStopReason()
if (reason == lldb.eStopReasonBreakpoint or
@@ -1013,7 +1013,7 @@ class Dumper(DumperBase):
def fetchThreads(self, args):
result = 'threads=['
- for i in xrange(0, self.process.GetNumThreads()):
+ for i in range(0, self.process.GetNumThreads()):
thread = self.process.GetThreadAtIndex(i)
if thread.is_stopped:
state = 'stopped'
@@ -1043,7 +1043,7 @@ class Dumper(DumperBase):
self.reportResult(result, args)
def firstUsableFrame(self, thread):
- for i in xrange(10):
+ for i in range(10):
frame = thread.GetFrameAtIndex(i)
lineEntry = frame.GetLineEntry()
line = lineEntry.GetLine()
@@ -1067,7 +1067,7 @@ class Dumper(DumperBase):
self.currentCallContext = None
result = 'stack={current-thread="%s"' % thread.GetThreadID()
result += ',frames=['
- for i in xrange(n):
+ for i in range(n):
frame = thread.GetFrameAtIndex(i)
if not frame.IsValid():
isLimited = False
@@ -1183,7 +1183,7 @@ class Dumper(DumperBase):
with Children(self):
statics = frame.GetVariables(False, False, True, False)
if len(statics):
- for i in xrange(len(statics)):
+ for i in range(len(statics)):
staticVar = statics[i]
staticVar.SetPreferSyntheticValue(False)
typename = staticVar.GetType().GetName()
@@ -1408,7 +1408,7 @@ class Dumper(DumperBase):
if bp.IsValid() and isinstance(bp, lldb.SBBreakpoint):
result += ',locations=['
lineEntry = None
- for i in xrange(bp.GetNumLocations()):
+ for i in range(bp.GetNumLocations()):
loc = bp.GetLocationAtIndex(i)
addr = loc.GetAddress()
lineEntry = addr.GetLineEntry()
@@ -1539,7 +1539,7 @@ class Dumper(DumperBase):
def fetchModules(self, args):
result = 'modules=['
- for i in xrange(self.target.GetNumModules()):
+ for i in range(self.target.GetNumModules()):
module = self.target.GetModuleAtIndex(i)
result += '{file="%s"' % module.file.fullpath
result += ',name="%s"' % module.file.basename
@@ -1559,7 +1559,7 @@ class Dumper(DumperBase):
moduleName = args['module']
#file = lldb.SBFileSpec(moduleName)
#module = self.target.FindModule(file)
- for i in xrange(self.target.GetNumModules()):
+ for i in range(self.target.GetNumModules()):
module = self.target.GetModuleAtIndex(i)
if module.file.fullpath == moduleName:
break
@@ -1872,7 +1872,7 @@ class Tester(Dumper):
break
if state == lldb.eStateStopped: # 5
stoppedThread = None
- for i in xrange(0, self.process.GetNumThreads()):
+ for i in range(0, self.process.GetNumThreads()):
thread = self.process.GetThreadAtIndex(i)
reason = thread.GetStopReason()
#DumperBase.warn('THREAD: %s REASON: %s' % (thread, reason))
diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py
index a1343eb9dc..9889e5ca97 100644
--- a/share/qtcreator/debugger/misctypes.py
+++ b/share/qtcreator/debugger/misctypes.py
@@ -65,7 +65,7 @@ def qdump____m512d(d, value):
def qdump____m128i(d, value):
data = d.hexencode(value.data(16))
- d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 32, 4)))
+ d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in range(0, 32, 4)))
if d.isExpanded():
with Children(d):
addr = value.address()
@@ -76,7 +76,7 @@ def qdump____m128i(d, value):
def qdump____m256i(d, value):
data = d.hexencode(value.data(32))
- d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4)))
+ d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in range(0, 64, 4)))
if d.isExpanded():
with Children(d):
addr = value.address()
@@ -87,8 +87,8 @@ def qdump____m256i(d, value):
def qdump____m512i(d, value):
data = d.hexencode(value.data(64))
- d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4))
- + ', ' + ':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(64, 128, 4)))
+ d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in range(0, 64, 4))
+ + ', ' + ':'.join('%04x' % int(data[i:i+4], 16) for i in range(64, 128, 4)))
if d.isExpanded():
with Children(d):
d.putArrayItem('uint32x16', value.address(), 16, 'unsigned int')
@@ -279,14 +279,14 @@ if False:
d.putNoType()
if d.isExpanded():
with Children(d):
- for i in xrange(count):
+ for i in range(count):
d.putSubItem(Item(entries[i], iname))
with SubItem(d, 'data'):
d.putEmptyValue()
d.putNoType()
if d.isExpanded():
with Children(d):
- for i in xrange(count):
+ for i in range(count):
with SubItem(d, i):
entry = entries[i]
mpitype = str(entry['type'])
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 705a0051c2..34d592ede7 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -126,8 +126,8 @@ def qdump_X_QAbstractItemModel(d, value):
if d.isExpanded():
with Children(d, numChild=rowCount * columnCount, childType=ri.type):
i = 0
- for row in xrange(rowCount):
- for column in xrange(columnCount):
+ for row in range(rowCount):
+ for column in range(columnCount):
with SubItem(d, i):
d.putName('[%s, %s]' % (row, column))
mi = d.parseAndEvaluate('%s.index(%d,%d,%s)'
@@ -182,8 +182,8 @@ def qdump_X_QModelIndex(d, value):
with Children(d):
d.putFields(value, False)
i = 0
- for row in xrange(rowCount):
- for column in xrange(columnCount):
+ for row in range(rowCount):
+ for column in range(columnCount):
with UnnamedSubItem(d, i):
d.putName('[%s, %s]' % (row, column))
mi2 = d.parseAndEvaluate('%s.index(%d,%d,%s)'
@@ -912,7 +912,7 @@ def qdump__QHostAddress(d, value):
if protocol == 1:
# value.d.d->a6
data = d.hexencode(a6)
- address = ':'.join('%x' % int(data[i:i+4], 16) for i in xrange(0, 32, 4))
+ address = ':'.join('%x' % int(data[i:i+4], 16) for i in range(0, 32, 4))
d.putValue(address)
elif protocol == 0:
# value.d.d->a
@@ -938,7 +938,7 @@ def qdump__QHostAddress(d, value):
def qdump__QIPv6Address(d, value):
raw = d.split('16s', value)[0]
data = d.hexencode(raw)
- d.putValue(':'.join('%x' % int(data[i:i+4], 16) for i in xrange(0, 32, 4)))
+ d.putValue(':'.join('%x' % int(data[i:i+4], 16) for i in range(0, 32, 4)))
d.putArrayData(value.address(), 16, d.lookupType('unsigned char'))
def qform__QList():
diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py
index 83201e42e8..e9f99fc3f6 100644
--- a/share/qtcreator/debugger/stdtypes.py
+++ b/share/qtcreator/debugger/stdtypes.py
@@ -1160,7 +1160,7 @@ def qdump____gnu_cxx__hash_set(d, value):
bucketFinish = buckets["_M_finish"]
p = bucketStart
itemCount = 0
- for i in xrange((bucketFinish.pointer() - bucketStart.pointer()) // d.ptrSize()):
+ for i in range((bucketFinish.pointer() - bucketStart.pointer()) // d.ptrSize()):
if p.dereference().pointer():
cur = p.dereference()
while cur.pointer():
diff --git a/src/libs/advanceddockingsystem/dockoverlay.h b/src/libs/advanceddockingsystem/dockoverlay.h
index b7243c29a6..04f9d62751 100644
--- a/src/libs/advanceddockingsystem/dockoverlay.h
+++ b/src/libs/advanceddockingsystem/dockoverlay.h
@@ -138,13 +138,13 @@ struct DockOverlayCrossPrivate;
* You can style the cross icon using the property system.
* \code
* ADS--DockOverlayCross
- {
- qproperty-iconFrameColor: palette(highlight);
- qproperty-iconBackgroundColor: palette(base);
- qproperty-iconOverlayColor: palette(highlight);
- qproperty-iconArrowColor: rgb(227, 227, 227);
- qproperty-iconShadowColor: rgb(0, 0, 0);
- }
+ * {
+ * qproperty-iconFrameColor: palette(highlight);
+ * qproperty-iconBackgroundColor: palette(base);
+ * qproperty-iconOverlayColor: palette(highlight);
+ * qproperty-iconArrowColor: rgb(227, 227, 227);
+ * qproperty-iconShadowColor: rgb(0, 0, 0);
+ * }
* \endcode
* Or you can use the iconColors property to pass in AARRGGBB values as
* hex string like shown in the example below.
diff --git a/src/libs/advanceddockingsystem/dockwidget.cpp b/src/libs/advanceddockingsystem/dockwidget.cpp
index 08857994b5..5b4ff87265 100644
--- a/src/libs/advanceddockingsystem/dockwidget.cpp
+++ b/src/libs/advanceddockingsystem/dockwidget.cpp
@@ -154,16 +154,18 @@ namespace ADS
void DockWidgetPrivate::updateParentDockArea()
{
- if (!m_dockArea) {
+ if (!m_dockArea)
+ return;
+
+ // we don't need to change the current tab if the current DockWidget is not the one being closed
+ if (m_dockArea->currentDockWidget() != q)
return;
- }
auto nextDockWidget = m_dockArea->nextOpenDockWidget(q);
- if (nextDockWidget) {
+ if (nextDockWidget)
m_dockArea->setCurrentDockWidget(nextDockWidget);
- } else {
+ else
m_dockArea->hideAreaWithNoVisibleContent();
- }
}
void DockWidgetPrivate::setupToolBar()
@@ -222,9 +224,8 @@ namespace ADS
QScrollArea *scrollAreaWidget = qobject_cast<QScrollArea *>(widget);
if (scrollAreaWidget || ForceNoScrollArea == insertMode) {
d->m_layout->addWidget(widget);
- if (scrollAreaWidget && scrollAreaWidget->viewport()) {
+ if (scrollAreaWidget && scrollAreaWidget->viewport())
scrollAreaWidget->viewport()->setProperty("dockWidgetContent", true);
- }
} else {
d->setupScrollArea();
d->m_scrollArea->setWidget(widget);
@@ -283,9 +284,8 @@ namespace ADS
bool DockWidget::isFloating() const
{
- if (!isInFloatingContainer()) {
+ if (!isInFloatingContainer())
return false;
- }
return dockContainer()->topLevelDockWidget() == this;
}
@@ -293,13 +293,11 @@ namespace ADS
bool DockWidget::isInFloatingContainer() const
{
auto container = dockContainer();
- if (!container) {
+ if (!container)
return false;
- }
- if (!container->isFloating()) {
+ if (!container->isFloating())
return false;
- }
return true;
}
@@ -324,17 +322,16 @@ namespace ADS
// If the toggle view action mode is ActionModeShow, then Open is always
// true if the sender is the toggle view action
QAction *action = qobject_cast<QAction *>(sender());
- if (action == d->m_toggleViewAction && !d->m_toggleViewAction->isCheckable()) {
+ if (action == d->m_toggleViewAction && !d->m_toggleViewAction->isCheckable())
open = true;
- }
+
// If the dock widget state is different, then we really need to toggle
// the state. If we are in the right state, then we simply make this
// dock widget the current dock widget
- if (d->m_closed != !open) {
+ if (d->m_closed != !open)
toggleViewInternal(open);
- } else if (open && d->m_dockArea) {
+ else if (open && d->m_dockArea)
d->m_dockArea->setCurrentDockWidget(this);
- }
}
void DockWidget::toggleViewInternal(bool open)
@@ -353,13 +350,11 @@ namespace ADS
//d->m_toggleViewAction->blockSignals(true);
d->m_toggleViewAction->setChecked(open);
//d->m_toggleViewAction->blockSignals(false);
- if (d->m_dockArea) {
+ if (d->m_dockArea)
d->m_dockArea->toggleDockWidgetView(this, open);
- }
- if (open && topLevelDockWidgetBefore) {
+ if (open && topLevelDockWidgetBefore)
DockWidget::emitTopLevelEventForWidget(topLevelDockWidgetBefore, false);
- }
// Here we need to call the dockContainer() function again, because if
// this dock widget was unassigned before the call to showDockWidget() then
@@ -370,13 +365,12 @@ namespace ADS
: nullptr;
DockWidget::emitTopLevelEventForWidget(topLevelDockWidgetAfter, true);
FloatingDockContainer *floatingContainer = dockContainerWidget->floatingWidget();
- if (floatingContainer) {
+ if (floatingContainer)
floatingContainer->updateWindowTitle();
- }
- if (!open) {
+ if (!open)
emit closed();
- }
+
emit viewToggled(open);
}
@@ -440,24 +434,22 @@ namespace ADS
#ifndef QT_NO_TOOLTIP
void DockWidget::setTabToolTip(const QString &text)
{
- if (d->m_tabWidget) {
+ if (d->m_tabWidget)
d->m_tabWidget->setToolTip(text);
- }
- if (d->m_toggleViewAction) {
+
+ if (d->m_toggleViewAction)
d->m_toggleViewAction->setToolTip(text);
- }
- if (d->m_dockArea) {
+
+ if (d->m_dockArea)
d->m_dockArea->markTitleBarMenuOutdated(); //update tabs menu
- }
}
#endif
void DockWidget::setIcon(const QIcon &icon)
{
d->m_tabWidget->setIcon(icon);
- if (!d->m_toggleViewAction->isCheckable()) {
+ if (!d->m_toggleViewAction->isCheckable())
d->m_toggleViewAction->setIcon(icon);
- }
}
QIcon DockWidget::icon() const { return d->m_tabWidget->icon(); }
@@ -466,18 +458,16 @@ namespace ADS
QToolBar *DockWidget::createDefaultToolBar()
{
- if (!d->m_toolBar) {
+ if (!d->m_toolBar)
d->setupToolBar();
- }
return d->m_toolBar;
}
void DockWidget::setToolBar(QToolBar *toolBar)
{
- if (d->m_toolBar) {
+ if (d->m_toolBar)
delete d->m_toolBar;
- }
d->m_toolBar = toolBar;
d->m_layout->insertWidget(0, d->m_toolBar);
@@ -487,59 +477,52 @@ namespace ADS
void DockWidget::setToolBarStyle(Qt::ToolButtonStyle style, eState state)
{
- if (StateFloating == state) {
+ if (StateFloating == state)
d->m_toolBarStyleFloating = style;
- } else {
+ else
d->m_toolBarStyleDocked = style;
- }
setToolbarFloatingStyle(isFloating());
}
Qt::ToolButtonStyle DockWidget::toolBarStyle(eState state) const
{
- if (StateFloating == state) {
+ if (StateFloating == state)
return d->m_toolBarStyleFloating;
- } else {
+ else
return d->m_toolBarStyleDocked;
- }
}
void DockWidget::setToolBarIconSize(const QSize &iconSize, eState state)
{
- if (StateFloating == state) {
+ if (StateFloating == state)
d->m_toolBarIconSizeFloating = iconSize;
- } else {
+ else
d->m_toolBarIconSizeDocked = iconSize;
- }
setToolbarFloatingStyle(isFloating());
}
QSize DockWidget::toolBarIconSize(eState state) const
{
- if (StateFloating == state) {
+ if (StateFloating == state)
return d->m_toolBarIconSizeFloating;
- } else {
+ else
return d->m_toolBarIconSizeDocked;
- }
}
void DockWidget::setToolbarFloatingStyle(bool floating)
{
- if (!d->m_toolBar) {
+ if (!d->m_toolBar)
return;
- }
auto iconSize = floating ? d->m_toolBarIconSizeFloating : d->m_toolBarIconSizeDocked;
- if (iconSize != d->m_toolBar->iconSize()) {
+ if (iconSize != d->m_toolBar->iconSize())
d->m_toolBar->setIconSize(iconSize);
- }
auto buttonStyle = floating ? d->m_toolBarStyleFloating : d->m_toolBarStyleDocked;
- if (buttonStyle != d->m_toolBar->toolButtonStyle()) {
+ if (buttonStyle != d->m_toolBar->toolButtonStyle())
d->m_toolBar->setToolButtonStyle(buttonStyle);
- }
}
void DockWidget::emitTopLevelEventForWidget(DockWidget *topLevelDockWidget, bool floating)
@@ -564,9 +547,9 @@ namespace ADS
void DockWidget::setFloating()
{
- if (isClosed()) {
+ if (isClosed())
return;
- }
+
d->m_tabWidget->detachDockWidget();
}
@@ -584,13 +567,11 @@ namespace ADS
bool DockWidget::closeDockWidgetInternal(bool forceClose)
{
- if (!forceClose) {
+ if (!forceClose)
emit closeRequested();
- }
- if (!forceClose && features().testFlag(DockWidget::CustomCloseHandling)) {
+ if (!forceClose && features().testFlag(DockWidget::CustomCloseHandling))
return false;
- }
if (features().testFlag(DockWidget::DockWidgetDeleteOnClose)) {
// If the dock widget is floating, then we check if we also need to
@@ -598,11 +579,10 @@ namespace ADS
if (isFloating()) {
FloatingDockContainer* floatingWidget = internal::findParent<
FloatingDockContainer *>(this);
- if (floatingWidget->dockWidgets().count() == 1) {
+ if (floatingWidget->dockWidgets().count() == 1)
floatingWidget->deleteLater();
- } else {
+ else
floatingWidget->hide();
- }
}
deleteDockWidget();
} else {
diff --git a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp
index 2fbe879f47..6bf2d9efbd 100644
--- a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp
+++ b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp
@@ -112,7 +112,7 @@ namespace ADS
if (testConfigFlag(DockManager::FloatingContainerHasWidgetTitle)) {
setWindowTitle(currentWidget->windowTitle());
} else {
- setWindowTitle(qApp->applicationDisplayName());
+ setWindowTitle(QApplication::applicationDisplayName());
}
// reflect CurrentWidget's icon if configured to do so, otherwise display application icon as window icon
@@ -495,7 +495,7 @@ namespace ADS
&FloatingDockContainer::onDockAreaCurrentChanged);
d->m_singleDockArea = nullptr;
}
- d->setWindowTitle(qApp->applicationDisplayName());
+ d->setWindowTitle(QApplication::applicationDisplayName());
setWindowIcon(QApplication::windowIcon());
}
}
@@ -507,7 +507,7 @@ namespace ADS
DockWidget *currentWidget = topLevelDockArea->currentDockWidget();
d->reflectCurrentWidget(currentWidget);
} else {
- d->setWindowTitle(qApp->applicationDisplayName());
+ d->setWindowTitle(QApplication::applicationDisplayName());
setWindowIcon(QApplication::windowIcon());
}
}
diff --git a/src/libs/advanceddockingsystem/floatingdragpreview.cpp b/src/libs/advanceddockingsystem/floatingdragpreview.cpp
index 41dadfc979..b54b6bfbf0 100644
--- a/src/libs/advanceddockingsystem/floatingdragpreview.cpp
+++ b/src/libs/advanceddockingsystem/floatingdragpreview.cpp
@@ -96,22 +96,19 @@ namespace ADS
void FloatingDragPreviewPrivate::updateDropOverlays(const QPoint &globalPosition)
{
- if (!q->isVisible() || !m_dockManager) {
+ if (!q->isVisible() || !m_dockManager)
return;
- }
auto containers = m_dockManager->dockContainers();
DockContainerWidget *topContainer = nullptr;
for (auto containerWidget : containers) {
- if (!containerWidget->isVisible()) {
+ if (!containerWidget->isVisible())
continue;
- }
QPoint mappedPosition = containerWidget->mapFromGlobal(globalPosition);
if (containerWidget->rect().contains(mappedPosition)) {
- if (!topContainer || containerWidget->isInFrontOf(topContainer)) {
+ if (!topContainer || containerWidget->isInFrontOf(topContainer))
topContainer = containerWidget;
- }
}
}
@@ -124,9 +121,9 @@ namespace ADS
if (!topContainer) {
containerOverlay->hideOverlay();
dockAreaOverlay->hideOverlay();
- if (DockManager::configFlags().testFlag(DockManager::DragPreviewIsDynamic)) {
+ if (DockManager::configFlags().testFlag(DockManager::DragPreviewIsDynamic))
setHidden(false);
- }
+
return;
}
@@ -153,9 +150,8 @@ namespace ADS
}
} else {
dockAreaOverlay->hideOverlay();
- if (dockArea == m_contentSourceArea && InvalidDockWidgetArea == containerDropArea) {
+ if (dockArea == m_contentSourceArea && InvalidDockWidgetArea == containerDropArea)
m_dropContainer = nullptr;
- }
}
if (DockManager::configFlags().testFlag(DockManager::DragPreviewIsDynamic)) {
@@ -199,7 +195,10 @@ namespace ADS
connect(qApp,
&QApplication::applicationStateChanged,
this,
- &FloatingDragPreview::onApplicationStateChanged); // TODO
+ &FloatingDragPreview::onApplicationStateChanged);
+ // The focused object will receive key press events and therefore we install
+ // the event filter on it to receive escape key press for drag canceling
+ QApplication::focusObject()->installEventFilter(this);
}
FloatingDragPreview::FloatingDragPreview(DockWidget *content)
@@ -212,9 +211,6 @@ namespace ADS
d->m_contenSourceContainer = content->dockContainer();
}
setWindowTitle(content->windowTitle());
- // We need to install an event filter for the given content
- // widget to receive the escape key press
- content->dockAreaWidget()->installEventFilter(this);
}
FloatingDragPreview::FloatingDragPreview(DockAreaWidget *content)
@@ -225,10 +221,6 @@ namespace ADS
d->m_contentSourceArea = content;
d->m_contenSourceContainer = content->dockContainer();
setWindowTitle(content->currentDockWidget()->windowTitle());
-
- // We need to install an event filter for the given Content
- // widget to receive the escape key press
- content->installEventFilter(this);
}
FloatingDragPreview::~FloatingDragPreview() { delete d; }
@@ -277,9 +269,8 @@ namespace ADS
floatingWidget = new FloatingDockContainer(dockWidget);
} else {
DockAreaWidget *dockArea = qobject_cast<DockAreaWidget *>(d->m_content);
- if (dockArea->features().testFlag(DockWidget::DockWidgetFloatable)) {
+ if (dockArea->features().testFlag(DockWidget::DockWidgetFloatable))
floatingWidget = new FloatingDockContainer(dockArea);
- }
}
if (floatingWidget) {
@@ -303,14 +294,12 @@ namespace ADS
void FloatingDragPreview::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
- if (d->m_hidden) {
+ if (d->m_hidden)
return;
- }
QPainter painter(this);
- if (DockManager::configFlags().testFlag(DockManager::DragPreviewShowsContentPixmap)) {
+ if (DockManager::configFlags().testFlag(DockManager::DragPreviewShowsContentPixmap))
painter.drawPixmap(QPoint(0, 0), d->m_contentPreviewPixmap);
- }
// If we do not have a window frame then we paint a QRubberBand like frameless window
if (!DockManager::configFlags().testFlag(DockManager::DragPreviewHasWindowFrame)) {
diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt
index a0663ebd8f..ff7bbe6286 100644
--- a/src/libs/utils/CMakeLists.txt
+++ b/src/libs/utils/CMakeLists.txt
@@ -1,19 +1,8 @@
-if (IDE_LIBEXEC_PATH AND IDE_BIN_PATH)
- get_filename_component(bin_path
- "${CMAKE_INSTALL_PREFIX}/${IDE_BIN_PATH}" ABSOLUTE "${CMAKE_BINARY_DIR}")
- get_filename_component(libexec_path
- "${CMAKE_INSTALL_PREFIX}/${IDE_LIBEXEC_PATH}" ABSOLUTE "${CMAKE_BINARY_DIR}")
- file(RELATIVE_PATH RELATIVE_TOOLS_PATH "${bin_path}" "${libexec_path}")
-else()
- message(WARNING "IDE_LIBEXEC_PATH or IDE_BIN_PATH undefined when calculating tools path")
- set(RELATIVE_TOOLS_PATH "")
-endif()
-
add_qtc_library(Utils
DEPENDS Qt5::Xml
PUBLIC_DEPENDS Qt5::Concurrent Qt5::Core Qt5::Network Qt5::Qml Qt5::Gui Qt5::Widgets
DEFINES
- "QTC_REL_TOOLS_PATH=\"${RELATIVE_TOOLS_PATH}\""
+ "QTC_REL_TOOLS_PATH=\"${RELATIVE_LIBEXEC_PATH}\""
SOURCES
../3rdparty/optional/optional.hpp
../3rdparty/variant/variant.hpp
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index a9f5aeb281..42ea48ee97 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -228,8 +228,16 @@ ToolChainList AndroidToolChainFactory::autodetectToolChainsForNdk(const ToolChai
const Abi &abi = targetItr.value();
const QString target = targetItr.key();
ToolChain *tc = findToolChain(compilerCommand, lang, target, alreadyKnown);
+
+ const QString displayName(QString("Android Clang (%1, %2, NDK %3)")
+ .arg(ToolChainManager::displayNameOfLanguageId(lang),
+ AndroidConfig::displayName(abi),
+ config.ndkVersion(qtVersion).toString()));
if (tc) {
qCDebug(androidTCLog) << "Tool chain already known" << abi.toString() << lang;
+ // make sure to update the toolchain with current name format
+ if (tc->displayName() != displayName)
+ tc->setDisplayName(displayName);
} else {
qCDebug(androidTCLog) << "New Clang toolchain found" << abi.toString() << lang;
auto atc = new AndroidToolChain();
@@ -239,14 +247,11 @@ ToolChainList AndroidToolChainFactory::autodetectToolChainsForNdk(const ToolChai
atc->setTargetAbi(ClangTargets[target]);
atc->setPlatformCodeGenFlags({"-target", target});
atc->setPlatformLinkerFlags({"-target", target});
- atc->setDetection(ToolChain::AutoDetection);
- atc->setDisplayName(QString("Android Clang (%1, %2, NDK %3)")
- .arg(ToolChainManager::displayNameOfLanguageId(lang),
- AndroidConfig::displayName(abi),
- config.ndkVersion(qtVersion).toString()));
+ atc->setDisplayName(displayName);
atc->resetToolChain(compilerCommand);
tc = atc;
}
+ tc->setDetection(ToolChain::AutoDetection);
result << tc;
++targetItr;
}
diff --git a/src/plugins/autotest/autotestplugin.cpp b/src/plugins/autotest/autotestplugin.cpp
index 3dfaa4fad5..df73f237c6 100644
--- a/src/plugins/autotest/autotestplugin.cpp
+++ b/src/plugins/autotest/autotestplugin.cpp
@@ -236,7 +236,7 @@ void AutotestPluginPrivate::initializeMenuEntries()
this, &AutotestPlugin::updateMenuItemsEnabledState);
connect(BuildManager::instance(), &BuildManager::buildQueueFinished,
this, &AutotestPlugin::updateMenuItemsEnabledState);
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &AutotestPlugin::updateMenuItemsEnabledState);
connect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged,
this, &AutotestPlugin::updateMenuItemsEnabledState);
diff --git a/src/plugins/autotest/testrunconfiguration.h b/src/plugins/autotest/testrunconfiguration.h
index 1c86f66359..df43b9dc86 100644
--- a/src/plugins/autotest/testrunconfiguration.h
+++ b/src/plugins/autotest/testrunconfiguration.h
@@ -59,7 +59,7 @@ public:
if (auto debugAspect = aspect<Debugger::DebuggerRunConfigurationAspect>()) {
debugAspect->setUseQmlDebugger(enableQuick);
- ProjectExplorer::ProjectExplorerPlugin::instance()->updateRunActions();
+ ProjectExplorer::ProjectExplorerPlugin::updateRunActions();
}
m_testConfig = config;
}
diff --git a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp
index 09f5ee9507..592f7c8795 100644
--- a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp
+++ b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp
@@ -215,8 +215,11 @@ void ClangCompletionAssistProcessor::handleAvailableCompletions(const CodeComple
return;
}
- if (!m_fallbackToNormalCompletion)
+ if (!m_fallbackToNormalCompletion) {
+ // We must report back to the code assistant under all circumstances
+ setAsyncProposalAvailable(nullptr);
return;
+ }
// else: Proceed with a normal completion in case:
// 1) it was not a function call, but e.g. a function declaration like "void f("
// 2) '{' meant not a constructor call.
diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp
index b1684788cf..ba7747d9a0 100644
--- a/src/plugins/clangtools/clangtool.cpp
+++ b/src/plugins/clangtools/clangtool.cpp
@@ -602,7 +602,7 @@ ClangTool::ClangTool()
update();
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &ClangTool::update);
connect(CppModelManager::instance(), &CppModelManager::projectPartsUpdated,
this, &ClangTool::update);
diff --git a/src/plugins/cppcheck/cppcheckplugin.cpp b/src/plugins/cppcheck/cppcheckplugin.cpp
index 02488c696c..e38e367dae 100644
--- a/src/plugins/cppcheck/cppcheckplugin.cpp
+++ b/src/plugins/cppcheck/cppcheckplugin.cpp
@@ -176,7 +176,7 @@ bool CppcheckPlugin::initialize(const QStringList &arguments, QString *errorStri
}
using ProjectExplorer::ProjectExplorerPlugin;
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
d.get(), &CppcheckPluginPrivate::updateManualRunAction);
d->updateManualRunAction();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 5fdf0015e1..73c8a2ade8 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1186,7 +1186,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
this, &DebuggerPluginPrivate::writeSettings);
// ProjectExplorer
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &DebuggerPluginPrivate::updatePresetState);
// EditorManager
diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp
index 3cac8265f1..87c4e09753 100644
--- a/src/plugins/git/branchview.cpp
+++ b/src/plugins/git/branchview.cpp
@@ -82,7 +82,7 @@ BranchView::BranchView() :
m_refreshButton(new QToolButton(this)),
m_repositoryLabel(new Utils::ElidingLabel(this)),
m_branchView(new Utils::NavigationTreeView(this)),
- m_model(new BranchModel(GitPlugin::client(), this)),
+ m_model(new BranchModel(GitClient::instance(), this)),
m_filterModel(new BranchFilterModel(this))
{
m_addButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
@@ -122,7 +122,7 @@ BranchView::BranchView() :
this, &BranchView::setIncludeOldEntries);
m_includeTagsAction->setCheckable(true);
m_includeTagsAction->setChecked(
- GitPlugin::client()->settings().boolValue(GitSettings::showTagsKey));
+ GitClient::instance()->settings().boolValue(GitSettings::showTagsKey));
connect(m_includeTagsAction, &QAction::toggled,
this, &BranchView::setIncludeTags);
@@ -214,12 +214,12 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
const Utils::optional<QString> remote = m_model->remoteName(index);
if (remote.has_value()) {
contextMenu.addAction(tr("&Fetch"), this, [this, &remote]() {
- GitPlugin::client()->fetch(m_repository, *remote);
+ GitClient::instance()->fetch(m_repository, *remote);
});
contextMenu.addSeparator();
if (!remote->isEmpty()) {
contextMenu.addAction(tr("Remove &Stale Branches"), this, [this, &remote]() {
- GitPlugin::client()->removeStaleRemoteBranches(m_repository, *remote);
+ GitClient::instance()->removeStaleRemoteBranches(m_repository, *remote);
});
contextMenu.addSeparator();
}
@@ -238,7 +238,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
contextMenu.addAction(tr("&Diff"), this, [this] {
const QString fullName = m_model->fullName(selectedIndex(), true);
if (!fullName.isEmpty())
- GitPlugin::client()->diffBranch(m_repository, fullName);
+ GitClient::instance()->diffBranch(m_repository, fullName);
});
contextMenu.addAction(tr("&Log"), this, [this] { log(selectedIndex()); });
contextMenu.addAction(tr("Reflo&g"), this, [this] { reflog(selectedIndex()); });
@@ -289,7 +289,7 @@ void BranchView::setIncludeOldEntries(bool filter)
void BranchView::setIncludeTags(bool includeTags)
{
- GitPlugin::client()->settings().setValue(GitSettings::showTagsKey, includeTags);
+ GitClient::instance()->settings().setValue(GitSettings::showTagsKey, includeTags);
refreshCurrentRepository();
}
@@ -365,7 +365,7 @@ bool BranchView::checkout()
' ' + nextBranch + "-AutoStash ";
BranchCheckoutDialog branchCheckoutDialog(this, currentBranch, nextBranch);
- GitClient *client = GitPlugin::client();
+ GitClient *client = GitClient::instance();
if (client->gitStatus(m_repository, StatusMode(NoUntracked | NoSubmodules)) != GitClient::StatusChanged)
branchCheckoutDialog.foundNoLocalChanges();
@@ -500,7 +500,7 @@ bool BranchView::reset(const QByteArray &resetType)
if (QMessageBox::question(this, tr("Git Reset"), tr("Reset branch \"%1\" to \"%2\"?")
.arg(currentName).arg(branchName),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
- GitPlugin::client()->reset(m_repository, QLatin1String("--" + resetType), branchName);
+ GitClient::instance()->reset(m_repository, QLatin1String("--" + resetType), branchName);
return true;
}
return false;
@@ -512,7 +512,7 @@ bool BranchView::isFastForwardMerge()
QTC_CHECK(selected != m_model->currentBranch());
const QString branch = m_model->fullName(selected, true);
- return GitPlugin::client()->isFastForwardMerge(m_repository, branch);
+ return GitClient::instance()->isFastForwardMerge(m_repository, branch);
}
bool BranchView::merge(bool allowFastForward)
@@ -523,7 +523,7 @@ bool BranchView::merge(bool allowFastForward)
QTC_CHECK(selected != m_model->currentBranch());
const QString branch = m_model->fullName(selected, true);
- GitClient *client = GitPlugin::client();
+ GitClient *client = GitClient::instance();
if (client->beginStashScope(m_repository, "merge", AllowUnstashed))
return client->synchronousMerge(m_repository, branch, allowFastForward);
@@ -538,7 +538,7 @@ void BranchView::rebase()
QTC_CHECK(selected != m_model->currentBranch());
const QString baseBranch = m_model->fullName(selected, true);
- GitClient *client = GitPlugin::client();
+ GitClient *client = GitClient::instance();
if (client->beginStashScope(m_repository, "rebase"))
client->rebase(m_repository, baseBranch);
}
@@ -551,21 +551,21 @@ bool BranchView::cherryPick()
QTC_CHECK(selected != m_model->currentBranch());
const QString branch = m_model->fullName(selected, true);
- return GitPlugin::client()->synchronousCherryPick(m_repository, branch);
+ return GitClient::instance()->synchronousCherryPick(m_repository, branch);
}
void BranchView::log(const QModelIndex &idx)
{
const QString branchName = m_model->fullName(idx, true);
if (!branchName.isEmpty())
- GitPlugin::client()->log(m_repository, QString(), false, {branchName});
+ GitClient::instance()->log(m_repository, QString(), false, {branchName});
}
void BranchView::reflog(const QModelIndex &idx)
{
const QString branchName = m_model->fullName(idx, true);
if (!branchName.isEmpty())
- GitPlugin::client()->reflog(m_repository, branchName);
+ GitClient::instance()->reflog(m_repository, branchName);
}
void BranchView::push()
@@ -581,7 +581,7 @@ void BranchView::push()
const QString remoteBranch = fullTargetName.mid(pos + 1);
const QStringList pushArgs = {remoteName, localBranch + ':' + remoteBranch};
- GitPlugin::client()->push(m_repository, pushArgs);
+ GitClient::instance()->push(m_repository, pushArgs);
}
BranchViewFactory::BranchViewFactory()
diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp
index c1cc46ce98..52f8c4762f 100644
--- a/src/plugins/git/changeselectiondialog.cpp
+++ b/src/plugins/git/changeselectiondialog.cpp
@@ -25,7 +25,6 @@
#include "changeselectiondialog.h"
#include "logchangedialog.h"
-#include "gitplugin.h"
#include "gitclient.h"
#include "ui_changeselectiondialog.h"
@@ -57,12 +56,12 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, Co
QWidget *parent) :
QDialog(parent), m_ui(new Ui::ChangeSelectionDialog)
{
- m_gitExecutable = GitPlugin::client()->vcsBinary();
+ m_gitExecutable = GitClient::instance()->vcsBinary();
m_ui->setupUi(this);
m_ui->workingDirectoryChooser->setExpectedKind(PathChooser::ExistingDirectory);
m_ui->workingDirectoryChooser->setPromptDialogTitle(tr("Select Git Directory"));
m_ui->workingDirectoryChooser->setPath(workingDirectory);
- m_gitEnvironment = GitPlugin::client()->processEnvironment();
+ m_gitEnvironment = GitClient::instance()->processEnvironment();
m_ui->changeNumberEdit->setFocus();
m_ui->changeNumberEdit->selectAll();
@@ -203,7 +202,7 @@ void ChangeSelectionDialog::recalculateCompletion()
if (workingDir.isEmpty())
return;
- GitClient *client = GitPlugin::client();
+ GitClient *client = GitClient::instance();
VcsBase::VcsCommand *command = client->asyncForEachRefCmd(
workingDir, {"--format=%(refname:short)"});
connect(this, &QObject::destroyed, command, &VcsBase::VcsCommand::abort);
diff --git a/src/plugins/git/gerrit/branchcombobox.cpp b/src/plugins/git/gerrit/branchcombobox.cpp
index 6cc866ce3f..bc7aa282df 100644
--- a/src/plugins/git/gerrit/branchcombobox.cpp
+++ b/src/plugins/git/gerrit/branchcombobox.cpp
@@ -24,7 +24,6 @@
****************************************************************************/
#include "branchcombobox.h"
-#include "../gitplugin.h"
#include "../gitclient.h"
using namespace Git::Internal;
@@ -36,7 +35,7 @@ BranchComboBox::BranchComboBox(QWidget *parent) : QComboBox(parent)
void BranchComboBox::init(const QString &repository)
{
m_repository = repository;
- QString currentBranch = GitPlugin::client()->synchronousCurrentLocalBranch(repository);
+ QString currentBranch = GitClient::instance()->synchronousCurrentLocalBranch(repository);
if (currentBranch.isEmpty()) {
m_detached = true;
currentBranch = "HEAD";
@@ -44,7 +43,7 @@ void BranchComboBox::init(const QString &repository)
}
QString output;
const QString branchPrefix("refs/heads/");
- if (!GitPlugin::client()->synchronousForEachRefCmd(
+ if (!GitClient::instance()->synchronousForEachRefCmd(
m_repository, {"--format=%(refname)", branchPrefix}, &output)) {
return;
}
diff --git a/src/plugins/git/gerrit/gerritmodel.cpp b/src/plugins/git/gerrit/gerritmodel.cpp
index a9be6358cc..c5e346aaa6 100644
--- a/src/plugins/git/gerrit/gerritmodel.cpp
+++ b/src/plugins/git/gerrit/gerritmodel.cpp
@@ -24,7 +24,6 @@
****************************************************************************/
#include "gerritmodel.h"
-#include "../gitplugin.h"
#include "../gitclient.h"
#include <coreplugin/progressmanager/progressmanager.h>
@@ -295,7 +294,7 @@ QueryContext::QueryContext(const QString &query,
connect(&m_process, &QProcess::errorOccurred, this, &QueryContext::processError);
connect(&m_watcher, &QFutureWatcherBase::canceled, this, &QueryContext::terminate);
m_watcher.setFuture(m_progress.future());
- m_process.setProcessEnvironment(Git::Internal::GitPlugin::client()->processEnvironment());
+ m_process.setProcessEnvironment(Git::Internal::GitClient::instance()->processEnvironment());
m_progress.setProgressRange(0, 1);
m_timer.setInterval(timeOutMS);
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp
index 656f1e34f7..85d414b9b9 100644
--- a/src/plugins/git/gerrit/gerritplugin.cpp
+++ b/src/plugins/git/gerrit/gerritplugin.cpp
@@ -148,7 +148,7 @@ FetchContext::FetchContext(const QSharedPointer<GerritChange> &change,
connect(&m_watcher, &QFutureWatcher<void>::canceled, this, &FetchContext::terminate);
m_watcher.setFuture(m_progress.future());
m_process.setWorkingDirectory(repository);
- m_process.setProcessEnvironment(GitPlugin::client()->processEnvironment());
+ m_process.setProcessEnvironment(GitClient::instance()->processEnvironment());
m_process.closeWriteChannel();
}
@@ -240,7 +240,7 @@ void FetchContext::show()
{
const QString title = QString::number(m_change->number) + '/'
+ QString::number(m_change->currentPatchSet.patchSetNumber);
- GitPlugin::client()->show(m_repository, "FETCH_HEAD", title);
+ GitClient::instance()->show(m_repository, "FETCH_HEAD", title);
}
void FetchContext::cherryPick()
@@ -248,12 +248,12 @@ void FetchContext::cherryPick()
// Point user to errors.
VcsBase::VcsOutputWindow::instance()->popup(IOutputPane::ModeSwitch
| IOutputPane::WithFocus);
- GitPlugin::client()->synchronousCherryPick(m_repository, "FETCH_HEAD");
+ GitClient::instance()->synchronousCherryPick(m_repository, "FETCH_HEAD");
}
void FetchContext::checkout()
{
- GitPlugin::client()->checkout(m_repository, "FETCH_HEAD");
+ GitClient::instance()->checkout(m_repository, "FETCH_HEAD");
}
void FetchContext::terminate()
@@ -328,7 +328,7 @@ void GerritPlugin::push(const QString &topLevel)
dialog.storeTopic();
m_reviewers = dialog.reviewers();
- GitPlugin::client()->push(topLevel, {dialog.selectedRemoteName(), dialog.pushTarget()});
+ GitClient::instance()->push(topLevel, {dialog.selectedRemoteName(), dialog.pushTarget()});
}
static QString currentRepository()
@@ -375,19 +375,19 @@ void GerritPlugin::push()
Utils::FilePath GerritPlugin::gitBinDirectory()
{
- return GitPlugin::client()->gitBinDirectory();
+ return GitClient::instance()->gitBinDirectory();
}
// Find the branch of a repository.
QString GerritPlugin::branch(const QString &repository)
{
- return GitPlugin::client()->synchronousCurrentLocalBranch(repository);
+ return GitClient::instance()->synchronousCurrentLocalBranch(repository);
}
void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
{
// Locate git.
- const Utils::FilePath git = GitPlugin::client()->vcsBinary();
+ const Utils::FilePath git = GitClient::instance()->vcsBinary();
if (git.isEmpty()) {
VcsBase::VcsOutputWindow::appendError(tr("Git is not available."));
return;
@@ -400,7 +400,7 @@ void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
if (!repository.isEmpty()) {
// Check if remote from a working dir is the same as remote from patch
- QMap<QString, QString> remotesList = GitPlugin::client()->synchronousRemotesList(repository);
+ QMap<QString, QString> remotesList = GitClient::instance()->synchronousRemotesList(repository);
if (!remotesList.isEmpty()) {
const QStringList remotes = remotesList.values();
for (QString remote : remotes) {
@@ -413,7 +413,7 @@ void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
}
if (!verifiedRepository) {
- const SubmoduleDataMap submodules = GitPlugin::client()->submoduleList(repository);
+ const SubmoduleDataMap submodules = GitClient::instance()->submoduleList(repository);
for (const SubmoduleData &submoduleData : submodules) {
QString remote = submoduleData.url;
if (remote.endsWith(".git"))
diff --git a/src/plugins/git/gerrit/gerritpushdialog.cpp b/src/plugins/git/gerrit/gerritpushdialog.cpp
index 08c280fc90..ddd45134f7 100644
--- a/src/plugins/git/gerrit/gerritpushdialog.cpp
+++ b/src/plugins/git/gerrit/gerritpushdialog.cpp
@@ -27,7 +27,6 @@
#include "ui_gerritpushdialog.h"
#include "branchcombobox.h"
-#include "../gitplugin.h"
#include "../gitclient.h"
#include "../gitconstants.h"
@@ -70,7 +69,7 @@ QString GerritPushDialog::determineRemoteBranch(const QString &localBranch)
QString output;
QString error;
- if (!GitPlugin::client()->synchronousBranchCmd(
+ if (!GitClient::instance()->synchronousBranchCmd(
m_workingDir, {"-r", "--contains", earliestCommit + '^'}, &output, &error)) {
return QString();
}
@@ -79,7 +78,7 @@ QString GerritPushDialog::determineRemoteBranch(const QString &localBranch)
QString remoteTrackingBranch;
if (localBranch != "HEAD")
- remoteTrackingBranch = GitPlugin::client()->synchronousTrackingBranch(m_workingDir, localBranch);
+ remoteTrackingBranch = GitClient::instance()->synchronousTrackingBranch(m_workingDir, localBranch);
QString remoteBranch;
for (const QString &reference : refs) {
@@ -103,7 +102,7 @@ void GerritPushDialog::initRemoteBranches()
const QString head = "/HEAD";
QString remotesPrefix("refs/remotes/");
- if (!GitPlugin::client()->synchronousForEachRefCmd(
+ if (!GitClient::instance()->synchronousForEachRefCmd(
m_workingDir, {"--format=%(refname)\t%(committerdate:raw)", remotesPrefix}, &output)) {
return;
}
@@ -186,8 +185,8 @@ QString GerritPushDialog::calculateChangeRange(const QString &branch)
QString number;
QString error;
- GitPlugin::client()->synchronousRevListCmd(m_workingDir, { remote + ".." + branch, "--count" },
- &number, &error);
+ GitClient::instance()->synchronousRevListCmd(
+ m_workingDir, { remote + ".." + branch, "--count" }, &number, &error);
number.chop(1);
return number;
@@ -303,8 +302,8 @@ QString GerritPushDialog::pushTarget() const
void GerritPushDialog::storeTopic()
{
const QString branch = m_ui->localBranchComboBox->currentText();
- GitPlugin::client()->setConfigValue(m_workingDir, QString("branch.%1.topic").arg(branch),
- selectedTopic());
+ GitClient::instance()->setConfigValue(
+ m_workingDir, QString("branch.%1.topic").arg(branch), selectedTopic());
}
void GerritPushDialog::setRemoteBranches(bool includeOld)
@@ -316,7 +315,7 @@ void GerritPushDialog::setRemoteBranches(bool includeOld)
const QString remoteName = selectedRemoteName();
if (!m_remoteBranches.contains(remoteName)) {
const QStringList remoteBranches =
- GitPlugin::client()->synchronousRepositoryBranches(remoteName, m_workingDir);
+ GitClient::instance()->synchronousRepositoryBranches(remoteName, m_workingDir);
for (const QString &branch : remoteBranches)
m_remoteBranches.insertMulti(remoteName, qMakePair(branch, QDate()));
if (remoteBranches.isEmpty()) {
@@ -354,7 +353,7 @@ void GerritPushDialog::updateCommits(int index)
{
const QString branch = m_ui->localBranchComboBox->itemText(index);
m_hasLocalCommits = m_ui->commitView->init(m_workingDir, branch, LogChangeWidget::Silent);
- QString topic = GitPlugin::client()->readConfigValue(
+ QString topic = GitClient::instance()->readConfigValue(
m_workingDir, QString("branch.%1.topic").arg(branch));
if (!topic.isEmpty())
m_ui->topicLineEdit->setText(topic);
diff --git a/src/plugins/git/gerrit/gerritremotechooser.cpp b/src/plugins/git/gerrit/gerritremotechooser.cpp
index 8e5e7cd882..6b94bcd238 100644
--- a/src/plugins/git/gerrit/gerritremotechooser.cpp
+++ b/src/plugins/git/gerrit/gerritremotechooser.cpp
@@ -27,7 +27,6 @@
#include "gerritparameters.h"
#include "gerritserver.h"
#include "../gitclient.h"
-#include "../gitplugin.h"
#include <utils/qtcassert.h>
#include <utils/utilsicons.h>
@@ -104,7 +103,7 @@ bool GerritRemoteChooser::updateRemotes(bool forceReload)
m_remotes.clear();
QString errorMessage; // Mute errors. We'll just fallback to the defaults
const QMap<QString, QString> remotesList =
- Git::Internal::GitPlugin::client()->synchronousRemotesList(m_repository, &errorMessage);
+ Git::Internal::GitClient::instance()->synchronousRemotesList(m_repository, &errorMessage);
for (auto mapIt = remotesList.cbegin(), end = remotesList.cend(); mapIt != end; ++mapIt) {
GerritServer server;
if (!server.fillFromRemote(mapIt.value(), *m_parameters, forceReload))
diff --git a/src/plugins/git/gerrit/gerritserver.cpp b/src/plugins/git/gerrit/gerritserver.cpp
index f2fae53d51..a0a6a65046 100644
--- a/src/plugins/git/gerrit/gerritserver.cpp
+++ b/src/plugins/git/gerrit/gerritserver.cpp
@@ -241,7 +241,7 @@ QStringList GerritServer::curlArguments() const
int GerritServer::testConnection()
{
- static GitClient *const client = GitPlugin::client();
+ static GitClient *const client = GitClient::instance();
const QStringList arguments = curlArguments() << (url(RestUrl) + accountUrlC);
const SynchronousProcessResponse resp = client->vcsFullySynchronousExec(
QString(), {curlBinary, arguments},
@@ -333,7 +333,7 @@ bool GerritServer::resolveRoot()
void GerritServer::resolveVersion(const GerritParameters &p, bool forceReload)
{
- static GitClient *const client = GitPlugin::client();
+ static GitClient *const client = GitClient::instance();
QSettings *settings = Core::ICore::settings();
const QString fullVersionKey = "Gerrit/" + host + '/' + versionKey;
version = settings->value(fullVersionKey).toString();
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 005e0e66f8..8608d947e1 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -106,6 +106,8 @@ using namespace VcsBase;
namespace Git {
namespace Internal {
+static GitClient *m_instance = nullptr;
+
// Suppress git diff warnings about "LF will be replaced by CRLF..." on Windows.
static unsigned diffExecutionFlags()
{
@@ -300,7 +302,7 @@ void GitDiffEditorController::updateBranchList()
return;
const QString workingDirectory = baseDirectory();
- VcsCommand *command = GitPlugin::client()->vcsExec(
+ VcsCommand *command = m_instance->vcsExec(
workingDirectory, {"branch", noColorOption, "-a", "--contains", revision}, nullptr,
false, 0, workingDirectory);
connect(command, &VcsCommand::stdOutText, this, [this](const QString &text) {
@@ -375,7 +377,7 @@ QStringList GitDiffEditorController::addHeadWhenCommandInProgress() const
// This is workaround for lack of support for merge commits and resolving conflicts,
// we compare the current state of working tree to the HEAD of current branch
// instead of showing unsupported combined diff format.
- GitClient::CommandInProgress commandInProgress = GitPlugin::client()->checkCommandInProgress(workingDirectory());
+ GitClient::CommandInProgress commandInProgress = m_instance->checkCommandInProgress(workingDirectory());
if (commandInProgress != GitClient::NoCommand)
return {HEAD};
return QStringList();
@@ -478,7 +480,7 @@ public:
setReloader([this] {
m_state = GettingDescription;
const QStringList args = {"show", "-s", noColorOption, showFormatC, m_id};
- runCommand({args}, GitPlugin::client()->encoding(workingDirectory(), "i18n.commitEncoding"));
+ runCommand({args}, m_instance->encoding(workingDirectory(), "i18n.commitEncoding"));
setStartupFile(VcsBase::source(this->document()));
});
}
@@ -495,7 +497,7 @@ void ShowController::processCommandOutput(const QString &output)
{
QTC_ASSERT(m_state != Idle, return);
if (m_state == GettingDescription) {
- setDescription(GitPlugin::client()->extendedShowDescription(workingDirectory(), output));
+ setDescription(m_instance->extendedShowDescription(workingDirectory(), output));
// stage 2
m_state = GettingDiff;
const QStringList args = {"show", "--format=format:", // omit header, already generated
@@ -669,12 +671,11 @@ private:
{
// If interactive rebase editor window is closed, plugin is terminated
// but referenced here when the command ends
- GitClient *client = GitPlugin::client();
if (m_commit.isEmpty() && m_files.isEmpty()) {
- if (client->checkCommandInProgress(m_workingDirectory) == GitClient::NoCommand)
- client->endStashScope(m_workingDirectory);
+ if (m_instance->checkCommandInProgress(m_workingDirectory) == GitClient::NoCommand)
+ m_instance->endStashScope(m_workingDirectory);
} else {
- client->handleMergeConflicts(m_workingDirectory, m_commit, m_files, m_abortCommand);
+ m_instance->handleMergeConflicts(m_workingDirectory, m_commit, m_files, m_abortCommand);
}
}
@@ -763,11 +764,17 @@ GitClient::GitClient(GitSettings *settings) : VcsBase::VcsBaseClientImpl(setting
m_cachedGitVersion(0),
m_disableEditor(false)
{
+ m_instance = this;
m_gitQtcEditor = QString::fromLatin1("\"%1\" -client -block -pid %2")
.arg(QCoreApplication::applicationFilePath())
.arg(QCoreApplication::applicationPid());
}
+GitClient *GitClient::instance()
+{
+ return m_instance;
+}
+
QString GitClient::findRepositoryForDirectory(const QString &directory) const
{
if (directory.isEmpty() || directory.endsWith("/.git") || directory.contains("/.git/"))
@@ -3476,8 +3483,8 @@ bool GitClient::StashInfo::init(const QString &workingDirectory, const QString &
m_pushAction = pushAction;
QString errorMessage;
QString statusOutput;
- switch (GitPlugin::client()->gitStatus(m_workingDir, StatusMode(NoUntracked | NoSubmodules),
- &statusOutput, &errorMessage)) {
+ switch (m_instance->gitStatus(m_workingDir, StatusMode(NoUntracked | NoSubmodules),
+ &statusOutput, &errorMessage)) {
case GitClient::StatusChanged:
if (m_flags & NoPrompt)
executeStash(command, &errorMessage);
@@ -3529,14 +3536,14 @@ void GitClient::StashInfo::stashPrompt(const QString &command, const QString &st
msgBox.exec();
if (msgBox.clickedButton() == discardButton) {
- m_stashResult = GitPlugin::client()->synchronousReset(m_workingDir, QStringList(), errorMessage) ?
+ m_stashResult = m_instance->synchronousReset(m_workingDir, QStringList(), errorMessage) ?
StashUnchanged : StashFailed;
} else if (msgBox.clickedButton() == ignoreButton) { // At your own risk, so.
m_stashResult = NotStashed;
} else if (msgBox.clickedButton() == cancelButton) {
m_stashResult = StashCanceled;
} else if (msgBox.clickedButton() == stashButton) {
- const bool result = GitPlugin::client()->executeSynchronousStash(
+ const bool result = m_instance->executeSynchronousStash(
m_workingDir, creatorStashMessage(command), false, errorMessage);
m_stashResult = result ? StashUnchanged : StashFailed;
} else if (msgBox.clickedButton() == stashAndPopButton) {
@@ -3547,7 +3554,7 @@ void GitClient::StashInfo::stashPrompt(const QString &command, const QString &st
void GitClient::StashInfo::executeStash(const QString &command, QString *errorMessage)
{
m_message = creatorStashMessage(command);
- if (!GitPlugin::client()->executeSynchronousStash(m_workingDir, m_message, false, errorMessage))
+ if (!m_instance->executeSynchronousStash(m_workingDir, m_message, false, errorMessage))
m_stashResult = StashFailed;
else
m_stashResult = Stashed;
@@ -3570,12 +3577,12 @@ void GitClient::StashInfo::end()
{
if (m_stashResult == Stashed) {
QString stashName;
- if (GitPlugin::client()->stashNameFromMessage(m_workingDir, m_message, &stashName))
- GitPlugin::client()->stashPop(m_workingDir, stashName);
+ if (m_instance->stashNameFromMessage(m_workingDir, m_message, &stashName))
+ m_instance->stashPop(m_workingDir, stashName);
}
if (m_pushAction == NormalPush)
- GitPlugin::client()->push(m_workingDir);
+ m_instance->push(m_workingDir);
else if (m_pushAction == PushToGerrit)
GitPlugin::gerritPush(m_workingDir);
@@ -3589,6 +3596,55 @@ GitRemote::GitRemote(const QString &location) : Core::IVersionControl::RepoUrl(l
isValid = QDir(path).exists() || QDir(path + ".git").exists();
}
+void GitClient::addChangeActions(QMenu *menu, const QString &workingDir, const QString &change)
+{
+ menu->addAction(tr("Cherr&y-Pick Change %1").arg(change), [workingDir, change] {
+ m_instance->synchronousCherryPick(workingDir, change);
+ });
+ menu->addAction(tr("Re&vert Change %1").arg(change), [workingDir, change] {
+ m_instance->synchronousRevert(workingDir, change);
+ });
+ menu->addAction(tr("C&heckout Change %1").arg(change), [workingDir, change] {
+ m_instance->checkout(workingDir, change);
+ });
+ connect(menu->addAction(tr("&Interactive Rebase from Change %1...").arg(change)),
+ &QAction::triggered, [workingDir, change] {
+ GitPlugin::startRebaseFromCommit(workingDir, change);
+ });
+ menu->addAction(tr("&Log for Change %1").arg(change), [workingDir, change] {
+ m_instance->log(workingDir, QString(), false, {change});
+ });
+ menu->addAction(tr("Add &Tag for Change %1...").arg(change), [workingDir, change] {
+ QString output;
+ QString errorMessage;
+ m_instance->synchronousTagCmd(workingDir, QStringList(),
+ &output, &errorMessage);
+
+ const QStringList tags = output.split('\n');
+ BranchAddDialog dialog(tags, BranchAddDialog::Type::AddTag, Core::ICore::dialogParent());
+
+ if (dialog.exec() == QDialog::Rejected)
+ return;
+
+ m_instance->synchronousTagCmd(workingDir,
+ {dialog.branchName(), change},
+ &output, &errorMessage);
+ VcsOutputWindow::append(output);
+ if (!errorMessage.isEmpty())
+ VcsOutputWindow::append(errorMessage, VcsOutputWindow::MessageStyle::Error);
+ });
+
+ auto resetChange = [workingDir, change](const QByteArray &resetType) {
+ m_instance->reset(
+ workingDir, QLatin1String("--" + resetType), change);
+ };
+ auto resetMenu = new QMenu(tr("&Reset to Change %1").arg(change), menu);
+ resetMenu->addAction(tr("&Hard"), std::bind(resetChange, "hard"));
+ resetMenu->addAction(tr("&Mixed"), std::bind(resetChange, "mixed"));
+ resetMenu->addAction(tr("&Soft"), std::bind(resetChange, "soft"));
+ menu->addMenu(resetMenu);
+}
+
} // namespace Internal
} // namespace Git
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index 447238888a..c159fb3137 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -139,6 +139,7 @@ public:
};
explicit GitClient(GitSettings *settings);
+ static GitClient *instance();
Utils::FilePath vcsBinary() const override;
unsigned gitVersion(QString *errorMessage = nullptr) const;
@@ -352,6 +353,9 @@ public:
VcsBase::VcsCommand *asyncUpstreamStatus(const QString &workingDirectory,
const QString &branch, const QString &upstream);
+
+ static void addChangeActions(QMenu *menu, const QString &workingDir, const QString &change);
+
private:
void finishSubmoduleUpdate();
void chunkActionsRequested(QMenu *menu, int fileIndex, int chunkIndex,
diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp
index 47546d0df6..3646395596 100644
--- a/src/plugins/git/giteditor.cpp
+++ b/src/plugins/git/giteditor.cpp
@@ -152,7 +152,7 @@ static QString sanitizeBlameOutput(const QString &b)
if (b.isEmpty())
return b;
- const bool omitDate = GitPlugin::client()->settings().boolValue(
+ const bool omitDate = GitClient::instance()->settings().boolValue(
GitSettings::omitAnnotationDateKey);
const QChar space(' ');
const int parenPos = b.indexOf(')');
@@ -216,12 +216,6 @@ void GitEditorWidget::setPlainText(const QString &text)
textDocument()->setPlainText(modText);
}
-void GitEditorWidget::resetChange(const QByteArray &resetType)
-{
- GitPlugin::client()->reset(
- sourceWorkingDirectory(), QLatin1String("--" + resetType), m_currentChange);
-}
-
void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert)
{
Utils::TemporaryFile patchFile("git-apply-chunk");
@@ -237,7 +231,7 @@ void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert)
if (revert)
args << "--reverse";
QString errorMessage;
- if (GitPlugin::client()->synchronousApplyPatch(baseDir, patchFile.fileName(), &errorMessage, args)) {
+ if (GitClient::instance()->synchronousApplyPatch(baseDir, patchFile.fileName(), &errorMessage, args)) {
if (errorMessage.isEmpty())
VcsOutputWindow::append(tr("Chunk successfully staged"));
else
@@ -286,14 +280,14 @@ void GitEditorWidget::aboutToOpen(const QString &fileName, const QString &realFi
const QString gitPath = fi.absolutePath();
setSource(gitPath);
textDocument()->setCodec(
- GitPlugin::client()->encoding(gitPath, "i18n.commitEncoding"));
+ GitClient::instance()->encoding(gitPath, "i18n.commitEncoding"));
}
}
QString GitEditorWidget::decorateVersion(const QString &revision) const
{
// Format verbose, SHA1 being first token
- return GitPlugin::client()->synchronousShortDescription(sourceWorkingDirectory(), revision);
+ return GitClient::instance()->synchronousShortDescription(sourceWorkingDirectory(), revision);
}
QStringList GitEditorWidget::annotationPreviousVersions(const QString &revision) const
@@ -301,8 +295,8 @@ QStringList GitEditorWidget::annotationPreviousVersions(const QString &revision)
QStringList revisions;
QString errorMessage;
// Get the SHA1's of the file.
- if (!GitPlugin::client()->synchronousParentRevisions(sourceWorkingDirectory(),
- revision, &revisions, &errorMessage)) {
+ if (!GitClient::instance()->synchronousParentRevisions(
+ sourceWorkingDirectory(), revision, &revisions, &errorMessage)) {
VcsOutputWindow::appendSilently(errorMessage);
return QStringList();
}
@@ -311,56 +305,13 @@ QStringList GitEditorWidget::annotationPreviousVersions(const QString &revision)
bool GitEditorWidget::isValidRevision(const QString &revision) const
{
- return GitPlugin::client()->isValidRevision(revision);
+ return GitClient::instance()->isValidRevision(revision);
}
void GitEditorWidget::addChangeActions(QMenu *menu, const QString &change)
{
- m_currentChange = change;
- if (contentType() == OtherContent)
- return;
-
- menu->addAction(tr("Cherr&y-Pick Change %1").arg(change), this, [this] {
- GitPlugin::client()->synchronousCherryPick(sourceWorkingDirectory(), m_currentChange);
- });
- menu->addAction(tr("Re&vert Change %1").arg(change), this, [this] {
- GitPlugin::client()->synchronousRevert(sourceWorkingDirectory(), m_currentChange);
- });
- menu->addAction(tr("C&heckout Change %1").arg(change), this, [this] {
- GitPlugin::client()->checkout(sourceWorkingDirectory(), m_currentChange);
- });
- connect(menu->addAction(tr("&Interactive Rebase from Change %1...").arg(change)),
- &QAction::triggered, this, [this] {
- GitPlugin::startRebaseFromCommit(sourceWorkingDirectory(), m_currentChange);
- });
- menu->addAction(tr("&Log for Change %1").arg(change), this, [this] {
- GitPlugin::client()->log(sourceWorkingDirectory(), QString(), false, {m_currentChange});
- });
- menu->addAction(tr("Add &Tag for Change %1...").arg(change), this, [this] {
- QString output;
- QString errorMessage;
- GitPlugin::client()->synchronousTagCmd(sourceWorkingDirectory(), QStringList(),
- &output, &errorMessage);
-
- const QStringList tags = output.split('\n');
- BranchAddDialog dialog(tags, BranchAddDialog::Type::AddTag, Core::ICore::dialogParent());
-
- if (dialog.exec() == QDialog::Rejected)
- return;
-
- GitPlugin::client()->synchronousTagCmd(sourceWorkingDirectory(),
- {dialog.branchName(), m_currentChange},
- &output, &errorMessage);
- VcsOutputWindow::append(output);
- if (!errorMessage.isEmpty())
- VcsOutputWindow::append(errorMessage, VcsOutputWindow::MessageStyle::Error);
- });
-
- auto resetMenu = new QMenu(tr("&Reset to Change %1").arg(change), menu);
- resetMenu->addAction(tr("&Hard"), this, [this] { resetChange("hard"); });
- resetMenu->addAction(tr("&Mixed"), this, [this] { resetChange("mixed"); });
- resetMenu->addAction(tr("&Soft"), this, [this] { resetChange("soft"); });
- menu->addMenu(resetMenu);
+ if (contentType() != OtherContent)
+ GitClient::addChangeActions(menu, change, sourceWorkingDirectory());
}
QString GitEditorWidget::revisionSubject(const QTextBlock &inBlock) const
diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h
index 18397d9497..0377c2d680 100644
--- a/src/plugins/git/giteditor.h
+++ b/src/plugins/git/giteditor.h
@@ -58,7 +58,6 @@ private:
void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert);
void init() override;
- void resetChange(const QByteArray &resetType);
void addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk) override;
void aboutToOpen(const QString &fileName, const QString &realFileName) override;
QString changeUnderCursor(const QTextCursor &) const override;
@@ -73,7 +72,6 @@ private:
QString sourceWorkingDirectory() const;
mutable QRegExp m_changeNumberPattern;
- QString m_currentChange;
GitLogFilterWidget *m_logFilterWidget = nullptr;
};
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index 66e249fbf7..c413c6c231 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -26,7 +26,6 @@
#include "gitgrep.h"
#include "gitclient.h"
#include "gitconstants.h"
-#include "gitplugin.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
@@ -187,7 +186,7 @@ public:
return QString(":!" + filter);
});
arguments << "--" << filterArgs << exclusionArgs;
- QScopedPointer<VcsCommand> command(GitPlugin::client()->createCommand(m_directory));
+ QScopedPointer<VcsCommand> command(GitClient::instance()->createCommand(m_directory));
command->addFlags(VcsCommand::SilentOutput | VcsCommand::SuppressFailMessage);
command->setProgressiveOutput(true);
QFutureWatcher<FileSearchResultList> watcher;
@@ -195,7 +194,7 @@ public:
connect(&watcher, &QFutureWatcher<FileSearchResultList>::canceled,
command.data(), &VcsCommand::cancel);
connect(command.data(), &VcsCommand::stdOutText, this, &GitGrepRunner::read);
- SynchronousProcessResponse resp = command->runCommand({GitPlugin::client()->vcsBinary(), arguments}, 0);
+ SynchronousProcessResponse resp = command->runCommand({GitClient::instance()->vcsBinary(), arguments}, 0);
switch (resp.result) {
case SynchronousProcessResponse::TerminatedAbnormally:
case SynchronousProcessResponse::StartFailed:
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 55f71643c4..be99e377d2 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -1760,11 +1760,11 @@ void GitPluginPrivate::updateCurrentBranch()
QObject *GitPlugin::remoteCommand(const QStringList &options, const QString &workingDirectory,
const QStringList &)
{
- if (!GitPlugin::client() || options.size() < 2)
+ if (options.size() < 2)
return nullptr;
if (options.first() == "-git-show")
- GitPlugin::client()->show(workingDirectory, options.at(1));
+ dd->m_gitClient.show(workingDirectory, options.at(1));
return nullptr;
}
diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp
index 35f7892dd6..ebba5b19f3 100644
--- a/src/plugins/git/gitsubmiteditor.cpp
+++ b/src/plugins/git/gitsubmiteditor.cpp
@@ -88,8 +88,8 @@ CommitDataFetchResult CommitDataFetchResult::fetch(CommitType commitType, const
CommitDataFetchResult result;
result.commitData.commitType = commitType;
QString commitTemplate;
- result.success = GitPlugin::client()->getCommitData(workingDirectory, &commitTemplate,
- result.commitData, &result.errorMessage);
+ result.success = GitClient::instance()->getCommitData(
+ workingDirectory, &commitTemplate, result.commitData, &result.errorMessage);
return result;
}
@@ -202,15 +202,15 @@ void GitSubmitEditor::slotDiffSelected(const QList<int> &rows)
}
}
if (!unstagedFiles.empty() || !stagedFiles.empty())
- GitPlugin::client()->diffFiles(m_workingDirectory, unstagedFiles, stagedFiles);
+ GitClient::instance()->diffFiles(m_workingDirectory, unstagedFiles, stagedFiles);
if (!unmergedFiles.empty())
- GitPlugin::client()->merge(m_workingDirectory, unmergedFiles);
+ GitClient::instance()->merge(m_workingDirectory, unmergedFiles);
}
void GitSubmitEditor::showCommit(const QString &commit)
{
if (!m_workingDirectory.isEmpty())
- GitPlugin::client()->show(m_workingDirectory, commit);
+ GitClient::instance()->show(m_workingDirectory, commit);
}
void GitSubmitEditor::updateFileModel()
@@ -230,7 +230,7 @@ void GitSubmitEditor::updateFileModel()
Core::ProgressManager::addTask(m_fetchWatcher.future(), tr("Refreshing Commit Data"),
TASK_UPDATE_COMMIT);
- GitPlugin::client()->addFuture(m_fetchWatcher.future());
+ GitClient::instance()->addFuture(m_fetchWatcher.future());
}
void GitSubmitEditor::forceUpdateFileModel()
diff --git a/src/plugins/git/logchangedialog.cpp b/src/plugins/git/logchangedialog.cpp
index 25c59bbcb7..d4b0a9602d 100644
--- a/src/plugins/git/logchangedialog.cpp
+++ b/src/plugins/git/logchangedialog.cpp
@@ -24,7 +24,6 @@
****************************************************************************/
#include "logchangedialog.h"
-#include "gitplugin.h"
#include "gitclient.h"
#include <vcsbase/vcsoutputwindow.h>
@@ -79,7 +78,7 @@ bool LogChangeWidget::init(const QString &repository, const QString &commit, Log
return true;
if (!(flags & Silent)) {
VcsOutputWindow::appendError(
- GitPlugin::client()->msgNoCommits(flags & IncludeRemotes));
+ GitClient::instance()->msgNoCommits(flags & IncludeRemotes));
}
return false;
}
@@ -159,8 +158,10 @@ bool LogChangeWidget::populateLog(const QString &repository, const QString &comm
arguments << "--not" << "--remotes";
arguments << "--";
QString output;
- if (!GitPlugin::client()->synchronousLog(repository, arguments, &output, nullptr, VcsCommand::NoOutput))
+ if (!GitClient::instance()->synchronousLog(
+ repository, arguments, &output, nullptr, VcsCommand::NoOutput)) {
return false;
+ }
const QStringList lines = output.split('\n');
for (const QString &line : lines) {
const int colonPos = line.indexOf(':');
@@ -211,8 +212,8 @@ LogChangeDialog::LogChangeDialog(bool isReset, QWidget *parent) :
m_resetTypeComboBox->addItem(tr("Hard"), "--hard");
m_resetTypeComboBox->addItem(tr("Mixed"), "--mixed");
m_resetTypeComboBox->addItem(tr("Soft"), "--soft");
- m_resetTypeComboBox->setCurrentIndex(GitPlugin::client()->settings().intValue(
- GitSettings::lastResetIndexKey));
+ m_resetTypeComboBox->setCurrentIndex(
+ GitClient::instance()->settings().intValue(GitSettings::lastResetIndexKey));
popUpLayout->addWidget(m_resetTypeComboBox);
popUpLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
}
@@ -239,8 +240,8 @@ bool LogChangeDialog::runDialog(const QString &repository,
if (QDialog::exec() == QDialog::Accepted) {
if (m_resetTypeComboBox) {
- GitPlugin::client()->settings().setValue(GitSettings::lastResetIndexKey,
- m_resetTypeComboBox->currentIndex());
+ GitClient::instance()->settings().setValue(
+ GitSettings::lastResetIndexKey, m_resetTypeComboBox->currentIndex());
}
return true;
}
diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp
index d951200784..adc5d1ce7b 100644
--- a/src/plugins/git/mergetool.cpp
+++ b/src/plugins/git/mergetool.cpp
@@ -60,7 +60,7 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
m_process->setWorkingDirectory(workingDirectory);
m_process->setProcessEnvironment(env);
m_process->setProcessChannelMode(QProcess::MergedChannels);
- const Utils::FilePath binary = GitPlugin::client()->vcsBinary();
+ const Utils::FilePath binary = GitClient::instance()->vcsBinary();
VcsOutputWindow::appendCommand(workingDirectory, {binary, arguments});
m_process->start(binary.toString(), arguments);
if (m_process->waitForStarted()) {
@@ -263,7 +263,7 @@ void MergeTool::done()
VcsOutputWindow::appendError(tr("Merge tool process terminated with exit code %1")
.arg(exitCode));
}
- GitPlugin::client()->continueCommandIfNeeded(workingDirectory, exitCode == 0);
+ GitClient::instance()->continueCommandIfNeeded(workingDirectory, exitCode == 0);
GitPlugin::emitRepositoryChanged(workingDirectory);
deleteLater();
}
diff --git a/src/plugins/git/remotedialog.cpp b/src/plugins/git/remotedialog.cpp
index b0e629f064..912c1be4d9 100644
--- a/src/plugins/git/remotedialog.cpp
+++ b/src/plugins/git/remotedialog.cpp
@@ -203,7 +203,7 @@ void RemoteDialog::pushToRemote()
const int row = indexList.at(0).row();
const QString remoteName = m_remoteModel->remoteName(row);
- GitPlugin::client()->push(m_remoteModel->workingDirectory(), {remoteName});
+ GitClient::instance()->push(m_remoteModel->workingDirectory(), {remoteName});
}
void RemoteDialog::fetchFromRemote()
@@ -214,7 +214,7 @@ void RemoteDialog::fetchFromRemote()
int row = indexList.at(0).row();
const QString remoteName = m_remoteModel->remoteName(row);
- GitPlugin::client()->fetch(m_remoteModel->workingDirectory(), remoteName);
+ GitClient::instance()->fetch(m_remoteModel->workingDirectory(), remoteName);
}
void RemoteDialog::updateButtonState()
diff --git a/src/plugins/git/remotemodel.cpp b/src/plugins/git/remotemodel.cpp
index 0a0f30c1b4..da2e2fe2d7 100644
--- a/src/plugins/git/remotemodel.cpp
+++ b/src/plugins/git/remotemodel.cpp
@@ -24,7 +24,6 @@
****************************************************************************/
#include "remotemodel.h"
-#include "gitplugin.h"
#include "gitclient.h"
#include <utils/algorithm.h>
@@ -55,7 +54,7 @@ bool RemoteModel::removeRemote(int row)
{
QString output;
QString error;
- bool success = GitPlugin::client()->synchronousRemoteCmd(
+ bool success = GitClient::instance()->synchronousRemoteCmd(
m_workingDirectory, {"rm", remoteName(row)}, &output, &error);
if (success)
success = refresh(m_workingDirectory, &error);
@@ -69,7 +68,7 @@ bool RemoteModel::addRemote(const QString &name, const QString &url)
if (name.isEmpty() || url.isEmpty())
return false;
- bool success = GitPlugin::client()->synchronousRemoteCmd(
+ bool success = GitClient::instance()->synchronousRemoteCmd(
m_workingDirectory, {"add", name, url}, &output, &error);
if (success)
success = refresh(m_workingDirectory, &error);
@@ -80,7 +79,7 @@ bool RemoteModel::renameRemote(const QString &oldName, const QString &newName)
{
QString output;
QString error;
- bool success = GitPlugin::client()->synchronousRemoteCmd(
+ bool success = GitClient::instance()->synchronousRemoteCmd(
m_workingDirectory, {"rename", oldName, newName}, &output, &error);
if (success)
success = refresh(m_workingDirectory, &error);
@@ -91,7 +90,7 @@ bool RemoteModel::updateUrl(const QString &name, const QString &newUrl)
{
QString output;
QString error;
- bool success = GitPlugin::client()->synchronousRemoteCmd(
+ bool success = GitClient::instance()->synchronousRemoteCmd(
m_workingDirectory, {"set-url", name, newUrl}, &output, &error);
if (success)
success = refresh(m_workingDirectory, &error);
@@ -186,7 +185,7 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage
// get list of remotes.
QMap<QString,QString> remotesList
- = GitPlugin::client()->synchronousRemotesList(workingDirectory, errorMessage);
+ = GitClient::instance()->synchronousRemotesList(workingDirectory, errorMessage);
beginResetModel();
m_remotes.clear();
diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp
index ef1b324f58..f33791549e 100644
--- a/src/plugins/git/stashdialog.cpp
+++ b/src/plugins/git/stashdialog.cpp
@@ -161,7 +161,7 @@ void StashDialog::refresh(const QString &repository, bool force)
m_model->setStashes(QList<Stash>());
} else {
QList<Stash> stashes;
- GitPlugin::client()->synchronousStashList(m_repository, &stashes);
+ GitClient::instance()->synchronousStashList(m_repository, &stashes);
m_model->setStashes(stashes);
if (!stashes.isEmpty()) {
for (int c = 0; c < ColumnCount; c++)
@@ -177,7 +177,7 @@ void StashDialog::deleteAll()
if (!ask(title, tr("Do you want to delete all stashes?")))
return;
QString errorMessage;
- if (GitPlugin::client()->synchronousStashRemove(m_repository, QString(), &errorMessage))
+ if (GitClient::instance()->synchronousStashRemove(m_repository, QString(), &errorMessage))
refresh(m_repository, true);
else
warning(title, errorMessage);
@@ -194,7 +194,7 @@ void StashDialog::deleteSelection()
QStringList errors;
// Delete in reverse order as stashes rotate
for (int r = rows.size() - 1; r >= 0; r--)
- if (!GitPlugin::client()->synchronousStashRemove(m_repository, m_model->at(rows.at(r)).name, &errorMessage))
+ if (!GitClient::instance()->synchronousStashRemove(m_repository, m_model->at(rows.at(r)).name, &errorMessage))
errors.push_back(errorMessage);
refresh(m_repository, true);
if (!errors.isEmpty())
@@ -205,7 +205,7 @@ void StashDialog::showCurrent()
{
const int index = currentRow();
QTC_ASSERT(index >= 0, return);
- GitPlugin::client()->show(m_repository, QString(m_model->at(index).name));
+ GitClient::instance()->show(m_repository, QString(m_model->at(index).name));
}
// Suggest Branch name to restore 'stash@{0}' -> 'stash0-date'
@@ -266,7 +266,8 @@ bool StashDialog::promptForRestore(QString *stash,
{
const QString stashIn = *stash;
bool modifiedPromptShown = false;
- switch (GitPlugin::client()->gitStatus(m_repository, StatusMode(NoUntracked | NoSubmodules), nullptr, errorMessage)) {
+ switch (GitClient::instance()->gitStatus(
+ m_repository, StatusMode(NoUntracked | NoSubmodules), nullptr, errorMessage)) {
case GitClient::StatusFailed:
return false;
case GitClient::StatusChanged: {
@@ -274,13 +275,15 @@ bool StashDialog::promptForRestore(QString *stash,
case ModifiedRepositoryCancel:
return false;
case ModifiedRepositoryStash:
- if (GitPlugin::client()->synchronousStash(m_repository, QString(), GitClient::StashPromptDescription).isEmpty())
+ if (GitClient::instance()->synchronousStash(
+ m_repository, QString(), GitClient::StashPromptDescription).isEmpty()) {
return false;
+ }
*stash = nextStash(*stash); // Our stash id to be restored changed
QTC_ASSERT(!stash->isEmpty(), return false);
break;
case ModifiedRepositoryDiscard:
- if (!GitPlugin::client()->synchronousReset(m_repository))
+ if (!GitClient::instance()->synchronousReset(m_repository))
return false;
break;
}
@@ -317,7 +320,7 @@ void StashDialog::restoreCurrent()
// Make sure repository is not modified, restore. The command will
// output to window on success.
if (promptForRestore(&name, nullptr, &errorMessage)
- && GitPlugin::client()->synchronousStashRestore(m_repository, name)) {
+ && GitClient::instance()->synchronousStashRestore(m_repository, name)) {
refresh(m_repository, true); // Might have stashed away local changes.
} else if (!errorMessage.isEmpty()) {
warning(msgRestoreFailedTitle(name), errorMessage);
@@ -332,7 +335,7 @@ void StashDialog::restoreCurrentInBranch()
QString branch;
QString name = m_model->at(index).name;
if (promptForRestore(&name, &branch, &errorMessage)
- && GitPlugin::client()->synchronousStashRestore(m_repository, name, false, branch)) {
+ && GitClient::instance()->synchronousStashRestore(m_repository, name, false, branch)) {
refresh(m_repository, true); // git deletes the stash, unfortunately.
} else if (!errorMessage.isEmpty()) {
warning(msgRestoreFailedTitle(name), errorMessage);
diff --git a/src/plugins/languageclient/CMakeLists.txt b/src/plugins/languageclient/CMakeLists.txt
index d1910757db..abddb9cd96 100644
--- a/src/plugins/languageclient/CMakeLists.txt
+++ b/src/plugins/languageclient/CMakeLists.txt
@@ -1,5 +1,5 @@
add_qtc_plugin(LanguageClient
- DEPENDS LanguageServerProtocol Qt5::Core
+ PUBLIC_DEPENDS LanguageServerProtocol Qt5::Core
PLUGIN_DEPENDS ProjectExplorer Core TextEditor
SOURCES
client.cpp client.h
diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp
index ae2eca2ff6..54b9740809 100644
--- a/src/plugins/languageclient/languageclientcompletionassist.cpp
+++ b/src/plugins/languageclient/languageclientcompletionassist.cpp
@@ -35,6 +35,7 @@
#include <texteditor/codeassist/genericproposal.h>
#include <texteditor/codeassist/genericproposalmodel.h>
#include <utils/algorithm.h>
+#include <utils/executeondestruction.h>
#include <utils/textutils.h>
#include <utils/utilsicons.h>
@@ -361,6 +362,9 @@ void LanguageClientCompletionAssistProcessor::cancel()
void LanguageClientCompletionAssistProcessor::handleCompletionResponse(
const CompletionRequest::Response &response)
{
+ LanguageClientCompletionProposal *proposal = nullptr;
+ // We must report back to the code assistant under all circumstances
+ Utils::ExecuteOnDestruction eod([this, proposal]() { setAsyncProposalAvailable(proposal); });
qCDebug(LOGLSPCOMPLETION) << QTime::currentTime() << " : got completions";
m_currentRequest = MessageId();
QTC_ASSERT(m_client, return);
@@ -383,12 +387,11 @@ void LanguageClientCompletionAssistProcessor::handleCompletionResponse(
model->loadContent(Utils::transform(items, [](const CompletionItem &item){
return static_cast<AssistProposalItemInterface *>(new LanguageClientCompletionItem(item));
}));
- auto proposal = new LanguageClientCompletionProposal(m_pos, model);
+ proposal = new LanguageClientCompletionProposal(m_pos, model);
proposal->m_document = m_document;
proposal->m_pos = m_pos;
proposal->setFragile(true);
proposal->setSupportsPrefix(false);
- setAsyncProposalAvailable(proposal);
qCDebug(LOGLSPCOMPLETION) << QTime::currentTime() << " : "
<< items.count() << " completions handled";
}
diff --git a/src/plugins/nim/project/nimrunconfiguration.cpp b/src/plugins/nim/project/nimrunconfiguration.cpp
index 808d36e101..142e434490 100644
--- a/src/plugins/nim/project/nimrunconfiguration.cpp
+++ b/src/plugins/nim/project/nimrunconfiguration.cpp
@@ -58,8 +58,8 @@ public:
setDisplayName(tr("Current Build Target"));
setDefaultDisplayName(tr("Current Build Target"));
- setUpdater([this] {
- auto buildConfiguration = qobject_cast<NimBuildConfiguration *>(activeBuildConfiguration());
+ setUpdater([this, target] {
+ auto buildConfiguration = qobject_cast<NimBuildConfiguration *>(target->activeBuildConfiguration());
QTC_ASSERT(buildConfiguration, return);
const QFileInfo outFileInfo = buildConfiguration->outFilePath().toFileInfo();
aspect<ExecutableAspect>()->setExecutable(FilePath::fromString(outFileInfo.absoluteFilePath()));
diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp
index 5dc99eecea..8176432c17 100644
--- a/src/plugins/perfprofiler/perfprofilertool.cpp
+++ b/src/plugins/perfprofiler/perfprofilertool.cpp
@@ -159,7 +159,7 @@ PerfProfilerTool::PerfProfilerTool()
tracePointsAction->setEnabled(m_startAction->isEnabled());
});
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &PerfProfilerTool::updateRunActions);
m_recordButton = new QToolButton;
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index c777a61ee8..4f866490a1 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -779,7 +779,7 @@ void AppOutputPane::slotRunControlFinished2(RunControl *sender)
if (current && current == sender)
enableButtons(current);
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ ProjectExplorerPlugin::updateRunActions();
#ifdef Q_OS_WIN
const bool isRunning = Utils::anyOf(m_runControlTabs, [](const RunControlTab &rt) {
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index ad9e980e01..a93a33d1aa 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -183,7 +183,7 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
connect(this, &BuildConfiguration::enabledChanged, this, [this] {
if (isActive() && project() == SessionManager::startupProject()) {
ProjectExplorerPlugin::updateActions();
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ ProjectExplorerPlugin::updateRunActions();
}
});
}
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index 720b501681..27c46a54a6 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -265,9 +265,6 @@ BuildManager::BuildManager(QObject *parent, QAction *cancelBuildAction)
connect(d->m_taskWindow, &Internal::TaskWindow::tasksChanged,
this, &BuildManager::updateTaskCount);
- connect(d->m_taskWindow, &Internal::TaskWindow::tasksCleared,
- this,&BuildManager::tasksCleared);
-
connect(&d->m_progressWatcher, &QFutureWatcherBase::canceled,
this, &BuildManager::cancel);
connect(&d->m_progressWatcher, &QFutureWatcherBase::finished,
@@ -457,7 +454,6 @@ void BuildManager::updateTaskCount()
{
const int errors = getErrorTaskCount();
ProgressManager::setApplicationLabel(errors > 0 ? QString::number(errors) : QString());
- emit m_instance->tasksChanged();
}
void BuildManager::finish()
diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h
index 29351b2eb6..d62786ed81 100644
--- a/src/plugins/projectexplorer/buildmanager.h
+++ b/src/plugins/projectexplorer/buildmanager.h
@@ -102,9 +102,6 @@ public slots:
signals:
void buildStateChanged(ProjectExplorer::Project *pro);
void buildQueueFinished(bool success);
- void tasksChanged();
- void taskAdded(const ProjectExplorer::Task &task);
- void tasksCleared();
private:
static void addToTaskWindow(const ProjectExplorer::Task &task, int linkedOutputLines, int skipLines);
diff --git a/src/plugins/projectexplorer/buildsystem.cpp b/src/plugins/projectexplorer/buildsystem.cpp
index f360ea6648..ea299cd522 100644
--- a/src/plugins/projectexplorer/buildsystem.cpp
+++ b/src/plugins/projectexplorer/buildsystem.cpp
@@ -316,7 +316,7 @@ void BuildSystem::emitBuildSystemUpdated()
QString BuildSystem::disabledReason(const QString &buildKey) const
{
- if (hasParsingData()) {
+ if (!hasParsingData()) {
QString msg = isParsing() ? tr("The project is currently being parsed.")
: tr("The project could not be fully parsed.");
const FilePath projectFilePath = buildTarget(buildKey).projectFilePath;
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 2ab52663d0..9748b52f7f 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -2053,6 +2053,7 @@ Utils::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils:
}
if (Utils::HostOsInfo::isWindowsHost())
saver.write("chcp 65001\r\n");
+ saver.write("set VSCMD_SKIP_SENDTELEMETRY=1\r\n");
saver.write(call + "\r\n");
saver.write("@echo " + marker.toLocal8Bit() + "\r\n");
saver.write("set\r\n");
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 575543d77b..af5973fb4b 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -453,7 +453,7 @@ public:
void activeRunConfigurationChanged();
void activeBuildConfigurationChanged();
- void slotUpdateRunActions();
+ void doUpdateRunActions();
void currentModeChanged(Core::Id mode, Core::Id oldMode);
@@ -1714,8 +1714,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
connect(dd->m_projectTreeExpandAllAction, &QAction::triggered,
ProjectTree::instance(), &ProjectTree::expandAll);
- connect(this, &ProjectExplorerPlugin::updateRunActions,
- dd, &ProjectExplorerPluginPrivate::slotUpdateRunActions);
connect(this, &ProjectExplorerPlugin::settingsChanged,
dd, &ProjectExplorerPluginPrivate::updateRunWithoutDeployMenu);
@@ -2483,7 +2481,7 @@ void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl)
Qt::QueuedConnection);
++m_activeRunControlCount;
runControl->initiateStart();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::showOutputPaneForRunControl(RunControl *runControl)
@@ -2540,7 +2538,7 @@ void ProjectExplorerPluginPrivate::buildQueueFinished(bool success)
m_delayedRunConfiguration = nullptr;
m_shouldHaveRunConfiguration = false;
m_runMode = Constants::NO_RUN_MODE;
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
QList<QPair<QString, QString> > ProjectExplorerPluginPrivate::recentProjects() const
@@ -2903,7 +2901,8 @@ void ProjectExplorerPlugin::runRunConfiguration(RunConfiguration *rc,
dd->executeRunConfiguration(rc, runMode);
break;
}
- emit m_instance->updateRunActions();
+
+ dd->doUpdateRunActions();
}
QList<QPair<Runnable, Utils::ProcessHandle>> ProjectExplorerPlugin::runningRunControlProcesses()
@@ -3001,7 +3000,7 @@ void ProjectExplorerPluginPrivate::activeRunConfigurationChanged()
if (rc == previousRunConfiguration)
return;
updateActions();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::activeBuildConfigurationChanged()
@@ -3015,7 +3014,7 @@ void ProjectExplorerPluginPrivate::activeBuildConfigurationChanged()
return;
updateActions();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::updateDeployActions()
@@ -3064,7 +3063,7 @@ void ProjectExplorerPluginPrivate::updateDeployActions()
enableDeploySessionAction = false;
m_deploySessionAction->setEnabled(enableDeploySessionAction);
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
bool ProjectExplorerPlugin::canRunStartupProject(Core::Id runMode, QString *whyNot)
@@ -3139,13 +3138,15 @@ bool ProjectExplorerPlugin::canRunStartupProject(Core::Id runMode, QString *whyN
return true;
}
-void ProjectExplorerPluginPrivate::slotUpdateRunActions()
+void ProjectExplorerPluginPrivate::doUpdateRunActions()
{
QString whyNot;
const bool state = ProjectExplorerPlugin::canRunStartupProject(Constants::NORMAL_RUN_MODE, &whyNot);
m_runAction->setEnabled(state);
m_runAction->setToolTip(whyNot);
m_runWithoutDeployAction->setEnabled(state);
+
+ emit m_instance->runActionsUpdated();
}
void ProjectExplorerPluginPrivate::addToRecentProjects(const QString &fileName, const QString &displayName)
@@ -4002,6 +4003,11 @@ void ProjectExplorerPlugin::removeFromRecentProjects(const QString &fileName,
dd->removeFromRecentProjects(fileName, displayName);
}
+void ProjectExplorerPlugin::updateRunActions()
+{
+ dd->doUpdateRunActions();
+}
+
QList<QPair<QString, QString> > ProjectExplorerPlugin::recentProjects()
{
return dd->recentProjects();
diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h
index 2c803aa784..afc84671cb 100644
--- a/src/plugins/projectexplorer/projectexplorer.h
+++ b/src/plugins/projectexplorer/projectexplorer.h
@@ -182,6 +182,8 @@ public:
static void clearRecentProjects();
static void removeFromRecentProjects(const QString &fileName, const QString &displayName);
+ static void updateRunActions();
+
signals:
void finishedInitialization();
@@ -193,7 +195,7 @@ signals:
void settingsChanged();
- void updateRunActions();
+ void runActionsUpdated();
private:
static bool coreAboutToClose();
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 8a6f7afaa4..b1128896f6 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -203,11 +203,6 @@ RunConfiguration::RunConfiguration(Target *target, Core::Id id)
RunConfiguration::~RunConfiguration() = default;
-bool RunConfiguration::isActive() const
-{
- return target()->isActive() && target()->activeRunConfiguration() == this;
-}
-
QString RunConfiguration::disabledReason() const
{
BuildSystem *bs = activeBuildSystem();
@@ -252,11 +247,6 @@ QMap<Core::Id, QVariantMap> RunConfiguration::aspectData() const
return data;
}
-BuildConfiguration *RunConfiguration::activeBuildConfiguration() const
-{
- return target()->activeBuildConfiguration();
-}
-
BuildSystem *RunConfiguration::activeBuildSystem() const
{
return target()->buildSystem();
@@ -304,8 +294,10 @@ void RunConfiguration::update()
emit enabledChanged();
- if (isActive() && project() == SessionManager::startupProject())
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ const bool isActive = target()->isActive() && target()->activeRunConfiguration() == this;
+
+ if (isActive && project() == SessionManager::startupProject())
+ ProjectExplorerPlugin::updateRunActions();
}
BuildTargetInfo RunConfiguration::buildTargetInfo() const
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index f79001a571..437d3f4ef0 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -128,8 +128,6 @@ class PROJECTEXPLORER_EXPORT RunConfiguration : public ProjectConfiguration
public:
~RunConfiguration() override;
- bool isActive() const;
-
virtual QString disabledReason() const;
virtual bool isEnabled() const;
@@ -179,8 +177,7 @@ signals:
protected:
RunConfiguration(Target *target, Core::Id id);
- /// convenience function to get current build configuration.
- BuildConfiguration *activeBuildConfiguration() const;
+ /// convenience function to get current build system. Try to avoid.
BuildSystem *activeBuildSystem() const;
using Updater = std::function<void()>;
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index d7f0c92c84..9548be0552 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -380,7 +380,6 @@ void TaskWindow::clearTasks(Core::Id categoryId)
d->m_model->clearTasks(categoryId);
emit tasksChanged();
- emit tasksCleared();
navigateStateChanged();
}
diff --git a/src/plugins/projectexplorer/taskwindow.h b/src/plugins/projectexplorer/taskwindow.h
index efefb72658..7f11ca1fb1 100644
--- a/src/plugins/projectexplorer/taskwindow.h
+++ b/src/plugins/projectexplorer/taskwindow.h
@@ -79,7 +79,6 @@ public:
signals:
void tasksChanged();
- void tasksCleared();
private:
void updateFilter() override;
diff --git a/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp b/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp
index 5f9e7f571b..8f5dd75718 100644
--- a/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp
@@ -55,7 +55,7 @@ QWidget *LineEditAction::createWidget(QWidget *parent)
QFont font = lineEdit->font();
font.setPixelSize(Theme::instance()->smallFontPixelSize());
lineEdit->setFont(font);
- lineEdit->setValidator(new QIntValidator(0, 4096, this));
+ lineEdit->setValidator(new QIntValidator(0, 99999, this));
connect(lineEdit, &QLineEdit::textEdited, this, &LineEditAction::textChanged);
connect(this, &LineEditAction::lineEditTextClear, lineEdit, &QLineEdit::clear);
diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetdefaultlistmodel.cpp b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetdefaultlistmodel.cpp
index 3977eff168..f379ec5328 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetdefaultlistmodel.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetdefaultlistmodel.cpp
@@ -57,7 +57,7 @@ void GradientPresetDefaultListModel::addAllPresets()
for (int i = 0; i < metaEnum.keyCount(); i++) {
auto preset = GradientPresetItem::Preset(metaEnum.value(i));
- if (preset < GradientPresetItem::Preset::NumPresets)
+ if (preset < GradientPresetItem::numPresets)
addItem(GradientPresetItem(preset));
}
}
diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h
index 4cb5a519fb..cec45bb4af 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h
@@ -42,7 +42,13 @@ public:
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
using Preset = QGradient::Preset;
#else
- enum Preset { NumPresets = 0 };
+ enum Preset {};
+#endif
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ static const int numPresets = Preset::NumPresets;
+#else
+ static const int numPresets = 181;
#endif
explicit GradientPresetItem();
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index c14d60d384..274935b8a4 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -243,7 +243,7 @@ QmlProfilerTool::QmlProfilerTool()
perspective->addToolBarWidget(d->m_displayFeaturesButton);
perspective->addToolBarWidget(d->m_timeLabel);
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &QmlProfilerTool::updateRunActions);
QmlProfilerTextMarkModel *model = d->m_profilerModelManager->textMarkModel();
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index e90af4d627..8dd3ff712c 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -646,6 +646,7 @@ public:
MarginSettings m_marginSettings;
// apply when making visible the first time, for the split case
bool m_fontSettingsNeedsApply = true;
+ bool m_wasNotYetShown = true;
BehaviorSettings m_behaviorSettings;
int extraAreaSelectionAnchorBlockNumber = -1;
@@ -4331,16 +4332,12 @@ void TextEditorWidgetPrivate::paintCurrentLineHighlight(const PaintEventData &da
QRectF lineRect = data.block.layout()->lineForTextPosition(data.textCursor.positionInBlock()).rect();
lineRect.moveTop(lineRect.top() + blockRect.top());
lineRect.setLeft(0);
- lineRect.setRight(data.viewportRect.width() - data.offset.x());
+ lineRect.setRight(data.viewportRect.width());
QColor color = m_document->fontSettings().toTextCharFormat(C_CURRENT_LINE).background().color();
// set alpha, otherwise we cannot see block highlighting and find scope underneath
color.setAlpha(128);
- if (!data.eventRect.contains(lineRect.toRect())) {
- QRect updateRect = data.eventRect;
- updateRect.setLeft(0);
- updateRect.setRight(data.viewportRect.width() - int(data.offset.x()));
- q->viewport()->update(updateRect);
- }
+ if (!data.eventRect.contains(lineRect.toRect()))
+ q->viewport()->update(lineRect.toRect());
painter.fillRect(lineRect, color);
}
@@ -7217,10 +7214,20 @@ void TextEditorWidget::encourageApply()
void TextEditorWidget::showEvent(QShowEvent* e)
{
triggerPendingUpdates();
+ // QPlainTextEdit::showEvent scrolls to make the cursor visible on first show
+ // which we don't want, since we restore previous states when
+ // opening editors, and when splitting/duplicating.
+ // So restore the previous state after that.
+ QByteArray state;
+ if (d->m_wasNotYetShown)
+ state = saveState();
QPlainTextEdit::showEvent(e);
+ if (d->m_wasNotYetShown) {
+ restoreState(state);
+ d->m_wasNotYetShown = false;
+ }
}
-
void TextEditorWidgetPrivate::applyFontSettingsDelayed()
{
m_fontSettingsNeedsApply = true;
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index a6e5f078d6..92ed908ac9 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -530,7 +530,7 @@ CallgrindToolPrivate::CallgrindToolPrivate()
m_perspective.addWindow(m_visualization, Perspective::SplitVertical, nullptr,
false, Qt::RightDockWidgetArea);
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &CallgrindToolPrivate::updateRunActions);
}
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index 64475eba24..fd8025fc8b 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -571,7 +571,7 @@ MemcheckToolPrivate::MemcheckToolPrivate()
m_perspective.addWindow(m_errorView, Perspective::SplitVertical, nullptr);
- connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::runActionsUpdated,
this, &MemcheckToolPrivate::maybeActiveRunConfigurationChanged);
//
diff --git a/src/plugins/vcsbase/vcscommand.cpp b/src/plugins/vcsbase/vcscommand.cpp
index 76a53f06e6..3b1697c136 100644
--- a/src/plugins/vcsbase/vcscommand.cpp
+++ b/src/plugins/vcsbase/vcscommand.cpp
@@ -43,6 +43,7 @@ VcsCommand::VcsCommand(const QString &workingDirectory,
Core::ShellCommand(workingDirectory, environment),
m_preventRepositoryChanged(false)
{
+ VcsOutputWindow::setRepository(workingDirectory);
setOutputProxyFactory([this] {
auto proxy = new OutputProxy;
VcsOutputWindow *outputWindow = VcsOutputWindow::instance();
diff --git a/tests/system/objects.map b/tests/system/objects.map
index 1144af6ce2..b5d903b7bd 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -196,6 +196,7 @@
:Session Manager_ProjectExplorer::Internal::SessionDialog {name='ProjectExplorer__Internal__SessionDialog' type='ProjectExplorer::Internal::SessionDialog' visible='1' windowTitle='Session Manager'}
:Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'}
:User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'}
+:Utils::FakeToolTip {type='Utils::FakeToolTip' unnamed='1' visible='1'}
:Widget Box_qdesigner_internal::WidgetBoxTreeWidget {container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'}
:Working Copy_Utils::BaseValidatingLineEdit {type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':New_ProjectExplorer::JsonWizard'}
:WritePermissions_Core::Internal::ReadOnlyFilesDialog {name='Core__Internal__ReadOnlyFilesDialog' type='Core::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'}
diff --git a/tests/system/suite_CSUP/tst_CSUP06/test.py b/tests/system/suite_CSUP/tst_CSUP06/test.py
index 9e094b0a0d..3626a95951 100644
--- a/tests/system/suite_CSUP/tst_CSUP06/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP06/test.py
@@ -28,7 +28,9 @@ source("../../shared/qtcreator.py")
def moveDownToNextNonEmptyLine(editor):
currentLine = "" # there's no do-while in python - so use empty line which fails
while not currentLine:
- type(editor, "<Down>")
+ if waitFor("object.exists(':Utils::FakeToolTip')", 100):
+ type(editor, "<Esc>") # close possibly shown completion tooltip so pressing
+ type(editor, "<Down>") # down scrolls the line, not completion alternatives
currentLine = str(lineUnderCursor(editor)).strip()
return currentLine