@ -32,7 +32,7 @@
# include <qcombobox.h>
# include <qcombobox.h>
# include <qpainter.h>
# include <qpainter.h>
# include <qpen.h>
# include <qpen.h>
# include <q3filedialog.h >
# include <QFileDialog >
# include <qmessagebox.h>
# include <qmessagebox.h>
# include <qtoolbutton.h>
# include <qtoolbutton.h>
//Added by qt3to4:
//Added by qt3to4:
@ -260,7 +260,7 @@ Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Stand
void CEditEntryDlg : : OnNewAttachment ( )
void CEditEntryDlg : : OnNewAttachment ( )
{
{
QString filename = Q3 FileDialog : : getOpenFileName ( QDir : : homeDirPath ( ) , " " , this , QString : : fromUtf8 ( " Anhang hinzufügen... " ) ) ;
QString filename = QFileDialog : : getOpenFileName ( this , tr ( " Add Attachment... " ) , QDir : : homeDirPath ( ) ) ;
if ( filename = = " " ) return ;
if ( filename = = " " ) return ;
QFile file ( filename ) ;
QFile file ( filename ) ;
if ( file . open ( QIODevice : : ReadOnly ) = = false ) {
if ( file . open ( QIODevice : : ReadOnly ) = = false ) {
@ -294,8 +294,11 @@ saveAttachment(entry,this);
void CEditEntryDlg : : saveAttachment ( CEntry * pEntry , QWidget * ParentWidget )
void CEditEntryDlg : : saveAttachment ( CEntry * pEntry , QWidget * ParentWidget )
{
{
QString filename = Q3FileDialog : : getSaveFileName ( QDir : : homeDirPath ( ) , " " , ParentWidget , tr ( " Save Attachment... " ) ) ;
QFileDialog FileDlg ( ParentWidget , tr ( " Save Attachment... " ) , QDir : : homeDirPath ( ) ) ;
if ( filename = = " " ) return ;
FileDlg . selectFile ( pEntry - > BinaryDesc ) ;
FileDlg . setAcceptMode ( QFileDialog : : AcceptSave ) ;
if ( ! FileDlg . exec ( ) ) return ;
QString filename = FileDlg . selectedFiles ( ) [ 0 ] ;
QFile file ( filename ) ;
QFile file ( filename ) ;
if ( file . exists ( ) ) {
if ( file . exists ( ) ) {
int r = QMessageBox : : warning ( ParentWidget , tr ( " Overwrite? " ) , tr ( " A file with this name already exists. \n Do you want to replace it? " ) , tr ( " Yes " ) , tr ( " No " ) , NULL , 1 , 1 ) ;
int r = QMessageBox : : warning ( ParentWidget , tr ( " Overwrite? " ) , tr ( " A file with this name already exists. \n Do you want to replace it? " ) , tr ( " Yes " ) , tr ( " No " ) , NULL , 1 , 1 ) ;