Commit 588b4eff authored by Robert Loehning's avatar Robert Loehning
Browse files

Removed obsolete ifdefs.

Reviewed-by: dt
parent 83db17ba
......@@ -167,10 +167,6 @@ void FancyLineEdit::updateStyleSheet(Side side)
sheet += QLatin1String(" color: #BBBBBB;");
// Fix the stylesheet's clearing the size hint.
#if QT_VERSION < 0x040700
sheet += QLatin1String(" height: ");
sheet += QString::number(sizeHint().height());
#endif
sheet += QLatin1Char('}');
setStyleSheet(sheet);
}
......
......@@ -564,14 +564,12 @@ void FormEditorW::setupActions()
QAction *actionFormSettings = m_fwm->actionShowFormWindowSettingsDialog();
addToolAction(actionFormSettings, am, globalcontext, QLatin1String("FormEditor.FormSettings"), mformtools);
#if QT_VERSION > 0x040500
createSeparator(this, am, globalcontext, mformtools, QLatin1String("FormEditor.Menu.Tools.Separator4"));
m_actionAboutPlugins = new QAction(tr("About Qt Designer plugins...."), this);
addToolAction(m_actionAboutPlugins, am, globalcontext,
QLatin1String("FormEditor.AboutPlugins"), mformtools);
connect(m_actionAboutPlugins, SIGNAL(triggered()), m_fwm, SLOT(aboutPlugins()));
m_actionAboutPlugins->setEnabled(false);
#endif
// FWM
connect(m_fwm, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface *)), this, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface *)));
......
......@@ -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
......
......@@ -461,7 +461,6 @@ void OutputWindow::appendOutputInline(const QString &out)
setCurrentCharFormat(format);
// (This feature depends on the availability of QPlainTextEdit::anchorAt)
#if QT_VERSION >= 0x040700
// Convert to HTML, preserving newlines and whitespace
s = Qt::convertFromPlainText(s);
......@@ -474,9 +473,6 @@ void OutputWindow::appendOutputInline(const QString &out)
index += link.length();
}
appendHtml(s);
#else
appendPlainText(s);
#endif
}
enableUndoRedo();
......@@ -536,7 +532,6 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
return;
}
#if QT_VERSION >= 0x040700
const QString href = anchorAt(e->pos());
if (!href.isEmpty()) {
QRegExp qmlErrorLink(QLatin1String("^file://(/[^:]+):(\\d+):(\\d+)"));
......@@ -548,14 +543,12 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
TextEditor::BaseTextEditor::openEditorAt(fileName, line, column - 1);
}
}
#endif
}
void OutputWindow::mouseMoveEvent(QMouseEvent *e)
{
QPlainTextEdit::mouseMoveEvent(e);
#if QT_VERSION >= 0x040700
// Cursor was dragged to make a selection, deactivate links
if (m_mousePressed && textCursor().hasSelection())
m_linksActive = false;
......@@ -564,5 +557,4 @@ void OutputWindow::mouseMoveEvent(QMouseEvent *e)
viewport()->setCursor(Qt::IBeamCursor);
else
viewport()->setCursor(Qt::PointingHandCursor);
#endif
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment