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

pull/1/head
Timothy Pearson 12 years ago
parent b0a967eb69
commit 2b37df4ca0

@ -65,7 +65,7 @@ ECSubcircuit* Subcircuits::createSubcircuit( int id, CircuitDocument *circuitDoc
void Subcircuits::loadSubcircuits()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Subcircuits");
TQValueList<int> idList = config->readIntListEntry("Ids");
@ -110,7 +110,7 @@ void Subcircuits::updateComponentSelector( int id, const TQString &name )
void Subcircuits::addSubcircuit( const TQString &name, const TQString &subcircuitXml )
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Subcircuits");
int nextId = config->readNumEntry( "NextId", 0 );
@ -162,7 +162,7 @@ void Subcircuits::slotItemRemoved( const TQString &id )
TQFile file(fileName);
file.remove();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Subcircuits");
TQValueList<int> idList = config->readIntListEntry("Ids");
idList.remove(id_num);

@ -33,7 +33,7 @@ bool MetaInfo::hasDefaultData() const
}
void MetaInfo::save( KConfig * conf )
void MetaInfo::save( TDEConfig * conf )
{
conf->writeEntry( "Bookmarks", bookmarks() );
conf->writeEntry( "Breakpoints", breakpoints() );
@ -45,7 +45,7 @@ void MetaInfo::save( KConfig * conf )
}
void MetaInfo::load( KConfig * conf )
void MetaInfo::load( TDEConfig * conf )
{
setBookmarks( conf->readIntListEntry("Bookmarks") );
setBreakpoints( conf->readIntListEntry("Breakpoints") );
@ -91,7 +91,7 @@ TQString MetaInfo::toID( OutputMethodInfo::Method::Type method )
FileMetaInfo::FileMetaInfo()
: TQObject()
{
m_metaInfoConfig = new KConfig( "metainfo", false, false, "appdata" );
m_metaInfoConfig = new TDEConfig( "metainfo", false, false, "appdata" );
loadAllMetaInfo();
}

@ -16,7 +16,7 @@
class TextDocument;
class TextView;
class KConfig;
class TDEConfig;
typedef TQValueList<int> IntList;
class MetaInfo
@ -33,11 +33,11 @@ class MetaInfo
* Writes to the given config the data stored in here. Does not set the
* group.
*/
void save( KConfig * conf );
void save( TDEConfig * conf );
/**
* Reads in the data from the config. Does not set the group.
*/
void load( KConfig * conf );
void load( TDEConfig * conf );
IntList bookmarks() const { return m_bookmarks; }
void setBookmarks( IntList bookmarks ) { m_bookmarks = bookmarks; }
@ -126,7 +126,7 @@ class FileMetaInfo : public TQObject
*/
void loadAllMetaInfo();
KConfig *m_metaInfoConfig;
TDEConfig *m_metaInfoConfig;
private:
FileMetaInfo();

@ -133,7 +133,7 @@ void ItemSelector::addItem( const TQString & caption, const TQString & id, const
void ItemSelector::writeOpenStates()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup( name() );
const TQStringList::iterator end = m_categories.end();
@ -149,7 +149,7 @@ void ItemSelector::writeOpenStates()
bool ItemSelector::readOpenState( const TQString &id )
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup( name() );
return config->readBoolEntry( id+"IsOpen", true );

@ -40,8 +40,8 @@
// Make sure that this value is the same as that in ktechlab.kcfg
const int defaultRefreshRate = 50;
SettingsDlg::SettingsDlg( TQWidget *parent, const char *name, KConfigSkeleton *config )
: KConfigDialog( parent, name, config )
SettingsDlg::SettingsDlg( TQWidget *parent, const char *name, TDEConfigSkeleton *config )
: TDEConfigDialog( parent, name, config )
{
m_generalOptionsWidget = new GeneralOptionsWidget( this, "generalOptionsWidget" );
m_gpasmSettingsWidget = new GpasmSettingsWidget( this, "gpasmSettingsWidget" );
@ -93,7 +93,7 @@ void SettingsDlg::show()
{
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
combo->setEditable( true );
KConfigDialog::show();
TDEConfigDialog::show();
combo->setEditable( false );
}
@ -280,9 +280,9 @@ int SettingsDlg::sliderValueToRefreshRate( int sliderValue )
void SettingsDlg::updateSettings()
{
KConfig * config = kapp->config();
TDEConfig * config = kapp->config();
KConfigSkeleton::ItemInt *item = dynamic_cast<KConfigSkeleton::ItemInt*>(KTLConfig::self()->findItem( "RefreshRate" ));
TDEConfigSkeleton::ItemInt *item = dynamic_cast<TDEConfigSkeleton::ItemInt*>(KTLConfig::self()->findItem( "RefreshRate" ));
if ( !item )
return;
@ -306,9 +306,9 @@ void SettingsDlg::updateSettings()
void SettingsDlg::slotUpdateSettings()
{
KConfig * config = kapp->config();
TDEConfig * config = kapp->config();
KConfigSkeleton::ItemString * item = dynamic_cast<KConfigSkeleton::ItemString*>(KTLConfig::self()->findItem( "PicProgrammerProgram" ));
TDEConfigSkeleton::ItemString * item = dynamic_cast<TDEConfigSkeleton::ItemString*>(KTLConfig::self()->findItem( "PicProgrammerProgram" ));
if ( !item )
return;
@ -369,7 +369,7 @@ void SettingsDlg::updateWidgetsDefault()
bool SettingsDlg::hasChanged()
{
if ( sliderValueToRefreshRate( m_generalOptionsWidget->refreshRateSlider->value() ) == KTLConfig::refreshRate() )
return KConfigDialog::hasChanged();
return TDEConfigDialog::hasChanged();
return true;
}
@ -377,7 +377,7 @@ bool SettingsDlg::hasChanged()
bool SettingsDlg::isDefault()
{
if ( sliderValueToRefreshRate( m_generalOptionsWidget->refreshRateSlider->value() ) == defaultRefreshRate )
return KConfigDialog::isDefault();
return TDEConfigDialog::isDefault();
return false;
}

@ -26,12 +26,12 @@ class SDCCOptionsWidget;
/**
@author David Saxton
*/
class SettingsDlg : public KConfigDialog
class SettingsDlg : public TDEConfigDialog
{
Q_OBJECT
public:
SettingsDlg( TQWidget *parent, const char *name, KConfigSkeleton *config );
SettingsDlg( TQWidget *parent, const char *name, TDEConfigSkeleton *config );
~SettingsDlg();
static int refreshRateToSliderValue( int refreshRate );

@ -106,7 +106,7 @@ SymbolViewer::~SymbolViewer()
}
void SymbolViewer::saveProperties( KConfig * config )
void SymbolViewer::saveProperties( TDEConfig * config )
{
TQString oldGroup = config->group();
@ -117,7 +117,7 @@ void SymbolViewer::saveProperties( KConfig * config )
}
void SymbolViewer::readProperties( KConfig * config )
void SymbolViewer::readProperties( TDEConfig * config )
{
TQString oldGroup = config->group();

@ -51,12 +51,12 @@ class SymbolViewer : public TQWidget
* Write the current properties (such as currently selected radix) to
* the config.
*/
void saveProperties( KConfig * config );
void saveProperties( TDEConfig * config );
/**
* Reads the properties (such as the last selected radix) from the
* config file.
*/
void readProperties( KConfig * config );
void readProperties( TDEConfig * config );
void setContext( GpsimProcessor * gpsim );
/**

@ -98,11 +98,11 @@ void ItemDocumentData::reset()
bool ItemDocumentData::loadData( const KURL &url )
{
TQString target;
if ( !KIO::NetAccess::download( url, target, 0l ) )
if ( !TDEIO::NetAccess::download( url, target, 0l ) )
{
// If the file could not be downloaded, for example does not
// exist on disk, NetAccess will tell us what error to use
KMessageBox::error( 0l, KIO::NetAccess::lastErrorString() );
KMessageBox::error( 0l, TDEIO::NetAccess::lastErrorString() );
return false;
}
@ -194,9 +194,9 @@ bool ItemDocumentData::saveData( const KURL &url )
*file.textStream() << toXML();
file.close();
if ( !KIO::NetAccess::upload( file.name(), url, 0l ) )
if ( !TDEIO::NetAccess::upload( file.name(), url, 0l ) )
{
KMessageBox::error( 0l, KIO::NetAccess::lastErrorString() );
KMessageBox::error( 0l, TDEIO::NetAccess::lastErrorString() );
return false;
}
}

@ -126,7 +126,7 @@ void GUIClient::registerToolView (ToolView *tv)
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
TDEConfig *cfg = kapp->config();
TQString _grp = cfg->group();
cfg->setGroup("Shortcuts");
sc = KShortcut( cfg->readEntry( aname, "" ) );
@ -470,7 +470,7 @@ class TmpToolViewSorter
unsigned int pos;
};
void Sidebar::restoreSession (KConfig *config)
void Sidebar::restoreSession (TDEConfig *config)
{
// get the last correct placed toolview
unsigned int firstWrong = 0;
@ -565,7 +565,7 @@ void Sidebar::restoreSession (KConfig *config)
m_ownSplit->hide();
}
void Sidebar::saveSession (KConfig *config)
void Sidebar::saveSession (TDEConfig *config)
{
// store the own splitter sizes
TQValueList<int> s = m_ownSplit->sizes();
@ -742,7 +742,7 @@ bool MainWindow::hideToolView (ToolView *widget)
return widget->sidebar()->hideWidget (widget);
}
void MainWindow::startRestore (KConfig *config, const TQString &group)
void MainWindow::startRestore (TDEConfig *config, const TQString &group)
{
// first save this stuff
m_restoreConfig = config;
@ -822,7 +822,7 @@ void MainWindow::finishRestore ()
m_restoreGroup = "";
}
void MainWindow::saveSession (KConfig *config, const TQString &group)
void MainWindow::saveSession (TDEConfig *config, const TQString &group)
{
if (!config)
return;

@ -203,13 +203,13 @@ class Sidebar : public KMultiTabBar
* restore the current session config from given object, use current group
* @param config config object to use
*/
void restoreSession (KConfig *config);
void restoreSession (TDEConfig *config);
/**
* save the current session config to given object, use current group
* @param config config object to use
*/
void saveSession (KConfig *config);
void saveSession (TDEConfig *config);
private slots:
void tabClicked(int);
@ -347,7 +347,7 @@ class MainWindow : public KParts::MainWindow
* @param config config object to use
* @param group config group to use
*/
void startRestore (KConfig *config, const TQString &group);
void startRestore (TDEConfig *config, const TQString &group);
/**
* finish the restore
@ -359,7 +359,7 @@ class MainWindow : public KParts::MainWindow
* @param config config object to use
* @param group config group to use
*/
void saveSession (KConfig *config, const TQString &group);
void saveSession (TDEConfig *config, const TQString &group);
/**
* internal data ;)
@ -400,7 +400,7 @@ class MainWindow : public KParts::MainWindow
* config object for session restore, only valid between
* start and finish restore calls
*/
KConfig *m_restoreConfig;
TDEConfig *m_restoreConfig;
/**
* restore group

@ -121,11 +121,11 @@ void KTechlab::load( const KURL & url )
// want to use this code instead for your app
// download the contents
if ( !KIO::NetAccess::download( url, target, this ) )
if ( !TDEIO::NetAccess::download( url, target, this ) )
{
// If the file could not be downloaded, for example does not
// exist on disk, NetAccess will tell us what error to use
KMessageBox::error(this, KIO::NetAccess::lastErrorString());
KMessageBox::error(this, TDEIO::NetAccess::lastErrorString());
return;
}
@ -139,7 +139,7 @@ void KTechlab::load( const KURL & url )
DocManager::self()->openURL( target );
// and remove the temp file
KIO::NetAccess::removeTempFile( target );
TDEIO::NetAccess::removeTempFile( target );
}
@ -366,7 +366,7 @@ void KTechlab::setupTabWidget()
connect( tabWidget(), TQT_SIGNAL(receivedDropEvent(TQDropEvent* )), TQT_TQOBJECT(this), TQT_SLOT(slotTabReceivedDropEvent(TQDropEvent* )) );
connect( tabWidget(), TQT_SIGNAL(receivedDropEvent(TQWidget*, TQDropEvent* )), TQT_TQOBJECT(this), TQT_SLOT(slotTabReceivedDropEvent(TQWidget*, TQDropEvent* )) );
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("UI");
bool CloseOnHover = config->readBoolEntry( "CloseOnHover", false );
@ -596,7 +596,7 @@ KAction * KTechlab::action( const TQString & name ) const
}
void KTechlab::saveProperties( KConfig *conf )
void KTechlab::saveProperties( TDEConfig *conf )
{
// Dumbass KMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?!
conf->setGroup("UI");
@ -634,7 +634,7 @@ void KTechlab::saveProperties( KConfig *conf )
continue;
// To make sure the ViewContainers are restored in the right order, we must create them in alphabetical order,
// as KConfig stores them as such...
// as TDEConfig stores them as such...
const TQString id = TQString::number(viewContainerId++).rightJustify( 4, '0' );
conf->setGroup( "ViewContainer " + id );
@ -654,7 +654,7 @@ void KTechlab::saveProperties( KConfig *conf )
}
void KTechlab::readProperties( KConfig *conf )
void KTechlab::readProperties( TDEConfig *conf )
{
startRestore( conf, "KateMDI" );
@ -765,10 +765,10 @@ void KTechlab::slotOptionsPreferences()
// An instance of your dialog could be already created and could be cached,
// in which case you want to display the cached dialog instead of creating
// another one
if ( KConfigDialog::showDialog( "settings" ) )
if ( TDEConfigDialog::showDialog( "settings" ) )
return;
// KConfigDialog didn't find an instance of this dialog, so lets create it:
// TDEConfigDialog didn't find an instance of this dialog, so lets create it:
SettingsDlg* dialog = new SettingsDlg( this, "settings", KTLConfig::self() );
// User edited the configuration - update your local copies of the

@ -146,13 +146,13 @@ class KTechlab : public KateMDI::MainWindow
* This function is called when it is time for the app to save its
* 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
* with @ref saveProperties
*/
void readProperties(KConfig *);
void readProperties(TDEConfig *);
/**
* Called before the window is closed, either by the user or indirectly by the session manager.
* This function doesn't actually close the main window; it only queries the user and closes the active view.

@ -178,11 +178,11 @@ ProcessOptions::ProcessOptions( OutputMethodInfo info )
b_targetFileSet = false;
TQString target;
if ( !KIO::NetAccess::download( info.outputFile(), target, 0l ) )
if ( !TDEIO::NetAccess::download( info.outputFile(), target, 0l ) )
{
// If the file could not be downloaded, for example does not
// exist on disk, NetAccess will tell us what error to use
KMessageBox::error( 0l, KIO::NetAccess::lastErrorString() );
KMessageBox::error( 0l, TDEIO::NetAccess::lastErrorString() );
return;
}

@ -191,7 +191,7 @@ void PicProgrammerSettings::initStaticConfigs()
}
void PicProgrammerSettings::load( KConfig * config )
void PicProgrammerSettings::load( TDEConfig * config )
{
TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
@ -217,7 +217,7 @@ void PicProgrammerSettings::load( KConfig * config )
}
void PicProgrammerSettings::save( KConfig * config )
void PicProgrammerSettings::save( TDEConfig * config )
{
TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
TQStringList::iterator ocpEnd = oldCustomProgrammers.end();

@ -14,7 +14,7 @@
#include "externallanguage.h"
class KConfig;
class TDEConfig;
class TDEProcess;
@ -61,11 +61,11 @@ class PicProgrammerSettings
* Reads in custom ProgrammerConfigs from config. Any previously loaded
* configurations stored in this class will removed first.
*/
void load( KConfig * config );
void load( TDEConfig * config );
/**
* Saves the custom ProgrammConfigs to config.
*/
void save( KConfig * config );
void save( TDEConfig * config );
/**
* @return the ProgrammConfig for the programmer with the given name. If
* no such ProgrammerConfigs with the given name exist, then one will be

@ -776,11 +776,11 @@ ProjectInfo::~ ProjectInfo()
bool ProjectInfo::open( const KURL & url )
{
TQString target;
if ( !KIO::NetAccess::download( url, target, 0l ) )
if ( !TDEIO::NetAccess::download( url, target, 0l ) )
{
// If the file could not be downloaded, for example does not
// exist on disk, NetAccess will tell us what error to use
KMessageBox::error( 0l, KIO::NetAccess::lastErrorString() );
KMessageBox::error( 0l, TDEIO::NetAccess::lastErrorString() );
return false;
}

@ -72,7 +72,7 @@ void RecentFilesAction::addURL( const KURL& url )
void RecentFilesAction::loadEntries()
{
KConfig * config = TDEGlobal::config();
TDEConfig * config = TDEGlobal::config();
TQString key;
TQString value;
@ -101,7 +101,7 @@ void RecentFilesAction::loadEntries()
void RecentFilesAction::saveEntries()
{
KConfig * config = TDEGlobal::config();
TDEConfig * config = TDEGlobal::config();
TQString key;
TQString value;

@ -27,19 +27,19 @@ class RecentFilesAction : public KSelectAction
~RecentFilesAction();
/**
* Loads the recent files entries from a given KConfig object.
* Loads the recent files entries from a given TDEConfig object.
* You can provide the name of the group used to load the entries.
* If the groupname is empty, entries are load from a group called 'RecentFiles'
*
* This method does not effect the active group of KConfig.
* This method does not effect the active group of TDEConfig.
*/
void loadEntries();
/**
* Saves the current recent files entries to a given KConfig object.
* Saves the current recent files entries to a given TDEConfig object.
* You can provide the name of the group used to load the entries.
* If the groupname is empty, entries are saved to a group called 'RecentFiles'
*
* This method does not effect the active group of KConfig.
* This method does not effect the active group of TDEConfig.
*/
void saveEntries();
/**

@ -286,7 +286,7 @@ bool ViewContainer::canSaveUsefulStateInfo() const
}
void ViewContainer::saveState( KConfig *config )
void ViewContainer::saveState( TDEConfig *config )
{
if (!m_baseViewArea)
return;
@ -296,7 +296,7 @@ void ViewContainer::saveState( KConfig *config )
}
void ViewContainer::restoreState( KConfig *config, const TQString &groupName )
void ViewContainer::restoreState( TDEConfig *config, const TQString &groupName )
{
config->setGroup(groupName);
int baseAreaId = config->readNumEntry("BaseViewArea");
@ -492,7 +492,7 @@ bool ViewArea::canSaveUsefulStateInfo() const
}
void ViewArea::saveState( KConfig *config )
void ViewArea::saveState( TDEConfig *config )
{
bool va1Ok = p_viewArea1 && p_viewArea1->canSaveUsefulStateInfo();
bool va2Ok = p_viewArea2 && p_viewArea2->canSaveUsefulStateInfo();
@ -520,7 +520,7 @@ void ViewArea::saveState( KConfig *config )
}
void ViewArea::restoreState( KConfig *config, int id, const TQString &groupName )
void ViewArea::restoreState( TDEConfig *config, int id, const TQString &groupName )
{
if (!config)
return;

@ -21,7 +21,7 @@ class View;
class ViewArea;
class ViewContainer;
class KConfig;
class TDEConfig;
class TQHBoxLayout;
class TQLayout;
class TQSplitter;
@ -74,12 +74,12 @@ public:
/**
* Saves the state of this ViewArea and any contained ViewAreas
*/
void saveState( KConfig *config );
void saveState( TDEConfig *config );
/**
* Restores the state of this ViewArea and any contained ViewAreas
* @param groupName e.g. "ViewContainer 1"
*/
void restoreState( KConfig *config, int id, const TQString &groupName );
void restoreState( TDEConfig *config, int id, const TQString &groupName );
/**
* Returns true if this ViewArea can save useful information as to its state
* (i.e. it's children can save useful information about their state, or has
@ -198,16 +198,16 @@ public:
void setIdUsed( int id );
/**
* Writes the state of the View Container (layout of views and view URLs)
* to the given KConfig. Doesn't change the group - so preset it if
* to the given TDEConfig. Doesn't change the group - so preset it if
* needed!
*/
void saveState( KConfig *config );
void saveState( TDEConfig *config );
/**
* Reads in the saved config state (as written by saveState), and restores
* the ViewContainer with all appropriate views open
* @param groupName e.g. "ViewContainer 1"
*/
void restoreState( KConfig *config, const TQString &groupName );
void restoreState( TDEConfig *config, const TQString &groupName );
/**
* Returns a unique id (negative) for a ViewArea that is now a Parent of other ViewAreas
*/
@ -237,7 +237,7 @@ protected slots:
void baseViewAreaDestroyed( TQObject *obj );
protected:
void restoreViewArea( KConfig *config, int id, ViewArea *viewArea );
void restoreViewArea( TDEConfig *config, int id, ViewArea *viewArea );
void findActiveViewArea();
int m_activeViewArea;
ViewArea *m_baseViewArea;

Loading…
Cancel
Save