atof() respects the locale which might use a different separator and thus parsing can fail.
Use QString::toDouble function from Qt.
Avoid returning an invalid searchspace (when searching on an searchspace without a dataset) by setting the result size to 0.