MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / toFilterString

Function toFilterString

gui/common.cpp:53–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53QString toFilterString(const QMap<QString,QString>& filters, bool addAllSupported, bool addAll)
54{
55 QStringList entries;
56
57 if (addAllSupported) {
58 entries << QCoreApplication::translate("toFilterString", "All supported files (%1)")
59 .arg(filters.values().join(" "));
60 }
61
62 if (addAll) {
63 entries << QCoreApplication::translate("toFilterString", "All files (%1)").arg("*.*");
64 }
65
66 // We're using the description of the filters as the map keys, the file
67 // name patterns are our values. The generated filter string list will
68 // thus be sorted alphabetically over the descriptions.
69 for (const auto& k: filters.keys()) {
70 entries << QString("%1 (%2)").arg(k).arg(filters.value(k));
71 }
72
73 return entries.join(";;");
74}
75
76QString getDataDir()
77{

Callers 4

browseImportProjectMethod · 0.85
browseUserIncludeMethod · 0.85
addExcludeFileMethod · 0.85
selectFilesToAnalyzeMethod · 0.85

Calls 3

QStringClass · 0.70
joinMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected