summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qcompleter.cpp
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-03 13:12:46 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-08-03 13:12:46 (GMT)
commit41a83e1ff19ad1396e6001e6b0ac003c701ba55a (patch)
tree609e40eda10418bbf925002c36552074796b96b6 /src/gui/util/qcompleter.cpp
parentd1f3b9df2bc5c57d414da73a7d4f9ed7b25df3db (diff)
downloadQt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.zip
Qt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.tar.gz
Qt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.tar.bz2
Squashed commit of the topic/exceptions branch.
Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
Diffstat (limited to 'src/gui/util/qcompleter.cpp')
-rw-r--r--src/gui/util/qcompleter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 8fe32bd..89cb283 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -158,7 +158,7 @@ QT_BEGIN_NAMESPACE
QCompletionModel::QCompletionModel(QCompleterPrivate *c, QObject *parent)
: QAbstractProxyModel(*new QCompletionModelPrivate, parent),
- c(c), engine(0), showAll(false)
+ c(c), showAll(false)
{
createEngine();
}
@@ -208,11 +208,10 @@ void QCompletionModel::createEngine()
break;
}
- delete engine;
if (sortedEngine)
- engine = new QSortedModelEngine(c);
+ engine.reset(new QSortedModelEngine(c));
else
- engine = new QUnsortedModelEngine(c);
+ engine.reset(new QUnsortedModelEngine(c));
}
QModelIndex QCompletionModel::mapToSource(const QModelIndex& index) const