From 5a56e1bba6d97e4d4969eaf96202d718570da385 Mon Sep 17 00:00:00 2001 From: Alexandre Quessy Date: Sat, 5 Mar 2016 19:32:28 -0500 Subject: [PATCH 1/2] fix a syntax error --- MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index d996300..c124380 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -1536,7 +1536,7 @@ void MainWindow::createActions() // Add color. addColorAction = new QAction(tr("Add &Color Paint..."), this); - addColorAction->setShortcut(Qt::CTRL + Qt:SHIFT + Qt::Key_A); + addColorAction->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_A); addColorAction->setIcon(QIcon(":/add-color")); addColorAction->setToolTip(tr("Add a color paint...")); addColorAction->setIconVisibleInMenu(false); From aec2dba6b870ffc294e655353b45b94c9aa3baa2 Mon Sep 17 00:00:00 2001 From: Alexandre Quessy Date: Sat, 5 Mar 2016 19:36:05 -0500 Subject: [PATCH 2/2] use qDebug for logging --- MainWindow.cpp | 12 ++---------- OscInterface.cpp | 6 +++--- Util.cpp | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index c124380..d218bdf 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -28,11 +28,7 @@ MainWindow::MainWindow() { // Create model. -#if QT_VERSION >= 0x050500 - QMessageLogger(__FILE__, __LINE__, 0).info() << "Video support: " << (Video::hasVideoSupport() ? "yes" : "no"); -#else - QMessageLogger(__FILE__, __LINE__, 0).debug() << "Video support: " << (Video::hasVideoSupport() ? "yes" : "no"); -#endif + qDebug() << "Video support: " << (Video::hasVideoSupport() ? "yes" : "no"); mappingManager = new MappingManager; @@ -2898,11 +2894,7 @@ void MainWindow::startOscReceiver() int port = config_osc_receive_port; std::ostringstream os; os << port; -#if QT_VERSION >= 0x050500 - QMessageLogger(__FILE__, __LINE__, 0).info() << "OSC port: " << port ; -#else - QMessageLogger(__FILE__, __LINE__, 0).debug() << "OSC port: " << port ; -#endif + qDebug() << "OSC port: " << port ; osc_interface.reset(new OscInterface(os.str())); if (port != 0) { diff --git a/OscInterface.cpp b/OscInterface.cpp index 001901c..13ff9b1 100644 --- a/OscInterface.cpp +++ b/OscInterface.cpp @@ -41,7 +41,7 @@ OscInterface::OscInterface( //if (listen_port != OSC_PORT_NONE) receiving_enabled_ = true; if (receiving_enabled_) { - QMessageLogger(__FILE__, __LINE__, 0).debug() << "Listening osc.udp://localhost:" << listen_port.c_str(); + qDebug() << "Listening osc.udp://localhost:" << listen_port.c_str(); // receiver_.addHandler("/ping", "", ping_cb, this); // receiver_.addHandler("/pong", "", pong_cb, this); //receiver_.addHandler("/image/path", "ss", image_path_cb, this); @@ -60,7 +60,7 @@ int OscInterface::pong_cb(const char *path, const char * /*types*/, lo_arg ** /*argv*/, int /*argc*/, void * /*data*/, void *user_data) { OscInterface* context = static_cast(user_data); if (context->is_verbose()) - QMessageLogger(__FILE__, __LINE__, 0).debug() << "Got " << path; + qDebug() << "Got " << path; return 0; } @@ -71,7 +71,7 @@ int OscInterface::ping_cb(const char *path, const char * /*types*/, lo_arg ** /*argv*/, int /*argc*/, void * /*data*/, void *user_data) { OscInterface* context = static_cast(user_data); if (context->is_verbose()) - QMessageLogger(__FILE__, __LINE__, 0).debug() << "Got " << path; + qDebug() << "Got " << path; return 0; } diff --git a/Util.cpp b/Util.cpp index 283f3c2..a0e25d3 100644 --- a/Util.cpp +++ b/Util.cpp @@ -203,7 +203,7 @@ bool eraseSettings() } else { - QMessageLogger(__FILE__, __LINE__, 0).debug() << "Erase MapMap settings."; + qDebug() << "Erase MapMap settings."; settingsFile.close(); return settingsFile.remove(); }