aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/studiowelcome/qml
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2020-09-21 12:58:35 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2021-01-18 22:08:14 +0000
commitcc7be5724ad9e25c03710a17ce50e09088497709 (patch)
treedeee0d0f76a2b30d0c49f4f9379d7c0bb9b7e98a /src/plugins/studiowelcome/qml
parent89ad72c78958bd3706ce9ca6461cec8487bb1441 (diff)
Add Crashpad to Qt Creator and Qt Design Studio
Fixes: QDS-2748 Change-Id: I87e25682f066d167eebfd7b78c46c166e5062e11 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome/qml')
-rw-r--r--src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml50
-rw-r--r--src/plugins/studiowelcome/qml/splashscreen/main.qml8
2 files changed, 52 insertions, 6 deletions
diff --git a/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml b/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml
index a41f600323..57c4cb5da3 100644
--- a/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml
+++ b/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml
@@ -38,10 +38,31 @@ Image {
signal goNext
signal closeClicked
+ signal configureClicked
property alias doNotShowAgain: do_not_show_checkBox.checked
property bool loadingPlugins: true
+ // called from C++
+ function onPluginInitialized(crashReportingEnabled: bool, crashReportingOn: bool)
+ {
+ loadingPlugins = false
+
+ if (crashReportingEnabled) {
+ var configureButton = "<a href='#' style='text-decoration:none;color:#ffff00'>"
+ + qsTr("[Configure]") + "</a>";
+ var settingPath = Qt.platform.os === "osx"
+ ? qsTr("Qt Creator > Preferences > Environment > System")
+ : qsTr("Tools > Options > Environment > System")
+ var strOn = qsTr("Qt Design Studio collects crash reports for the sole purpose of fixing bugs. "
+ + "You can disable this feature under %1. %2").arg(settingPath).arg(configureButton)
+ var strOff = qsTr("Qt Design Studio can collect crash reports for the sole purpose of fixing bugs. "
+ + "You can enable this feature under %1. %2").arg(settingPath).arg(configureButton)
+
+ crash_reporting_text.text = crashReportingOn ? strOn : strOff;
+ }
+ }
+
Image {
id: logo
x: 14
@@ -104,7 +125,7 @@ Image {
Text {
id: marketing_1
x: 16
- y: 302
+ y: 252
width: 355
height: 31
color: "#ffffff"
@@ -118,7 +139,7 @@ Image {
Text {
id: marketing_2
x: 16
- y: 323
+ y: 273
width: 311
height: 31
color: "#ffffff"
@@ -132,7 +153,7 @@ Image {
Text {
id: marketing_3
x: 16
- y: 344
+ y: 294
width: 311
height: 31
color: "#ffffff"
@@ -143,6 +164,26 @@ Image {
font.wordSpacing: 0
}
+ Text {
+ id: crash_reporting_text
+ color: "#ffffff"
+ textFormat: Text.RichText
+ x: 16
+ y: 330
+ width: 311
+ wrapMode: Text.WordWrap
+ font.family: StudioFonts.titilliumWeb_light
+ font.pixelSize: 12
+ font.wordSpacing: 0
+ onLinkActivated: welcome_splash.configureClicked()
+
+ MouseArea { // show hand cursor on link hover
+ anchors.fill: parent
+ acceptedButtons: Qt.NoButton // don't eat clicks on the Text
+ cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
+ }
+ }
+
Dof_Effect {
id: dof_Effect
x: 358
@@ -192,10 +233,9 @@ Image {
scale: 0.5
}
-
RowLayout {
x: 16
- y: 254
+ y: 330
visible: welcome_splash.loadingPlugins
diff --git a/src/plugins/studiowelcome/qml/splashscreen/main.qml b/src/plugins/studiowelcome/qml/splashscreen/main.qml
index be88704784..674bb47c9f 100644
--- a/src/plugins/studiowelcome/qml/splashscreen/main.qml
+++ b/src/plugins/studiowelcome/qml/splashscreen/main.qml
@@ -32,9 +32,14 @@ Item {
signal closeClicked
signal checkBoxToggled
+ signal configureClicked
property alias doNotShowAgain: welcome_splash.doNotShowAgain
- property alias loadingPlugins: welcome_splash.loadingPlugins
+
+ function onPluginInitialized(crashReportingEnabled: bool, crashReportingOn: bool)
+ {
+ welcome_splash.onPluginInitialized(crashReportingEnabled, crashReportingOn);
+ }
Welcome_splash {
id: welcome_splash
@@ -42,5 +47,6 @@ Item {
y: 0
antialiasing: true
onCloseClicked: root.closeClicked()
+ onConfigureClicked: root.configureClicked()
}
}