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

pull/1/head
Timothy Pearson 12 years ago
parent cade21b0f5
commit 0563290605

@ -472,7 +472,7 @@
2006-12-13 15:38 Helmut Schaa <hschaa@suse.de>
* : use KProcess instead of KShellProcess which is deprecated
* : use TDEProcess instead of KShellProcess which is deprecated
2006-12-13 15:24 Helmut Schaa <hschaa@suse.de>
@ -629,7 +629,7 @@
2006-11-01 17:40 Timo Hoenig <thoenig@suse.de>
* : feed KProcess properly
* : feed TDEProcess properly
2006-10-29 12:13 scripty

@ -89,7 +89,7 @@ TQPixmap DeviceTrayComponent::pixmapForState(NMDeviceState state)
TQMovie DeviceTrayComponent::movieForState(NMDeviceState state)
{
if (m_movies.contains(state)) {
return TQMovie( KGlobal::iconLoader()->moviePath(m_movies[state], KIcon::Panel));
return TQMovie( TDEGlobal::iconLoader()->moviePath(m_movies[state], KIcon::Panel));
} else {
return TQMovie();
}

@ -74,13 +74,13 @@ class ConnectionListViewItem : public KListViewItem
setText(1, info->getDevType());
// TODO: Move to a Factory
if (info->getDevType() == NM_SETTING_WIRED_SETTING_NAME)
setPixmap(0, KGlobal::iconLoader()->loadIcon("wired", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wired", KIcon::Small));
else if (info->getDevType() == NM_SETTING_WIRELESS_SETTING_NAME)
setPixmap(0, KGlobal::iconLoader()->loadIcon("wireless", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wireless", KIcon::Small));
else if (info->getDevType() == NM_SETTING_VPN_SETTING_NAME)
setPixmap(0, KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small));
else
setPixmap(0, KGlobal::iconLoader()->loadIcon("help", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("help", KIcon::Small));
}
}
@ -101,17 +101,17 @@ ConnectionEditorImpl::ConnectionEditorImpl(TQWidget* parent, const char* name, b
// pbEdit->hide();
pbNew->setIconSet(KGlobal::iconLoader()->loadIcon("add", KIcon::Small));
pbDelete->setIconSet(KGlobal::iconLoader()->loadIcon("remove", KIcon::Small));
pbEdit->setIconSet(KGlobal::iconLoader()->loadIcon("edit", KIcon::Small));
pbNew->setIconSet(TDEGlobal::iconLoader()->loadIcon("add", KIcon::Small));
pbDelete->setIconSet(TDEGlobal::iconLoader()->loadIcon("remove", KIcon::Small));
pbEdit->setIconSet(TDEGlobal::iconLoader()->loadIcon("edit", KIcon::Small));
TQPopupMenu* popup = new TQPopupMenu(pbNew);
// TODO: move to a factory class
popup->insertItem(KGlobal::iconLoader()->loadIcon("wireless", KIcon::Small), i18n("Wireless"), this, TQT_SLOT(slotNewWirelessConnection()));
popup->insertItem(KGlobal::iconLoader()->loadIcon("wired", KIcon::Small), i18n("Wired"), this, TQT_SLOT(slotNewWiredConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wireless", KIcon::Small), i18n("Wireless"), this, TQT_SLOT(slotNewWirelessConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wired", KIcon::Small), i18n("Wired"), this, TQT_SLOT(slotNewWiredConnection()));
if (!VPNManager::getVPNServices().isEmpty())
popup->insertItem(KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection()));
pbNew->setPopup(popup);

@ -56,18 +56,18 @@ class NetworkListViewItem : public KListViewItem
{
TQ_UINT8 strength = net.getStrength();
if (strength > 80)
setPixmap(1, KGlobal::iconLoader()->loadIcon("nm_signal_100", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_100", KIcon::Small));
else if (strength > 55)
setPixmap(1, KGlobal::iconLoader()->loadIcon("nm_signal_75", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_75", KIcon::Small));
else if (strength > 30)
setPixmap(1, KGlobal::iconLoader()->loadIcon("nm_signal_50", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_50", KIcon::Small));
else if (strength > 5)
setPixmap(1, KGlobal::iconLoader()->loadIcon("nm_signal_25", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_25", KIcon::Small));
else
setPixmap(1, KGlobal::iconLoader()->loadIcon("nm_signal_00", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_00", KIcon::Small));
if (net.isEncrypted())
setPixmap(2, KGlobal::iconLoader()->loadIcon("lock", KIcon::Small));
setPixmap(2, TDEGlobal::iconLoader()->loadIcon("lock", KIcon::Small));
}
WirelessNetwork _net;

@ -128,7 +128,7 @@ void DeviceTray::setPixmap(const TQPixmap& pixmap)
TQString iface = d->dev->getInterface();
// grab a font
TQFont iface_font = KGlobalSettings::generalFont();
TQFont iface_font = TDEGlobalSettings::generalFont();
// iface_font.setBold(true);
// resize the font to fit the icon's size
@ -288,13 +288,13 @@ void DeviceTray::loadIcons() {
d->pixmaps[NM_DEVICE_STATE_UNAVAILABLE] = loadSizedIcon("nm_no_connection", width());
d->pixmaps[NM_DEVICE_STATE_DISCONNECTED] = loadSizedIcon("nm_no_connection", width());
d->movies[NM_DEVICE_STATE_PREPARE] = TQMovie( KGlobal::iconLoader()->moviePath("nm_stage01_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_PREPARE] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage01_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_PREPARE].pause();
d->movies[NM_DEVICE_STATE_CONFIG] = TQMovie( KGlobal::iconLoader()->moviePath("nm_stage02_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_CONFIG].pause();
d->movies[NM_DEVICE_STATE_IP_CONFIG] = TQMovie( KGlobal::iconLoader()->moviePath("nm_stage03_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_IP_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_IP_CONFIG].pause();
d->movies[NM_DEVICE_STATE_NEED_AUTH] = d->movies[NM_DEVICE_STATE_CONFIG];

@ -98,7 +98,7 @@ Storage::slotConnectionAdded(Connection* con)
{
// connection added, save it
saveConnection(con);
KGlobal::config()->sync();
TDEGlobal::config()->sync();
}
void
@ -106,7 +106,7 @@ Storage::slotConnectionRemoved(Connection* con)
{
// find the appropriate connection and delete it from the storage
deleteConnection(con);
KGlobal::config()->sync();
TDEGlobal::config()->sync();
}
Connection*
@ -133,7 +133,7 @@ Storage::restoreConnections()
kdDebug() << k_funcinfo << endl;
// let's read all connections from the config-file and add them to the connection-store
ConnectionStore* store = ConnectionStore::getInstance();
TQStringList groups = KGlobal::config()->groupList();
TQStringList groups = TDEGlobal::config()->groupList();
const TQStringList::Iterator end = groups.end();
for ( TQStringList::Iterator it = groups.begin(); it != end; ++it )
{
@ -158,7 +158,7 @@ Storage::restoreConnection(const TQString& grpname)
kdDebug() << k_funcinfo << " " << grpname << endl;
// we have a connection to restore
KConfigGroup grp( KGlobal::config(), grpname);
KConfigGroup grp( TDEGlobal::config(), grpname);
TQString id = grp.readEntry("Id");
TQString cType = grp.readEntry("Type");
@ -217,8 +217,8 @@ Storage::restoreSetting(Connection* conn, const TQString& setting_grp_name)
kdDebug() << k_funcinfo << " " << setting_grp_name << endl;
kdDebug() << "restore setting: " << setting_grp_name.ascii() << endl;
KConfigGroup setting_grp(KGlobal::config(), setting_grp_name);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(setting_grp_name);
KConfigGroup setting_grp(TDEGlobal::config(), setting_grp_name);
TQMap<TQString, TQString> config_map = TDEGlobal::config()->entryMap(setting_grp_name);
TQString type = setting_grp.readEntry("Type");
// get the appropriate setting from the connection
@ -257,8 +257,8 @@ Storage::restoreSecrets(Connection* conn, const TQString& secrets_grp_name)
kdDebug() << k_funcinfo << " " << secrets_grp_name << endl;
kdDebug() << "restore secret: " << secrets_grp_name.ascii() << endl;
KConfigGroup secrets_grp(KGlobal::config(), secrets_grp_name);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(secrets_grp_name);
KConfigGroup secrets_grp(TDEGlobal::config(), secrets_grp_name);
TQMap<TQString, TQString> config_map = TDEGlobal::config()->entryMap(secrets_grp_name);
TQString type = secrets_grp.readEntry("Type");
// get the appropriate setting from the connection
@ -297,8 +297,8 @@ Storage::restoreVPNSecrets(Connection* conn, const TQString& secrets_grp_name)
kdDebug() << k_funcinfo << " " << secrets_grp_name << endl;
kdDebug() << "restore secret: " << secrets_grp_name.ascii() << endl;
KConfigGroup secrets_grp(KGlobal::config(), secrets_grp_name);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(secrets_grp_name);
KConfigGroup secrets_grp(TDEGlobal::config(), secrets_grp_name);
TQMap<TQString, TQString> config_map = TDEGlobal::config()->entryMap(secrets_grp_name);
TQString type = secrets_grp.readEntry("Type");
// get the appropriate setting from the connection
@ -346,13 +346,13 @@ Storage::saveConnections()
// save this connection
saveConnection(*it);
}
KGlobal::config()->sync();
TDEGlobal::config()->sync();
}
bool
Storage::saveConnection(Connection* conn)
{
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
TQString id = conn->getID();
TQString cType = conn->getType();
@ -416,7 +416,7 @@ Storage::saveConnectionSettings(Connection* conn, TQStringList& settings_grps, T
bool
Storage::saveConnectionSetting(Connection* conn, ConnectionSetting* setting, TQString& setting_grp)
{
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
TQString id = conn->getID();
TQString type = setting->getType();
@ -446,7 +446,7 @@ Storage::saveConnectionSetting(Connection* conn, ConnectionSetting* setting, TQS
bool
Storage::saveConnectionSecrets(Connection* conn, ConnectionSetting* setting, TQString& setting_grp)
{
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
TQString id = conn->getID();
TQString type = setting->getType();
bool storage_requested;
@ -529,7 +529,7 @@ Storage::hasSecretsStored(Connection* connection, ConnectionSetting* setting)
// get a group for this setting
TQString setting_grp_name = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(setting_grp_name);
TQMap<TQString, TQString> config_map = TDEGlobal::config()->entryMap(setting_grp_name);
return !(config_map.isEmpty());
}
@ -593,7 +593,7 @@ Storage::restoreVPNSecrets(Connection* connection, ConnectionSetting* setting)
bool
Storage::deleteConnection(Connection* conn)
{
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
TQString id = conn->getID();
TQString cType = conn->getType();

@ -475,8 +475,8 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
// Restore the settings
printf("Restoring VPN secret: %s\n\r", setting_grp.ascii());
KConfigGroup secrets_grp(KGlobal::config(), setting_grp);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(setting_grp);
KConfigGroup secrets_grp(TDEGlobal::config(), setting_grp);
TQMap<TQString, TQString> config_map = TDEGlobal::config()->entryMap(setting_grp);
TQString typetwo = secrets_grp.readEntry("Type");
// // get the appropriate setting from the connection
@ -959,10 +959,10 @@ void Tray::updateTrayIcon(NMDeviceState state)
// set the movie
if ((current_vpn_state == NM_VPN_CONNECTION_STATE_PREPARE) || (current_vpn_state == NM_VPN_CONNECTION_STATE_NEED_AUTH)) {
setMovie(TQMovie(KGlobal::iconLoader()->moviePath("nm_stage02_connecting_vpn", KIcon::Panel)));
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting_vpn", KIcon::Panel)));
}
if ((current_vpn_state == NM_VPN_CONNECTION_STATE_CONNECT) || (current_vpn_state == NM_VPN_CONNECTION_STATE_IP_CONFIG_GET)) {
setMovie(TQMovie(KGlobal::iconLoader()->moviePath("nm_stage03_connecting_vpn", KIcon::Panel)));
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting_vpn", KIcon::Panel)));
}
// start at the same frame as the movie before

@ -64,7 +64,7 @@ VPNAuthenticationDialog::VPNAuthenticationDialog(VPNConnection* conn, TQWidget*
{
this->setIcon(SmallIcon("encrypted", TQIconSet::Automatic));
this->setCaption(i18n("VPN Authentication for %1").arg(conn->getInfoSetting()->getName()));
labelPixmap->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("encrypted", KIcon::Small, 32));
labelPixmap->setPixmap(TDEGlobal::instance()->iconLoader()->loadIcon("encrypted", KIcon::Small, 32));
// nice icons
pushOK->setIconSet(SmallIcon("button_ok", TQIconSet::Automatic));

@ -163,7 +163,7 @@ TQString OpenVPNConfig::findOpenVPNBinary()
}
void OpenVPNConfig::receiveCipherData(KProcess*, char* buffer, int len)
void OpenVPNConfig::receiveCipherData(TDEProcess*, char* buffer, int len)
{
// add possible cipher modes to the combobox
TQStringList cipherModes = TQStringList::split("\n", TQString::fromLatin1(buffer, len), false );
@ -179,12 +179,12 @@ void OpenVPNConfig::getCipherModes()
TQString openvpn = findOpenVPNBinary();
if (!openvpn.isNull())
{
KProcess* cipherHelper = new KProcess();
TDEProcess* cipherHelper = new TDEProcess();
cipherHelper->setUseShell(true, "/bin/sh");
*cipherHelper << TQString::fromLatin1("%1 --show-ciphers | awk '/^[A-Z][A-Z0-9]+-/ { print $1 }'").arg(openvpn);
connect (cipherHelper, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(receiveCipherData(KProcess*, char*, int)));
connect (cipherHelper, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(receiveCipherData(TDEProcess*, char*, int)));
kdDebug() << "starting openvpn to get cipher modes" << endl;
if (!cipherHelper->start(KProcess::Block, KProcess::Stdout))
if (!cipherHelper->start(TDEProcess::Block, TDEProcess::Stdout))
kdDebug() << "error starting openvpn" << endl;
}

@ -78,7 +78,7 @@ class OpenVPNConfig : public VPNConfigWidget
~OpenVPNConfig();
public slots:
void receiveCipherData(KProcess*, char*, int);
void receiveCipherData(TDEProcess*, char*, int);
private:
OpenVPNConfigWidget* _openvpnWidget;

@ -44,7 +44,7 @@ K_EXPORT_COMPONENT_FACTORY( knetworkmanager_pptp, PPTPPluginFactory("knetworkman
PPTPPlugin::PPTPPlugin(TQObject* parent, const char* name, const TQStringList& args)
: VPNPlugin(parent, name, args)
{
KLocale* loc = KGlobal::locale();
KLocale* loc = TDEGlobal::locale();
loc->insertCatalogue("NetworkManager-pptp");
}

@ -44,7 +44,7 @@ K_EXPORT_COMPONENT_FACTORY( knetworkmanager_strongswan, StrongswanPluginFactory(
StrongswanPlugin::StrongswanPlugin(TQObject* parent, const char* name, const TQStringList& args)
: VPNPlugin(parent, name, args)
{
KLocale* loc = KGlobal::locale();
KLocale* loc = TDEGlobal::locale();
loc->insertCatalogue("NetworkManager-strongswan");
}

@ -54,7 +54,7 @@ char linedata [2048];
VPNCPlugin::VPNCPlugin(TQObject* parent, const char* name, const TQStringList& args)
: VPNPlugin(parent, name, args)
{
KLocale* loc = KGlobal::locale();
KLocale* loc = TDEGlobal::locale();
loc->insertCatalogue("NetworkManager-vpnc");
}

Loading…
Cancel
Save