summaryrefslogtreecommitdiff
path: root/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-06-01 15:52:21 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-01 16:06:58 +0200
commit48fca54118b65d6399ece5f258426144bdc2b03b (patch)
treeef6ea77e48e8fd24c75a8b4905c383ff027cbb8d /src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
parent0a4e802f182e6e4b3c54cafa141c8d07ec7621f6 (diff)
downloadqtscript-48fca54118b65d6399ece5f258426144bdc2b03b.tar.gz
Fix scripttools compilation when some features are disabled
Task-number: QTBUG-20378 Change-Id: Ia1dc574824cb1d58c237d60675d1b8a5f8f44c43 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp')
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
index 56fac47..3af0f1f 100644
--- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
@@ -156,6 +156,7 @@ void QScriptDebuggerLocalsWidgetPrivate::_q_onCompletionTaskFinished()
QObject::connect(completer, SIGNAL(activated(QString)),
q, SLOT(_q_insertCompletion(QString)));
}
+#ifndef QT_NO_STRINGLISTMODEL
QStringListModel *model = qobject_cast<QStringListModel*>(completer->model());
if (!model) {
model = new QStringListModel(q);
@@ -165,6 +166,7 @@ void QScriptDebuggerLocalsWidgetPrivate::_q_onCompletionTaskFinished()
for (int i = 0; i < task->resultCount(); ++i)
strings.append(task->resultAt(i));
model->setStringList(strings);
+#endif
QString prefix = completingEditor->text().mid(task->position(), task->length());
completer->setCompletionPrefix(prefix);
completingEditor->setCompleter(completer);