- Timestamp:
- Jul 29, 2012, 2:33:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncmain.cpp
r4346 r4446 67 67 int main(int argc, char *argv[]) { 68 68 69 bool GUIenabled= true;69 bool interactive = true; 70 70 QByteArray rawFileName; 71 71 QString confFileName; … … 82 82 } 83 83 if (QRegExp("--?nw").exactMatch(argv[ii])) { 84 GUIenabled= false;84 interactive = false; 85 85 } 86 86 if (ii + 1 < argc) { … … 89 89 } 90 90 if (QRegExp("--?file").exactMatch(argv[ii])) { 91 GUIenabled= false;91 interactive = false; 92 92 rawFileName = QByteArray(argv[ii+1]); 93 93 } … … 96 96 97 97 #ifdef Q_OS_MAC 98 if (argc== 3 && GUIenabled) {98 if (argc== 3 && interactive) { 99 99 confFileName = QString(argv[2]); 100 100 } 101 101 #else 102 if (argc == 2 && GUIenabled) {102 if (argc == 2 && interactive) { 103 103 confFileName = QString(argv[1]); 104 104 } 105 105 #endif 106 106 107 bncApp app(argc, argv, GUIenabled); 107 #ifdef Q_WS_X11 108 bool useGUI = getenv("DISPLAY") != 0; 109 #else 110 bool useGUI = true; 111 #endif 112 113 bncApp app(argc, argv, useGUI); 108 114 109 115 app.setApplicationName("BNC"); … … 124 130 // Interactive Mode - open the main window 125 131 // --------------------------------------- 126 if ( GUIenabled) {132 if (interactive) { 127 133 128 134 app.setMode(bncApp::interactive);
Note:
See TracChangeset
for help on using the changeset viewer.