1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-11-01 15:42:12 +00:00

Added lightly smoothed black frame around the screen.

This commit is contained in:
Filippo Scognamiglio
2014-11-11 14:51:24 +01:00
parent 5552bea525
commit 45ef5ee000
5 changed files with 22 additions and 30 deletions

View File

@@ -10,9 +10,15 @@
#include <stdlib.h>
QString getNamedArgument(QStringList args, QString name) {
QString getNamedArgument(QStringList args, QString name, QString defaultName)
{
int index = args.indexOf(name);
return (index != -1) ? args[index + 1] : QString("");
return (index != -1) ? args[index + 1] : QString(defaultName);
}
QString getNamedArgument(QStringList args, QString name)
{
return getNamedArgument(args, name, "");
}
int main(int argc, char *argv[])
@@ -34,13 +40,12 @@ int main(int argc, char *argv[])
return 0;
}
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir"));
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
engine.rootContext()->setContextProperty("shellProgram", getNamedArgument(args, "--program"));
// Manage import paths for Linux and OSX.
QStringList importPathList = engine.importPathList();
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
//importPathList.prepend(QCoreApplication::applicationDirPath() + "/imports/");
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
engine.setImportPathList(importPathList);