Differential D14996 Diff 40222 plugins/custom-definesandincludes/noprojectincludesanddefines/noprojectincludepathsmanager.cpp
Changeset View
Changeset View
Standalone View
Standalone View
plugins/custom-definesandincludes/noprojectincludesanddefines/noprojectincludepathsmanager.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 137 | { | |||
---|---|---|---|---|---|
142 | QFileInfo fi(path); | 142 | QFileInfo fi(path); | ||
143 | auto dir = fi.absoluteDir().absolutePath(); | 143 | auto dir = fi.absoluteDir().absolutePath(); | ||
144 | cip->setStorageDirectory(dir); | 144 | cip->setStorageDirectory(dir); | ||
145 | 145 | | |||
146 | auto paths = includesAndDefines(path).first; | 146 | auto paths = includesAndDefines(path).first; | ||
147 | 147 | | |||
148 | cip->setCustomIncludePaths(pathListToStringList(paths)); | 148 | cip->setCustomIncludePaths(pathListToStringList(paths)); | ||
149 | 149 | | |||
150 | QObject::connect(cip, &QDialog::accepted, [this, cip, &path]() { | 150 | QObject::connect(cip, &QDialog::accepted, cip, [this, cip, &path]() { | ||
151 | if (!writeIncludePaths(cip->storageDirectory(), cip->customIncludePaths())) { | 151 | if (!writeIncludePaths(cip->storageDirectory(), cip->customIncludePaths())) { | ||
152 | qWarning() << i18n("Failed to save custom include paths in directory: %1", cip->storageDirectory()); | 152 | qWarning() << i18n("Failed to save custom include paths in directory: %1", cip->storageDirectory()); | ||
153 | } | 153 | } | ||
154 | KDevelop::ICore::self()->languageController()->backgroundParser()->addDocument(KDevelop::IndexedString(path)); | 154 | KDevelop::ICore::self()->languageController()->backgroundParser()->addDocument(KDevelop::IndexedString(path)); | ||
155 | }); | 155 | }); | ||
156 | } | 156 | } |