summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-04-16 01:06:09 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-04-16 01:06:09 (GMT)
commit5174ef058693fb3c5420bd9ed555ebf0dfc758a2 (patch)
tree2e8272b2394c9beff850e08dd745559d11aad258 /src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
parent3eb4aacf07c77876c6ce68e9746906424934433b (diff)
downloadQt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.zip
Qt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.tar.gz
Qt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.tar.bz2
Remove obsolete pre-processor directives that check QT_VERSION.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp')
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
index a4919be..60fe48d 100644
--- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
@@ -206,11 +206,7 @@ private Q_SLOTS:
QWidget *editor = qobject_cast<QWidget*>(sender());
QPalette pal = editor->palette();
QColor col;
-#if QT_VERSION >= 0x040500
bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid);
-#else
- bool ok = true;
-#endif
if (ok) {
col = Qt::white;
} else {
@@ -277,12 +273,10 @@ bool QScriptDebuggerLocalsItemDelegate::eventFilter(QObject *watched, QEvent *ev
return QStyledItemDelegate::eventFilter(watched, event);
QKeyEvent *ke = static_cast<QKeyEvent*>(event);
if ((ke->key() == Qt::Key_Enter) || (ke->key() == Qt::Key_Return)) {
-#if QT_VERSION >= 0x040500
if (QScriptEngine::checkSyntax(le->text()).state() != QScriptSyntaxCheckResult::Valid) {
// ignore when script contains syntax error
return true;
}
-#endif
}
if (ke->key() != Qt::Key_Tab)
return QStyledItemDelegate::eventFilter(watched, event);
@@ -296,14 +290,12 @@ void QScriptDebuggerLocalsItemDelegate::setModelData(
QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
-#if QT_VERSION >= 0x040500
if (index.column() == 1) {
// check that the syntax is OK
QString expression = qobject_cast<QLineEdit*>(editor)->text();
if (QScriptEngine::checkSyntax(expression).state() != QScriptSyntaxCheckResult::Valid)
return;
}
-#endif
QStyledItemDelegate::setModelData(editor, model, index);
}