Commit 6b0e1bc5 authored by Orgad Shaneh's avatar Orgad Shaneh
Browse files

Merge remote-tracking branch 'origin/4.3' into master

Change-Id: I83af635dcac98e4fd78b21d8dd9dc3a27a4fdf94
parents 1d921ae0 98c35d6c
......@@ -65,11 +65,11 @@
on the remote device. Additional files can be deployed by adding them to
further targets and adding those to \c INSTALLS as well.
\section1 Deploying on Embedded Linux
\section1 Generic Deployment Steps
\image qtcreator-embedded-linux-deployment-details.png "Deploy to embedded Linux"
When you run the application on the \uicontrol {Embedded Linux} device, \QC
When you run the application on the device, \QC
deploys the application as specified by the deploy steps. By default, \QC
copies the application files to the device by using the SSH file transfer
protocol (SFTP), as specified by the \uicontrol {Upload files via SFTP}
......@@ -101,6 +101,45 @@
support will crash when an SFTP upload is being attempted. This is not a bug
in \QC.
\section1 Qt for Device Creation Deployment Steps
The deployment steps depend on the Qt for Device Creation version specified
in the kit.
\section2 Developing with Qt 5.8 or Earlier
The generic deployment steps are not available when developing with Qt for
Device Creation version 5.8 or earlier.
\image qtcreator-deployment-steps-b2qt-58.png
By default, \QC pushes the files to the device incrementally over an ADB
connection. When developing on Windows, executable permissions are set for
executable files after they are deployed to the device.
To execute custom commands, select \uicontrol {Add Deploy Step} >
\uicontrol {Custom Remote Command (via adb shell)} and enter the command to
execute.
\note You can add custom commands also as \l{Build Steps}{build steps}, to
have them executed when the application is built.
To have your application launch on boot, select \uicontrol {Add Deploy Step}
> \uicontrol {Make this application the default one}.
\section2 Developing with Qt 5.9 or Later
When developing with Qt for Device Creation version 5.9 or later, you can
specify the deployment steps described in this section in addition to the
generic deployment steps.
To execute custom commands when the application is deployed to the device,
select \uicontrol {Add Deploy Step} > \uicontrol {Run Custom Remote Command}
and enter the command to execute.
To have your application launch on boot, select \uicontrol {Add Deploy Step}
> \uicontrol {Change Default Application}.
\include creator-projects-cmake-deploying.qdocinc cmake deploying embedded
*/
......@@ -37,14 +37,11 @@
\l{http://doc.qt.io/QtForDeviceCreation/index.html}{Qt for Device Creation}
documentation.
When you run the application, \QC copies the files to the connected device.
The run settings display the path to the executable file on the development
host and on the device.
To execute custom commands, select \uicontrol {Add Deploy Step} >
\uicontrol {Custom Remote Command (via adb shell)} and enter the command to
execute.
For more information on the deployment steps, see
\l{Deploying Applications to Embedded Linux Devices}.
//! [run settings embedded]
*/
......@@ -93,6 +93,18 @@
\uicontrol Application > \uicontrol {Qt Quick Application} >
\uicontrol Choose.
\li In the \uicontrol Name field, enter a name for the application.
\li In the \uicontrol {Create in} field, enter the path for the project
files, and then select \uicontrol Next (or \uicontrol Continue on
\macos).
\li In the \uicontrol {Build system} field, select the build system to
use for building and running the project: \l qmake,
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
\li Select \uicontrol Next.
\li Select the Qt version to
develop with in the \uicontrol {Minimal required Qt version} field.
The Qt version determines the Qt Quick imports that are used in the
......@@ -104,7 +116,7 @@
with the UI forms for \QD, it is recommended that you use \QMLD to
edit the UI forms. For more information, see \l{Qt Quick UI Forms}.
\li Select \uicontrol Next (or \uicontrol Continue on \macos).
\li Select \uicontrol Next.
\li Select \l{glossary-buildandrun-kit}{kits} for running and building
your project, and then click \uicontrol Next.
......
......@@ -461,7 +461,7 @@ class Dumper(DumperBase):
val = self.fromNativeValue(nativeMember)
nativeFieldType = nativeField.type.unqualified()
if nativeField.bitsize:
val.lvalue = str(int(nativeMember))
val.lvalue = int(nativeMember)
val.laddress = None
val.type = self.createBitfieldType(str(nativeFieldType), nativeField.bitsize)
val.isBaseClass = nativeField.is_base_class
......@@ -515,7 +515,7 @@ class Dumper(DumperBase):
if hasattr(nativeField, 'bitpos'):
bitpos = nativeField.bitpos
else:
bitpos = None
bitpos = 0
if hasattr(nativeField, 'bitsize') and nativeField.bitsize != 0:
bitsize = nativeField.bitsize
......
......@@ -12,12 +12,20 @@
"Qt.labs.templates 1.0",
"Qt.labs.folderlistmodel 2.0",
"Qt.labs.folderlistmodel 2.1",
"Qt.labs.folderlistmodel 2.2",
"Qt.labs.settings 1.0",
"Qt.labs.platform 1.0",
"Qt.WebSockets 1.0",
"QtAudioEngine 1.0",
"QtBluetooth 5.0",
"QtBluetooth 5.2",
"QtBluetooth 5.3",
"QtBluetooth 5.4",
"QtBluetooth 5.5",
"QtBluetooth 5.6",
"QtBluetooth 5.7",
"QtBluetooth 5.8",
"QtBluetooth 5.9",
"QtDataVisualization 1.0",
"QtGraphicalEffects 1.0",
"QtMultimedia 5.0",
......@@ -25,18 +33,39 @@
"QtMultimedia 5.3",
"QtMultimedia 5.4",
"QtMultimedia 5.5",
"QtMultimedia 5.6",
"QtMultimedia 5.7",
"QtMultimedia 5.8",
"QtMultimedia 5.9",
"QtNfc 5.0",
"QtNfc 5.2",
"QtNfc 5.3",
"QtNfc 5.4",
"QtNfc 5.5",
"QtNfc 5.6",
"QtNfc 5.7",
"QtNfc 5.8",
"QtNfc 5.9",
"QtPositioning 5.0",
"QtPositioning 5.2",
"QtPositioning 5.3",
"QtPositioning 5.4",
"QtPositioning 5.5",
"QtPositioning 5.6",
"QtPositioning 5.7",
"QtPositioning 5.8",
"QtLocation 5.3",
"QtLocation 5.5",
"QtLocation 5.6",
"QtLocation 5.8",
"QtLocation 5.9",
"QtPurchasing 1.0",
"QtQml 2.0",
"QtQml 2.1",
"QtQml 2.2",
"QtQml.Models 2.1",
"QtQml.Models 2.2",
"QtQml.Models 2.3",
"QtQuick.Controls 1.0",
"QtQuick.Controls 1.1",
"QtQuick.Controls 1.2",
......@@ -44,10 +73,13 @@
"QtQuick.Controls 1.4",
"QtQuick.Controls 2.0",
"QtQuick.Controls 2.1",
"QtQuick.Controls 2.2",
"QtQuick.Controls.Material 2.0",
"QtQuick.Controls.Material 2.1",
"QtQuick.Controls.Material 2.2",
"QtQuick.Controls.Universal 2.0",
"QtQuick.Controls.Universal 2.1",
"QtQuick.Controls.Universal 2.2",
"QtQuick.Controls.Styles 1.0",
"QtQuick.Controls.Styles 1.1",
"QtQuick.Controls.Styles 1.2",
......@@ -59,19 +91,38 @@
"QtQuick.Enterprise.Controls 1.1",
"QtQuick.Layouts 1.0",
"QtQuick.Layouts 1.1",
"QtQuick.Layouts 1.2",
"QtQuick.Layouts 1.3",
"QtQuick.LocalStorage 2.0",
"QtQuick.Particles 2.0",
"QtQuick.Templates 2.0",
"QtQuick.Templates 2.1",
"QtQuick.Templates 2.2",
"QtQuick.Window 2.0",
"QtQuick.Window 2.1",
"QtQuick.Window 2.2",
"QtQuick.Window 2.3",
"QtQuick.XmlListModel 2.0",
"QtSensors 5.0",
"QtSensors 5.1",
"QtSensors 5.2",
"QtSensors 5.3",
"QtSensors 5.4",
"QtSensors 5.5",
"QtSensors 5.6",
"QtSensors 5.7",
"QtSensors 5.8",
"QtSensors 5.9",
"QtQuick 2.0",
"QtQuick 2.1",
"QtQuick 2.2",
"QtQuick 2.3",
"QtQuick 2.4",
"QtQuick 2.5",
"QtQuick 2.6",
"QtQuick 2.7",
"QtQuick 2.8",
"QtQuick 2.9",
"QtTest 1.0",
"QtWebKit 3.0",
"Enginio 1.0"
......
......@@ -161,7 +161,7 @@ QList<GdbServerProviderFactory *> GdbServerProviderManager::factories()
GdbServerProvider *GdbServerProviderManager::findProvider(const QString &id)
{
if (id.isEmpty())
if (id.isEmpty() || !m_instance)
return 0;
return Utils::findOrDefault(m_instance->m_providers, Utils::equal(&GdbServerProvider::id, id));
......
......@@ -2278,7 +2278,7 @@ void WatchModel::showEditValue(const WatchItem *item)
str = QString::fromUtf8(ba.constData(), ba.size());
else if (format == DisplayUtf16String)
str = QString::fromUtf16((ushort *)ba.constData(), ba.size() / 2);
else if (format == DisplayUtf16String)
else if (format == DisplayUcs4String)
str = QString::fromUcs4((uint *)ba.constData(), ba.size() / 4);
m_separatedView->prepareObject<TextEdit>(item)->setPlainText(str);
} else if (format == DisplayPlotData) {
......
......@@ -302,7 +302,7 @@ void GerritPlugin::updateActions(const VcsBase::VcsBasePluginState &state)
const bool hasTopLevel = state.hasTopLevel();
m_gerritCommand->action()->setEnabled(hasTopLevel);
m_pushToGerritCommand->action()->setEnabled(hasTopLevel);
if (m_dialog)
if (m_dialog && m_dialog->isVisible())
m_dialog->setCurrentPath(state.topLevel());
}
......
......@@ -266,7 +266,7 @@ QList<float> LocalHelpManager::lastShownPagesZoom()
void LocalHelpManager::setLastShownPagesZoom(const QList<qreal> &zoom)
{
const QStringList stringValues = Utils::transform(zoom,
[](float z) { return QString::number(z); });
[](qreal z) { return QString::number(z); });
Core::ICore::settings()->setValue(kLastShownPagesZoomKey,
stringValues.join(Constants::ListSeparator));
}
......
......@@ -251,7 +251,8 @@ Utils::FileName AbstractMsvcToolChain::compilerCommand() const
Utils::FileName clexe = env.searchInPath(QLatin1String("cl.exe"), QStringList(), [](const QString &name) {
QDir dir(QDir::cleanPath(QFileInfo(name).absolutePath() + QStringLiteral("/..")));
do {
if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat"))))
if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat")))
|| QFile::exists(dir.absolutePath() + "/Auxiliary/Build/vcvarsall.bat"))
return true;
} while (dir.cdUp() && !dir.isRoot());
return false;
......
......@@ -180,6 +180,8 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
if (qtEnv.qtConfigItems.contains(buildVariant))
qtEnv.buildVariant << buildVariant;
}
qtEnv.qmlPath = qt->qmakeProperty("QT_INSTALL_QML");
qtEnv.qmlImportPath = qt->qmakeProperty("QT_INSTALL_IMPORTS");
const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv);
if (errorInfo.hasError()) {
Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1")
......
......@@ -77,6 +77,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
Project *project) const
{
ModelManagerInterface::ProjectInfo projectInfo(project);
projectInfo.qmlDumpEnvironment = Utils::Environment::systemEnvironment();
Target *activeTarget = nullptr;
if (project) {
const QSet<QString> qmlTypeNames = { Constants::QML_MIMETYPE ,Constants::QBS_MIMETYPE,
......
......@@ -285,6 +285,8 @@ void CodeAssistantPrivate::displayProposal(IAssistProposal *newProposal, AssistR
if (!newProposal)
return;
// TODO: The proposal should own the model until someone takes it explicitly away.
QScopedPointer<IAssistProposalModel> proposalCandidateModel(newProposal->model());
QScopedPointer<IAssistProposal> proposalCandidate(newProposal);
bool destroyCurrentContext = false;
......@@ -336,7 +338,7 @@ void CodeAssistantPrivate::displayProposal(IAssistProposal *newProposal, AssistR
m_proposalWidget->setReason(reason);
m_proposalWidget->setKind(m_assistKind);
m_proposalWidget->setUnderlyingWidget(m_editorWidget);
m_proposalWidget->setModel(m_proposal->model());
m_proposalWidget->setModel(proposalCandidateModel.take());
m_proposalWidget->setDisplayRect(m_editorWidget->cursorRect(basePosition));
m_proposalWidget->setIsSynchronized(!m_receivedContentWhileWaiting);
m_proposalWidget->showProposal(prefix);
......
Subproject commit 7687d8a145d1b00f855b306f9f364830f8dec8c5
Subproject commit 7ccc08f33153cd3093081567ac653e371759d69a
......@@ -17,7 +17,7 @@ Fourth - you'll have to provide some additional repositories (and for the hookin
These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on).
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
This folder must contain the following:
* a QtCreator repository (or source copy) of tag v4.1.0-beta1 named 'creator' including the submodule src/shared/qbs
* a QtCreator repository (or source copy) of tag v4.2.2 named 'creator' including the submodule src/shared/qbs
* a subfolder called 'creator-test-data'
* a speedcrunch 0.11 repository (or source copy) inside 'creator-test-data' named 'speedcrunch'
* additional Squish versions for hooking into subprocesses inside different folders inside 'creator-test-data' following the information below
......
......@@ -6,12 +6,12 @@
<variable>DebuggerItem.0</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="Abis">
<value type="QString">x86-windows-msvc2015-pe-64bit</value>
<value type="QString">x86-windows-msvc2015-pe-SQUISH_DEBUGGER_BITNESSbit</value>
</valuelist>
<value type="bool" key="AutoDetected">true</value>
<value type="QString" key="AutoDetectionSource"></value>
<value type="QString" key="Binary">C:/Program Files (x86)/Windows Kits/10/Debuggers/x64/cdb.exe</value>
<value type="QString" key="DisplayName">Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe</value>
<value type="QString" key="Binary">C:/Program Files (x86)/Windows Kits/10/Debuggers/SQUISH_DEBUGGER_ARCHITECTURE/cdb.exe</value>
<value type="QString" key="DisplayName">Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\SQUISH_DEBUGGER_ARCHITECTURE\cdb.exe</value>
<value type="int" key="EngineType">4</value>
<value type="QString" key="Id">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
<value type="QDateTime" key="LastModified"></value>
......
......@@ -186,6 +186,30 @@ def substituteDefaultCompiler(settingsDir):
__substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler)
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
def substituteCdb(settingsDir):
def canUse32bitCdb():
try:
serverIni = readFile(os.path.join(os.getenv("APPDATA"), "froglogic",
"Squish", "ver1", "server.ini"))
autLine = filter(lambda line: "AUT/qtcreator" in line, serverIni.splitlines())[0]
autPath = autLine.split("\"")[1]
return os.path.exists(os.path.join(autPath, "..", "lib", "qtcreatorcdbext32"))
except:
test.fatal("Something went wrong when determining debugger bitness",
"Did Squish's file structure change? Guessing 32-bit cdb can be used...")
return True
if canUse32bitCdb():
architecture = "x86"
bitness = "32"
else:
architecture = "x64"
bitness = "64"
debuggers = os.path.join(settingsDir, "QtProject", 'qtcreator', 'debuggers.xml')
__substitute__(debuggers, "SQUISH_DEBUGGER_ARCHITECTURE", architecture)
__substitute__(debuggers, "SQUISH_DEBUGGER_BITNESS", bitness)
test.log("Injected architecture '%s' and bitness '%s' in cdb path..." % (architecture, bitness))
def __guessABI__(supportedABIs, use64Bit):
if platform.system() == 'Linux':
supportedABIs = filter(lambda x: 'linux' in x, supportedABIs)
......@@ -277,6 +301,8 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
if platform.system() in ('Linux', 'Darwin'):
substituteTildeWithinToolchains(tmpSettingsDir)
substituteDefaultCompiler(tmpSettingsDir)
elif platform.system() in ('Windows', 'Microsoft'):
substituteCdb(tmpSettingsDir)
substituteUnchosenTargetABIs(tmpSettingsDir)
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
......
......@@ -28,6 +28,23 @@ source("../../shared/qtcreator.py")
SpeedCrunchPath = ""
BuildPath = tempDir()
def cmakeSupportsServerMode():
versionLines = filter(lambda line: "cmake version " in line,
getOutputFromCmdline(["cmake", "--version"]).splitlines())
try:
test.log("Using " + versionLines[0])
matcher = re.match("cmake version (\d+)\.(\d+)\.\d+", versionLines[0])
major = __builtin__.int(matcher.group(1))
minor = __builtin__.int(matcher.group(2))
except:
return False
if major < 3:
return False
elif major > 3:
return True
else:
return minor >= 7
def main():
if (which("cmake") == None):
test.fatal("cmake not found in PATH - needed to run this test")
......@@ -47,13 +64,16 @@ def main():
naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='%s' type='QModelIndex'}"
compareProjectTree(naviTreeView % "speedcrunch( \[\S+\])?", "projecttree_speedcrunch.tsv")
# Invoke a rebuild of the application
invokeMenuItem("Build", "Rebuild All")
if not cmakeSupportsServerMode() and JIRA.isBugStillOpen(18290):
test.xfail("Building with cmake in Tealeafreader mode may fail", "QTCREATORBUG-18290")
else:
# Invoke a rebuild of the application
invokeMenuItem("Build", "Rebuild All")
# Wait for, and test if the build succeeded
waitForCompile(300000)
checkCompile()
checkLastBuild()
# Wait for, and test if the build succeeded
waitForCompile(300000)
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Exit")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment