From 28edc0aa2ab09297288186f5bc15765eb7be58c0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:47:22 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- tdecore/AUTHORS | 2 +- tdecore/README.exec | 6 +- tdecore/README.kstartupinfo | 2 +- tdecore/kaboutdata.cpp | 2 +- tdecore/kaccel.h | 6 +- tdecore/kaccelaction.cpp | 10 +- tdecore/kaccelaction.h | 2 +- tdecore/kaccelbase.cpp | 4 +- tdecore/kaccelbase.h | 2 +- tdecore/kappdcopiface.cpp | 2 +- tdecore/kapplication.cpp | 102 ++++----- tdecore/kapplication.h | 10 +- tdecore/kapplication_win.cpp | 4 +- tdecore/kcalendarsystem.cpp | 2 +- tdecore/kcharsets.cpp | 6 +- tdecore/kcharsets.h | 6 +- tdecore/kcheckaccelerators.cpp | 8 +- tdecore/kclipboard.cpp | 34 +-- tdecore/kclipboard.h | 18 +- tdecore/kcmdlineargs.cpp | 6 +- tdecore/kcompletion.cpp | 20 +- tdecore/kcompletion.h | 32 +-- tdecore/kcompletionbase.cpp | 6 +- tdecore/kconfig.cpp | 2 +- tdecore/kconfig.h | 2 +- tdecore/kconfig_compiler/kconfig_compiler.cpp | 4 +- tdecore/kconfig_compiler/tests/test8a.cpp.ref | 4 +- tdecore/kconfig_compiler/tests/test8a.h.ref | 2 +- tdecore/kconfig_compiler/tests/test8a.kcfg | 4 +- tdecore/kconfigbackend.cpp | 18 +- tdecore/kconfigbase.cpp | 18 +- tdecore/kconfigbase.h | 2 +- tdecore/kconfigskeleton.cpp | 2 +- tdecore/kconfigskeleton.h | 4 +- tdecore/kcrash.cpp | 2 +- tdecore/kdebug.areas | 2 +- tdecore/kdebug.cpp | 16 +- tdecore/kdebug.h | 20 +- tdecore/kdesktopfile.cpp | 10 +- tdecore/kgenericfactory.h | 4 +- tdecore/kglobal.cpp | 74 +++---- tdecore/kglobal.h | 20 +- tdecore/kglobalaccel.cpp | 60 +++--- tdecore/kglobalaccel.h | 26 +-- tdecore/kglobalaccel_emb.h | 4 +- tdecore/kglobalaccel_mac.h | 4 +- tdecore/kglobalaccel_win.cpp | 46 ++-- tdecore/kglobalaccel_win.h | 8 +- tdecore/kglobalaccel_x11.cpp | 50 ++--- tdecore/kglobalaccel_x11.h | 8 +- tdecore/kglobalsettings.cpp | 240 ++++++++++----------- tdecore/kglobalsettings.h | 4 +- tdecore/kiconeffect.cpp | 14 +- tdecore/kiconloader.cpp | 44 ++-- tdecore/kiconloader.h | 28 +-- tdecore/kicontheme.cpp | 16 +- tdecore/kinstance.cpp | 26 +-- tdecore/kinstance.h | 2 +- tdecore/kkeyserver_x11.cpp | 12 +- tdecore/klibloader.h | 4 +- tdecore/klocale.cpp | 32 +-- tdecore/klocale.h | 6 +- tdecore/kmimesourcefactory.h | 2 +- tdecore/kpalette.cpp | 2 +- tdecore/kprocctrl.cpp | 58 ++--- tdecore/kprocctrl.h | 26 +-- tdecore/kprocess.cpp | 148 ++++++------- tdecore/kprocess.h | 88 ++++---- tdecore/kprocio.cpp | 42 ++-- tdecore/kprocio.h | 20 +- tdecore/kpty.cpp | 14 +- tdecore/kshortcutlist.cpp | 6 +- tdecore/kshortcutlist.h | 10 +- tdecore/kshortcutmenu.cpp | 2 +- tdecore/ksimpleconfig.cpp | 2 +- tdecore/ksimpledirwatch.cpp | 2 +- tdecore/kstandarddirs.cpp | 4 +- tdecore/kstandarddirs.h | 14 +- tdecore/kstaticdeleter.h | 26 +-- tdecore/kstdaccel.cpp | 2 +- tdecore/kstringhandler.cpp | 2 +- tdecore/ksycoca.cpp | 4 +- tdecore/ktempdir.cpp | 2 +- tdecore/ktempfile.cpp | 2 +- tdecore/ktimezones.cpp | 2 +- tdecore/kurl.cpp | 6 +- tdecore/kurldrag.cpp | 6 +- tdecore/network/kresolverstandardworkers.cpp | 4 +- .../network-manager/network-manager.cpp | 2 +- tdecore/tde-config.cpp.cmake | 18 +- tdecore/tde-config.cpp.in | 18 +- tdecore/tdehardwaredevices.cpp | 38 ++-- tdecore/tdenetworkconnections.cpp | 4 +- tdecore/tests/kcalendartest.cpp | 92 ++++---- tdecore/tests/kiconloadertest.cpp | 2 +- tdecore/tests/klocaletest.cpp | 96 ++++----- tdecore/tests/kprocesstest.cpp | 48 ++--- tdecore/tests/kprocesstest.h | 10 +- tdecore/tests/kprociotest.cpp | 4 +- tdecore/tests/kprociotest.h | 4 +- tdecore/tests/kurltest.cpp | 8 +- tdecore/twin.cpp | 4 +- 102 files changed, 990 insertions(+), 990 deletions(-) (limited to 'tdecore') diff --git a/tdecore/AUTHORS b/tdecore/AUTHORS index aad1c76e9..07b7d44ef 100644 --- a/tdecore/AUTHORS +++ b/tdecore/AUTHORS @@ -37,7 +37,7 @@ Michael Will loading routine in KPixmap Christian Czezatke -KProcess class +TDEProcess class Matthias Ettrich KWM, Changes to TDEApplication and KIconLoader diff --git a/tdecore/README.exec b/tdecore/README.exec index f2065b7ad..d47c808e9 100644 --- a/tdecore/README.exec +++ b/tdecore/README.exec @@ -7,9 +7,9 @@ you should or should not use them. 1. fork + exec You never want to use this unless you have a very good reason why it is -impossible to use KProcess. +impossible to use TDEProcess. -2. KProcess +2. TDEProcess You want to use this if you need to start a new process which needs to be a child of your process, e.g. because you want to catch stdout/stderr or need @@ -20,7 +20,7 @@ off with KProcIO 3. KProcIO -Like KProcess. Unlike KProcess, this class actually makes it easy to +Like TDEProcess. Unlike TDEProcess, this class actually makes it easy to send data to and receive data from the process. 4. startServiceByDesktopPath diff --git a/tdecore/README.kstartupinfo b/tdecore/README.kstartupinfo index 91d87329f..051b1fae6 100644 --- a/tdecore/README.kstartupinfo +++ b/tdecore/README.kstartupinfo @@ -30,7 +30,7 @@ ASNs which will stay too long until a timeout ). For improving the quality of ASN and reducing the number of ASNs that don't detect when the application has started, some .desktop file entries may be helpful ( see below ). If you want to start an application in your code, prefer using KRun or -TDEApplication::startServiceByXXX() calls. Classes like KProcess don't create +TDEApplication::startServiceByXXX() calls. Classes like TDEProcess don't create ASN, so if you need to use it, you have to send it manually ( only in case ASN is useful in this case, it shouldn't be sent e.g. for system processes ). diff --git a/tdecore/kaboutdata.cpp b/tdecore/kaboutdata.cpp index 303403ef7..2add13022 100644 --- a/tdecore/kaboutdata.cpp +++ b/tdecore/kaboutdata.cpp @@ -274,7 +274,7 @@ TDEAboutData::translateInternalProgramName() const { delete[] d->mTranslatedProgramName; d->mTranslatedProgramName = 0; - if( KGlobal::locale() ) + if( TDEGlobal::locale() ) d->mTranslatedProgramName = tqstrdup( programName().utf8()); } diff --git a/tdecore/kaccel.h b/tdecore/kaccel.h index 7f24a5e73..a54c6bd2e 100644 --- a/tdecore/kaccel.h +++ b/tdecore/kaccel.h @@ -51,7 +51,7 @@ class KAccelPrivate; * has precedence over any KAccel objects created before it. * When a shortcut pressed, KAccel calls the slot to which it has been * connected. If you want to set global accelerators, independent of the window - * which has the focus, use KGlobalAccel. + * which has the focus, use TDEGlobalAccel. * * Reconfiguration of a given shortcut can be prevented by specifying * that an accelerator item is not configurable when it is inserted. A special @@ -84,7 +84,7 @@ class KAccelPrivate; * \endcode * * @short Configurable shortcut support for widgets. - * @see KGlobalAccel + * @see TDEGlobalAccel * @see KAccelShortcutList * @see KKeyChooser * @see KKeyDialog @@ -281,7 +281,7 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * Read all shortcuts from @p pConfig, or (if @p pConfig * is zero) from the application's configuration file - * KGlobal::config(). + * TDEGlobal::config(). * * The group in which the configuration is stored can be * set with setConfigGroup(). diff --git a/tdecore/kaccelaction.cpp b/tdecore/kaccelaction.cpp index 856bbefdc..0dc320a84 100644 --- a/tdecore/kaccelaction.cpp +++ b/tdecore/kaccelaction.cpp @@ -203,8 +203,8 @@ bool KAccelAction::useFourModifierKeys() { if( KAccelAction::g_bUseFourModifierKeys == -1 ) { // Read in whether to use 4 modifier keys - KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" ); - bool b = KGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false ); + KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false ); KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); } return KAccelAction::g_bUseFourModifierKeys == 1; @@ -219,8 +219,8 @@ void KAccelAction::useFourModifierKeys( bool b ) if( b && !KKeyNative::keyboardHasWinKey() ) kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n"; } - KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" ); - KGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true); + KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true); kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl; } @@ -507,7 +507,7 @@ bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig, { kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) - pConfig = KGlobal::config(); + pConfig = TDEGlobal::config(); KConfigGroupSaver cs( pConfig, sGroup ); for( uint i = 0; i < m_nSize; i++ ) { diff --git a/tdecore/kaccelaction.h b/tdecore/kaccelaction.h index 470c70559..4c7ac1840 100644 --- a/tdecore/kaccelaction.h +++ b/tdecore/kaccelaction.h @@ -65,7 +65,7 @@ class KConfigBase; * \endcode * @short An accelerator action * @see KAccel - * @see KGlobalAccel + * @see TDEGlobalAccel * @see KKeyChooser * @see KKeyDialog */ diff --git a/tdecore/kaccelbase.cpp b/tdecore/kaccelbase.cpp index 4ba4c9c3b..cb21146d2 100644 --- a/tdecore/kaccelbase.cpp +++ b/tdecore/kaccelbase.cpp @@ -63,9 +63,9 @@ KAccelBase::~KAccelBase() uint KAccelBase::actionCount() const { return m_rgActions.count(); } KAccelActions& KAccelBase::actions() { return m_rgActions; } bool KAccelBase::isEnabled() const { return m_bEnabled; } -// see KGlobalAccel::blockShortcuts() stuff - it's to temporarily block +// see TDEGlobalAccel::blockShortcuts() stuff - it's to temporarily block // all global shortcuts, so that the key grabs are released, but from the app's -// point of view the KGlobalAccel is still enabled, so KGlobalAccel needs +// point of view the TDEGlobalAccel is still enabled, so TDEGlobalAccel needs // to disable key grabbing even if enabled bool KAccelBase::isEnabledInternal() const { return isEnabled(); } diff --git a/tdecore/kaccelbase.h b/tdecore/kaccelbase.h index 082f09324..03cad863a 100644 --- a/tdecore/kaccelbase.h +++ b/tdecore/kaccelbase.h @@ -200,7 +200,7 @@ class TDECORE_EXPORT KAccelBase /** * Read all key associations from @p config, or (if @p config * is zero) from the application's configuration file - * KGlobal::config(). + * TDEGlobal::config(). * * The group in which the configuration is stored can be * set with setConfigGroup(). diff --git a/tdecore/kappdcopiface.cpp b/tdecore/kappdcopiface.cpp index e3ee63353..768a94fff 100644 --- a/tdecore/kappdcopiface.cpp +++ b/tdecore/kappdcopiface.cpp @@ -61,7 +61,7 @@ void KAppDCOPInterface::updateUserTimestamp( ulong time ) void KAppDCOPInterface::reparseConfiguration() { - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); } void KAppDCOPInterface::sendFakeKey( unsigned int keyCode) { diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index 62eb373e5..dfc3bb612 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -569,7 +569,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event) // icon() cannot be null pixmap, it'll be the "unknown" icon - so check if there is this application icon static TQPixmap* ic = NULL; if( ic == NULL ) - ic = new TQPixmap( KGlobal::iconLoader()->loadIcon( iconName(), + ic = new TQPixmap( TDEGlobal::iconLoader()->loadIcon( iconName(), KIcon::NoGroup, 0, KIcon::DefaultState, NULL, true )); if( !ic->isNull()) { @@ -841,7 +841,7 @@ public: const char* message) const { TQTranslatorMessage res; - res.setTranslation(KGlobal::locale()->translateQt(context, sourceText, message)); + res.setTranslation(TDEGlobal::locale()->translateQt(context, sourceText, message)); return res; } }; @@ -861,9 +861,9 @@ void TDEApplication::init(bool GUIenabled) } } - KProcessController::ref(); + TDEProcessController::ref(); - (void) KClipboardSynchronizer::self(); + (void) TDEClipboardSynchronizer::self(); TQApplication::setDesktopSettingsAware( false ); @@ -912,9 +912,9 @@ void TDEApplication::init(bool GUIenabled) #endif // Trigger creation of locale. - (void) KGlobal::locale(); + (void) TDEGlobal::locale(); - KConfig* config = KGlobal::config(); + KConfig* config = TDEGlobal::config(); d->actionRestrictions = config->hasGroup("KDE Action Restrictions" ) && !kde_kiosk_exception; // For brain-dead configurations where the user's local config file is not writable. // * We use kdialog to warn the user, so we better not generate warnings from @@ -945,7 +945,7 @@ void TDEApplication::init(bool GUIenabled) #endif { - TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" ); + TQStringList plugins = TDEGlobal::dirs()->resourceDirs( "qtplugins" ); TQStringList::Iterator it = plugins.begin(); while (it != plugins.end()) { addLibraryPath( *it ); @@ -977,7 +977,7 @@ void TDEApplication::init(bool GUIenabled) #ifdef Q_WS_MACX if (GUIenabled) { - TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(), + TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(), KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false ); if (!pixmap.isNull()) { TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40); @@ -1013,7 +1013,7 @@ void TDEApplication::init(bool GUIenabled) setReverseLayout( !rtl ); // install appdata resource type - KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data") + TQString::fromLatin1(name()) + '/'); pSessionConfig = 0L; bSessionManagement = true; @@ -1453,7 +1453,7 @@ void TDEApplication::startKdeinit() // Try to launch tdeinit. TQString srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit")); if (srv.isEmpty()) - srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir()); + srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"), TDEGlobal::dirs()->kfsstnd_defaultbindir()); if (srv.isEmpty()) return; if (kapp && (Tty != kapp->type())) @@ -1476,8 +1476,8 @@ void TDEApplication::dcopFailure(const TQString &msg) if (failureCount == 2) { #ifdef Q_WS_WIN - KGlobal::config()->setGroup("General"); - if (KGlobal::config()->readBoolEntry("ignoreDCOPFailures", false)) + TDEGlobal::config()->setGroup("General"); + if (TDEGlobal::config()->readBoolEntry("ignoreDCOPFailures", false)) return; #endif TQString msgStr(i18n("There was an error setting up inter-process " @@ -1581,7 +1581,7 @@ void TDEApplication::parseCommandLine( ) if (args->isSet("style")) { - TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" ); + TQStringList plugins = TDEGlobal::dirs()->resourceDirs( "qtplugins" ); TQStringList::Iterator itp = plugins.begin(); while (itp != plugins.end()) { addLibraryPath( *itp ); @@ -1736,7 +1736,7 @@ TDEApplication::~TDEApplication() // First call the static deleters and then call KLibLoader::cleanup() // The static deleters may delete libraries for which they need KLibLoader. // KLibLoader will take care of the remaining ones. - KGlobal::deleteStaticDeleters(); + TDEGlobal::deleteStaticDeleters(); KLibLoader::cleanUp(); delete smw; @@ -1745,7 +1745,7 @@ TDEApplication::~TDEApplication() delete s_DCOPClient; s_DCOPClient = 0L; - KProcessController::deref(); + TDEProcessController::deref(); #ifdef Q_WS_X11 if ( d->oldXErrorHandler != NULL ) @@ -2123,24 +2123,24 @@ bool TDEApplication::x11EventFilter( XEvent *_event ) switch (id) { case KIPC::StyleChanged: - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); kdisplaySetStyle(); break; case KIPC::ToolbarStyleChanged: - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); if (useStyles) emit toolbarAppearanceChanged(arg); break; case KIPC::PaletteChanged: - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); kdisplaySetPalette(); break; case KIPC::FontChanged: - KGlobal::config()->reparseConfiguration(); - KGlobalSettings::rereadFontSettings(); + TDEGlobal::config()->reparseConfiguration(); + TDEGlobalSettings::rereadFontSettings(); kdisplaySetFont(); break; @@ -2149,28 +2149,28 @@ bool TDEApplication::x11EventFilter( XEvent *_event ) break; case KIPC::SettingsChanged: - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); if (arg == SETTINGS_PATHS) - KGlobalSettings::rereadPathSettings(); + TDEGlobalSettings::rereadPathSettings(); else if (arg == SETTINGS_MOUSE) - KGlobalSettings::rereadMouseSettings(); + TDEGlobalSettings::rereadMouseSettings(); propagateSettings((SettingsCategory)arg); break; case KIPC::IconChanged: TQPixmapCache::clear(); - KGlobal::config()->reparseConfiguration(); - KGlobal::instance()->newIconLoader(); + TDEGlobal::config()->reparseConfiguration(); + TDEGlobal::instance()->newIconLoader(); emit updateIconLoaders(); emit iconChanged(arg); break; case KIPC::ClipboardConfigChanged: - KClipboardSynchronizer::newConfiguration(arg); + TDEClipboardSynchronizer::newConfiguration(arg); break; case KIPC::BlockShortcuts: - KGlobalAccel::blockShortcuts(arg); + TDEGlobalAccel::blockShortcuts(arg); emit kipcMessage(id, arg); // some apps may do additional things break; } @@ -2276,7 +2276,7 @@ void TDEApplication::applyGUIStyle() { if ( !useStyles ) return; - KConfigGroup pConfig (KGlobal::config(), "General"); + KConfigGroup pConfig (TDEGlobal::config(), "General"); TQString defaultStyle = KStyle::defaultStyle(); TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle); @@ -2306,8 +2306,8 @@ TQString TDEApplication::caption() const return aCaption; else // We have some about data ? - if ( KGlobal::instance()->aboutData() ) - return KGlobal::instance()->aboutData()->programName(); + if ( TDEGlobal::instance()->aboutData() ) + return TDEGlobal::instance()->aboutData()->programName(); else // Last resort : application name return name(); @@ -2339,9 +2339,9 @@ TQString TDEApplication::makeStdCaption( const TQString &userCaption, TQPalette TDEApplication::createApplicationPalette() { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "General" ); - return createApplicationPalette( config, KGlobalSettings::contrast() ); + return createApplicationPalette( config, TDEGlobalSettings::contrast() ); } TQPalette TDEApplication::createApplicationPalette( KConfig *config, int contrast_ ) @@ -2440,7 +2440,7 @@ void TDEApplication::kdisplaySetPalette() #ifdef Q_WS_MACX //Can I have this on other platforms, please!? --Sam { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "General" ); bool do_not_set_palette = FALSE; if(config->readBoolEntry("nopaletteChange", &do_not_set_palette)) @@ -2455,16 +2455,16 @@ void TDEApplication::kdisplaySetPalette() void TDEApplication::kdisplaySetFont() { - TQApplication::setFont(KGlobalSettings::generalFont(), true); - TQApplication::setFont(KGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); - TQApplication::setFont(KGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); - TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle"); + TQApplication::setFont(TDEGlobalSettings::generalFont(), true); + TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); + TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); + TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "KPopupTitle"); // "patch" standard TQStyleSheet to follow our fonts TQStyleSheet* sheet = TQStyleSheet::defaultSheet(); - sheet->item ("pre")->setFontFamily (KGlobalSettings::fixedFont().family()); - sheet->item ("code")->setFontFamily (KGlobalSettings::fixedFont().family()); - sheet->item ("tt")->setFontFamily (KGlobalSettings::fixedFont().family()); + sheet->item ("pre")->setFontFamily (TDEGlobalSettings::fixedFont().family()); + sheet->item ("code")->setFontFamily (TDEGlobalSettings::fixedFont().family()); + sheet->item ("tt")->setFontFamily (TDEGlobalSettings::fixedFont().family()); emit kdisplayFontChanged(); emit appearanceChanged(); @@ -2484,7 +2484,7 @@ void TDEApplication::kdisplaySetStyle() void TDEApplication::propagateSettings(SettingsCategory arg) { - KConfigBase* config = KGlobal::config(); + KConfigBase* config = TDEGlobal::config(); KConfigGroupSaver saver( config, "KDE" ); #ifdef QT_HAVE_MAX_IMAGE_SIZE @@ -2821,7 +2821,7 @@ void TDEApplication::invokeMailer(const TQString &_to, const TQString &_cc, cons if (config.readBoolEntry("TerminalClient", false)) { - KConfigGroup confGroup( KGlobal::config(), "General" ); + KConfigGroup confGroup( TDEGlobal::config(), "General" ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole"); command = preferredTerminal + " -e " + command; } @@ -3167,7 +3167,7 @@ TQString TDEApplication::tempSaveName( const TQString& pFilename ) const if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) ) { // Last chance: use temp dir - aAutosaveDir.setPath( KGlobal::dirs()->saveLocation("tmp") ); + aAutosaveDir.setPath( TDEGlobal::dirs()->saveLocation("tmp") ); } } @@ -3196,7 +3196,7 @@ TQString TDEApplication::checkRecoverFile( const TQString& pFilename, if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) ) { // Last chance: use temp dir - aAutosaveDir.setPath( KGlobal::dirs()->saveLocation("tmp") ); + aAutosaveDir.setPath( TDEGlobal::dirs()->saveLocation("tmp") ); } } @@ -3351,7 +3351,7 @@ bool TDEApplication::authorize(const TQString &genericAction) if (!d->actionRestrictions) return true; - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "KDE Action Restrictions" ); return config->readBoolEntry(genericAction, true); } @@ -3361,7 +3361,7 @@ bool TDEApplication::authorizeKAction(const char *action) if (!d->actionRestrictions || !action) return true; - static const TQString &action_prefix = KGlobal::staticQString( "action/" ); + static const TQString &action_prefix = TDEGlobal::staticQString( "action/" ); return authorize(action_prefix + action); } @@ -3370,14 +3370,14 @@ bool TDEApplication::authorizeControlModule(const TQString &menuId) { if (menuId.isEmpty() || kde_kiosk_exception) return true; - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); return config->readBoolEntry(menuId, true); } TQStringList TDEApplication::authorizeControlModules(const TQStringList &menuIds) { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); TQStringList result; for(TQStringList::ConstIterator it = menuIds.begin(); @@ -3426,7 +3426,7 @@ void TDEApplication::initUrlActionRestrictions() d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule ("redirect", TQString::null, TQString::null, TQString::null, "=", TQString::null, TQString::null, true)); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver( config, "KDE URL Restrictions" ); int count = config->readNumEntry("rule_count"); TQString keyFormat = TQString("rule_%1"); @@ -3457,9 +3457,9 @@ void TDEApplication::initUrlActionRestrictions() urlPath.replace(0, 1, TQDir::homeDirPath()); if (refPath.startsWith("$TMP")) - refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + refPath.replace(0, 4, TDEGlobal::dirs()->saveLocation("tmp")); if (urlPath.startsWith("$TMP")) - urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + urlPath.replace(0, 4, TDEGlobal::dirs()->saveLocation("tmp")); d->urlActionRestrictions.append(new TDEApplicationPrivate::URLActionRule ( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled)); diff --git a/tdecore/kapplication.h b/tdecore/kapplication.h index 49abf1202..f472e3351 100644 --- a/tdecore/kapplication.h +++ b/tdecore/kapplication.h @@ -662,7 +662,7 @@ public slots: /** * Broadcast a received keycode to all listening KDE applications * The primary use for this feature is to connect hotkeys such as - * XF86Display to their respective KGlobalAccel functions while + * XF86Display to their respective TDEGlobalAccel functions while * the screen is locked by kdesktop_lock. */ void broadcastKeyCode(unsigned int keyCode); @@ -1450,8 +1450,8 @@ signals: void backgroundChanged(int desk); /** - * Emitted when the global settings have been changed - see KGlobalSettings - * TDEApplication takes care of calling reparseConfiguration on KGlobal::config() + * Emitted when the global settings have been changed - see TDEGlobalSettings + * TDEApplication takes care of calling reparseConfiguration on TDEGlobal::config() * so that applications/classes using this only have to re-read the configuration * @param category the category among the enum above */ @@ -1522,7 +1522,7 @@ signals: /** * @internal - * Used to send KGlobalAccel objects a new keypress from physical hotkeys. + * Used to send TDEGlobalAccel objects a new keypress from physical hotkeys. */ void coreFakeKeyPress(unsigned int keyCode); @@ -1546,7 +1546,7 @@ private: /** - * \relates KGlobal + * \relates TDEGlobal * Check, if a file may be accessed in a given mode. * This is a wrapper around the access() system call. * checkAccess() calls access() with the given parameters. diff --git a/tdecore/kapplication_win.cpp b/tdecore/kapplication_win.cpp index e5b19a28c..f6c29be7d 100644 --- a/tdecore/kapplication_win.cpp +++ b/tdecore/kapplication_win.cpp @@ -42,8 +42,8 @@ */ void TDEApplication_init_windows(bool /*GUIenabled*/) { - TQString qt_transl_file = ::locate( "locale", KGlobal::locale()->language() - + "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" ); + TQString qt_transl_file = ::locate( "locale", TDEGlobal::locale()->language() + + "/LC_MESSAGES/qt_" + TDEGlobal::locale()->language() + ".qm" ); QTranslator *qt_transl = new QTranslator(); if (qt_transl->load( qt_transl_file, "")) kapp->installTranslator( qt_transl ); diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp index 57898da84..ab38dc4ca 100644 --- a/tdecore/kcalendarsystem.cpp +++ b/tdecore/kcalendarsystem.cpp @@ -49,7 +49,7 @@ const KLocale * KCalendarSystem::locale() const if ( d->locale ) return d->locale; - return KGlobal::locale(); + return TDEGlobal::locale(); } TQString KCalendarSystem::dayString(const TQDate & pDate, bool bShort) const diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index 52cf87849..a732bf266 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -535,7 +535,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const return codec; // cache hit, return if (n.isEmpty()) { - codec = KGlobal::locale()->codecForEncoding(); + codec = TDEGlobal::locale()->codecForEncoding(); d->codecForNameDict.replace("->locale<-", codec); return codec; } @@ -572,8 +572,8 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const TQString dir; { - KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" ); - dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps")); + KConfigGroupSaver cfgsav( TDEGlobal::config(), "i18n" ); + dir = TDEGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps")); } // these are codecs not included in Qt. They can be build up if the corresponding charmap diff --git a/tdecore/kcharsets.h b/tdecore/kcharsets.h index 2816e4fcd..da96643ff 100644 --- a/tdecore/kcharsets.h +++ b/tdecore/kcharsets.h @@ -25,7 +25,7 @@ #include #include "tdelibs_export.h" -class KGlobal; +class TDEGlobal; class KCharsetsPrivate; class TQTextCodec; @@ -42,11 +42,11 @@ class TQTextCodec; */ class TDECORE_EXPORT KCharsets { - friend class KGlobal; + friend class TDEGlobal; protected: /** Protected constructor. If you need the kcharsets object, use - KGlobal::charsets() instead. + TDEGlobal::charsets() instead. */ KCharsets(); diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index 06337485c..c245f9435 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -80,15 +80,15 @@ KCheckAccelerators::KCheckAccelerators( TQObject* parent ) : TQObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0) { parent->installEventFilter( this ); - KConfigGroupSaver saver( KGlobal::config(), "Development" ); - TQString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace(); + KConfigGroupSaver saver( TDEGlobal::config(), "Development" ); + TQString sKey = TDEGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace(); if( !sKey.isEmpty() ) { KShortcut cuts( sKey ); if( cuts.count() > 0 ) key = int(cuts.seq(0).qt()); } - alwaysShow = KGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false ); - autoCheck = KGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true ); + alwaysShow = TDEGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false ); + autoCheck = TDEGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true ); connect( &autoCheckTimer, TQT_SIGNAL( timeout()), TQT_SLOT( autoCheckSlot())); } diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index 4d77c3da2..e6d763b79 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -38,7 +38,7 @@ * especially the second one. */ -class KClipboardSynchronizer::MimeSource : public TQMimeSource +class TDEClipboardSynchronizer::MimeSource : public TQMimeSource { public: MimeSource( const TQMimeSource * src ) @@ -89,25 +89,25 @@ private: }; -KClipboardSynchronizer * KClipboardSynchronizer::s_self = 0L; -bool KClipboardSynchronizer::s_sync = false; -bool KClipboardSynchronizer::s_reverse_sync = false; -bool KClipboardSynchronizer::s_blocked = false; +TDEClipboardSynchronizer * TDEClipboardSynchronizer::s_self = 0L; +bool TDEClipboardSynchronizer::s_sync = false; +bool TDEClipboardSynchronizer::s_reverse_sync = false; +bool TDEClipboardSynchronizer::s_blocked = false; -KClipboardSynchronizer * KClipboardSynchronizer::self() +TDEClipboardSynchronizer * TDEClipboardSynchronizer::self() { if ( !s_self ) - s_self = new KClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" ); + s_self = new TDEClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" ); return s_self; } -KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *name ) +TDEClipboardSynchronizer::TDEClipboardSynchronizer( TQObject *parent, const char *name ) : TQObject( parent, name ) { s_self = this; - KConfigGroup config( KGlobal::config(), "General" ); + KConfigGroup config( TDEGlobal::config(), "General" ); s_sync = config.readBoolEntry( "SynchronizeClipboardAndSelection", s_sync); s_reverse_sync = config.readBoolEntry( "ClipboardSetSelection", s_reverse_sync ); @@ -115,13 +115,13 @@ KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *na setupSignals(); } -KClipboardSynchronizer::~KClipboardSynchronizer() +TDEClipboardSynchronizer::~TDEClipboardSynchronizer() { if ( s_self == this ) s_self = 0L; } -void KClipboardSynchronizer::setupSignals() +void TDEClipboardSynchronizer::setupSignals() { TQClipboard *clip = TQApplication::clipboard(); disconnect( clip, NULL, this, NULL ); @@ -133,7 +133,7 @@ void KClipboardSynchronizer::setupSignals() TQT_SLOT( slotClipboardChanged() )); } -void KClipboardSynchronizer::slotSelectionChanged() +void TDEClipboardSynchronizer::slotSelectionChanged() { TQClipboard *clip = TQApplication::clipboard(); @@ -145,7 +145,7 @@ void KClipboardSynchronizer::slotSelectionChanged() TQClipboard::Clipboard ); } -void KClipboardSynchronizer::slotClipboardChanged() +void TDEClipboardSynchronizer::slotClipboardChanged() { TQClipboard *clip = TQApplication::clipboard(); @@ -157,7 +157,7 @@ void KClipboardSynchronizer::slotClipboardChanged() TQClipboard::Selection ); } -void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode ) +void TDEClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode ) { // tqDebug("---> setting clipboard: %p", data); @@ -177,20 +177,20 @@ void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode s_blocked = false; } -void KClipboardSynchronizer::setSynchronizing( bool sync ) +void TDEClipboardSynchronizer::setSynchronizing( bool sync ) { s_sync = sync; self()->setupSignals(); } -void KClipboardSynchronizer::setReverseSynchronizing( bool enable ) +void TDEClipboardSynchronizer::setReverseSynchronizing( bool enable ) { s_reverse_sync = enable; self()->setupSignals(); } // private, called by TDEApplication -void KClipboardSynchronizer::newConfiguration( int config ) +void TDEClipboardSynchronizer::newConfiguration( int config ) { s_sync = (config & Synchronize); self()->setupSignals(); diff --git a/tdecore/kclipboard.h b/tdecore/kclipboard.h index c13959e61..8ed8dcc91 100644 --- a/tdecore/kclipboard.h +++ b/tdecore/kclipboard.h @@ -33,7 +33,7 @@ * @since 3.1 * @internal */ -class TDECORE_EXPORT KClipboardSynchronizer : public TQObject +class TDECORE_EXPORT TDEClipboardSynchronizer : public TQObject { Q_OBJECT @@ -43,13 +43,13 @@ public: friend class TDEApplication; /** - * Returns the KClipboardSynchronizer singleton object. - * @return the KClipboardSynchronizer singleton object. + * Returns the TDEClipboardSynchronizer singleton object. + * @return the TDEClipboardSynchronizer singleton object. */ - static KClipboardSynchronizer *self(); + static TDEClipboardSynchronizer *self(); /** - * Configures KClipboardSynchronizer to synchronize the Selection to Clipboard whenever + * Configures TDEClipboardSynchronizer to synchronize the Selection to Clipboard whenever * it changes. * * Default is false. @@ -69,7 +69,7 @@ public: } /** - * Configures KClipboardSynchronizer to copy the Clipboard buffer to the Selection + * Configures TDEClipboardSynchronizer to copy the Clipboard buffer to the Selection * buffer whenever the Clipboard changes. * * @@ -93,19 +93,19 @@ public: protected: - ~KClipboardSynchronizer(); + ~TDEClipboardSynchronizer(); private slots: void slotSelectionChanged(); void slotClipboardChanged(); private: - KClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L ); + TDEClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L ); void setupSignals(); static void setClipboard( TQMimeSource* data, TQClipboard::Mode mode ); - static KClipboardSynchronizer *s_self; + static TDEClipboardSynchronizer *s_self; static bool s_sync; static bool s_reverse_sync; static bool s_blocked; diff --git a/tdecore/kcmdlineargs.cpp b/tdecore/kcmdlineargs.cpp index 186f7e3af..b5af05f20 100644 --- a/tdecore/kcmdlineargs.cpp +++ b/tdecore/kcmdlineargs.cpp @@ -743,10 +743,10 @@ void TDECmdLineArgs::enable_i18n() { // called twice or too late - if (KGlobal::_locale) + if (TDEGlobal::_locale) return; - if (!KGlobal::_instance) { + if (!TDEGlobal::_instance) { TDEInstance *instance = new TDEInstance(about); (void) instance->config(); // Don't delete instance! @@ -756,7 +756,7 @@ TDECmdLineArgs::enable_i18n() void TDECmdLineArgs::usage(const TQString &error) { - assert(KGlobal::_locale); + assert(TDEGlobal::_locale); TQCString localError = error.local8Bit(); if (localError[error.length()-1] == '\n') localError = localError.left(error.length()-1); diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp index f74c0460c..8d1c7f0ac 100644 --- a/tdecore/kcompletion.cpp +++ b/tdecore/kcompletion.cpp @@ -42,7 +42,7 @@ KCompletion::KCompletion() { d = new KCompletionPrivate; - myCompletionMode = KGlobalSettings::completionMode(); + myCompletionMode = TDEGlobalSettings::completionMode(); myTreeRoot = new KCompTreeNode; myBeep = true; myIgnoreCase = false; @@ -188,7 +188,7 @@ void KCompletion::clear() TQString KCompletion::makeCompletion( const TQString& string ) { - if ( myCompletionMode == KGlobalSettings::CompletionNone ) + if ( myCompletionMode == TDEGlobalSettings::CompletionNone ) return TQString::null; //kdDebug(0) << "KCompletion: completing: " << string << endl; @@ -200,7 +200,7 @@ TQString KCompletion::makeCompletion( const TQString& string ) // in Shell-completion-mode, emit all matches when we get the same // complete-string twice - if ( myCompletionMode == KGlobalSettings::CompletionShell && + if ( myCompletionMode == TDEGlobalSettings::CompletionShell && string == myLastString ) { // Don't use d->matches since calling postProcessMatches() // on d->matches here would interfere with call to @@ -219,8 +219,8 @@ TQString KCompletion::makeCompletion( const TQString& string ) TQString completion; // in case-insensitive popup mode, we search all completions at once - if ( myCompletionMode == KGlobalSettings::CompletionPopup || - myCompletionMode == KGlobalSettings::CompletionPopupAuto ) { + if ( myCompletionMode == TDEGlobalSettings::CompletionPopup || + myCompletionMode == TDEGlobalSettings::CompletionPopupAuto ) { findAllCompletions( string, &d->matches, myHasMultipleMatches ); if ( !d->matches.isEmpty() ) completion = d->matches.first(); @@ -288,7 +288,7 @@ TQStringList KCompletion::substringCompletion( const TQString& string ) const } -void KCompletion::setCompletionMode( KGlobalSettings::Completion mode ) +void KCompletion::setCompletionMode( TDEGlobalSettings::Completion mode ) { myCompletionMode = mode; } @@ -442,7 +442,7 @@ TQString KCompletion::findCompletion( const TQString& string ) if ( node && node->childrenCount() > 1 ) { myHasMultipleMatches = true; - if ( myCompletionMode == KGlobalSettings::CompletionAuto ) { + if ( myCompletionMode == TDEGlobalSettings::CompletionAuto ) { myRotationIndex = 1; if (myOrder != Weighted) { while ( (node = node->firstChild()) ) { @@ -632,14 +632,14 @@ void KCompletion::doBeep( BeepMode mode ) const text = i18n("You reached the end of the list\nof matching items.\n"); break; case PartialMatch: - if ( myCompletionMode == KGlobalSettings::CompletionShell || - myCompletionMode == KGlobalSettings::CompletionMan ) { + if ( myCompletionMode == TDEGlobalSettings::CompletionShell || + myCompletionMode == TDEGlobalSettings::CompletionMan ) { event = TQString::fromLatin1("Textcompletion: partial match"); text = i18n("The completion is ambiguous, more than one\nmatch is available.\n"); } break; case NoMatch: - if ( myCompletionMode == KGlobalSettings::CompletionShell ) { + if ( myCompletionMode == TDEGlobalSettings::CompletionShell ) { event = TQString::fromLatin1("Textcompletion: no match"); text = i18n("There is no matching item available.\n"); } diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index c0ba02d34..45182bd9d 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -77,8 +77,8 @@ class TQPopupMenu; * of manual and auto-completion is therefore only visible in UI classes, * KCompletion needs to know whether to deliver partial matches * (shell completion) or whole matches (auto/manual completion), therefore - * KGlobalSettings::CompletionMan and - * KGlobalSettings::CompletionAuto have the exact same effect in + * TDEGlobalSettings::CompletionMan and + * TDEGlobalSettings::CompletionAuto have the exact same effect in * KCompletion. * * @li shell completion works like how shells complete filenames: @@ -90,7 +90,7 @@ class TQPopupMenu; * You don't have to worry much about that though, KCompletion handles * that for you, according to the setting setCompletionMode(). * The default setting is globally configured by the user and read - * from KGlobalSettings::completionMode(). + * from TDEGlobalSettings::completionMode(). * * A short example: * \code @@ -251,22 +251,22 @@ public: /** * Sets the completion mode to Auto/Manual, Shell or None. * If you don't set the mode explicitly, the global default value - * KGlobalSettings::completionMode() is used. - * KGlobalSettings::CompletionNone disables completion. + * TDEGlobalSettings::completionMode() is used. + * TDEGlobalSettings::CompletionNone disables completion. * @param mode the completion mode * @see completionMode - * @see KGlobalSettings::completionMode + * @see TDEGlobalSettings::completionMode */ - virtual void setCompletionMode( KGlobalSettings::Completion mode ); + virtual void setCompletionMode( TDEGlobalSettings::Completion mode ); /** * Return the current completion mode. - * May be different from KGlobalSettings::completionMode(), if you + * May be different from TDEGlobalSettings::completionMode(), if you * explicitly called setCompletionMode(). * @return the current completion mode * @see setCompletionMode */ - KGlobalSettings::Completion completionMode() const { + TDEGlobalSettings::Completion completionMode() const { return myCompletionMode; } @@ -570,7 +570,7 @@ private: enum BeepMode { NoMatch, PartialMatch, Rotation }; void doBeep( BeepMode ) const; - KGlobalSettings::Completion myCompletionMode; + TDEGlobalSettings::Completion myCompletionMode; CompOrder myOrder; TQString myLastString; @@ -825,7 +825,7 @@ public: * Sets the type of completion to be used. * * The completion modes supported are those defined in - * KGlobalSettings(). See below. + * TDEGlobalSettings(). See below. * * @param mode Completion type: * @li CompletionNone: Disables completion feature. @@ -841,17 +841,17 @@ public: * @li CompletionPopup: Shows all available completions at once, * in a listbox popping up. */ - virtual void setCompletionMode( KGlobalSettings::Completion mode ); + virtual void setCompletionMode( TDEGlobalSettings::Completion mode ); /** * Returns the current completion mode. * - * The return values are of type KGlobalSettings::Completion. + * The return values are of type TDEGlobalSettings::Completion. * See setCompletionMode() for details. * * @return the completion mode. */ - KGlobalSettings::Completion completionMode() const { + TDEGlobalSettings::Completion completionMode() const { return m_delegate ? m_delegate->completionMode() : m_iCompletionMode; } @@ -908,7 +908,7 @@ public: * * This method changes the values of the key bindings for * rotation and completion features to the default values - * provided in KGlobalSettings. + * provided in TDEGlobalSettings. * * NOTE: By default inheriting widgets should uses the * global key-bindings so that there will be no need to @@ -992,7 +992,7 @@ private: // Determines whether this widget fires rotation signals bool m_bEmitSignals; // Stores the completion mode locally. - KGlobalSettings::Completion m_iCompletionMode; + TDEGlobalSettings::Completion m_iCompletionMode; // Pointer to Completion object. TQGuardedPtr m_pCompObj; // Keybindings diff --git a/tdecore/kcompletionbase.cpp b/tdecore/kcompletionbase.cpp index 9e7f6d746..7589d842c 100644 --- a/tdecore/kcompletionbase.cpp +++ b/tdecore/kcompletionbase.cpp @@ -26,7 +26,7 @@ KCompletionBase::KCompletionBase() { m_delegate = 0L; // Assign the default completion type to use. - m_iCompletionMode = KGlobalSettings::completionMode(); + m_iCompletionMode = TDEGlobalSettings::completionMode(); // Initialize all key-bindings to 0 by default so that // the event filter will use the global settings. @@ -98,7 +98,7 @@ void KCompletionBase::setHandleSignals( bool handle ) m_bHandleSignals = handle; } -void KCompletionBase::setCompletionMode( KGlobalSettings::Completion mode ) +void KCompletionBase::setCompletionMode( TDEGlobalSettings::Completion mode ) { if ( m_delegate ) { m_delegate->setCompletionMode( mode ); @@ -108,7 +108,7 @@ void KCompletionBase::setCompletionMode( KGlobalSettings::Completion mode ) m_iCompletionMode = mode; // Always sync up KCompletion mode with ours as long as we // are performing completions. - if( m_pCompObj && m_iCompletionMode != KGlobalSettings::CompletionNone ) + if( m_pCompObj && m_iCompletionMode != TDEGlobalSettings::CompletionNone ) m_pCompObj->setCompletionMode( m_iCompletionMode ); } diff --git a/tdecore/kconfig.cpp b/tdecore/kconfig.cpp index 968c45d02..b8ac9d2a1 100644 --- a/tdecore/kconfig.cpp +++ b/tdecore/kconfig.cpp @@ -71,7 +71,7 @@ KConfig::KConfig( const TQString& fileName, // config object. // Since this makes only sense for config directories, addCustomized // returns true only if new config directories appeared. - if (KGlobal::dirs()->addCustomized(this)) + if (TDEGlobal::dirs()->addCustomized(this)) reparseConfiguration(); } diff --git a/tdecore/kconfig.h b/tdecore/kconfig.h index e3eb52f64..63e7be591 100644 --- a/tdecore/kconfig.h +++ b/tdecore/kconfig.h @@ -37,7 +37,7 @@ class KConfigPrivate; * This class implements KDE's default configuration system. * * @author Kalle Dalheimer , Preston Brown -* @see KGlobal::config(), KConfigBase, KSimpleConfig +* @see TDEGlobal::config(), KConfigBase, KSimpleConfig * @short KDE Configuration Management class */ class TDECORE_EXPORT KConfig : public KConfigBase diff --git a/tdecore/kconfig_compiler/kconfig_compiler.cpp b/tdecore/kconfig_compiler/kconfig_compiler.cpp index 91e8c7998..51175c528 100644 --- a/tdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/tdecore/kconfig_compiler/kconfig_compiler.cpp @@ -666,7 +666,7 @@ TQString defaultValue( const TQString &type ) { if ( type == "String" ) return "\"\""; // Use empty string, not null string! else if ( type == "StringList" ) return "TQStringList()"; - else if ( type == "Font" ) return "KGlobalSettings::generalFont()"; + else if ( type == "Font" ) return "TDEGlobalSettings::generalFont()"; else if ( type == "Rect" ) return "TQRect()"; else if ( type == "Size" ) return "TQSize()"; else if ( type == "Color" ) return "TQColor(128, 128, 128)"; @@ -1220,7 +1220,7 @@ int main( int argc, char **argv ) if ( !singleton ) { h << " " << className << "("; if (cfgFileNameArg) - h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = KGlobal::sharedConfig()" : ", "); + h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = TDEGlobal::sharedConfig()" : ", "); for (TQValueList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it) { diff --git a/tdecore/kconfig_compiler/tests/test8a.cpp.ref b/tdecore/kconfig_compiler/tests/test8a.cpp.ref index f89b7c133..413e75c9c 100644 --- a/tdecore/kconfig_compiler/tests/test8a.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test8a.cpp.ref @@ -9,10 +9,10 @@ Test8a::Test8a( KSharedConfig::Ptr config ) setCurrentGroup( TQString::fromLatin1( "Group" ) ); KConfigSkeleton::ItemFont *itemFont; - itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() ); + itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, TDEGlobalSettings::generalFont() ); addItem( itemFont, TQString::fromLatin1( "Font" ) ); KConfigSkeleton::ItemFont *itemTitleFont; - itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() ); + itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, TDEGlobalSettings::windowTitleFont() ); addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test8a.h.ref b/tdecore/kconfig_compiler/tests/test8a.h.ref index 2e947c437..0ab182a04 100644 --- a/tdecore/kconfig_compiler/tests/test8a.h.ref +++ b/tdecore/kconfig_compiler/tests/test8a.h.ref @@ -11,7 +11,7 @@ class Test8a : public KConfigSkeleton { public: - Test8a( KSharedConfig::Ptr config = KGlobal::sharedConfig() ); + Test8a( KSharedConfig::Ptr config = TDEGlobal::sharedConfig() ); ~Test8a(); /** diff --git a/tdecore/kconfig_compiler/tests/test8a.kcfg b/tdecore/kconfig_compiler/tests/test8a.kcfg index 5ee87199f..53448b624 100644 --- a/tdecore/kconfig_compiler/tests/test8a.kcfg +++ b/tdecore/kconfig_compiler/tests/test8a.kcfg @@ -7,11 +7,11 @@ - KGlobalSettings::generalFont() + TDEGlobalSettings::generalFont() - KGlobalSettings::windowTitleFont() + TDEGlobalSettings::windowTitleFont() diff --git a/tdecore/kconfigbackend.cpp b/tdecore/kconfigbackend.cpp index 492d4f494..4f217597b 100644 --- a/tdecore/kconfigbackend.cpp +++ b/tdecore/kconfigbackend.cpp @@ -254,11 +254,11 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName, mLocalFileName = mfileName; } else { - mLocalFileName = KGlobal::dirs()->saveLocation(resType, TQString(), false) + mfileName; + mLocalFileName = TDEGlobal::dirs()->saveLocation(resType, TQString(), false) + mfileName; } if (useKDEGlobals) { - mGlobalFileName = KGlobal::dirs()->saveLocation("config", TQString(), false) + TQString::fromLatin1("kdeglobals"); + mGlobalFileName = TDEGlobal::dirs()->saveLocation("config", TQString(), false) + TQString::fromLatin1("kdeglobals"); } else { mGlobalFileName = TQString::null; @@ -350,7 +350,7 @@ bool KConfigINIBackEnd::parseConfigFiles() // Parse the general config files if (useKDEGlobals) { - TQStringList kdercs = KGlobal::dirs()-> + TQStringList kdercs = TDEGlobal::dirs()-> findAllResources("config", TQString::fromLatin1("kdeglobals")); #ifdef Q_WS_WIN @@ -362,7 +362,7 @@ bool KConfigINIBackEnd::parseConfigFiles() if (checkAccess(etc_kderc, R_OK)) kdercs += etc_kderc; - kdercs += KGlobal::dirs()-> + kdercs += TDEGlobal::dirs()-> findAllResources("config", TQString::fromLatin1("system.kdeglobals")); TQStringList::ConstIterator it; @@ -383,7 +383,7 @@ bool KConfigINIBackEnd::parseConfigFiles() while(bReadFile) { bReadFile = false; TQString bootLanguage; - if (useKDEGlobals && localeString.isEmpty() && !KGlobal::_locale) { + if (useKDEGlobals && localeString.isEmpty() && !TDEGlobal::_locale) { // Boot strap language bootLanguage = KLocale::_initLanguage(pConfig); setLocaleString(bootLanguage.utf8()); @@ -394,7 +394,7 @@ bool KConfigINIBackEnd::parseConfigFiles() if ( !TQDir::isRelativePath(mfileName) ) list << mfileName; else - list = KGlobal::dirs()->findAllResources(resType, mfileName); + list = TDEGlobal::dirs()->findAllResources(resType, mfileName); TQStringList::ConstIterator it; @@ -410,7 +410,7 @@ bool KConfigINIBackEnd::parseConfigFiles() break; } } - if (KGlobal::dirs()->isRestrictedResource(resType, mfileName)) + if (TDEGlobal::dirs()->isRestrictedResource(resType, mfileName)) bFileImmutable = true; TQString currentLanguage; if (!bootLanguage.isEmpty()) @@ -1181,9 +1181,9 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser) TDEApplication *app = kapp; if (!cmdToExec.isEmpty() && app) { - KProcess lprocess; + TDEProcess lprocess; lprocess << cmdToExec << "--title" << app->instanceName() << "--msgbox" << TQCString(errorMsg.local8Bit()); - lprocess.start( KProcess::Block ); + lprocess.start( TDEProcess::Block ); } } return allWritable; diff --git a/tdecore/kconfigbase.cpp b/tdecore/kconfigbase.cpp index c5c0a4e25..e13d07782 100644 --- a/tdecore/kconfigbase.cpp +++ b/tdecore/kconfigbase.cpp @@ -63,8 +63,8 @@ void KConfigBase::setLocale() { bLocaleInitialized = true; - if (KGlobal::locale()) - aLocaleString = KGlobal::locale()->language().utf8(); + if (TDEGlobal::locale()) + aLocaleString = TDEGlobal::locale()->language().utf8(); else aLocaleString = KLocale::defaultLanguage().utf8(); if (backEnd) @@ -231,7 +231,7 @@ TQString KConfigBase::readEntry( const char *pKey, // because calling locale() will create a locale object if it // doesn't exist, which requires KConfig, which will create a infinite // loop, and nobody likes those. - if (!bLocaleInitialized && KGlobal::_locale) { + if (!bLocaleInitialized && TDEGlobal::_locale) { // get around const'ness. KConfigBase *that = const_cast(this); that->setLocale(); @@ -259,7 +259,7 @@ TQString KConfigBase::readEntry( const char *pKey, aValue = TQString::fromUtf8(aEntryData.mValue.data()); if (aValue.isNull()) { - static const TQString &emptyString = KGlobal::staticQString(""); + static const TQString &emptyString = TDEGlobal::staticQString(""); aValue = emptyString; } expand = aEntryData.bExpand; @@ -526,7 +526,7 @@ TQStringList KConfigBase::readListEntry( const TQString& pKey, char sep ) const TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const { - static const TQString& emptyString = KGlobal::staticQString(""); + static const TQString& emptyString = TDEGlobal::staticQString(""); TQStringList list; if( !hasKey( pKey ) ) @@ -1081,7 +1081,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value, if( bPersistent ) setDirty(true); - if (!bLocaleInitialized && KGlobal::locale()) + if (!bLocaleInitialized && TDEGlobal::locale()) setLocale(); KEntryKey entryKey(mGroup, pKey); @@ -1152,7 +1152,7 @@ static TQString translatePath( TQString path ) path.remove(0,1); } - // we can not use KGlobal::dirs()->relativeLocation("home", path) here, + // we can not use TDEGlobal::dirs()->relativeLocation("home", path) here, // since it would not recognize paths without a trailing '/'. // All of the 3 following functions to return the user's home directory // can return different paths. We have to test all them. @@ -1222,7 +1222,7 @@ void KConfigBase::deleteEntry( const char *pKey, // possible but minimized. setDirty(true); - if (!bLocaleInitialized && KGlobal::locale()) + if (!bLocaleInitialized && TDEGlobal::locale()) setLocale(); KEntryKey entryKey(mGroup, pKey); @@ -1750,7 +1750,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime, void KConfigBase::parseConfigFiles() { - if (!bLocaleInitialized && KGlobal::_locale) { + if (!bLocaleInitialized && TDEGlobal::_locale) { setLocale(); } if (backEnd) diff --git a/tdecore/kconfigbase.h b/tdecore/kconfigbase.h index 600bceb69..1818aadb5 100644 --- a/tdecore/kconfigbase.h +++ b/tdecore/kconfigbase.h @@ -62,7 +62,7 @@ class KConfigGroup; * a group name. * * @author Kalle Dalheimer , Preston Brown - * @see KGlobal#config() + * @see TDEGlobal#config() * @see KConfig * @see KSimpleConfig * @see KSharedConfig diff --git a/tdecore/kconfigskeleton.cpp b/tdecore/kconfigskeleton.cpp index b464f64d2..ee873eca2 100644 --- a/tdecore/kconfigskeleton.cpp +++ b/tdecore/kconfigskeleton.cpp @@ -889,7 +889,7 @@ KConfigSkeleton::KConfigSkeleton( const TQString &configname ) } else { - mConfig = KGlobal::sharedConfig(); + mConfig = TDEGlobal::sharedConfig(); } } diff --git a/tdecore/kconfigskeleton.h b/tdecore/kconfigskeleton.h index dde0779cf..3ad18d958 100644 --- a/tdecore/kconfigskeleton.h +++ b/tdecore/kconfigskeleton.h @@ -670,7 +670,7 @@ public: { public: ItemFont(const TQString & group, const TQString & key, TQFont & reference, - const TQFont & defaultValue = KGlobalSettings::generalFont()); + const TQFont & defaultValue = TDEGlobalSettings::generalFont()); void readConfig(KConfig * config); void setProperty(const TQVariant & p); @@ -1059,7 +1059,7 @@ public: */ ItemFont *addItemFont(const TQString & name, TQFont & reference, const TQFont & defaultValue = - KGlobalSettings::generalFont(), + TDEGlobalSettings::generalFont(), const TQString & key = TQString::null); /** diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp index 86ec1f39d..ae767ffb2 100644 --- a/tdecore/kcrash.cpp +++ b/tdecore/kcrash.cpp @@ -196,7 +196,7 @@ KCrash::defaultCrashHandler (int sig) argv[i++] = "--pid"; argv[i++] = pidtxt; - const TDEInstance *instance = KGlobal::_instance; + const TDEInstance *instance = TDEGlobal::_instance; const TDEAboutData *about = instance ? instance->aboutData() : 0; if (about) { if (about->internalVersion()) { diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index df38ff422..3d1818592 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -19,7 +19,7 @@ 172 tdecore (KStartupInfo) 173 tdecore (KLocale) 174 tdecore (KProcIO) -175 tdecore (KProcess) +175 tdecore (TDEProcess) 176 tdecore (KWin) 177 tdecore (KConfigSkeleton) 178 tdecore (KConfigDialogManager) diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index d3cc3c6b6..ef76e04f6 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -82,7 +82,7 @@ static TQCString getDescrFromNum(unsigned int _num) if (!KDebugCache) { kdd.setObject(KDebugCache, new TQIntDict( 601 )); // Do not call this deleter from ~TDEApplication - KGlobal::unregisterStaticDeleter(&kdd); + TDEGlobal::unregisterStaticDeleter(&kdd); KDebugCache->setAutoDelete(true); } @@ -176,7 +176,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char { pcd.setObject(kDebug_data, new kDebugPrivate()); // Do not call this deleter from ~TDEApplication - KGlobal::unregisterStaticDeleter(&pcd); + TDEGlobal::unregisterStaticDeleter(&pcd); // create the dcop interface if it has not been created yet if (!kDebugDCOPIface) @@ -185,25 +185,25 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char } } - if (!kDebug_data->config && KGlobal::_instance ) + if (!kDebug_data->config && TDEGlobal::_instance ) { kDebug_data->config = new KConfig("kdebugrc", false, false); kDebug_data->config->setGroup("0"); //AB: this is necessary here, otherwise all output with area 0 won't be //prefixed with anything, unless something with area != 0 is called before - if ( KGlobal::_instance ) - kDebug_data->aAreaName = KGlobal::instance()->instanceName(); + if ( TDEGlobal::_instance ) + kDebug_data->aAreaName = TDEGlobal::instance()->instanceName(); } if (kDebug_data->config && kDebug_data->oldarea != nArea) { kDebug_data->config->setGroup( TQString::number(static_cast(nArea)) ); kDebug_data->oldarea = nArea; - if ( nArea > 0 && KGlobal::_instance ) + if ( nArea > 0 && TDEGlobal::_instance ) kDebug_data->aAreaName = getDescrFromNum(nArea); if ((nArea == 0) || kDebug_data->aAreaName.isEmpty()) - if ( KGlobal::_instance ) - kDebug_data->aAreaName = KGlobal::instance()->instanceName(); + if ( TDEGlobal::_instance ) + kDebug_data->aAreaName = TDEGlobal::instance()->instanceName(); } int nPriority = 0; diff --git a/tdecore/kdebug.h b/tdecore/kdebug.h index 1121d3679..d8a1998f9 100644 --- a/tdecore/kdebug.h +++ b/tdecore/kdebug.h @@ -422,7 +422,7 @@ kdbgstream &kdbgstream::operator<<( const TQValueList &list ) } /** - * \relates KGlobal + * \relates TDEGlobal * Prints an "\n". * @param s the debug stream to write to * @return the debug stream (@p s) @@ -430,7 +430,7 @@ kdbgstream &kdbgstream::operator<<( const TQValueList &list ) inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; } /** - * \relates KGlobal + * \relates TDEGlobal * Flushes the stream. * @param s the debug stream to write to * @return the debug stream (@p s) @@ -440,7 +440,7 @@ inline kdbgstream &flush( kdbgstream &s) { s.flush(); return s; } TDECORE_EXPORT kdbgstream &perror( kdbgstream &s); /** - * \relates KGlobal + * \relates TDEGlobal * kndbgstream is a dummy variant of kdbgstream. All functions do * nothing. * @see kndDebug() @@ -590,7 +590,7 @@ inline kndbgstream &flush( kndbgstream & s) { return s; } inline kndbgstream &perror( kndbgstream & s) { return s; } /** - * \relates KGlobal + * \relates TDEGlobal * Returns a debug stream. You can use it to print debug * information. * @param area an id to identify the output, 0 for default @@ -599,13 +599,13 @@ inline kndbgstream &perror( kndbgstream & s) { return s; } TDECORE_EXPORT kdbgstream kdDebug(int area = 0); TDECORE_EXPORT kdbgstream kdDebug(bool cond, int area = 0); /** - * \relates KGlobal + * \relates TDEGlobal * Returns a backtrace. * @return a backtrace */ TDECORE_EXPORT TQString kdBacktrace(); /** - * \relates KGlobal + * \relates TDEGlobal * Returns a backtrace. * @param levels the number of levels of the backtrace * @return a backtrace @@ -623,7 +623,7 @@ inline TQString kndBacktrace() { return TQString::null; } inline TQString kndBacktrace(int) { return TQString::null; } /** - * \relates KGlobal + * \relates TDEGlobal * Returns a warning stream. You can use it to print warning * information. * @param area an id to identify the output, 0 for default @@ -631,7 +631,7 @@ inline TQString kndBacktrace(int) { return TQString::null; } TDECORE_EXPORT kdbgstream kdWarning(int area = 0); TDECORE_EXPORT kdbgstream kdWarning(bool cond, int area = 0); /** - * \relates KGlobal + * \relates TDEGlobal * Returns an error stream. You can use it to print error * information. * @param area an id to identify the output, 0 for default @@ -639,7 +639,7 @@ TDECORE_EXPORT kdbgstream kdWarning(bool cond, int area = 0); TDECORE_EXPORT kdbgstream kdError(int area = 0); TDECORE_EXPORT kdbgstream kdError(bool cond, int area = 0); /** - * \relates KGlobal + * \relates TDEGlobal * Returns a fatal error stream. You can use it to print fatal error * information. * @param area an id to identify the output, 0 for default @@ -648,7 +648,7 @@ TDECORE_EXPORT kdbgstream kdFatal(int area = 0); TDECORE_EXPORT kdbgstream kdFatal(bool cond, int area = 0); /** - * \relates KGlobal + * \relates TDEGlobal * Deletes the kdebugrc cache and therefore forces KDebug to reread the * config file */ diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp index 02dfb1d5f..29c30f9d9 100644 --- a/tdecore/kdesktopfile.cpp +++ b/tdecore/kdesktopfile.cpp @@ -67,7 +67,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) if (!TQDir::isRelativePath(local)) { // Relative wrt apps? - local = KGlobal::dirs()->relativeLocation("apps", path); + local = TDEGlobal::dirs()->relativeLocation("apps", path); } if (TQDir::isRelativePath(local)) @@ -78,7 +78,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) { // XDG Desktop menu items come with absolute paths, we need to // extract their relative path and then build a local path. - local = KGlobal::dirs()->relativeLocation("xdgdata-dirs", local); + local = TDEGlobal::dirs()->relativeLocation("xdgdata-dirs", local); if (!TQDir::isRelativePath(local)) { // Hm, that didn't work... @@ -98,7 +98,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) { // XDG Desktop menu items come with absolute paths, we need to // extract their relative path and then build a local path. - local = KGlobal::dirs()->relativeLocation("xdgdata-apps", path); + local = TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path); if (!TQDir::isRelativePath(local)) { // What now? Use filename only and hope for the best. @@ -133,7 +133,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path) if (TQDir::isRelativePath(path)) return true; // Relative paths are ok. - KStandardDirs *dirs = KGlobal::dirs(); + KStandardDirs *dirs = TDEGlobal::dirs(); if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) )) return true; if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) )) @@ -157,7 +157,7 @@ TQString KDesktopFile::translatedEntry(const char* key) const TQString fName = fileName(); fName = fName.mid(fName.findRev('/')+1); TQString po_lookup_key = TQString::fromLatin1(key) + "(" + fName + "): " + value; - TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data()); + TQString po_value = TDEGlobal::locale()->translate(po_lookup_key.utf8().data()); if (po_value == po_lookup_key) return value; diff --git a/tdecore/kgenericfactory.h b/tdecore/kgenericfactory.h index 032c14302..426b29ef1 100644 --- a/tdecore/kgenericfactory.h +++ b/tdecore/kgenericfactory.h @@ -49,7 +49,7 @@ public: virtual ~KGenericFactoryBase() { if ( s_instance ) - KGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) ); + TDEGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) ); delete s_instance; s_instance = 0; s_self = 0; @@ -72,7 +72,7 @@ protected: virtual void setupTranslations( void ) { if ( instance() ) - KGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) ); + TDEGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) ); } void initializeMessageCatalogue() diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp index 57135a769..c51f13e7f 100644 --- a/tdecore/kglobal.cpp +++ b/tdecore/kglobal.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ /* -* kglobal.cpp -- Implementation of class KGlobal. +* kglobal.cpp -- Implementation of class TDEGlobal. * Author: Sirtaj Singh Kang * Version: $Id$ * Generated: Sat May 1 02:08:43 EST 1999 @@ -53,55 +53,55 @@ static void kglobal_init(); -KStandardDirs *KGlobal::dirs() +KStandardDirs *TDEGlobal::dirs() { MYASSERT(_instance); return _instance->dirs(); } -KConfig *KGlobal::config() +KConfig *TDEGlobal::config() { MYASSERT(_instance); return _instance->config(); } -KSharedConfig *KGlobal::sharedConfig() +KSharedConfig *TDEGlobal::sharedConfig() { MYASSERT(_instance); return _instance->sharedConfig(); } -KIconLoader *KGlobal::iconLoader() +KIconLoader *TDEGlobal::iconLoader() { MYASSERT(_instance); return _instance->iconLoader(); } -TDEHardwareDevices *KGlobal::hardwareDevices() +TDEHardwareDevices *TDEGlobal::hardwareDevices() { MYASSERT(_instance); return _instance->hardwareDevices(); } -TDEGlobalNetworkManager *KGlobal::networkManager() +TDEGlobalNetworkManager *TDEGlobal::networkManager() { MYASSERT(_instance); return _instance->networkManager(); } -TDEInstance *KGlobal::instance() +TDEInstance *TDEGlobal::instance() { MYASSERT(_instance); return _instance; } -KLocale *KGlobal::locale() +KLocale *TDEGlobal::locale() { if( _locale == 0 ) { if (!_instance) @@ -117,7 +117,7 @@ KLocale *KGlobal::locale() return _locale; } -KCharsets *KGlobal::charsets() +KCharsets *TDEGlobal::charsets() { if( _charsets == 0 ) { _charsets =new KCharsets(); @@ -127,7 +127,7 @@ KCharsets *KGlobal::charsets() return _charsets; } -void KGlobal::setActiveInstance(TDEInstance *i) +void TDEGlobal::setActiveInstance(TDEInstance *i) { _activeInstance = i; if (i && _locale) @@ -138,10 +138,10 @@ void KGlobal::setActiveInstance(TDEInstance *i) * Create a static QString * * To be used inside functions(!) like: - * static const TQString &myString = KGlobal::staticQString("myText"); + * static const TQString &myString = TDEGlobal::staticQString("myText"); */ const TQString & -KGlobal::staticQString(const char *str) +TDEGlobal::staticQString(const char *str) { return staticQString(TQString::fromLatin1(str)); } @@ -156,10 +156,10 @@ public: * Create a static QString * * To be used inside functions(!) like: - * static const TQString &myString = KGlobal::staticQString(i18n("My Text")); + * static const TQString &myString = TDEGlobal::staticQString(i18n("My Text")); */ const TQString & -KGlobal::staticQString(const TQString &str) +TDEGlobal::staticQString(const TQString &str) { if (!_stringDict) { _stringDict = new KStringDict; @@ -182,7 +182,7 @@ public: }; void -KGlobal::registerStaticDeleter(KStaticDeleterBase *obj) +TDEGlobal::registerStaticDeleter(KStaticDeleterBase *obj) { if (!_staticDeleters) kglobal_init(); @@ -191,16 +191,16 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj) } void -KGlobal::unregisterStaticDeleter(KStaticDeleterBase *obj) +TDEGlobal::unregisterStaticDeleter(KStaticDeleterBase *obj) { if (_staticDeleters) _staticDeleters->removeRef(obj); } void -KGlobal::deleteStaticDeleters() +TDEGlobal::deleteStaticDeleters() { - if (!KGlobal::_staticDeleters) + if (!TDEGlobal::_staticDeleters) return; for(;_staticDeleters->count();) @@ -208,18 +208,18 @@ KGlobal::deleteStaticDeleters() _staticDeleters->take(0)->destructObject(); } - delete KGlobal::_staticDeleters; - KGlobal::_staticDeleters = 0; + delete TDEGlobal::_staticDeleters; + TDEGlobal::_staticDeleters = 0; } // The Variables -KStringDict *KGlobal::_stringDict = 0; -TDEInstance *KGlobal::_instance = 0; -TDEInstance *KGlobal::_activeInstance = 0; -KLocale *KGlobal::_locale = 0; -KCharsets *KGlobal::_charsets = 0; -KStaticDeleterList *KGlobal::_staticDeleters = 0; +KStringDict *TDEGlobal::_stringDict = 0; +TDEInstance *TDEGlobal::_instance = 0; +TDEInstance *TDEGlobal::_activeInstance = 0; +KLocale *TDEGlobal::_locale = 0; +KCharsets *TDEGlobal::_charsets = 0; +KStaticDeleterList *TDEGlobal::_staticDeleters = 0; #ifdef WIN32 #include @@ -235,23 +235,23 @@ __attribute__((destructor)) #endif static void kglobal_freeAll() { - delete KGlobal::_locale; - KGlobal::_locale = 0; - delete KGlobal::_charsets; - KGlobal::_charsets = 0; - delete KGlobal::_stringDict; - KGlobal::_stringDict = 0; - KGlobal::deleteStaticDeleters(); + delete TDEGlobal::_locale; + TDEGlobal::_locale = 0; + delete TDEGlobal::_charsets; + TDEGlobal::_charsets = 0; + delete TDEGlobal::_stringDict; + TDEGlobal::_stringDict = 0; + TDEGlobal::deleteStaticDeleters(); // so that we don't hold a reference and see memory leaks :/ - KGlobal::setActiveInstance(0); + TDEGlobal::setActiveInstance(0); } static void kglobal_init() { - if (KGlobal::_staticDeleters) + if (TDEGlobal::_staticDeleters) return; - KGlobal::_staticDeleters = new KStaticDeleterList; + TDEGlobal::_staticDeleters = new KStaticDeleterList; } int kasciistricmp( const char *str1, const char *str2 ) diff --git a/tdecore/kglobal.h b/tdecore/kglobal.h index 5a775ae8c..361129e2b 100644 --- a/tdecore/kglobal.h +++ b/tdecore/kglobal.h @@ -36,14 +36,14 @@ class TQString; /** * Access to the KDE global objects. - * KGlobal provides you with pointers of many central + * TDEGlobal provides you with pointers of many central * objects that exist only once in the process. It is also * responsible for managing instances of KStaticDeleterBase. * * @see KStaticDeleterBase * @author Sirtaj Singh Kang (taj@kde.org) */ -class TDECORE_EXPORT KGlobal +class TDECORE_EXPORT TDEGlobal { public: @@ -108,12 +108,12 @@ public: * * To be used inside functions(!) like: * \code - * static const TQString &myString = KGlobal::staticQString("myText"); + * static const TQString &myString = TDEGlobal::staticQString("myText"); * \endcode * * !!! Do _NOT_ use: !!! * \code - * static TQString myString = KGlobal::staticQString("myText"); + * static TQString myString = TDEGlobal::staticQString("myText"); * \endcode * This creates a static object (instead of a static reference) * and as you know static objects are EVIL. @@ -127,12 +127,12 @@ public: * * To be used inside functions(!) like: * \code - * static const TQString &myString = KGlobal::staticQString(i18n("My Text")); + * static const TQString &myString = TDEGlobal::staticQString(i18n("My Text")); * \endcode * * !!! Do _NOT_ use: !!! * \code - * static TQString myString = KGlobal::staticQString(i18n("myText")); + * static TQString myString = TDEGlobal::staticQString(i18n("myText")); * \endcode * This creates a static object (instead of a static reference) * and as you know static objects are EVIL. @@ -185,22 +185,22 @@ public: }; /** - * \relates KGlobal + * \relates TDEGlobal * A typesafe function to find the minimum of the two arguments. */ #define KMIN(a,b) kMin(a,b) /** - * \relates KGlobal + * \relates TDEGlobal * A typesafe function to find the maximum of the two arguments. */ #define KMAX(a,b) kMax(a,b) /** - * \relates KGlobal + * \relates TDEGlobal * A typesafe function to determine the absolute value of the argument. */ #define KABS(a) kAbs(a) /** - * \relates KGlobal + * \relates TDEGlobal * A typesafe function that returns x if it's between low and high values. * low if x is smaller than then low and high if x is bigger than high. */ diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index 32ed04f3f..f5fb71027 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -36,45 +36,45 @@ //---------------------------------------------------- -KGlobalAccel::KGlobalAccel( TQObject* pParent, const char* psName ) +TDEGlobalAccel::TDEGlobalAccel( TQObject* pParent, const char* psName ) : TQObject( pParent, psName ) { - kdDebug(125) << "KGlobalAccel(): this = " << this << endl; - d = new KGlobalAccelPrivate(); + kdDebug(125) << "TDEGlobalAccel(): this = " << this << endl; + d = new TDEGlobalAccelPrivate(); } -KGlobalAccel::~KGlobalAccel() +TDEGlobalAccel::~TDEGlobalAccel() { - kdDebug(125) << "~KGlobalAccel(): this = " << this << endl; + kdDebug(125) << "~TDEGlobalAccel(): this = " << this << endl; delete d; } /* -void KGlobalAccel::clear() +void TDEGlobalAccel::clear() { d->clearActions(); } */ -KAccelActions& KGlobalAccel::actions() +KAccelActions& TDEGlobalAccel::actions() { return d->KAccelBase::actions(); } -const KAccelActions& KGlobalAccel::actions() const +const KAccelActions& TDEGlobalAccel::actions() const { return d->KAccelBase::actions(); } -bool KGlobalAccel::isEnabled() +bool TDEGlobalAccel::isEnabled() { return ((KAccelBase*)d)->isEnabled(); } -void KGlobalAccel::setEnabled( bool bEnabled ) +void TDEGlobalAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } -void KGlobalAccel::suspend( bool s ) +void TDEGlobalAccel::suspend( bool s ) { d->suspend( s ); } -void KGlobalAccel::blockShortcuts( bool block ) - { KGlobalAccelPrivate::blockShortcuts( block ); } +void TDEGlobalAccel::blockShortcuts( bool block ) + { TDEGlobalAccelPrivate::blockShortcuts( block ); } -void KGlobalAccel::disableBlocking( bool disable ) +void TDEGlobalAccel::disableBlocking( bool disable ) { d->disableBlocking( disable ); } -KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, +KAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, const KShortcut& cutDef3, const KShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) @@ -85,55 +85,55 @@ KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDe bConfigurable, bEnabled ); } -KAccelAction* KGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) +KAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) { return d->insert( sName, sDesc ); } -bool KGlobalAccel::updateConnections() +bool TDEGlobalAccel::updateConnections() { return d->updateConnections(); } -bool KGlobalAccel::remove( const TQString& sAction ) +bool TDEGlobalAccel::remove( const TQString& sAction ) { return d->remove( sAction ); } -const KShortcut& KGlobalAccel::shortcut( const TQString& sAction ) const +const KShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const { const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); return (pAction) ? pAction->shortcut() : KShortcut::null(); } -bool KGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) { return d->setShortcut( sAction, cut ); } -bool KGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) +bool TDEGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } -TQString KGlobalAccel::label( const TQString& sAction ) const +TQString TDEGlobalAccel::label( const TQString& sAction ) const { const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); return (pAction) ? pAction->label() : TQString(); } -bool KGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable ) +bool TDEGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable ) { return d->setActionEnabled( sAction, bEnable ); } -const TQString& KGlobalAccel::configGroup() const +const TQString& TDEGlobalAccel::configGroup() const { return d->configGroup(); } // for tdemultimedia/kmix -void KGlobalAccel::setConfigGroup( const TQString& s ) +void TDEGlobalAccel::setConfigGroup( const TQString& s ) { d->setConfigGroup( s ); } -bool KGlobalAccel::readSettings( KConfigBase* pConfig ) +bool TDEGlobalAccel::readSettings( KConfigBase* pConfig ) { d->readSettings( pConfig ); return true; } -bool KGlobalAccel::writeSettings( KConfigBase* pConfig ) const +bool TDEGlobalAccel::writeSettings( KConfigBase* pConfig ) const { d->writeSettings( pConfig ); return true; } -bool KGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const +bool TDEGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const { d->setConfigGlobal( bGlobal ); d->writeSettings( pConfig ); return true; } -bool KGlobalAccel::useFourModifierKeys() +bool TDEGlobalAccel::useFourModifierKeys() { return KAccelAction::useFourModifierKeys(); } -void KGlobalAccel::virtual_hook( int, void* ) +void TDEGlobalAccel::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kglobalaccel.moc" diff --git a/tdecore/kglobalaccel.h b/tdecore/kglobalaccel.h index 7fb44a021..1389386c4 100644 --- a/tdecore/kglobalaccel.h +++ b/tdecore/kglobalaccel.h @@ -29,10 +29,10 @@ class KAccelAction; class KAccelActions; class KConfigBase; -class KGlobalAccelPrivate; +class TDEGlobalAccelPrivate; /** -* KGlobalAccel allows you to have global accelerators that are independent of +* TDEGlobalAccel allows you to have global accelerators that are independent of * the focused window. Unlike KAccel it does not matter which window is * currently active. * @@ -42,28 +42,28 @@ class KGlobalAccelPrivate; * @see KKeyDialog * @short Configurable global shortcut support */ -class TDECORE_EXPORT KGlobalAccel : public TQObject +class TDECORE_EXPORT TDEGlobalAccel : public TQObject { Q_OBJECT public: /** - * Creates a new KGlobalAccel object with the given pParent and + * Creates a new TDEGlobalAccel object with the given pParent and * psName. * @param pParent the parent of the QObject * @param psName the name of the QObject */ - KGlobalAccel( TQObject* pParent, const char* psName = 0 ); - virtual ~KGlobalAccel(); + TDEGlobalAccel( TQObject* pParent, const char* psName = 0 ); + virtual ~TDEGlobalAccel(); /** * Checks whether the accelerators are enabled. - * @return true if the KGlobalAccel is enabled + * @return true if the TDEGlobalAccel is enabled */ bool isEnabled(); /** - * Enables or disables the KGlobalAccel - * @param bEnabled true if the KGlobalAccel should be enabled, false if it + * Enables or disables the TDEGlobalAccel + * @param bEnabled true if the TDEGlobalAccel should be enabled, false if it * should be disabled. */ void setEnabled( bool bEnabled ); @@ -171,7 +171,7 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject /** * Read all shortcuts from @p pConfig, or (if @p pConfig * is zero) from the application's configuration file - * KGlobal::config(). + * TDEGlobal::config(). * @param pConfig the configuration file to read from, or 0 for the application * configuration file * @return true if successful, false otherwise @@ -219,7 +219,7 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject /** * @internal */ - // like setEnabled(), but doesn't ungrab (see in KGlobalAccelPrivate) + // like setEnabled(), but doesn't ungrab (see in TDEGlobalAccelPrivate) void suspend( bool s ); private: @@ -227,13 +227,13 @@ private: KAccelActions& actions(); const KAccelActions& actions() const; - friend class KGlobalAccelPrivate; + friend class TDEGlobalAccelPrivate; friend class KAccelShortcutList; protected: /** \internal */ virtual void virtual_hook( int id, void* data ); private: - class KGlobalAccelPrivate* d; + class TDEGlobalAccelPrivate* d; }; #endif // _KGLOBALACCEL_H_ diff --git a/tdecore/kglobalaccel_emb.h b/tdecore/kglobalaccel_emb.h index 859a53362..8a5352817 100644 --- a/tdecore/kglobalaccel_emb.h +++ b/tdecore/kglobalaccel_emb.h @@ -4,10 +4,10 @@ #include "kaccelbase.h" #include "kshortcut.h" -class KGlobalAccelPrivate +class TDEGlobalAccelPrivate { public: - KGlobalAccelPrivate(); + TDEGlobalAccelPrivate(); virtual void setEnabled( bool bEnabled ); diff --git a/tdecore/kglobalaccel_mac.h b/tdecore/kglobalaccel_mac.h index 1bed4f3cc..c82bdc17a 100644 --- a/tdecore/kglobalaccel_mac.h +++ b/tdecore/kglobalaccel_mac.h @@ -6,10 +6,10 @@ #include "kshortcut.h" #include "kaccelbase.h" -class KGlobalAccelPrivate: public KAccelBase +class TDEGlobalAccelPrivate: public KAccelBase { public: - KGlobalAccelPrivate() + TDEGlobalAccelPrivate() : KAccelBase(KAccelBase::NATIVE_KEYS) {} diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp index 4323320bc..1ea3f0250 100644 --- a/tdecore/kglobalaccel_win.cpp +++ b/tdecore/kglobalaccel_win.cpp @@ -37,21 +37,21 @@ //---------------------------------------------------- -static TQValueList< KGlobalAccelPrivate* >* all_accels = 0; +static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; -KGlobalAccelPrivate::KGlobalAccelPrivate() +TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() : KAccelBase( KAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) { if( all_accels == NULL ) - all_accels = new TQValueList< KGlobalAccelPrivate* >; + all_accels = new TQValueList< TDEGlobalAccelPrivate* >; all_accels->append( this ); m_sConfigGroup = "Global Shortcuts"; // kapp->installX11EventFilter( this ); } -KGlobalAccelPrivate::~KGlobalAccelPrivate() +TDEGlobalAccelPrivate::~TDEGlobalAccelPrivate() { // TODO: Need to release all grabbed keys if the main window is not shutting down. //for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { @@ -64,17 +64,17 @@ KGlobalAccelPrivate::~KGlobalAccelPrivate() } } -void KGlobalAccelPrivate::setEnabled( bool bEnable ) +void TDEGlobalAccelPrivate::setEnabled( bool bEnable ) { m_bEnabled = bEnable; //updateConnections(); } -void KGlobalAccelPrivate::blockShortcuts( bool block ) +void TDEGlobalAccelPrivate::blockShortcuts( bool block ) { if( all_accels == NULL ) return; - for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin(); + for( TQValueList< TDEGlobalAccelPrivate* >::ConstIterator it = all_accels->begin(); it != all_accels->end(); ++it ) { if( (*it)->m_blockingDisabled ) @@ -84,35 +84,35 @@ void KGlobalAccelPrivate::blockShortcuts( bool block ) } } -void KGlobalAccelPrivate::disableBlocking( bool block ) +void TDEGlobalAccelPrivate::disableBlocking( bool block ) { m_blockingDisabled = block; } -bool KGlobalAccelPrivate::isEnabledInternal() const +bool TDEGlobalAccelPrivate::isEnabledInternal() const { return KAccelBase::isEnabled() && !m_blocked; } -bool KGlobalAccelPrivate::emitSignal( Signal ) +bool TDEGlobalAccelPrivate::emitSignal( Signal ) { return false; } -bool KGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } -bool KGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool KGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } -bool KGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) { /* if( !key.code() ) { - kdWarning(125) << "KGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; + kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; return false; } @@ -190,7 +190,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce return false; } -/*bool KGlobalAccelPrivate::x11Event( XEvent* pEvent ) +/*bool TDEGlobalAccelPrivate::x11Event( XEvent* pEvent ) { //kdDebug(125) << "x11EventFilter( type = " << pEvent->type << " )" << endl; switch( pEvent->type ) { @@ -206,9 +206,9 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce } } -void KGlobalAccelPrivate::x11MappingNotify() +void TDEGlobalAccelPrivate::x11MappingNotify() { - kdDebug(125) << "KGlobalAccelPrivate::x11MappingNotify()" << endl; + kdDebug(125) << "TDEGlobalAccelPrivate::x11MappingNotify()" << endl; if( m_bEnabled ) { // Maybe the X modifier map has been changed. KKeyServer::initializeMods(); @@ -218,7 +218,7 @@ void KGlobalAccelPrivate::x11MappingNotify() } } -bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) +bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) { // do not change this line unless you really really know what you are doing (Matthias) if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) { @@ -297,9 +297,9 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; }*/ -void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) { - kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; + kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; TQRegExp rexPassIndex( "([ ]*int[ ]*)" ); TQRegExp rexPassInfo( " TQString" ); @@ -333,7 +333,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s } } -void KGlobalAccelPrivate::slotActivated( int iAction ) +void TDEGlobalAccelPrivate::slotActivated( int iAction ) { KAccelAction* pAction = actions().actionPtr( iAction ); if( pAction ) diff --git a/tdecore/kglobalaccel_win.h b/tdecore/kglobalaccel_win.h index 414254881..cde46c472 100644 --- a/tdecore/kglobalaccel_win.h +++ b/tdecore/kglobalaccel_win.h @@ -30,13 +30,13 @@ /** * @internal */ -class KGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase { - friend class KGlobalAccel; + friend class TDEGlobalAccel; Q_OBJECT public: - KGlobalAccelPrivate(); - virtual ~KGlobalAccelPrivate(); + TDEGlobalAccelPrivate(); + virtual ~TDEGlobalAccelPrivate(); virtual void setEnabled( bool bEnabled ); diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp index 260bc39e1..701c954f3 100644 --- a/tdecore/kglobalaccel_x11.cpp +++ b/tdecore/kglobalaccel_x11.cpp @@ -77,23 +77,23 @@ static void calculateGrabMasks() //---------------------------------------------------- -static TQValueList< KGlobalAccelPrivate* >* all_accels = 0; +static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; -KGlobalAccelPrivate::KGlobalAccelPrivate() +TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() : KAccelBase( KAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) , m_suspended( false ) { if( all_accels == NULL ) - all_accels = new TQValueList< KGlobalAccelPrivate* >; + all_accels = new TQValueList< TDEGlobalAccelPrivate* >; all_accels->append( this ); m_sConfigGroup = "Global Shortcuts"; kapp->installX11EventFilter( this ); connect(kapp, TQT_SIGNAL(coreFakeKeyPress(unsigned int)), this, TQT_SLOT(fakeKeyPressed(unsigned int))); } -KGlobalAccelPrivate::~KGlobalAccelPrivate() +TDEGlobalAccelPrivate::~TDEGlobalAccelPrivate() { // TODO: Need to release all grabbed keys if the main window is not shutting down. //for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { @@ -106,17 +106,17 @@ KGlobalAccelPrivate::~KGlobalAccelPrivate() } } -void KGlobalAccelPrivate::setEnabled( bool bEnable ) +void TDEGlobalAccelPrivate::setEnabled( bool bEnable ) { m_bEnabled = bEnable; updateConnections(); } -void KGlobalAccelPrivate::blockShortcuts( bool block ) +void TDEGlobalAccelPrivate::blockShortcuts( bool block ) { if( all_accels == NULL ) return; - for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin(); + for( TQValueList< TDEGlobalAccelPrivate* >::ConstIterator it = all_accels->begin(); it != all_accels->end(); ++it ) { if( (*it)->m_blockingDisabled ) @@ -126,41 +126,41 @@ void KGlobalAccelPrivate::blockShortcuts( bool block ) } } -void KGlobalAccelPrivate::disableBlocking( bool block ) +void TDEGlobalAccelPrivate::disableBlocking( bool block ) { m_blockingDisabled = block; } -bool KGlobalAccelPrivate::isEnabledInternal() const +bool TDEGlobalAccelPrivate::isEnabledInternal() const { return KAccelBase::isEnabled() && !m_blocked; } // see #117169 - the bug is hard to reproduce, probably somewhere in X, testcase would be probably // difficult to make, and so on - just don't release the grabs and only ignore the events instead -void KGlobalAccelPrivate::suspend( bool s ) +void TDEGlobalAccelPrivate::suspend( bool s ) { m_suspended = s; } -bool KGlobalAccelPrivate::emitSignal( Signal ) +bool TDEGlobalAccelPrivate::emitSignal( Signal ) { return false; } -bool KGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } -bool KGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool KGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } -bool KGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) { if( !key.code() ) { - kdWarning(125) << "KGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; + kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; return false; } @@ -245,7 +245,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce return !failed; } -bool KGlobalAccelPrivate::x11Event( XEvent* pEvent ) +bool TDEGlobalAccelPrivate::x11Event( XEvent* pEvent ) { //kdDebug(125) << "x11EventFilter( type = " << pEvent->type << " )" << endl; switch( pEvent->type ) { @@ -261,9 +261,9 @@ bool KGlobalAccelPrivate::x11Event( XEvent* pEvent ) } } -void KGlobalAccelPrivate::x11MappingNotify() +void TDEGlobalAccelPrivate::x11MappingNotify() { - kdDebug(125) << "KGlobalAccelPrivate::x11MappingNotify()" << endl; + kdDebug(125) << "TDEGlobalAccelPrivate::x11MappingNotify()" << endl; // Maybe the X modifier map has been changed. KKeyServer::initializeMods(); calculateGrabMasks(); @@ -271,7 +271,7 @@ void KGlobalAccelPrivate::x11MappingNotify() updateConnections(); } -void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { +void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { CodeMod codemod; codemod.code = keyCode; codemod.mod = 0; @@ -314,7 +314,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { activate( pAction, KKeySequence(key) ); } -bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) +bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) { // do not change this line unless you really really know what you are doing (Matthias) if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) { @@ -394,9 +394,9 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; } -void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) { - kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; + kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; TQRegExp rexPassIndex( "([ ]*int[ ]*)" ); TQRegExp rexPassInfo( " TQString" ); @@ -430,7 +430,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s } } -void KGlobalAccelPrivate::slotActivated( int iAction ) +void TDEGlobalAccelPrivate::slotActivated( int iAction ) { KAccelAction* pAction = KAccelBase::actions().actionPtr( iAction ); if( pAction ) diff --git a/tdecore/kglobalaccel_x11.h b/tdecore/kglobalaccel_x11.h index 3022e0d90..e28df060d 100644 --- a/tdecore/kglobalaccel_x11.h +++ b/tdecore/kglobalaccel_x11.h @@ -30,13 +30,13 @@ /** * @internal */ -class KGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase { - friend class KGlobalAccel; + friend class TDEGlobalAccel; Q_OBJECT public: - KGlobalAccelPrivate(); - virtual ~KGlobalAccelPrivate(); + TDEGlobalAccelPrivate(); + virtual ~TDEGlobalAccelPrivate(); virtual void setEnabled( bool bEnabled ); diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index 74cdaa603..f654608ac 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -58,28 +58,28 @@ static QRgb qt_colorref2qrgb(COLORREF col) #include #endif -TQString* KGlobalSettings::s_desktopPath = 0; -TQString* KGlobalSettings::s_autostartPath = 0; -TQString* KGlobalSettings::s_trashPath = 0; -TQString* KGlobalSettings::s_documentPath = 0; -TQFont *KGlobalSettings::_generalFont = 0; -TQFont *KGlobalSettings::_fixedFont = 0; -TQFont *KGlobalSettings::_toolBarFont = 0; -TQFont *KGlobalSettings::_menuFont = 0; -TQFont *KGlobalSettings::_windowTitleFont = 0; -TQFont *KGlobalSettings::_taskbarFont = 0; -TQFont *KGlobalSettings::_largeFont = 0; -TQColor *KGlobalSettings::_trinity4Blue = 0; -TQColor *KGlobalSettings::_inactiveBackground = 0; -TQColor *KGlobalSettings::_inactiveForeground = 0; -TQColor *KGlobalSettings::_activeBackground = 0; -TQColor *KGlobalSettings::_buttonBackground = 0; -TQColor *KGlobalSettings::_selectBackground = 0; -TQColor *KGlobalSettings::_linkColor = 0; -TQColor *KGlobalSettings::_visitedLinkColor = 0; -TQColor *KGlobalSettings::alternateColor = 0; - -KGlobalSettings::KMouseSettings *KGlobalSettings::s_mouseSettings = 0; +TQString* TDEGlobalSettings::s_desktopPath = 0; +TQString* TDEGlobalSettings::s_autostartPath = 0; +TQString* TDEGlobalSettings::s_trashPath = 0; +TQString* TDEGlobalSettings::s_documentPath = 0; +TQFont *TDEGlobalSettings::_generalFont = 0; +TQFont *TDEGlobalSettings::_fixedFont = 0; +TQFont *TDEGlobalSettings::_toolBarFont = 0; +TQFont *TDEGlobalSettings::_menuFont = 0; +TQFont *TDEGlobalSettings::_windowTitleFont = 0; +TQFont *TDEGlobalSettings::_taskbarFont = 0; +TQFont *TDEGlobalSettings::_largeFont = 0; +TQColor *TDEGlobalSettings::_trinity4Blue = 0; +TQColor *TDEGlobalSettings::_inactiveBackground = 0; +TQColor *TDEGlobalSettings::_inactiveForeground = 0; +TQColor *TDEGlobalSettings::_activeBackground = 0; +TQColor *TDEGlobalSettings::_buttonBackground = 0; +TQColor *TDEGlobalSettings::_selectBackground = 0; +TQColor *TDEGlobalSettings::_linkColor = 0; +TQColor *TDEGlobalSettings::_visitedLinkColor = 0; +TQColor *TDEGlobalSettings::alternateColor = 0; + +TDEGlobalSettings::KMouseSettings *TDEGlobalSettings::s_mouseSettings = 0; // helper function for reading xdg user dirs: it is required in order to take // care of locale stuff @@ -106,49 +106,49 @@ void readXdgUserDirs(TQString *desktop, TQString *documents) } } -int KGlobalSettings::dndEventDelay() +int TDEGlobalSettings::dndEventDelay() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readNumEntry("StartDragDist", TQApplication::startDragDistance()); } -bool KGlobalSettings::singleClick() +bool TDEGlobalSettings::singleClick() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); } -bool KGlobalSettings::iconUseRoundedRect() +bool TDEGlobalSettings::iconUseRoundedRect() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("IconUseRoundedRect", KDE_DEFAULT_ICONTEXTROUNDED); } -KGlobalSettings::TearOffHandle KGlobalSettings::insertTearOffHandle() +TDEGlobalSettings::TearOffHandle TDEGlobalSettings::insertTearOffHandle() { int tearoff; bool effectsenabled; - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); effectsenabled = g.readBoolEntry( "EffectsEnabled", false); tearoff = g.readNumEntry("InsertTearOffHandle", KDE_DEFAULT_INSERTTEAROFFHANDLES); return effectsenabled ? (TearOffHandle) tearoff : Disable; } -bool KGlobalSettings::changeCursorOverIcon() +bool TDEGlobalSettings::changeCursorOverIcon() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ChangeCursor", KDE_DEFAULT_CHANGECURSOR); } -bool KGlobalSettings::visualActivate() +bool TDEGlobalSettings::visualActivate() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("VisualActivate", KDE_DEFAULT_VISUAL_ACTIVATE); } -unsigned int KGlobalSettings::visualActivateSpeed() +unsigned int TDEGlobalSettings::visualActivateSpeed() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry( "VisualActivateSpeed", @@ -158,16 +158,16 @@ unsigned int KGlobalSettings::visualActivateSpeed() -int KGlobalSettings::autoSelectDelay() +int TDEGlobalSettings::autoSelectDelay() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry("AutoSelectDelay", KDE_DEFAULT_AUTOSELECTDELAY); } -KGlobalSettings::Completion KGlobalSettings::completionMode() +TDEGlobalSettings::Completion TDEGlobalSettings::completionMode() { int completion; - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); completion = g.readNumEntry("completionMode", -1); if ((completion < (int) CompletionNone) || (completion > (int) CompletionPopupAuto)) @@ -177,51 +177,51 @@ KGlobalSettings::Completion KGlobalSettings::completionMode() return (Completion) completion; } -bool KGlobalSettings::showContextMenusOnPress () +bool TDEGlobalSettings::showContextMenusOnPress () { - KConfigGroup g(KGlobal::config(), "ContextMenus"); + KConfigGroup g(TDEGlobal::config(), "ContextMenus"); return g.readBoolEntry("ShowOnPress", true); } -int KGlobalSettings::contextMenuKey () +int TDEGlobalSettings::contextMenuKey () { - KConfigGroup g(KGlobal::config(), "Shortcuts"); + KConfigGroup g(TDEGlobal::config(), "Shortcuts"); KShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); return cut.keyCodeQt(); } -TQColor KGlobalSettings::toolBarHighlightColor() +TQColor TDEGlobalSettings::toolBarHighlightColor() { initColors(); - KConfigGroup g( KGlobal::config(), "Toolbar style" ); + KConfigGroup g( TDEGlobal::config(), "Toolbar style" ); return g.readColorEntry("HighlightColor", _trinity4Blue); } -TQColor KGlobalSettings::inactiveTitleColor() +TQColor TDEGlobalSettings::inactiveTitleColor() { #ifdef Q_WS_WIN return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION)); #else if (!_inactiveBackground) _inactiveBackground = new TQColor(157, 170, 186); - KConfigGroup g( KGlobal::config(), "WM" ); + KConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "inactiveBackground", _inactiveBackground ); #endif } -TQColor KGlobalSettings::inactiveTextColor() +TQColor TDEGlobalSettings::inactiveTextColor() { #ifdef Q_WS_WIN return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)); #else if (!_inactiveForeground) _inactiveForeground = new TQColor(221,221,221); - KConfigGroup g( KGlobal::config(), "WM" ); + KConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "inactiveForeground", _inactiveForeground ); #endif } -TQColor KGlobalSettings::activeTitleColor() +TQColor TDEGlobalSettings::activeTitleColor() { #ifdef Q_WS_WIN return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION)); @@ -229,89 +229,89 @@ TQColor KGlobalSettings::activeTitleColor() initColors(); if (!_activeBackground) _activeBackground = new TQColor(65,142,220); - KConfigGroup g( KGlobal::config(), "WM" ); + KConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "activeBackground", _activeBackground); #endif } -TQColor KGlobalSettings::activeTextColor() +TQColor TDEGlobalSettings::activeTextColor() { #ifdef Q_WS_WIN return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)); #else - KConfigGroup g( KGlobal::config(), "WM" ); + KConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "activeForeground", tqwhiteptr ); #endif } -int KGlobalSettings::contrast() +int TDEGlobalSettings::contrast() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry( "contrast", 7 ); } -TQColor KGlobalSettings::buttonBackground() +TQColor TDEGlobalSettings::buttonBackground() { if (!_buttonBackground) _buttonBackground = new TQColor(221,223,228); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "buttonBackground", _buttonBackground ); } -TQColor KGlobalSettings::buttonTextColor() +TQColor TDEGlobalSettings::buttonTextColor() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "buttonForeground", tqblackptr ); } // IMPORTANT: // This function should be kept in sync with // TDEApplication::kdisplaySetPalette() -TQColor KGlobalSettings::baseColor() +TQColor TDEGlobalSettings::baseColor() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "windowBackground", tqwhiteptr ); } // IMPORTANT: // This function should be kept in sync with // TDEApplication::kdisplaySetPalette() -TQColor KGlobalSettings::textColor() +TQColor TDEGlobalSettings::textColor() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "windowForeground", tqblackptr ); } // IMPORTANT: // This function should be kept in sync with // TDEApplication::kdisplaySetPalette() -TQColor KGlobalSettings::highlightedTextColor() +TQColor TDEGlobalSettings::highlightedTextColor() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "selectForeground", tqwhiteptr ); } // IMPORTANT: // This function should be kept in sync with // TDEApplication::kdisplaySetPalette() -TQColor KGlobalSettings::highlightColor() +TQColor TDEGlobalSettings::highlightColor() { initColors(); if (!_selectBackground) _selectBackground = new TQColor(103,141,178); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "selectBackground", _selectBackground ); } -TQColor KGlobalSettings::alternateBackgroundColor() +TQColor TDEGlobalSettings::alternateBackgroundColor() { initColors(); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *alternateColor = calculateAlternateBackgroundColor( baseColor() ); return g.readColorEntry( "alternateBackground", alternateColor ); } -TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base) +TQColor TDEGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base) { if (base == Qt::white) return TQColor(238,246,255); @@ -328,30 +328,30 @@ TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base) } } -bool KGlobalSettings::shadeSortColumn() +bool TDEGlobalSettings::shadeSortColumn() { - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readBoolEntry( "shadeSortColumn", KDE_DEFAULT_SHADE_SORT_COLUMN ); } -TQColor KGlobalSettings::linkColor() +TQColor TDEGlobalSettings::linkColor() { initColors(); if (!_linkColor) _linkColor = new TQColor(0,0,238); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "linkColor", _linkColor ); } -TQColor KGlobalSettings::visitedLinkColor() +TQColor TDEGlobalSettings::visitedLinkColor() { if (!_visitedLinkColor) _visitedLinkColor = new TQColor(82,24,139); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "visitedLinkColor", _visitedLinkColor ); } -TQFont KGlobalSettings::generalFont() +TQFont TDEGlobalSettings::generalFont() { if (_generalFont) return *_generalFont; @@ -361,13 +361,13 @@ TQFont KGlobalSettings::generalFont() _generalFont->setPointSize(10); _generalFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *_generalFont = g.readFontEntry("font", _generalFont); return *_generalFont; } -TQFont KGlobalSettings::fixedFont() +TQFont TDEGlobalSettings::fixedFont() { if (_fixedFont) return *_fixedFont; @@ -377,13 +377,13 @@ TQFont KGlobalSettings::fixedFont() _fixedFont->setPointSize(10); _fixedFont->setStyleHint(TQFont::TypeWriter); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *_fixedFont = g.readFontEntry("fixed", _fixedFont); return *_fixedFont; } -TQFont KGlobalSettings::toolBarFont() +TQFont TDEGlobalSettings::toolBarFont() { if(_toolBarFont) return *_toolBarFont; @@ -393,13 +393,13 @@ TQFont KGlobalSettings::toolBarFont() _toolBarFont->setPointSize(10); _toolBarFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *_toolBarFont = g.readFontEntry("toolBarFont", _toolBarFont); return *_toolBarFont; } -TQFont KGlobalSettings::menuFont() +TQFont TDEGlobalSettings::menuFont() { if(_menuFont) return *_menuFont; @@ -409,13 +409,13 @@ TQFont KGlobalSettings::menuFont() _menuFont->setPointSize(10); _menuFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *_menuFont = g.readFontEntry("menuFont", _menuFont); return *_menuFont; } -TQFont KGlobalSettings::windowTitleFont() +TQFont TDEGlobalSettings::windowTitleFont() { if(_windowTitleFont) return *_windowTitleFont; @@ -425,13 +425,13 @@ TQFont KGlobalSettings::windowTitleFont() _windowTitleFont->setPointSize(10); _windowTitleFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( KGlobal::config(), "WM" ); + KConfigGroup g( TDEGlobal::config(), "WM" ); *_windowTitleFont = g.readFontEntry("activeFont", _windowTitleFont); // inconsistency return *_windowTitleFont; } -TQFont KGlobalSettings::taskbarFont() +TQFont TDEGlobalSettings::taskbarFont() { if(_taskbarFont) return *_taskbarFont; @@ -441,14 +441,14 @@ TQFont KGlobalSettings::taskbarFont() _taskbarFont->setPointSize(10); _taskbarFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( KGlobal::config(), "General" ); + KConfigGroup g( TDEGlobal::config(), "General" ); *_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont); return *_taskbarFont; } -TQFont KGlobalSettings::largeFont(const TQString &text) +TQFont TDEGlobalSettings::largeFont(const TQString &text) { TQFontDatabase db; TQStringList fam = db.families(); @@ -501,12 +501,12 @@ TQFont KGlobalSettings::largeFont(const TQString &text) return *_largeFont; } } - _largeFont = new TQFont(KGlobalSettings::generalFont()); + _largeFont = new TQFont(TDEGlobalSettings::generalFont()); _largeFont->setPointSize(48); return *_largeFont; } -void KGlobalSettings::initStatic() // should be called initPaths(). Don't put anything else here. +void TDEGlobalSettings::initStatic() // should be called initPaths(). Don't put anything else here. { if ( s_desktopPath != 0 ) return; @@ -516,7 +516,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an s_trashPath = new TQString(); s_documentPath = new TQString(); - KConfigGroup g( KGlobal::config(), "Paths" ); + KConfigGroup g( TDEGlobal::config(), "Paths" ); // Read desktop and documents path using XDG_USER_DIRS readXdgUserDirs(s_desktopPath, s_documentPath); @@ -553,7 +553,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an } // Autostart Path - *s_autostartPath = KGlobal::dirs()->localtdedir() + "Autostart/"; + *s_autostartPath = TDEGlobal::dirs()->localtdedir() + "Autostart/"; *s_autostartPath = g.readPathEntry( "Autostart" , *s_autostartPath); *s_autostartPath = TQDir::cleanDirPath( *s_autostartPath ); if ( !s_autostartPath->endsWith("/") ) @@ -564,7 +564,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an kapp->addKipcEventMask(KIPC::SettingsChanged); } -void KGlobalSettings::initColors() +void TDEGlobalSettings::initColors() { if (!_trinity4Blue) { if (TQPixmap::defaultDepth() > 8) @@ -576,7 +576,7 @@ void KGlobalSettings::initColors() alternateColor = new TQColor(237, 244, 249); } -void KGlobalSettings::rereadFontSettings() +void TDEGlobalSettings::rereadFontSettings() { delete _generalFont; _generalFont = 0L; @@ -592,9 +592,9 @@ void KGlobalSettings::rereadFontSettings() _taskbarFont = 0L; } -void KGlobalSettings::rereadPathSettings() +void TDEGlobalSettings::rereadPathSettings() { - kdDebug() << "KGlobalSettings::rereadPathSettings" << endl; + kdDebug() << "TDEGlobalSettings::rereadPathSettings" << endl; delete s_autostartPath; s_autostartPath = 0L; delete s_trashPath; @@ -605,7 +605,7 @@ void KGlobalSettings::rereadPathSettings() s_documentPath = 0L; } -KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings() +TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings() { if ( ! s_mouseSettings ) { @@ -613,7 +613,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings() KMouseSettings & s = *s_mouseSettings; // for convenience #ifndef Q_WS_WIN - KConfigGroup g( KGlobal::config(), "Mouse" ); + KConfigGroup g( TDEGlobal::config(), "Mouse" ); TQString setting = g.readEntry("MouseButtonMapping"); if (setting == "RightHanded") s.handed = KMouseSettings::RightHanded; @@ -655,7 +655,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings() return *s_mouseSettings; } -void KGlobalSettings::rereadMouseSettings() +void TDEGlobalSettings::rereadMouseSettings() { #ifndef Q_WS_WIN delete s_mouseSettings; @@ -663,7 +663,7 @@ void KGlobalSettings::rereadMouseSettings() #endif } -bool KGlobalSettings::isMultiHead() +bool TDEGlobalSettings::isMultiHead() { #ifdef Q_WS_WIN return GetSystemMetrics(SM_CMONITORS) > 1; @@ -676,18 +676,18 @@ bool KGlobalSettings::isMultiHead() #endif } -bool KGlobalSettings::wheelMouseZooms() +bool TDEGlobalSettings::wheelMouseZooms() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM ); } -TQRect KGlobalSettings::splashScreenDesktopGeometry() +TQRect TDEGlobalSettings::splashScreenDesktopGeometry() { TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(KGlobal::config(), "Windows"); + KConfigGroup group(TDEGlobal::config(), "Windows"); int scr = group.readNumEntry("Unmanaged", -3); if (group.readBoolEntry("XineramaEnabled", true) && scr != -2) { if (scr == -3) @@ -701,12 +701,12 @@ TQRect KGlobalSettings::splashScreenDesktopGeometry() } } -TQRect KGlobalSettings::desktopGeometry(const TQPoint& point) +TQRect TDEGlobalSettings::desktopGeometry(const TQPoint& point) { TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(KGlobal::config(), "Windows"); + KConfigGroup group(TDEGlobal::config(), "Windows"); if (group.readBoolEntry("XineramaEnabled", true) && group.readBoolEntry("XineramaPlacementEnabled", true)) { return dw->screenGeometry(dw->screenNumber(point)); @@ -718,12 +718,12 @@ TQRect KGlobalSettings::desktopGeometry(const TQPoint& point) } } -TQRect KGlobalSettings::desktopGeometry(TQWidget* w) +TQRect TDEGlobalSettings::desktopGeometry(TQWidget* w) { TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(KGlobal::config(), "Windows"); + KConfigGroup group(TDEGlobal::config(), "Windows"); if (group.readBoolEntry("XineramaEnabled", true) && group.readBoolEntry("XineramaPlacementEnabled", true)) { if (w) @@ -737,38 +737,38 @@ TQRect KGlobalSettings::desktopGeometry(TQWidget* w) } } -bool KGlobalSettings::showIconsOnPushButtons() +bool TDEGlobalSettings::showIconsOnPushButtons() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ShowIconsOnPushButtons", KDE_DEFAULT_ICON_ON_PUSHBUTTON); } -bool KGlobalSettings::showFilePreview(const KURL &url) +bool TDEGlobalSettings::showFilePreview(const KURL &url) { - KConfigGroup g(KGlobal::config(), "PreviewSettings"); + KConfigGroup g(TDEGlobal::config(), "PreviewSettings"); TQString protocol = url.protocol(); bool defaultSetting = KProtocolInfo::showFilePreview( protocol ); return g.readBoolEntry(protocol, defaultSetting ); } -bool KGlobalSettings::showKonqIconActivationEffect() +bool TDEGlobalSettings::showKonqIconActivationEffect() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ShowKonqIconActivationEffect", KDE_DEFAULT_KONQ_ACTIVATION_EFFECT); } -bool KGlobalSettings::opaqueResize() +bool TDEGlobalSettings::opaqueResize() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("OpaqueResize", KDE_DEFAULT_OPAQUE_RESIZE); } -int KGlobalSettings::buttonLayout() +int TDEGlobalSettings::buttonLayout() { - KConfigGroup g( KGlobal::config(), "KDE" ); + KConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry("ButtonLayout", KDE_DEFAULT_BUTTON_LAYOUT); } diff --git a/tdecore/kglobalsettings.h b/tdecore/kglobalsettings.h index 5fad8fa5a..2d3adc5e1 100644 --- a/tdecore/kglobalsettings.h +++ b/tdecore/kglobalsettings.h @@ -45,7 +45,7 @@ class KURL; * * @author David Faure */ -class TDECORE_EXPORT KGlobalSettings +class TDECORE_EXPORT TDEGlobalSettings { public: @@ -74,7 +74,7 @@ class TDECORE_EXPORT KGlobalSettings * { * if( !(e->state() && LeftButton)) return; * - * int delay = KGlobalSettings::dndEventDelay(); + * int delay = TDEGlobalSettings::dndEventDelay(); * TQPoint newPos = e->pos(); * if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay || * newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay) diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index 7525e6760..546ef99eb 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -63,7 +63,7 @@ KIconEffect::~KIconEffect() void KIconEffect::init() { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); int i, j, effect=-1; TQStringList groups; @@ -190,7 +190,7 @@ TQImage KIconEffect::apply(TQImage image, int group, int state) const TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const { - return apply (image, effect, value, col, KGlobalSettings::baseColor(), trans); + return apply (image, effect, value, col, TDEGlobalSettings::baseColor(), trans); } TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const @@ -248,7 +248,7 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value, const TQColor col, bool trans) const { - return apply (pixmap, effect, value, col, KGlobalSettings::baseColor(), trans); + return apply (pixmap, effect, value, col, TDEGlobalSettings::baseColor(), trans); } TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value, @@ -706,10 +706,10 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay) void KIconEffect::visualActivate(TQWidget * widget, TQRect rect) { - if (!KGlobalSettings::visualActivate()) + if (!TDEGlobalSettings::visualActivate()) return; - uint actSpeed = KGlobalSettings::visualActivateSpeed(); + uint actSpeed = TDEGlobalSettings::visualActivateSpeed(); uint actCount = QMIN(rect.width(), rect.height()) / 2; @@ -774,7 +774,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect) void KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap) { - if (!KGlobalSettings::visualActivate()) + if (!TDEGlobalSettings::visualActivate()) return; // Image too big to display smoothly @@ -783,7 +783,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap) return; } - uint actSpeed = KGlobalSettings::visualActivateSpeed(); + uint actSpeed = TDEGlobalSettings::visualActivateSpeed(); uint actCount = TQMIN(rect.width(), rect.height()) / 4; diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index f413b75f3..01aaa84fd 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -184,11 +184,11 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) if (_dirs) d->mpDirs = _dirs; else - d->mpDirs = KGlobal::dirs(); + d->mpDirs = TDEGlobal::dirs(); TQString appname = _appname; if (appname.isEmpty()) - appname = KGlobal::instance()->instanceName(); + appname = TDEGlobal::instance()->instanceName(); // Add the default theme and its base themes to the theme tree KIconTheme *def = new KIconTheme(KIconTheme::current(), appname); @@ -214,7 +214,7 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) // These have to match the order in kicontheme.h static const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", "Panel", 0L }; - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver cs(config, "dummy"); // loading config and default sizes @@ -349,7 +349,7 @@ void KIconLoader::addExtraDesktopThemes() if ( d->extraDesktopIconsLoaded ) return; TQStringList list; - TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon"); + TQStringList icnlibs = TDEGlobal::dirs()->resourceDirs("icon"); TQStringList::ConstIterator it; char buf[1000]; int r; @@ -406,15 +406,15 @@ TQString KIconLoader::removeIconExtension(const TQString &name) const TQString ext = name.right(4); - static const TQString &png_ext = KGlobal::staticQString(".png"); - static const TQString &xpm_ext = KGlobal::staticQString(".xpm"); + static const TQString &png_ext = TDEGlobal::staticQString(".png"); + static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm"); if (ext == png_ext || ext == xpm_ext) extensionLength=4; #ifdef HAVE_LIBART else { - static const TQString &svgz_ext = KGlobal::staticQString(".svgz"); - static const TQString &svg_ext = KGlobal::staticQString(".svg"); + static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz"); + static const TQString &svg_ext = TDEGlobal::staticQString(".svg"); if (name.right(5) == svgz_ext) extensionLength=5; @@ -437,7 +437,7 @@ TQString KIconLoader::removeIconExtensionInternal(const TQString &name) const #ifndef NDEBUG if (name != name_noext) { - kdDebug(264) << "Application " << KGlobal::instance()->instanceName() + kdDebug(264) << "Application " << TDEGlobal::instance()->instanceName() << " loads icon " << name << " with extension." << endl; } #endif @@ -451,15 +451,15 @@ KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const const TQString *ext[4]; int count=0; - static const TQString &png_ext = KGlobal::staticQString(".png"); + static const TQString &png_ext = TDEGlobal::staticQString(".png"); ext[count++]=&png_ext; #ifdef HAVE_LIBART - static const TQString &svgz_ext = KGlobal::staticQString(".svgz"); + static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz"); ext[count++]=&svgz_ext; - static const TQString &svg_ext = KGlobal::staticQString(".svg"); + static const TQString &svg_ext = TDEGlobal::staticQString(".svg"); ext[count++]=&svg_ext; #endif - static const TQString &xpm_ext = KGlobal::staticQString(".xpm"); + static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm"); ext[count++]=&xpm_ext; /* JRT: To follow the XDG spec, the order in which we look for an @@ -495,7 +495,7 @@ KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const inline TQString KIconLoader::unknownIconPath( int size ) const { - static const TQString &str_unknown = KGlobal::staticQString("unknown"); + static const TQString &str_unknown = TDEGlobal::staticQString("unknown"); KIcon icon = findMatchingIcon(str_unknown, size); if (!icon.isValid()) @@ -523,13 +523,13 @@ TQString KIconLoader::iconPath(const TQString& _name, int group_or_size, TQString path; if (group_or_size == KIcon::User) { - static const TQString &png_ext = KGlobal::staticQString(".png"); - static const TQString &xpm_ext = KGlobal::staticQString(".xpm"); + static const TQString &png_ext = TDEGlobal::staticQString(".png"); + static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm"); path = d->mpDirs->findResource("appicon", name + png_ext); #ifdef HAVE_LIBART - static const TQString &svgz_ext = KGlobal::staticQString(".svgz"); - static const TQString &svg_ext = KGlobal::staticQString(".svg"); + static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz"); + static const TQString &svg_ext = TDEGlobal::staticQString(".svg"); if (path.isEmpty()) path = d->mpDirs->findResource("appicon", name + svgz_ext); if (path.isEmpty()) @@ -595,7 +595,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si } if (!TQDir::isRelativePath(name)) absolutePath=true; - static const TQString &str_unknown = KGlobal::staticQString("unknown"); + static const TQString &str_unknown = TDEGlobal::staticQString("unknown"); // Special case for "User" icons. if (group == KIcon::User) @@ -1241,7 +1241,7 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS if( !(*it).valid ) { #ifdef NDEBUG - loader = KGlobal::iconLoader(); + loader = TDEGlobal::iconLoader(); iconName = "no_way_man_you_will_get_broken_icon"; #else kdWarning() << "Using already destroyed KIconLoader for loading an icon!" << endl; @@ -1260,7 +1260,7 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS if( !found ) { #ifdef NDEBUG - loader = KGlobal::iconLoader(); + loader = TDEGlobal::iconLoader(); iconName = "no_way_man_you_will_get_broken_icon"; #else kdWarning() << "Using unknown KIconLoader for loading an icon!" << endl; @@ -1391,7 +1391,7 @@ TQPixmap KIconLoader::unknown() if ( TQPixmapCache::find("unknown", pix) ) return pix; - TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true); + TQString path = TDEGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true); if (path.isEmpty()) { kdDebug(264) << "Warning: Cannot find \"unknown\" icon." << endl; diff --git a/tdecore/kiconloader.h b/tdecore/kiconloader.h index 2ad23ae38..9cac06c5d 100644 --- a/tdecore/kiconloader.h +++ b/tdecore/kiconloader.h @@ -86,10 +86,10 @@ public: * @param dirs the KStandardDirs object to use. If null the global one is used * * Usually, you use the default iconloader, which can be accessed via - * KGlobal::iconLoader(), so you hardly ever have to create an + * TDEGlobal::iconLoader(), so you hardly ever have to create an * iconloader object yourself. That one is the current TDEInstance's * (typically TDEApplication's) iconloader. - * @see KGlobal::iconLoader() + * @see TDEGlobal::iconLoader() * @see TDEInstance::iconLoader() */ KIconLoader(const TQString& appname=TQString::null, KStandardDirs *dirs = 0); @@ -299,7 +299,7 @@ public: * Called by TDEInstance::newIconLoader to reconfigure the icon loader. * @param _appname the new application name * @param _dirs the new standard directories. If 0, the directories - * from KGlobal will be taken. + * from TDEGlobal will be taken. */ void reconfigure( const TQString& _appname, KStandardDirs *_dirs ); @@ -447,7 +447,7 @@ public: */ TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0, int state=KIcon::DefaultState, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -460,14 +460,14 @@ TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, TDEInstance *instance) * Load a desktop icon, and apply the necessary effects to get an IconSet. */ TDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader * Load a toolbar icon. */ TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -480,7 +480,7 @@ TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, TDEInstance *instance); * Load a toolbar icon, and apply the necessary effects to get an IconSet. */ TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -488,7 +488,7 @@ TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0, */ TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0, int state=KIcon::DefaultState, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -501,7 +501,7 @@ TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, TDEInstance *instance); * Load a small icon, and apply the necessary effects to get an IconSet. */ TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -509,7 +509,7 @@ TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0, */ TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -522,14 +522,14 @@ TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, TDEInstance *instance) * Load a main toolbar icon, and apply the effects to get an IconSet. */ TDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader * Load a user icon. User icons are searched in $appdir/pics. */ TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=KIcon::DefaultState, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader @@ -542,12 +542,12 @@ TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, TDEInstance *instance); * Load a user icon, and apply the effects to get an IconSet. */ TDECORE_EXPORT TQIconSet UserIconSet(const TQString& name, - TDEInstance *instance=KGlobal::instance()); + TDEInstance *instance=TDEGlobal::instance()); /** * \relates KIconLoader * Returns the current icon size for a specific group. */ -TDECORE_EXPORT int IconSize(KIcon::Group group, TDEInstance *instance=KGlobal::instance()); +TDECORE_EXPORT int IconSize(KIcon::Group group, TDEInstance *instance=TDEGlobal::instance()); #endif // __KIconLoader_h_Included__ diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp index d30e254d0..103d37a05 100644 --- a/tdecore/kicontheme.cpp +++ b/tdecore/kicontheme.cpp @@ -95,7 +95,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) if (!appName.isEmpty() && ( name == "crystalsvg" || name== "hicolor" || name == "locolor" ) ) { - icnlibs = KGlobal::dirs()->resourceDirs("data"); + icnlibs = TDEGlobal::dirs()->resourceDirs("data"); for (it=icnlibs.begin(); it!=icnlibs.end(); ++it) { cDir = *it + appName + "/icons/" + name; @@ -105,11 +105,11 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) } // Find the theme description file. These are always global. - icnlibs = KGlobal::dirs()->resourceDirs("icon"); - icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-icon"); + icnlibs = TDEGlobal::dirs()->resourceDirs("icon"); + icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-icon"); icnlibs += "/usr/share/pixmaps"; // These are not in the icon spec, but e.g. GNOME puts some icons there anyway. - icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap"); + icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-pixmap"); for (it=icnlibs.begin(); it!=icnlibs.end(); ++it) { cDir = *it + name + "/"; @@ -448,7 +448,7 @@ TQString KIconTheme::current() return *_theme; _theme = new TQString(); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver(config, "Icons"); *_theme = config->readEntry("Theme",defaultThemeName()); if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName(); @@ -470,11 +470,11 @@ TQStringList KIconTheme::list() return *_theme_list; _theme_list = new TQStringList(); - TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon"); - icnlibs += (KGlobal::dirs()->resourceDirs("xdgdata-icon")); + TQStringList icnlibs = TDEGlobal::dirs()->resourceDirs("icon"); + icnlibs += (TDEGlobal::dirs()->resourceDirs("xdgdata-icon")); icnlibs += "/usr/share/pixmaps"; // These are not in the icon spec, but e.g. GNOME puts some icons there anyway. - icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap"); + icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-pixmap"); TQStringList::ConstIterator it; for (it=icnlibs.begin(); it!=icnlibs.end(); ++it) { diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp index 6d37c3dbc..13e29c049 100644 --- a/tdecore/kinstance.cpp +++ b/tdecore/kinstance.cpp @@ -78,10 +78,10 @@ TDEInstance::TDEInstance( const TQCString& name) { DEBUG_ADD Q_ASSERT(!name.isEmpty()); - if (!KGlobal::_instance) + if (!TDEGlobal::_instance) { - KGlobal::_instance = this; - KGlobal::setActiveInstance(this); + TDEGlobal::_instance = this; + TDEGlobal::setActiveInstance(this); } d = new TDEInstancePrivate (); @@ -99,10 +99,10 @@ TDEInstance::TDEInstance( const TDEAboutData * aboutData ) DEBUG_ADD Q_ASSERT(!_name.isEmpty()); - if (!KGlobal::_instance) + if (!TDEGlobal::_instance) { - KGlobal::_instance = this; - KGlobal::setActiveInstance(this); + TDEGlobal::_instance = this; + TDEGlobal::setActiveInstance(this); } d = new TDEInstancePrivate (); @@ -120,10 +120,10 @@ TDEInstance::TDEInstance( TDEInstance* src ) DEBUG_ADD Q_ASSERT(!_name.isEmpty()); - if (!KGlobal::_instance || KGlobal::_instance == src ) + if (!TDEGlobal::_instance || TDEGlobal::_instance == src ) { - KGlobal::_instance = this; - KGlobal::setActiveInstance(this); + TDEGlobal::_instance = this; + TDEGlobal::setActiveInstance(this); } d = new TDEInstancePrivate (); @@ -164,10 +164,10 @@ TDEInstance::~TDEInstance() delete _dirs; _dirs = 0; - if (KGlobal::_instance == this) - KGlobal::_instance = 0; - if (KGlobal::activeInstance() == this) - KGlobal::setActiveInstance(0); + if (TDEGlobal::_instance == this) + TDEGlobal::_instance = 0; + if (TDEGlobal::activeInstance() == this) + TDEGlobal::setActiveInstance(0); DEBUG_REMOVE } diff --git a/tdecore/kinstance.h b/tdecore/kinstance.h index 36d463d8a..775fe3bdf 100644 --- a/tdecore/kinstance.h +++ b/tdecore/kinstance.h @@ -38,7 +38,7 @@ class TDEGlobalNetworkManager; * Access to KDE global objects for use in shared libraries. In * practical terms, this class is used in KDE components. This allows * components to store things that normally would be accessed by - * KGlobal. + * TDEGlobal. * * @author Torben Weis */ diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index c12cde7e6..d0ec7583d 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -361,7 +361,7 @@ bool initializeMods() XFreeModifiermap( xmk ); - //KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" ); + //KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); // read in mod that win should be attached to g_bInitializedMods = true; @@ -380,11 +380,11 @@ static void initializeVariations() static void intializeKKeyLabels() { - KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" ); - g_rgModInfo[0].sLabel = KGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) ); - g_rgModInfo[1].sLabel = KGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) ); - g_rgModInfo[2].sLabel = KGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) ); - g_rgModInfo[3].sLabel = KGlobal::config()->readEntry( "Label Win", i18n(g_rgModInfo[3].psName) ); + KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + g_rgModInfo[0].sLabel = TDEGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) ); + g_rgModInfo[1].sLabel = TDEGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) ); + g_rgModInfo[2].sLabel = TDEGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) ); + g_rgModInfo[3].sLabel = TDEGlobal::config()->readEntry( "Label Win", i18n(g_rgModInfo[3].psName) ); g_bMacLabels = (g_rgModInfo[2].sLabel == "Command"); g_bInitializedKKeyLabels = true; } diff --git a/tdecore/klibloader.h b/tdecore/klibloader.h index 9f080b88b..3e8f9ff45 100644 --- a/tdecore/klibloader.h +++ b/tdecore/klibloader.h @@ -273,7 +273,7 @@ public: * ".la" will be appended. * @param instance a TDEInstance used to get the standard paths */ - static TQString findLibrary( const char * name, const TDEInstance * instance = KGlobal::instance() ); + static TQString findLibrary( const char * name, const TDEInstance * instance = TDEGlobal::instance() ); protected: KLibLoader( TQObject* parent = 0, const char* name = 0 ); @@ -311,7 +311,7 @@ private: * \code * s_global = new TDEInstance( "kspread" ); * \endcode - * This TDEInstance is comparable to KGlobal used by normal applications. + * This TDEInstance is comparable to TDEGlobal used by normal applications. * It allows you to find resource files (images, XML, sound etc.) belonging * to the library. * diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index 43c21ef2e..6b64abbd8 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -94,7 +94,7 @@ KLocale::KLocale( const TQString & catalog, KConfig * config ) KConfig *cfg = d->config; this_klocale = this; - if (!cfg) cfg = KGlobal::instance()->config(); + if (!cfg) cfg = TDEGlobal::instance()->config(); this_klocale = 0; Q_ASSERT( cfg ); @@ -298,7 +298,7 @@ void KLocale::doFormatInit() const void KLocale::initFormat() { KConfig *config = d->config; - if (!config) config = KGlobal::instance()->config(); + if (!config) config = TDEGlobal::instance()->config(); Q_ASSERT( config ); kdDebug(173) << "KLocale::initFormat" << endl; @@ -306,8 +306,8 @@ void KLocale::initFormat() // make sure the config files are read using the correct locale // ### Why not add a KConfigBase::setLocale( const KLocale * )? // ### Then we could remove this hack - KLocale *lsave = KGlobal::_locale; - KGlobal::_locale = this; + KLocale *lsave = TDEGlobal::_locale; + TDEGlobal::_locale = this; KConfigGroupSaver saver(config, "Locale"); @@ -385,7 +385,7 @@ void KLocale::initFormat() d->dateMonthNamePossessive); // end of hack - KGlobal::_locale = lsave; + TDEGlobal::_locale = lsave; } bool KLocale::setCountry(const TQString & country) @@ -695,7 +695,7 @@ void KLocale::removeCatalogue(const TQString &catalog) { if ( d->catalogNames.contains( catalog )) { d->catalogNames.remove( catalog ); - if (KGlobal::_instance) + if (TDEGlobal::_instance) updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need } } @@ -1976,7 +1976,7 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime, TQString i18n(const char* text) { - register KLocale *instance = KGlobal::locale(); + register KLocale *instance = TDEGlobal::locale(); if (instance) return instance->translate(text); return TQString::fromUtf8(text); @@ -1984,7 +1984,7 @@ TQString i18n(const char* text) TQString i18n(const char* index, const char *text) { - register KLocale *instance = KGlobal::locale(); + register KLocale *instance = TDEGlobal::locale(); if (instance) return instance->translate(index, text); return TQString::fromUtf8(text); @@ -1992,7 +1992,7 @@ TQString i18n(const char* index, const char *text) TQString i18n(const char* singular, const char* plural, unsigned long n) { - register KLocale *instance = KGlobal::locale(); + register KLocale *instance = TDEGlobal::locale(); if (instance) return instance->translate(singular, plural, n); if (n == 1) @@ -2003,15 +2003,15 @@ TQString i18n(const char* singular, const char* plural, unsigned long n) void KLocale::initInstance() { - if (KGlobal::_locale) + if (TDEGlobal::_locale) return; - TDEInstance *app = KGlobal::instance(); + TDEInstance *app = TDEGlobal::instance(); if (app) { - KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName())); + TDEGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName())); // only do this for the global instance - TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding()); + TQTextCodec::setCodecForLocale(TDEGlobal::_locale->codecForEncoding()); } else kdDebug(173) << "no app name available using KLocale - nothing to do\n"; @@ -2022,12 +2022,12 @@ TQString KLocale::langLookup(const TQString &fname, const char *rtype) TQStringList search; // assemble the local search paths - const TQStringList localDoc = KGlobal::dirs()->resourceDirs(rtype); + const TQStringList localDoc = TDEGlobal::dirs()->resourceDirs(rtype); // look up the different languages for (int id=localDoc.count()-1; id >= 0; --id) { - TQStringList langs = KGlobal::locale()->languageList(); + TQStringList langs = TDEGlobal::locale()->languageList(); langs.append( "en" ); langs.remove( defaultLanguage() ); TQStringList::ConstIterator lang; @@ -2380,7 +2380,7 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const TQStringList KLocale::allCountriesTwoAlpha() const { TQStringList countries; - TQStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop"); + TQStringList paths = TDEGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop"); for(TQStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it) { diff --git a/tdecore/klocale.h b/tdecore/klocale.h index ce9dad46b..42619afd4 100644 --- a/tdecore/klocale.h +++ b/tdecore/klocale.h @@ -31,7 +31,7 @@ class TQDate; class TQTime; class TQDateTime; -class KGlobal; +class TDEGlobal; class KConfig; class KConfigBase; class KLocalePrivate; @@ -123,7 +123,7 @@ inline TQString tr2i18n(const char* message, const char* =0) { */ class TDECORE_EXPORT KLocale { - friend class KGlobal; // for initInstance() + friend class TDEGlobal; // for initInstance() public: /** * Constructs a KLocale with the given catalog name. @@ -1173,7 +1173,7 @@ private: protected: /** - * @internal Creates a KLocale object for KGlobal and inits the locale + * @internal Creates a KLocale object for TDEGlobal and inits the locale * pointer. */ static void initInstance(); diff --git a/tdecore/kmimesourcefactory.h b/tdecore/kmimesourcefactory.h index 7090b1733..e18c7d888 100644 --- a/tdecore/kmimesourcefactory.h +++ b/tdecore/kmimesourcefactory.h @@ -46,7 +46,7 @@ public: * * @param loader is the iconloader used to find images. */ - KMimeSourceFactory (KIconLoader* loader = KGlobal::iconLoader()); + KMimeSourceFactory (KIconLoader* loader = TDEGlobal::iconLoader()); /** * Destructor. diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp index 073dff626..c06184221 100644 --- a/tdecore/kpalette.cpp +++ b/tdecore/kpalette.cpp @@ -34,7 +34,7 @@ TQStringList KPalette::getPaletteList() { TQStringList paletteList; - KGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList); + TDEGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList); int strip = strlen("colors/"); for(TQStringList::Iterator it = paletteList.begin(); diff --git a/tdecore/kprocctrl.cpp b/tdecore/kprocctrl.cpp index d8170c0a8..76ad0b167 100644 --- a/tdecore/kprocctrl.cpp +++ b/tdecore/kprocctrl.cpp @@ -33,29 +33,29 @@ #include -KProcessController *KProcessController::theKProcessController; -int KProcessController::refCount; +TDEProcessController *TDEProcessController::theTDEProcessController; +int TDEProcessController::refCount; -void KProcessController::ref() +void TDEProcessController::ref() { if( !refCount ) { - theKProcessController = new KProcessController; + theTDEProcessController = new TDEProcessController; setupHandlers(); } refCount++; } -void KProcessController::deref() +void TDEProcessController::deref() { refCount--; if( !refCount ) { resetHandlers(); - delete theKProcessController; - theKProcessController = 0; + delete theTDEProcessController; + theTDEProcessController = 0; } } -KProcessController::KProcessController() +TDEProcessController::TDEProcessController() : needcheck( false ) { if( pipe( fd ) ) @@ -75,7 +75,7 @@ KProcessController::KProcessController() TQT_SLOT(slotDoHousekeeping())); } -KProcessController::~KProcessController() +TDEProcessController::~TDEProcessController() { delete notifier; @@ -87,16 +87,16 @@ KProcessController::~KProcessController() extern "C" { static void theReaper( int num ) { - KProcessController::theSigCHLDHandler( num ); + TDEProcessController::theSigCHLDHandler( num ); } } #ifdef Q_OS_UNIX -struct sigaction KProcessController::oldChildHandlerData; +struct sigaction TDEProcessController::oldChildHandlerData; #endif -bool KProcessController::handlerSet = false; +bool TDEProcessController::handlerSet = false; -void KProcessController::setupHandlers() +void TDEProcessController::setupHandlers() { if( handlerSet ) return; @@ -127,7 +127,7 @@ void KProcessController::setupHandlers() #endif } -void KProcessController::resetHandlers() +void TDEProcessController::resetHandlers() { if( !handlerSet ) return; @@ -144,12 +144,12 @@ void KProcessController::resetHandlers() // the pipe is needed to sync the child reaping with our event processing, // as otherwise there are race conditions, locking requirements, and things // generally get harder -void KProcessController::theSigCHLDHandler( int arg ) +void TDEProcessController::theSigCHLDHandler( int arg ) { int saved_errno = errno; char dummy = 0; - ::write( theKProcessController->fd[1], &dummy, 1 ); + ::write( theTDEProcessController->fd[1], &dummy, 1 ); #ifdef Q_OS_UNIX if( oldChildHandlerData.sa_handler != SIG_IGN && @@ -162,12 +162,12 @@ void KProcessController::theSigCHLDHandler( int arg ) errno = saved_errno; } -int KProcessController::notifierFd() const +int TDEProcessController::notifierFd() const { return fd[0]; } -void KProcessController::unscheduleCheck() +void TDEProcessController::unscheduleCheck() { char dummy[16]; // somewhat bigger - just in case several have queued up if( ::read( fd[0], dummy, sizeof(dummy) ) > 0 ) @@ -175,7 +175,7 @@ void KProcessController::unscheduleCheck() } void -KProcessController::rescheduleCheck() +TDEProcessController::rescheduleCheck() { if( needcheck ) { @@ -185,23 +185,23 @@ KProcessController::rescheduleCheck() } } -void KProcessController::slotDoHousekeeping() +void TDEProcessController::slotDoHousekeeping() { char dummy[16]; // somewhat bigger - just in case several have queued up ::read( fd[0], dummy, sizeof(dummy) ); int status; again: - TQValueListIterator it( kProcessList.begin() ); - TQValueListIterator eit( kProcessList.end() ); + TQValueListIterator it( kProcessList.begin() ); + TQValueListIterator eit( kProcessList.end() ); while( it != eit ) { - KProcess *prc = *it; + TDEProcess *prc = *it; if( prc->runs && waitpid( prc->pid_, &status, WNOHANG ) > 0 ) { prc->processHasExited( status ); // the callback can nuke the whole process list and even 'this' - if (!theKProcessController) + if (!theTDEProcessController) return; goto again; } @@ -220,7 +220,7 @@ void KProcessController::slotDoHousekeeping() } } -bool KProcessController::waitForProcessExit( int timeout ) +bool TDEProcessController::waitForProcessExit( int timeout ) { #ifdef Q_OS_UNIX for(;;) @@ -258,20 +258,20 @@ bool KProcessController::waitForProcessExit( int timeout ) #endif } -void KProcessController::addKProcess( KProcess* p ) +void TDEProcessController::addTDEProcess( TDEProcess* p ) { kProcessList.append( p ); } -void KProcessController::removeKProcess( KProcess* p ) +void TDEProcessController::removeTDEProcess( TDEProcess* p ) { kProcessList.remove( p ); } -void KProcessController::addProcess( int pid ) +void TDEProcessController::addProcess( int pid ) { unixProcessList.append( pid ); - ref(); // make sure we stay around when the KProcess goes away + ref(); // make sure we stay around when the TDEProcess goes away } #include "kprocctrl.moc" diff --git a/tdecore/kprocctrl.h b/tdecore/kprocctrl.h index fbd096cbf..1cb6cc302 100644 --- a/tdecore/kprocctrl.h +++ b/tdecore/kprocctrl.h @@ -27,16 +27,16 @@ class TQSocketNotifier; /** - * @short Used internally by KProcess + * @short Used internally by TDEProcess * @internal * @author Christian Czezatke * - * A class for internal use by KProcess only. -- Exactly one instance + * A class for internal use by TDEProcess only. -- Exactly one instance * of this class is created by TDEApplication. * * This class takes care of the actual (UN*X) signal handling. */ -class TDECORE_EXPORT KProcessController : public TQObject +class TDECORE_EXPORT TDEProcessController : public TQObject { Q_OBJECT @@ -57,7 +57,7 @@ public: * Only a single instance of this class is allowed at a time, * and this static variable is used to track the one instance. */ - static KProcessController *theKProcessController; // kde4: rename: instance + static TDEProcessController *theTDEProcessController; // kde4: rename: instance /** * Automatically called upon SIGCHLD. Never call it directly. @@ -71,7 +71,7 @@ public: /** * Wait for any process to exit and handle their exit without * starting an event loop. - * This function may cause KProcess to emit any of its signals. + * This function may cause TDEProcess to emit any of its signals. * * @param timeout the timeout in seconds. -1 means no timeout. * @return true if a process exited, false @@ -95,7 +95,7 @@ public: void rescheduleCheck(); /* - * Obtain the file descriptor KProcessController uses to get notified + * Obtain the file descriptor TDEProcessController uses to get notified * about process exits. select() or poll() on it if you create a custom * event loop that needs to act upon SIGCHLD. * @return the file descriptor of the reading end of the notification pipe @@ -106,11 +106,11 @@ public: /** * @internal */ - void addKProcess( KProcess* ); + void addTDEProcess( TDEProcess* ); /** * @internal */ - void removeKProcess( KProcess* ); + void removeTDEProcess( TDEProcess* ); /** * @internal */ @@ -125,7 +125,7 @@ private: int fd[2]; bool needcheck; TQSocketNotifier *notifier; - TQValueList kProcessList; + TQValueList kProcessList; TQValueList unixProcessList; static void setupHandlers(); @@ -136,12 +136,12 @@ private: static int refCount; // Disallow instantiation - KProcessController(); - ~KProcessController(); + TDEProcessController(); + ~TDEProcessController(); // Disallow assignment and copy-construction - KProcessController( const KProcessController& ); - KProcessController& operator= ( const KProcessController& ); + TDEProcessController( const TDEProcessController& ); + TDEProcessController& operator= ( const TDEProcessController& ); }; diff --git a/tdecore/kprocess.cpp b/tdecore/kprocess.cpp index 3658116ab..b899c637f 100644 --- a/tdecore/kprocess.cpp +++ b/tdecore/kprocess.cpp @@ -85,10 +85,10 @@ // private data // ////////////////// -class KProcessPrivate { +class TDEProcessPrivate { public: - KProcessPrivate() : - usePty(KProcess::NoCommunication), + TDEProcessPrivate() : + usePty(TDEProcess::NoCommunication), addUtmp(false), useShell(false), #ifdef Q_OS_UNIX pty(0), @@ -97,7 +97,7 @@ public: { } - KProcess::Communication usePty; + TDEProcess::Communication usePty; bool addUtmp : 1; bool useShell : 1; @@ -117,7 +117,7 @@ public: // public member functions // ///////////////////////////// -KProcess::KProcess( TQObject* parent, const char *name ) +TDEProcess::TDEProcess( TQObject* parent, const char *name ) : TQObject( parent, name ), run_mode(NotifyOnExit), runs(false), @@ -132,17 +132,17 @@ KProcess::KProcess( TQObject* parent, const char *name ) input_sent(0), input_total(0) { - KProcessController::ref(); - KProcessController::theKProcessController->addKProcess(this); + TDEProcessController::ref(); + TDEProcessController::theTDEProcessController->addTDEProcess(this); - d = new KProcessPrivate; + d = new TDEProcessPrivate; out[0] = out[1] = -1; in[0] = in[1] = -1; err[0] = err[1] = -1; } -KProcess::KProcess() +TDEProcess::TDEProcess() : TQObject(), run_mode(NotifyOnExit), runs(false), @@ -157,10 +157,10 @@ KProcess::KProcess() input_sent(0), input_total(0) { - KProcessController::ref(); - KProcessController::theKProcessController->addKProcess(this); + TDEProcessController::ref(); + TDEProcessController::theTDEProcessController->addTDEProcess(this); - d = new KProcessPrivate; + d = new TDEProcessPrivate; out[0] = out[1] = -1; in[0] = in[1] = -1; @@ -168,19 +168,19 @@ KProcess::KProcess() } void -KProcess::setEnvironment(const TQString &name, const TQString &value) +TDEProcess::setEnvironment(const TQString &name, const TQString &value) { d->env.insert(name, value); } void -KProcess::setWorkingDirectory(const TQString &dir) +TDEProcess::setWorkingDirectory(const TQString &dir) { d->wd = dir; } void -KProcess::setupEnvironment() +TDEProcess::setupEnvironment() { TQMap::Iterator it; for(it = d->env.begin(); it != d->env.end(); ++it) @@ -195,19 +195,19 @@ KProcess::setupEnvironment() } void -KProcess::setRunPrivileged(bool keepPrivileges) +TDEProcess::setRunPrivileged(bool keepPrivileges) { keepPrivs = keepPrivileges; } bool -KProcess::runPrivileged() const +TDEProcess::runPrivileged() const { return keepPrivs; } bool -KProcess::setPriority(int prio) +TDEProcess::setPriority(int prio) { #ifdef Q_OS_UNIX if (runs) { @@ -222,7 +222,7 @@ KProcess::setPriority(int prio) return true; } -KProcess::~KProcess() +TDEProcess::~TDEProcess() { if (run_mode != DontCare) kill(SIGKILL); @@ -233,26 +233,26 @@ KProcess::~KProcess() #endif delete d; - KProcessController::theKProcessController->removeKProcess(this); - KProcessController::deref(); + TDEProcessController::theTDEProcessController->removeTDEProcess(this); + TDEProcessController::deref(); } -void KProcess::detach() +void TDEProcess::detach() { if (runs) { - KProcessController::theKProcessController->addProcess(pid_); + TDEProcessController::theTDEProcessController->addProcess(pid_); runs = false; pid_ = 0; // close without draining commClose(); // Clean up open fd's and socket notifiers. } } -void KProcess::setBinaryExecutable(const char *filename) +void TDEProcess::setBinaryExecutable(const char *filename) { d->executable = filename; } -bool KProcess::setExecutable(const TQString& proc) +bool TDEProcess::setExecutable(const TQString& proc) { if (runs) return false; @@ -265,7 +265,7 @@ bool KProcess::setExecutable(const TQString& proc) return true; } -KProcess &KProcess::operator<<(const TQStringList& args) +TDEProcess &TDEProcess::operator<<(const TQStringList& args) { TQStringList::ConstIterator it = args.begin(); for ( ; it != args.end() ; ++it ) @@ -273,29 +273,29 @@ KProcess &KProcess::operator<<(const TQStringList& args) return *this; } -KProcess &KProcess::operator<<(const TQCString& arg) +TDEProcess &TDEProcess::operator<<(const TQCString& arg) { return operator<< (arg.data()); } -KProcess &KProcess::operator<<(const char* arg) +TDEProcess &TDEProcess::operator<<(const char* arg) { arguments.append(arg); return *this; } -KProcess &KProcess::operator<<(const TQString& arg) +TDEProcess &TDEProcess::operator<<(const TQString& arg) { arguments.append(TQFile::encodeName(arg)); return *this; } -void KProcess::clearArguments() +void TDEProcess::clearArguments() { arguments.clear(); } -bool KProcess::start(RunMode runmode, Communication comm) +bool TDEProcess::start(RunMode runmode, Communication comm) { if (runs) { kdDebug(175) << "Attempted to start an already running process" << endl; @@ -454,11 +454,11 @@ bool KProcess::start(RunMode runmode, Communication comm) if (!runs) { // commClose detected data on the process exit notifification pipe - KProcessController::theKProcessController->unscheduleCheck(); + TDEProcessController::theTDEProcessController->unscheduleCheck(); if (waitpid(pid_, &status, WNOHANG) != 0) // error finishes, too { commClose(); // this time for real (runs is false) - KProcessController::theKProcessController->rescheduleCheck(); + TDEProcessController::theTDEProcessController->rescheduleCheck(); break; } runs = true; // for next commClose() iteration @@ -490,7 +490,7 @@ bool KProcess::start(RunMode runmode, Communication comm) -bool KProcess::kill(int signo) +bool TDEProcess::kill(int signo) { #ifdef Q_OS_UNIX if (runs && pid_ > 0 && !::kill(run_mode == OwnGroup ? -pid_ : pid_, signo)) @@ -501,14 +501,14 @@ bool KProcess::kill(int signo) -bool KProcess::isRunning() const +bool TDEProcess::isRunning() const { return runs; } -pid_t KProcess::pid() const +pid_t TDEProcess::pid() const { return pid_; } @@ -525,7 +525,7 @@ pid_t KProcess::pid() const } while (0) #endif -bool KProcess::wait(int timeout) +bool TDEProcess::wait(int timeout) { if (!runs) return true; @@ -549,7 +549,7 @@ bool KProcess::wait(int timeout) } #ifdef Q_OS_UNIX - int fd = KProcessController::theKProcessController->notifierFd(); + int fd = TDEProcessController::theTDEProcessController->notifierFd(); for(;;) { fd_set fds; @@ -573,14 +573,14 @@ bool KProcess::wait(int timeout) break; // fall through; should happen if tvp->tv_sec < 0 case 0: - KProcessController::theKProcessController->rescheduleCheck(); + TDEProcessController::theTDEProcessController->rescheduleCheck(); return false; default: - KProcessController::theKProcessController->unscheduleCheck(); + TDEProcessController::theTDEProcessController->unscheduleCheck(); if (waitpid(pid_, &status, WNOHANG) != 0) // error finishes, too { processHasExited(status); - KProcessController::theKProcessController->rescheduleCheck(); + TDEProcessController::theTDEProcessController->rescheduleCheck(); return true; } } @@ -591,19 +591,19 @@ bool KProcess::wait(int timeout) -bool KProcess::normalExit() const +bool TDEProcess::normalExit() const { return (pid_ != 0) && !runs && WIFEXITED(status); } -bool KProcess::signalled() const +bool TDEProcess::signalled() const { return (pid_ != 0) && !runs && WIFSIGNALED(status); } -bool KProcess::coreDumped() const +bool TDEProcess::coreDumped() const { #ifdef WCOREDUMP return signalled() && WCOREDUMP(status); @@ -613,19 +613,19 @@ bool KProcess::coreDumped() const } -int KProcess::exitStatus() const +int TDEProcess::exitStatus() const { return WEXITSTATUS(status); } -int KProcess::exitSignal() const +int TDEProcess::exitSignal() const { return WTERMSIG(status); } -bool KProcess::writeStdin(const char *buffer, int buflen) +bool TDEProcess::writeStdin(const char *buffer, int buflen) { // if there is still data pending, writing new data // to stdout is not allowed (since it could also confuse @@ -645,19 +645,19 @@ bool KProcess::writeStdin(const char *buffer, int buflen) return false; } -void KProcess::suspend() +void TDEProcess::suspend() { if (outnot) outnot->setEnabled(false); } -void KProcess::resume() +void TDEProcess::resume() { if (outnot) outnot->setEnabled(true); } -bool KProcess::closeStdin() +bool TDEProcess::closeStdin() { if (communication & Stdin) { communication = (Communication) (communication & ~Stdin); @@ -671,7 +671,7 @@ bool KProcess::closeStdin() return false; } -bool KProcess::closeStdout() +bool TDEProcess::closeStdout() { if (communication & Stdout) { communication = (Communication) (communication & ~Stdout); @@ -685,7 +685,7 @@ bool KProcess::closeStdout() return false; } -bool KProcess::closeStderr() +bool TDEProcess::closeStderr() { if (communication & Stderr) { communication = (Communication) (communication & ~Stderr); @@ -699,7 +699,7 @@ bool KProcess::closeStderr() return false; } -bool KProcess::closePty() +bool TDEProcess::closePty() { #ifdef Q_OS_UNIX if (d->pty && d->pty->masterFd() >= 0) { @@ -714,7 +714,7 @@ bool KProcess::closePty() #endif } -void KProcess::closeAll() +void TDEProcess::closeAll() { closeStdin(); closeStdout(); @@ -728,21 +728,21 @@ void KProcess::closeAll() -void KProcess::slotChildOutput(int fdno) +void TDEProcess::slotChildOutput(int fdno) { if (!childOutput(fdno)) closeStdout(); } -void KProcess::slotChildError(int fdno) +void TDEProcess::slotChildError(int fdno) { if (!childError(fdno)) closeStderr(); } -void KProcess::slotSendData(int) +void TDEProcess::slotSendData(int) { if (input_sent == input_total) { innot->setEnabled(false); @@ -762,7 +762,7 @@ void KProcess::slotSendData(int) } } -void KProcess::setUseShell(bool useShell, const char *shell) +void TDEProcess::setUseShell(bool useShell, const char *shell) { d->useShell = useShell; if (shell && *shell) @@ -787,7 +787,7 @@ void KProcess::setUseShell(bool useShell, const char *shell) } #ifdef Q_OS_UNIX -void KProcess::setUsePty(Communication usePty, bool addUtmp) +void TDEProcess::setUsePty(Communication usePty, bool addUtmp) { d->usePty = usePty; d->addUtmp = addUtmp; @@ -800,13 +800,13 @@ void KProcess::setUsePty(Communication usePty, bool addUtmp) } } -KPty *KProcess::pty() const +KPty *TDEProcess::pty() const { return d->pty; } #endif //Q_OS_UNIX -TQString KProcess::quote(const TQString &arg) +TQString TDEProcess::quote(const TQString &arg) { TQChar q('\''); return TQString(arg).replace(q, "'\\''").prepend(q).append(q); @@ -818,7 +818,7 @@ TQString KProcess::quote(const TQString &arg) ////////////////////////////// -void KProcess::processHasExited(int state) +void TDEProcess::processHasExited(int state) { // only successfully run NotifyOnExit processes ever get here @@ -833,7 +833,7 @@ void KProcess::processHasExited(int state) -int KProcess::childOutput(int fdno) +int TDEProcess::childOutput(int fdno) { if (communication & NoRead) { int len = -1; @@ -856,7 +856,7 @@ int KProcess::childOutput(int fdno) } } -int KProcess::childError(int fdno) +int TDEProcess::childError(int fdno) { char buffer[1025]; int len; @@ -871,7 +871,7 @@ int KProcess::childError(int fdno) } -int KProcess::setupCommunication(Communication comm) +int TDEProcess::setupCommunication(Communication comm) { #ifdef Q_OS_UNIX // PTY stuff // @@ -939,7 +939,7 @@ int KProcess::setupCommunication(Communication comm) -int KProcess::commSetupDoneP() +int TDEProcess::commSetupDoneP() { int rcomm = communication & ~d->usePty; if (rcomm & Stdin) @@ -984,7 +984,7 @@ int KProcess::commSetupDoneP() -int KProcess::commSetupDoneC() +int TDEProcess::commSetupDoneC() { int ok = 1; #ifdef Q_OS_UNIX @@ -1034,7 +1034,7 @@ int KProcess::commSetupDoneC() -void KProcess::commClose() +void TDEProcess::commClose() { closeStdin(); @@ -1044,7 +1044,7 @@ void KProcess::commClose() // buffer doesn't fill up whilst we are waiting for data on the other // (causing a deadlock). Hence we need to use select. - int notfd = KProcessController::theKProcessController->notifierFd(); + int notfd = TDEProcessController::theTDEProcessController->notifierFd(); while ((communication & (Stdout | Stderr)) || runs) { fd_set rfds; @@ -1104,7 +1104,7 @@ void KProcess::commClose() } -void KProcess::virtual_hook( int, void* ) +void TDEProcess::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } @@ -1113,7 +1113,7 @@ void KProcess::virtual_hook( int, void* ) /////////////////////////// KShellProcess::KShellProcess(const char *shellname): - KProcess() + TDEProcess() { setUseShell( true, shellname ? shellname : getenv("SHELL") ); } @@ -1123,15 +1123,15 @@ KShellProcess::~KShellProcess() { TQString KShellProcess::quote(const TQString &arg) { - return KProcess::quote(arg); + return TDEProcess::quote(arg); } bool KShellProcess::start(RunMode runmode, Communication comm) { - return KProcess::start(runmode, comm); + return TDEProcess::start(runmode, comm); } void KShellProcess::virtual_hook( int id, void* data ) -{ KProcess::virtual_hook( id, data ); } +{ TDEProcess::virtual_hook( id, data ); } #include "kprocess.moc" diff --git a/tdecore/kprocess.h b/tdecore/kprocess.h index 7e9941717..ae4a25af6 100644 --- a/tdecore/kprocess.h +++ b/tdecore/kprocess.h @@ -30,7 +30,7 @@ #include "tdelibs_export.h" class TQSocketNotifier; -class KProcessPrivate; +class TDEProcessPrivate; #ifdef Q_OS_UNIX #include @@ -60,15 +60,15 @@ class KPty; * @li NotifyOnExit -- The child process is invoked and both the * child and the parent process run concurrently. * - * When the child process exits, the KProcess instance + * When the child process exits, the TDEProcess instance * corresponding to it emits the Qt signal processExited(). * Since this signal is @em not emitted from within a UN*X * signal handler, arbitrary function calls can be made. * - * Be aware: When the KProcess object gets destructed, the child + * Be aware: When the TDEProcess object gets destructed, the child * process will be killed if it is still running! * This means in particular, that it usually makes no sense to use - * a KProcess on the stack with NotifyOnExit. + * a TDEProcess on the stack with NotifyOnExit. * * @li OwnGroup -- like NotifyOnExit, but the child process is started * in an own process group (and an own session, FWIW). The behavior of @@ -84,7 +84,7 @@ class KPty; * In this mode the parent can read the child's output, but can't send it any * input. * - * KProcess also provides several functions for determining the exit status + * TDEProcess also provides several functions for determining the exit status * and the pid of the child process it represents. * * Furthermore it is possible to supply command-line arguments to the process @@ -92,12 +92,12 @@ class KPty; * * A small usage example: * \code - * KProcess *proc = new KProcess; + * TDEProcess *proc = new TDEProcess; * * *proc << "my_executable"; * *proc << "These" << "are" << "the" << "command" << "line" << "args"; - * TQApplication::connect(proc, TQT_SIGNAL(processExited(KProcess *)), - * pointer_to_my_object, TQT_SLOT(my_objects_slot(KProcess *))); + * TQApplication::connect(proc, TQT_SIGNAL(processExited(TDEProcess *)), + * pointer_to_my_object, TQT_SLOT(my_objects_slot(TDEProcess *))); * proc->start(); * \endcode * @@ -107,7 +107,7 @@ class KPty; * * Communication with the child process:\n * - * KProcess supports communication with the child process through + * TDEProcess supports communication with the child process through * stdin/stdout/stderr. * * The following functions are provided for getting data from the child @@ -127,7 +127,7 @@ class KPty; * @author Christian Czezatke e9025461@student.tuwien.ac.at * **/ -class TDECORE_EXPORT KProcess : public TQObject +class TDECORE_EXPORT TDEProcess : public TQObject { Q_OBJECT @@ -191,12 +191,12 @@ public: * Constructor * @since 3.2 */ - KProcess( TQObject* parent, const char *name = 0 ); + TDEProcess( TQObject* parent, const char *name = 0 ); /** * Constructor */ // KDE4 merge with the above - KProcess(); + TDEProcess(); /** *Destructor: @@ -206,13 +206,13 @@ public: * only if the run mode is not of type @p DontCare. * Processes started as @p DontCare keep running anyway. */ - virtual ~KProcess(); + virtual ~TDEProcess(); /** @deprecated Use operator<<() instead. - Sets the executable to be started with this KProcess object. + Sets the executable to be started with this TDEProcess object. Returns false if the process is currently running (in that case the executable remains unchanged). @@ -227,33 +227,33 @@ public: * * For example, doing an "ls -l /usr/local/bin" can be achieved by: * \code - * KProcess p; + * TDEProcess p; * ... * p << "ls" << "-l" << "/usr/local/bin" * \endcode * * @param arg the argument to add - * @return a reference to this KProcess + * @return a reference to this TDEProcess **/ - KProcess &operator<<(const TQString& arg); + TDEProcess &operator<<(const TQString& arg); /** * Similar to previous method, takes a char *, supposed to be in locale 8 bit already. */ - KProcess &operator<<(const char * arg); + TDEProcess &operator<<(const char * arg); /** * Similar to previous method, takes a TQCString, supposed to be in locale 8 bit already. * @param arg the argument to add - * @return a reference to this KProcess + * @return a reference to this TDEProcess */ - KProcess &operator<<(const TQCString & arg); + TDEProcess &operator<<(const TQCString & arg); /** * Sets the executable and the command line argument list for this process, * in a single method call, or add a list of arguments. * @param args the arguments to add - * @return a reference to this KProcess + * @return a reference to this TDEProcess **/ - KProcess &operator<<(const TQStringList& args); + TDEProcess &operator<<(const TQStringList& args); /** * Clear a command line argument list that has been set by using @@ -265,7 +265,7 @@ public: * Starts the process. * For a detailed description of the * various run modes and communication semantics, have a look at the - * general description of the KProcess class. Note that if you use + * general description of the TDEProcess class. Note that if you use * setUsePty( Stdout | Stderr, \ ), you cannot use Stdout | Stderr * here - instead, use Stdout only to receive the mixed output. * @@ -308,10 +308,10 @@ public: * * If it is called after * the process has exited, it returns the process id of the last - * child process that was created by this instance of KProcess. + * child process that was created by this instance of TDEProcess. * * Calling it before any child process has been started by this - * KProcess instance causes pid() to return 0. + * TDEProcess instance causes pid() to return 0. * @return the pid of the process or 0 if no process has been started yet. **/ pid_t pid() const; @@ -535,9 +535,9 @@ public: static TQString quote(const TQString &arg); /** - * Detaches KProcess from child process. All communication is closed. + * Detaches TDEProcess from child process. All communication is closed. * No exit notification is emitted any more for the child process. - * Deleting the KProcess will no longer kill the child process. + * Deleting the TDEProcess will no longer kill the child process. * Note that the current process remains the parent process of the * child process. */ @@ -588,7 +588,7 @@ signals: * start() ) or the Block mode. * @param proc a pointer to the process that has exited **/ - void processExited(KProcess *proc); + void processExited(TDEProcess *proc); /** @@ -609,7 +609,7 @@ signals: * TQString myBuf = TQString::fromLatin1(buffer, buflen); * \endcode **/ - void receivedStdout(KProcess *proc, char *buffer, int buflen); + void receivedStdout(TDEProcess *proc, char *buffer, int buflen); /** * Emitted when output from the child process has @@ -646,7 +646,7 @@ signals: * @param buffer The data received. * @param buflen The number of bytes that are available. **/ - void receivedStderr(KProcess *proc, char *buffer, int buflen); + void receivedStderr(TDEProcess *proc, char *buffer, int buflen); /** * Emitted after all the data that has been @@ -654,7 +654,7 @@ signals: * written to the child process. * @param proc a pointer to the process **/ - void wroteStdin(KProcess *proc); + void wroteStdin(TDEProcess *proc); protected slots: @@ -703,7 +703,7 @@ protected: * true if the process is currently running. You should not * modify this data member directly from derived classes. Please use * isRunning() for reading the value of this data member since it - * will probably be made private in later versions of KProcess. + * will probably be made private in later versions of TDEProcess. */ bool runs; @@ -712,7 +712,7 @@ protected: * You should not modify this data member in derived classes. * Please use pid() instead of directly accessing this * member since it will probably be made private in - * later versions of KProcess. + * later versions of TDEProcess. */ pid_t pid_; @@ -721,7 +721,7 @@ protected: * modify the value of this data member from derived classes. You should * rather use exitStatus() than accessing this data member directly * since it will probably be made private in further versions of - * KProcess. + * TDEProcess. */ int status; @@ -736,7 +736,7 @@ protected: /** * This function is called from start() right before a fork() takes * place. According to the @p comm parameter this function has to initialize - * the in, out and err data members of KProcess. + * the in, out and err data members of TDEProcess. * * This function should return 1 if setting the needed communication channels * was successful. @@ -754,7 +754,7 @@ protected: * * Furthermore, it must also create the TQSocketNotifiers innot, * outnot and errnot and connect their Qt signals to the respective - * KProcess slots. + * TDEProcess slots. * * For a more detailed explanation, it is best to have a look at the default * implementation in kprocess.cpp. @@ -788,12 +788,12 @@ protected: * before closing them. * @li if pid() returns non-zero and runs is true, the communication * links should be monitored for data until the file handle returned by - * KProcessController::theKProcessController->notifierFd() becomes ready + * TDEProcessController::theTDEProcessController->notifierFd() becomes ready * for reading - when it triggers, runs should be reset to false, and * the function should be immediately left without closing anything. * * The previous semantics of this function are forward-compatible, but should - * be avoided, as they are prone to race conditions and can cause KProcess + * be avoided, as they are prone to race conditions and can cause TDEProcess * (and thus the whole program) to lock up under certain circumstances. At the * end the function closes the communication links in any case. Additionally * @li if runs is true, the communication links are monitored for data @@ -879,15 +879,15 @@ protected: int input_total; /** - * KProcessController is a friend of KProcess because it has to have + * TDEProcessController is a friend of TDEProcess because it has to have * access to various data members. */ - friend class KProcessController; + friend class TDEProcessController; protected: virtual void virtual_hook( int id, void* data ); private: - KProcessPrivate *d; + TDEProcessPrivate *d; }; class KShellProcessPrivate; @@ -895,13 +895,13 @@ class KShellProcessPrivate; /** * @obsolete * -* Use KProcess and KProcess::setUseShell(true) instead. +* Use TDEProcess and TDEProcess::setUseShell(true) instead. * -* @short A class derived from KProcess to start child +* @short A class derived from TDEProcess to start child * processes through a shell. * @author Christian Czezatke */ -class TDECORE_EXPORT KShellProcess: public KProcess +class TDECORE_EXPORT KShellProcess: public TDEProcess { Q_OBJECT diff --git a/tdecore/kprocio.cpp b/tdecore/kprocio.cpp index 9159edab5..7157662df 100644 --- a/tdecore/kprocio.cpp +++ b/tdecore/kprocio.cpp @@ -31,8 +31,8 @@ class KProcIOPrivate { public: - KProcIOPrivate() : comm(KProcess::All) {} - KProcess::Communication comm; + KProcIOPrivate() : comm(TDEProcess::All) {} + TDEProcess::Communication comm; }; KProcIO::KProcIO ( TQTextCodec *_codec) @@ -67,14 +67,14 @@ KProcIO::resetAll () rbi=0; readsignalon=writeready=true; - disconnect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), - this, TQT_SLOT (received (KProcess *, char *, int))); + disconnect (this, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)), + this, TQT_SLOT (received (TDEProcess *, char *, int))); - disconnect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (received (KProcess *, char *, int))); + disconnect (this, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (received (TDEProcess *, char *, int))); - disconnect (this, TQT_SIGNAL (wroteStdin(KProcess *)), - this, TQT_SLOT (sent (KProcess *))); + disconnect (this, TQT_SIGNAL (wroteStdin(TDEProcess *)), + this, TQT_SLOT (sent (TDEProcess *))); outbuffer.clear(); @@ -87,19 +87,19 @@ void KProcIO::setComm (Communication comm) bool KProcIO::start (RunMode runmode, bool includeStderr) { - connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), - this, TQT_SLOT (received (KProcess *, char *, int))); + connect (this, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)), + this, TQT_SLOT (received (TDEProcess *, char *, int))); if (includeStderr) { - connect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (received (KProcess *, char *, int))); + connect (this, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (received (TDEProcess *, char *, int))); } - connect (this, TQT_SIGNAL (wroteStdin(KProcess *)), - this, TQT_SLOT (sent (KProcess *))); + connect (this, TQT_SIGNAL (wroteStdin(TDEProcess *)), + this, TQT_SLOT (sent (TDEProcess *))); - return KProcess::start (runmode, d->comm); + return TDEProcess::start (runmode, d->comm); } bool KProcIO::writeStdin (const TQString &line, bool appendnewline) @@ -131,7 +131,7 @@ bool KProcIO::writeStdin (const TQCString &line, bool appendnewline) if (writeready) { writeready=false; - return KProcess::writeStdin( b->data(), b->size() ); + return TDEProcess::writeStdin( b->data(), b->size() ); } return true; } @@ -146,7 +146,7 @@ bool KProcIO::writeStdin(const TQByteArray &data) if (writeready) { writeready=false; - return KProcess::writeStdin( b->data(), b->size() ); + return TDEProcess::writeStdin( b->data(), b->size() ); } return true; } @@ -163,7 +163,7 @@ void KProcIO::closeWhenDone() return; } -void KProcIO::sent(KProcess *) +void KProcIO::sent(TDEProcess *) { outbuffer.removeFirst(); @@ -180,13 +180,13 @@ void KProcIO::sent(KProcess *) } else { - KProcess::writeStdin(b->data(), b->size()); + TDEProcess::writeStdin(b->data(), b->size()); } } } -void KProcIO::received (KProcess *, char *buffer, int buflen) +void KProcIO::received (TDEProcess *, char *buffer, int buflen) { recvbuffer += TQCString(buffer, buflen+1); @@ -270,7 +270,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial) } void KProcIO::virtual_hook( int id, void* data ) -{ KProcess::virtual_hook( id, data ); } +{ TDEProcess::virtual_hook( id, data ); } #include "kprocio.moc" diff --git a/tdecore/kprocio.h b/tdecore/kprocio.h index 3dceb9c1b..4e42ee533 100644 --- a/tdecore/kprocio.h +++ b/tdecore/kprocio.h @@ -30,7 +30,7 @@ class TQTextCodec; * KProcIO * * This class provides a slightly simpler interface to the communication - * functions provided by KProcess. The simplifications are: + * functions provided by TDEProcess. The simplifications are: * @li The buffer for a write is copied to an internal KProcIO * buffer and maintained/freed appropriately. There is no need * to be concerned with wroteStdin() signals _at_all_. @@ -40,14 +40,14 @@ class TQTextCodec; * Basically, KProcIO gives you buffered I/O similar to fgets()/fputs(). * * Aside from these, and the fact that start() takes different - * parameters, use this class just like KProcess. + * parameters, use this class just like TDEProcess. * * @author David Sweet - * @short A slightly simpler interface to KProcess + * @short A slightly simpler interface to TDEProcess **/ -class TDECORE_EXPORT KProcIO : public KProcess +class TDECORE_EXPORT KProcIO : public TDEProcess { Q_OBJECT @@ -63,10 +63,10 @@ public: ~KProcIO(); /** - * Sets the communication mode to be passed to KProcess::start() - * by start(). The default communication mode is KProcess::All. + * Sets the communication mode to be passed to TDEProcess::start() + * by start(). The default communication mode is TDEProcess::All. * You probably want to use this function in conjunction with - * KProcess::setUsePty(). + * TDEProcess::setUsePty(). * @param comm the communication mode */ void setComm (Communication comm); @@ -80,7 +80,7 @@ public: * * @param runmode For a detailed description of the * various run modes, have a look at the - * general description of the KProcess class. + * general description of the TDEProcess class. * @param includeStderr If true, data from both stdout and stderr is * listened to. If false, only stdout is listened to. * @return true on success, false on error. @@ -204,8 +204,8 @@ protected: void controlledEmission (); protected slots: - void received (KProcess *proc, char *buffer, int buflen); - void sent (KProcess *); + void received (TDEProcess *proc, char *buffer, int buflen); + void sent (TDEProcess *); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdecore/kpty.cpp b/tdecore/kpty.cpp index f6fc9d5cd..e13540e19 100644 --- a/tdecore/kpty.cpp +++ b/tdecore/kpty.cpp @@ -144,7 +144,7 @@ extern "C" { /////////////////////// #ifdef HAVE_UTEMPTER -class KProcess_Utmp : public KProcess +class TDEProcess_Utmp : public TDEProcess { public: int commSetupDoneC() @@ -440,12 +440,12 @@ void KPty::setCTty() void KPty::login(const char *user, const char *remotehost) { #ifdef HAVE_UTEMPTER - KProcess_Utmp utmp; + TDEProcess_Utmp utmp; utmp.cmdFd = d->masterFd; utmp << "/usr/lib/utempter/utempter" << "add"; if (remotehost) utmp << remotehost; - utmp.start(KProcess::Block); + utmp.start(TDEProcess::Block); Q_UNUSED(user); Q_UNUSED(remotehost); #elif defined(USE_LOGIN) @@ -485,10 +485,10 @@ void KPty::login(const char *user, const char *remotehost) void KPty::logout() { #ifdef HAVE_UTEMPTER - KProcess_Utmp utmp; + TDEProcess_Utmp utmp; utmp.cmdFd = d->masterFd; utmp << "/usr/lib/utempter/utempter" << "del"; - utmp.start(KProcess::Block); + utmp.start(TDEProcess::Block); #elif defined(USE_LOGIN) const char *str_ptr = d->ttyName.data(); if (!memcmp(str_ptr, "/dev/", 5)) @@ -572,8 +572,8 @@ int KPty::slaveFd() const // private bool KPty::chownpty(bool grant) { - KProcess proc; + TDEProcess proc; proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << TQString::number(d->masterFd); - return proc.start(KProcess::Block) && proc.normalExit() && !proc.exitStatus(); + return proc.start(TDEProcess::Block) && proc.normalExit() && !proc.exitStatus(); } diff --git a/tdecore/kshortcutlist.cpp b/tdecore/kshortcutlist.cpp index 7c3fc67da..9666f7aab 100644 --- a/tdecore/kshortcutlist.cpp +++ b/tdecore/kshortcutlist.cpp @@ -72,7 +72,7 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo { kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) - pConfig = KGlobal::config(); + pConfig = TDEGlobal::config(); TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts"); // If the config file still has the old group name: @@ -110,7 +110,7 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pC { kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) - pConfig = KGlobal::config(); + pConfig = TDEGlobal::config(); TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts"); @@ -166,7 +166,7 @@ KAccelShortcutList::KAccelShortcutList( KAccel* pAccel ) d->m_configGroup=pAccel->configGroup(); } -KAccelShortcutList::KAccelShortcutList( KGlobalAccel* pAccel ) +KAccelShortcutList::KAccelShortcutList( TDEGlobalAccel* pAccel ) : m_actions( pAccel->actions() ) { d=new KAccelShortcutListPrivate; diff --git a/tdecore/kshortcutlist.h b/tdecore/kshortcutlist.h index ce8f408a1..497bfaf15 100644 --- a/tdecore/kshortcutlist.h +++ b/tdecore/kshortcutlist.h @@ -40,7 +40,7 @@ class KShortcut; * KAccelShortcutList and KStdAccel::ShortcutList. It gives * you an unified interface for accessing the accelerator lists * of KAccel (using KAccelShortcutList), - * KGlobalAccel (using KAccelShortcutList), and + * TDEGlobalAccel (using KAccelShortcutList), and * KStdAccel (using KStdAccel::ShortcutList). * * @short Base class for accessing accelerator lists @@ -189,11 +189,11 @@ class TDECORE_EXPORT KShortcutList class KAccel; class KAccelActions; -class KGlobalAccel; +class TDEGlobalAccel; /** * KShortcutList implementation to access KAccel and - * KGlobalAccel lists. + * TDEGlobalAccel lists. */ class TDECORE_EXPORT KAccelShortcutList : public KShortcutList { @@ -206,10 +206,10 @@ class TDECORE_EXPORT KAccelShortcutList : public KShortcutList /** * Creates a new KShortcutList that accesses the given - * KGlobalAccel. + * TDEGlobalAccel. * @param accel the accelerators to access */ - KAccelShortcutList( KGlobalAccel* accel ); + KAccelShortcutList( TDEGlobalAccel* accel ); /** * @internal diff --git a/tdecore/kshortcutmenu.cpp b/tdecore/kshortcutmenu.cpp index 3df389f07..4bf18d965 100644 --- a/tdecore/kshortcutmenu.cpp +++ b/tdecore/kshortcutmenu.cpp @@ -34,7 +34,7 @@ KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySe { kdDebug() << seq.toStringInternal() << endl; - TQFont fontTitle = KGlobalSettings::menuFont(); + TQFont fontTitle = TDEGlobalSettings::menuFont(); fontTitle.setBold( true ); pTitle = new TQLabel( "", (TQWidget*)0 ); diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp index 6b4e13a14..5c17b665d 100644 --- a/tdecore/ksimpleconfig.cpp +++ b/tdecore/ksimpleconfig.cpp @@ -43,7 +43,7 @@ KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly) // the difference between KConfig and KSimpleConfig is just that // for KSimpleConfig an absolute filename is guaranteed if (!fileName.isNull() && TQDir::isRelativePath(fileName)) { - backEnd->changeFileName( KGlobal::dirs()-> + backEnd->changeFileName( TDEGlobal::dirs()-> saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false); } else { backEnd->changeFileName(fileName, "config", false); diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index cad0345ab..9552c4104 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -214,7 +214,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() delayRemove = false; m_ref = 0; - KConfigGroup config(KGlobal::config(), TQCString("DirWatch")); + KConfigGroup config(TDEGlobal::config(), TQCString("DirWatch")); m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000); m_PollInterval = config.readNumEntry("PollInterval", 500); diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index 1f948653e..85d6e4249 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -1461,8 +1461,8 @@ void KStandardDirs::addKDEDefaults() void KStandardDirs::checkConfig() const { - if (!addedCustoms && KGlobal::_instance && KGlobal::_instance->_config) - const_cast(this)->addCustomized(KGlobal::_instance->_config); + if (!addedCustoms && TDEGlobal::_instance && TDEGlobal::_instance->_config) + const_cast(this)->addCustomized(TDEGlobal::_instance->_config); } static TQStringList lookupProfiles(const TQString &mapFile) diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h index 6c6e71ab2..8d026682c 100644 --- a/tdecore/kstandarddirs.h +++ b/tdecore/kstandarddirs.h @@ -97,7 +97,7 @@ class KStandardDirsPrivate; * So while you had to ::locate("data", "appname/filename") so you can * also write ::locate("appdata", "filename") if your TDEApplication instance * is called "appname" (as set via TDEApplication's constructor or TDEAboutData, if - * you use the global KStandardDirs object KGlobal::dirs()). + * you use the global KStandardDirs object TDEGlobal::dirs()). * Please note though that you cannot use the "appdata" * type if you intend to use it in an applet for Kicker because 'appname' would * be "Kicker" instead of the applet's name. Therefore, for applets, you've got @@ -120,7 +120,7 @@ class KStandardDirsPrivate; * home directory of root, usually "/root/.trinity". * Note that the setting of $HOME is ignored in this case. * - * @see KGlobalSettings + * @see TDEGlobalSettings */ class TDECORE_EXPORT KStandardDirs { @@ -175,7 +175,7 @@ public: * The later a suffix is added, the higher its priority. Note, that the * suffix should end with / but doesn't have to start with one (as prefixes * should end with one). So adding a suffix for app_pics would look - * like KGlobal::dirs()->addResourceType("app_pics", "share/app/pics"); + * like TDEGlobal::dirs()->addResourceType("app_pics", "share/app/pics"); * * @param type Specifies a short descriptive string to access * files of this type. @@ -414,7 +414,7 @@ public: * It's a series of addResourceTypes() * and addPrefix() calls. * You normally wouldn't call this function because it's called - * for you from KGlobal. + * for you from TDEGlobal. */ void addKDEDefaults(); @@ -700,7 +700,7 @@ public: * This function is just for convenience. It simply calls *instance->dirs()->\link KStandardDirs::findResource() findResource\endlink(type, filename). **/ -TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const TDEInstance* instance = KGlobal::instance() ); +TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() ); /*! * \relates KStandardDirs @@ -711,7 +711,7 @@ TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, cons * specific file, filename must have a trailing slash. * **/ -TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const TDEInstance* instance = KGlobal::instance() ); +TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() ); /*! * \relates KStandardDirs @@ -722,7 +722,7 @@ TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, * filename must have a trailing slash. * **/ -TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const TDEInstance* instance = KGlobal::instance() ); +TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const TDEInstance* instance = TDEGlobal::instance() ); /*! @} */ diff --git a/tdecore/kstaticdeleter.h b/tdecore/kstaticdeleter.h index 61b4a8e4a..dd759adf7 100644 --- a/tdecore/kstaticdeleter.h +++ b/tdecore/kstaticdeleter.h @@ -27,14 +27,14 @@ /** * Static deleters are used to manage static resources. They can register - * themselves with KGlobal. KGlobal will call destructObject() when - * KGlobal::deleteStaticDeleters() is called or when it the process + * themselves with TDEGlobal. TDEGlobal will call destructObject() when + * TDEGlobal::deleteStaticDeleters() is called or when it the process * finishes. * * @see KStaticDeleter - * @see KGlobal::registerStaticDeleter() - * @see KGlobal::unregisterStaticDeleter() - * @see KGlobal::deleteStaticDeleters() + * @see TDEGlobal::registerStaticDeleter() + * @see TDEGlobal::unregisterStaticDeleter() + * @see TDEGlobal::deleteStaticDeleters() */ class TDECORE_EXPORT KStaticDeleterBase { public: @@ -42,7 +42,7 @@ public: /** * Should destruct the resources managed by this KStaticDeleterBase. * Usually you also want to call it in your destructor. - * @see KGlobal::deleteStaticDeleters() + * @see TDEGlobal::deleteStaticDeleters() */ virtual void destructObject(); }; @@ -76,7 +76,7 @@ public: KStaticDeleter() { deleteit = 0; globalReference = 0; array = false; } /** * Sets the object to delete and registers the object to be - * deleted to KGlobal. If the given object is 0, the former + * deleted to TDEGlobal. If the given object is 0, the former * registration is unregistered. * @param obj the object to delete * @param isArray tells the destructor to delete an array instead of an object @@ -87,14 +87,14 @@ public: globalReference = 0; array = isArray; if (obj) - KGlobal::registerStaticDeleter(this); + TDEGlobal::registerStaticDeleter(this); else - KGlobal::unregisterStaticDeleter(this); + TDEGlobal::unregisterStaticDeleter(this); return obj; } /** * Sets the object to delete and registers the object to be - * deleted to KGlobal. If the given object is 0, the former + * deleted to TDEGlobal. If the given object is 0, the former * registration is unregistered. * @param globalRef the static pointer where this object is stored * This pointer will be reset to 0 after deletion of the object. @@ -106,9 +106,9 @@ public: deleteit = obj; array = isArray; if (obj) - KGlobal::registerStaticDeleter(this); + TDEGlobal::registerStaticDeleter(this); else - KGlobal::unregisterStaticDeleter(this); + TDEGlobal::unregisterStaticDeleter(this); globalRef = obj; return obj; } @@ -127,7 +127,7 @@ public: deleteit = 0; } virtual ~KStaticDeleter() { - KGlobal::unregisterStaticDeleter(this); + TDEGlobal::unregisterStaticDeleter(this); destructObject(); } private: diff --git a/tdecore/kstdaccel.cpp b/tdecore/kstdaccel.cpp index cb2d9dbba..fa3abd5af 100644 --- a/tdecore/kstdaccel.cpp +++ b/tdecore/kstdaccel.cpp @@ -126,7 +126,7 @@ static KStdAccelInfo* infoPtr( StdAccel id ) */ static void initialize( StdAccel id ) { - KConfigGroupSaver saver( KGlobal::config(), "Shortcuts" ); + KConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" ); KStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) { diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index d33c3c924..c562c539f 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -654,7 +654,7 @@ TQString KStringHandler::from8Bit( const char *str ) if (!str) return TQString::null; if (!*str) { - static const TQString &emptyString = KGlobal::staticQString(""); + static const TQString &emptyString = TDEGlobal::staticQString(""); return emptyString; } return KStringHandler::isUtf8( str ) ? diff --git a/tdecore/ksycoca.cpp b/tdecore/ksycoca.cpp index fe9e50d57..0a2cd2511 100644 --- a/tdecore/ksycoca.cpp +++ b/tdecore/ksycoca.cpp @@ -114,7 +114,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound ) TQString path; TQCString ksycoca_env = getenv("TDESYCOCA"); if (ksycoca_env.isEmpty()) - path = KGlobal::dirs()->saveLocation("cache") + "ksycoca"; + path = TDEGlobal::dirs()->saveLocation("cache") + "ksycoca"; else path = TQFile::decodeName(ksycoca_env); @@ -424,7 +424,7 @@ TQStringList KSycoca::allResourceDirs() TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char *_resource ) { TQString sRelativeFilePath; - TQStringList dirs = KGlobal::dirs()->resourceDirs( _resource ); + TQStringList dirs = TDEGlobal::dirs()->resourceDirs( _resource ); TQStringList::ConstIterator dirsit = dirs.begin(); for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) { // might need canonicalPath() ... diff --git a/tdecore/ktempdir.cpp b/tdecore/ktempdir.cpp index 8a4d88c2e..69554fd86 100644 --- a/tdecore/ktempdir.cpp +++ b/tdecore/ktempdir.cpp @@ -63,7 +63,7 @@ KTempDir::KTempDir(TQString directoryPrefix, int mode) mError=0; if (directoryPrefix.isEmpty()) { - directoryPrefix = locateLocal("tmp", KGlobal::instance()->instanceName()); + directoryPrefix = locateLocal("tmp", TDEGlobal::instance()->instanceName()); } (void) create(directoryPrefix , mode); } diff --git a/tdecore/ktempfile.cpp b/tdecore/ktempfile.cpp index db8ba796d..35d66f81c 100644 --- a/tdecore/ktempfile.cpp +++ b/tdecore/ktempfile.cpp @@ -71,7 +71,7 @@ KTempFile::KTempFile(TQString filePrefix, TQString fileExtension, int mode) fileExtension = ".tmp"; if (filePrefix.isEmpty()) { - filePrefix = locateLocal("tmp", KGlobal::instance()->instanceName()); + filePrefix = locateLocal("tmp", TDEGlobal::instance()->instanceName()); } (void) create(filePrefix, fileExtension, mode); } diff --git a/tdecore/ktimezones.cpp b/tdecore/ktimezones.cpp index 77a0cca0f..b46e05dd5 100644 --- a/tdecore/ktimezones.cpp +++ b/tdecore/ktimezones.cpp @@ -400,7 +400,7 @@ const KTimezones::ZoneMap KTimezones::allZones() "/bin/awk" << "'{print \"??\\t+9999+99999\\t\" $2}'"; // Note the use of blocking here...it is a trivial amount of data! temp.close(); - reader.start(KProcess::Block); + reader.start(TDEProcess::Block); f.setName(temp.name()); if (!temp.status() || !f.open(IO_ReadOnly)) { diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index 7817742bc..9479029a9 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -334,14 +334,14 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de if (decodeDots) { #ifndef KDE_QT_ONLY - static const TQString &encodedDot = KGlobal::staticQString("%2e"); + static const TQString &encodedDot = TDEGlobal::staticQString("%2e"); #else TQString encodedDot("%2e"); #endif if (path.find(encodedDot, 0, false) != -1) { #ifndef KDE_QT_ONLY - static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase! + static const TQString &encodedDOT = TDEGlobal::staticQString("%2E"); // Uppercase! #else TQString encodedDOT("%2E"); #endif @@ -2340,7 +2340,7 @@ KURL::URIMode KURL::uriModeForProtocol(const TQString& protocol) KURL::URIMode mode = Auto; if (protocol == fileProt) return URL; - if (KGlobal::_instance) + if (TDEGlobal::_instance) mode = KProtocolInfo::uriParseMode(protocol); if (mode == Auto ) { #else diff --git a/tdecore/kurldrag.cpp b/tdecore/kurldrag.cpp index 2b07c2580..20aa6388e 100644 --- a/tdecore/kurldrag.cpp +++ b/tdecore/kurldrag.cpp @@ -253,7 +253,7 @@ TQByteArray KURLDrag::encodedData( const char* mime ) const KURL KURLDrag::stringToUrl(const TQCString &s) { if (strncmp(s.data(), "file:", 5) == 0) - return KURL(s, KGlobal::locale()->fileEncodingMib()); + return KURL(s, TDEGlobal::locale()->fileEncodingMib()); return KURL(s, 106); // 106 is mib enum for utf8 codec; } @@ -263,12 +263,12 @@ TQString KURLDrag::urlToString(const KURL &url) if (url.isLocalFile()) { #if 1 - return url.url(0, KGlobal::locale()->fileEncodingMib()); + return url.url(0, TDEGlobal::locale()->fileEncodingMib()); #else // According to the XDND spec, file:/ URLs for DND must have // the hostname part. But in really it just breaks many apps, // so it's disabled for now. - TQString s = url.url(0, KGlobal::locale()->fileEncodingMib()); + TQString s = url.url(0, TDEGlobal::locale()->fileEncodingMib()); if( !s.startsWith( "file://" )) { char hostname[257]; diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp index 77c085e08..41075685e 100644 --- a/tdecore/network/kresolverstandardworkers.cpp +++ b/tdecore/network/kresolverstandardworkers.cpp @@ -84,7 +84,7 @@ void KBlacklistWorker::init() // HACK! // FIXME KDE4: How do I detect there is an instance, without triggering // its creation or an assertion fault? - if (!KGlobal::_instance) + if (!TDEGlobal::_instance) return; static bool beenhere = false; @@ -99,7 +99,7 @@ void KBlacklistWorker::init() void KBlacklistWorker::loadBlacklist() { TQMutexLocker locker(&blacklistMutex); - TQStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist"); + TQStringList filelist = TDEGlobal::dirs()->findAllResources("config", "ipv6blacklist"); TQStringList::ConstIterator it = filelist.constBegin(), end = filelist.constEnd(); diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp index 8dc501590..7c253ee34 100644 --- a/tdecore/networkbackends/network-manager/network-manager.cpp +++ b/tdecore/networkbackends/network-manager/network-manager.cpp @@ -1299,7 +1299,7 @@ TQString macAddressForGenericDevice(TQT_DBusObjectPath path) { } TQString tdeDeviceUUIDForMACAddress(TQString macAddress) { - TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices(); + TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); if (!hwdevices) { return TQString::null; } diff --git a/tdecore/tde-config.cpp.cmake b/tdecore/tde-config.cpp.cmake index 9fe328509..18d2a373f 100644 --- a/tdecore/tde-config.cpp.cmake +++ b/tdecore/tde-config.cpp.cmake @@ -121,8 +121,8 @@ int main(int argc, char **argv) TDEInstance a("tde-config"); a.setConfigReadOnly(TRUE); - (void)KGlobal::dirs(); // trigger the creation - (void)KGlobal::config(); + (void)TDEGlobal::dirs(); // trigger the creation + (void)TDEGlobal::config(); // Get application specific arguments TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); @@ -151,7 +151,7 @@ int main(int argc, char **argv) if (args->isSet("localprefix")) { - printResult(KGlobal::dirs()->localtdedir()); + printResult(TDEGlobal::dirs()->localtdedir()); return 0; } @@ -163,7 +163,7 @@ int main(int argc, char **argv) if (args->isSet("types")) { - TQStringList types = KGlobal::dirs()->allTypes(); + TQStringList types = TDEGlobal::dirs()->allTypes(); types.sort(); const char *helptexts[] = { "apps", I18N_NOOP("Applications menu (.desktop files)"), @@ -211,7 +211,7 @@ int main(int argc, char **argv) TQString type = args->getOption("path"); if (!type.isEmpty()) { - printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":")); + printResult(TDEGlobal::dirs()->resourceDirs(type.latin1()).join(":")); return 0; } @@ -219,13 +219,13 @@ int main(int argc, char **argv) if (!type.isEmpty()) { if ( type == "desktop" ) - printResult(KGlobalSettings::desktopPath()); + printResult(TDEGlobalSettings::desktopPath()); else if ( type == "autostart" ) - printResult(KGlobalSettings::autostartPath()); + printResult(TDEGlobalSettings::autostartPath()); else if ( type == "trash" ) - printResult(KGlobalSettings::trashPath()); + printResult(TDEGlobalSettings::trashPath()); else if ( type == "document" ) - printResult(KGlobalSettings::documentPath()); + printResult(TDEGlobalSettings::documentPath()); else fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").arg(type).local8Bit().data() ); return 0; diff --git a/tdecore/tde-config.cpp.in b/tdecore/tde-config.cpp.in index 61feeea7f..3d6ba7850 100644 --- a/tdecore/tde-config.cpp.in +++ b/tdecore/tde-config.cpp.in @@ -121,8 +121,8 @@ int main(int argc, char **argv) TDEInstance a("tde-config"); a.setConfigReadOnly(TRUE); - (void)KGlobal::dirs(); // trigger the creation - (void)KGlobal::config(); + (void)TDEGlobal::dirs(); // trigger the creation + (void)TDEGlobal::config(); // Get application specific arguments TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); @@ -151,7 +151,7 @@ int main(int argc, char **argv) if (args->isSet("localprefix")) { - printResult(KGlobal::dirs()->localtdedir()); + printResult(TDEGlobal::dirs()->localtdedir()); return 0; } @@ -163,7 +163,7 @@ int main(int argc, char **argv) if (args->isSet("types")) { - TQStringList types = KGlobal::dirs()->allTypes(); + TQStringList types = TDEGlobal::dirs()->allTypes(); types.sort(); const char *helptexts[] = { "apps", I18N_NOOP("Applications menu (.desktop files)"), @@ -210,7 +210,7 @@ int main(int argc, char **argv) TQString type = args->getOption("path"); if (!type.isEmpty()) { - printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":")); + printResult(TDEGlobal::dirs()->resourceDirs(type.latin1()).join(":")); return 0; } @@ -218,13 +218,13 @@ int main(int argc, char **argv) if (!type.isEmpty()) { if ( type == "desktop" ) - printResult(KGlobalSettings::desktopPath()); + printResult(TDEGlobalSettings::desktopPath()); else if ( type == "autostart" ) - printResult(KGlobalSettings::autostartPath()); + printResult(TDEGlobalSettings::autostartPath()); else if ( type == "trash" ) - printResult(KGlobalSettings::trashPath()); + printResult(TDEGlobalSettings::trashPath()); else if ( type == "document" ) - printResult(KGlobalSettings::documentPath()); + printResult(TDEGlobalSettings::documentPath()); else fprintf(stderr, "%s", TQString(i18n("%1 - unknown type of userpath\n").arg(type)).local8Bit().data() ); return 0; diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index f9c2859c2..372f779c1 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -287,7 +287,7 @@ TDEGenericDevice* TDEGenericDevice::parentDevice() { } TQPixmap TDEGenericDevice::icon(KIcon::StdSizes size) { - return KGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size); + return TDEGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size); } bool TDEGenericDevice::blacklistedForUpdate() { @@ -299,7 +299,7 @@ void TDEGenericDevice::internalSetBlacklistedForUpdate(bool bl) { } TQString TDEGenericDevice::friendlyDeviceType() { - return KGlobal::hardwareDevices()->getFriendlyDeviceTypeStringFromType(type()); + return TDEGlobal::hardwareDevices()->getFriendlyDeviceTypeStringFromType(type()); } TQString TDEGenericDevice::busID() { @@ -321,10 +321,10 @@ TQString TDEGenericDevice::friendlyName() { m_friendlyName = friendlyDriverName; } else if (m_modAlias.lower().startsWith("pci")) { - m_friendlyName = KGlobal::hardwareDevices()->findPCIDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID); + m_friendlyName = TDEGlobal::hardwareDevices()->findPCIDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID); } else if (m_modAlias.lower().startsWith("usb")) { - m_friendlyName = KGlobal::hardwareDevices()->findUSBDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID); + m_friendlyName = TDEGlobal::hardwareDevices()->findUSBDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID); } else { TQString acpigentype = systemPath(); @@ -333,7 +333,7 @@ TQString TDEGenericDevice::friendlyName() { TQString pnpgentype = acpigentype; pnpgentype.truncate(pnpgentype.find(":")); if (pnpgentype.startsWith("PNP")) { - m_friendlyName = KGlobal::hardwareDevices()->findPNPDeviceName(pnpgentype); + m_friendlyName = TDEGlobal::hardwareDevices()->findPNPDeviceName(pnpgentype); } else if (acpigentype.startsWith("device:")) { acpigentype.remove(0, acpigentype.findRev(":")+1); @@ -706,7 +706,7 @@ TQString TDEStorageDevice::mountPath() { // where is listed in /dm/name // First, ensure that all device information (mainly holders/slaves) is accurate - KGlobal::hardwareDevices()->rescanDeviceInformation(this); + TDEGlobal::hardwareDevices()->rescanDeviceInformation(this); TQString dmnodename = systemPath(); dmnodename.append("/dm/name"); @@ -746,7 +746,7 @@ TQString TDEStorageDevice::mountPath() { TQStringList slaveDeviceList = holdingDevices(); for ( TQStringList::Iterator slavedevit = slaveDeviceList.begin(); slavedevit != slaveDeviceList.end(); ++slavedevit ) { // Try to locate this device path in the TDE device tree - TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices(); + TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEGenericDevice *hwdevice = hwdevices->findBySystemPath(*slavedevit); if ((hwdevice) && (hwdevice->type() == TDEGenericDeviceType::Disk)) { TDEStorageDevice* sdevice = static_cast(hwdevice); @@ -792,7 +792,7 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TQString mountOptions } // Update internal mount data - KGlobal::hardwareDevices()->processModifiedMounts(); + TDEGlobal::hardwareDevices()->processModifiedMounts(); ret = mountPath(); @@ -841,7 +841,7 @@ TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString me } // Update internal mount data - KGlobal::hardwareDevices()->processModifiedMounts(); + TDEGlobal::hardwareDevices()->processModifiedMounts(); ret = mountPath(); @@ -879,7 +879,7 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) { } // Update internal mount data - KGlobal::hardwareDevices()->processModifiedMounts(); + TDEGlobal::hardwareDevices()->processModifiedMounts(); return false; } @@ -1025,7 +1025,7 @@ void TDECPUDevice::setGovernor(TQString gv) { #endif // WITH_UPOWER // Force update of the device information object - KGlobal::hardwareDevices()->processModifiedCPUs(); + TDEGlobal::hardwareDevices()->processModifiedCPUs(); } bool TDECPUDevice::canSetMaximumScalingFrequency() { @@ -1049,7 +1049,7 @@ void TDECPUDevice::setMaximumScalingFrequency(double fr) { } // Force update of the device information object - KGlobal::hardwareDevices()->processModifiedCPUs(); + TDEGlobal::hardwareDevices()->processModifiedCPUs(); } int TDECPUDevice::coreNumber() { @@ -1217,7 +1217,7 @@ bool TDERootSystemDevice::canPowerOff() { // Can we power down this system? // This should probably be checked via DCOP and therefore interface with KDM - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->reparseConfiguration(); // config may have changed in the KControl module config->setGroup("General" ); @@ -3065,7 +3065,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_ } } else { - TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data")); + TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data")); TQString hardware_info_directory_suffix("tdehwlib/deviceclasses/"); TQString hardware_info_directory; @@ -3079,7 +3079,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_ hardware_info_directory = (*it); hardware_info_directory += hardware_info_directory_suffix; - if (KGlobal::dirs()->exists(hardware_info_directory)) { + if (TDEGlobal::dirs()->exists(hardware_info_directory)) { TQDir d(hardware_info_directory); d.setFilter( TQDir::Files | TQDir::Hidden ); @@ -5126,7 +5126,7 @@ TQString TDEHardwareDevices::findPNPDeviceName(TQString pnpid) { if (!pnp_id_map) { pnp_id_map = new TDEDeviceIDMap; - TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data")); + TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data")); TQString hardware_info_directory_suffix("tdehwlib/pnpdev/"); TQString hardware_info_directory; TQString database_filename; @@ -5135,7 +5135,7 @@ TQString TDEHardwareDevices::findPNPDeviceName(TQString pnpid) { hardware_info_directory = (*it); hardware_info_directory += hardware_info_directory_suffix; - if (KGlobal::dirs()->exists(hardware_info_directory)) { + if (TDEGlobal::dirs()->exists(hardware_info_directory)) { database_filename = hardware_info_directory + "pnp.ids"; if (TQFile::exists(database_filename)) { break; @@ -5196,7 +5196,7 @@ TQString TDEHardwareDevices::findMonitorManufacturerName(TQString dpyid) { if (!dpy_id_map) { dpy_id_map = new TDEDeviceIDMap; - TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data")); + TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data")); TQString hardware_info_directory_suffix("tdehwlib/pnpdev/"); TQString hardware_info_directory; TQString database_filename; @@ -5205,7 +5205,7 @@ TQString TDEHardwareDevices::findMonitorManufacturerName(TQString dpyid) { hardware_info_directory = (*it); hardware_info_directory += hardware_info_directory_suffix; - if (KGlobal::dirs()->exists(hardware_info_directory)) { + if (TDEGlobal::dirs()->exists(hardware_info_directory)) { database_filename = hardware_info_directory + "dpy.ids"; if (TQFile::exists(database_filename)) { break; diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp index 80f34b765..2705343f7 100644 --- a/tdecore/tdenetworkconnections.cpp +++ b/tdecore/tdenetworkconnections.cpp @@ -717,7 +717,7 @@ TDENetworkConnection* TDENetworkConnectionManager::findConnectionByUUID(TQString } TDENetworkDevice* TDENetworkConnectionManager::findDeviceByUUID(TQString uuid) { - TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices(); + TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); if (!hwdevices) return NULL; TDEGenericHardwareList devices = hwdevices->listByDeviceClass(TDEGenericDeviceType::Network); @@ -1071,7 +1071,7 @@ TDENetworkDevice* TDEGlobalNetworkManager::findDeviceByUUID(TQString uuid) { } TDENetworkWiFiAPInfo* TDEGlobalNetworkManager::findAccessPointByBSSID(TDEMACAddress bssid) { - TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices(); + TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); if (!hwdevices) { return NULL; } diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp index 62b14aa7a..fef409d71 100644 --- a/tdecore/tests/kcalendartest.cpp +++ b/tdecore/tests/kcalendartest.cpp @@ -57,7 +57,7 @@ int main(int argc, char **argv) { calType = args->getOption("type"); - KGlobal::locale()->setCalendar(calType); + TDEGlobal::locale()->setCalendar(calType); /* * If we like to see some date @@ -65,7 +65,7 @@ int main(int argc, char **argv) { */ if ( args->isSet("date") ) { option = args->getOption("date"); - date = KGlobal::locale()->readDate(option); + date = TDEGlobal::locale()->readDate(option); } else date = TQDate::currentDate(); @@ -83,70 +83,70 @@ void test(TQDate & date) { kdDebug() << "(KLocale) readDate" << endl; - kdDebug() << "Created calendar: " << KGlobal::locale()->calendar()->calendarName() << endl; + kdDebug() << "Created calendar: " << TDEGlobal::locale()->calendar()->calendarName() << endl; - kdDebug() << "Day name for first day of week is " << KGlobal::locale()->calendar()->weekDayName(1) << endl; - kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->weekDayName(1, true) << endl; + kdDebug() << "Day name for first day of week is " << TDEGlobal::locale()->calendar()->weekDayName(1) << endl; + kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->weekDayName(1, true) << endl; - kdDebug() << "Month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date)) << endl; - kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date), true) << endl; - kdDebug() << "Month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date)) << endl; - kdDebug() << "Short month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date), true) << endl; - kdDebug() << "Month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date)) << endl; - kdDebug() << "Short month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date), true) << endl; - kdDebug() << "Month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date)) << endl; - kdDebug() << "Short month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date), true) << endl; + kdDebug() << "Month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date)) << endl; + kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date), true) << endl; + kdDebug() << "Month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date)) << endl; + kdDebug() << "Short month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date), true) << endl; + kdDebug() << "Month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date)) << endl; + kdDebug() << "Short month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date), true) << endl; + kdDebug() << "Month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date)) << endl; + kdDebug() << "Short month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date), true) << endl; - kdDebug() << "Day for date " << date.toString() << " is " << KGlobal::locale()->calendar()->day(date) << endl; - kdDebug() << "Month for date " << date.toString() << " is " << KGlobal::locale()->calendar()->month(date) << endl; - kdDebug() << "Year for date " << date.toString() << " is " << KGlobal::locale()->calendar()->year(date) << endl; + kdDebug() << "Day for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->day(date) << endl; + kdDebug() << "Month for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->month(date) << endl; + kdDebug() << "Year for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->year(date) << endl; - kdDebug() << "Day for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->dayString(date, true) << endl; - kdDebug() << "Month for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->monthString(date, true) << endl; - kdDebug() << "Year for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->yearString(date, true) << endl; + kdDebug() << "Day for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->dayString(date, true) << endl; + kdDebug() << "Month for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->monthString(date, true) << endl; + kdDebug() << "Year for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->yearString(date, true) << endl; - kdDebug() << "Day of week for date " << date.toString() << " is number " << KGlobal::locale()->calendar()->dayOfWeek(date) << endl; - kdDebug() << "Week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date) << endl; - kdDebug() << "Short week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date, true) << endl; + kdDebug() << "Day of week for date " << date.toString() << " is number " << TDEGlobal::locale()->calendar()->dayOfWeek(date) << endl; + kdDebug() << "Week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date) << endl; + kdDebug() << "Short week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date, true) << endl; - kdDebug() << "Month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date) << endl; - kdDebug() << "Short month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date, true) << endl; - kdDebug() << "Month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date) << endl; - kdDebug() << "Short month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl; + kdDebug() << "Month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date) << endl; + kdDebug() << "Short month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date, true) << endl; + kdDebug() << "Month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date) << endl; + kdDebug() << "Short month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl; - kdDebug() << "It's week number " << KGlobal::locale()->calendar()->weekNumber(date) << endl; + kdDebug() << "It's week number " << TDEGlobal::locale()->calendar()->weekNumber(date) << endl; - kdDebug() << "(KLocale) Formatted date: " << KGlobal::locale()->formatDate(date) << endl; - kdDebug() << "(KLocale) Short formatted date: " << KGlobal::locale()->formatDate(date, true) << endl; + kdDebug() << "(KLocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl; + kdDebug() << "(KLocale) Short formatted date: " << TDEGlobal::locale()->formatDate(date, true) << endl; - kdDebug() << "That month have : " << KGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl; + kdDebug() << "That month have : " << TDEGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl; - kdDebug() << "That year has " << KGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl; - kdDebug() << "There are " << KGlobal::locale()->calendar()->weeksInYear(KGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl; - kdDebug() << "There are " << KGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl; + kdDebug() << "That year has " << TDEGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl; + kdDebug() << "There are " << TDEGlobal::locale()->calendar()->weeksInYear(TDEGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl; + kdDebug() << "There are " << TDEGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl; - kdDebug() << "The day of pray is number " << KGlobal::locale()->calendar()->weekDayOfPray() << endl; + kdDebug() << "The day of pray is number " << TDEGlobal::locale()->calendar()->weekDayOfPray() << endl; - kdDebug() << "Max valid year supported is " << KGlobal::locale()->calendar()->maxValidYear() << endl; - kdDebug() << "Min valid year supported is " << KGlobal::locale()->calendar()->minValidYear() << endl; + kdDebug() << "Max valid year supported is " << TDEGlobal::locale()->calendar()->maxValidYear() << endl; + kdDebug() << "Min valid year supported is " << TDEGlobal::locale()->calendar()->minValidYear() << endl; - kdDebug() << "It's the day number " << KGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl; + kdDebug() << "It's the day number " << TDEGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl; kdDebug() << "Add 3 days" << endl; - date = KGlobal::locale()->calendar()->addDays(date, 3); - kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl; + date = TDEGlobal::locale()->calendar()->addDays(date, 3); + kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl; kdDebug() << "Then add 3 months" << endl; - date = KGlobal::locale()->calendar()->addMonths(date, 3); - kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl; + date = TDEGlobal::locale()->calendar()->addMonths(date, 3); + kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl; kdDebug() << "And last, add -3 years" << endl; - date = KGlobal::locale()->calendar()->addYears(date, -3); - kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl; + date = TDEGlobal::locale()->calendar()->addYears(date, -3); + kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl; - kdDebug() << "Is lunar based: " << KGlobal::locale()->calendar()->isLunar() << endl; - kdDebug() << "Is lunisolar based: " << KGlobal::locale()->calendar()->isLunisolar() << endl; - kdDebug() << "Is solar based: " << KGlobal::locale()->calendar()->isSolar() << endl; + kdDebug() << "Is lunar based: " << TDEGlobal::locale()->calendar()->isLunar() << endl; + kdDebug() << "Is lunisolar based: " << TDEGlobal::locale()->calendar()->isLunisolar() << endl; + kdDebug() << "Is solar based: " << TDEGlobal::locale()->calendar()->isSolar() << endl; } diff --git a/tdecore/tests/kiconloadertest.cpp b/tdecore/tests/kiconloadertest.cpp index fba38f8bf..27dcdf845 100644 --- a/tdecore/tests/kiconloadertest.cpp +++ b/tdecore/tests/kiconloadertest.cpp @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) { TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/); - KIconLoader * mpLoader = KGlobal::iconLoader(); + KIconLoader * mpLoader = TDEGlobal::iconLoader(); KIcon::Context mContext = KIcon::Application; TQTime dt; dt.start(); diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 3c8df342e..bcb7bc9e8 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -70,19 +70,19 @@ void Test::createFields() TQString string; string+="Selected languages: "; - string+=KGlobal::locale()->languages()+"\n"; + string+=TDEGlobal::locale()->languages()+"\n"; // This will show nothing, as there is no klocaletest.mo // but you can copy other *.mo file string+="Used language: "; - string+=KGlobal::locale()->language()+"\n"; + string+=TDEGlobal::locale()->language()+"\n"; string+="Locale encoding: "; - string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n"; + string+=TQString::fromLatin1(TDEGlobal::locale()->encoding())+"\n"; string+="Localized date and time: "; - string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); + string+=TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); string+="\nLocalized monetary numbers: "; - string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89); + string+=TDEGlobal::locale()->formatMoney(1234567.89) + " / \n" +TDEGlobal::locale()->formatMoney(-1234567.89); // This will not work // but you can copy other *.mo file string+="\nSome localized strings:\n"; @@ -93,7 +93,7 @@ void Test::createFields() label=new TQLabel(string,this,"Label"); label->setGeometry(10,10,400,400); - label->setFont(KGlobalSettings::generalFont()); + label->setFont(TDEGlobalSettings::generalFont()); label->show(); } @@ -102,47 +102,47 @@ int main( int argc, char ** argv ) KLocale::setMainCatalogue("tdelibs"); TDEApplication a( argc, argv, "klocaletest" ); - KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); - KGlobal::locale()->setCountry(TQString::fromLatin1("C")); - KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); + TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); + TDEGlobal::locale()->setCountry(TQString::fromLatin1("C")); + TDEGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); TQString formatted; - formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); - formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70"); - formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20"); - formatted = KGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24"); - formatted = KGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/ - formatted = KGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457"); + formatted = TDEGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); + formatted = TDEGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70"); + formatted = TDEGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20"); + formatted = TDEGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24"); + formatted = TDEGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/ + formatted = TDEGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457"); - formatted = KGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00"); - formatted = KGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00"); - formatted = KGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70"); - formatted = KGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */ - formatted = KGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20"); - formatted = KGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24"); - formatted = KGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/ - formatted = KGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/ - formatted = KGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789"); + formatted = TDEGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00"); + formatted = TDEGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00"); + formatted = TDEGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70"); + formatted = TDEGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */ + formatted = TDEGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20"); + formatted = TDEGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24"); + formatted = TDEGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/ + formatted = TDEGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/ + formatted = TDEGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789"); double num; bool ok; - num = KGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes"); - num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no"); - num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes"); - num = KGlobal::locale()->readNumber( "1.12345678912", &ok ); + num = TDEGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes"); + num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no"); + num = TDEGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes"); + num = TDEGlobal::locale()->readNumber( "1.12345678912", &ok ); tqDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes"); // bug 95511 - KLocale locale(*KGlobal::locale()); + KLocale locale(*TDEGlobal::locale()); locale.setCurrencySymbol("$$"); num = locale.readMoney("1,234,567.89$$", &ok); check("readMoney(1,234,567.89$$)",ok?"yes":"no","yes"); @@ -151,41 +151,41 @@ int main( int argc, char ** argv ) TQDate date; date.setYMD( 2002, 5, 3 ); - checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + checkDate("readDate( 3, 5, 2002 )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) ); date = TQDate::currentDate(); - checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + checkDate("readDate( TQDate::currentDate() )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) ); TQTime time; - time = KGlobal::locale()->readTime( "11:22:33", &ok ); + time = TDEGlobal::locale()->readTime( "11:22:33", &ok ); check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ? "yes" : "no", "yes"); - time = KGlobal::locale()->readTime( "11:22", &ok ); + time = TDEGlobal::locale()->readTime( "11:22", &ok ); check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ? "yes" : "no", "yes"); - time = KGlobal::locale()->readTime( "foo", &ok ); + time = TDEGlobal::locale()->readTime( "foo", &ok ); check("readTime(\"foo\")", (!ok && !time.isValid()) ? "invalid" : "valid", "invalid"); - time = KGlobal::locale()->readTime( "11:22:33", KLocale::WithoutSeconds, &ok ); + time = TDEGlobal::locale()->readTime( "11:22:33", KLocale::WithoutSeconds, &ok ); check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ? "invalid" : "valid", "invalid"); - time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok ); + time = TDEGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok ); check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ? "yes" : "no", "yes"); - KGlobal::locale()->setTimeFormat( "%H:%M %p" ); + TDEGlobal::locale()->setTimeFormat( "%H:%M %p" ); time = TQTime( 0, 22, 33 ); - TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ ); + TQString timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ ); check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" ); - timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ ); + timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ ); check("formatTime(\"0:22\", as duration)", timeStr, "00:22" ); kdDebug() << "setLanguage C\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("C")); + TDEGlobal::locale()->setLanguage(TQString::fromLatin1("C")); kdDebug() << "C: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl; kdDebug() << "setLanguage de\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("de")); + TDEGlobal::locale()->setLanguage(TQString::fromLatin1("de")); kdDebug() << "de: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl; diff --git a/tdecore/tests/kprocesstest.cpp b/tdecore/tests/kprocesstest.cpp index bec7c0dd2..f86cb2f20 100644 --- a/tdecore/tests/kprocesstest.cpp +++ b/tdecore/tests/kprocesstest.cpp @@ -1,5 +1,5 @@ // -// MAIN -- a little demo of the capabilities of the "KProcess" class +// MAIN -- a little demo of the capabilities of the "TDEProcess" class // // version 0.2, Aug 2nd 1997 // $Id$ @@ -32,12 +32,12 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n int main(int argc, char *argv[]) { - KProcess p1, p2, p3, p4; + TDEProcess p1, p2, p3, p4; Dummy dummy; TDEApplication app(argc, argv, "kprocesstest"); - printf("Welcome to the KProcess Demo Application!\n"); + printf("Welcome to the TDEProcess Demo Application!\n"); // // The kghostview demo -- Starts a kghostview instance blocking. -- After @@ -46,39 +46,39 @@ int main(int argc, char *argv[]) // p1 << "kghostview"; - TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *))); + TQObject::connect(&p1, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *))); printf("starting kghostview blocking (close to continue)\n"); - p1.start(KProcess::Block); + p1.start(TDEProcess::Block); printf("restarting kghostview non blocking\n"); p1.start(); // // A konsole with tcsh to demonstrate how to pass command line options to a process - // with "KProcess" (is run blocking) + // with "TDEProcess" (is run blocking) // printf("Starting konsole with /bin/tcsh as shell (close to continue)\n"); p2 << "konsole" << "-e" << "/bin/tcsh"; p2.setWorkingDirectory("/tmp"); - TQObject::connect(&p2, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *))); - p2.start(KProcess::Block); + TQObject::connect(&p2, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *))); + p2.start(TDEProcess::Block); // // Getting the output from a process. "ls" with parameter "-l" is called and it output is captured // p3 << "ls" << "-l"; - TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)), - &dummy, TQT_SLOT(printMessage(KProcess *))); + TQObject::connect(&p3, TQT_SIGNAL(processExited(TDEProcess *)), + &dummy, TQT_SLOT(printMessage(TDEProcess *))); - TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int))); - TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int))); + TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); - p3.start(KProcess::NotifyOnExit, KProcess::AllOutput); + p3.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput); // @@ -93,18 +93,18 @@ int main(int argc, char *argv[]) // p4 << "sort"; - TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)), - &dummy, TQT_SLOT(printMessage(KProcess *))); + TQObject::connect(&p4, TQT_SIGNAL(processExited(TDEProcess *)), + &dummy, TQT_SLOT(printMessage(TDEProcess *))); - TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int))); - TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int))); + TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); - TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(KProcess *)), - &dummy, TQT_SLOT(outputDone(KProcess *))); + TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(TDEProcess *)), + &dummy, TQT_SLOT(outputDone(TDEProcess *))); - p4.start(KProcess::NotifyOnExit, KProcess::All); + p4.start(TDEProcess::NotifyOnExit, TDEProcess::All); printf("after p4.start"); p4.writeStdin(txt, strlen(txt)); diff --git a/tdecore/tests/kprocesstest.h b/tdecore/tests/kprocesstest.h index 23ac443dd..5817af438 100644 --- a/tdecore/tests/kprocesstest.h +++ b/tdecore/tests/kprocesstest.h @@ -1,5 +1,5 @@ // -// DUMMY -- A dummy class with a slot to demonstrate KProcess signals +// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals // // version 0.2, Aug 2nd 1997 // @@ -20,20 +20,20 @@ class Dummy : public TQObject Q_OBJECT public slots: - void printMessage(KProcess *proc) + void printMessage(TDEProcess *proc) { printf("Process %d exited!\n", (int)proc->getPid()); } - void gotOutput(KProcess*, char *buffer, int len) + void gotOutput(TDEProcess*, char *buffer, int len) { - char result[1025]; // this is ugly since it relys on the internal buffer size of KProcess, + char result[1025]; // this is ugly since it relys on the internal buffer size of TDEProcess, memcpy(result, buffer, len); // NEVER do that in your own application... ;-) result[len] = '\0'; printf("OUTPUT>>%s", result); } - void outputDone(KProcess *proc) + void outputDone(TDEProcess *proc) /* Slot Procedure for the "sort" example. -- If it is indicated that the "sort" command has absorbed all its input, we send an "EOF" to it to indicate that there is no more diff --git a/tdecore/tests/kprociotest.cpp b/tdecore/tests/kprociotest.cpp index c637e35b2..a4fbb19ad 100644 --- a/tdecore/tests/kprociotest.cpp +++ b/tdecore/tests/kprociotest.cpp @@ -1,5 +1,5 @@ // -// MAIN -- a little demo of the capabilities of the "KProcess" class +// MAIN -- a little demo of the capabilities of the "TDEProcess" class // // version 0.2, Aug 2nd 1997 // $Id$ @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) p << "rev"; - p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*))); + p.connect(&p, TQT_SIGNAL(processExited(TDEProcess*)), &dummy, TQT_SLOT(printMessage(TDEProcess*))); p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*))); bool b; diff --git a/tdecore/tests/kprociotest.h b/tdecore/tests/kprociotest.h index 9f948e644..fd60bb87b 100644 --- a/tdecore/tests/kprociotest.h +++ b/tdecore/tests/kprociotest.h @@ -1,5 +1,5 @@ // -// DUMMY -- A dummy class with a slot to demonstrate KProcess signals +// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals // // version 0.2, Aug 2nd 1997 // @@ -20,7 +20,7 @@ class Dummy : public TQObject Q_OBJECT public slots: - void printMessage(KProcess *proc) + void printMessage(TDEProcess *proc) { printf("Process %d exited!\n", (int)proc->getPid()); } diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index 47d709a9b..f1284d394 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -817,9 +817,9 @@ int main(int argc, char *argv[]) check("path",ulong.path(),"/servlet/CookieAccepted"); #if TQT_VERSION < 300 - qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) ); + qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) ); #else - TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) ); + TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) ); #endif TQString raw = "data:text/html,%00%2540%00"; check("data URL: encode-decode of %00", KURL(raw).url(), raw ); @@ -862,9 +862,9 @@ int main(int argc, char *argv[]) testAdjustPath(); #if TQT_VERSION < 300 - qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) ); + qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "koi8-r" ) ); #else - TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) ); + TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "koi8-r" ) ); #endif baseURL = "file:/home/coolo"; KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ئاخ7" ); diff --git a/tdecore/twin.cpp b/tdecore/twin.cpp index 63cdc761f..bdd1e099a 100644 --- a/tdecore/twin.cpp +++ b/tdecore/twin.cpp @@ -483,7 +483,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) if( XGetClassHint( tqt_xdisplay(), win, &hint ) ) { TQString className = hint.res_class; - TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth, + TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth, KIcon::DefaultState, 0, true ); if( scale && !pm.isNull() ) result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); @@ -500,7 +500,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) // If the icon is still a null pixmap, load the 'xapp' icon // as a last resort: if ( result.isNull() ) { - TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth, + TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth, KIcon::DefaultState, 0, true ); if( scale && !pm.isNull() ) result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); -- cgit v1.2.1