Merge remote-tracking branch 'origin/3.2'

Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I926bdfc7df6158207cfc07f3c6c591d0a59b7667
This commit is contained in:
Eike Ziller
2014-08-19 12:34:54 +02:00
21 changed files with 121 additions and 93 deletions

View File

@@ -5,7 +5,7 @@ staging=${broot}/staging
pyversion=2.7 pyversion=2.7
expatversion=2.1.0 expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z` arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.7.1 version=7.8
targetdir=${broot}/qtcreator-gdb-${version} targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz 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 && \ wget -q http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \
touch ${source}/Python-${pyversion}.tgz touch ${source}/Python-${pyversion}.tgz
${source}/gdb-${version}.tar.bz2: | makesourcedir ${source}/gdb-${version}.tar.xz: | makesourcedir
cd ${source} && \ cd ${source} && \
echo "Downloading gdb..." && \ echo "Downloading gdb..." && \
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-*.tar.bz2 touch gdb-*.tar.xz
${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir
cd ${staging} && \ 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/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}/ 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} && \ cd ${staging} && \
echo "Extracting gdb..." && \ echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \ tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \ cd gdb-${version} && \
touch configure touch configure

View File

@@ -6,7 +6,7 @@ pyversion=2.7
pydir=${broot}/python pydir=${broot}/python
expatversion=2.1.0 expatversion=2.1.0
iconvversion=1.14 iconvversion=1.14
version=7.7.1 version=7.8
targetdir=${broot}/qtcreator-gdb-${version} targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packageparts=${targetdir}/lib ${targetdir}/data-directory ${targetdir}/libiconv-2.dll ${targetdir}/python27.dll ${targetdir}/libexpat-1.dll 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: checkwget:
wget -V &> /dev/null || mingw-get install msys-wget-bin 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} && \ cd ${source} && \
echo "Downloading gdb..." && \ echo "Downloading gdb..." && \
wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-${version}.tar.bz2 touch gdb-${version}.tar.xz
${source}/libiconv-${iconvversion}.tar.gz: | makesourcedir checkwget ${source}/libiconv-${iconvversion}.tar.gz: | makesourcedir checkwget
cd ${source} && \ 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 && \ wget -q http://sourceforge.net/projects/expat/files/expat/${expatversion}/expat-${expatversion}.tar.gz/download && \
touch ${source}/expat-${expatversion}.tar.gz 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} && \ cd ${staging} && \
echo "Extracting gdb..." && \ echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \ tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \ cd gdb-${version} && \
touch configure touch configure

14
dist/gdb/Makefile.osx vendored
View File

@@ -5,7 +5,7 @@ staging=${broot}/staging
pyversion=2.7 pyversion=2.7
expatversion=2.1.0 expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z` arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.7.1 version=7.8
targetdir=${broot}/qtcreator-gdb-${version} targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz 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 && \ curl -Osf http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \
touch ${source}/Python-${pyversion}.tgz touch ${source}/Python-${pyversion}.tgz
${source}/gdb-${version}.tar.bz2: | makesourcedir ${source}/gdb-${version}.tar.xz: | makesourcedir
cd ${source} && \ cd ${source} && \
echo "Downloading gdb..." && \ echo "Downloading gdb..." && \
curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \
curl -osf gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ curl -osf gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \
touch gdb-*.tar.bz2 touch gdb-*.tar.xz
${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir
cd ${staging} && \ 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/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}/ 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} && \ cd ${staging} && \
echo "Extracting gdb..." && \ echo "Extracting gdb..." && \
tar xf ${source}/gdb-${version}.tar.bz2 && \ tar xf ${source}/gdb-${version}.tar.xz && \
cd gdb-${version} && \ cd gdb-${version} && \
touch configure touch configure

View File

@@ -1549,6 +1549,12 @@
The instances of the symbol are highlighted in code and you can edit the 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. 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 \section1 Applying Refactoring Actions
\QC allows you to quickly and conveniently apply actions to refactor \QC allows you to quickly and conveniently apply actions to refactor

View File

@@ -94,10 +94,12 @@ AndroidRunner::AndroidRunner(QObject *parent,
m_pingFile = packageDir + _("/debug-ping"); m_pingFile = packageDir + _("/debug-ping");
m_pongFile = _("/data/local/tmp/qt/debug-pong-") + m_packageName; m_pongFile = _("/data/local/tmp/qt/debug-pong-") + m_packageName;
m_gdbserverSocket = packageDir + _("/debug-socket"); m_gdbserverSocket = packageDir + _("/debug-socket");
m_gdbserverPath = packageDir + _("/lib/gdbserver");
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0)) 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; m_gdbserverCommand = m_gdbserverPath + _(" --multi +") + m_gdbserverSocket;
// Detect busybox, as we need to pass -w to ps to get wide output. // Detect busybox, as we need to pass -w to ps to get wide output.

