@@ -75,8 +75,8 @@ void DBBrowserDB::collationNeeded(void* /*pData*/, sqlite3* /*db*/, int eTextRep
7575static void regexp (sqlite3_context* ctx, int /* argc*/ , sqlite3_value* argv[])
7676{
7777 // Get arguments and check their values
78- QRegExp arg1 (( const char *) sqlite3_value_text (argv[0 ]));
79- QString arg2 (( const char *) sqlite3_value_text (argv[1 ]));
78+ QRegExp arg1 (reinterpret_cast < const char *>( sqlite3_value_text (argv[0 ]) ));
79+ QString arg2 (reinterpret_cast < const char *>( sqlite3_value_text (argv[1 ]) ));
8080 if (!arg1.isValid ())
8181 return sqlite3_result_error (ctx, " invalid operand" , -1 );
8282
@@ -194,10 +194,10 @@ bool DBBrowserDB::attach(const QString& filePath, QString attach_as)
194194 QFileInfo fi (filePath);
195195 while (sqlite3_step (db_vm) == SQLITE_ROW)
196196 {
197- QFileInfo path (QString::fromUtf8 (( const char *) sqlite3_column_text (db_vm, 2 )));
197+ QFileInfo path (QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (db_vm, 2 ) )));
198198 if (fi == path)
199199 {
200- QString schema = QString::fromUtf8 (( const char *) sqlite3_column_text (db_vm, 1 ));
200+ QString schema = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (db_vm, 1 ) ));
201201 QMessageBox::information (nullptr , qApp->applicationName (), tr (" This database has already been attached. Its schema name is '%1'." ).arg (schema));
202202 return false ;
203203 }
@@ -748,7 +748,7 @@ bool DBBrowserDB::dump(const QString& filePath,
748748 int fieldsize = sqlite3_column_bytes (stmt, i);
749749 int fieldtype = sqlite3_column_type (stmt, i);
750750 QByteArray bcontent (
751- ( const char *) sqlite3_column_blob (stmt, i),
751+ reinterpret_cast < const char *>( sqlite3_column_blob (stmt, i) ),
752752 fieldsize);
753753
754754 if (bcontent.left (2048 ).contains (' \0 ' )) // binary check
@@ -1655,7 +1655,7 @@ void DBBrowserDB::updateSchema()
16551655 while (sqlite3_step (db_vm) == SQLITE_ROW)
16561656 {
16571657 // Get the schema name which is in column 1 (counting starts with 0). 0 contains an ID and 2 the file path.
1658- QString schema_name = QString::fromUtf8 (( const char *) sqlite3_column_text (db_vm, 1 ));
1658+ QString schema_name = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (db_vm, 1 ) ));
16591659
16601660 // Always add the schema to the map. This makes sure it's even then added when there are no objects in the database
16611661 schemata[schema_name] = objectMap ();
@@ -1676,10 +1676,10 @@ void DBBrowserDB::updateSchema()
16761676 {
16771677 while (sqlite3_step (vm) == SQLITE_ROW)
16781678 {
1679- QString val_type = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 0 ));
1680- QString val_name = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 1 ));
1681- QString val_sql = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 2 ));
1682- QString val_tblname = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 3 ));
1679+ QString val_type = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 0 ) ));
1680+ QString val_name = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 1 ) ));
1681+ QString val_sql = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 2 ) ));
1682+ QString val_tblname = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 3 ) ));
16831683 val_sql.replace (" \r " , " " );
16841684
16851685 if (!val_sql.isEmpty ())
@@ -1864,8 +1864,8 @@ QVector<QPair<QString, QString>> DBBrowserDB::queryColumnInformation(const QStri
18641864 {
18651865 while (sqlite3_step (vm) == SQLITE_ROW)
18661866 {
1867- QString name = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 1 ));
1868- QString type = QString::fromUtf8 (( const char *) sqlite3_column_text (vm, 2 ));
1867+ QString name = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 1 ) ));
1868+ QString type = QString::fromUtf8 (reinterpret_cast < const char *>( sqlite3_column_text (vm, 2 ) ));
18691869
18701870 result.push_back (qMakePair (name, type));
18711871 }
0 commit comments