Commit b5a665c4 authored by Laurent Montel's avatar Laurent Montel 😁

Add warning

parent 5dd55436
......@@ -6,6 +6,9 @@ include_directories(
set( pimsettingexporterconsole_loginfiletest_SRCS loginfiletest.cpp ../loginfile.cpp )
ecm_qt_declare_logging_category(pimsettingexporterconsole_loginfiletest_SRCS HEADER pimsettingexportconsole_debug.h IDENTIFIER PIMSETTINGEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimsettingexporterconsole)
add_executable( pimsettingexporterconsole_loginfiletest ${pimsettingexporterconsole_loginfiletest_SRCS})
add_test( pimsettingexporterconsole_loginfiletest pimsettingexporterconsole_loginfiletest)
ecm_mark_as_test(pimsettingexporterconsole_loginfiletest)
......
......@@ -48,6 +48,7 @@ void LogInFile::setFileName(const QString &fileName)
if (!mFile) {
mFile = new QFile(mFileName);
if (!mFile->open(QIODevice::WriteOnly | QIODevice::Text)) {
qCWarning(PIMSETTINGEXPORTERCONSOLE_LOG) << "Impossible to open filename " << mFileName;
return;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment