MCPcopy Create free account
hub / github.com/KDE/kdevelop / showMessage

Method showMessage

kdevplatform/shell/statusbar.cpp:216–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void StatusBar::showMessage( IStatus* status, const QString & message, int timeout)
217{
218 QPointer<QObject> context = dynamic_cast<QObject*>(status);
219 QTimer::singleShot(0, this, [this, context, status, message, timeout]() {
220 if (!context)
221 return;
222 const auto progressItemIt = m_progressItems.constFind(status);
223 if (progressItemIt != m_progressItems.constEnd()) {
224 ProgressItem* i = *progressItemIt;
225 i->setStatus(message);
226 } else if (!message.isEmpty()) { // do not display a semicolon and empty space in the aggregate status message
227 Message m;
228 m.text = message;
229 m.timeout = timeout;
230 m_messages.insert(status, m);
231 if (timeout >= 0) {
232 updateMessage(status);
233 }
234 }
235 });
236}
237
238void StatusBar::hideProgress( IStatus* status )
239{

Callers

nothing calls this directly

Calls 5

constEndMethod · 0.80
constFindMethod · 0.45
setStatusMethod · 0.45
isEmptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected