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

pull/4/head
Timothy Pearson 12 years ago
parent f268ba465a
commit d6aab45a69

@ -58,9 +58,9 @@ void HitWidget::setIcon(const TQString name)
{
m_icon = name;
if (m_collapsed)
icon->setPixmap(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeSmall));
icon->setPixmap(TDEGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeSmall));
else
icon->setPixmap(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeLarge));
icon->setPixmap(TDEGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeLarge));
}
void HitWidget::toggleCollapsed()
@ -93,7 +93,7 @@ void HitWidget::setCollapsed(bool collapsed)
return;
if (collapsed) {
icon->setPixmap(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeSmall));
icon->setPixmap(TDEGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeSmall));
toolButton1->setIconSet(SmallIconSet("kerry_info"));
toolButton1->setTextLabel(i18n("Expand"));
description->setHidden(true);
@ -104,7 +104,7 @@ void HitWidget::setCollapsed(bool collapsed)
m_collapsed = collapsed;
}
else {
icon->setPixmap(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeLarge));
icon->setPixmap(TDEGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeLarge));
toolButton1->setIconSet(SmallIconSet("kerry_arrow"));
toolButton1->setTextLabel(i18n("Collapse"));
description->setHidden(false);

@ -64,10 +64,10 @@ void KCMBeagleBackends::load( bool useDefaults )
{
listview->clear();
KProcess *proc = new KProcess;
connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(gotAvailableBackends(KProcess *, char *, int)));
TDEProcess *proc = new TDEProcess;
connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), TQT_SLOT(gotAvailableBackends(TDEProcess *, char *, int)));
*proc << "beagled" << "--list-backends";
if (!proc->start(KProcess::Block,KProcess::Stdout))
if (!proc->start(TDEProcess::Block,TDEProcess::Stdout))
kdError("Could not ask Beagle daemon for available backends.");
if (!useDefaults) {
@ -100,7 +100,7 @@ void KCMBeagleBackends::save()
saveDisabledBackends(disabledBackends);
}
void KCMBeagleBackends::gotAvailableBackends(KProcess*, char *buffer, int len)
void KCMBeagleBackends::gotAvailableBackends(TDEProcess*, char *buffer, int len)
{
TQString myBuf = TQString::fromLatin1(buffer, len);
if (myBuf.startsWith("User:")) {

@ -42,7 +42,7 @@ public:
virtual void defaults();
protected slots:
void gotAvailableBackends(KProcess*, char *buffer, int len);
void gotAvailableBackends(TDEProcess*, char *buffer, int len);
void changedValue();
private:

@ -79,7 +79,7 @@ void KCMBeagle::save()
m_backends->save();
m_status->save();
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagle-config";
*proc << "--beagled-reload-config";
if (!proc->start())

@ -92,7 +92,7 @@ void KCMKerry::save()
DCOPClient *client = kapp->dcopClient();
client->send("kerry", "default", "configChanged()", TQString(""));
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagle-config";
*proc << "--beagled-reload-config";
if (!proc->start())

@ -29,13 +29,13 @@ extern "C"
{
KDE_EXPORT KCModule *create_beagle(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("kcmbeagle");
TDEGlobal::locale()->insertCatalogue("kcmbeagle");
return new KCMBeagle(parent, name);
}
KDE_EXPORT KCModule *create_kerry(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("kcmbeagle");
TDEGlobal::locale()->insertCatalogue("kcmbeagle");
return new KCMKerry(parent, name);
}
}

@ -64,7 +64,7 @@ KCMKerrySearch::KCMKerrySearch(TQWidget *parent, const char * )
top_layout->addWidget(gb_keys);
gb_keys->setFlat(true);
globalKeys = new KGlobalAccel(TQT_TQOBJECT(this));
globalKeys = new TDEGlobalAccel(TQT_TQOBJECT(this));
globalKeys->insert( "Program:kerry", i18n("Kerry Beagle Search") );
KShortcut showDialogShortcut = KShortcut(ALT+Key_Space);

@ -56,7 +56,7 @@ private:
TQComboBox* combo_order;
TQCheckBox* showBigTiles;
KKeyChooser *keysWidget;
KGlobalAccel *globalKeys;
TDEGlobalAccel *globalKeys;
};
#endif

@ -202,7 +202,7 @@ bool KCMBeagleStatus::startBeagle ()
return false;
}
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagled";
*proc << "--indexing-delay 2";
if (!proc->start()) {

@ -56,7 +56,7 @@ KerryApplication::KerryApplication() : KUniqueApplication(),
KerryApplication::~KerryApplication()
{
if (hitListWindow) {
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->writeEntry("History",hitListWindow->editSearch->historyItems());
config->writeEntry("DialogSize",hitListWindow->size());
config->sync();
@ -68,7 +68,7 @@ KerryApplication::~KerryApplication()
int KerryApplication::newInstance()
{
if (!hitListWindow)
init(KGlobal::instance()->aboutData());
init(TDEGlobal::instance()->aboutData());
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("show-searchdialog")) {
@ -88,7 +88,7 @@ void KerryApplication::init(const TDEAboutData* /*about*/)
if (hitListWindow)
return;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("General");
hitListWindow = new SearchDlg();
@ -119,7 +119,7 @@ void KerryApplication::init(const TDEAboutData* /*about*/)
KHelpMenu *helpmenu = new KHelpMenu(hitListWindow, about, false);
menu->insertItem( SmallIconSet("help"), KStdGuiItem::help().text(), helpmenu->menu() );
*/
globalKeys = new KGlobalAccel(TQT_TQOBJECT(this));
globalKeys = new TDEGlobalAccel(TQT_TQOBJECT(this));
globalKeys->insert( "Program:kerry", i18n("Kerry Beagle Search") );
KShortcut showDialogShortcut = KShortcut(ALT+Key_Space);
@ -187,7 +187,7 @@ void KerryApplication::quitKerry()
{
int autoStart = KMessageBox::questionYesNoCancel( 0L, i18n("Should Kerry start automatically\nwhen you login?"), i18n("Automatically Start Kerry?"), i18n("&Start"), i18n("&Do Not Start") );
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("General");
if ( autoStart == KMessageBox::Yes ) {
config->writeEntry("AutoStart", true);
@ -202,7 +202,7 @@ void KerryApplication::quitKerry()
hitListWindow->hide();
#ifdef KDELIBS_SUSE
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagle-shutdown";
if (!proc->start())
kdDebug() << "Couldn't run beagle-shutdown." << endl;
@ -215,22 +215,22 @@ void KerryApplication::quitKerry()
void KerryApplication::clearHistory()
{
hitListWindow->editSearch->clearHistory();
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->writeEntry("History",TQString());
config->sync();
}
void KerryApplication::configure()
{
KProcess proc;
TDEProcess proc;
proc << "kcmshell";
proc << "kde-kcmkerry.desktop";
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
void KerryApplication::configChanged()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
globalKeys->readSettings(config);
globalKeys->updateConnections();
}

@ -32,7 +32,7 @@ class TDECmdLineArgs;
class SearchDlg;
class KHelpMenu;
class TDEAboutData;
class KProcess;
class TDEProcess;
class KerryApplication : public KUniqueApplication
{
@ -61,7 +61,7 @@ class KerryApplication : public KUniqueApplication
void checkBeagleBuildIndex();
private:
KGlobalAccel *globalKeys;
TDEGlobalAccel *globalKeys;
};
#endif // KERRYAPP_H

@ -57,7 +57,7 @@ void KerryLabel::mousePressEvent(TQMouseEvent* ev)
void KerryLabel::mouseMoveEvent(TQMouseEvent* ev)
{
if (dragInfo.state == diPending) {
int distance = KGlobalSettings::dndEventDelay();
int distance = TDEGlobalSettings::dndEventDelay();
if ( ev->x() > dragInfo.start.x() + distance || ev->x() < dragInfo.start.x() - distance ||
ev->y() > dragInfo.start.y() + distance || ev->y() < dragInfo.start.y() - distance) {
doDrag();

@ -175,19 +175,19 @@ void KWidgetListbox::setItemColors(int index, bool even)
if(index == selected())
{
itm->setPaletteBackgroundColor(KGlobalSettings::highlightColor());
itm->setPaletteForegroundColor(KGlobalSettings::highlightedTextColor());
itm->setPaletteBackgroundColor(TDEGlobalSettings::highlightColor());
itm->setPaletteForegroundColor(TDEGlobalSettings::highlightedTextColor());
}
else if(even)
{
itm->setPaletteBackgroundColor(KGlobalSettings::baseColor());
itm->setPaletteForegroundColor(KGlobalSettings::textColor());
itm->setPaletteBackgroundColor(TDEGlobalSettings::baseColor());
itm->setPaletteForegroundColor(TDEGlobalSettings::textColor());
}
else
{
itm->setPaletteBackgroundColor(
KGlobalSettings::alternateBackgroundColor());
itm->setPaletteForegroundColor(KGlobalSettings::textColor());
TDEGlobalSettings::alternateBackgroundColor());
itm->setPaletteForegroundColor(TDEGlobalSettings::textColor());
}
}

@ -98,7 +98,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KSessionManaged ksm;
KerryApplication app;
KGlobal::locale()->insertCatalogue("libkonq");
TDEGlobal::locale()->insertCatalogue("libkonq");
return app.exec();
}

@ -572,7 +572,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
if (datetime.date().year()>1970)
description = description + i18n("Last viewed: %1").arg(KGlobal::locale()->formatDateTime(datetime,false))+"<br>";
description = description + i18n("Last viewed: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false))+"<br>";
}
item->setDescriptionText(description +i18n("URL:")+" "+*(result->uri)+"</qt>");
@ -597,7 +597,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
item->setDescriptionText("<qt>"+ i18n("Published: %1").arg(KGlobal::locale()->formatDateTime(datetime,false))+"<br>");
item->setDescriptionText("<qt>"+ i18n("Published: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false))+"<br>");
if (result->snippet)
item->setPropertiesText("<qt>"+*(result->snippet)+"</qt>");
@ -625,7 +625,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
item->setDescriptionText("<qt>"+ i18n("Last modified: %1").arg(KGlobal::locale()->formatDateTime(datetime,false))+"<br>");
item->setDescriptionText("<qt>"+ i18n("Last modified: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false))+"<br>");
if (result->snippet)
item->setPropertiesText("<qt>"+*(result->snippet)+"</qt>");
@ -643,7 +643,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
item->setIcon("contents2");
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
item->setDescriptionText("<qt>"+ i18n("Last modified: %1").arg(KGlobal::locale()->formatDateTime(datetime,false))+"<br>");
item->setDescriptionText("<qt>"+ i18n("Last modified: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false))+"<br>");
if (result->snippet)
@ -668,9 +668,9 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString properties;
TQDateTime datetime;
datetime = datetimeFromString(takeProperty("fixme:starttime",_properties));
properties = properties + i18n("Start time: %1").arg(KGlobal::locale()->formatDateTime(datetime,false)) + "<br>";
properties = properties + i18n("Start time: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false)) + "<br>";
datetime = datetimeFromString(takeProperty("fixme:endtime",_properties));
properties = properties + i18n("End time: %1").arg(KGlobal::locale()->formatDateTime(datetime,false)) + "<br>";
properties = properties + i18n("End time: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false)) + "<br>";
BeagleSearch::PropertyList::iterator it;
for ( it = _properties.begin(); it != _properties.end(); ++it )
@ -777,7 +777,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime received_datetime;
received_datetime = datetimeFromString(received);
if (!received.isEmpty())
item->setDescriptionText("<qt>"+i18n("Received: %1").arg(KGlobal::locale()->formatDateTime(received_datetime,false))+"</qt>");
item->setDescriptionText("<qt>"+i18n("Received: %1").arg(TDEGlobal::locale()->formatDateTime(received_datetime,false))+"</qt>");
TQString properties;
BeagleSearch::PropertyList::iterator it;
@ -844,7 +844,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
item->setDescriptionText("<qt>"+i18n("Date: %1").arg(KGlobal::locale()->formatDateTime(datetime,false)+"</qt>"));
item->setDescriptionText("<qt>"+i18n("Date: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false)+"</qt>"));
if (result->snippet)
item->setPropertiesText("<qt>"+*(result->snippet)+ "</qt>");
@ -898,7 +898,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString install_time_str = takeProperty("fixme:install_time", _properties);
if (!install_time_str.isEmpty())
{
properties=properties+i18n("Installed on: %1").arg(KGlobal::locale()->formatDateTime(datetimeFromString(install_time_str),false))+"<br>";
properties=properties+i18n("Installed on: %1").arg(TDEGlobal::locale()->formatDateTime(datetimeFromString(install_time_str),false))+"<br>";
}
TQString install_size_str = takeProperty("fixme:contents_byte_count", _properties);
@ -982,7 +982,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
title = i18n("Last modified: %1").arg(KGlobal::locale()->formatDateTime(datetime,false));
title = i18n("Last modified: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false));
item->setDescriptionText("<qt>"+title+"</qt>");
TQString properties;
@ -1055,7 +1055,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
else {
TQDateTime datetime;
datetime.setTime_t(result->last_index_time);
title = i18n("Last modified: %1").arg(KGlobal::locale()->formatDateTime(datetime,false));
title = i18n("Last modified: %1").arg(TDEGlobal::locale()->formatDateTime(datetime,false));
}
item->setDescriptionText("<qt>"+title+"</qt>");
@ -1247,7 +1247,7 @@ void SearchDlg::slotOpen()
if (item) {
TQString mimetype = item->mimetype();
if (mimetype=="beagle/x-kopete-log" || mimetype=="beagle/x-gaim-log") {
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagle-imlogviewer";
KURL kuri = KURL(item->uri());
TQString uri = kuri.path();
@ -1282,7 +1282,7 @@ void SearchDlg::slotOpen()
slotOpenKNotes(item->uri().mid(10,21));
}
else if (item->uri().startsWith("note:/")) {
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "tomboy";
*proc << "--open-note" << item->uri() << "--highligh-search" << "\""+current_query.get()+"\"";
if (!proc->start()) {
@ -1312,7 +1312,7 @@ void SearchDlg::slotMailTo(const TQString &address)
void SearchDlg::slotOpenEvolution(const TQString &address)
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "evolution";
*proc << address;
if (!proc->start()) {
@ -1323,7 +1323,7 @@ void SearchDlg::slotOpenEvolution(const TQString &address)
void SearchDlg::slotOpenThunderbird(const TQString &address)
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "thunderbird";
*proc << "-mail";
*proc << address;
@ -1335,7 +1335,7 @@ void SearchDlg::slotOpenThunderbird(const TQString &address)
void SearchDlg::slotOpenKAddressBook(const TQString &uid)
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "kaddressbook";
*proc << "--uid" << uid;
if (!proc->start()) {
@ -1363,23 +1363,23 @@ TQString SearchDlg::formatBytes(TQString& bytesStr) const
{
static double kilobyte = 1024.0;
static double megabyte = 1024.0*1024.0;
double bytes = KGlobal::locale()->readNumber(bytesStr);
double bytes = TDEGlobal::locale()->readNumber(bytesStr);
if (bytes < megabyte)
return KGlobal::locale()->formatNumber(bytes/kilobyte, 2) + "K";
return KGlobal::locale()->formatNumber(bytes/megabyte, 2) + "M";
return TDEGlobal::locale()->formatNumber(bytes/kilobyte, 2) + "K";
return TDEGlobal::locale()->formatNumber(bytes/megabyte, 2) + "M";
}
void SearchDlg::slotStartBeagle()
{
beagleJustStarted = true;
if (cb_beagleStart->isChecked()) {
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Beagle");
config->writeEntry("AutoStart",true);
config->sync();
}
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "beagled";
*proc << "--indexing-delay 2";
if (!proc->start()) {
@ -1476,7 +1476,7 @@ void SearchDlg::searchError(const TQString& error)
bool SearchDlg::canPreview( KFileItem* item )
{
if ( !KGlobalSettings::showFilePreview( item->url() ) )
if ( !TDEGlobalSettings::showFilePreview( item->url() ) )
return false;
if ( pPreviewMimeTypes == 0L )
@ -1520,7 +1520,7 @@ bool SearchDlg::mimeTypeMatch( const TQString& mimeType, const TQStringList& mim
void SearchDlg::startPreview( const KFileItemList& items )
{
stopPreview(); // just in case
int iconSize = KGlobal::iconLoader()->currentSize( KIcon::Desktop );
int iconSize = TDEGlobal::iconLoader()->currentSize( KIcon::Desktop );
pPreviewJob = KIO::filePreview( items, KIcon::SizeHuge, KIcon::SizeHuge, iconSize,
true /*m_pSettings->textPreviewIconTransparency()*/, true /* scale */,
@ -1630,7 +1630,7 @@ void SearchDlg::showSearchDialog()
void SearchDlg::configChanged()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->reparseConfiguration();
config->setGroup("General");

@ -833,7 +833,7 @@
<signal>completion(const TQString&amp;)</signal>
<signal>substringCompletion(const TQString&amp;)</signal>
<signal>textRotation(KCompletionBase::KeyBindingType)</signal>
<signal>completionModeChanged(KGlobalSettings::Completion)</signal>
<signal>completionModeChanged(TDEGlobalSettings::Completion)</signal>
<signal>aboutToShowContextMenu(TQPopupMenu*)</signal>
<slot access="public" specifier="">deleteLater()</slot>
<slot access="private" specifier="">cleanupEventFilter(TQObject*)</slot>

Loading…
Cancel
Save