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-02 22:33:47 +0100
commit2c73ccdf45212ab2a43582955be0eff21c70f971 (patch)
tree4754dd610c96338dc39ca60e38a7e794ef6c6966 /src/itemdocument.cpp
parentf23df438132393cf20cb93f9922325dc49792573 (diff)
downloadktechlab-2c73ccdf45212ab2a43582955be0eff21c70f971.tar.gz
ktechlab-2c73ccdf45212ab2a43582955be0eff21c70f971.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>
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") );