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 ); setAutoDeleteCompletionObject( true );
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQ_ClickFocus );
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" ); TDEConfigGroupSaver cs( config, "GeneralConfiguration" );
setCompletionMode( (TDEGlobalSettings::Completion) setCompletionMode( (TDEGlobalSettings::Completion)
config->readNumEntry( "FileFinderCompletionMode", config->readNumEntry( "FileFinderCompletionMode",
TDEGlobalSettings::completionMode())); TDEGlobalSettings::completionMode()));
@ -61,8 +61,8 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
FileFinder::~FileFinder() FileFinder::~FileFinder()
{ {
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" ); TDEConfigGroupSaver cs( config, "GeneralConfiguration" );
config->writeEntry( "FileFinderCompletionMode", completionMode() ); 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 // TDEIO::NetAccess::stat() does NOT give us the right mimetype, while
// KIO::NetAccess::mimetype() does. So we have this hacklet to tell // TDEIO::NetAccess::mimetype() does. So we have this hacklet to tell
// showImage that the KFileItem is really an image. // showImage that the KFileItem is really an image.
#define IS_IMAGE 5 #define IS_IMAGE 5
#define MY_TYPE 55 #define MY_TYPE 55

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

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

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

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

@ -24,7 +24,7 @@
#include "imdata.h" #include "imdata.h"
class KConfig; class TDEConfig;
// values are also used as combobox index defaultswidget.* // values are also used as combobox index defaultswidget.*
enum Rotation { ROT_0=0, ROT_90=1, ROT_180=2, ROT_270=3 }; 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()) if ( m_url.isLocalFile())
m_localFile = m_url.path(); m_localFile = m_url.path();
else { else {
const KURL& mostLocal = KIO::NetAccess::mostLocalURL( m_url, 0L ); const KURL& mostLocal = TDEIO::NetAccess::mostLocalURL( m_url, 0L );
if ( mostLocal.isValid() && mostLocal.isLocalFile() ) if ( mostLocal.isValid() && mostLocal.isLocalFile() )
m_localFile = mostLocal.path(); m_localFile = mostLocal.path();
} }
@ -84,10 +84,10 @@ bool KuickFile::download()
KURL destURL; KURL destURL;
destURL.setPath( tempFile.name() ); 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 ); m_job->setAutoErrorHandlingEnabled( true );
connect( m_job, TQT_SIGNAL( result( KIO::Job * )), TQT_SLOT( slotResult( KIO::Job * ) )); connect( m_job, TQT_SIGNAL( result( TDEIO::Job * )), TQT_SLOT( slotResult( TDEIO::Job * ) ));
connect( m_job, TQT_SIGNAL( percent( KIO::Job *, unsigned long )), TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) )); connect( m_job, TQT_SIGNAL( percent( TDEIO::Job *, unsigned long )), TQT_SLOT( slotProgress( TDEIO::Job *, unsigned long ) ));
// TODO: generify background/foreground downloading? // TODO: generify background/foreground downloading?
@ -136,7 +136,7 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent )
return OK; return OK;
} }
void KuickFile::slotResult( KIO::Job *job ) void KuickFile::slotResult( TDEIO::Job *job )
{ {
if (job != m_job) { // huh? if (job != m_job) { // huh?
return; return;
@ -147,15 +147,15 @@ void KuickFile::slotResult( KIO::Job *job )
if ( job->error() != 0 ) { if ( job->error() != 0 ) {
m_currentProgress = 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; 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 ); TQFile::remove( canceledFile );
m_progress->topLevelWidget()->hide(); m_progress->topLevelWidget()->hide();
} }
else { 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 emit downloaded( this ); // before closing the progress dialog
if ( m_progress ) { 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? if (job != m_job) { // huh?
return; return;

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

@ -114,7 +114,7 @@ KuickShow::KuickShow( const char *name )
connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() )); 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 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 ); KMimeType::Ptr mime = KMimeType::findByURL( url );
TQString name = mime->name(); TQString name = mime->name();
if ( name == "application/octet-stream" ) // unknown -> stat() 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. // 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 // 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(); fileWidget->setFocus();
KConfig *kc = TDEGlobal::config(); TDEConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings"); kc->setGroup("SessionSettings");
bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true ); bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true );
oneWindowAction->setChecked( oneWindow ); oneWindowAction->setChecked( oneWindow );
@ -569,7 +569,7 @@ bool KuickShow::showImage( const KFileItem *fi,
// file->waitForDownload( this ); // file->waitForDownload( this );
// TQString filename; // TQString filename;
// KIO::NetAccess::download(fi->url(), filename, this); // TDEIO::NetAccess::download(fi->url(), filename, this);
if ( !safeViewer->showNextImage( fi->url() ) ) { if ( !safeViewer->showNextImage( fi->url() ) ) {
m_viewer = safeViewer; m_viewer = safeViewer;
@ -856,7 +856,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
if ( FileWidget::isImage( item ) ) { if ( FileWidget::isImage( item ) ) {
// TQString filename; // TQString filename;
// KIO::NetAccess::download(item->url(), filename, this); // TDEIO::NetAccess::download(item->url(), filename, this);
view->showNextImage( item->url() ); view->showNextImage( item->url() );
if (m_slideTimer->isActive() && kdata->slideDelay) if (m_slideTimer->isActive() && kdata->slideDelay)
m_slideTimer->start( kdata->slideDelay ); m_slideTimer->start( kdata->slideDelay );
@ -1019,7 +1019,7 @@ bool KuickShow::eventFilter( TQObject *o, TQEvent *e )
if ( FileWidget::isImage( item ) ) { if ( FileWidget::isImage( item ) ) {
// TQString filename; // TQString filename;
// KIO::NetAccess::download(item->url(), filename, this); // TDEIO::NetAccess::download(item->url(), filename, this);
m_viewer->showNextImage( item->url() ); m_viewer->showNextImage( item->url() );
if ( kdata->preloadImage && item_next ) { // preload next image if ( kdata->preloadImage && item_next ) { // preload next image
@ -1143,7 +1143,7 @@ void KuickShow::about()
} }
// ------ sessionmanagement - load / save current directory ----- // ------ 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 assert( fileWidget ); // from SM, we should always have initGUI on startup
TQString dir = kc->readPathEntry( "CurrentDirectory" ); TQString dir = kc->readPathEntry( "CurrentDirectory" );
@ -1173,7 +1173,7 @@ void KuickShow::readProperties( KConfig *kc )
show(); show();
} }
void KuickShow::saveProperties( KConfig *kc ) void KuickShow::saveProperties( TDEConfig *kc )
{ {
kc->writeEntry( "Browser visible", fileWidget && fileWidget->isVisible() ); kc->writeEntry( "Browser visible", fileWidget && fileWidget->isVisible() );
if (fileWidget) if (fileWidget)
@ -1197,7 +1197,7 @@ void KuickShow::saveProperties( KConfig *kc )
void KuickShow::saveSettings() void KuickShow::saveSettings()
{ {
KConfig *kc = TDEGlobal::config(); TDEConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings"); kc->setGroup("SessionSettings");
if ( oneWindowAction ) if ( oneWindowAction )

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

Loading…
Cancel
Save