summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-11-02 10:49:29 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-11-19 10:16:18 +0000
commit85b4aaaa99556fa248a7d688d2fe9d99d28234b0 (patch)
tree46de5387705660103b2d02e8ded3572fdd7672d8 /src/tools
parent97d12b454118730afc2f03ac44a6be12b47823ee (diff)
uic: Generate code for container page tooltips using the Qt configure system
Previously, the generation of this code was #ifdefed in uic itself. However, the #ifdef should be in the generated code (anticipating the cmake port where host and target builds might differ). Task-number: PYSIDE-797 Change-Id: I46255f852f5f6a3d95d3a20456b6f00f2067a3fe Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index a75aa0abd7..28e97f3bba 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -726,12 +726,14 @@ void WriteInitialization::acceptWidget(DomWidget *node)
autoTrOutput(plabelString, pageDefaultString) << m_indent << parentWidget << "->setItemText("
<< parentWidget << "->indexOf(" << varName << "), " << autoTrCall(plabelString, pageDefaultString) << ");\n";
-#ifndef QT_NO_TOOLTIP
if (DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) {
- autoTrOutput(ptoolTip->elementString()) << m_indent << parentWidget << "->setItemToolTip("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptoolTip->elementString()) << ");\n";
+ autoTrOutput(ptoolTip->elementString())
+ << language::openQtConfig(toolTipConfigKey())
+ << m_indent << parentWidget << "->setItemToolTip(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(ptoolTip->elementString()) << ");\n"
+ << language::closeQtConfig(toolTipConfigKey());
}
-#endif // QT_NO_TOOLTIP
} else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QTabWidget"))) {
QString icon;
if (const DomProperty *picon = attributes.value(QLatin1String("icon"))) {
@@ -747,18 +749,22 @@ void WriteInitialization::acceptWidget(DomWidget *node)
autoTrOutput(ptitleString, pageDefaultString) << m_indent << parentWidget << "->setTabText("
<< parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptitleString, pageDefaultString) << ");\n";
-#ifndef QT_NO_TOOLTIP
if (const DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) {
- autoTrOutput(ptoolTip->elementString()) << m_indent << parentWidget << "->setTabToolTip("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptoolTip->elementString()) << ");\n";
+ autoTrOutput(ptoolTip->elementString())
+ << language::openQtConfig(toolTipConfigKey())
+ << m_indent << parentWidget << "->setTabToolTip(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(ptoolTip->elementString()) << ");\n"
+ << language::closeQtConfig(toolTipConfigKey());
}
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
if (const DomProperty *pwhatsThis = attributes.value(QLatin1String("whatsThis"))) {
- autoTrOutput(pwhatsThis->elementString()) << m_indent << parentWidget << "->setTabWhatsThis("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(pwhatsThis->elementString()) << ");\n";
+ autoTrOutput(pwhatsThis->elementString())
+ << language::openQtConfig(whatsThisConfigKey())
+ << m_indent << parentWidget << "->setTabWhatsThis(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(pwhatsThis->elementString()) << ");\n"
+ << language::closeQtConfig(whatsThisConfigKey());
}
-#endif // QT_NO_WHATSTHIS
}
//