Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

r14.0.x
Timothy Pearson 12 years ago
parent 11d478f324
commit 521d23a48a

@ -169,7 +169,7 @@ const TQString CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQ
*/
void CDisplayTemplateMgr::loadUserTemplates() {
tqDebug("Loading user templates");
TQStringList files = KGlobal::dirs()->findAllResources("BT_DisplayTemplates");
TQStringList files = TDEGlobal::dirs()->findAllResources("BT_DisplayTemplates");
for ( TQStringList::iterator it( files.begin() ); it != files.end(); ++it) {
tqDebug("Found user template %s", (*it).latin1());

@ -70,7 +70,7 @@ TQStringList* const CSwordLexiconModuleInfo::entries() {
return m_entryList;
}
TQString dir( KGlobal::dirs()->saveLocation("data", "bibletime/cache/") );
TQString dir( TDEGlobal::dirs()->saveLocation("data", "bibletime/cache/") );
TQFile f1(
TQString(dir)
.append("/")
@ -147,7 +147,7 @@ TQStringList* const CSwordLexiconModuleInfo::entries() {
if (m_entryList->count()) {
//create cache
TQString dir = KGlobal::dirs()->saveLocation("data", "bibletime/cache/");
TQString dir = TDEGlobal::dirs()->saveLocation("data", "bibletime/cache/");
//TQFile f2( TQString::fromLatin1("%1/%2").arg(dir).arg( name() ) );
TQFile f2( TQString(dir).append("/").append(name()) );

@ -178,7 +178,7 @@ const bool CSwordModuleInfo::unlockKeyIsValid() {
}
const TQString CSwordModuleInfo::getGlobalBaseIndexLocation() {
return KGlobal::dirs()->saveLocation("data", "bibletime/indices");
return TDEGlobal::dirs()->saveLocation("data", "bibletime/indices");
}
const TQString CSwordModuleInfo::getModuleBaseIndexLocation() const {

@ -96,7 +96,7 @@ void BibleTime::initView() {
m_mdi->setMinimumSize(100, 100);
m_mdi->setFocusPolicy(TQ_ClickFocus);
m_helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true, actionCollection());
m_helpMenu = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), true, actionCollection());
}
/** Initializes the action objects of the GUI */

@ -81,7 +81,7 @@ namespace BookshelfManager {
void BTInstallMgr::Tool::LocalConfig::setTargetList( const TQStringList& targets ) {
//saves a new Sworc config using the provided target list
TQString filename = KGlobal::dirs()->saveLocation("data", "bibletime/") + "sword.conf"; //default is to assume the real location isn't writable
TQString filename = TDEGlobal::dirs()->saveLocation("data", "bibletime/") + "sword.conf"; //default is to assume the real location isn't writable
bool directAccess = false;
TQFileInfo i(LocalConfig::swordConfigFilename());
@ -115,10 +115,10 @@ namespace BookshelfManager {
conf.Save();
if (!directAccess) { //use tdesu to move the file to the right place
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "tdesu";
*proc << TQString::fromLatin1("-c") << TQString("mv %1 %2").arg(filename).arg(LocalConfig::swordConfigFilename());
proc->start(KProcess::Block);
proc->start(TDEProcess::Block);
}
}

@ -64,7 +64,7 @@ const TQString CBTConfig::getKey( const CBTConfig::strings ID) {
const TQString CBTConfig::getDefault( const CBTConfig::strings ID) {
switch ( ID ) {
case bibletimeVersion: return "NOT YET INSTALLED"; // main() will realize this and set the value to VERSION
case language: return (KGlobal::locale()->language()).local8Bit();
case language: return (TDEGlobal::locale()->language()).local8Bit();
case displayStyle: return CDisplayTemplateMgr::defaultTemplate();
case bookshelfCurrentItem: return TQString();
}
@ -663,7 +663,7 @@ void CBTConfig::setModuleEncryptionKey( const TQString& module, const TQString&
};
KConfig* const CBTConfig::getConfig() {
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
if (TDEApplication::kApplication()->sessionSaving()) {
tqWarning("Using session config");

@ -306,7 +306,7 @@ void CHTMLReadDisplay::khtmlMousePressEvent( khtml::MousePressEvent* event ) {
/** Reimplementation for our drag&drop system. Also needed for the mouse tracking */
void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) {
if( e->qmouseEvent()->state() & Qt::LeftButton == Qt::LeftButton) { //left mouse button pressed
const int delay = KGlobalSettings::dndEventDelay();
const int delay = TDEGlobalSettings::dndEventDelay();
TQPoint newPos = TQPoint(e->x(), e->y());
if ( (newPos.x() > m_dndData.startPos.x()+delay || newPos.x() < (m_dndData.startPos.x()-delay) ||

@ -54,14 +54,14 @@ CKeyReferenceLineEdit::CKeyReferenceLineEdit(TQWidget *parent, const char *name)
void CKeyReferenceLineEdit::makeCompletion(const TQString &text) {
KCompletion *comp = compObj();
KGlobalSettings::Completion mode = completionMode();
TDEGlobalSettings::Completion mode = completionMode();
if ( !comp || mode == KGlobalSettings::CompletionNone )
if ( !comp || mode == TDEGlobalSettings::CompletionNone )
return; // No completion object...
TQString match = comp->makeCompletion( text );
if ( mode == KGlobalSettings::CompletionPopup ||
mode == KGlobalSettings::CompletionPopupAuto )
if ( mode == TDEGlobalSettings::CompletionPopup ||
mode == TDEGlobalSettings::CompletionPopupAuto )
{
if ( match.isNull() )
{
@ -150,7 +150,7 @@ void CKeyReferenceWidget::setModule(CSwordBibleModuleInfo *m) {
delete m_textbox->completionObject();
CKeyReferenceCompletion *comp = new CKeyReferenceCompletion(m_module);
m_textbox->setCompletionObject(comp);
m_textbox->setCompletionMode(KGlobalSettings::CompletionPopup);
m_textbox->setCompletionMode(TDEGlobalSettings::CompletionPopup);
}
void CKeyReferenceWidget::slotClearRef( ) {

@ -235,8 +235,8 @@ int main(int argc, char* argv[]) {
TDECmdLineArgs::addCmdLineOptions( options );
BibleTimeApp app;
KGlobal::dirs()->addResourceType("BT_pic", "share/apps/bibletime/pics");
KGlobal::dirs()->addResourceType("BT_DisplayTemplates", "share/apps/bibletime/display-templates");
TDEGlobal::dirs()->addResourceType("BT_pic", "share/apps/bibletime/pics");
TDEGlobal::dirs()->addResourceType("BT_DisplayTemplates", "share/apps/bibletime/display-templates");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -35,7 +35,7 @@
TQString CToolClass::locatehtml(const TQString &filename) {
TQString path = locate("html", KGlobal::locale()->language() + '/' + filename);
TQString path = locate("html", TDEGlobal::locale()->language() + '/' + filename);
if (path.isNull())
path = locate("html", "default/" + filename);
if (path.isNull())

Loading…
Cancel
Save