- Timestamp:
- Nov 7, 2014, 5:23:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vendor/nokia/qt/current/tools/qml/qdeclarativetester.cpp
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the tools applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 49 49 #include <QCryptographicHash> 50 50 #include <private/qabstractanimation_p.h> 51 52 51 53 #include <private/qdeclarativeitem_p.h> 54 52 55 53 56 QT_BEGIN_NAMESPACE … … 203 206 QFileInfo filenameInfo(filename); 204 207 QDir saveDir = filenameInfo.absoluteDir(); 205 saveDir.mkpath( ".");208 saveDir.mkpath(); 206 209 207 210 QFile file(filename); … … 222 225 ts << " hash: \"" << fe.hash.toHex() << "\"\n"; 223 226 } else if (!fe.image.isNull()) { 224 QString filename = filenameInfo.baseName() + "." + QString::number(imgCount) + ".png";225 fe.image.save(m_script + "." + QString::number(imgCount) + ".png");227 QString filename = filenameInfo.baseName() + ; 228 fe.image.save(m_script + ); 226 229 imgCount++; 227 230 ts << " image: \"" << filename << "\"\n"; … … 267 270 void QDeclarativeTester::updateCurrentTime(int msec) 268 271 { 272 269 273 QDeclarativeItemPrivate::setConsistentTime(msec); 274 270 275 if (!testscript && msec > 16 && options & QDeclarativeViewer::Snapshot) 271 276 return; … … 371 376 } 372 377 if (goodImage != img) { 373 QString reject(frame->image().toLocalFile() + ".reject.png");378 QString reject(frame->image().toLocalFile() + ); 374 379 qWarning() << "QDeclarativeTester(" << m_script << "): Image mismatch. Reject saved to:" 375 380 << reject; … … 389 394 } 390 395 } 391 QString diff(frame->image().toLocalFile() + ".diff.png");396 QString diff(frame->image().toLocalFile() + ); 392 397 diffimg.save(diff); 393 398 qWarning().nospace() << " Diff (" << diffCount << " pixels differed) saved to: " << diff;
Note:
See TracChangeset
for help on using the changeset viewer.