• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hluk / CopyQ / #4038

15 Nov 2023 04:37AM UTC coverage: 74.398% (-0.007%) from 74.405%
#4038

push

travis-ci

hluk
Optimize string operations mainly on app initiation

The string literal conversion rules are listed below.

Keep "..." where it is used/passed as `const char *`.

    log("...", LogWarning)

    COPYQ_LOG("...")

    qgetenv("...")

    byteArray + "..."

    qobj.setProperty("...", value)

Prefer QLatin1String("...") where it will be used as QLatin1String as in
comparison or concatenation with QString:

    const QString str = QLatin1String("...") + str2;

    if (str == QLatin1String("...")) ...

    if (str.startsWith(QLatin1String("..."))) ...

    if (str.endsWith(QLatin1String("..."))) ...

Otherwise prefer QStringLiteral("...") where it will be used as QString.

    QStringLiteral("...").arg(...)

    const QString str = QStringLiteral("image/");

Note: There is `QLatin1String::arg()` but it was introduced in Qt 5.14.

See also: https://doc.qt.io/qt-5/qstring.html#QStringLiteral

60 of 81 new or added lines in 7 files covered. (74.07%)

99 existing lines in 5 files now uncovered.

18589 of 24986 relevant lines covered (74.4%)

24157.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.16
/src/common/common.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc