Commit 6b7c429c authored by jkobus's avatar jkobus Committed by Jarek Kobus

Make availableFeatures() nicer

Change-Id: Ia25c0967e6f65cb046c9f3b1798c747b8da02fc9
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 8e50ff5b
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="E"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.1.1"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.1.1"
viewerdir="qtquick1applicationviewer"
viewerclassname="QtQuick1ApplicationViewer"
stubversionminor="24">
......
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="C"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2.1"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.1"
qrcdeployment="qrcdeployment.pri"
stubversionminor="5">
<displayname>Qt Quick 2.1</displayname>
......
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="A"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2.2"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.2"
qrcdeployment="qrcdeployment.pri"
stubversionminor="5">
<displayname>Qt Quick 2.2</displayname>
......
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="D"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.Controls.1.0"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.0"
qrcdeployment="qrcdeployment.pri"
stubversionminor="1">
<displayname>Qt Quick Controls 1.0</displayname>
......
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="B"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.Controls.1.1"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.1"
qrcdeployment="qrcdeployment.pri"
stubversionminor="1">
<displayname>Qt Quick Controls 1.1</displayname>
......
......@@ -230,31 +230,36 @@ FeatureSet BaseQtVersion::availableFeatures() const
| FeatureSet(Constants::FEATURE_QT_WEBKIT)
| FeatureSet(Constants::FEATURE_QT_CONSOLE);
if (qtVersion() >= QtVersionNumber(4, 7, 0)) {
features |= FeatureSet(Constants::FEATURE_QT_QUICK);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_1);
}
if (qtVersion() >= QtVersionNumber(4, 7, 1)) {
features |= FeatureSet(Constants::FEATURE_QT_QUICK_1_1);
}
if (qtVersion() >= QtVersionNumber(5, 0, 0)) {
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_0);
}
if (qtVersion() >= QtVersionNumber(5, 1, 0)) {
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_1);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_0);
}
if (qtVersion() >= QtVersionNumber(5, 2, 0)) {
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_2);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_1);
}
if (qtVersion() < QtVersionNumber(4, 7, 0))
return features;
features |= FeatureSet(Constants::FEATURE_QT_QUICK);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_1);
if (qtVersion() < QtVersionNumber(4, 7, 1))
return features;
features |= FeatureSet(Constants::FEATURE_QT_QUICK_1_1);
if (qtVersion() < QtVersionNumber(5, 0, 0))
return features;
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_0);
if (qtVersion() < QtVersionNumber(5, 1, 0))
return features;
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_1);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_0);
if (qtVersion() < QtVersionNumber(5, 2, 0))
return features;
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_2);
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_1);
return features;
}
......
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