Improve description of "Link with Qt"

Make it clearer that this only affects that specific Qt Creator
installation.

Fixes: QTCREATORBUG-25500
Change-Id: Ia636e2f98b8042333ca12aaab0af58df42ba4727
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Eike Ziller
2021-03-23 11:45:13 +01:00
parent 9d2fab7c17
commit b71e673bf2

View File

@@ -821,7 +821,9 @@ static Utils::optional<QString> currentlyLinkedQtDir(bool *hasInstallSettings)
static QString linkingPurposeText() static QString linkingPurposeText()
{ {
return QtOptionsPageWidget::tr( return QtOptionsPageWidget::tr(
"Linking with a Qt installation automatically registers Qt versions and kits."); "Linking with a Qt installation automatically registers Qt versions and kits, and other "
"tools that were installed with that Qt installer, in this Qt Creator installation. Other "
"Qt Creator installations are not affected.");
} }
static bool canLinkWithQt(QString *toolTip) static bool canLinkWithQt(QString *toolTip)
@@ -961,7 +963,9 @@ void QtOptionsPageWidget::linkWithQt()
dialog.setWindowTitle(title); dialog.setWindowTitle(title);
auto layout = new QVBoxLayout; auto layout = new QVBoxLayout;
dialog.setLayout(layout); dialog.setLayout(layout);
layout->addWidget(new QLabel(linkingPurposeText())); auto tipLabel = new QLabel(linkingPurposeText());
tipLabel->setWordWrap(true);
layout->addWidget(tipLabel);
auto pathLayout = new QHBoxLayout; auto pathLayout = new QHBoxLayout;
layout->addLayout(pathLayout); layout->addLayout(pathLayout);
auto pathLabel = new QLabel(tr("Qt installation path:")); auto pathLabel = new QLabel(tr("Qt installation path:"));
@@ -983,6 +987,7 @@ void QtOptionsPageWidget::linkWithQt()
const Utils::optional<QString> currentLink = currentlyLinkedQtDir(nullptr); const Utils::optional<QString> currentLink = currentlyLinkedQtDir(nullptr);
pathInput->setPath(currentLink ? *currentLink : defaultQtInstallationPath()); pathInput->setPath(currentLink ? *currentLink : defaultQtInstallationPath());
auto buttons = new QDialogButtonBox; auto buttons = new QDialogButtonBox;
layout->addStretch(10);
layout->addWidget(buttons); layout->addWidget(buttons);
auto linkButton = buttons->addButton(tr("Link with Qt"), QDialogButtonBox::AcceptRole); auto linkButton = buttons->addButton(tr("Link with Qt"), QDialogButtonBox::AcceptRole);
connect(linkButton, &QPushButton::clicked, &dialog, &QDialog::accept); connect(linkButton, &QPushButton::clicked, &dialog, &QDialog::accept);