forked from qt-creator/qt-creator
Replace uses of deprecated QWARN macro with qWarning
Change-Id: I71ee2cedaf40197ac52f61e74060656fc4b305d4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
@@ -65,7 +65,7 @@ static bool snapshotContains(const CPlusPlus::Snapshot &snapshot, const QSet<QSt
|
||||
foreach (const QString &filePath, filePaths) {
|
||||
if (!snapshot.contains(filePath)) {
|
||||
const QString warning = QLatin1String("Missing file in snapshot: ") + filePath;
|
||||
QWARN(qPrintable(warning));
|
||||
qWarning(qPrintable(warning));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -175,11 +175,11 @@ bool TestCase::parseFiles(const QSet<QString> &filePaths)
|
||||
QCoreApplication::processEvents();
|
||||
const CPlusPlus::Snapshot snapshot = globalSnapshot();
|
||||
if (snapshot.isEmpty()) {
|
||||
QWARN("After parsing: snapshot is empty.");
|
||||
qWarning("After parsing: snapshot is empty.");
|
||||
return false;
|
||||
}
|
||||
if (!snapshotContains(snapshot, filePaths)) {
|
||||
QWARN("After parsing: snapshot does not contain all expected files.");
|
||||
qWarning("After parsing: snapshot does not contain all expected files.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -248,7 +248,7 @@ bool TestCase::writeFile(const QString &filePath, const QByteArray &contents)
|
||||
Utils::FileSaver saver(Utils::FilePath::fromString(filePath));
|
||||
if (!saver.write(contents) || !saver.finalize()) {
|
||||
const QString warning = QLatin1String("Failed to write file to disk: ") + filePath;
|
||||
QWARN(qPrintable(warning));
|
||||
qWarning(qPrintable(warning));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -363,7 +363,7 @@ TemporaryCopiedDir::TemporaryCopiedDir(const QString &sourceDirPath)
|
||||
|
||||
QString errorMessage;
|
||||
if (!copyRecursively(sourceDirPath, path(), &errorMessage)) {
|
||||
QWARN(qPrintable(errorMessage));
|
||||
qWarning(qPrintable(errorMessage));
|
||||
m_isValid = false;
|
||||
}
|
||||
}
|
||||
@@ -381,7 +381,7 @@ FileWriterAndRemover::FileWriterAndRemover(const QString &filePath, const QByteA
|
||||
"Will not overwrite existing file: \"%1\"."
|
||||
" If this file is left over due to a(n) abort/crash, please remove manually.")
|
||||
.arg(m_filePath);
|
||||
QWARN(qPrintable(warning));
|
||||
qWarning(qPrintable(warning));
|
||||
m_writtenSuccessfully = false;
|
||||
} else {
|
||||
m_writtenSuccessfully = TestCase::writeFile(filePath, contents);
|
||||
@@ -392,7 +392,7 @@ FileWriterAndRemover::~FileWriterAndRemover()
|
||||
{
|
||||
if (m_writtenSuccessfully && !QFile::remove(m_filePath)) {
|
||||
const QString warning = QLatin1String("Failed to remove file from disk: ") + m_filePath;
|
||||
QWARN(qPrintable(warning));
|
||||
qWarning(qPrintable(warning));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user