[Development] QTextStream::readLine(0) is an ambiguous overload in 5.5

Jan Kundr√°t jkt at kde.org
Wed May 13 02:34:28 CEST 2015

this commit [1] added a new overload to QTextStream::readLine. As a result 
of that, calling stream.readLine(0) is now ambiguous:

    QString readLine(qint64 maxlen = 0);
    bool readLine(QString *line, qint64 maxlen = 0);

While I can easily fix this in the caller (Konsole in this case), I'm 
wodnering whether this effect was understood at the time the change was 
merged. IMHO it's a bit more user-friendly to preserve source compatibility 
by removing the default value in the newly added overload.

Should I send such a patch?


[1] https://codereview.qt-project.org/98606

Trojit√°, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

More information about the Development mailing list