Fixed: Only ask once if user want to uninstall Ryzom, see #279
This commit is contained in:
parent
483f869f77
commit
9e265aac03
2 changed files with 17 additions and 2 deletions
|
@ -27,7 +27,8 @@
|
|||
CConfigFile *CConfigFile::s_instance = NULL;
|
||||
|
||||
CConfigFile::CConfigFile(QObject *parent):QObject(parent), m_version(-1),
|
||||
m_defaultServerIndex(0), m_defaultProfileIndex(0), m_use64BitsClient(false), m_shouldUninstallOldClient(true)
|
||||
m_defaultServerIndex(0), m_defaultProfileIndex(0), m_use64BitsClient(false), m_shouldUninstallOldClient(true),
|
||||
m_uninstallingOldClient(false)
|
||||
{
|
||||
s_instance = this;
|
||||
|
||||
|
@ -461,6 +462,16 @@ void CConfigFile::setShouldUninstallOldClient(bool on)
|
|||
m_shouldUninstallOldClient = on;
|
||||
}
|
||||
|
||||
bool CConfigFile::uninstallingOldClient() const
|
||||
{
|
||||
return m_uninstallingOldClient;
|
||||
}
|
||||
|
||||
void CConfigFile::setUninstallingOldClient(bool on)
|
||||
{
|
||||
m_uninstallingOldClient = on;
|
||||
}
|
||||
|
||||
QString CConfigFile::expandVariables(const QString &str) const
|
||||
{
|
||||
QString res = str;
|
||||
|
@ -972,7 +983,7 @@ OperationStep CConfigFile::getInstallNextStep() const
|
|||
if (!settings.contains("InstallLocation")) return CreateAddRemoveEntry;
|
||||
#endif
|
||||
|
||||
if (m_shouldUninstallOldClient && !getSrcServerDirectory().isEmpty() && QFile::exists(getSrcServerDirectory() + "/Uninstall.exe"))
|
||||
if (!m_uninstallingOldClient && m_shouldUninstallOldClient && !getSrcServerDirectory().isEmpty() && QFile::exists(getSrcServerDirectory() + "/Uninstall.exe"))
|
||||
{
|
||||
return UninstallOldClient;
|
||||
}
|
||||
|
|
|
@ -109,6 +109,9 @@ public:
|
|||
bool shouldUninstallOldClient() const;
|
||||
void setShouldUninstallOldClient(bool on);
|
||||
|
||||
bool uninstallingOldClient() const;
|
||||
void setUninstallingOldClient(bool on);
|
||||
|
||||
QString expandVariables(const QString &str) const;
|
||||
|
||||
QString getClientArch() const;
|
||||
|
@ -147,6 +150,7 @@ private:
|
|||
QString m_srcDirectory;
|
||||
bool m_use64BitsClient;
|
||||
bool m_shouldUninstallOldClient;
|
||||
bool m_uninstallingOldClient;
|
||||
QString m_language;
|
||||
|
||||
QString m_defaultConfigPath;
|
||||
|
|
Loading…
Reference in a new issue