Merge "Merge remote-tracking branch 'origin/12.0'"

This commit is contained in:
The Qt Project
2023-12-12 09:24:04 +00:00
10 changed files with 93 additions and 33 deletions

View File

@@ -14,7 +14,7 @@ General
-------
* Fixed opening files with drag and drop on Qt Creator
(QTCREATORBUG-29961)
([QTCREATORBUG-29961](https://bugreports.qt.io/browse/QTCREATORBUG-29961))
Editing
-------
@@ -22,28 +22,45 @@ Editing
### C++
* Fixed a crash while parsing
(QTCREATORBUG-29847)
([QTCREATORBUG-29847](https://bugreports.qt.io/browse/QTCREATORBUG-29847))
* Fixed a freeze when hovering over a class declaration
(QTCREATORBUG-29975)
([QTCREATORBUG-29975](https://bugreports.qt.io/browse/QTCREATORBUG-29975))
* Fixed the renaming of virtual functions
* Fixed `Select Block Up` for string literals
(QTCREATORBUG-29844)
([QTCREATORBUG-29844](https://bugreports.qt.io/browse/QTCREATORBUG-29844))
* Fixed the conversion between comment styles for certain indented comments
* Clang Format
* Fixed the indentation after multi-byte UTF-8 characters
([QTCREATORBUG-29927](https://bugreports.qt.io/browse/QTCREATORBUG-29927))
### Widget Designer
* Fixed that the buttons for editing signals and slots and editing buddies
were switched
([QTCREATORBUG-30017](https://bugreports.qt.io/browse/QTCREATORBUG-30017))
Projects
--------
* Fixed the restoring of custom Kit data
(QTCREATORBUG-29970)
([QTCREATORBUG-29970](https://bugreports.qt.io/browse/QTCREATORBUG-29970))
* Fixed overlapping labels in the target selector
(QTCREATORBUG-29990)
([QTCREATORBUG-29990](https://bugreports.qt.io/browse/QTCREATORBUG-29990))
* Fixed the label for `Custom Executable` run configurations
(QTCREATORBUG-29983)
([QTCREATORBUG-29983](https://bugreports.qt.io/browse/QTCREATORBUG-29983))
### CMake
* Fixed a crash when opening projects
(QTCREATORBUG-29965)
([QTCREATORBUG-29965](https://bugreports.qt.io/browse/QTCREATORBUG-29965))
* Fixed a crash when editing CMake files without a project
([QTCREATORBUG-30023](https://bugreports.qt.io/browse/QTCREATORBUG-30023))
* Fixed that directories were marked as invalid for the `Staging Directory`
([QTCREATORBUG-29997](https://bugreports.qt.io/browse/QTCREATORBUG-29997))
### Qbs
* Fixed a crash when parsing projects
Analyzer
--------
@@ -51,7 +68,7 @@ Analyzer
### Valgrind
* Fixed stopping the Valgrind process
(QTCREATORBUG-29948)
([QTCREATORBUG-29948](https://bugreports.qt.io/browse/QTCREATORBUG-29948))
Version Control Systems
-----------------------
@@ -60,7 +77,7 @@ Version Control Systems
* Fixed that empty blame annotations are shown after saving a file outside of
the version control directory
(QTCREATORBUG-29991)
([QTCREATORBUG-29991](https://bugreports.qt.io/browse/QTCREATORBUG-29991))
Platforms
---------
@@ -68,26 +85,28 @@ Platforms
### Linux
* Added an error dialog for errors when loading the Qt platform plugin
(QTCREATORBUG-30004)
([QTCREATORBUG-30004](https://bugreports.qt.io/browse/QTCREATORBUG-30004))
### Boot2Qt
* Fixed deployment on Windows
(QTCREATORBUG-29971)
([QTCREATORBUG-29971](https://bugreports.qt.io/browse/QTCREATORBUG-29971))
### MCU
* Fixed `Replace existing kits` after changing MCU SDK path
(QTCREATORBUG-29960)
([QTCREATORBUG-29960](https://bugreports.qt.io/browse/QTCREATORBUG-29960))
Credits for these changes go to:
--------------------------------
Alessandro Portale
Andre Hartmann
Artem Sokolovskii
Christian Kandeler
Christian Stenger
Cristian Adam
Eike Ziller
Friedemann Kleint
Jaroslaw Kobus
Marcus Tillmanns
Orgad Shaneh

View File

@@ -149,7 +149,8 @@ CMakeManager::CMakeManager()
cmakeDebuggerAction.setCommandDescription(m_cmakeDebuggerAction->text());
cmakeDebuggerAction.setContainer(PEC::M_DEBUG_STARTDEBUGGING, Constants::CMAKE_DEBUGGING_GROUP);
cmakeDebuggerAction.setOnTriggered(this, [] {
ProjectExplorerPlugin::runStartupProject(PEC::DAP_CMAKE_DEBUG_RUN_MODE, false);
ProjectExplorerPlugin::runStartupProject(PEC::DAP_CMAKE_DEBUG_RUN_MODE,
/*forceSkipDeploy=*/true);
});
connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] {

View File

@@ -190,6 +190,7 @@ int CppRefactoringFile::startOf(unsigned index) const
int CppRefactoringFile::startOf(const AST *ast) const
{
QTC_ASSERT(ast, return 0);
int firstToken = ast->firstToken();
const int lastToken = ast->lastToken();
while (tokenAt(firstToken).generated() && firstToken < lastToken)
@@ -206,6 +207,7 @@ int CppRefactoringFile::endOf(unsigned index) const
int CppRefactoringFile::endOf(const AST *ast) const
{
QTC_ASSERT(ast, return 0);
int lastToken = ast->lastToken() - 1;
QTC_ASSERT(lastToken >= 0, return -1);
const int firstToken = ast->firstToken();

View File

@@ -1232,13 +1232,15 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
{
QString name;
char const *runMode;
bool forceSkipDeploy = false;
};
const QList<DapPerspective> perspectiveList = {
DapPerspective{Tr::tr("CMake Preset"), ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE},
DapPerspective{Tr::tr("CMake Preset"),
ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE,
/*forceSkipDeploy=*/true},
DapPerspective{Tr::tr("GDB Preset"), ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE},
DapPerspective{Tr::tr("Python Preset"),
ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE},
DapPerspective{Tr::tr("Python Preset"), ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE},
};
for (const DapPerspective &dp : perspectiveList)
@@ -1246,10 +1248,11 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
connect(&m_startDapAction, &QAction::triggered, this, [perspectiveList] {
QComboBox *combo = qobject_cast<QComboBox *>(EngineManager::dapEngineChooser());
if (perspectiveList.size() > combo->currentIndex())
ProjectExplorerPlugin::runStartupProject(perspectiveList.at(combo->currentIndex())
.runMode,
false);
if (perspectiveList.size() > combo->currentIndex()) {
const DapPerspective dapPerspective = perspectiveList.at(combo->currentIndex());
ProjectExplorerPlugin::runStartupProject(dapPerspective.runMode,
dapPerspective.forceSkipDeploy);
}
});
auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow");

View File

@@ -2088,7 +2088,7 @@ void ProjectExplorerPlugin::extensionsInitialized()
const QStringList rawGitSearchPaths = ICore::settings()->value("Git/Path")
.toString().split(':', Qt::SkipEmptyParts);
const FilePaths gitSearchPaths = Utils::transform(rawGitSearchPaths,
[](const QString &rawPath) { return FilePath::fromString(rawPath); });
[](const QString &rawPath) { return FilePath::fromUserInput(rawPath); });
const FilePath fullGitPath = Environment::systemEnvironment()
.searchInPath(gitBinary, gitSearchPaths);
if (!fullGitPath.isEmpty()) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -132,20 +132,40 @@ void PySideInstaller::installPyside(const FilePath &python,
} else {
QDialog dialog;
dialog.setWindowTitle(Tr::tr("Select PySide Version"));
dialog.setLayout(new QVBoxLayout());
dialog.layout()->addWidget(new QLabel(Tr::tr("Select which PySide version to install:")));
// Logo for the corner in the QDialog
QPixmap logo(":/python/images/qtforpython_neon.png");
QLabel *logoLabel = new QLabel();
logoLabel->setPixmap(logo);
QVBoxLayout *dialogLayout = new QVBoxLayout();
QHBoxLayout *hlayout = new QHBoxLayout();
hlayout->addWidget(logoLabel);
hlayout->addWidget(new QLabel("<b>" + Tr::tr("Installing PySide") + "</b>"));
dialogLayout->addLayout(hlayout);
QLabel *installDescription = new QLabel(Tr::tr("You can install PySide "
"from PyPi (Community OSS version) or from your Qt "
"installation location, if you are using the Qt "
"Installer and have a commercial license."));
installDescription->setWordWrap(true);
dialogLayout->addWidget(installDescription);
dialogLayout->addWidget(new QLabel(Tr::tr("Select which version to install:")));
QComboBox *pySideSelector = new QComboBox();
pySideSelector->addItem(Tr::tr("Latest PySide from the Python Package Index"));
pySideSelector->addItem(Tr::tr("Latest PySide from the PyPI"));
for (const Utils::FilePath &version : std::as_const(availablePySides)) {
const FilePath dir = version.parentDir();
const QString text
= Tr::tr("PySide %1 Wheel (%2)").arg(dir.fileName(), dir.toUserOutput());
pySideSelector->addItem(text, version.toVariant());
}
dialog.layout()->addWidget(pySideSelector);
dialogLayout->addWidget(pySideSelector);
QDialogButtonBox box;
box.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
dialog.layout()->addWidget(&box);
dialogLayout->addWidget(&box);
dialog.setLayout(dialogLayout);
connect(&box, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
connect(&box, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);

View File

@@ -2,5 +2,6 @@
<qresource prefix="/python">
<file>images/settingscategory_python.png</file>
<file>images/settingscategory_python@2x.png</file>
<file>images/qtforpython_neon.png</file>
</qresource>
</RCC>

View File

@@ -139,7 +139,12 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion):
# param buildSystem is a string holding the build system selected for the project
# param checks turns tests in the function on if set to True
# param available a list holding the available targets
def __selectQtVersionDesktop__(buildSystem, checks, available=None):
# param targets a list holding the wanted targets - defaults to all desktop targets if empty
# returns checked targets
def __selectQtVersionDesktop__(buildSystem, checks, available=None, targets=[]):
if len(targets):
wanted = targets
else:
wanted = Targets.desktopTargetClasses()
checkedTargets = __chooseTargets__(wanted, available)
if checks:
@@ -162,6 +167,7 @@ def __selectQtVersionDesktop__(buildSystem, checks, available=None):
verifyChecked(cbObject % ("Profile", objectMap.realName(detailsWidget)))
clickButton(detailsButton)
clickButton(waitForObject(":Next_QPushButton"))
return checkedTargets
def __createProjectHandleLastPage__(expectedFiles=[], addToVersionControl="<None>", addToProject=None):
if len(expectedFiles):
@@ -205,8 +211,10 @@ def __getProjectFileName__(projectName, buildSystem):
# param checks turns tests in the function on if set to True
# param addToVersionControl selects the specified VCS from Creator's wizard
# param buildSystem selects the specified build system from Creator's wizard
# param targets specifies targets that should be checked
# returns the checked targets
def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<None>",
buildSystem=None):
buildSystem=None, targets=[]):
template = "Qt Widgets Application"
available = __createProjectOrFileSelectType__(" Application (Qt)", template)
__createProjectSetNameAndPath__(path, projectName, checks)
@@ -229,7 +237,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleTranslationSelection__()
__selectQtVersionDesktop__(buildSystem, checks, available)
checkedTargets = __selectQtVersionDesktop__(buildSystem, checks, available, targets)
expectedFiles = []
if checks:
@@ -243,6 +251,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
waitForProjectParsing()
if checks:
__verifyFileCreation__(path, expectedFiles)
return checkedTargets
# Creates a Qt Console project
# param path specifies where to create the project

View File

@@ -8,8 +8,13 @@ def main():
if not startedWithoutPluginError():
return
projectName = "DesignerTestApp"
createProject_Qt_GUI(tempDir(), projectName,
buildSystem="qmake" if JIRA.isBugStillOpen(28787) else "CMake")
# explicitly chose new kit to avoid compiler issues on Windows
targets = createProject_Qt_GUI(tempDir(), projectName, buildSystem="CMake",
targets=[Targets.DESKTOP_6_2_4])
if len(targets) != 1:
earlyExit()
return
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
selectFromLocator("mainwindow.ui")
dragAndDrop(waitForObject("{container=':qdesigner_internal::WidgetBoxCategoryListView'"