Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 13 years ago
parent e7bc3fffe6
commit dff37d34bf

@ -88,7 +88,7 @@ bool BasketPlugin::isRunningStandalone()
void BasketUniqueAppHandler::loadCommandLineOptions() void BasketUniqueAppHandler::loadCommandLineOptions()
{ {
KCmdLineArgs::addCmdLineOptions(basket_options); TDECmdLineArgs::addCmdLineOptions(basket_options);
} }
int BasketUniqueAppHandler::newInstance() int BasketUniqueAppHandler::newInstance()

@ -88,12 +88,12 @@ bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data,
if ( fun == "newInstance()" ) { if ( fun == "newInstance()" ) {
replyType = "int"; replyType = "int";
KCmdLineArgs::reset(); // forget options defined by other "applications" TDECmdLineArgs::reset(); // forget options defined by other "applications"
loadCommandLineOptions(); loadCommandLineOptions();
// This bit is duplicated from KUniqueApplication::processDelayed() // This bit is duplicated from KUniqueApplication::processDelayed()
TQDataStream ds( data, IO_ReadOnly ); TQDataStream ds( data, IO_ReadOnly );
KCmdLineArgs::loadAppArgs( ds ); TDECmdLineArgs::loadAppArgs( ds );
if ( !ds.atEnd() ) { // backwards compatibility if ( !ds.atEnd() ) { // backwards compatibility
TQCString asn_id; TQCString asn_id;
ds >> asn_id; ds >> asn_id;

@ -42,7 +42,7 @@ int Application::newInstance()
KUniqueApplication::newInstance(); KUniqueApplication::newInstance();
// Open the basket archive or template file supplied as argument: // Open the basket archive or template file supplied as argument:
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args && args->count() >= 1) { if (args && args->count() >= 1) {
TQString fileName = TQFile::decodeName(args->arg(args->count() - 1)); TQString fileName = TQFile::decodeName(args->arg(args->count() - 1));
if (TQFile::exists(fileName)) { if (TQFile::exists(fileName)) {

@ -137,7 +137,7 @@ void BNPView::lateInit()
*/ */
if(!isPart()) if(!isPart())
{ {
if (Settings::useSystray() && KCmdLineArgs::parsedArgs() && KCmdLineArgs::parsedArgs()->isSet("start-hidden")) if (Settings::useSystray() && TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden"))
if(Global::mainWindow()) Global::mainWindow()->hide(); if(Global::mainWindow()) Global::mainWindow()->hide();
else if (Settings::useSystray() && kapp->isRestored()) else if (Settings::useSystray() && kapp->isRestored())
if(Global::mainWindow()) Global::mainWindow()->setShown(!Settings::startDocked()); if(Global::mainWindow()) Global::mainWindow()->setShown(!Settings::startDocked());
@ -2138,7 +2138,7 @@ void BNPView::newBasket()
void BNPView::handleCommandLine() void BNPView::handleCommandLine()
{ {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
/* Custom data folder */ /* Custom data folder */
TQCString customDataFolder = args->getOption("data-folder"); TQCString customDataFolder = args->getOption("data-folder");

@ -70,11 +70,11 @@ class Application : public KUniqueApplication
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// KCmdLineArgs::init will modify argv[0] so we remember it: // TDECmdLineArgs::init will modify argv[0] so we remember it:
const char *argv0 = (argc >= 1 ? argv[0] : ""); const char *argv0 = (argc >= 1 ? argv[0] : "");
KCmdLineArgs::init(argc, argv, Global::about()); TDECmdLineArgs::init(argc, argv, Global::about());
KCmdLineArgs::addCmdLineOptions(basket_options); TDECmdLineArgs::addCmdLineOptions(basket_options);
KUniqueApplication::addCmdLineOptions(); KUniqueApplication::addCmdLineOptions();
//KUniqueApplication app; //KUniqueApplication app;
@ -86,12 +86,12 @@ int main(int argc, char *argv[])
MainWindow* win = new MainWindow(); MainWindow* win = new MainWindow();
Global::bnpView->handleCommandLine(); Global::bnpView->handleCommandLine();
app.setMainWidget(win); app.setMainWidget(win);
// if (!(Settings::useSystray() && KCmdLineArgs::parsedArgs() && KCmdLineArgs::parsedArgs()->isSet("start-hidden"))) // if (!(Settings::useSystray() && TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden")))
// win->show(); // win->show();
if (Settings::useSystray()) { if (Settings::useSystray()) {
// The user wanted to not show the window (but it is already hidden by default, so we do nothing): // The user wanted to not show the window (but it is already hidden by default, so we do nothing):
if (KCmdLineArgs::parsedArgs() && KCmdLineArgs::parsedArgs()->isSet("start-hidden")) if (TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden"))
; ;
// When the application is restored by KDE session, restore its state: // When the application is restored by KDE session, restore its state:
else if (app.isRestored()) else if (app.isRestored())

Loading…
Cancel
Save