summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptbreakpointswidget.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 12:01:04 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 12:01:04 (GMT)
commit198efeb27e5c2a87d0a2bb6859446cb1faf45ed8 (patch)
treee4c99e89cbecd2084a87a8c7a5d4877385fcec1c /src/scripttools/debugging/qscriptbreakpointswidget.cpp
parentbb2e4df9bee3148e819c98410aa36e22dad95d7a (diff)
parente85867003ca1741f378b1f58f4dd9d48577a5d9b (diff)
downloadQt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.zip
Qt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.tar.gz
Qt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
Diffstat (limited to 'src/scripttools/debugging/qscriptbreakpointswidget.cpp')
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidget.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/scripttools/debugging/qscriptbreakpointswidget.cpp b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
index aea1fe7..efb3047 100644
--- a/src/scripttools/debugging/qscriptbreakpointswidget.cpp
+++ b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
@@ -225,7 +225,6 @@ public:
bool eventFilter(QObject *editor, QEvent *event)
{
-#if QT_VERSION >= 0x040500
if (QLineEdit *le = qobject_cast<QLineEdit*>(editor)) {
if (event->type() == QEvent::KeyPress) {
int key = static_cast<QKeyEvent*>(event)->key();
@@ -237,21 +236,18 @@ public:
}
}
}
-#endif
return QStyledItemDelegate::eventFilter(editor, event);
}
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
-#if QT_VERSION >= 0x040500
if (index.column() == 2) {
// check that the syntax is OK
QString condition = qobject_cast<QLineEdit*>(editor)->text();
if (QScriptEngine::checkSyntax(condition).state() != QScriptSyntaxCheckResult::Valid)
return;
}
-#endif
QStyledItemDelegate::setModelData(editor, model, index);
}
@@ -261,11 +257,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 {