Changeset 423 for trunk/src/corelib/io


Ignore:
Timestamp:
Dec 14, 2009, 8:18:13 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

general: Fixed a bunch of deprecated QString/QChar initializers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/io/qprocess_os2.cpp

    r254 r423  
    263263        if (procKey > MaxProcKey) {
    264264            // oops, no more free keys!
    265             process->setErrorString(QString("Internal error: Too many processes"));
     265            process->setErrorString(QString("Internal error: Too many processes"));
    266266            return InvalidProcKey;
    267267        }
     
    752752    // elements in front of the array for a posssible command processor call
    753753    // insertion.
    754     char **argvBase = new char *[arguments.count() + 2 + 3];
     754    c char *[arguments.count() + 2 + 3];
    755755
    756756    // Don't use leading elements by default
    757     char **argv = argvBase + 3;
     757    char **argv = argvBase + 3;
    758758    // Set the final argument to 0
    759759    argv[arguments.count() + 1] = 0;
     
    828828        QFileInfo programInfo(program);
    829829        QStringList knownExts;
    830         knownExts << "exe" << "cmd" << "bat"; // in order of CMD.EXE's precedence
     830        knownExts << QLatin1String("exe") << QLatin1String("cmd")
     831                  << QLatin1String("bat"); // in order of CMD.EXE's precedence
    831832        QByteArray path =
    832833            QFile::encodeName(QDir::toNativeSeparators(programInfo.path()));
     
    891892        if (arc == NO_ERROR) {
    892893            QString path = QFile::decodeName(libPathBuf);
    893             paths = path.split(';', QString::SkipEmptyParts);
     894            paths = path.split(, QString::SkipEmptyParts);
    894895            if (paths.contains(fullPath, Qt::CaseInsensitive)) {
    895896#if defined(QPROCESS_DEBUG)
     
    909910        }
    910911
    911         char *programReal = fullProgramName.data();
    912         char **argvReal = argv;
     912        char *programReal = fullProgramName.data();
     913        char **argvReal = argv;
    913914
    914915        if (mode == P_DETACH) {
     
    961962#endif
    962963
    963         // finally, start the thing
    964         pid = spawnve(mode, programReal, argvReal, envv);
     964        // finally, start the thing (note that due to the incorrect definiton of
     965        // spawnve we have to perform a pointless cast; the devinition for the
     966        // 3rd and 4th arg should be: char const * const *)
     967        pid = spawnve(mode, programReal, const_cast<char * const *>(argvReal), envv);
    965968
    966969#if defined(QPROCESS_DEBUG)
     
    11171120        processError = QProcess::FailedToStart;
    11181121        if (arc != NO_ERROR) {
    1119             // handle duplication failed
     1122            // handle duplication faile
    11201123            q->setErrorString(QProcess::tr("Process failed to start: %1")
    1121                                            .arg(QString("DOS error %1").arg(arc)));
     1124                                           .arg(QString(QLatin1String("DOS error %1"))
     1125                                                .arg(arc)));
    11221126        } else {
    11231127#if defined (QPROCESS_DEBUG)
     
    11251129#endif
    11261130            q->setErrorString(QProcess::tr("Process failed to start: %1")
    1127                                            .arg(qPrintable(qt_error_string(errno))));
     1131                                           .arg(q)));
    11281132        }
    11291133        emit q->error(processError);
Note: See TracChangeset for help on using the changeset viewer.