summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_databases.h')
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h43
1 files changed, 19 insertions, 24 deletions
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();
}