summaryrefslogtreecommitdiffstats
path: root/src/itemdocument.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-11-02 22:33:43 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-11-05 18:50:24 +0100
commitaca58384d909cd450bae59a6f46679d8cbb3606a (patch)
tree570e5f599175ac15434d0c87a5a4173a3ade0c55 /src/itemdocument.cpp
parent26de10618a0767658160762b87f1ec2c9c1cbc26 (diff)
downloadktechlab-aca58384d909cd450bae59a6f46679d8cbb3606a.tar.gz
ktechlab-aca58384d909cd450bae59a6f46679d8cbb3606a.zip
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 2c73ccdf45212ab2a43582955be0eff21c70f971)
Diffstat (limited to 'src/itemdocument.cpp')
-rw-r--r--src/itemdocument.cpp14
1 files changed, 9 insertions, 5 deletions
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<TQPicture*>(outputImage)->save( url.path(), type);
+ saveResult = dynamic_cast<TQPicture*>(outputImage)->save(url.path(), type.utf8());
else
{
TQImage img = dynamic_cast<TQPixmap*>(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<TQPicture*>(outputImage)->save( url.path(), type );
+ {
+ saveResult = dynamic_cast<TQPicture*>(outputImage)->save(url.path(), type.utf8());
+ }
else
- saveResult = dynamic_cast<TQPixmap*>(outputImage)->save( url.path(), type );
+ {
+ saveResult = dynamic_cast<TQPixmap*>(outputImage)->save(url.path(), type.utf8());
+ }
}
//if(saveResult == true) KMessageBox::information( this, i18n("Sucessfully exported to \"%1\"").arg( url.filename() ), i18n("Image Export") );