diff --git a/CMakeLists.txt b/CMakeLists.txt index 78cc020..91dcc39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ include( ConfigureChecks.cmake ) ###### global compiler settings -add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) +add_definitions( -DHAVE_CONFIG_H ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) diff --git a/kbarcode/barcodedialog.cpp b/kbarcode/barcodedialog.cpp index 3971548..3919f74 100644 --- a/kbarcode/barcodedialog.cpp +++ b/kbarcode/barcodedialog.cpp @@ -151,7 +151,7 @@ void BarCodeDialog::save() bc.setTokenProvider( m_token ); bc.update( TQT_TQPAINTDEVICE(TDEApplication::desktop()) ); - if(!bc.pixmap().save( path, extension, 0 )) + if(!bc.pixmap().save( path, extension.utf8(), 0 )) KMessageBox::error( this, i18n("An error occurred during saving the image") ); } } diff --git a/kbarcode/barkode.cpp b/kbarcode/barkode.cpp index 337931f..82a9deb 100644 --- a/kbarcode/barkode.cpp +++ b/kbarcode/barkode.cpp @@ -605,8 +605,8 @@ const char* Barkode::typeFromName( const TQString & name ) { for( unsigned int i = 0; i < s_info.count(); i++ ) if( s_info[i].name == name ) - return s_info[i].xml; - + return s_info[i].xml.latin1(); + return NULL; } @@ -614,8 +614,8 @@ const char* Barkode::nameFromType( const TQString & type ) { for( unsigned int i = 0; i < s_info.count(); i++ ) if( s_info[i].xml == type ) - return s_info[i].name; - + return s_info[i].name.latin1(); + return NULL; } diff --git a/kbarcode/batchprinter.cpp b/kbarcode/batchprinter.cpp index 9bea56a..2188112 100644 --- a/kbarcode/batchprinter.cpp +++ b/kbarcode/batchprinter.cpp @@ -308,7 +308,7 @@ void BatchPrinter::startImages() c++; } - pixmap.save( filename, m_image_format ); + pixmap.save( filename, m_image_format.utf8() ); if( !checkProgressDialog( progress ) ) { diff --git a/kbarcode/definition.cpp b/kbarcode/definition.cpp index fcc1866..ec34b12 100644 --- a/kbarcode/definition.cpp +++ b/kbarcode/definition.cpp @@ -306,7 +306,7 @@ bool Definition::openFile() if( !TQFile::exists( fname ) || fname.isEmpty() ) return ( showFileError() ? openFile() : false ); - if(!filecopy( (const char*)fname, (const char*)f )) + if(!filecopy( fname.local8Bit(), f.local8Bit() )) return ( showFileError() ? openFile() : false ); } diff --git a/kbarcode/mimesources.cpp b/kbarcode/mimesources.cpp index 23278bb..4767f3f 100644 --- a/kbarcode/mimesources.cpp +++ b/kbarcode/mimesources.cpp @@ -47,7 +47,7 @@ class DragCommand : public NewItemCommand { DocumentItemDrag::DocumentItemDrag( TQWidget* dragSource, const char* name ) - : TQStoredDrag( DocumentItemDrag::mimeType(), dragSource, name ) + : TQStoredDrag( DocumentItemDrag::mimeType().latin1(), dragSource, name ) { } @@ -83,12 +83,12 @@ void DocumentItemDrag::setDocumentItem( DocumentItemList* list ) bool DocumentItemDrag::canDecode( TQMimeSource* e ) { - return e->provides( DocumentItemDrag::mimeType() ); + return e->provides( DocumentItemDrag::mimeType().latin1() ); } bool DocumentItemDrag::decode( TQMimeSource* mime, MyCanvasView* cv, TokenProvider* token, KCommandHistory* history ) { - TQByteArray data = mime->encodedData( DocumentItemDrag::mimeType() ); + TQByteArray data = mime->encodedData( DocumentItemDrag::mimeType().latin1() ); TQDomDocument doc( "KBarcodeClipboard" ); if( !doc.setContent( data ) ) return false; diff --git a/kbarcode/pixmapbarcode.cpp b/kbarcode/pixmapbarcode.cpp index dbe3a62..785441b 100644 --- a/kbarcode/pixmapbarcode.cpp +++ b/kbarcode/pixmapbarcode.cpp @@ -248,7 +248,7 @@ TQRect PixmapBarcode::bbox( const char* data, long size ) if( text.startsWith( bbox ) ) { text = text.right( text.length() - len ); - sscanf( (const char*)text, "%d %d %d %d", &x, &y, &w, &h ); + sscanf( text.latin1(), "%d %d %d %d", &x, &y, &w, &h ); s = TQRect( x, y, w, h ); break; } diff --git a/kbarcode/purepostscript.cpp b/kbarcode/purepostscript.cpp index 0afc45e..3395dec 100644 --- a/kbarcode/purepostscript.cpp +++ b/kbarcode/purepostscript.cpp @@ -160,7 +160,7 @@ void PurePostscriptBarcode::initInfo( TBarcodeInfoList* info ) example = line.right( line.length() - TQString( EXAMPLE ).length() ); // we should have a complete encoder now. - info->append( Barkode::createInfo( TQString("ps_") + encoder, description, PURE_POSTSCRIPT, PUREADV | COLORED ) ); + info->append( Barkode::createInfo( TQString("ps_%1").arg(encoder).latin1(), description, PURE_POSTSCRIPT, PUREADV | COLORED ) ); } } } diff --git a/kbarcode/tec.cpp b/kbarcode/tec.cpp index 9cdfbc1..6d6dfa5 100644 --- a/kbarcode/tec.cpp +++ b/kbarcode/tec.cpp @@ -215,7 +215,7 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr TQString convZeros( int count, int zeros ) { TQString str= TQString("%1").arg(count); -int l=strlen(str); //get the string length +int l=strlen(str.latin1()); //get the string length for(;l