1. Arne Babenhauserheide
  2. kembed-emacs

Commits

Arne Babenhauserheide  committed cf69600

pass all arguments to emacs.

  • Participants
  • Parent commits dc331fe
  • Branches default

Comments (0)

Files changed (1)

File qxembed-emacs.cpp

View file
 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
-
-    if (app.arguments().count() != 2) {
-        qFatal("Error - expected executable path as argument");
-        return 1;
-    }
-
     QX11EmbedContainer container;
     container.show();
 
     QProcess process(&container);
-    QString executable(app.arguments()[1]);
+    QString executable("emacs");
     QStringList arguments;
     arguments << QString("--parent-id");
     arguments << QString::number(container.winId());
+    if (app.arguments().count() != 1) {
+      for (int i=1; i < app.arguments().count(); ++i)
+        arguments << app.arguments()[i];
+    }
     process.start(executable, arguments);
 
     int status = app.exec();