forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Change-Id: I39643590e2753a1079980e5f9fbcbc33318aa0a5
This commit is contained in:
@@ -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
|
// 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
|
\title Extending Qt Creator Manual
|
||||||
|
|
||||||
\QC is a cross-platform integrated development environment (IDE) tailored to
|
\QC is a cross-platform integrated development environment (IDE) tailored to
|
||||||
|
@@ -38,7 +38,7 @@ using namespace Utils;
|
|||||||
A common way to present the search results to the user, is to use the
|
A common way to present the search results to the user, is to use the
|
||||||
shared \uicontrol{Search Results} pane.
|
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
|
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
|
search, you should use \l Core::BaseTextFind, which already implements all
|
||||||
|
@@ -312,7 +312,7 @@ using namespace Core::Internal;
|
|||||||
\brief The SearchResultWindow class is the implementation of a commonly
|
\brief The SearchResultWindow class is the implementation of a commonly
|
||||||
shared \uicontrol{Search Results} output pane.
|
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
|
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
|
to present UI for a global search and replace, use the single instance
|
||||||
|
@@ -130,7 +130,7 @@ static QString resolveSymlinks(QString current)
|
|||||||
while (links--) {
|
while (links--) {
|
||||||
const QFileInfo info(current);
|
const QFileInfo info(current);
|
||||||
if (!info.isSymLink())
|
if (!info.isSymLink())
|
||||||
return {};
|
return current;
|
||||||
current = info.symLinkTarget();
|
current = info.symLinkTarget();
|
||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
:Add Bookmark.treeView_QTreeView {type='QTreeView' unnamed='1' visible='1' window=':Add Bookmark_BookmarkDialog'}
|
: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 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.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.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.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'}
|
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
|
||||||
|
@@ -611,8 +611,12 @@ def stringify(obj):
|
|||||||
if isinstance(obj, stringTypes):
|
if isinstance(obj, stringTypes):
|
||||||
return obj
|
return obj
|
||||||
if isinstance(obj, bytes):
|
if isinstance(obj, bytes):
|
||||||
tmp = obj.decode('cp1252') if platform.system() in ('Microsoft','Windows') else obj.decode()
|
if not platform.system() in ('Microsoft', 'Windows'):
|
||||||
return tmp
|
return obj.decode()
|
||||||
|
try:
|
||||||
|
return obj.decode('cp1252')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
return obj.decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
class GitClone:
|
class GitClone:
|
||||||
|
@@ -3,6 +3,14 @@
|
|||||||
|
|
||||||
source("../../shared/qtcreator.py")
|
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
|
# test Qt Creator version information from file and dialog
|
||||||
def getQtCreatorVersionFromDialog():
|
def getQtCreatorVersionFromDialog():
|
||||||
chk = re.search("(?<=Qt Creator)\s\d+.\d+.\d+[-\w]*",
|
chk = re.search("(?<=Qt Creator)\s\d+.\d+.\d+[-\w]*",
|
||||||
@@ -68,17 +76,16 @@ def setKeyboardShortcutForAboutQtC():
|
|||||||
"visible='1' text~='(Stop Recording|Record)'}" % shortcutGB)
|
"visible='1' text~='(Stop Recording|Record)'}" % shortcutGB)
|
||||||
shortcut = ("{container=%s type='Utils::FancyLineEdit' unnamed='1' visible='1' "
|
shortcut = ("{container=%s type='Utils::FancyLineEdit' unnamed='1' visible='1' "
|
||||||
"placeholderText='Enter key sequence as text'}" % shortcutGB)
|
"placeholderText='Enter key sequence as text'}" % shortcutGB)
|
||||||
expected = 'Ctrl+Opt+A' if platform.system() == 'Darwin' else 'Ctrl+Alt+A'
|
|
||||||
clickButton(record)
|
clickButton(record)
|
||||||
nativeType("<Ctrl+Alt+a>")
|
nativeType(keysToType)
|
||||||
waitFor("_shortcutMatches_(shortcut, expected)", 5000)
|
waitFor("_shortcutMatches_(shortcut, expectedKeys)", 5000)
|
||||||
clickButton(record)
|
clickButton(record)
|
||||||
|
|
||||||
gotExpectedShortcut = _shortcutMatches_(shortcut, expected)
|
gotExpectedShortcut = _shortcutMatches_(shortcut, expectedKeys)
|
||||||
if not gotExpectedShortcut and platform.system() == 'Darwin':
|
if not gotExpectedShortcut and platform.system() == 'Darwin':
|
||||||
test.warning("Squish Issue: shortcut was set to %s - entering it manually now"
|
test.warning("Squish Issue: shortcut was set to %s - entering it manually now"
|
||||||
% waitForObject(shortcut).text)
|
% waitForObject(shortcut).text)
|
||||||
replaceEditorContent(shortcut, expected)
|
replaceEditorContent(shortcut, expectedKeys)
|
||||||
else:
|
else:
|
||||||
test.verify(gotExpectedShortcut, "Expected key sequence is displayed.")
|
test.verify(gotExpectedShortcut, "Expected key sequence is displayed.")
|
||||||
clickButton(waitForObject(":Options.OK_QPushButton"))
|
clickButton(waitForObject(":Options.OK_QPushButton"))
|
||||||
@@ -97,7 +104,7 @@ def main():
|
|||||||
waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000)
|
waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000)
|
||||||
except:
|
except:
|
||||||
nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton)
|
nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton)
|
||||||
nativeType("<Ctrl+Alt+a>")
|
nativeType(keysToType)
|
||||||
# verify qt creator version
|
# verify qt creator version
|
||||||
try:
|
try:
|
||||||
waitForObject(":About Qt Creator_Core::Internal::VersionDialog", 5000)
|
waitForObject(":About Qt Creator_Core::Internal::VersionDialog", 5000)
|
||||||
|
@@ -39,7 +39,10 @@ def main():
|
|||||||
test.fatal("Could not get the editor for '%s'" % currentFile,
|
test.fatal("Could not get the editor for '%s'" % currentFile,
|
||||||
"Skipping this file for now.")
|
"Skipping this file for now.")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
contentBefore = readFile(currentFile)
|
contentBefore = readFile(currentFile)
|
||||||
|
if not currentFile.endswith(".bin"):
|
||||||
|
contentBefore = stringify(contentBefore)
|
||||||
if i % 2 == 0:
|
if i % 2 == 0:
|
||||||
# modify current file and store content for next modification
|
# modify current file and store content for next modification
|
||||||
formerContent = contentBefore
|
formerContent = contentBefore
|
||||||
|
Reference in New Issue
Block a user