Skip to content

Commit

Permalink
Remove no longer used database ping setting
Browse files Browse the repository at this point in the history
Remove the setting from mythfrontend setup and default it to false in
config.xml.

Refs #918
  • Loading branch information
bennettpeter committed Nov 10, 2024
1 parent 91a2e8f commit 43226a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions mythtv/libs/libmyth/dbsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ DatabaseSettings::DatabaseSettings(QString DBhostOverride) :
"This information is required."));
addChild(m_dbHostName);

m_dbHostPing = new TransMythUICheckBoxSetting();
m_dbHostPing->setLabel(DatabaseSettings::tr("Ping test server?"));
m_dbHostPing->setHelpText(
DatabaseSettings::tr("Test basic host connectivity using "
"the ping command. Turn off if your "
"host or network don't support ping "
"(ICMP ECHO) packets"));
addChild(m_dbHostPing);
// Ping database host is no longer used

m_dbPort = new TransTextEditSetting();
m_dbPort->setLabel(DatabaseSettings::tr("Port"));
Expand Down Expand Up @@ -160,8 +153,6 @@ void DatabaseSettings::Load(void)
m_dbHostName->setValue(params.m_dbHostName);
}

m_dbHostPing->setValue(params.m_dbHostPing);

if (params.m_dbPort)
m_dbPort->setValue(QString::number(params.m_dbPort));

Expand Down Expand Up @@ -190,7 +181,8 @@ void DatabaseSettings::Save(void)
DatabaseParams params = GetMythDB()->GetDatabaseParams();

params.m_dbHostName = m_dbHostName->getValue();
params.m_dbHostPing = m_dbHostPing->boolValue();
// Ping database host is no longer used
params.m_dbHostPing = false;
params.m_dbPort = m_dbPort->getValue().toInt();
params.m_dbUserName = m_dbUserName->getValue();
params.m_dbPassword = m_dbPassword->getValue();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythdbparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MBASE_PUBLIC DatabaseParams
{ return !((*this)==other); }

QString m_dbHostName {"localhost"}; ///< database server
bool m_dbHostPing {true}; ///< Can we test connectivity using ping?
bool m_dbHostPing {false}; ///< No longer used
int m_dbPort {3306}; ///< database port
QString m_dbUserName {"mythtv"}; ///< DB user name
QString m_dbPassword {"mythtv"}; ///< DB password
Expand Down

0 comments on commit 43226a6

Please sign in to comment.