forked from qt-creator/qt-creator
Target dialog: Set a tooltip containing Qt version info.
Introduce verbose flag and display QtVersion tooltip on checkbox. Reviewed-by: dt
This commit is contained in:
@@ -593,6 +593,8 @@ void Qt4DefaultTargetSetupWidget::createImportWidget(const BuildConfigurationInf
|
||||
QCheckBox *checkBox = new QCheckBox;
|
||||
checkBox->setText(tr("Import build from %1").arg(info.directory));
|
||||
checkBox->setChecked(m_importEnabled.at(pos));
|
||||
if (info.version)
|
||||
checkBox->setToolTip(info.version->toHtml(false));
|
||||
m_importLayout->addWidget(checkBox, pos, 0, 1, 2);
|
||||
|
||||
connect(checkBox, SIGNAL(toggled(bool)),
|
||||
@@ -611,6 +613,8 @@ void Qt4DefaultTargetSetupWidget::setupWidgets()
|
||||
QCheckBox *checkbox = new QCheckBox;
|
||||
checkbox->setText(displayNameFrom(info));
|
||||
checkbox->setChecked(m_enabled.at(i));
|
||||
if (info.version)
|
||||
checkbox->setToolTip(info.version->toHtml(false));
|
||||
m_newBuildsLayout->addWidget(checkbox, i * 2, 0);
|
||||
|
||||
Utils::PathChooser *pathChooser = new Utils::PathChooser();
|
||||
|
||||
@@ -230,7 +230,7 @@ bool QtOptionsPageWidget::eventFilter(QObject *o, QEvent *e)
|
||||
const int index = indexForTreeItem(item);
|
||||
if (index == -1)
|
||||
return false;
|
||||
const QString tooltip = m_versions.at(index)->toHtml();
|
||||
const QString tooltip = m_versions.at(index)->toHtml(true);
|
||||
QToolTip::showText(helpEvent->globalPos(), tooltip, m_ui->qtdirList);
|
||||
helpEvent->accept();
|
||||
return true;
|
||||
|
||||
@@ -698,7 +698,7 @@ QtVersion::~QtVersion()
|
||||
{
|
||||
}
|
||||
|
||||
QString QtVersion::toHtml() const
|
||||
QString QtVersion::toHtml(bool verbose) const
|
||||
{
|
||||
QString rc;
|
||||
QTextStream str(&rc);
|
||||
@@ -729,6 +729,7 @@ QString QtVersion::toHtml() const
|
||||
} // default config.
|
||||
str << "<tr><td><b>" << QtVersionManager::tr("Version:")
|
||||
<< "</b></td><td>" << qtVersionString() << "</td></tr>";
|
||||
if (verbose) {
|
||||
const QHash<QString,QString> vInfo = versionInfo();
|
||||
if (!vInfo.isEmpty()) {
|
||||
const QHash<QString,QString>::const_iterator vcend = vInfo.constEnd();
|
||||
@@ -736,6 +737,7 @@ QString QtVersion::toHtml() const
|
||||
str << "<tr><td><pre>" << it.key() << "</pre></td><td>" << it.value() << "</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
str << "</table></body></html>";
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
Q_DECLARE_FLAGS(QmakeBuildConfigs, QmakeBuildConfig)
|
||||
|
||||
QmakeBuildConfigs defaultBuildConfig() const;
|
||||
QString toHtml() const;
|
||||
QString toHtml(bool verbose) const;
|
||||
|
||||
bool supportsShadowBuilds() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user