From aca58384d909cd450bae59a6f46679d8cbb3606a Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Mon, 2 Nov 2020 22:33:43 +0100 Subject: Added controlled conversions to char* instead of automatic ascii conversions. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 2c73ccdf45212ab2a43582955be0eff21c70f971) --- src/itemdocument.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/itemdocument.cpp') diff --git a/src/itemdocument.cpp b/src/itemdocument.cpp index 9a73877..7ed27dd 100644 --- a/src/itemdocument.cpp +++ b/src/itemdocument.cpp @@ -811,7 +811,7 @@ void ItemDocument::exportToImage() // we need an object so we can retrieve which image type was selected by the user // so setup the filedialog. - KFileDialog exportDialog(TQString(), "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image"), true, cropCheck); + KFileDialog exportDialog(TQString(), "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image").utf8(), true, cropCheck); exportDialog.setOperationMode( KFileDialog::Saving ); // now actually show it @@ -911,21 +911,25 @@ void ItemDocument::exportToImage() if ( cropCheck->isChecked() ) { if( type == "SVG" ) - saveResult = dynamic_cast(outputImage)->save( url.path(), type); + saveResult = dynamic_cast(outputImage)->save(url.path(), type.utf8()); else { TQImage img = dynamic_cast(outputImage)->convertToImage(); img = img.copy(cropArea); - saveResult = img.save(url.path(),type); + saveResult = img.save(url.path(), type.utf8()); } } else { if ( type=="SVG" ) - saveResult = dynamic_cast(outputImage)->save( url.path(), type ); + { + saveResult = dynamic_cast(outputImage)->save(url.path(), type.utf8()); + } else - saveResult = dynamic_cast(outputImage)->save( url.path(), type ); + { + saveResult = dynamic_cast(outputImage)->save(url.path(), type.utf8()); + } } //if(saveResult == true) KMessageBox::information( this, i18n("Sucessfully exported to \"%1\"").arg( url.filename() ), i18n("Image Export") ); -- cgit v1.2.3