Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/22/head
Michele Calgaro 6 months ago
parent b0a8e135a1
commit 6538b3d223
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -165,7 +165,7 @@ void KDiff3Plugin::slotCompareWith()
TQStringList args; TQStringList args;
args << s_pHistory->front(); args << s_pHistory->front();
args << m_list.front(); args << m_list.front();
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }
@ -177,7 +177,7 @@ void KDiff3Plugin::slotCompareWithHistoryItem()
TQStringList args; TQStringList args;
args << pAction->text(); args << pAction->text();
args << m_list.front(); args << m_list.front();
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }
@ -188,7 +188,7 @@ void KDiff3Plugin::slotCompareTwoFiles()
TQStringList args; TQStringList args;
args << m_list.front(); args << m_list.front();
args << m_list.back(); args << m_list.back();
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }
@ -200,7 +200,7 @@ void KDiff3Plugin::slotCompareThreeFiles()
args << m_list[0]; args << m_list[0];
args << m_list[1]; args << m_list[1];
args << m_list[2]; args << m_list[2];
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }
@ -212,7 +212,7 @@ void KDiff3Plugin::slotMergeWith()
args << s_pHistory->front(); args << s_pHistory->front();
args << m_list.front(); args << m_list.front();
args << ( "-o" + m_list.front() ); args << ( "-o" + m_list.front() );
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }
@ -225,7 +225,7 @@ void KDiff3Plugin::slotMergeThreeWay()
args << (*s_pHistory)[0]; args << (*s_pHistory)[0];
args << m_list.front(); args << m_list.front();
args << ("-o" + m_list.front()); args << ("-o" + m_list.front());
kapp->tdeinitExec ("kdiff3", args); tdeApp->tdeinitExec ("kdiff3", args);
} }
} }

@ -130,7 +130,7 @@ KDiff3App::KDiff3App(TQWidget* pParent, const char* name, KDiff3Part* pKDiff3Par
m_pOptionDialog = new OptionDialog( m_pKDiff3Shell!=0, this ); m_pOptionDialog = new OptionDialog( m_pKDiff3Shell!=0, this );
connect( m_pOptionDialog, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(slotRefresh()) ); connect( m_pOptionDialog, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(slotRefresh()) );
m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() ); m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->instance()->config() : tdeApp->config() );
// Option handling: Only when pParent==0 (no parent) // Option handling: Only when pParent==0 (no parent)
TDECmdLineArgs *args = isPart() ? 0 : TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = isPart() ? 0 : TDECmdLineArgs::parsedArgs();
@ -277,7 +277,7 @@ KDiff3App::KDiff3App(TQWidget* pParent, const char* name, KDiff3Part* pKDiff3Par
m_pDirectoryMergeSplitter = new TQSplitter( m_pMainSplitter ); m_pDirectoryMergeSplitter = new TQSplitter( m_pMainSplitter );
m_pDirectoryMergeSplitter->setOrientation(TQt::Horizontal ); m_pDirectoryMergeSplitter->setOrientation(TQt::Horizontal );
m_pDirectoryMergeWindow = new DirectoryMergeWindow( m_pDirectoryMergeSplitter, m_pOptionDialog, m_pDirectoryMergeWindow = new DirectoryMergeWindow( m_pDirectoryMergeSplitter, m_pOptionDialog,
TDEApplication::kApplication()->iconLoader() ); tdeApp->iconLoader() );
m_pDirectoryMergeInfo = new DirectoryMergeInfo( m_pDirectoryMergeSplitter ); m_pDirectoryMergeInfo = new DirectoryMergeInfo( m_pDirectoryMergeSplitter );
m_pDirectoryMergeWindow->setDirectoryMergeInfo( m_pDirectoryMergeInfo ); m_pDirectoryMergeWindow->setDirectoryMergeInfo( m_pDirectoryMergeInfo );
connect( m_pDirectoryMergeWindow, TQ_SIGNAL(startDiffMerge(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDiffStatus*)), connect( m_pDirectoryMergeWindow, TQ_SIGNAL(startDiffMerge(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDiffStatus*)),
@ -593,7 +593,7 @@ void KDiff3App::saveOptions( TDEConfig* config )
bool KDiff3App::queryClose() bool KDiff3App::queryClose()
{ {
saveOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() ); saveOptions( isPart() ? m_pKDiff3Part->instance()->config() : tdeApp->config() );
if(m_bOutputModified) if(m_bOutputModified)
{ {

@ -69,7 +69,7 @@ KDiff3Part::~KDiff3Part()
{ {
if ( m_widget!=0 && ! m_bIsShell ) if ( m_widget!=0 && ! m_bIsShell )
{ {
m_widget->saveOptions( m_widget->isPart() ? instance()->config() : kapp->config() ); m_widget->saveOptions( m_widget->isPart() ? instance()->config() : tdeApp->config() );
} }
} }

@ -79,11 +79,11 @@ KDiff3Shell::KDiff3Shell(bool bCompleteInit)
"This usually happens due to an installation problem. " "This usually happens due to an installation problem. "
"Please read the README-file in the source package for details.") "Please read the README-file in the source package for details.")
); );
//kapp->quit(); //tdeApp->quit();
::exit(-1); //kapp->quit() doesn't work here yet. ::exit(-1); //tdeApp->quit() doesn't work here yet.
// we return here, cause kapp->quit() only means "exit the // we return here, cause tdeApp->quit() only means "exit the
// next time we enter the event loop... // next time we enter the event loop...
return; return;

@ -978,12 +978,12 @@ bool TDECmdLineArgs::isSet(const TQString& s)
} }
/////////////////// ///////////////////
TDEApplication* kapp; TDEApplication* tdeApp;
TDEApplication::TDEApplication() TDEApplication::TDEApplication()
: TQApplication( s_argc,s_argv ) : TQApplication( s_argc,s_argv )
{ {
kapp = this; tdeApp = this;
int nofOptions=0; int nofOptions=0;
int nofArgs=0; int nofArgs=0;
@ -1119,9 +1119,9 @@ bool TDEApplication::isRestored()
return false; return false;
} }
TDEApplication* TDEApplication::kApplication() TDEApplication* TDEApplication::tdeApplication()
{ {
return kapp; return tdeApp;
} }
TDEIconLoader* TDEApplication::iconLoader() TDEIconLoader* TDEApplication::iconLoader()
@ -1152,7 +1152,7 @@ TDEActionCollection* KParts::Part::actionCollection()
TDEApplication* KParts::Part::instance() TDEApplication* KParts::Part::instance()
{ {
return kapp; return tdeApp;
} }

@ -381,13 +381,13 @@ class TDEApplication : public TQApplication
TDEIconLoader m_iconLoader; TDEIconLoader m_iconLoader;
public: public:
TDEApplication(); TDEApplication();
static TDEApplication* kApplication(); static TDEApplication* tdeApplication();
TDEIconLoader* iconLoader(); TDEIconLoader* iconLoader();
TDEConfig* config(); TDEConfig* config();
bool isRestored(); bool isRestored();
}; };
extern TDEApplication* kapp; extern TDEApplication* tdeApp;
class KLibFactory : public TQObject class KLibFactory : public TQObject
{ {

Loading…
Cancel
Save