diff options
| author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2023-02-28 20:50:39 +0100 |
|---|---|---|
| committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2023-03-06 15:06:07 +0100 |
| commit | 28d5da386fa94c173de5726bd27319860e26ce96 (patch) | |
| tree | 6177c9271be3d8aaf7d3b7791c62775d50626197 /tests/auto/sql/kernel/qsqldatabase/tst_databases.h | |
| parent | 5123645831157d6e83fdc85867f778c5073d5082 (diff) | |
SQL/Tests: remove some unused functions
remove toHex() as it's not used at all and qTableName() with two params.
Also remove some SQLite 2 specific stuff
Change-Id: If285febdfbee5833f7174d70f386bd54674bd539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_databases.h')
| -rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_databases.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index 3110ae9dd63..8b1f443ae82 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -70,32 +70,6 @@ inline static QString qTableName(const QString &prefix, const char *sourceFileNa return escape ? db.driver()->escapeIdentifier(tableStr, QSqlDriver::TableName) : tableStr; } -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 + QLatin1Char('_') + - qGetHostName(), QSqlDriver::TableName)),db); -} - -inline static QString toHex( const QString& binary ) -{ - QString str; - static char const hexchars[] = "0123456789ABCDEF"; - - for ( int i = 0; i < binary.size(); i++ ) { - ushort code = binary.at(i).unicode(); - str += (QChar)(hexchars[ (code >> 12) & 0x0F ]); - str += (QChar)(hexchars[ (code >> 8) & 0x0F ]); - str += (QChar)(hexchars[ (code >> 4) & 0x0F ]); - str += (QChar)(hexchars[ code & 0x0F ]); - } - - return str; -} - - class tst_Databases { |
