qt 解析命令

    技术2022-07-16  96

        for (int i = 1; i < args.size(); ++i) {         const QByteArray arg = args.at(i).toUtf8();         if (arg.startsWith('-'))          {             if ("-volume" == arg)              {                 if (i + 1 < args.count())                 {

                    }                     //volume = 0.01 * args.at(++i).toInt();                 else                 {

                    }                     //qtTrace() << "Option \"-volume\" takes a value";             } #ifdef PERFORMANCEMONITOR_SUPPORT             else if (performanceMonitorState.parseArgument(arg)) {                 // Do nothing             } #endif             else if ("-url" == arg) {                 //sourceIsUrl = true;             }             else {                 //qtTrace() << "Option" << arg << "ignored";             }         }         else {             //if (source1.isEmpty())             //    source1 = arg;             //else if (source2.isEmpty())             //    source2 = arg;             //else             //    qtTrace() << "Argument" << arg << "ignored";         }     }

    Processed: 0.009, SQL: 10