From 19ef6524e14e2c318f0b88b2d348e1bf31c50cbe Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:24:30 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- src/otrplugin.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/otrplugin.cpp') 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(); -- cgit v1.2.1