MCPcopy Create free account
hub / github.com/QuiteRSS/quiterss / receiveMessage

Method receiveMessage

src/application/mainapplication.cpp:125–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void MainApplication::receiveMessage(const QString &message)
126{
127 if (!message.isEmpty()) {
128 qWarning() << QString("Received message: %1").arg(message);
129
130 QStringList params = message.split('\n');
131 foreach (QString param, params) {
132 if (param == "--show") {
133 if (isClosing_)
134 return;
135 mainWindow_->showWindows();
136 }
137 if (param == "--exit") mainWindow_->quitApp();
138 if (param.contains("feed:", Qt::CaseInsensitive)) {
139 QClipboard *clipboard = QApplication::clipboard();
140 if (param.contains("https://", Qt::CaseInsensitive)) {
141 param.remove(0, 5);
142 clipboard->setText(param);
143 } else {
144 param.remove(0, 7);
145 clipboard->setText("http://" + param);
146 }
147 mainWindow_->addFeed();
148 }
149 }
150 }
151}
152
153void MainApplication::createSettings()
154{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected