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

pull/1/head
Timothy Pearson 11 years ago
parent 0331606068
commit 3b6aefe251

@ -64,7 +64,7 @@ void ComponentSelectionPage::load()
bool ComponentSelectionPage::save()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("CurrentComponent", currentComponent());
config->sync();

@ -48,7 +48,7 @@ typedef KGenericFactory<AutoStartConfig, TQWidget> AutoStartFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_autostart, AutoStartFactory( "kcmautostart" ) )
AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStringList &) :
KCModule( AutoStartFactory::instance(), parent, name )
TDECModule( AutoStartFactory::instance(), parent, name )
{
TDEGlobal::dirs()->addResourceType("autostart", "share/autostart");
TDEAboutData *about =
@ -78,7 +78,7 @@ AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStr
load();
}
void setModuleGroup(KConfig *config, const TQString &filename)
void setModuleGroup(TDEConfig *config, const TQString &filename)
{
TQString module = filename;
int i = module.findRev('/');
@ -91,13 +91,13 @@ void setModuleGroup(KConfig *config, const TQString &filename)
config->setGroup(TQString("Module-%1").arg(module));
}
bool AutoStartConfig::autoloadEnabled(KConfig *config, const TQString &filename)
bool AutoStartConfig::autoloadEnabled(TDEConfig *config, const TQString &filename)
{
setModuleGroup(config, filename);
return config->readBoolEntry("autoload", true);
}
void AutoStartConfig::setAutoloadEnabled(KConfig *config, const TQString &filename, bool b)
void AutoStartConfig::setAutoloadEnabled(TDEConfig *config, const TQString &filename, bool b)
{
setModuleGroup(config, filename);
return config->writeEntry("autoload", b);

@ -26,7 +26,7 @@ class KListView;
class TQStringList;
class TQPushButton;
class AutoStartConfig : public KCModule
class AutoStartConfig : public TDECModule
{
Q_OBJECT
@ -44,8 +44,8 @@ protected slots:
void slotReload();
void slotItemChecked(TQCheckListItem *item);
bool autoloadEnabled(KConfig *config, const TQString &filename);
void setAutoloadEnabled(KConfig *config, const TQString &filename, bool b);
bool autoloadEnabled(TDEConfig *config, const TQString &filename);
void setAutoloadEnabled(TDEConfig *config, const TQString &filename, bool b);
private:
KListView *_lvStartup;

@ -69,7 +69,7 @@ void KioskConfigDialog::init()
w->lineProfilePrefix->setURL(prefix);
}
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
TQString uploadURL = config->readEntry("uploadURL");
@ -136,7 +136,7 @@ bool KioskConfigDialog::save()
if (w->checkUID->isChecked())
minUID = w->numUID->value();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("uploadURL", uploadURL);
config->writeEntry("uploadPrefix", uploadPrefix);

@ -91,7 +91,7 @@ KioskGui::KioskGui()
connect(m_view->pbDiscard, TQT_SIGNAL(clicked()), this, TQT_SLOT(discardPage()));
connect(m_view->pbFinished, TQT_SIGNAL(clicked()), this, TQT_SLOT(finishedPage()));
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
m_profile = config->readEntry("CurrentProfile", "default");
m_component = config->readEntry("CurrentComponent");
@ -175,7 +175,7 @@ void KioskGui::setupActions()
void KioskGui::updateActions()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
bool uploadEnabled = !config->readEntry("uploadURL").isEmpty();
@ -184,14 +184,14 @@ void KioskGui::updateActions()
m_backgroundAction->setChecked(config->readBoolEntry("FancyBackground", true));
}
void KioskGui::saveProperties(KConfig * /*config*/ )
void KioskGui::saveProperties(TDEConfig * /*config*/ )
{
// the 'config' object points to the session managed
// config file. anything you write here will be available
// later when this app is restored
}
void KioskGui::readProperties(KConfig * /*config*/ )
void KioskGui::readProperties(TDEConfig * /*config*/ )
{
// the 'config' object points to the session managed
// config file. this function is automatically called whenever
@ -521,7 +521,7 @@ bool KioskGui::savePage(int page)
m_profile = m_profileSelectionPage->listProfile->selectedItem() ?
m_profileSelectionPage->listProfile->selectedItem()->text(0) : TQString();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("CurrentProfile", m_profile);
config->sync();
@ -630,7 +630,7 @@ bool KioskGui::queryClose()
}
if (m_uploadAction->isEnabled())
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
KURL uploadUrl = config->readEntry("uploadURL");
@ -647,7 +647,7 @@ bool KioskGui::queryClose()
void KioskGui::uploadAllProfiles()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
TQString uploadPrefix = config->readEntry("uploadPrefix");
TQString uploadURL = config->readEntry("uploadURL");
@ -691,7 +691,7 @@ void KioskGui::uploadCurrentProfile()
void KioskGui::slotUpdateBackground()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("FancyBackground", m_backgroundAction->isChecked());
config->sync();

@ -52,8 +52,8 @@ public:
~KioskGui();
void setupActions();
void saveProperties(KConfig *config);
void readProperties(KConfig *config);
void saveProperties(TDEConfig *config);
void readProperties(TDEConfig *config);
void selectPage(int page, bool save);
void loadPage(int page);

@ -45,7 +45,7 @@
#include "kiosksync.h"
#include <kio/netaccess.h>
#define NETACCESS KIO::NetAccess
#define NETACCESS TDEIO::NetAccess
#undef DEBUG_ENTRIES
@ -620,9 +620,9 @@ KioskRun::flushConfigCache()
{
while ( !m_saveConfigCache.isEmpty() )
{
TQDictIterator<KConfig> it( m_saveConfigCache );
TQDictIterator<TDEConfig> it( m_saveConfigCache );
TQString file = it.currentKey();
KConfig *config = it.current();
TDEConfig *config = it.current();
bool dirty = config->isDirty();
config->sync(); // Save
if (!restoreImmutableStatus(file, dirty))
@ -635,10 +635,10 @@ KioskRun::flushConfigCache()
return true;
}
KConfig *
TDEConfig *
KioskRun::configFile(const TQString &filename)
{
KConfig *config = m_saveConfigCache.find(filename);
TDEConfig *config = m_saveConfigCache.find(filename);
if (config)
return config;
@ -656,7 +656,7 @@ KioskRun::configFile(const TQString &filename)
void
KioskRun::makeMutable(bool bMutable)
{
KConfig *config = configFile("kdeglobals");
TDEConfig *config = configFile("kdeglobals");
m_noRestrictions = bMutable;
if (KDE::version() < TDE_MAKE_VERSION(3,2,4))
@ -709,7 +709,7 @@ KioskRun::newConfigFiles()
void
KioskRun::mergeConfigFile(const TQString &filename)
{
KConfig *saveCfg = configFile(filename);
TDEConfig *saveCfg = configFile(filename);
kdDebug() << "KioskRun::mergeConfigFile(" << (m_configDir + filename) << ")" << endl;
KSimpleConfig newCfg(m_configDir + filename);
@ -840,7 +840,7 @@ KioskRun::dcopRef(const TQCString &appId, const TQCString &objId)
bool
KioskRun::lookupCustomAction(const TQString &action)
{
KConfig *cfg = KioskRun::self()->configFile("kdeglobals");
TDEConfig *cfg = KioskRun::self()->configFile("kdeglobals");
cfg->setGroup("KDE Custom Restrictions");
return cfg->readBoolEntry(action, false);
}
@ -849,7 +849,7 @@ KioskRun::lookupCustomAction(const TQString &action)
void
KioskRun::setCustomAction(const TQString &action, bool checked)
{
KConfig *cfg = KioskRun::self()->configFile("kdeglobals");
TDEConfig *cfg = KioskRun::self()->configFile("kdeglobals");
cfg->setGroup("KDE Custom Restrictions");
if (cfg->readBoolEntry(action, false) != checked)
{
@ -974,7 +974,7 @@ KioskRun::createRemoteDir(const KURL &dest)
return true;
#if KDE_IS_VERSION(3,2,91)
if (NETACCESS::lastError() == KIO::ERR_DIR_ALREADY_EXIST)
if (NETACCESS::lastError() == TDEIO::ERR_DIR_ALREADY_EXIST)
return true;
#endif
@ -1141,7 +1141,7 @@ kdDebug() << "Moving " << src << " --> " << dest << endl;
void
KioskRun::getProfileInfo(const TQString &profile, TQString &description, TQString &installDir, TQString &installUser)
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
TQString defaultInstallDir = getProfilePrefix();
if (defaultInstallDir.isEmpty())
@ -1329,7 +1329,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c
KUser thisUser;
TQString newAdmin = thisUser.loginName()+":"; // This user, all hosts
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Directories");
TQString oldAdmin = config->readEntry("kioskAdmin");
@ -1378,7 +1378,7 @@ KioskRun::deleteProfile(const TQString &profile, bool deleteFiles)
TQString
KioskRun::getProfilePrefix()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Directories");
@ -1417,7 +1417,7 @@ KioskRun::newProfile()
{
TQString profilePrefix = getProfilePrefix();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
for(int p = 1; p; p++)
{
TQString profile = TQString("profile%1").arg(p);
@ -1440,7 +1440,7 @@ KioskRun::newProfile()
TQStringList
KioskRun::allProfiles()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
TQStringList groups = config->groupList();
TQStringList profiles;
TQStringList directories;
@ -1501,7 +1501,7 @@ KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users,
groups.clear();
users.clear();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Directories");
TQString mapFile = config->readEntry("userProfileMapFile");
@ -1537,7 +1537,7 @@ KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users,
bool
KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const TQStringList &groupOrder)
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Directories");
TQString mapFile = config->readEntry("userProfileMapFile");
if (mapFile.isEmpty())
@ -1608,7 +1608,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict)
{
TQString file = "kdeglobals";
TQString group = "KDE URL Restrictions";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup(group);
int count = cfg->readNumEntry("rule_count");
TQStringList urlRestrictions;

@ -31,7 +31,7 @@
#include <kprogress.h>
class ImmutableStatus;
class KConfig;
class TDEConfig;
class TDEProcess;
class KSimpleConfig;
@ -84,7 +84,7 @@ public:
DCOPClient *dcopClient() { return m_dcopClient; }
// Open config file in the install directory
KConfig *configFile(const TQString &filename);
TDEConfig *configFile(const TQString &filename);
// Make config files temporary mutable.
void makeMutable(bool bMutable);
@ -199,7 +199,7 @@ private:
DCOPClient *m_dcopClient;
TDEInstance *m_instance;
TDEInstance *m_saveInstance;
TQDict<KConfig> m_saveConfigCache;
TQDict<TDEConfig> m_saveConfigCache;
TQDict<ImmutableStatus> m_immutableStatusCache;
bool m_noRestrictions;
bool m_forceSycocaUpdate;

@ -155,7 +155,7 @@ int main(int argc, char **argv)
}
}
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("Directories");
TQString userMapFile = config->readEntry("userProfileMapFile");
TQString profileDirsPrefix = config->readEntry("profileDirsPrefix");

@ -66,7 +66,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData)
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Action Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
@ -76,7 +76,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData)
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Resource Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
@ -84,7 +84,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData)
else if (action->type == ComponentAction::ActModule)
{
TQString file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Control Module Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
@ -109,7 +109,7 @@ tqWarning("File = %s Group = %s Immutable = %s", file.latin1(), group.latin1(),
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup(action->group);
bool checked = cfg->readBoolEntry(action->key, action->defaultValue);
item->setOn(checked);
@ -126,7 +126,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b)
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Action Restrictions");
bool allowed = !b; // reverse logic
@ -141,7 +141,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b)
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Resource Restrictions");
bool allowed = !b; // reverse logic
@ -154,7 +154,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b)
else if (action->type == ComponentAction::ActModule)
{
TQString file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Control Module Restrictions");
bool allowed = !b; // reverse logic
@ -181,7 +181,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b)
TQString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
TDEConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup(action->group);
if (cfg->readBoolEntry(action->key, action->defaultValue) != b)

@ -40,7 +40,7 @@ static TQStringList userList()
result << thisUser.loginName();
result << "root";
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
result += config->readListEntry("PreviousUsers");
result.sort();
@ -208,7 +208,7 @@ bool ProfilePropsPage::save()
}
// Store this user for easy access later
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
TQStringList previousUsers= config->readListEntry("PreviousUsers");
if (!previousUsers.contains(user))

@ -152,7 +152,7 @@ bool UserManagementPage::save()
void UserManagementPage::slotAddGroup()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
TQStringList groupBlacklist = config->readListEntry("GroupBlacklist");
@ -224,7 +224,7 @@ void UserManagementPage::slotDeleteGroup()
void UserManagementPage::slotAddUser()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
int minUID = config->readNumEntry("FirstUIDShown", 500);

Loading…
Cancel
Save