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.
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.
* Fixed the config dialog so that just showing a conduit's config widget
doesn't trigger the modified signal.

@ -292,14 +292,14 @@ TQString KABCSync::getFieldForHHCustom(
case eCustomBirthdate:
if (settings.dateFormat().isEmpty())
{
retval = KGlobal::locale()->formatDate(abEntry.birthday().date());
retval = TDEGlobal::locale()->formatDate(abEntry.birthday().date());
}
else
{
TQString tmpfmt(KGlobal::locale()->dateFormat());
KGlobal::locale()->setDateFormat(settings.dateFormat());
TQString ret(KGlobal::locale()->formatDate(abEntry.birthday().date()));
KGlobal::locale()->setDateFormat(tmpfmt);
TQString tmpfmt(TDEGlobal::locale()->dateFormat());
TDEGlobal::locale()->setDateFormat(settings.dateFormat());
TQString ret(TDEGlobal::locale()->formatDate(abEntry.birthday().date()));
TDEGlobal::locale()->setDateFormat(tmpfmt);
retval = ret;
}
break;
@ -346,20 +346,20 @@ void KABCSync::setFieldFromHHCustom(
if (settings.dateFormat().isEmpty())
{
// empty format means use locale setting
bdate=KGlobal::locale()->readDate(value, &ok);
bdate=TDEGlobal::locale()->readDate(value, &ok);
}
else
{
// use given format
bdate=KGlobal::locale()->readDate(value, settings.dateFormat(), &ok);
bdate=TDEGlobal::locale()->readDate(value, settings.dateFormat(), &ok);
}
if (!ok)
{
TQString format = KGlobal::locale()->dateFormatShort();
TQString format = TDEGlobal::locale()->dateFormatShort();
TQRegExp re(CSL1("%[yY][^%]*"));
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: "
<< TQString(bdate.toString()) << endl;

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

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

@ -260,7 +260,7 @@ bool KNotesAction::openKNotesResource()
TQString tz(korgcfg.readEntry( "TimeZoneId" ) );
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() ) )
{

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

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

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

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

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

@ -54,7 +54,7 @@
<entry name="LogFileName" type="String">
<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 name="StartDaemonAtLogin" type="Bool">
<label>

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

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

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

@ -144,7 +144,7 @@ void PilotDaemonTray::setupWidget()
{
FUNCTIONSETUP;
KGlobal::iconLoader()->addAppDir( CSL1("kpilot") );
TDEGlobal::iconLoader()->addAppDir( CSL1("kpilot") );
icons[Normal] = loadIcon( CSL1("kpilotDaemon") );
icons[Busy] = loadIcon( CSL1("busysync") );
icons[NotListening] = loadIcon( CSL1("nosync") );
@ -186,7 +186,7 @@ void PilotDaemonTray::setupWidget()
KHelpMenu *help = new KHelpMenu(menu,aboutData);
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 */);
@ -1236,13 +1236,13 @@ void PilotDaemon::slotRunConfig()
// If it succeeds, we can assume kpilot is running and then try
// to send the configure() DCOP call.
// 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).
//
// Implementing the function this way catches all cases.
// ie 1 KPilot running with configure dialog open (raise())
// 2 KPilot running with dialog NOT open (configureConduits())
// 3 KPilot NOT running (KProcess)
// 3 KPilot NOT running (TDEProcess)
DCOPClient *client = kapp->dcopClient();
@ -1257,7 +1257,7 @@ void PilotDaemon::slotRunConfig()
else
{
// KPilot not running
KProcess *p = new KProcess;
TDEProcess *p = new TDEProcess;
*p << "kpilot" << "-s";
p->start();

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

@ -118,13 +118,13 @@ bool setupPilotCodec(const TQString &s)
FUNCTIONSETUP;
mutex = new TQMutex();
mutex->lock();
TQString encoding(KGlobal::charsets()->encodingForName(s));
TQString encoding(TDEGlobal::charsets()->encodingForName(s));
DEBUGKPILOT << fname << ": Using codec name " << s << 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
codec = KGlobal::charsets()->codecForName(encoding);
codec = TDEGlobal::charsets()->codecForName(encoding);
if (codec)
{

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

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

Loading…
Cancel
Save