Commit 4c8db5e9 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/4.5'

Change-Id: I32715e2fdbb14e4fccc4c58d3fd6052d7c1127f3
parents 3f12a33b b43e22b8
This diff is collapsed.
......@@ -211,7 +211,7 @@
\list 1
\li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Other Project} > \uicontrol {Qt Quick UI} >
\uicontrol {Other Project} > \uicontrol {Qt Quick UI Prototype} >
\uicontrol Choose.
\li In the \uicontrol {Minimal required Qt version} field, select the Qt
......@@ -222,8 +222,9 @@
Qt Quick Controls, Qt Quick Dialogs, and Qt Quick Layouts (available
since Qt 5.1).
\li Select the \uicontrol {With .ui.qml file} check box to create an UI
form.
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
{Qt Virtual Keyboard} to the application.
\li Select \uicontrol Next (or \uicontrol Continue on \macos).
......
......@@ -25,8 +25,8 @@
#include "navigationtreeview.h"
#include <QHeaderView>
#include <QFocusEvent>
#include <QHeaderView>
#include <QScrollBar>
/*!
......@@ -62,13 +62,18 @@ void NavigationTreeView::scrollTo(const QModelIndex &index, QAbstractItemView::S
// work around QTBUG-3927
QScrollBar *hBar = horizontalScrollBar();
int scrollX = hBar->value();
const int viewportWidth = viewport()->width();
const QRect itemRect = visualRect(index);
QRect itemRect = visualRect(index);
QAbstractItemDelegate *delegate = itemDelegate(index);
if (delegate)
itemRect.setWidth(delegate->sizeHint(viewOptions(), index).width());
if (itemRect.x() - indentation() < 0) {
// scroll so left edge minus one indent of item is visible
scrollX += itemRect.x() - indentation();
} else if (itemRect.right() > viewportWidth
&& (viewportWidth - itemRect.x() < 3 * viewportWidth / 4)) {
} else if (itemRect.right() > viewportWidth) {
// If right edge of item is not visible and left edge is "too far right",
// then move so it is either fully visible, or to the left edge.
// For this move the left edge one indent to the left, so the parent can potentially
......
......@@ -40,6 +40,7 @@ CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) :
setPriority(Node::DefaultPriority - 10); // Bottom most!
setDisplayName(QCoreApplication::translate("CMakeFilesProjectNode", "CMake Modules"));
setIcon(QIcon(":/projectexplorer/images/session.png")); // TODO: Use a better icon!
setListInProject(false);
}
QByteArray CMakeInputsNode::generateId(const Utils::FileName &inputFile)
......@@ -57,6 +58,7 @@ CMakeListsNode::CMakeListsNode(const Utils::FileName &cmakeListPath) :
{
static QIcon folderIcon = Core::FileIconProvider::directoryIcon(Constants::FILEOVERLAY_CMAKE);
setIcon(folderIcon);
setListInProject(false);
}
bool CMakeListsNode::showInSimpleTree() const
......@@ -69,6 +71,7 @@ CMakeProjectNode::CMakeProjectNode(const Utils::FileName &directory) :
{
setPriority(Node::DefaultProjectPriority + 1000);
setIcon(QIcon(":/projectexplorer/images/projectexplorer.png")); // TODO: Use proper icon!
setListInProject(false);
}
bool CMakeProjectNode::showInSimpleTree() const
......@@ -86,6 +89,7 @@ CMakeTargetNode::CMakeTargetNode(const Utils::FileName &directory, const QString
{
setPriority(Node::DefaultProjectPriority + 900);
setIcon(QIcon(":/projectexplorer/images/build.png")); // TODO: Use proper icon!
setListInProject(false);
}
QByteArray CMakeTargetNode::generateId(const Utils::FileName &directory, const QString &target)
......
......@@ -39,6 +39,7 @@
#include <utils/detailswidget.h>
#include <utils/fancylineedit.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
......@@ -64,7 +65,17 @@ const char TITLE_KEY[] = "CMakeProjectManager.CMakeRunConfiguation.Title";
CMakeRunConfiguration::CMakeRunConfiguration(Target *target)
: RunConfiguration(target)
{
addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier()));
// Workaround for QTCREATORBUG-19354:
auto cmakeRunEnvironmentModifier = [](RunConfiguration *rc, Utils::Environment &env) {
if (!Utils::HostOsInfo::isWindowsHost() || !rc)
return;
const Kit *k = rc->target()->kit();
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k);
if (qt)
env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS"));
};
addExtraAspect(new LocalEnvironmentAspect(this, cmakeRunEnvironmentModifier));
addExtraAspect(new ArgumentsAspect(this, "CMakeProjectManager.CMakeRunConfiguration.Arguments"));
addExtraAspect(new TerminalAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UseTerminal"));
addExtraAspect(new WorkingDirectoryAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"));
......
......@@ -525,8 +525,6 @@ ProjectExplorer::Macros CppModelManager::internalDefinedMacros() const
for (const ProjectPart::Ptr &part : pinfo.projectParts()) {
addUnique(part->toolChainMacros, macros, alreadyIn);
addUnique(part->projectMacros, macros, alreadyIn);
if (!part->projectConfigFile.isEmpty())
macros += ProjectExplorer::Macro::toMacros(ProjectPart::readProjectConfigFile(part));
}
}
return macros;
......
......@@ -190,6 +190,8 @@ static ProjectPart::Ptr projectPartFromRawProjectPart(const RawProjectPart &rawP
part->buildTargetType = rawProjectPart.buildTargetType;
part->qtVersion = rawProjectPart.qtVersion;
part->projectMacros = rawProjectPart.projectMacros;
if (!part->projectConfigFile.isEmpty())
part->projectMacros += ProjectExplorer::Macro::toMacros(ProjectPart::readProjectConfigFile(part));
part->headerPaths = rawProjectPart.headerPaths;
part->precompiledHeaders = rawProjectPart.precompiledHeaders;
part->selectedForBuilding = rawProjectPart.selectedForBuilding;
......
......@@ -35,9 +35,10 @@ namespace CppTools {
void ProjectPart::updateLanguageFeatures()
{
const bool hasQt = qtVersion != NoQt;
const bool hasCxx = languageVersion >= CXX98;
const bool hasQt = hasCxx && qtVersion != NoQt;
languageFeatures.cxx11Enabled = languageVersion >= CXX11;
languageFeatures.cxxEnabled = languageVersion >= CXX98;
languageFeatures.cxxEnabled = hasCxx;
languageFeatures.c99Enabled = languageVersion >= C99;
languageFeatures.objCEnabled = languageExtensions.testFlag(ObjectiveCExtensions);
languageFeatures.qtEnabled = hasQt;
......
......@@ -143,7 +143,6 @@ QbsRunConfiguration::QbsRunConfiguration(Target *target)
void QbsRunConfiguration::initialize(Core::Id id)
{
RunConfiguration::initialize(id);
m_uniqueProductName = uniqueProductNameFromId(id);
setDefaultDisplayName(defaultDisplayName());
installStepChanged();
......@@ -215,7 +214,7 @@ Runnable QbsRunConfiguration::runnable() const
QString QbsRunConfiguration::executable() const
{
QbsProject *pro = static_cast<QbsProject *>(target()->project());
const qbs::ProductData product = findProduct(pro->qbsProjectData(), m_uniqueProductName);
const qbs::ProductData product = findProduct(pro->qbsProjectData(), uniqueProductName());
if (!product.isValid() || !pro->qbsProject().isValid())
return QString();
......@@ -226,7 +225,7 @@ QString QbsRunConfiguration::executable() const
bool QbsRunConfiguration::isConsoleApplication() const
{
QbsProject *pro = static_cast<QbsProject *>(target()->project());
const qbs::ProductData product = findProduct(pro->qbsProjectData(), m_uniqueProductName);
const qbs::ProductData product = findProduct(pro->qbsProjectData(), uniqueProductName());
return product.properties().value(QLatin1String("consoleApplication"), false).toBool();
}
......@@ -242,7 +241,7 @@ void QbsRunConfiguration::addToBaseEnvironment(Utils::Environment &env) const
{
QbsProject *project = static_cast<QbsProject *>(target()->project());
if (project && project->qbsProject().isValid()) {
const qbs::ProductData product = findProduct(project->qbsProjectData(), m_uniqueProductName);
const qbs::ProductData product = findProduct(project->qbsProjectData(), uniqueProductName());
if (product.isValid()) {
QProcessEnvironment procEnv = env.toProcessEnvironment();
procEnv.insert(QLatin1String("QBS_RUN_FILE_PATH"), executable());
......@@ -274,7 +273,7 @@ QString QbsRunConfiguration::buildSystemTarget() const
QString QbsRunConfiguration::uniqueProductName() const
{
return m_uniqueProductName;
return uniqueProductNameFromId(id());
}
QString QbsRunConfiguration::defaultDisplayName()
......
......@@ -79,8 +79,6 @@ private:
void updateTarget();
QString m_uniqueProductName;
QbsInstallStep *m_currentInstallStep = nullptr; // We do not take ownership!
ProjectExplorer::BuildStepList *m_currentBuildStepList = nullptr; // We do not take ownership!
};
......
......@@ -35,6 +35,7 @@ const char rootCategory[] = "";
const char selectionCategory[] = "Selection";
const char stackCategory[] = "Stack (z)";
const char qmlPreviewCategory[] = "QmlPreview";
const char editCategory[] = "Edit";
const char anchorsCategory[] = "Anchors";
const char positionCategory[] = "Position";
......@@ -147,8 +148,9 @@ const char increaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesi
const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease index of stacked container.");
const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add item to stacked container.");
const int priorityFirst = 220;
const int prioritySelectionCategory = 200;
const int priorityFirst = 240;
const int prioritySelectionCategory = 220;
const int priorityQmlPreviewCategory = 200;
const int priorityStackCategory = 180;
const int priorityEditCategory = 160;
const int priorityAnchorsCategory = 140;
......
......@@ -54,6 +54,8 @@ public:
void setValue(const QVariant &value, qreal frame);
QVariant value(qreal frame) const;
TypeName valueType() const;
qreal currentFrame() const;
bool hasKeyframe(qreal frame);
......
......@@ -118,6 +118,16 @@ QVariant QmlTimelineFrames::value(qreal frame) const
return QVariant();
}
TypeName QmlTimelineFrames::valueType() const
{
const ModelNode targetNode = target();
if (targetNode.isValid() && targetNode.hasMetaInfo())
return targetNode.metaInfo().propertyTypeName(propertyName());
return TypeName();
}
bool QmlTimelineFrames::hasKeyframe(qreal frame)
{
for (const ModelNode &childNode : modelNode().defaultNodeListProperty().toModelNodeList()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment