Showing the changes to interface/src/scripting/ScreenshareScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -21,7 +21,7 @@ ScreenshareScriptingInterface::ScreenshareScriptingInterface() { · 20 unmodified lines | |||
| 21 | 21 | ||
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | void ScreenshareScriptingInterface::startScreenshare(QString displayName, QString userName, QString token, QString sessionID, QString apiKey, QString fileLocation) { | 24 | void ScreenshareScriptingInterface::startScreenshare(QString displayName, QString userName, QString token, QString sessionID, QString apiKey) { |
| 25 | if (QThread::currentThread() != thread()) { | 25 | if (QThread::currentThread() != thread()) { |
| 26 | // We must start a new QProcess from the main thread. | 26 | // We must start a new QProcess from the main thread. |
| 27 | QMetaObject::invokeMethod( | 27 | QMetaObject::invokeMethod( |
| @@ -30,14 +30,19 @@ void ScreenshareScriptingInterface::startScreenshare(QString displayName, QStrin · 2 unmodified lines | |||
| 30 | Q_ARG(QString, userName), | 30 | Q_ARG(QString, userName), |
| 31 | Q_ARG(QString, token), | 31 | Q_ARG(QString, token), |
| 32 | Q_ARG(QString, sessionID), | 32 | Q_ARG(QString, sessionID), |
| 33 | Q_ARG(QString, apiKey), | 33 | Q_ARG(QString, apiKey) |
| 34 | Q_ARG(QString, fileLocation) | ||
| 35 | ); | 34 | ); |
| 36 | return; | 35 | return; |
| 37 | } | 36 | } |
| 38 | 37 | ||
| 39 | qDebug() << "ZRF: Inside startScreenshare(). `SCREENSHARE_EXE_PATH`:" << SCREENSHARE_EXE_PATH; | 38 | qDebug() << "ZRF: Inside startScreenshare(). `SCREENSHARE_EXE_PATH`:" << SCREENSHARE_EXE_PATH; |
| 40 | 39 | ||
| 40 | QFileInfo screenshareExecutable(SCREENSHARE_EXE_PATH); | ||
| 41 | if (!screenshareExecutable.exists() || !screenshareExecutable.isFile()) { | ||
| 42 | qDebug() << "Screenshare executable doesn't exist at" << SCREENSHARE_EXE_PATH; | ||
| 43 | return; | ||
| 44 | } | ||
| 45 | |||
| 41 | if (displayName.isEmpty() || userName.isEmpty() || token.isEmpty() || sessionID.isEmpty() || apiKey.isEmpty()) { | 46 | if (displayName.isEmpty() || userName.isEmpty() || token.isEmpty() || sessionID.isEmpty() || apiKey.isEmpty()) { |
| 42 | qDebug() << "Screenshare executable can't launch without connection info."; | 47 | qDebug() << "Screenshare executable can't launch without connection info."; |
| 43 | return; | 48 | return; |
| @@ -65,6 +70,6 @@ void ScreenshareScriptingInterface::startScreenshare(QString displayName, QStrin · 21 unmodified lines | |||
| 65 | // Note for Milad: | 70 | // Note for Milad: |
| 66 | // We'll have to have equivalent lines of code for MacOS. | 71 | // We'll have to have equivalent lines of code for MacOS. |
| 67 | #ifdef Q_OS_WIN | 72 | #ifdef Q_OS_WIN |
| 68 | electronProcess->start(fileLocation, arguments); | 73 | electronProcess->start(SCREENSHARE_EXE_PATH, arguments); |
| 69 | #endif | 74 | #endif |
| 70 | }; | 75 | }; |