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

pull/1/head
Timothy Pearson 11 years ago
parent 688a06c566
commit 19e4c89d10

@ -181,12 +181,12 @@ static TQString make_extform_cmd(bool ext_form, const KURL& query)
TQString AptProtocol::make_html_form() const TQString AptProtocol::make_html_form() const
{ {
bool can_fsearch = false; bool can_fsearch = false;
bool ext_form = KGlobal::config() -> readBoolEntry("extended_form", true); bool ext_form = TDEGlobal::config() -> readBoolEntry("extended_form", true);
// Only in config-file. Needed for some dpkg-based distros that are not Debian // Only in config-file. Needed for some dpkg-based distros that are not Debian
can_fsearch = can_searchfile(true); can_fsearch = can_searchfile(true);
bool online = false; bool online = false;
bool online_form = KGlobal::config() -> readBoolEntry("online_form", true); bool online_form = TDEGlobal::config() -> readBoolEntry("online_form", true);
if (m_adept_batch) if (m_adept_batch)
online = online_form && (!m_internal) && ext_form && m_adept_batch -> capabilities(PackageManager::ONLINE); online = online_form && (!m_internal) && ext_form && m_adept_batch -> capabilities(PackageManager::ONLINE);
@ -225,16 +225,16 @@ AptProtocol::AptProtocol( const TQCString &pool_socket, const TQCString &app_soc
m_adept_batch(0), m_parser(0) m_adept_batch(0), m_parser(0)
{ {
KStandardDirs* dirs = KGlobal::dirs(); KStandardDirs* dirs = TDEGlobal::dirs();
m_stylesheet = dirs->findResource( "data", "kio_apt/kio_apt.css" ); m_stylesheet = dirs->findResource( "data", "kio_apt/kio_apt.css" );
m_logo = dirs->findResource( "data", "kio_apt/" m_logo = dirs->findResource( "data", "kio_apt/"
+ KGlobal::config() -> readEntryUntranslated("logo", "kdedeb_logo.png" ) ); + TDEGlobal::config() -> readEntryUntranslated("logo", "kdedeb_logo.png" ) );
m_header_background = dirs->findResource( "data", "kio_apt/" m_header_background = dirs->findResource( "data", "kio_apt/"
+ KGlobal::config() -> readEntryUntranslated("background", "headerbg.png" ) ); + TDEGlobal::config() -> readEntryUntranslated("background", "headerbg.png" ) );
m_logo_alt = KGlobal::config() -> readEntryUntranslated("alt_tag", i18n("KDE on Debian") ); m_logo_alt = TDEGlobal::config() -> readEntryUntranslated("alt_tag", i18n("KDE on Debian") );
connect(&m_process, TQT_SIGNAL(token(const TQString&, const TQString&)), connect(&m_process, TQT_SIGNAL(token(const TQString&, const TQString&)),
this, TQT_SLOT(token_dispatch(const TQString&, const TQString&))); this, TQT_SLOT(token_dispatch(const TQString&, const TQString&)));
@ -397,7 +397,7 @@ void AptProtocol::get ( const KURL& url )
if (!opt.isNull()) if (!opt.isNull())
{ {
bool ext_form = (opt != "0"); bool ext_form = (opt != "0");
KGlobal::config() -> writeEntry("extended_form", ext_form); TDEGlobal::config() -> writeEntry("extended_form", ext_form);
} }
// Enable install/remove/upgrade/... // Enable install/remove/upgrade/...
@ -412,7 +412,7 @@ void AptProtocol::get ( const KURL& url )
m_internal = (opt == "1"); m_internal = (opt == "1");
// Sync the config (must use kcfg sometime :p) // Sync the config (must use kcfg sometime :p)
KGlobal::config() -> sync(); TDEGlobal::config() -> sync();
if (command.isEmpty() || query.isEmpty()) if (command.isEmpty() || query.isEmpty())
{ {
@ -535,8 +535,8 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
if (options.contains("show_filelist")) if (options.contains("show_filelist"))
{ {
KGlobal::config() -> writeEntry("show_filelist", options["show_filelist"] != "0"); TDEGlobal::config() -> writeEntry("show_filelist", options["show_filelist"] != "0");
KGlobal::config() -> sync(); TDEGlobal::config() -> sync();
} }
mimeType("text/html"); mimeType("text/html");
@ -601,7 +601,7 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
/** Add file list (if enabled) */ /** Add file list (if enabled) */
bool show_filelist = KGlobal::config() -> readBoolEntry("show_filelist", false); bool show_filelist = TDEGlobal::config() -> readBoolEntry("show_filelist", false);
if ( show_filelist ) if ( show_filelist )
{ {
if (can_listfiles(!installed_version.isEmpty())) if (can_listfiles(!installed_version.isEmpty()))
@ -837,7 +837,7 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options
p = new KShellProcess; p = new KShellProcess;
p->clearArguments(); p->clearArguments();
*p << command; *p << command;
p->start( KProcess::Block, KProcess::All ); p->start( TDEProcess::Block, TDEProcess::All );
for(int i = 0; i != pcount; ++i) for(int i = 0; i != pcount; ++i)
{ {

@ -25,10 +25,10 @@
AptCache::AptCache() AptCache::AptCache()
{ {
connect(&m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), connect(&m_process, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)),
this, TQT_SLOT(receivedStdErr(KProcess*, char*, int ))); this, TQT_SLOT(receivedStdErr(TDEProcess*, char*, int )));
connect(&m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), connect(&m_process, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)),
this, TQT_SLOT(receivedStdOut(KProcess*, char*, int ))); this, TQT_SLOT(receivedStdOut(TDEProcess*, char*, int )));
} }
AptCache::~AptCache() {} AptCache::~AptCache() {}
@ -49,7 +49,7 @@ static TQStringList received(TQString& buffer, char* input, int input_len)
return ret; return ret;
} }
void AptCache::receivedStdErr( KProcess * /*process*/, char * buffer, int len ) void AptCache::receivedStdErr( TDEProcess * /*process*/, char * buffer, int len )
{ {
static TQRegExp rx_we("(W|E):\\s+(.*)"); static TQRegExp rx_we("(W|E):\\s+(.*)");
@ -67,7 +67,7 @@ void AptCache::receivedStdErr( KProcess * /*process*/, char * buffer, int len )
} }
} }
} }
void AptCache::receivedStdOut( KProcess * /*process*/, char * buffer, int len ) void AptCache::receivedStdOut( TDEProcess * /*process*/, char * buffer, int len )
{ {
TQStringList lines = received(m_received_out, buffer, len); TQStringList lines = received(m_received_out, buffer, len);
(this->*m_receive)(lines); (this->*m_receive)(lines);
@ -92,7 +92,7 @@ bool AptCache::search(const TQString& expression)
m_process << "apt-cache" << "search"; m_process << "apt-cache" << "search";
m_process << TQStringList::split(" ", expression); m_process << TQStringList::split(" ", expression);
m_receive = &AptCache::receiveSearch; m_receive = &AptCache::receiveSearch;
return m_process.start(KProcess::Block, KProcess::Stdout ); return m_process.start(TDEProcess::Block, TDEProcess::Stdout );
} }
void AptCache::receiveSearch(const TQStringList& lines) void AptCache::receiveSearch(const TQStringList& lines)
@ -124,7 +124,7 @@ bool AptCache::show(const TQString& package)
m_process.setEnvironment("LANGUAGE", "C"); m_process.setEnvironment("LANGUAGE", "C");
m_process << "apt-cache" << "show" << package; m_process << "apt-cache" << "show" << package;
m_receive = &AptCache::receiveShow; m_receive = &AptCache::receiveShow;
return m_process.start(KProcess::Block, KProcess::Stdout ); return m_process.start(TDEProcess::Block, TDEProcess::Stdout );
} }
void AptCache::receiveShow(const TQStringList& lines) void AptCache::receiveShow(const TQStringList& lines)
@ -240,7 +240,7 @@ bool AptCache::policy( const TQString & package )
m_process.setEnvironment("LANGUAGE", "C"); m_process.setEnvironment("LANGUAGE", "C");
m_process << "apt-cache" << "policy" << package; m_process << "apt-cache" << "policy" << package;
m_receive = &AptCache::receivePolicy; m_receive = &AptCache::receivePolicy;
return m_process.start(KProcess::Block, KProcess::Stdout ); return m_process.start(TDEProcess::Block, TDEProcess::Stdout );
} }
void AptCache::receivePolicy(const TQStringList& lines) void AptCache::receivePolicy(const TQStringList& lines)

