Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/2/head
Timothy Pearson 12 years ago
parent 7443f5c7a2
commit cf989dcd69

@ -600,7 +600,7 @@ TODO: only re-write a local database if it is changed.
message make sense. message make sense.
2004-04-11 Reinhold Kainhofer 2004-04-11 Reinhold Kainhofer
* Fix the codec handling to use KGlobal::charsets. * Fix the codec handling to use TDEGlobal::charsets.
* Implemented the startListening and stopListening methods of the daemon. * Implemented the startListening and stopListening methods of the daemon.
* Fixed the config dialog so that just showing a conduit's config widget * Fixed the config dialog so that just showing a conduit's config widget
doesn't trigger the modified signal. doesn't trigger the modified signal.

@ -292,14 +292,14 @@ TQString KABCSync::getFieldForHHCustom(
case eCustomBirthdate: case eCustomBirthdate:
if (settings.dateFormat().isEmpty()) if (settings.dateFormat().isEmpty())
{ {
retval = KGlobal::locale()->formatDate(abEntry.birthday().date()); retval = TDEGlobal::locale()->formatDate(abEntry.birthday().date());
} }
else else
{ {
TQString tmpfmt(KGlobal::locale()->dateFormat()); TQString tmpfmt(TDEGlobal::locale()->dateFormat());
KGlobal::locale()->setDateFormat(settings.dateFormat()); TDEGlobal::locale()->setDateFormat(settings.dateFormat());
TQString ret(KGlobal::locale()->formatDate(abEntry.birthday().date())); TQString ret(TDEGlobal::locale()->formatDate(abEntry.birthday().date()));
KGlobal::locale()->setDateFormat(tmpfmt); TDEGlobal::locale()->setDateFormat(tmpfmt);
retval = ret; retval = ret;
} }
break; break;
@ -346,20 +346,20 @@ void KABCSync::setFieldFromHHCustom(
if (settings.dateFormat().isEmpty()) if (settings.dateFormat().isEmpty())
{ {
// empty format means use locale setting // empty format means use locale setting
bdate=KGlobal::locale()->readDate(value, &ok); bdate=TDEGlobal::locale()->readDate(value, &ok);
} }
else else
{ {
// use given format // use given format
bdate=KGlobal::locale()->readDate(value, settings.dateFormat(), &ok); bdate=TDEGlobal::locale()->readDate(value, settings.dateFormat(), &ok);
} }
if (!ok) if (!ok)
{ {
TQString format = KGlobal::locale()->dateFormatShort(); TQString format = TDEGlobal::locale()->dateFormatShort();
TQRegExp re(CSL1("%[yY][^%]*")); TQRegExp re(CSL1("%[yY][^%]*"));
format.remove(re); // Remove references to year and following punctuation format.remove(re); // Remove references to year and following punctuation
bdate = KGlobal::locale()->readDate(value, format, &ok); bdate = TDEGlobal::locale()->readDate(value, format, &ok);
} }
DEBUGKPILOT << "Birthdate from " << index << "-th custom field: " DEBUGKPILOT << "Birthdate from " << index << "-th custom field: "
<< TQString(bdate.toString()) << endl; << TQString(bdate.toString()) << endl;

@ -51,7 +51,7 @@ DOCWidgetConfig::DOCWidgetConfig(TQWidget * w, const char *n):
fWidget=fConfigWidget; fWidget=fConfigWidget;
TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); TQStringList l = TDEGlobal::charsets()->descriptiveEncodingNames();
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it) for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
{ {
fConfigWidget->fEncoding->insertItem(*it); fConfigWidget->fEncoding->insertItem(*it);

@ -60,7 +60,7 @@ ConverterDlg::ConverterDlg( TQWidget *parent, const TQString& caption)
{ {
TQWidget *page = makeHBoxMainWidget(); TQWidget *page = makeHBoxMainWidget();
dlg=new ConverterDlgBase(page); dlg=new ConverterDlgBase(page);
TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); TQStringList l = TDEGlobal::charsets()->descriptiveEncodingNames();
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it) for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
{ {
dlg->fEncoding->insertItem(*it); dlg->fEncoding->insertItem(*it);
@ -420,7 +420,7 @@ void ConverterDlg::slotToPDB()
void ConverterDlg::slotUser1() void ConverterDlg::slotUser1()
{ {
KAboutApplication ab(KGlobal::instance()->aboutData(), this); KAboutApplication ab(TDEGlobal::instance()->aboutData(), this);
ab.show(); ab.show();
ab.exec(); ab.exec();
return; return;

@ -260,7 +260,7 @@ bool KNotesAction::openKNotesResource()
TQString tz(korgcfg.readEntry( "TimeZoneId" ) ); TQString tz(korgcfg.readEntry( "TimeZoneId" ) );
fP->fNotesResource = new KCal::CalendarLocal(tz); fP->fNotesResource = new KCal::CalendarLocal(tz);
KURL mURL = KGlobal::dirs()->saveLocation( "data", "knotes/" ) + "notes.ics"; KURL mURL = TDEGlobal::dirs()->saveLocation( "data", "knotes/" ) + "notes.ics";
if( fP->fNotesResource->load( mURL.path() ) ) if( fP->fNotesResource->load( mURL.path() ) )
{ {

@ -38,7 +38,7 @@ class TQListViewItem;
class TQPushButton; class TQPushButton;
class TQLabel; class TQLabel;
class TQWidgetStack; class TQWidgetStack;
class KProcess; class TDEProcess;
class ConduitConfigBase; class ConduitConfigBase;
class ConduitConfig; class ConduitConfig;

@ -251,7 +251,7 @@ void FileInstallWidget::refreshFileInstallList()
FUNCTIONSETUP; FUNCTIONSETUP;
TQStringList fileNames = fInstaller->fileNames(); TQStringList fileNames = fInstaller->fileNames();
TQPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop); TQPixmap kpilotIcon = TDEGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop);
fIconView->clear(); fIconView->clear();

@ -51,7 +51,7 @@ FileInstaller::FileInstaller() :
{ {
FUNCTIONSETUP; FUNCTIONSETUP;
fDirName = KGlobal::dirs()->saveLocation("data", fDirName = TDEGlobal::dirs()->saveLocation("data",
CSL1("kpilot/pending_install/")); CSL1("kpilot/pending_install/"));
fPendingCopies = 0; fPendingCopies = 0;

@ -328,7 +328,7 @@ static inline bool checkBackupDirectory( const TQString &backupDir )
if (fP->fPreferBackupDir.isEmpty()) if (fP->fPreferBackupDir.isEmpty())
{ {
fP->fBackupDir = fP->fBackupDir =
KGlobal::dirs()->saveLocation("data",CSL1("kpilot/DBBackup/")) + TDEGlobal::dirs()->saveLocation("data",CSL1("kpilot/DBBackup/")) +
deviceLink()->getPilotUser().name() + '/'; deviceLink()->getPilotUser().name() + '/';
} }
else else
@ -923,7 +923,7 @@ CheckUser::~CheckUser()
// fix the database location for local databases. // fix the database location for local databases.
// //
// //
TQString pathName = KGlobal::dirs()->saveLocation("data", TQString pathName = TDEGlobal::dirs()->saveLocation("data",
CSL1("kpilot/DBBackup/")); CSL1("kpilot/DBBackup/"));
if (!guiUserName.isEmpty()) if (!guiUserName.isEmpty())
{ {

@ -255,7 +255,7 @@ void KPilotInstaller::initComponents()
TQWidget *w; TQWidget *w;
#define ADDICONPAGE(a,b) \ #define ADDICONPAGE(a,b) \
pixmap = KGlobal::iconLoader()->loadIcon(b, KIcon::Desktop, 64); \ pixmap = TDEGlobal::iconLoader()->loadIcon(b, KIcon::Desktop, 64); \
w = getManagingWidget()->addVBoxPage(a,TQString(), pixmap) ; w = getManagingWidget()->addVBoxPage(a,TQString(), pixmap) ;
ADDICONPAGE(i18n("HotSync"),CSL1("kpilotbhotsync")); ADDICONPAGE(i18n("HotSync"),CSL1("kpilotbhotsync"));
@ -717,7 +717,7 @@ void KPilotInstaller::optionsConfigureToolbars()
FUNCTIONSETUP; FUNCTIONSETUP;
// use the standard toolbar editor // use the standard toolbar editor
// This was added in KDE 3.1 // This was added in KDE 3.1
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection()); KEditToolbar dlg(actionCollection());
connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig())); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig()));
dlg.exec(); dlg.exec();
@ -729,7 +729,7 @@ void KPilotInstaller::slotNewToolbarConfig()
FUNCTIONSETUP; FUNCTIONSETUP;
// recreate our GUI // recreate our GUI
createGUI(); createGUI();
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); applyMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
} }
void KPilotInstaller::slotResetLink() void KPilotInstaller::slotResetLink()
@ -1126,7 +1126,7 @@ int main(int argc, char **argv)
TQTimer::singleShot(0,tp,TQT_SLOT(startDaemonIfNeeded())); TQTimer::singleShot(0,tp,TQT_SLOT(startDaemonIfNeeded()));
KGlobal::dirs()->addResourceType("pilotdbs", TDEGlobal::dirs()->addResourceType("pilotdbs",
CSL1("share/apps/kpilot/DBBackup")); CSL1("share/apps/kpilot/DBBackup"));
tp->show(); tp->show();
a.setMainWidget(tp); a.setMainWidget(tp);

@ -54,7 +54,7 @@
<entry name="LogFileName" type="String"> <entry name="LogFileName" type="String">
<label> <label>
</label> </label>
<default code="true">KGlobal::dirs()->saveLocation("data", "kpilot/").append("lastsync.log")</default> <default code="true">TDEGlobal::dirs()->saveLocation("data", "kpilot/").append("lastsync.log")</default>
</entry> </entry>
<entry name="StartDaemonAtLogin" type="Bool"> <entry name="StartDaemonAtLogin" type="Bool">
<label> <label>

@ -88,7 +88,7 @@
FUNCTIONSETUP; FUNCTIONSETUP;
TQString lastUser = KPilotSettings::userName(); TQString lastUser = KPilotSettings::userName();
TQString dbsubpath = CSL1("kpilot/DBBackup/"); TQString dbsubpath = CSL1("kpilot/DBBackup/");
TQString defaultDBPath = KGlobal::dirs()-> TQString defaultDBPath = TDEGlobal::dirs()->
saveLocation("data", dbsubpath + lastUser + CSL1("/")); saveLocation("data", dbsubpath + lastUser + CSL1("/"));
return defaultDBPath; return defaultDBPath;
} }
@ -115,7 +115,7 @@ static TQFont *thefont = 0L;
FUNCTIONSETUP; FUNCTIONSETUP;
if (!thefont) if (!thefont)
thefont = new TQFont(KGlobalSettings::fixedFont()); thefont = new TQFont(TDEGlobalSettings::fixedFont());
return *thefont; return *thefont;
} }

