forked from qt-creator/qt-creator
Removed obsolete ifdefs.
Reviewed-by: dt
This commit is contained in:
@@ -379,7 +379,6 @@ void FormWindowEditor::resetToDefaultLayout()
|
||||
QString FormWindowEditor::contextHelpId() const
|
||||
{
|
||||
const QDesignerFormEditorInterface *core = FormEditorW::instance()->designerEditor();
|
||||
#if QT_VERSION > 0x040500
|
||||
// Present from Qt 4.5.1 onwards. This will show the class documentation
|
||||
// scrolled to the current property.
|
||||
const qdesigner_internal::QDesignerIntegration *integration =
|
||||
@@ -387,25 +386,6 @@ QString FormWindowEditor::contextHelpId() const
|
||||
if (integration)
|
||||
return integration->contextHelpId();
|
||||
return QString();
|
||||
#else
|
||||
// Pre 4.5.1. This will show the class documentation.
|
||||
QObject *o = core->propertyEditor()->object();
|
||||
if (!o)
|
||||
return QString();
|
||||
const QDesignerWidgetDataBaseInterface *db = core->widgetDataBase();
|
||||
const int dbIndex = db->indexOfObject(o, true);
|
||||
if (dbIndex == -1)
|
||||
return QString();
|
||||
QString className = db->item(dbIndex)->name();
|
||||
if (className == QLatin1String("Line"))
|
||||
className = QLatin1String("QFrame");
|
||||
else if (className == QLatin1String("Spacer"))
|
||||
className = QLatin1String("QSpacerItem");
|
||||
else if (className == QLatin1String("QLayoutWidget"))
|
||||
className = QLatin1String("QLayout");
|
||||
|
||||
return className;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString FormWindowEditor::contents() const
|
||||
|
||||
Reference in New Issue
Block a user