Index: trunk/src/sql/kernel/qsql.h
===================================================================
--- trunk/src/sql/kernel/qsql.h	(revision 769)
+++ trunk/src/sql/kernel/qsql.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsql.qdoc
===================================================================
--- trunk/src/sql/kernel/qsql.qdoc	(revision 769)
+++ trunk/src/sql/kernel/qsql.qdoc	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
@@ -7,30 +7,16 @@
 ** This file is part of the documentation of the Qt Toolkit.
 **
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:FDL$
 ** Commercial Usage
 ** Licensees holding valid Qt Commercial licenses may use this file in
 ** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
 **
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
 **
 ** If you have questions regarding the use of this file, please contact
Index: trunk/src/sql/kernel/qsqlcachedresult.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlcachedresult.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlcachedresult.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlcachedresult_p.h
===================================================================
--- trunk/src/sql/kernel/qsqlcachedresult_p.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlcachedresult_p.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqldatabase.cpp
===================================================================
--- trunk/src/sql/kernel/qsqldatabase.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqldatabase.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
@@ -61,5 +61,8 @@
 #endif
 #ifdef QT_SQL_TDS
+// conflicting RETCODE typedef between odbc and freetds
+#define RETCODE DBRETCODE
 #include "../drivers/tds/qsql_tds.h"
+#undef RETCODE
 #endif
 #ifdef QT_SQL_DB2
@@ -99,5 +102,5 @@
 QT_BEGIN_NAMESPACE
 
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
                           (QSqlDriverFactoryInterface_iid,
@@ -577,5 +580,5 @@
 #endif
 
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     if (QFactoryLoader *fl = loader()) {
         QStringList keys = fl->keys();
@@ -775,5 +778,5 @@
     }
 
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     if (!driver && loader()) {
         if (QSqlDriverFactoryInterface *factory = qobject_cast<QSqlDriverFactoryInterface*>(loader()->instance(type)))
Index: trunk/src/sql/kernel/qsqldatabase.h
===================================================================
--- trunk/src/sql/kernel/qsqldatabase.h	(revision 769)
+++ trunk/src/sql/kernel/qsqldatabase.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqldriver.cpp
===================================================================
--- trunk/src/sql/kernel/qsqldriver.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqldriver.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
@@ -397,5 +397,5 @@
     on \a type.
 
-    \warning Because of binary compatability constraints, this function is not virtual.
+    \warning Because of binary compatibility constraints, this function is not virtual.
     If you want to provide your own implementation in your QSqlDriver subclass,
     reimplement the isIdentifierEscapedImplementation() slot in your subclass instead.
@@ -422,5 +422,5 @@
     modification.
 
-    \warning Because of binary compatability constraints, this function is not virtual,
+    \warning Because of binary compatibility constraints, this function is not virtual,
     If you want to provide your own implementation in your QSqlDriver subclass,
     reimplement the stripDelimitersImplementation() slot in your subclass instead.
@@ -872,5 +872,5 @@
     on \a type.
 
-    Because of binary compatability constraints, isIdentifierEscaped() function
+    Because of binary compatibility constraints, isIdentifierEscaped() function
     (introduced in Qt 4.5) is not virtual.  Instead, isIdentifierEscaped() will
     dynamically detect and call \e this slot.  The default implementation
@@ -897,5 +897,5 @@
     identifier is returned without modification.
 
-    Because of binary compatability constraints, the stripDelimiters() function
+    Because of binary compatibility constraints, the stripDelimiters() function
     (introduced in Qt 4.5) is not virtual.  Instead, stripDelimiters() will
     dynamically detect and call \e this slot.  It generally unnecessary
Index: trunk/src/sql/kernel/qsqldriver.h
===================================================================
--- trunk/src/sql/kernel/qsqldriver.h	(revision 769)
+++ trunk/src/sql/kernel/qsqldriver.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqldriverplugin.cpp
===================================================================
--- trunk/src/sql/kernel/qsqldriverplugin.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqldriverplugin.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqldriverplugin.h
===================================================================
--- trunk/src/sql/kernel/qsqldriverplugin.h	(revision 769)
+++ trunk/src/sql/kernel/qsqldriverplugin.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlerror.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlerror.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlerror.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlerror.h
===================================================================
--- trunk/src/sql/kernel/qsqlerror.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlerror.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlfield.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlfield.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlfield.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlfield.h
===================================================================
--- trunk/src/sql/kernel/qsqlfield.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlfield.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlindex.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlindex.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlindex.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlindex.h
===================================================================
--- trunk/src/sql/kernel/qsqlindex.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlindex.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlnulldriver_p.h
===================================================================
--- trunk/src/sql/kernel/qsqlnulldriver_p.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlnulldriver_p.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlquery.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlquery.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlquery.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
@@ -273,5 +273,5 @@
 /*!
     Constructs a QSqlQuery object using the SQL \a query and the
-    database \a db. If \a db is not specified, the application's
+    database \a db. If \a db is not specified, or is invalid, the application's
     default database is used. If \a query is not an empty string, it
     will be executed.
@@ -287,4 +287,5 @@
 /*!
     Constructs a QSqlQuery object using the database \a db.
+    If \a db is invalid, the application's default database will be used.
 
     \sa QSqlDatabase
Index: trunk/src/sql/kernel/qsqlquery.h
===================================================================
--- trunk/src/sql/kernel/qsqlquery.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlquery.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlrecord.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlrecord.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlrecord.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlrecord.h
===================================================================
--- trunk/src/sql/kernel/qsqlrecord.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlrecord.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlresult.cpp
===================================================================
--- trunk/src/sql/kernel/qsqlresult.cpp	(revision 769)
+++ trunk/src/sql/kernel/qsqlresult.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
Index: trunk/src/sql/kernel/qsqlresult.h
===================================================================
--- trunk/src/sql/kernel/qsqlresult.h	(revision 769)
+++ trunk/src/sql/kernel/qsqlresult.h	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
