diff options
author | Jarek Kobus <jkobus@trolltech.com> | 2009-04-17 06:59:50 (GMT) |
---|---|---|
committer | Jarek Kobus <jkobus@trolltech.com> | 2009-04-17 06:59:50 (GMT) |
commit | fa58c0e9afecc3807bd76babbd5da3918afcdd3d (patch) | |
tree | 4895431d492b093b1e2ee29032fa82999a8ed09b /src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp | |
parent | 04c01e15739d926ef653293ef1e89132085d7acd (diff) | |
parent | 8eb08c8c294f00763961e86cc3370b0ef78c8976 (diff) | |
download | Qt-fa58c0e9afecc3807bd76babbd5da3918afcdd3d.zip Qt-fa58c0e9afecc3807bd76babbd5da3918afcdd3d.tar.gz Qt-fa58c0e9afecc3807bd76babbd5da3918afcdd3d.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp')
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp | 8 |
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); } |