1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-05-01 12:16:27 +00:00

Make sandboxing the default, remove the cli-option

SailfishOS 4.0.1 has been out for over half a year now, sandboxing
should have wide support by now.
This commit is contained in:
Chris Josten 2021-08-22 14:48:22 +02:00
parent 2bd9d66841
commit 7f39da0b95
2 changed files with 2 additions and 18 deletions

View file

@ -1,10 +1,9 @@
[Desktop Entry]
Type=Application
Version=1.1
X-Nemo-Application-Type=silica-qt5
# X-Nemo-Application-Type=silica-qt5
Icon=harbour-sailfin
Exec=harbour-sailfin --no-attempt-sandbox
Exec=/usr/bin/sailjail -p harbour-sailfin.desktop /usr/bin/harbour-sailfin
Name=Sailfin
# translation example:

View file

@ -56,29 +56,14 @@ int main(int argc, char *argv[]) {
//: Application display name
app->setApplicationDisplayName(QObject::tr("Sailfin"));
bool canSanbox = QFile::exists(SANDBOX_PROGRAM);
QCommandLineParser cmdParser;
cmdParser.addHelpOption();
cmdParser.addVersionOption();
QCommandLineOption sandboxOption("no-attempt-sandbox", app->translate("Command line argument description", "Try to not start with FireJail."));
if (canSanbox) {
cmdParser.addOption(sandboxOption);
}
cmdParser.process(*app);
if (canSanbox && !cmdParser.isSet(sandboxOption)) {
qDebug() << "Restarting in sandbox mode";
QProcess::execute(QString(SANDBOX_PROGRAM),
QStringList() << "-p" << "harbour-sailfin.desktop" << "harbour-sailfin");
return 0;
}
Jellyfin::registerTypes();
QQuickView *view = SailfishApp::createView();
view->setSource(SailfishApp::pathToMainQml());
view->show();
qDebug() << "QML import paths: " << view->engine()->importPathList();
return app->exec();
}