Changeset View
Changeset View
Standalone View
Standalone View
plugins/clazy/utils.cpp
Show All 23 Lines | |||||
24 | #include <interfaces/iproject.h> | 24 | #include <interfaces/iproject.h> | ||
25 | #include <interfaces/iprojectcontroller.h> | 25 | #include <interfaces/iprojectcontroller.h> | ||
26 | #include <project/interfaces/ibuildsystemmanager.h> | 26 | #include <project/interfaces/ibuildsystemmanager.h> | ||
27 | #include <project/projectmodel.h> | 27 | #include <project/projectmodel.h> | ||
28 | 28 | | |||
29 | #include <KLocalizedString> | 29 | #include <KLocalizedString> | ||
30 | 30 | | |||
31 | #include <QFile> | 31 | #include <QFile> | ||
32 | #include <QFileInfo> | ||||
32 | #include <QJsonDocument> | 33 | #include <QJsonDocument> | ||
33 | #include <QJsonArray> | 34 | #include <QJsonArray> | ||
34 | #include <QJsonObject> | 35 | #include <QJsonObject> | ||
35 | #include <QRegularExpression> | 36 | #include <QRegularExpression> | ||
36 | 37 | | |||
37 | namespace Clazy | 38 | namespace Clazy | ||
38 | { | 39 | { | ||
39 | 40 | | |||
Show All 35 Lines | 75 | if (!value.isObject()) { | |||
75 | continue; | 76 | continue; | ||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | const QJsonObject entry = value.toObject(); | 79 | const QJsonObject entry = value.toObject(); | ||
79 | if (entry.contains(KEY_FILE)) { | 80 | if (entry.contains(KEY_FILE)) { | ||
80 | auto path = entry[KEY_FILE].toString(); | 81 | auto path = entry[KEY_FILE].toString(); | ||
81 | if (QFile::exists(path)) | 82 | if (QFile::exists(path)) | ||
82 | { | 83 | { | ||
83 | paths += path; | 84 | const auto info = QFileInfo(path); | ||
85 | paths += info.canonicalFilePath(); | ||||
84 | } | 86 | } | ||
85 | } | 87 | } | ||
86 | } | 88 | } | ||
87 | 89 | | |||
88 | return paths; | 90 | return paths; | ||
89 | } | 91 | } | ||
90 | 92 | | |||
91 | // Very simple Markdown parser/converter. Does not provide full Markdown language support and | 93 | // Very simple Markdown parser/converter. Does not provide full Markdown language support and | ||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |