mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-15 23:01:01 -08:00
add QML auto reload for mobile (example 'swank-server' only); several revisions
This commit is contained in:
parent
79a5e5cc30
commit
24c2a57fa0
25 changed files with 213 additions and 86 deletions
|
|
@ -65,10 +65,13 @@ int main(int argc, char* argv[]) {
|
|||
LQML lqml(argc, argv, &view);
|
||||
if (arguments.contains("-v") || arguments.contains("--version")) {
|
||||
lqml.printVersion();
|
||||
std::cout << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
lqml.ignoreIOStreams();
|
||||
#endif
|
||||
|
||||
new QQmlFileSelector(view.engine(), &view);
|
||||
QString qml("qml/main.qml");
|
||||
QUrl url;
|
||||
|
|
@ -116,15 +119,15 @@ int main(int argc, char* argv[]) {
|
|||
#endif
|
||||
|
||||
#ifdef NO_QT_RESTART
|
||||
bool slime = false;
|
||||
bool qtRestart = false;
|
||||
#else
|
||||
bool slime = true;
|
||||
bool qtRestart = true;
|
||||
#endif
|
||||
|
||||
if (arguments.contains("-slime")
|
||||
|| (arguments.indexOf(QRegularExpression(".*start-swank.*")) != -1)) {
|
||||
arguments.removeAll("-slime");
|
||||
slime = true;
|
||||
qtRestart = true;
|
||||
}
|
||||
|
||||
// load Lisp file
|
||||
|
|
@ -134,7 +137,7 @@ int main(int argc, char* argv[]) {
|
|||
LQML::eval(QString("(load \"%1\")").arg(file), true);
|
||||
}
|
||||
|
||||
if (slime) {
|
||||
if (qtRestart) {
|
||||
LQML::eval("(qml::exec-with-qt-restart)", true);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue