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

r14.0.x
Timothy Pearson 12 years ago
parent e9654e1a22
commit f10950a5b2

@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "configdialog.moc" #include "configdialog.moc"
namespace Gwenview { namespace Gwenview {
typedef TQValueList<KConfigDialogManager*> ConfigManagerList; typedef TQValueList<TDEConfigDialogManager*> ConfigManagerList;
class ConfigDialogPrivate { class ConfigDialogPrivate {
public: public:
@ -122,23 +122,23 @@ ConfigDialog::ConfigDialog(TQWidget* parent, KIPI::PluginLoader* pluginLoader)
// Create dialog pages // Create dialog pages
d->mImageListPage = addConfigPage<ConfigImageListPage>( d->mImageListPage = addConfigPage<ConfigImageListPage>(
this, i18n("Configure Image List"), i18n("Image List"), "view_icon"); this, i18n("Configure Image List"), i18n("Image List"), "view_icon");
d->mManagers << new KConfigDialogManager(d->mImageListPage, FileViewConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mImageListPage, FileViewConfig::self());
d->mImageViewPage = addConfigPage<ConfigImageViewPage>( d->mImageViewPage = addConfigPage<ConfigImageViewPage>(
this, i18n("Configure Image View"), i18n("Image View"), "looknfeel"); this, i18n("Configure Image View"), i18n("Image View"), "looknfeel");
d->mManagers << new KConfigDialogManager(d->mImageViewPage, ImageViewConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mImageViewPage, ImageViewConfig::self());
d->mFullScreenPage = addConfigPage<ConfigFullScreenPage>( d->mFullScreenPage = addConfigPage<ConfigFullScreenPage>(
this, i18n("Configure Full Screen Mode"), i18n("Full Screen"), "window_fullscreen"); this, i18n("Configure Full Screen Mode"), i18n("Full Screen"), "window_fullscreen");
d->mManagers << new KConfigDialogManager(d->mFullScreenPage, FullScreenConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mFullScreenPage, FullScreenConfig::self());
d->mFileOperationsPage = addConfigPage<ConfigFileOperationsPage>( d->mFileOperationsPage = addConfigPage<ConfigFileOperationsPage>(
this, i18n("Configure File Operations"), i18n("File Operations"), "folder"); this, i18n("Configure File Operations"), i18n("File Operations"), "folder");
d->mManagers << new KConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self());
d->mSlideShowPage = addConfigPage<ConfigSlideshowPage>( d->mSlideShowPage = addConfigPage<ConfigSlideshowPage>(
this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play"); this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play");
d->mManagers << new KConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self());
#ifdef GV_HAVE_KIPI #ifdef GV_HAVE_KIPI
Q_ASSERT(pluginLoader); Q_ASSERT(pluginLoader);
@ -152,7 +152,7 @@ ConfigDialog::ConfigDialog(TQWidget* parent, KIPI::PluginLoader* pluginLoader)
d->mMiscPage = addConfigPage<ConfigMiscPage>( d->mMiscPage = addConfigPage<ConfigMiscPage>(
this, i18n("Miscellaneous Settings"), i18n("Misc"), "gear"); this, i18n("Miscellaneous Settings"), i18n("Misc"), "gear");
d->mManagers << new KConfigDialogManager(d->mMiscPage, MiscConfig::self()); d->mManagers << new TDEConfigDialogManager(d->mMiscPage, MiscConfig::self());
// Read config, because the modified behavior might have changed // Read config, because the modified behavior might have changed
MiscConfig::self()->readConfig(); MiscConfig::self()->readConfig();
@ -247,7 +247,7 @@ void ConfigDialog::calculateCacheSize() {
KURL url; KURL url;
url.setPath(ThumbnailLoadJob::thumbnailBaseDir()); url.setPath(ThumbnailLoadJob::thumbnailBaseDir());
unsigned long size=KDirSize::dirSize(url); unsigned long size=KDirSize::dirSize(url);
KMessageBox::information( this,i18n("Cache size is %1").arg(KIO::convertSize(size)) ); KMessageBox::information( this,i18n("Cache size is %1").arg(TDEIO::convertSize(size)) );
} }
@ -289,13 +289,13 @@ void ConfigDialog::emptyCache() {
KURL url; KURL url;
url.setPath(dir); url.setPath(dir);
if (KIO::NetAccess::del(url, topLevelWidget()) ) { if (TDEIO::NetAccess::del(url, topLevelWidget()) ) {
KMessageBox::information( this,i18n("Cache emptied.") ); KMessageBox::information( this,i18n("Cache emptied.") );
} }
} }
void ConfigDialog::onCacheEmptied(KIO::Job* job) { void ConfigDialog::onCacheEmptied(TDEIO::Job* job) {
if ( job->error() ) { if ( job->error() ) {
job->showErrorDialog(this); job->showErrorDialog(this);
return; return;

@ -53,7 +53,7 @@ private slots:
void updateOSDPreview(); void updateOSDPreview();
void calculateCacheSize(); void calculateCacheSize();
void emptyCache(); void emptyCache();
void onCacheEmptied(KIO::Job*); void onCacheEmptied(TDEIO::Job*);
private: private:
ConfigDialogPrivate* d; ConfigDialogPrivate* d;

@ -31,7 +31,7 @@ class TQWidget;
class KListView; class KListView;
class KURL; class KURL;
namespace KIO { namespace TDEIO {
class Job; class Job;
} }

@ -143,17 +143,17 @@ static bool urlIsDirectory(TQWidget* parent, const KURL& url) {
if( url.filename( false ).isEmpty()) return true; // file:/somewhere/<nothing here> if( url.filename( false ).isEmpty()) return true; // file:/somewhere/<nothing here>
// Do direct stat instead of using KIO if the file is local (faster) // Do direct stat instead of using KIO if the file is local (faster)
if( url.isLocalFile() if( url.isLocalFile()
&& !KIO::probably_slow_mounted( url.path())) { && !TDEIO::probably_slow_mounted( url.path())) {
KDE_struct_stat buff; KDE_struct_stat buff;
if ( KDE_stat( TQFile::encodeName(url.path()), &buff ) == 0 ) { if ( KDE_stat( TQFile::encodeName(url.path()), &buff ) == 0 ) {
return S_ISDIR( buff.st_mode ); return S_ISDIR( buff.st_mode );
} }
} }
KIO::UDSEntry entry; TDEIO::UDSEntry entry;
if( KIO::NetAccess::stat( url, entry, parent)) { if( TDEIO::NetAccess::stat( url, entry, parent)) {
KIO::UDSEntry::ConstIterator it; TDEIO::UDSEntry::ConstIterator it;
for(it=entry.begin();it!=entry.end();++it) { for(it=entry.begin();it!=entry.end();++it) {
if ((*it).m_uds==KIO::UDS_FILE_TYPE) { if ((*it).m_uds==TDEIO::UDS_FILE_TYPE) {
return S_ISDIR( (*it).m_long ); return S_ISDIR( (*it).m_long );
} }
} }
@ -197,7 +197,7 @@ void MainWindow::setFullScreen(bool value) {
bool MainWindow::queryClose() { bool MainWindow::queryClose() {
mDocument->saveBeforeClosing(); mDocument->saveBeforeClosing();
KConfig* config=TDEGlobal::config(); TDEConfig* config=TDEGlobal::config();
// Don't store dock layout if only the image dock is visible. This avoid // Don't store dock layout if only the image dock is visible. This avoid
// saving layout when in "fullscreen" or "image only" mode. // saving layout when in "fullscreen" or "image only" mode.
@ -211,7 +211,7 @@ bool MainWindow::queryClose() {
if (TQFile::exists(dir)) { if (TQFile::exists(dir)) {
KURL url; KURL url;
url.setPath(dir); url.setPath(dir);
KIO::NetAccess::del(url, this); TDEIO::NetAccess::del(url, this);
} }
} }
@ -223,11 +223,11 @@ bool MainWindow::queryClose() {
return true; return true;
} }
void MainWindow::saveProperties( KConfig* cfg ) { void MainWindow::saveProperties( TDEConfig* cfg ) {
cfg->writeEntry( CONFIG_SESSION_URL, mFileViewController->url().url()); cfg->writeEntry( CONFIG_SESSION_URL, mFileViewController->url().url());
} }
void MainWindow::readProperties( KConfig* cfg ) { void MainWindow::readProperties( TDEConfig* cfg ) {
KURL url(cfg->readEntry(CONFIG_SESSION_URL)); KURL url(cfg->readEntry(CONFIG_SESSION_URL));
openURL(url); openURL(url);
} }
@ -856,7 +856,7 @@ void MainWindow::updateImageActions() {
* actions are created in createObjectInteractions * actions are created in createObjectInteractions
*/ */
void MainWindow::createWidgets() { void MainWindow::createWidgets() {
KConfig* config=TDEGlobal::config(); TDEConfig* config=TDEGlobal::config();
mCentralStack=new TQWidgetStack(this); mCentralStack=new TQWidgetStack(this);
setCentralWidget(mCentralStack); setCentralWidget(mCentralStack);

@ -75,8 +75,8 @@ public slots:
protected: protected:
bool queryClose(); bool queryClose();
virtual void saveProperties( KConfig* ); virtual void saveProperties( TDEConfig* );
virtual void readProperties( KConfig* ); virtual void readProperties( TDEConfig* );
private: private:
TQWidgetStack* mCentralStack; TQWidgetStack* mCentralStack;

@ -55,7 +55,7 @@ struct ImageData : public KShared {
ImageData( const KURL& url, const TQDateTime& _timestamp ) ImageData( const KURL& url, const TQDateTime& _timestamp )
: timestamp(_timestamp) : timestamp(_timestamp)
, age(0) , age(0)
, fast_url( url.isLocalFile() && !KIO::probably_slow_mounted( url.path())) , fast_url( url.isLocalFile() && !TDEIO::probably_slow_mounted( url.path()))
, priority( false ) { , priority( false ) {
} }
@ -298,8 +298,8 @@ void Cache::checkMaxSize() {
} }
} }
void Cache::readConfig(KConfig* config,const TQString& group) { void Cache::readConfig(TDEConfig* config,const TQString& group) {
KConfigGroupSaver saver( config, group ); TDEConfigGroupSaver saver( config, group );
d->mMaxSize = config->readNumEntry( CONFIG_CACHE_MAXSIZE, d->mMaxSize ); d->mMaxSize = config->readNumEntry( CONFIG_CACHE_MAXSIZE, d->mMaxSize );
checkMaxSize(); checkMaxSize();
} }

@ -35,7 +35,7 @@ Copyright 2000-2004 Aur
// Local // Local
#include "imageframe.h" #include "imageframe.h"
#include "libgwenview_export.h" #include "libgwenview_export.h"
class KConfig; class TDEConfig;
namespace Gwenview { namespace Gwenview {
class LIBGWENVIEW_EXPORT Cache : public TQObject { class LIBGWENVIEW_EXPORT Cache : public TQObject {
@ -54,7 +54,7 @@ public:
void setPriorityURL( const KURL& url, bool set ); void setPriorityURL( const KURL& url, bool set );
void invalidate( const KURL& url ); void invalidate( const KURL& url );
void checkThumbnailSize( int size ); void checkThumbnailSize( int size );
void readConfig(KConfig*,const TQString& group); void readConfig(TDEConfig*,const TQString& group);
void updateAge(); void updateAge();
enum { DEFAULT_MAXSIZE = 16 * 1024 * 1024 }; // 16MiB enum { DEFAULT_MAXSIZE = 16 * 1024 * 1024 }; // 16MiB
private: private:

@ -92,7 +92,7 @@ public:
TQString mMimeType; TQString mMimeType;
TQCString mImageFormat; TQCString mImageFormat;
DocumentImpl* mImpl; DocumentImpl* mImpl;
TQGuardedPtr<KIO::StatJob> mStatJob; TQGuardedPtr<TDEIO::StatJob> mStatJob;
int mFileSize; int mFileSize;
}; };
@ -195,14 +195,14 @@ void Document::setURL(const KURL& paramURL) {
} }
d->mURL = localURL; // this may be fixed after stat() is complete, but set at least something d->mURL = localURL; // this may be fixed after stat() is complete, but set at least something
d->mStatJob = KIO::stat( localURL, !localURL.isLocalFile() ); d->mStatJob = TDEIO::stat( localURL, !localURL.isLocalFile() );
d->mStatJob->setWindow(TDEApplication::kApplication()->mainWidget()); d->mStatJob->setWindow(TDEApplication::kApplication()->mainWidget());
connect( d->mStatJob, TQT_SIGNAL( result (KIO::Job *) ), connect( d->mStatJob, TQT_SIGNAL( result (TDEIO::Job *) ),
this, TQT_SLOT( slotStatResult (KIO::Job *) ) ); this, TQT_SLOT( slotStatResult (TDEIO::Job *) ) );
} }
void Document::slotStatResult(KIO::Job* job) { void Document::slotStatResult(TDEIO::Job* job) {
LOG(""); LOG("");
Q_ASSERT(d->mStatJob==job); Q_ASSERT(d->mStatJob==job);
if (d->mStatJob!=job) { if (d->mStatJob!=job) {
@ -213,12 +213,12 @@ void Document::slotStatResult(KIO::Job* job) {
if (d->mStatJob->error()) return; if (d->mStatJob->error()) return;
bool isDir=false; bool isDir=false;
KIO::UDSEntry entry = d->mStatJob->statResult(); TDEIO::UDSEntry entry = d->mStatJob->statResult();
d->mURL=d->mStatJob->url(); d->mURL=d->mStatJob->url();
KIO::UDSEntry::ConstIterator it; TDEIO::UDSEntry::ConstIterator it;
for(it=entry.begin();it!=entry.end();++it) { for(it=entry.begin();it!=entry.end();++it) {
if ((*it).m_uds==KIO::UDS_FILE_TYPE) { if ((*it).m_uds==TDEIO::UDS_FILE_TYPE) {
isDir=S_ISDIR( (*it).m_long ); isDir=S_ISDIR( (*it).m_long );
break; break;
} }

@ -34,7 +34,7 @@ Copyright 2000-2006 Aurelien Gateau
#include "imageutils/orientation.h" #include "imageutils/orientation.h"
#include "mimetypeutils.h" #include "mimetypeutils.h"
#include "libgwenview_export.h" #include "libgwenview_export.h"
namespace KIO { class Job; } namespace TDEIO { class Job; }
namespace Gwenview { namespace Gwenview {
class DocumentPrivate; class DocumentPrivate;
@ -157,7 +157,7 @@ signals:
void errorHappened(const TQString& message); void errorHappened(const TQString& message);
private slots: private slots:
void slotStatResult(KIO::Job*); void slotStatResult(TDEIO::Job*);
void slotFinished(bool success); void slotFinished(bool success);
void slotLoading(); void slotLoading();
void slotLoaded(); void slotLoaded();

@ -175,7 +175,7 @@ TQString DocumentLoadedImpl::save(const KURL& _url, const TQCString& format) con
return i18n("Could not write to %1.").arg(url.path()); return i18n("Could not write to %1.").arg(url.path());
} }
} else { } else {
if (!KIO::NetAccess::upload(tmp.name(), url, TDEApplication::kApplication()->mainWidget() )) { if (!TDEIO::NetAccess::upload(tmp.name(), url, TDEApplication::kApplication()->mainWidget() )) {
return i18n("Could not upload the file to %1.").arg(url.prettyURL()); return i18n("Could not upload the file to %1.").arg(url.prettyURL());
} }
} }

@ -67,16 +67,16 @@ public:
public slots: public slots:
void copy() { void copy() {
KIO::copy(mSrc, mDst, true); TDEIO::copy(mSrc, mDst, true);
} }
void move() { void move() {
KIO::move(mSrc, mDst, true); TDEIO::move(mSrc, mDst, true);
if (mWasMoved) *mWasMoved=true; if (mWasMoved) *mWasMoved=true;
} }
void link() { void link() {
KIO::link(mSrc, mDst, true); TDEIO::link(mSrc, mDst, true);
} }
private: private:

@ -76,7 +76,7 @@ FileOpObject::FileOpObject(const KURL::List& list,TQWidget* parent)
{} {}
void FileOpObject::slotResult(KIO::Job* job) { void FileOpObject::slotResult(TDEIO::Job* job) {
if (job->error()) { if (job->error()) {
job->showErrorDialog(mParent); job->showErrorDialog(mParent);
} }
@ -88,10 +88,10 @@ void FileOpObject::slotResult(KIO::Job* job) {
} }
void FileOpObject::polishJob(KIO::Job* job) { void FileOpObject::polishJob(TDEIO::Job* job) {
job->setWindow(mParent->topLevelWidget()); job->setWindow(mParent->topLevelWidget());
connect( job, TQT_SIGNAL( result(KIO::Job*) ), connect( job, TQT_SIGNAL( result(TDEIO::Job*) ),
this, TQT_SLOT( slotResult(KIO::Job*) ) ); this, TQT_SLOT( slotResult(TDEIO::Job*) ) );
} }
@ -121,7 +121,7 @@ void FileOpCopyToObject::operator()() {
if (destURL.isEmpty()) return; if (destURL.isEmpty()) return;
// Copy the file // Copy the file
KIO::Job* job=KIO::copy(mURLList,destURL,true); TDEIO::Job* job=TDEIO::copy(mURLList,destURL,true);
polishJob(job); polishJob(job);
} }
@ -153,7 +153,7 @@ void FileOpLinkToObject::operator()() {
if (destURL.isEmpty()) return; if (destURL.isEmpty()) return;
// Copy the file // Copy the file
KIO::Job* job=KIO::link(mURLList,destURL,true); TDEIO::Job* job=TDEIO::link(mURLList,destURL,true);
polishJob(job); polishJob(job);
} }
@ -182,7 +182,7 @@ void FileOpMoveToObject::operator()() {
if (destURL.isEmpty()) return; if (destURL.isEmpty()) return;
// Move the file // Move the file
KIO::Job* job=KIO::move(mURLList,destURL,true); TDEIO::Job* job=TDEIO::move(mURLList,destURL,true);
polishJob(job); polishJob(job);
} }
@ -199,24 +199,24 @@ void FileOpMakeDirObject::operator()() {
KURL newURL(mURLList.first()); KURL newURL(mURLList.first());
newURL.addPath(newDir); newURL.addPath(newDir);
KIO::Job* job=KIO::mkdir(newURL); TDEIO::Job* job=TDEIO::mkdir(newURL);
polishJob(job); polishJob(job);
} }
static KIO::Job* createTrashJob(KURL::List lst) { static TDEIO::Job* createTrashJob(KURL::List lst) {
KURL trashURL("trash:/"); KURL trashURL("trash:/");
// Go do it // Go do it
if (lst.count()==1) { if (lst.count()==1) {
// If there's only one file, KIO::move will think we want to overwrite // If there's only one file, TDEIO::move will think we want to overwrite
// the trash dir with the file to trash, so we add the file name // the trash dir with the file to trash, so we add the file name
trashURL.addPath(lst.first().fileName()); trashURL.addPath(lst.first().fileName());
} }
return KIO::move(lst, trashURL); return TDEIO::move(lst, trashURL);
} }
static KIO::Job* createDeleteJob(KURL::List lst) { static TDEIO::Job* createDeleteJob(KURL::List lst) {
return KIO::del(lst, false, true); return TDEIO::del(lst, false, true);
} }
@ -233,7 +233,7 @@ void FileOpDelObject::operator()() {
} }
KIO::Job* job; TDEIO::Job* job;
if (shouldDelete) { if (shouldDelete) {
job = createDeleteJob(mURLList); job = createDeleteJob(mURLList);
} else { } else {
@ -264,7 +264,7 @@ void FileOpTrashObject::operator()() {
if (response!=KMessageBox::Continue) return; if (response!=KMessageBox::Continue) return;
} }
KIO::Job* job = createTrashJob(mURLList); TDEIO::Job* job = createTrashJob(mURLList);
polishJob(job); polishJob(job);
} }
@ -296,7 +296,7 @@ void FileOpRealDeleteObject::operator()() {
} }
// Delete the file // Delete the file
KIO::Job* job = createDeleteJob(mURLList); TDEIO::Job* job = createDeleteJob(mURLList);
polishJob(job); polishJob(job);
} }
@ -327,12 +327,12 @@ void FileOpRenameObject::operator()() {
// Rename the file // Rename the file
KURL destURL=srcURL; KURL destURL=srcURL;
destURL.setFileName(mNewFilename); destURL.setFileName(mNewFilename);
KIO::Job* job=KIO::move(srcURL,destURL); TDEIO::Job* job=TDEIO::move(srcURL,destURL);
polishJob(job); polishJob(job);
} }
void FileOpRenameObject::slotResult(KIO::Job* job) { void FileOpRenameObject::slotResult(TDEIO::Job* job) {
if (job->error()) { if (job->error()) {
job->showErrorDialog(mParent); job->showErrorDialog(mParent);
} }

@ -54,13 +54,13 @@ signals:
void success(); void success();
protected slots: protected slots:
virtual void slotResult(KIO::Job*); virtual void slotResult(TDEIO::Job*);
protected: protected:
TQWidget* mParent; TQWidget* mParent;
KURL::List mURLList; KURL::List mURLList;
void polishJob(KIO::Job*); void polishJob(TDEIO::Job*);
}; };
@ -140,7 +140,7 @@ signals:
void renamed(const TQString& newName); void renamed(const TQString& newName);
protected slots: protected slots:
virtual void slotResult(KIO::Job*); virtual void slotResult(TDEIO::Job*);
private: private:
TQString mNewFilename; TQString mNewFilename;

@ -376,7 +376,7 @@ void FileThumbnailView::doStartThumbnailUpdate(const KFileItemList* list) {
connect(d->mThumbnailLoadJob, TQT_SIGNAL(thumbnailLoaded(const KFileItem*, const TQPixmap&, const TQSize&)), connect(d->mThumbnailLoadJob, TQT_SIGNAL(thumbnailLoaded(const KFileItem*, const TQPixmap&, const TQSize&)),
this, TQT_SLOT(setThumbnailPixmap(const KFileItem*,const TQPixmap&, const TQSize&)) ); this, TQT_SLOT(setThumbnailPixmap(const KFileItem*,const TQPixmap&, const TQSize&)) );
connect(d->mThumbnailLoadJob, TQT_SIGNAL(result(KIO::Job*)), connect(d->mThumbnailLoadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotUpdateEnded()) ); this, TQT_SLOT(slotUpdateEnded()) );
slotBusyLevelChanged( BusyLevelManager::instance()->busyLevel()); slotBusyLevelChanged( BusyLevelManager::instance()->busyLevel());

@ -38,7 +38,7 @@ class TQIconViewItem;
class TQPopupMenu; class TQPopupMenu;
class TQShowEvent; class TQShowEvent;
class KConfig; class TDEConfig;
class KFileItem; class KFileItem;
typedef TQPtrList<KFileItem> KFileItemList; typedef TQPtrList<KFileItem> KFileItemList;

@ -217,7 +217,7 @@ void FileThumbnailViewItem::updateLines() {
mLines.append( new CroppedLine(this, txt) ); mLines.append( new CroppedLine(this, txt) );
} }
if (!isDir) { if (!isDir) {
mLines.append( new CroppedLine(this, KIO::convertSize(mFileItem->size())) ); mLines.append( new CroppedLine(this, TDEIO::convertSize(mFileItem->size())) );
} }
} else { } else {
@ -242,7 +242,7 @@ void FileThumbnailViewItem::updateLines() {
mLines.append( new CroppedLine(this, txt) ); mLines.append( new CroppedLine(this, txt) );
} }
if (!isDir && (details & FileThumbnailView::FILESIZE)) { if (!isDir && (details & FileThumbnailView::FILESIZE)) {
mLines.append( new CroppedLine(this, KIO::convertSize(mFileItem->size())) ); mLines.append( new CroppedLine(this, TDEIO::convertSize(mFileItem->size())) );
} }
} }

@ -99,7 +99,7 @@ public:
return url.isValid(); return url.isValid();
} }
virtual void handleError(KIO::Job* job) { virtual void handleError(TDEIO::Job* job) {
mError = true; mError = true;
if(mCheck) KDirLister::handleError( job ); if(mCheck) KDirLister::handleError( job );
}; };

@ -40,7 +40,7 @@ class TQPopupMenu;
class KAccel; class KAccel;
class KAction; class KAction;
class KActionCollection; class KActionCollection;
class KConfig; class TDEConfig;
class KListView; class KListView;
class KRadioAction; class KRadioAction;
class KToggleAction; class KToggleAction;

@ -326,22 +326,22 @@ void ImageLoader::startLoading() {
void ImageLoader::checkPendingStat() { void ImageLoader::checkPendingStat() {
if( d->mSuspended || d->mGetState != GET_PENDING_STAT ) return; if( d->mSuspended || d->mGetState != GET_PENDING_STAT ) return;
KIO::Job* job=KIO::stat( d->mURL, false ); TDEIO::Job* job=TDEIO::stat( d->mURL, false );
job->setWindow(TDEApplication::kApplication()->mainWidget()); job->setWindow(TDEApplication::kApplication()->mainWidget());
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotStatResult(KIO::Job*)) ); this, TQT_SLOT(slotStatResult(TDEIO::Job*)) );
d->mGetState = GET_STATING; d->mGetState = GET_STATING;
} }
void ImageLoader::slotStatResult(KIO::Job* job) { void ImageLoader::slotStatResult(TDEIO::Job* job) {
LOG("error code: " << job->error()); LOG("error code: " << job->error());
// Get modification time of the original file // Get modification time of the original file
KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult(); TDEIO::UDSEntry entry = static_cast<TDEIO::StatJob*>(job)->statResult();
KIO::UDSEntry::ConstIterator it= entry.begin(); TDEIO::UDSEntry::ConstIterator it= entry.begin();
TQDateTime urlTimestamp; TQDateTime urlTimestamp;
for (; it!=entry.end(); it++) { for (; it!=entry.end(); it++) {
if ((*it).m_uds == KIO::UDS_MODIFICATION_TIME) { if ((*it).m_uds == TDEIO::UDS_MODIFICATION_TIME) {
urlTimestamp.setTime_t( (*it).m_long ); urlTimestamp.setTime_t( (*it).m_long );
break; break;
} }
@ -392,21 +392,21 @@ void ImageLoader::checkPendingGet() {
if( d->mSuspended || d->mGetState != GET_PENDING_GET ) return; if( d->mSuspended || d->mGetState != GET_PENDING_GET ) return;
// Start loading the image // Start loading the image
KIO::Job* getJob=KIO::get( d->mURL, false, false); TDEIO::Job* getJob=TDEIO::get( d->mURL, false, false);
getJob->setWindow(TDEApplication::kApplication()->mainWidget()); getJob->setWindow(TDEApplication::kApplication()->mainWidget());
connect(getJob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), connect(getJob, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)),
this, TQT_SLOT(slotDataReceived(KIO::Job*, const TQByteArray&)) ); this, TQT_SLOT(slotDataReceived(TDEIO::Job*, const TQByteArray&)) );
connect(getJob, TQT_SIGNAL(result(KIO::Job*)), connect(getJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotGetResult(KIO::Job*)) ); this, TQT_SLOT(slotGetResult(TDEIO::Job*)) );
d->mTimeSinceLastUpdate.start(); d->mTimeSinceLastUpdate.start();
d->mGetState = GET_GETTING; d->mGetState = GET_GETTING;
} }
void ImageLoader::slotGetResult(KIO::Job* job) { void ImageLoader::slotGetResult(TDEIO::Job* job) {
LOG("error code: " << job->error()); LOG("error code: " << job->error());
if( job->error() != 0 ) { if( job->error() != 0 ) {
// failed // failed
@ -449,7 +449,7 @@ static TQString mimeTypeFromFormat(const char* format) {
return mimeTypes[pos]; return mimeTypes[pos];
} }
void ImageLoader::slotDataReceived(KIO::Job* job, const TQByteArray& chunk) { void ImageLoader::slotDataReceived(TDEIO::Job* job, const TQByteArray& chunk) {
LOG2("size: " << chunk.size()); LOG2("size: " << chunk.size());
if (chunk.size()<=0) return; if (chunk.size()<=0) return;

@ -83,9 +83,9 @@ signals:
void imageLoaded( bool ok ); void imageLoaded( bool ok );
private slots: private slots:
void slotStatResult(KIO::Job*); void slotStatResult(TDEIO::Job*);
void slotDataReceived(KIO::Job*, const TQByteArray& chunk); void slotDataReceived(TDEIO::Job*, const TQByteArray& chunk);
void slotGetResult(KIO::Job*); void slotGetResult(TDEIO::Job*);
void decodeChunk(); void decodeChunk();
void slotDecoderThreadFailed(); void slotDecoderThreadFailed();
void slotDecoderThreadSucceeded(); void slotDecoderThreadSucceeded();

@ -77,7 +77,7 @@ Kind urlKind(const KURL& url) {
if (url.isLocalFile()) { if (url.isLocalFile()) {
mimeType=KMimeType::findByURL(url)->name(); mimeType=KMimeType::findByURL(url)->name();
} else { } else {
mimeType=KIO::NetAccess::mimetype(url, TDEApplication::kApplication()->mainWidget()); mimeType=TDEIO::NetAccess::mimetype(url, TDEApplication::kApplication()->mainWidget());
} }
return mimeTypeKind(mimeType); return mimeTypeKind(mimeType);
} }

@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "libgwenview_export.h" #include "libgwenview_export.h"
class TQTimer; class TQTimer;
class KConfig; class TDEConfig;
namespace Gwenview { namespace Gwenview {
class Document; class Document;

@ -372,7 +372,7 @@ void ThumbnailLoadJob::deleteImageThumbnail(const KURL& url) {
*/ */
ThumbnailLoadJob::ThumbnailLoadJob(const TQValueVector<const KFileItem*>* items, int size) ThumbnailLoadJob::ThumbnailLoadJob(const TQValueVector<const KFileItem*>* items, int size)
: KIO::Job(false), mState( STATE_NEXTTHUMB ), : TDEIO::Job(false), mState( STATE_NEXTTHUMB ),
mCurrentVisibleIndex( -1 ), mFirstVisibleIndex( -1 ), mLastVisibleIndex( -1 ), mCurrentVisibleIndex( -1 ), mFirstVisibleIndex( -1 ), mLastVisibleIndex( -1 ),
mThumbnailSize(size), mSuspended( false ) mThumbnailSize(size), mSuspended( false )
{ {
@ -545,7 +545,7 @@ void ThumbnailLoadJob::determineNextIcon() {
// Do direct stat instead of using KIO if the file is local (faster) // Do direct stat instead of using KIO if the file is local (faster)
if( mCurrentURL.isLocalFile() if( mCurrentURL.isLocalFile()
&& !KIO::probably_slow_mounted( mCurrentURL.path())) { && !TDEIO::probably_slow_mounted( mCurrentURL.path())) {
KDE_struct_stat buff; KDE_struct_stat buff;
if ( KDE_stat( TQFile::encodeName(mCurrentURL.path()), &buff ) == 0 ) { if ( KDE_stat( TQFile::encodeName(mCurrentURL.path()), &buff ) == 0 ) {
mOriginalTime = buff.st_mtime; mOriginalTime = buff.st_mtime;
@ -553,15 +553,15 @@ void ThumbnailLoadJob::determineNextIcon() {
} }
} }
if( mOriginalTime == 0 ) { // KIO must be used if( mOriginalTime == 0 ) { // KIO must be used
KIO::Job* job = KIO::stat(mCurrentURL,false); TDEIO::Job* job = TDEIO::stat(mCurrentURL,false);
job->setWindow(TDEApplication::kApplication()->mainWidget()); job->setWindow(TDEApplication::kApplication()->mainWidget());
LOG( "KIO::stat orig " << mCurrentURL.url() ); LOG( "TDEIO::stat orig " << mCurrentURL.url() );
addSubjob(job); addSubjob(job);
} }
} }
void ThumbnailLoadJob::slotResult(KIO::Job * job) { void ThumbnailLoadJob::slotResult(TDEIO::Job * job) {
LOG(mState); LOG(mState);
subjobs.remove(job); subjobs.remove(job);
Q_ASSERT(subjobs.isEmpty()); // We should have only one job at a time ... Q_ASSERT(subjobs.isEmpty()); // We should have only one job at a time ...
@ -581,11 +581,11 @@ void ThumbnailLoadJob::slotResult(KIO::Job * job) {
} }
// Get modification time of the original file // Get modification time of the original file
KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult(); TDEIO::UDSEntry entry = static_cast<TDEIO::StatJob*>(job)->statResult();
KIO::UDSEntry::ConstIterator it= entry.begin(); TDEIO::UDSEntry::ConstIterator it= entry.begin();
mOriginalTime = 0; mOriginalTime = 0;
for (; it!=entry.end(); ++it) { for (; it!=entry.end(); ++it) {
if ((*it).m_uds == KIO::UDS_MODIFICATION_TIME) { if ((*it).m_uds == TDEIO::UDS_MODIFICATION_TIME) {
mOriginalTime = (time_t)((*it).m_long); mOriginalTime = (time_t)((*it).m_long);
break; break;
} }
@ -700,7 +700,7 @@ void ThumbnailLoadJob::checkThumbnail() {
mTempPath=tmpFile.name(); mTempPath=tmpFile.name();
KURL url; KURL url;
url.setPath(mTempPath); url.setPath(mTempPath);
KIO::Job* job=KIO::file_copy(mCurrentURL, url,-1,true,false,false); TDEIO::Job* job=TDEIO::file_copy(mCurrentURL, url,-1,true,false,false);
job->setWindow(TDEApplication::kApplication()->mainWidget()); job->setWindow(TDEApplication::kApplication()->mainWidget());
LOG("Download remote file " << mCurrentURL.prettyURL()); LOG("Download remote file " << mCurrentURL.prettyURL());
addSubjob(job); addSubjob(job);
@ -710,7 +710,7 @@ void ThumbnailLoadJob::checkThumbnail() {
mState=STATE_PREVIEWJOB; mState=STATE_PREVIEWJOB;
KFileItemList list; KFileItemList list;
list.append(mCurrentItem); list.append(mCurrentItem);
KIO::Job* job=KIO::filePreview(list, mThumbnailSize); TDEIO::Job* job=TDEIO::filePreview(list, mThumbnailSize);
job->setWindow(TDEApplication::kApplication()->mainWidget()); job->setWindow(TDEApplication::kApplication()->mainWidget());
connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
this, TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&)) ); this, TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&)) );

@ -39,7 +39,7 @@
#include "tsthread/tswaitcondition.h" #include "tsthread/tswaitcondition.h"
#include "libgwenview_export.h" #include "libgwenview_export.h"
class KConfig; class TDEConfig;
class KFileItem; class KFileItem;
typedef TQPtrList<KFileItem> KFileItemList; typedef TQPtrList<KFileItem> KFileItemList;
@ -84,7 +84,7 @@ private:
/** /**
* A job that determines the thumbnails for the images in the current directory * A job that determines the thumbnails for the images in the current directory
*/ */
class LIBGWENVIEW_EXPORT ThumbnailLoadJob : public KIO::Job { class LIBGWENVIEW_EXPORT ThumbnailLoadJob : public TDEIO::Job {
Q_OBJECT Q_OBJECT
public: public:
@ -150,7 +150,7 @@ signals:
void thumbnailLoaded(const KFileItem* item, const TQPixmap&, const TQSize&); void thumbnailLoaded(const KFileItem* item, const TQPixmap&, const TQSize&);
private slots: private slots:
void slotResult( KIO::Job *job ); void slotResult( TDEIO::Job *job );
void slotGotPreview(const KFileItem*, const TQPixmap&); void slotGotPreview(const KFileItem*, const TQPixmap&);
void checkThumbnail(); void checkThumbnail();
void thumbnailReady(const TQImage& im, const TQSize&); void thumbnailReady(const TQImage& im, const TQSize&);

@ -39,7 +39,7 @@ time_t getTime(const KFileItem* item) {
return dt.toTime_t(); return dt.toTime_t();
} }
} }
return item->time(KIO::UDS_MODIFICATION_TIME); return item->time(TDEIO::UDS_MODIFICATION_TIME);
} }
TQString formatTime(time_t time) { TQString formatTime(time_t time) {

@ -133,7 +133,7 @@ GVDirPart::~GVDirPart() {
void GVDirPart::partActivateEvent(KParts::PartActivateEvent* event) { void GVDirPart::partActivateEvent(KParts::PartActivateEvent* event) {
if (event->activated()) { if (event->activated()) {
KConfig* config=new KConfig("gwenviewrc"); TDEConfig* config=new TDEConfig("gwenviewrc");
Cache::instance()->readConfig(config,CONFIG_CACHE_GROUP); Cache::instance()->readConfig(config,CONFIG_CACHE_GROUP);
delete config; delete config;
} }

@ -129,7 +129,7 @@ GVImagePart::~GVImagePart() {
void GVImagePart::partActivateEvent(KParts::PartActivateEvent* event) { void GVImagePart::partActivateEvent(KParts::PartActivateEvent* event) {
if (event->activated()) { if (event->activated()) {
KConfig* config=new KConfig("gwenviewrc"); TDEConfig* config=new TDEConfig("gwenviewrc");
Cache::instance()->readConfig(config,CONFIG_CACHE_GROUP); Cache::instance()->readConfig(config,CONFIG_CACHE_GROUP);
delete config; delete config;
} }
@ -329,7 +329,7 @@ void GVImagePart::saveAs() {
} }
void GVImagePart::showJobError(KIO::Job* job) { void GVImagePart::showJobError(TDEIO::Job* job) {
if (job->error() != 0) { if (job->error() != 0) {
job->showErrorDialog(widget()); job->showErrorDialog(widget());
} }
@ -348,11 +348,11 @@ void GVImagePart::saveOriginalAs() {
TQByteArray data = Cache::instance()->file(srcURL); TQByteArray data = Cache::instance()->file(srcURL);
if (data.size() == 0) { if (data.size() == 0) {
// We need to read the image again. Let KIO::copy do the work. // We need to read the image again. Let TDEIO::copy do the work.
KIO::Job* job = KIO::copy(srcURL, dstURL); TDEIO::Job* job = TDEIO::copy(srcURL, dstURL);
job->setWindow(widget()); job->setWindow(widget());
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(showJobError(KIO::Job*)) ); this, TQT_SLOT(showJobError(TDEIO::Job*)) );
return; return;
} }
@ -386,14 +386,14 @@ DataUploader::DataUploader(TQWidget* dialogParent, const TQByteArray& data, cons
// Now upload it // Now upload it
KURL tmpURL; KURL tmpURL;
tmpURL.setPath(mTempFile.name()); tmpURL.setPath(mTempFile.name());
KIO::Job* job = KIO::copy(tmpURL, dstURL); TDEIO::Job* job = TDEIO::copy(tmpURL, dstURL);
job->setWindow(dialogParent); job->setWindow(dialogParent);
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotJobFinished(KIO::Job*)) ); this, TQT_SLOT(slotJobFinished(TDEIO::Job*)) );
} }
void DataUploader::slotJobFinished(KIO::Job* job) { void DataUploader::slotJobFinished(TDEIO::Job* job) {
if (job->error() != 0) { if (job->error() != 0) {
job->showErrorDialog(mDialogParent); job->showErrorDialog(mDialogParent);
} }

@ -124,7 +124,7 @@ private slots:
void saveAs(); void saveAs();
void showJobError(KIO::Job* job); void showJobError(TDEIO::Job* job);
private: private:
@ -173,7 +173,7 @@ public:
DataUploader(TQWidget* dialogParent, const TQByteArray& data, const KURL& destURL); DataUploader(TQWidget* dialogParent, const TQByteArray& data, const KURL& destURL);
private slots: private slots:
void slotJobFinished(KIO::Job*); void slotJobFinished(TDEIO::Job*);
private: private:
KTempFile mTempFile; KTempFile mTempFile;

Loading…
Cancel
Save