cant we always call this with a QUrl and remove this function + the attribute thing?