| 59 | } |
| 60 | |
| 61 | int main(int argc, char** argv) |
| 62 | { |
| 63 | QApplication app(argc, argv); |
| 64 | |
| 65 | KAboutData aboutData( QStringLiteral("kdevprojectopen"), i18n( "KDevelop" ), QStringLiteral("0.99"), i18n("opens a project then closes it, debugging tool"), KAboutLicense::GPL, |
| 66 | i18n( "Copyright 1999-2012, The KDevelop developers" ), QString(), QStringLiteral("https://www.kdevelop.org/") ); |
| 67 | aboutData.addAuthor( i18n("Aleix Pol Gonzalez"), i18n( "" ), QStringLiteral("aleixpol@kde.org") ); |
| 68 | KAboutData::setApplicationData(aboutData); |
| 69 | |
| 70 | QCommandLineParser parser; |
| 71 | aboutData.setupCommandLine(&parser); |
| 72 | parser.addPositionalArgument(QStringLiteral("projects"), i18n("Projects to load")); |
| 73 | |
| 74 | parser.process(app); |
| 75 | aboutData.processCommandLine(&parser); |
| 76 | |
| 77 | if(parser.positionalArguments().isEmpty()) { |
| 78 | parser.showHelp(1); |
| 79 | } |
| 80 | |
| 81 | KDevProjectOpen opener; |
| 82 | const auto args = parser.positionalArguments(); |
| 83 | for (const QString& arg : args) { |
| 84 | opener.openProject(QUrl::fromUserInput(arg)); |
| 85 | } |
| 86 | return app.exec(); |
| 87 | } |
| 88 | |
| 89 | #include "moc_kdevprojectopen.cpp" |
nothing calls this directly
no test coverage detected