MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / showMessage

Method showMessage

nixnote.cpp:1928–1941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1926
1927
1928void NixNote::showMessage(QString title, QString msg, int timeout) {
1929 if (global.systemNotifier() == "notify-send") {
1930 QProcess notifyProcess;
1931 QStringList arguments;
1932 arguments << title << msg << "-t" << QString::number(timeout);
1933 notifyProcess.start(QString("notify-send"), arguments, QIODevice::ReadWrite|QIODevice::Unbuffered);
1934 notifyProcess.waitForFinished();
1935 QLOG_DEBUG() << "notify-send completed: " << notifyProcess.waitForFinished()
1936 << " Return Code: " << notifyProcess.state();
1937 return;
1938 }
1939 trayIcon->showMessage(title, msg);
1940
1941}
1942
1943
1944//*******************************************************

Callers 1

setMessageMethod · 0.80

Calls 4

systemNotifierMethod · 0.80
waitForFinishedMethod · 0.80
QStringClass · 0.50
startMethod · 0.45

Tested by

no test coverage detected