[Development] Qt 5.3 header diff: QtSql

Olivier Goffart olivier at woboq.com
Wed Apr 23 15:21:23 CEST 2014


On Wednesday 23 April 2014 11:30:16 Knoll Lars wrote:
> On 23/04/14 09:34, "Olivier Goffart" <olivier at woboq.com> wrote:
> 
> 
> >On Wednesday 23 April 2014 00:28:46 Thiago Macieira wrote:
> >
> >> Em qua 23 abr 2014, às 09:17:37, Olivier Goffart escreveu:
> >> 
> >> > Just a little problem.
> >> > 
> >> > +#if QT_DEPRECATED_SINCE(5, 3)
> >> > 
> >> >      QSqlError( const QString& driverText = QString(),
> >> >      
> >> >                  const QString& databaseText = QString(),
> >> >                  ErrorType type = NoError,
> >> >                  int number = -1);
> >> > 
> >> > +#endif
> >> > +    QSqlError(const QString &driverText,
> >> > +              const QString &databaseText,
> >> > +              ErrorType type,
> >> > +              const QString &errorCode);
> >> > 
> >> > First, the deprecated constructor is missing the QT_DEPRECATED
> >> > Second, the default arguments should go on the new constructor.
> >> 
> >> 
> >> Agreed on the first, can't do for the second. If you add the default
> >> arguments, the new constructor becomes ambiguous.
> >
> >
> >I meant: ... instead of on the deprecated one.
> >
> >It is source compatible:  New compiled code will use the new constructor,
> >
> > old 
> >
> >compiled code will use the old one
> 
> 
> Agree with Olivier. The default arguments should be moved to the new
> constructor.

https://codereview.qt-project.org/83935

I am just unsure about the errorCode  default argument. 

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org




More information about the Development mailing list