forked from qt-creator/qt-creator
QtSupport: Visually merge QtKitAspect and QmakeKitAspect
Change-Id: I000dba4726e26ddfd4df210d514200e8adacd989 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -35,6 +35,9 @@ public:
|
||||
{
|
||||
refresh(); // set up everything according to kit
|
||||
m_lineEdit->setToolTip(ki->description());
|
||||
QSizePolicy p = m_lineEdit->sizePolicy();
|
||||
p.setHorizontalStretch(1);
|
||||
m_lineEdit->setSizePolicy(p);
|
||||
connect(m_lineEdit, &QLineEdit::textEdited, this, &QmakeKitAspectImpl::mkspecWasChanged);
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/buildablehelperlibrary.h>
|
||||
#include <utils/guard.h>
|
||||
@@ -26,6 +28,8 @@
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
@@ -78,6 +82,23 @@ public:
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
void addToInnerLayout(Layouting::Layout &parentItem) override
|
||||
{
|
||||
if (const QList<KitAspect *> embedded = aspectsToEmbed(); !embedded.isEmpty()) {
|
||||
Layouting::Layout layout(new QHBoxLayout);
|
||||
KitAspect::addToInnerLayout(layout);
|
||||
QSizePolicy p = comboBoxes().first()->sizePolicy();
|
||||
p.setHorizontalStretch(2);
|
||||
comboBoxes().first()->setSizePolicy(p);
|
||||
layout.addItem(Tr::tr("Mkspec:"));
|
||||
embedded.first()->addToInnerLayout(layout);
|
||||
parentItem.addItem(layout);
|
||||
} else {
|
||||
KitAspect::addToInnerLayout(parentItem);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Internal
|
||||
|
||||
@@ -123,6 +144,7 @@ QtKitAspectFactory::QtKitAspectFactory()
|
||||
"A Qt version is required for qmake-based projects "
|
||||
"and optional when using other build systems."));
|
||||
setPriority(26000);
|
||||
setEmbeddableAspects({QmakeProjectManager::Constants::KIT_INFORMATION_ID});
|
||||
}
|
||||
|
||||
void QtKitAspectFactory::setup(Kit *k)
|
||||
|
Reference in New Issue
Block a user