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

pull/1/head
Timothy Pearson 11 years ago
parent fd3ee3bab0
commit fa87d9547e

@ -42,7 +42,7 @@ For more details, consult :
http://devel-home.kde.org/~larrosa/tutorial/p9.html http://devel-home.kde.org/~larrosa/tutorial/p9.html
http://developer.kde.org/documentation/tutorials/xmlui/preface.html http://developer.kde.org/documentation/tutorials/xmlui/preface.html
* Use KConfig XT to create your configuration dialogs and make * Use TDEConfig XT to create your configuration dialogs and make
them more maintainable. them more maintainable.
For more details, consult : For more details, consult :

@ -127,16 +127,16 @@ void BookReader::load(const KURL& url)
{ {
TQString target; TQString target;
// download the contents // download the contents
if(!KIO::NetAccess::download(url, target, this)) if(!TDEIO::NetAccess::download(url, target, this))
{ {
KMessageBox::error(this, KIO::NetAccess::lastErrorString()); KMessageBox::error(this, TDEIO::NetAccess::lastErrorString());
return; return;
} }
recentFilesAction->addURL(url); recentFilesAction->addURL(url);
setCaption(url.fileName()); setCaption(url.fileName());
m_view->openURL(url); m_view->openURL(url);
updateBookmarks(); updateBookmarks();
KIO::NetAccess::removeTempFile(target); TDEIO::NetAccess::removeTempFile(target);
} }
void BookReader::setupActions() void BookReader::setupActions()
@ -165,7 +165,7 @@ void BookReader::setupActions()
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
recentFilesAction->loadEntries(config); recentFilesAction->loadEntries(config);
// this doesn't do anything useful. it's just here to illustrate // this doesn't do anything useful. it's just here to illustrate
@ -176,7 +176,7 @@ void BookReader::setupActions()
actionCollection(), "custom_action" );*/ actionCollection(), "custom_action" );*/
} }
void BookReader::saveProperties(KConfig *config) void BookReader::saveProperties(TDEConfig *config)
{ {
// the 'config' object points to the session managed // the 'config' object points to the session managed
// config file. anything you write here will be available // config file. anything you write here will be available
@ -188,7 +188,7 @@ void BookReader::saveProperties(KConfig *config)
} }
} }
void BookReader::readProperties(KConfig */*config*/) void BookReader::readProperties(TDEConfig */*config*/)
{ {
// the 'config' object points to the session managed // the 'config' object points to the session managed
// config file. this function is automatically called whenever // config file. this function is automatically called whenever
@ -293,10 +293,10 @@ void BookReader::filePrint()
void BookReader::optionsPreferences() void BookReader::optionsPreferences()
{ {
if (KConfigDialog::showDialog("settings")) if (TDEConfigDialog::showDialog("settings"))
return ; return ;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self(), TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self(),
KDialogBase::IconList); KDialogBase::IconList);
SettingsWidget *general = new SettingsWidget(0, "General"); SettingsWidget *general = new SettingsWidget(0, "General");
@ -349,7 +349,7 @@ bool BookReader::queryExit()
void BookReader::writeSettings() void BookReader::writeSettings()
{ {
KConfig * config = kapp->config(); TDEConfig * config = kapp->config();
config->writeEntry("size", m_view->size()); config->writeEntry("size", m_view->size());
config->writeEntry("lastURL", m_view->currentURL()); config->writeEntry("lastURL", m_view->currentURL());
config->writeEntry("lastURLPage", m_view->currentPage()); config->writeEntry("lastURLPage", m_view->currentPage());
@ -387,7 +387,7 @@ void BookReader::fullScreen()
void BookReader::loadLastUrl() void BookReader::loadLastUrl()
{ {
KConfig * config = kapp->config(); TDEConfig * config = kapp->config();
TQSize size = config->readSizeEntry("size"); TQSize size = config->readSizeEntry("size");
lastURL = config->readEntry("lastURL"); lastURL = config->readEntry("lastURL");
connect(m_view, TQT_SIGNAL(loadingFinished()), TQT_TQOBJECT(this), TQT_SLOT(loadLastURLSetPage())); connect(m_view, TQT_SIGNAL(loadingFinished()), TQT_TQOBJECT(this), TQT_SLOT(loadLastURLSetPage()));

@ -77,14 +77,14 @@ protected:
* This function is called when it is time for the app to save its * This function is called when it is time for the app to save its
* properties for session management purposes. * properties for session management purposes.
*/ */
void saveProperties(KConfig *); void saveProperties(TDEConfig *);
/** /**
* This function is called when this app is restored. The KConfig * This function is called when this app is restored. The TDEConfig
* object points to the session management config file that was saved * object points to the session management config file that was saved
* with @ref saveProperties * with @ref saveProperties
*/ */
void readProperties(KConfig *); void readProperties(TDEConfig *);
private slots: private slots:

@ -425,7 +425,7 @@ void BookWidget::saveBookmarks( )
{ {
const TQString fileName = "bookreader/" + m_url.fileName(); const TQString fileName = "bookreader/" + m_url.fileName();
TQFile::remove(TDEGlobal::dirs()->findResource("appdata", m_url.fileName())); TQFile::remove(TDEGlobal::dirs()->findResource("appdata", m_url.fileName()));
KConfig config(fileName, false, false, "data"); TDEConfig config(fileName, false, false, "data");
for (Bookmarks::size_type i = 0; i < m_bookmarks.size(); ++i) for (Bookmarks::size_type i = 0; i < m_bookmarks.size(); ++i)
{ {
const Bookmark & bm = m_bookmarks[i]; const Bookmark & bm = m_bookmarks[i];
@ -440,7 +440,7 @@ void BookWidget::loadBookmarks()
{ {
m_bookmarks.clear(); m_bookmarks.clear();
const TQString fileName = "bookreader/" + m_url.fileName(); const TQString fileName = "bookreader/" + m_url.fileName();
KConfig config(fileName, true, false, "data"); TDEConfig config(fileName, true, false, "data");
TQStringList groups = config.groupList(); TQStringList groups = config.groupList();
typedef TQStringList::const_iterator IT; typedef TQStringList::const_iterator IT;
for (IT it = groups.constBegin(); it != groups.constEnd(); ++it) for (IT it = groups.constBegin(); it != groups.constEnd(); ++it)

Loading…
Cancel
Save