mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-22 01:05:17 +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:
parent
2bd9d66841
commit
7f39da0b95
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue