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

Convert as qCDebug

parent 8134f3fb
add_definitions(-DTRANSLATION_DOMAIN=\"libwebengineviewer\")
include_directories(${WebEngineViewer_BINARY_DIR}/src)
if(BUILD_TESTING)
add_subdirectory(tests)
......
ecm_add_test(printpreviewdialogtest.cpp ../printpreviewdialog.cpp ../printpreviewpageviewer.cpp ../printpreviewpagewidget.cpp
set(print_autotest_SRCS)
ecm_qt_declare_logging_category(print_autotest_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME log_webengineviewer)
ecm_add_test(printpreviewdialogtest.cpp ../printpreviewdialog.cpp ../printpreviewpageviewer.cpp ../printpreviewpagewidget.cpp ${print_autotest_SRCS}
TEST_NAME printpreviewdialogtest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::I18n KF5::WidgetsAddons Poppler::Qt5 KF5::ConfigCore
)
ecm_add_test(printpreviewpageviewertest.cpp ../printpreviewpageviewer.cpp
ecm_add_test(printpreviewpageviewertest.cpp ../printpreviewpageviewer.cpp ${print_autotest_SRCS}
TEST_NAME printpreviewpagetest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::I18n KF5::WidgetsAddons Poppler::Qt5 KF5::ConfigCore
)
ecm_add_test(printpreviewpagewidgettest.cpp ../printpreviewpagewidget.cpp ../printpreviewpageviewer.cpp
ecm_add_test(printpreviewpagewidgettest.cpp ../printpreviewpagewidget.cpp ../printpreviewpageviewer.cpp ${print_autotest_SRCS}
TEST_NAME printpreviewpagewidgettest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::I18n KF5::WidgetsAddons Poppler::Qt5 KF5::ConfigCore
)
ecm_add_test(printwebengineviewjobtest.cpp ../printwebengineviewjob.cpp
ecm_add_test(printwebengineviewjobtest.cpp ../printwebengineviewjob.cpp ${print_autotest_SRCS}
TEST_NAME printwebengineviewjobtest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::WebEngineWidgets Qt5::PrintSupport
)
ecm_add_test(printconfiguredialogtest.cpp ../printconfiguredialog.cpp ../printconfigurewidget.cpp
ecm_add_test(printconfiguredialogtest.cpp ../printconfiguredialog.cpp ../printconfigurewidget.cpp ${print_autotest_SRCS}
TEST_NAME printconfiguredialogtest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::I18n Qt5::PrintSupport
......
......@@ -16,6 +16,7 @@
*/
#include "printwebengineviewjob.h"
#include "webengineviewer_debug.h"
#include <QWebEngineView>
#include <QDebug>
......@@ -85,7 +86,7 @@ void PrintWebEngineViewJob::slotHandlePdfPrinted(const QByteArray &result)
QFile file(mTemporaryFile.fileName());
if (!file.open(QFile::WriteOnly)) {
qDebug() << "unable to open temporary file";
qCDebug(WEBENGINEVIEWER_LOG) << "unable to open temporary file";
unableToPrint();
return;
}
......
set(print_test_SRCS)
ecm_qt_declare_logging_category(print_test_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME log_webengineviewer)
set(printpreviewdialog_gui_test_SRCS
printpreviewdialog_gui.cpp
../printpreviewdialog.cpp
......@@ -25,6 +28,7 @@ set(printwebenginetest_gui_test_SRCS
../printwebengineviewjob.cpp
../printconfiguredialog.cpp
../printconfigurewidget.cpp
${print_test_SRCS}
)
add_executable(printwebenginetest_gui ${printwebenginetest_gui_test_SRCS})
......
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