Merge remote-tracking branch 'origin/11.0'

Change-Id: I39643590e2753a1079980e5f9fbcbc33318aa0a5
This commit is contained in:
Eike Ziller
2023-07-20 13:17:09 +02:00
8 changed files with 28 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
// Copyright (C) 2020 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page extending-index.html
\page index.html
\title Extending Qt Creator Manual
\QC is a cross-platform integrated development environment (IDE) tailored to

View File

@@ -38,7 +38,7 @@ using namespace Utils;
A common way to present the search results to the user, is to use the
shared \uicontrol{Search Results} pane.
\image qtcreator-searchresults.png
\image qtcreator-search-results.webp {Search Results view}
If you want to implement a find filter that is doing a file based text
search, you should use \l Core::BaseTextFind, which already implements all

View File

@@ -312,7 +312,7 @@ using namespace Core::Internal;
\brief The SearchResultWindow class is the implementation of a commonly
shared \uicontrol{Search Results} output pane.
\image qtcreator-searchresults.png
\image qtcreator-search-results.webp {Search Results view}
Whenever you want to show the user a list of search results, or want
to present UI for a global search and replace, use the single instance

View File

@@ -130,7 +130,7 @@ static QString resolveSymlinks(QString current)
while (links--) {
const QFileInfo info(current);
if (!info.isSymLink())
return {};
return current;
current = info.symLinkTarget();
}
return current;

View File

@@ -22,7 +22,7 @@
:Add Bookmark.treeView_QTreeView {type='QTreeView' unnamed='1' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark_BookmarkDialog {type='BookmarkDialog' unnamed='1' visible='1' windowTitle='Add Bookmark'}
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
:Add to Version Control_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Add to Version Control'}
:Add to Version Control_QMessageBox {text~='Add the file\n.+\nto version control .+' type='QMessageBox' unnamed='1' visible='1'}
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':DebugModeWidget.Toolbar_QDockWidget' name='PerspectiveChooser' type='QComboBox' visible='1'}
:Analyzer Toolbar.Clear_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}

View File

@@ -611,8 +611,12 @@ def stringify(obj):
if isinstance(obj, stringTypes):
return obj
if isinstance(obj, bytes):
tmp = obj.decode('cp1252') if platform.system() in ('Microsoft','Windows') else obj.decode()
return tmp
if not platform.system() in ('Microsoft', 'Windows'):
return obj.decode()
try:
return obj.decode('cp1252')
except UnicodeDecodeError:
return obj.decode('utf-8')
class GitClone:

View File

@@ -3,6 +3,14 @@
source("../../shared/qtcreator.py")
if platform.system() == 'Darwin':
keysToType = '<Command+Alt+a>'
expectedKeys = 'Cmd+Opt+A'
else:
keysToType = '<Ctrl+Alt+a>'
expectedKeys = 'Ctrl+Alt+A'
# test Qt Creator version information from file and dialog
def getQtCreatorVersionFromDialog():
chk = re.search("(?<=Qt Creator)\s\d+.\d+.\d+[-\w]*",
@@ -68,17 +76,16 @@ def setKeyboardShortcutForAboutQtC():
"visible='1' text~='(Stop Recording|Record)'}" % shortcutGB)
shortcut = ("{container=%s type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"placeholderText='Enter key sequence as text'}" % shortcutGB)
expected = 'Ctrl+Opt+A' if platform.system() == 'Darwin' else 'Ctrl+Alt+A'
clickButton(record)
nativeType("<Ctrl+Alt+a>")
waitFor("_shortcutMatches_(shortcut, expected)", 5000)
nativeType(keysToType)
waitFor("_shortcutMatches_(shortcut, expectedKeys)", 5000)
clickButton(record)
gotExpectedShortcut = _shortcutMatches_(shortcut, expected)
gotExpectedShortcut = _shortcutMatches_(shortcut, expectedKeys)
if not gotExpectedShortcut and platform.system() == 'Darwin':
test.warning("Squish Issue: shortcut was set to %s - entering it manually now"
% waitForObject(shortcut).text)
replaceEditorContent(shortcut, expected)
replaceEditorContent(shortcut, expectedKeys)
else:
test.verify(gotExpectedShortcut, "Expected key sequence is displayed.")
clickButton(waitForObject(":Options.OK_QPushButton"))
@@ -97,7 +104,7 @@ def main():
waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000)
except:
nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton)
nativeType("<Ctrl+Alt+a>")
nativeType(keysToType)
# verify qt creator version
try:
waitForObject(":About Qt Creator_Core::Internal::VersionDialog", 5000)

View File

@@ -39,7 +39,10 @@ def main():
test.fatal("Could not get the editor for '%s'" % currentFile,
"Skipping this file for now.")
continue
contentBefore = readFile(currentFile)
if not currentFile.endswith(".bin"):
contentBefore = stringify(contentBefore)
if i % 2 == 0:
# modify current file and store content for next modification
formerContent = contentBefore