mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Changed: Moved createDefaultProfile
--HG-- branch : develop
This commit is contained in:
parent
591f9c88d5
commit
0b2928d349
1 changed files with 42 additions and 36 deletions
|
@ -371,6 +371,48 @@ void COperationDialog::cleanFiles()
|
|||
CFilesCleaner cleaner(this);
|
||||
cleaner.setDirectory(config->getInstallationDirectory() + "/" + server.id);
|
||||
cleaner.exec();
|
||||
|
||||
emit done();
|
||||
}
|
||||
|
||||
bool COperationDialog::createDefaultProfile()
|
||||
{
|
||||
CConfigFile *config = CConfigFile::getInstance();
|
||||
|
||||
CServer server = config->getServer(config->getDefaultServerIndex());
|
||||
|
||||
m_currentOperation = QApplication::tr("Create default profile");
|
||||
m_currentOperationProgressFormat = QApplication::tr("Deleting %1...");
|
||||
|
||||
CProfile profile;
|
||||
|
||||
profile.id = "0";
|
||||
profile.executable = config->getClientFullPath();
|
||||
profile.name = QString("Ryzom (%1)").arg(server.name);
|
||||
profile.server = server.id;
|
||||
profile.comments = "Default profile created by Ryzom Installer";
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// C:\Users\Public\Desktop
|
||||
profile.desktopShortcut = QFile::exists(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + "/Ryzom.lnk");
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
// profile.menuShortcut
|
||||
|
||||
config->addProfile(profile);
|
||||
config->save();
|
||||
|
||||
emit done();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool COperationDialog::createDefaultShortcuts()
|
||||
{
|
||||
emit done();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void COperationDialog::operationPrepare()
|
||||
|
@ -414,39 +456,3 @@ bool COperationDialog::operationShouldStop()
|
|||
|
||||
return m_aborting;
|
||||
}
|
||||
|
||||
bool COperationDialog::createDefaultProfile()
|
||||
{
|
||||
CConfigFile *config = CConfigFile::getInstance();
|
||||
|
||||
CServer server = config->getServer(config->getDefaultServerIndex());
|
||||
|
||||
CProfile profile;
|
||||
|
||||
profile.id = 0;
|
||||
profile.executable = config->getClientFullPath();
|
||||
profile.name = QString("Ryzom (%1)").arg(server.name);
|
||||
profile.server = server.id;
|
||||
profile.comments = "Default profile created by Ryzom Installer";
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
profile.desktopShortcut = QFile::exists(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + "/Ryzom.lnk");
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
// profile.menuShortcut
|
||||
|
||||
config->addProfile(profile);
|
||||
config->save();
|
||||
|
||||
onDone();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool COperationDialog::createDefaultShortcuts()
|
||||
{
|
||||
onDone();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue