Merge remote-tracking branch 'origin/2.6'

Conflicts:
	src/libs/utils/tooltip/tips.cpp
	src/plugins/coreplugin/versiondialog.cpp
	src/plugins/projectexplorer/kitinformationconfigwidget.cpp
	src/plugins/qnx/blackberryapplicationrunner.cpp
	src/plugins/qnx/blackberrydeployconfiguration.cpp
	src/plugins/qnx/blackberrydeployconfiguration.h
	src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp

Change-Id: I7886ec971942d9e0a9da237dcf4ceb1687abd71b
This commit is contained in:
Oswald Buddenhagen
2013-01-29 15:52:36 +01:00
76 changed files with 1108 additions and 190 deletions
+129
View File
@@ -0,0 +1,129 @@
Qt Creator version 2.6.2 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 v2.6.1..v2.6.2
General
* Fixed Qt version in VersionDialog
* Improved kits set up (QTCREATORBUG-8576, QTCREATORBUG-8081)
* Fixed editing of kits sysroot and mkspec (QTCREATORBUG-8586)
* Fixed excessive emission of change signals from KitManager
* Fixed display of Visual Studio compiler installations
(QTCREATORBUG-8487)
* Fixed integrity of device settings when closing option page
* Fixed update of examples when default kit changes
Editing
* Fixed crash when closing some editors while tooltip is active
(QTCREATORBUG-8630)
* Fixed warning about empty file in memory editor
Managing Projects
* Added check if file is readable when determining its ABI
* Fixed warning about running processes with empty environment
QMake Projects
* Fixed display of directories in warnings (QTCREATORBUG-8585)
* Added QMAKE_INCDIR to headers search paths
CMake Projects
Debugging
* Sped up disassembly retrieval
* Updated documentation of command-line arguments
* Fixed visibility of Debugging Helper Dialog (QTCREATORBUG-8440)
Analyzer
C++ Support
* Fixed invalid common prefix calculation which led to freezes
(QTCREATORBUG-8472, QTCREATORBUG-8532)
QML/JS Support
* Fixed Qt version in qmlobserver
GLSL Support
Help
Qt Designer
Qt Quick Designer
* Fixed some parts of the tutorial
Version control plugins
Git
SVN
ClearCase
* Fixed focus on Check Out dialog
FakeVim
Platform Specific
Mac
Linux
Windows
Remote Linux Support
* Documented deployment settings for generic Linux devices
QNX
* Fixed log output
* Fixed update of path chooser model when browsing finishes
* Fixed saving of changes to BlackBerry deploy information
* Fixed QML_IMPORT_PATH setting in shipped bar-descriptor.xml files
Android
* Fixed crash when pressing stop button
Madde
Pastebin:
* Fixed pasting of .cpp files
Testing
* Enabled squish tests with MSVC again
* Fixed some squish tests
* Added test for QML outline
Tools
* Fixed addQt test in SDKTool
* Fixed creation of group/world readable files in SDKTool
(QTCREATORBUG-8458)
* Fixed leak in zeroconf
Packaging
* Use x86 instead of i386 for file names
Credits for these changes go to:
Aurindam Jana
BogDan Vatra
Christian Stenger
Daniel Teske
David Schulz
Eike Ziller
Erik Verbruggen
Friedemann Kleint
André Pönitz
Leena Miettinen
Mehdi Fekari
Montel Laurent
Orgad Shaneh
Robert Loehning
Sergey Belyashov
Tobias Hunger
Tobias Nätterlund
+2 -1
View File
@@ -5,7 +5,8 @@ headerdirs =
sourcedirs = $SRCDIR/src
imagedirs = $SRCDIR/images $SRCDIR/templates/images
outputdir = $OUTDIR
exampledirs = $SRCDIR/examples
exampledirs = $SRCDIR/examples \
$SRCDIR/snippets
indexes = qt.index
include(compat.qdocconf)
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

@@ -1,17 +1,11 @@
\section2 Specifying Run Settings for Linux-Based Devices
To run an application on a Linux-based device (embedded Linux, MeeGo
Harmattan, or Maemo), create and select a device configuration in the
\l{glossary-buildandrun-kit}{kit} that is used for building and running the project and set its
device type correspondingly.
You can also pass command line arguments to your application.
\image qtcreator-screenshot-run-settings-maemo.png "Run settings for Linux-based devices"
To run and debug applications on Linux-based devices, you must
create connections from the development PC to the devices. Click
\gui {Manage device configurations} to create connections. For more
information, see \l{Configuring Connections to Maemo Devices},
To run and debug an application on a Linux-based device (embedded Linux,
MeeGo Harmattan, or Maemo), you must create connections from the development
host to the device and add the device configurations to
\l{glossary-buildandrun-kit}{kits}. Click \gui {Manage Kits} to add devices
to kits. For more information, see
\l{Configuring Connections to Maemo Devices},
\l{Configuring Connections to Harmattan Devices}, and
\l {Connecting Embedded Linux Devices}.
@@ -23,3 +17,14 @@
on devices that are of the same type and run the same firmware as the
connected device. For more information, see
\l{Deploying Applications to Linux-Based Devices}.
For generic embedded Linux devices, the run settings display the path to the
executable file on the development host and on the device. To specify that
another application launches your application, for example, enter the
command in the \gui {Alternate executable on device} field and select the
\gui {Use this command instead} check box.
\image qtcreator-run-settings-linux.png "Run settings for Linux-based devices"
You can specify command line arguments to pass to your application in the
\gui Arguments field.
+4 -4
View File
@@ -293,7 +293,7 @@
expressions for the x and y properties, as illustrated by the
following code snippet:
\snippet snippets/qml/states-properties.qml states
\snippet qml/states-properties.qml states
\image qmldesigner-tutorial-state1.png "States"
@@ -319,7 +319,7 @@
moving to State1, the x and y coordinates of the Qt logo change
linearly over a duration of 1 second:
\snippet snippets/qml/list-of-transitions.qml first transition
\snippet qml/list-of-transitions.qml first transition
\o You can use the Qt Quick toolbar for animation to change the easing
curve type from linear to OutBounce:
@@ -342,13 +342,13 @@
and y coordinates of the Qt logo change over a duration of 2
seconds, and an InOutQuad easing function is used:
\snippet snippets/qml/list-of-transitions.qml second transition
\snippet qml/list-of-transitions.qml second transition
\o Add the following code to specify that for any other state changes,
the x and y coordinates of the Qt logo change linearly over a
duration of 200 milliseconds:
\snippet snippets/qml/list-of-transitions.qml default transition
\snippet qml/list-of-transitions.qml default transition
\o Press \key {Ctrl+R} to run the application.
+1 -1
View File
@@ -337,7 +337,7 @@ static void parseCommandLineOptions(const QStringList &arguments)
if (lastArg) usage();
qApp->setStartDragDistance(arguments.at(++i).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
qWarning("Qt QML Viewer version %s", QT_VERSION_STR);
qWarning("Qt QML Viewer version %s", qVersion());
exitApp(0);
} else if (arg == "-translation") {
if (lastArg) usage();
@@ -13,7 +13,7 @@
</initialWindow>
<publisher>PUBLISHER</publisher>
<copyright>COPYRIGHT</copyright>
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QML_IMPORT_PATH" value="app/native/imports:/usr/lib/qt4/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
<arg>-style</arg>
@@ -12,7 +12,7 @@
<aspectRatio>landscape</aspectRatio>
</initialWindow>
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QML_IMPORT_PATH" value="app/native/imports:/usr/lib/qt4/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
@@ -12,7 +12,7 @@
<aspectRatio>landscape</aspectRatio>
</initialWindow>
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QML_IMPORT_PATH" value="app/native/imports:/usr/lib/qt4/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
+3 -1
View File
@@ -72,7 +72,9 @@ QTipLabel::QTipLabel(QWidget *parent) :
QTipLabel::~QTipLabel()
{
delete m_tipContent;
Utils::TipContent *tmpTipContent = m_tipContent;
m_tipContent = 0;
delete tmpTipContent;
}
bool QTipLabel::isInteractive() const
+2 -2
View File
@@ -322,12 +322,12 @@ public:
DNSServiceErrorType createConnection(MainConnection *mainConnection, ConnectionRef *sdRef) {
if (!m_simplePollNew || !m_clientNew || !m_simplePollSetFunc)
return kDNSServiceErr_Unknown;
MyAvahiConnection *connection = new MyAvahiConnection;
connection->lib = this;
if (sdRef == 0) {
qDebug() << "Error: sdRef is null in createConnection";
return kDNSServiceErr_Unknown;
}
MyAvahiConnection *connection = new MyAvahiConnection;
connection->lib = this;
/* Allocate main loop object */
connection->simple_poll = m_simplePollNew();
if (!connection->simple_poll) {
+1 -1
View File
@@ -49,7 +49,7 @@ using namespace Core;
using namespace Core::Internal;
CorePlugin::CorePlugin() :
m_mainWindow(new MainWindow), m_editMode(0)
m_mainWindow(new MainWindow), m_editMode(0), m_designMode(0)
{
}
+1 -1
View File
@@ -86,7 +86,7 @@ VersionDialog::VersionDialog(QWidget *parent)
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>")
.arg(version,
QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
QLatin1String(qVersion()), QString::number(QSysInfo::WordSize),
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(Constants::IDE_YEAR),
(QLatin1String(Constants::IDE_AUTHOR)), ideVersionDescription,
ideRev);
@@ -82,6 +82,7 @@ static inline QByteArray format(Protocol::ContentType ct)
break;
case Protocol::Cpp:
format += "cpp-qt";
break;
case Protocol::JavaScript:
format += "javascript";
break;
@@ -199,6 +199,11 @@ DebuggerKitInformation::DebuggerItem DebuggerKitInformation::autoDetectItem(cons
return result;
}
void DebuggerKitInformation::setup(Kit *k)
{
setDebuggerItem(k, autoDetectItem(k));
}
// Check the configuration errors and return a flag mask. Provide a quick check and
// a verbose one with a list of errors.
@@ -65,6 +65,8 @@ public:
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const
{ return DebuggerKitInformation::validateDebugger(k); }
void setup(ProjectExplorer::Kit *k);
static QList<ProjectExplorer::Task> validateDebugger(const ProjectExplorer::Kit *k);
static bool isValidDebugger(const ProjectExplorer::Kit *k);
+9 -5
View File
@@ -4484,11 +4484,15 @@ void GdbEngine::fetchDisassemblerByCliPointMixed(const DisassemblerAgentCookie &
void GdbEngine::fetchDisassemblerByCliPointPlain(const DisassemblerAgentCookie &ac0)
{
DisassemblerAgentCookie ac = ac0;
QTC_ASSERT(ac.agent, return);
postCommand(disassemblerCommand(ac.agent->location(), false), Discardable,
CB(handleFetchDisassemblerByCliPointPlain),
QVariant::fromValue(ac));
// This here
// DisassemblerAgentCookie ac = ac0;
// QTC_ASSERT(ac.agent, return);
// postCommand(disassemblerCommand(ac.agent->location(), false), Discardable,
// CB(handleFetchDisassemblerByCliPointPlain),
// QVariant::fromValue(ac));
// takes far too long if function boundaries are not hit.
// Skip this feature and immediately fall back to the 'range' version:
fetchDisassemblerByCliRangePlain(ac0);
}
void GdbEngine::fetchDisassemblerByCliRangeMixed(const DisassemblerAgentCookie &ac0)
@@ -71,7 +71,6 @@ public:
void emitConfigurationChanged();
private:
bool m_enabled;
PerforcePlugin *m_plugin;
};
+3 -1
View File
@@ -676,7 +676,9 @@ QList<Abi> Abi::abisOfBinary(const Utils::FileName &path)
if (!f.exists())
return tmp;
f.open(QFile::ReadOnly);
if (!f.open(QFile::ReadOnly))
return tmp;
QByteArray data = f.read(1024);
if (data.size() >= 67
&& getUint8(data, 0) == '!' && getUint8(data, 1) == '<' && getUint8(data, 2) == 'a'
+15
View File
@@ -200,6 +200,21 @@ void Kit::fix()
i->fix(this);
}
void Kit::setup()
{
KitGuard g(this);
QHash<Core::Id, QVariant> data = d->m_data;
for (int i = 0; i < 5; ++i) {
// Allow for some retries to settle down in a good configuration
// This is necessary for the Qt version to pick its preferred tool chain
// and that to pick a working debugger afterwards.
foreach (KitInformation *i, KitManager::instance()->kitInformation())
i->setup(this);
if (d->m_data == data)
break;
}
}
QString Kit::displayName() const
{
return d->m_displayName;
+2 -1
View File
@@ -67,7 +67,8 @@ public:
bool isValid() const;
QList<Task> validate() const;
void fix();
void fix(); // Fix the individual kit information.
void setup(); // Apply advanced magic(TM). Used only once on each kit during initial setup.
QString displayName() const;
void setDisplayName(const QString &name);
+19 -14
View File
@@ -181,6 +181,23 @@ void ToolChainKitInformation::fix(Kit *k)
setToolChain(k, 0); // make sure to clear out no longer known tool chains
}
void ToolChainKitInformation::setup(Kit *k)
{
const QString id = k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString();
if (id.isEmpty())
return;
ToolChain *tc = ToolChainManager::instance()->findToolChain(id);
if (tc)
return;
// ID is not found: Might be an ABI string...
foreach (ToolChain *current, ToolChainManager::instance()->toolChains()) {
if (current->targetAbi().toString() == id)
return setToolChain(k, current);
}
}
KitConfigWidget *ToolChainKitInformation::createConfigWidget(Kit *k) const
{
return new Internal::ToolChainInformationConfigWidget(k);
@@ -217,20 +234,8 @@ ToolChain *ToolChainKitInformation::toolChain(const Kit *k)
{
if (!k)
return 0;
const QString id = k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString();
if (id.isEmpty())
return 0;
ToolChain *tc = ToolChainManager::instance()->findToolChain(id);
if (tc)
return tc;
// ID is not found: Might be an ABI string...
foreach (ToolChain *current, ToolChainManager::instance()->toolChains()) {
if (current->targetAbi().toString() == id)
return current;
}
return 0;
return ToolChainManager::instance()
->findToolChain(k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString());
}
void ToolChainKitInformation::setToolChain(Kit *k, ToolChain *tc)
@@ -104,6 +104,7 @@ public:
QList<Task> validate(const Kit *k) const;
void fix(Kit *k);
void setup(Kit *k);
KitConfigWidget *createConfigWidget(Kit *k) const;
@@ -56,7 +56,8 @@ namespace Internal {
// --------------------------------------------------------------------------
SysRootInformationConfigWidget::SysRootInformationConfigWidget(Kit *k) :
KitConfigWidget(k)
KitConfigWidget(k),
m_ignoreChange(false)
{
m_chooser = new Utils::PathChooser;
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
@@ -77,7 +78,8 @@ QString SysRootInformationConfigWidget::toolTip() const
void SysRootInformationConfigWidget::refresh()
{
m_chooser->setFileName(SysRootKitInformation::sysRoot(m_kit));
if (!m_ignoreChange)
m_chooser->setFileName(SysRootKitInformation::sysRoot(m_kit));
}
void SysRootInformationConfigWidget::makeReadOnly()
@@ -97,7 +99,9 @@ QWidget *SysRootInformationConfigWidget::buttonWidget() const
void SysRootInformationConfigWidget::pathWasChanged()
{
m_ignoreChange = true;
SysRootKitInformation::setSysRoot(m_kit, m_chooser->fileName());
m_ignoreChange = false;
}
// --------------------------------------------------------------------------
@@ -71,6 +71,7 @@ private slots:
private:
Utils::PathChooser *m_chooser;
bool m_ignoreChange;
};
// --------------------------------------------------------------------------
+6 -2
View File
@@ -148,9 +148,11 @@ void KitManager::restoreKits()
QFileInfo kitFile(systemSettingsFile.absolutePath() + QLatin1String(KIT_FILENAME));
if (kitFile.exists()) {
KitList system = restoreKits(Utils::FileName(kitFile));
// make sure we mark these as autodetected!
foreach (Kit *k, system.kits)
// make sure we mark these as autodetected and run additional setup logic
foreach (Kit *k, system.kits) {
k->setAutoDetected(true);
k->setup();
}
// SDK kits are always considered to be up for validation since they might have been
// extended with additional information by creator in the meantime:
@@ -202,6 +204,8 @@ void KitManager::restoreKits()
defaultKit->setAutoDetected(false);
defaultKit->setIconPath(QLatin1String(":///DESKTOP///"));
defaultKit->setup();
addKit(defaultKit);
}
+4
View File
@@ -75,8 +75,12 @@ public:
virtual bool visibleIn(Kit *) { return true; }
virtual QVariant defaultValue(Kit *) const = 0;
// called to find issues with the kit
virtual QList<Task> validate(const Kit *) const = 0;
// called to fix issues with this kitinformation. Does not modify the rest of the kit.
virtual void fix(Kit *) { return; }
// called on initial setup of a kit.
virtual void setup(Kit *) { return; }
virtual ItemList toUserOutput(Kit *) const = 0;
+5 -3
View File
@@ -322,12 +322,14 @@ Kit *KitModel::markForAddition(Kit *baseKit)
beginInsertRows(index(m_manualRoot), pos, pos);
KitNode *node = createNode(m_manualRoot, 0);
Kit *k = node->widget->workingCopy();
KitGuard g(k);
if (baseKit) {
Kit *k = node->widget->workingCopy();
KitGuard g(k);
k->copyFrom(baseKit);
k->setAutoDetected(false); // Make sure we have a manual kit!
k->setDisplayName(tr("Clone of %1").arg(k->displayName()));
} else {
k->setup();
}
if (!m_defaultNode)
@@ -335,7 +337,7 @@ Kit *KitModel::markForAddition(Kit *baseKit)
endInsertRows();
return node->widget->workingCopy();
return k;
}
QModelIndex KitModel::index(KitNode *node, int column) const
@@ -576,7 +576,9 @@ void ToolChainOptionsPage::toolChainSelectionChanged()
if (!m_container)
return;
QModelIndex current = currentIndex();
(void)m_container->takeWidget(); // Prevent deletion.
QWidget *oldWidget = m_container->takeWidget(); // Prevent deletion.
if (oldWidget)
oldWidget->setVisible(false);
QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
m_container->setWidget(currentTcWidget);
m_container->setVisible(currentTcWidget != 0);
@@ -234,6 +234,7 @@ QVariant read(int variantType, const QString &str)
break;
case QMetaType::QVector3D:
value = vector3DFromString(str, &conversionOk);
break;
default: {
value = QVariant(str);
value.convert(static_cast<QVariant::Type>(variantType));
@@ -93,6 +93,7 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe
, m_stopProcess(0)
, m_tailProcess(0)
, m_testSlog2Process(0)
, m_launchDateTimeProcess(0)
, m_runningStateTimer(new QTimer(this))
, m_runningStateProcess(0)
{
@@ -269,7 +270,11 @@ void BlackBerryApplicationRunner::killTailProcess()
void BlackBerryApplicationRunner::tailApplicationLog()
{
// TODO: Reading the log using qconn instead?
QSsh::SshRemoteProcessRunner *process = qobject_cast<QSsh::SshRemoteProcessRunner *>(sender());
QTC_ASSERT(process, return);
m_launchDateTime = QDateTime::fromString(QString::fromLatin1(process->readAllStandardOutput()).trimmed(),
QString::fromLatin1("dd HH:mm:ss"));
if (m_stopping || (m_tailProcess && m_tailProcess->isProcessRunning()))
return;
@@ -289,7 +294,7 @@ void BlackBerryApplicationRunner::tailApplicationLog()
QString command;
if (m_slog2infoFound) {
command = QString::fromLatin1("slog2info -w");
command = QString::fromLatin1("slog2info -w -b ") + m_appId;
} else {
command = QLatin1String("tail -c +1 -f /accounts/1000/appdata/") + m_appId
+ QLatin1String("/logs/log");
@@ -307,6 +312,15 @@ void BlackBerryApplicationRunner::handleSlog2InfoFound()
tailApplicationLog();
}
void BlackBerryApplicationRunner::readLaunchTime()
{
m_launchDateTimeProcess = new QSsh::SshRemoteProcessRunner(this);
connect(m_launchDateTimeProcess, SIGNAL(processClosed(int)),
this, SLOT(tailApplicationLog()));
m_launchDateTimeProcess->run("date +\"%d %H:%M:%S\"", m_sshParams);
}
void BlackBerryApplicationRunner::handleTailOutput()
{
QSsh::SshRemoteProcessRunner *process = qobject_cast<QSsh::SshRemoteProcessRunner *>(sender());
@@ -316,7 +330,9 @@ void BlackBerryApplicationRunner::handleTailOutput()
if (m_slog2infoFound) {
const QStringList multiLine = message.split(QLatin1Char('\n'));
Q_FOREACH (const QString &line, multiLine) {
if ( line.contains(m_appId) ) {
QDateTime dateTime = QDateTime::fromString(line.split(m_appId).first().mid(4).trimmed(),
QString::fromLatin1("dd HH:mm:ss.zzz"));
if (dateTime >= m_launchDateTime) {
QStringList validLineBeginnings;
validLineBeginnings << QLatin1String("qt-msg 0 ")
<< QLatin1String("qt-msg* 0 ")
@@ -39,6 +39,7 @@
#include <QObject>
#include <QProcess>
#include <QDateTime>
namespace QSsh {
class SshRemoteProcessRunner;
@@ -89,6 +90,7 @@ private slots:
void readRunningStateStandardOutput();
void handleSlog2InfoFound();
void readLaunchTime();
private:
void reset();
@@ -97,6 +99,8 @@ private:
bool m_debugMode;
bool m_slog2infoFound;
QDateTime m_launchDateTime;
qint64 m_pid;
QString m_appId;
@@ -114,6 +118,7 @@ private:
QProcess *m_stopProcess;
QSsh::SshRemoteProcessRunner *m_tailProcess;
QSsh::SshRemoteProcessRunner *m_testSlog2Process;
QSsh::SshRemoteProcessRunner *m_launchDateTimeProcess;
QTimer *m_runningStateTimer;
QProcess *m_runningStateProcess;
};
@@ -50,7 +50,8 @@ using namespace Qnx;
using namespace Qnx::Internal;
namespace {
const char DEPLOYMENT_INFO_SETTING[] = "QNX.BlackBerry.DeploymentInfo";
const char DEPLOYMENT_INFO_SETTING[] = "Qnx.BlackBerry.DeploymentInfo";
const char DEPLOYMENT_INFO_KEY[] = "Qnx.BlackBerry.DeployInformation";
}
BlackBerryDeployConfiguration::BlackBerryDeployConfiguration(ProjectExplorer::Target *parent)
@@ -165,3 +166,20 @@ ProjectExplorer::NamedWidget *BlackBerryDeployConfiguration::createConfigWidget(
{
return new BlackBerryDeployConfigurationWidget(this);
}
QVariantMap BlackBerryDeployConfiguration::toMap() const
{
QVariantMap map(ProjectExplorer::DeployConfiguration::toMap());
map.insert(QLatin1String(DEPLOYMENT_INFO_KEY), deploymentInfo()->toMap());
return map;
}
bool BlackBerryDeployConfiguration::fromMap(const QVariantMap &map)
{
if (!ProjectExplorer::DeployConfiguration::fromMap(map))
return false;
QVariantMap deployInfoMap = map.value(QLatin1String(DEPLOYMENT_INFO_KEY)).toMap();
deploymentInfo()->fromMap(deployInfoMap);
return true;
}
@@ -58,9 +58,13 @@ public:
BlackBerryDeployInformation *deploymentInfo() const;
QVariantMap toMap() const;
protected:
BlackBerryDeployConfiguration(ProjectExplorer::Target *parent, BlackBerryDeployConfiguration *source);
bool fromMap(const QVariantMap &map);
private slots:
void setupBarDescriptor();
+99 -14
View File
@@ -41,11 +41,21 @@
using namespace Qnx;
using namespace Qnx::Internal;
namespace {
const char COUNT_KEY[] = "Qnx.BlackBerry.DeployInformationCount";
const char DEPLOYINFO_KEY[] = "Qnx.BlackBerry.DeployInformation.%1";
const char ENABLED_KEY[] = "Qnx.BlackBerry.DeployInformation.Enabled";
const char APPDESCRIPTOR_KEY[] = "Qnx.BlackBerry.DeployInformation.AppDescriptor";
const char PACKAGE_KEY[] = "Qnx.BlackBerry.DeployInformation.Package";
const char PROFILE_KEY[] = "Qnx.BlackBerry.DeployInformation.ProFile";
}
BlackBerryDeployInformation::BlackBerryDeployInformation(Qt4ProjectManager::Qt4Project *project)
: QAbstractTableModel(project)
, m_project(project)
{
connect(m_project, SIGNAL(proFilesEvaluated()), this, SLOT(initModel()));
connect(m_project, SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
}
int BlackBerryDeployInformation::rowCount(const QModelIndex &parent) const
@@ -152,8 +162,78 @@ QList<BarPackageDeployInformation> BlackBerryDeployInformation::enabledPackages(
return result;
}
QVariantMap BlackBerryDeployInformation::toMap() const
{
QVariantMap outerMap;
outerMap[QLatin1String(COUNT_KEY)] = m_deployInformation.size();
for (int i = 0; i < m_deployInformation.size(); ++i) {
const BarPackageDeployInformation &deployInfo = m_deployInformation[i];
QVariantMap deployInfoMap;
deployInfoMap[QLatin1String(ENABLED_KEY)] = deployInfo.enabled;
deployInfoMap[QLatin1String(APPDESCRIPTOR_KEY)] = deployInfo.appDescriptorPath;
deployInfoMap[QLatin1String(PACKAGE_KEY)] = deployInfo.packagePath;
deployInfoMap[QLatin1String(PROFILE_KEY)] = deployInfo.proFilePath;
outerMap[QString::fromLatin1(DEPLOYINFO_KEY).arg(i)] = deployInfoMap;
}
return outerMap;
}
void BlackBerryDeployInformation::fromMap(const QVariantMap &map)
{
beginResetModel();
m_deployInformation.clear();
int count = map.value(QLatin1String(COUNT_KEY)).toInt();
for (int i = 0; i < count; ++i) {
QVariantMap innerMap = map.value(QString::fromLatin1(DEPLOYINFO_KEY).arg(i)).toMap();
const bool enabled = innerMap.value(QLatin1String(ENABLED_KEY)).toBool();
const QString appDescriptorPath = innerMap.value(QLatin1String(APPDESCRIPTOR_KEY)).toString();
const QString packagePath = innerMap.value(QLatin1String(PACKAGE_KEY)).toString();
const QString proFilePath = innerMap.value(QLatin1String(PROFILE_KEY)).toString();
m_deployInformation << BarPackageDeployInformation(enabled, appDescriptorPath, packagePath, proFilePath);
}
endResetModel();
}
void BlackBerryDeployInformation::updateModel()
{
if (m_deployInformation.isEmpty()) {
initModel();
return;
}
beginResetModel();
QList<BarPackageDeployInformation> keep;
QList<Qt4ProjectManager::Qt4ProFileNode *> appNodes = m_project->applicationProFiles();
foreach (Qt4ProjectManager::Qt4ProFileNode *node, appNodes) {
bool nodeFound = false;
for (int i = 0; i < m_deployInformation.size(); ++i) {
if (m_deployInformation[i].proFilePath == node->path()) {
keep << m_deployInformation[i];
nodeFound = true;
break;
}
}
if (!nodeFound)
keep << deployInformationFromNode(node);
}
m_deployInformation = keep;
endResetModel();
}
void BlackBerryDeployInformation::initModel()
{
if (!m_deployInformation.isEmpty())
return;
ProjectExplorer::Target *target = m_project->activeTarget();
if (!target
|| !target->activeDeployConfiguration()
@@ -172,23 +252,28 @@ void BlackBerryDeployInformation::initModel()
if (!rootNode || rootNode->parseInProgress()) // Can be null right after project creation by wizard.
return;
disconnect(m_project, SIGNAL(proFilesEvaluated()), this, SLOT(initModel()));
disconnect(m_project, SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
beginResetModel();
m_deployInformation.clear();
QList<Qt4ProjectManager::Qt4ProFileNode *> appNodes = m_project->applicationProFiles();
foreach (Qt4ProjectManager::Qt4ProFileNode *node, appNodes) {
Qt4ProjectManager::TargetInformation ti = node->targetInformation();
QFileInfo fi(node->path());
const QString appDescriptorPath = QDir::toNativeSeparators(fi.absolutePath() + QLatin1String("/bar-descriptor.xml"));
QString barPackagePath;
if (!ti.buildDir.isEmpty())
barPackagePath = QDir::toNativeSeparators(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String(".bar"));
m_deployInformation << BarPackageDeployInformation(true, appDescriptorPath, barPackagePath, node->path());
}
foreach (Qt4ProjectManager::Qt4ProFileNode *node, appNodes)
m_deployInformation << deployInformationFromNode(node);
endResetModel();
connect(m_project, SIGNAL(proFilesEvaluated()), SLOT(initModel()));
connect(m_project, SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
}
BarPackageDeployInformation BlackBerryDeployInformation::deployInformationFromNode(Qt4ProjectManager::Qt4ProFileNode *node) const
{
Qt4ProjectManager::TargetInformation ti = node->targetInformation();
QFileInfo fi(node->path());
const QString appDescriptorPath = QDir::toNativeSeparators(fi.absolutePath() + QLatin1String("/bar-descriptor.xml"));
QString barPackagePath;
if (!ti.buildDir.isEmpty())
barPackagePath = QDir::toNativeSeparators(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String(".bar"));
return BarPackageDeployInformation(true, appDescriptorPath, barPackagePath, node->path());
}
@@ -34,6 +34,7 @@
#include <QAbstractTableModel>
namespace Qt4ProjectManager {
class Qt4ProFileNode;
class Qt4Project;
}
@@ -74,8 +75,11 @@ public:
QList<BarPackageDeployInformation> enabledPackages() const;
QVariantMap toMap() const;
void fromMap(const QVariantMap &map);
private slots:
void initModel();
void updateModel();
private:
enum Columns {
@@ -85,6 +89,9 @@ private:
ColumnCount // Always have last
};
void initModel();
BarPackageDeployInformation deployInformationFromNode(Qt4ProjectManager::Qt4ProFileNode *node) const;
Qt4ProjectManager::Qt4Project *m_project;
QList<BarPackageDeployInformation> m_deployInformation;
+7
View File
@@ -64,6 +64,8 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
editor->setAutoFillBackground(true); // To hide the text beneath the editor widget
editor->lineEdit()->setMinimumWidth(0);
connect(editor, SIGNAL(browsingFinished()), this, SLOT(emitCommitData()));
return editor;
}
@@ -95,3 +97,8 @@ void PathChooserDelegate::updateEditorGeometry(QWidget *editor, const QStyleOpti
editor->setGeometry(option.rect);
}
void PathChooserDelegate::emitCommitData()
{
emit commitData(qobject_cast<QWidget*>(sender()));
}
+3
View File
@@ -60,6 +60,9 @@ public:
void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option, const QModelIndex &index) const;
private slots:
void emitCommitData();
private:
Utils::PathChooser::Kind m_kind;
QString m_filter;
@@ -42,7 +42,8 @@ namespace Internal {
QmakeKitConfigWidget::QmakeKitConfigWidget(ProjectExplorer::Kit *k) :
ProjectExplorer::KitConfigWidget(k),
m_lineEdit(new QLineEdit)
m_lineEdit(new QLineEdit),
m_ignoreChange(false)
{
refresh(); // set up everything according to kit
connect(m_lineEdit, SIGNAL(textEdited(QString)), this, SLOT(mkspecWasChanged(QString)));
@@ -71,12 +72,15 @@ void QmakeKitConfigWidget::makeReadOnly()
void QmakeKitConfigWidget::refresh()
{
m_lineEdit->setText(QmakeKitInformation::mkspec(m_kit).toString());
if (!m_ignoreChange)
m_lineEdit->setText(QmakeKitInformation::mkspec(m_kit).toUserOutput());
}
void QmakeKitConfigWidget::mkspecWasChanged(const QString &text)
{
m_ignoreChange = true;
QmakeKitInformation::setMkspec(m_kit, Utils::FileName::fromString(text));
m_ignoreChange = false;
}
} // namespace Internal
@@ -60,6 +60,7 @@ private:
int findQtVersion(const int id) const;
QLineEdit *m_lineEdit;
bool m_ignoreChange;
};
} // namespace Internal
@@ -84,7 +84,7 @@ QList<ProjectExplorer::Task> QmakeKitInformation::validate(const ProjectExplorer
return result;
}
void QmakeKitInformation::fix(ProjectExplorer::Kit *k)
void QmakeKitInformation::setup(ProjectExplorer::Kit *k)
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version)
@@ -50,7 +50,7 @@ public:
QVariant defaultValue(ProjectExplorer::Kit *k) const;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const;
void fix(ProjectExplorer::Kit *k);
void setup(ProjectExplorer::Kit *k);
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
@@ -274,12 +274,12 @@ void Qt4ProjectConfigWidget::updateProblemLabel()
} else if (targetMismatch) {
setProblemLabel(shadowBuildWarning + tr("A build for a different project exists in %1, which will be overwritten.",
"%1 build directory")
.arg(m_ui->shadowBuildDirEdit->path()));
.arg(m_buildConfiguration->buildDirectory()));
return;
} else if (incompatibleBuild) {
setProblemLabel(shadowBuildWarning +tr("An incompatible build exists in %1, which will be overwritten.",
"%1 build directory")
.arg(m_ui->shadowBuildDirEdit->path()));
.arg(m_buildConfiguration->buildDirectory()));
return;
} else if (!shadowBuildWarning.isEmpty()) {
setProblemLabel(shadowBuildWarning);
@@ -111,7 +111,6 @@ private:
ProjectExplorer::KitMatcher *m_preferredMatcher;
QLayout *m_baseLayout;
bool m_importSearch;
bool m_useScrollArea;
bool m_ignoreUpdates;
QString m_proFilePath;
QString m_defaultShadowBuildLocation;
+1 -1
View File
@@ -119,7 +119,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
{
QWidget *versionInfoWidget = new QWidget();
m_versionUi->setupUi(versionInfoWidget);
m_versionUi->editPathPushButton->setText(tr(Utils::PathChooser::browseButtonLabel));
m_versionUi->editPathPushButton->setText(QCoreApplication::translate("Utils::PathChooser", Utils::PathChooser::browseButtonLabel));
QWidget *debuggingHelperDetailsWidget = new QWidget();
m_debuggingHelperUi->setupUi(debuggingHelperDetailsWidget);
+1 -2
View File
@@ -52,7 +52,7 @@
#include <QScrollArea>
#include <QDesktopServices>
#include <QPainter>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QCoreApplication>
#include <QDir>
@@ -127,7 +127,6 @@ private:
QWidget *m_modeWidget;
QDeclarativeView *m_welcomePage;
QHBoxLayout * buttonLayout;
QList<QObject*> m_pluginList;
int m_activePlugin;
NetworkAccessManagerFactory *m_networkAccessManagerFactory;
+2 -2
View File
@@ -195,7 +195,7 @@ bool AddQtOperation::test() const
|| !version0.contains(QLatin1String(AUTODETECTED))
|| version0.value(QLatin1String(AUTODETECTED)).toBool() != true
|| !version0.contains(QLatin1String(AUTODETECTION_SOURCE))
|| version0.value(QLatin1String(AUTODETECTION_SOURCE)).toString() != QLatin1String("testId")
|| version0.value(QLatin1String(AUTODETECTION_SOURCE)).toString() != QLatin1String("SDK.testId")
|| !version0.contains(QLatin1String(TYPE))
|| version0.value(QLatin1String(TYPE)).toString() != QLatin1String("testType")
|| !version0.contains(QLatin1String(QMAKE))
@@ -234,7 +234,7 @@ bool AddQtOperation::test() const
|| !version1.contains(QLatin1String(AUTODETECTED))
|| version1.value(QLatin1String(AUTODETECTED)).toBool() != true
|| !version1.contains(QLatin1String(AUTODETECTION_SOURCE))
|| version1.value(QLatin1String(AUTODETECTION_SOURCE)).toString() != QLatin1String("testId2")
|| version1.value(QLatin1String(AUTODETECTION_SOURCE)).toString() != QLatin1String("SDK.testId2")
|| !version1.contains(QLatin1String(TYPE))
|| version1.value(QLatin1String(TYPE)).toString() != QLatin1String("testType3")
|| !version1.contains(QLatin1String(QMAKE))
+4
View File
@@ -85,12 +85,14 @@
:Qt Creator.Search for:_QLabel {text='Search for:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FilterLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton {occurrence='3' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Bookmarks_TreeView {type='TreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CloseButton {type='CloseButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::CommandComboBox {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'}
:Qt Creator_Core::Internal::NavComboBox {type='Core::Internal::NavComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_FilenameQComboBox {type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Find::Internal::SearchResultTreeView {type='Find::Internal::SearchResultTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -101,6 +103,7 @@
: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'}
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -126,6 +129,7 @@
:headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:popupFrame_Proposal_QListView {container=':popupFrame_TextEditor::GenericProposalWidget' type='QListView' unnamed='1' visible='1'}
:popupFrame_TextEditor::GenericProposalWidget {name='m_popupFrame' type='TextEditor::GenericProposalWidget' visible='1'}
:qmakeCallEdit {container=':Qt Creator.scrollArea_QScrollArea' text?='<b>qmake:</b> qmake*' type='QLabel' unnamed='1' visible='1'}
:qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Core__Internal__GeneralSettings' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='CppTools__Internal__CompletionSettingsPage' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.Form_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Help__Internal__GeneralSettingsPage' type='QWidget' visible='1' windowTitle='Form'}
+7
View File
@@ -13,6 +13,13 @@ class QtQuickConstants:
EMBEDDED_LINUX = 16
DESKTOP_474_MSVC2008 = 32
@staticmethod
def desktopTargetClasses():
desktopTargets = QtQuickConstants.Targets.DESKTOP_474_GCC
if platform.system() in ('Windows', 'Microsoft'):
desktopTargets |= QtQuickConstants.Targets.DESKTOP_474_MSVC2008
return desktopTargets
@staticmethod
def getStringForComponents(components):
if components==QtQuickConstants.Components.BUILTIN:
+22 -6
View File
@@ -1,7 +1,7 @@
import re
def handleDebuggerWarnings(config):
if "MSVC" in config:
def handleDebuggerWarnings(config, isMsvcBuild=False):
if isMsvcBuild:
try:
popup = waitForObject("{text?='<html><head/><body>*' type='QLabel' unnamed='1' visible='1' window=':Symbol Server_Utils::CheckableMessageBox'}", 10000)
symServerNotConfiged = ("<html><head/><body><p>The debugger is not configured to use the public "
@@ -99,16 +99,19 @@ def removeOldBreakpoints():
return test.compare(model.rowCount(), 0, "Check if all breakpoints have been removed.")
# function to do simple debugging of the current (configured) project
# param kitCount specifies the number of kits currently defined (must be correct!)
# param currentKit specifies the target to use (zero based index)
# param currentConfigName is the name of the configuration that should be used
# param pressContinueCount defines how often it is expected to press
# the 'Continue' button while debugging
# param expectedBPOrder holds a list of dicts where the dicts contain always
# only 1 key:value pair - the key is the name of the file, the value is
# line number where the debugger should stop
def doSimpleDebugging(currentConfigName, pressContinueCount=1, expectedBPOrder=[]):
def doSimpleDebugging(kitCount, currentKit, currentConfigName, pressContinueCount=1, expectedBPOrder=[]):
expectedLabelTexts = ['Stopped\.', 'Stopped at breakpoint \d+ \(\d+\) in thread \d+\.']
if len(expectedBPOrder) == 0:
expectedLabelTexts.append("Running\.")
if not __startDebugger__(currentConfigName):
if not __startDebugger__(kitCount, currentKit, currentConfigName):
return False
statusLabel = findObject(":Debugger Toolbar.StatusText_Utils::StatusLabel")
test.log("Continuing debugging %d times..." % pressContinueCount)
@@ -139,9 +142,22 @@ def doSimpleDebugging(currentConfigName, pressContinueCount=1, expectedBPOrder=[
# if stopping failed - debugger had already stopped
return True
def __startDebugger__(config):
# param kitCount specifies the number of kits currently defined (must be correct!)
# param currentKit specifies the target to use (zero based index)
def isMsvcConfig(kitCount, currentKit):
switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(kitCount, currentKit, ProjectSettings.BUILD)
isMsvc = " -spec win32-msvc" in str(waitForObject(":qmakeCallEdit").text)
switchViewTo(ViewConstants.EDIT)
return isMsvc
# param kitCount specifies the number of kits currently defined (must be correct!)
# param currentKit specifies the target to use (zero based index)
# param config is the name of the configuration that should be used
def __startDebugger__(kitCount, currentKit, config):
isMsvcBuild = isMsvcConfig(kitCount, currentKit)
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
handleDebuggerWarnings(config)
handleDebuggerWarnings(config, isMsvcBuild)
hasNotTimedOut = waitFor("object.exists(':Debugger Toolbar.Continue_QToolButton')", 60000)
try:
mBox = findObject(":Failed to start application_QMessageBox")
+7 -11
View File
@@ -68,17 +68,12 @@ def openContextMenuOnTextCursorPosition(editor):
waitFor("menuVisibleAtEditor(editor, menuInList)", 5000)
return menuInList[0]
# this function marks/selects the text inside the given editor from position
# startPosition to endPosition (both inclusive)
def markText(editor, startPosition, endPosition):
cursor = editor.textCursor()
cursor.setPosition(startPosition)
cursor.movePosition(QTextCursor.StartOfLine)
editor.setTextCursor(cursor)
cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor, endPosition-startPosition)
cursor.movePosition(QTextCursor.EndOfLine, QTextCursor.KeepAnchor)
cursor.setPosition(endPosition, QTextCursor.KeepAnchor)
editor.setTextCursor(cursor)
# this function marks/selects the text inside the given editor from current cursor position
# param direction is one of "Left", "Right", "Up", "Down", but "End" and combinations work as well
# param typeCount defines how often the cursor will be moved in the given direction (while marking)
def markText(editor, direction, typeCount=1):
for i in range(typeCount):
type(editor, "<Shift+%s>" % direction)
# works for all standard editors
def replaceEditorContent(editor, newcontent):
@@ -294,6 +289,7 @@ def invokeFindUsage(editor, line, typeOperation, n=1):
def openDocument(treeElement):
try:
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Open Documents")
navigator = waitForObject(":Qt Creator_Utils::NavigationTreeView")
fileName = waitForObjectItem(navigator, treeElement).text
doubleClickItem(navigator, treeElement, 5, 5, 0, Qt.LeftButton)
+28 -18
View File
@@ -12,7 +12,7 @@ def __handleProcessExited__(object, exitCode):
global processExited
processExited = True
def openQmakeProject(projectPath, targets = QtQuickConstants.Targets.DESKTOP_474_GCC, fromWelcome = False):
def openQmakeProject(projectPath, targets=QtQuickConstants.desktopTargetClasses(), fromWelcome=False):
cleanUpUserFiles(projectPath)
if fromWelcome:
mouseClick(waitForObject(":OpenProject_QStyleItem"), 5, 5, 0, Qt.LeftButton)
@@ -29,10 +29,11 @@ def openQmakeProject(projectPath, targets = QtQuickConstants.Targets.DESKTOP_474
clickButton(waitForObject("{text='Yes' type='QPushButton' unnamed='1' visible='1'}"))
except:
pass
__chooseTargets__(targets)
checkedTargets = __chooseTargets__(targets)
configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'"
"window=':Qt Creator_Core::Internal::MainWindow'}")
clickButton(configureButton)
return checkedTargets
def openCmakeProject(projectPath, buildDir):
invokeMenuItem("File", "Open File or Project...")
@@ -44,17 +45,18 @@ def openCmakeProject(projectPath, buildDir):
mkspec = __getMkspecFromQmake__("qmake")
test.log("Using mkspec '%s'" % mkspec)
generatorText = "Unix Generator (Desktop 474 GCC)"
if "win32-" in mkspec:
generatorName = {"win32-g++" : "MinGW Generator (MinGW from SDK)",
"win32-msvc2008" : "NMake Generator (Microsoft Visual C++ Compiler 9.0 (x86))",
"win32-msvc2010" : "NMake Generator (Microsoft Visual C++ Compiler 10.0 (x86))"}
index = -1
generatorName = {"win32-g++" : "MinGW Generator (Desktop 474 GCC)",
"win32-msvc2008" : "NMake Generator (Desktop 474 MSVC2008)",
"win32-msvc2010" : "NMake Generator (Desktop 474 MSVC2010)"}
if mkspec in generatorName:
index = generatorCombo.findText(generatorName[mkspec])
if index == -1:
test.warning("No matching CMake generator for mkspec '%s' found." % mkspec)
else:
generatorCombo.setCurrentIndex(index)
generatorText = generatorName[mkspec]
index = generatorCombo.findText(generatorText)
if index == -1:
test.warning("No matching CMake generator for mkspec '%s' found." % mkspec)
else:
generatorCombo.setCurrentIndex(index)
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton"))
try:
@@ -110,13 +112,14 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
# param checks turns tests in the function on if set to True
# param available a list holding the available targets
def __selectQtVersionDesktop__(checks, available=None):
__chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
checkedTargets = __chooseTargets__(QtQuickConstants.desktopTargetClasses(), available)
if checks:
cbObject = ("{type='QCheckBox' text='%s' unnamed='1' visible='1' "
"container={type='Utils::DetailsWidget' visible='1' unnamed='1'}}")
verifyChecked(cbObject % "Debug")
verifyChecked(cbObject % "Release")
clickButton(waitForObject(":Next_QPushButton"))
return checkedTargets
def __createProjectHandleLastPage__(expectedFiles = None):
if expectedFiles != None:
@@ -144,7 +147,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
template = "Qt Gui Application"
available = __createProjectOrFileSelectType__(" Applications", template)
__createProjectSetNameAndPath__(path, projectName, checks)
__selectQtVersionDesktop__(checks, available)
checkedTargets = __selectQtVersionDesktop__(checks, available)
if checks:
exp_filename = "mainwindow"
@@ -174,6 +177,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)
__verifyFileCreation__(path, expectedFiles)
return checkedTargets
# Creates a Qt Console project
# param path specifies where to create the project
@@ -182,7 +186,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
def createProject_Qt_Console(path, projectName, checks = True):
available = __createProjectOrFileSelectType__(" Applications", "Qt Console Application")
__createProjectSetNameAndPath__(path, projectName, checks)
__selectQtVersionDesktop__(checks, available)
checkedTargets = __selectQtVersionDesktop__(checks, available)
expectedFiles = None
if checks:
@@ -197,9 +201,10 @@ def createProject_Qt_Console(path, projectName, checks = True):
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000)
__verifyFileCreation__(path, expectedFiles)
return checkedTargets
def createNewQtQuickApplication(workingDir, projectName = None, templateFile = None,
targets = QtQuickConstants.Targets.DESKTOP_474_GCC, qtQuickVersion=1,
targets=QtQuickConstants.desktopTargetClasses(), qtQuickVersion=1,
fromWelcome=False):
if templateFile:
if qtQuickVersion == 2:
@@ -215,12 +220,12 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
type(baseLineEd, templateFile)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
__chooseTargets__(targets, available)
checkedTargets = __chooseTargets__(targets, available)
snooze(1)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
__createProjectHandleLastPage__()
return projectName
return checkedTargets, projectName
def createNewQtQuickUI(workingDir):
__createProjectOrFileSelectType__(" Applications", "Qt Quick 1 UI")
@@ -235,7 +240,7 @@ def createNewQmlExtension(workingDir):
if workingDir == None:
workingDir = tempDir()
__createProjectSetNameAndPath__(workingDir)
__chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
checkedTargets = __chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
nameLineEd = waitForObject("{buddy={type='QLabel' text='Object Class-name:' unnamed='1' visible='1'} "
@@ -246,6 +251,7 @@ def createNewQmlExtension(workingDir):
replaceEditorContent(uriLineEd, "org.qt-project.test.qmlcomponents")
clickButton(nextButton)
__createProjectHandleLastPage__()
return checkedTargets
# parameter components can only be one of the Constants defined in QtQuickConstants.Components
def __chooseComponents__(components=QtQuickConstants.Components.BUILTIN):
@@ -272,11 +278,14 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP_474_GCC, availabl
if platform.system() in ('Windows', 'Microsoft'):
available.remove(QtQuickConstants.Targets.EMBEDDED_LINUX)
available.append(QtQuickConstants.Targets.DESKTOP_474_MSVC2008)
checkedTargets = []
for current in available:
mustCheck = targets & current == current
try:
ensureChecked("{type='QCheckBox' text='%s' visible='1'}" % QtQuickConstants.getStringForTarget(current),
mustCheck, 3000)
if (mustCheck):
checkedTargets.append(current)
except LookupError:
if mustCheck:
test.fail("Failed to check target '%s'." % QtQuickConstants.getStringForTarget(current))
@@ -284,6 +293,7 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP_474_GCC, availabl
# Simulator has been added without knowing whether configured or not - so skip warning here?
if current != QtQuickConstants.Targets.SIMULATOR:
test.warning("Target '%s' is not set up correctly." % QtQuickConstants.getStringForTarget(current))
return checkedTargets
# run and close an application
# withHookInto - if set to True the function tries to attach to the sub-process instead of simply pressing Stop inside Creator
+5 -4
View File
@@ -14,16 +14,17 @@ def verifyBuildAndRun():
"Verifying if built app started and closed successfully.")
# run project for debug and release
def runVerify():
availableConfigs = iterateBuildConfigs(1)
def runVerify(checkedTargets):
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found build configurations, quitting")
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
# select debug configuration
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
test.log("Using build config '%s'" % config)
runAndCloseApp()
if not runAndCloseApp():
return
verifyBuildAndRun()
mouseClick(waitForObject(":*Qt Creator.Clear_QToolButton"))
+2 -2
View File
@@ -5,8 +5,8 @@ source("../shared/aptw.py")
# test New Qt Gui Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
createProject_Qt_GUI(tempDir(), "SampleApp")
checkedTargets = createProject_Qt_GUI(tempDir(), "SampleApp")
# run project for debug and release and verify results
runVerify()
runVerify(checkedTargets)
#close Qt Creator
invokeMenuItem("File", "Exit")
+2 -2
View File
@@ -5,9 +5,9 @@ source("../shared/aptw.py")
# test New Qt Quick Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
createNewQtQuickApplication(tempDir(), "SampleApp")
checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
# run project for debug and release and verify results
runVerify()
runVerify(checkedTargets)
#close Qt Creator
invokeMenuItem("File", "Exit")
+3 -3
View File
@@ -13,13 +13,13 @@ def main():
examplePath = os.path.join(templateDir, proFile)
startApplication("qtcreator" + SettingsPath)
# open example project
openQmakeProject(examplePath)
checkedTargets = openQmakeProject(examplePath)
# build and wait until finished - on all build configurations
availableConfigs = iterateBuildConfigs(1)
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
# try to build project
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Build All")
+2 -4
View File
@@ -28,8 +28,7 @@ def main():
invokeMenuItem("File", "Exit")
return
type(editorWidget, "<Left>")
for i in range(6):
type(editorWidget, "<Shift+Left>")
markText(editorWidget, "Left", 6)
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"),
@@ -49,8 +48,7 @@ def main():
placeCursorToLine(editorWidget, "find.setOrientation(QmlApplicationfind::ScreenOrientationAuto);")
for i in range(25):
type(editorWidget, "<Left>")
for i in range(18):
type(editorWidget, "<Shift+Left>")
markText(editorWidget, "Left", 18)
invokeMenuItem("Edit", "Find/Replace", "Find/Replace")
replaceEditorContent(waitForObject(":Qt Creator.replaceEdit_Utils::FilterLineEdit"), "QmlApplicationViewer")
oldCodeText = str(editorWidget.plainText)
+1 -1
View File
@@ -18,7 +18,7 @@ def main():
placeCursorToLine(editorArea, testingCodeLine)
for i in range(14):
type(editorArea, "<Left>")
type(editorArea, "<Shift+Right>")
markText(editorArea, "Right")
type(editorArea, "c")
# invoke QML parsing
invokeMenuItem("Tools", "QML/JS", "Run Checks")
+3 -3
View File
@@ -5,13 +5,13 @@ source("../../shared/suites_qtta.py")
def main():
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
# build it - on all build configurations
availableConfigs = iterateBuildConfigs(1)
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
+3 -3
View File
@@ -8,7 +8,7 @@ def main():
"'SyntaxError' : undeclared identifier"]
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
# create syntax error in cpp file
doubleClickItem(":Qt Creator_Utils::NavigationTreeView", "SampleApp.Sources.main\\.cpp", 5, 5, 0, Qt.LeftButton)
if not appendToLine(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget"), "viewer.showExpanded();", "SyntaxError"):
@@ -17,11 +17,11 @@ def main():
# save all
invokeMenuItem("File", "Save All")
# build it - on all build configurations
availableConfigs = iterateBuildConfigs(1)
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
@@ -4,12 +4,13 @@ project = "SquishProject"
def main():
startApplication("qtcreator" + SettingsPath)
createProject_Qt_Console(tempDir(), project)
availableConfigs = iterateBuildConfigs(1)
checkedTargets = createProject_Qt_Console(tempDir(), project)
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
test.log("Testing build configuration: " + config)
runAndCloseApp()
if not runAndCloseApp():
return
invokeMenuItem("File", "Exit")
@@ -17,7 +17,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
installLazySignalHandler("{type='ProjectExplorer::Internal::ProjectExplorerPlugin' unnamed='1'}",
"runControlFinished(ProjectExplorer::RunControl*)", "__handlerunControlFinished__")
createProject_Qt_Console(tempDir(), project)
checkedTargets = createProject_Qt_Console(tempDir(), project)
mainEditor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
replaceEditorContent(mainEditor, "")
@@ -33,38 +33,44 @@ def main():
selectFromLocator(project + ".pro")
proEditor = waitForObject(":Qt Creator_ProFileEditorWidget")
test.verify("CONFIG += console" in str(proEditor.plainText), "Verifying that program is configured with console")
setRunInTerminal(1, 0, False)
availableConfigs = iterateBuildConfigs(1)
availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
test.log("Testing build configuration: " + config)
test.log("Running application")
setRunInTerminal(len(checkedTargets), kit, False)
runControlFinished = False
clickButton(waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}"))
waitFor("runControlFinished==True", 20000)
if not runControlFinished:
test.warning("Waiting for runControlFinished timed out")
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
clickButton(waitForObject(":Qt Creator_CloseButton"))
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
try:
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
clickButton(waitForObject(":Qt Creator_CloseButton"))
except:
test.fatal("Could not find Application Output Window",
"Did the application run at all?")
test.log("Debugging application")
isMsvc = isMsvcConfig(len(checkedTargets), kit)
runControlFinished = False
invokeMenuItem("Debug", "Start Debugging", "Start Debugging")
JIRA.performWorkaroundIfStillOpen(6853, JIRA.Bug.CREATOR, config)
handleDebuggerWarnings(config)
handleDebuggerWarnings(config, isMsvc)
waitFor("runControlFinished==True", 20000)
if not runControlFinished:
test.warning("Waiting for runControlFinished timed out")
try:
debuggerLog = takeDebuggerLog()
if not "MSVC" in config:
if not isMsvc:
# cout works with MSVC, too, but we don't check it since it's not supported
verifyOutput(debuggerLog, outputStdOut, "std::cout", "Debugger Log")
verifyOutput(debuggerLog, outputStdErr, "std::cerr", "Debugger Log")
@@ -78,11 +84,16 @@ def main():
else:
test.fatal("Debugger log did not behave as expected. Please check manually.")
switchViewTo(ViewConstants.EDIT)
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
if not "MSVC" in config:
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
clickButton(waitForObject(":Qt Creator_CloseButton"))
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
try:
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
if not isMsvc:
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
clickButton(waitForObject(":Qt Creator_CloseButton"))
except:
test.fatal("Could not find Application Output Window",
"Did the application run at all?")
invokeMenuItem("File", "Exit")
@@ -5,13 +5,16 @@ workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
if not checkDebuggingLibrary([QtQuickConstants.Targets.DESKTOP_474_GCC]):
targets = [QtQuickConstants.Targets.DESKTOP_474_GCC]
if platform.system() in ('Windows', 'Microsoft'):
targets.append(QtQuickConstants.Targets.DESKTOP_474_MSVC2008)
if not checkDebuggingLibrary(targets):
test.fatal("Error while checking debugging libraries - leaving this test.")
invokeMenuItem("File", "Exit")
return
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
checkedTargets, projectName = createNewQtQuickApplication(workingDir)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
"sourceFilesRefreshed(QStringList)")
@@ -33,13 +36,13 @@ def main():
if result:
expectedBreakpointsOrder = [{"main.cpp":10}, {"main.qml":13}]
# Only use 4.7.4 to work around QTBUG-25187
availableConfigs = iterateBuildConfigs(1, "Debug")
availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug")
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:
test.log("Selecting '%s' as build config" % config)
selectBuildConfig(1, kit, config)
verifyBuildConfig(1, kit, True, enableQmlDebug=True)
selectBuildConfig(len(checkedTargets), kit, config)
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'}",
@@ -48,7 +51,8 @@ def main():
test.fatal("Compile had errors... Skipping current build config")
continue
allowAppThroughWinFW(workingDir, projectName, False)
if not doSimpleDebugging(config, 2, expectedBreakpointsOrder):
if not doSimpleDebugging(len(checkedTargets), kit, config,
2, expectedBreakpointsOrder):
try:
stopB = findObject(':Qt Creator.Stop_QToolButton')
if stopB.enabled:
@@ -25,13 +25,19 @@ def prepareQmlFile():
for i in range(3):
content = "%s" % editor.plainText
start = content.find("Text {")
end = content.rfind("}")
end = content.rfind("}", end-1)
if start==-1 or end==-1:
if not placeCursorToLine(editor, "Text {"):
test.fatal("Couldn't find line(s) I'm looking for - QML file seems to "
"have changed!\nLeaving test...")
return False
markText(editor, start, end)
type(editor, "<Right>")
type(editor, "<Up>")
# mark until the end of file
if platform.system() == 'Darwin':
markText(editor, "End")
else:
markText(editor, "Ctrl+End")
# unmark the last line
type(editor, "<Shift+Up>")
type(editor, "<Ctrl+C>")
for j in range(10):
type(editor, "<Ctrl+V>")
@@ -27,8 +27,7 @@ def testRenameMacroAfterSourceModification():
type(cppEditorStr, "<Command+Left>")
else:
type(cppEditorStr, "<Home>")
for i in range(5):
type(cppEditorStr, "<Shift+Down>")
markText(cppEditorStr, "Down", 5)
type(cppEditorStr, "<Delete>")
test.log("Testing rename macro after modifying source.")
@@ -54,8 +53,7 @@ def testRenameMacroAfterSourceMoving():
type(cppEditorStr, "<Command+Left>")
else:
type(cppEditorStr, "<Home>")
for i in range(4):
type(cppEditorStr, "<Shift+Down>")
markText(cppEditorStr, "Down", 4)
invokeMenuItem("Edit", "Cut")
def __paste__():
@@ -62,8 +62,7 @@ def __modifyHeader__():
global cppEditorStr, homeShortCut, endShortCut
if placeCursorToLine(cppEditorStr, "class.+", True):
type(cppEditorStr, homeShortCut)
for i in range(5):
type(cppEditorStr, "<Shift+Down>")
markText(cppEditorStr, "Down", 5)
invokeMenuItem("Edit", "Cut")
type(cppEditorStr, endShortCut)
type(cppEditorStr, "<Return>")
@@ -74,12 +73,11 @@ def __modifySource__():
global cppEditorStr, homeShortCut
if placeCursorToLine(cppEditorStr, "void function1(int a);"):
type(cppEditorStr, homeShortCut)
type(cppEditorStr, "<Shift+Down>")
markText(cppEditorStr, "Down")
type(cppEditorStr, "<Delete>")
if placeCursorToLine(cppEditorStr, "bool function1(int a) {"):
type(cppEditorStr, homeShortCut)
for i in range(4):
type(cppEditorStr, "<Shift+Down>")
markText(cppEditorStr, "Down", 4)
type(cppEditorStr, "<Delete>")
def revertChanges(files):
@@ -15,16 +15,16 @@ def main():
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
openQmakeProject(SpeedCrunchPath)
checkedTargets = openQmakeProject(SpeedCrunchPath)
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
availableConfigs = iterateBuildConfigs(1, "Release")
availableConfigs = iterateBuildConfigs(len(checkedTargets), "Release")
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Release build) - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(1, kit, config)
selectBuildConfig(len(checkedTargets), kit, config)
buildConfig = buildConfigFromFancyToolButton(fancyToolButton)
if buildConfig != config:
test.fatal("Build configuration %s is selected instead of %s" % (buildConfig, config))
+1 -1
View File
@@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAP=../objects.map
TEST_CASES=tst_qtquick_creation tst_qtquick_creation2 tst_qtquick_creation3 tst_qtquick_creation4
TEST_CASES=tst_qml_outline tst_qtquick_creation tst_qtquick_creation2 tst_qtquick_creation3 tst_qtquick_creation4
VERSION=2
WRAPPERS=Qt
@@ -0,0 +1,121 @@
source("../../shared/qtcreator.py")
qmlEditor = ":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"
outline = ":Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView"
def main():
sourceExample = os.path.abspath(os.path.join(sdkPath, "Examples", "4.7", "declarative",
"keyinteraction", "focus"))
proFile = "focus.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
templateDir = prepareTemplate(sourceExample)
startApplication("qtcreator" + SettingsPath)
openQmakeProject(os.path.join(templateDir, proFile))
qmlFiles = ["focus.QML.qml.focus\\.qml", "focus.QML.qml.Core.ListMenu\\.qml"]
checkOutlineFor(qmlFiles)
testModify()
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
def checkOutlineFor(qmlFiles):
for qmlFile in qmlFiles:
if not openDocument(qmlFile):
test.fatal("Failed to open file '%s'" % simpleFileName(qmlFile))
continue
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Outline")
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, simpleFileName(qmlFile)+"_outline.tsv")
verifyOutline(pseudoTree, simpleFileName(qmlFile) + "_outline.tsv")
def buildTreeFromOutline():
global outline
model = waitForObject(outline).model()
waitFor("model.rowCount() > 0")
return processChildren(model, QModelIndex(), 0)
def processChildren(model, startIndex, level):
children = []
for index in dumpIndices(model, startIndex):
annotationData = str(index.data(Qt.UserRole + 3)) # HACK - taken from source
children.append((str(index.data()), level, annotationData))
if model.hasChildren(index):
children.extend(processChildren(model, index, level + 1))
return children
def testModify():
global qmlEditor, outline
if not openDocument("focus.QML.qml.focus\\.qml"):
test.fatal("Failed to open file focus.qml")
return
test.log("Testing whether modifications show up inside outline.")
if not placeCursorToLine(qmlEditor, 'color: "#3E606F"'):
return
test.log("Modification: adding a QML element")
typeLines(qmlEditor, ['', '', 'Text {', 'id: addedText', 'text: "Squish QML outline test"',
'color: "darkcyan"', 'font.bold: true', 'anchors.centerIn: parent'])
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Outline")
snooze(1) # no way to wait for a private signal
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, "focus.qml_mod1_outline.tsv")
verifyOutline(pseudoTree, "focus.qml_mod1_outline.tsv")
test.log("Modification: change existing content")
performModification('color: "#3E606F"', "<Left>", 7, "Left", "white")
performModification('color: "black"', "<Left>", 5, "Left", "#cc00bb")
performModification('rotation: 90', None, 2, "Left", "180")
snooze(1) # no way to wait for a private signal
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, "focus.qml_mod2_outline.tsv")
verifyOutline(pseudoTree, "focus.qml_mod2_outline.tsv")
test.log("Modification: add special elements")
placeCursorToLine(qmlEditor, 'id: window')
typeLines(qmlEditor, ['', '', 'property string txtCnt: "Property"', 'signal clicked', '',
'function clicked() {','console.log("click")'])
performModification('onClicked: contextMenu.focus = true', None, 24, "Left", '{')
performModification('onClicked: {contextMenu.focus = true}', "<Left>", 0, None,
';window.clicked()')
snooze(1) # no way to wait for a private signal
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, "focus.qml_mod3_outline.tsv")
verifyOutline(pseudoTree, "focus.qml_mod3_outline.tsv")
def performModification(afterLine, typing, markCount, markDirection, newText):
global qmlEditor
if not placeCursorToLine(qmlEditor, afterLine):
return
if typing:
type(qmlEditor, typing)
markText(qmlEditor, markDirection, markCount)
type(qmlEditor, newText)
# used to create the tsv file(s)
def __writeOutlineFile__(outlinePseudoTree, filename):
f = open(filename, "w+")
f.write('"element"\t"nestinglevel"\t"value"\n')
for elem in outlinePseudoTree:
f.write('"%s"\t"%s"\t"%s"\n' % (elem[0], elem[1], elem[2].replace('"', '\"\"')))
f.close()
def retrieveData(record):
return (testData.field(record, "element"),
__builtin__.int(testData.field(record, "nestinglevel")),
testData.field(record, "value"))
def verifyOutline(outlinePseudoTree, datasetFileName):
fileName = datasetFileName[:datasetFileName.index("_")]
expected = map(retrieveData, testData.dataset(datasetFileName))
if len(expected) != len(outlinePseudoTree):
test.fail("Mismatch in length of expected and found elements of outline. Skipping "
"verification of nodes.",
"Found %d elements, but expected %d" % (len(outlinePseudoTree), len(expected)))
return
for counter, (expectedItem, foundItem) in enumerate(zip(expected, outlinePseudoTree)):
if expectedItem != foundItem:
test.fail("Mismatch in element number %d for '%s'" % (counter + 1, fileName),
"%s != %s" % (str(expectedItem), str(foundItem)))
return
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
% (len(expected), fileName))
def simpleFileName(navigatorFileName):
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\", "")
@@ -0,0 +1,85 @@
"element" "nestinglevel" "value"
"FocusScope" "0" ""
"clip" "1" "true"
"onActiveFocusChanged" "1" ""
"ListView" "1" ""
"id" "2" "list1"
"y" "2" "activeFocus ? 10 : 40"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"focus" "2" "true"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "contextMenu"
"KeyNavigation.right" "2" "list2"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"ListView" "1" ""
"id" "2" "list2"
"y" "2" "activeFocus ? 10 : 40"
"x" "2" "parseInt(parent.width / 3)"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "list1"
"KeyNavigation.right" "2" "list3"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"ListView" "1" ""
"id" "2" "list3"
"y" "2" "activeFocus ? 10 : 40"
"x" "2" "parseInt(2 * parent.width / 3)"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "list2"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Rectangle" "1" ""
"width" "2" "parent.width"
"height" "2" "1"
"color" "2" """#D1DBBD"""
"Rectangle" "1" ""
"y" "2" "1"
"width" "2" "parent.width"
"height" "2" "10"
"gradient" "2" ""
"Gradient" "3" ""
"GradientStop" "4" ""
"position" "5" "0.0"
"color" "5" """#3E606F"""
"GradientStop" "4" ""
"position" "5" "1.0"
"color" "5" """transparent"""
"Rectangle" "1" ""
"y" "2" "parent.height - 10"
"width" "2" "parent.width"
"height" "2" "10"
"gradient" "2" ""
"Gradient" "3" ""
"GradientStop" "4" ""
"position" "5" "1.0"
"color" "5" """#3E606F"""
"GradientStop" "4" ""
"position" "5" "0.0"
"color" "5" """transparent"""
1 element nestinglevel value
2 FocusScope 0
3 clip 1 true
4 onActiveFocusChanged 1
5 ListView 1
6 id 2 list1
7 y 2 activeFocus ? 10 : 40
8 width 2 parent.width / 3
9 height 2 parent.height - 20
10 focus 2 true
11 KeyNavigation.up 2 gridMenu
12 KeyNavigation.left 2 contextMenu
13 KeyNavigation.right 2 list2
14 model 2 10
15 cacheBuffer 2 200
16 delegate 2
17 ListViewDelegate 3
18 y 2
19 Behavior 3
20 NumberAnimation 4
21 duration 5 600
22 easing.type 5 Easing.OutQuint
23 ListView 1
24 id 2 list2
25 y 2 activeFocus ? 10 : 40
26 x 2 parseInt(parent.width / 3)
27 width 2 parent.width / 3
28 height 2 parent.height - 20
29 KeyNavigation.up 2 gridMenu
30 KeyNavigation.left 2 list1
31 KeyNavigation.right 2 list3
32 model 2 10
33 cacheBuffer 2 200
34 delegate 2
35 ListViewDelegate 3
36 y 2
37 Behavior 3
38 NumberAnimation 4
39 duration 5 600
40 easing.type 5 Easing.OutQuint
41 ListView 1
42 id 2 list3
43 y 2 activeFocus ? 10 : 40
44 x 2 parseInt(2 * parent.width / 3)
45 width 2 parent.width / 3
46 height 2 parent.height - 20
47 KeyNavigation.up 2 gridMenu
48 KeyNavigation.left 2 list2
49 model 2 10
50 cacheBuffer 2 200
51 delegate 2
52 ListViewDelegate 3
53 y 2
54 Behavior 3
55 NumberAnimation 4
56 duration 5 600
57 easing.type 5 Easing.OutQuint
58 Rectangle 1
59 width 2 parent.width
60 height 2 1
61 color 2 "#D1DBBD"
62 Rectangle 1
63 y 2 1
64 width 2 parent.width
65 height 2 10
66 gradient 2
67 Gradient 3
68 GradientStop 4
69 position 5 0.0
70 color 5 "#3E606F"
71 GradientStop 4
72 position 5 1.0
73 color 5 "transparent"
74 Rectangle 1
75 y 2 parent.height - 10
76 width 2 parent.width
77 height 2 10
78 gradient 2
79 Gradient 3
80 GradientStop 4
81 position 5 1.0
82 color 5 "#3E606F"
83 GradientStop 4
84 position 5 0.0
85 color 5 "transparent"
@@ -0,0 +1,81 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """#3E606F"""
"Text" "1" ""
"id" "2" "addedText"
"text" "2" """Squish QML outline test"""
"color" "2" """darkcyan"""
"font.bold" "2" "true"
"anchors.centerIn" "2" "parent"
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """black"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "90"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "#3E606F"
7 Text 1
8 id 2 addedText
9 text 2 "Squish QML outline test"
10 color 2 "darkcyan"
11 font.bold 2 true
12 anchors.centerIn 2 parent
13 FocusScope 1
14 id 2 mainView
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 GridMenu 2
19 id 3 gridMenu
20 width 3 parent.width
21 height 3 320
22 focus 3 true
23 interactive 3 parent.activeFocus
24 ListMenu 2
25 id 3 listMenu
26 y 3 320
27 width 3 parent.width
28 height 3 320
29 Rectangle 2
30 id 3 shade
31 anchors.fill 3 parent
32 color 3 "black"
33 opacity 3 0
34 states 2
35 State 3
36 name 4 "showListViews"
37 PropertyChanges 4
38 target 5 gridMenu
39 y 5 -160
40 PropertyChanges 4
41 target 5 listMenu
42 y 5 160
43 transitions 2
44 Transition 3
45 NumberAnimation 4
46 properties 5 "y"
47 duration 5 600
48 easing.type 5 Easing.OutQuint
49 Image 1
50 source 2 "Core/images/arrow.png"
51 rotation 2 90
52 anchors.verticalCenter 2 parent.verticalCenter
53 MouseArea 2
54 anchors.fill 3 parent
55 anchors.margins 3 -10
56 onClicked 3 contextMenu.focus = true
57 ContextMenu 1
58 id 2 contextMenu
59 x 2 -265
60 width 2 260
61 height 2 parent.height
62 states 1
63 State 2
64 name 3 "contextMenuOpen"
65 when 3 !mainView.activeFocus
66 PropertyChanges 3
67 target 4 contextMenu
68 x 4 0
69 open 4 true
70 PropertyChanges 3
71 target 4 mainView
72 x 4 130
73 PropertyChanges 3
74 target 4 shade
75 opacity 4 0.25
76 transitions 1
77 Transition 2
78 NumberAnimation 3
79 properties 4 "x,opacity"
80 duration 4 600
81 easing.type 4 Easing.OutQuint
@@ -0,0 +1,81 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """white"""
"Text" "1" ""
"id" "2" "addedText"
"text" "2" """Squish QML outline test"""
"color" "2" """darkcyan"""
"font.bold" "2" "true"
"anchors.centerIn" "2" "parent"
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """#cc00bb"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "180"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "white"
7 Text 1
8 id 2 addedText
9 text 2 "Squish QML outline test"
10 color 2 "darkcyan"
11 font.bold 2 true
12 anchors.centerIn 2 parent
13 FocusScope 1
14 id 2 mainView
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 GridMenu 2
19 id 3 gridMenu
20 width 3 parent.width
21 height 3 320
22 focus 3 true
23 interactive 3 parent.activeFocus
24 ListMenu 2
25 id 3 listMenu
26 y 3 320
27 width 3 parent.width
28 height 3 320
29 Rectangle 2
30 id 3 shade
31 anchors.fill 3 parent
32 color 3 "#cc00bb"
33 opacity 3 0
34 states 2
35 State 3
36 name 4 "showListViews"
37 PropertyChanges 4
38 target 5 gridMenu
39 y 5 -160
40 PropertyChanges 4
41 target 5 listMenu
42 y 5 160
43 transitions 2
44 Transition 3
45 NumberAnimation 4
46 properties 5 "y"
47 duration 5 600
48 easing.type 5 Easing.OutQuint
49 Image 1
50 source 2 "Core/images/arrow.png"
51 rotation 2 180
52 anchors.verticalCenter 2 parent.verticalCenter
53 MouseArea 2
54 anchors.fill 3 parent
55 anchors.margins 3 -10
56 onClicked 3 contextMenu.focus = true
57 ContextMenu 1
58 id 2 contextMenu
59 x 2 -265
60 width 2 260
61 height 2 parent.height
62 states 1
63 State 2
64 name 3 "contextMenuOpen"
65 when 3 !mainView.activeFocus
66 PropertyChanges 3
67 target 4 contextMenu
68 x 4 0
69 open 4 true
70 PropertyChanges 3
71 target 4 mainView
72 x 4 130
73 PropertyChanges 3
74 target 4 shade
75 opacity 4 0.25
76 transitions 1
77 Transition 2
78 NumberAnimation 3
79 properties 4 "x,opacity"
80 duration 4 600
81 easing.type 4 Easing.OutQuint
@@ -0,0 +1,84 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"txtCnt" "1" """Property"""
"clicked" "1" ""
"clicked" "1" ""
"width" "1" "800"
"height" "1" "480"
"color" "1" """white"""
"Text" "1" ""
"id" "2" "addedText"
"text" "2" """Squish QML outline test"""
"color" "2" """darkcyan"""
"font.bold" "2" "true"
"anchors.centerIn" "2" "parent"
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """#cc00bb"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "180"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" ""
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 txtCnt 1 "Property"
5 clicked 1
6 clicked 1
7 width 1 800
8 height 1 480
9 color 1 "white"
10 Text 1
11 id 2 addedText
12 text 2 "Squish QML outline test"
13 color 2 "darkcyan"
14 font.bold 2 true
15 anchors.centerIn 2 parent
16 FocusScope 1
17 id 2 mainView
18 width 2 parent.width
19 height 2 parent.height
20 focus 2 true
21 GridMenu 2
22 id 3 gridMenu
23 width 3 parent.width
24 height 3 320
25 focus 3 true
26 interactive 3 parent.activeFocus
27 ListMenu 2
28 id 3 listMenu
29 y 3 320
30 width 3 parent.width
31 height 3 320
32 Rectangle 2
33 id 3 shade
34 anchors.fill 3 parent
35 color 3 "#cc00bb"
36 opacity 3 0
37 states 2
38 State 3
39 name 4 "showListViews"
40 PropertyChanges 4
41 target 5 gridMenu
42 y 5 -160
43 PropertyChanges 4
44 target 5 listMenu
45 y 5 160
46 transitions 2
47 Transition 3
48 NumberAnimation 4
49 properties 5 "y"
50 duration 5 600
51 easing.type 5 Easing.OutQuint
52 Image 1
53 source 2 "Core/images/arrow.png"
54 rotation 2 180
55 anchors.verticalCenter 2 parent.verticalCenter
56 MouseArea 2
57 anchors.fill 3 parent
58 anchors.margins 3 -10
59 onClicked 3
60 ContextMenu 1
61 id 2 contextMenu
62 x 2 -265
63 width 2 260
64 height 2 parent.height
65 states 1
66 State 2
67 name 3 "contextMenuOpen"
68 when 3 !mainView.activeFocus
69 PropertyChanges 3
70 target 4 contextMenu
71 x 4 0
72 open 4 true
73 PropertyChanges 3
74 target 4 mainView
75 x 4 130
76 PropertyChanges 3
77 target 4 shade
78 opacity 4 0.25
79 transitions 1
80 Transition 2
81 NumberAnimation 3
82 properties 4 "x,opacity"
83 duration 4 600
84 easing.type 4 Easing.OutQuint
@@ -0,0 +1,75 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """#3E606F"""
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """black"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "90"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "#3E606F"
7 FocusScope 1
8 id 2 mainView
9 width 2 parent.width
10 height 2 parent.height
11 focus 2 true
12 GridMenu 2
13 id 3 gridMenu
14 width 3 parent.width
15 height 3 320
16 focus 3 true
17 interactive 3 parent.activeFocus
18 ListMenu 2
19 id 3 listMenu
20 y 3 320
21 width 3 parent.width
22 height 3 320
23 Rectangle 2
24 id 3 shade
25 anchors.fill 3 parent
26 color 3 "black"
27 opacity 3 0
28 states 2
29 State 3
30 name 4 "showListViews"
31 PropertyChanges 4
32 target 5 gridMenu
33 y 5 -160
34 PropertyChanges 4
35 target 5 listMenu
36 y 5 160
37 transitions 2
38 Transition 3
39 NumberAnimation 4
40 properties 5 "y"
41 duration 5 600
42 easing.type 5 Easing.OutQuint
43 Image 1
44 source 2 "Core/images/arrow.png"
45 rotation 2 90
46 anchors.verticalCenter 2 parent.verticalCenter
47 MouseArea 2
48 anchors.fill 3 parent
49 anchors.margins 3 -10
50 onClicked 3 contextMenu.focus = true
51 ContextMenu 1
52 id 2 contextMenu
53 x 2 -265
54 width 2 260
55 height 2 parent.height
56 states 1
57 State 2
58 name 3 "contextMenuOpen"
59 when 3 !mainView.activeFocus
60 PropertyChanges 3
61 target 4 contextMenu
62 x 4 0
63 open 4 true
64 PropertyChanges 3
65 target 4 mainView
66 x 4 130
67 PropertyChanges 3
68 target 4 shade
69 opacity 4 0.25
70 transitions 1
71 Transition 2
72 NumberAnimation 3
73 properties 4 "x,opacity"
74 duration 4 600
75 easing.type 4 Easing.OutQuint
@@ -4,7 +4,8 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
checkedTargets, projectName = createNewQtQuickApplication(workingDir,
targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")
@@ -8,7 +8,9 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickApplication(workingDir, None, os.path.join(prepareTemplate(sourceExample), qmlFile))
checkedTargets, projectName = createNewQtQuickApplication(workingDir, None,
os.path.join(prepareTemplate(sourceExample), qmlFile),
QtQuickConstants.Targets.DESKTOP_474_GCC)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")