summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkpgp/kpgpui.cpp')
-rw-r--r--libkpgp/kpgpui.cpp450
1 files changed, 225 insertions, 225 deletions
diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp
index 7483bb0c9..e0d5bee27 100644
--- a/libkpgp/kpgpui.cpp
+++ b/libkpgp/kpgpui.cpp
@@ -18,19 +18,19 @@
//#include <stdio.h>
-#include <qvgroupbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
+#include <tqvgroupbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kpassdlg.h>
@@ -58,31 +58,31 @@ const int Kpgp::KeySelectionDialog::sCheckSelectionDelay = 250;
namespace Kpgp {
-PassphraseDialog::PassphraseDialog( QWidget *parent,
- const QString &caption, bool modal,
- const QString &keyID )
+PassphraseDialog::PassphraseDialog( TQWidget *parent,
+ const TQString &caption, bool modal,
+ const TQString &keyID )
:KDialogBase( parent, 0, modal, caption, Ok|Cancel )
{
- QHBox *hbox = makeHBoxMainWidget();
+ TQHBox *hbox = makeHBoxMainWidget();
hbox->setSpacing( spacingHint() );
hbox->setMargin( marginHint() );
- QLabel *label = new QLabel(hbox);
+ TQLabel *label = new TQLabel(hbox);
label->setPixmap( BarIcon("pgp-keys") );
- QWidget *rightArea = new QWidget( hbox );
- QVBoxLayout *vlay = new QVBoxLayout( rightArea, 0, spacingHint() );
+ TQWidget *rightArea = new TQWidget( hbox );
+ TQVBoxLayout *vlay = new TQVBoxLayout( rightArea, 0, spacingHint() );
if (keyID.isNull())
- label = new QLabel(i18n("Please enter your OpenPGP passphrase:"),rightArea);
+ label = new TQLabel(i18n("Please enter your OpenPGP passphrase:"),rightArea);
else
- label = new QLabel(i18n("Please enter the OpenPGP passphrase for\n\"%1\":").arg(keyID),
+ label = new TQLabel(i18n("Please enter the OpenPGP passphrase for\n\"%1\":").arg(keyID),
rightArea);
lineedit = new KPasswordEdit( rightArea );
- lineedit->setEchoMode(QLineEdit::Password);
+ lineedit->setEchoMode(TQLineEdit::Password);
lineedit->setMinimumWidth( fontMetrics().maxWidth()*20 );
lineedit->setFocus();
- connect( lineedit, SIGNAL(returnPressed()), this, SLOT(slotOk()) );
+ connect( lineedit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotOk()) );
vlay->addWidget( label );
vlay->addWidget( lineedit );
@@ -104,40 +104,40 @@ const char * PassphraseDialog::passphrase()
// ------------------------------------------------------------------------
// Forbidden accels for KMail: AC GH OP
// for KNode: ACE H O
-Config::Config( QWidget *parent, const char *name, bool encrypt )
- : QWidget( parent, name ), pgp( Module::getKpgp() )
+Config::Config( TQWidget *parent, const char *name, bool encrypt )
+ : TQWidget( parent, name ), pgp( Module::getKpgp() )
{
- QGroupBox * group;
- QLabel * label;
- QString msg;
+ TQGroupBox * group;
+ TQLabel * label;
+ TQString msg;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- group = new QVGroupBox( i18n("Warning"), this );
+ group = new TQVGroupBox( i18n("Warning"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
// (mmutz) work around Qt label bug in 3.0.0 (and possibly later):
// 1. Don't use rich text: No <qt><b>...</b></qt>
- label = new QLabel( i18n("Please check if encryption really "
+ label = new TQLabel( i18n("Please check if encryption really "
"works before you start using it seriously. Also note that attachments "
"are not encrypted by the PGP/GPG module."), group );
// 2. instead, set the font to bold:
- QFont labelFont = label->font();
+ TQFont labelFont = label->font();
labelFont.setBold( true );
label->setFont( labelFont );
// 3. and activate wordwarp:
label->setAlignment( AlignLeft|WordBreak );
// end; to remove the workaround, add <qt><b>..</b></qt> around the
- // text and remove lines QFont... -> label->setAlignment(...).
+ // text and remove lines TQFont... -> label->setAlignment(...).
topLayout->addWidget( group );
- group = new QVGroupBox( i18n("Encryption Tool"), this );
+ group = new TQVGroupBox( i18n("Encryption Tool"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- QHBox * hbox = new QHBox( group );
- label = new QLabel( i18n("Select encryption tool to &use:"), hbox );
- toolCombo = new QComboBox( false, hbox );
- toolCombo->insertStringList( QStringList()
+ TQHBox * hbox = new TQHBox( group );
+ label = new TQLabel( i18n("Select encryption tool to &use:"), hbox );
+ toolCombo = new TQComboBox( false, hbox );
+ toolCombo->insertStringList( TQStringList()
<< i18n("Autodetect")
<< i18n("GnuPG - Gnu Privacy Guard")
<< i18n("PGP Version 2.x")
@@ -146,18 +146,18 @@ Config::Config( QWidget *parent, const char *name, bool encrypt )
<< i18n("Do not use any encryption tool") );
label->setBuddy( toolCombo );
hbox->setStretchFactor( toolCombo, 1 );
- connect( toolCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( toolCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
// This is the place to add a KURLRequester to be used for asking
// the user for the path to the executable...
topLayout->addWidget( group );
- mpOptionsGroupBox = new QVGroupBox( i18n("Options"), this );
+ mpOptionsGroupBox = new TQVGroupBox( i18n("Options"), this );
mpOptionsGroupBox->layout()->setSpacing( KDialog::spacingHint() );
- storePass = new QCheckBox( i18n("&Keep passphrase in memory"),
+ storePass = new TQCheckBox( i18n("&Keep passphrase in memory"),
mpOptionsGroupBox );
- connect( storePass, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( storePass, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the passphrase of your "
"private key will be remembered by the application as long "
"as the application is running. Thus you will only have to "
@@ -169,46 +169,46 @@ Config::Config( QWidget *parent, const char *name, bool encrypt )
"<p>Note that when using KMail, this setting only applies "
"if you are not using gpg-agent. It is also ignored "
"if you are using crypto plugins.</p></qt>" );
- QWhatsThis::add( storePass, msg );
+ TQWhatsThis::add( storePass, msg );
if( encrypt ) {
- encToSelf = new QCheckBox( i18n("Always encr&ypt to self"),
+ encToSelf = new TQCheckBox( i18n("Always encr&ypt to self"),
mpOptionsGroupBox );
- connect( encToSelf, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( encToSelf, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the message/file "
"will not only be encrypted with the receiver's public key, "
"but also with your key. This will enable you to decrypt the "
"message/file at a later time. This is generally a good idea."
"</p></qt>" );
- QWhatsThis::add( encToSelf, msg );
+ TQWhatsThis::add( encToSelf, msg );
}
else
encToSelf = 0;
- showCipherText = new QCheckBox( i18n("&Show signed/encrypted text after "
+ showCipherText = new TQCheckBox( i18n("&Show signed/encrypted text after "
"composing"),
mpOptionsGroupBox );
- connect( showCipherText, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( showCipherText, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the signed/encrypted text "
"will be shown in a separate window, enabling you to know how "
"it will look before it is sent. This is a good idea when "
"you are verifying that your encryption system works.</p></qt>" );
- QWhatsThis::add( showCipherText, msg );
+ TQWhatsThis::add( showCipherText, msg );
if( encrypt ) {
- showKeyApprovalDlg = new QCheckBox( i18n("Always show the encryption "
+ showKeyApprovalDlg = new TQCheckBox( i18n("Always show the encryption "
"keys &for approval"),
mpOptionsGroupBox );
- connect( showKeyApprovalDlg, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( showKeyApprovalDlg, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the application will "
"always show you a list of public keys from which you can "
"choose the one it will use for encryption. If it is off, "
"the application will only show the dialog if it cannot find "
"the right key or if there are several which could be used. "
"</p></qt>" );
- QWhatsThis::add( showKeyApprovalDlg, msg );
+ TQWhatsThis::add( showKeyApprovalDlg, msg );
}
else
showKeyApprovalDlg = 0;
@@ -280,13 +280,13 @@ Config::applySettings()
// ------------------------------------------------------------------------
KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
- const QString& title,
- const QString& text,
+ const TQString& title,
+ const TQString& text,
const KeyIDList& keyIds,
const bool rememberChoice,
const unsigned int allowedKeys,
const bool extendedSelection,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, title, Default|Ok|Cancel, Ok ),
mRememberCB( 0 ),
@@ -299,58 +299,58 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
KConfig *config = pgp->getConfig();
KConfigGroup dialogConfig( config, "Key Selection Dialog" );
- QSize defaultSize( 580, 400 );
- QSize dialogSize = dialogConfig.readSizeEntry( "Dialog size", &defaultSize );
+ TQSize defaultSize( 580, 400 );
+ TQSize dialogSize = dialogConfig.readSizeEntry( "Dialog size", &defaultSize );
resize( dialogSize );
- mCheckSelectionTimer = new QTimer( this, "mCheckSelectionTimer" );
- mStartSearchTimer = new QTimer( this, "mStartSearchTimer" );
+ mCheckSelectionTimer = new TQTimer( this, "mCheckSelectionTimer" );
+ mStartSearchTimer = new TQTimer( this, "mStartSearchTimer" );
// load the key status icons
- mKeyGoodPix = new QPixmap( UserIcon("key_ok") );
- mKeyBadPix = new QPixmap( UserIcon("key_bad") );
- mKeyUnknownPix = new QPixmap( UserIcon("key_unknown") );
- mKeyValidPix = new QPixmap( UserIcon("key") );
+ mKeyGoodPix = new TQPixmap( UserIcon("key_ok") );
+ mKeyBadPix = new TQPixmap( UserIcon("key_bad") );
+ mKeyUnknownPix = new TQPixmap( UserIcon("key_unknown") );
+ mKeyValidPix = new TQPixmap( UserIcon("key") );
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
if( !text.isEmpty() ) {
- QLabel *label = new QLabel( page );
+ TQLabel *label = new TQLabel( page );
label->setText( text );
topLayout->addWidget( label );
}
- QHBoxLayout * hlay = new QHBoxLayout( topLayout ); // inherits spacing
- QLineEdit * le = new QLineEdit( page );
- hlay->addWidget( new QLabel( le, i18n("&Search for:"), page ) );
+ TQHBoxLayout * hlay = new TQHBoxLayout( topLayout ); // inherits spacing
+ TQLineEdit * le = new TQLineEdit( page );
+ hlay->addWidget( new TQLabel( le, i18n("&Search for:"), page ) );
hlay->addWidget( le, 1 );
le->setFocus();
- connect( le, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotSearch(const QString&)) );
- connect( mStartSearchTimer, SIGNAL(timeout()), SLOT(slotFilter()) );
+ connect( le, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotSearch(const TQString&)) );
+ connect( mStartSearchTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFilter()) );
mListView = new KListView( page );
mListView->addColumn( i18n("Key ID") );
mListView->addColumn( i18n("User ID") );
mListView->setAllColumnsShowFocus( true );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
mListView->setRootIsDecorated( true );
mListView->setShowSortIndicator( true );
mListView->setSorting( 1, true ); // sort by User ID
mListView->setShowToolTips( true );
if( extendedSelection ) {
- mListView->setSelectionMode( QListView::Extended );
- //mListView->setSelectionMode( QListView::Multi );
+ mListView->setSelectionMode( TQListView::Extended );
+ //mListView->setSelectionMode( TQListView::Multi );
}
topLayout->addWidget( mListView, 10 );
if (rememberChoice) {
- mRememberCB = new QCheckBox( i18n("Remember choice"), page );
+ mRememberCB = new TQCheckBox( i18n("Remember choice"), page );
topLayout->addWidget( mRememberCB );
- QWhatsThis::add(mRememberCB,
+ TQWhatsThis::add(mRememberCB,
i18n("<qt><p>If you check this box your choice will "
"be stored and you will not be asked again."
"</p></qt>"));
@@ -358,7 +358,7 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
initKeylist( keyList, keyIds );
- QListViewItem *lvi;
+ TQListViewItem *lvi;
if( extendedSelection ) {
lvi = mListView->currentItem();
slotCheckSelection();
@@ -373,24 +373,24 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
mListView->center( mListView->contentsX(), mListView->itemPos( lvi ) );
if( extendedSelection ) {
- connect( mCheckSelectionTimer, SIGNAL( timeout() ),
- this, SLOT( slotCheckSelection() ) );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mCheckSelectionTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotCheckSelection() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
else {
- connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotSelectionChanged( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
}
- connect( mListView, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), this, SLOT( accept() ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( accept() ) );
- connect( mListView, SIGNAL( contextMenuRequested( QListViewItem*,
- const QPoint&, int ) ),
- this, SLOT( slotRMB( QListViewItem*, const QPoint&, int ) ) );
+ connect( mListView, TQT_SIGNAL( contextMenuRequested( TQListViewItem*,
+ const TQPoint&, int ) ),
+ this, TQT_SLOT( slotRMB( TQListViewItem*, const TQPoint&, int ) ) );
setButtonText( KDialogBase::Default, i18n("&Reread Keys") );
- connect( this, SIGNAL( defaultClicked() ),
- this, SLOT( slotRereadKeys() ) );
+ connect( this, TQT_SIGNAL( defaultClicked() ),
+ this, TQT_SLOT( slotRereadKeys() ) );
}
@@ -420,7 +420,7 @@ KeyID KeySelectionDialog::key() const
void KeySelectionDialog::initKeylist( const KeyList& keyList,
const KeyIDList& keyIds )
{
- QListViewItem* firstSelectedItem = 0;
+ TQListViewItem* firstSelectedItem = 0;
mKeyIds.clear();
mListView->clear();
@@ -428,7 +428,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
for( KeyListIterator it( keyList ); it.current(); ++it ) {
KeyID curKeyId = (*it)->primaryKeyID();
- QListViewItem* primaryUserID = new QListViewItem( mListView, curKeyId,
+ TQListViewItem* primaryUserID = new TQListViewItem( mListView, curKeyId,
(*it)->primaryUserID() );
// select and open the given key
@@ -457,16 +457,16 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
break;
}
- QListViewItem* childItem;
+ TQListViewItem* childItem;
- childItem = new QListViewItem( primaryUserID, "",
+ childItem = new TQListViewItem( primaryUserID, "",
i18n( "Fingerprint: %1" )
.arg( beautifyFingerprint( (*it)->primaryFingerprint() ) ) );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
- childItem = new QListViewItem( primaryUserID, "", keyInfo( *it ) );
+ childItem = new TQListViewItem( primaryUserID, "", keyInfo( *it ) );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
@@ -476,7 +476,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
if( *uidit ) {
++uidit; // skip the primary user ID
for( ; *uidit; ++uidit ) {
- childItem = new QListViewItem( primaryUserID, "", (*uidit)->text() );
+ childItem = new TQListViewItem( primaryUserID, "", (*uidit)->text() );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
@@ -490,9 +490,9 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
}
-QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
+TQString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
{
- QString status, remark;
+ TQString status, remark;
if( key->revoked() ) {
status = i18n("Revoked");
}
@@ -538,7 +538,7 @@ QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
}
}
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t( key->creationDate() );
if( remark.isEmpty() ) {
return " " + i18n("creation date and status of an OpenPGP key",
@@ -555,9 +555,9 @@ QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
}
}
-QString KeySelectionDialog::beautifyFingerprint( const QCString& fpr ) const
+TQString KeySelectionDialog::beautifyFingerprint( const TQCString& fpr ) const
{
- QCString result;
+ TQCString result;
if( 40 == fpr.length() ) {
// convert to this format:
@@ -664,7 +664,7 @@ int KeySelectionDialog::keyValidity( const Kpgp::Key *key ) const
void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
- QListViewItem* lvi ) const
+ TQListViewItem* lvi ) const
{
if( 0 == lvi ) {
return;
@@ -716,7 +716,7 @@ void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
int
-KeySelectionDialog::keyAdmissibility( QListViewItem* lvi,
+KeySelectionDialog::keyAdmissibility( TQListViewItem* lvi,
TrustCheckMode trustCheckMode ) const
{
// Return:
@@ -783,7 +783,7 @@ KeySelectionDialog::keyAdmissibility( QListViewItem* lvi,
KeyID
-KeySelectionDialog::getKeyId( const QListViewItem* lvi ) const
+KeySelectionDialog::getKeyId( const TQListViewItem* lvi ) const
{
KeyID keyId;
@@ -823,25 +823,25 @@ void KeySelectionDialog::slotRereadKeys()
int offsetY = mListView->contentsY();
if( mListView->isMultiSelection() ) {
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
else {
- disconnect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
}
initKeylist( keys, KeyIDList( mKeyIds ) );
slotFilter();
if( mListView->isMultiSelection() ) {
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
slotSelectionChanged();
}
else {
- connect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
}
// restore the saved position of the contents
@@ -849,7 +849,7 @@ void KeySelectionDialog::slotRereadKeys()
}
-void KeySelectionDialog::slotSelectionChanged( QListViewItem * lvi )
+void KeySelectionDialog::slotSelectionChanged( TQListViewItem * lvi )
{
slotCheckSelection( lvi );
}
@@ -866,7 +866,7 @@ void KeySelectionDialog::slotSelectionChanged()
}
-void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
+void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
{
kdDebug(5100) << "KeySelectionDialog::slotCheckSelection()\n";
@@ -886,16 +886,16 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
// As we might change the selection, we have to disconnect the slot
// to prevent recursion
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
KeyIDList newKeyIdList;
- QValueList<QListViewItem*> keysToBeChecked;
+ TQValueList<TQListViewItem*> keysToBeChecked;
bool keysAllowed = true;
enum { UNKNOWN, SELECTED, DESELECTED } userAction = UNKNOWN;
// Iterate over the tree to find selected keys.
- for( QListViewItem *lvi = mListView->firstChild();
+ for( TQListViewItem *lvi = mListView->firstChild();
0 != lvi;
lvi = lvi->nextSibling() ) {
// We make sure that either all items belonging to a key are selected
@@ -906,7 +906,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
// First count the selected items of this key
int itemCount = 1 + lvi->childCount();
int selectedCount = lvi->isSelected() ? 1 : 0;
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
if( clvi->isSelected() ) {
@@ -955,7 +955,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
if( userAction == SELECTED ) {
// select all items of this key
mListView->setSelected( lvi, true );
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
mListView->setSelected( clvi, true );
@@ -974,7 +974,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
else { // userAction == DESELECTED
// deselect all items of this key
mListView->setSelected( lvi, false );
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
mListView->setSelected( clvi, false );
@@ -989,13 +989,13 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
}
enableButtonOK( keysAllowed );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
}
-bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) const
+bool KeySelectionDialog::checkKeys( const TQValueList<TQListViewItem*>& keys ) const
{
KProgressDialog* pProgressDlg = 0;
bool keysAllowed = true;
@@ -1009,7 +1009,7 @@ bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) con
pProgressDlg->setMinimumDuration( 1000 );
pProgressDlg->show();
- for( QValueList<QListViewItem*>::ConstIterator it = keys.begin();
+ for( TQValueList<TQListViewItem*>::ConstIterator it = keys.begin();
it != keys.end();
++it ) {
kdDebug(5100) << "Checking key 0x" << getKeyId( *it ) << "...\n";
@@ -1028,7 +1028,7 @@ bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) con
}
-void KeySelectionDialog::slotRMB( QListViewItem* lvi, const QPoint& pos, int )
+void KeySelectionDialog::slotRMB( TQListViewItem* lvi, const TQPoint& pos, int )
{
if( !lvi ) {
return;
@@ -1036,8 +1036,8 @@ void KeySelectionDialog::slotRMB( QListViewItem* lvi, const QPoint& pos, int )
mCurrentContextMenuItem = lvi;
- QPopupMenu menu(this);
- menu.insertItem( i18n( "Recheck Key" ), this, SLOT( slotRecheckKey() ) );
+ TQPopupMenu menu(this);
+ menu.insertItem( i18n( "Recheck Key" ), this, TQT_SLOT( slotRecheckKey() ) );
menu.exec( pos );
}
@@ -1070,7 +1070,7 @@ void KeySelectionDialog::slotCancel()
reject();
}
-void KeySelectionDialog::slotSearch( const QString & text )
+void KeySelectionDialog::slotSearch( const TQString & text )
{
mSearchText = text.stripWhiteSpace().upper();
mStartSearchTimer->start( sCheckSelectionDelay, true /*single-shot*/ );
@@ -1084,7 +1084,7 @@ void KeySelectionDialog::slotFilter()
}
// OK, so we need to filter:
- QRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
+ TQRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
if ( keyIdRegExp.exactMatch( mSearchText ) ) {
if ( mSearchText.startsWith( "0X" ) )
// search for keyID only:
@@ -1098,52 +1098,52 @@ void KeySelectionDialog::slotFilter()
}
}
-void KeySelectionDialog::filterByKeyID( const QString & keyID )
+void KeySelectionDialog::filterByKeyID( const TQString & keyID )
{
assert( keyID.length() <= 8 );
assert( !keyID.isEmpty() ); // regexp in slotFilter should prevent these
if ( keyID.isEmpty() )
showAllItems();
else
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( item->text( 0 ).upper().startsWith( keyID ) );
}
-void KeySelectionDialog::filterByKeyIDOrUID( const QString & str )
+void KeySelectionDialog::filterByKeyIDOrUID( const TQString & str )
{
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( item->text( 0 ).upper().startsWith( str )
|| rx.search( item->text( 1 ) ) >= 0
|| anyChildMatches( item, rx ) );
}
-void KeySelectionDialog::filterByUID( const QString & str )
+void KeySelectionDialog::filterByUID( const TQString & str )
{
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( rx.search( item->text( 1 ) ) >= 0
|| anyChildMatches( item, rx ) );
}
-bool KeySelectionDialog::anyChildMatches( const QListViewItem * item, QRegExp & rx ) const
+bool KeySelectionDialog::anyChildMatches( const TQListViewItem * item, TQRegExp & rx ) const
{
if ( !item )
return false;
- QListViewItem * stop = item->nextSibling(); // It's OK if stop is NULL...
+ TQListViewItem * stop = item->nextSibling(); // It's OK if stop is NULL...
- for ( QListViewItemIterator it( item->firstChild() ) ; it.current() && it.current() != stop ; ++it )
+ for ( TQListViewItemIterator it( item->firstChild() ) ; it.current() && it.current() != stop ; ++it )
if ( rx.search( it.current()->text( 1 ) ) >= 0 ) {
//item->setOpen( true ); // do we want that?
return true;
@@ -1153,47 +1153,47 @@ bool KeySelectionDialog::anyChildMatches( const QListViewItem * item, QRegExp &
void KeySelectionDialog::showAllItems()
{
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( true );
}
// ------------------------------------------------------------------------
-KeyRequester::KeyRequester( QWidget * parent, bool multipleKeys,
+KeyRequester::KeyRequester( TQWidget * parent, bool multipleKeys,
unsigned int allowedKeys, const char * name )
- : QWidget( parent, name ),
+ : TQWidget( parent, name ),
mDialogCaption( i18n("OpenPGP Key Selection") ),
mDialogMessage( i18n("Please select an OpenPGP key to use.") ),
mMulti( multipleKeys ),
mAllowedKeys( allowedKeys ),
d( 0 )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
// the label where the key id is to be displayed:
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// the button to unset any key:
- mEraseButton = new QPushButton( this );
+ mEraseButton = new TQPushButton( this );
mEraseButton->setAutoDefault( false );
- mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
+ mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
mEraseButton->setPixmap( SmallIcon( "clear_left" ) );
- QToolTip::add( mEraseButton, i18n("Clear") );
+ TQToolTip::add( mEraseButton, i18n("Clear") );
// the button to call the KeySelectionDialog:
- mDialogButton = new QPushButton( i18n("Change..."), this );
+ mDialogButton = new TQPushButton( i18n("Change..."), this );
mDialogButton->setAutoDefault( false );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mEraseButton );
hlay->addWidget( mDialogButton );
- connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) );
- connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) );
+ connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) );
+ connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) );
- setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
}
KeyRequester::~KeyRequester() {
@@ -1213,11 +1213,11 @@ void KeyRequester::setKeyIDs( const KeyIDList & keyIDs ) {
if ( mKeys.size() > 1 )
setMultipleKeysEnabled( true );
- QString s = mKeys.toStringList().join(", ");
+ TQString s = mKeys.toStringList().join(", ");
mLabel->setText( s );
- QToolTip::remove( mLabel );
- QToolTip::add( mLabel, s );
+ TQToolTip::remove( mLabel );
+ TQToolTip::add( mLabel, s );
}
void KeyRequester::slotDialogButtonClicked() {
@@ -1238,11 +1238,11 @@ void KeyRequester::slotEraseButtonClicked() {
emit changed();
}
-void KeyRequester::setDialogCaption( const QString & caption ) {
+void KeyRequester::setDialogCaption( const TQString & caption ) {
mDialogCaption = caption;
}
-void KeyRequester::setDialogMessage( const QString & msg ) {
+void KeyRequester::setDialogMessage( const TQString & msg ) {
mDialogMessage = msg;
}
@@ -1268,7 +1268,7 @@ void KeyRequester::setAllowedKeys( int allowedKeys ) {
}
-PublicKeyRequester::PublicKeyRequester( QWidget * parent, bool multi,
+PublicKeyRequester::PublicKeyRequester( TQWidget * parent, bool multi,
unsigned int allowed, const char * name )
: KeyRequester( parent, multi, allowed & ~SecretKeys, name )
{
@@ -1281,10 +1281,10 @@ PublicKeyRequester::~PublicKeyRequester() {
KeyIDList PublicKeyRequester::keyRequestHook( Module * pgp ) const {
assert( pgp );
- return pgp->selectPublicKeys( mDialogCaption, mDialogMessage, mKeys, QString::null, mAllowedKeys );
+ return pgp->selectPublicKeys( mDialogCaption, mDialogMessage, mKeys, TQString::null, mAllowedKeys );
}
-SecretKeyRequester::SecretKeyRequester( QWidget * parent, bool multi,
+SecretKeyRequester::SecretKeyRequester( TQWidget * parent, bool multi,
unsigned int allowed, const char * name )
: KeyRequester( parent, multi, allowed & ~PublicKeys, name )
{
@@ -1307,10 +1307,10 @@ KeyIDList SecretKeyRequester::keyRequestHook( Module * pgp ) const {
// ------------------------------------------------------------------------
-KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
- const QValueVector<KeyIDList>& keyIDs,
+KeyApprovalDialog::KeyApprovalDialog( const TQStringList& addresses,
+ const TQValueVector<KeyIDList>& keyIDs,
const int allowedKeys,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, i18n("Encryption Key Approval"),
Ok|Cancel, Ok ),
@@ -1328,23 +1328,23 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
// addresses.count()+1 != keyList.count() )
// do something;
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("The following keys will be used for "
+ TQLabel *label = new TQLabel( i18n("The following keys will be used for "
"encryption:"),
page );
topLayout->addWidget( label );
- QScrollView* sv = new QScrollView( page );
- sv->setResizePolicy( QScrollView::AutoOneFit );
+ TQScrollView* sv = new TQScrollView( page );
+ sv->setResizePolicy( TQScrollView::AutoOneFit );
topLayout->addWidget( sv );
- QVBox* bigvbox = new QVBox( sv->viewport() );
+ TQVBox* bigvbox = new TQVBox( sv->viewport() );
bigvbox->setMargin( KDialog::marginHint() );
bigvbox->setSpacing( KDialog::spacingHint() );
sv->addChild( bigvbox );
- QButtonGroup *mChangeButtonGroup = new QButtonGroup( bigvbox );
+ TQButtonGroup *mChangeButtonGroup = new TQButtonGroup( bigvbox );
mChangeButtonGroup->hide();
mAddressLabels.resize( addresses.count() );
mKeyIdsLabels.resize( keyIDs.size() );
@@ -1354,28 +1354,28 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
// the sender's key
if( pgp->encryptToSelf() ) {
mEncryptToSelf = 1;
- QHBox* hbox = new QHBox( bigvbox );
- new QLabel( i18n("Your keys:"), hbox );
- QLabel* keyidsL = new QLabel( hbox );
+ TQHBox* hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Your keys:"), hbox );
+ TQLabel* keyidsL = new TQLabel( hbox );
if( keyIDs[0].isEmpty() ) {
keyidsL->setText( i18n("<none> means 'no key'", "<none>") );
}
else {
keyidsL->setText( "0x" + keyIDs[0].toStringList().join( "\n0x" ) );
}
- keyidsL->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidsL->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
/*
- QListBox* keyidLB = new QListBox( hbox );
+ TQListBox* keyidLB = new TQListBox( hbox );
if( keyIDs[0].isEmpty() ) {
keyidLB->insertItem( i18n("<none>") );
}
else {
keyidLB->insertStringList( keyIDs[0].toStringList() );
}
- keyidLB->setSelectionMode( QListBox::NoSelection );
- keyidLB->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidLB->setSelectionMode( TQListBox::NoSelection );
+ keyidLB->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
*/
- QPushButton *button = new QPushButton( i18n("Change..."), hbox );
+ TQPushButton *button = new TQPushButton( i18n("Change..."), hbox );
mChangeButtonGroup->insert( button );
button->setAutoDefault( false );
hbox->setStretchFactor( keyidsL, 10 );
@@ -1392,8 +1392,8 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
//mKeyIdListBoxes.insert( 0, 0 );
}
- QStringList::ConstIterator ait;
- QValueVector<KeyIDList>::const_iterator kit;
+ TQStringList::ConstIterator ait;
+ TQValueVector<KeyIDList>::const_iterator kit;
int i;
for( ait = addresses.begin(), kit = keyIDs.begin(), i = 0;
( ait != addresses.end() ) && ( kit != keyIDs.end() );
@@ -1405,34 +1405,34 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
new KSeparator( Horizontal, bigvbox );
}
- QHBox *hbox = new QHBox( bigvbox );
- new QLabel( i18n("Recipient:"), hbox );
- QLabel *addressL = new QLabel( *ait, hbox );
+ TQHBox *hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Recipient:"), hbox );
+ TQLabel *addressL = new TQLabel( *ait, hbox );
hbox->setStretchFactor( addressL, 10 );
mAddressLabels.insert( i, addressL );
- hbox = new QHBox( bigvbox );
- new QLabel( i18n("Encryption keys:"), hbox );
- QLabel* keyidsL = new QLabel( hbox );
+ hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Encryption keys:"), hbox );
+ TQLabel* keyidsL = new TQLabel( hbox );
if( (*kit).isEmpty() ) {
keyidsL->setText( i18n("<none> means 'no key'", "<none>") );
}
else {
keyidsL->setText( "0x" + (*kit).toStringList().join( "\n0x" ) );
}
- keyidsL->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidsL->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
/*
- QListBox* keyidLB = new QListBox( hbox );
+ TQListBox* keyidLB = new TQListBox( hbox );
if( (*kit).isEmpty() ) {
keyidLB->insertItem( i18n("<none>") );
}
else {
keyidLB->insertStringList( (*kit).toStringList() );
}
- keyidLB->setSelectionMode( QListBox::NoSelection );
- keyidLB->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidLB->setSelectionMode( TQListBox::NoSelection );
+ keyidLB->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
*/
- QPushButton *button = new QPushButton( i18n("Change..."), hbox );
+ TQPushButton *button = new TQPushButton( i18n("Change..."), hbox );
mChangeButtonGroup->insert( button );
button->setAutoDefault( false );
hbox->setStretchFactor( keyidsL, 10 );
@@ -1440,9 +1440,9 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
//hbox->setStretchFactor( keyidLB, 10 );
//mKeyIdListBoxes.insert( i + 1, keyidLB );
- hbox = new QHBox( bigvbox );
- new QLabel( i18n("Encryption preference:"), hbox );
- QComboBox *encrPrefCombo = new QComboBox( hbox );
+ hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Encryption preference:"), hbox );
+ TQComboBox *encrPrefCombo = new TQComboBox( hbox );
encrPrefCombo->insertItem( i18n("<none>") );
encrPrefCombo->insertItem( i18n("Never Encrypt with This Key") );
encrPrefCombo->insertItem( i18n("Always Encrypt with This Key") );
@@ -1470,12 +1470,12 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
default:
encrPrefCombo->setCurrentItem( 0 );
}
- connect( encrPrefCombo, SIGNAL(activated(int)),
- this, SLOT(slotPrefsChanged(int)) );
+ connect( encrPrefCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPrefsChanged(int)) );
mEncrPrefCombos.insert( i, encrPrefCombo );
}
- connect( mChangeButtonGroup, SIGNAL(clicked(int)),
- this, SLOT(slotChangeEncryptionKey(int)) );
+ connect( mChangeButtonGroup, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(slotChangeEncryptionKey(int)) );
// calculate the optimal width for the dialog
int dialogWidth = marginHint()
@@ -1498,7 +1498,7 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
+ marginHint()
+ 2;
// don't make the dialog too large
- QRect desk = KGlobalSettings::desktopGeometry(this);
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
int screenWidth = desk.width();
if( dialogWidth > 3*screenWidth/4 )
dialogWidth = 3*screenWidth/4;
@@ -1506,7 +1506,7 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
if( dialogHeight > 7*screenHeight/8 )
dialogHeight = 7*screenHeight/8;
- setInitialSize( QSize( dialogWidth, dialogHeight ) );
+ setInitialSize( TQSize( dialogWidth, dialogHeight ) );
}
void
@@ -1550,10 +1550,10 @@ KeyApprovalDialog::slotChangeEncryptionKey( int nr )
}
if( !keyIds.isEmpty() ) {
mKeys[nr] = keyIds;
- QLabel* keyidsL = mKeyIdsLabels[nr];
+ TQLabel* keyidsL = mKeyIdsLabels[nr];
keyidsL->setText( "0x" + keyIds.toStringList().join( "\n0x" ) );
/*
- QListBox* qlb = mKeyIdListBoxes[nr];
+ TQListBox* qlb = mKeyIdListBoxes[nr];
qlb->clear();
qlb->insertStringList( keyIds.toStringList() );
*/
@@ -1613,31 +1613,31 @@ KeyApprovalDialog::slotCancel()
// ------------------------------------------------------------------------
-CipherTextDialog::CipherTextDialog( const QCString & text,
- const QCString & charset, QWidget *parent,
+CipherTextDialog::CipherTextDialog( const TQCString & text,
+ const TQCString & charset, TQWidget *parent,
const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("OpenPGP Information"), Ok|Cancel, Ok)
{
// FIXME (post KDE2.2): show some more info, e.g. the output of GnuPG/PGP
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel( page );
+ TQLabel *label = new TQLabel( page );
label->setText(i18n("Result of the last encryption/sign operation:"));
topLayout->addWidget( label );
- mEditBox = new QMultiLineEdit( page );
+ mEditBox = new TQMultiLineEdit( page );
mEditBox->setReadOnly(true);
topLayout->addWidget( mEditBox, 10 );
- QString unicodeText;
+ TQString unicodeText;
if (charset.isEmpty())
- unicodeText = QString::fromLocal8Bit(text.data());
+ unicodeText = TQString::fromLocal8Bit(text.data());
else {
bool ok=true;
- QTextCodec *codec = KGlobal::charsets()->codecForName(charset, ok);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(charset, ok);
if(!ok)
- unicodeText = QString::fromLocal8Bit(text.data());
+ unicodeText = TQString::fromLocal8Bit(text.data());
else
unicodeText = codec->toUnicode(text.data(), text.length());
}
@@ -1665,12 +1665,12 @@ void CipherTextDialog::setMinimumSize()
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
int maxWidth;
- if (QApplication::desktop()->isVirtualDesktop() &&
+ if (TQApplication::desktop()->isVirtualDesktop() &&
gc.readBoolEntry("XineramaEnabled", true) &&
gc.readBoolEntry("XineramaPlacementEnabled", true)) {
- maxWidth = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(parentWidget())).width()-100;
+ maxWidth = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(parentWidget())).width()-100;
} else {
- maxWidth = QApplication::desktop()->geometry().width()-100;
+ maxWidth = TQApplication::desktop()->geometry().width()-100;
}
#endif