summaryrefslogtreecommitdiff
path: root/src/qcam/main.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-23 01:53:41 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-24 10:33:59 +0200
commit494da4467ddf091d457863cd363067979552d67e (patch)
treed41b9a767423a94adbbb53e6cb64eb7151127eac /src/qcam/main.cpp
parent9cec54a4ee90617ce3f01875961a2afb1588f300 (diff)
qcam: Use Qt qInfo() and qWarning() logging facilities
Replace manual usage of std::cout and std::cerr with the Qt logging facilities. This allows redirection log output if needed, and integrates better with Qt. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/main.cpp')
-rw-r--r--src/qcam/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp
index 29745391..862d714f 100644
--- a/src/qcam/main.cpp
+++ b/src/qcam/main.cpp
@@ -5,11 +5,11 @@
* main.cpp - cam - The libcamera swiss army knife
*/
-#include <iostream>
#include <signal.h>
#include <string.h>
#include <QApplication>
+#include <QtDebug>
#include <libcamera/camera_manager.h>
@@ -18,7 +18,7 @@
void signalHandler(int signal)
{
- std::cout << "Exiting" << std::endl;
+ qInfo() << "Exiting";
qApp->quit();
}
@@ -65,8 +65,8 @@ int main(int argc, char **argv)
ret = cm->start();
if (ret) {
- std::cout << "Failed to start camera manager: "
- << strerror(-ret) << std::endl;
+ qInfo() << "Failed to start camera manager:"
+ << strerror(-ret);
return EXIT_FAILURE;
}