Changeset 58865 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 25, 2015 3:20:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r58864 r58865 4071 4071 QString vmNameOrUuid; 4072 4072 4073 #if QT_VERSION >= 0x050000 4074 const QStringList arguments = qApp->arguments(); 4075 const int argc = arguments.size(); 4076 #else /* QT_VERSION < 0x050000 */ 4073 4077 int argc = qApp->argc(); 4078 #endif /* QT_VERSION < 0x050000 */ 4074 4079 int i = 1; 4075 4080 while (i < argc) 4076 4081 { 4082 #if QT_VERSION >= 0x050000 4083 const char *arg = arguments.at(i).toLocal8Bit().constData(); 4084 #else /* QT_VERSION < 0x050000 */ 4077 4085 const char *arg = qApp->argv() [i]; 4086 #endif /* QT_VERSION < 0x050000 */ 4078 4087 /* NOTE: the check here must match the corresponding check for the 4079 4088 * options to start a VM in main.cpp and hardenedmain.cpp exactly, … … 4084 4093 if (++i < argc) 4085 4094 { 4095 #if QT_VERSION >= 0x050000 4096 vmNameOrUuid = arguments.at(i); 4097 #else /* QT_VERSION < 0x050000 */ 4086 4098 vmNameOrUuid = QString (qApp->argv() [i]); 4099 #endif /* QT_VERSION < 0x050000 */ 4087 4100 startVM = true; 4088 4101 } … … 4096 4109 { 4097 4110 if (++i < argc) 4111 # if QT_VERSION >= 0x050000 4112 m_strPidfile = arguments.at(i); 4113 # else /* QT_VERSION < 0x050000 */ 4098 4114 m_strPidfile = QString(qApp->argv()[i]); 4115 # endif /* QT_VERSION < 0x050000 */ 4099 4116 } 4100 4117 #endif /* VBOX_GUI_WITH_PIDFILE */ … … 4113 4130 if (++i < argc) 4114 4131 { 4132 #if QT_VERSION >= 0x050000 4133 RTStrCopy(mSettingsPw, sizeof(mSettingsPw), arguments.at(i).toLocal8Bit().constData()); 4134 #else /* QT_VERSION < 0x050000 */ 4115 4135 RTStrCopy(mSettingsPw, sizeof(mSettingsPw), qApp->argv() [i]); 4136 #endif /* QT_VERSION < 0x050000 */ 4116 4137 mSettingsPwSet = true; 4117 4138 } … … 4122 4143 { 4123 4144 size_t cbFile; 4145 #if QT_VERSION >= 0x050000 4146 const char *pszFile = arguments.at(i).toLocal8Bit().constData(); 4147 #else /* QT_VERSION < 0x050000 */ 4124 4148 char *pszFile = qApp->argv() [i]; 4149 #endif /* QT_VERSION < 0x050000 */ 4125 4150 bool fStdIn = !::strcmp(pszFile, "stdin"); 4126 4151 int vrc = VINF_SUCCESS; … … 4166 4191 { 4167 4192 if (++i < argc) 4193 # if QT_VERSION >= 0x050000 4194 m_strFloppyImage = arguments.at(i); 4195 # else /* QT_VERSION < 0x050000 */ 4168 4196 m_strFloppyImage = qApp->argv()[i]; 4197 # endif /* QT_VERSION < 0x050000 */ 4169 4198 } 4170 4199 else if (!::strcmp(arg, "--dvd") || !::strcmp(arg, "--cdrom")) 4171 4200 { 4172 4201 if (++i < argc) 4202 # if QT_VERSION >= 0x050000 4203 m_strDvdImage = arguments.at(i); 4204 # else /* QT_VERSION < 0x050000 */ 4173 4205 m_strDvdImage = qApp->argv()[i]; 4206 # endif /* QT_VERSION < 0x050000 */ 4174 4207 } 4175 4208 /* VMM Options: */ … … 4189 4222 { 4190 4223 if (++i < argc) 4224 #if QT_VERSION >= 0x050000 4225 mWarpPct = RTStrToUInt32(arguments.at(i).toLocal8Bit().constData()); 4226 #else /* QT_VERSION < 0x050000 */ 4191 4227 mWarpPct = RTStrToUInt32(qApp->argv() [i]); 4228 #endif /* QT_VERSION < 0x050000 */ 4192 4229 } 4193 4230 #ifdef VBOX_WITH_DEBUGGER_GUI
Note:
See TracChangeset
for help on using the changeset viewer.