View File

@@ -1001,22 +1001,24 @@ void CppEditorWidget::updateFunctionDeclDefLinkNow()
{ {
if (Core::EditorManager::currentEditor() != editor()) if (Core::EditorManager::currentEditor() != editor())
return; return;
const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot;
const Document::Ptr semanticDoc = d->m_lastSemanticInfo.doc;
if (d->m_declDefLink) { if (d->m_declDefLink) {
// update the change marker // 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()) if (changes.isEmpty())
d->m_declDefLink->hideMarker(this); d->m_declDefLink->hideMarker(this);
else else
d->m_declDefLink->showMarker(this); d->m_declDefLink->showMarker(this);
return; return;
} }
if (!d->m_lastSemanticInfo.doc || isOutdated()) if (semanticDoc.isNull() || isOutdated())
return; return;
Snapshot snapshot = CppModelManagerInterface::instance()->snapshot(); 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) void CppEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefLink> link)

View File

@@ -201,13 +201,14 @@ private slots:
void test_quickfix_ExtractLiteralAsParameter_typeDeduction(); void test_quickfix_ExtractLiteralAsParameter_typeDeduction();
void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles(); void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles();
void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles(); void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles();
void test_quickfix_ExtractLiteralAsParameter_notTriggeringForInvalidCode();
void test_quickfix_InsertVirtualMethods_data(); void test_quickfix_InsertVirtualMethods_data();
void test_quickfix_InsertVirtualMethods(); void test_quickfix_InsertVirtualMethods();
void test_quickfix_InsertVirtualMethods_implementationFile(); void test_quickfix_InsertVirtualMethods_implementationFile();
void test_quickfix_InsertVirtualMethods_BaseClassInNamespace(); void test_quickfix_InsertVirtualMethods_BaseClassInNamespace();
// tests for "Include Hiererchy" // tests for "Include Hierarchy"
void test_includehierarchy_data(); void test_includehierarchy_data();
void test_includehierarchy(); void test_includehierarchy();

View File

@@ -3781,3 +3781,21 @@ void CppEditorPlugin::test_quickfix_ExtractLiteralAsParameter_memberFunction_sep
ExtractLiteralAsParameter factory; ExtractLiteralAsParameter factory;
QuickFixTestCase(testFiles, &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);
}

View File

@@ -3889,14 +3889,16 @@ void ExtractLiteralAsParameter::match(const CppQuickFixInterface &interface,
return; return;
} }
FunctionDeclaratorAST *functionDeclarator PostfixDeclaratorListAST * const declaratorList = function->declarator->postfix_declarator_list;
= function->declarator->postfix_declarator_list->value->asFunctionDeclarator(); if (!declaratorList)
if (functionDeclarator return;
&& functionDeclarator->parameter_declaration_clause if (FunctionDeclaratorAST *declarator = declaratorList->value->asFunctionDeclarator()) {
&& functionDeclarator->parameter_declaration_clause->dot_dot_dot_token) { if (declarator->parameter_declaration_clause
&& declarator->parameter_declaration_clause->dot_dot_dot_token) {
// Do not handle functions with ellipsis parameter. // Do not handle functions with ellipsis parameter.
return; return;
} }
}
const int priority = path.size() - 1; const int priority = path.size() - 1;
QuickFixOperation::Ptr op( QuickFixOperation::Ptr op(

View File

@@ -113,8 +113,6 @@
:New.templateCategoryView_QTreeView {name='templateCategoryView' type='QTreeView' visible='1' window=':New_Core::Internal::NewDialog'} :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'} :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'} :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'} :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'} :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'} :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'} :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.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'} :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'} :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.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.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.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.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.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.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.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'} :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_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_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_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_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_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'} :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'} :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'} :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'} :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'} :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'} :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'} :headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}

View File

@@ -115,7 +115,7 @@ def markText(editor, direction, typeCount=1):
# works for all standard editors # works for all standard editors
def replaceEditorContent(editor, newcontent): def replaceEditorContent(editor, newcontent):
type(editor, "<Ctrl+A>") type(editor, "<Ctrl+a>")
type(editor, "<Delete>") type(editor, "<Delete>")
type(editor, newcontent) type(editor, newcontent)

View File

@@ -289,7 +289,7 @@ def addHelpDocumentation(which):
if listWidget.count > 0: if listWidget.count > 0:
rect = listWidget.visualItemRect(listWidget.item(0)) rect = listWidget.visualItemRect(listWidget.item(0))
mouseClick(listWidget, rect.x+5, rect.y+5, 0, Qt.LeftButton) 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) mouseClick(waitForObject("{type='QPushButton' name='removeButton' visible='1'}"), 5, 5, 0, Qt.LeftButton)
for qch in which: for qch in which:
clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}")) clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}"))

