Ran into a weird situation.. I have to allow my customer to set the System Codec so when they load a file, it loads correctly.
However, in QA'ing the code, certain Text Codecs are causing a crash in QMessageBox (and presumably other widgets). 6 int main( int argc, char ** argv ) 7 { 8 QApplication appl( argc, argv ); 9 QString codecName = "UTF-8"; 10 if ( argc > 1 ) 11 codecName = argv[ 1 ]; 12 13 QTextCodec * codec = QTextCodec::codecForName( codecName.toAscii() ); 14 if ( !codec ) 15 { 16 QMessageBox::warning( NULL, argv[ 0 ], QString( "%1 not found" ).arg( codecName ) ); 17 return 1; 18 } 19 20 QTextCodec::setCodecForLocale( codec ); 21 QMessageBox::warning( NULL, argv[ 0 ], codecName ); 22 return 0; 23 } When called with UTF-32 I get the following crash: [scott@localhost build]$ ./CodecTest UTF-32 ** GConf:ERROR:gconf-client.c:2021:gconf_client_lookup: assertion failed: (last_slash != NULL) Aborted (core dumped) This is with Qt 4.7.4. Any Ideas? Thanks Scott
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest