コード例 #1
0
int main(int argc, char *argv[])
{
    QScopedPointer<KAboutData> aboutData(
        Gwenview::createAboutData(
            "gwenview",       /* appname */
            0,                /* catalogName */
            ki18n("Gwenview") /* programName */
        ));
    aboutData->setShortDescription(ki18n("An Image Viewer"));

    KCmdLineArgs::init(argc, argv, aboutData.data());

    KCmdLineOptions options;
    options.add("f", ki18n("Start in fullscreen mode"));
    options.add("s", ki18n("Start in slideshow mode"));
    options.add("+[file or folder]", ki18n("A starting file or folder"));
    KCmdLineArgs::addCmdLineOptions(options);

    KApplication app;
    Gwenview::ImageFormats::registerPlugins();

    // startHelper must live for the whole life of the application
    StartHelper startHelper;
    if (app.isSessionRestored()) {
        kRestoreMainWindows<Gwenview::MainWindow>();
    } else {
        startHelper.createMainWindow();
    }
    return app.exec();
}
コード例 #2
0
ファイル: main.cpp プロジェクト: theunbelievablerepo/gwenview
int main(int argc, char *argv[])
{
    KAboutData aboutData(
        "gwenview",        /* appname */
        0,                 /* catalogName */
        ki18n("Gwenview"), /* programName */
        GWENVIEW_VERSION); /* version */
    aboutData.setShortDescription(ki18n("An Image Viewer"));
    aboutData.setLicense(KAboutData::License_GPL);
    aboutData.setCopyrightStatement(ki18n("Copyright 2000-2010 Aurélien Gâteau"));
    aboutData.addAuthor(
        ki18n("Aurélien Gâteau"),
        ki18n("Main developer"),
        "*****@*****.**");

    KCmdLineArgs::init(argc, argv, &aboutData);

    KCmdLineOptions options;
    options.add("f", ki18n("Start in fullscreen mode"));
    options.add("s", ki18n("Start in slideshow mode"));
    options.add("+[file or folder]", ki18n("A starting file or folder"));
    KCmdLineArgs::addCmdLineOptions(options);

    KApplication app;
    Gwenview::ImageFormats::registerPlugins();

    // startHelper must live for the whole live of the application
    StartHelper startHelper;
    if (app.isSessionRestored()) {
        kRestoreMainWindows<Gwenview::MainWindow>();
    } else {
        startHelper.createMainWindow();
    }
    return app.exec();
}
コード例 #3
0
ファイル: main.cpp プロジェクト: KDE/khipu
int main(int argc, char **argv)
{
    KAboutData about("khipu", "gplacs", ki18n(I18N_NOOP("Khipu")), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) 2010-2012, Percy Camilo Triveño Aucahuasi"));

    about.addAuthor(ki18n("Percy Camilo Triveño Aucahuasi"), ki18n("Main developer"), "*****@*****.**");

    about.addCredit(ki18n("Punit Mehta"), ki18n("GSoC-2013 student - Persistance file support. Plot-dictionary support. Worked for application actions, command-line improvements and space filtering. Several bug fixings"), "*****@*****.**");
    about.addCredit(ki18n("Manuel Álvarez Blanco"), ki18n("Thesis mentor - Guide and supervision during project conception. Bibliographical support. Numeric Mathematics and Algorithms support"), "");
    about.addCredit(ki18n("José Ignacio Cuevas Gonzáles"), ki18n("Thesis mentor - Supervision, Product Guide, Product promotion and former Client"), "*****@*****.**");
    about.addCredit(ki18n("Eduardo Fernandini Capurro"), ki18n("Thesis mentor - Supervision, Bibliographical Support, Product Guide and former Client"), "*****@*****.**");
    about.addCredit(ki18n("Jaime Urbina Pereyra"), ki18n("Thesis mentor - Supervision and former Main Project Mentor"), "*****@*****.**");

    about.addCredit(ki18n("Aleix Pol Gonzalez"), ki18n("KAlgebra and Analitza parser author, both vitals for the project"));

    about.addCredit(ki18n("José Fernando Ramos Ramirez"), ki18n("First version of Famous Curves Database. Build former windows installer"), "*****@*****.**");
    about.addCredit(ki18n("Susan Pamela Rios Sarmiento"), ki18n("First version of Famous Curves Database"), "*****@*****.**");

    about.addCredit(ki18n("Edgar Velasquez"), ki18n("2D Improvements"));
    about.addCredit(ki18n("Jose Torres Cardenas"), ki18n("3D Improvements"));
    about.addCredit(ki18n("Elizabeth Portilla Flores"), ki18n("3D Improvements"));
    about.addCredit(ki18n("Paul Murat Landauro Minaya"), ki18n("3D Improvements"));

    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[URL]", ki18n( "A Khipu-file to open" ));
    KCmdLineArgs::addCmdLineOptions(options);

    KApplication app;

    MainWindow *mainWindow = new MainWindow;

    if (app.isSessionRestored()) {
        RESTORE(MainWindow)
    } else {
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0) {
            mainWindow->checkforAutoSavedFile();
            mainWindow->show();
        } else {
            int i = 0;
            bool exit = false;
            for (; i < args->count(); i++) {
                if (i==0) {
                    if(args->arg(0)!="ignoreautosavedfile"){
                        if (!(mainWindow->openFile(args->url(0).path())))
                            exit = true;
                    }
                }
                mainWindow->show();
            }
            if (exit)
                mainWindow->deleteLater(); // can't open a khipu file, so just exit !
        }
        args->clear();
    }
    return app.exec();
}
コード例 #4
0
ファイル: main.cpp プロジェクト: mikolajs/milionaire
int main ( int argc, char **argv ) {
  KAboutData about ( "kmilion", 0, ki18n ( "KMilion" ), version, ki18n ( description ),
                     KAboutData::License_GPL, ki18n ( "(C) 2010 Mikołaj Sochacki" ), KLocalizedString(), 0, "*****@*****.**" );
  about.addAuthor ( ki18n ( "Mikołaj Sochacki" ), KLocalizedString(), "*****@*****.**" );
  KCmdLineArgs::init ( argc, argv, &about );

  KCmdLineOptions options;
  options.add ( "+[URL]", ki18n ( "Document to open" ) );
  KCmdLineArgs::addCmdLineOptions ( options );
  KApplication app;
  
  KMilion *widget = new KMilion;
  const QRect r = app.desktop()->frameGeometry();
  widget->setScreenSize ( r.width(), r.height() );
  KCmdLineArgs *args;
  if ( app.isSessionRestored() ) {
      RESTORE ( KMilion );
    }
  else {
      args = KCmdLineArgs::parsedArgs();
      widget->show();
    }
  args->clear();

  // Tak jest w orginale nie mam pojęcia dlaczego? Szczególnie po co kilka razy show!
  //see if we are starting with session management
//     if (app.isSessionRestored())
//     {
//         RESTORE(KMilion);
//     }
//     else
//     {
//         // no session.. just start up normally
//         KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
//         if (args->count() == 0)
//         {
//             //kmilion *widget = new kmilion;
//             widget->show();
//         }
//         else
//         {
//             int i = 0;
//             for (; i < args->count(); i++)
//             {
//                 //kmilion *widget = new kmilion;
//                 widget->show();
//             }
//         }
//         args->clear();
//     }

  return app.exec();
}
コード例 #5
0
ファイル: main.cpp プロジェクト: KDE/kmplayer
extern "C" KDE_EXPORT int kdemain (int argc, char *argv[]) {
    setsid ();

    KAboutData aboutData ("kmplayer", 0, ki18n("KMPlayer"),
            KMPLAYER_VERSION_STRING,
            ki18n ("Media player."),
            KAboutData::License_GPL,
            ki18n ("(c) 2002-2009, Koos Vriezen"),
            KLocalizedString(),
            I18N_NOOP ("http://kmplayer.kde.org"));
    aboutData.addAuthor(ki18n("Koos Vriezen"), ki18n("Maintainer"),"*****@*****.**");
    KCmdLineArgs::init (argc, argv, &aboutData);
    KCmdLineOptions options;
    options.add ("+[File]", ki18n ("file to open"));
    KCmdLineArgs::addCmdLineOptions (options);

    KMPlayer::Ids::init();

    KApplication app;
    QPointer <KMPlayerApp> kmplayer;

    if (app.isSessionRestored ()) {
        RESTORE (KMPlayerApp);
    } else {
        kmplayer = new KMPlayerApp ();
        kmplayer->show();

        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

        KUrl url;
        if (args->count () == 1)
            url = args->url (0);
        if (args->count () > 1)
            for (int i = 0; i < args->count (); i++) {
                KUrl url = args->url (i);
                if (url.url ().indexOf ("://") < 0)
                    url = KUrl (QFileInfo (url.url ()).absoluteFilePath ());
                if (url.isValid ())
                    kmplayer->addUrl (url);
            }
        kmplayer->openDocumentFile (url);
        args->clear ();
    }
    int retvalue = app.exec ();

    delete kmplayer;

    KMPlayer::Ids::reset();

    return retvalue;
}
コード例 #6
0
ファイル: main.cpp プロジェクト: sandeepraju/MovieManager
int main(int argc, char **argv)
{
    KAboutData about("moviemanager", 0, ki18n("MovieManager"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) 2012 Sandeep Raju P & Sadan Sohan M"), KLocalizedString(), 0, "[email protected]\[email protected]");
    about.addAuthor( ki18n("Sandeep Raju P"), KLocalizedString(), "*****@*****.**" );
    about.addAuthor( ki18n("Sadan Sohan M"), KLocalizedString(), "*****@*****.**" );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    MovieManager *widget = new MovieManager();

    // see if we are starting with session management
    if (app.isSessionRestored())
    {
        RESTORE(MovieManager);
    }
    else
    {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0)
        {
            //moviemanager *widget = new moviemanager;
            //widget->setMaximumSize(200,200);
            widget->show();
            //mainListScroll->show();
           // widget->mainListScroll->show();

        }
        else
        {
            int i = 0;
            for (; i < args->count(); i++)
            {
                //moviemanager *widget = new moviemanager;
                //widget->setMaximumSize(200,200);
                widget->show();
                //widget->mainListScroll->show();
            }
        }
        args->clear();
    }

    return app.exec();
}
コード例 #7
0
ファイル: main.cpp プロジェクト: michaelforney/trickle
int main(int argc, char *argv[])
{
    KAboutData about("trickle", 0, ki18n("Trickle"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2007-2009 Michael Forney"), KLocalizedString(), 0, "*****@*****.**");
    about.addAuthor( ki18n("Michael Forney"), KLocalizedString(), "*****@*****.**" );
    KCmdLineArgs::init(argc, argv, &about);
    KApplication app;
    Trickle * trickle = new Trickle();
    if (app.isSessionRestored())
    {
        RESTORE(Trickle);
    }
    else
    {
        trickle->show();
    }
    app.exec();
    return 0;
}
コード例 #8
0
ファイル: main.cpp プロジェクト: KDE/ksirk
int main(int argc, char *argv[])
{
    kDebug() << "Hello World!";
    KAboutData aboutData( "ksirk", 0, ki18n("KsirK"),
                          KDE_VERSION_STRING, ki18n(description), KAboutData::License_GPL,
                          ki18n("(c) 2002-2013, Gaël de Chalendar\n"),
                          ki18n("For help and user manual, please see\nthe KsirK web site."));
    aboutData.addAuthor(ki18n("Gael de Chalendar aka Kleag"),KLocalizedString(), "*****@*****.**");
    aboutData.addAuthor(ki18n("Nemanja Hirsl"),ki18n("Current maintainer"), "*****@*****.**");
    aboutData.addAuthor(ki18n("Robin Doer"));
    aboutData.addAuthor(ki18n("Albert Astals Cid"));
    aboutData.addAuthor(ki18n("Michal Golunski (Polish translation)"),KLocalizedString(), "*****@*****.**");
    aboutData.addAuthor(ki18n("French students of the 'IUP ISI 2007-2008':"));
    aboutData.addAuthor(ki18n("&nbsp;&nbsp;Anthony Rey<br/>&nbsp;&nbsp;Benjamin Lucas<br/>&nbsp;&nbsp;Benjamin Moreau<br/>&nbsp;&nbsp;Gaël Clouet<br/>&nbsp;&nbsp;Guillaume Pelouas<br/>&nbsp;&nbsp;Joël Marco<br/>&nbsp;&nbsp;Laurent Dang<br/>&nbsp;&nbsp;Nicolas Linard<br/>&nbsp;&nbsp;Vincent Sac"));
    aboutData.setHomepage("http://games.kde.org/ksirk/");
    KCmdLineArgs::init( argc, argv, &aboutData );

    KCmdLineOptions options;
    options.add("+[File]", ki18n("file to open"));
    KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.

    KApplication app;
    KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));

    if (app.isSessionRestored())
    {
        RESTORE(Ksirk::KGameWindow);
    }
    else
    {
        kDebug() << "Creating main window";
        Ksirk::KGameWindow *ksirk = new Ksirk::KGameWindow();
//       connect(app,SIGNAL(lastWindowClosed()),app,SLOT(quit()));
//         app.setMainWidget(ksirk);
        ksirk->show();
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        args->clear();
    }
    kDebug() << "Executing app";
    int res =  app.exec();
    KGlobal::locale()->removeCatalog( "libkdegames" );
    return res;
}
コード例 #9
0
ファイル: main.cpp プロジェクト: sandeepraju/kapptemplate
int main(int argc, char **argv)
{
    KAboutData about("photomanager", 0, ki18n("photomanager"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) 2012 vvs"), KLocalizedString(), 0, "*****@*****.**");
    about.addAuthor( ki18n("vvs"), KLocalizedString(), "*****@*****.**" );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    photomanager *widget = new photomanager;

    // see if we are starting with session management
    if (app.isSessionRestored())
    {
        RESTORE(photomanager);
    }
    else
    {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0)
        {
            //photomanager *widget = new photomanager;
            widget->show();
        }
        else
        {
            int i = 0;
            for (; i < args->count(); i++)
            {
                //photomanager *widget = new photomanager;
                widget->show();
            }
        }
        args->clear();
    }

    return app.exec();
}
コード例 #10
0
ファイル: main.cpp プロジェクト: cojack/KWebCam
int main(int argc, char **argv)
{
    KAboutData about("kwebcam", 0, ki18n("KWebCam"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) %{CURRENT_YEAR} %{AUTHOR}"), KLocalizedString(), 0, "%{EMAIL}");
    about.addAuthor( ki18n("%{AUTHOR}"), KLocalizedString(), "%{EMAIL}" );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    KWebCam *widget = new KWebCam;

    // see if we are starting with session management
    if (app.isSessionRestored())
    {
        RESTORE(KWebCam);
    }
    else
    {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0)
        {
            //kwebcam *widget = new kwebcam;
            widget->show();
        }
        else
        {
            int i = 0;
            for (; i < args->count(); i++)
            {
                //kwebcam *widget = new kwebcam;
                widget->show();
            }
        }
        args->clear();
    }

    return app.exec();
}
コード例 #11
0
ファイル: main.cpp プロジェクト: bysreg/komo
int main(int argc, char **argv)
{
    KAboutData aboutData( "kreversi", 0, ki18n("KReversi"),
                          "2.0", ki18n(description), KAboutData::License_GPL,
                          ki18n("(c) 1997-2000, Mario Weilguni\n(c) 2004-2006, Inge Wallin\n(c) 2006, Dmitry Suzdalev"),
                          KLocalizedString(), "http://games.kde.org/kreversi" );
    aboutData.addAuthor(ki18n("Mario Weilguni"),ki18n("Original author"), "*****@*****.**");
    aboutData.addAuthor(ki18n("Inge Wallin"),ki18n("Original author"), "*****@*****.**");
    aboutData.addAuthor(ki18n("Dmitry Suzdalev"), ki18n("Game rewrite for KDE4. Current maintainer."), "*****@*****.**");
    aboutData.addCredit(ki18n("Simon Hürlimann"), ki18n("Action refactoring"));
    aboutData.addCredit(ki18n("Mats Luthman"), ki18n("Game engine, ported from his JAVA applet."));
    aboutData.addCredit(ki18n("Arne Klaassen"), ki18n("Original raytraced chips."));
    aboutData.addCredit(ki18n("Mauricio Piacentini"), ki18n("Vector chips and background for KDE4."));
    aboutData.addCredit(ki18n("Brian Croom"), ki18n("Port rendering code to KGameRenderer"), "*****@*****.**");

    KCmdLineArgs::init( argc, argv, &aboutData );

    KCmdLineOptions options;
    options.add("demo", ki18n( "Start with demo game playing" ));
    KCmdLineArgs::addCmdLineOptions( options );

    KApplication application;
    KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));

    if( application.isSessionRestored() )
    {
        RESTORE(KReversiMainWindow)
    }
    else
    {
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        KReversiMainWindow *mainWin = new KReversiMainWindow( 0, args->isSet( "demo" ) );
	args->clear();
        mainWin->show();
    }

    KExtHighscore::ExtManager highscoresManager;

    return application.exec();
}
コード例 #12
0
ファイル: selkie-remixer.cpp プロジェクト: KDE/silk
int main(int argc, char **argv)
{
    KAboutData about("webappeditor", 0, ki18n("Selkie Remixer"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("Copyright 2009-2010 Sebastian Kügler"), KLocalizedString(), 0, "*****@*****.**");
    about.addAuthor( ki18n("Sebastian Kügler"), KLocalizedString(), "*****@*****.**" );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[path]", ki18n( "Selkie package to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    SelkieEditor *widget = 0;
    // see if we are starting with session management
    if (app.isSessionRestored()) {
        //RESTORE(WebAppEditor);
    } else {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0) {
            widget = new SelkieEditor(QString());
            //webappeditor *widget = new webappeditor;
            widget->show();
        } else {
            kDebug() << "Loading:" << argv[0];
            widget = new SelkieEditor(argv[1]);
            widget->show();
            /*
            int i = 0;
            for (; i < args->count(); i++) {
                //webappeditor *widget = new webappeditor;
            }
            */
        }
        args->clear();
    }

    return app.exec();
}
コード例 #13
0
ファイル: main.cpp プロジェクト: jsj2008/kdegames
int main(int argc, char *argv[])
{
  kDebug() << "Hello World!";
  KAboutData aboutData(
    "ksirkskineditor",
    0,
    ki18n("KsirK Skin Editor"),
    KDE_VERSION_STRING,
    ki18n(description),
    KAboutData::License_GPL,
    ki18n("(c) 2008, Gaël de Chalendar\n"),
    ki18n("For help and user manual, please see\nThe KsirK Web site"),
    "http://games.kde.org/game.php?game=ksirk");
  aboutData.addAuthor(ki18n("Gael de Chalendar aka Kleag"),KLocalizedString(), "*****@*****.**");

  KCmdLineArgs::init( argc, argv, &aboutData );

  KCmdLineOptions options;
  options.add("+[File]", ki18n("file to open"));
  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.

  KApplication app;
  KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
  if (app.isSessionRestored())
  {
      RESTORE(KsirkSkinEditor::MainWindow);
  }
  else
  {
    kDebug() << "Creating main window";
    KsirkSkinEditor::MainWindow *ksirkskineditor = new KsirkSkinEditor::MainWindow();
    ksirkskineditor->show();
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
    args->clear();
  }
  kDebug() << "Executing app";
  return app.exec();
}  
コード例 #14
0
ファイル: main.cpp プロジェクト: Noughmad/Opeke
int main ( int argc, char **argv )
{
	KAboutData about ( "opeke", 0, ki18n ( "Opeke" ), version, ki18n ( description ),
	                   KAboutData::License_GPL, ki18n ( "(C) 2008 Miha Čančula" ), KLocalizedString(), 0, "*****@*****.**" );
	about.addAuthor ( ki18n ( "Miha Čančula" ), KLocalizedString(), "*****@*****.**" );
	KCmdLineArgs::init ( argc, argv, &about );

	KCmdLineOptions options;
	options.add ( "+[URL]", ki18n ( "Document to open" ) );
	KCmdLineArgs::addCmdLineOptions ( options );
	KApplication app;

	Opeke *mainwidget = new Opeke; // Main screen turn on

	// see if we are starting with session management
	if ( app.isSessionRestored() )
	{
		RESTORE ( Opeke );
	}
	else
	{
		// no session.. just start up normally
		KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
		if ( args->count() == 0 )
		{
			mainwidget->show();
		}
		else
		{
			mainwidget->show();
			mainwidget->openFile(args->url(0).url());
		}
		args->clear();
	}

	return app.exec();
}
コード例 #15
0
ファイル: main.cpp プロジェクト: annulen/kompare
/**
 * Setting up the KAboutData structure.
 * Parsing and handling of the given command line arguments.
 * @param argc   the number of arguments
 * @param argv   the array of arguments
 * @return exit status
 */
int main(int argc, char *argv[])
{
	KAboutData aboutData( "kompare", 0, ki18n("Kompare"), version, ki18n(description),
	                      KAboutData::License_GPL,
	                      ki18n("(c) 2001-2004 John Firebaugh, (c) 2001-2005,2009 Otto Bruggeman, (c) 2004-2005 Jeff Snyder, (c) 2007-2012 Kevin Kofler") );
	aboutData.addAuthor( ki18n("John Firebaugh"), ki18n("Author"), "*****@*****.**" );
	aboutData.addAuthor( ki18n("Otto Bruggeman"), ki18n("Author"), "*****@*****.**" );
	aboutData.addAuthor( ki18n("Jeff Snyder"), ki18n("Developer"), "*****@*****.**" );
	aboutData.addCredit( ki18n("Kevin Kofler"), ki18n("Maintainer"), "*****@*****.**" );
	aboutData.addCredit( ki18n("Chris Luetchford"), ki18n("Kompare icon artist"), "*****@*****.**" );
	aboutData.addCredit( ki18n("Malte Starostik"), ki18n("A lot of good advice"), "*****@*****.**" );
	aboutData.addCredit( ki18n("Bernd Gehrmann"), ki18n("Cervisia diff viewer"), "*****@*****.**" );

	KCmdLineArgs::init(argc, argv, &aboutData);

	KCmdLineOptions options;
	options.add("c", ki18n( "This will compare URL1 with URL2" ));
	options.add("o", ki18n( "This will open URL1 and expect it to be diff output. URL1 can also be a '-' and then it will read from standard input. Can be used for instance for cvs diff | kompare -o -. Kompare will do a check to see if it can find the original file(s) and then blend the original file(s) into the diffoutput and show that in the viewer. -n disables the check." ));
	options.add("b", ki18n( "This will blend URL2 into URL1, URL2 is expected to be diff output and URL1 the file or folder that the diffoutput needs to be blended into. " ));
	options.add("n", ki18n( "Disables the check for automatically finding the original file(s) when using '-' as URL with the -o option." ));
	options.add("e <encoding>", ki18n( "Use this to specify the encoding when calling it from the command line. It will default to the local encoding if not specified." ));
	options.add("+[URL1 [URL2]]");
	options.add("+-");
	KCmdLineArgs::addCmdLineOptions( options );
	KApplication kompare;
	bool difault = false;

	KompareShell* ks;

	// see if we are starting with session management
	if (kompare.isSessionRestored())
	{
		RESTORE(KompareShell)
	}
	else
	{
		KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

		ks = new KompareShell();
		ks->setObjectName( "FirstKompareShell" );

		kDebug( 8100 ) << "Arg Count = " << args->count() << endl;
		for ( int i=0; i < args->count(); i++ )
		{
			kDebug( 8100 ) << "Argument " << (i+1) << ": " << args->arg( i ) << endl;
		}

		if ( args->isSet( "e" ) )
		{
			// Encoding given...
			// FIXME: Need to implement this...
		}

		if ( args->isSet( "o" ) )
		{
			kDebug( 8100 ) << "Option -o is set" << endl;
			if ( args->count() != 1 )
			{
				difault = true;
			}
			else
			{
				ks->show();
				kDebug( 8100 ) << "OpenDiff..." << endl;
				if ( args->arg(0) == QLatin1String("-") )
					ks->openStdin();
				else
					ks->openDiff( args->url( 0 ) );
				difault = false;
			}
		}
		else if ( args->isSet( "c" ) )
		{
			kDebug( 8100 ) << "Option -c is set" << endl;
			if ( args->count() != 2 )
			{
				KCmdLineArgs::usage( "kompare" );
				difault = true;
			}
			else
			{
				ks->show();
				KUrl url0 = args->url( 0 );
				kDebug( 8100 ) << "URL0 = " << url0.url() << endl;
				KUrl url1 = args->url( 1 );
				kDebug( 8100 ) << "URL1 = " << url1.url() << endl;
				ks->compare( url0, url1 );
				difault = false;
			}
		}
		else if ( args->isSet( "b" ) )
		{
			kDebug( 8100 ) << "Option -b is set" << endl;
			if ( args->count() != 2 )
			{
				KCmdLineArgs::usage( "kompare" );
				difault = true;
			}
			else
			{
				ks->show();
				kDebug( 8100 ) << "blend..." << endl;
				KUrl url0 = args->url( 0 );
				kDebug( 8100 ) << "URL0 = " << url0.url() << endl;
				KUrl url1 = args->url( 1 );
				kDebug( 8100 ) << "URL1 = " << url1.url() << endl;
				ks->blend( url0, url1 );
				difault = false;
			}
		}
		else if ( args->count() == 1 )
		{
			ks->show();

			kDebug( 8100 ) << "Single file. so openDiff/openStdin is only possible..." << endl;
			if ( args->arg(0) == QLatin1String("-") )
				ks->openStdin();
			else
				ks->openDiff( args->url( 0 ) );

			difault = false;
		}
		else if ( args->count() == 2 )
		{
			// In this case we are assuming you want to compare files/dirs
			// and not blending because that is almost impossible to detect
			ks->show();
			kDebug( 8100 ) << "Dunno, we'll have to figure it out later, trying compare for now..." << endl;
			KUrl url0 = args->url( 0 );
			kDebug( 8100 ) << "URL0 = " << url0.url() << endl;
			KUrl url1 = args->url( 1 );
			kDebug( 8100 ) << "URL1 = " << url1.url() << endl;
			ks->compare( url0, url1 );
			difault = false;
		}
		else if ( args->count() == 0 ) // no options and no args
		{
			difault = true;
		}

		if ( difault )
		{
			KompareURLDialog dialog( 0 );

			dialog.setCaption( i18n("Compare Files or Folders") );
			dialog.setFirstGroupBoxTitle( i18n( "Source" ) );
			dialog.setSecondGroupBoxTitle( i18n( "Destination" ) );

			KGuiItem compareGuiItem( i18n( "Compare" ), QString(), i18n( "Compare these files or folder" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
			dialog.setButtonGuiItem( KDialog::Ok, compareGuiItem );

			dialog.setGroup( "Recent Compare Files" );

			dialog.setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
			dialog.setSecondURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );

			if( dialog.exec() == QDialog::Accepted )
			{
				ks->show();
				ks->viewPart()->setEncoding( dialog.encoding() );
				ks->compare( dialog.getFirstURL(), dialog.getSecondURL() );
			}
			else
                        {
				return -1;
                        }
		}

		args->clear();
	}

	return kompare.exec();
}
コード例 #16
0
int main(int argc, char **argv) {
    k9batch batch;
    if (batch.exec(argc,argv)) 
      return 1;
    
    KAboutData about("k9copy", 0, ki18n("k9copy"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) 2004-2011 Jean-Michel PETIT"), KLocalizedString(), 0, "*****@*****.**");
    about.addAuthor( ki18n("Jean-Michel PETIT"), KLocalizedString(), "*****@*****.**" );
    about.setTranslator(ki18n("_: NAME OF TRANSLATORS\\nYour names")
                        ,ki18n("_: EMAIL OF TRANSLATORS\\nYour emails"));

    KCmdLineArgs::init(argc, argv, &about);
    KCmdLineOptions options;
    options.add( "input <device>", ki18n("input device"));
    options.add("output <device>", ki18n("output device"));
    options.add("dvdtitle <number>", ki18n("title to play"));
    options.add("assistant", ki18n("the k9copy backup assistant"));


    KCmdLineArgs::addCmdLineOptions( options );

    //    KCmdLineOptions options;
    //    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    k9Tools::setMainThread();

    if (app.isSessionRestored()) {
        RESTORE(k9Copy);
    } else {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        QString InputOptionArg( args->getOption("input"));
        QString OutputOptionArg( args->getOption("output"));
        k9Config::checkCodecs();
        if (!args->isSet("assistant")) {
            k9Copy  *widget = new k9Copy;
            if (InputOptionArg !="") {
		widget->setInput( InputOptionArg);
		widget->fileOpen();
            }
            if (OutputOptionArg !="")
		widget->setOutput( OutputOptionArg);

            if ((InputOptionArg !="") && (OutputOptionArg!=""))
		widget->clone( InputOptionArg,OutputOptionArg);
            widget->show();
        } else {
            k9Assistant *ast=k9Assistant::createAssistant();
            if (InputOptionArg !="")
                ast->setPath(InputOptionArg);
            k9Dialogs::setMainWidget(ast);
            QTimer::singleShot (10, ast, SLOT (run ()));

	}	

        int res=app.exec();
        k9Config config;
        if (config.getPrefDelTmpFiles())
            k9Tools::clearOutput();

        return res;
    }
}
コード例 #17
0
ファイル: main.cpp プロジェクト: aspotashev/lokalize-stupids
int main(int argc, char **argv)
{
    KAboutData about("lokalize", 0, ki18nc("@title", "Lokalize"), version, ki18n(description),
                     KAboutData::License_GPL, ki18nc("@info:credit", "(c) 2007-2011 Nick Shaforostoff\n(c) 1999-2006 The KBabel developers") /*, KLocalizedString(), 0, "*****@*****.**"*/);
    about.addAuthor( ki18n("Nick Shaforostoff"), KLocalizedString(), "*****@*****.**" );
    about.addCredit (ki18n("Google Inc."), ki18n("sponsored development as part of Google Summer Of Code program"), QByteArray(), "http://google.com");
    about.addCredit (ki18n("Translate-toolkit"), ki18n("provided excellent cross-format converting scripts"), QByteArray(), "http://translate.sourceforge.net");
    about.addCredit (ki18n("Viesturs Zarins"), ki18n("project tree merging translation+templates"), "*****@*****.**", QByteArray());
    about.addCredit (ki18n("Stephan Johach"), ki18n("bug fixing patches"), "*****@*****.**");
    about.addCredit (ki18n("Chusslove Illich"), ki18n("bug fixing patches"), "*****@*****.**");
    about.addCredit (ki18n("Jure Repinc"), ki18n("testing and bug fixing"), "*****@*****.**");
    about.addCredit (ki18n("Stefan Asserhall"), ki18n("patches"), "*****@*****.**");
    about.addCredit (ki18n("Papp Laszlo"), ki18n("bug fixing patches"), "*****@*****.**");

    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    //options.add("merge-source <URL>", ki18n( "Source for the merge mode" ));
    options.add("noprojectscan", ki18n( "Do not scan files of the project."));
    options.add("project <filename>", ki18n( "Load specified project."));
    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);

    KApplication app;

    //qDebug() is important as it aviods compile 'optimization'.
    qDebug()<<qRegisterMetaType<DocPosition>();
    qDebug()<<qRegisterMetaType<InlineTag>();
    qDebug()<<qRegisterMetaType<CatalogString>();
    qRegisterMetaTypeStreamOperators<InlineTag>("InlineTag");
    qRegisterMetaTypeStreamOperators<CatalogString>("CatalogString");
    qAddPostRoutine(&cleanupSpellers);

    // see if we are starting with session management
    if (app.isSessionRestored())
        kRestoreMainWindows<LokalizeMainWindow>();
    else
    {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

        if (!args->getOption("project").isEmpty())
        {
            // load needs an absolute path
            // FIXME: I do not know how to handle urls here
            // bug 245546 regarding symlinks
            QFileInfo projectFileInfo(args->getOption("project").toUtf8());
            QString projectFilePath=projectFileInfo.canonicalFilePath();
            if (projectFilePath.isEmpty())
                projectFilePath=projectFileInfo.absoluteFilePath();
            Project::instance()->load( projectFilePath );
        }
        LokalizeMainWindow* lmw=new LokalizeMainWindow;
        SettingsController::instance()->setMainWindowPtr(lmw);
        kWarning()<<"showing LokalizeMainWindow";
        lmw->show();
        kWarning()<<"LokalizeMainWindow shown";
        int j=args->count();
        while (--j>=0)
            lmw->fileOpen(args->url(j));

        Project::instance()->model()->setCompleteScan(args->isSet("projectscan"));
        args->clear();
    }

    int code=app.exec();

    ThreadWeaver::Weaver::instance()->dequeue();
    Project::instance()->model()->weaver()->dequeue();

    if (SettingsController::instance()->dirty) //for config changes done w/o config dialog
        Settings::self()->writeConfig();

    if (Project::instance()->isLoaded())
        Project::instance()->save();

    qWarning()<<"QCoreApplication::processEvents()...";
    QCoreApplication::processEvents();
    QCoreApplication::sendPostedEvents(0,0);

    qWarning()<<"Finishing Project jobs...";
    //Project::instance()->model()->weaver()->finish();
    // HACK due to deadlock with libstreamanalyzer.so.0 -> libxml2.so.2 -> etree.so -> libpython2.5.so.1.0 -> PyThread_acquire_lock
    while (!Project::instance()->model()->weaver()->isIdle())
    {
        QCoreApplication::processEvents();
        QCoreApplication::sendPostedEvents(0,0);
    }

    qWarning()<<"Finishing TM jobs...";
    ThreadWeaver::Weaver::instance()->finish();

    return code;
}
コード例 #18
0
ファイル: main.cpp プロジェクト: ShermanHuang/kdesdk
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
    KAboutData about("cervisia", 0, ki18n("Cervisia"), CERVISIA_VERSION,
                     ki18n("A CVS frontend"), KAboutData::License_GPL,
                     ki18n("Copyright (c) 1999-2002 Bernd Gehrmann\n"
                           "Copyright (c) 2002-2008 the Cervisia authors"), KLocalizedString(),
                     "http://cervisia.kde.org");

    about.addAuthor(ki18n("Bernd Gehrmann"), ki18n("Original author and former "
                    "maintainer"), "*****@*****.**");
    about.addAuthor(ki18n("Christian Loose"), ki18n("Maintainer"),
                    "*****@*****.**");
    about.addAuthor(ki18n("Andr\303\251 W\303\266bbeking"), ki18n("Developer"),
                    "*****@*****.**");
    about.addAuthor(ki18n("Carlos Woelz"), ki18n("Documentation"),
                    "*****@*****.**");

    about.addCredit(ki18n("Richard Moore"), ki18n("Conversion to KPart"),
                    "*****@*****.**");
    about.addCredit(ki18n("Laurent Montel"), ki18n("Conversion to D-Bus"),
                    "*****@*****.**");

    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[directory]", ki18n("The sandbox to be loaded"));
    options.add("resolve <file>", ki18n("Show resolve dialog for the given file"));
    options.add("log <file>", ki18n("Show log dialog for the given file"));
    options.add("annotate <file>", ki18n("Show annotation dialog for the given file"));
    KCmdLineArgs::addCmdLineOptions(options);

    KApplication app;

    QString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve");
    if (!resolvefile.isEmpty())
        return ShowResolveDialog(resolvefile);

    // is command line option 'show log dialog' specified?
    QString logFile = KCmdLineArgs::parsedArgs()->getOption("log");
    if( !logFile.isEmpty() )
        return ShowLogDialog(logFile);

    // is command line option 'show annotation dialog' specified?
    QString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate");
    if( !annotateFile.isEmpty() )
        return ShowAnnotateDialog(annotateFile);

    if ( app.isSessionRestored() ) {
        RESTORE(CervisiaShell);
    } else {
        CervisiaShell* shell = new CervisiaShell();

        const KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
        if( args->count() )
        {
            KUrl directory = args->url(0);
            shell->openURL(directory);
        }
        else
            shell->openURL();

        shell->setWindowIcon(qApp->windowIcon());
        shell->show();
    }

    int res = app.exec();
    cleanupTempFiles();
    return res;
}
コード例 #19
0
ファイル: main.cpp プロジェクト: ShermanHuang/kdesdk
int main( int argc, char ** argv )
{
  KAboutData aboutData("kcachegrind", 0,
                       ki18n("KCachegrind"),
                       KCACHEGRIND_VERSION,
                       ki18n("KDE Frontend for Callgrind/Cachegrind"),
                       KAboutData::License_GPL,
                       ki18n("(C) 2002 - 2011"), KLocalizedString(),
                       "http://kcachegrind.sf.net");
  aboutData.addAuthor(ki18n("Josef Weidendorfer"),
                      ki18n("Author/Maintainer"),
                      "*****@*****.**");

  KCmdLineArgs::init(argc, argv, &aboutData);

  KCmdLineOptions options;
  //options.add("r <exec>", ki18n("Run <exec> under cachegrind"));
  options.add("+[trace]", ki18n("Show information of this trace"));
  KCmdLineArgs::addCmdLineOptions( options );

  KApplication a;
  KGlobal::locale()->insertCatalog("kcachegrind_qt");
  TopLevel* t;
  Loader::initLoaders();

  KConfig* kc = KGlobal::config().data();
  ConfigStorage::setStorage(new KDEConfigStorage(kc));

  if (a.isSessionRestored()){
    int n = 1;
    while (KMainWindow::canBeRestored(n)){
      (new TopLevel())->restore(n);
      n++;
    }
  }
  else {
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
    int nbArgs = args->count();
    if (nbArgs>0) {
      for(int i = 0; i < nbArgs; i++) {
        t = new TopLevel();
        t->show();
        t->loadDelayed(args->arg(i));
      }
    }
    else {
      // load trace in current dir
      t = new TopLevel();
      t->show();
      t->loadDelayed(".");
    }
  }

  a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
  int res = a.exec();

  // to make leak checking in valgrind happy...
  Loader::deleteLoaders();
  ProfileContext::cleanup();
  ConfigStorage::cleanup();

  return res;
}
コード例 #20
0
int main(int argc, char **argv)
{
  KAboutData about("kgrapheditor", 0, ki18n("KGraphEditor"), version, ki18n(description),
                    KAboutData::License_GPL, ki18n("(C) 2005-2010 Gaël de Chalendar"), KLocalizedString(), 0, "*****@*****.**");
  about.addAuthor( ki18n("Gaël de Chalendar"), KLocalizedString(), "*****@*****.**" );
  KCmdLineArgs::init(argc, argv, &about);

  KCmdLineOptions options;
  options.add("+[URL]", ki18n( "Dot graph to open" ));
  KCmdLineArgs::addCmdLineOptions( options );
  KApplication app;
  
// see if we are starting with session management
  if (app.isSessionRestored())
  {
      RESTORE(KGraphEditor);
  }
  else
  {
      // no session.. just start up normally
      KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

      KGraphEditor *widget = 0;
      if ( args->count() == 0 )
      {
        widget = new KGraphEditor;
        new KgrapheditorAdaptor(widget);
        QDBusConnection::sessionBus().registerObject("/KGraphEditor", widget);
        widget->show();
      }
      else
      {
        QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered( "org.kde.kgrapheditor" );
      
        bool instanceExists = reply.value();
  
        for (int i = 0; i < args->count(); i++ )
        {
          if (instanceExists 
              && (KMessageBox::questionYesNo(0, 
                                         i18n("A KGraphEditor window is already open, where do you want to open this file?"),
                                         i18n("Opening in new window confirmation"),
                                             KGuiItem(i18nc("Where to open a file", "Existing window")),
                                             KGuiItem(i18nc("Where to open a file", "New window")),
                                             "openInNewWindowMode"   ) == KMessageBox::Yes) )
          {
            QByteArray tosenddata;
            QDataStream arg(&tosenddata, QIODevice::WriteOnly);
            QString strarg = args->arg(i);
            KUrl url;
            if (strarg.left(1) == "/")
              url = KUrl(strarg);
            else url = KUrl(QDir::currentPath() + '/' + strarg);
            arg << url;
            QDBusInterface iface("org.kde.kgrapheditor", "/KGraphEditor", "", QDBusConnection::sessionBus());
            if (iface.isValid()) 
            {
              QDBusReply<void> reply = iface.call("openUrl", url.pathOrUrl());
              if (reply.isValid()) 
              {
                kDebug() << "Reply was valid" << endl;
                return 0;
              }

              kError() << "Call failed: " << reply.error().message() << endl;
              return 1;
            }
            kError() << "Invalid interface" << endl;
            exit(0);
          }
          else
          {
            widget = new KGraphEditor;
            new KgrapheditorAdaptor(widget);
            QDBusConnection::sessionBus().registerObject("/KGraphEditor", widget);
            widget->show();
            widget->openUrl( args->url( i ) );
          }
        }
      }
      args->clear();
    if (widget != 0)
    {
      widget->  reloadPreviousFiles();
    }
    
  }
  return app.exec();
}
コード例 #21
0
ファイル: syanotmain.cpp プロジェクト: kleag/syanot
int main(int argc, char **argv)
{
  KAboutData about("syanot", 0, ki18n("Syanot"), version, ki18n(description),
                    KAboutData::License_GPL, ki18n("(C) 2007 Gael de Chalendar"), KLocalizedString(), 0, "*****@*****.**");
  about.addAuthor( ki18n("Gael de Chalendar"), KLocalizedString(), "*****@*****.**" );
  KCmdLineArgs::init(argc, argv, &about);

  KCmdLineOptions options;
  options.add("+[URL]", ki18n( "Dot graph to open" ));
  options.add("comparewith file", ki18n("URL of a file containing an analysis to compare the main analysis with"));
  options.add("utterances list", ki18n("List of utterances ids to display"));
  KCmdLineArgs::addCmdLineOptions( options );
  KApplication app;
  
// see if we are starting with session management
  if (app.isSessionRestored())
  {
      RESTORE(Syanot);
  }
  else
  {
      // no session.. just start up normally
      KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

      Syanot *widget = 0;
      if ( args->count() == 0 )
      {
        widget = new Syanot();
        new SyanotAdaptor(widget);
        QDBusConnection::sessionBus().registerObject("/Syanot", widget);
        widget->show();
      }
      else
      {
        QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered( "org.kde.syanot" );
      
        bool instanceExists = reply.value();
  
        for (int i = 0; i < args->count(); i++ )
        {
          if (instanceExists 
              && (KMessageBox::questionYesNo(0, 
                                         i18n("There is already a Syanot window opened. What's your choice ?"),
                                         i18n("Opening in new window confirmation"),
                                             KGuiItem("Open in the existing one"),
                                             KGuiItem("Open in new window"),
                                             "openInNewWindowMode"   ) == KMessageBox::Yes) )
          {
            QByteArray tosenddata;
            QDataStream arg(&tosenddata, QIODevice::WriteOnly);
            QString strarg = args->arg(i);
            KUrl url;
            if (strarg.left(1) == "/")
              url = KUrl(strarg);
            else url = KUrl(QDir::currentPath() + '/' + strarg);
            arg << url;
            QDBusInterface iface("org.kde.syanot", "/Syanot", "", QDBusConnection::sessionBus());
            if (iface.isValid()) 
            {
              if (args->isSet("utterances"))
              {
                QDBusReply<void> reply = iface.call("slotSetUtterances", args->getOption("utterances"));
                if (reply.isValid())
                {
                  kDebug() << "Reply was valid" << endl;
                }
                else
                {
                  kError() << "Call failed: " << reply.error().message() << endl;
                  return 1;
                }
              }
              QDBusReply<void> reply = iface.call("openUrl", url.pathOrUrl());
              if (reply.isValid()) 
              {
                kDebug() << "Reply was valid" << endl;
              }
              else
              {
                kError() << "Call failed: " << reply.error().message() << endl;
                return 1;
              }
              if (args->isSet("comparewith"))
              {
                QString strarg = args->getOption("comparewith");
                KUrl url;
                if (strarg.left(1) == "/")
                  url = KUrl(strarg);
                else url = KUrl(QDir::currentPath() + '/' + strarg);
                reply = iface.call("openSecondaryUrl", url.pathOrUrl());
                if (reply.isValid())
                {
                  kDebug() << "Reply was valid" << endl;
                }
                else
                {
                  kError() << "Call failed: " << reply.error().message() << endl;
                  return 1;
                }
                return 0;
              }
            }
            kError() << "Invalid interface" << endl;
            exit(0);
          }
          else
          {
            widget = new Syanot;
            new SyanotAdaptor(widget);
            QDBusConnection::sessionBus().registerObject("/Syanot", widget);
            widget->show();
            if (args->isSet("utterances"))
            {
              widget->slotSetUtterances(args->getOption("utterances"));
            }
            widget->openUrl( args->url( i ) );
            if (args->isSet("comparewith"))
            {
                QString strarg = args->getOption("comparewith");
              kDebug() << "comparewith" << args->getOption("comparewith");
                KUrl url;
                if (strarg.left(1) == "/")
                  url = KUrl(strarg);
                else url = KUrl(QDir::currentPath() + '/' + strarg);
              kDebug() << "openSecondaryUrl" << url.pathOrUrl();
              widget->openSecondaryUrl(url.pathOrUrl());
            }
          }
        }
      }
      args->clear();
  }
  return app.exec();
}