benchmarks: Re-enable QFileInfo build by removing canonicalFileNamePerformance.
QFSFileEnginePrivate::canonicalized has been gone for a very, very long time now (since d3b152ba1e3cd38dd675c801474105d518bacb44 in Qt 4). This also fixes a build failure in the code on Windows. Change-Id: I81f5e0c1d644b1b4d75644626eb394a663535387 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
94c8efff8a
commit
4fc230ab15
@ -3,7 +3,7 @@ SUBDIRS = \
|
|||||||
qdir \
|
qdir \
|
||||||
qdiriterator \
|
qdiriterator \
|
||||||
qfile \
|
qfile \
|
||||||
#qfileinfo \ # FIXME: broken
|
qfileinfo \
|
||||||
qiodevice \
|
qiodevice \
|
||||||
qprocess \
|
qprocess \
|
||||||
qtemporaryfile
|
qtemporaryfile
|
||||||
|
@ -52,7 +52,6 @@ class qfileinfo : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private slots:
|
||||||
void canonicalFileNamePerformance();
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||||
void symLinkTargetPerformanceLNK();
|
void symLinkTargetPerformanceLNK();
|
||||||
void symLinkTargetPerformanceMounpoint();
|
void symLinkTargetPerformanceMounpoint();
|
||||||
@ -71,18 +70,6 @@ void qfileinfo::cleanupTestCase()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void qfileinfo::canonicalFileNamePerformance()
|
|
||||||
{
|
|
||||||
QString appPath = QCoreApplication::applicationFilePath();
|
|
||||||
QFSFileEnginePrivate::canonicalized(appPath); // warmup
|
|
||||||
QFSFileEnginePrivate::canonicalized(appPath); // more warmup
|
|
||||||
QBENCHMARK {
|
|
||||||
for (int i = 0; i < 5000; i++) {
|
|
||||||
QFSFileEnginePrivate::canonicalized(appPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||||
void qfileinfo::symLinkTargetPerformanceLNK()
|
void qfileinfo::symLinkTargetPerformanceLNK()
|
||||||
{
|
{
|
||||||
@ -102,7 +89,7 @@ void qfileinfo::symLinkTargetPerformanceMounpoint()
|
|||||||
{
|
{
|
||||||
wchar_t buffer[MAX_PATH];
|
wchar_t buffer[MAX_PATH];
|
||||||
QString rootPath = QDir::toNativeSeparators(QDir::rootPath());
|
QString rootPath = QDir::toNativeSeparators(QDir::rootPath());
|
||||||
QVERIFY(GetVolumeNameForVolumeMountPointW(rootPath.utf16(), buffer, MAX_PATH));
|
QVERIFY(GetVolumeNameForVolumeMountPointW((LPCWSTR)rootPath.utf16(), buffer, MAX_PATH));
|
||||||
QString rootVolume = QString::fromWCharArray(buffer);
|
QString rootVolume = QString::fromWCharArray(buffer);
|
||||||
QString mountpoint = "mountpoint";
|
QString mountpoint = "mountpoint";
|
||||||
rootVolume.replace("\\\\?\\","\\??\\");
|
rootVolume.replace("\\\\?\\","\\??\\");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user