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

Function remoteArguments

app/main.cpp:118–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116#if KDEVELOP_SINGLE_APP
117public Q_SLOTS:
118 void remoteArguments(const QString &message, QObject *socket)
119 {
120 Q_UNUSED(socket);
121
122 QByteArray ba = QByteArray::fromHex(message.toLatin1());
123 QDataStream stream(ba);
124 QByteArray command;
125 stream >> command;
126
127 qCDebug(APP) << "Received remote command: " << command;
128
129 if (command == "open") {
130 QVector<UrlInfo> infos;
131 stream >> infos;
132
133 QVector<UrlInfo> files, directories;
134 for (const auto& info : infos)
135 if (info.isDirectory())
136 directories << info;
137 else
138 files << info;
139
140 openFiles(files);
141 for(const auto &urlinfo : directories)
142 ICore::self()->projectController()->openProjectForUrl(urlinfo.url);
143 } else {
144 qCWarning(APP) << "Unknown remote command: " << command;
145 }
146 }
147
148 void fileOpenRequested(const QString &file)
149 {

Callers

nothing calls this directly

Calls 4

isDirectoryMethod · 0.80
openProjectForUrlMethod · 0.80
projectControllerMethod · 0.80
openFilesFunction · 0.70

Tested by

no test coverage detected