diff --git a/CMakeLists.txt b/CMakeLists.txt index c8d5a423..4f00c2b6 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -477,8 +477,6 @@ endif(UNIX) target_link_libraries (antimicroX antilib Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Network Qt5::Concurrent) endif(UNIX) - target_compile_definitions(antimicroX PUBLIC QT_DEBUG_NO_OUTPUT) # should be commented during development - # Specify out directory for final executable. if(UNIX) diff --git a/src/addeditautoprofiledialog.cpp b/src/addeditautoprofiledialog.cpp index c779d1ce..b58b300c 100755 --- a/src/addeditautoprofiledialog.cpp +++ b/src/addeditautoprofiledialog.cpp @@ -410,9 +410,9 @@ void AddEditAutoProfileDialog::checkForGrabbedWindow(UnixCaptureWindowUtility* u { // Attempt to find the appropriate window below the root window // that was clicked. - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "ORIGINAL: " << QString::number(targetWindow, 16); - #endif + long tempWindow = X11Extras::getInstance()->findClientWindow(targetWindow); if (tempWindow > 0) @@ -420,9 +420,8 @@ void AddEditAutoProfileDialog::checkForGrabbedWindow(UnixCaptureWindowUtility* u targetWindow = tempWindow; } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "ADJUSTED: " << QString::number(targetWindow, 16); - #endif + } if (targetWindow != None) diff --git a/src/advancebuttondialog.cpp b/src/advancebuttondialog.cpp index a329f92e..d7022aef 100755 --- a/src/advancebuttondialog.cpp +++ b/src/advancebuttondialog.cpp @@ -738,9 +738,9 @@ void AdvanceButtonDialog::updateSetSelection() chosen_set = (ui->setSelectionComboBox->currentIndex() + 2) / 3; } - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "CONDITION: " << QString::number(condition_choice) << endl; - #endif + switch(condition_choice) { @@ -757,9 +757,9 @@ void AdvanceButtonDialog::updateSetSelection() break; } - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "CHOSEN SET: " << chosen_set << endl; - #endif + } else { diff --git a/src/autoprofilewatcher.cpp b/src/autoprofilewatcher.cpp index 138b9899..3a67965c 100755 --- a/src/autoprofilewatcher.cpp +++ b/src/autoprofilewatcher.cpp @@ -96,9 +96,9 @@ void AutoProfileWatcher::runAppCheck() { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << qApp->applicationFilePath(); - #endif + QString appLocation = QString(); QString baseAppFileName = QString(); diff --git a/src/axisvaluebox.cpp b/src/axisvaluebox.cpp index e2c9c478..b4f8f8e3 100755 --- a/src/axisvaluebox.cpp +++ b/src/axisvaluebox.cpp @@ -54,15 +54,15 @@ void AxisValueBox::setThrottle(int throttle) { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "throttle value at start of function setThrottle: " << throttle; - #endif + if ((throttle <= static_cast(JoyAxis::PositiveHalfThrottle)) && (throttle >= static_cast(JoyAxis::NegativeHalfThrottle))) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "throttle variable has been set in setThrottle with: " << throttle; - #endif + m_throttle = throttle; setValue(joyValue); } @@ -74,16 +74,16 @@ void AxisValueBox::setValue(int value) { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Value for axis from value box at start is: " << value; qDebug() << "throttle variable has value: " << m_throttle; - #endif + if ((value >= GlobalVariables::JoyAxis::AXISMIN) && (value <= GlobalVariables::JoyAxis::AXISMAX)) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Value for axis from value box is between : " << GlobalVariables::JoyAxis::AXISMIN << " and " << GlobalVariables::JoyAxis::AXISMAX; - #endif + switch(m_throttle) { @@ -118,16 +118,16 @@ void AxisValueBox::setValue(JoyAxis* axis, int value) m_axis = axis; - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Value for axis from value box at start is: " << value; qDebug() << "throttle variable has value: " << m_throttle; - #endif + if ((value >= axis->getAxisMinCal()) && (value <= axis->getAxisMaxCal())) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Value for axis from value box is between : " << axis->getAxisMinCal() << " and " << axis->getAxisMaxCal(); - #endif + switch(m_throttle) { diff --git a/src/buttoneditdialog.cpp b/src/buttoneditdialog.cpp index eb5ad4b3..ce85be56 100755 --- a/src/buttoneditdialog.cpp +++ b/src/buttoneditdialog.cpp @@ -75,9 +75,9 @@ ButtonEditDialog::ButtonEditDialog(InputDevice* joystick, QWidget *parent) : ignoreRelease = false; - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Thread in ButtonEditDialog"; - #endif + PadderCommon::inputDaemonMutex.lock(); @@ -617,9 +617,9 @@ void ButtonEditDialog::invokeMethodLastBtn(JoyButton* lastJoyBtn, ButtonEditDial helper->setThisButton(lastJoyBtn); helper->moveToThread(lastJoyBtn->thread()); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Thread in QuickSetDialog"; - #endif + if (withClear) QMetaObject::invokeMethod(lastJoyBtn, "clearSlotsEventReset", Q_ARG(bool, withTrue)); diff --git a/src/commandlineutility.cpp b/src/commandlineutility.cpp index ce2b6836..f2713bc8 100755 --- a/src/commandlineutility.cpp +++ b/src/commandlineutility.cpp @@ -66,18 +66,18 @@ void CommandLineUtility::parseArguments(QCommandLineParser* parser) { { if (parser->isSet("tray")) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "tray is set"; - #endif + launchInTray = true; hideTrayIcon = false; } else if (parser->isSet("no-tray")) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "no-tray is set"; - #endif + hideTrayIcon = true; launchInTray = false; diff --git a/src/dpadpushbutton.cpp b/src/dpadpushbutton.cpp index 77193082..0b643d66 100755 --- a/src/dpadpushbutton.cpp +++ b/src/dpadpushbutton.cpp @@ -58,9 +58,9 @@ QString DPadPushButton::generateLabel() if (!dpad->getDpadName().isEmpty()) temp.append(dpad->getName(false, ifDisplayNames())); else temp.append(dpad->getName()); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Dpad button name is: " << temp; - #endif + return temp; } diff --git a/src/event.cpp b/src/event.cpp index d08deb76..6b12a6cb 100755 --- a/src/event.cpp +++ b/src/event.cpp @@ -651,10 +651,10 @@ QString keycodeToKeyString(int keycode, int alias) tempstring[numchars] = '\0'; newkey = QString::fromUtf8(tempstring); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "NEWKEY:" << newkey << endl; qDebug() << "NEWKEY LEGNTH:" << numchars << endl; - #endif + } else { diff --git a/src/flashbuttonwidget.cpp b/src/flashbuttonwidget.cpp index ac8e5efb..bbcc2a6d 100755 --- a/src/flashbuttonwidget.cpp +++ b/src/flashbuttonwidget.cpp @@ -78,9 +78,9 @@ void FlashButtonWidget::refreshLabel() setText(generateLabel()); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "label has been set: " << generateLabel(); - #endif + } bool FlashButtonWidget::isButtonFlashing() diff --git a/src/gamecontroller/gamecontroller.cpp b/src/gamecontroller/gamecontroller.cpp index a02c4b7c..726173be 100755 --- a/src/gamecontroller/gamecontroller.cpp +++ b/src/gamecontroller/gamecontroller.cpp @@ -209,9 +209,9 @@ int GameController::getNumberRawAxes() { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Controller has " << SDL_CONTROLLER_AXIS_MAX << " raw axes"; - #endif + return SDL_CONTROLLER_AXIS_MAX; } @@ -233,9 +233,9 @@ void GameController::fillContainers(QHash &button SDL_GameControllerButton currentButton = static_cast(i); SDL_GameControllerButtonBind bound = SDL_GameControllerGetBindForButton(this->controller, currentButton); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Hat " << (i + 1); - #endif + if (bound.bindType == SDL_CONTROLLER_BINDTYPE_HAT) { @@ -245,9 +245,9 @@ void GameController::fillContainers(QHash &button for (int i = 0; i < SDL_JoystickNumButtons(getJoyHandle()); i++) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Button " << (i + 1); - #endif + SDL_GameControllerButton currentButton = static_cast(i); SDL_GameControllerButtonBind bound = SDL_GameControllerGetBindForButton(this->controller, currentButton); @@ -260,9 +260,9 @@ void GameController::fillContainers(QHash &button for (int i = 0; i < SDL_JoystickNumAxes(getJoyHandle()); i++) { - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Axis " << (i + 1); - #endif + SDL_GameControllerAxis currentAxis = static_cast(i); SDL_GameControllerButtonBind bound = SDL_GameControllerGetBindForAxis(this->controller, currentAxis); diff --git a/src/gamecontroller/xml/gamecontrollertriggerxml.cpp b/src/gamecontroller/xml/gamecontrollertriggerxml.cpp index 18115b9c..b20e8a5c 100644 --- a/src/gamecontroller/xml/gamecontrollertriggerxml.cpp +++ b/src/gamecontroller/xml/gamecontrollertriggerxml.cpp @@ -54,9 +54,7 @@ void GameControllerTriggerXml::readJoystickConfig(QXmlStreamReader *xml) int index = xml->attributes().value("index").toString().toInt(); GameControllerTriggerButton *triggerButton = nullptr; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Index for axis in readJoystickConfig is: " << index; - #endif switch (index) { diff --git a/src/gamecontrollermappingdialog.cpp b/src/gamecontrollermappingdialog.cpp index 7b364b7f..bd7f0aeb 100755 --- a/src/gamecontrollermappingdialog.cpp +++ b/src/gamecontrollermappingdialog.cpp @@ -374,9 +374,7 @@ void GameControllerMappingDialog::populateGameControllerBindings(GameController if (controller != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Controller has " << controller->getNumberButtons() << " buttons"; - #endif for (int i = 0; i < controller->getNumberButtons(); i++) { @@ -384,9 +382,7 @@ void GameControllerMappingDialog::populateGameControllerBindings(GameController SDL_GameControllerButtonBind bind = controller->getBindForButton(i); QString temptext = bindingString(bind); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Button " << (i + 1) << ": " << temptext; - #endif if (!temptext.isEmpty()) { @@ -398,9 +394,9 @@ void GameControllerMappingDialog::populateGameControllerBindings(GameController } } - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "Controller has " << controller->getNumberAxes() << " axes"; - #endif + for (int i = 0; i < controller->getNumberAxes(); i++) { @@ -408,9 +404,7 @@ void GameControllerMappingDialog::populateGameControllerBindings(GameController SDL_GameControllerButtonBind bind = controller->getBindForAxis(i); QString temptext = bindingString(bind); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Ax " << (i + 1) << ": " << temptext; - #endif if (!temptext.isEmpty()) { @@ -561,13 +555,13 @@ void GameControllerMappingDialog::enableButtonEvents(int code) Q_UNUSED(code); - #ifndef QT_DEBUG_NO_OUTPUT + bool invoked = QMetaObject::invokeMethod(&helper, "restoreDeviceDeadZones", Qt::BlockingQueuedConnection); if (invoked) qDebug() << "the member restoreDeviceDeadZones could be invoked"; else qDebug() << "the member restoreDeviceDeadZones could not be invoked"; - #else - QMetaObject::invokeMethod(&helper, "restoreDeviceDeadZones", Qt::BlockingQueuedConnection); - #endif + + // QMetaObject::invokeMethod(&helper, "restoreDeviceDeadZones", Qt::BlockingQueuedConnection); + } diff --git a/src/inputdaemon.cpp b/src/inputdaemon.cpp index 6a438b47..b3398dbf 100755 --- a/src/inputdaemon.cpp +++ b/src/inputdaemon.cpp @@ -884,15 +884,14 @@ void InputDaemon::modifyUnplugEvents(QQueue *sdlEventQueue) InputDeviceBitArrayStatus *generatedTemp = genIter.value(); QBitArray tempBitArray = generatedTemp->generateFinalBitArray(); - #ifndef QT_DEBUG_NO_OUTPUT + qDebug() << "ARRAY: " << tempBitArray; - #endif + int bitArraySize = tempBitArray.size(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "ARRAY SIZE: " << bitArraySize; - #endif + if ((bitArraySize > 0) && (tempBitArray.count(true) == device->getNumberAxes())) { diff --git a/src/joyaxis.cpp b/src/joyaxis.cpp index 8199e9b9..863abc20 100755 --- a/src/joyaxis.cpp +++ b/src/joyaxis.cpp @@ -212,17 +212,13 @@ bool JoyAxis::inDeadZone(int value) if (abs(temp) <= deadZone) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Value of throttle is in (less than) dead zone: " << abs(temp) << " <= " << deadZone; - #endif result = true; } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Value of throttle is not in (greater than) dead zone: " << abs(temp) << " > " << deadZone; - #endif } return result; @@ -312,9 +308,7 @@ int JoyAxis::calculateThrottledValue(int value) { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Throtted value at start of function is: " << value; - #endif int temp = value; @@ -322,34 +316,26 @@ int JoyAxis::calculateThrottledValue(int value) { case -2: - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It's a negative half throttle"; - #endif value = (value <= 0) ? value : -value; temp = value; break; case -1: - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It's a negative throttle"; - #endif temp = (value + getAxisMinCal()) / 2; break; case 1: - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It's a positive throttle"; - #endif temp = (value + getAxisMaxCal()) / 2; break; case 2: - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It's a positive half throttle"; - #endif value = (value >= 0) ? value : -value; temp = value; @@ -358,9 +344,7 @@ int JoyAxis::calculateThrottledValue(int value) } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Calculated value of throttle is: " << temp; - #endif return temp; } @@ -466,17 +450,13 @@ void JoyAxis::setThrottle(int value) { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Value of throttle for axis in setThrottle is: " << value; - #endif if ((value >= static_cast(JoyAxis::NegativeHalfThrottle)) && (value <= static_cast(JoyAxis::PositiveHalfThrottle))) { if (value != throttle) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Throttle value for variable \"throttle\" has been set: " << value; - #endif throttle = value; adjustRange(); @@ -746,32 +726,24 @@ void JoyAxis::setCurrentRawValue(int value) if ((value >= getAxisMinCal()) && (value <= getAxisMaxCal())) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Raw value is less than " << getAxisMaxCal() << " and greather than " << getAxisMinCal(); - #endif currentRawValue = value; } else if (value > getAxisMaxCal()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Raw value is greather than " << getAxisMaxCal(); - #endif currentRawValue = getAxisMaxCal(); } else if (value < getAxisMinCal()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Raw value is less than " << getAxisMinCal(); - #endif currentRawValue = getAxisMinCal(); } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Raw value for axis is: " << currentRawValue; - #endif } void JoyAxis::setButtonsMouseMode(JoyButton::JoyMouseMovementMode mode) @@ -909,23 +881,17 @@ JoyAxisButton* JoyAxis::getAxisButtonByValue(int value) JoyAxisButton *eventbutton = nullptr; int throttledValue = calculateThrottledValue(value); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "throttledValue in getAxisButtonByValue is: " << throttledValue; - #endif if (throttledValue > deadZone) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "throtted value is positive"; - #endif eventbutton = paxisbutton; } else if (throttledValue < (-deadZone)) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "throtted value is negative"; - #endif eventbutton = naxisbutton; } diff --git a/src/joyaxiswidget.cpp b/src/joyaxiswidget.cpp index d3f47f3e..7c277b72 100755 --- a/src/joyaxiswidget.cpp +++ b/src/joyaxiswidget.cpp @@ -88,9 +88,7 @@ QString JoyAxisWidget::generateLabel() QString temp = m_axis->getName(false, ifDisplayNames()).replace("&", "&&"); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Name of joy axis is: " << temp; - #endif return temp; } diff --git a/src/joybutton.cpp b/src/joybutton.cpp index 05675f63..cc4a7a58 100755 --- a/src/joybutton.cpp +++ b/src/joybutton.cpp @@ -70,9 +70,7 @@ JoyButton::JoyButton(int index, int originset, SetJoystick *parentSet, { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Thread in Joybutton"; - #endif m_vdpad = nullptr; slotiter = nullptr; @@ -513,9 +511,7 @@ bool JoyButton::distanceEvent() if (previousCycle != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "find previous Cycle in next steps in assignments and skip to it"; - #endif iter.findNext(previousCycle); } @@ -577,17 +573,13 @@ bool JoyButton::distanceEvent() releaseActiveSlots(); currentPause = currentHold = nullptr; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Deactive slots in previous range and activate new slots"; - #endif slotiter->toFront(); if (previousCycle != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Find previous Cycle in slotiter starting from beginning"; - #endif slotiter->findNext(previousCycle); } @@ -662,9 +654,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyKeyboard with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif sendevent(slot, true); getActiveSlotsLocal().append(slot); @@ -673,17 +663,13 @@ void JoyButton::activateSlots() if (!slot->isModifierKey()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There has been assigned a lastActiveKey"; - #endif lastActiveKey = slot; } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It's not modifier key. lastActiveKey is null pointer"; - #endif lastActiveKey = nullptr; @@ -695,9 +681,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyMouseButton with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif if ((tempcode == static_cast(JoyButtonSlot::MouseWheelUp)) || (tempcode == static_cast(JoyButtonSlot::MouseWheelDown))) @@ -733,9 +717,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyMouseMovement with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif slot->getMouseInterval()->restart(); @@ -766,15 +748,11 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyPause with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif if (!getActiveSlots().isEmpty()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "active slots QHash is not empty"; - #endif if (slotiter->hasPrevious()) { @@ -788,9 +766,7 @@ void JoyButton::activateSlots() // Segment can be ignored on a 0 interval pause else if (tempcode > 0) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "active slots QHash is empty"; - #endif currentPause = slot; pauseHold.restart(); @@ -805,9 +781,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyHold with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif currentHold = slot; holdTimer.start(0); @@ -818,9 +792,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyDelay with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif currentDelay = slot; buttonDelay.restart(); @@ -832,9 +804,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyCycle with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif currentCycle = slot; exit = true; @@ -844,9 +814,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyDistance with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif exit = true; break; @@ -855,9 +823,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyRelease with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif if (currentRelease == nullptr) { @@ -865,23 +831,17 @@ void JoyButton::activateSlots() } else if ((currentRelease != nullptr) && getActiveSlots().isEmpty()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "current is release but activeSlots is empty"; - #endif exit = true; } else if ((currentRelease != nullptr) && !getActiveSlots().isEmpty()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "current is release and activeSlots is not empty"; - #endif if (slotiter->hasPrevious()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Back to previous slotiter from release"; - #endif i--; slotiter->previous(); @@ -897,9 +857,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyMouseSpeedMod with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif GlobalVariables::JoyButton::mouseSpeedModifier = tempcode * 0.01; mouseSpeedModList.append(slot); @@ -911,30 +869,22 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyKeyPress with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif if (getActiveSlots().isEmpty()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "activeSlots is empty. It's a true delaySequence and assigned currentKeyPress"; - #endif delaySequence = true; currentKeyPress = slot; } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "activeSlots is not empty. It's a true delaySequence and exit"; - #endif if (slotiter->hasPrevious()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Back to previous slotiter from JoyKeyPress"; - #endif i--; slotiter->previous(); @@ -950,9 +900,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyLoadProfile with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif releaseActiveSlots(); slotiter->toBack(); @@ -969,9 +917,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoySetChange with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif getActiveSlotsLocal().append(slot); break; @@ -981,9 +927,7 @@ void JoyButton::activateSlots() { i++; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << i << ": It's a JoyExecute or JoyTextEntry with code: " << tempcode << " and name: " << slot->getSlotString(); - #endif sendevent(slot, true); break; @@ -1267,10 +1211,8 @@ void JoyButton::mouseEvent() (currentAccelMulti > 0.0) && (fabs(getAccelerationDistance() - startingAccelerationDistance) < minstop)) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Keep Trying: " << fabs(getAccelerationDistance() - lastAccelerationDistance); qDebug() << "MIN TRAVEL: " << mintravel; - #endif updateStartingMouseDistance = true; double magfactor = extraAccelerationMultiplier; @@ -1932,9 +1874,7 @@ QList JoyButton::getActiveZoneList() { if (previousCycle != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "if there exists previous Cycle, find it in activeSlots"; - #endif iter->findNext(previousCycle); } @@ -2001,9 +1941,7 @@ QString JoyButton::getSlotsString() if (getAssignedSlots()->size() > 0) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There is more assignments than 0 in getSlotsString(): " << getAssignedSlots()->count(); - #endif QListIterator iter(*getAssignedSlots()); QStringList stringlist = QStringList(); @@ -2018,9 +1956,7 @@ QString JoyButton::getSlotsString() } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There is no assignments for button in getSlotsString()"; - #endif label = label.append(tr("[NO KEY]")); } @@ -2242,9 +2178,7 @@ bool JoyButton::insertAssignedSlot(int code, int alias, int index, getAssignmentsLocal().append(slot); } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "assignments variable in joybutton has now: " << getAssignedSlots()->count() << " input slots"; - #endif checkTurboCondition(slot); assignmentsLock.unlock(); @@ -2735,10 +2669,8 @@ void JoyButton::holdEvent() // Activate hold event if (currentlyPressed && (buttonHold.elapsed() > currentHold->getSlotCode())) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << buttonHold.elapsed() << " > " << currentHold->getSlotCode(); qDebug() << "Activate hold event"; - #endif releaseActiveSlots(); currentHold = nullptr; @@ -2749,27 +2681,21 @@ void JoyButton::holdEvent() // Elapsed time has not occurred else if (currentlyPressed) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Elapsed time has not occurred, because buttonHold: " << buttonHold.elapsed() << " is not greater than currentHoldCode: " << currentHold->getSlotCode(); - #endif startTimerOverrun(currentHold->getSlotCode(), &buttonHold, &holdTimer); } // Pre-emptive release else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Hold button is not pressed"; - #endif currentHold = nullptr; holdTimer.stop(); if (slotiter != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "slotiter exists"; - #endif findJoySlotsEnd(slotiter); createDeskEvent(); @@ -2886,9 +2812,7 @@ void JoyButton::releaseDeskEvent(bool skipsetchange) { // At the end of the list of assignments. - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There is end of slotiter. Set currentCycle and previousCycle as null pointers"; - #endif currentCycle = nullptr; previousCycle = nullptr; @@ -2897,9 +2821,7 @@ void JoyButton::releaseDeskEvent(bool skipsetchange) else if ((slotiter != nullptr) && slotiter->hasNext() && (currentCycle != nullptr)) { // Cycle at the end of a segment. - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There exists next element in slotiter and exists currentCycle. Skip to currentCycle in slotiter starting from beginning"; - #endif slotiter->toFront(); slotiter->findNext(currentCycle); @@ -2910,9 +2832,7 @@ void JoyButton::releaseDeskEvent(bool skipsetchange) // current slot. Useful after dealing with pause // actions. - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "There exists next element and previous element in slotiter but doesn't exists currentCycle. From current point in slotiter find JoyButtonSlot::JoyCycle as slotMode and assign to currentCycle"; - #endif JoyButtonSlot *tempslot = nullptr; bool exit = false; @@ -2932,9 +2852,7 @@ void JoyButton::releaseDeskEvent(bool skipsetchange) // to the front. if (currentCycle == nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Didn't find any cycle. Back to start of slotiter"; - #endif slotiter->toFront(); previousCycle = nullptr; @@ -2943,18 +2861,14 @@ void JoyButton::releaseDeskEvent(bool skipsetchange) if (currentCycle != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "currentCycle exists and previousCycle will be current but current will be null pointer"; - #endif previousCycle = currentCycle; currentCycle = nullptr; } else if ((slotiter != nullptr) && slotiter->hasNext() && containsReleaseSlots()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Slotiter has next element on the list. In assignments exists JoyButtonSlot::JoyRelease starting from current point. CurrentCycle and previousCycle are set null pointers now"; - #endif currentCycle = nullptr; previousCycle = nullptr; @@ -3137,9 +3051,7 @@ void JoyButton::clearSlotsEventReset(bool clearSignalEmit) clearAssignedSlots(clearSignalEmit); clearQueues(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "all current slots and previous slots ale cleared"; - #endif } @@ -3153,9 +3065,7 @@ void JoyButton::eventReset() stopTimers(false, true, false); clearQueues(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "all current slots and previous slots ale cleared"; - #endif releaseActiveSlots(); } @@ -3453,9 +3363,7 @@ void JoyButton::findJoySlotsEnd(QListIterator *slotiter) bool found = false; while (!found && slotiter->hasNext()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "slotiter has next element"; - #endif JoyButtonSlot::JoySlotInputAction mode = slotiter->next()->getSlotMode(); @@ -3680,9 +3588,7 @@ QString JoyButton::getActionName() { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Action name is: " << actionName; - #endif return actionName; } @@ -4581,9 +4487,7 @@ void JoyButton::resetProperties() { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "all current slots and previous slots ale cleared"; - #endif resetAllProperties(); } diff --git a/src/joybuttontypes/joycontrolstickbutton.cpp b/src/joybuttontypes/joycontrolstickbutton.cpp index ce12eafd..9efbd668 100755 --- a/src/joybuttontypes/joycontrolstickbutton.cpp +++ b/src/joybuttontypes/joycontrolstickbutton.cpp @@ -291,9 +291,7 @@ QString JoyControlStickButton::getCalculatedActiveZoneSummary() if ((tempButton != nullptr) && tempButton->getButtonState() && tempButton->hasActiveSlots() && getButtonState()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Calculated Active Zone Summary: " << tempButton->getCalculatedActiveZoneSummary(); - #endif stringlist.append(tempButton->getCalculatedActiveZoneSummary()); } @@ -301,9 +299,7 @@ QString JoyControlStickButton::getCalculatedActiveZoneSummary() stringlist.append(JoyButton::getCalculatedActiveZoneSummary()); temp = stringlist.join(", "); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Returned joined zone: " << temp; - #endif return temp; } diff --git a/src/joybuttontypes/joygradientbutton.cpp b/src/joybuttontypes/joygradientbutton.cpp index e83c32d3..cabc1f2c 100755 --- a/src/joybuttontypes/joygradientbutton.cpp +++ b/src/joybuttontypes/joygradientbutton.cpp @@ -48,9 +48,7 @@ void JoyGradientButton::turboEvent() { double diff = fabs(getMouseDistanceFromDeadZone() - lastDistance); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "DIFF: " << QString::number(diff); - #endif bool changeState = false; @@ -135,18 +133,14 @@ void JoyGradientButton::turboEvent() changeState = false; lastDistance = getMouseDistanceFromDeadZone(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "diff tmpTurbo press: " << QString::number(tempTurboInterval); qDebug() << "diff timer press: " << QString::number(timerInterval); - #endif } else { changeState = true; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "YOU GOT CHANGE"; - #endif } } @@ -179,10 +173,8 @@ void JoyGradientButton::turboEvent() int timerInterval = qMin(tempTurboInterval, 5); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "tmpTurbo press: " << QString::number(tempTurboInterval); qDebug() << "timer press: " << QString::number(timerInterval); - #endif if (turboTimer.interval() != timerInterval) { @@ -226,10 +218,8 @@ void JoyGradientButton::turboEvent() int timerInterval = qMin(tempTurboInterval, 5); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "tmpTurbo release: " << QString::number(tempTurboInterval); qDebug() << "timer release: " << QString::number(timerInterval); - #endif if (turboTimer.interval() != timerInterval) { diff --git a/src/joybuttonwidget.cpp b/src/joybuttonwidget.cpp index a98346eb..1a21828f 100755 --- a/src/joybuttonwidget.cpp +++ b/src/joybuttonwidget.cpp @@ -76,9 +76,7 @@ QString JoyButtonWidget::generateLabel() QString temp = m_button->getName(false, ifDisplayNames()).replace("&", "&&"); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Name of joy button is: " << temp; - #endif return temp; } diff --git a/src/joycontrolstick.cpp b/src/joycontrolstick.cpp index f10ee783..bc300e08 100755 --- a/src/joycontrolstick.cpp +++ b/src/joycontrolstick.cpp @@ -4190,9 +4190,7 @@ double JoyControlStick::calculateXAxisDistance(int axisXValue) if (distance < -1.0) distance = -1.0; else if (distance > 1.0) distance = 1.0; - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "DISTANCE: " << distance; - #endif return distance; } diff --git a/src/joycontrolstickbuttonpushbutton.cpp b/src/joycontrolstickbuttonpushbutton.cpp index 57588b6f..5847d622 100755 --- a/src/joycontrolstickbuttonpushbutton.cpp +++ b/src/joycontrolstickbuttonpushbutton.cpp @@ -111,26 +111,20 @@ QString JoyControlStickButtonPushButton::generateLabel() { if (!button->getActionName().isEmpty() && ifDisplayNames()) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Action name was not empty"; - #endif temp = button->getActionName().replace("&", "&&"); } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Action name was empty"; - #endif temp = button->getCalculatedActiveZoneSummary().replace("&", "&&"); } } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Here is name of action for pushed stick button: " << temp; - #endif return temp; } diff --git a/src/joycontrolstickpushbutton.cpp b/src/joycontrolstickpushbutton.cpp index 81f592b9..8f84e0cd 100755 --- a/src/joycontrolstickpushbutton.cpp +++ b/src/joycontrolstickpushbutton.cpp @@ -68,9 +68,7 @@ QString JoyControlStickPushButton::generateLabel() temp.append(stick->getPartialName(false)); } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Name of joy control stick push button: " << temp; - #endif return temp; } diff --git a/src/joydpadbuttonwidget.cpp b/src/joydpadbuttonwidget.cpp index ad1c0430..e13981a3 100755 --- a/src/joydpadbuttonwidget.cpp +++ b/src/joydpadbuttonwidget.cpp @@ -52,9 +52,7 @@ QString JoyDPadButtonWidget::generateLabel() } temp.replace("&", "&&"); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Name of joy dpad button is: " << temp; - #endif return temp; } diff --git a/src/keyboard/virtualkeyboardmousewidget.cpp b/src/keyboard/virtualkeyboardmousewidget.cpp index a344698c..1aac3946 100755 --- a/src/keyboard/virtualkeyboardmousewidget.cpp +++ b/src/keyboard/virtualkeyboardmousewidget.cpp @@ -626,10 +626,6 @@ VirtualKeyPushButton* VirtualKeyboardMouseWidget::createNewKey(QString xcodestri { qInstallMessageHandler(MessageHandler::myMessageOutput); - #ifndef QT_DEBUG_NO_OUTPUT - //qDebug() << "parameter 1: " << xcodestring; - #endif - int width = 32; int height = 32; QFont font1; @@ -862,10 +858,6 @@ void VirtualKeyboardMouseWidget::establishVirtualKeyboardSingleSignalConnections disconnect(noneButton, &QPushButton::clicked, nullptr, nullptr); connect(noneButton, &QPushButton::clicked, this, &VirtualKeyboardMouseWidget::clearButtonSlotsFinish); - - #ifndef QT_DEBUG_NO_OUTPUT - // qDebug() << "COUNT: " << newlist.count(); - #endif } void VirtualKeyboardMouseWidget::establishVirtualKeyboardAdvancedSignalConnections() diff --git a/src/keyboard/virtualkeypushbutton.cpp b/src/keyboard/virtualkeypushbutton.cpp index 3b93a818..0e8c1ced 100755 --- a/src/keyboard/virtualkeypushbutton.cpp +++ b/src/keyboard/virtualkeypushbutton.cpp @@ -72,12 +72,10 @@ VirtualKeyPushButton::VirtualKeyPushButton(QString xcodestring, QWidget *parent) } - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "qkeyalias after returnQtKey: " << this->qkeyalias; qDebug() << "keycode: " << this->keycode; qDebug() << "xcodestring: " << this->xcodestring; qDebug() << "displayString: " << this->displayString; - #endif this->setText(this->displayString.replace("&", "&&")); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5cc120b6..9b7106ae 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -316,10 +316,8 @@ void MainWindow::controllerMapOpening() int joypadIndex = m_cmdutility->getControllerNumber(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It was antimicroX --map controllerNumber"; qDebug() << "controllerNumber: " << joypadIndex; - #endif selectControllerJoyTab(joypadIndex); openGameControllerMappingWindow(true); @@ -328,19 +326,15 @@ void MainWindow::controllerMapOpening() { QString joypadGUID = m_cmdutility->getControllerID(); - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "It was antimicroX --map controllerID"; qDebug() << "controllerID: " << joypadGUID; - #endif selectControllerJoyTab(joypadGUID); openGameControllerMappingWindow(true); } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "Could not find a proper controller identifier. Exiting"; - #endif Logger::LogInfo(tr("Could not find a proper controller identifier. " "Exiting.")); @@ -1886,16 +1880,12 @@ void MainWindow::selectControllerJoyTab(int index) JoyTabWidget *widget = qobject_cast (ui->tabWidget->widget(index - 1)); // static_cast if (widget != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "JoyTabWidget was not a null pointer in selectControllerJoyTab of index"; - #endif ui->tabWidget->setCurrentIndex(index - 1); } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "JoyTabWidget was a NULL POINTER in selectControllerJoyTab of index"; - #endif } } } @@ -1927,17 +1917,13 @@ void MainWindow::selectControllerJoyTab(QString GUID) if (device != nullptr) { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "InputDevice was not a null pointer in selectControllerJoyTab of GUID"; - #endif ui->tabWidget->setCurrentIndex(device->getJoyNumber()); } else { - #ifndef QT_DEBUG_NO_OUTPUT qDebug() << "InputDevice was a NULL POINTER in selectControllerJoyTab of GUID"; - #endif } } } diff --git a/src/messagehandler.cpp b/src/messagehandler.cpp index d9ead8f7..e7364e3c 100755 --- a/src/messagehandler.cpp +++ b/src/messagehandler.cpp @@ -26,9 +26,6 @@ namespace MessageHandler { void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) { - - #ifndef QT_DEBUG_NO_OUTPUT - QByteArray localMsg = msg.toLocal8Bit(); switch (type) { case QtDebugMsg: @@ -56,7 +53,5 @@ namespace MessageHandler default: break; } - - #endif } } diff --git a/src/quicksetdialog.cpp b/src/quicksetdialog.cpp index 85abff6e..6cc9f3be 100755 --- a/src/quicksetdialog.cpp +++ b/src/quicksetdialog.cpp @@ -318,9 +318,7 @@ void QuickSetDialog::invokeMethodLastBtn(JoyButton* lastJoyBtn, Qt::ConnectionTy helper->setThisButton(lastButton); helper->moveToThread(lastButton->thread()); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "Thread in QuickSetDialog"; - #endif + qDebug() << "Thread in QuickSetDialog"; if (withClear) QMetaObject::invokeMethod(lastButton, "clearSlotsEventReset", Q_ARG(bool, withTrue)); diff --git a/src/setjoystick.cpp b/src/setjoystick.cpp index 9393f650..a215c787 100755 --- a/src/setjoystick.cpp +++ b/src/setjoystick.cpp @@ -549,10 +549,9 @@ void SetJoystick::propogateSetButtonClick(int button) emit setButtonClick(m_index, button); lastClickedButtons.append(jButton); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "Added button " << jButton->getPartialName(false,true) << " to list"; - qDebug() << "List has " << getLastClickedButtons().count() << " buttons"; - #endif + qDebug() << "Added button " << jButton->getPartialName(false,true) << " to list"; + qDebug() << "List has " << getLastClickedButtons().count() << " buttons"; + } } diff --git a/src/unixcapturewindowutility.cpp b/src/unixcapturewindowutility.cpp index 0c8cef7e..a75a3608 100755 --- a/src/unixcapturewindowutility.cpp +++ b/src/unixcapturewindowutility.cpp @@ -98,9 +98,9 @@ void UnixCaptureWindowUtility::attemptWindowCapture() if (target_window == None) target_window = event.xbutton.window; - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << QString::number(target_window, 16); - #endif + + qDebug() << QString::number(target_window, 16); + break; diff --git a/src/x11extras.cpp b/src/x11extras.cpp index ddd217bf..25857938 100755 --- a/src/x11extras.cpp +++ b/src/x11extras.cpp @@ -583,9 +583,7 @@ QString X11Extras::getWindowTitle(Window window) unsigned char *prop = nullptr; int status = 0; -#ifndef QT_DEBUG_NO_OUTPUT qDebug() << "WIN: 0x" << QString::number(window, 16); -#endif Display *display = this->display(); Atom wm_name = XInternAtom(display, "WM_NAME", True); @@ -617,9 +615,8 @@ QString X11Extras::getWindowTitle(Window window) char *tempprop = reinterpret_cast(prop); temp.append(QString::fromUtf8(tempprop)); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << temp; - #endif + qDebug() << temp; + } freeWindow(prop); @@ -648,9 +645,7 @@ QString X11Extras::getWindowClass(Window window) if ((status == Success) && (prop != nullptr)) { - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << nitems; - #endif + qDebug() << nitems; char *null_char = strchr(reinterpret_cast(prop), '\0'); if (((reinterpret_cast(prop)) + nitems - 1) > null_char) @@ -661,10 +656,8 @@ QString X11Extras::getWindowClass(Window window) char *tempprop = reinterpret_cast(prop); temp.append(QString::fromUtf8(tempprop)); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << temp; - qDebug() << reinterpret_cast(prop); - #endif + qDebug() << temp; + qDebug() << reinterpret_cast(prop); } freeWindow(prop); diff --git a/src/xml/joyaxisxml.cpp b/src/xml/joyaxisxml.cpp index 4bcbc8c3..5913840a 100644 --- a/src/xml/joyaxisxml.cpp +++ b/src/xml/joyaxisxml.cpp @@ -136,9 +136,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) QString temptext = xml->readElementText(); int tempchoice = temptext.toInt(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config dead zone is: " << tempchoice; - #endif + qDebug() << "From xml config dead zone is: " << tempchoice; m_joyAxis->setDeadZone(tempchoice); } @@ -148,9 +146,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) QString temptext = xml->readElementText(); int tempchoice = temptext.toInt(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config max zone is: " << tempchoice; - #endif + qDebug() << "From xml config max zone is: " << tempchoice; m_joyAxis->setMaxZoneValue(tempchoice); } @@ -160,9 +156,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) QString temptext = xml->readElementText(); int tempchoice = temptext.toInt(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config center value is: " << tempchoice; - #endif + qDebug() << "From xml config center value is: " << tempchoice; m_joyAxis->setAxisCenterCal(tempchoice); } @@ -172,9 +166,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) QString temptext = xml->readElementText(); int tempchoice = temptext.toInt(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config min value is: " << tempchoice; - #endif + qDebug() << "From xml config min value is: " << tempchoice; m_joyAxis->setAxisMinCal(tempchoice); } @@ -185,9 +177,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) QString temptext = xml->readElementText(); int tempchoice = temptext.toInt(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config max value is: " << tempchoice; - #endif + qDebug() << "From xml config max value is: " << tempchoice; m_joyAxis->setAxisMaxCal(tempchoice); } @@ -196,9 +186,7 @@ bool JoyAxisXml::readMainConfig(QXmlStreamReader *xml) found = true; QString temptext = xml->readElementText(); - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "From xml config throttle name is: " << temptext; - #endif + qDebug() << "From xml config throttle name is: " << temptext; if (temptext == "negativehalf") { diff --git a/src/xml/joybuttonslotxml.cpp b/src/xml/joybuttonslotxml.cpp index d55e59e7..5b601325 100644 --- a/src/xml/joybuttonslotxml.cpp +++ b/src/xml/joybuttonslotxml.cpp @@ -221,9 +221,7 @@ void JoyButtonSlotXml::writeConfig(QXmlStreamWriter *xml) if ((qtkey == 0) && (basekey > 0)) qtkey = basekey; // Found a valid abstract keysym. - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "ANT KEY: " << QString::number(qtkey, 16); - #endif + qDebug() << "ANT KEY: " << QString::number(qtkey, 16); xml->writeTextElement("code", QString("0x%1").arg(qtkey, 0, 16)); } @@ -232,9 +230,7 @@ void JoyButtonSlotXml::writeConfig(QXmlStreamWriter *xml) // No abstraction provided for key. Add prefix to native keysym. int tempkey = m_joyBtnSlot->getSlotCode() | QtKeyMapperBase::nativeKeyPrefix; - #ifndef QT_DEBUG_NO_OUTPUT - qDebug() << "ANT KEY: " << QString::number(tempkey, 16); - #endif + qDebug() << "ANT KEY: " << QString::number(tempkey, 16); xml->writeTextElement("code", QString("0x%1").arg(tempkey, 0, 16)); }