Changeset c41ce0 for src/UIElements/Qt4/QtUIFactory.cpp
- Timestamp:
- Aug 11, 2025, 5:43:56 PM (2 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 641550
- Parents:
- 6294b6
- git-author:
- Frederik Heber <frederik.heber@…> (05/03/24 15:25:52)
- git-committer:
- Frederik Heber <frederik.heber@…> (08/11/25 17:43:56)
- File:
-
- 1 edited
-
src/UIElements/Qt4/QtUIFactory.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/QtUIFactory.cpp
r6294b6 rc41ce0 60 60 61 61 QtUIFactory::QtUIFactory(int _argc, char **_argv) : 62 argc( 1),63 argv( new char*[1]),62 argc(0), 63 argv(NULL), 64 64 testlauncher_Interrupted(false), 65 65 testlauncher_thread(NULL) … … 78 78 #ifdef HAVE_BOOST_THREAD_HPP 79 79 std::vector<std::string> scripts; 80 scripts.reserve(_argc-1); 81 for (int i=2;i<_argc;++i) 82 scripts.push_back(std::string(_argv[i])); 80 scripts.reserve(1); 81 scripts.push_back(std::string(_argv[2])); 83 82 84 83 // check for line-by-line execution … … 92 91 std::cerr << "Boost::thread support missing! Cannot launch test scripts.\n"; 93 92 #endif 94 // use fake commands to not pass test stuff 95 const int length = strlen(_argv[0]); 96 argv[0] = new char[length]; 97 strncpy(argv[0],_argv[0], length); 93 // remove test options from command line arguments 94 argc = _argc-2; 95 argv = new char*[argc]; 96 int j = 0; 97 for (int i=0;i<_argc;++i) { 98 if ((i >= 1) && (i<3)) 99 continue; 100 const int length = strlen(_argv[i]); 101 argv[j] = new char[length]; 102 strncpy(argv[j],_argv[i], length); 103 ++j; 104 } 98 105 app = new QApplication(argc,argv); 99 106 } else { 100 const int length = strlen(_argv[0]); 101 argv[0] = new char[length]; 102 strncpy(argv[0],_argv[0], length); 107 argc = _argc; 108 argv = new char*[argc]; 109 for (int i=0;i<_argc;++i) { 110 const int length = strlen(_argv[i]); 111 argv[i] = new char[length]; 112 strncpy(argv[i],_argv[i], length); 113 } 103 114 app = new QApplication(argc,argv); 104 115 } … … 146 157 { 147 158 return (strncmp(_argument,"--test", 6) == 0); 159 } 160 161 bool QtUIFactory::isGuiMode(const char *_argument) 162 { 163 return (strncmp(_argument,"--qt_size", 9) == 0) || (strncmp(_argument,"--qt_position", 13) == 0); 148 164 } 149 165
Note:
See TracChangeset
for help on using the changeset viewer.
