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

master
Timothy Pearson 11 years ago
parent b4e45bde66
commit 7781dccb1c

@ -52,8 +52,8 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
setAutoDeleteCompletionObject( true );
setFocusPolicy( TQ_ClickFocus );
KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" );
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver cs( config, "GeneralConfiguration" );
setCompletionMode( (TDEGlobalSettings::Completion)
config->readNumEntry( "FileFinderCompletionMode",
TDEGlobalSettings::completionMode()));
@ -61,8 +61,8 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
FileFinder::~FileFinder()
{
KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" );
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver cs( config, "GeneralConfiguration" );
config->writeEntry( "FileFinderCompletionMode", completionMode() );
}

@ -229,8 +229,8 @@ bool FileWidget::eventFilter( TQObject *o, TQEvent *e )
}
// KIO::NetAccess::stat() does NOT give us the right mimetype, while
// KIO::NetAccess::mimetype() does. So we have this hacklet to tell
// TDEIO::NetAccess::stat() does NOT give us the right mimetype, while
// TDEIO::NetAccess::mimetype() does. So we have this hacklet to tell
// showImage that the KFileItem is really an image.
#define IS_IMAGE 5
#define MY_TYPE 55

@ -839,10 +839,10 @@ void ImageWindow::dropEvent( TQDropEvent *e )
if ( KURLDrag::decode( e, list ) && !list.isEmpty()) {
TQString tmpFile;
const KURL &url = list.first();
if (KIO::NetAccess::download( url, tmpFile, this ) )
if (TDEIO::NetAccess::download( url, tmpFile, this ) )
{
loadImage( tmpFile );
KIO::NetAccess::removeTempFile( tmpFile );
TDEIO::NetAccess::removeTempFile( tmpFile );
}
updateWidget();
e->accept();
@ -1006,7 +1006,7 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize )
{
if ( isFullscreen() )
toggleFullscreen(); // otherwise upload window would block us invisibly
success = KIO::NetAccess::upload( saveFile, dest, const_cast<ImageWindow*>( this ) );
success = TDEIO::NetAccess::upload( saveFile, dest, const_cast<ImageWindow*>( this ) );
}
Imlib_kill_image( id, saveIm );

@ -43,7 +43,7 @@ ImData::ImData()
}
void ImData::load( KConfig *kc )
void ImData::load( TDEConfig *kc )
{
ImData def;
@ -68,7 +68,7 @@ void ImData::load( KConfig *kc )
}
void ImData::save( KConfig *kc )
void ImData::save( TDEConfig *kc )
{
kc->setGroup( "ImlibConfiguration" );

@ -19,15 +19,15 @@
#ifndef IMBLIBCONFIG_H
#define IMBLIBCONFIG_H
class KConfig;
class TDEConfig;
class ImData
{
public:
ImData();
~ImData() {};
void load( KConfig *kc );
void save( KConfig *kc );
void load( TDEConfig *kc );
void save( TDEConfig *kc );
// new stuff..........

@ -70,7 +70,7 @@ KuickData::~KuickData()
void KuickData::load()
{
KConfig *kc = TDEGlobal::config();
TDEConfig *kc = TDEGlobal::config();
KuickData def;
@ -134,7 +134,7 @@ void KuickData::load()
void KuickData::save()
{
KConfig *kc = TDEGlobal::config();
TDEConfig *kc = TDEGlobal::config();
kc->setGroup( "GeneralConfiguration" );
kc->writeEntry( "FileFilter", fileFilter );

@ -24,7 +24,7 @@
#include "imdata.h"
class KConfig;
class TDEConfig;
// values are also used as combobox index defaultswidget.*
enum Rotation { ROT_0=0, ROT_90=1, ROT_180=2, ROT_270=3 };

@ -22,7 +22,7 @@ KuickFile::KuickFile(const KURL& url)
if ( m_url.isLocalFile())
m_localFile = m_url.path();
else {
const KURL& mostLocal = KIO::NetAccess::mostLocalURL( m_url, 0L );
const KURL& mostLocal = TDEIO::NetAccess::mostLocalURL( m_url, 0L );
if ( mostLocal.isValid() && mostLocal.isLocalFile() )
m_localFile = mostLocal.path();
}
@ -84,10 +84,10 @@ bool KuickFile::download()
KURL destURL;
destURL.setPath( tempFile.name() );
m_job = KIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves
m_job = TDEIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves
m_job->setAutoErrorHandlingEnabled( true );
connect( m_job, TQT_SIGNAL( result( KIO::Job * )), TQT_SLOT( slotResult( KIO::Job * ) ));
connect( m_job, TQT_SIGNAL( percent( KIO::Job *, unsigned long )), TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ));
connect( m_job, TQT_SIGNAL( result( TDEIO::Job * )), TQT_SLOT( slotResult( TDEIO::Job * ) ));
connect( m_job, TQT_SIGNAL( percent( TDEIO::Job *, unsigned long )), TQT_SLOT( slotProgress( TDEIO::Job *, unsigned long ) ));
// TODO: generify background/foreground downloading?
@ -136,7 +136,7 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent )
return OK;
}
void KuickFile::slotResult( KIO::Job *job )
void KuickFile::slotResult( TDEIO::Job *job )
{
if (job != m_job) { // huh?
return;
@ -147,15 +147,15 @@ void KuickFile::slotResult( KIO::Job *job )
if ( job->error() != 0 ) {
m_currentProgress = 0;
if ( job->error() != KIO::ERR_USER_CANCELED )
if ( job->error() != TDEIO::ERR_USER_CANCELED )
kdWarning() << "ERROR: KuickFile::slotResult: " << job->errorString() << endl;
TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
TQString canceledFile = static_cast<TDEIO::FileCopyJob*>(job)->destURL().path();
TQFile::remove( canceledFile );
m_progress->topLevelWidget()->hide();
}
else {
m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
m_localFile = static_cast<TDEIO::FileCopyJob*>(job)->destURL().path();
emit downloaded( this ); // before closing the progress dialog
if ( m_progress ) {
@ -168,7 +168,7 @@ void KuickFile::slotResult( KIO::Job *job )
}
}
void KuickFile::slotProgress( KIO::Job *job, unsigned long percent )
void KuickFile::slotProgress( TDEIO::Job *job, unsigned long percent )
{
if (job != m_job) { // huh?
return;

@ -16,7 +16,7 @@
#include <kurl.h>
#include <kprogress.h>
namespace KIO {
namespace TDEIO {
class Job;
class FileCopyJob;
}
@ -83,13 +83,13 @@ signals:
void downloaded( KuickFile * );
private slots:
void slotResult( KIO::Job *job );
void slotProgress( KIO::Job *job, unsigned long percent );
void slotResult( TDEIO::Job *job );
void slotProgress( TDEIO::Job *job, unsigned long percent );
private:
KURL m_url;
TQString m_localFile;
KIO::FileCopyJob *m_job;
TDEIO::FileCopyJob *m_job;
KProgress *m_progress;
int m_currentProgress;

@ -114,7 +114,7 @@ KuickShow::KuickShow( const char *name )
connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() ));
KConfig *kc = TDEGlobal::config();
TDEConfig *kc = TDEGlobal::config();
bool isDir = false; // true if we get a directory on the commandline
@ -166,7 +166,7 @@ KuickShow::KuickShow( const char *name )
KMimeType::Ptr mime = KMimeType::findByURL( url );
TQString name = mime->name();
if ( name == "application/octet-stream" ) // unknown -> stat()
name = KIO::NetAccess::mimetype( url, this );
name = TDEIO::NetAccess::mimetype( url, this );
// text/* is a hack for bugs.kde.org-attached-images urls.
// The real problem here is that NetAccess::mimetype does a HTTP HEAD, which doesn't
@ -374,7 +374,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileWidget->setFocus();
KConfig *kc = TDEGlobal::config();
TDEConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings");
bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true );
oneWindowAction->setChecked( oneWindow );
@ -569,7 +569,7 @@ bool KuickShow::showImage( const KFileItem *fi,
// file->waitForDownload( this );
// TQString filename;
// KIO::NetAccess::download(fi->url(), filename, this);
// TDEIO::NetAccess::download(fi->url(), filename, this);
if ( !safeViewer->showNextImage( fi->url() ) ) {
m_viewer = safeViewer;
@ -856,7 +856,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
if ( FileWidget::isImage( item ) ) {
// TQString filename;
// KIO::NetAccess::download(item->url(), filename, this);
// TDEIO::NetAccess::download(item->url(), filename, this);
view->showNextImage( item->url() );
if (m_slideTimer->isActive() && kdata->slideDelay)
m_slideTimer->start( kdata->slideDelay );
@ -1019,7 +1019,7 @@ bool KuickShow::eventFilter( TQObject *o, TQEvent *e )
if ( FileWidget::isImage( item ) ) {
// TQString filename;
// KIO::NetAccess::download(item->url(), filename, this);
// TDEIO::NetAccess::download(item->url(), filename, this);
m_viewer->showNextImage( item->url() );
if ( kdata->preloadImage && item_next ) { // preload next image
@ -1143,7 +1143,7 @@ void KuickShow::about()
}
// ------ sessionmanagement - load / save current directory -----
void KuickShow::readProperties( KConfig *kc )
void KuickShow::readProperties( TDEConfig *kc )
{
assert( fileWidget ); // from SM, we should always have initGUI on startup
TQString dir = kc->readPathEntry( "CurrentDirectory" );
@ -1173,7 +1173,7 @@ void KuickShow::readProperties( KConfig *kc )
show();
}
void KuickShow::saveProperties( KConfig *kc )
void KuickShow::saveProperties( TDEConfig *kc )
{
kc->writeEntry( "Browser visible", fileWidget && fileWidget->isVisible() );
if (fileWidget)
@ -1197,7 +1197,7 @@ void KuickShow::saveProperties( KConfig *kc )
void KuickShow::saveSettings()
{
KConfig *kc = TDEGlobal::config();
TDEConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings");
if ( oneWindowAction )

@ -38,7 +38,7 @@ class ImData;
class KuickConfigDialog;
class KAccel;
class KConfig;
class TDEConfig;
class KToggleAction;
class AboutWidget;
@ -97,7 +97,7 @@ public:
protected:
virtual void readProperties( KConfig * );
virtual void readProperties( TDEConfig * );
void initImlibParams( ImData *, ImlibInitParams * );
void tryShowNextImage();
@ -145,7 +145,7 @@ private:
void initGUI( const KURL& startDir );
bool eventFilter( TQObject *, TQEvent * );
void initImlib();
void saveProperties( KConfig * );
void saveProperties( TDEConfig * );
void saveSettings();
bool haveBrowser() const;
void delayedRepeatEvent( ImageWindow *, TQKeyEvent * );

Loading…
Cancel
Save