From 105bb81f3eb8bed3da57b4e50b656f14847f64b0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 19 Jan 2013 23:53:09 -0600 Subject: [PATCH] Rename KApplication to TDEApplication to avoid conflicts with KDE4 --- acinclude.m4 | 26 +++++++++---------- bibletime/bibletime.cpp | 4 +-- bibletime/bibletimeapp.h | 2 +- bibletime/frontend/cbtconfig.cpp | 8 +++--- bibletime/frontend/cexportmanager.cpp | 10 +++---- bibletime/frontend/cmdiarea.cpp | 2 +- bibletime/frontend/cmoduleindexdialog.cpp | 4 +-- bibletime/frontend/cswordsetupdialog.cpp | 16 ++++++------ bibletime/frontend/display/cdisplay.cpp | 2 +- .../frontend/display/chtmlreaddisplay.cpp | 4 +-- .../frontend/keychooser/cbooktreechooser.cpp | 4 +-- bibletime/frontend/kstartuplogo.cpp | 6 ++--- .../frontend/searchdialog/csearchanalysis.cpp | 2 +- .../searchdialog/csearchdialogpages.cpp | 4 +-- 14 files changed, 47 insertions(+), 47 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 193b811..e745546 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1980,20 +1980,20 @@ cat > conftest.$ac_ext < int main() { - printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); - printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); - printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); - printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); - printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); - printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); - printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); - printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); - printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); - printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); + printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data()); + printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data()); + printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data()); + printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data()); + printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data()); + printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data()); + printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data()); + printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data()); + printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data()); + printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data()); printf("kde_wallpaperdir=\\"%s\\"\n", - KApplication::kde_wallpaperdir().data()); - printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); - printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); + TDEApplication::kde_wallpaperdir().data()); + printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data()); + printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data()); printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); printf("kde_moduledir=\\"/tmp/dummy\\"\n"); diff --git a/bibletime/bibletime.cpp b/bibletime/bibletime.cpp index c71512f..ee47532 100644 --- a/bibletime/bibletime.cpp +++ b/bibletime/bibletime.cpp @@ -277,12 +277,12 @@ void BibleTime::restoreWorkspace() { /** Sets the caption of the mainwindow */ void BibleTime::setCaption( const TQString& ) { - KMainWindow::setPlainCaption( KApplication::kApplication()->makeStdCaption( m_mdi->currentApplicationCaption() ) ); + KMainWindow::setPlainCaption( TDEApplication::kApplication()->makeStdCaption( m_mdi->currentApplicationCaption() ) ); } /** Sets the plain caption of the main window */ void BibleTime::setPlainCaption( const TQString& ) { - KMainWindow::setPlainCaption( KApplication::kApplication()->makeStdCaption( m_mdi->currentApplicationCaption() ) ); + KMainWindow::setPlainCaption( TDEApplication::kApplication()->makeStdCaption( m_mdi->currentApplicationCaption() ) ); } /** Processes the commandline options given to BibleTime. */ diff --git a/bibletime/bibletimeapp.h b/bibletime/bibletimeapp.h index b1ed010..2e743d6 100644 --- a/bibletime/bibletimeapp.h +++ b/bibletime/bibletimeapp.h @@ -21,7 +21,7 @@ /** The BibleTimeApp class is used to clean up all instances of the backend and to delete all created module objects. * @author The BibleTime team */ -class BibleTimeApp : public KApplication, public CPointers { +class BibleTimeApp : public TDEApplication, public CPointers { public: BibleTimeApp(); virtual ~BibleTimeApp(); diff --git a/bibletime/frontend/cbtconfig.cpp b/bibletime/frontend/cbtconfig.cpp index 5a19a76..279d80f 100644 --- a/bibletime/frontend/cbtconfig.cpp +++ b/bibletime/frontend/cbtconfig.cpp @@ -288,7 +288,7 @@ const TQString CBTConfig::getKey( const CLanguageMgr::Language* const language ) const TQFont& CBTConfig::getDefault( const CLanguageMgr::Language* const) { //language specific lookup of the font name - //return KApplication::font(); + //return TDEApplication::font(); if (m_defaultFont) { return *m_defaultFont; } @@ -665,11 +665,11 @@ void CBTConfig::setModuleEncryptionKey( const TQString& module, const TQString& KConfig* const CBTConfig::getConfig() { KConfig* config = KGlobal::config(); - if (KApplication::kApplication()->sessionSaving()) { + if (TDEApplication::kApplication()->sessionSaving()) { tqWarning("Using session config"); - // config = KApplication::kApplication()->sessionConfig(); + // config = TDEApplication::kApplication()->sessionConfig(); } - else if (KApplication::kApplication()->isRestored()) { + else if (TDEApplication::kApplication()->isRestored()) { tqWarning("isRestored(): Using session config"); } diff --git a/bibletime/frontend/cexportmanager.cpp b/bibletime/frontend/cexportmanager.cpp index 483332c..5271221 100644 --- a/bibletime/frontend/cexportmanager.cpp +++ b/bibletime/frontend/cexportmanager.cpp @@ -237,7 +237,7 @@ const bool CExportManager::copyKey(CSwordKey* key, const Format format, const bo text = render->renderSingleKey(key->key(), modules); } - KApplication::clipboard()->setText(text); + TDEApplication::clipboard()->setText(text); return true; }; @@ -272,7 +272,7 @@ const bool CExportManager::copyKeyList(sword::ListKey* list, CSwordModuleInfo* m } const TQString text = render->renderKeyTree(tree); - KApplication::clipboard()->setText(text); + TDEApplication::clipboard()->setText(text); return true; }; @@ -306,7 +306,7 @@ const bool CExportManager::copyKeyList(TQPtrList& list, const Format }; const TQString text = render->renderKeyTree(tree); - KApplication::clipboard()->setText(text); + TDEApplication::clipboard()->setText(text); return true; }; @@ -498,7 +498,7 @@ void CExportManager::setProgressRange( const int items ) { dlg->setMinimumDuration(0); dlg->show(); // dlg->repaint(); - KApplication::kApplication()->processEvents(); //do not lock the GUI! + TDEApplication::kApplication()->processEvents(); //do not lock the GUI! } } @@ -539,5 +539,5 @@ void CExportManager::closeProgressDialog() { dlg->reset(); } - KApplication::kApplication()->processEvents(); //do not lock the GUI! + TDEApplication::kApplication()->processEvents(); //do not lock the GUI! } diff --git a/bibletime/frontend/cmdiarea.cpp b/bibletime/frontend/cmdiarea.cpp index dcb951a..3939717 100644 --- a/bibletime/frontend/cmdiarea.cpp +++ b/bibletime/frontend/cmdiarea.cpp @@ -90,7 +90,7 @@ void CMDIArea::childEvent( TQChildEvent * e ) { if (!windowList().count()) { m_appCaption = TQString(); - emit sigSetToplevelCaption( KApplication::kApplication()->makeStdCaption(m_appCaption) ); + emit sigSetToplevelCaption( TDEApplication::kApplication()->makeStdCaption(m_appCaption) ); emit sigLastPresenterClosed(); } diff --git a/bibletime/frontend/cmoduleindexdialog.cpp b/bibletime/frontend/cmoduleindexdialog.cpp index f42d62c..cf8652b 100644 --- a/bibletime/frontend/cmoduleindexdialog.cpp +++ b/bibletime/frontend/cmoduleindexdialog.cpp @@ -87,12 +87,12 @@ void CModuleIndexDialog::slotModuleProgress( int percentage ) { // tqDebug("progress %d", percentage); progress->progressBar()->setProgress( m_currentModuleIndex * 100 + percentage ); - KApplication::kApplication()->processEvents( 10 ); //10 ms only + TDEApplication::kApplication()->processEvents( 10 ); //10 ms only } void CModuleIndexDialog::slotFinished( ) { tqDebug("indexing finished()"); progress->progressBar()->setProgress( progress->progressBar()->totalSteps() ); - KApplication::kApplication()->processEvents( 1 ); //1 ms only + TDEApplication::kApplication()->processEvents( 1 ); //1 ms only } diff --git a/bibletime/frontend/cswordsetupdialog.cpp b/bibletime/frontend/cswordsetupdialog.cpp index d1b7c29..4f180fa 100644 --- a/bibletime/frontend/cswordsetupdialog.cpp +++ b/bibletime/frontend/cswordsetupdialog.cpp @@ -449,7 +449,7 @@ the module remote installation feature!") void CSwordSetupDialog::populateRemoveModuleListView() { CSwordBackend myBackend; - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); myBackend.initModules(); m_removeModuleListView->clear(); @@ -487,7 +487,7 @@ the module remote installation feature!") m_progressDialog->setMinimumDuration(0); //show immediately m_progressDialog->setAutoClose(false); m_progressDialog->show(); - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); connect( m_progressDialog, TQT_SIGNAL(cancelClicked()), @@ -527,7 +527,7 @@ the module remote installation feature!") } bool CSwordSetupDialog::populateInstallModuleListView( const TQString& sourceName ) { - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); Q_ASSERT(m_installModuleListView); if (!m_installModuleListView) { // this may be an update after removing modules return false; @@ -561,7 +561,7 @@ the module remote installation feature!") CSwordBackend* local_backend = CPointers::backend(); Q_ASSERT(local_backend); // tqWarning("local backend has path %s", local_backend->); - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); //local_backend.initModules(); // tqWarning("config path3 is %s", remote_backend->configPath); @@ -727,7 +727,7 @@ the module remote installation feature!") m_progressDialog->setMinimumDuration(0); //show immediately m_progressDialog->setAutoClose(false); m_progressDialog->show(); - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); connect( m_progressDialog, TQT_SIGNAL(cancelClicked()), @@ -797,7 +797,7 @@ the module remote installation feature!") m_progressDialog->progressBar()->setProgress(total+100*m_installedModuleCount); m_progressDialog->setLabel( i18n("[%1]: %2% complete").arg(m_installingModule).arg(total) ); } - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); } void CSwordSetupDialog::slot_showInstallSourcePage() { @@ -910,14 +910,14 @@ the module remote installation feature!") if (m_currentInstallMgr) { m_currentInstallMgr->terminate(); } - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); } void CSwordSetupDialog::slot_moduleRefreshCompleted(const int /*total*/, const int current) { if (m_progressDialog) { m_progressDialog->progressBar()->setProgress(current); } - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); } } // NAMESPACE diff --git a/bibletime/frontend/display/cdisplay.cpp b/bibletime/frontend/display/cdisplay.cpp index bc81ada..b9f5012 100644 --- a/bibletime/frontend/display/cdisplay.cpp +++ b/bibletime/frontend/display/cdisplay.cpp @@ -139,7 +139,7 @@ CDisplay::~CDisplay() { const bool CDisplay::copy( const CDisplay::TextType format, const CDisplay::TextPart part ) { const TQString content = text(format, part); - TQClipboard* cb = KApplication::clipboard(); + TQClipboard* cb = TDEApplication::clipboard(); cb->setText(content); return true; } diff --git a/bibletime/frontend/display/chtmlreaddisplay.cpp b/bibletime/frontend/display/chtmlreaddisplay.cpp index d4488c8..20b328c 100644 --- a/bibletime/frontend/display/chtmlreaddisplay.cpp +++ b/bibletime/frontend/display/chtmlreaddisplay.cpp @@ -240,7 +240,7 @@ void CHTMLReadDisplay::urlSelected( const TQString& url, int button, int state, moveToAnchor(url.mid(1)); } else if (url.left(7) == "http://") { //open the bowser configured by kdeb - KApplication::kApplication()->invokeBrowser( url ); //ToDo: Not yet tested + TDEApplication::kApplication()->invokeBrowser( url ); //ToDo: Not yet tested } } @@ -339,7 +339,7 @@ void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) { //first make a virtual mouse click to end the selection, it it's in progress TQMouseEvent e(TQEvent::MouseButtonRelease, TQPoint(0,0), Qt::LeftButton, Qt::LeftButton); - KApplication::sendEvent(view()->viewport(), &e); + TDEApplication::sendEvent(view()->viewport(), &e); d->drag(); } } diff --git a/bibletime/frontend/keychooser/cbooktreechooser.cpp b/bibletime/frontend/keychooser/cbooktreechooser.cpp index d47e298..871e9d5 100644 --- a/bibletime/frontend/keychooser/cbooktreechooser.cpp +++ b/bibletime/frontend/keychooser/cbooktreechooser.cpp @@ -289,10 +289,10 @@ void CBookTreeChooser::show() { CKeyChooser::show(); if (!m_treeView->childCount()) { - KApplication::setOverrideCursor(WaitCursor); + TDEApplication::setOverrideCursor(WaitCursor); setupTree(); //create the first level of the tree structure m_treeView->resize(m_treeView->sizeHint()); - KApplication::restoreOverrideCursor(); + TDEApplication::restoreOverrideCursor(); } } diff --git a/bibletime/frontend/kstartuplogo.cpp b/bibletime/frontend/kstartuplogo.cpp index 0609537..2d66621 100644 --- a/bibletime/frontend/kstartuplogo.cpp +++ b/bibletime/frontend/kstartuplogo.cpp @@ -85,8 +85,8 @@ KStartupLogo::KStartupLogo() setPalette( p ); setGeometry ( - (KApplication::desktop()->width()-pm.width())/2, - (KApplication::desktop()->height()-pm.height()-textLabel->height())/2, + (TDEApplication::desktop()->width()-pm.width())/2, + (TDEApplication::desktop()->height()-pm.height()-textLabel->height())/2, pm.width(), pm.height()+textLabel->height() ); @@ -95,7 +95,7 @@ KStartupLogo::KStartupLogo() void KStartupLogo::setText(const TQString text) { //Please not make the text bold & let the first character be blank textLabel->setText( TQString::fromLatin1(" %1").arg(text) ); - KApplication::kApplication()->processEvents(); + TDEApplication::kApplication()->processEvents(); } /** Makes the splashscreen the toplevel window. */ diff --git a/bibletime/frontend/searchdialog/csearchanalysis.cpp b/bibletime/frontend/searchdialog/csearchanalysis.cpp index 7b99e9b..f8a4794 100644 --- a/bibletime/frontend/searchdialog/csearchanalysis.cpp +++ b/bibletime/frontend/searchdialog/csearchanalysis.cpp @@ -160,7 +160,7 @@ void CSearchAnalysis::analyse(ListCSwordModuleInfo modules) { moduleIndex = 0; ListCSwordModuleInfo::iterator end_it = m_moduleList.end(); for (ListCSwordModuleInfo::iterator it(m_moduleList.begin()); it != end_it; ++it) { - KApplication::kApplication()->processEvents( 10 ); //10 ms only + TDEApplication::kApplication()->processEvents( 10 ); //10 ms only if (!m_lastPosList.contains(*it)) { m_lastPosList.insert(*it,0); } diff --git a/bibletime/frontend/searchdialog/csearchdialogpages.cpp b/bibletime/frontend/searchdialog/csearchdialogpages.cpp index 1a4f70a..4cd61fb 100644 --- a/bibletime/frontend/searchdialog/csearchdialogpages.cpp +++ b/bibletime/frontend/searchdialog/csearchdialogpages.cpp @@ -73,7 +73,7 @@ void StrongsResultClass::initStrongsResults(void) { count = result.Count(); if (!count) return; - KApplication::kApplication()->processEvents( 1 ); //1 ms only + TDEApplication::kApplication()->processEvents( 1 ); //1 ms only srList.clear(); // for whatever reason the text "Parsing...translations." does not appear. // this is not critical but the text is necessary to get the dialog box @@ -85,7 +85,7 @@ void StrongsResultClass::initStrongsResults(void) { progress->raise(); for (index = 0; index < count; index++){ progress->progressBar()->setProgress( int( (index*100) / count ) ); - KApplication::kApplication()->processEvents( 1 ); //1 ms only + TDEApplication::kApplication()->processEvents( 1 ); //1 ms only key = TQString::fromUtf8(result.GetElement(index)->getText()); text = render.renderSingleKey(key, modules, settings);