Changeset View
Changeset View
Standalone View
Standalone View
app/main.cpp
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Line(s) | 302 | if (mainBundle) { | |||
---|---|---|---|---|---|
306 | if (infoDict) { | 306 | if (infoDict) { | ||
307 | // Try to prevent App Nap on OS X. This can be tricky in practice, at least in 10.9 . | 307 | // Try to prevent App Nap on OS X. This can be tricky in practice, at least in 10.9 . | ||
308 | CFDictionarySetValue(infoDict, CFSTR("NSAppSleepDisabled"), kCFBooleanTrue); | 308 | CFDictionarySetValue(infoDict, CFSTR("NSAppSleepDisabled"), kCFBooleanTrue); | ||
309 | CFDictionarySetValue(infoDict, CFSTR("NSSupportsAutomaticTermination"), kCFBooleanFalse); | 309 | CFDictionarySetValue(infoDict, CFSTR("NSSupportsAutomaticTermination"), kCFBooleanFalse); | ||
310 | } | 310 | } | ||
311 | } | 311 | } | ||
312 | #endif | 312 | #endif | ||
313 | 313 | | |||
314 | //we can't use KCmdLineArgs as it doesn't allow arguments for the debugee | ||||
ltoscano: Is the comment still valid for QCommandLineParser? At least the comment should be updated. | |||||
Good eyes, too good ;) kossebau: Good eyes, too good ;)
Saw that as well, but was to look at that next only, as I need to make… | |||||
315 | //so lookup the --debug switch and eat everything behind by decrementing argc | ||||
316 | //debugArgs is filled with args after --debug <debuger> | ||||
317 | QStringList debugArgs; | ||||
318 | QString debugeeName; | ||||
319 | { | ||||
320 | bool debugFound = false; | ||||
321 | int c = argc; | ||||
322 | for (int i=0; i < c; ++i) { | ||||
323 | if (debugFound) { | ||||
324 | debugArgs << argv[i]; | ||||
325 | } else if (qstrcmp(argv[i], "--debug") == 0 || qstrcmp(argv[i], "-d") == 0) { | ||||
326 | if (argc <= i+1) { | ||||
327 | argc = i + 1; | ||||
328 | } else { | ||||
329 | i++; | ||||
330 | argc = i + 1; | ||||
331 | } | ||||
332 | debugFound = true; | ||||
333 | } else if (QString(argv[i]).startsWith("--debug=")) { | ||||
334 | argc = i + 1; | ||||
335 | debugFound = true; | ||||
336 | } | ||||
337 | } | ||||
338 | } | ||||
339 | | ||||
340 | KDevelopApplication app(argc, argv); | ||||
341 | | ||||
314 | static const char description[] = I18N_NOOP( "The KDevelop Integrated Development Environment" ); | 342 | static const char description[] = I18N_NOOP( "The KDevelop Integrated Development Environment" ); | ||
315 | KAboutData aboutData( "kdevelop", i18n( "KDevelop" ), QByteArray(VERSION), i18n(description), KAboutLicense::GPL, | 343 | KAboutData aboutData( "kdevelop", i18n( "KDevelop" ), QByteArray(VERSION), i18n(description), KAboutLicense::GPL, | ||
316 | i18n("Copyright 1999-2016, The KDevelop developers"), QString(), "http://www.kdevelop.org/"); | 344 | i18n("Copyright 1999-2016, The KDevelop developers"), QString(), "http://www.kdevelop.org/"); | ||
317 | aboutData.setDesktopFileName(QStringLiteral("org.kde.kdevelop")); | 345 | aboutData.setDesktopFileName(QStringLiteral("org.kde.kdevelop")); | ||
318 | aboutData.addAuthor( i18n("Kevin Funk"), i18n( "Co-maintainer, C++/Clang, QA, Windows Support" ), "kfunk@kde.org" ); | 346 | aboutData.addAuthor( i18n("Kevin Funk"), i18n( "Co-maintainer, C++/Clang, QA, Windows Support" ), "kfunk@kde.org" ); | ||
319 | aboutData.addAuthor( i18n("Sven Brauch"), i18n( "Co-maintainer, AppImage, Python Support, User Interface improvements" ), "svenbrauch@gmail.com" ); | 347 | aboutData.addAuthor( i18n("Sven Brauch"), i18n( "Co-maintainer, AppImage, Python Support, User Interface improvements" ), "svenbrauch@gmail.com" ); | ||
320 | aboutData.addAuthor( i18n("Aleix Pol Gonzalez"), i18n( "CMake Support, Run Support, Kross Support" ), "aleixpol@gmail.com" ); | 348 | aboutData.addAuthor( i18n("Aleix Pol Gonzalez"), i18n( "CMake Support, Run Support, Kross Support" ), "aleixpol@gmail.com" ); | ||
321 | aboutData.addAuthor( i18n("Milian Wolff"), i18n( "C++/Clang, Generic manager, Webdevelopment Plugins, Snippets, Performance" ), "mail@milianw.de" ); | 349 | aboutData.addAuthor( i18n("Milian Wolff"), i18n( "C++/Clang, Generic manager, Webdevelopment Plugins, Snippets, Performance" ), "mail@milianw.de" ); | ||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
370 | aboutData.addCredit( i18n("Luc Willems"), i18n( "Help with Perl support" ), "Willems.luc@pandora.be" ); | 398 | aboutData.addCredit( i18n("Luc Willems"), i18n( "Help with Perl support" ), "Willems.luc@pandora.be" ); | ||
371 | aboutData.addCredit( i18n("Marcel Turino"), i18n( "Documentation index view" ), "M.Turino@gmx.de" ); | 399 | aboutData.addCredit( i18n("Marcel Turino"), i18n( "Documentation index view" ), "M.Turino@gmx.de" ); | ||
372 | aboutData.addCredit( i18n("Yann Hodique"), i18n( "Patches" ), "Yann.Hodique@lifl.fr" ); | 400 | aboutData.addCredit( i18n("Yann Hodique"), i18n( "Patches" ), "Yann.Hodique@lifl.fr" ); | ||
373 | aboutData.addCredit( i18n("Tobias Gl\303\244\303\237er") , i18n( "Documentation Finder, qmake projectmanager patches, usability improvements, bugfixes ... " ), "tobi.web@gmx.de" ); | 401 | aboutData.addCredit( i18n("Tobias Gl\303\244\303\237er") , i18n( "Documentation Finder, qmake projectmanager patches, usability improvements, bugfixes ... " ), "tobi.web@gmx.de" ); | ||
374 | aboutData.addCredit( i18n("Andreas Koepfle") , i18n( "QMake project manager patches" ), "koepfle@ti.uni-mannheim.de" ); | 402 | aboutData.addCredit( i18n("Andreas Koepfle") , i18n( "QMake project manager patches" ), "koepfle@ti.uni-mannheim.de" ); | ||
375 | aboutData.addCredit( i18n("Sascha Cunz") , i18n( "Cleanup and bugfixes for qEditor, AutoMake and much other stuff" ), "mail@sacu.de" ); | 403 | aboutData.addCredit( i18n("Sascha Cunz") , i18n( "Cleanup and bugfixes for qEditor, AutoMake and much other stuff" ), "mail@sacu.de" ); | ||
376 | aboutData.addCredit( i18n("Zoran Karavla"), i18n( "Artwork for the ruby language" ), "webmaster@the-error.net", "http://the-error.net" ); | 404 | aboutData.addCredit( i18n("Zoran Karavla"), i18n( "Artwork for the ruby language" ), "webmaster@the-error.net", "http://the-error.net" ); | ||
377 | 405 | | |||
378 | | ||||
379 | //we can't use KCmdLineArgs as it doesn't allow arguments for the debugee | | |||
380 | //so lookup the --debug switch and eat everything behind by decrementing argc | | |||
381 | //debugArgs is filled with args after --debug <debuger> | | |||
382 | QStringList debugArgs; | | |||
383 | QString debugeeName; | | |||
384 | { | | |||
385 | bool debugFound = false; | | |||
386 | int c = argc; | | |||
387 | for (int i=0; i < c; ++i) { | | |||
388 | if (debugFound) { | | |||
389 | debugArgs << argv[i]; | | |||
390 | } else if (qstrcmp(argv[i], "--debug") == 0 || qstrcmp(argv[i], "-d") == 0) { | | |||
391 | if (argc <= i+1) { | | |||
392 | argc = i + 1; | | |||
393 | } else { | | |||
394 | i++; | | |||
395 | argc = i + 1; | | |||
396 | } | | |||
397 | debugFound = true; | | |||
398 | } else if (QString(argv[i]).startsWith("--debug=")) { | | |||
399 | argc = i + 1; | | |||
400 | debugFound = true; | | |||
401 | } | | |||
402 | } | | |||
403 | } | | |||
404 | | ||||
405 | KDevelopApplication app(argc, argv); | | |||
406 | | ||||
407 | KCrash::initialize(); | 406 | KCrash::initialize(); | ||
408 | 407 | | |||
kossebau: These two lines are supposed to go in as separate commit. | |||||
409 | Kdelibs4ConfigMigrator migrator(QStringLiteral("kdevelop")); | 408 | Kdelibs4ConfigMigrator migrator(QStringLiteral("kdevelop")); | ||
410 | migrator.setConfigFiles({QStringLiteral("kdeveloprc")}); | 409 | migrator.setConfigFiles({QStringLiteral("kdeveloprc")}); | ||
411 | migrator.setUiFiles({QStringLiteral("kdevelopui.rc")}); | 410 | migrator.setUiFiles({QStringLiteral("kdevelopui.rc")}); | ||
412 | migrator.migrate(); | 411 | migrator.migrate(); | ||
413 | 412 | | |||
414 | // High DPI support | 413 | // High DPI support | ||
415 | app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); | 414 | app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); | ||
416 | 415 | | |||
▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines |
Is the comment still valid for QCommandLineParser? At least the comment should be updated.