MCPcopy Create free account
hub / github.com/KDE/kdevelop / main

Function main

plugins/cmake/tests/kdevprojectopen.cpp:61–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61int 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"

Callers

nothing calls this directly

Calls 5

execMethod · 0.80
QStringClass · 0.50
processMethod · 0.45
isEmptyMethod · 0.45
openProjectMethod · 0.45

Tested by

no test coverage detected