delete dangerous constructor

parent 6a49b5c2
......@@ -76,7 +76,8 @@ template <class T>
class Iterator
{
public:
Iterator() : link(0) { } //**** remove this, remove this REMOVE THIS!!! dangerous as your implementation doesn't test for null links, always assumes they can be derefenced
Iterator() = delete;
Iterator(Link<T> *p) : link(p) { }
bool operator==(const Iterator<T>& it) const {
......
......@@ -114,10 +114,9 @@ bool ScanManager::start(const QUrl &url)
QVector<QStringRef> split = path.midRef(cachePath.length()).split(QLatin1Char('/'));
Folder *d = *it;
Iterator<File> jt;
while (!split.isEmpty() && d != NULL) { //if NULL we have got lost so abort!!
jt = d->iterator();
Iterator<File> jt = d->iterator();
const Link<File> *end = d->end();
if (split.first().isEmpty()) { //found the dir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment