Changeset 423


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.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/3rdparty/os2/xsystray/xsystray_api.c

    r285 r423  
    1919 */
    2020
     21
    2122#define INCL_DOSERRORS
    2223#define INCL_DOSPROCESS
  • 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);
  • trunk/src/corelib/plugin/qlibrary_os2.cpp

    r75 r423  
    112112            .arg(fileName).arg(qt_os2_error_string(rc));
    113113        if (*errModule != '\0')
    114             errorString += QLibrary::tr(" (failed module: %1)").arg(errModule);
     114            errorString += QLibrary::tr(" (failed module: %1)")
     115                .arg(QFile::decodeName(errModule));
    115116        return false;
    116117    }
  • trunk/src/gui/kernel/qmime_pm.cpp

    r347 r423  
    530530    QVariant ret;
    531531
    532     if (!mimeType.startsWith("text/plain") &&
    533         !mimeType.startsWith("text/html"))
     532    if (!mimeType.startsWith() &&
     533        !mimeType.startsWith())
    534534        return ret;
    535535    if ((format != CF_TEXT && format != CF_TextUnicode && format != CF_TextHtml) ||
     
    821821        // prepend the non-standard type with the prefix that makes it comply
    822822        // with the standard
    823         mimeToReg = customPrefix + mime + QChar('\"');
     823        mimeToReg = customPrefix + mime + QChar('\"');
    824824    }
    825825
  • trunk/src/gui/text/qfontdatabase_pm.cpp

    r373 r423  
    319319        QStringList files = fontCache.childGroups();
    320320        foreach(QString file, files) {
    321             file.replace("|", "/");
     321            file.replace();
    322322            knownFontFiles.insert(file, FileData());
    323323            // note that QFileInfo is empty so the file will be considered as
     
    401401
    402402        // QSettings uses / for splitting into groups, suppress it
    403         fileKey.replace("/", "|");
     403        fileKey.replace();
    404404
    405405        QList<FaceData> cachedFaces;
     
    613613            // remove from the both caches
    614614            QString fileKey = it.key();
    615             fileKey.replace("/", "|");
     615            fileKey.replace();
    616616            fontCache.remove(fileKey);
    617617            it = knownFontFiles.erase(it);
Note: See TracChangeset for help on using the changeset viewer.