summaryrefslogtreecommitdiffstats
path: root/src/otrplugin.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:24:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:24:30 -0600
commit19ef6524e14e2c318f0b88b2d348e1bf31c50cbe (patch)
tree1a26728ea543b832ff47e6e2b1de9ee1b3da926f /src/otrplugin.cpp
parent5d330b77293aadfba9db08cb1eef0946c1d73b50 (diff)
downloadkopete-otr-19ef6524e14e2c318f0b88b2d348e1bf31c50cbe.tar.gz
kopete-otr-19ef6524e14e2c318f0b88b2d348e1bf31c50cbe.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'src/otrplugin.cpp')
-rw-r--r--src/otrplugin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/otrplugin.cpp b/src/otrplugin.cpp
index e5571dd..7478c59 100644
--- a/src/otrplugin.cpp
+++ b/src/otrplugin.cpp
@@ -85,11 +85,11 @@ OTRPlugin::OTRPlugin( TQObject *parent, const char *name, const TQStringList & /
otrlChatInterface = OtrlChatInterface::self();
//update key files when an account is ready to use
- if( TQFile::exists( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey" ) &&
- !TQFile::exists( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" ) ){
+ if( TQFile::exists( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey" ) &&
+ !TQFile::exists( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" ) ){
kdDebug() << "Detected old format keyfile. Doing updates!" << endl;
kdDebug() << "Reading old keyfile..." << endl;
- TQFile fpold( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" );
+ TQFile fpold( TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" );
TQString line;
TQString file;
if( fpold.open( IO_ReadWrite ) ){
@@ -98,12 +98,12 @@ OTRPlugin::OTRPlugin( TQObject *parent, const char *name, const TQStringList & /
}
}
kdDebug() << "Writing new keyfile" << endl;
- TQFile fpnew( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ TQFile fpnew( TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
fpnew.open( IO_ReadWrite );
fpnew.writeBlock( file.latin1(), file.length() );
fpnew.close();
kdDebug() << "Writing backup for old keyfile" << endl;
- TQFile fpbup( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey.old" );
+ TQFile fpbup( TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey.old" );
fpbup.open( IO_ReadWrite );
fpbup.writeBlock( file.latin1(), file.length() );
fpbup.close();
@@ -111,7 +111,7 @@ OTRPlugin::OTRPlugin( TQObject *parent, const char *name, const TQStringList & /
fpold.remove();
kdDebug() << "Reading old fingerprintsfile..." << endl;
- TQFile fpfingerprintsold( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ TQFile fpfingerprintsold( TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
line = "";
file = "";
if( fpfingerprintsold.open( IO_ReadWrite ) ){
@@ -120,7 +120,7 @@ OTRPlugin::OTRPlugin( TQObject *parent, const char *name, const TQStringList & /
}
}
kdDebug() << "Writing backup for old fingerprintsfile" << endl;
- TQFile fpfingerprintsbup( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints.old" );
+ TQFile fpfingerprintsbup( TQString(TDEGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints.old" );
fpfingerprintsbup.open( IO_ReadWrite );
fpfingerprintsbup.writeBlock( file.latin1(), file.length() );
fpfingerprintsbup.close();
@@ -131,11 +131,11 @@ OTRPlugin::OTRPlugin( TQObject *parent, const char *name, const TQStringList & /
}
// Checking file Permissions
- OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" );
- OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints" );
// Check also file permissions for eventuallly old beckup files
- OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey.old" );
- OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints.old" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey.old" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( TDEGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints.old" );
//setting the policy
slotSettingsChanged();