From bf3c4572d74cd2cac7c1c616ad4f5332a9f840fb Mon Sep 17 00:00:00 2001 From: RJ Ryan Date: Wed, 4 May 2016 08:39:26 -0700 Subject: Convert some qDebugs into qWarnings. --- src/controllers/bulk/bulkcontroller.cpp | 2 +- src/controllers/bulk/bulkenumerator.cpp | 2 +- src/controllers/controllerengine.cpp | 2 +- src/controllers/controllerpresetinfo.cpp | 2 +- src/controllers/dlgcontrollerlearning.cpp | 4 ++-- src/controllers/hid/hidcontroller.cpp | 2 +- src/controllers/midi/portmidicontroller.cpp | 14 +++++++------- src/dialog/dlgdevelopertools.cpp | 2 +- src/engine/sidechain/enginebroadcast.cpp | 10 +++++----- src/engine/sidechain/enginerecord.cpp | 6 +++--- src/library/banshee/bansheedbconnection.cpp | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/controllers/bulk/bulkcontroller.cpp b/src/controllers/bulk/bulkcontroller.cpp index a07ce6e4a6..834ca6948d 100644 --- a/src/controllers/bulk/bulkcontroller.cpp +++ b/src/controllers/bulk/bulkcontroller.cpp @@ -107,7 +107,7 @@ QString BulkController::presetExtension() { void BulkController::visit(const MidiControllerPreset* preset) { Q_UNUSED(preset); // TODO(XXX): throw a hissy fit. - qDebug() << "ERROR: Attempting to load a MidiControllerPreset to an HidController!"; + qWarning() << "ERROR: Attempting to load a MidiControllerPreset to an HidController!"; } void BulkController::visit(const HidControllerPreset* preset) { diff --git a/src/controllers/bulk/bulkenumerator.cpp b/src/controllers/bulk/bulkenumerator.cpp index 42542b61f8..2942c5b3ac 100644 --- a/src/controllers/bulk/bulkenumerator.cpp +++ b/src/controllers/bulk/bulkenumerator.cpp @@ -51,7 +51,7 @@ QList BulkEnumerator::queryDevices() { struct libusb_device_handle *handle = NULL; err = libusb_open(device, &handle); if (err) { - qDebug() << "Error opening a device"; + qWarning() << "Error opening a device"; continue; } diff --git a/src/controllers/controllerengine.cpp b/src/controllers/controllerengine.cpp index 2514695401..e95f9b95cd 100644 --- a/src/controllers/controllerengine.cpp +++ b/src/controllers/controllerengine.cpp @@ -228,7 +228,7 @@ bool ControllerEngine::loadScriptFiles(const QList& scriptPaths, } if (m_scriptErrors.contains(script.name)) { - qDebug() << "Errors occurred while loading" << script.name; + qWarning() << "Errors occurred while loading" << script.name; } } diff --git a/src/controllers/controllerpresetinfo.cpp b/src/controllers/controllerpresetinfo.cpp index c8850f4d6e..96c5c69b2c 100644 --- a/src/controllers/controllerpresetinfo.cpp +++ b/src/controllers/controllerpresetinfo.cpp @@ -38,7 +38,7 @@ PresetInfo::PresetInfo(const QString preset_path) QDomElement root = XmlParse::openXMLFile(m_path, "controller"); if (root.isNull()) { - qDebug() << "ERROR parsing" << m_path; + qWarning() << "ERROR parsing" << m_path; return; } QDomElement info = root.firstChildElement("info"); diff --git a/src/controllers/dlgcontrollerlearning.cpp b/src/controllers/dlgcontrollerlearning.cpp index 9bbbabde6a..9fc60a3192 100644 --- a/src/controllers/dlgcontrollerlearning.cpp +++ b/src/controllers/dlgcontrollerlearning.cpp @@ -392,12 +392,12 @@ void DlgControllerLearning::visit(MidiController* pMidiController) { } void DlgControllerLearning::visit(HidController* pHidController) { - qDebug() << "ERROR: DlgControllerLearning does not support HID devices."; + qWarning() << "ERROR: DlgControllerLearning does not support HID devices."; Q_UNUSED(pHidController); } void DlgControllerLearning::visit(BulkController* pBulkController) { - qDebug() << "ERROR: DlgControllerLearning does not support Bulk devices."; + qWarning() << "ERROR: DlgControllerLearning does not support Bulk devices."; Q_UNUSED(pBulkController); } diff --git a/src/controllers/hid/hidcontroller.cpp b/src/controllers/hid/hidcontroller.cpp index 36b7653d14..7c5321c795 100644 --- a/src/controllers/hid/hidcontroller.cpp +++ b/src/controllers/hid/hidcontroller.cpp @@ -124,7 +124,7 @@ QString HidController::presetExtension() { void HidController::visit(const MidiControllerPreset* preset) { Q_UNUSED(preset); // TODO(XXX): throw a hissy fit. - qDebug() << "ERROR: Attempting to load a MidiControllerPreset to an HidController!"; + qWarning() << "ERROR: Attempting to load a MidiControllerPreset to an HidController!"; } void HidController::visit(const HidControllerPreset* preset) { diff --git a/src/controllers/midi/portmidicontroller.cpp b/src/controllers/midi/portmidicontroller.cpp index edd7b9183e..cb419033ff 100644 --- a/src/controllers/midi/portmidicontroller.cpp +++ b/src/controllers/midi/portmidicontroller.cpp @@ -67,7 +67,7 @@ int PortMidiController::open() { PmError err = m_pInputDevice->openInput(MIXXX_PORTMIDI_BUFFER_LEN); if (err != pmNoError) { - qDebug() << "PortMidi error:" << Pm_GetErrorText(err); + qWarning() << "PortMidi error:" << Pm_GetErrorText(err); return -2; } } @@ -78,7 +78,7 @@ int PortMidiController::open() { PmError err = m_pOutputDevice->openOutput(); if (err != pmNoError) { - qDebug() << "PortMidi error:" << Pm_GetErrorText(err); + qWarning() << "PortMidi error:" << Pm_GetErrorText(err); return -2; } } @@ -102,7 +102,7 @@ int PortMidiController::close() { if (m_pInputDevice && m_pInputDevice->isOpen()) { PmError err = m_pInputDevice->close(); if (err != pmNoError) { - qDebug() << "PortMidi error:" << Pm_GetErrorText(err); + qWarning() << "PortMidi error:" << Pm_GetErrorText(err); result = -1; } } @@ -110,7 +110,7 @@ int PortMidiController::close() { if (m_pOutputDevice && m_pOutputDevice->isOpen()) { PmError err = m_pOutputDevice->close(); if (err != pmNoError) { - qDebug() << "PortMidi error:" << Pm_GetErrorText(err); + qWarning() << "PortMidi error:" << Pm_GetErrorText(err); result = -1; } } @@ -210,7 +210,7 @@ void PortMidiController::sendWord(unsigned int word) { PmError err = m_pOutputDevice->writeShort(word); if (err != pmNoError) { - qDebug() << "PortMidi sendShortMsg error:" << Pm_GetErrorText(err); + qWarning() << "PortMidi sendShortMsg error:" << Pm_GetErrorText(err); } } @@ -230,7 +230,7 @@ void PortMidiController::send(QByteArray data) { PmError err = m_pOutputDevice->writeSysEx((unsigned char*)data.constData()); if (err != pmNoError) { - qDebug() << "PortMidi sendSysexMsg error:" - << Pm_GetErrorText(err); + qWarning() << "PortMidi sendSysexMsg error:" + << Pm_GetErrorText(err); } } diff --git a/src/dialog/dlgdevelopertools.cpp b/src/dialog/dlgdevelopertools.cpp index fd1fc59dfc..61afbcdd78 100644 --- a/src/dialog/dlgdevelopertools.cpp +++ b/src/dialog/dlgdevelopertools.cpp @@ -53,7 +53,7 @@ DlgDeveloperTools::DlgDeveloperTools(QWidget* pParent, QString logFileName = QDir(CmdlineArgs::Instance().getSettingsPath()).filePath("mixxx.log"); m_logFile.setFileName(logFileName); if (!m_logFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug() << "ERROR: Could not open log file"; + qWarning() << "ERROR: Could not open log file:" << logFileName; } // Connect search box signals to the library diff --git a/src/engine/sidechain/enginebroadcast.cpp b/src/engine/sidechain/enginebroadcast.cpp index ee1316874c..3ee4a94369 100644 --- a/src/engine/sidechain/enginebroadcast.cpp +++ b/src/engine/sidechain/enginebroadcast.cpp @@ -271,7 +271,7 @@ void EngineBroadcast::updateFromPreferences() { } else if (m_format_is_ov) { format = SHOUT_FORMAT_OGG; } else { - qDebug() << "Error: unknown format:" << baFormat.constData(); + qWarning() << "Error: unknown format:" << baFormat.constData(); return; } @@ -284,7 +284,7 @@ void EngineBroadcast::updateFromPreferences() { int iBitrate = baBitrate.toInt(&bitrate_is_int); if (!bitrate_is_int) { - qDebug() << "Error: unknown bitrate:" << baBitrate.constData(); + qWarning() << "Error: unknown bitrate:" << baBitrate.constData(); } int iMasterSamplerate = m_pMasterSamplerate->get(); @@ -405,8 +405,8 @@ bool EngineBroadcast::processConnect() { m_iShoutStatus == SHOUTERR_NOLOGIN || m_iShoutStatus == SHOUTERR_MALLOC) { m_lastErrorStr = shout_get_error(m_pShout); - qDebug() << "Streaming server made fatal error. Can't continue connecting:" - << m_lastErrorStr; + qWarning() << "Streaming server made fatal error. Can't continue connecting:" + << m_lastErrorStr; break; } @@ -435,7 +435,7 @@ bool EngineBroadcast::processConnect() { if (m_iShoutStatus != SHOUTERR_BUSY && m_iShoutStatus != SHOUTERR_SUCCESS && m_iShoutStatus != SHOUTERR_CONNECTED) { - qDebug() << "Streaming server made error:" << m_iShoutStatus; + qWarning() << "Streaming server made error:" << m_iShoutStatus; } // If socket is busy then we wait half second diff --git a/src/engine/sidechain/enginerecord.cpp b/src/engine/sidechain/enginerecord.cpp index 2c2c24abb2..359d773244 100644 --- a/src/engine/sidechain/enginerecord.cpp +++ b/src/engine/sidechain/enginerecord.cpp @@ -311,17 +311,17 @@ bool EngineRecord::openFile() { // Set meta data int ret = sf_set_string(m_pSndfile, SF_STR_TITLE, m_baTitle.constData()); if (ret != 0) { - qDebug("libsndfile error: %s", sf_error_number(ret)); + qWarning("libsndfile error: %s", sf_error_number(ret)); } ret = sf_set_string(m_pSndfile, SF_STR_ARTIST, m_baAuthor.constData()); if (ret != 0) { - qDebug("libsndfile error: %s", sf_error_number(ret)); + qWarning("libsndfile error: %s", sf_error_number(ret)); } ret = sf_set_string(m_pSndfile, SF_STR_COMMENT, m_baAlbum.constData()); if (ret != 0) { - qDebug("libsndfile error: %s", sf_error_number(ret)); + qWarning("libsndfile error: %s", sf_error_number(ret)); } } } else { diff --git a/src/library/banshee/bansheedbconnection.cpp b/src/library/banshee/bansheedbconnection.cpp index 3f19ade723..ed8acb5863 100644 --- a/src/library/banshee/bansheedbconnection.cpp +++ b/src/library/banshee/bansheedbconnection.cpp @@ -26,7 +26,7 @@ bool BansheeDbConnection::open(const QString& databaseFile) { //Open the database connection in this thread. if (!m_database.open()) { m_database.setConnectOptions(); // clear options - qDebug() << "Failed to open Banshee database." << m_database.lastError(); + qWarning() << "Failed to open Banshee database." << m_database.lastError(); return false; } else { // TODO(DSC): Verify schema -- cgit v1.2.3