Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent d9f2e70b93
commit 8397fbc1d5

@ -33,7 +33,7 @@
#include "mainwidget.h" #include "mainwidget.h"
*/ */
MainApp::MainApp() : KApplication() { MainApp::MainApp() : TDEApplication() {
// Get the current application configuration handle // Get the current application configuration handle

@ -17,7 +17,7 @@
/** /**
@author Christian Hubinger @author Christian Hubinger
*/ */
class MainApp : public KApplication { class MainApp : public TDEApplication {
public: public:
MainApp(); MainApp();
~MainApp(); ~MainApp();

@ -48,7 +48,7 @@ int main( int argc, char *argv[] ) {
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a; TDEApplication a;
// Details *mainWid = new Details( 0 ); // Details *mainWid = new Details( 0 );
KMFIPTDocView *mainWid = new KMFIPTDocView( 0 ); KMFIPTDocView *mainWid = new KMFIPTDocView( 0 );

@ -1979,20 +1979,20 @@ cat > conftest.$ac_ext <<EOF
#include <kapp.h> #include <kapp.h>
int main() { int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n", printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data()); TDEApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n"); printf("kde_moduledir=\\"/tmp/dummy\\"\n");

@ -101,7 +101,7 @@ void KMFIPTablesCompiler::slotExportIPT() {
return ; return ;
int answer = 0; int answer = 0;
while ( answer != 3 ) { while ( answer != 3 ) {
if ( KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
if ( answer == 4 ) { if ( answer == 4 ) {
slotExportIPT(); slotExportIPT();
return ; return ;
@ -125,7 +125,7 @@ void KMFIPTablesCompiler::slotExportIPT() {
if ( m_errorHandler->showError( m_err ) ) { if ( m_errorHandler->showError( m_err ) ) {
if ( KIO::NetAccess::upload( tempfile.name(), url, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::upload( tempfile.name(), url, TDEApplication::kApplication()->mainWidget() ) ) {
// statusBar() ->message( i18n( "Wrote file: " ) + url.fileName() , 5000 ); // statusBar() ->message( i18n( "Wrote file: " ) + url.fileName() , 5000 );
} else { } else {
kdDebug() << "Couldn't upload file!!!" << tempfile.name() << endl; kdDebug() << "Couldn't upload file!!!" << tempfile.name() << endl;

@ -31,7 +31,7 @@ class TQLabel;
namespace KMF { namespace KMF {
class KDE_EXPORT KMFApp : public KApplication { class KDE_EXPORT KMFApp : public TDEApplication {
public: public:
KMFApp(); KMFApp();
~KMFApp(); ~KMFApp();

@ -146,7 +146,7 @@ KMFError* KMFDoc::exportXMLRuleset( bool promptFile, bool asTemplate ) {
} }
int answer = 0; int answer = 0;
while ( answer != KMessageBox::Yes ) { while ( answer != KMessageBox::Yes ) {
if ( KIO::NetAccess::exists( saveUrl, false, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( saveUrl, false, TDEApplication::kApplication()->mainWidget() ) ) {
if ( answer == 4 ) { if ( answer == 4 ) {
return exportXMLRuleset( promptFile, asTemplate ); return exportXMLRuleset( promptFile, asTemplate );
} else { } else {
@ -177,7 +177,7 @@ KMFError* KMFDoc::exportXMLRuleset( const KURL& url ) {
f.flush(); f.flush();
f.close(); f.close();
if ( ! KIO::NetAccess::upload( file.name(), url, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::upload( file.name(), url, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "Coudn't save File: " << url.url() << endl; kdDebug() << "Coudn't save File: " << url.url() << endl;
m_err->setErrType( KMFError::NORMAL ); m_err->setErrType( KMFError::NORMAL );
m_err->setErrMsg( i18n( "<qt><p><b>Saving <i>%1</i> Failed.</b></p>" m_err->setErrMsg( i18n( "<qt><p><b>Saving <i>%1</i> Failed.</b></p>"

@ -287,7 +287,7 @@ const TQString& KMFGenericDoc::compile() {
void KMFGenericDoc::parseDocument( const KURL& url, TQStringList& errors ) { void KMFGenericDoc::parseDocument( const KURL& url, TQStringList& errors ) {
// kdDebug() << "KMFDoc* KMFGenericDoc::parseDocument( const KURL& )" << endl; // kdDebug() << "KMFDoc* KMFGenericDoc::parseDocument( const KURL& )" << endl;
TQString xmlfile; TQString xmlfile;
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
clear(); clear();
m_url.setFileName( i18n( "Untitled" ) ); m_url.setFileName( i18n( "Untitled" ) );
return; return;

@ -408,7 +408,7 @@ const TQString& KMFIPTDoc::compile() {
void KMFIPTDoc::parseDocument( const KURL& url, TQStringList& errors ) { void KMFIPTDoc::parseDocument( const KURL& url, TQStringList& errors ) {
// kdDebug() << "KMFIPTDoc::parseDocument()" << endl; // kdDebug() << "KMFIPTDoc::parseDocument()" << endl;
TQString xmlfile; TQString xmlfile;
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
clear(); clear();
m_url.setFileName( i18n( "Untitled" ) ); m_url.setFileName( i18n( "Untitled" ) );
return; return;

@ -216,7 +216,7 @@ bool KMFNetwork::isEmpty() {
void KMFNetwork::parseDocument( const KURL& url, TQStringList& errors ) { void KMFNetwork::parseDocument( const KURL& url, TQStringList& errors ) {
kdDebug() << "KMFDoc* KMFNetwork::parseDocument( const KURL& url )" << endl; kdDebug() << "KMFDoc* KMFNetwork::parseDocument( const KURL& url )" << endl;
TQString xmlfile; TQString xmlfile;
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
clear(); clear();
m_url.setFileName( i18n( "Untitled" ) ); m_url.setFileName( i18n( "Untitled" ) );
return; return;

@ -173,7 +173,7 @@ KMFInstallerInterface* KMFPluginFactory::KMFInstaller( KMFTarget* target ) {
kdDebug() << "Couldn't load plugin: " << ptr->name() << endl; kdDebug() << "Couldn't load plugin: " << ptr->name() << endl;
return 0; return 0;
} }
if ( KMFInstallerInterface *part = dynamic_cast<KMFInstallerInterface*> ( factory->create( TQT_TQOBJECT(KApplication::kApplication()) , "KMFInstallerInterface") ) if ( KMFInstallerInterface *part = dynamic_cast<KMFInstallerInterface*> ( factory->create( TQT_TQOBJECT(TDEApplication::kApplication()) , "KMFInstallerInterface") )
) { ) {
if ( ! part ) { if ( ! part ) {
KMessageBox::error(0, "Couldn't load plugin"); KMessageBox::error(0, "Couldn't load plugin");
@ -208,7 +208,7 @@ KMFCompilerInterface* KMFPluginFactory::KMFCompiler( KMFTarget* target ) {
return 0; return 0;
} }
if ( KMFCompilerInterface *part = dynamic_cast<KMFCompilerInterface*> ( factory->create( TQT_TQOBJECT(KApplication::kApplication()) , "KMFCompilerInterface" ) ) ) { if ( KMFCompilerInterface *part = dynamic_cast<KMFCompilerInterface*> ( factory->create( TQT_TQOBJECT(TDEApplication::kApplication()) , "KMFCompilerInterface" ) ) ) {
kdDebug() << "Returning Compiler Plugin." << endl; kdDebug() << "Returning Compiler Plugin." << endl;
return part; return part;
} }

@ -126,7 +126,7 @@ void KMFProtocolLibrary::forceProtocolLibraryReload() {
url.setPath( file ); url.setPath( file );
kdDebug() << "CUSTOM lib at: " << file << endl; kdDebug() << "CUSTOM lib at: " << file << endl;
// KURL tmpurl = KURL( dir + "protocols/kmfcustomprotocollibrary.xml" ); // KURL tmpurl = KURL( dir + "protocols/kmfcustomprotocollibrary.xml" );
if ( ! KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "KMFGenericDoc::loadProtocolLibrary() - no custom protocols found." << endl; kdDebug() << "KMFGenericDoc::loadProtocolLibrary() - no custom protocols found." << endl;
return; return;
} }
@ -148,7 +148,7 @@ void KMFProtocolLibrary::loadProtocolDefinitionsFromURL( const KURL& url, KMFEr
KIO::UDSEntry f_props; KIO::UDSEntry f_props;
if ( ! KIO::NetAccess::stat( url , f_props, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::stat( url , f_props, TDEApplication::kApplication()->mainWidget() ) ) {
const TQString msg = i18n( "<qt><p>The file <b>%1</b> could not be loaded.</p>" const TQString msg = i18n( "<qt><p>The file <b>%1</b> could not be loaded.</p>"
"<p>If you are working with files stored on remote computers " "<p>If you are working with files stored on remote computers "
@ -168,7 +168,7 @@ void KMFProtocolLibrary::loadProtocolDefinitionsFromURL( const KURL& url, KMFEr
} }
TQString xmlfile; TQString xmlfile;
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
const TQString msg = i18n( "<qt><p>Could not download file: <b>%1</b></p></qt>" ).arg( url.url() ); const TQString msg = i18n( "<qt><p>Could not download file: <b>%1</b></p></qt>" ).arg( url.url() );
err->setErrType( KMFError::NORMAL ); err->setErrType( KMFError::NORMAL );
err->setErrMsg( msg ); err->setErrMsg( msg );
@ -278,7 +278,7 @@ KMFError* KMFProtocolLibrary::saveProtocolLibrary() {
f.close(); f.close();
if ( ! KIO::NetAccess::upload( file.name(), url, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::upload( file.name(), url, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "Coudn't save File: " << url.url() << endl; kdDebug() << "Coudn't save File: " << url.url() << endl;
err->setErrType( KMFError::NORMAL ); err->setErrType( KMFError::NORMAL );
err->setErrMsg( i18n( "<qt><p><b>Saving <i>%1</i> Failed.</b></p>" err->setErrMsg( i18n( "<qt><p><b>Saving <i>%1</i> Failed.</b></p>"

@ -229,7 +229,7 @@ KMFError* KMFTarget::tryAutoConfiguration() {
kdDebug() << "Search Path: " << path << endl; kdDebug() << "Search Path: " << path << endl;
TQString localFile = KGlobal::dirs() ->findResource( "data", path ); TQString localFile = KGlobal::dirs() ->findResource( "data", path );
if ( ! KIO::NetAccess::exists( localFile, false, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::exists( localFile, false, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "No autoconfigure script found for os: " << config()->oS() << endl; kdDebug() << "No autoconfigure script found for os: " << config()->oS() << endl;
emit sigTargetChanged( this ); emit sigTargetChanged( this );
err->setErrType( KMFError::NORMAL ); err->setErrType( KMFError::NORMAL );

@ -36,7 +36,7 @@ namespace KMF {
KProcessWrapper* KProcessWrapper::m_instance = 0; KProcessWrapper* KProcessWrapper::m_instance = 0;
KProcessWrapper* KProcessWrapper::instance() { KProcessWrapper* KProcessWrapper::instance() {
if ( ! m_instance ) { if ( ! m_instance ) {
m_instance = new KProcessWrapper( TQT_TQOBJECT(KApplication::kApplication()->mainWidget()) , "KProcessWrapper" ); m_instance = new KProcessWrapper( TQT_TQOBJECT(TDEApplication::kApplication()->mainWidget()) , "KProcessWrapper" );
} }
return m_instance; return m_instance;
} }
@ -71,7 +71,7 @@ void KProcessWrapper::slotStartLocalJob( const TQString& jobName, const TQString
m_stdErr = ""; m_stdErr = "";
TQString localScriptFile = command; TQString localScriptFile = command;
KTempFile *f = new KTempFile(); KTempFile *f = new KTempFile();
if ( ! KIO::NetAccess::exists( localScriptFile, false, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::exists( localScriptFile, false, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "KProcessWrapper::slotStartLocalJob(...) - creating temporary script file." << endl; kdDebug() << "KProcessWrapper::slotStartLocalJob(...) - creating temporary script file." << endl;
TQTextStream *ts = f->textStream(); TQTextStream *ts = f->textStream();
*ts << command << endl; *ts << command << endl;
@ -105,7 +105,7 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
m_stdOut = ""; m_stdOut = "";
m_stdErr = ""; m_stdErr = "";
KTempFile *f = new KTempFile(); KTempFile *f = new KTempFile();
if ( ! KIO::NetAccess::exists( scriptFile, false, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::exists( scriptFile, false, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "KProcessWrapper::slotStartRemoteJob(...) - creating temporary script file." << endl; kdDebug() << "KProcessWrapper::slotStartRemoteJob(...) - creating temporary script file." << endl;
TQTextStream *ts = f->textStream(); TQTextStream *ts = f->textStream();
*ts << scriptFile << endl; *ts << scriptFile << endl;
@ -119,7 +119,7 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
KURL remFileUrl( execHost->getFishUrl() + "/tmp/" + uuid.toString() ); KURL remFileUrl( execHost->getFishUrl() + "/tmp/" + uuid.toString() );
kdDebug() << "UPLOADING: Temporary script file: " << localScriptFile << " to: " << remFileUrl.url() << endl; kdDebug() << "UPLOADING: Temporary script file: " << localScriptFile << " to: " << remFileUrl.url() << endl;
if ( ! KIO::NetAccess::upload( localScriptFile, remFileUrl, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::upload( localScriptFile, remFileUrl, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "ERROR: Could not upload temp file." << endl; kdDebug() << "ERROR: Could not upload temp file." << endl;
m_exitedNormal = false; m_exitedNormal = false;
m_status = 1; m_status = 1;
@ -136,8 +136,8 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
TQString cmd = "bash /tmp/" + uuid.toString(); TQString cmd = "bash /tmp/" + uuid.toString();
kdDebug() << "Execute: " << cmd << " at: " << execHost->getFishUrl() << endl; kdDebug() << "Execute: " << cmd << " at: " << execHost->getFishUrl() << endl;
const TQString& ret = KIO::NetAccess::fish_execute( execHost->getFishUrl(), cmd, KApplication::kApplication()->mainWidget() ); const TQString& ret = KIO::NetAccess::fish_execute( execHost->getFishUrl(), cmd, TDEApplication::kApplication()->mainWidget() );
if ( ! KIO::NetAccess::del( remFileUrl, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::del( remFileUrl, TDEApplication::kApplication()->mainWidget() ) ) {
m_exitedNormal = false; m_exitedNormal = false;
m_status = 1; m_status = 1;
m_stdErr = i18n( "Could not delete the temporary comand script file." ); m_stdErr = i18n( "Could not delete the temporary comand script file." );

@ -137,9 +137,9 @@ bool KMFInstallerPlugin::isConfigValid() {
errH->showError( err ); errH->showError( err );
if ( ! rulesetDoc()->target()->config()->isValid() ) { if ( ! rulesetDoc()->target()->config()->isValid() ) {
KMessageBox::error( KApplication::kApplication()->mainWidget(), i18n("<qt><p>Auto Confguration of: %1 could not determinate all needed setting. You'll need to configure the mmissing settings.</p></qt>").arg( rulesetDoc()->target()->toFriendlyString() ) ); KMessageBox::error( TDEApplication::kApplication()->mainWidget(), i18n("<qt><p>Auto Confguration of: %1 could not determinate all needed setting. You'll need to configure the mmissing settings.</p></qt>").arg( rulesetDoc()->target()->toFriendlyString() ) );
} else { } else {
KMessageBox::information( KApplication::kApplication()->mainWidget(), i18n("<qt><p>Auto Confguration of: %1 finished successfully.</p></qt>").arg( rulesetDoc()->target()->toFriendlyString() ) ); KMessageBox::information( TDEApplication::kApplication()->mainWidget(), i18n("<qt><p>Auto Confguration of: %1 finished successfully.</p></qt>").arg( rulesetDoc()->target()->toFriendlyString() ) );
} }
configValid = rulesetDoc()->target()->config()->isValid(); configValid = rulesetDoc()->target()->config()->isValid();
@ -186,7 +186,7 @@ void KMFInstallerPlugin::generateInstallerPackage( KMFTarget* tg ) {
if ( url.fileName().isEmpty() ) if ( url.fileName().isEmpty() )
return; return;
if ( KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
TQDateTime now = TQDateTime::currentDateTime(); TQDateTime now = TQDateTime::currentDateTime();
TQString backUp; TQString backUp;
@ -201,12 +201,12 @@ void KMFInstallerPlugin::generateInstallerPackage( KMFTarget* tg ) {
backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) ); backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) );
KIO::NetAccess::file_move( url, newUrl, 700, true, true, KApplication::kApplication()->mainWidget() ); KIO::NetAccess::file_move( url, newUrl, 700, true, true, TDEApplication::kApplication()->mainWidget() );
KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, KApplication::kApplication()->mainWidget() ); KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, TDEApplication::kApplication()->mainWidget() );
} }
inst2->generateInstallerPackage( tg, url ); inst2->generateInstallerPackage( tg, url );
KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", KApplication::kApplication()->mainWidget() ); KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", TDEApplication::kApplication()->mainWidget() );
} }
} }
@ -366,7 +366,7 @@ void KMFInstallerPlugin::slotGenerateInstallerPackage() {
int answer = 0; int answer = 0;
if ( KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
answer = KMessageBox::warningYesNo( 0, i18n( "<qt>File <b>%1</b> already exists!</p>" answer = KMessageBox::warningYesNo( 0, i18n( "<qt>File <b>%1</b> already exists!</p>"
"<p><b>Overwrite the existing file?</b></p></qt>" ).arg( url.url() ) ); "<p><b>Overwrite the existing file?</b></p></qt>" ).arg( url.url() ) );
if ( answer == KMessageBox::No ) { if ( answer == KMessageBox::No ) {

@ -870,7 +870,7 @@ void KMFIPTInstaller::generateInstallerPackage( KMFTarget* tg ) {
if ( url.fileName().isEmpty() ) if ( url.fileName().isEmpty() )
return; return;
if ( KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
TQDateTime now = TQDateTime::currentDateTime(); TQDateTime now = TQDateTime::currentDateTime();
TQString backUp; TQString backUp;
@ -885,12 +885,12 @@ void KMFIPTInstaller::generateInstallerPackage( KMFTarget* tg ) {
backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) ); backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) );
KIO::NetAccess::file_move( url, newUrl, 700, true, true, KApplication::kApplication()->mainWidget() ); KIO::NetAccess::file_move( url, newUrl, 700, true, true, TDEApplication::kApplication()->mainWidget() );
KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, KApplication::kApplication()->mainWidget() ); KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, TDEApplication::kApplication()->mainWidget() );
} }
inst2->generateInstallerPackage( tg, url ); inst2->generateInstallerPackage( tg, url );
KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", KApplication::kApplication()->mainWidget() ); KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", TDEApplication::kApplication()->mainWidget() );
} }
} }
@ -1094,8 +1094,8 @@ void KMFIPTInstaller::generateInstallerPackage( KMFTarget* target, const KURL& p
// KIO::NetAccess::upload( packageArch->name(), packageURL, KApplication::kApplication()->mainWidget() ); // KIO::NetAccess::upload( packageArch->name(), packageURL, TDEApplication::kApplication()->mainWidget() );
KIO::NetAccess::upload( kmf_install_package->name(), packageURL, KApplication::kApplication()->mainWidget() ); KIO::NetAccess::upload( kmf_install_package->name(), packageURL, TDEApplication::kApplication()->mainWidget() );
kdDebug() << "Wrote package: " << packageURL.prettyURL() << endl; kdDebug() << "Wrote package: " << packageURL.prettyURL() << endl;

@ -828,7 +828,7 @@ void KMFPFInstaller::cmdUninstallFW() {
// if ( url.fileName().isEmpty() ) // if ( url.fileName().isEmpty() )
// return; // return;
// //
// if ( KIO::NetAccess::exists( url, false, KApplication::kApplication()->mainWidget() ) ) { // if ( KIO::NetAccess::exists( url, false, TDEApplication::kApplication()->mainWidget() ) ) {
// TQDateTime now = TQDateTime::currentDateTime(); // TQDateTime now = TQDateTime::currentDateTime();
// //
// TQString backUp; // TQString backUp;
@ -843,12 +843,12 @@ void KMFPFInstaller::cmdUninstallFW() {
// backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) ); // backUp.append( now.toString( "dd.MM.yyyy.hh:mm:ss" ) );
// //
// //
// KIO::NetAccess::file_move( url, newUrl, 700, true, true, KApplication::kApplication()->mainWidget() ); // KIO::NetAccess::file_move( url, newUrl, 700, true, true, TDEApplication::kApplication()->mainWidget() );
// KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, KApplication::kApplication()->mainWidget() ); // KIO::NetAccess::fish_execute( remDir, "chmod 400 /tmp/" + backFileName, TDEApplication::kApplication()->mainWidget() );
// } // }
// //
// inst2->generateInstallerPackage( tg, url ); // inst2->generateInstallerPackage( tg, url );
// KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", KApplication::kApplication()->mainWidget() ); // KIO::NetAccess::fish_execute( remDir, "chmod 700 /tmp/kmfpackage.kmfpkg", TDEApplication::kApplication()->mainWidget() );
// } // }
// } // }
@ -1053,8 +1053,8 @@ void KMFPFInstaller::generateInstallerPackage( KMFTarget* target, const KURL& pa
// //
// //
// //
// // KIO::NetAccess::upload( packageArch->name(), packageURL, KApplication::kApplication()->mainWidget() ); // // KIO::NetAccess::upload( packageArch->name(), packageURL, TDEApplication::kApplication()->mainWidget() );
// KIO::NetAccess::upload( kmf_install_package->name(), packageURL, KApplication::kApplication()->mainWidget() ); // KIO::NetAccess::upload( kmf_install_package->name(), packageURL, TDEApplication::kApplication()->mainWidget() );
// //
// kdDebug() << "Wrote package: " << packageURL.prettyURL() << endl; // kdDebug() << "Wrote package: " << packageURL.prettyURL() << endl;
// //

@ -242,7 +242,7 @@ void KMFHostWidget::slotTestConnection() {
return; return;
} }
if ( KIO::NetAccess::fish_execute( m_target->getFishUrl(), "ls /", if ( KIO::NetAccess::fish_execute( m_target->getFishUrl(), "ls /",
KApplication::kApplication()->mainWidget() ) != 0) { TDEApplication::kApplication()->mainWidget() ) != 0) {
KMessageBox::information( this, i18n("Conneted successfully to: %1").arg( m_target->toFriendlyString() ) ); KMessageBox::information( this, i18n("Conneted successfully to: %1").arg( m_target->toFriendlyString() ) );
} else { } else {
KMessageBox::error( this, i18n("Connetion to: %1 failed!").arg( m_target->toFriendlyString() ) ); KMessageBox::error( this, i18n("Connetion to: %1 failed!").arg( m_target->toFriendlyString() ) );

@ -632,7 +632,7 @@ bool KMyFirewall::prepareForFileOpen( const KURL& url ) {
return false; return false;
} }
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "Could not download file." << endl; kdDebug() << "Could not download file." << endl;
return false; return false;
} }
@ -708,7 +708,7 @@ KMFDoc* KMyFirewall::getDocumentLoaderForUrl( const KURL& url, KMFError* err ) {
kdDebug() << "void KMyFirewall::getDocumentLoaderForUrl( const KURL&" << url.fileName() << " )" << endl; kdDebug() << "void KMyFirewall::getDocumentLoaderForUrl( const KURL&" << url.fileName() << " )" << endl;
err->setErrType( KMFError::OK ); err->setErrType( KMFError::OK );
TQString xmlfile; TQString xmlfile;
if ( ! KIO::NetAccess::download( url, xmlfile, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::download( url, xmlfile, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "Could not download file." << endl; kdDebug() << "Could not download file." << endl;
err->setErrType( KMFError::NORMAL ); err->setErrType( KMFError::NORMAL );
err->setErrMsg( i18n( "<qt>Could not download file %1</qt>" ).arg( url.url() ) ); err->setErrMsg( i18n( "<qt>Could not download file %1</qt>" ).arg( url.url() ) );
@ -821,7 +821,7 @@ KMFError* KMyFirewall::parseDocument( const KURL& url ) {
kdDebug() << "void KMyFirewall::parseDocument(TQString& file)" << endl; kdDebug() << "void KMyFirewall::parseDocument(TQString& file)" << endl;
KIO::UDSEntry f_props; KIO::UDSEntry f_props;
if ( ! KIO::NetAccess::stat( url , f_props, KApplication::kApplication()->mainWidget() ) ) { if ( ! KIO::NetAccess::stat( url , f_props, TDEApplication::kApplication()->mainWidget() ) ) {
closeSplash(); closeSplash();
const TQString msg = i18n( "<qt><p>The file <b>%1</b> could not be loaded.</p>" const TQString msg = i18n( "<qt><p>The file <b>%1</b> could not be loaded.</p>"
"<p>If you are working with files stored on remote computers " "<p>If you are working with files stored on remote computers "
@ -1018,7 +1018,7 @@ void KMyFirewall::checkStatus() {
fclose( sbin1 ); fclose( sbin1 );
} }
} else { } else {
if ( KIO::NetAccess::exists( network()->currentTarget()->getFishUrl() + "/etc/kmyfirewall", true, KApplication::kApplication()->mainWidget() ) ) { if ( KIO::NetAccess::exists( network()->currentTarget()->getFishUrl() + "/etc/kmyfirewall", true, TDEApplication::kApplication()->mainWidget() ) ) {
kdDebug() << "Firewall is installed" << endl; kdDebug() << "Firewall is installed" << endl;
isInstalled = true; isInstalled = true;
} }

Loading…
Cancel
Save