@ -28,7 +28,7 @@ class AptCache : public TQObject {
ReceiveMethod m_receive; ReceiveMethod m_receive;
// KProcIO messes the stderr and the stdout lines :( // KProcIO messes the stderr and the stdout lines :(
KProcess m_process; TDEProcess m_process;
TQString m_received_out, m_received_err; TQString m_received_out, m_received_err;
TQString m_attribute; TQString m_attribute;
@ -36,8 +36,8 @@ class AptCache : public TQObject {
TQString m_installed, m_candidate; TQString m_installed, m_candidate;
private slots: private slots:
void receivedStdErr(KProcess* process, char* buffer, int len); void receivedStdErr(TDEProcess* process, char* buffer, int len);
void receivedStdOut(KProcess* process, char* buffer, int len); void receivedStdOut(TDEProcess* process, char* buffer, int len);
private: private:
void clear(); void clear();

@ -72,7 +72,7 @@ bool Dpkg::search( const TQString & file )
m_process.clearArguments(); m_process.clearArguments();
m_process << "dpkg" << "-S" << file; m_process << "dpkg" << "-S" << file;
m_receive = &Dpkg::receiveSearch; m_receive = &Dpkg::receiveSearch;
return m_process.start(KProcess::Block, KProcess::Stdout ); return m_process.start(TDEProcess::Block, TDEProcess::Stdout );
} }
void Dpkg::receiveSearch( const TQStringList & line ) void Dpkg::receiveSearch( const TQStringList & line )
@ -114,7 +114,7 @@ bool Dpkg::list( const TQString & package )
m_process.clearArguments(); m_process.clearArguments();
m_process << "dpkg" << "-L" << package; m_process << "dpkg" << "-L" << package;
m_receive = &Dpkg::receiveList; m_receive = &Dpkg::receiveList;
return m_process.start(KProcess::Block, KProcess::Stdout ); return m_process.start(TDEProcess::Block, TDEProcess::Stdout );
} }
void Dpkg::receiveList( const TQStringList & line ) void Dpkg::receiveList( const TQStringList & line )

Loading…
Cancel
Save