Re: [Development] Qt 5.3 header diff: QtSql

2014-04-23 Thread Olivier Goffart
On Tuesday 22 April 2014 16:43:00 Thiago Macieira wrote:
 Em ter 22 abr 2014, às 14:12:46, Thiago Macieira escreveu:
  http://macieira.org/~thiago/qt-5.3/QtSql.diff
 
 Looks fine, if scary.


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.

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.3 header diff: QtSql

2014-04-23 Thread Thiago Macieira
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.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.3 header diff: QtSql

2014-04-23 Thread Olivier Goffart
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

-- 
Olivier 

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.3 header diff: QtSql

2014-04-23 Thread Knoll Lars
On 23/04/14 09:34, Olivier Goffart oliv...@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.

Lars


-- 
Olivier 

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.3 header diff: QtSql

2014-04-23 Thread Olivier Goffart
On Wednesday 23 April 2014 11:30:16 Knoll Lars wrote:
 On 23/04/14 09:34, Olivier Goffart oliv...@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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.3 header diff: QtSql

2014-04-22 Thread Thiago Macieira
Em ter 22 abr 2014, às 14:12:46, Thiago Macieira escreveu:
 http://macieira.org/~thiago/qt-5.3/QtSql.diff

Looks fine, if scary.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development