MCPcopy Create free account
hub / github.com/KDE/labplot / copyEnvironment

Method copyEnvironment

src/frontend/AboutDialog.cpp:358–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void AboutDialog::copyEnvironment() {
359 QString text;
360 text += QLatin1String("LabPlot ") + QLatin1String(LVERSION) + QLatin1Char('\n');
361
362 // system info
363 text += QTextDocumentFragment::fromHtml(systemInfo()).toPlainText();
364
365 // components
366 text += QLatin1Char('\n') + i18n("Components:") + QLatin1Char('\n');
367 text += i18n("Qt") + QLatin1Char(' ') + QLatin1String(QT_VERSION_STR) + QLatin1Char('\n');
368 text += i18n("KDE Frameworks") + QLatin1Char(' ') + QLatin1String(KCOREADDONS_VERSION_STRING) + QLatin1Char('\n');
369 for (const auto& c : AboutDialog::components()) {
370 if (QTextDocumentFragment::fromHtml(c.at(2)).toPlainText() == i18n("missing"))
371 text += QTextDocumentFragment::fromHtml(c.at(0)).toPlainText() + QLatin1Char(' ') + i18n("missing") + QLatin1Char('\n');
372 else if (c.at(0) == i18n("C++ Compiler: ") + QLatin1String(CXX_COMPILER_ID) || c.at(0) == i18n("C++ Compiler Flags:"))
373 text += c.at(0) + QLatin1Char(' ') + c.at(1) + QLatin1Char('\n');
374 else
375 text += c.at(0) + QLatin1Char(' ') + c.at(2) + QLatin1Char('\n');
376 }
377
378 QApplication::clipboard()->setText(text);
379}
380
381void AboutDialog::copyCitation() {
382 QString text;

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected