Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/testlib/qbenchmarkvalgrind.cpp

    r2 r561  
    1 
    21/****************************************************************************
    32**
    43** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    5 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    66**
    77** This file is part of the QtTest module of the Qt Toolkit.
     
    2222** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2323**
    24 ** In addition, as a special exception, Nokia gives you certain
    25 ** additional rights. These rights are described in the Nokia Qt LGPL
    26 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    27 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2827**
    2928** GNU General Public License Usage
     
    3534** met: http://www.gnu.org/copyleft/gpl.html.
    3635**
    37 ** If you are unsure which license is appropriate for your use, please
    38 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3938** $QT_END_LICENSE$
    4039**
     
    5251#include <QtCore/qset.h>
    5352#include "3rdparty/callgrind_p.h"
     53
     54
    5455
    5556// Returns true iff a sufficiently recent valgrind is available.
     
    114115        const QString line(QLatin1String(file.readLine()));
    115116        if (rxValue.indexIn(line) != -1) {
    116             Q_ASSERT(rxValue.numCaptures() == 1);
     117            Q_ASSERT(rxValue.() == 1);
    117118            bool ok;
    118119            val = rxValue.cap(1).toLongLong(&ok);
     
    133134    Q_ASSERT(!base.isEmpty());
    134135
    135     nameFilters << QString(QLatin1String("%1.*")).arg(base);
     136    nameFilters << QString).arg(base);
    136137    QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable);
    137138    Q_ASSERT(!fiList.empty());
    138139    int hiSuffix = -1;
    139140    QFileInfo lastFileInfo;
    140     const QString pattern = QString(QLatin1String("%1.(\\d+)")).arg(base);
     141    const QString pattern = QString).arg(base);
    141142    const QRegExp rx(pattern);
    142143    foreach (QFileInfo fileInfo, fiList) {
     
    168169    Q_ASSERT(!base.isEmpty());
    169170    nameFilters
    170         << QString(QLatin1String("%1")).arg(base) // overall summary
    171         << QString(QLatin1String("%1.*")).arg(base); // individual dumps
     171        << // overall summary
     172        << QString).arg(base); // individual dumps
    172173    QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable);
    173174    foreach (QFileInfo fileInfo, fiList) {
     
    180181QString QBenchmarkValgrindUtils::outFileBase(qint64 pid)
    181182{
    182     return QString(QLatin1String("callgrind.out.%1")).arg(
     183    return QString).arg(
    183184        pid != -1 ? pid : QCoreApplication::applicationPid());
    184185}
     
    273274}
    274275
     276
     277
    275278#endif // QTESTLIB_USE_VALGRIND
Note: See TracChangeset for help on using the changeset viewer.