Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, April 2008
QSqlTableModel broken in 4.4.0-rc1 ?


Message 1 in thread

Is it just me or do others also experience that QSqlTableModel is broken in
4.0.0-rc1?

I have several programs that work without problem in 4.3.4, but fail in
4.4.0-rc1.

 

Env is PostgreSQL, Windows XP, VC2005+SP1.

 

The code goes along this pattern:

 

setTable(tablename)

setHeaderData(.) // for every column

setSort(.)

setEditStrategy(.)

select() // <--- here it fails 

 

The select statement fails with "Unable to find table <tablename>"

 

Regards,

Acenes


Message 2 in thread

Followup:

Actually the failure happens allready in setTable().
Tracking down I came to QSqlDatabase::record() where it tries to get a
record from the driver as:

   return d->driver->record(tablename)

Unfortunately I cannot debug further into that code, probably because the
driver is a plugin?
Anyway what is returned is an empty record without any columns.
So this could more be an issue of the prostgre driver that of the table
model.

Regards,
Acenes

--
 [ signature omitted ] 

Message 3 in thread

Acenes wrote:

> Followup:
> 
> Actually the failure happens allready in setTable().
> Tracking down I came to QSqlDatabase::record() where it tries to get a
> record from the driver as:
> 
>    return d->driver->record(tablename)
> 
> Unfortunately I cannot debug further into that code, probably because the
> driver is a plugin?
> Anyway what is returned is an empty record without any columns.
> So this could more be an issue of the prostgre driver that of the table
> model.

I'm using the sqlite driver and didn't notice any brokenness moving from the
beta to rc1.

--
 [ signature omitted ]