@ -76,7 +76,7 @@ DeviceConfigPage::DeviceConfigPage(TQWidget * w, const char *n ) : ConfigPage( w
fConfigWidget = new DeviceConfigWidget( w ); fConfigWidget = new DeviceConfigWidget( w );
// Fill the encodings list // Fill the encodings list
{ {
TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); TQStringList l = TDEGlobal::charsets()->descriptiveEncodingNames();
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
{ {
fConfigWidget->fPilotEncoding->insertItem(*it); fConfigWidget->fPilotEncoding->insertItem(*it);
@ -487,13 +487,13 @@ void StartExitConfigPage::load()
{ {
FUNCTIONSETUP; FUNCTIONSETUP;
TQString autostart = KGlobalSettings::autostartPath(); TQString autostart = TDEGlobalSettings::autostartPath();
TQString desktopfile = CSL1("kpilotdaemon.desktop"); TQString desktopfile = CSL1("kpilotdaemon.desktop");
TQString desktopcategory = CSL1("kde/"); TQString desktopcategory = CSL1("kde/");
TQString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile); TQString location = TDEGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile);
if (location.isEmpty()) // Fallback to KDE 3.0? if (location.isEmpty()) // Fallback to KDE 3.0?
{ {
location = KGlobal::dirs()->findResource("apps",desktopfile); location = TDEGlobal::dirs()->findResource("apps",desktopfile);
} }
#ifdef DEBUG #ifdef DEBUG

@ -156,7 +156,7 @@ LogWidget::LogWidget(TQWidget * parent) :
TQString splashPath = TQString splashPath =
KGlobal::dirs()->findResource("data", TDEGlobal::dirs()->findResource("data",
CSL1("kpilot/kpilot-splash.png")); CSL1("kpilot/kpilot-splash.png"));
if (!splashPath.isEmpty() && TQFile::exists(splashPath)) if (!splashPath.isEmpty() && TQFile::exists(splashPath))

@ -144,7 +144,7 @@ void PilotDaemonTray::setupWidget()
{ {
FUNCTIONSETUP; FUNCTIONSETUP;
KGlobal::iconLoader()->addAppDir( CSL1("kpilot") ); TDEGlobal::iconLoader()->addAppDir( CSL1("kpilot") );
icons[Normal] = loadIcon( CSL1("kpilotDaemon") ); icons[Normal] = loadIcon( CSL1("kpilotDaemon") );
icons[Busy] = loadIcon( CSL1("busysync") ); icons[Busy] = loadIcon( CSL1("busysync") );
icons[NotListening] = loadIcon( CSL1("nosync") ); icons[NotListening] = loadIcon( CSL1("nosync") );
@ -186,7 +186,7 @@ void PilotDaemonTray::setupWidget()
KHelpMenu *help = new KHelpMenu(menu,aboutData); KHelpMenu *help = new KHelpMenu(menu,aboutData);
menu->insertItem( menu->insertItem(
KGlobal::iconLoader()->loadIconSet(CSL1("help"),KIcon::Small,0,true), TDEGlobal::iconLoader()->loadIconSet(CSL1("help"),KIcon::Small,0,true),
i18n("&Help"),help->menu(),false /* no whatsthis */); i18n("&Help"),help->menu(),false /* no whatsthis */);
@ -1236,13 +1236,13 @@ void PilotDaemon::slotRunConfig()
// If it succeeds, we can assume kpilot is running and then try // If it succeeds, we can assume kpilot is running and then try
// to send the configure() DCOP call. // to send the configure() DCOP call.
// If it fails (probably because kpilot isn't running) it tries // If it fails (probably because kpilot isn't running) it tries
// to call kpilot via KProcess (using a command line switch to // to call kpilot via TDEProcess (using a command line switch to
// only bring up the configure dialog). // only bring up the configure dialog).
// //
// Implementing the function this way catches all cases. // Implementing the function this way catches all cases.
// ie 1 KPilot running with configure dialog open (raise()) // ie 1 KPilot running with configure dialog open (raise())
// 2 KPilot running with dialog NOT open (configureConduits()) // 2 KPilot running with dialog NOT open (configureConduits())
// 3 KPilot NOT running (KProcess) // 3 KPilot NOT running (TDEProcess)
DCOPClient *client = kapp->dcopClient(); DCOPClient *client = kapp->dcopClient();
@ -1257,7 +1257,7 @@ void PilotDaemon::slotRunConfig()
else else
{ {
// KPilot not running // KPilot not running
KProcess *p = new KProcess; TDEProcess *p = new TDEProcess;
*p << "kpilot" << "-s"; *p << "kpilot" << "-s";
p->start(); p->start();

@ -57,7 +57,7 @@ IDMapper::IDMapper()
fP = new IDMapperPrivate(); fP = new IDMapperPrivate();
TQString dbPath = KGlobal::dirs()-> TQString dbPath = TDEGlobal::dirs()->
saveLocation("data", CSL1("kpilot/") ); saveLocation("data", CSL1("kpilot/") );
TQString dbFile = dbPath + CSL1("mapping.xml"); TQString dbFile = dbPath + CSL1("mapping.xml");

@ -118,13 +118,13 @@ bool setupPilotCodec(const TQString &s)
FUNCTIONSETUP; FUNCTIONSETUP;
mutex = new TQMutex(); mutex = new TQMutex();
mutex->lock(); mutex->lock();
TQString encoding(KGlobal::charsets()->encodingForName(s)); TQString encoding(TDEGlobal::charsets()->encodingForName(s));
DEBUGKPILOT << fname << ": Using codec name " << s << endl; DEBUGKPILOT << fname << ": Using codec name " << s << endl;
DEBUGKPILOT << fname << ": Creating codec " << encoding << endl; DEBUGKPILOT << fname << ": Creating codec " << encoding << endl;
// if the desired codec can't be found, latin1 will be returned anyway, no need to do this manually // if the desired codec can't be found, latin1 will be returned anyway, no need to do this manually
codec = KGlobal::charsets()->codecForName(encoding); codec = TDEGlobal::charsets()->codecForName(encoding);
if (codec) if (codec)
{ {

@ -102,7 +102,7 @@ PilotLocalDatabase::PilotLocalDatabase(const TQString & path,
} }
else else
{ {
fPathName = KGlobal::dirs()->saveLocation("data", fPathName = TDEGlobal::dirs()->saveLocation("data",
CSL1("kpilot/DBBackup/")); CSL1("kpilot/DBBackup/"));
} }
fixupDBName(); fixupDBName();

@ -116,8 +116,8 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, TDEAboutData *ad)
TQString s; TQString s;
TQLabel *text; TQLabel *text;
KIconLoader *l = KGlobal::iconLoader(); KIconLoader *l = TDEGlobal::iconLoader();
const TDEAboutData *p = ad ? ad : KGlobal::instance()->aboutData(); const TDEAboutData *p = ad ? ad : TDEGlobal::instance()->aboutData();
TQGridLayout *grid = new TQGridLayout(w, 5, 4, SPACING); TQGridLayout *grid = new TQGridLayout(w, 5, 4, SPACING);

Loading…
Cancel
Save