Merge remote-tracking branch 'origin/3.0'

Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/shared/qbs

Change-Id: Ic6f115e3d9da32327cfe2d02d7356687dc3f60d7
This commit is contained in:
Eike Ziller
2014-02-11 09:14:22 +01:00
52 changed files with 352 additions and 212 deletions

70
dist/changes-3.0.1 vendored Normal file
View File

@@ -0,0 +1,70 @@
Qt Creator version 3.0.1 is a bugfix release.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://gitorious.org/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v3.0.0..v3.0.1
Compilers
* MSVC
* Added detection of native 64 bit arm toolchain
* Fixed issue with duplicate entries
QMake Projects
* Fixed issue with duplicate entries when configuring projects
Debugging
* GDB and LLDB
* Added pretty printer for QTimeZone
* Fixed pretty printer for QSharedDataPointer
* Fixed display of multiple inheritance from std::list
(QTCREATORBUG-11023)
* GDB
* Fixed inserting breakpoints while application is running
(QTCREATORBUG-11084)
* Fixed display of std::array<some_struct>
* LLDB
* Fixed display of bases in case of multiple inheritance
(QTCREATORBUG-11109)
* CDB
* Fixed stepping through sources of Qt 5.2 binary package
(QTCREATORBUG-11233)
C++ Support
* Fixed selecting project to use for specific file
* Fixed completion for nested enums (QTCREATORBUG-5456)
QML Profiler
* Improved performance (QTCREATORBUG-10950)
* Fixed issue with missing details for bindings in events pane
Qt Quick Designer
* Added missing Qt Quick 2 specific properties
* Fixed crash when anchoring root item (QTCREATORBUG-11078)
* Fixed crash when dragging item from library and imports need to change
(QTCREATORBUG-11139)
* Fixed crash with invalid anchors (QTCREATORBUG-11255)
* Fixed crash when editing text without pressing enter or return key
(QTCREATORBUG-11249)
* Fixed crash with Anchors > Fill and Qt Quick Controls (QTCREATORBUG-10476)
* Fixed updating the UI when switching between states (QTCREATORBUG-10674)
FakeVim
* Fixed that user command left editor in overwrite mode (QTCREATORBUG-10460)
Platform Specific
Android
* Fixed too short timeouts when calling external tools (QTCREATORBUG-10944)
* Fixed issues with build paths with non-latin characters (QTBUG-34316)
* Fixed issue with symbol search path for debugging (QTCREATORBUG-10382)
iOS
* Improved startup performance of on-device debugging (QTCREATORBUG-10884)
* Fixed executable path shown in run configuration UI (QTCREATORBUG-11080)
* Fixed handling of control characters in application output
(QTCREATORBUG-11219)
* Fixed that custom application arguments were lost after restart

View File

@@ -156,6 +156,7 @@ INCLUDEPATH += \
$$IDE_SOURCE_TREE/src/libs \
$$IDE_SOURCE_TREE/tools
QTC_PLUGIN_DIRS = $$(QTC_PLUGIN_DIRS)
QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for(dir, QTC_PLUGIN_DIRS) {
INCLUDEPATH += $$dir

View File

@@ -1,6 +1,7 @@
TARGET = qml2puppet
TEMPLATE = app
CONFIG += console
DESTDIR = $$[QT_INSTALL_BINS]

View File

@@ -4,4 +4,5 @@ Label {
}
LineEdit {
backendValue: backendValues.%2
}
Layout.fillWidth: true
}

View File

@@ -1,6 +1,6 @@
AutoTypes {
imports: [ "import HelperWidgets 2.0", "import QtQuick 2.1" ]
imports: [ "import HelperWidgets 2.0", "import QtQuick 2.1", "import QtQuick.Layouts 1.1" ]
Type {
typeNames: ["int"]

View File

@@ -46,7 +46,7 @@ Column {
}
SecondColumnLayout {
LineEdit {
UrlChooser {
backendValue: backendValues.source
implicitWidth: 180
}

View File

@@ -7,6 +7,10 @@
<source>Advanced</source>
<translation>Дополнительно</translation>
</message>
<message>
<source>Origin</source>
<translation>Происхождение</translation>
</message>
<message>
<source>Scale</source>
<translation>Масштаб</translation>
@@ -15,6 +19,30 @@
<source>Rotation</source>
<translation>Вращение</translation>
</message>
<message>
<source>Enabled</source>
<translation>Включено</translation>
</message>
<message>
<source>Accept mouse and keyboard events</source>
<translation>Принимать события мыши и клавиатуры</translation>
</message>
<message>
<source>Smooth</source>
<translation>Сглаживание</translation>
</message>
<message>
<source>Smooth sampling active</source>
<translation>Включение сглаживания</translation>
</message>
<message>
<source>Antialiasing</source>
<translation>Антиалиасинг</translation>
</message>
<message>
<source>Anti-aliasing active</source>
<translation>Включение антиалиасинга</translation>
</message>
</context>
<context>
<name>Analyzer</name>
@@ -14905,7 +14933,7 @@ Commit now?</source>
</message>
<message>
<source>Git Reflog &quot;%1&quot;</source>
<translation type="unfinished">Git - reflog «%1»</translation>
<translation>Git - reflog «%1»</translation>
</message>
<message>
<source>Cannot describe &quot;%1&quot;.</source>
@@ -15588,7 +15616,7 @@ Commit now?</source>
</message>
<message>
<source>Reflog</source>
<translation type="unfinished">Reflog</translation>
<translation>Reflog</translation>
</message>
<message>
<source>&amp;Patch</source>
@@ -15660,7 +15688,7 @@ Commit now?</source>
</message>
<message>
<source>Git Gui</source>
<translation type="unfinished">Git Gui</translation>
<translation>Интерфейс Git</translation>
</message>
<message>
<source>Repository Browser</source>
@@ -26374,8 +26402,12 @@ For qmlproject projects, use the importPaths property to add import paths.</sour
<translation>Требуется импорт QtQuick.tooling.</translation>
</message>
<message>
<source>Expected version 1.1 or lower.</source>
<translation>Требуется версия 1.1 или ниже.</translation>
<source>Major version different from 1 not supported.</source>
<translation>Версия с основным номером отличным от 1 не поддерживается.</translation>
</message>
<message>
<source>Reading only version 1.1 parts.</source>
<translation>Чтение разделов версии 1.1.</translation>
</message>
<message>
<source>Expected document to contain a single object definition.</source>

View File

@@ -27,7 +27,9 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
Rectangle {
id: searchBar
@@ -38,10 +40,10 @@ Rectangle {
radius: 6
border.color: "#cccccc"
property alias placeholderText: placeHolderText.text
property alias placeholderText: lineEdit.placeholderText
property alias text: lineEdit.text
TextInput {
TextField {
id: lineEdit
anchors.topMargin: 1
anchors.left: parent.left
@@ -50,18 +52,11 @@ Rectangle {
anchors.leftMargin: 12
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
font.pixelSize: 14
font.family: "Helvetica"
}
NativeText {
id: placeHolderText
visible: !lineEdit.text.length
text: qsTr("Search...")
anchors.fill: lineEdit
font: lineEdit.font
verticalAlignment: Text.AlignVCenter
color: "gray"
placeholderText: qsTr("Search...")
style: TextFieldStyle {
background: Item {
}
}
}
}

View File

@@ -121,7 +121,7 @@ ColumnLayout {
Button {
text: qsTr("Get Started Now")
onClicked: gettingStarted.openSplitHelp("qthelp://org.qt-project.qtcreator/doc/creator-getting-started.html")
onClicked: gettingStarted.openHelp("qthelp://org.qt-project.qtcreator/doc/index.html")
}
Item {

View File

@@ -98,7 +98,7 @@ void FileNameValidatingLineEdit::setForceFirstCapitalLetter(bool b)
#define SLASHES "/\\"
static const char notAllowedCharsSubDir[] = ",^@=+{}[]~!?:&*\"|#%<>$\"'();`' ";
static const char notAllowedCharsNoSubDir[] = ",^@=+{}[]~!?:&*\"|#%<>$\"'();`' " SLASHES;
static const char notAllowedCharsNoSubDir[] = ",^@={}[]~!?:&*\"|#%<>$\"'();`' " SLASHES;
static const char *notAllowedSubStrings[] = {".."};

View File

@@ -54,7 +54,7 @@ bool ProjectNameValidatingLineEdit::validateProjectName(const QString &name, QSt
if (name.contains(QLatin1Char('.'))) {
if (errorMessage)
*errorMessage = tr("Invalid character '.'.");
return false;
return false;
}
return true;
}

View File

@@ -175,6 +175,7 @@ const char G_WINDOW_OTHER[] = "QtCreator.Group.Window.Other";
// Help groups (global)
const char G_HELP_HELP[] = "QtCreator.Group.Help.Help";
const char G_HELP_SUPPORT[] = "QtCreator.Group.Help.Supprt";
const char G_HELP_ABOUT[] = "QtCreator.Group.Help.About";
const char ICON_MINUS[] = ":/core/images/minus.png";

View File

@@ -509,6 +509,7 @@ void MainWindow::registerDefaultContainers()
menubar->addMenu(ac, Constants::G_HELP);
ac->menu()->setTitle(tr("&Help"));
ac->appendGroup(Constants::G_HELP_HELP);
ac->appendGroup(Constants::G_HELP_SUPPORT);
ac->appendGroup(Constants::G_HELP_ABOUT);
}
@@ -744,6 +745,11 @@ void MainWindow::registerDefaultActions()
mwindow->addMenu(mviews, Constants::G_WINDOW_VIEWS);
mviews->menu()->setTitle(tr("&Views"));
// "Help" separators
mhelp->addSeparator(globalContext, Constants::G_HELP_SUPPORT);
if (!Utils::HostOsInfo::isMacHost())
mhelp->addSeparator(globalContext, Constants::G_HELP_ABOUT);
// About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about"));
if (Utils::HostOsInfo::isMacHost())

View File

@@ -229,7 +229,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(action, SIGNAL(triggered()), this, SLOT(addBookmark()));
// Add Contents, Index, and Context menu items and a separator to the Help menu
// Add Contents, Index, and Context menu items
action = new QAction(QIcon::fromTheme(QLatin1String("help-contents")),
tr(SB_CONTENTS), this);
cmd = ActionManager::registerAction(action, "Help.Contents", globalcontext);
@@ -247,30 +247,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1));
connect(action, SIGNAL(triggered()), this, SLOT(activateContext()));
if (!Utils::HostOsInfo::isMacHost()) {
action = new QAction(this);
action->setSeparator(true);
cmd = ActionManager::registerAction(action, "Help.Separator", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
}
action = new QAction(tr("Technical Support"), this);
cmd = ActionManager::registerAction(action, "Help.TechSupport", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage()));
action = new QAction(tr("Report Bug..."), this);
cmd = ActionManager::registerAction(action, "Help.ReportBug", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug()));
if (!Utils::HostOsInfo::isMacHost()) {
action = new QAction(this);
action->setSeparator(true);
cmd = ActionManager::registerAction(action, "Help.Separator2", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
}
action = new QAction(this);
ActionManager::registerAction(action, Core::Constants::PRINT, modecontext);
connect(action, SIGNAL(triggered()), m_centralWidget, SLOT(print()));

View File

@@ -54,6 +54,8 @@ using namespace QmakeProjectManager;
namespace Ios {
namespace Internal {
const QLatin1String runConfigurationKey("Ios.run_arguments");
class IosRunConfigurationWidget : public RunConfigWidget
{
Q_OBJECT
@@ -84,6 +86,7 @@ IosRunConfiguration::IosRunConfiguration(Target *parent, Core::Id id, const QStr
IosRunConfiguration::IosRunConfiguration(Target *parent, IosRunConfiguration *source)
: RunConfiguration(parent, source)
, m_profilePath(source->m_profilePath)
, m_arguments(source->m_arguments)
{
init();
}
@@ -194,6 +197,19 @@ Utils::FileName IosRunConfiguration::exePath() const
return bundleDir().appendPath(appName());
}
bool IosRunConfiguration::fromMap(const QVariantMap &map)
{
m_arguments = map.value(runConfigurationKey).toStringList();
return RunConfiguration::fromMap(map);
}
QVariantMap IosRunConfiguration::toMap() const
{
QVariantMap res = RunConfiguration::toMap();
res[runConfigurationKey] = m_arguments;
return res;
}
IosRunConfigurationWidget::IosRunConfigurationWidget(IosRunConfiguration *runConfiguration) :
m_ui(new Ui::IosRunConfiguration), m_runConfiguration(runConfiguration)
{

View File

@@ -61,6 +61,9 @@ public:
Utils::FileName bundleDir() const;
Utils::FileName exePath() const;
bool fromMap(const QVariantMap &map) QTC_OVERRIDE;
QVariantMap toMap() const QTC_OVERRIDE;
protected:
IosRunConfiguration(ProjectExplorer::Target *parent, IosRunConfiguration *source);
QString defaultDisplayName();

View File

@@ -29,6 +29,8 @@
#include "fileresourcesmodel.h"
#include <coreplugin/icore.h>
#include <model.h>
#include <QFileDialog>
@@ -130,7 +132,7 @@ void FileResourcesModel::openFileDialog()
if (!QFileInfo(path).exists())
path = modelPath;
QString newFile = QFileDialog::getOpenFileName(0, tr("Open File"), path, m_filter);
QString newFile = QFileDialog::getOpenFileName(Core::ICore::mainWindow(), tr("Open File"), path, m_filter);
if (!newFile.isEmpty()) {
setFileNameStr(newFile);

View File

@@ -42,17 +42,20 @@ StatesEditorImageProvider::StatesEditorImageProvider()
QImage StatesEditorImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
{
if (m_nodeInstanceView.isNull())
return QImage();
if (!m_nodeInstanceView->model())
return QImage(); //NodeInstanceView might be detached
QSize newSize = requestedSize;
if (newSize.isEmpty())
newSize = QSize (100, 100);
if (m_nodeInstanceView.isNull() || !m_nodeInstanceView->model()) {
//NodeInstanceView might be detached
//Return white QImage
QImage image(newSize, QImage::Format_ARGB32);
image.fill(0xFFFFFFFF);
return image;
}
QString imageId = id.split(QLatin1Char('-')).first();
QImage image;

View File

@@ -397,7 +397,6 @@ Rectangle {
Component {
id: underlay
Item {
anchors.fill:parent
property variant color: parent.color
clip:true
Rectangle {

View File

@@ -65,7 +65,8 @@ IDevice::Ptr QnxDeviceConfigurationWizard::device()
sshParams.port = 22;
sshParams.timeout = 10;
sshParams.authenticationType = m_setupPage->authenticationType();
if (sshParams.authenticationType == QSsh::SshConnectionParameters::AuthenticationTypePassword)
if (sshParams.authenticationType == QSsh::SshConnectionParameters::AuthenticationTypeTryAllPasswordBasedMethods
|| sshParams.authenticationType == QSsh::SshConnectionParameters::AuthenticationTypePassword)
sshParams.password = m_setupPage->password();
else
sshParams.privateKeyFile = m_setupPage->privateKeyFilePath();

View File

@@ -78,7 +78,7 @@ static QString signalProcessByNameCommandLine(const QString &filePath, int signa
"cd /proc; for pid in `ls -d [0123456789]*`; "
"do "
"if [ \"`readlink /proc/$pid/exe`\" = \"%1\" ]; then "
" kill %2 $pid;"
" kill -%2 $pid;"
"fi; "
"done").arg(filePath).arg(signal);
}

View File

@@ -17,11 +17,29 @@ include(../qtcreator.pri)
# for substitution in the .pluginspec
dependencyList = "<dependencyList>"
for(dep, plugin_deps) {
include($$PWD/plugins/$$dep/$${dep}_dependencies.pri)
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
exists($$dir/$$dep/$${dep}_dependencies.pri) {
dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
break()
}
}
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
dependencyList += " <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\"/>"
}
for(dep, plugin_recmds) {
include($$PWD/plugins/$$dep/$${dep}_dependencies.pri)
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
exists($$dir/$$dep/$${dep}_dependencies.pri) {
dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
break()
}
}
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
dependencyList += " <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>"
}
dependencyList += " </dependencyList>"

View File

@@ -508,7 +508,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
QString tmp = args.at(0).toQString(m_tmp1);
for (int i = 1; i < args.count(); ++i)
tmp = tmp.arg(args.at(i).toQString(m_tmp2));
ret << ProString(tmp);
ret << (tmp.isSharedWith(m_tmp1) ? args.at(0) : ProString(tmp).setSource(args.at(0)));
}
break;
case E_FORMAT_NUMBER:
@@ -1526,7 +1526,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
if (args.count() >= 2) {
const ProStringList &vals = values(args.at(1).toKey());
if (!vals.isEmpty())
contents = vals.join(fL1S("\n")) + QLatin1Char('\n');
contents = vals.join(QLatin1Char('\n')) + QLatin1Char('\n');
if (args.count() >= 3)
if (!args.at(2).toQString(m_tmp1).compare(fL1S("append"), Qt::CaseInsensitive))
mode = QIODevice::Append;

View File

@@ -29,6 +29,7 @@
: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 {text~='Add the file.*to version control (.*)?' type='QMessageBox' unnamed='1' visible='1'}
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':Qt Creator.Analyzer Toolbar_QDockWidget' name='AnalyzerManagerToolBox' type='QComboBox' visible='1'}
:Analyzer Toolbar.Clear_QToolButton {container=':Qt Creator.Analyzer Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
:Analyzer Toolbar.Elapsed:_QLabel {container=':Qt Creator.Analyzer Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
:Analyzer Toolbar.Start_QToolButton {container=':Qt Creator.Analyzer Toolbar_QDockWidget' text='Start' type='QToolButton' unnamed='1' visible='1'}
:Behavior.Autocomplete common prefix_QCheckBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='partiallyComplete' text='Autocomplete common prefix' type='QCheckBox' visible='1'}

View File

@@ -29,38 +29,9 @@
import re;
# dictionary to hold a list of all installed handler functions for all object-signalSignature pairs
installedSignalHandlers = {}
# flag to indicate whether overrideInstallLazySignalHandler() has been called already
overridenInstallLazySignalHandlers = False
# flag to indicate whether a tasks file should be created when building ends with errors
createTasksFileOnError = True
# call this function to override installLazySignalHandler()
def overrideInstallLazySignalHandler():
global overridenInstallLazySignalHandlers
if overridenInstallLazySignalHandlers:
return
overridenInstallLazySignalHandlers = True
global installLazySignalHandler
installLazySignalHandler = __addSignalHandlerDict__(installLazySignalHandler)
# avoids adding a handler to a signal twice or more often
# do not call this function directly - use overrideInstallLazySignalHandler() instead
def __addSignalHandlerDict__(lazySignalHandlerFunction):
global installedSignalHandlers
def wrappedFunction(name, signalSignature, handlerFunctionName):
handlers = installedSignalHandlers.get("%s____%s" % (name,signalSignature))
if handlers == None:
lazySignalHandlerFunction(name, signalSignature, handlerFunctionName)
installedSignalHandlers.setdefault("%s____%s" % (name,signalSignature), [handlerFunctionName])
else:
if not handlerFunctionName in handlers:
lazySignalHandlerFunction(name, signalSignature, handlerFunctionName)
handlers.append(handlerFunctionName)
installedSignalHandlers.setdefault("%s____%s" % (name,signalSignature), handlers)
return wrappedFunction
# this method checks the last build (if there's one) and logs the number of errors, warnings and
# lines within the Issues output
# optional parameter can be used to tell this function if the build was expected to fail or not
@@ -105,6 +76,13 @@ def compileSucceeded(compileOutput):
return None != re.match(".*exited normally\.\n\d\d:\d\d:\d\d: Elapsed time: "
"(\d:)?\d{2}:\d\d\.$", str(compileOutput), re.S)
def waitForCompile(timeout=60000):
progressBarWait(10000) # avoids switching to Issues pane after checking Compile Output
ensureChecked(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
if not waitFor("re.match('.*Elapsed time: (\d:)?\d{2}:\d\d\.$', str(output.plainText), re.S)", timeout):
test.warning("Waiting for compile timed out after %d s." % (timeout / 1000))
def dumpBuildIssues(listModel):
issueDump = []
for row in range(listModel.rowCount()):
@@ -254,7 +232,8 @@ def runVerify(checkedTargets):
for kit, config in availableConfigs:
selectBuildConfig(len(checkedTargets), kit, config)
test.log("Using build config '%s'" % config)
if not runAndCloseApp():
return
if runAndCloseApp() == None:
checkCompile()
continue
verifyBuildAndRun()
mouseClick(waitForObject(":*Qt Creator.Clear_QToolButton"))

View File

@@ -136,13 +136,16 @@ class SubprocessType:
USER_DEFINED=3
@staticmethod
def getWindowType(subprocessType):
def getWindowType(subprocessType, qtQuickVersion=1):
if subprocessType == SubprocessType.QT_WIDGET:
return "QMainWindow"
if subprocessType == SubprocessType.QT_QUICK_APPLICATION:
return "QmlApplicationViewer"
return "QtQuick%dApplicationViewer" % qtQuickVersion
if subprocessType == SubprocessType.QT_QUICK_UI:
return "QDeclarativeViewer"
if qtQuickVersion == 1:
return "QDeclarativeViewer"
else:
return "QQuickView"
if subprocessType == SubprocessType.USER_DEFINED:
return "user-defined"
test.fatal("Could not determine the WindowType for SubprocessType %s" % subprocessType)

View File

@@ -68,6 +68,11 @@ def modifyRunSettingsForHookInto(projectName, kitCount, port):
changingVars.append("SQUISH_LIBQTDIR=%s" % replacement)
else:
changingVars.append(varName)
elif varName == "DYLD_FRAMEWORK_PATH" and platform.system() == 'Darwin':
value = str(model.data(model.index(index.row, 1)).toString())
test.log("Adding %s to DYLD_FRAMEWORK_PATH" % qtLibPath)
replacement = ":".join(filter(len, [qtLibPath, value]))
changingVars.append("%s=%s" % (varName, replacement))
batchEditRunEnvironment(kitCount, 0, changingVars, True)
switchViewTo(ViewConstants.EDIT)
return result
@@ -111,29 +116,12 @@ def modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, por
executable = os.path.abspath(os.path.dirname(qmake) + "/qmlscene")
if platform.system() in ('Microsoft', 'Windows'):
executable = executable + ".exe"
addRunConfig = waitForObject("{container={window=':Qt Creator_Core::Internal::MainWindow' "
"type='ProjectExplorer::Internal::RunSettingsWidget' unnamed='1' "
"visible='1'} occurrence='2' text='Add' type='QPushButton' "
"unnamed='1' visible='1'}")
clickButton(addRunConfig)
activateItem(waitForObject("{type='QMenu' visible='1' unnamed='1'}"), "Custom Executable")
exePathChooser = waitForObject(":Executable:_Utils::PathChooser")
exeLineEd = getChildByClass(exePathChooser, "Utils::BaseValidatingLineEdit")
argLineEd = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' "
"type='QLabel' text='Arguments:' visible='1'} type='QLineEdit' "
"unnamed='1' visible='1'}")
wdPathChooser = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' "
"text='Working directory:' type='QLabel'} "
"type='Utils::PathChooser' unnamed='1' visible='1'}")
wdLineEd = getChildByClass(wdPathChooser, "Utils::BaseValidatingLineEdit")
startAUT = os.path.abspath(squishPath + "/bin/startaut")
if platform.system() in ('Microsoft', 'Windows'):
startAUT = startAUT + ".exe"
args = "--verbose --port=%d %s %s.qml" % (port, executable, projectName)
projectPath = os.path.abspath("%s/%s" % (workingDir, projectName))
replaceEditorContent(exeLineEd, startAUT)
replaceEditorContent(argLineEd, "--verbose --port=%d %s %s.qml"
% (port, executable, projectName))
replaceEditorContent(wdLineEd, projectPath)
__invokeAddCustomExecutable__(startAUT, args, projectPath)
clickButton(waitForObject("{text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow' "
"leftWidget={type='QLabel' text~='Us(e|ing) <b>Build Environment</b>'"
@@ -231,27 +219,13 @@ def __configureCustomExecutable__(projectName, port, mkspec, qmakeVersion):
"Failed to find '%s'" % startAUT)
return False
progressBarWait()
addButton = waitForObject("{container={window=':Qt Creator_Core::Internal::MainWindow' "
"type='ProjectExplorer::Internal::RunSettingsWidget' unnamed='1' "
"visible='1'} occurrence='2' text='Add' type='QPushButton' "
"unnamed='1' visible='1'}")
clickButton(addButton)
addMenu = addButton.menu()
activateItem(waitForObjectItem(addMenu, 'Custom Executable'))
exePathChooser = waitForObject(":Executable:_Utils::PathChooser", 2000)
exeLineEd = getChildByClass(exePathChooser, "Utils::BaseValidatingLineEdit")
argLineEd = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' "
"type='QLabel' text='Arguments:' visible='1'} type='QLineEdit' "
"unnamed='1' visible='1'}")
wdPathChooser = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' text='Working directory:' type='QLabel'} "
"type='Utils::PathChooser' unnamed='1' visible='1'}")
replaceEditorContent(exeLineEd, startAUT)
# the following is currently only configured for release builds (will be enhanced later)
if platform.system() in ('Microsoft', 'Windows'):
debOrRel = "release" + os.sep
else:
debOrRel = ""
replaceEditorContent(argLineEd, "--verbose --port=%d %s%s" % (port, debOrRel, projectName))
args = "--verbose --port=%d %s%s" % (port, debOrRel, projectName)
__invokeAddCustomExecutable__(startAUT, args)
return True
# function that retrieves a specific child object by its class
@@ -424,3 +398,25 @@ def __getSquishServer__():
test.fatal("SQUISH_PREFIX isn't set - leaving test")
return None
return os.path.abspath(squishSrv + "/bin/squishserver")
def __invokeAddCustomExecutable__(exe, args, workingDir=None):
addButton = waitForObject("{container={window=':Qt Creator_Core::Internal::MainWindow' "
"type='ProjectExplorer::Internal::RunSettingsWidget' unnamed='1' "
"visible='1'} occurrence='2' text='Add' type='QPushButton' "
"unnamed='1' visible='1'}")
clickButton(addButton)
addMenu = addButton.menu()
activateItem(waitForObjectItem(addMenu, 'Custom Executable'))
exePathChooser = waitForObject(":Executable:_Utils::PathChooser")
exeLineEd = getChildByClass(exePathChooser, "Utils::BaseValidatingLineEdit")
argLineEd = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' "
"type='QLabel' text='Arguments:' visible='1'} type='QLineEdit' "
"unnamed='1' visible='1'}")
wdPathChooser = waitForObject("{buddy={window=':Qt Creator_Core::Internal::MainWindow' "
"text='Working directory:' type='QLabel'} "
"type='Utils::PathChooser' unnamed='1' visible='1'}")
wdLineEd = getChildByClass(wdPathChooser, "Utils::BaseValidatingLineEdit")
replaceEditorContent(exeLineEd, exe)
replaceEditorContent(argLineEd, args)
if workingDir:
replaceEditorContent(wdLineEd, workingDir)

View File

@@ -397,24 +397,23 @@ def waitForProcessRunning(running=True):
# userDefinedType - if you set sType to SubprocessType.USER_DEFINED you must(!) specify the WindowType for hooking into
# by yourself (or use the function parameter)
# ATTENTION! Make sure this function won't fail and the sub-process will end when the function returns
def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None, sType=None, userDefinedType=None):
# returns None if the build failed, False if the subprocess did not start, and True otherwise
def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None, sType=None, userDefinedType=None, quickVersion=1):
runButton = waitForObject(":*Qt Creator.Run_Core::Internal::FancyToolButton")
clickButton(runButton)
if sType != SubprocessType.QT_QUICK_UI:
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
waitForCompile(300000)
buildSucceeded = checkLastBuild()
ensureChecked(waitForObject(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton"))
if not buildSucceeded:
test.fatal("Build inside run wasn't successful - leaving test")
invokeMenuItem("File", "Exit")
return False
return None
if not waitForProcessRunning():
test.fatal("Couldn't start application - leaving test")
invokeMenuItem("File", "Exit")
return False
if sType == SubprocessType.QT_QUICK_UI and os.getenv("SYSTEST_QMLVIEWER_NO_HOOK_INTO", "0") == "1":
withHookInto = False
if withHookInto and not validType(sType, userDefinedType):
if withHookInto and not validType(sType, userDefinedType, quickVersion):
if function != None:
test.warning("You did not provide a valid value for the SubprocessType value - sType, but you have "
"provided a function to execute on the subprocess. Please ensure that your function "
@@ -425,15 +424,15 @@ def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None
"inside creator to terminate execution of the subprocess.")
withHookInto = False
if withHookInto and not executable in ("", None):
__closeSubprocessByHookingInto__(executable, port, function, sType, userDefinedType)
__closeSubprocessByHookingInto__(executable, port, function, sType, userDefinedType, quickVersion)
else:
__closeSubprocessByPushingStop__(sType)
return True
def validType(sType, userDef):
def validType(sType, userDef, quickVersion):
if sType == None:
return False
ty = SubprocessType.getWindowType(sType)
ty = SubprocessType.getWindowType(sType, quickVersion)
return ty != None and not (ty == "user-defined" and (userDef == None or userDef.strip() == ""))
def __closeSubprocessByPushingStop__(sType):
@@ -455,7 +454,7 @@ def __closeSubprocessByPushingStop__(sType):
else:
test.fatal("Subprocess does not seem to have been started.")
def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefType):
def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefType, quickVersion):
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}")
if port == None:
@@ -498,7 +497,7 @@ def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefT
if sType==SubprocessType.USER_DEFINED:
sendEvent("QCloseEvent", "{type='%s' unnamed='1' visible='1'}" % userDefType)
else:
sendEvent("QCloseEvent", "{type='%s' unnamed='1' visible='1'}" % SubprocessType.getWindowType(sType))
sendEvent("QCloseEvent", "{type='%s' unnamed='1' visible='1'}" % SubprocessType.getWindowType(sType, quickVersion))
resetApplicationContextToCreator()
else:
try:
@@ -512,12 +511,15 @@ def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefT
resetApplicationContextToCreator()
__closeSubprocessByPushingStop__(sType)
resetApplicationContextToCreator()
if not waitForProcessRunning(False) and waitFor("'exited with code' in str(output.plainText)", 10000):
if not (waitForProcessRunning(False) and waitFor("'exited with code' in str(output.plainText)", 10000)):
test.warning("Sub-process seems not to have closed properly.")
try:
__closeSubprocessByPushingStop__(sType)
except:
pass
if (platform.system() in ('Microsoft', 'Windows') and
'Listening on port %d for incoming connectionsdone' % port not in str(output.plainText)):
checkForStillRunningQmlExecutable([executable + ".exe"])
return True
# this helper tries to reset the current application context back

View File

@@ -301,10 +301,7 @@ def invokeContextMenuOnProject(projectName, menuItem):
str(projItem.text).replace("_", "\\_").replace(".", "\\."), 5, 5, 0)
# Hack for Squish 5.0.1 handling menus of Qt5.2 on Mac (avoids crash) - remove asap
if platform.system() == 'Darwin':
for obj in object.topLevelObjects():
if (className(obj) == "QMenu" and obj.visible):
activateItem(waitForObjectItem(obj, menuItem))
break
waitFor("macHackActivateContextMenuItem(menuItem)", 6000)
else:
activateItem(waitForObjectItem("{name='Project.Menu.Project' type='QMenu' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", menuItem))

View File

@@ -95,7 +95,7 @@ def waitForCleanShutdown(timeOut=10):
shutdownDone = (str(appCtxt)=="")
if platform.system() in ('Windows','Microsoft'):
# cleaning helper for running on the build machines
__checkForQmlViewerAndQmlScene__()
checkForStillRunningQmlExecutable(['qmlviewer.exe', 'qmlscene.exe'])
endtime = datetime.utcnow() + timedelta(seconds=timeOut)
while not shutdownDone:
# following work-around because os.kill() works for win not until python 2.7
@@ -120,8 +120,8 @@ def waitForCleanShutdown(timeOut=10):
if not shutdownDone and datetime.utcnow() > endtime:
break
def __checkForQmlViewerAndQmlScene__():
for qmlHelper in ['qmlviewer.exe', 'qmlscene.exe']:
def checkForStillRunningQmlExecutable(possibleNames):
for qmlHelper in possibleNames:
tasks = subprocess.Popen("tasklist /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True,
stdout=subprocess.PIPE)
output = tasks.communicate()[0]

View File

@@ -169,43 +169,6 @@ def which(program):
return cf
return None
signalObjects = {}
# do not call this function directly - it's only a helper
def __callbackFunction__(object, *args):
global signalObjects
# test.log("__callbackFunction__: "+objectMap.realName(object))
signalObjects[objectMap.realName(object)] += 1
def waitForSignal(object, signal, timeout=30000):
global signalObjects
realName = prepareForSignal(object, signal)
beforeCount = signalObjects[realName]
waitFor("signalObjects[realName] > beforeCount", timeout)
handledSignal = {}
def prepareForSignal(object, signal):
global signalObjects
global handledSignal
overrideInstallLazySignalHandler()
realName = objectMap.realName(object)
# test.log("waitForSignal: "+realName)
if realName in handledSignal.keys():
if handledSignal[realName] != signal:
# The current implementation does not support this.
# When an object has two different handled signals, waitForSignal() will only wait
# for the first of them to be emitted.
test.warning("You are trying to handle two different signals from the same object.",
"Adding %s to object %s, which already has handled signal %s. "
"This can lead to unexpected results." % (signal, realName, handledSignal[realName]))
else:
handledSignal[realName] = signal
if not (realName in signalObjects):
signalObjects[realName] = 0
installLazySignalHandler(object, signal, "__callbackFunction__")
return realName
# this function removes the user files of given pro file(s)
# can be called with a single string object or a list of strings holding path(s) to
# the pro file(s) returns False if it could not remove all user files or has been

View File

@@ -30,6 +30,35 @@
import urllib2
import re
############ functions not related to issues tracked inside jira ############
def __checkWithoutWidget__(*args):
return className(args[0]) == 'QMenu' and args[0].visible
def __checkWithWidget__(*args):
return (__checkWithoutWidget__(args[0])
and widgetContainsPoint(waitForObject(args[1]), args[0].mapToGlobal(QPoint(0 ,0))))
# hack for activating context menus on Mac because of Squish5/Qt5.2 problems
# param item a string holding the menu item to invoke (just the label)
# param widget an object; if provided there will be an additional check if the menu's top left
# corner is placed on this widget
def macHackActivateContextMenuItem(item, widget=None):
if widget:
func = __checkWithWidget__
else:
func = __checkWithoutWidget__
for obj in object.topLevelObjects():
try:
if func(obj, widget):
activateItem(waitForObjectItem(obj, item))
return True
except:
pass
return False
################ workarounds for issues tracked inside jira #################
JIRA_URL='https://bugreports.qt-project.org/browse'
class JIRA:

View File

@@ -29,3 +29,8 @@
"5.0" "4.8" "macx-g++" "~/QtSDK/src/creator-test-data/Squish5_48_Mac"
"5.0" "4.8" "linux-g++" "~/QtSDK/src/creator-test-data/Squish5_48_Linux32"
"5.0" "4.8" "linux-g++-64" "~/QtSDK/src/creator-test-data/Squish5_48_Linux64"
"5.0" "5.0" "macx-clang" "~/QtSDK/src/creator-test-data/Squish5_50_Mac"
"5.0" "5.0" "linux-g++" "~/QtSDK/src/creator-test-data/Squish5_50_Linux32"
"5.0" "5.0" "linux-g++-64" "~/QtSDK/src/creator-test-data/Squish5_50_Linux64"
"5.0" "5.0" "win32-g++" "C:\QtSDK\src\creator-test-data\Squish5_50_MinGW"
"5.0" "5.0" "win32-msvc2010" "C:\QtSDK\src\creator-test-data\Squish5_50_MSVC10"
1 squishversion qtversion mkspec path
29 5.0 4.8 macx-g++ ~/QtSDK/src/creator-test-data/Squish5_48_Mac
30 5.0 4.8 linux-g++ ~/QtSDK/src/creator-test-data/Squish5_48_Linux32
31 5.0 4.8 linux-g++-64 ~/QtSDK/src/creator-test-data/Squish5_48_Linux64
32 5.0 5.0 macx-clang ~/QtSDK/src/creator-test-data/Squish5_50_Mac
33 5.0 5.0 linux-g++ ~/QtSDK/src/creator-test-data/Squish5_50_Linux32
34 5.0 5.0 linux-g++-64 ~/QtSDK/src/creator-test-data/Squish5_50_Linux64
35 5.0 5.0 win32-g++ C:\QtSDK\src\creator-test-data\Squish5_50_MinGW
36 5.0 5.0 win32-msvc2010 C:\QtSDK\src\creator-test-data\Squish5_50_MSVC10

View File

@@ -59,7 +59,7 @@ def main():
# try to build project
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
# verify build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")

View File

@@ -46,7 +46,7 @@ def main():
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
# check output if build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
waitFor("object.exists(':*Qt Creator.Cancel Build_QToolButton')", 20000)

View File

@@ -58,7 +58,7 @@ def main():
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
# wait until build finished
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
# open issues list view
ensureChecked(waitForObject(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton"))
issuesView = waitForObject(":Qt Creator.Issues_QListView")

View File

@@ -54,7 +54,7 @@ def main():
# build project 2
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
# wait for build to complete
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
# check output if build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
outputLog = str(waitForObject(":Qt Creator.Compile Output_Core::OutputWindow").plainText)

View File

@@ -42,6 +42,6 @@ def main():
for kit, config in availableConfigs:
selectBuildConfig(len(checkedTargets), kit, config)
test.log("Testing build configuration: " + config)
if not runAndCloseApp():
return
if runAndCloseApp() == None:
checkCompile()
invokeMenuItem("File", "Exit")

View File

@@ -103,7 +103,7 @@ def performDebugging(workingDir, projectName, checkedTargets):
verifyBuildConfig(len(checkedTargets), kit, True)
progressBarWait(10000)
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
isMsvc = isMsvcConfig(len(checkedTargets), kit)
allowAppThroughWinFW(workingDir, projectName, False)
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))

View File

@@ -75,8 +75,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs, disableO
switchViewTo(ViewConstants.EDIT)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}",
"buildQueueFinished(bool)")
waitForCompile()
if not checkCompile():
test.fatal("Compile had errors... Skipping current build config")
continue
@@ -131,6 +130,8 @@ def performTest(workingDir, projectName, targetCount, availableConfigs, disableO
"For two calls, median and longest time must be the same.")
deleteAppFromWinFW(workingDir, projectName, False)
progressBarWait(15000, False) # wait for "Build" progressbar to disappear
clickButton(waitForObject(":Analyzer Toolbar.Clear_QToolButton"))
test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.")
def compareEventsTab(model, file):
significantColumns = [0, 1, 4, 9]

View File

@@ -62,6 +62,7 @@ def main():
{os.path.join(workingDir, projectName, "qml", projectName, "main.qml"):13}]
# Only use 4.7.4 to work around QTBUG-25187
availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug")
progressBarWait()
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Qt 4.7.4) - leaving without debugging.")
for kit, config in availableConfigs:
@@ -70,8 +71,7 @@ def main():
verifyBuildConfig(len(checkedTargets), kit, True, enableQmlDebug=True)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}",
"buildQueueFinished(bool)", 300000)
waitForCompile(300000)
if not checkCompile():
test.fatal("Compile had errors... Skipping current build config")
continue

View File

@@ -60,10 +60,6 @@ def testRenameId():
files = ["Core.ContextMenu\\.qml", "Core.GridMenu\\.qml", "Core.ListMenu\\.qml", "focus\\.qml"]
originalTexts = {}
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
# temporarily store editor content for synchronizing purpose
# usage of formerTxt is done because I couldn't get waitForSignal() to work
# it always stored a different object into the signalObjects map as it looked up afterwards
# although used objectMap.realName() for both
formerTxt = editor.plainText
for file in files:
openDocument("focus.QML.qml.%s" % file)

View File

@@ -65,9 +65,9 @@ def main():
continue
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Run qmake")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
waitForCompile(300000)
checkCompile()
checkLastBuild()

View File

@@ -56,7 +56,7 @@ def main():
invokeMenuItem("Build", "Rebuild All")
# Wait for, and test if the build succeeded
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
waitForCompile(300000)
checkCompile()
checkLastBuild()

View File

@@ -217,8 +217,8 @@ def __getExpectedDebuggers__():
debuggers = ["gdb", "lldb"]
result.extend(filter(None, map(which, debuggers)))
if platform.system() == 'Darwin':
xcodeLLDB = "/Applications/Xcode.app/Contents/Developer/usr/bin/lldb"
if os.path.exists(xcodeLLDB):
xcodeLLDB = getOutputFromCmdline("xcrun --find lldb").strip("\n")
if xcodeLLDB and os.path.exists(xcodeLLDB) and xcodeLLDB not in result:
result.append(xcodeLLDB)
return result

View File

@@ -42,7 +42,7 @@ def main():
% (qVer, Targets.getStringForTarget(targ)))
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
invokeMenuItem("Build", "Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
if not checkCompile():
test.fatal("Compile failed")
else:
@@ -54,14 +54,16 @@ def main():
if result:
result = runAndCloseApp(True, projectName, 11223,
"subprocessFunctionQuick%d" % qVer,
SubprocessType.QT_QUICK_APPLICATION)
SubprocessType.QT_QUICK_APPLICATION, quickVersion=qVer)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else:
result = runAndCloseApp()
if result:
if result == None:
checkCompile()
else:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")

View File

@@ -45,14 +45,16 @@ def main():
result = addExecutableAsAttachableAUT(qmlViewer, 11223)
allowAppThroughWinFW(qmlViewerPath, qmlViewer, None)
if result:
result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI)
result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI, quickVersion=quickVersion)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
removeExecutableAsAttachableAUT(qmlViewer, 11223)
deleteAppFromWinFW(qmlViewerPath, qmlViewer)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
if result:
if result == None:
checkCompile()
else:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")

View File

@@ -41,7 +41,7 @@ def main():
test.log("Building project Qt Quick %d Extension Plugin (%s)"
% (quickVer, Targets.getStringForTarget(targ)))
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
waitForCompile()
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Close All Projects and Editors")

View File

@@ -42,7 +42,11 @@ def main():
if buttonName:
openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'"
"text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1)
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
# hack for Squish5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
waitFor("macHackActivateContextMenuItem('Change objectName...')", 6000)
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
typeLines(waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit"), buttonName)
else:
# Verify that everything works without ever changing the name

View File

@@ -47,7 +47,11 @@ def main():
for con in connections:
selectFromLocator("mainwindow.ui")
openContextMenu(waitForObject(con[0]), 5, 5, 0)
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
# hack for Squish 5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
waitFor("macHackActivateContextMenuItem('Go to slot...', con[0])", 6000)
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
waitForObjectItem(":Select signal.signalList_QTreeWidget", con[1])
clickItem(":Select signal.signalList_QTreeWidget", con[1], 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject(":Go to slot.OK_QPushButton"))

View File

@@ -86,7 +86,7 @@ def main():
test.compare(cloneDirEdit.text, "p-qt-labs-jom")
replaceEditorContent(cloneDirEdit, cloneDir)
clickButton(waitForObject(":Next_QPushButton"))
cloneLog = findObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit")
cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit", 1000)
test.compare(waitForObject(":Git Repository Clone.Result._QLabel").text,
"Cloning started...")
if button == "Cancel immediately":

View File

@@ -29,6 +29,8 @@
source("../../shared/qtcreator.py")
# necessary to not use symbolic links for the parent path of the git project
srcPath = os.path.realpath(srcPath)
projectName = "gitProject"
# TODO: Make selecting changes possible
@@ -38,6 +40,8 @@ def commit(commitMessage, expectedLogMessage):
invokeMenuItem("Tools", "Git", "Local Repository", "Commit...")
replaceEditorContent(waitForObject(":Description.description_Utils::CompletingTextEdit"), commitMessage)
ensureChecked(waitForObject(":Files.Check all_QCheckBox"))
checkOrFixCommitterInformation('invalidAuthorLabel', 'authorLineEdit', 'Nobody')
checkOrFixCommitterInformation('invalidEmailLabel', 'emailLineEdit', 'nobody@nowhere.com')
clickButton(waitForObject(":splitter.Commit File(s)_VcsBase::QActionPushButton"))
vcsLog = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}").plainText
@@ -51,6 +55,22 @@ def verifyItemsInGit(commitMessages):
verifyItemOrder(commitMessages, plainText)
return plainText
def createLocalGitConfig(path):
config = os.path.join(path, "config")
test.verify(os.path.exists(config), "Verifying if .git/config exists.")
file = open(config, "a")
file.write("\n[user]\n\temail = nobody@nowhere.com\n\tname = Nobody\n")
file.close()
def checkOrFixCommitterInformation(labelName, lineEditName, expected):
lineEd = waitForObject("{name='%s' type='QLineEdit' visible='1'}" % lineEditName)
if not (test.compare(lineEd.text, expected, "Verifying commit information matches local config")
and test.verify(checkIfObjectExists("{name='%s' type='QLabel' visible='1'}" % labelName,
False, 1000),
"Verifying invalid label is missing")):
test.log("Commit information invalid or missing - entering dummy value (%s)" % expected)
replaceEditorContent(lineEd, expected)
def verifyClickCommit():
gitEditor = waitForObject(":Qt Creator_Git::Internal::GitEditor")
fileName = waitForObject(":Qt Creator_FilenameQComboBox")
@@ -80,7 +100,7 @@ def verifyClickCommit():
waitFor('len(str(diffShow.plainText)) != 0', 5000)
show = str(diffShow.plainText)
expected = [{"commit %s" % commit:False},
{"Author: (\w|\s)+ <(\w|[-.])+@(\w|[-.])+>": True},
{"Author: Nobody <nobody@nowhere.com>": False},
{"Date:\s+\w{3} \w{3} \d{1,2} \d{2}:\d{2}:\d{2} \d{4}.*":True},
{"Branches: master":False}]
for line, exp in zip(show.splitlines(), expected):
@@ -116,7 +136,7 @@ def main():
if not startedWithoutPluginError():
return
createProject_Qt_GUI(srcPath, projectName, addToVersionControl = "Git")
if isQt4Build and not object.exists(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"):
if not object.exists(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"):
clickButton(waitForObject(":Qt Creator_Core::Internal::OutputPaneManageButton"))
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Version Control"))
ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"))
@@ -125,6 +145,7 @@ def main():
test.verify("Initialized empty Git repository in %s"
% os.path.join(srcPath, projectName, ".git").replace("\\", "/") in str(vcsLog),
"Has initialization of repo been logged:\n%s " % vcsLog)
createLocalGitConfig(os.path.join(srcPath, projectName, ".git"))
commitMessages = [commit("Initial Commit", "Committed 5 file(s).")]
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
addCPlusPlusFileToCurrentProject("pointless_header.h", "C++ Header File", addToVCS = "Git")