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

pull/1/head
Timothy Pearson 11 years ago
parent 76a6704302
commit 715ba29794

@ -98,7 +98,7 @@ Changes in 2.8:
without their own postfix. without their own postfix.
* Fixed a crash when a terminal in a tab other than the currently selected tab * Fixed a crash when a terminal in a tab other than the currently selected tab
exits. exits.
* Ported preferences handling to KDE's KConfigXT framework. Aside from cleaner * Ported preferences handling to KDE's TDEConfigXT framework. Aside from cleaner
code, this improves over the old preferences handling by avoiding unnecessary code, this improves over the old preferences handling by avoiding unnecessary
disk activity (and thus spurious hard drive spin-ups on laptop computers and disk activity (and thus spurious hard drive spin-ups on laptop computers and
other battery-bound devices). other battery-bound devices).

@ -43,7 +43,7 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) :
background_changed = false; background_changed = false;
use_translucency = false; use_translucency = false;
KConfig config(CONFIG_FILE); TDEConfig config(CONFIG_FILE);
back_widget = new TQWidget(this); back_widget = new TQWidget(this);
widgets_stack = new TQWidgetStack(this); widgets_stack = new TQWidgetStack(this);
@ -724,7 +724,7 @@ TQRect MainWindow::getDesktopGeometry()
TQRect result; TQRect result;
result = desk_info.workArea(); result = desk_info.workArea();
KConfigGroup group(TDEGlobal::config(), "Windows"); TDEConfigGroup group(TDEGlobal::config(), "Windows");
if (TQApplication::desktop()->isVirtualDesktop() && if (TQApplication::desktop()->isVirtualDesktop() &&
group.readBoolEntry("XineramaEnabled", true) && group.readBoolEntry("XineramaEnabled", true) &&
@ -1000,7 +1000,7 @@ void MainWindow::slotDecreaseHeight()
void MainWindow::slotInitSkin() void MainWindow::slotInitSkin()
{ {
KConfig config(locate("appdata", Settings::skin() + "/title.skin")); TDEConfig config(locate("appdata", Settings::skin() + "/title.skin"));
config.setGroup("Border"); config.setGroup("Border");
@ -1133,7 +1133,7 @@ void MainWindow::slotSetAccessKey()
if (focus_policy == false) focus_policy = true; if (focus_policy == false) focus_policy = true;
KConfig config(CONFIG_FILE); TDEConfig config(CONFIG_FILE);
KKeyDialog::configure(global_key); KKeyDialog::configure(global_key);
@ -1149,7 +1149,7 @@ void MainWindow::slotSetControlKeys()
if (focus_policy == false) focus_policy = true; if (focus_policy == false) focus_policy = true;
KConfig config(CONFIG_FILE); TDEConfig config(CONFIG_FILE);
KKeyDialog::configure(actionCollection()); KKeyDialog::configure(actionCollection());
@ -1198,10 +1198,10 @@ void MainWindow::slotOpenSettingsDialog()
if (focus_policy == false) if (focus_policy == false)
focus_policy = true; focus_policy = true;
if (KConfigDialog::showDialog("settings")) if (TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog* settings_dialog = new KConfigDialog(this, "settings", Settings::self()); TDEConfigDialog* settings_dialog = new TDEConfigDialog(this, "settings", Settings::self());
GeneralSettings* general_settings = new GeneralSettings(settings_dialog, "General"); GeneralSettings* general_settings = new GeneralSettings(settings_dialog, "General");
settings_dialog->addPage(general_settings, i18n("General"), "package_settings"); settings_dialog->addPage(general_settings, i18n("General"), "package_settings");
@ -1260,7 +1260,7 @@ void MainWindow::slotFirstRunDialogOK()
if (first_run_dialog_page->shortcut() != global_key->shortcut("AccessKey")) if (first_run_dialog_page->shortcut() != global_key->shortcut("AccessKey"))
{ {
KConfig config(CONFIG_FILE); TDEConfig config(CONFIG_FILE);
global_key->setShortcut("AccessKey", first_run_dialog_page->shortcut()); global_key->setShortcut("AccessKey", first_run_dialog_page->shortcut());
global_key->updateConnections(); global_key->updateConnections();
global_key->writeSettings(&config); global_key->writeSettings(&config);

@ -105,7 +105,7 @@ void SkinSettings::slotPopulate()
for (TQStringList::Iterator it = skins_dirs.begin(); it != skins_dirs.end(); ++it) for (TQStringList::Iterator it = skins_dirs.begin(); it != skins_dirs.end(); ++it)
{ {
TQUrl titles_url = locate("appdata", (*it) + "/title.skin"); TQUrl titles_url = locate("appdata", (*it) + "/title.skin");
KConfig titles_config(titles_url.path()); TDEConfig titles_config(titles_url.path());
titles_config.setGroup("Description"); titles_config.setGroup("Description");
TQString titles_name(titles_config.readEntry("Skin", "")); TQString titles_name(titles_config.readEntry("Skin", ""));
@ -113,7 +113,7 @@ void SkinSettings::slotPopulate()
TQString titles_icon_name(titles_config.readEntry("Icon", "")); TQString titles_icon_name(titles_config.readEntry("Icon", ""));
TQUrl tabs_url = locate("appdata", (*it) + "/tabs.skin"); TQUrl tabs_url = locate("appdata", (*it) + "/tabs.skin");
KConfig tabs_config(tabs_url.path()); TDEConfig tabs_config(tabs_url.path());
tabs_config.setGroup("Description"); tabs_config.setGroup("Description");
TQString tabs_name(tabs_config.readEntry("Skin", "")); TQString tabs_name(tabs_config.readEntry("Skin", ""));
@ -179,10 +179,10 @@ void SkinSettings::slotInstallSkin()
if (skin_url.isEmpty()) return; if (skin_url.isEmpty()) return;
if (!KIO::NetAccess::download(skin_url, install_skin_file, NULL)) if (!TDEIO::NetAccess::download(skin_url, install_skin_file, NULL))
{ {
KMessageBox::error(0L, KMessageBox::error(0L,
KIO::NetAccess::lastErrorString(), TDEIO::NetAccess::lastErrorString(),
i18n("Failed to Download Skin"), i18n("Failed to Download Skin"),
KMessageBox::Notify KMessageBox::Notify
); );
@ -194,29 +194,29 @@ void SkinSettings::slotInstallSkin()
if (!skin_dir.exists()) if (!skin_dir.exists())
{ {
KIO::ListJob* job = KIO::listRecursive("tar:" + install_skin_file, false, false); TDEIO::ListJob* job = TDEIO::listRecursive("tar:" + install_skin_file, false, false);
connect(job, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)), connect(job, TQT_SIGNAL(entries(TDEIO::Job*, const TDEIO::UDSEntryList&)),
this, TQT_SLOT(slotListSkinArchive(KIO::Job*, const KIO::UDSEntryList&))); this, TQT_SLOT(slotListSkinArchive(TDEIO::Job*, const TDEIO::UDSEntryList&)));
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotValidateSkinArchive(KIO::Job*))); this, TQT_SLOT(slotValidateSkinArchive(TDEIO::Job*)));
} }
else else
failInstall(i18n("The installer was given a directory, not a file.")); failInstall(i18n("The installer was given a directory, not a file."));
} }
void SkinSettings::slotListSkinArchive(KIO::Job* /* job */, const KIO::UDSEntryList& list) void SkinSettings::slotListSkinArchive(TDEIO::Job* /* job */, const TDEIO::UDSEntryList& list)
{ {
KIO::UDSEntryList::const_iterator it = list.begin(); TDEIO::UDSEntryList::const_iterator it = list.begin();
for(; it != list.end(); ++it) for(; it != list.end(); ++it)
{ {
KIO::UDSEntry::const_iterator itUSDEntry = (*it).begin(); TDEIO::UDSEntry::const_iterator itUSDEntry = (*it).begin();
for (; itUSDEntry != (*it).end(); ++itUSDEntry ) for (; itUSDEntry != (*it).end(); ++itUSDEntry )
{ {
if((*itUSDEntry).m_uds == KIO::UDS_NAME) if((*itUSDEntry).m_uds == TDEIO::UDS_NAME)
{ {
install_skin_file_list.append((*itUSDEntry).m_str); install_skin_file_list.append((*itUSDEntry).m_str);
} }
@ -224,7 +224,7 @@ void SkinSettings::slotListSkinArchive(KIO::Job* /* job */, const KIO::UDSEntryL
} }
} }
void SkinSettings::slotValidateSkinArchive(KIO::Job* job) void SkinSettings::slotValidateSkinArchive(TDEIO::Job* job)
{ {
if (!job->error()) if (!job->error())
{ {
@ -276,8 +276,8 @@ void SkinSettings::checkForExistingSkin()
if (remove == KMessageBox::Continue) if (remove == KMessageBox::Continue)
{ {
unlink(TQFile::encodeName(item->dir())); unlink(TQFile::encodeName(item->dir()));
KIO::DeleteJob* job = KIO::del(KURL(item->dir()), false, false); TDEIO::DeleteJob* job = TDEIO::del(KURL(item->dir()), false, false);
connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotInstallSkinArchive(KIO::Job*))); connect(job, TQT_SIGNAL(result(TDEIO::Job*)), this, TQT_SLOT(slotInstallSkinArchive(TDEIO::Job*)));
} }
else else
cleanupAfterInstall(); cleanupAfterInstall();
@ -287,7 +287,7 @@ void SkinSettings::checkForExistingSkin()
slotInstallSkinArchive(); slotInstallSkinArchive();
} }
void SkinSettings::slotInstallSkinArchive(KIO::Job* delete_job) void SkinSettings::slotInstallSkinArchive(TDEIO::Job* delete_job)
{ {
if (delete_job && delete_job->error()) if (delete_job && delete_job->error())
{ {
@ -331,7 +331,7 @@ void SkinSettings::failInstall(const TQString& error)
void SkinSettings::cleanupAfterInstall() void SkinSettings::cleanupAfterInstall()
{ {
KIO::NetAccess::removeTempFile(install_skin_file); TDEIO::NetAccess::removeTempFile(install_skin_file);
install_skin_file = TQString(); install_skin_file = TQString();
install_skin_name = TQString(); install_skin_name = TQString();
install_skin_file_list.clear(); install_skin_file_list.clear();
@ -354,8 +354,8 @@ void SkinSettings::slotRemoveSkin()
if (remove == KMessageBox::Continue) if (remove == KMessageBox::Continue)
{ {
unlink(TQFile::encodeName(selected_item->dir())); unlink(TQFile::encodeName(selected_item->dir()));
KIO::DeleteJob* job = KIO::del(KURL(selected_item->dir()), false, false); TDEIO::DeleteJob* job = TDEIO::del(KURL(selected_item->dir()), false, false);
connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotPopulate())); connect(job, TQT_SIGNAL(result(TDEIO::Job *)), this, TQT_SLOT(slotPopulate()));
if (selected_item->name() == Settings::skin()) if (selected_item->name() == Settings::skin())
{ {

@ -58,9 +58,9 @@ class SkinSettings : public SkinSettingsUI
void slotPopulate(); void slotPopulate();
void slotInstallSkin(); void slotInstallSkin();
void slotListSkinArchive(KIO::Job* job, const KIO::UDSEntryList& list); void slotListSkinArchive(TDEIO::Job* job, const TDEIO::UDSEntryList& list);
void slotValidateSkinArchive(KIO::Job* job); void slotValidateSkinArchive(TDEIO::Job* job);
void slotInstallSkinArchive(KIO::Job* delete_job = 0); void slotInstallSkinArchive(TDEIO::Job* delete_job = 0);
void slotRemoveSkin(); void slotRemoveSkin();

@ -189,7 +189,7 @@ void TabBar::reloadSkin(const TQString& skin)
void TabBar::setPixmaps(const TQString& skin) void TabBar::setPixmaps(const TQString& skin)
{ {
TQUrl url(locate("appdata", skin + "/tabs.skin")); TQUrl url(locate("appdata", skin + "/tabs.skin"));
KConfig config(url.path()); TDEConfig config(url.path());
config.setGroup("Tabs"); config.setGroup("Tabs");

@ -130,7 +130,7 @@ void TitleBar::setPixmaps(const TQString& skin)
/* Initialize the skin objects. */ /* Initialize the skin objects. */
TQUrl url(locate("appdata", skin + "/title.skin")); TQUrl url(locate("appdata", skin + "/title.skin"));
KConfig config(url.path()); TDEConfig config(url.path());
// Load the text information. // Load the text information.
config.setGroup("Text"); config.setGroup("Text");

Loading…
Cancel
Save