diff options
author | Timothy Pearson <[email protected]> | 2013-01-24 13:47:22 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-24 13:47:22 -0600 |
commit | 28edc0aa2ab09297288186f5bc15765eb7be58c0 (patch) | |
tree | 7b7a01768b3781763186c825af21bb14717d2c32 /kio/kfile | |
parent | 07c48c43ff72c237e4028154f4594102b798073f (diff) | |
download | tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.tar.gz tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'kio/kfile')
28 files changed, 107 insertions, 107 deletions
diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp index 30513bbf3..1c762bfb9 100644 --- a/kio/kfile/kcustommenueditor.cpp +++ b/kio/kfile/kcustommenueditor.cpp @@ -60,7 +60,7 @@ public: // to accelators, replace them with two ampersands. serviceName.replace("&", "&&"); - TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, + TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, 0, KIcon::DefaultState, 0L, true); // make sure they are not larger than 16x16 @@ -164,7 +164,7 @@ KCustomMenuEditor::save(KConfigBase *cfg) { i++; TQString path = item->s->desktopEntryPath(); - if (TQDir::isRelativePath(path) || TQDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path))) + if (TQDir::isRelativePath(path) || TQDir::isRelativePath(TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path))) path = item->s->desktopEntryName(); cfg->writePathEntry(TQString("Item%1").arg(i), path); item = (Item *) item->nextSibling(); diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index f9e2d237c..0f2e9f4e1 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -812,7 +812,7 @@ bool KDirOperator::checkPreviewSupport() KToggleAction *previewAction = static_cast<KToggleAction*>( myActionCollection->action( "preview" )); bool hasPreviewSupport = false; - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver cs( kc, ConfigGroup ); if ( kc->readBoolEntry( "Show Default Preview", true ) ) hasPreviewSupport = checkPreviewInternal(); @@ -1385,7 +1385,7 @@ void KDirOperator::setupMenu(int whichActions) actionMenu->insert( mkdirAction ); if (currUrl.isLocalFile() && !(TDEApplication::keyboardMouseState() & TQt::ShiftButton)) actionMenu->insert( myActionCollection->action( "trash" ) ); - KConfig *globalconfig = KGlobal::config(); + KConfig *globalconfig = TDEGlobal::config(); KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); if (!currUrl.isLocalFile() || (TDEApplication::keyboardMouseState() & TQt::ShiftButton) || globalconfig->readBoolEntry("ShowDeleteCommand", false)) diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h index 85bcf9187..e644f7b98 100644 --- a/kio/kfile/kdiroperator.h +++ b/kio/kfile/kdiroperator.h @@ -82,7 +82,7 @@ namespace KIO { * connect(op, TQT_SIGNAL(finishedLoading()), * TQT_SLOT(slotLoadingFinished())); * - * op->readConfig( KGlobal::config(), "Your KDiroperator ConfigGroup" ); + * op->readConfig( TDEGlobal::config(), "Your KDiroperator ConfigGroup" ); * op->setView(KFile::Default); * \endcode * @@ -400,7 +400,7 @@ class KIO_EXPORT KDirOperator : public TQWidget * instantiation can make use of it already. * * Note that KDirOperator does NOT take ownership of that object (typically - * it's KGlobal::config() anyway. + * it's TDEGlobal::config() anyway. * * @see viewConfig * @see viewConfigGroup diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index 4a3613b98..8f8a8b299 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -133,7 +133,7 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, if ( localOnly && !d->startURL.isLocalFile() ) { d->startURL = KURL(); - TQString docPath = KGlobalSettings::documentPath(); + TQString docPath = TDEGlobalSettings::documentPath(); if (TQDir(docPath).exists()) d->startURL.setPath( docPath ); else @@ -146,7 +146,7 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, d->branch = createBranch( root ); - readConfig( KGlobal::config(), "DirSelect Dialog" ); + readConfig( TDEGlobal::config(), "DirSelect Dialog" ); m_mainLayout->addWidget( m_treeView, 1 ); m_mainLayout->addWidget( d->urlCombo, 0 ); @@ -314,7 +314,7 @@ void KDirSelectDialog::accept() KFileDialog::setStartDir( url() ); KDialogBase::accept(); - saveConfig( KGlobal::config(), "DirSelect Dialog" ); + saveConfig( TDEGlobal::config(), "DirSelect Dialog" ); } diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp index 86dfc756d..3ab42817b 100644 --- a/kio/kfile/kdirsize.cpp +++ b/kio/kfile/kdirsize.cpp @@ -79,8 +79,8 @@ void KDirSize::startNextJob( const KURL & url ) void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) { - static const TQString& dot = KGlobal::staticQString( "." ); - static const TQString& dotdot = KGlobal::staticQString( ".." ); + static const TQString& dot = TDEGlobal::staticQString( "." ); + static const TQString& dotdot = TDEGlobal::staticQString( ".." ); KIO::UDSEntryListConstIterator it = list.begin(); KIO::UDSEntryListConstIterator end = list.end(); for (; it != end; ++it) { diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 1e9d3a130..21338c058 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -46,11 +46,11 @@ KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name) : TQObject(parent,name) { - dfProc = new KProcess(); TQ_CHECK_PTR(dfProc); + dfProc = new TDEProcess(); TQ_CHECK_PTR(dfProc); dfProc->setEnvironment("LANGUAGE", "C"); - connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ), - this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) ); - connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ), + connect( dfProc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int) ), + this, TQT_SLOT (receivedDFStdErrOut(TDEProcess *, char *, int)) ); + connect(dfProc,TQT_SIGNAL(processExited(TDEProcess *) ), this, TQT_SLOT(dfDone() ) ); readingDFStdErrOut=false; @@ -68,7 +68,7 @@ KDiskFreeSp::~KDiskFreeSp() /*************************************************************************** * is called, when the df-command writes on StdOut **/ -void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len) +void KDiskFreeSp::receivedDFStdErrOut(TDEProcess *, char *data, int len) { TQCString tmp(data,len+1); // adds a zero-byte dfStringErrOut.append(tmp); @@ -85,7 +85,7 @@ int KDiskFreeSp::readDF( const TQString & mountPoint ) dfStringErrOut=""; // yet no data received dfProc->clearArguments(); (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS); - if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput )) + if (!dfProc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput )) kdError() << "could not execute ["<< DF_COMMAND << "]" << endl; return 1; } diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h index b7286f2df..7b9fc6238 100644 --- a/kio/kfile/kdiskfreesp.h +++ b/kio/kfile/kdiskfreesp.h @@ -31,7 +31,7 @@ #include <tdelibs_export.h> -class KProcess; +class TDEProcess; /** * This class parses the output of "df" to find the disk usage @@ -72,11 +72,11 @@ signals: void done(); private slots: - void receivedDFStdErrOut(KProcess *, char *data, int len); + void receivedDFStdErrOut(TDEProcess *, char *data, int len); void dfDone(); private: - KProcess *dfProc; + TDEProcess *dfProc; TQCString dfStringErrOut; TQString m_mountPoint; bool readingDFStdErrOut; diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp index 396006504..183023cf5 100644 --- a/kio/kfile/kencodingfiledialog.cpp +++ b/kio/kfile/kencodingfiledialog.cpp @@ -54,14 +54,14 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin d->encoding->clear (); TQString sEncoding = encoding; if (sEncoding.isEmpty()) - sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); + sEncoding = TQString::fromLatin1(TDEGlobal::locale()->encoding()); - TQStringList encodings (KGlobal::charsets()->availableEncodingNames()); + TQStringList encodings (TDEGlobal::charsets()->availableEncodingNames()); int insert = 0; for (uint i=0; i < encodings.count(); i++) { bool found = false; - TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found); + TQTextCodec *codecForEnc = TDEGlobal::charsets()->codecForName(encodings[i], found); if (found) { diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp index 823714396..1bc6f6257 100644 --- a/kio/kfile/kfiledetailview.cpp +++ b/kio/kfile/kfiledetailview.cpp @@ -234,7 +234,7 @@ void KFileDetailView::selected( TQListViewItem *item ) if ( !item ) return; - if ( KGlobalSettings::singleClick() ) { + if ( TDEGlobalSettings::singleClick() ) { const KFileItem *fi = ( (KFileListViewItem*)item )->fileInfo(); if ( fi && (fi->isDir() || !onlyDoubleClickSelectsFiles()) ) sig->activate( fi ); @@ -671,7 +671,7 @@ void KFileListViewItem::init() KFileListViewItem::setPixmap( COL_NAME, inf->pixmap(KIcon::SizeSmall)); setText( COL_NAME, inf->text() ); - setText( COL_SIZE, KGlobal::locale()->formatNumber( inf->size(), 0)); + setText( COL_SIZE, TDEGlobal::locale()->formatNumber( inf->size(), 0)); setText( COL_DATE, inf->timeString() ); setText( COL_PERM, inf->permissionsString() ); setText( COL_OWNER, inf->user() ); diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 1decc462e..5e1634144 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -185,7 +185,7 @@ KFileDialog::~KFileDialog() { hide(); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); if (d->urlBar) d->urlBar->save( config ); @@ -672,7 +672,7 @@ void KFileDialog::accept() locationEdit->insertItem( file, 1 ); } - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setForceGlobal( true ); writeConfig( config, ConfigGroup ); config->setForceGlobal( false ); @@ -751,7 +751,7 @@ void KFileDialog::multiSelectionChanged() return; } - static const TQString &begin = KGlobal::staticQString(" \""); + static const TQString &begin = TDEGlobal::staticQString(" \""); KFileItemListIterator it ( *list ); TQString text; while ( (item = it.current()) ) { @@ -857,7 +857,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge text ); KURL docPath; - docPath.setPath( KGlobalSettings::documentPath() ); + docPath.setPath( TDEGlobalSettings::documentPath() ); if ( (u.path(+1) != docPath.path(+1)) && TQDir(docPath.path(+1)).exists() ) { @@ -867,7 +867,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge text ); } - u.setPath( KGlobalSettings::desktopPath() ); + u.setPath( TDEGlobalSettings::desktopPath() ); text = i18n("Desktop: %1").arg( u.path( +1 ) ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), @@ -1038,7 +1038,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge initGUI(); // activate GM - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); readRecentFiles( config ); adjustSize(); @@ -1474,7 +1474,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const d->urlList.clear(); if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename - static const TQString &prot = KGlobal::staticQString(":/"); + static const TQString &prot = TDEGlobal::staticQString(":/"); KURL u; if ( d->filenames.find( prot ) != -1 ) u = d->filenames; @@ -1717,16 +1717,16 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group ) autoDirectoryFollowing = kc->readBoolEntry( AutoDirectoryFollowing, DefaultDirectoryFollowing ); - KGlobalSettings::Completion cm = (KGlobalSettings::Completion) + TDEGlobalSettings::Completion cm = (TDEGlobalSettings::Completion) kc->readNumEntry( PathComboCompletionMode, - KGlobalSettings::completionMode() ); - if ( cm != KGlobalSettings::completionMode() ) + TDEGlobalSettings::completionMode() ); + if ( cm != TDEGlobalSettings::completionMode() ) combo->setCompletionMode( cm ); - cm = (KGlobalSettings::Completion) + cm = (TDEGlobalSettings::Completion) kc->readNumEntry( LocationComboCompletionMode, - KGlobalSettings::completionMode() ); - if ( cm != KGlobalSettings::completionMode() ) + TDEGlobalSettings::completionMode() ); + if ( cm != TDEGlobalSettings::completionMode() ) locationEdit->setCompletionMode( cm ); // show or don't show the speedbar @@ -1816,7 +1816,7 @@ void KFileDialog::slotCancel() ops->close(); KDialogBase::slotCancel(); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setForceGlobal( true ); writeConfig( config, ConfigGroup ); config->setForceGlobal( false ); @@ -2332,7 +2332,7 @@ KURL KFileDialog::getStartURL( const TQString& startDir, if ( useDefaultStartDir ) { if (lastDirectory->isEmpty()) { - lastDirectory->setPath(KGlobalSettings::documentPath()); + lastDirectory->setPath(TDEGlobalSettings::documentPath()); KURL home; home.setPath( TQDir::homeDirPath() ); // if there is no docpath set (== home dir), we prefer the current diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index 10b8285c1..a9882d56f 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -365,7 +365,7 @@ void KFileIconView::selected( TQIconViewItem *item ) if ( !item || (TDEApplication::keyboardMouseState() & (ShiftButton | ControlButton)) != 0 ) return; - if ( KGlobalSettings::singleClick() ) { + if ( TDEGlobalSettings::singleClick() ) { const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); if ( fi && (fi->isDir() || !onlyDoubleClickSelectsFiles()) ) sig->activate( fi ); @@ -547,7 +547,7 @@ void KFileIconView::slotLargeRows() // setIconSize() all call arrangeItemsInGrid() :( Prevent this. d->noArrangement = true; // stop arrangeItemsInGrid()! - setGridX( KGlobal::iconLoader()->currentSize( KIcon::Desktop ) + 50 ); + setGridX( TDEGlobal::iconLoader()->currentSize( KIcon::Desktop ) + 50 ); setItemTextPos( Bottom ); setArrangement( LeftToRight ); setWordWrapIconText( true ); diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp index 0a2798ae6..e9b4c2673 100644 --- a/kio/kfile/kfilesharedlg.cpp +++ b/kio/kfile/kfilesharedlg.cpp @@ -45,7 +45,7 @@ class KFileSharePropsPlugin::Private { public: TQVBox *m_vBox; - KProcess *m_configProc; + TDEProcess *m_configProc; bool m_bAllShared; bool m_bAllUnshared; bool m_bAllReadOnly; @@ -86,7 +86,7 @@ bool KFileSharePropsPlugin::supports( const KFileItemList& items ) if ( !(*it)->isDir() || !isLocal ) return false; // And sharing the trash doesn't make sense - if ( isLocal && (*it)->url().path( 1 ) == KGlobalSettings::trashPath() ) + if ( isLocal && (*it)->url().path( 1 ) == TDEGlobalSettings::trashPath() ) return false; } return true; @@ -236,15 +236,15 @@ void KFileSharePropsPlugin::slotConfigureFileSharing() { if (d->m_configProc) return; - d->m_configProc = new KProcess(this); + d->m_configProc = new TDEProcess(this); (*d->m_configProc) << KStandardDirs::findExe("tdesu") << locate("exe", "kcmshell") << "fileshare"; - if (!d->m_configProc->start( KProcess::NotifyOnExit )) + if (!d->m_configProc->start( TDEProcess::NotifyOnExit )) { delete d->m_configProc; d->m_configProc = 0; return; } - connect(d->m_configProc, TQT_SIGNAL(processExited(KProcess *)), + connect(d->m_configProc, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotConfigureFileSharingDone())); m_pbConfig->setEnabled(false); } diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp index 154009625..9ab3b8ee5 100644 --- a/kio/kfile/kfilespeedbar.cpp +++ b/kio/kfile/kfilespeedbar.cpp @@ -35,24 +35,24 @@ KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name ) : KURLBar( true, parent, name ) { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver cs( config, ConfigGroup ); m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", true ); setIconSize(KIcon::SizeSmallMedium); - readConfig( KGlobal::config(), "KFileDialog Speedbar" ); + readConfig( TDEGlobal::config(), "KFileDialog Speedbar" ); if ( m_initializeSpeedbar ) { KURL u; - u.setPath( KGlobalSettings::desktopPath() ); + u.setPath( TDEGlobalSettings::desktopPath() ); insertItem( u, i18n("Desktop"), false ); //TODO: win32 - if ((KGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) && - TQDir(KGlobalSettings::documentPath()).exists()) + if ((TDEGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) && + TQDir(TDEGlobalSettings::documentPath()).exists()) { - u.setPath( KGlobalSettings::documentPath() ); + u.setPath( TDEGlobalSettings::documentPath() ); insertItem( u, i18n("Documents"), false, "folder_txt" ); } diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp index 165801652..b32746aa6 100644 --- a/kio/kfile/kfileview.cpp +++ b/kio/kfile/kfileview.cpp @@ -171,7 +171,7 @@ void KFileView::sortReversed() #if 0 int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const { - static const TQString &dirup = KGlobal::staticQString(".."); + static const TQString &dirup = TDEGlobal::staticQString(".."); bool bigger = true; bool keepFirst = false; bool dirsFirst = ((m_sorting & TQDir::DirsFirst) == TQDir::DirsFirst); diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 3d0b6be8f..dfbf47d0d 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -241,7 +241,7 @@ KIconDialog::KIconDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) { d = new KIconDialogPrivate; - mpLoader = KGlobal::iconLoader(); + mpLoader = TDEGlobal::iconLoader(); init(); } @@ -259,7 +259,7 @@ void KIconDialog::init() mGroupOrSize = KIcon::Desktop; mContext = KIcon::Any; mType = 0; - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); + mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); TQWidget *main = new TQWidget( this ); setMainWidget(main); @@ -660,7 +660,7 @@ class KIconButton::KIconButtonPrivate KIconButton::KIconButton(TQWidget *parent, const char *name) : TQPushButton(parent, name) { - init( KGlobal::iconLoader() ); + init( TDEGlobal::iconLoader() ); } KIconButton::KIconButton(KIconLoader *loader, diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp index 2d9f7881a..c55acaf9e 100644 --- a/kio/kfile/kimagefilepreview.cpp +++ b/kio/kfile/kimagefilepreview.cpp @@ -35,7 +35,7 @@ KImageFilePreview::KImageFilePreview( TQWidget *parent ) : KPreviewWidgetBase( parent ), m_job( 0L ) { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver cs( config, ConfigGroup ); autoMode = config->readBoolEntry( "Automatic Preview", true ); @@ -70,7 +70,7 @@ KImageFilePreview::~KImageFilePreview() if ( m_job ) m_job->kill(); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver cs( config, ConfigGroup ); config->writeEntry( "Automatic Preview", autoPreview->isChecked() ); } diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp index d82c4523b..c349693e5 100644 --- a/kio/kfile/kmetaprops.cpp +++ b/kio/kfile/kmetaprops.cpp @@ -250,7 +250,7 @@ bool KFileMetaPropsPlugin::supports( KFileItemList _items ) if (KExecPropsPlugin::supports(_items) || KURLPropsPlugin::supports(_items)) return false; // Having both is redundant. - bool metaDataEnabled = KGlobalSettings::showFilePreview(_items.first()->url()); + bool metaDataEnabled = TDEGlobalSettings::showFilePreview(_items.first()->url()); return _items.count() == 1 && metaDataEnabled; } diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index ebaadaa76..69d7be4e8 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -864,8 +864,8 @@ void KNotifyWidget::openSoundDialog( KURLRequester *requester ) // find the first "sound"-resource that contains files const Application *app = currentEvent()->application(); TQStringList soundDirs = - KGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); - soundDirs += KGlobal::dirs()->resourceDirs( "sound" ); + TDEGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); + soundDirs += TDEGlobal::dirs()->resourceDirs( "sound" ); if ( !soundDirs.isEmpty() ) { KURL soundURL; @@ -920,8 +920,8 @@ void KNotifyWidget::playSound() // find the first "sound"-resource that contains files const Application *app = currentEvent()->application(); - TQStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); - soundDirs += KGlobal::dirs()->resourceDirs( "sound" ); + TQStringList soundDirs = TDEGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); + soundDirs += TDEGlobal::dirs()->resourceDirs( "sound" ); if ( !soundDirs.isEmpty() ) { TQDir dir; diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h index 1f758a01b..ef5d356fd 100644 --- a/kio/kfile/knotifydialog.h +++ b/kio/kfile/knotifydialog.h @@ -71,7 +71,7 @@ public: KNotifyDialog( TQWidget *parent = 0, const char *name = 0, bool modal = true, const TDEAboutData *aboutData = - KGlobal::instance()->aboutData() ); + TDEGlobal::instance()->aboutData() ); /** * Destroys the KNotifyDialog */ @@ -88,7 +88,7 @@ public: * @return The value of TQDialog::exec() */ static int configure( TQWidget *parent = 0, const char *name = 0, - const TDEAboutData *aboutData = KGlobal::instance()->aboutData() ); + const TDEAboutData *aboutData = TDEGlobal::instance()->aboutData() ); /** * With this method, you can add the KNotify events of one eventsrc diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index c8623ced2..9a3fcabd1 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -171,7 +171,7 @@ bool TDEApplicationTree::isDirSel() static TQPixmap appIcon(const TQString &iconName) { - TQPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true); + TQPixmap normal = TDEGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true); // make sure they are not larger than 20x20 if (normal.width() > 20 || normal.height() > 20) { @@ -412,13 +412,13 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // init the history combo and insert it into the URL-Requester KHistoryCombo *combo = new KHistoryCombo(); combo->setDuplicatesEnabled( false ); - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), - KGlobalSettings::completionMode()); - combo->setCompletionMode((KGlobalSettings::Completion)mode); + TDEGlobalSettings::completionMode()); + combo->setCompletionMode((TDEGlobalSettings::Completion)mode); TQStringList list = kc->readListEntry( TQString::fromLatin1("History") ); combo->setHistoryItems( list, true ); edit = new KURLRequester( combo, this ); @@ -483,7 +483,7 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // check to see if we use konsole if not disable the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); if (bReadOnly || preferredTerminal != "konsole") @@ -666,7 +666,7 @@ void KOpenWithDlg::slotOK() if (terminal->isChecked()) { - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); m_command = preferredTerminal; // only add --noclose when we are sure it is konsole we're using @@ -813,7 +813,7 @@ void KOpenWithDlg::accept() if ( combo ) { combo->addToHistory( edit->url() ); - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); kc->writeEntry(TQString::fromLatin1("CompletionMode"), diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp index 9fd91cc7b..3672f4387 100644 --- a/kio/kfile/kpreviewprops.cpp +++ b/kio/kfile/kpreviewprops.cpp @@ -66,7 +66,7 @@ bool KPreviewPropsPlugin::supports( KFileItemList _items ) { if ( _items.count() != 1) return false; - if( !KGlobalSettings::showFilePreview(_items.first()->url())) + if( !TDEGlobalSettings::showFilePreview(_items.first()->url())) return false; KMimeType::Ptr mt = KMimeType::findByURL( _items.first()->url() ); if ( mt->inherits("inode/directory") || mt->name() == "application/octet-stream" ) diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index a1076c134..94b95a2b6 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -885,7 +885,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) TQLabel *iconLabel = new TQLabel( d->m_frame ); int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin); iconLabel->setFixedSize(bsize, bsize); - iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); + iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconArea = iconLabel; } grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft); @@ -1041,7 +1041,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addWidget(l, curRow, 0); dt.setTime_t( tim ); - l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame ); + l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); grid->addWidget(l, curRow++, 2); } @@ -1052,7 +1052,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addWidget(l, curRow, 0); dt.setTime_t( tim ); - l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame ); + l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); grid->addWidget(l, curRow++, 2); } @@ -1063,7 +1063,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addWidget(l, curRow, 0); dt.setTime_t( tim ); - l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame ); + l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); grid->addWidget(l, curRow++, 2); } } @@ -1139,7 +1139,7 @@ void KFilePropsPlugin::slotEditFileType() TQString keditfiletype = TQString::fromLatin1("keditfiletype"); KRun::runCommand( keditfiletype + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId()) - + " " + KProcess::quote(mime), + + " " + TDEProcess::quote(mime), keditfiletype, keditfiletype /*unused*/); #endif } @@ -1162,16 +1162,16 @@ void KFilePropsPlugin::determineRelativePath( const TQString & path ) TQStringList dirs; if (KBindingPropsPlugin::supports(properties->items())) { - m_sRelativePath =KGlobal::dirs()->relativeLocation("mime", path); + m_sRelativePath =TDEGlobal::dirs()->relativeLocation("mime", path); if (m_sRelativePath.startsWith("/")) m_sRelativePath = TQString::null; } else { - m_sRelativePath =KGlobal::dirs()->relativeLocation("apps", path); + m_sRelativePath =TDEGlobal::dirs()->relativeLocation("apps", path); if (m_sRelativePath.startsWith("/")) { - m_sRelativePath =KGlobal::dirs()->relativeLocation("xdgdata-apps", path); + m_sRelativePath =TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path); if (m_sRelativePath.startsWith("/")) m_sRelativePath = TQString::null; else @@ -1220,7 +1220,7 @@ void KFilePropsPlugin::slotDirSizeUpdate() KIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs(); m_sizeLabel->setText( i18n("Calculating... %1 (%2)\n%3, %4") .arg(KIO::convertSize(totalSize)) - .arg(KGlobal::locale()->formatNumber(totalSize, 0)) + .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); } @@ -1236,7 +1236,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") .arg(KIO::convertSize(totalSize)) - .arg(KGlobal::locale()->formatNumber(totalSize, 0)) + .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); } @@ -1755,8 +1755,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++) kcom->addItem(TQString::fromLatin1(user->pw_name)); endpwent(); - usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto : - KGlobalSettings::CompletionNone); + usrEdit->setCompletionMode((i < maxEntries) ? TDEGlobalSettings::CompletionAuto : + TDEGlobalSettings::CompletionNone); usrEdit->setText(strOwner); gl->addWidget(usrEdit, 1, 1); connect( usrEdit, TQT_SIGNAL( textChanged( const TQString & ) ), @@ -1833,7 +1833,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr kcom->setItems(groupList); grpEdit->setCompletionObject(kcom, true); grpEdit->setAutoDeleteCompletionObject( true ); - grpEdit->setCompletionMode(KGlobalSettings::CompletionAuto); + grpEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); grpEdit->setText(strGroup); gl->addWidget(grpEdit, 2, 1); connect( grpEdit, TQT_SIGNAL( textChanged( const TQString & ) ), @@ -3402,11 +3402,11 @@ void KDesktopPropsPlugin::applyChanges() config.sync(); // KSycoca update needed? - TQString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path); + TQString sycocaPath = TDEGlobal::dirs()->relativeLocation("apps", path); bool updateNeeded = !sycocaPath.startsWith("/"); if (!updateNeeded) { - sycocaPath = KGlobal::dirs()->relativeLocation("xdgdata-apps", path); + sycocaPath = TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path); updateNeeded = !sycocaPath.startsWith("/"); } if (updateNeeded) @@ -3446,7 +3446,7 @@ void KDesktopPropsPlugin::slotAdvanced() // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); @@ -3499,7 +3499,7 @@ void KDesktopPropsPlugin::slotAdvanced() { w->suidEdit->setCompletionObject(kcom, true); w->suidEdit->setAutoDeleteCompletionObject( true ); - w->suidEdit->setCompletionMode(KGlobalSettings::CompletionAuto); + w->suidEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); } else { @@ -3672,7 +3672,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); @@ -3773,7 +3773,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) { suidEdit->setCompletionObject(kcom, true); suidEdit->setAutoDeleteCompletionObject( true ); - suidEdit->setCompletionMode(KGlobalSettings::CompletionAuto); + suidEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); } else { diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp index 22b4cd477..609668373 100644 --- a/kio/kfile/krecentdirs.cpp +++ b/kio/kfile/krecentdirs.cpp @@ -34,7 +34,7 @@ static void recentdirs_done(KConfig *config) { - if (config == KGlobal::config()) + if (config == TDEGlobal::config()) { config->sync(); } @@ -57,14 +57,14 @@ static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool re else { key = key.mid(1); - config = KGlobal::config(); + config = TDEGlobal::config(); config->setGroup(TQString::fromLatin1("Recent Dirs")); } result=config->readPathListEntry(key); if (result.isEmpty()) { - result.append(KGlobalSettings::documentPath()); + result.append(TDEGlobalSettings::documentPath()); } return config; } diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index 7ad690be4..d91e7551f 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -79,14 +79,14 @@ void KRecentDocument::add(const KURL& url) void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) { - if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) + if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; TQString openStr = url.url(); openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded kdDebug(250) << "KRecentDocument::add for " << openStr << endl; - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); TQString oldGrp = config->group(); config->setGroup(TQString::fromLatin1("RecentDocuments")); bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); @@ -169,7 +169,7 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); } diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index ee79b4e58..1d2cf1547 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -142,7 +142,7 @@ void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group ) if ( icon.isEmpty() ) m_pixmap = KMimeType::pixmapForURL( m_url, 0, group, iconSize() ); else - m_pixmap = KGlobal::iconLoader()->loadIcon( icon, group, iconSize(), + m_pixmap = TDEGlobal::iconLoader()->loadIcon( icon, group, iconSize(), KIcon::DefaultState ); } @@ -585,7 +585,7 @@ void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup ) m_iconSize = appConfig->readNumEntry( "Speedbar IconSize", m_iconSize ); if ( m_useGlobal ) { // read global items - KConfig *globalConfig = KGlobal::config(); + KConfig *globalConfig = TDEGlobal::config(); KConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)")); int num = globalConfig->readNumEntry( "Number of Entries" ); for ( int i = 0; i < num; i++ ) { @@ -977,10 +977,10 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url, if ( allowGlobal ) { TQString appName; - if ( KGlobal::instance()->aboutData() ) - appName = KGlobal::instance()->aboutData()->programName(); + if ( TDEGlobal::instance()->aboutData() ) + appName = TDEGlobal::instance()->aboutData()->programName(); if ( appName.isEmpty() ) - appName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); + appName = TQString::fromLatin1( TDEGlobal::instance()->instanceName() ); m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box ); m_appLocal->setChecked( appLocal ); TQWhatsThis::add( m_appLocal, diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index 72c7cbd07..e01be4548 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -81,7 +81,7 @@ void KURLComboBox::init( Mode mode ) TQStringList KURLComboBox::urls() const { kdDebug(250) << "::urls()" << endl; - //static const TQString &fileProt = KGlobal::staticQString("file:"); + //static const TQString &fileProt = TDEGlobal::staticQString("file:"); TQStringList list; TQString url; for ( int i = defaultList.count(); i < count(); i++ ) { diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp index e131bda3a..cf28557f8 100644 --- a/kio/kfile/tests/kfiletreeviewtest.cpp +++ b/kio/kfile/tests/kfiletreeviewtest.cpp @@ -66,7 +66,7 @@ void testFrame::showPath( const KURL &url ) { TQString fname = "TestBranch"; // url.fileName (); /* try a user icon */ - KIconLoader *loader = KGlobal::iconLoader(); + KIconLoader *loader = TDEGlobal::iconLoader(); TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small ); TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small ); diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp index f85995a61..b0ecabcc6 100644 --- a/kio/kfile/tests/kfstest.cpp +++ b/kio/kfile/tests/kfstest.cpp @@ -57,7 +57,7 @@ int main(int argc, char **argv) if (argv1 == TQString::fromLatin1("diroperator")) { KDirOperator *op = new KDirOperator(startDir, 0, "operator"); - op->setViewConfig( KGlobal::config(), "TestGroup" ); + op->setViewConfig( TDEGlobal::config(), "TestGroup" ); op->setView(KFile::Simple); op->show(); a.setMainWidget(op); |