summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/messagebox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/ui/messagebox.cpp')
-rw-r--r--certmanager/lib/ui/messagebox.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp
index 283d3310..ddce8f04 100644
--- a/certmanager/lib/ui/messagebox.cpp
+++ b/certmanager/lib/ui/messagebox.cpp
@@ -47,9 +47,9 @@
#include <ksavefile.h>
#include <kguiitem.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qvbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
using namespace Kleo;
using namespace GpgME;
@@ -71,40 +71,40 @@ static KGuiItem KGuiItem_showAuditLog() {
class AuditLogViewer : public KDialogBase {
// Q_OBJECT
public:
- explicit AuditLogViewer( const QString & log, QWidget * parent=0, const char * name=0, WFlags f=0 )
+ explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 )
: KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"),
Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ),
- m_textEdit( new QTextEdit( this, "m_textEdit" ) )
+ m_textEdit( new TQTextEdit( this, "m_textEdit" ) )
{
setWFlags( f );
setMainWidget( m_textEdit );
- m_textEdit->setTextFormat( QTextEdit::RichText );
+ m_textEdit->setTextFormat( TQTextEdit::RichText );
m_textEdit->setReadOnly( true );
setAuditLog( log );
}
~AuditLogViewer() {}
- void setAuditLog( const QString & log ) {
+ void setAuditLog( const TQString & log ) {
m_textEdit->setText( log );
}
private:
void slotUser1() {
- const QString fileName = KFileDialog::getSaveFileName( QString(), QString(),
+ const TQString fileName = KFileDialog::getSaveFileName( TQString(), TQString(),
this, i18n("Choose File to Save GnuPG Audit Log to") );
if ( fileName.isEmpty() )
return;
KSaveFile file( fileName );
- if ( QTextStream * const s = file.textStream() ) {
+ if ( TQTextStream * const s = file.textStream() ) {
*s << m_textEdit->text() << endl;
file.close();
}
if ( const int err = file.status() )
KMessageBox::error( this, i18n("Couldn't save to file \"%1\": %2")
- .arg( file.name(), QString::fromLocal8Bit( strerror( err ) ) ),
+ .arg( file.name(), TQString::fromLocal8Bit( strerror( err ) ) ),
i18n("File Save Error") );
}
void slotUser2() {
@@ -114,13 +114,13 @@ private:
}
private:
- QTextEdit * m_textEdit;
+ TQTextEdit * m_textEdit;
};
} // anon namespace
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & caption ) {
if ( !job )
return;
@@ -131,7 +131,7 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
return;
}
- const QString log = job->auditLogAsHtml();
+ const TQString log = job->auditLogAsHtml();
if ( log.isEmpty() ) {
KMessageBox::information( parent, i18n("No GnuPG Audit Log available for this operation."),
i18n("No GnuPG Audit Log") );
@@ -142,112 +142,112 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log, const TQString & caption ) {
AuditLogViewer * const alv = new AuditLogViewer( "<qt>" + log + "</qt>", parent, "alv", Qt::WDestructiveClose );
alv->setCaption( caption );
alv->show();
}
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job ) {
auditLog( parent, job, i18n("GnuPG Audit Log Viewer") );
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log ) {
auditLog( parent, log, i18n("GnuPG Audit Log Viewer") );
}
-static QString to_information_string( const SigningResult & result ) {
+static TQString to_information_string( const SigningResult & result ) {
return result.error()
- ? i18n("Signing failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Signing failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Signing successful") ;
}
-static QString to_error_string( const SigningResult & result ) {
+static TQString to_error_string( const SigningResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const EncryptionResult & result ) {
+static TQString to_information_string( const EncryptionResult & result ) {
return result.error()
- ? i18n("Encryption failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Encryption failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Encryption successful") ;
}
-static QString to_error_string( const EncryptionResult & result ) {
+static TQString to_error_string( const EncryptionResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult ) + '\n' + to_information_string( eresult );
}
-static QString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult, eresult );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Signing Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Signing Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
information( parent, sresult, eresult, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
error( parent, sresult, eresult, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Job * job, const QString & caption, int options ) {
+void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) {
KDialogBase * dialog = GpgME::hasFeature( GpgME::AuditLogFeature )
? new KDialogBase( caption, KDialogBase::Yes | KDialogBase::No,
KDialogBase::Yes, KDialogBase::Yes,
@@ -260,6 +260,6 @@ void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString &
if ( options & KMessageBox::PlainCaption )
dialog->setPlainCaption( caption );
- if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, QStringList(), QString::null, 0, options ) )
+ if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString::null, 0, options ) )
auditLog( 0, job );
}