Skip to content

Commit 208c2b6

Browse files
committed
chore: Remove unused methods
1 parent 24f96d6 commit 208c2b6

File tree

6 files changed

+1
-69
lines changed

6 files changed

+1
-69
lines changed

src/gui/gamecontrollermappingdialog.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,6 @@ void GameControllerMappingDialog::enableDeviceConnections()
486486
connect(device, &InputDevice::rawAxisActivated, this, &GameControllerMappingDialog::axisAssign);
487487
connect(device, &InputDevice::rawAxisReleased, this, &GameControllerMappingDialog::axisRelease);
488488
connect(device, &InputDevice::rawDPadButtonClick, this, &GameControllerMappingDialog::dpadAssign);
489-
connect(device, &InputDevice::rawDPadButtonRelease, this, &GameControllerMappingDialog::dpadRelease);
490489
}
491490

492491
void GameControllerMappingDialog::disableDeviceConnections()
@@ -592,18 +591,6 @@ void GameControllerMappingDialog::axisRelease(int axis, int value)
592591
*/
593592
void GameControllerMappingDialog::buttonRelease(int buttonindex) { Q_UNUSED(buttonindex); }
594593

595-
/**
596-
* @brief TODO: Possibly remove. This was used for decrementing a reference
597-
* count.
598-
* @param dpad
599-
* @param buttonindex
600-
*/
601-
void GameControllerMappingDialog::dpadRelease(int dpad, int buttonindex)
602-
{
603-
Q_UNUSED(dpad);
604-
Q_UNUSED(buttonindex);
605-
}
606-
607594
void GameControllerMappingDialog::populateAxisDeadZoneComboBox()
608595
{
609596
for (int i = 0; i < 28; i++)

src/gui/gamecontrollermappingdialog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class GameControllerMappingDialog : public QDialog
6868
void dpadAssign(int dpad, int buttonindex);
6969
void buttonRelease(int buttonindex);
7070
void axisRelease(int axis, int value);
71-
void dpadRelease(int dpad, int buttonindex);
7271
void saveChanges();
7372
void discardMapping(QAbstractButton *button);
7473
void enableButtonEvents(int code);

src/gui/mainwindow.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,27 +1664,6 @@ void MainWindow::checkAutoProfileWatcherTimer()
16641664
#endif
16651665
}
16661666

1667-
/**
1668-
* @brief TODO: Check if method is save to remove.
1669-
*/
1670-
void MainWindow::updateMenuOptions()
1671-
{
1672-
int index = ui->tabWidget->currentIndex();
1673-
if (index >= 0)
1674-
{
1675-
JoyTabWidget *joyTab = qobject_cast<JoyTabWidget *>(ui->tabWidget->widget(index)); // static_cast
1676-
InputDevice *joystick = joyTab->getJoystick();
1677-
1678-
if (qobject_cast<GameController *>(joystick) != nullptr)
1679-
{
1680-
ui->actionStick_Pad_Assign->setEnabled(false);
1681-
} else
1682-
{
1683-
ui->actionStick_Pad_Assign->setEnabled(true);
1684-
}
1685-
}
1686-
}
1687-
16881667
void MainWindow::showBatteryLevel(SDL_JoystickPowerLevel powerLevSDL, QString batteryLev, QString percent,
16891668
InputDevice *device)
16901669
{

src/gui/mainwindow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ class MainWindow : public QMainWindow
145145
void propogateMappingUpdate(QString mapping, InputDevice *device);
146146
void autoprofileLoad(AutoProfileInfo *info); // MainConfiguration class
147147
void checkAutoProfileWatcherTimer(); // MainConfiguration class
148-
void updateMenuOptions();
149148

150149
private:
151150
/**

src/joybuttontypes/joybutton.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3942,37 +3942,6 @@ void JoyButton::keyPressEvent()
39423942
}
39433943
}
39443944

3945-
/**
3946-
* @brief TODO: CHECK IF METHOD WOULD BE USEFUL. CURRENTLY NOT USED.
3947-
* @return Result
3948-
*/
3949-
bool JoyButton::checkForDelaySequence()
3950-
{
3951-
bool result = false;
3952-
QListIterator<JoyButtonSlot *> tempiter(*getAssignedSlots());
3953-
3954-
// Move iterator to start of cycle.
3955-
if (previousCycle != nullptr)
3956-
tempiter.findNext(previousCycle);
3957-
3958-
while (tempiter.hasNext())
3959-
{
3960-
JoyButtonSlot *slot = tempiter.next();
3961-
3962-
if ((slot->getSlotMode() == JoyButtonSlot::JoyPause) || (slot->getSlotMode() == JoyButtonSlot::JoyRelease))
3963-
{
3964-
result = true;
3965-
tempiter.toBack();
3966-
} else if (slot->getSlotMode() == JoyButtonSlot::JoyCycle)
3967-
{
3968-
result = false;
3969-
tempiter.toBack();
3970-
}
3971-
}
3972-
3973-
return result;
3974-
}
3975-
39763945
SetJoystick *JoyButton::getParentSet() { return m_parentSet; }
39773946

39783947
void JoyButton::checkForPressedSetChange()

src/joybuttontypes/joybutton.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ class JoyButton : public QObject
272272

273273
double getTotalSlotDistance(JoyButtonSlot *slot);
274274

275-
bool distanceEvent(); // JoyButtonEvents class
276-
bool checkForDelaySequence();
275+
bool distanceEvent(); // JoyButtonEvents class
277276
void clearAssignedSlots(bool signalEmit = true); // JoyButtonSlots class
278277
void releaseSlotEvent(); // JoyButtonEvents class
279278
void checkForPressedSetChange();

0 commit comments

Comments
 (0)