forked from qt-creator/qt-creator
Improve "Configure Project" target settings hint
Make "Configure Project" help text link to options dialog depend on the actual architecture instead of listing all possibilities. Also, make the link work. Task-number: QTCREATORBUG-7810 Change-Id: I78360cdc5b1a836b46dad5c31bdf7335d83e846e Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -139,7 +139,6 @@ FORMS += makestep.ui \
|
|||||||
qt4projectconfigwidget.ui \
|
qt4projectconfigwidget.ui \
|
||||||
librarydetailswidget.ui \
|
librarydetailswidget.ui \
|
||||||
wizards/testwizardpage.ui \
|
wizards/testwizardpage.ui \
|
||||||
wizards/targetsetuppage.ui \
|
|
||||||
wizards/html5appwizardsourcespage.ui \
|
wizards/html5appwizardsourcespage.ui \
|
||||||
wizards/mobilelibrarywizardoptionpage.ui \
|
wizards/mobilelibrarywizardoptionpage.ui \
|
||||||
wizards/mobileappwizardgenericoptionspage.ui \
|
wizards/mobileappwizardgenericoptionspage.ui \
|
||||||
|
@@ -137,7 +137,6 @@ QtcPlugin {
|
|||||||
"qt-desktop/simulatorqtversion.h",
|
"qt-desktop/simulatorqtversion.h",
|
||||||
"qt-desktop/simulatorqtversionfactory.cpp",
|
"qt-desktop/simulatorqtversionfactory.cpp",
|
||||||
"qt-desktop/simulatorqtversionfactory.h",
|
"qt-desktop/simulatorqtversionfactory.h",
|
||||||
"wizards/targetsetuppage.ui",
|
|
||||||
"wizards/testwizardpage.ui",
|
"wizards/testwizardpage.ui",
|
||||||
"wizards/wizards.qrc",
|
"wizards/wizards.qrc",
|
||||||
"wizards/abstractmobileapp.cpp",
|
"wizards/abstractmobileapp.cpp",
|
||||||
|
@@ -49,13 +49,103 @@
|
|||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QVariant>
|
||||||
|
#include <QAction>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QHeaderView>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QScrollArea>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
namespace Qt4ProjectManager {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
static const Core::Id QT_IS_TEMPORARY("Qt4PM.TempQt");
|
static const Core::Id QT_IS_TEMPORARY("Qt4PM.TempQt");
|
||||||
static const Core::Id PROFILE_IS_TEMPORARY("Qt4PM.TempProfile");
|
static const Core::Id PROFILE_IS_TEMPORARY("Qt4PM.TempProfile");
|
||||||
static const Core::Id TEMPORARY_OF_PROJECTS("Qt4PM.TempProject");
|
static const Core::Id TEMPORARY_OF_PROJECTS("Qt4PM.TempProject");
|
||||||
|
|
||||||
|
class TargetSetupPageUi
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QWidget *centralWidget;
|
||||||
|
QWidget *scrollAreaWidget;
|
||||||
|
QScrollArea *scrollArea;
|
||||||
|
QLabel *descriptionLabel;
|
||||||
|
|
||||||
|
void setupUi(QWidget *q)
|
||||||
|
{
|
||||||
|
QWidget *setupTargetPage = new QWidget(q);
|
||||||
|
|
||||||
|
descriptionLabel = new QLabel(setupTargetPage);
|
||||||
|
descriptionLabel->setWordWrap(true);
|
||||||
|
descriptionLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||||
|
descriptionLabel->setText(TargetSetupPage::tr("Qt Creator can set up the following targets:"));
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString hint = TargetSetupPage::tr(
|
||||||
|
"<html><head/><body><p><span style=\" font-weight:600;\">"
|
||||||
|
"No valid targets found.</span></p>"
|
||||||
|
"<p>Please add a target in <a href=\"buildandrun\"><span style=\" text-decoration: underline; color:#0000ff;\">"
|
||||||
|
"Qt Creator > Preferences > Build & Run</span></a>"
|
||||||
|
" or via the maintenance tool of the SDK.</p></body></html>");
|
||||||
|
#else
|
||||||
|
QString hint = TargetSetupPage::tr(
|
||||||
|
"<html><head/><body><p><span style=\" font-weight:600;\">"
|
||||||
|
"No valid targets found.</span></p>"
|
||||||
|
"<p>Please add a target in <a href=\"buildandrun\"><span style=\" text-decoration: underline; color:#0000ff;\">"
|
||||||
|
"Tools > Options > Build & Run</span></a>"
|
||||||
|
" or via the maintenance tool of the SDK.</p></body></html>");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QLabel *noValidProfileLabel = new QLabel(setupTargetPage);
|
||||||
|
noValidProfileLabel->setWordWrap(true);
|
||||||
|
noValidProfileLabel->setText(hint);
|
||||||
|
noValidProfileLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||||
|
|
||||||
|
centralWidget = new QWidget(setupTargetPage);
|
||||||
|
QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
|
policy.setHorizontalStretch(0);
|
||||||
|
policy.setVerticalStretch(0);
|
||||||
|
policy.setHeightForWidth(centralWidget->sizePolicy().hasHeightForWidth());
|
||||||
|
centralWidget->setSizePolicy(policy);
|
||||||
|
|
||||||
|
scrollAreaWidget = new QWidget(setupTargetPage);
|
||||||
|
scrollArea = new QScrollArea(scrollAreaWidget);
|
||||||
|
scrollArea->setWidgetResizable(true);
|
||||||
|
|
||||||
|
QWidget *scrollAreaWidgetContents;
|
||||||
|
scrollAreaWidgetContents = new QWidget();
|
||||||
|
scrollAreaWidgetContents->setGeometry(QRect(0, 0, 230, 81));
|
||||||
|
scrollArea->setWidget(scrollAreaWidgetContents);
|
||||||
|
|
||||||
|
QVBoxLayout *verticalLayout = new QVBoxLayout(scrollAreaWidget);
|
||||||
|
verticalLayout->setSpacing(0);
|
||||||
|
verticalLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
verticalLayout->addWidget(scrollArea);
|
||||||
|
|
||||||
|
QVBoxLayout *verticalLayout_2 = new QVBoxLayout(setupTargetPage);
|
||||||
|
verticalLayout_2->addWidget(descriptionLabel);
|
||||||
|
verticalLayout_2->addWidget(noValidProfileLabel);
|
||||||
|
verticalLayout_2->addWidget(centralWidget);
|
||||||
|
verticalLayout_2->addWidget(scrollAreaWidget);
|
||||||
|
|
||||||
|
QVBoxLayout *verticalLayout_3 = new QVBoxLayout(q);
|
||||||
|
verticalLayout_3->setContentsMargins(0, 0, 0, -1);
|
||||||
|
verticalLayout_3->addWidget(setupTargetPage);
|
||||||
|
|
||||||
|
QObject::connect(noValidProfileLabel, SIGNAL(linkActivated(QString)),
|
||||||
|
q, SIGNAL(noteTextLinkActivated()));
|
||||||
|
QObject::connect(descriptionLabel, SIGNAL(linkActivated(QString)),
|
||||||
|
q, SIGNAL(noteTextLinkActivated()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
|
|
||||||
|
using namespace Internal;
|
||||||
|
|
||||||
TargetSetupPage::TargetSetupPage(QWidget *parent) :
|
TargetSetupPage::TargetSetupPage(QWidget *parent) :
|
||||||
QWizardPage(parent),
|
QWizardPage(parent),
|
||||||
m_requiredMatcher(0),
|
m_requiredMatcher(0),
|
||||||
@@ -64,13 +154,20 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
|
|||||||
m_importSearch(false),
|
m_importSearch(false),
|
||||||
m_ignoreUpdates(false),
|
m_ignoreUpdates(false),
|
||||||
m_firstWidget(0),
|
m_firstWidget(0),
|
||||||
m_ui(new Internal::Ui::TargetSetupPage),
|
m_ui(new TargetSetupPageUi),
|
||||||
m_importWidget(new Internal::ImportWidget(this)),
|
m_importWidget(new Internal::ImportWidget(this)),
|
||||||
m_spacer(new QSpacerItem(0,0, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding))
|
m_spacer(new QSpacerItem(0,0, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding))
|
||||||
{
|
{
|
||||||
setObjectName(QLatin1String("TargetSetupPage"));
|
setObjectName(QLatin1String("TargetSetupPage"));
|
||||||
|
setWindowTitle(tr("Set up Targets for Your Project"));
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||||
|
policy.setHorizontalStretch(0);
|
||||||
|
policy.setVerticalStretch(0);
|
||||||
|
policy.setHeightForWidth(sizePolicy().hasHeightForWidth());
|
||||||
|
setSizePolicy(policy);
|
||||||
|
|
||||||
QWidget *centralWidget = new QWidget(this);
|
QWidget *centralWidget = new QWidget(this);
|
||||||
m_ui->scrollArea->setWidget(centralWidget);
|
m_ui->scrollArea->setWidget(centralWidget);
|
||||||
centralWidget->setLayout(new QVBoxLayout);
|
centralWidget->setLayout(new QVBoxLayout);
|
||||||
@@ -82,9 +179,6 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
|
|||||||
|
|
||||||
setTitle(tr("Target Setup"));
|
setTitle(tr("Target Setup"));
|
||||||
|
|
||||||
connect(m_ui->descriptionLabel, SIGNAL(linkActivated(QString)),
|
|
||||||
this, SIGNAL(noteTextLinkActivated()));
|
|
||||||
|
|
||||||
ProjectExplorer::ProfileManager *sm = ProjectExplorer::ProfileManager::instance();
|
ProjectExplorer::ProfileManager *sm = ProjectExplorer::ProfileManager::instance();
|
||||||
connect(sm, SIGNAL(profileAdded(ProjectExplorer::Profile*)),
|
connect(sm, SIGNAL(profileAdded(ProjectExplorer::Profile*)),
|
||||||
this, SLOT(handleProfileAddition(ProjectExplorer::Profile*)));
|
this, SLOT(handleProfileAddition(ProjectExplorer::Profile*)));
|
||||||
@@ -589,3 +683,5 @@ void TargetSetupPage::setUseScrollArea(bool b)
|
|||||||
m_ui->scrollAreaWidget->setVisible(b);
|
m_ui->scrollAreaWidget->setVisible(b);
|
||||||
m_ui->centralWidget->setVisible(!b);
|
m_ui->centralWidget->setVisible(!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Qt4ProjectManager
|
||||||
|
@@ -46,10 +46,7 @@ class Qt4Project;
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class ImportWidget;
|
class ImportWidget;
|
||||||
|
class TargetSetupPageUi;
|
||||||
namespace Ui {
|
|
||||||
class TargetSetupPage;
|
|
||||||
} // namespace Ui
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
/// \internal
|
/// \internal
|
||||||
@@ -122,7 +119,7 @@ private:
|
|||||||
QMap<Core::Id, Qt4TargetSetupWidget *> m_widgets;
|
QMap<Core::Id, Qt4TargetSetupWidget *> m_widgets;
|
||||||
Qt4TargetSetupWidget *m_firstWidget;
|
Qt4TargetSetupWidget *m_firstWidget;
|
||||||
|
|
||||||
Internal::Ui::TargetSetupPage *m_ui;
|
Internal::TargetSetupPageUi *m_ui;
|
||||||
|
|
||||||
Internal::ImportWidget *m_importWidget;
|
Internal::ImportWidget *m_importWidget;
|
||||||
QSpacerItem *m_spacer;
|
QSpacerItem *m_spacer;
|
||||||
|
@@ -1,110 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Qt4ProjectManager::Internal::TargetSetupPage</class>
|
|
||||||
<widget class="QWidget" name="Qt4ProjectManager::Internal::TargetSetupPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>256</width>
|
|
||||||
<height>297</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Set up Targets for Your Project</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="setupTargetPage" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="descriptionLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Qt Creator can set up the following targets:</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="noValidProfileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p><span style=" font-weight:600;">No valid targets found.</span></p><p>Please add a target in <a href="buildandrun"><span style=" text-decoration: underline; color:#0000ff;">Tools &gt; Options &gt; Build &amp; Run</span></a> (<a href="buildandrun"><span style=" text-decoration: underline; color:#0000ff;">Qt Creator &gt; Preferences &gt; Build &amp; Run</span></a> on Mac OS) or via the maintenance tool of the SDK.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="centralWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidget" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>230</width>
|
|
||||||
<height>81</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Reference in New Issue
Block a user