Changeset View
Changeset View
Standalone View
Standalone View
shell/problemmodel.h
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 82 | public: | |||
---|---|---|---|---|---|
128 | void setProblems(const QVector<IProblem::Ptr> &problems); | 128 | void setProblems(const QVector<IProblem::Ptr> &problems); | ||
129 | 129 | | |||
130 | /// Clears the problems | 130 | /// Clears the problems | ||
131 | void clearProblems(); | 131 | void clearProblems(); | ||
132 | 132 | | |||
133 | /// Retrieve problems for selected document | 133 | /// Retrieve problems for selected document | ||
134 | QVector<IProblem::Ptr> problems(const KDevelop::IndexedString& document); | 134 | QVector<IProblem::Ptr> problems(const KDevelop::IndexedString& document); | ||
135 | 135 | | |||
136 | /** | ||||
137 | * Clear current problems and add new "placeholder" item (problem). | ||||
mwolff: I don't think that this should do many things at once. it should only set the placeholder text… | |||||
Fixed
This useful for cases when some problem model is used by multiple tools - for example in Valgrind plugin it will be used for providing executed tool name (memcheck/helgrind/DRD). antonanikin: Fixed
> I also don't get why this needs to pass a source and location here? A single… | |||||
138 | * | ||||
139 | * The method should be used to notify user about some events. For example, analyzer plugin | ||||
140 | * can set placeholders at analysis state changes - started/finished without errors/etc. | ||||
141 | * | ||||
142 | * \param[in] text Sets problem description. | ||||
143 | * \param[in] source Sets problem sourceString() return value. | ||||
144 | * \param[in] location Sets problem final location. | ||||
145 | */ | ||||
146 | void setPlaceHolderText(const QString& text, | ||||
147 | const QString& source, | ||||
I still don't understand what this location would point to. it's a placeholder, nothing has been found yet, so there cannot be any location? Can you maybe show a screenshot of this in action? mwolff: I still don't understand what this location would point to. it's a placeholder, nothing has… | |||||
148 | const KDevelop::DocumentRange& location = KDevelop::DocumentRange()); | ||||
149 | | ||||
136 | /// Retrieve the supported features | 150 | /// Retrieve the supported features | ||
137 | Features features() const; | 151 | Features features() const; | ||
138 | 152 | | |||
139 | /// Retrieve 'show imports' filter setting | 153 | /// Retrieve 'show imports' filter setting | ||
140 | bool showImports(); | 154 | bool showImports(); | ||
141 | 155 | | |||
142 | /// Set the supported features | 156 | /// Set the supported features | ||
143 | void setFeatures(Features features); | 157 | void setFeatures(Features features); | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |
I don't think that this should do many things at once. it should only set the placeholder text, but not clear anything.
when the model is empty, the placeholder should be shown
I also don't get why this needs to pass a source and location here? A single placeholder text should be enough?