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
util::scoped_ptr<KConfig> indexconfig(
new KConfig( getModuleBaseIndexLocation() + TQString("/bibletime-index.conf") )
util::scoped_ptr<TDEConfig> indexconfig(
new TDEConfig( getModuleBaseIndexLocation() + TQString("/bibletime-index.conf") )
);
if (hasVersion()) {
@ -365,7 +365,7 @@ void CSwordModuleInfo::buildIndex() {
writer->close();
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()) {
indexconfig->writeEntry("module-version", config(CSwordModuleInfo::ModuleVersion) );
}

@ -263,10 +263,10 @@ bool BibleTime::queryClose() {
}
/** Reimplementation used for sessions management. */
void BibleTime::saveProperties(KConfig* /*myConfig*/) {}
void BibleTime::saveProperties(TDEConfig* /*myConfig*/) {}
/** 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. */
void BibleTime::restoreWorkspace() {

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

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

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

@ -24,7 +24,7 @@
//Forward declarations
class KAccel;
class KActionCollection;
class KConfig;
class TDEConfig;
/**
* This class is the interface to the config object of BibleTime
@ -171,7 +171,7 @@ public:
/** The config object.
* @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:
static const TQString getKey( const CBTConfig::strings );

@ -703,9 +703,9 @@ namespace Bookmarks {
/* --------------------------------------------------------------------------*/
const TQString OldBookmarkImport::oldBookmarksXML( const TQString& 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");
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );

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

Loading…
Cancel
Save