Commit c4e51e74 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.2'

Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I926bdfc7df6158207cfc07f3c6c591d0a59b7667
parents c5fae0e8 507ad11f
......@@ -5,7 +5,7 @@ staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.7.1
version=7.8
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
......@@ -36,12 +36,12 @@ ${source}/Python-${pyversion}.tgz: | makesourcedir
wget -q http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \
touch ${source}/Python-${pyversion}.tgz
${source}/gdb-${version}.tar.bz2: | makesourcedir
${source}/gdb-${version}.tar.xz: | makesourcedir
cd ${source} && \
echo "Downloading gdb..." && \
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \
wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \
touch gdb-*.tar.bz2
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-*.tar.xz
${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir
cd ${staging} && \
......@@ -61,10 +61,10 @@ ${targetdir}/python/include/python${pyversion}/pyconfig.h: ${staging}/lib/libpyt
mkdir -p ${targetdir}/python/lib && cp -a ${staging}/lib/python${pyversion} ${targetdir}/python/lib/
mkdir -p ${targetdir}/python/include/python${pyversion} && cp ${staging}/include/python${pyversion}/pyconfig.h ${targetdir}/python/include/python${pyversion}/
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir
cd ${staging} && \
echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \
tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \
touch configure
......
......@@ -6,7 +6,7 @@ pyversion=2.7
pydir=${broot}/python
expatversion=2.1.0
iconvversion=1.14
version=7.7.1
version=7.8
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packageparts=${targetdir}/lib ${targetdir}/data-directory ${targetdir}/libiconv-2.dll ${targetdir}/python27.dll ${targetdir}/libexpat-1.dll
......@@ -48,12 +48,12 @@ ${broot}/python/python.exe: ${source}/python.zip | checkunzip
checkwget:
wget -V &> /dev/null || mingw-get install msys-wget-bin
${source}/gdb-${version}.tar.bz2: | makesourcedir checkwget
${source}/gdb-${version}.tar.xz: | makesourcedir checkwget
cd ${source} && \
echo "Downloading gdb..." && \
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \
wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \
touch gdb-${version}.tar.bz2
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-${version}.tar.xz
${source}/libiconv-${iconvversion}.tar.gz: | makesourcedir checkwget
cd ${source} && \
......@@ -67,10 +67,10 @@ ${source}/expat-${expatversion}.tar.gz: | makesourcedir checkwget
wget -q http://sourceforge.net/projects/expat/files/expat/${expatversion}/expat-${expatversion}.tar.gz/download && \
touch ${source}/expat-${expatversion}.tar.gz
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir
cd ${staging} && \
echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \
tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \
touch configure
......
......@@ -5,7 +5,7 @@ staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.7.1
version=7.8
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
......@@ -36,12 +36,12 @@ ${source}/Python-${pyversion}.tgz: | makesourcedir
curl -Osf http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \
touch ${source}/Python-${pyversion}.tgz
${source}/gdb-${version}.tar.bz2: | makesourcedir
${source}/gdb-${version}.tar.xz: | makesourcedir
cd ${source} && \
echo "Downloading gdb..." && \
curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \
curl -osf gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \
touch gdb-*.tar.bz2
curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
curl -osf gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-*.tar.xz
${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir
cd ${staging} && \
......@@ -60,10 +60,10 @@ ${targetdir}/python/include/python${pyversion}/pyconfig.h: ${staging}/lib/libpyt
mkdir -p ${targetdir}/python/lib && cp -a ${staging}/lib/python${pyversion} ${targetdir}/python/lib/
mkdir -p ${targetdir}/python/include/python${pyversion} && cp ${staging}/include/python${pyversion}/pyconfig.h ${targetdir}/python/include/python${pyversion}/
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir
${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir
cd ${staging} && \
echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \
tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \
touch configure
......
......@@ -1549,6 +1549,12 @@
The instances of the symbol are highlighted in code and you can edit the
symbol. All instances of the local symbol are changed as you type.
\section1 Column Editing
To apply a change to several rows in a column simultaneously, press
\key Alt, select the rows, and enter or remove text. The changes are made
simultaneously at the cursor position on all the selected rows.
\section1 Applying Refactoring Actions
\QC allows you to quickly and conveniently apply actions to refactor
......
......@@ -94,10 +94,12 @@ AndroidRunner::AndroidRunner(QObject *parent,
m_pingFile = packageDir + _("/debug-ping");
m_pongFile = _("/data/local/tmp/qt/debug-pong-") + m_packageName;
m_gdbserverSocket = packageDir + _("/debug-socket");
m_gdbserverPath = packageDir + _("/lib/gdbserver");
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0))
m_gdbserverPath += _(".so");
m_gdbserverPath = packageDir + _("/lib/libgdbserver.so");
else
m_gdbserverPath = packageDir + _("/lib/gdbserver");
m_gdbserverCommand = m_gdbserverPath + _(" --multi +") + m_gdbserverSocket;
// Detect busybox, as we need to pass -w to ps to get wide output.
......
......@@ -1001,22 +1001,24 @@ void CppEditorWidget::updateFunctionDeclDefLinkNow()
{
if (Core::EditorManager::currentEditor() != editor())
return;
const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot;
const Document::Ptr semanticDoc = d->m_lastSemanticInfo.doc;
if (d->m_declDefLink) {
// update the change marker
const Utils::ChangeSet changes = d->m_declDefLink->changes(d->m_lastSemanticInfo.snapshot);
const Utils::ChangeSet changes = d->m_declDefLink->changes(semanticSnapshot);
if (changes.isEmpty())
d->m_declDefLink->hideMarker(this);
else
d->m_declDefLink->showMarker(this);
return;
}
if (!d->m_lastSemanticInfo.doc || isOutdated())
if (semanticDoc.isNull() || isOutdated())
return;
Snapshot snapshot = CppModelManagerInterface::instance()->snapshot();
snapshot.insert(d->m_lastSemanticInfo.doc);
snapshot.insert(semanticDoc);
d->m_declDefLinkFinder->startFindLinkAt(textCursor(), d->m_lastSemanticInfo.doc, snapshot);
d->m_declDefLinkFinder->startFindLinkAt(textCursor(), semanticDoc, snapshot);
}
void CppEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefLink> link)
......
......@@ -201,13 +201,14 @@ private slots:
void test_quickfix_ExtractLiteralAsParameter_typeDeduction();
void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles();
void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles();
void test_quickfix_ExtractLiteralAsParameter_notTriggeringForInvalidCode();
void test_quickfix_InsertVirtualMethods_data();
void test_quickfix_InsertVirtualMethods();
void test_quickfix_InsertVirtualMethods_implementationFile();
void test_quickfix_InsertVirtualMethods_BaseClassInNamespace();
// tests for "Include Hiererchy"
// tests for "Include Hierarchy"
void test_includehierarchy_data();
void test_includehierarchy();
......
......@@ -3781,3 +3781,21 @@ void CppEditorPlugin::test_quickfix_ExtractLiteralAsParameter_memberFunction_sep
ExtractLiteralAsParameter factory;
QuickFixTestCase(testFiles, &factory);
}
void CppEditorPlugin::test_quickfix_ExtractLiteralAsParameter_notTriggeringForInvalidCode()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QByteArray original;
QByteArray expected;
original =
"T(\"test\")\n"
"{\n"
" const int i = @14;\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
ExtractLiteralAsParameter factory;
QuickFixTestCase(testFiles, &factory);
}
......@@ -3889,13 +3889,15 @@ void ExtractLiteralAsParameter::match(const CppQuickFixInterface &interface,
return;
}
FunctionDeclaratorAST *functionDeclarator
= function->declarator->postfix_declarator_list->value->asFunctionDeclarator();
if (functionDeclarator
&& functionDeclarator->parameter_declaration_clause
&& functionDeclarator->parameter_declaration_clause->dot_dot_dot_token) {
// Do not handle functions with ellipsis parameter.
PostfixDeclaratorListAST * const declaratorList = function->declarator->postfix_declarator_list;
if (!declaratorList)
return;
if (FunctionDeclaratorAST *declarator = declaratorList->value->asFunctionDeclarator()) {
if (declarator->parameter_declaration_clause
&& declarator->parameter_declaration_clause->dot_dot_dot_token) {
// Do not handle functions with ellipsis parameter.
return;
}
}
const int priority = path.size() - 1;
......
Subproject commit 713ee6a92c6785d4e126df06dd0a345dcefbdd54
Subproject commit 82c459ea14dcd8981e397038a30c501a6c3d7697
......@@ -113,8 +113,6 @@
:New.templateCategoryView_QTreeView {name='templateCategoryView' type='QTreeView' visible='1' window=':New_Core::Internal::NewDialog'}
:New_Core::Internal::NewDialog {name='Core__Internal__NewDialog' type='Core::Internal::NewDialog' visible='1' windowTitle='New'}
:Next_QPushButton {text~='(Next.*|Continue)' type='QPushButton' visible='1'}
:Open File.File name:_QLabel {name='fileNameLabel' text='File name:' type='QLabel' visible='1' window=':Open File_QFileDialog'}
:Open File_QFileDialog {name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}
:OpenDocuments_Widget {type='Core::Internal::OpenEditorsWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Open Documents'}
:OpenProject_QStyleItem {clip='false' container=':WelcomePage.scrollView_ScrollView' enabled='true' text='Open Project' type='Button' unnamed='1' visible='true'}
:Options.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
......@@ -126,14 +124,12 @@
:Path.Utils_BaseValidatingLineEdit {container=':qt_tabwidget_stackedwidget_QWidget' name='LineEdit' type='Utils::FancyLineEdit' visible='1'}
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
:QWebPage {type='QWebPage' unnamed='1'}
:QmlJSTools::Internal::QmlConsoleEdit {columnIndex='0' container=':DebugModeWidget_QmlJSTools::Internal::QmlConsoleView' rowIndex='0' type='QmlJSTools::Internal::QmlConsoleEdit' unnamed='1' visible='1'}
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Analyzer Toolbar_QDockWidget {name='Analyzer Toolbar' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Analyzer Toolbar'}
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Go to Help Mode_QToolButton {text='Go to Help Mode' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
:Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'}
:Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
......@@ -168,7 +164,6 @@
:Qt Creator_Issues_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_ProFileEditorWidget {type='QmakeProjectManager::Internal::ProFileEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_PythonEditor::EditorWidget {type='PythonEditor::Internal::EditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QDeclarativeView {type='QDeclarativeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView {type='QmlJSEditor::Internal::QmlJSOutlineTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
......@@ -214,7 +209,6 @@
:Working Copy_Utils::BaseValidatingLineEdit {container=':Git Repository Clone.Working Copy_QGroupBox' type='Utils::FancyLineEdit' unnamed='1' visible='1'}
:WritePermissions_Core::Internal::ReadOnlyFilesDialog {name='Core__Internal__ReadOnlyFilesDialog' type='Core::Internal::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'}
:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:fileNameEdit_QLineEdit {buddy=':Open File.File name:_QLabel' name='fileNameEdit' type='QLineEdit' visible='1'}
:formFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:frame.templateDescription_QTextBrowser {container=':New.frame_QFrame' name='templateDescription' type='QTextBrowser' visible='1'}
:headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
......
......@@ -115,7 +115,7 @@ def markText(editor, direction, typeCount=1):
# works for all standard editors
def replaceEditorContent(editor, newcontent):
type(editor, "<Ctrl+A>")
type(editor, "<Ctrl+a>")
type(editor, "<Delete>")
type(editor, newcontent)
......
......@@ -289,7 +289,7 @@ def addHelpDocumentation(which):
if listWidget.count > 0:
rect = listWidget.visualItemRect(listWidget.item(0))
mouseClick(listWidget, rect.x+5, rect.y+5, 0, Qt.LeftButton)
type(listWidget, "<Ctrl+A>")
type(listWidget, "<Ctrl+a>")
mouseClick(waitForObject("{type='QPushButton' name='removeButton' visible='1'}"), 5, 5, 0, Qt.LeftButton)
for qch in which:
clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}"))
......
......@@ -71,7 +71,7 @@ def main():
return
for i in range(4):
type(editorWidget, "<Left>")
type(editorWidget, "<Ctrl+Shift+U>")
type(editorWidget, "<Ctrl+Shift+u>")
# wait until search finished and verify search results
waitForSearchResults()
validateSearchResult(3)
......
......@@ -60,7 +60,7 @@ def main():
return
type(editorWidget, "<Left>")
markText(editorWidget, "Left", 6)
type(editorWidget, "<Ctrl+F>")
type(editorWidget, "<Ctrl+f>")
# verify if find toolbar exists and if search text contains selected word
test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"),
"Verifying if: Find/Replace pane is displayed at the bottom of the view.")
......
......@@ -33,8 +33,8 @@ source("../../shared/suites_qtta.py")
# go to proper line, make backup, type needed text
def __beginTestSuggestions__(editorArea, lineText, textToType):
# make source code backup to clipboard
type(editorArea, "<Ctrl+A>")
type(editorArea, "<Ctrl+C>")
type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+c>")
# place cursor to proper position and start typing
if not placeCursorToLine(editorArea, lineText):
return False
......@@ -53,8 +53,8 @@ def verifySuggestions(textToType):
# restore source code from clipboard backup
def __endTestSuggestions__(editorArea):
type(editorArea, "<Ctrl+A>")
type(editorArea, "<Ctrl+V>")
type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+v>")
def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion):
# get editor
......
......@@ -132,7 +132,7 @@ def main():
return
for i in range(5):
type(editorArea, "<Left>")
type(editorArea, "<Ctrl+Shift+U>")
type(editorArea, "<Ctrl+Shift+u>")
# check if usage was properly found
expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")]
resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView")
......
......@@ -74,13 +74,13 @@ def main():
if not verifyIndentation(editorArea):
return
# cancel indentation
type(editorArea, "<Ctrl+A>")
type(editorArea, "<Ctrl+a>")
for i in range(5):
type(editorArea, "<Shift+Backtab>")
# select unindented block
type(editorArea, "<Ctrl+A>")
type(editorArea, "<Ctrl+a>")
# do indentation
type(editorArea, "<Ctrl+I>")
type(editorArea, "<Ctrl+i>")
# verify invoked indentation
if not verifyIndentation(editorArea):
return
......
......@@ -31,47 +31,50 @@ source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
def main():
test.log("Welcome mode is not scriptable at the moment")
return
if isQt4Build or not canTestEmbeddedQtQuick():
test.log("Welcome mode is not available or not scriptable with this Squish version")
return
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
"text='Getting Started'")),
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
"text='Getting Started'")), 5, 5, 0, Qt.LeftButton)
# select "Tutorials" topic
mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
getStarted = getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
"text='Get Started Now' id='gettingStartedButton'")
if not test.verify(checkIfObjectExists(getStarted),
"Verifying: Qt Creator displays Welcome Page with Get Started Now button."):
test.fatal("Something's wrong here - leaving test.")
invokeMenuItem("File", "Exit")
return
# select "Tutorials"
mouseClick(waitForObject(getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")), 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
"text='Search in Tutorials...'")), 5, 5, 0, Qt.LeftButton)
searchTutsAndExmpl = getQmlItem("TextInput", ":Qt Creator_QDeclarativeView", False)
replaceEditorContent(waitForObject(searchTutsAndExmpl), "qwerty")
test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
searchTut = getQmlItem("TextField", ":WelcomePage.scrollView_ScrollView", False,
"placeholderText='Search in Tutorials...' id='lineEdit'")
mouseClick(waitForObject(searchTut), 5, 5, 0, Qt.LeftButton)
replaceEditorContent(waitForObject(searchTut), "qwerty")
test.verify(checkIfObjectExists(getQmlItem("Text", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")) and
checkIfObjectExists("{clip='true' container=':Qt Creator_QDeclarativeView' "
"enabled='true' id='captionItem' type='Text' unnamed='1' "
"visible='true'}", False),
checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
False, "id='delegate' radius='0' caption~='.*'"),
False),
"Verifying: 'Tutorials' topic is opened and nothing is shown.")
replaceEditorContent(waitForObject(searchTutsAndExmpl),
"building and running an example application")
bldRunExmpl = getQmlItem("Text", ":Qt Creator_QDeclarativeView", True,
"text='Building and Running an Example Application'")
test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Text and Video tutorials are shown.")
replaceEditorContent(waitForObject(searchTut), "building and running an example application")
bldRunExmpl = getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", False,
"caption='Building and Running an Example Application' "
"id='delegate' radius='0'")
test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Expected Text tutorial is shown.")
# select a text tutorial
mouseClick(waitForObject(bldRunExmpl), 5, 5, 0, Qt.LeftButton)
test.verify(checkIfObjectExists(":Qt Creator.Go to Help Mode_QToolButton") and
checkIfObjectExists(":DebugModeWidget.Debugger Toolbar_QDockWidget", False) and
checkIfObjectExists(":Qt Creator.Analyzer Toolbar_QDockWidget", False),
"Verifying: The tutorial is opened and located to the right part. "
"The view is in 'Edit' mode.")
# go to "Welcome" page -> "Tutorials" topic again and check the video tutorial link
switchViewTo(ViewConstants.WELCOME)
replaceEditorContent(waitForObject(searchTutsAndExmpl), "meet qt quick")
test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", True,
"text='Meet Qt Quick'")),
"Verifying: Link to the video tutorial exists.")
test.verify("Building and Running an Example" in
str(waitForObject(":Help Widget_Help::Internal::HelpWidget").windowTitle),
"Verifying: The tutorial is opened inside Help.")
# close help widget again to avoid focus issues
sendEvent("QCloseEvent", waitForObject(":Help Widget_Help::Internal::HelpWidget"))
# check a demonstration video link
replaceEditorContent(waitForObject(searchTut), "embedded linux")
test.verify(checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
False, "id='delegate' radius='0' caption="
"'Developing Embedded Linux Applications with Qt'")),
"Verifying: Link to the expected demonstration video exists.")
# exit Qt Creator
invokeMenuItem("File", "Exit")
......@@ -63,7 +63,7 @@ def main():
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the declaration of the variable.
type(cppwindow, "<Ctrl+F>")
type(cppwindow, "<Ctrl+f>")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), " xi")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
__typeAndWaitForAction__(cppwindow, "<F2>")
......@@ -72,7 +72,7 @@ def main():
# - Move the cursor to a function call.
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the definition of the function.
type(cppwindow, "<Ctrl+F>")
type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
......@@ -94,7 +94,7 @@ def main():
else:
type(cppwindow, "<Ctrl+Home>")
type(cppwindow, "<Ctrl+F>")
type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy")
# Take us to the second instance
......
......@@ -65,9 +65,9 @@ def prepareQmlFile():
markText(editor, "Ctrl+End")
# unmark the last line
type(editor, "<Shift+Up>")
type(editor, "<Ctrl+C>")
type(editor, "<Ctrl+c>")
for j in range(10):
type(editor, "<Ctrl+V>")
type(editor, "<Ctrl+v>")
# assume the current editor content to be indented correctly
originalText = "%s" % editor.plainText
indented = editor.plainText
......@@ -80,10 +80,10 @@ def testReIndent(originalText):
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
correctIndented = len(originalText)
incorrectIndented = correctIndented + 4004
type(editor, "<Ctrl+A>")
type(editor, "<Ctrl+a>")
test.log("calling re-indent")
starttime = datetime.utcnow()
type(editor, "<Ctrl+I>")
type(editor, "<Ctrl+i>")
waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000)
endtime = datetime.utcnow()
test.xverify(originalText == str(editor.plainText),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment