summaryrefslogtreecommitdiffstats
path: root/kget/kmainwidget.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-01-25 00:36:20 -0600
committerTimothy Pearson <[email protected]>2013-01-25 00:36:20 -0600
commitf21aaec952493cb5688c73de6e82a569ddbd7fb2 (patch)
tree78ccb5117063da3e08e3277e11054b912a9f2ae7 /kget/kmainwidget.cpp
parentc48e769eb275917717e2b55eb869f7e559293ac8 (diff)
downloadtdenetwork-f21aaec952493cb5688c73de6e82a569ddbd7fb2.tar.gz
tdenetwork-f21aaec952493cb5688c73de6e82a569ddbd7fb2.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kget/kmainwidget.cpp')
-rw-r--r--kget/kmainwidget.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp
index b80625c6..69a4a85e 100644
--- a/kget/kmainwidget.cpp
+++ b/kget/kmainwidget.cpp
@@ -128,7 +128,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
#endif
{
- KConfig cfg( "kioslaverc", false, false);
+ TDEConfig cfg( "kioslaverc", false, false);
cfg.setGroup(TQString());
cfg.writeEntry("AutoResume", true);
cfg.sync();
@@ -152,7 +152,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
logFileName += tmp;
lastClipboard = TQApplication::clipboard()->text( TQClipboard::Clipboard ).stripWhiteSpace();
- // Load all settings from KConfig
+ // Load all settings from TDEConfig
ksettings.load();
// Setup log window
@@ -414,7 +414,7 @@ void KMainWidget::setupGUI()
statusBar()->insertFixedItem(i18n(" Transfers: %1 ").arg(99), ID_TOTAL_TRANSFERS);
statusBar()->insertFixedItem(i18n(" Files: %1 ").arg(555), ID_TOTAL_FILES);
statusBar()->insertFixedItem(i18n(" Size: %1 KB ").arg("134.56"), ID_TOTAL_SIZE);
- statusBar()->insertFixedItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(0)), ID_TOTAL_TIME);
+ statusBar()->insertFixedItem(i18n(" Time: %1 ").arg(TDEIO::convertSeconds(0)), ID_TOTAL_TIME);
statusBar()->insertFixedItem(i18n(" %1 KB/s ").arg("123.34"), ID_TOTAL_SPEED);
setAutoSaveSettings( "MainWindow", false /*Settings takes care of size & pos & state */ );
@@ -548,9 +548,9 @@ void KMainWidget::slotImportTextFile()
if (!filename.isValid())
return;
- if (KIO::NetAccess::download(filename, tmpFile, this)) {
+ if (TDEIO::NetAccess::download(filename, tmpFile, this)) {
list = kFileToString(tmpFile);
- KIO::NetAccess::removeTempFile(tmpFile);
+ TDEIO::NetAccess::removeTempFile(tmpFile);
} else
list = kFileToString(filename.path()); // file not accessible -> give error message
@@ -1112,7 +1112,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
}
//check if destination already exists
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
{
if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
@@ -1135,7 +1135,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
{
// simply delete it, the calling process should have asked if you
// really want to delete (at least khtml does)
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
SafeDelete::deleteFile( destURL );
}
@@ -1190,7 +1190,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
{
destURL.adjustPath( +1 );
destURL.setFileName( fileName );
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
{
if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
@@ -1249,7 +1249,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
bool skip_all = false;
bool overwrite_all = false;
it = urls.begin();
- KIO::RenameDlg_Result result;
+ TDEIO::RenameDlg_Result result;
while ( it != urls.end() )
{
@@ -1266,32 +1266,32 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
(*it).dest.setFileName( fileName );
- if( KIO::NetAccess::exists((*it).dest, false, this))
+ if( TDEIO::NetAccess::exists((*it).dest, false, this))
{
TQString newdest;
if (skip_all)
- result = KIO::R_SKIP;
+ result = TDEIO::R_SKIP;
else if( overwrite_all )
- result = KIO::R_OVERWRITE;
+ result = TDEIO::R_OVERWRITE;
else
{
TQFileInfo finfo( (*it).dest.path() );
TQString caption = i18n( "File Already exists" ) + " - KGet";
- result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
+ result = TDEIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), TDEIO::RenameDlg_Mode(TDEIO::M_OVERWRITE|TDEIO::M_SKIP|TDEIO::M_MULTI), newdest, (TDEIO::filesize_t) -1, (TDEIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
}
switch (result)
{
- case KIO::R_RENAME:
+ case TDEIO::R_RENAME:
(*it).dest = KURL::fromPathOrURL( newdest );
break;
- case KIO::R_OVERWRITE_ALL:
+ case TDEIO::R_OVERWRITE_ALL:
overwrite_all = true; //fall through
- case KIO::R_OVERWRITE:
+ case TDEIO::R_OVERWRITE:
urlsToDelete.append( (*it).dest );
break;
- case KIO::R_AUTO_SKIP:
+ case TDEIO::R_AUTO_SKIP:
skip_all = true;
- case KIO::R_SKIP: //fall through
+ case TDEIO::R_SKIP: //fall through
it = urls.erase( it );
continue;
break;
@@ -1300,7 +1300,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
}
if ( !dir_accepted )
break;
- } // if(KIO::NetAccess::exists
+ } // if(TDEIO::NetAccess::exists
++it;
} // while ( it != urls.end() )
} // while ( !dir_accepted )
@@ -1921,7 +1921,7 @@ void KMainWidget::slotKonquerorIntegration()
bool bIsKonquiEnable=!ksettings.b_KonquerorIntegration;
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
- KConfig cfg("konquerorrc", false, false);
+ TDEConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
@@ -2147,7 +2147,7 @@ void KMainWidget::updateStatusBar()
TQString tmpstr;
int totalFiles = 0;
- KIO::filesize_t totalSize = 0;
+ TDEIO::filesize_t totalSize = 0;
int totalSpeed = 0;
unsigned int remTime = 0;
@@ -2168,9 +2168,9 @@ void KMainWidget::updateStatusBar()
statusBar()->changeItem(i18n(" Transfers: %1 ").arg(myTransferList->childCount()), ID_TOTAL_TRANSFERS);
statusBar()->changeItem(i18n(" Files: %1 ").arg(totalFiles), ID_TOTAL_FILES);
- statusBar()->changeItem(i18n(" Size: %1 ").arg(KIO::convertSize(totalSize)), ID_TOTAL_SIZE);
- statusBar()->changeItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(remTime)), ID_TOTAL_TIME);
- statusBar()->changeItem(i18n(" %1/s ").arg(KIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
+ statusBar()->changeItem(i18n(" Size: %1 ").arg(TDEIO::convertSize(totalSize)), ID_TOTAL_SIZE);
+ statusBar()->changeItem(i18n(" Time: %1 ").arg(TDEIO::convertSeconds(remTime)), ID_TOTAL_TIME);
+ statusBar()->changeItem(i18n(" %1/s ").arg(TDEIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
//update size for each statusbar field
statusBar()->setItemFixed(ID_TOTAL_TRANSFERS, -1);
statusBar()->setItemFixed(ID_TOTAL_FILES, -1);
@@ -2181,9 +2181,9 @@ void KMainWidget::updateStatusBar()
if (kdock) {
tmpstr = i18n("<b>Transfers:</b> %1 ").arg(myTransferList->childCount()) +
i18n("<br /><b>Files:</b> %1 ").arg(totalFiles) +
- i18n("<br /><b>Size:</b> %1 ").arg(KIO::convertSize(totalSize)) +
- i18n("<br /><b>Time:</b> %1 ").arg(KIO::convertSeconds(remTime)) +
- i18n("<br /><b>Speed:</b> %1/s").arg(KIO::convertSize(totalSpeed));
+ i18n("<br /><b>Size:</b> %1 ").arg(TDEIO::convertSize(totalSize)) +
+ i18n("<br /><b>Time:</b> %1 ").arg(TDEIO::convertSeconds(remTime)) +
+ i18n("<br /><b>Speed:</b> %1/s").arg(TDEIO::convertSize(totalSpeed));
kdock->updateToolTip( tmpstr );
//trayicon changes if download is in progress
if (totalSpeed == 0)