/[svn]/qsampler/trunk/src/qsamplerOptions.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerOptions.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3518 by capela, Sun Jun 30 16:58:30 2019 UTC revision 3556 by capela, Thu Aug 15 09:09:21 2019 UTC
# Line 286  bool Options::parse_args ( const QString Line 286  bool Options::parse_args ( const QString
286  {  {
287          QTextStream out(stderr);          QTextStream out(stderr);
288          const QString sEol = "\n\n";          const QString sEol = "\n\n";
         int iCmdArgs = 0;  
289          const int argc = args.count();          const int argc = args.count();
290            int iCmdArgs = 0;
291    
292          for (int i = 1; i < argc; i++) {          for (int i = 1; i < argc; ++i) {
293    
294                  if (iCmdArgs > 0) {                  if (iCmdArgs > 0) {
295                          sSessionFile += " ";                          sSessionFile += " ";
296                          sSessionFile += args.at(i);                          sSessionFile += args.at(i);
297                          iCmdArgs++;                          ++iCmdArgs;
298                          continue;                          continue;
299                  }                  }
300    
# Line 321  bool Options::parse_args ( const QString Line 321  bool Options::parse_args ( const QString
321                          }                          }
322                          sServerHost = sVal;                          sServerHost = sVal;
323                          if (iEqual < 0)                          if (iEqual < 0)
324                                  i++;                                  ++i;
325                  }                  }
326                  else if (sArg == "-p" || sArg == "--port") {                  else if (sArg == "-p" || sArg == "--port") {
327                          if (sVal.isNull()) {                          if (sVal.isNull()) {
# Line 330  bool Options::parse_args ( const QString Line 330  bool Options::parse_args ( const QString
330                          }                          }
331                          iServerPort = sVal.toInt();                          iServerPort = sVal.toInt();
332                          if (iEqual < 0)                          if (iEqual < 0)
333                                  i++;                                  ++i;
334                  }                  }
335                  else if (sArg == "-?" || sArg == "--help") {                  else if (sArg == "-?" || sArg == "--help") {
336                          print_usage(args.at(0));                          print_usage(args.at(0));
# Line 356  bool Options::parse_args ( const QString Line 356  bool Options::parse_args ( const QString
356                          // If we don't have one by now,                          // If we don't have one by now,
357                          // this will be the startup sesion file...                          // this will be the startup sesion file...
358                          sSessionFile += sArg;                          sSessionFile += sArg;
359                          iCmdArgs++;                          ++iCmdArgs;
360                  }                  }
361          }          }
362    
# Line 374  void Options::loadWidgetGeometry ( QWidg Line 374  void Options::loadWidgetGeometry ( QWidg
374          if (pWidget) {          if (pWidget) {
375          //      if (bVisible) pWidget->show(); -- force initial exposure?          //      if (bVisible) pWidget->show(); -- force initial exposure?
376                  m_settings.beginGroup("/Geometry/" + pWidget->objectName());                  m_settings.beginGroup("/Geometry/" + pWidget->objectName());
377          #if QT_VERSION >= 0x050000          #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
378                  const QByteArray& geometry                  const QByteArray& geometry
379                          = m_settings.value("/geometry").toByteArray();                          = m_settings.value("/geometry").toByteArray();
380                  if (!geometry.isEmpty())                  if (!geometry.isEmpty())
# Line 411  void Options::saveWidgetGeometry ( QWidg Line 411  void Options::saveWidgetGeometry ( QWidg
411          // only save the form geometry while its up and visible)          // only save the form geometry while its up and visible)
412          if (pWidget) {          if (pWidget) {
413                  m_settings.beginGroup("/Geometry/" + pWidget->objectName());                  m_settings.beginGroup("/Geometry/" + pWidget->objectName());
414          #if QT_VERSION >= 0x050000          #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
415                  m_settings.setValue("/geometry", pWidget->saveGeometry());                  m_settings.setValue("/geometry", pWidget->saveGeometry());
416          #else//--SAVE_OLD_GEOMETRY          #else//--SAVE_OLD_GEOMETRY
417                  const QPoint& wpos  = pWidget->pos();                  const QPoint& wpos  = pWidget->pos();

Legend:
Removed from v.3518  
changed lines
  Added in v.3556

  ViewVC Help
Powered by ViewVC