PDA

View Full Version : Q3ValueList Problem



batileon
21st October 2008, 12:21
While porting code from QT3 to QT4, I found that my program terminated unexpectedly, and the screen shows the following line:

ASSERT: "i < this->size()" in file /usr/local/Trolltech/Qt-4.4.0/include/Qt/q3valuelist.h, line 201

actually the program is running the following line:

Q3ValueListIterator <TransactionHistory> itr = m_transaction_history.at( sequenceNo );

where

Q3ValueList <TransactionHistory> m_transaction_history;
int sequenceNo;

and "TransactionHistory" is a self defined class which hold some int values

after dumping the details, I found that the size of m_transaction_history is 0 and sequenceNo is 0 too.
In previous version(QT3), the line work fine......

Can anyone tell me what's happening and how can I solve this?

maverick_pol
22nd October 2008, 08:50
Where do you assign data to these variables:


Q3ValueList <TransactionHistory> m_transaction_history;
int sequenceNo;


and/or fill the q3valuelist with data ?