Changeset View
Changeset View
Standalone View
Standalone View
src/kcrash.cpp
Show First 20 Lines • Show All 555 Lines • ▼ Show 20 Line(s) | 546 | if (about) { | |||
---|---|---|---|---|---|
556 | 556 | | |||
557 | if (about->internalBugAddress()) { | 557 | if (about->internalBugAddress()) { | ||
558 | argv[i++] = "--bugaddress"; | 558 | argv[i++] = "--bugaddress"; | ||
559 | argv[i++] = about->internalBugAddress(); | 559 | argv[i++] = about->internalBugAddress(); | ||
560 | } | 560 | } | ||
561 | } | 561 | } | ||
562 | 562 | | |||
563 | // make sure the constData() pointer remains valid when we call startProcess by making a copy | 563 | // make sure the constData() pointer remains valid when we call startProcess by making a copy | ||
564 | QByteArray startupId = KStartupInfo::startupId(); | 564 | char startupId[128]; | ||
565 | if (!startupId.isNull()) { | 565 | if (!KStartupInfo::startupId().isNull()) { | ||
566 | // null-terminate it | ||||
567 | std::copy_n(KStartupInfo::startupId().constBegin(), std::min(sizeof(startupId)-1, (unsigned)KStartupInfo::startupId().size()), startupId) [0] = 0; | ||||
568 | if (sizeof(startupId)-1 < KStartupInfo::startupId().size()) | ||||
569 | fprintf (stderr, "KCrash: startupId buffer not big enough\n"); | ||||
570 | | ||||
566 | argv[i++] = "--startupid"; | 571 | argv[i++] = "--startupid"; | ||
567 | argv[i++] = startupId.constData(); | 572 | argv[i++] = startupId; | ||
568 | } | 573 | } | ||
569 | 574 | | |||
570 | if (s_flags & SaferDialog) { | 575 | if (s_flags & SaferDialog) { | ||
571 | argv[i++] = "--safer"; | 576 | argv[i++] = "--safer"; | ||
572 | } | 577 | } | ||
573 | 578 | | |||
574 | if ((s_flags & AutoRestart) && s_autoRestartCommand) { | 579 | if ((s_flags & AutoRestart) && s_autoRestartCommand) { | ||
575 | argv[i++] = "--restarted"; //tell drkonqi if the app has been restarted | 580 | argv[i++] = "--restarted"; //tell drkonqi if the app has been restarted | ||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |