summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/sql')
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro1
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp29
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h43
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp31
-rw-r--r--tests/auto/sql/kernel/qsqldriver/qsqldriver.pro1
-rw-r--r--tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp31
-rw-r--r--tests/auto/sql/kernel/qsqlerror/qsqlerror.pro1
-rw-r--r--tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp29
-rw-r--r--tests/auto/sql/kernel/qsqlfield/qsqlfield.pro1
-rw-r--r--tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp45
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp49
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/qsqlrecord.pro1
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp33
-rw-r--r--tests/auto/sql/kernel/qsqlresult/testsqldriver.h29
-rw-r--r--tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp29
-rw-r--r--tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp29
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro1
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp29
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro1
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp125
-rw-r--r--tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro1
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp31
22 files changed, 246 insertions, 324 deletions
diff --git a/tests/auto/sql/kernel/qsql/qsql.pro b/tests/auto/sql/kernel/qsql/qsql.pro
index 03918f5d3d..71e2989572 100644
--- a/tests/auto/sql/kernel/qsql/qsql.pro
+++ b/tests/auto/sql/kernel/qsql/qsql.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsql
SOURCES += tst_qsql.cpp
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index 140ccc8809..282fed2584 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index fe8a3689b0..389d3abf85 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -119,7 +114,7 @@ inline static QString qTableName(const QString& prefix, QSqlDatabase db)
QString tableStr;
if (db.driverName().toLower().contains("ODBC"))
tableStr += QLatin1String("_odbc");
- return fixupTableName(QString(db.driver()->escapeIdentifier(prefix + tableStr + "_" +
+ return fixupTableName(QString(db.driver()->escapeIdentifier(prefix + tableStr + QLatin1Char('_') +
qGetHostName(), QSqlDriver::TableName)),db);
}
@@ -219,12 +214,12 @@ public:
}
// construct a stupid unique name
- QString cName = QString::number( counter++ ) + "_" + driver + "@";
+ QString cName = QString::number( counter++ ) + QLatin1Char('_') + driver + QLatin1Char('@');
cName += host.isEmpty() ? dbName : host;
if ( port > 0 )
- cName += ":" + QString::number( port );
+ cName += QLatin1Char(':') + QString::number( port );
db = QSqlDatabase::addDatabase( driver, cName );
@@ -364,7 +359,7 @@ public:
// for debugging only: outputs the connection as string
static QString dbToString( const QSqlDatabase db )
{
- QString res = db.driverName() + "@";
+ QString res = db.driverName() + QLatin1Char('@');
if ( db.driverName().startsWith( "QODBC" ) || db.driverName().startsWith( "QOCI" ) ) {
res += db.databaseName();
@@ -373,7 +368,7 @@ public:
}
if ( db.port() > 0 ) {
- res += ":" + QString::number( db.port() );
+ res += QLatin1Char(':') + QString::number( db.port() );
}
return res;
@@ -522,7 +517,7 @@ public:
result += '\'';
if(!err.driverText().isEmpty())
result += err.driverText() + "' || '";
- result += err.databaseText() + "'";
+ result += err.databaseText() + QLatin1Char('\'');
return result.toLocal8Bit();
}
@@ -534,7 +529,7 @@ public:
result += '\'';
if(!err.driverText().isEmpty())
result += err.driverText() + "' || '";
- result += err.databaseText() + "'";
+ result += err.databaseText() + QLatin1Char('\'');
return result.toLocal8Bit();
}
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index 71a10c45d8..bd8fbcca0e 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -218,7 +213,7 @@ struct FieldDef {
{
QString rt = typeName;
rt.replace(QRegExp("\\s"), QString("_"));
- int i = rt.indexOf("(");
+ int i = rt.indexOf(QLatin1Char('('));
if (i == -1)
i = rt.length();
if (i > 20)
diff --git a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
index 5633840635..8bfe1da1ce 100644
--- a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
+++ b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqldriver
SOURCES += tst_qsqldriver.cpp
diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
index 2f48b65e74..a19c849b4d 100644
--- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -79,7 +74,7 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db)
tst_Databases::safeDropTable( db, relTEST1 );
QString doubleField = (dbType == QSqlDriver::SQLite) ? "more_data double" : "more_data double(8,7)";
QVERIFY_SQL( q, exec("create table " + relTEST1 +
- " (id int not null primary key, name varchar(20), title_key int, another_title_key int, " + doubleField + ")"));
+ " (id int not null primary key, name varchar(20), title_key int, another_title_key int, " + doubleField + QLatin1Char(')')));
QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(1, 'harry', 1, 2, 1.234567)"));
QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(2, 'trond', 2, 1, 8.901234)"));
QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(3, 'vohi', 1, 2, 5.678901)"));
diff --git a/tests/auto/sql/kernel/qsqlerror/qsqlerror.pro b/tests/auto/sql/kernel/qsqlerror/qsqlerror.pro
index c217e27645..ef0d213dba 100644
--- a/tests/auto/sql/kernel/qsqlerror/qsqlerror.pro
+++ b/tests/auto/sql/kernel/qsqlerror/qsqlerror.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqlerror
QT = core sql testlib
diff --git a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
index 70e09a2b80..07a6c9c835 100644
--- a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
+++ b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/kernel/qsqlfield/qsqlfield.pro b/tests/auto/sql/kernel/qsqlfield/qsqlfield.pro
index 6b74041a17..5e0f4afe4c 100644
--- a/tests/auto/sql/kernel/qsqlfield/qsqlfield.pro
+++ b/tests/auto/sql/kernel/qsqlfield/qsqlfield.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqlfield
SOURCES += tst_qsqlfield.cpp
diff --git a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
index b77e1fe9ef..cee33be3df 100644
--- a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
+++ b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -201,9 +196,9 @@ void tst_QSqlField::name()
{
QSqlField field( "test", QVariant::String );
QFETCH( QString, val );
- QVERIFY( field.name() == "test" );
+ QCOMPARE(field.name(), QLatin1String("test"));
field.setName( val );
- QVERIFY( field.name() == val );
+ QCOMPARE(field.name(), val);
}
void tst_QSqlField::operator_Assign()
@@ -253,9 +248,9 @@ void tst_QSqlField::setName()
{
QSqlField field( "test", QVariant::String );
QFETCH( QString, val );
- QVERIFY( field.name() == "test" );
+ QCOMPARE(field.name(), QLatin1String("test"));
field.setName( val );
- QVERIFY( field.name() == val );
+ QCOMPARE(field.name(), val);
}
void tst_QSqlField::setNull()
@@ -273,16 +268,16 @@ void tst_QSqlField::setReadOnly()
field.setValue( "test" );
field.setReadOnly( true );
field.setValue( "Harry" );
- QVERIFY( field.value() == "test" );
+ QCOMPARE(field.value().toString(), QLatin1String("test"));
field.clear();
- QVERIFY( field.value() == "test" );
+ QCOMPARE(field.value().toString(), QLatin1String("test"));
QVERIFY( !field.isNull() );
field.clear();
- QVERIFY( field.value() == "test" );
+ QCOMPARE(field.value().toString(), QLatin1String("test"));
QVERIFY( !field.isNull() );
field.setReadOnly( false );
field.setValue( "Harry" );
- QVERIFY( field.value() == "Harry" );
+ QCOMPARE(field.value().toString(), QLatin1String("Harry"));
field.clear();
QVERIFY( field.value() == QVariant().toString() );
QVERIFY( field.isNull() );
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index b98ab68ae9..64e123309d 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -959,14 +954,14 @@ void tst_QSqlQuery::value()
if (dbType == QSqlDriver::Interbase)
QVERIFY( q.value( 1 ).toString().startsWith( "VarChar" + QString::number( i ) ) );
- else if ( q.value( 1 ).toString().right( 1 ) == " " )
+ else if ( q.value( 1 ).toString().endsWith(QLatin1Char(' ')))
QCOMPARE( q.value( 1 ).toString(), ( "VarChar" + QString::number( i ) + " " ) );
else
QCOMPARE( q.value( 1 ).toString(), ( "VarChar" + QString::number( i ) ) );
if (dbType == QSqlDriver::Interbase)
QVERIFY( q.value( 2 ).toString().startsWith( "Char" + QString::number( i ) ) );
- else if ( q.value( 2 ).toString().right( 1 ) != " " )
+ else if (!q.value( 2 ).toString().endsWith(QLatin1Char(' ')))
QCOMPARE( q.value( 2 ).toString(), ( "Char" + QString::number( i ) ) );
else
QCOMPARE( q.value( 2 ).toString(), ( "Char" + QString::number( i ) + " " ) );
@@ -3145,7 +3140,7 @@ void tst_QSqlQuery::sqlServerReturn0()
"SELECT * FROM "+tableName+" WHERE ID = 2 "
"RETURN 0"));
- QVERIFY_SQL(q, exec("{CALL "+procName+"}"));
+ QVERIFY_SQL(q, exec("{CALL " + procName + QLatin1Char('}')));
QVERIFY_SQL(q, next());
}
@@ -3162,7 +3157,7 @@ void tst_QSqlQuery::QTBUG_551()
TYPE IntType IS TABLE OF INTEGER INDEX BY BINARY_INTEGER;\n\
TYPE VCType IS TABLE OF VARCHAR2(60) INDEX BY BINARY_INTEGER;\n\
PROCEDURE P (Inp IN IntType, Outp OUT VCType);\n\
- END "+pkgname+";"));
+ END "+ pkgname + QLatin1Char(';')));
QVERIFY_SQL(q, exec("CREATE OR REPLACE PACKAGE BODY "+pkgname+" IS\n\
PROCEDURE P (Inp IN IntType, Outp OUT VCType)\n\
@@ -3172,7 +3167,7 @@ void tst_QSqlQuery::QTBUG_551()
Outp(2) := '2. Value is ' ||TO_CHAR(Inp(2));\n\
Outp(3) := '3. Value is ' ||TO_CHAR(Inp(3));\n\
END p;\n\
- END "+pkgname+";"));
+ END " + pkgname + QLatin1Char(';')));
QVariantList inLst, outLst, res_outLst;
@@ -3310,7 +3305,7 @@ void tst_QSqlQuery::QTBUG_6421()
QVERIFY_SQL(q, exec("create index INDEX2 on "+tableName+" (COL2 desc)"));
QVERIFY_SQL(q, exec("create index INDEX3 on "+tableName+" (COL3 desc)"));
q.setForwardOnly(true);
- QVERIFY_SQL(q, exec("select COLUMN_EXPRESSION from ALL_IND_EXPRESSIONS where TABLE_NAME='"+tableName+"'"));
+ QVERIFY_SQL(q, exec("select COLUMN_EXPRESSION from ALL_IND_EXPRESSIONS where TABLE_NAME='" + tableName + QLatin1Char('\'')));
QVERIFY_SQL(q, next());
QCOMPARE(q.value(0).toString(), QLatin1String("\"COL1\""));
QVERIFY_SQL(q, next());
@@ -3338,7 +3333,7 @@ void tst_QSqlQuery::QTBUG_6618()
"begin\n"
" raiserror('" + errorString + "', 16, 1)\n"
"end\n" ));
- q.exec("{call " + qTableName("tst_raiseError", __FILE__, db) + "}");
+ q.exec("{call " + qTableName("tst_raiseError", __FILE__, db) + QLatin1Char('}'));
QVERIFY(q.lastError().text().contains(errorString));
}
@@ -3430,7 +3425,7 @@ void tst_QSqlQuery::QTBUG_21884()
QStringList stList;
QString tableName(qTableName("bug21884", __FILE__, db));
stList << "create table " + tableName + "(id integer primary key, note string)";
- stList << "select * from " + tableName + ";";
+ stList << "select * from " + tableName + QLatin1Char(';');
stList << "select * from " + tableName + "; \t\n\r";
stList << "drop table " + tableName;
@@ -3984,7 +3979,7 @@ void runIntegralTypesMysqlTest(QSqlDatabase &db, const QString &tableName, const
{
QSqlQuery q(db);
QVERIFY_SQL(q, exec("DROP TABLE IF EXISTS " + tableName));
- QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id " + type + ")"));
+ QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id " + type + ')'));
const int steps = 20;
const T increment = max / steps - min / steps;
@@ -4001,7 +3996,7 @@ void runIntegralTypesMysqlTest(QSqlDatabase &db, const QString &tableName, const
q.bindValue(0, v);
QVERIFY_SQL(q, exec());
} else {
- QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id) VALUES (" + QString::number(v) + ")"));
+ QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id) VALUES (" + QString::number(v) + QLatin1Char(')')));
}
values[i] = v;
v += increment;
diff --git a/tests/auto/sql/kernel/qsqlrecord/qsqlrecord.pro b/tests/auto/sql/kernel/qsqlrecord/qsqlrecord.pro
index 0e92797bb0..ee17b5f249 100644
--- a/tests/auto/sql/kernel/qsqlrecord/qsqlrecord.pro
+++ b/tests/auto/sql/kernel/qsqlrecord/qsqlrecord.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqlrecord
SOURCES += tst_qsqlrecord.cpp
diff --git a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
index 8a90f16dce..c5cca6c33b 100644
--- a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
+++ b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -484,7 +479,7 @@ void tst_QSqlRecord::setValue()
QVERIFY( rec2.value( 3 ) == QVariant(bval) );
rec2.setValue( "string", "__Harry__" );
- QVERIFY( rec2.value( 0 ) == "__Harry__" );
+ QCOMPARE(rec2.value(0).toString(), QLatin1String("__Harry__"));
for ( i = 0; i < 4; ++i )
QVERIFY( !rec2.isNull( i ) );
@@ -501,7 +496,7 @@ void tst_QSqlRecord::value()
QSqlRecord rec2;
rec2.append( QSqlField( "string", QVariant::String ) );
rec2.setValue( "string", "Harry" );
- QVERIFY( rec2.value( "string" ) == "Harry" );
+ QCOMPARE(rec2.value("string").toString(), QLatin1String("Harry"));
}
QTEST_MAIN(tst_QSqlRecord)
diff --git a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
index 8ddee03a5a..9de76bc198 100644
--- a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
+++ b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
index b13c82e094..6c68a71654 100644
--- a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
+++ b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
index 4c6e8792d3..540f317935 100644
--- a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
+++ b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
index bc627e0724..2576fbad71 100644
--- a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqlquerymodel
SOURCES += tst_qsqlquerymodel.cpp
diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
index 52baa0070b..8a87f8bf15 100644
--- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index 5ce1b5694c..cade7c171d 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqlrelationaltablemodel
SOURCES += tst_qsqlrelationaltablemodel.cpp
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index 3702631275..799b93c33b 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -109,7 +104,7 @@ void tst_QSqlRelationalTableModel::recreateTestTables(QSqlDatabase db)
QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(5, 'nat', NULL, NULL)"));
QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(6, 'ale', NULL, 2)"));
- QVERIFY_SQL( q, exec("create table " + reltest2 + " (tid int not null primary key, title varchar(20))"));
+ QVERIFY_SQL( q, exec("create table " + reltest2 + " (id int not null primary key, title varchar(20))"));
QVERIFY_SQL( q, exec("insert into " + reltest2 + " values(1, 'herr')"));
QVERIFY_SQL( q, exec("insert into " + reltest2 + " values(2, 'mister')"));
@@ -201,7 +196,7 @@ void tst_QSqlRelationalTableModel::data()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.columnCount(), 4);
@@ -246,7 +241,7 @@ void tst_QSqlRelationalTableModel::setData()
model.setTable(reltest1);
model.setSort(0, Qt::AscendingOrder);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QVERIFY(model.setData(model.index(0, 1), QString("harry2")));
@@ -276,7 +271,7 @@ void tst_QSqlRelationalTableModel::setData()
QCOMPARE(model.data(model.index(3, 1)).toString(), QString("boris2"));
QCOMPARE(model.data(model.index(3, 2)).toInt(), 1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
QCOMPARE(model.data(model.index(3,2)).toString(), QString("herr"));
@@ -289,7 +284,7 @@ void tst_QSqlRelationalTableModel::setData()
model.setTable(reltest1);
model.setEditStrategy(QSqlTableModel::OnFieldChange);
model.setSort(0, Qt::AscendingOrder);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QVERIFY(model.setData(model.index(1,1), QString("trond2")));
@@ -307,7 +302,7 @@ void tst_QSqlRelationalTableModel::setData()
QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond2"));
QCOMPARE(model.data(model.index(2, 2)).toInt(), 2);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(2, 2)).toString(), QString("mister"));
}
@@ -317,12 +312,12 @@ void tst_QSqlRelationalTableModel::setData()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
//sybase doesn't allow tables with the same alias used twice as col names
//so don't set up an identical relation when using the tds driver
if (dbType != QSqlDriver::Sybase)
- model.setRelation(3, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest2, "id", "title"));
model.setEditStrategy(QSqlTableModel::OnManualSubmit);
model.setSort(0, Qt::AscendingOrder);
@@ -351,9 +346,9 @@ void tst_QSqlRelationalTableModel::setData()
QCOMPARE(model.data(model.index(3, 2)).toInt(), 1);
QCOMPARE(model.data(model.index(0, 3)).toInt(), 1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
if (dbType != QSqlDriver::Sybase)
- model.setRelation(3, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(3, 2)).toString(), QString("herr"));
@@ -411,7 +406,7 @@ void tst_QSqlRelationalTableModel::multipleRelation()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setRelation(3, QSqlRelation(reltest4, "id", "name"));
model.setSort(0, Qt::AscendingOrder);
QVERIFY_SQL(model, select());
@@ -425,7 +420,7 @@ void tst_QSqlRelationalTableModel::multipleRelation()
// Redo same test in the LeftJoin mode
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setRelation(3, QSqlRelation(reltest4, "id", "name"));
model.setSort(0, Qt::AscendingOrder);
model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
@@ -448,7 +443,7 @@ void tst_QSqlRelationalTableModel::insertRecord()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setSort(0, Qt::AscendingOrder);
QVERIFY_SQL(model, select());
@@ -498,7 +493,7 @@ void tst_QSqlRelationalTableModel::setRecord()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setSort(0, Qt::AscendingOrder);
QVERIFY_SQL(model, select());
@@ -559,11 +554,11 @@ void tst_QSqlRelationalTableModel::insertWithStrategies()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setSort(0, Qt::AscendingOrder);
if (dbType != QSqlDriver::Sybase)
- model.setRelation(3, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(0,0)).toInt(), 1);
@@ -667,7 +662,7 @@ void tst_QSqlRelationalTableModel::removeColumn()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QVERIFY_SQL(model, removeColumn(3));
@@ -693,7 +688,7 @@ void tst_QSqlRelationalTableModel::removeColumn()
QSqlRelationalTableModel lmodel(0, db);
lmodel.setTable(reltest1);
- lmodel.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ lmodel.setRelation(2, QSqlRelation(reltest2, "id", "title"));
lmodel.setJoinMode(QSqlRelationalTableModel::LeftJoin);
QVERIFY_SQL(lmodel, select());
@@ -724,7 +719,7 @@ void tst_QSqlRelationalTableModel::filter()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setFilter("title = 'herr'");
QVERIFY_SQL(model, select());
@@ -751,9 +746,9 @@ void tst_QSqlRelationalTableModel::sort()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
if (dbType != QSqlDriver::Sybase)
- model.setRelation(3, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest2, "id", "title"));
model.setSort(2, Qt::DescendingOrder);
QVERIFY_SQL(model, select());
@@ -879,7 +874,7 @@ void tst_QSqlRelationalTableModel::revert()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setRelation(3, QSqlRelation(reltest4, "id", "name"));
model.setSort(0, Qt::AscendingOrder);
@@ -917,10 +912,10 @@ void tst_QSqlRelationalTableModel::clearDisplayValuesCache()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
if (dbType != QSqlDriver::Sybase)
- model.setRelation(3, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest2, "id", "title"));
model.setSort(1, Qt::AscendingOrder);
model.setEditStrategy(QSqlTableModel::OnManualSubmit);
@@ -1018,7 +1013,7 @@ void tst_QSqlRelationalTableModel::invalidData()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
//try set a non-existent relational key
@@ -1048,7 +1043,7 @@ void tst_QSqlRelationalTableModel::relationModel()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QVERIFY(!model.relationModel(0));
@@ -1115,7 +1110,7 @@ void tst_QSqlRelationalTableModel::casing()
QCOMPARE( rec.count(), 0);
//try an owner that does exist
- rec = db.driver()->record(db.userName() + "." + qTableName("CASETEST1", db).toUpper());
+ rec = db.driver()->record(db.userName() + QLatin1Char('.') + qTableName("CASETEST1", db).toUpper());
QCOMPARE( rec.count(), 4);
}
QSqlRecord rec = db.driver()->record(qTableName("CASETEST1", db).toUpper());
@@ -1142,7 +1137,7 @@ void tst_QSqlRelationalTableModel::casing()
QSqlRelationalTableModel model(0, db);
model.setTable(qTableName("CASETEST1", db).toUpper());
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
@@ -1165,11 +1160,11 @@ void tst_QSqlRelationalTableModel::escapedRelations()
//try with relation table name quoted
if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) {
model.setRelation(2, QSqlRelation(db.driver()->escapeIdentifier(reltest2.toUpper(),QSqlDriver::TableName),
- "tid",
+ "id",
"title"));
} else {
model.setRelation(2, QSqlRelation(db.driver()->escapeIdentifier(reltest2,QSqlDriver::TableName),
- "tid",
+ "id",
"title"));
}
@@ -1190,11 +1185,11 @@ void tst_QSqlRelationalTableModel::escapedRelations()
model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) {
model.setRelation(2, QSqlRelation(reltest2,
- db.driver()->escapeIdentifier("tid", QSqlDriver::FieldName).toUpper(),
+ db.driver()->escapeIdentifier("id", QSqlDriver::FieldName).toUpper(),
"title"));
} else {
model.setRelation(2, QSqlRelation(reltest2,
- db.driver()->escapeIdentifier("tid", QSqlDriver::FieldName),
+ db.driver()->escapeIdentifier("id", QSqlDriver::FieldName),
"title"));
}
QVERIFY_SQL(model, select());
@@ -1215,11 +1210,11 @@ void tst_QSqlRelationalTableModel::escapedRelations()
if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) {
model.setRelation(2, QSqlRelation(reltest2,
- "tid",
+ "id",
db.driver()->escapeIdentifier("title", QSqlDriver::FieldName).toUpper()));
} else {
model.setRelation(2, QSqlRelation(reltest2,
- "tid",
+ "id",
db.driver()->escapeIdentifier("title", QSqlDriver::FieldName)));
}
@@ -1240,11 +1235,11 @@ void tst_QSqlRelationalTableModel::escapedRelations()
model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) {
model.setRelation(2, QSqlRelation(reltest2,
- "tid",
+ "id",
db.driver()->escapeIdentifier("title", QSqlDriver::FieldName).toUpper()));
} else {
model.setRelation(2, QSqlRelation(reltest2,
- "tid",
+ "id",
db.driver()->escapeIdentifier("title", QSqlDriver::FieldName)));
}
QVERIFY_SQL(model, select());
@@ -1278,7 +1273,7 @@ void tst_QSqlRelationalTableModel::escapedTableName()
model.setTable(db.driver()->escapeIdentifier(reltest1, QSqlDriver::TableName));
}
model.setSort(0, Qt::AscendingOrder);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QVERIFY(model.setData(model.index(0, 1), QString("harry2")));
@@ -1308,7 +1303,7 @@ void tst_QSqlRelationalTableModel::escapedTableName()
QCOMPARE(model.data(model.index(3, 1)).toString(), QString("boris2"));
QCOMPARE(model.data(model.index(3, 2)).toInt(), 1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
QCOMPARE(model.data(model.index(3,2)).toString(), QString("herr"));
@@ -1325,7 +1320,7 @@ void tst_QSqlRelationalTableModel::escapedTableName()
model.setTable(db.driver()->escapeIdentifier(reltest1, QSqlDriver::TableName));
}
model.setSort(0, Qt::AscendingOrder);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
QVERIFY_SQL(model, select());
@@ -1357,7 +1352,7 @@ void tst_QSqlRelationalTableModel::escapedTableName()
QCOMPARE(model.data(model.index(3, 1)).toString(), QString("boris2"));
QCOMPARE(model.data(model.index(3, 2)).toInt(), 1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
QCOMPARE(model.data(model.index(3,2)).toString(), QString("herr"));
@@ -1464,13 +1459,13 @@ void tst_QSqlRelationalTableModel::psqlSchemaTest()
QSqlQuery q(db);
QVERIFY_SQL(q, exec("create schema " + qTableName("QTBUG_5373", __FILE__, db)));
QVERIFY_SQL(q, exec("create schema " + qTableName("QTBUG_5373_s2", __FILE__, db)));
- QVERIFY_SQL(q, exec("create table " + qTableName("QTBUG_5373", __FILE__, db) + "." + qTableName("document", __FILE__, db) +
+ QVERIFY_SQL(q, exec("create table " + qTableName("QTBUG_5373", __FILE__, db) + QLatin1Char('.') + qTableName("document", __FILE__, db) +
"(document_id int primary key, relatingid int, userid int)"));
- QVERIFY_SQL(q, exec("create table " + qTableName("QTBUG_5373_s2", __FILE__, db) + "." + qTableName("user", __FILE__, db) +
+ QVERIFY_SQL(q, exec("create table " + qTableName("QTBUG_5373_s2", __FILE__, db) + QLatin1Char('.') + qTableName("user", __FILE__, db) +
"(userid int primary key, username char(40))"));
- model.setTable(qTableName("QTBUG_5373", __FILE__, db) + "." + qTableName("document", __FILE__, db));
- model.setRelation(1, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__, db) + "." + qTableName("user", __FILE__, db), "userid", "username"));
- model.setRelation(2, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__, db) + "." + qTableName("user", __FILE__, db), "userid", "username"));
+ model.setTable(qTableName("QTBUG_5373", __FILE__, db) + QLatin1Char('.') + qTableName("document", __FILE__, db));
+ model.setRelation(1, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__, db) + QLatin1Char('.') + qTableName("user", __FILE__, db), "userid", "username"));
+ model.setRelation(2, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__, db) + QLatin1Char('.') + qTableName("user", __FILE__, db), "userid", "username"));
QVERIFY_SQL(model, select());
model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
@@ -1485,7 +1480,7 @@ void tst_QSqlRelationalTableModel::selectAfterUpdate()
QSqlRelationalTableModel model(0, db);
model.setTable(reltest1);
- model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(2, QSqlRelation(reltest2, "id", "title"));
QVERIFY_SQL(model, select());
QCOMPARE(model.relationModel(2)->rowCount(), 2);
{
@@ -1515,14 +1510,14 @@ void tst_QSqlRelationalTableModel::relationOnFirstColumn()
//prepare test1 table
QSqlQuery q(db);
QVERIFY_SQL(q, exec("CREATE TABLE " + testTable1 + " (val1 INTEGER, id1 INTEGER PRIMARY KEY);"));
- QVERIFY_SQL(q, exec("DELETE FROM " + testTable1 + ";"));
+ QVERIFY_SQL(q, exec("DELETE FROM " + testTable1 + QLatin1Char(';')));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(1, 10);"));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(2, 20);"));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable1 + " (id1, val1) VALUES(3, 30);"));
//prepare test2 table
QVERIFY_SQL(q, exec("CREATE TABLE " + testTable2 + " (id INTEGER PRIMARY KEY, name TEXT);"));
- QVERIFY_SQL(q, exec("DELETE FROM " + testTable2 + ";"));
+ QVERIFY_SQL(q, exec("DELETE FROM " + testTable2 + QLatin1Char(';')));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (10, 'Hervanta');"));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (20, 'Keskusta');"));
QVERIFY_SQL(q, exec("INSERT INTO " + testTable2 + " (id, name) VALUES (30, 'Annala');"));
diff --git a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
index fedb41ba1d..2af39b341f 100644
--- a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsqltablemodel
SOURCES += tst_qsqltablemodel.cpp
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index 2ace79973b..bf76ed2bb6 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -1987,7 +1982,7 @@ void tst_QSqlTableModel::tableModifyWithBlank()
//set a filter on the table so the only record we get is the one we just made
//I could just do another setData command, but I want to make sure the TableModel
//matches exactly what is stored in the database
- model.setFilter("column1='"+timeString+"'"); //filter to get just the newly entered row
+ model.setFilter("column1='" + timeString + QLatin1Char('\'')); //filter to get just the newly entered row
QVERIFY_SQL(model, select());
//Make sure we only get one record, and that it is the one we just made