Ok, I have a problem that is driving me crazy and I cannot find a way to fix it. In my header I have these declarations:
QRegExpValidator* validatorFloat;
QRegExpValidator* validatorCenaNaEnoto;
QRegExpValidator* validatorZadnjiZnakSifre;
To copy to clipboard, switch view to plain text mode
In source file I have this code:
validatorZadnjiZnakSifre
->setRegExp
(QRegExp("[0-9A-Za-z]"));
ui->ZadnjiZnakSifreEdit->setValidator(validatorZadnjiZnakSifre);
validatorCenaNaEnoto
->setRegExp
(QRegExp("[0-9]{1,6}[.,]{0,1}[0-9]{0,2}"));
ui->CenaNaEnotoEdit->setValidator(validatorCenaNaEnoto);
validatorFloat
->setRegExp
(QRegExp("[0-9]{1,10}[.,]{0,1}[0-9]{0,6}"));
ui->FaktorPretvorbeEnotEdit->setValidator(validatorFloat);
ui->KolicinaEdit->setValidator(validatorFloat);
validatorZadnjiZnakSifre=new QRegExpValidator(this);
validatorZadnjiZnakSifre->setRegExp(QRegExp("[0-9A-Za-z]"));
ui->ZadnjiZnakSifreEdit->setValidator(validatorZadnjiZnakSifre);
validatorCenaNaEnoto=new QRegExpValidator(this);
validatorCenaNaEnoto->setRegExp(QRegExp("[0-9]{1,6}[.,]{0,1}[0-9]{0,2}"));
ui->CenaNaEnotoEdit->setValidator(validatorCenaNaEnoto);
validatorFloat=new QRegExpValidator(this);
validatorFloat->setRegExp(QRegExp("[0-9]{1,10}[.,]{0,1}[0-9]{0,6}"));
ui->FaktorPretvorbeEnotEdit->setValidator(validatorFloat);
ui->KolicinaEdit->setValidator(validatorFloat);
To copy to clipboard, switch view to plain text mode
When exiting program I get this message in debugger:
Heap block at 095C6DE0 modified at 095C6E24 past requested size of 3c
Heap block at 095C6DE0 modified at 095C6E24 past requested size of 3c
To copy to clipboard, switch view to plain text mode
When I comment out above mentioned lines in source file, then I dont get these message. How can I solve this problem? I tried all approaches that I can think of, but nothing helps. Is there a memory leak in Qt 4.6?
Bookmarks