diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /certmanager/lib/ui/messagebox.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/ui/messagebox.cpp')
-rw-r--r-- | certmanager/lib/ui/messagebox.cpp | 89 |
1 files changed, 45 insertions, 44 deletions
diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp index c209ff676..824600f17 100644 --- a/certmanager/lib/ui/messagebox.cpp +++ b/certmanager/lib/ui/messagebox.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -75,9 +75,10 @@ static KGuiItem KGuiItem_showAuditLog() { class AuditLogViewer : public KDialogBase { // Q_OBJECT + TQ_OBJECT public: - explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 ) - : KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"), + explicit AuditLogViewer( const TQString & log, TQWidget * tqparent=0, const char * name=0, WFlags f=0 ) + : KDialogBase( tqparent, name, false, i18n("View GnuPG Audit Log"), Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ), m_log( /* sic */ ), m_textEdit( new TQTextEdit( this, "m_textEdit" ) ) @@ -143,13 +144,13 @@ private: } // anon namespace // static -void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & caption ) { +void MessageBox::auditLog( TQWidget * tqparent, const Job * job, const TQString & caption ) { if ( !job ) return; if ( !GpgME::hasFeature( AuditLogFeature ) || !job->isAuditLogSupported() ) { - KMessageBox::information( parent, i18n("Your system does not have support for GnuPG Audit Logs"), + KMessageBox::information( tqparent, i18n("Your system does not have support for GnuPG Audit Logs"), i18n("System Error") ); return; } @@ -157,7 +158,7 @@ void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & const GpgME::Error err = job->auditLogError(); if ( err.code() != GPG_ERR_NO_DATA ) { - KMessageBox::information( parent, i18n("An error occurred while trying to retrieve the GnuPG Audit Log:\n%1") + KMessageBox::information( tqparent, i18n("An error occurred while trying to retrieve the GnuPG Audit Log:\n%1") .arg( TQString::fromLocal8Bit( err.asString() ) ), i18n("GnuPG Audit Log Error") ); return; @@ -166,29 +167,29 @@ void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & const TQString log = job->auditLogAsHtml(); if ( log.isEmpty() ) { - KMessageBox::information( parent, i18n("No GnuPG Audit Log available for this operation."), + KMessageBox::information( tqparent, i18n("No GnuPG Audit Log available for this operation."), i18n("No GnuPG Audit Log") ); return; } - auditLog( parent, log, caption ); + auditLog( tqparent, log, caption ); } // static -void MessageBox::auditLog( TQWidget * parent, const TQString & log, const TQString & caption ) { - AuditLogViewer * const alv = new AuditLogViewer( log, parent, "alv", Qt::WDestructiveClose ); +void MessageBox::auditLog( TQWidget * tqparent, const TQString & log, const TQString & caption ) { + AuditLogViewer * const alv = new AuditLogViewer( log, tqparent, "alv", TQt::WDestructiveClose ); alv->setCaption( caption ); alv->show(); } // static -void MessageBox::auditLog( TQWidget * parent, const Job * job ) { - auditLog( parent, job, i18n("GnuPG Audit Log Viewer") ); +void MessageBox::auditLog( TQWidget * tqparent, const Job * job ) { + auditLog( tqparent, job, i18n("GnuPG Audit Log Viewer") ); } // static -void MessageBox::auditLog( TQWidget * parent, const TQString & log ) { - auditLog( parent, log, i18n("GnuPG Audit Log Viewer") ); +void MessageBox::auditLog( TQWidget * tqparent, const TQString & log ) { + auditLog( tqparent, log, i18n("GnuPG Audit Log Viewer") ); } static TQString to_information_string( const SigningResult & result ) { @@ -220,63 +221,63 @@ static TQString to_error_string( const SigningResult & sresult, const Encryption } // static -void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, int options ) { - information( parent, result, job, i18n("Signing Result"), options ); +void MessageBox::information( TQWidget * tqparent, const SigningResult & result, const Job * job, int options ) { + information( tqparent, result, job, i18n("Signing Result"), options ); } // static -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 ); +void MessageBox::information( TQWidget * tqparent, const SigningResult & result, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Information, to_information_string( result ), job, caption, options ); } // static -void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, int options ) { - error( parent, result, job, i18n("Signing Error"), options ); +void MessageBox::error( TQWidget * tqparent, const SigningResult & result, const Job * job, int options ) { + error( tqparent, result, job, i18n("Signing Error"), options ); } // static -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 ); +void MessageBox::error( TQWidget * tqparent, const SigningResult & result, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Critical, to_error_string( result ), job, caption, options ); } // static -void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) { - information( parent, result, job, i18n("Encryption Result"), options ); +void MessageBox::information( TQWidget * tqparent, const EncryptionResult & result, const Job * job, int options ) { + information( tqparent, result, job, i18n("Encryption Result"), options ); } // static -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 ); +void MessageBox::information( TQWidget * tqparent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Information, to_information_string( result ), job, caption, options ); } // static -void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) { - error( parent, result, job, i18n("Encryption Error"), options ); +void MessageBox::error( TQWidget * tqparent, const EncryptionResult & result, const Job * job, int options ) { + error( tqparent, result, job, i18n("Encryption Error"), options ); } // static -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 ); +void MessageBox::error( TQWidget * tqparent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Critical, to_error_string( result ), job, caption, options ); } // static -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 ); +void MessageBox::information( TQWidget * tqparent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { + information( tqparent, sresult, eresult, job, i18n("Encryption Result"), options ); } // static -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 ); +void MessageBox::information( TQWidget * tqparent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options ); } // static -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 ); +void MessageBox::error( TQWidget * tqparent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { + error( tqparent, sresult, eresult, job, i18n("Encryption Error"), options ); } // static -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 ); +void MessageBox::error( TQWidget * tqparent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) { + make( tqparent, TQMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options ); } // static @@ -306,19 +307,19 @@ bool MessageBox::showAuditLogButton( const Kleo::Job * job ) { // static -void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) { +void MessageBox::make( TQWidget * tqparent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) { KDialogBase * dialog = showAuditLogButton( job ) ? new KDialogBase( caption, KDialogBase::Yes | KDialogBase::No, KDialogBase::Yes, KDialogBase::Yes, - parent, "error", true, true, + tqparent, "error", true, true, KStdGuiItem::ok(), KGuiItem_showAuditLog() ) : new KDialogBase( caption, KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, - parent, "error", true, true, + tqparent, "error", true, true, KStdGuiItem::ok() ) ; if ( options & KMessageBox::PlainCaption ) dialog->setPlainCaption( caption ); - if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString::null, 0, options ) ) + if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString(), 0, options ) ) auditLog( 0, job ); } |