Commit f61e643c authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/3.0'

parents 0a570929 e4dd8e75
......@@ -175,10 +175,24 @@ Component.prototype.createOperations = function()
}
}
function isRoot()
{
if (installer.value("os") == "x11" || installer.value("os") == "mac")
{
var id = installer.execute("/usr/bin/id", new Array("-u"))[0];
id = id.replace(/(\r\n|\n|\r)/gm,"");
if (id === "0")
{
return true;
}
}
return false;
}
Component.prototype.installationFinishedPageIsShown = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isRoot()) {
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
......@@ -189,7 +203,7 @@ Component.prototype.installationFinishedPageIsShown = function()
Component.prototype.installationFinished = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isRoot()) {
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
if (isLaunchQtCreatorCheckBoxChecked)
installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");
......
......@@ -363,13 +363,10 @@
\li Select an automatically created kit in the list, and then select
\gui Clone to create a copy of the kit.
\li In the \gui Debugger field, select \gui Edit to change the
automatically detected debugger to LLDB Engine.
\li In the \gui Engine field, select \gui {LLDB Engine}.
\li Select \gui Choose to set the path to the LLDB engine in the
\gui Binary field.
\li In the \gui Debugger field, select an LLDB Engine. If an LLDB Engine
is not listed, select \gui Manage to add it in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Debuggers. For more
information, see \l {Adding Debuggers}.
\li To use the debugger, add the kit in the \gui {Build Settings}
of the project.
......
......@@ -656,20 +656,6 @@
The \gui{Locals and Expressions} view also provides access to the most
powerful feature of the debugger: comprehensive display of data belonging
to Qt's basic objects.
To enable Qt's basic objects data display feature:
\list
\li Select \gui Tools > \gui {Options} > \gui Debugger >
\gui{Debugging Helper} and check the \gui{Use Debugging Helper}
checkbox.
\li The \gui{Locals and Expressions} view is reorganized to provide a
high-level view of the objects.
\endlist
For example, in case of QObject, instead of displaying a pointer to some
private data structure, you see a list of children, signals and slots.
......@@ -1183,18 +1169,6 @@
d.putSubItem("key", key)
d.putSubItem("value", value)
\endcode
\section1 Enabling Debugging Helpers for Qt's Bootstrapped Applications
Qt's bootstrapped applications (such as moc and qmake) are built in a way
that is incompatible with the default build of the debugging helpers. To
work around this, add \c{dumper.cpp} to the compiled sources in the
application Makefile.
Choose \gui {Tools > Options > Debugger > Debugging Helper > Use debugging
helper from custom location}, and specify an invalid location, such as
\c{/dev/null}.
*/
......
......@@ -1589,7 +1589,7 @@ class Dumper(DumperBase):
result += ']'
return result
def threadname(self, maximalStackDepth):
def threadname(self, maximalStackDepth, objectPrivateType):
e = gdb.selected_frame()
out = ""
ns = self.qtNamespace()
......@@ -1604,8 +1604,7 @@ class Dumper(DumperBase):
or e.name() == "_ZN14QThreadPrivate5startEPv@4":
try:
thrptr = e.read_var("thr").dereference()
obtype = self.lookupType(ns + "QObjectPrivate").pointer()
d_ptr = thrptr["d_ptr"]["d"].cast(obtype).dereference()
d_ptr = thrptr["d_ptr"]["d"].cast(objectPrivateType).dereference()
try:
objectName = d_ptr["objectName"]
except: # Qt 5
......@@ -1635,10 +1634,11 @@ class Dumper(DumperBase):
oldthread = gdb.selected_thread()
if oldthread:
try:
objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
inferior = self.selectedInferior()
for thread in inferior.threads():
thread.switch()
out += self.threadname(maximalStackDepth)
out += self.threadname(maximalStackDepth, objectPrivateType)
except:
pass
oldthread.switch()
......
......@@ -9,15 +9,6 @@ DEPLOYMENTFOLDERS = folder_01
# QML_IMPORT_PATH #
QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
# Speed up launching on MeeGo/Harmattan when using applauncherd daemon
# HARMATTAN_BOOSTABLE #
# CONFIG += qdeclarative-boostable
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
......@@ -27,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick1applicationviewer/qtquick1applicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qtquick1applicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()
......@@ -9,11 +9,6 @@ DEPLOYMENTFOLDERS = folder_01
# QML_IMPORT_PATH #
QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
......@@ -23,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()
......@@ -18,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick2controlsapplicationviewer/qtquick2controlsapplicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()
......@@ -2,5 +2,6 @@ import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
consoleApplication: true
files: "main.c"
}
......@@ -2,5 +2,6 @@ import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
consoleApplication: true
files: "main.cpp"
}
......@@ -33,9 +33,10 @@ import widgets 1.0
Rectangle {
id: rectangle1
width: 1024
height: Math.min(3024, parent.height - y)
height: grid.contentHeight + 100
CustomizedGridView {
id: grid
anchors.rightMargin: 38
anchors.bottomMargin: 60
anchors.leftMargin: 38
......
......@@ -33,9 +33,10 @@ import widgets 1.0
Rectangle {
id: rectangle1
width: 1024
height: Math.min(3024, parent.height - y)
height: grid.contentHeight + 100
CustomizedGridView {
id: grid
anchors.rightMargin: 38
anchors.bottomMargin: 60
anchors.leftMargin: 38
......
......@@ -29,43 +29,46 @@
import QtQuick 2.1
import widgets 1.0
import QtQuick.Controls 1.0
Rectangle {
width: 920
height: 600
color: "#edf0f2"
id: root
ScrollView {
id: scrollView
property var fonts: CustomFonts {}
property var colors: CustomColors { }
Rectangle {
width: Math.max(920, scrollView.flickableItem.width - 30)
height: Math.max(loader.height, scrollView.flickableItem.height);
SideBar {
id: sideBar
model: pagesModel
anchors.top: parent.top
anchors.bottom: parent.bottom
id: root
}
SideBar {
id: sideBar
model: pagesModel
anchors.top: parent.top
anchors.bottom: parent.bottom
Rectangle {
color: "#737373"
width: 1
height: parent.height
}
anchors.right: sideBar.right
}
Rectangle {
color: "#737373"
width: 1
height: parent.height
QtObject {
id: tab
property int currentIndex: sideBar.currentIndex
}
anchors.right: sideBar.right
}
PageLoader {
anchors.top: parent.top
model: pagesModel
anchors.bottom: parent.bottom
anchors.left: sideBar.right
anchors.right: parent.right
}
QtObject {
id: tab
property int currentIndex: sideBar.currentIndex
}
PageLoader {
id: loader
model: pagesModel
anchors.left: sideBar.right
anchors.right: parent.right
}
}
}
......@@ -30,33 +30,30 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
ScrollView {
GridView {
x: Math.max((width - (cellWidth * columns)) / 2, 0);
property alias model: gridView.model
GridView {
id: gridView
interactive: false
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
id: gridView
interactive: false
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
delegate: Delegate {
id: delegate
delegate: Delegate {
id: delegate
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
}
......@@ -34,10 +34,16 @@ Item {
property alias model: repeater.model
height: repeater.height
Repeater {
id: repeater
height: itemAt(tab.currentIndex).height
Loader {
anchors.fill: parent
id: loader
anchors.left: parent.left
anchors.right: parent.right
height: item.height
property bool active: index === tab.currentIndex
property bool wasActive
onActiveChanged: {
......
......@@ -35,7 +35,7 @@ Column {
spacing: 16
signal itemChanged
property int currentIndex: 0
property int currentIndex: -1
onCurrentIndexChanged: welcomeMode.activePlugin = currentIndex
Component.onCompleted: currentIndex = welcomeMode.activePlugin
......
......@@ -107,10 +107,8 @@ public:
~AnalyzerMode()
{
// Make sure the editor manager does not get deleted.
delete m_widget;
m_widget = 0;
EditorManager::instance()->setParent(0);
}
};
......
......@@ -248,6 +248,7 @@ void AndroidConfigurations::updateAvailableSdkPlatforms()
m_availableSdkPlatforms.clear();
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
if (!proc.waitForFinished(-1)) {
proc.terminate();
......@@ -283,6 +284,14 @@ FileName AndroidConfigurations::adbToolPath() const
return path.appendPath(QLatin1String("platform-tools/adb" QTC_HOST_EXE_SUFFIX));
}
Utils::Environment AndroidConfigurations::androidToolEnvironment() const
{
Utils::Environment env = Utils::Environment::systemEnvironment();
if (!m_config.openJDKLocation.isEmpty())
env.set(QLatin1String("JAVA_HOME"), m_config.openJDKLocation.toUserOutput());
return env;
}
FileName AndroidConfigurations::androidToolPath() const
{
if (HostOsInfo::isWindowsHost()) {
......@@ -524,6 +533,7 @@ QString AndroidConfigurations::createAVD(int minApiLevel, QString targetArch) co
QString AndroidConfigurations::createAVD(const QString &target, const QString &name, const QString &abi, int sdcardSize ) const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("create") << QLatin1String("avd")
<< QLatin1String("-t") << target
......@@ -565,6 +575,7 @@ QString AndroidConfigurations::createAVD(const QString &target, const QString &n
bool AndroidConfigurations::removeAVD(const QString &name) const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("delete") << QLatin1String("avd")
<< QLatin1String("-n") << name);
......@@ -579,6 +590,7 @@ QVector<AndroidDeviceInfo> AndroidConfigurations::androidVirtualDevices() const
{
QVector<AndroidDeviceInfo> devices;
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("list") << QLatin1String("avd")); // list available AVDs
if (!proc.waitForFinished(-1)) {
......@@ -715,7 +727,7 @@ bool AndroidConfigurations::isBootToQt(const QString &device) const
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(-1)) {
adbProc.kill();
return -1;
return false;
}
return adbProc.readAll().contains("Boot2Qt");
}
......
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