View File

@@ -71,7 +71,7 @@ def main():
return return
for i in range(4): for i in range(4):
type(editorWidget, "<Left>") type(editorWidget, "<Left>")
type(editorWidget, "<Ctrl+Shift+U>") type(editorWidget, "<Ctrl+Shift+u>")
# wait until search finished and verify search results # wait until search finished and verify search results
waitForSearchResults() waitForSearchResults()
validateSearchResult(3) validateSearchResult(3)

View File

@@ -60,7 +60,7 @@ def main():
return return
type(editorWidget, "<Left>") type(editorWidget, "<Left>")
markText(editorWidget, "Left", 6) markText(editorWidget, "Left", 6)
type(editorWidget, "<Ctrl+F>") type(editorWidget, "<Ctrl+f>")
# verify if find toolbar exists and if search text contains selected word # verify if find toolbar exists and if search text contains selected word
test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"), test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"),
"Verifying if: Find/Replace pane is displayed at the bottom of the view.") "Verifying if: Find/Replace pane is displayed at the bottom of the view.")

View File

@@ -33,8 +33,8 @@ source("../../shared/suites_qtta.py")
# go to proper line, make backup, type needed text # go to proper line, make backup, type needed text
def __beginTestSuggestions__(editorArea, lineText, textToType): def __beginTestSuggestions__(editorArea, lineText, textToType):
# make source code backup to clipboard # make source code backup to clipboard
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+C>") type(editorArea, "<Ctrl+c>")
# place cursor to proper position and start typing # place cursor to proper position and start typing
if not placeCursorToLine(editorArea, lineText): if not placeCursorToLine(editorArea, lineText):
return False return False
@@ -53,8 +53,8 @@ def verifySuggestions(textToType):
# restore source code from clipboard backup # restore source code from clipboard backup
def __endTestSuggestions__(editorArea): def __endTestSuggestions__(editorArea):
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+V>") type(editorArea, "<Ctrl+v>")
def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion): def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion):
# get editor # get editor

View File

@@ -132,7 +132,7 @@ def main():
return return
for i in range(5): for i in range(5):
type(editorArea, "<Left>") type(editorArea, "<Left>")
type(editorArea, "<Ctrl+Shift+U>") type(editorArea, "<Ctrl+Shift+u>")
# check if usage was properly found # check if usage was properly found
expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")] expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")]
resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView") resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView")

View File

@@ -74,13 +74,13 @@ def main():
if not verifyIndentation(editorArea): if not verifyIndentation(editorArea):
return return
# cancel indentation # cancel indentation
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
for i in range(5): for i in range(5):
type(editorArea, "<Shift+Backtab>") type(editorArea, "<Shift+Backtab>")
# select unindented block # select unindented block
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
# do indentation # do indentation
type(editorArea, "<Ctrl+I>") type(editorArea, "<Ctrl+i>")
# verify invoked indentation # verify invoked indentation
if not verifyIndentation(editorArea): if not verifyIndentation(editorArea):
return return

View File

@@ -31,47 +31,50 @@ source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py") source("../../shared/suites_qtta.py")
def main(): def main():
test.log("Welcome mode is not scriptable at the moment") if isQt4Build or not canTestEmbeddedQtQuick():
test.log("Welcome mode is not available or not scriptable with this Squish version")
return return
# open Qt Creator # open Qt Creator
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, getStarted = getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
"text='Getting Started'")), "text='Get Started Now' id='gettingStartedButton'")
"Verifying: Qt Creator displays Welcome Page with Getting Started."): if not test.verify(checkIfObjectExists(getStarted),
mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False, "Verifying: Qt Creator displays Welcome Page with Get Started Now button."):
"text='Getting Started'")), 5, 5, 0, Qt.LeftButton) test.fatal("Something's wrong here - leaving test.")
# select "Tutorials" topic invokeMenuItem("File", "Exit")
mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False, return
# select "Tutorials"
mouseClick(waitForObject(getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")), 5, 5, 0, Qt.LeftButton) "text='Tutorials'")), 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, searchTut = getQmlItem("TextField", ":WelcomePage.scrollView_ScrollView", False,
"text='Search in Tutorials...'")), 5, 5, 0, Qt.LeftButton) "placeholderText='Search in Tutorials...' id='lineEdit'")
searchTutsAndExmpl = getQmlItem("TextInput", ":Qt Creator_QDeclarativeView", False) mouseClick(waitForObject(searchTut), 5, 5, 0, Qt.LeftButton)
replaceEditorContent(waitForObject(searchTutsAndExmpl), "qwerty") replaceEditorContent(waitForObject(searchTut), "qwerty")
test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, test.verify(checkIfObjectExists(getQmlItem("Text", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")) and "text='Tutorials'")) and
checkIfObjectExists("{clip='true' container=':Qt Creator_QDeclarativeView' " checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
"enabled='true' id='captionItem' type='Text' unnamed='1' " False, "id='delegate' radius='0' caption~='.*'"),
"visible='true'}", False), False),
"Verifying: 'Tutorials' topic is opened and nothing is shown.") "Verifying: 'Tutorials' topic is opened and nothing is shown.")
replaceEditorContent(waitForObject(searchTutsAndExmpl), replaceEditorContent(waitForObject(searchTut), "building and running an example application")
"building and running an example application") bldRunExmpl = getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", False,
bldRunExmpl = getQmlItem("Text", ":Qt Creator_QDeclarativeView", True, "caption='Building and Running an Example Application' "
"text='Building and Running an Example Application'") "id='delegate' radius='0'")
test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Text and Video tutorials are shown.") test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Expected Text tutorial is shown.")
# select a text tutorial # select a text tutorial
mouseClick(waitForObject(bldRunExmpl), 5, 5, 0, Qt.LeftButton) mouseClick(waitForObject(bldRunExmpl), 5, 5, 0, Qt.LeftButton)
test.verify(checkIfObjectExists(":Qt Creator.Go to Help Mode_QToolButton") and test.verify("Building and Running an Example" in
checkIfObjectExists(":DebugModeWidget.Debugger Toolbar_QDockWidget", False) and str(waitForObject(":Help Widget_Help::Internal::HelpWidget").windowTitle),
checkIfObjectExists(":Qt Creator.Analyzer Toolbar_QDockWidget", False), "Verifying: The tutorial is opened inside Help.")
"Verifying: The tutorial is opened and located to the right part. " # close help widget again to avoid focus issues
"The view is in 'Edit' mode.") sendEvent("QCloseEvent", waitForObject(":Help Widget_Help::Internal::HelpWidget"))
# go to "Welcome" page -> "Tutorials" topic again and check the video tutorial link # check a demonstration video link
switchViewTo(ViewConstants.WELCOME) replaceEditorContent(waitForObject(searchTut), "embedded linux")
replaceEditorContent(waitForObject(searchTutsAndExmpl), "meet qt quick") test.verify(checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", True, False, "id='delegate' radius='0' caption="
"text='Meet Qt Quick'")), "'Developing Embedded Linux Applications with Qt'")),
"Verifying: Link to the video tutorial exists.") "Verifying: Link to the expected demonstration video exists.")
# exit Qt Creator # exit Qt Creator
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")

View File

@@ -63,7 +63,7 @@ def main():
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the declaration of the variable. # 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"), " xi")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
__typeAndWaitForAction__(cppwindow, "<F2>") __typeAndWaitForAction__(cppwindow, "<F2>")
@@ -72,7 +72,7 @@ def main():
# - Move the cursor to a function call. # - Move the cursor to a function call.
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the definition of the function. # Creator will show you the definition of the function.
type(cppwindow, "<Ctrl+F>") type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
@@ -94,7 +94,7 @@ def main():
else: else:
type(cppwindow, "<Ctrl+Home>") type(cppwindow, "<Ctrl+Home>")
type(cppwindow, "<Ctrl+F>") type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy")
# Take us to the second instance # Take us to the second instance

View File

@@ -65,9 +65,9 @@ def prepareQmlFile():
markText(editor, "Ctrl+End") markText(editor, "Ctrl+End")
# unmark the last line # unmark the last line
type(editor, "<Shift+Up>") type(editor, "<Shift+Up>")
type(editor, "<Ctrl+C>") type(editor, "<Ctrl+c>")
for j in range(10): for j in range(10):
type(editor, "<Ctrl+V>") type(editor, "<Ctrl+v>")
# assume the current editor content to be indented correctly # assume the current editor content to be indented correctly
originalText = "%s" % editor.plainText originalText = "%s" % editor.plainText
indented = editor.plainText indented = editor.plainText
@@ -80,10 +80,10 @@ def testReIndent(originalText):
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
correctIndented = len(originalText) correctIndented = len(originalText)
incorrectIndented = correctIndented + 4004 incorrectIndented = correctIndented + 4004
type(editor, "<Ctrl+A>") type(editor, "<Ctrl+a>")
test.log("calling re-indent") test.log("calling re-indent")
starttime = datetime.utcnow() starttime = datetime.utcnow()
type(editor, "<Ctrl+I>") type(editor, "<Ctrl+i>")
waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000) waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000)
endtime = datetime.utcnow() endtime = datetime.utcnow()
test.xverify(originalText == str(editor.plainText), test.xverify(originalText == str(editor.plainText),