diff --git a/src/core/global/qconfig.h.cmake b/src/core/global/qconfig.h.cmake index d570f989e..ad138e557 100644 --- a/src/core/global/qconfig.h.cmake +++ b/src/core/global/qconfig.h.cmake @@ -159,6 +159,8 @@ // #cmakedefine QT_NO_UNDOCOMMAND // #cmakedefine QT_NO_UNDOSTACK // #cmakedefine QT_NO_VALIDATOR +// #cmakedefine QT_NO_VECTOR4D +// #cmakedefine QT_NO_WARNING_OUTPUT // Misc #cmakedefine QT_NO_USING_NAMESPACE @@ -215,8 +217,6 @@ #cmakedefine QT_NO_UNDOGROUP #cmakedefine QT_NO_UNDOVIEW #cmakedefine QT_NO_VECTOR2D -#cmakedefine QT_NO_VECTOR4D -#cmakedefine QT_NO_WARNING_OUTPUT #cmakedefine QT_NO_WHATSTHIS #cmakedefine QT_NO_WHEELEVENT #cmakedefine QT_NO_WIZARD diff --git a/src/designer/shared/actionrepository.cpp b/src/designer/shared/actionrepository.cpp index 93a8fccef..84cfa863e 100644 --- a/src/designer/shared/actionrepository.cpp +++ b/src/designer/shared/actionrepository.cpp @@ -179,7 +179,9 @@ void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, icon = defaultIcon; item->setIcon(icon); item->setToolTip(firstTooltip); +#ifndef QT_NO_WHATSTHIS item->setWhatsThis(firstTooltip); +#endif // QT_NO_WHATSTHIS // Used const QWidgetList associatedDesignerWidgets = associatedWidgets(action); const bool used = !associatedDesignerWidgets.empty(); diff --git a/src/designer/shared/plugindialog.cpp b/src/designer/shared/plugindialog.cpp index 3b038b53c..e21db723d 100644 --- a/src/designer/shared/plugindialog.cpp +++ b/src/designer/shared/plugindialog.cpp @@ -65,7 +65,9 @@ PluginDialog::PluginDialog(QDesignerFormEditorInterface *core, QWidget *parent) QPushButton *updateButton = new QPushButton(tr("Refresh")); const QString tooltip = tr("Scan for newly installed custom widget plugins."); updateButton->setToolTip(tooltip); +#ifndef QT_NO_WHATSTHIS updateButton->setWhatsThis(tooltip); +#endif // QT_NO_WHATSTHIS connect(updateButton, SIGNAL(clicked()), this, SLOT(updateCustomWidgetPlugins())); ui.buttonBox->addButton(updateButton, QDialogButtonBox::ActionRole); } @@ -160,7 +162,9 @@ void PluginDialog::setItem(QTreeWidgetItem *pluginItem, const QString &name, QTreeWidgetItem *item = new QTreeWidgetItem(pluginItem); item->setText(0, name); item->setToolTip(0, toolTip); +#ifndef QT_NO_WHATSTHIS item->setWhatsThis(0, whatsThis); +#endif // QT_NO_WHATSTHIS item->setIcon(0, pluginIcon(icon)); } diff --git a/src/designer/shared/qdesigner_command.cpp b/src/designer/shared/qdesigner_command.cpp index 9a585061f..8ff20b6d2 100644 --- a/src/designer/shared/qdesigner_command.cpp +++ b/src/designer/shared/qdesigner_command.cpp @@ -2190,9 +2190,11 @@ static void copyRolesToItem(const ItemData *id, T *item, DesignerIconCache *icon case Qt::StatusTipPropertyRole: item->setStatusTip(qvariant_cast(it.value()).value()); break; +#ifndef QT_NO_WHATSTHIS case Qt::WhatsThisPropertyRole: item->setWhatsThis(qvariant_cast(it.value()).value()); break; +#endif // QT_NO_WHATSTHIS } } } @@ -2262,9 +2264,11 @@ void ItemData::fillTreeItemColumn(QTreeWidgetItem *item, int column, DesignerIco case Qt::StatusTipPropertyRole: item->setStatusTip(column, qvariant_cast(it.value()).value()); break; +#ifndef QT_NO_WHATSTHIS case Qt::WhatsThisPropertyRole: item->setWhatsThis(column, qvariant_cast(it.value()).value()); break; +#endif // QT_NO_WHATSTHIS } } } diff --git a/src/designer/shared/qdesigner_tabwidget.cpp b/src/designer/shared/qdesigner_tabwidget.cpp index 6919f5c91..b0ca78894 100644 --- a/src/designer/shared/qdesigner_tabwidget.cpp +++ b/src/designer/shared/qdesigner_tabwidget.cpp @@ -441,7 +441,9 @@ void QTabWidgetPropertySheet::setProperty(int index, const QVariant &value) m_pageToData[currentWidget].tooltip = qvariant_cast(value); break; case PropertyCurrentTabWhatsThis: +#ifndef QT_NO_WHATSTHIS m_tabWidget->setTabWhatsThis(currentIndex, qvariant_cast(resolvePropertyValue(index, value))); +#endif // QT_NO_WHATSTHIS m_pageToData[currentWidget].whatsthis = qvariant_cast(value); break; case PropertyTabWidgetNone: diff --git a/src/designer/shared/scriptdialog.cpp b/src/designer/shared/scriptdialog.cpp index 21c6680d4..af6afd026 100644 --- a/src/designer/shared/scriptdialog.cpp +++ b/src/designer/shared/scriptdialog.cpp @@ -51,7 +51,9 @@ namespace qdesigner_internal { The widget and its children are accessible via the \ variables widget and childWidgets, respectively."); m_textEdit->setToolTip(textHelp); +#ifndef QT_NO_WHATSTHIS m_textEdit->setWhatsThis(textHelp); +#endif // QT_NO_WHATSTHIS m_textEdit->setMinimumSize(QSize(600, 400)); vboxLayout->addWidget(m_textEdit); new QScriptHighlighter(m_textEdit->document()); diff --git a/src/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/src/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp index 882d88e24..92d44ddb8 100644 --- a/src/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp @@ -441,7 +441,9 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) item->button->setText(property->propertyName()); item->button->setToolTip(property->toolTip()); item->button->setStatusTip(property->statusTip()); +#ifndef QT_NO_WHATSTHIS item->button->setWhatsThis(property->whatsThis()); +#endif // QT_NO_WHATSTHIS item->button->setEnabled(property->isEnabled()); } if (item->label) { @@ -451,7 +453,9 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) item->label->setText(property->propertyName()); item->label->setToolTip(property->toolTip()); item->label->setStatusTip(property->statusTip()); +#ifndef QT_NO_WHATSTHIS item->label->setWhatsThis(property->whatsThis()); +#endif // QT_NO_WHATSTHIS item->label->setEnabled(property->isEnabled()); } if (item->widgetLabel) { diff --git a/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index 624de7b2f..8e9108cb3 100644 --- a/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -388,7 +388,9 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) item->groupBox->setTitle(property->propertyName()); item->groupBox->setToolTip(property->toolTip()); item->groupBox->setStatusTip(property->statusTip()); +#ifndef QT_NO_WHATSTHIS item->groupBox->setWhatsThis(property->whatsThis()); +#endif // QT_NO_WHATSTHIS item->groupBox->setEnabled(property->isEnabled()); } if (item->label) { @@ -398,7 +400,9 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) item->label->setText(property->propertyName()); item->label->setToolTip(property->toolTip()); item->label->setStatusTip(property->statusTip()); +#ifndef QT_NO_WHATSTHIS item->label->setWhatsThis(property->whatsThis()); +#endif // QT_NO_WHATSTHIS item->label->setEnabled(property->isEnabled()); } if (item->widgetLabel) { diff --git a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp index 1e523d13c..051e2f4ea 100644 --- a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp @@ -579,7 +579,9 @@ void QtTreePropertyBrowserPrivate::updateItem(QTreeWidgetItem *item) item->setFirstColumnSpanned(!property->hasValue()); item->setToolTip(0, property->propertyName()); item->setStatusTip(0, property->statusTip()); +#ifndef QT_NO_WHATSTHIS item->setWhatsThis(0, property->whatsThis()); +#endif // QT_NO_WHATSTHIS item->setText(0, property->propertyName()); bool wasEnabled = item->flags() & Qt::ItemIsEnabled; bool isEnabled = wasEnabled; diff --git a/src/tools/qtconfig/paletteeditoradvanced.cpp b/src/tools/qtconfig/paletteeditoradvanced.cpp index c07dbe632..932b0d2bb 100644 --- a/src/tools/qtconfig/paletteeditoradvanced.cpp +++ b/src/tools/qtconfig/paletteeditoradvanced.cpp @@ -32,13 +32,17 @@ PaletteEditorAdvanced::PaletteEditorAdvanced(QWidget *parent) // create a ColorButton's buttonCentral = new ColorButton(ui->groupCentral); buttonCentral->setToolTip(tr("Choose a color")); +#ifndef QT_NO_WHATSTHIS buttonCentral->setWhatsThis(tr("Choose a color for the selected central color role.")); +#endif // QT_NO_WHATSTHIS ui->layoutCentral->addWidget(buttonCentral); ui->labelCentral->setBuddy(buttonCentral); buttonEffect = new ColorButton(ui->groupEffect); buttonEffect->setToolTip(tr("Choose a color")); +#ifndef QT_NO_WHATSTHIS buttonEffect->setWhatsThis(tr("Choose a color for the selected effect color role.")); +#endif // QT_NO_WHATSTHIS buttonEffect->setEnabled(false); ui->layoutEffect->addWidget(buttonEffect); ui->labelEffect->setBuddy(buttonEffect); diff --git a/tests/auto/qstandarditem/tst_qstandarditem.cpp b/tests/auto/qstandarditem/tst_qstandarditem.cpp index d3d85e4c7..010984d5d 100644 --- a/tests/auto/qstandarditem/tst_qstandarditem.cpp +++ b/tests/auto/qstandarditem/tst_qstandarditem.cpp @@ -147,10 +147,12 @@ void tst_QStandardItem::getSetData() QString statusTip = QString("statusTip %0").arg(i); item.setStatusTip(statusTip); QCOMPARE(item.statusTip(), statusTip); - + +#ifndef QT_NO_WHATSTHIS QString whatsThis = QString("whatsThis %0").arg(i); item.setWhatsThis(whatsThis); QCOMPARE(item.whatsThis(), whatsThis); +#endif // QT_NO_WHATSTHIS QSize sizeHint(64*i, 48*i); item.setSizeHint(sizeHint); @@ -182,7 +184,9 @@ void tst_QStandardItem::getSetData() QCOMPARE(item.icon(), icon); QCOMPARE(item.toolTip(), toolTip); QCOMPARE(item.statusTip(), statusTip); +#ifndef QT_NO_WHATSTHIS QCOMPARE(item.whatsThis(), whatsThis); +#endif // QT_NO_WHATSTHIS QCOMPARE(item.sizeHint(), sizeHint); QCOMPARE(item.font(), font); QCOMPARE(item.textAlignment(), textAlignment); @@ -194,7 +198,9 @@ void tst_QStandardItem::getSetData() QCOMPARE(qvariant_cast(item.data(Qt::DecorationRole)), icon); QCOMPARE(qvariant_cast(item.data(Qt::ToolTipRole)), toolTip); QCOMPARE(qvariant_cast(item.data(Qt::StatusTipRole)), statusTip); +#ifndef QT_NO_WHATSTHIS QCOMPARE(qvariant_cast(item.data(Qt::WhatsThisRole)), whatsThis); +#endif // QT_NO_WHATSTHIS QCOMPARE(qvariant_cast(item.data(Qt::SizeHintRole)), sizeHint); QCOMPARE(qvariant_cast(item.data(Qt::FontRole)), font); QCOMPARE(qvariant_cast(item.data(Qt::TextAlignmentRole)), int(textAlignment)); @@ -864,7 +870,9 @@ void tst_QStandardItem::streamItem() item.setText(QLatin1String("text")); item.setToolTip(QLatin1String("toolTip")); item.setStatusTip(QLatin1String("statusTip")); +#ifndef QT_NO_WHATSTHIS item.setWhatsThis(QLatin1String("whatsThis")); +#endif // QT_NO_WHATSTHIS item.setSizeHint(QSize(64, 48)); item.setFont(QFont()); item.setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -884,7 +892,9 @@ void tst_QStandardItem::streamItem() QCOMPARE(streamedItem.text(), item.text()); QCOMPARE(streamedItem.toolTip(), item.toolTip()); QCOMPARE(streamedItem.statusTip(), item.statusTip()); +#ifndef QT_NO_WHATSTHIS QCOMPARE(streamedItem.whatsThis(), item.whatsThis()); +#endif // QT_NO_WHATSTHIS QCOMPARE(streamedItem.sizeHint(), item.sizeHint()); QCOMPARE(streamedItem.font(), item.font()); QCOMPARE(streamedItem.textAlignment(), item.textAlignment()); @@ -921,7 +931,9 @@ void tst_QStandardItem::clone() item.setText(QLatin1String("text")); item.setToolTip(QLatin1String("toolTip")); item.setStatusTip(QLatin1String("statusTip")); +#ifndef QT_NO_WHATSTHIS item.setWhatsThis(QLatin1String("whatsThis")); +#endif // QT_NO_WHATSTHIS item.setSizeHint(QSize(64, 48)); item.setFont(QFont()); item.setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -934,7 +946,9 @@ void tst_QStandardItem::clone() QCOMPARE(clone->text(), item.text()); QCOMPARE(clone->toolTip(), item.toolTip()); QCOMPARE(clone->statusTip(), item.statusTip()); +#ifndef QT_NO_WHATSTHIS QCOMPARE(clone->whatsThis(), item.whatsThis()); +#endif // QT_NO_WHATSTHIS QCOMPARE(clone->sizeHint(), item.sizeHint()); QCOMPARE(clone->font(), item.font()); QCOMPARE(clone->textAlignment(), item.textAlignment());