Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

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

@ -198,8 +198,8 @@ const bool CSwordModuleInfo::hasIndex() { //this will return true only
} }
//first check if the index version and module version are ok //first check if the index version and module version are ok
util::scoped_ptr<KConfig> indexconfig( util::scoped_ptr<TDEConfig> indexconfig(
new KConfig( getModuleBaseIndexLocation() + TQString("/bibletime-index.conf") ) new TDEConfig( getModuleBaseIndexLocation() + TQString("/bibletime-index.conf") )
); );
if (hasVersion()) { if (hasVersion()) {
@ -365,7 +365,7 @@ void CSwordModuleInfo::buildIndex() {
writer->close(); writer->close();
TQString configFilename = getModuleStandardIndexLocation() + TQString("/../bibletime-index.conf"); TQString configFilename = getModuleStandardIndexLocation() + TQString("/../bibletime-index.conf");
util::scoped_ptr<KConfig> indexconfig( new KConfig( configFilename ) ); util::scoped_ptr<TDEConfig> indexconfig( new TDEConfig( configFilename ) );
if (hasVersion()) { if (hasVersion()) {
indexconfig->writeEntry("module-version", config(CSwordModuleInfo::ModuleVersion) ); indexconfig->writeEntry("module-version", config(CSwordModuleInfo::ModuleVersion) );
} }

@ -263,10 +263,10 @@ bool BibleTime::queryClose() {
} }
/** Reimplementation used for sessions management. */ /** Reimplementation used for sessions management. */
void BibleTime::saveProperties(KConfig* /*myConfig*/) {} void BibleTime::saveProperties(TDEConfig* /*myConfig*/) {}
/** Reimplementation used for session management. */ /** Reimplementation used for session management. */
void BibleTime::readProperties(KConfig* /*myConfig*/) {} void BibleTime::readProperties(TDEConfig* /*myConfig*/) {}
/** Restores the workspace if the flag for this is set in the config. */ /** Restores the workspace if the flag for this is set in the config. */
void BibleTime::restoreWorkspace() { void BibleTime::restoreWorkspace() {

@ -238,11 +238,11 @@ protected: // Protected methods
/** /**
* Reimplementation used for session management. * Reimplementation used for session management.
*/ */
void readProperties(KConfig* config); void readProperties(TDEConfig* config);
/** /**
* Reimplementation used for sessions management. * Reimplementation used for sessions management.
*/ */
void saveProperties(KConfig* myConfig); void saveProperties(TDEConfig* myConfig);
protected slots: protected slots:
/** /**

@ -278,7 +278,7 @@ namespace BookshelfManager {
#ifdef SWORD_INTERNET_WARNING #ifdef SWORD_INTERNET_WARNING
bool BTInstallMgr::isUserDisclaimerConfirmed() const bool BTInstallMgr::isUserDisclaimerConfirmed() const
{ {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
config->setGroup("Remote Resources"); config->setGroup("Remote Resources");
if (config->readNumEntry("Allowed", 0) == 1) { if (config->readNumEntry("Allowed", 0) == 1) {
return true; return true;

@ -296,7 +296,7 @@ const TQFont& CBTConfig::getDefault( const CLanguageMgr::Language* const) {
static KStaticDeleter<TQFont> sd; static KStaticDeleter<TQFont> sd;
//TODO: We need a better way to get the KDE konqueror KHTML settings //TODO: We need a better way to get the KDE konqueror KHTML settings
KConfig conf("konquerorrc"); TDEConfig conf("konquerorrc");
KHTMLSettings settings; KHTMLSettings settings;
settings.init(&conf); settings.init(&conf);
@ -311,15 +311,15 @@ const TQFont& CBTConfig::getDefault( const CLanguageMgr::Language* const) {
const TQString CBTConfig::get const TQString CBTConfig::get
( const CBTConfig::strings ID) { ( const CBTConfig::strings ID) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "strings"); TDEConfigGroupSaver groupSaver(config, "strings");
return config->readEntry(getKey(ID),getDefault(ID)); return config->readEntry(getKey(ID),getDefault(ID));
} }
CSwordModuleInfo* const CBTConfig::get CSwordModuleInfo* const CBTConfig::get
( const CBTConfig::modules ID) { ( const CBTConfig::modules ID) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "modules"); TDEConfigGroupSaver groupSaver(config, "modules");
TQString name = config->readEntry(getKey(ID),getDefault(ID)); TQString name = config->readEntry(getKey(ID),getDefault(ID));
return CPointers::backend()->findModuleByName(name); return CPointers::backend()->findModuleByName(name);
@ -329,36 +329,36 @@ CSwordModuleInfo* const CBTConfig::get
const bool CBTConfig::get const bool CBTConfig::get
( const CBTConfig::bools ID) { ( const CBTConfig::bools ID) {
//special behaviour for the KTipDialog class //special behaviour for the KTipDialog class
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, (ID == CBTConfig::tips) ? "TipOfDay" : "bools"); TDEConfigGroupSaver groupSaver(config, (ID == CBTConfig::tips) ? "TipOfDay" : "bools");
return config->readBoolEntry(getKey(ID),getDefault(ID)); return config->readBoolEntry(getKey(ID),getDefault(ID));
} }
const int CBTConfig::get const int CBTConfig::get
( const CBTConfig::ints ID) { ( const CBTConfig::ints ID) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "ints"); TDEConfigGroupSaver groupSaver(config, "ints");
return config->readNumEntry(getKey(ID), getDefault(ID)); return config->readNumEntry(getKey(ID), getDefault(ID));
} }
const TQValueList<int> CBTConfig::get const TQValueList<int> CBTConfig::get
( const CBTConfig::intLists ID ) { ( const CBTConfig::intLists ID ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "intlists"); TDEConfigGroupSaver groupSaver(config, "intlists");
return config->readIntListEntry(getKey(ID)); return config->readIntListEntry(getKey(ID));
} }
const TQStringList CBTConfig::get const TQStringList CBTConfig::get
( const CBTConfig::stringLists ID ) { ( const CBTConfig::stringLists ID ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "stringlists"); TDEConfigGroupSaver groupSaver(config, "stringlists");
return config->readListEntry(getKey(ID)); return config->readListEntry(getKey(ID));
} }
const CBTConfig::StringMap CBTConfig::get const CBTConfig::StringMap CBTConfig::get
( const CBTConfig::stringMaps ID ) { ( const CBTConfig::stringMaps ID ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, getKey(ID)); TDEConfigGroupSaver groupSaver(config, getKey(ID));
if (config->hasGroup(getKey(ID))) { if (config->hasGroup(getKey(ID))) {
CBTConfig::StringMap map = config->entryMap(getKey(ID)); CBTConfig::StringMap map = config->entryMap(getKey(ID));
@ -395,8 +395,8 @@ const CBTConfig::FontSettingsPair CBTConfig::get
sd.setObject(fontConfigMap, new FontCache()); sd.setObject(fontConfigMap, new FontCache());
} }
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "font standard settings"); TDEConfigGroupSaver groupSaver(config, "font standard settings");
FontSettingsPair settings; FontSettingsPair settings;
settings.first = config->readBoolEntry(getKey(language)); settings.first = config->readBoolEntry(getKey(language));
@ -414,15 +414,15 @@ const CBTConfig::FontSettingsPair CBTConfig::get
void CBTConfig::set void CBTConfig::set
( const CBTConfig::strings ID, const TQString value ) { ( const CBTConfig::strings ID, const TQString value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "strings"); TDEConfigGroupSaver groupSaver(config, "strings");
config->writeEntry(getKey(ID), value); config->writeEntry(getKey(ID), value);
} }
void CBTConfig::set void CBTConfig::set
( const CBTConfig::modules ID, CSwordModuleInfo* const value ) { ( const CBTConfig::modules ID, CSwordModuleInfo* const value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "modules"); TDEConfigGroupSaver groupSaver(config, "modules");
config->writeEntry(getKey(ID), value ? value->name() : TQString()); config->writeEntry(getKey(ID), value ? value->name() : TQString());
} }
@ -437,37 +437,37 @@ void CBTConfig::set
void CBTConfig::set void CBTConfig::set
(const CBTConfig::bools ID,const bool value ) { (const CBTConfig::bools ID,const bool value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
//special behaviour to work with KTipDialog class of KDE //special behaviour to work with KTipDialog class of KDE
KConfigGroupSaver groupSaver(config, (ID == CBTConfig::tips) ? "TipOfDay" : "bools"); TDEConfigGroupSaver groupSaver(config, (ID == CBTConfig::tips) ? "TipOfDay" : "bools");
config->writeEntry(getKey(ID), value); config->writeEntry(getKey(ID), value);
} }
void CBTConfig::set void CBTConfig::set
(const CBTConfig::ints ID, const int value ) { (const CBTConfig::ints ID, const int value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "ints"); TDEConfigGroupSaver groupSaver(config, "ints");
config->writeEntry(getKey(ID), value); config->writeEntry(getKey(ID), value);
} }
void CBTConfig::set void CBTConfig::set
( const CBTConfig::intLists ID, const TQValueList<int> value ) { ( const CBTConfig::intLists ID, const TQValueList<int> value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "intlists"); TDEConfigGroupSaver groupSaver(config, "intlists");
config->writeEntry(getKey(ID), value); config->writeEntry(getKey(ID), value);
} }
void CBTConfig::set void CBTConfig::set
( const CBTConfig::stringLists ID, const TQStringList value ) { ( const CBTConfig::stringLists ID, const TQStringList value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "stringlists"); TDEConfigGroupSaver groupSaver(config, "stringlists");
config->writeEntry(getKey(ID), value); config->writeEntry(getKey(ID), value);
} }
void CBTConfig::set void CBTConfig::set
( const CBTConfig::stringMaps ID, const CBTConfig::StringMap value ) { ( const CBTConfig::stringMaps ID, const CBTConfig::StringMap value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, getKey(ID)); TDEConfigGroupSaver groupSaver(config, getKey(ID));
config->deleteGroup(getKey(ID)); //make sure we only save the new entries and don't use old ones config->deleteGroup(getKey(ID)); //make sure we only save the new entries and don't use old ones
config->sync(); config->sync();
config->setGroup(getKey(ID)); config->setGroup(getKey(ID));
@ -507,9 +507,9 @@ void CBTConfig::set
void CBTConfig::set void CBTConfig::set
( const CLanguageMgr::Language* const language, const FontSettingsPair& value ) { ( const CLanguageMgr::Language* const language, const FontSettingsPair& value ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "fonts"); TDEConfigGroupSaver groupSaver(config, "fonts");
config->writeEntry(getKey(language), value.second); config->writeEntry(getKey(language), value.second);
config->setGroup("font standard settings"); config->setGroup("font standard settings");
@ -639,8 +639,8 @@ void CBTConfig::saveAccelSettings(const CBTConfig::keys type, KActionCollection*
const TQString CBTConfig::getModuleEncryptionKey( const TQString& module ) { const TQString CBTConfig::getModuleEncryptionKey( const TQString& module ) {
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "Module keys"); TDEConfigGroupSaver groupSaver(config, "Module keys");
return config->readEntry(module, TQString()); return config->readEntry(module, TQString());
} }
@ -656,14 +656,14 @@ void CBTConfig::setModuleEncryptionKey( const TQString& module, const TQString&
// return; // return;
// }; // };
KConfig* config = CBTConfig::getConfig(); TDEConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "Module keys"); TDEConfigGroupSaver groupSaver(config, "Module keys");
config->writeEntry(module, key); config->writeEntry(module, key);
}; };
KConfig* const CBTConfig::getConfig() { TDEConfig* const CBTConfig::getConfig() {
KConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
if (TDEApplication::kApplication()->sessionSaving()) { if (TDEApplication::kApplication()->sessionSaving()) {
tqWarning("Using session config"); tqWarning("Using session config");

@ -24,7 +24,7 @@
//Forward declarations //Forward declarations
class KAccel; class KAccel;
class KActionCollection; class KActionCollection;
class KConfig; class TDEConfig;
/** /**
* This class is the interface to the config object of BibleTime * This class is the interface to the config object of BibleTime
@ -171,7 +171,7 @@ public:
/** The config object. /** The config object.
* @return A config object which is used currently, may be the global config or the session config * @return A config object which is used currently, may be the global config or the session config
*/ */
static KConfig* const getConfig(); static TDEConfig* const getConfig();
private: private:
static const TQString getKey( const CBTConfig::strings ); static const TQString getKey( const CBTConfig::strings );

@ -703,9 +703,9 @@ namespace Bookmarks {
/* --------------------------------------------------------------------------*/ /* --------------------------------------------------------------------------*/
const TQString OldBookmarkImport::oldBookmarksXML( const TQString& configFileName ) { const TQString OldBookmarkImport::oldBookmarksXML( const TQString& configFileName ) {
TQString fileName = (configFileName.isEmpty()) ? "bt-groupmanager" : configFileName; TQString fileName = (configFileName.isEmpty()) ? "bt-groupmanager" : configFileName;
KConfig* config = new KSimpleConfig( fileName ); TDEConfig* config = new KSimpleConfig( fileName );
KConfigGroupSaver groupSaver(config, configFileName.isEmpty() ? "Groupmanager" : "Bookmarks"); TDEConfigGroupSaver groupSaver(config, configFileName.isEmpty() ? "Groupmanager" : "Bookmarks");
TQDomDocument doc("DOC"); TQDomDocument doc("DOC");
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );

@ -23,7 +23,7 @@
//KDE includes //KDE includes
#include <klistview.h> #include <klistview.h>
class KConfig; class TDEConfig;
class CFolderBase; class CFolderBase;
class CTreeFolder; class CTreeFolder;
class CMainIndex; class CMainIndex;

Loading…
Cancel
Save