summaryrefslogtreecommitdiffstats
path: root/src/Authoring
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2020-02-21 13:49:37 +0200
committerJanne Kangas <janne.kangas@qt.io>2020-02-21 14:19:40 +0200
commit5616822039fc185ce26071d0de0d8aec5eccc0a1 (patch)
treebde625048a3dd78a64b00fbb72eb7d4a91f8de6e /src/Authoring
parentdba6d03654c88afd2ac700446421e718f9760c06 (diff)
Remove evaluator type datainput dead code
Task-id: QT3DS-3912 Change-Id: Ice71372eae17bd01da1f2f15f9cce70ff47c7186 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring')
-rw-r--r--src/Authoring/Qt3DStudio/Application/DataInputDlg.cpp29
-rw-r--r--src/Authoring/Qt3DStudio/Application/DataInputDlg.h6
-rw-r--r--src/Authoring/Qt3DStudio/Application/DataInputListDlg.cpp6
-rw-r--r--src/Authoring/Qt3DStudio/Application/DataInputSelectView.cpp5
-rw-r--r--src/Authoring/Qt3DStudio/Application/ProjectFile.cpp6
-rw-r--r--src/Authoring/Qt3DStudio/Application/StudioApp.cpp6
6 files changed, 2 insertions, 56 deletions
diff --git a/src/Authoring/Qt3DStudio/Application/DataInputDlg.cpp b/src/Authoring/Qt3DStudio/Application/DataInputDlg.cpp
index f6255395..127f6547 100644
--- a/src/Authoring/Qt3DStudio/Application/DataInputDlg.cpp
+++ b/src/Authoring/Qt3DStudio/Application/DataInputDlg.cpp
@@ -56,9 +56,6 @@ CDataInputDlg::CDataInputDlg(CDataInputDialogItem **datainput, QStandardItemMode
m_ui->comboBoxTypeList->setItemDelegate(itemDelegate);
m_ui->comboBoxTypeList->addItem(tr("Boolean"), QVariant(DataTypeBoolean));
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- m_ui->comboBoxTypeList->addItem(tr("Evaluator"), QVariant(DataTypeEvaluator));
-#endif
m_ui->comboBoxTypeList->addItem(tr("Float"), QVariant(DataTypeFloat));
m_ui->comboBoxTypeList->addItem(tr("Ranged Number"), QVariant(DataTypeRangedNumber));
m_ui->comboBoxTypeList->addItem(tr("String"), QVariant(DataTypeString));
@@ -127,11 +124,6 @@ void CDataInputDlg::initDialog()
m_min = m_dataInput->minValue;
m_max = m_dataInput->maxValue;
}
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- else if (m_type == DataTypeEvaluator) {
- m_ui->lineEditEvaluation->setText(m_dataInput->valueString);
- }
-#endif
} else {
m_name = getUniqueId(tr("newDataInput"));
if (m_dataInput->type == DataTypeRangedNumber) {
@@ -190,11 +182,6 @@ void CDataInputDlg::accept()
m_dataInput->minValue = m_min;
m_dataInput->maxValue = m_max;
}
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- else if (m_type == DataTypeEvaluator) {
- m_dataInput->valueString = m_text;
- }
-#endif
m_dataInput->metadata.clear();
for (auto const &it : qAsConst(m_orderedMetadata))
@@ -255,15 +242,7 @@ void CDataInputDlg::updateVisibility(int type)
m_ui->doubleSpinBoxMin->setVisible(false);
m_ui->doubleSpinBoxMax->setVisible(false);
}
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- if (type == DataTypeEvaluator) {
- m_ui->lineEditEvaluation->setVisible(true);
- m_ui->labelEvaluation->setVisible(true);
- } else {
- m_ui->lineEditEvaluation->setVisible(false);
- m_ui->labelEvaluation->setVisible(false);
- }
-#endif
+
// Adjust text label positioning according to the
// visibility of info text warning about allowed datatypes.
if (m_dataInput->ctrldElems.size()) {
@@ -293,11 +272,7 @@ bool CDataInputDlg::isEquivalentDataType(int dlgType, qt3dsdm::DataModelDataType
// Variant can be bound to any property type except timeline controller because only
// datainput of type Ranged Number has additional min/max information. For slide control,
// we can allow variant type in addition to String type.
- || (dlgType == EDataType::DataTypeVariant && dmType != DataModelDataType::RangedNumber)
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- || dlgType == EDataType::DataTypeEvaluator
-#endif
- ) {
+ || (dlgType == EDataType::DataTypeVariant && dmType != DataModelDataType::RangedNumber)) {
return true;
}
diff --git a/src/Authoring/Qt3DStudio/Application/DataInputDlg.h b/src/Authoring/Qt3DStudio/Application/DataInputDlg.h
index 9ae6bc6f..c859ccf6 100644
--- a/src/Authoring/Qt3DStudio/Application/DataInputDlg.h
+++ b/src/Authoring/Qt3DStudio/Application/DataInputDlg.h
@@ -52,9 +52,6 @@ QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
enum EDataType {
DataTypeBoolean = 0,
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- DataTypeEvaluator,
-#endif
DataTypeFloat,
DataTypeRangedNumber,
DataTypeString,
@@ -73,9 +70,6 @@ static const QVector<EDataType> allDataTypes {
EDataType::DataTypeVector2,
EDataType::DataTypeRangedNumber,
EDataType::DataTypeBoolean,
- #ifdef DATAINPUT_EVALUATOR_ENABLED
- EDataType::DataTypeEvaluator,
- #endif
EDataType::DataTypeVariant
};
diff --git a/src/Authoring/Qt3DStudio/Application/DataInputListDlg.cpp b/src/Authoring/Qt3DStudio/Application/DataInputListDlg.cpp
index 5a053778..a6d9e932 100644
--- a/src/Authoring/Qt3DStudio/Application/DataInputListDlg.cpp
+++ b/src/Authoring/Qt3DStudio/Application/DataInputListDlg.cpp
@@ -216,12 +216,6 @@ void CDataInputListDlg::updateContents()
} else if (dataInputType == DataTypeFloat
&& (m_typeFilter == (int)DataTypeFloat || m_typeFilter == -1)) {
dataInput.append(new QStandardItem(tr("Float")));
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- } else if (dataInputType == DataTypeEvaluator
- && (m_typeFilter == (int)DataTypeEvaluator || m_typeFilter == -1)) {
- dataInput.append(new QStandardItem(tr("Evaluator")));
- dataInput.append(new QStandardItem(m_dataInputs.at(i)->valueString));
-#endif
} else if (dataInputType == DataTypeBoolean
&& (m_typeFilter == (int)DataTypeBoolean || m_typeFilter == -1)) {
dataInput.append(new QStandardItem(tr("Boolean")));
diff --git a/src/Authoring/Qt3DStudio/Application/DataInputSelectView.cpp b/src/Authoring/Qt3DStudio/Application/DataInputSelectView.cpp
index 6fab215a..878f779b 100644
--- a/src/Authoring/Qt3DStudio/Application/DataInputSelectView.cpp
+++ b/src/Authoring/Qt3DStudio/Application/DataInputSelectView.cpp
@@ -118,11 +118,6 @@ QString DataInputSelectView::getDiTypeStr(int type)
case EDataType::DataTypeBoolean:
return tr("Boolean");
break;
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- case EDataType::DataTypeEvaluator:
- return tr("Evaluator");
- break;
-#endif
case EDataType::DataTypeFloat:
return tr("Float");
break;
diff --git a/src/Authoring/Qt3DStudio/Application/ProjectFile.cpp b/src/Authoring/Qt3DStudio/Application/ProjectFile.cpp
index 279c1d65..1ad0b5c0 100644
--- a/src/Authoring/Qt3DStudio/Application/ProjectFile.cpp
+++ b/src/Authoring/Qt3DStudio/Application/ProjectFile.cpp
@@ -486,12 +486,6 @@ void ProjectFile::parseDataInputElem(const QDomElement &elem,
} else if (type == QLatin1String("Variant")) {
item->type = EDataType::DataTypeVariant;
}
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- else if (type == QLatin1String("Evaluator")) {
- item->type = EDataType::DataTypeEvaluator;
- item->valueString = elem.attribute(QStringLiteral("evaluator"));
- }
-#endif
auto metadata = elem.attribute(QStringLiteral("metadata"));
if (!metadata.isEmpty()) {
diff --git a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
index 8b97630c..ac9efb10 100644
--- a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
+++ b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
@@ -1635,12 +1635,6 @@ void CStudioApp::saveDataInputsToProjectFile()
} else if (item->type == EDataType::DataTypeVariant) {
diNode.setAttribute(QStringLiteral("type"), QStringLiteral("Variant"));
}
-#ifdef DATAINPUT_EVALUATOR_ENABLED
- else if (item->type == EDataType::DataTypeEvaluator) {
- diNode.setAttribute(QStringLiteral("type"), QStringLiteral("Evaluator"));
- diNode.setAttribute(QStringLiteral("evaluator"), item->valueString);
- }
-#endif
QHashIterator<QString, QString> it(item->metadata);
QString metadataStr;