summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/cryptography')
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.cpp14
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.h3
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp32
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.h3
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.cpp4
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.h3
-rw-r--r--kopete/plugins/cryptography/cryptographyprefsbase.ui30
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.cpp2
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.h1
-rw-r--r--kopete/plugins/cryptography/cryptographyuserkey_ui.ui14
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp28
-rw-r--r--kopete/plugins/cryptography/kgpginterface.h1
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.cpp16
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.h3
-rw-r--r--kopete/plugins/cryptography/popuppublic.cpp48
-rw-r--r--kopete/plugins/cryptography/popuppublic.h5
16 files changed, 107 insertions, 100 deletions
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp
index 898e7f1a..fecb025e 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.cpp
+++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp
@@ -27,16 +27,16 @@
class CryptographyPlugin;
-CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
- : TQObject(parent) , KXMLGUIClient(parent)
+CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *tqparent )
+ : TQObject(tqparent) , KXMLGUIClient(tqparent)
{
- if(!parent || parent->members().isEmpty())
+ if(!tqparent || tqparent->members().isEmpty())
{
deleteLater(); //we refuse to build this client, it is based on wrong parametters
return;
}
- TQPtrList<Kopete::Contact> mb=parent->members();
+ TQPtrList<Kopete::Contact> mb=tqparent->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
@@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
setInstance( KGenericFactory<CryptographyPlugin>::instance() );
- m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
- m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ;
+ m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::tqfromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
+ m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::tqfromLatin1("off") ) ;
setXMLFile("cryptographychatui.rc");
}
@@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient()
void CryptographyGUIClient::slotToggled()
{
- TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
+ TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(tqparent())->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h
index 7f3d8c4f..5b8b22ed 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.h
+++ b/kopete/plugins/cryptography/cryptographyguiclient.h
@@ -27,8 +27,9 @@ class KToggleAction;
class CryptographyGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- CryptographyGUIClient(Kopete::ChatSession *parent = 0);
+ CryptographyGUIClient(Kopete::ChatSession *tqparent = 0);
~CryptographyGUIClient();
private:
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index 4e2e9686..bd1ce0dc 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -45,14 +45,14 @@
//In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did.
//We limit the html to some basis tag to limit security problem (bad links)
// - Olivier
-const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
+const TQRegExp CryptographyPlugin::isHTML( TQString::tqfromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
typedef KGenericFactory<CryptographyPlugin> CryptographyPluginFactory;
static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) )
-CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
-: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ),
+CryptographyPlugin::CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ )
+: Kopete::Plugin( CryptographyPluginFactory::instance(), tqparent, name ),
m_cachedPass()
{
if( !pluginStatic_ )
@@ -154,14 +154,14 @@ bool CryptographyPlugin::passphraseHandling()
void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
{
TQString body = msg.plainBody();
- if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") )
- || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) )
+ if( !body.startsWith( TQString::tqfromLatin1("-----BEGIN PGP MESSAGE----") )
+ || !body.tqcontains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) )
return;
if( msg.direction() != Kopete::Message::Inbound )
{
TQString plainBody;
- if ( m_cachedMessages.contains( body ) )
+ if ( m_cachedMessages.tqcontains( body ) )
{
plainBody = m_cachedMessages[ body ];
m_cachedMessages.remove( body );
@@ -179,16 +179,16 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
plainBody = TQStyleSheet::escape( plainBody );
//this is the same algoritm as in Kopete::Message::escapedBody();
- plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) )
- .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
- .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
+ plainBody.tqreplace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "<br/>" ) )
+ .tqreplace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .tqreplace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( "&nbsp; " ) );
}
- msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Outgoing Encrypted Message: ")
- + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ plainBody
- + TQString::fromLatin1(" </td></tr></table>")
+ + TQString::tqfromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -202,7 +202,7 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
//the Message::unescape is there because client like fire replace linebreak by <BR> to work even if the protocol doesn't allow newlines (IRC)
// cf http://fire.sourceforge.net/forums/viewtopic.php?t=174 and Bug #96052
- if(body.contains("<"))
+ if(body.tqcontains("<"))
body= Kopete::Message::unescape(body);
body = KgpgInterface::KgpgDecryptText( body, mPrivateKeyID );
@@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
body = Kopete::Message::escape( body );
}
- msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Incoming Encrypted Message: ")
- + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ body
- + TQString::fromLatin1(" </td></tr></table>")
+ + TQString::tqfromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h
index 1b1e4489..249eac9e 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.h
+++ b/kopete/plugins/cryptography/cryptographyplugin.h
@@ -40,6 +40,7 @@ namespace Kopete
class CryptographyPlugin : public Kopete::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
enum CacheMode
@@ -55,7 +56,7 @@ public:
static bool passphraseHandling();
static const TQRegExp isHTML;
- CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
~CryptographyPlugin();
public slots:
diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp
index 8e1b96ee..765fb098 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.cpp
+++ b/kopete/plugins/cryptography/cryptographypreferences.cpp
@@ -27,8 +27,8 @@
typedef KGenericFactory<CryptographyPreferences> CryptographyPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography"))
-CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
- : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args)
+CryptographyPreferences::CryptographyPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args)
+ : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), tqparent, args)
{
// Add actuall widget generated from ui file.
preferencesDialog = new CryptographyPrefsUI(this);
diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h
index 6053e96b..d032bc6e 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.h
+++ b/kopete/plugins/cryptography/cryptographypreferences.h
@@ -29,8 +29,9 @@ class KAutoConfig;
*/
class CryptographyPreferences : public KCAutoConfigModule {
Q_OBJECT
+ TQ_OBJECT
public:
- CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
+ CryptographyPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList());
private:
CryptographyPrefsUI *preferencesDialog;
private slots: // Public slots
diff --git a/kopete/plugins/cryptography/cryptographyprefsbase.ui b/kopete/plugins/cryptography/cryptographyprefsbase.ui
index ecec3507..6cd3caca 100644
--- a/kopete/plugins/cryptography/cryptographyprefsbase.ui
+++ b/kopete/plugins/cryptography/cryptographyprefsbase.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>CryptographyPrefsUI</class>
<author>Olivier Goffart</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>CryptographyPrefsUI</cstring>
</property>
@@ -17,7 +17,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -25,7 +25,7 @@
<string>Your private PGP key:</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="2">
+ <widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>m_selectOwnKey</cstring>
</property>
@@ -41,7 +41,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Also_my_key</cstring>
</property>
@@ -63,14 +63,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>50</height>
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="4" column="0" rowspan="1" colspan="3">
+ <widget class="TQButtonGroup" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>m_cache</cstring>
</property>
@@ -81,7 +81,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Cache_Till_App_Close</cstring>
</property>
@@ -92,7 +92,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="1">
+ <widget class="TQSpinBox" row="2" column="1">
<property name="name">
<cstring>Cache_Time</cstring>
</property>
@@ -114,7 +114,7 @@
<number>15</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -130,7 +130,7 @@
<string>minutes</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="0">
+ <widget class="TQRadioButton" row="2" column="0">
<property name="name">
<cstring>Cache_Till_Time</cstring>
</property>
@@ -146,7 +146,7 @@
<string>For</string>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="3">
+ <widget class="TQRadioButton" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Cache_Never</cstring>
</property>
@@ -156,7 +156,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>No_Passphrase_Handling</cstring>
</property>
@@ -184,12 +184,12 @@
<tabstop>Cache_Time</tabstop>
<tabstop>Cache_Never</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>m_selectOwnKey_clicked()</slot>
<slot>m_selectOwnKey_toggled(bool)</slot>
<slot>m_selectOwnKey_stateChanged(int)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
index ae92647b..9d692e08 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
@@ -35,7 +35,7 @@ CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete
connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed()));
connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed()));
- view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName()));
+ view->m_titleLabel->setText(i18n("Select public key for %1").tqarg(mc->displayName()));
view->m_editKey->setText(key);
}
CryptographySelectUserKey::~CryptographySelectUserKey()
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h
index 7ca5ec8e..a7f47853 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.h
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h
@@ -29,6 +29,7 @@ class CryptographyUserKey_ui;
class CryptographySelectUserKey : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc);
~CryptographySelectUserKey();
diff --git a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui
index d84f2fec..ff766de4 100644
--- a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui
+++ b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>CryptographyUserKey_ui</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>CryptographyUserKey_ui</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -32,7 +32,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>m_selectKey</cstring>
</property>
@@ -50,14 +50,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>m_removeButton</cstring>
</property>
@@ -65,7 +65,7 @@
<string>Remove</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>m_titleLabel</cstring>
</property>
@@ -75,5 +75,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index e41e246d..d74f9baa 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -50,12 +50,12 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString
userIDs=userIDs.simplifyWhiteSpace();
Options=Options.stripWhiteSpace();
- int ct=userIDs.find(" ");
+ int ct=userIDs.tqfind(" ");
while (ct!=-1) // if multiple keys...
{
dests+=" --recipient "+userIDs.section(' ',0,0);
userIDs.remove(0,ct+1);
- ct=userIDs.find(" ");
+ ct=userIDs.tqfind(" ");
}
dests+=" --recipient "+userIDs;
@@ -75,7 +75,7 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString
if( !encResult.isEmpty() )
return encResult;
else
- return TQString::null;
+ return TQString();
}
TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
@@ -95,15 +95,15 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
/// pipe for passphrase
//userID=TQString::fromUtf8(userID);
- userID.replace('<',"&lt;");
- TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
+ userID.tqreplace('<',"&lt;");
+ TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").tqarg(userID);
if (counter>1)
- passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(TQString::number(4-counter)));
+ passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").tqarg(TQString::number(4-counter)));
/// pipe for passphrase
int code=KPasswordDialog::getPassword(password,passdlg);
if (code!=TQDialog::Accepted)
- return TQString::null;
+ return TQString();
CryptographyPlugin::setCachedPass(password);
}
@@ -135,7 +135,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
if( !encResult.isEmpty() )
return encResult;
else
- return TQString::null;
+ return TQString();
}
TQString KgpgInterface::checkForUtf8(TQString txt)
@@ -147,22 +147,22 @@ TQString KgpgInterface::checkForUtf8(TQString txt)
/* Make sure the encoding is UTF-8.
* Test structure suggested by Werner Koch */
if (txt.isEmpty())
- return TQString::null;
+ return TQString();
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
- if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1))
+ if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1))
return txt;
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
- if (txt.find("\\x")==-1)
+ if (txt.tqfind("\\x")==-1)
return TQString::fromUtf8(txt.ascii());
- // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
- for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
+ // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) {
+ for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
- txt.replace( idx, 4, str );
+ txt.tqreplace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
return TQString::fromUtf8(txt.ascii());
diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h
index f324359e..9da953fe 100644
--- a/kopete/plugins/cryptography/kgpginterface.h
+++ b/kopete/plugins/cryptography/kgpginterface.h
@@ -30,6 +30,7 @@
class KgpgInterface : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp
index 88078ece..1f3d5a39 100644
--- a/kopete/plugins/cryptography/kgpgselkey.cpp
+++ b/kopete/plugins/cryptography/kgpgselkey.cpp
@@ -38,7 +38,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////// Secret key selection dialog, used when user wants to sign a key
-KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
+KgpgSelKey::KgpgSelKey(TQWidget *tqparent, const char *name,bool showlocal):KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel)
{
TQString keyname;
TQWidget *page = new TQWidget(this);
@@ -122,7 +122,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo
tst=tst.section(":",9,9);
// FIXME: Same here: don't use popen! - Martijn
- fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" );
+ fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).tqarg( KShellProcess::quote( id ) ).latin1(), "r" );
bool dead=true;
while ( fgets( line, sizeof(line), fp2))
{
@@ -147,7 +147,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo
if (!tst.isEmpty() && (!dead))
{
KListViewItem *item=new KListViewItem(keysListpr,extractKeyName(tst));
- KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").arg(id).arg(tr).arg(val));
+ KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").tqarg(id).tqarg(tr).tqarg(val));
sub->setSelectable(false);
item->setPixmap(0,keyPair);
}
@@ -163,20 +163,20 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo
keysListpr->setSelected(keysListpr->firstChild(),true);
page->show();
- resize(this->minimumSize());
+ resize(this->tqminimumSize());
setMainWidget(page);
}
TQString KgpgSelKey::extractKeyName(TQString fullName)
{
TQString kMail;
- if (fullName.find("<")!=-1)
+ if (fullName.tqfind("<")!=-1)
{
kMail=fullName.section('<',-1,-1);
kMail.truncate(kMail.length()-1);
}
TQString kName=fullName.section('<',0,0);
- if (kName.find("(")!=-1) kName=kName.section('(',0,0);
+ if (kName.tqfind("(")!=-1) kName=kName.section('(',0,0);
return TQString(kMail+" ("+kName+")").stripWhiteSpace();
}
@@ -201,8 +201,8 @@ void KgpgSelKey::slotSelect(TQListViewItem *item)
if (item==NULL) return;
if (item->depth()!=0)
{
- keysListpr->setSelected(item->parent(),true);
- keysListpr->setCurrentItem(item->parent());
+ keysListpr->setSelected(item->tqparent(),true);
+ keysListpr->setCurrentItem(item->tqparent());
}
}
diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h
index 1e357482..190e8186 100644
--- a/kopete/plugins/cryptography/kgpgselkey.h
+++ b/kopete/plugins/cryptography/kgpgselkey.h
@@ -41,9 +41,10 @@ struct gpgKey {
class KgpgSelKey : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true);
+ KgpgSelKey( TQWidget *tqparent = 0, const char *name = 0,bool showlocal=true);
KListView *keysListpr;
TQPixmap keyPair;
TQCheckBox *local;
diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp
index 9c1561f1..43787d47 100644
--- a/kopete/plugins/cryptography/popuppublic.cpp
+++ b/kopete/plugins/cryptography/popuppublic.cpp
@@ -57,14 +57,14 @@
class UpdateViewItem2 : public KListViewItem
{
public:
- UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault);
+ UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault);
virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align);
virtual TQString key(int c,bool ) const;
bool def;
};
-UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault)
- : KListViewItem(parent)
+UpdateViewItem2::UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault)
+ : KListViewItem(tqparent)
{
def=isDefault;
setText(0,name);
@@ -73,14 +73,14 @@ def=isDefault;
}
-void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
+void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment)
{
if ((def) && (column<2)) {
TQFont font(p->font());
font.setBold(true);
p->setFont(font);
}
- KListViewItem::paintCell(p, cg, column, width, alignment);
+ KListViewItem::paintCell(p, cg, column, width, tqalignment);
}
TQString UpdateViewItem2 :: key(int c,bool ) const
@@ -90,8 +90,8 @@ TQString UpdateViewItem2 :: key(int c,bool ) const
/////////////// main view
-popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey):
-KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true)
+popupPublic::popupPublic(TQWidget *tqparent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey):
+KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, tqparent, name,true)
{
TQWidget *page = plainPage();
TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint());
@@ -108,7 +108,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20);
keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20);
- if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile));
+ if (filemode) setCaption(i18n("Select Public Key for %1").tqarg(sfile));
fmode=filemode;
TQHButtonGroup *hBar=new TQHButtonGroup(page);
@@ -144,7 +144,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0);
KActionCollection *actcol=new KActionCollection(this);
- (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
+ (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, TQT_TQOBJECT(this), TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
@@ -165,16 +165,16 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
"box enables you to use any key, even if it has not be signed."));
if (filemode) {
- TQWidget *parentBox=new TQWidget(boutonboxoptions);
- TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0);
+ TQWidget *tqparentBox=new TQWidget(boutonboxoptions);
+ TQHBoxLayout *shredBox=new TQHBoxLayout(tqparentBox,0);
//shredBox->setFrameStyle(TQFrame::NoFrame);
//shredBox->setMargin(0);
- CBshred=new TQCheckBox(i18n("Shred source file"),parentBox);
+ CBshred=new TQCheckBox(i18n("Shred source file"),tqparentBox);
TQWhatsThis::add
(CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
- KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox );
+ KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").tqarg(shredWhatsThis),tqparentBox );
shredBox->addWidget(CBshred);
shredBox->addWidget(warn);
}
@@ -187,7 +187,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
//BEGIN modified for Kopete
- setWFlags( getWFlags() | Qt::WDestructiveClose );
+ setWFlags( getWFlags() | TQt::WDestructiveClose );
/*CBarmor->setChecked( KGpgSettings::asciiArmor() );
@@ -221,7 +221,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
char line[200]="\0";
FILE *fp2;
- seclist=TQString::null;
+ seclist=TQString();
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r");
while ( fgets( line, sizeof(line), fp2))
@@ -269,7 +269,7 @@ void popupPublic::sort()
if (current==NULL)
return;
- if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
+ if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@@ -279,7 +279,7 @@ void popupPublic::sort()
while ( current->nextSibling() ) {
current = current->nextSibling();
- if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
+ if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@@ -342,7 +342,7 @@ void popupPublic::refreshkeys()
{
if (!TQString(*it).isEmpty())
{
- UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false);
+ UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString(),TQString(),false);
item->setPixmap(0,keyGroup);
}
}
@@ -433,16 +433,16 @@ void popupPublic::slotprocread(KProcIO *p)
untrustedList<<id;
break;
}
- if (keyString[11].find('D')!=-1) dead=true;
+ if (keyString[11].tqfind('D')!=-1) dead=true;
tst=keyString[9];
- if (tst.find("<")!=-1) {
+ if (tst.tqfind("<")!=-1) {
keymail=tst.section('<',-1,-1);
keymail.truncate(keymail.length()-1);
keyname=tst.section('<',0,0);
- //if (keyname.find("(")!=-1)
+ //if (keyname.tqfind("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
- keymail=TQString::null;
+ keymail=TQString();
keyname=tst;//.section('(',0,0);
}
@@ -452,9 +452,9 @@ void popupPublic::slotprocread(KProcIO *p)
bool isDefaultKey=false;
if (id.right(8)==defaultKey) isDefaultKey=true;
UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey);
- //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").arg(id).arg(tr).arg(val));
+ //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val));
//sub->setSelectable(false);
- if (seclist.find(tst,0,FALSE)!=-1)
+ if (seclist.tqfind(tst,0,FALSE)!=-1)
item->setPixmap(0,keyPair);
else
item->setPixmap(0,keySingle);
diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h
index 7e3208aa..17c05ebb 100644
--- a/kopete/plugins/cryptography/popuppublic.h
+++ b/kopete/plugins/cryptography/popuppublic.h
@@ -31,12 +31,13 @@ class KListView;
class TQButtonGroup;
class KProcIO;
-class popupPublic : public KDialogBase //QDialog
+class popupPublic : public KDialogBase //TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home));
+ popupPublic(TQWidget *tqparent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home));
~popupPublic();
KListView *keysList;
TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;