Removed obsolete ifdefs.

Reviewed-by: dt
This commit is contained in:
Robert Loehning
2010-03-02 19:53:31 +01:00
parent 83db17bac9
commit 588b4eff59
4 changed files with 0 additions and 34 deletions

View File

@@ -167,10 +167,6 @@ void FancyLineEdit::updateStyleSheet(Side side)
sheet += QLatin1String(" color: #BBBBBB;"); sheet += QLatin1String(" color: #BBBBBB;");
// Fix the stylesheet's clearing the size hint. // Fix the stylesheet's clearing the size hint.
#if QT_VERSION < 0x040700
sheet += QLatin1String(" height: ");
sheet += QString::number(sizeHint().height());
#endif
sheet += QLatin1Char('}'); sheet += QLatin1Char('}');
setStyleSheet(sheet); setStyleSheet(sheet);
} }

View File

@@ -564,14 +564,12 @@ void FormEditorW::setupActions()
QAction *actionFormSettings = m_fwm->actionShowFormWindowSettingsDialog(); QAction *actionFormSettings = m_fwm->actionShowFormWindowSettingsDialog();
addToolAction(actionFormSettings, am, globalcontext, QLatin1String("FormEditor.FormSettings"), mformtools); addToolAction(actionFormSettings, am, globalcontext, QLatin1String("FormEditor.FormSettings"), mformtools);
#if QT_VERSION > 0x040500
createSeparator(this, am, globalcontext, mformtools, QLatin1String("FormEditor.Menu.Tools.Separator4")); createSeparator(this, am, globalcontext, mformtools, QLatin1String("FormEditor.Menu.Tools.Separator4"));
m_actionAboutPlugins = new QAction(tr("About Qt Designer plugins...."), this); m_actionAboutPlugins = new QAction(tr("About Qt Designer plugins...."), this);
addToolAction(m_actionAboutPlugins, am, globalcontext, addToolAction(m_actionAboutPlugins, am, globalcontext,
QLatin1String("FormEditor.AboutPlugins"), mformtools); QLatin1String("FormEditor.AboutPlugins"), mformtools);
connect(m_actionAboutPlugins, SIGNAL(triggered()), m_fwm, SLOT(aboutPlugins())); connect(m_actionAboutPlugins, SIGNAL(triggered()), m_fwm, SLOT(aboutPlugins()));
m_actionAboutPlugins->setEnabled(false); m_actionAboutPlugins->setEnabled(false);
#endif
// FWM // FWM
connect(m_fwm, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface *)), this, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface *))); connect(m_fwm, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface *)), this, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface *)));

View File

@@ -379,7 +379,6 @@ void FormWindowEditor::resetToDefaultLayout()
QString FormWindowEditor::contextHelpId() const QString FormWindowEditor::contextHelpId() const
{ {
const QDesignerFormEditorInterface *core = FormEditorW::instance()->designerEditor(); const QDesignerFormEditorInterface *core = FormEditorW::instance()->designerEditor();
#if QT_VERSION > 0x040500
// Present from Qt 4.5.1 onwards. This will show the class documentation // Present from Qt 4.5.1 onwards. This will show the class documentation
// scrolled to the current property. // scrolled to the current property.
const qdesigner_internal::QDesignerIntegration *integration = const qdesigner_internal::QDesignerIntegration *integration =
@@ -387,25 +386,6 @@ QString FormWindowEditor::contextHelpId() const
if (integration) if (integration)
return integration->contextHelpId(); return integration->contextHelpId();
return QString(); 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 QString FormWindowEditor::contents() const

View File

@@ -461,7 +461,6 @@ void OutputWindow::appendOutputInline(const QString &out)
setCurrentCharFormat(format); setCurrentCharFormat(format);
// (This feature depends on the availability of QPlainTextEdit::anchorAt) // (This feature depends on the availability of QPlainTextEdit::anchorAt)
#if QT_VERSION >= 0x040700
// Convert to HTML, preserving newlines and whitespace // Convert to HTML, preserving newlines and whitespace
s = Qt::convertFromPlainText(s); s = Qt::convertFromPlainText(s);
@@ -474,9 +473,6 @@ void OutputWindow::appendOutputInline(const QString &out)
index += link.length(); index += link.length();
} }
appendHtml(s); appendHtml(s);
#else
appendPlainText(s);
#endif
} }
enableUndoRedo(); enableUndoRedo();
@@ -536,7 +532,6 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
return; return;
} }
#if QT_VERSION >= 0x040700
const QString href = anchorAt(e->pos()); const QString href = anchorAt(e->pos());
if (!href.isEmpty()) { if (!href.isEmpty()) {
QRegExp qmlErrorLink(QLatin1String("^file://(/[^:]+):(\\d+):(\\d+)")); QRegExp qmlErrorLink(QLatin1String("^file://(/[^:]+):(\\d+):(\\d+)"));
@@ -548,14 +543,12 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
TextEditor::BaseTextEditor::openEditorAt(fileName, line, column - 1); TextEditor::BaseTextEditor::openEditorAt(fileName, line, column - 1);
} }
} }
#endif
} }
void OutputWindow::mouseMoveEvent(QMouseEvent *e) void OutputWindow::mouseMoveEvent(QMouseEvent *e)
{ {
QPlainTextEdit::mouseMoveEvent(e); QPlainTextEdit::mouseMoveEvent(e);
#if QT_VERSION >= 0x040700
// Cursor was dragged to make a selection, deactivate links // Cursor was dragged to make a selection, deactivate links
if (m_mousePressed && textCursor().hasSelection()) if (m_mousePressed && textCursor().hasSelection())
m_linksActive = false; m_linksActive = false;
@@ -564,5 +557,4 @@ void OutputWindow::mouseMoveEvent(QMouseEvent *e)
viewport()->setCursor(Qt::IBeamCursor); viewport()->setCursor(Qt::IBeamCursor);
else else
viewport()->setCursor(Qt::PointingHandCursor); viewport()->setCursor(Qt::PointingHandCursor);
#endif
} }