]> granicus.if.org Git - graphviz/commitdiff
Allow gvedit -? to show usage even if there's no DISPLAY
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 6 Sep 2020 17:13:53 +0000 (19:13 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 11 Sep 2020 05:37:29 +0000 (07:37 +0200)
Parse gvedit args before starting app and trying to open DISPLAY. This
allows testing that gvedit can start in CI.

cmd/gvedit/main.cpp

index 76a0ed6434020a19c34183c7d0116136443b4ee9..979111f5fcdfe55c0b1148d8f75c6f61bfc37c1b 100644 (file)
@@ -89,8 +89,8 @@ int main(int argc, char *argv[])
     Q_INIT_RESOURCE(mdi);
     int ret;
 
-    QApplication app(argc, argv);
     char **files = parseArgs(argc, argv);
+    QApplication app(argc, argv);
     CMainWindow mainWin(&files);
     mainWin.show();
     ret = app.exec();